/* ==========================================================================
   Glide 2048 — website styles
   One light "Wood" look, taken from the app's own palette
   (lib/app/skins.dart): the page is the light wood of the store cards, and
   the playable board inside it keeps the app's dark wood. The token NAMES
   kept their dark-era spelling (--ink is the ground, --cream is the text)
   so the 900 lines that use them did not have to change; the values are
   the light theme.
   No web fonts, no CDN, no trackers: the page is one request plus images.
   ========================================================================== */

:root {
  /* Warm wood paper — not white, not dark — with the dark board sitting
     in it like the app's own store cards */
  --ink:        #f2e7cd;   /* the page ground */
  --ink-2:      #e6d5b2;   /* the demo tray: a well below the page */
  --surface:    #ecdebf;
  --surface-2:  #31200f00; /* unused slot kept for clarity */
  --card:       #faf3e1;
  --card-hi:    #d2bc93;
  --board:      #3e2a1c;   /* the app's own dark Wood board — stays */
  --cell:       #4f382a;

  --gold:       #e6bb55;   /* fills only: too pale for text on this ground */
  --gold-deep:  #826217;   /* 5 : 1 on the page — links and accents */
  --cream:      #2b1d10;   /* the text ink */
  --muted:      #574734;   /* 7 : 1 */
  --muted-dim:  #6d5b44;   /* 5 : 1 — passes on the page AND on a card */

  --line:       rgba(62, 42, 20, .18);
  --line-soft:  rgba(62, 42, 20, .09);

  --shadow-sm:  0 2px 8px rgba(62, 42, 20, .10);
  --shadow-md:  0 12px 30px rgba(62, 42, 20, .12);
  --shadow-lg:  0 26px 60px rgba(62, 42, 20, .16);

  --r-sm: 10px;
  --r:    16px;
  --r-lg: 22px;
  --r-xl: 28px;

  --pad: clamp(20px, 5vw, 40px);
  --maxw: 1140px;

  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--cream);
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--gold-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

::selection { background: var(--gold); color: #2a1b0e; }

:focus-visible {
  outline: 2px solid var(--gold-deep);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 16px; top: 16px;
  z-index: 100;
  background: var(--gold);
  color: #2a1b0e;
  padding: 10px 16px;
  border-radius: var(--r-sm);
  font-weight: 700;
}

/* ---------------------------------------------------------------- type --- */

h1, h2, h3 {
  line-height: 1.12;
  letter-spacing: -.02em;
  margin: 0 0 .5em;
  font-weight: 800;
}

h1 { font-size: clamp(2.3rem, 6.2vw, 4rem); }
h2 { font-size: clamp(1.7rem, 3.8vw, 2.5rem); }
h3 { font-size: 1.12rem; letter-spacing: -.01em; }

p { margin: 0 0 1em; }

.lead {
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  color: var(--muted);
  max-width: 60ch;
}

/* A plain line of words over a heading: sentence case, in the quiet ink.
   It was small gold capitals with wide tracking, which is decoration. */
.eyebrow {
  display: block;
  font-size: .95rem;
  font-weight: 600;
  color: var(--muted-dim);
  margin-bottom: 10px;
}

.gold { color: var(--gold-deep); }

/* -------------------------------------------------------------- header --- */

/* Solid, with one hairline. It was frosted glass that grew a border on
   scroll; a header only has to stay out of the way. */
.site-head {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--ink);
  border-bottom: 1px solid var(--line);
}

.site-head .wrap {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 68px;
}

.crumb {
  color: var(--muted-dim);
  font-size: .85rem;
  font-weight: 600;
  text-decoration: none;
  padding-right: 18px;
  border-right: 1px solid var(--line);
}
.crumb:hover { color: var(--gold-deep); text-decoration: none; }
@media (max-width: 620px) { .crumb span { display: none; } }
/* On a phone the way back is the arrow alone. With "ByteOnyx" spelt out,
   the privacy page's header was 13 px wider than a 390 px screen and the
   whole page slid sideways. The words stay for a screen reader: text at
   size 0 is still read. */
@media (max-width: 440px) {
  .crumb { padding-right: 10px; font-size: 0; }
  .crumb::before { content: "\2190"; font-size: 1.05rem; }
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--cream);
  font-weight: 800;
  letter-spacing: -.02em;
  font-size: 1.06rem;
  text-decoration: none;
  flex: 0 0 auto;
}
.brand:hover { text-decoration: none; }
.brand img {
  width: 32px; height: 32px;
  border-radius: 9px;
}

.nav {
  display: flex;
  gap: 26px;
  margin-left: auto;
  font-size: .95rem;
}
.nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}
.nav a:hover { color: var(--cream); border-bottom-color: var(--gold-deep); }

.head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

/* the language pill: same size as the CTA, quieter */
.lang {
  font-weight: 600;
  letter-spacing: 0;
}

@media (max-width: 860px) {
  .nav { display: none; }
  .head-actions { margin-left: auto; }
}
@media (max-width: 440px) {
  .site-head .wrap { gap: 10px; }
  /* the wordmark comes off the bar, but stays in the accessibility tree —
     display:none would leave the link with no name at all */
  .brand span {
    position: absolute;
    width: 1px; height: 1px;
    margin: -1px; padding: 0; border: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .btn-sm { padding: 9px 13px; }
}

/* The smallest phones: let the bar take a second row before it lets the
   page scroll sideways. */
@media (max-width: 360px) {
  .site-head .wrap {
    height: auto;
    min-height: 68px;
    flex-wrap: wrap;
    row-gap: 6px;
    padding-top: 8px;
    padding-bottom: 8px;
  }
}

/* ------------------------------------------------------------- buttons --- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 22px;
  border-radius: 8px;
  font-weight: 700;
  font-size: .97rem;
  letter-spacing: -.01em;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease;
}
.btn:hover { text-decoration: none; }

/* One flat colour. No gradient, no glow under it, and it does not lift. */
.btn-primary { background: var(--gold); color: #2a1b0e; }
.btn-primary:hover { background: #f0cc78; }

.btn-ghost {
  background: none;
  color: var(--cream);
  border-color: rgba(62, 42, 20, .30);
}
.btn-ghost:hover { background: rgba(62, 42, 20, .06); border-color: var(--cream); }

.btn-sm { padding: 9px 17px; font-size: .9rem; }

.btn svg { width: 18px; height: 18px; flex: 0 0 auto; }

/* ---------------------------------------------------------------- hero --- */

.hero {
  padding: clamp(36px, 6vw, 68px) 0 clamp(32px, 5vw, 56px);
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.hero h1 { margin-bottom: 18px; }
.hero h1 .num { font-variant-numeric: tabular-nums; }

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 22px;
}

/* A line of plain words. They were pills, and a pill reads as a button. */
.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px .55em;
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: .92rem;
  color: var(--muted);
}
.badges li:not(:last-child)::after {
  content: "·";
  margin-left: .55em;
}

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-art { order: -1; max-width: 420px; margin: 0 auto; }
}

/* ------------------------------------------------------- playable demo --- */

.demo {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 18px;
}

.demo-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.demo-title {
  font-size: .9rem;
  font-weight: 600;
  color: var(--muted-dim);
  margin-right: auto;
}

.stat {
  min-width: 76px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-sm);
  padding: 6px 12px;
  line-height: 1.2;
}
.stat span {
  display: block;
  font-size: .62rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted-dim);
}
.stat b {
  font-size: 1.02rem;
  font-variant-numeric: tabular-nums;
  color: var(--cream);
}

.board {
  position: relative;
  aspect-ratio: 1;
  background: var(--board);
  border-radius: var(--r-lg);
  border: 1px solid rgba(0, 0, 0, .35);
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, .35);
  touch-action: none;
  overflow: hidden;
  container-type: inline-size;
}

.board .cell,
.board .tile {
  position: absolute;
  width: 21.25%;
  height: 21.25%;
  border-radius: 12px;
}

.board .cell { background: var(--cell); opacity: .55; }

.board .tile {
  display: grid;
  place-items: center;
  font-weight: 800;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
  font-size: 7.4cqw;
  box-shadow: 0 2px 0 rgba(0, 0, 0, .25), inset 0 1px 0 rgba(255, 255, 255, .22);
  transition: left .13s ease-in-out, top .13s ease-in-out;
  will-change: left, top;
}

.board .tile.len3 { font-size: 6cqw; }
.board .tile.len4 { font-size: 4.9cqw; }
.board .tile.len5 { font-size: 4.1cqw; }

.tile-new { animation: pop-in .18s ease-out backwards; }
.tile-merged { animation: pop .18s ease-out; }

@keyframes pop-in {
  from { transform: scale(.3); opacity: 0; }
  to   { transform: scale(1);  opacity: 1; }
}
@keyframes pop {
  0%   { transform: scale(1); }
  55%  { transform: scale(1.16); }
  100% { transform: scale(1); }
}

.demo-hint {
  margin: 13px 2px 0;
  font-size: .84rem;
  color: var(--muted-dim);
  display: flex;
  align-items: center;
  gap: 10px;
}
.demo-hint button {
  margin-left: auto;
  background: none;
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 6px;
  padding: 5px 13px;
  font: inherit;
  font-size: .82rem;
  cursor: pointer;
}
.demo-hint button:hover { color: var(--cream); border-color: var(--gold-deep); }

.demo-won {
  color: var(--gold-deep);
  font-weight: 700;
}

/* ------------------------------------------------------------ sections --- */

section { padding: clamp(40px, 6vw, 68px) 0; }

.section-head { max-width: 62ch; margin-bottom: clamp(20px, 3vw, 32px); }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

.rule { border: 0; border-top: 1px solid var(--line-soft); margin: 0; }

/* ---------------------------------------------------------------- grid --- */

.grid {
  display: grid;
  gap: 22px 28px;
}
.g-2 { grid-template-columns: repeat(2, 1fr); }
.g-3 { grid-template-columns: repeat(3, 1fr); }
.g-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
  .g-3, .g-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .g-2, .g-3, .g-4 { grid-template-columns: 1fr; }
}

/* A column under a hairline, not a box. Nothing here is a link, so
   nothing should look as if it lifts when the pointer is over it. */
.card {
  border-top: 1px solid var(--line);
  padding: 18px 0 0;
}
.card p { color: var(--muted); margin-bottom: 0; font-size: .96rem; }
.card h3 { margin-bottom: 8px; }

.card-ico { margin-bottom: 12px; }
.card-ico svg { display: block; width: 24px; height: 24px; stroke: var(--gold-deep); }

/* ------------------------------------------------------------- how-to  --- */

.steps { counter-reset: step; }

.step { position: relative; }
/* The step's number, as a number. */
.step .n {
  display: block;
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1;
  color: var(--gold-deep);
  font-variant-numeric: tabular-nums;
  margin-bottom: 12px;
}

/* -------------------------------------------------------------- themes --- */

.looks { gap: 16px; }

.look {
  border-radius: 12px;
  border: 1px solid var(--line);
  overflow: hidden;
  background: var(--card);
}

/* A swatch, not a screenshot. Square made seven tall cards fill the screen
   and pushed everything under them off it, so the board is a wide strip with
   a hard height cap — enough to read the material and the tile ramp. */
/* A fixed height, not an aspect ratio: seven square boards filled the whole
   screen and pushed the screenshots and the FAQ off it. Height in px, not %,
   because percentage padding resolves against the WIDTH — a % here made the
   tiles tall and thin as the card grew. */
.look-board {
  height: 100px;
  padding: 13px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.look-board i {
  border-radius: 7px;
  display: grid;
  place-items: center;
  font-style: normal;
  font-weight: 800;
  font-size: .78rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2);
}
@media (max-width: 700px) {
  .look-board { height: 92px; padding: 11px; gap: 7px; }
}

.look-foot {
  padding: 11px 14px 13px;
  border-top: 1px solid var(--line-soft);
}
.look-foot b { display: block; font-size: .98rem; }
.look-foot span { font-size: .82rem; color: var(--muted-dim); }
.look-foot .free { color: var(--gold-deep); }

/* --------------------------------------------------------- screenshots --- */

#screens { padding-bottom: clamp(40px, 6vw, 70px); }
#screens .section-head { margin-bottom: clamp(20px, 3vw, 30px); }

.shots {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 6px var(--pad) 26px;
  margin: 0 calc(var(--pad) * -1);
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--card-hi) transparent;
}
.shots::-webkit-scrollbar { height: 8px; }
.shots::-webkit-scrollbar-thumb {
  background: var(--card-hi);
  border-radius: 999px;
}

.shots figure {
  margin: 0;
  flex: 0 0 auto;
  width: min(62vw, 236px);
  scroll-snap-align: center;
}
.shots img {
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card);
}
.shots figcaption {
  margin-top: 11px;
  font-size: .85rem;
  color: var(--muted-dim);
  text-align: center;
}

/* ------------------------------------------------------------ features --- */

.feats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px 34px;
}
.feats li {
  display: flex;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-size: .97rem;
  color: var(--muted);
}
.feats li b { color: var(--cream); font-weight: 700; }
@media (max-width: 700px) { .feats { grid-template-columns: 1fr; } }

/* --------------------------------------------------------- play games  --- */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 5vw, 56px);
  align-items: center;
}
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* A panel is flat: one hairline, no gradient, no shadow. When all it
   holds is a screenshot, the box goes and the screenshot stays at a
   phone's width — stretched to half the page it was a poster. */
.panel {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: clamp(20px, 3vw, 30px);
}
.panel:has(> img:only-child) { border: 0; padding: 0; }
.panel > img:only-child {
  width: min(100%, 320px);
  margin: 0 auto;
  border-radius: 14px;
  border: 1px solid var(--line);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
}
.chips li {
  font-size: .87rem;
  color: var(--cream);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 12px;
}

/* ----------------------------------------------------------------- faq --- */

.faq { max-width: 800px; }
.faq details {
  border-bottom: 1px solid var(--line-soft);
}
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 20px 40px 20px 0;
  font-weight: 700;
  font-size: 1.02rem;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  position: absolute;
  right: 6px; top: 50%;
  width: 11px; height: 11px;
  border-right: 2px solid var(--gold-deep);
  border-bottom: 2px solid var(--gold-deep);
  transform: translateY(-70%) rotate(45deg);
  transition: transform .2s ease;
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p {
  color: var(--muted);
  margin: 0 0 20px;
  max-width: 68ch;
  font-size: .97rem;
}
/* The unlock answer is a list of prices; a list reads faster than a run-on
   sentence, and this is the only place in the FAQ that needs one. */
.faq details ul {
  color: var(--muted);
  margin: 0 0 20px;
  padding-left: 20px;
  max-width: 68ch;
  font-size: .97rem;
}
.faq details li { margin: 0 0 7px; }
.faq details li b { color: var(--cream); }

/* -------------------------------------------------------------- footer --- */

.cta-band { padding-bottom: clamp(56px, 8vw, 96px); }
.cta-band .panel { text-align: center; }
.cta-band .hero-cta { justify-content: center; margin-bottom: 0; }

.site-foot {
  border-top: 1px solid var(--line-soft);
  padding: 40px 0 56px;
  color: var(--muted-dim);
  font-size: .9rem;
}
.site-foot .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  align-items: center;
}
.site-foot nav {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}
.site-foot nav a {
  color: var(--muted);
  padding: 6px 0;          /* a 36 px tall tap target on a phone */
  display: inline-block;
}
.site-foot a { color: var(--muted); }
.site-foot .studio {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--muted-dim);
  text-decoration: none;
}
.site-foot .studio:hover { color: var(--muted); }
.site-foot .studio img { width: 20px; height: 20px; border-radius: 5px; }
.site-foot .fine {
  flex: 1 0 100%;
  margin-top: 8px;
  font-size: .82rem;
  color: var(--muted-dim);
  max-width: 76ch;
}

/* ------------------------------------------------------- legal / prose --- */

.prose {
  max-width: 760px;
  margin: 0 auto;
}
.prose h2 {
  font-size: 1.3rem;
  margin-top: 44px;
  padding-top: 6px;
  scroll-margin-top: 96px;
}
.prose h2:first-of-type { margin-top: 24px; }
.prose p, .prose li { color: var(--muted); }
.prose strong { color: var(--cream); font-weight: 700; }
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: .5em; }

/* The privacy policy's summary table. Wide content must scroll inside its own
   box, never make the page scroll sideways on a phone. */

.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 28px;
  font-size: .92rem;
  display: block;
  overflow-x: auto;
  white-space: nowrap;
}
.data-table th,
.data-table td {
  border-bottom: 1px solid var(--line-soft);
  padding: 11px 16px 11px 0;
  text-align: left;
  vertical-align: top;
  color: var(--muted);
}
.data-table th {
  color: var(--cream);
  font-weight: 700;
  font-size: .88rem;
  border-bottom-color: var(--line);
}
.data-table td strong { color: var(--cream); }
@media (min-width: 720px) {
  .data-table { display: table; white-space: normal; }
  .data-table td { max-width: 22ch; }
}

.note {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px 24px;
  margin: 26px 0 8px;
}
.note p:last-child { margin-bottom: 0; }
.note p { color: var(--cream); }

.toc {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px 24px;
  margin: 30px 0;
}
.toc b {
  display: block;
  font-size: .95rem;
  color: var(--cream);
  margin-bottom: 12px;
}
.toc ol {
  margin: 0;
  padding-left: 20px;
  columns: 2;
  column-gap: 30px;
  font-size: .93rem;
}
.toc li { margin-bottom: 6px; break-inside: avoid; }
.toc a { color: var(--muted); }
.toc a:hover { color: var(--gold-deep); }
@media (max-width: 560px) { .toc ol { columns: 1; } }

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  font-size: .87rem;
  color: var(--muted-dim);
  padding-bottom: 8px;
}

/* ==========================================================================
   Bangla
   Bangla is a joined script: letter-spacing pulls the conjuncts apart and the
   headline tracking looks broken. Turn all tracking off, and give the text a
   little more room for the matras above and below the line.
   ========================================================================== */

html[lang="bn"] body { line-height: 1.8; }

html[lang="bn"] h1,
html[lang="bn"] h2,
html[lang="bn"] h3,
html[lang="bn"] .btn,
html[lang="bn"] .brand { letter-spacing: normal; }

html[lang="bn"] h1,
html[lang="bn"] h2 { line-height: 1.35; }

html[lang="bn"] .demo-title,
html[lang="bn"] .stat span {
  letter-spacing: normal;
  text-transform: none;
  font-size: .82rem;
}

html[lang="bn"] .stat span { font-size: .68rem; }

/* the framed screenshots carry English captions of their own */
html[lang="bn"] .shots figcaption { font-size: .82rem; }

/* --------------------------------------------------------- inline links --- */
/* Gold on cream is only a 1.02:1 difference — colour alone is not enough to
   mark a link inside a paragraph, so underline the ones that sit in prose. */
.prose p a,
.prose li a,
.faq p a,
.card p a,
.split p a:not(.btn) {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .18em;
}
.prose p a:hover,
.faq p a:hover { text-decoration-thickness: 2px; }

/* --------------------------------------------------------------- video --- */
/* The Play Store preview. Our own poster until play is pressed; then
   site.js puts YouTube's player in the same 16:9 box, so nothing on the
   page moves. Only transform and colour animate on hover. */

.video { max-width: 960px; margin: 0 auto; }
.video-poster,
.video iframe {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--board);
  box-shadow: var(--shadow-lg);
}
.video-poster img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* Bottom left: the poster's caption and phone fill the middle and the
   right, and the corner is bare wood in every frame of the opening. */
.video-play {
  position: absolute;
  left: clamp(12px, 3vw, 28px);
  bottom: clamp(12px, 3vw, 28px);
  transform-origin: left bottom;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px 14px 18px;
  border-radius: 999px;
  background: var(--gold);
  color: #2a1b0e;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 10px 26px rgba(42, 27, 14, .28);
  transition: transform .18s ease, background-color .18s ease;
}
.video-play svg { width: 24px; height: 24px; fill: currentColor; }
.video-poster:hover .video-play {
  transform: scale(1.05);
  background: #f0cc78;
}
.video-poster:focus-visible { outline-offset: 4px; border-radius: var(--r-lg); }
.video figcaption {
  margin-top: 12px;
  text-align: center;
  font-size: .9rem;
  color: var(--muted-dim);
}
/* On a phone the poster is small: the button becomes a round play mark and
   the words stay for screen readers. */
@media (max-width: 600px) {
  .video-play { padding: 13px; }
  .video-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

/* -------------------------------------------------------------- viewer --- */
/* One screen of the strip, large, in a native <dialog>. Its own dark
   ground whatever the page's palette: a lightbox is a cinema, not a page.
   Built by site.js on first use; with no JS there is no viewer and the
   strip is a plain row of pictures. */

.shots img { cursor: zoom-in; }

html:has(.shot-viewer[open]) { overflow: hidden; }

.shot-viewer {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: #0c0c0e;
  color: #ededf0;
}
.shot-viewer::backdrop { background: #0c0c0e; }
.shot-viewer[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.sv-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px clamp(16px, 4vw, 32px);
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.sv-count { margin: 0; font-size: .95rem; color: #b6b6c0; }

.shot-viewer button {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 10px;
  background: none;
  color: #ededf0;
  font-family: inherit;
  font-size: .95rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}
.shot-viewer button:hover { border-color: #b6b6c0; background: rgba(255, 255, 255, .06); }
.sv-arrow { padding: 0 !important; }
.sv-arrow svg {
  width: 20px; height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sv-stage {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 16px clamp(16px, 4vw, 32px);
  min-height: 0;
}
.sv-stage img {
  margin: auto;
  width: auto;
  height: auto;
  /* Never larger than the file: a stretched screenshot is a blur. */
  max-width: min(100%, 540px);
  max-height: calc(100vh - 190px);
  max-height: calc(100dvh - 190px);
  border-radius: 10px;
  border: 0;
}

.sv-cap {
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 32px) 22px;
  max-width: 64ch;
  min-height: 3.2em;
  text-align: center;
  color: #b6b6c0;
  font-size: .95rem;
  line-height: 1.5;
}

/* On a phone the arrows move under the picture, where a thumb is. */
@media (max-width: 620px) {
  .sv-stage { grid-template-columns: 1fr 1fr; gap: 12px; }
  .sv-stage img { grid-column: 1 / -1; grid-row: 1; max-height: calc(100vh - 250px); max-height: calc(100dvh - 250px); }
  .sv-arrow { grid-row: 2; width: 100%; }
}
