/* =========================================================================
   EMPIRE OF GOLDEN SAILS — promo site + forum
   -------------------------------------------------------------------------
   Two pages share this sheet: index.html (promotion) and forum.html (the
   boards). One stylesheet rather than two so the chrome — header, footer,
   buttons, plates — cannot drift between them.

   THE PALETTE IS THE GAME'S OWN, lifted from core.js rather than guessed:
   #E99B05 is the gold the game actually draws with, #F6DCA5 its parchment,
   #24130D its ink. The sea colours come from the splash art. A site whose
   gold is a different gold from the game's reads as a fan page.
   ========================================================================= */

:root{
  /* sea */
  --sea-0:   #061119;
  --sea-1:   #0A1A28;
  --sea-2:   #102538;
  --sea-3:   #17324A;

  /* gold — the game's */
  --gold:    #E99B05;
  --gold-hi: #FFD45A;
  --gold-dp: #C98213;
  --gold-dim:rgba(233,155,5,.14);

  /* parchment + ink */
  --cream:   #F6DCA5;
  --cream-2: #FCEEC9;
  --ink:     #24130D;
  --rust:    #8F2D00;

  --text:    #E8E2D2;
  --muted:   rgba(232,226,210,.62);
  --muted-2: rgba(232,226,210,.58);   /* was .40 (3.2:1); .58 clears 4.5:1 on sea-0..sea-2 (17 Oct) */
  --line:    rgba(233,155,5,.20);
  --line-2:  rgba(233,155,5,.38);

  --shell:   min(1180px, 100% - 3rem);
  --r:       12px;
  --ease:    cubic-bezier(.22,.9,.28,1);
}

*,*::before,*::after{ box-sizing:border-box }
/* [hidden] must beat any display rule that follows it. Without this,
   `.foot a{display:block}` outranks the attribute and a hidden link
   stays on screen - which is exactly how "Sign out" showed to a
   visitor who was not signed in. */
[hidden]{ display:none !important }
html{ -webkit-text-size-adjust:100%; scroll-behavior:smooth }
@media (prefers-reduced-motion:reduce){ html{ scroll-behavior:auto } }

body{
  margin:0;
  background:var(--sea-0);
  color:var(--text);
  font:400 16px/1.65 'Inter',system-ui,-apple-system,'Segoe UI',sans-serif;
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
}
/* height:auto is load-bearing. The hero logo carries width/height attributes
   so the browser can reserve its space before the file arrives; without
   height:auto the CSS width wins but the HTML height does not, and the
   mark renders stretched vertically. */
img,svg{ display:block; max-width:100%; height:auto }
button,input,textarea,select{ font:inherit; color:inherit }
a{ color:inherit; text-decoration:none }
h1,h2,h3,h4{ margin:0; line-height:1.1; font-weight:600 }
p{ margin:0 0 1rem }

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

.wrap{ width:var(--shell); margin-inline:auto }
.muted{ color:var(--muted) }
.center{ text-align:center; margin-inline:auto }

/* ---------- display type ---------- */
.display,.h1,.h2,.h3{
  font-family:'Cinzel',Georgia,serif;
  font-weight:700;
  letter-spacing:.01em;
}
.display{ font-size:clamp(2.1rem,5.2vw,3.4rem); line-height:1.06 }
.h2{ font-size:clamp(1.6rem,3.4vw,2.4rem) }
.h3{ font-size:1.15rem }
.gold{ color:var(--gold-hi) }
.eyebrow{
  font-size:.72rem; font-weight:700; letter-spacing:.24em; text-transform:uppercase;
  color:var(--gold); margin:0 0 .9rem;
}
.lede{ font-size:clamp(1rem,1.5vw,1.14rem); color:var(--muted); max-width:58ch }

/* ---------- buttons ---------- */
.btn{
  --bh:50px;
  display:inline-flex; align-items:center; justify-content:center; gap:.55rem;
  min-height:var(--bh); padding:0 1.5rem;
  /* a pill less 3px (17 Oct: "decrease the radius for all buttons by 3") */
  border:1px solid transparent; border-radius:calc(var(--bh) / 2 - 3px);
  font-size:.92rem; font-weight:600; cursor:pointer; white-space:nowrap;
  transition:transform .18s var(--ease), box-shadow .25s var(--ease),
             background .25s var(--ease), border-color .25s var(--ease);
}
.btn svg{ width:17px; height:17px; flex:none }
.btn--lg{ --bh:56px; padding:0 1.9rem; font-size:1rem }
.btn--sm{ --bh:38px; padding:0 1rem; font-size:.84rem }
.btn--block{ display:flex; width:100% }
.btn--gold{
  background:linear-gradient(135deg,var(--gold-hi),var(--gold) 56%,var(--gold-hi));
  color:var(--ink);
  box-shadow:0 10px 30px -12px rgba(233,155,5,.6);
}
.btn--gold:hover{ transform:translateY(-2px); box-shadow:0 18px 42px -14px rgba(233,155,5,.75) }
.btn--ghost{ border-color:var(--line-2); color:var(--cream) }
.btn--ghost:hover{ border-color:var(--gold); background:var(--gold-dim); transform:translateY(-2px) }
/* A ghost that is a real <button> (All topics) picks up the browser's light-grey
   fill, which left cream text on grey at 1.2:1. Keep the light panel, make it
   deliberate, and set the text dark blue (17 Oct). The hover stays light too, or
   the dark text would land on the dark sea. */
button.btn--ghost{ background:#F0F0F0; color:var(--sea-2) }
button.btn--ghost:hover{ background:var(--cream-2); border-color:var(--gold) }
.btn:active{ transform:translateY(0) scale(.99) }
.btn[disabled]{ opacity:.45; pointer-events:none }

/* ---------- header ---------- */
.hdr{
  position:sticky; top:0; z-index:50;
  background:color-mix(in srgb, var(--sea-0) 82%, transparent);
  backdrop-filter:blur(14px) saturate(140%);
  border-bottom:1px solid transparent;
  transition:border-color .3s, background .3s;
}
.hdr.is-stuck{ border-bottom-color:var(--line); background:color-mix(in srgb, var(--sea-0) 94%, transparent) }
.hdr__in{ display:flex; align-items:center; gap:1.4rem; height:70px }
.brand{ display:flex; align-items:center; gap:.65rem; flex:none }
.brand img{ height:40px; width:auto }
.brand__txt{
  font-family:'Cinzel',serif; font-size:.94rem; font-weight:700;
  letter-spacing:.16em; color:var(--cream); line-height:1.15;
}
.nav{ display:flex; gap:1.7rem; margin-left:auto; font-size:.9rem; color:var(--muted) }
.nav a{ position:relative; padding:.3rem 0; transition:color .2s }
.nav a::after{
  content:''; position:absolute; left:0; bottom:0; height:1px; width:0;
  background:var(--gold); transition:width .28s var(--ease);
}
.nav a:hover{ color:var(--cream) } .nav a:hover::after{ width:100% }
.nav a.on{ color:var(--gold-hi) } .nav a.on::after{ width:100% }
.hdr__act{ display:flex; align-items:center; gap:.6rem; margin-left:auto }
.nav + .hdr__act{ margin-left:0 }
.burger{
  display:none; width:40px; height:40px; border:1px solid var(--line);
  border-radius:50%; background:none; place-items:center; gap:5px; cursor:pointer;
}
.burger span{ display:block; width:16px; height:1.6px; background:var(--cream); transition:transform .25s var(--ease) }
.burger[aria-expanded="true"] span:first-child{ transform:translateY(3.3px) rotate(45deg) }
.burger[aria-expanded="true"] span:last-child{ transform:translateY(-3.3px) rotate(-45deg) }

/* ---------- hero ---------- */
.hero{ position:relative; overflow:hidden; text-align:center }
.hero__bg{
  position:absolute; inset:0;
  background:url('../hero.webp') center/cover no-repeat;
  opacity:.34;
}
.hero__bg::after{
  content:''; position:absolute; inset:0;
  background:radial-gradient(70% 60% at 50% 30%, transparent, var(--sea-0) 78%),
             linear-gradient(180deg, rgba(6,17,25,.55), var(--sea-0));
}
.hero__in{ position:relative; padding:clamp(2.2rem,5vw,3.6rem) 0 clamp(3rem,6vw,5rem) }
.hero__logo{ width:min(100%,620px); margin:0 auto clamp(1.2rem,3vw,2rem); filter:drop-shadow(0 18px 40px rgba(0,0,0,.6)) }
.hero .lede{ margin:1.2rem auto 2rem }
.hero__cta{ display:flex; gap:.8rem; justify-content:center; flex-wrap:wrap }
.hero__note{ margin:1.6rem 0 0; font-size:.8rem; color:var(--muted-2) }

/* ---------- the crest: the Queen and the King at the title ----------
   Cut from the Pirata Sapiens contact sheet (Assets/pirate-personnas/
   pirata-sapiens), figures 6 and 7, at the sheet's own size: ~366x505. That
   is the ceiling on how large they can be drawn before they soften.

   ONE GROUP AT EVERY WIDTH. The logo is the crest's width (--lw); the two
   figures stand behind its left and right edges, a little below it, and the
   logo is laid over them. Each figure shows --peek of the logo's width
   outside it, so the whole group is --lw x (1 + 2 x peek) wide - and --lw is
   chosen so that fits the shell, which is what keeps a phone from scrolling
   sideways. Narrow screens tuck the figures further in (a smaller --peek)
   rather than shrinking the logo to nothing.

   Sizes are fractions of --lw, because the logo's art is 1100x721 (height
   0.655 of its width) and the figures are ~0.73 as wide as they are tall:
     figure height .74 lw  -> heads level with the logo's top,
     bottom -.06 lw        -> feet just under its base - "slightly under". */
.crest{
  --peek:.27;
  --lw:min(620px, calc((100vw - 2.2rem) / (1 + 2 * var(--peek))));
  position:relative; width:var(--lw);
  margin:0 auto clamp(1.2rem,3vw,2rem);
}
.crest .hero__logo{ position:relative; z-index:3; width:100%; margin:0 }
/* A SOFT SHADOW UNDER THE G AND THE S - the two letters that sit over the
   Queen and the King. Laid between the figures (z 1) and the logo (z 3), so
   it darkens the figure where the lettering crosses it and lifts GOLDEN SAILS
   off the cloth behind. Placed in fractions of the logo, from its art: the
   GOLDEN SAILS line is at ~70% of its height, the G's outer edge at ~9% of
   its width and the S's at ~91%. Kept subtle on purpose - a halo, not a
   cut-out. */
.crest::before, .crest::after{
  content:''; position:absolute; z-index:2; pointer-events:none;
  top:56%; width:22%; height:30%;
  background:radial-gradient(closest-side, rgba(3,10,16,.62), rgba(3,10,16,.28) 55%, transparent);
  filter:blur(calc(var(--lw) * .012));
}
.crest::before{ left:-4% }
.crest::after { right:-4% }
.crest__royal{
  position:absolute; z-index:1; bottom:calc(var(--lw) * -.06);
  height:calc(var(--lw) * .74); width:auto;
}
/* no coloured glow on the figures themselves - the burst behind them does
   that job now; only the dark shadow that keeps them standing remains */
.crest__royal{ filter:drop-shadow(0 14px 22px rgba(0,0,0,.6)) }
.crest__royal--queen{ left:calc(var(--lw) * -1 * var(--peek)) }
.crest__royal--king { right:calc(var(--lw) * -1 * var(--peek)) }

/* ---- THE BURST: slow rays behind each of them ----
   A ring of light rays (a repeating conic gradient) masked to a soft disc,
   centred on each figure's chest, behind everything in the crest. The
   Queen's is teal and turns one way, the King's is gold and turns the other,
   and both breathe - scale and opacity - on a long, unhurried cycle that is
   deliberately out of step with the spin, so the pattern never quite
   repeats. Faint on purpose: it is light in the air, not a spotlight.

   Placed in --lw like the rest of the crest: a figure is .74 lw tall and
   ~.536 lw wide, so its centre line is .268 lw in from its outer edge, and
   its chest is ~.31 lw below the crest's top. The disc is .95 lw across. */
.crest__burst{
  --bd:calc(var(--lw) * .95);
  --ray:rgba(255,212,110,.30);
  position:absolute; z-index:0; pointer-events:none;
  width:var(--bd); height:var(--bd); border-radius:50%;
  top:calc(var(--lw) * .31 - var(--bd) / 2);
  background:
    repeating-conic-gradient(from 0deg, var(--ray) 0deg 3deg, transparent 3deg 12deg),
    radial-gradient(closest-side, var(--ray), transparent 70%);
  -webkit-mask:radial-gradient(closest-side, #000 22%, rgba(0,0,0,.6) 52%, transparent 82%);
          mask:radial-gradient(closest-side, #000 22%, rgba(0,0,0,.6) 52%, transparent 82%);
  animation:crestSpin 120s linear infinite, crestBreathe 11s ease-in-out infinite alternate;
}
.crest__burst--queen{
  --ray:rgba(110,225,215,.28);
  left:calc(var(--lw) * (.268 - var(--peek)) - var(--bd) / 2);
}
.crest__burst--king{
  right:calc(var(--lw) * (.268 - var(--peek)) - var(--bd) / 2);
  animation-direction:reverse, alternate;
  animation-delay:0s, -5.5s;           /* breathing half a cycle apart */
}
@keyframes crestSpin{ to{ rotate:360deg } }
@keyframes crestBreathe{
  from{ scale:.94; opacity:.6 }
  to  { scale:1.06; opacity:1 }
}
@media (prefers-reduced-motion:reduce){
  .crest__burst{ animation:none; opacity:.8 }
}
/* the feet sit below the logo, so the next line of text keeps clear of them */
.crest + .eyebrow{ margin-top:calc(var(--lw) * .08) }
/* A PHONE GETS THE WHOLE GLASS for the crest, not the shell: the figures
   tuck further in and the group is measured against the screen less a
   half-rem each side, which buys the logo ~25px it badly needs at 375. */
@media (max-width:700px){
  .crest{ --peek:.17; --lw:min(620px, calc((100vw - 1rem) / (1 + 2 * var(--peek)))) }
}

/* ---------- sections ---------- */
section{ padding:clamp(3.2rem,7vw,5.5rem) 0 }
.rule{ height:1px; background:linear-gradient(90deg,transparent,var(--line),transparent) }

.grid3{ display:grid; grid-template-columns:repeat(3,1fr); gap:1.1rem; margin-top:2.6rem }
.grid2{ display:grid; grid-template-columns:repeat(2,1fr); gap:1.1rem; margin-top:2.6rem }
.card{
  padding:1.8rem 1.6rem;
  background:linear-gradient(180deg,var(--sea-2),var(--sea-1));
  border:1px solid var(--line); border-radius:var(--r);
  transition:transform .35s var(--ease), border-color .35s, box-shadow .35s;
}
.card:hover{ transform:translateY(-4px); border-color:var(--line-2); box-shadow:0 24px 48px -30px #000 }
.card__ic{
  width:46px; height:46px; display:grid; place-items:center; margin-bottom:1.1rem;
  border-radius:11px; background:var(--gold-dim); color:var(--gold-hi);
}
.card__ic svg{ width:23px; height:23px }
/* game art in place of the line icons (17 Oct) - one fixed-height box so every
   card's heading starts level, whatever the picture's shape */
.card__art{ display:block; height:80px; width:auto; max-width:150px; object-fit:contain;
  object-position:left bottom; margin-bottom:1rem; filter:drop-shadow(0 10px 14px rgba(0,0,0,.45)) }
.card h3{ font-family:'Cinzel',serif; font-size:1.18rem; margin-bottom:.55rem; color:var(--cream) }
.card p{ color:var(--muted); font-size:.93rem; margin:0 }

/* ---------- forum ---------- */
.fmain{ padding:clamp(1.6rem,3vw,2.4rem) 0 4rem }
.fhead{ display:flex; align-items:flex-end; justify-content:space-between; gap:1.4rem; flex-wrap:wrap; margin-bottom:1.6rem }
.fgrid{ display:grid; grid-template-columns:230px 1fr; gap:1.6rem; align-items:start }

.side{ position:sticky; top:86px; display:grid; gap:.3rem }
.side h4{
  font-size:.68rem; letter-spacing:.2em; text-transform:uppercase;
  color:var(--muted-2); margin:.4rem 0 .5rem;
}
.catbtn{
  display:flex; align-items:center; justify-content:space-between; gap:.6rem;
  padding:.6rem .8rem; border:1px solid transparent; border-radius:6px;
  background:none; cursor:pointer; text-align:left; font-size:.9rem; color:var(--muted);
  transition:background .2s, color .2s, border-color .2s;
}
.catbtn:hover{ background:var(--gold-dim); color:var(--cream) }
.catbtn.on{ background:var(--gold-dim); border-color:var(--line-2); color:var(--gold-hi); font-weight:600 }
.catbtn .n{ font-size:.75rem; color:var(--muted-2); font-variant-numeric:tabular-nums }

.plate{
  background:linear-gradient(180deg,var(--sea-2),var(--sea-1));
  border:1px solid var(--line); border-radius:var(--r);
}
.topic{
  display:flex; gap:1rem; align-items:flex-start;
  padding:1.05rem 1.2rem; border-bottom:1px solid var(--line);
  cursor:pointer; transition:background .2s;
}
.topic:last-child{ border-bottom:0 }
.topic:hover{ background:var(--gold-dim) }
.topic__t{ flex:1; min-width:0 }
.topic__t h3{ font-size:1rem; font-weight:600; color:var(--cream); margin-bottom:.25rem }
.topic__meta{ font-size:.78rem; color:var(--muted-2) }
.topic__n{
  flex:none; min-width:46px; text-align:center; padding:.35rem .5rem;
  border-radius:8px; background:var(--sea-3); border:1px solid var(--line);
}
.topic__n b{ display:block; font-size:1rem; color:var(--gold-hi); font-variant-numeric:tabular-nums }
.topic__n span{ font-size:.63rem; letter-spacing:.1em; text-transform:uppercase; color:var(--muted-2) }

.tag{
  display:inline-block; padding:.16rem .55rem; border-radius:99px;
  background:var(--gold-dim); color:var(--gold); border:1px solid var(--line);
  font-size:.68rem; font-weight:700; letter-spacing:.08em; text-transform:uppercase;
}

.post{ padding:1.3rem 1.4rem; border-bottom:1px solid var(--line) }
.post:last-child{ border-bottom:0 }
.post__top{ display:flex; align-items:center; gap:.7rem; margin-bottom:.6rem }
.av{
  width:34px; height:34px; border-radius:50%; flex:none; display:grid; place-items:center;
  background:var(--gold-dim); border:1px solid var(--line-2);
  color:var(--gold-hi); font-size:.75rem; font-weight:700; letter-spacing:.03em;
}
.post__who{ font-size:.88rem; font-weight:600; color:var(--cream) }
.post__when{ font-size:.75rem; color:var(--muted-2) }
.post__body{ font-size:.95rem; color:var(--text); white-space:pre-wrap; margin:0 }
.post--op{ background:rgba(233,155,5,.05) }
/* REPORT / DELETE under each post, and the thread's own link (2 Nov,
   website list 1 and 4) - quiet text buttons, so they never compete with
   what was said */
.post__acts{ display:flex; gap:1.1rem; justify-content:flex-end; margin-top:.7rem }
.linkbtn{ background:none; border:0; padding:.2rem 0; font:inherit; font-size:.78rem;
  color:var(--muted-2); cursor:pointer; text-decoration:underline; text-underline-offset:3px }
.linkbtn:hover{ color:var(--gold-hi) }
.thlink{ margin-left:auto; align-self:flex-start }
.hint a{ color:var(--gold-hi) }
.rpick{ display:flex; flex-direction:column; gap:.45rem; margin:0 0 1rem; font-size:.9rem; color:var(--text) }
.rpick label{ display:flex; gap:.55rem; align-items:center; cursor:pointer }

.field{
  width:100%; padding:.8rem .95rem;
  background:var(--sea-0); color:var(--text);
  border:1px solid var(--line); border-radius:9px;
  font-size:.94rem; transition:border-color .2s, background .2s;
}
.field::placeholder{ color:var(--muted-2) }
.field:focus{ outline:none; border-color:var(--gold); background:var(--gold-dim) }
.field.is-bad{ border-color:#E4674F }
/* THE OPEN LIST of a dropdown (28 Oct: "when you are making a selection, the
   contrast is really bad"). The box is dark, but the browser drew its list on
   the system's light background with the box's light text - pale on pale. The
   list now takes the site's own sea and text colours, and the option under the
   pointer or keyboard shows in gold with dark ink. */
select.field{ color-scheme:dark }
select.field option{ background:var(--sea-2); color:var(--text) }
select.field option:checked,
select.field option:hover{ background:var(--gold); color:var(--ink) }
textarea.field{ min-height:120px; resize:vertical; font-family:inherit }
.fl{ display:block; margin-bottom:.85rem }
.fl > span{
  display:block; font-size:.72rem; letter-spacing:.14em; text-transform:uppercase;
  color:var(--muted-2); margin-bottom:.35rem;
}
.hint{ margin:.4rem 0 0; font-size:.76rem; color:var(--muted-2) }
.err{ margin:.3rem 0 .8rem; font-size:.82rem; color:#E4674F }

.empty{ padding:3rem 1.5rem; text-align:center; color:var(--muted-2); font-size:.94rem }

/* ---------- who's signed in ---------- */
.me{ display:flex; align-items:center; gap:.55rem; font-size:.86rem }
.me .av{ width:30px; height:30px; font-size:.68rem }

/* ---------- modal ---------- */
.scrim{
  position:fixed; inset:0; z-index:90; background:rgba(3,9,14,.74);
  backdrop-filter:blur(5px); opacity:0; pointer-events:none; transition:opacity .3s;
}
.scrim.is-on{ opacity:1; pointer-events:auto }
.modal{
  position:fixed; inset:0; z-index:100; display:grid; place-items:center; padding:1.4rem;
  opacity:0; pointer-events:none; transition:opacity .3s;
}
.modal.is-on{ opacity:1; pointer-events:auto }
.modal__card{
  width:min(520px,100%); max-height:90dvh; overflow-y:auto;
  padding:1.9rem; border-radius:16px;
  background:linear-gradient(180deg,var(--sea-2),var(--sea-1));
  border:1px solid var(--line-2);
  transform:translateY(14px) scale(.98); transition:transform .36s var(--ease);
}
.modal.is-on .modal__card{ transform:none }
.modal__h{ font-family:'Cinzel',serif; font-size:1.4rem; color:var(--cream); margin-bottom:.3rem }
.modal__sub{ font-size:.86rem; color:var(--muted); margin-bottom:1.3rem }
.modal__x{
  position:absolute; top:1rem; right:1rem; width:34px; height:34px;
  display:grid; place-items:center; border-radius:50%;
  background:none; border:1px solid var(--line); cursor:pointer;
}
.modal__card{ position:relative }

/* ---------- footer ---------- */
.foot{ border-top:1px solid var(--line); background:var(--sea-1); padding:3rem 0 1.4rem }
.foot__in{ display:grid; grid-template-columns:1.3fr 1fr 1fr 1fr; gap:2.4rem }
.foot h4{ font-size:.7rem; letter-spacing:.18em; text-transform:uppercase; color:var(--gold); margin-bottom:.9rem }
.foot a{ display:block; padding:.26rem 0; font-size:.88rem; color:var(--muted); transition:color .2s }
.foot a:hover{ color:var(--cream) }
.foot__base{
  display:flex; justify-content:space-between; gap:1rem; flex-wrap:wrap;
  margin-top:2.4rem; padding-top:1.3rem; border-top:1px solid var(--line);
  font-size:.77rem; color:var(--muted-2);
}
.foot__base p{ margin:0 }
/* the designer's credit - a quiet inline link, not one of the column links
   above (which are display:block) */
.foot__credit a{
  display:inline; padding:0; font-size:inherit; color:var(--muted);
  border-bottom:1px solid var(--line); transition:color .2s, border-color .2s;
}
.foot__credit a:hover{ color:var(--gold-hi); border-bottom-color:var(--gold) }

/* ---------- toast ---------- */
.toast{
  position:fixed; z-index:110; left:50%; bottom:1.8rem; translate:-50% 0;
  display:flex; align-items:center; gap:.5rem;
  padding:.8rem 1.2rem; border-radius:99px;
  background:var(--sea-3); border:1px solid var(--gold); color:var(--cream);
  font-size:.86rem; box-shadow:0 20px 44px -20px #000;
  opacity:0; transform:translateY(12px); pointer-events:none;
  transition:opacity .3s, transform .3s var(--ease);
}
.toast.is-on{ opacity:1; transform:none }

/* ---------- reveal ---------- */
.reveal{ opacity:0; transform:translateY(18px); transition:opacity .7s var(--ease) var(--d,0s), transform .7s var(--ease) var(--d,0s) }
.reveal.is-in{ opacity:1; transform:none }
@media (prefers-reduced-motion:reduce){ .reveal{ opacity:1; transform:none; transition:none } }

/* ---------- the Sunken Court ----------
   The Pirata Sapiens' story: two panels of legend, then the eight of them
   by rank. Four across on a wide screen, two on a tablet, and on a phone
   one per row with the figure BESIDE the words - a full-length figure on
   top of a card that narrow is a long scroll of feet. The Queen and the
   King wear their colours on the card edge, like the bursts in the hero. */
.court__story .card p{ color:var(--muted); font-size:.95rem }
.court__story .card p + p{ margin-top:.9rem }
.court__story .card .eyebrow{ color:var(--gold); font-size:.68rem; margin-bottom:.4rem }
.court__story .h3{ color:var(--cream); margin:0 0 .8rem; font-size:1.3rem }
.court__grid{ display:grid; grid-template-columns:repeat(4,1fr); gap:1.1rem; margin-top:1.6rem }
.sapien{
  --tone:rgba(233,155,5,.10);
  display:flex; flex-direction:column; text-align:center;
  padding:1.2rem 1.1rem 1.3rem;
  background:linear-gradient(180deg,var(--sea-2),var(--sea-1));
  border:1px solid var(--line); border-radius:var(--r);
  transition:transform .35s var(--ease), border-color .35s, box-shadow .35s;
}
.sapien:hover{ transform:translateY(-4px); border-color:var(--line-2); box-shadow:0 24px 48px -30px #000 }
.sapien__txt{ display:flex; flex-direction:column; flex:1 }
.sapien__art{
  height:230px; display:flex; align-items:flex-end; justify-content:center;
  margin-bottom:1rem;
  background:radial-gradient(60% 55% at 50% 55%, var(--tone), transparent 72%);
}
.sapien__art img{ max-height:100%; width:auto; max-width:100%; object-fit:contain;
                  filter:drop-shadow(0 12px 18px rgba(0,0,0,.55)) }
.sapien__rank{ margin:0 0 .3rem !important; font-size:.66rem !important; font-weight:700;
               letter-spacing:.22em; text-transform:uppercase; color:var(--gold) !important }
.sapien h3{ font-family:'Cinzel',serif; font-size:1.12rem; color:var(--cream); margin:0 }
.sapien__title{ margin:.15rem 0 .8rem !important; font-family:'Cinzel',serif;
                font-size:.82rem !important; color:var(--gold-hi) !important; letter-spacing:.04em }
.sapien p{ font-size:.86rem; color:var(--muted); margin:0 0 .8rem }
.sapien blockquote{ margin:0 0 .9rem; font-family:'Cinzel',serif; font-style:italic;
                    font-size:.86rem; color:var(--cream-2) }
.sapien__gift{ margin:auto 0 0 !important; padding-top:.8rem; border-top:1px solid var(--line);
               font-size:.78rem !important; color:var(--cream) !important;
               min-height:4.6em }   /* one- and two-line perks start level */
.sapien__gift span{ display:block; font-size:.62rem; letter-spacing:.2em; text-transform:uppercase;
                    color:var(--muted-2); margin-bottom:.2rem }
.sapien--queen{ --tone:rgba(60,200,190,.20); border-color:rgba(110,225,215,.42) }
.sapien--queen .sapien__title{ color:#7FE0D8 !important }
.sapien--king { --tone:rgba(255,212,90,.18); border-color:rgba(255,212,90,.45) }
/* THE ROYAL STROKE IS DOUBLED (16 Oct): 1px -> 2px round the Queen and the
   King. The extra pixel comes out of the padding, so their words still start
   level with the six cards beside them. */
.sapien--queen, .sapien--king{
  border-width:2px;
  padding:calc(1.2rem - 1px) calc(1.1rem - 1px) calc(1.3rem - 1px);
}
@media (max-width:1100px){ .court__grid{ grid-template-columns:repeat(2,1fr) } }
@media (max-width:600px){
  .court__grid{ grid-template-columns:1fr }
  .sapien{ display:grid; grid-template-columns:104px 1fr; gap:0 .9rem; text-align:left; padding:1rem }
  .sapien--queen, .sapien--king{ padding:calc(1rem - 1px) }
  .sapien__art{ height:auto; min-height:170px; margin:0; align-items:center;
                background:radial-gradient(circle 64px at 50% 50%, var(--tone), transparent) }
  .sapien__art img{ max-height:190px }
}

/* ---------- responsive ---------- */
@media (max-width:980px){
  :root{ --shell:min(1180px, 100% - 2.2rem) }
  .grid3,.grid2{ grid-template-columns:1fr }
  .fgrid{ grid-template-columns:1fr }
  .side{ position:static; display:flex; gap:.4rem; overflow-x:auto; padding-bottom:.3rem }
  .side h4{ display:none }
  .catbtn{ white-space:nowrap; border:1px solid var(--line) }
  .foot__in{ grid-template-columns:1fr 1fr }
}
@media (max-width:700px){
  .nav{ display:none }
  .nav.is-open{
    display:flex; position:absolute; top:70px; left:0; right:0; flex-direction:column; gap:0;
    padding:.6rem 1.1rem 1.2rem; background:var(--sea-1); border-bottom:1px solid var(--line);
  }
  .nav.is-open a{ padding:.8rem .2rem; border-bottom:1px solid var(--line) }
  .burger{ display:grid }
  .foot__in{ grid-template-columns:1fr }
  .hero__logo{ width:min(100%,420px) }
}

/* =========================================================================
   SECTION BANNERS — the game's own painted headers
   -------------------------------------------------------------------------
   Hulls_bg, GunsCannons_bg and mine-resources_bg are painted with an EMPTY
   PARCHMENT CENTRE: they were drawn to have a title put on them. So they are
   used as backgrounds with the heading sitting in that gap, rather than as
   decoration beside it.

   THE TEXT GOES DARK HERE, and that is the whole trick. Everywhere else on
   this site the type is cream on deep sea; on parchment it has to be the
   game's ink or it disappears. Anything inside .banner therefore overrides
   the page colours rather than inheriting them.
   ========================================================================= */
.banner{
  position:relative; margin:0 0 2.6rem;
  border-radius:var(--r); overflow:hidden;
  border:1px solid var(--line-2);
  box-shadow:0 20px 50px -28px #000;
}
.banner img{ width:100%; display:block }
.banner__txt{
  position:absolute; inset:0;
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  text-align:center; padding:1rem 22%;
}
.banner__txt .eyebrow{ color:var(--rust); margin-bottom:.4rem }
.banner__txt h2{
  font-family:'Cinzel',serif; font-weight:700; color:var(--ink);
  font-size:clamp(1.1rem,2.9vw,2.1rem); line-height:1.08;
  text-shadow:0 1px 0 rgba(255,255,255,.45);
}
.banner__txt p{
  margin:.5rem 0 0; color:rgba(36,19,13,.78);
  font-size:clamp(.72rem,1.15vw,.95rem); max-width:34ch;
}
/* the painted ships and cannons live at the edges, so on a narrow screen the
   parchment gap is too small for the words - the art steps back and the
   heading takes the whole plate */
@media (max-width:760px){
  .banner__txt{ padding:1rem 12%; background:rgba(246,220,165,.86) }
  .banner__txt h2{ text-shadow:none }
}

/* THE NIGHT BANNER (27 Nov) - The Game's header, full width of the page: no
   frame, no rounded corners, flush to the top of its section */
#game{ padding-top:0 }
.night-banner{ position:relative; width:100%; margin:0 0 clamp(2rem,4vw,3rem); line-height:0 }
.night-banner img{ display:block; width:100%; height:auto }
.night-banner::after{
  content:""; position:absolute; inset:auto 0 0 0; height:18%;
  background:linear-gradient(to bottom, rgba(0,0,0,0), var(--sea-0));
  pointer-events:none;
}
.sr-only{
  position:absolute; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0;
}

/* ---------- currency + dock icons ---------- */
/* FIVE NOW, with the teal pearl - and a wrapping row rather than a fixed
   grid, so an odd last card centres on a narrow screen instead of sitting
   alone on the left */
.coins{
  display:flex; flex-wrap:wrap; justify-content:center; gap:1rem; margin-top:2.4rem;
}
.coins .coin{ flex:1 1 170px; max-width:220px }
.coin{
  text-align:center; padding:1.3rem .8rem 1.1rem;
  background:linear-gradient(180deg,var(--sea-2),var(--sea-1));
  border:1px solid var(--line); border-radius:var(--r);
  transition:transform .3s var(--ease), border-color .3s;
}
.coin:hover{ transform:translateY(-4px); border-color:var(--line-2) }
/* A FIXED BOX, NOT A FIXED WIDTH. The four marks are different shapes -
   the pearls are wide and shallow, the timber nearly square - so sizing
   them by width alone left every card's heading at a different height.
   object-fit:contain keeps each one whole inside the same box. */
.coin img{ width:auto; max-width:100%; height:78px; object-fit:contain;
           margin:0 auto .8rem; filter:drop-shadow(0 8px 16px rgba(0,0,0,.55)) }
.coin h4{ font-family:'Cinzel',serif; font-size:.95rem; color:var(--cream); margin-bottom:.25rem }
.coin p{ margin:0; font-size:.78rem; color:var(--muted-2) }

.sites{ display:grid; grid-template-columns:repeat(3,1fr); gap:1.1rem; margin-top:1.6rem }
.site{
  text-align:center; padding:1.4rem 1.1rem;
  background:linear-gradient(180deg,var(--sea-2),var(--sea-1));
  border:1px solid var(--line); border-radius:var(--r);
  transition:transform .3s var(--ease), border-color .3s;
}
.site:hover{ transform:translateY(-4px); border-color:var(--line-2) }
.site img{ width:auto; max-width:100%; height:120px; object-fit:contain;
           margin:0 auto .9rem; filter:drop-shadow(0 10px 20px rgba(0,0,0,.6)) }
.site h4{ font-family:'Cinzel',serif; font-size:1.02rem; color:var(--cream); margin-bottom:.3rem }
.site p{ margin:0; font-size:.85rem; color:var(--muted) }

/* ---------- the dock illustration ---------- */
.cover{
  border-radius:var(--r); overflow:hidden; border:1px solid var(--line-2);
  box-shadow:0 22px 54px -30px #000; position:relative;
}
.cover img{ width:100%; display:block }
.cover::after{
  content:''; position:absolute; inset:0;
  background:linear-gradient(180deg, transparent 55%, rgba(6,17,25,.72));
}

@media (max-width:860px){
  .coins .coin{ flex:0 1 calc(50% - .5rem); max-width:none }
  .sites{ grid-template-columns:1fr }
}

/* ---------- Yarr! Rivals: the battle rooms (16 Oct) ----------
   One card per row of ROOM_LIST (roomspec.js). The top edge is the room's
   own colour from the game (--rc, set on the card), so the page and the
   Rivals list agree at a glance. A wrapping grid rather than a fixed count,
   because rooms come and go with the seasons. */
.rooms{ display:grid; grid-template-columns:repeat(auto-fill,minmax(250px,1fr)); gap:1.1rem; margin-top:2.6rem }
.room{
  --rc:var(--gold);
  display:flex; flex-direction:column; align-items:flex-start;
  padding:1.3rem 1.3rem 1.4rem;
  background:linear-gradient(180deg,var(--sea-2),var(--sea-1));
  border:1px solid var(--line); border-top:3px solid var(--rc); border-radius:var(--r);
  transition:transform .35s var(--ease), border-color .35s, box-shadow .35s;
}
.room:hover{ transform:translateY(-4px); border-color:var(--line-2); border-top-color:var(--rc); box-shadow:0 24px 48px -30px #000 }
.room h3{ font-family:'Cinzel',serif; font-size:1.08rem; color:var(--cream); margin:.75rem 0 .4rem }
.room p{ margin:0; font-size:.86rem; color:var(--muted) }
.room__when{
  margin-top:auto; padding-top:.8rem;
  font-size:.68rem; font-weight:700; letter-spacing:.14em; text-transform:uppercase; color:var(--gold);
}
.room--new{ border-color:var(--line-2); border-top-color:var(--rc) }
/* THE ROOM'S OWN SIGN (16 Oct) - the badge the game hangs over the room's
   intro (pack_rooms.py SIGNS), across the top of its card. A fixed box with
   object-fit:contain, like the currency marks: the signs run from 2.7 to 4
   times as wide as they are tall, and a fixed box keeps every card's tag and
   name starting at the same height. The name stays as text below it. */
.room__badge{
  align-self:stretch; width:100%; height:74px; object-fit:contain;
  margin:0 0 .85rem; filter:drop-shadow(0 8px 14px rgba(0,0,0,.55));
}
.room__tags{ display:flex; flex-wrap:wrap; gap:.35rem }

/* THE "NEW" CHIP - the forum's .tag, filled in gold rather than outlined,
   so it reads as the one thing on the card that is news */
.tag--new{
  background:linear-gradient(135deg,var(--gold-hi),var(--gold));
  color:var(--ink); border-color:var(--gold-hi);
  box-shadow:0 4px 14px -6px rgba(233,155,5,.7);
}
.eyebrow .tag{ letter-spacing:.12em; vertical-align:1px }

/* ---------- Turkey Coma (16 Oct) ----------
   The room's own wooden feast badge is the heading - its lettering is the
   room's name - with the sea it is fought on beside four short beats. */
.feast__badge{ margin:0 auto 1.2rem; max-width:560px }
.feast__badge img{ width:100%; filter:drop-shadow(0 16px 30px rgba(0,0,0,.55)) }
.feast__body{ align-items:center }
.feast__beats{ display:grid; gap:1.3rem }
.feast__beats h3{ font-family:'Cinzel',serif; font-size:1.1rem; color:var(--gold-hi); margin-bottom:.35rem }
.feast__beats p{ margin:0; font-size:.94rem; color:var(--muted) }
/* the Big Tom himself, beside his paragraph (cut from the game's turkey sheet) */
.feast__tom{ float:right; width:140px; height:auto; margin:-.4rem 0 .3rem .9rem;
  filter:drop-shadow(0 10px 18px rgba(0,0,0,.5)) }
.feast__beats > div::after{ content:''; display:block; clear:both }
.feast strong{ color:var(--cream) }
.feast .hero__cta{ margin-top:1.4rem }

/* ---------- the Royale's banner (16 Oct) ----------
   "Beyond the rooms" wears the game's own Royale sign (Battle-Rooms/Intros/
   Royale pirate ship banner.png), the way each room card wears its sign and
   Turkey Coma its feast badge. A faint gold-and-purple glow behind it - the
   banner's own two colours - lifts it off the sea. Still: no motion. */
.royale__badge{ position:relative; margin:.2rem auto 0; max-width:600px }
.royale__badge::before{
  content:''; position:absolute; inset:-14% -8%; z-index:0; pointer-events:none;
  background:radial-gradient(closest-side, rgba(233,155,5,.20), rgba(120,60,170,.12) 55%, transparent);
}
.royale__badge img{ position:relative; z-index:1; width:100%; filter:drop-shadow(0 16px 30px rgba(0,0,0,.6)) }

/* ---------- section scenes (16 Oct) ----------
   A few of the game's own paintings laid behind whole sections, very faint:
   the image sits at low opacity on the page's deep sea, which is the same as
   a heavy dark overlay, and fades out at the section's top and bottom so the
   rules between sections stay clean. Cards keep their own solid fill, so no
   body text sits on the picture without one.

     modes   Battle-Rooms/Tortuga_map.png            - open water, from above
     rivals  Battle-Rooms/Moonlit Pirate Ocean Raceway.png - Nightmare's Nest
     court   Island/Island_teal_cover.png            - the Queen's mystic dock
     turkey  Halloween/Autumn Halloween Pirate Harbor.png - the autumn season

   Each is a ~1920px WebP with a 1000px copy for phones (assets/art/bg/).
   On a wide desktop the picture is held to the window (attachment:fixed),
   so it reads as one full-screen scene; phones scroll it normally (iOS does
   not honour fixed backgrounds), as does anyone who asks for reduced motion. */
.scene{ position:relative; isolation:isolate }
.scene::before{
  content:''; position:absolute; inset:0; z-index:-1; pointer-events:none;
  background:center/cover no-repeat;
  opacity:.2;
  -webkit-mask:linear-gradient(180deg, transparent, #000 18%, #000 82%, transparent);
          mask:linear-gradient(180deg, transparent, #000 18%, #000 82%, transparent);
}
.scene--modes::before { background-image:url('../art/bg/modes.webp');  opacity:.14 }
.scene--rivals::before{ background-image:url('../art/bg/rivals.webp'); opacity:.22 }
.scene--court::before { background-image:url('../art/bg/court.webp');  opacity:.26 }
.scene--turkey::before{ background-image:url('../art/bg/turkey.webp'); opacity:.10 }
@media (max-width:900px){
  .scene--modes::before { background-image:url('../art/bg/modes-sm.webp') }
  .scene--rivals::before{ background-image:url('../art/bg/rivals-sm.webp') }
  .scene--court::before { background-image:url('../art/bg/court-sm.webp') }
  .scene--turkey::before{ background-image:url('../art/bg/turkey-sm.webp') }
}
@media (min-width:1024px) and (hover:hover) and (pointer:fine) and (prefers-reduced-motion:no-preference){
  .scene::before{ background-attachment:fixed }
}

/* ---------- back to top (17 Oct: "the logo (transparent) with an arrow pointing up") ---------- */
.totop{
  position:fixed; z-index:60; right:1.2rem; bottom:1.2rem;
  display:grid; justify-items:center; gap:.15rem; padding:.45rem .55rem .55rem;
  border:1px solid var(--line-2); border-radius:14px; cursor:pointer;
  background:color-mix(in srgb, var(--sea-1) 88%, transparent); backdrop-filter:blur(8px);
  color:var(--gold-hi); box-shadow:0 14px 34px -16px #000;
  opacity:0; transform:translateY(14px); pointer-events:none;
  transition:opacity .3s, transform .3s var(--ease), border-color .2s;
}
.totop.is-on{ opacity:1; transform:none; pointer-events:auto }
.totop:hover{ border-color:var(--gold) }
.totop:hover svg{ transform:translateY(-3px) }
.totop svg{ width:20px; height:20px; transition:transform .2s var(--ease) }
.totop img{ display:block; width:66px; height:auto }
@media (max-width:640px){ .totop{ right:.8rem; bottom:.8rem } .totop img{ width:52px } }

/* ---------- the play page (play-game.html, 17 Oct) ---------- */
.plays{ padding-top:clamp(2.6rem,6vw,4.4rem) }
/* THE STALLION BEHIND THE PLAY PAGE (19 Nov): "a background with the
   Stallion Galleon faded there - highly appealing - should not distract from
   info". Her own side view (native-png C02-S V03, the one the unveiling
   shows), large, low in the frame and well faded: a warm gold glow sits
   under her, every edge melts into the night, she rides a slow swell, and
   the cards are frosted so she shows faintly through them. */
.plays{ position:relative; isolation:isolate; overflow:hidden }
.plays::before, .plays::after{ content:''; position:absolute; pointer-events:none; z-index:-1 }
.plays .lede{ text-shadow:0 1px 10px rgba(6,17,25,.9) }
.plays::before{ /* the glow, and a little lamplight on the water */
  inset:0;
  background:
    radial-gradient(34% 17% at 50% 21%, rgba(6,17,25,.78), rgba(6,17,25,.45) 55%, transparent 100%),
    radial-gradient(60% 46% at 50% 62%, rgba(233,155,5,.10), transparent 70%),
    radial-gradient(40% 18% at 50% 92%, rgba(255,212,90,.07), transparent 75%) }
.plays::after{ /* the ship, under the glow and the wash */
  z-index:-2;
  left:50%; top:50%; width:min(1500px, 125vw); aspect-ratio:1600/852;
  background:url('../art/stallion.webp') center/contain no-repeat;
  opacity:.27; filter:saturate(.9) sepia(.12) brightness(1.05);
  -webkit-mask-image:radial-gradient(closest-side, #000 55%, transparent 100%);
          mask-image:radial-gradient(closest-side, #000 60%, transparent 100%);
  transform:translate(-50%,-56%);
  animation:stallionSwell 11s ease-in-out infinite alternate }
@keyframes stallionSwell{
  from{ transform:translate(-50.6%,-56%) rotate(-.6deg) }
  to  { transform:translate(-49.4%,-54.6%) rotate(.6deg) } }
@media (max-width:900px){
  .plays::after{ background-image:url('../art/stallion-sm.webp'); width:150vw; top:30%; opacity:.24 } }
@media (prefers-reduced-motion:reduce){ .plays::after{ animation:none } }
.plays .plat{ background:rgba(10,26,40,.72); -webkit-backdrop-filter:blur(5px); backdrop-filter:blur(5px) }
.plays__grid{ align-items:stretch }
.plat{
  position:relative; display:flex; flex-direction:column; gap:.2rem;
  padding:1.8rem 1.6rem 1.6rem; background:var(--sea-1);
  border:1px solid var(--line); border-radius:var(--r);
  transition:transform .35s var(--ease), border-color .35s, box-shadow .35s;
}
.plat:hover{ transform:translateY(-4px); border-color:var(--line-2); box-shadow:0 24px 48px -30px #000 }
.plat--main{ border-color:var(--gold); box-shadow:0 26px 60px -34px rgba(233,155,5,.55) }
.plat__flag{
  position:absolute; top:-.7rem; left:1.6rem; padding:.2rem .65rem; border-radius:99px;
  background:var(--gold); color:var(--ink);
  font-size:.66rem; font-weight:700; letter-spacing:.14em; text-transform:uppercase;
}
.plat__flag--soon{ background:var(--sea-3); color:var(--gold-hi); border:1px solid var(--line-2) }
.plat__ic{
  width:50px; height:50px; display:grid; place-items:center; margin-bottom:.9rem;
  border-radius:12px; background:var(--gold-dim); color:var(--gold-hi);
}
.plat__ic svg{ width:26px; height:26px }
.plat__t{ font-family:'Cinzel',serif; font-size:1.3rem; color:var(--cream); margin:0 0 .4rem }
.plat p{ color:var(--muted); font-size:.93rem; margin:0 }
.plat__steps{ margin:1rem 0 0; padding-left:1.2rem; color:var(--muted); font-size:.88rem }
.plat__steps li{ margin:.3rem 0 }
.plat__steps strong{ color:var(--cream); font-weight:600 }
.plat__go{ margin-top:auto }                      /* every card's action sits on the same line */
.plat > :nth-last-child(2){ margin-bottom:1.5rem } /* and never closer than this to the text */
.plays .display{ margin-bottom:.9rem }

/* Google Play badge - a MOCK in the shape of Google's (black, grey rim, the
   four-colour mark). Replace with Google's official badge art when listed. */
.gplay{
  display:inline-flex; align-items:center; gap:.7rem; align-self:center;
  min-height:54px; padding:.45rem 1.15rem .45rem .95rem;
  background:#000; color:#fff; border:1px solid #A6A6A6; border-radius:9px;
  cursor:pointer; transition:transform .18s var(--ease), border-color .2s;
}
.gplay:hover{ transform:translateY(-2px); border-color:#fff }
.gplay__mark{ width:24px; height:26px; flex:none }
.gplay__txt{ display:grid; text-align:left; font-size:1.3rem; font-weight:500; line-height:1.05; letter-spacing:-.01em }
.gplay__txt small{ font-size:.6rem; font-weight:500; letter-spacing:.06em }

.plays__notes{
  list-style:none; margin:2.4rem auto 0; padding:0; max-width:56rem;
  display:flex; flex-wrap:wrap; justify-content:center; gap:.6rem 2rem;
  color:var(--muted); font-size:.88rem;
}
.plays__notes strong{ color:var(--cream); font-weight:600 }
@media (max-width:900px){
  .plays__grid{ grid-template-columns:1fr; max-width:30rem; margin-inline:auto; gap:1.6rem }
}

/* =========================================================
   ROOM COLLAGES (28 Oct) - "creating collages as small background
   slivers for each panel". Across the top of each card, behind the
   room's sign: three taped snapshots of the room (two from its
   in-play strip, one from its own sea), from
   assets/art/rooms/collage/<mode>.webp (built from the game's
   Battle-Rooms art). It fades down into the card so the copy below
   reads as before.
   ========================================================= */
.room[class*="room--"]{ position:relative; overflow:hidden; isolation:isolate }
.room[class*="room--"] > *{ position:relative; z-index:1 }
.room[class*="room--"]::before{
  content:""; position:absolute; z-index:0; left:0; right:0; top:0; height:118px; pointer-events:none;
  background:var(--collage) center 35% / cover no-repeat;
  opacity:.62;
  -webkit-mask:linear-gradient(180deg, #000 0%, #000 45%, transparent 100%);
          mask:linear-gradient(180deg, #000 0%, #000 45%, transparent 100%);
  transition:opacity .35s var(--ease), transform .6s var(--ease);
}
.room[class*="room--"]:hover::before{ opacity:.85; transform:scale(1.04) }
.room--turkey{ --collage:url("../art/rooms/collage/turkey.webp") }
.room--nest{ --collage:url("../art/rooms/collage/nest.webp") }
.room--cove{ --collage:url("../art/rooms/collage/cove.webp") }
.room--seas67{ --collage:url("../art/rooms/collage/seas67.webp") }
.room--tornado{ --collage:url("../art/rooms/collage/tornado.webp") }
.room--fog{ --collage:url("../art/rooms/collage/fog.webp") }
.room--treasure{ --collage:url("../art/rooms/collage/treasure.webp") }
.room--shark{ --collage:url("../art/rooms/collage/shark.webp") }
.room--pirattise{ --collage:url("../art/rooms/collage/pirattise.webp") }
.room--dark{ --collage:url("../art/rooms/collage/dark.webp") }
.room--hell{ --collage:url("../art/rooms/collage/hell.webp") }
@media (prefers-reduced-motion:reduce){
  .room[class*="room--"]:hover::before{ transform:none }
}

/* ---------- THE ARCADE (19 Nov) ----------
   The game's own Arcade look: a pink neon headline with a cyan halo, and each
   cabinet standing beside its game's card, edged in that game's colour
   (Ship Invaders pink, Reef Runner teal - the News panels' colours). */
.arcade__neon{ font-style:normal; color:#FFE6FA;
  text-shadow:0 0 6px #FF5AD9, 0 0 18px #FF5AD9, 0 0 36px rgba(255,90,217,.55), 0 0 2px #5FF3FF }
.arcade__games{ align-items:stretch }
.arcade__game{ display:grid; grid-template-columns:150px 1fr; gap:1.3rem; align-items:center;
  border-top:3px solid var(--ac) }
.arcade__game--invaders{ --ac:#FF5AD9 }
.arcade__game--reef{ --ac:#22C3B6 }
.arcade__game h3{ color:var(--ac) }
.arcade__cab{ width:150px; height:auto; filter:drop-shadow(0 0 14px color-mix(in srgb, var(--ac) 45%, transparent)) drop-shadow(0 14px 18px rgba(0,0,0,.5)) }
.arcade .hero__cta{ margin-top:2rem }
@media (max-width:860px){ .arcade__games{ grid-template-columns:1fr } }
@media (max-width:480px){
  .arcade__game{ grid-template-columns:1fr; justify-items:center; text-align:center }
  .arcade__cab{ width:130px }
}

/* ---------- CHRISTMAS, COMING SOON (19 Nov) ----------
   A thin evergreen strip under the hero: the dock tree's pirate baubles
   hanging from its top edge on gold thread, the sleigh's emerald gift, and a
   little snow drifting behind the words. */
.xmas{ position:relative; display:flex; align-items:center; justify-content:center; gap:1.1rem;
  max-width:66rem; min-height:78px; margin:calc(-1 * clamp(2.4rem,6vw,6rem)) auto clamp(2rem,4vw,3rem); padding:.7rem 1.4rem;
  border-radius:14px; text-align:left;
  background:linear-gradient(90deg,#0B3520,#14532D 50%,#0B3520);
  border:1px solid rgba(255,212,90,.55);
  box-shadow:inset 0 1px 0 rgba(255,232,160,.25), 0 16px 36px -20px #000 }
.xmas::before{ content:''; position:absolute; inset:0; border-radius:inherit; pointer-events:none; opacity:.55;
  background-image:
    radial-gradient(circle, #fff 0 1.1px, transparent 1.8px),
    radial-gradient(circle, rgba(255,255,255,.8) 0 .8px, transparent 1.4px);
  background-size:46px 46px, 29px 29px; background-position:0 0, 13px 17px;
  animation:xsnow 9s linear infinite }
@keyframes xsnow{ to{ background-position:-46px 46px, 13px 104px } }
.xmas > *{ position:relative }
/* Isabela Cruz in her Christmas look (Santa hat, the treasure sweater - the
   middle of "Christmas pirate outfit trio-10.png"), boots on the bottom edge
   and the hat well above the top. She faces right, into the banner. */
.xmas{ padding-left:calc(1.4rem + 74px) }
.xmas .xmas__pirate{ position:absolute; left:1.1rem; bottom:-1px; height:150px; width:auto;
  filter:drop-shadow(0 0 10px rgba(255,212,90,.25)) drop-shadow(4px 6px 6px rgba(0,0,0,.55)) }
.xmas__hang{ display:flex; align-items:flex-start; gap:.45rem; align-self:flex-start; margin-top:-.7rem; flex:none }
.xb{ display:flex; flex-direction:column; align-items:center; transform-origin:50% 0;
  animation:xsway 3.6s ease-in-out infinite alternate; animation-delay:var(--d,0s) }
.xb::before{ content:''; width:1px; height:var(--s,8px); background:linear-gradient(#FFD45A,#C98213) }
.xb img{ height:40px; width:auto; filter:drop-shadow(0 0 6px rgba(255,212,90,.45)) drop-shadow(0 4px 5px rgba(0,0,0,.5)) }
@keyframes xsway{ from{ transform:rotate(-5deg) } to{ transform:rotate(5deg) } }
.xmas__txt{ min-width:0 }
.xmas__kicker{ margin:0 0 .1rem; font-family:'Cinzel',serif; font-weight:700; font-size:.72rem;
  letter-spacing:.24em; text-transform:uppercase; color:#FFD45A }
.xmas__msg{ margin:0; font-size:.95rem; line-height:1.4; color:#F3EEDC }
.xmas__msg strong{ color:#FFE7A3 }
.xmas__gift{ height:52px; width:auto; flex:none; filter:drop-shadow(0 6px 8px rgba(0,0,0,.5)) }
@media (max-width:760px){
  .xmas{ gap:.8rem; padding:.6rem 1rem .6rem calc(1rem + 58px) }
  .xmas .xmas__pirate{ height:118px; left:.7rem }
  .xmas__hang--r{ display:none }
  .xmas__msg{ font-size:.88rem }
  .xmas__gift{ height:44px }
}
@media (max-width:460px){
  .xmas__hang .xb:nth-child(n+2){ display:none }
  .xb img{ height:34px }
  .xmas__gift{ display:none }
}
@media (prefers-reduced-motion:reduce){ .xmas::before, .xb{ animation:none } }
/* THE LAUNCH PLAY PAGE (24 Nov 2026, revenue-setup) - moved here from the
   inline <style> of Assets/PlayStore/launch-site/play-game.html. Nothing on
   the current pages uses these classes, so they wait harmlessly until the
   launch page replaces play-game.html. */
.plays__grid{ grid-auto-flow:dense }
/* the Android card leads in the page's source now; on an iPhone it goes last (30 Nov) */
.is-ios .plat--android{ order:3 }
.buy{ margin:3.2rem auto 0; max-width:62rem }
.buy__h{ font-family:'Cinzel',serif; color:var(--cream); text-align:center; font-size:1.45rem; margin:0 0 .4rem }
.buy__sub{ text-align:center; color:var(--muted); margin:0 auto 1.6rem; max-width:44rem; font-size:.95rem }
.buy__grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:1rem }
.buy__c{ padding:1.25rem 1.3rem; border:1px solid var(--line); border-radius:var(--r);
  background:rgba(10,26,40,.72); -webkit-backdrop-filter:blur(5px); backdrop-filter:blur(5px) }
.buy__c h3{ margin:0 0 .45rem; font-size:1rem; color:var(--gold-hi); font-weight:600 }
.buy__c p{ margin:0; color:var(--muted); font-size:.9rem; line-height:1.55 }
.buy__c strong{ color:var(--cream); font-weight:600 }
.buy__fine{ text-align:center; color:var(--muted); font-size:.8rem; margin:1.2rem auto 0; max-width:48rem }
@media (max-width:900px){ .buy__grid{ grid-template-columns:1fr; max-width:30rem; margin-inline:auto } }
/* Google's OFFICIAL badge (assets/google-play-badge.png, Google's 646x250 art
   with its own clear space). Shown as supplied - never recoloured, cropped
   or redrawn (Google's badge guidelines). 78px tall = a ~50px visible badge. */
.gplay-badge{ display:inline-block; align-self:center; line-height:0; border-radius:10px;
  transition:transform .18s var(--ease) }
.gplay-badge:hover{ transform:translateY(-2px) }
.gplay-badge img{ height:78px; width:auto; display:block }
.foot__tm{ font-size:.72rem; color:var(--muted) }   /* opacity .8 failed contrast (4.21:1), 30 Nov */

/* ---- QUESTIONS (30 Nov 2026) - the home page's FAQ, plain <details> ---- */
.faq{ margin-top:2rem; display:grid; gap:.7rem }
.faq__q{ border:1px solid var(--line); border-radius:var(--r); background:rgba(16,37,56,.55); padding:0 1.2rem }
.faq__q[open]{ border-color:var(--line-2) }
.faq__q summary{ cursor:pointer; list-style:none; padding:1rem 2rem 1rem 0; position:relative;
  font-weight:600; color:var(--cream-2) }
.faq__q summary::-webkit-details-marker{ display:none }
.faq__q summary::after{ content:"+"; position:absolute; right:0; top:50%; transform:translateY(-50%);
  color:var(--gold); font-size:1.3rem; line-height:1 }
.faq__q[open] summary::after{ content:"\2212" }
.faq__q summary:focus-visible{ outline:2px solid var(--gold); outline-offset:4px; border-radius:4px }
.faq__q p{ margin:0 0 1.1rem; color:var(--muted); line-height:1.6 }
.hero__cta .gplay-badge img{ height:58px }
/* the King's glow (.crest__burst--king) reached 13px past a 414px phone and the
   whole page scrolled sideways (found 30 Nov). clip, not hidden: no scroll box,
   so the sticky header still sticks. */
body{ overflow-x:clip }

/* ---- GET THE GAME (30 Nov 2026) - the closing download band ---- */
.getgame{ background:radial-gradient(60rem 22rem at 50% 0%, var(--gold-dim), transparent 70%) }
.getgame__cta{ display:flex; gap:1rem; justify-content:center; align-items:center; flex-wrap:wrap; margin-top:1.8rem }
.getgame__badge img{ height:58px }
.getgame--android .getgame__badge{ order:-1 }
.getgame--android .getgame__badge img{ height:74px }
.getgame--android .getgame__web{ --bh:48px; padding:0 1.4rem; font-size:.92rem;
  background:transparent; color:var(--gold-hi); border:1px solid var(--line-2); box-shadow:none }
@media (max-width:520px){ .getgame__cta{ flex-direction:column } }
.getgame .lede{ margin-top:1.1rem }

/* ---- THE APP LEADS (30 Nov 2026): QR codes for computer visitors ---- */
.plat__qr{ display:none; align-items:center; gap:.9rem; margin:.2rem 0 1.1rem;
  font-size:.86rem; color:var(--muted); line-height:1.45 }
.plat__qr img{ width:96px; height:96px; border-radius:8px; flex:none; background:#fff }
.plat__qr strong{ color:var(--cream-2) }
.is-desktop .plat__qr{ display:flex }
.hero__qr{ display:none; align-items:center; gap:.6rem; text-align:left;
  font-size:.78rem; line-height:1.3; color:var(--muted) }
.hero__qr img{ width:58px; height:58px; border-radius:6px; background:#fff; flex:none }
.is-desktop .hero__qr{ display:inline-flex }

/* ---- PHONES GET THE SMALLER SEA (30 Nov 2026): hero.webp is 348 KB at 1600px,
   behind a 34% fade; 960px is plenty under a phone's width ---- */
@media (max-width:700px){ .hero__bg{ background-image:url('../hero-960.webp') } }
/* ON AN ANDROID PHONE THE HERO LEADS WITH THE APP too (30 Nov), as the closing band does */
.is-android .hero .hero__cta .gplay-badge{ order:-1 }
.is-android .hero .hero__cta .gplay-badge img{ height:72px }
.is-android .hero .hero__cta .btn--gold{ background:transparent; color:var(--gold-hi); border:1px solid var(--line-2); box-shadow:none }

/* ---- THE HERO IS THE NIGHT BANNER (30 Nov 2026) ----
   Edge to edge at the top of the hero, the text under it as before. On a phone
   the wide painting is cropped taller around the logo and the bow, so it does
   not shrink to a strip. The crest now opens #game. */
.hero{ padding-top:0 }
.night-banner--hero{ margin:0; z-index:1 }
.night-banner--hero + .hero__in{ padding-top:clamp(.6rem,2vw,1.4rem) }
@media (max-width:700px){
  .night-banner--hero img{ height:min(62vw,300px); object-fit:cover; object-position:0% 50% }
}
#game{ padding-top:clamp(2.4rem,5vw,4rem) }
#game .crest{ margin-bottom:clamp(1.6rem,4vw,2.6rem) }
/* PHONES IGNORED body{overflow-x:clip} (30 Nov): the King's glow in #game still
   widened the page to ~500px and pushed the back-to-top button off screen. Every
   section is full width, so clipping at its own edges trims only what is off the
   screen anyway. clip, not hidden: no scroll box, nothing sticky breaks. */
section, .foot{ overflow-x:clip }
/* THE FORUM HEADER ON A PHONE (30 Nov): logo + Sign in + Play + menu were 455px on a
   412px phone. Under 520px "Play" moves into the menu; a long captain name is cut short. */
.nav__play{ display:none }
@media (max-width:520px){
  .hdr__act .btn--ghost{ display:none }
  .nav.is-open .nav__play{ display:block }
  .me span:last-child{ max-width:6.5rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap }
}
/* SMALL PHONES (360px, 30 Nov): the header was 7-38px too wide on every page, and the
   forum's category strip stretched its grid column instead of scrolling inside it. */
.fgrid > *{ min-width:0 }
@media (max-width:400px){
  .hdr__in{ gap:.6rem }
  .brand{ gap:.45rem }
  .brand img{ height:34px }
  .brand__txt{ font-size:.68rem; letter-spacing:.1em }
  .hdr__act{ gap:.4rem }
  .hdr__act .btn--sm{ padding:0 .8rem }
}

/* ---- 30 Nov 2026 (mobile pass 3) ----
   1. THE KING'S GLOW was the last thing wider than a phone. Browsers without
      overflow:clip (older iPhones) still scrolled sideways, so #game hides its own
      overflow outright; the glow fades out well before the section's edges.
   2. THE HEADER IS FIXED, not sticky: on a phone it slid partly out of view while
      scrolling. The page is pushed down by its height; anchors land below it.
   3. "Sail for the / black pearls." breaks after "the" on phones only. */
#game{ overflow:hidden }
.hdr{ position:fixed; top:0; left:0; right:0 }
body{ padding-top:70px }
html{ scroll-padding-top:84px }
.br-m{ display:none }
@media (max-width:700px){ .br-m{ display:inline } }
/* the Royale banner's glow reached 8% past each side of a phone (older iPhones scrolled sideways) */
@media (max-width:700px){ .royale__badge::before{ inset:-14% 0 } }
/* 5PX OF BLACK ABOVE THE HEADER ON PHONES (30 Nov, "lets see how that looks") */
@media (max-width:700px){
  body::before{ content:""; position:fixed; top:0; left:0; right:0; height:5px; background:#000; z-index:51 }
  .hdr{ top:5px }
  body{ padding-top:75px }
  html{ scroll-padding-top:89px }
}
/* THE HARD LOCK (30 Nov, "there is STILL a horizontal scroll - get rid of it"). The page
   itself never scrolls sideways, whatever pokes out: html AND body hidden (older iPhones
   honour only the pair), and no sideways rubber-band. Safe because the header is fixed,
   not sticky (overflow on an ancestor would break sticky). Inner strips that scroll on
   purpose (.side on the forum) keep their own overflow-x:auto. */
html, body{ overflow-x:hidden; max-width:100%; overscroll-behavior-x:none }
.pageclip{ position:relative; width:100%; overflow-x:hidden }
@supports (overflow:clip){ .pageclip{ overflow-x:clip } }
/* THE ROYALE TOURNAMENT CARD (30 Nov) - the Royale banner's purple (sampled: #5B1280 to
   #39005A), its text in gold */
.card--royale{ background:linear-gradient(160deg, #5B1280, #39005A); border-color:rgba(255,212,90,.55);
  box-shadow:0 24px 50px -28px rgba(91,18,128,.8) }
.card--royale:hover{ border-color:var(--gold-hi) }
.card--royale h3{ color:var(--gold-hi) }
.card--royale p{ color:#F3D58A }
.card--royale strong{ color:var(--gold-hi) }
