@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/assets/satori/bricolage-grotesque-latin.woff2") format("woff2");
  font-weight: 700 800;
  font-display: swap;
}
@font-face {
  font-family: Figtree;
  src: url("/assets/satori/figtree-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}

:root {
  color-scheme: light;
  --cran: #be0a1d;
  --pine: #034c2e;
  --mari: #fdc320;
  --sugar: #f990a9;
  --sage: #86c2a6;
  --frost: #6fdcd6;
  --ink: #1f1a1c;
  --dim: #545a56;
  --line: #dadfd8;
  --paper: #fff;
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --sans: Figtree, system-ui, sans-serif;
  font: 16px/1.5 var(--sans);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
button, a { touch-action: manipulation; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
:where(button, a, textarea):focus-visible { outline: 3px solid #007b70; outline-offset: 4px; }
:where(button, a, i, .pill) > svg { width: 1.17em; height: 1.17em; flex-shrink: 0; }
i[data-icon] { display: inline-flex; }
.skip {
  position: fixed; left: 12px; top: 12px; z-index: 100;
  transform: translateY(calc(-100% - 20px)); padding: 10px; background: white;
}
.skip:focus { transform: none; }

.topbar { border-bottom: 1px solid var(--line); background: white; }
.top-inner, main, .site-foot {
  width: min(1392px,100%); margin: auto;
  padding-inline: clamp(24px,4vw,64px);
}
.top-inner { display: flex; align-items: center; gap: clamp(22px,4.6vw,68px); min-height: 81px; }
.brand { display: inline-flex; align-items: center; padding: 4px 2px; }
.brand img { width: 94px; height: auto; display: block; }
.topbar nav { display: flex; gap: 6px; }
.topbar nav a, .display-link {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 15px; border-radius: 999px; font-size: .94rem; font-weight: 700;
  min-height: 43px; color: var(--pine);
}
.topbar nav a[aria-current="page"] { background: #e4f3eb; }
.topbar nav a:hover { background: #eff7f1; }
.display-link { margin-left: auto; background: var(--pine); color: white; }
.display-link:hover { background: #05613b; }
.short-label { display: none; }

main { padding-bottom: clamp(36px,4vw,56px); outline: none; min-height: 65vh; }
.page-head, .section-heading, .caption { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.page-head { margin: clamp(29px,3.2vw,45px) 0 clamp(23px,2.3vw,34px); }
.page-head h1, .caption h2, .scan-copy h2, .section-heading h2, .sub-card h2, .empty-card h2,
.gallery-dialog h2 {
  font-family: var(--display); font-weight: 800; font-optical-sizing: auto;
  letter-spacing: -.048em; line-height: 1.02; margin: 0; color: var(--pine);
}
.page-head h1 { font-size: clamp(2.38rem,4.3vw,4.12rem); }
.page-head p, .section-heading p { margin: .44rem 0 0; color: var(--dim); font-size: 1.02rem; }
.head-spark { display: inline-block; width: .47em; height: .56em; vertical-align: top; margin: .035em 0 0 .17em; fill: var(--mari); }
.pill {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 7px; white-space: nowrap; border-radius: 999px; padding: 6px 12px;
  font-size: .82rem; font-weight: 700;
}
.status, .total-pill { background: #e9f5ed; color: var(--pine); }
.status::before, .live::before { content: ""; width: 7px; height: 7px; border-radius: 100%; background: #197a46; }
.status[data-state="offline"] { background: #fff1c5; color: #614611; }
.status[data-state="offline"]::before, .live[data-state="offline"]::before { background: #a8680a; }

.hero-grid, .recap-grid { display: grid; grid-template-columns: minmax(0,2.16fr) minmax(270px,1fr); gap: 22px; }
.card, .sample { border: 1px solid var(--line); background: white; border-radius: 17px; overflow: hidden; }
.village-card { display: flex; flex-direction: column; margin: 0; }
.scene-shell { position: relative; isolation: isolate; flex: 1; min-height: 280px; background: #193a38; overflow: hidden; }
.hero-grid .scene-shell { min-height: clamp(300px,28vw,402px); }
.village-host { position: absolute; inset: 0; }
.scene-tag {
  position: absolute; top: 16px; left: 16px; z-index: 2; border-radius: 99px;
  padding: 6px 11px; background: #013f2ae8; color: white;
  font: 750 .73rem/1.4 var(--sans); letter-spacing: .09em; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 7px;
}
.live::before { background: #a9e85c; width: 6px; height: 6px; }
.expand-btn {
  position: absolute; right: 14px; top: 12px; z-index: 2; width: 44px; height: 44px;
  border-radius: 50%; display: grid; place-items: center; background: #073726bf; color: white;
}
.expand-btn:hover { background: var(--pine); }
.caption { padding: 18px 22px; }
.caption h2 { font-size: clamp(1.45rem,2.2vw,1.97rem); }
.caption .subline { font-size: .9rem; color: var(--dim); margin: 4px 0 0; }

.scan-card { display: flex; flex-direction: column; background: #be081e; color: white; border-color: #be081e; }
.scan-art {
  position: relative; isolation: isolate; display: grid; grid-template: minmax(0,1fr)/minmax(0,1fr); place-items: center;
  height: clamp(150px,15vw,210px); overflow: hidden;
}
.scan-art img { display: block; height: 92%; width: 78%; min-height: 0; object-fit: contain; }
.scan-art::before, .scan-art::after {
  content: ""; position: absolute; z-index: -1; width: 39px; height: 39px;
  background: radial-gradient(circle at 4px 3px, var(--mari) 0 2.5px, transparent 3px),
    radial-gradient(circle at 24px 18px, var(--sugar) 0 2.5px, transparent 3px),
    linear-gradient(70deg, transparent 38%, var(--sage) 39% 60%, transparent 61%) 5px 24px / 7px 9px no-repeat;
}
.scan-art::before { top: 16%; left: 7%; transform: rotate(17deg); }
.scan-art::after { bottom: 12%; right: 5%; transform: rotate(-31deg); }
.scan-copy { display: flex; flex: 1; flex-direction: column; align-items: flex-start; padding: 0 clamp(20px,2.1vw,32px) clamp(20px,2.1vw,32px); }
.scan-copy h2 { color: white; font-size: clamp(1.9rem,2.4vw,2.45rem); }
.scan-copy p { color: white; font-size: 1rem; line-height: 1.45; margin: 8px 0 22px; max-width: 35ch; }
.primary, .secondary {
  min-height: 46px; padding: 11px 20px; display: inline-flex; align-items: center;
  justify-content: center; gap: 9px; border-radius: 99px; line-height: 1.3;
  font-size: .98rem; font-weight: 750;
}
.primary { background: var(--cran); border: 0; color: white; box-shadow: 0 3px #810714; }
.primary:hover { background: #a7091a; }
.secondary { background: white; color: var(--pine); border: 1px solid #b6c4b8; }
.secondary:hover { background: #f2f8f4; }
.primary:active, .secondary:active, .sample:active { transform: translateY(1px); }
.scan-copy .primary { margin-top: auto; width: 100%; background: var(--mari); color: var(--ink); box-shadow: 0 4px #870817; }
.scan-copy .primary:hover { background: #ffd34c; }

.shelf { margin-top: clamp(30px,3vw,46px); }
.section-heading { align-items: end; margin-bottom: 18px; }
.section-heading h2, .sub-card h2, .empty-card h2 { font-size: clamp(1.85rem,2.7vw,2.65rem); }
.section-heading p { font-size: .98rem; margin-top: 5px; }
.samples, .collection-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; }
.sample { padding: 0; display: flex; flex-direction: column; text-align: left; border-radius: 13px; }
.sample-art {
  display: grid; grid-template: minmax(0,1fr)/minmax(0,1fr); place-items: center;
  position: relative; isolation: isolate; overflow: hidden;
  height: clamp(110px,10.1vw,153px); width: 100%; background: var(--tint);
}
.sample-art::before {
  content: ""; position: absolute; z-index: -1; inset: 0; opacity: .25;
  background-image: radial-gradient(var(--pattern-color,white) 1.5px,transparent 2px);
  background-size: 16px 16px;
}
.sample:nth-child(4n+2) .sample-art::before {
  background-image: linear-gradient(0deg,white 1px,transparent 1px),linear-gradient(90deg,white 1px,transparent 1px);
}
.sample:nth-child(4n+3) .sample-art::before {
  background: repeating-linear-gradient(-47deg,transparent 0 12px,white 12px 17px);
}
.sample:nth-child(4n) .sample-art::before {
  background-image: linear-gradient(0deg,white 2px,transparent 2px),linear-gradient(90deg,white 2px,transparent 2px);
  background-size: 26px 26px;
}
.sample-art img { height: 88%; width: 85%; min-height: 0; min-width: 0; object-fit: contain; z-index: 1; filter: drop-shadow(1px 3px 1px #3b243a24); transform: rotate(var(--tilt,-3deg)); transition: transform .18s ease-out; }
.sample:nth-child(even) { --tilt: 3deg; }
.sparkle { position: absolute; font: normal 17px/1 Georgia,serif; pointer-events: none; color: var(--accent); left: 17%; top: 25%; }
.spark-small { left: auto; top: auto; right: 14%; bottom: 17%; font-size: 13px; }
.sample-label {
  min-height: 54px; padding: 11px 16px; display: flex; width: 100%; align-items: center;
  justify-content: space-between; gap: 10px; font: 750 1.19rem/1.15 var(--display);
  letter-spacing: -.036em; color: var(--pine);
}
.play-dot { display: grid; flex-shrink: 0; place-items: center; width: 28px; height: 28px; background: #eef5ef; border-radius: 50%; }
.play-dot svg { width: 13px; height: 13px; }
@media(hover:hover) and (pointer:fine) {
  .sample:hover .sample-art img { transform: rotate(0) scale(1.04); }
  .sample:hover .play-dot { background: #dbebdf; }
}

.site-foot {
  border-top: 1px solid var(--line); padding-block: 22px; display: flex;
  justify-content: space-between; align-items: center; gap: 12px; font-size: .84rem; color: var(--dim);
}
.site-foot a { font: 750 1rem var(--display); color: var(--pine); }
.site-foot a:hover { color: var(--cran); }
#toast {
  position: fixed; bottom: max(22px,env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%);
  max-width: calc(100vw - 32px); padding: 11px 18px; border-radius: 14px; background: var(--pine);
  color: white; box-shadow: 0 6px 26px #223a2226; z-index: 30; font-size: .94rem; text-align: center; pointer-events: none;
}
.empty-card, .sub-card { padding: clamp(20px,2.7vw,36px); }
.empty-card { min-height: 290px; display: grid; align-content: center; justify-items: center; text-align: center; gap: 12px; }
.empty-card p, .sub-card p { color: var(--dim); margin: 0 0 8px; }
.empty-icon { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: #e3f4e8; color: var(--pine); }
.empty-icon svg { width: 26px; height: 26px; }
.collection-grid .sample-art { height: 180px; }
.collection-grid .sample-label { overflow-wrap: anywhere; }
.recap-grid { grid-template-columns: 1.55fr 1fr; }
.recap-stage { aspect-ratio: 1.9; }
.sub-card { display: flex; flex-direction: column; align-items: flex-start; gap: 13px; }
.sub-card textarea {
  width: 100%; min-height: 135px; resize: vertical; border: 1px solid var(--line);
  border-radius: 9px; background: #fbfcfa; padding: 12px; color: var(--ink); font: inherit;
}
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.gallery-dialog { max-width: min(92vw,430px); border: 1px solid var(--line); border-radius: 17px; background: white; color: var(--ink); padding: 24px; }
.gallery-dialog::backdrop { background: #102820a8; }
.gallery-dialog img { display: block; width: 100%; height: 240px; object-fit: contain; }
.gallery-dialog h2 { font-size: 1.8rem; margin: 18px 0; overflow-wrap: anywhere; }
.gallery-dialog .actions { justify-content: flex-end; }

body.tv-page { background: #143729; overflow: hidden; }
.tv-page :is(.topbar,.site-foot,.skip) { display: none; }
.tv-page main { position: fixed; inset: 0; padding: 0; max-width: none; width: 100%; }
.tv-controls { position: absolute; z-index: 3; top: 18px; right: 18px; display: flex; gap: 8px; align-items: center; transition: opacity .3s; }
.tv-controls.inactive:not(:focus-within):not(:hover) { opacity: 0; pointer-events: none; }
.tv-controls > * {
  padding: 10px 15px; background: #034c2eee; color: white; border: 1px solid #fff5;
  border-radius: 99px; font-size: .93rem; display: flex; align-items: center; gap: 8px;
}
.tv-notice { position: absolute; top: 18px; left: 18px; z-index: 2; }
.tv-page #toast { font-size: clamp(1rem,1.8vw,1.6rem); }

@media(max-width:920px) {
  .top-inner { gap: 20px; }
  .topbar nav a { padding: 9px 11px; }
  .hero-grid { grid-template-columns: minmax(0,1.75fr) minmax(255px,1fr); gap: 16px; }
  .caption { padding: 15px 16px; }
  .samples, .collection-grid { gap: 12px; }
  .recap-grid { grid-template-columns: 1fr 1fr; }
}
@media(max-width:690px) {
  .top-inner { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; padding: 10px 17px 7px; }
  .brand { justify-self: start; padding: 0; }
  .brand img { width: 77px; }
  .display-link { grid-area: 1 / 2; font-size: .86rem; min-height: 41px; }
  .topbar nav { grid-column: 1/-1; justify-content: space-between; }
  .topbar nav a { flex: 1; padding: 7px 6px; min-height: 39px; font-size: .9rem; }
  main, .site-foot { padding-inline: 17px; }
  .page-head { margin: 22px 0 20px; align-items: flex-start; flex-wrap: wrap; gap: 12px; }
  .page-head h1 { font-size: clamp(2rem,7.9vw,2.85rem); }
  .page-head p { font-size: .96rem; line-height: 1.4; max-width: 43ch; }
  .page-head .status { padding: 4px 9px; font-size: .77rem; }
  .hero-grid, .recap-grid { grid-template-columns: 1fr; }
  .hero-grid .scene-shell, .scene-shell { min-height: 0; aspect-ratio: 1.85; flex: auto; }
  .caption { padding: 12px 14px; gap: 8px; }
  .caption h2 { font-size: 1.46rem; }
  .caption .subline { font-size: .85rem; }
  .scene-tag { top: 10px; left: 10px; font-size: .68rem; }
  .expand-btn { right: 6px; top: 5px; }
  .scan-card { grid-row: 1; display: grid; grid-template-columns: 31% minmax(0,1fr); }
  .scan-art { height: 100%; min-height: 0; }
  .scan-art img { width: 93%; height: auto; transform: rotate(-4deg); }
  .scan-art::before { top: 6%; left: 8%; transform: scale(.7); }
  .scan-art::after { bottom: 5%; right: 8%; transform: scale(.7) rotate(90deg); }
  .scan-copy { padding: 15px 15px 17px 4px; }
  .scan-copy h2 { font-size: 1.55rem; }
  .scan-copy p { font-size: .9rem; margin: 4px 0 13px; }
  .scan-copy .primary { min-height: 44px; }
  .shelf { margin-top: 27px; }
  .section-heading { margin-bottom: 14px; }
  .samples, .collection-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .sample-art { height: 118px; }
  .sample-label { min-height: 47px; font-size: 1.06rem; padding: 8px 10px; }
  .tv-controls { top: 8px; right: 8px; }
  .tv-notice { top: auto; bottom: 9px; left: 9px; }
  .site-foot { font-size: .77rem; }
  .recap-stage { aspect-ratio: 1.7; }
}
@media(max-width:440px) {
  .page-head .status { display: none; }
  .display-link .long-label { display: none; }
  .display-link .short-label { display: inline; }
  .total-pill { padding: 5px 8px; gap: 5px; font-size: .77rem; }
  .page-head .primary { width: 100%; }
}
@media(prefers-reduced-motion:reduce) {
  .sample-art img, .tv-controls { transition: none; }
}
