/* Clatter Club design language v1.0. The first block is the design language document's own CSS, unchanged. */
:root{--jade:#173D32;--ivory:#F7F0E3;--coral:#CB655A;--sage:#8B9F83;--gold:#C6A064;--ink:#263B32}*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--ivory);color:var(--jade);font-family:Manrope,Arial,sans-serif}h1,h2,h3,.brand{font-family:'Bodoni Moda','Bodoni MT',Didot,Georgia,serif}h1{font-weight:600;letter-spacing:-.045em;font-size:clamp(4rem,10vw,9rem);line-height:1.02;margin:.18em 0}h2{font-weight:500;letter-spacing:-.035em;font-size:clamp(2.5rem,5vw,4.8rem);line-height:1.12;margin:.15em 0 .35em}h3{font-weight:500;font-size:1.7rem;margin:0 0 .5rem}.eyebrow{text-transform:uppercase;letter-spacing:.2em;font-size:.7rem;font-weight:600;color:#9B5148}.muted{color:#53685C}p{line-height:1.85}header{padding:26px clamp(24px,6vw,100px);display:flex;align-items:center;justify-content:space-between;position:absolute;top:0;left:0;right:0;z-index:2}.brand{font-size:clamp(1.4rem,2.5vw,2rem);font-weight:600;letter-spacing:-.045em}.header-note{font-size:.72rem;letter-spacing:.14em;text-transform:uppercase}.hero{min-height:1150px;min-height:125svh;background-image:linear-gradient(to bottom,rgba(247,240,227,.05) 0%,rgba(247,240,227,.0) 72%,var(--ivory) 100%),url('/artwork.webp');background-position:center top;background-size:cover;background-repeat:no-repeat;display:flex;align-items:center;justify-content:center;text-align:center;padding:140px 24px 190px}.hero-inner{max-width:760px;margin:auto;padding:20px 24px;background:rgba(247,240,227,.12)}.hero p{max-width:520px;margin:20px auto;font-size:1.05rem}.line{width:75px;height:1px;background:var(--gold);margin:26px auto}.section{padding:clamp(75px,11vw,160px) clamp(25px,9vw,150px)}.container{max-width:1050px;margin:auto}.section-intro{max-width:670px}.divider{height:1px;background:rgba(23,61,50,.2);margin:45px 0}.two{display:grid;grid-template-columns:1fr 1fr;gap:clamp(30px,7vw,110px);align-items:start}.spec{font-size:.76rem;letter-spacing:.07em;text-transform:uppercase;color:#8A6F5D}.swatches{display:grid;grid-template-columns:repeat(5,1fr);gap:12px;margin-top:42px}.artwork{background-image:url('/artwork.webp');background-size:cover;background-position:center 24%;height:clamp(600px,100vw,1100px);position:relative}.artwork-caption{position:absolute;bottom:45px;left:50%;transform:translateX(-50%);background:rgba(247,240,227,.92);padding:14px 26px;font-size:.75rem;letter-spacing:.12em;text-transform:uppercase;white-space:nowrap}.rule{padding:28px 0;border-top:1px solid rgba(23,61,50,.17)}.rule strong{font-family:'Bodoni Moda',Georgia,serif;font-size:1.8rem;font-weight:500}.rule p{margin:8px 0 0}.footer{background:var(--jade);color:var(--ivory);padding:100px 30px;text-align:center}.footer .brand{font-size:clamp(2.8rem,7vw,6rem)}.footer p{color:#C6D1C6} @media(max-width:720px){.two{grid-template-columns:1fr}.swatches{grid-template-columns:repeat(2,1fr)}.hero{min-height:1000px;background-size:auto 100%;background-position:center top}.header-note{display:none}.section{padding:80px 24px}.artwork{height:850px;background-size:auto 100%}}

/* Site additions, built only from the tokens above. */
a{color:var(--jade)}
a:focus-visible,button:focus-visible,input:focus-visible{outline:2px solid var(--jade);outline-offset:3px}
.skip{position:absolute;left:-9999px;top:0;background:var(--jade);color:var(--ivory);padding:12px 18px;z-index:10}
.skip:focus{left:12px;top:12px}
.brand{text-decoration:none;color:var(--jade)}
.header-note a{text-decoration:none;display:inline-block;padding:12px 0;margin-left:28px}
.header-note a:hover,.header-note a[aria-current="page"]{text-decoration:underline;text-underline-offset:5px}
@media(max-width:720px){.header-note{display:block}.header-note a{margin-left:18px}}

.hero-page{min-height:760px;min-height:88svh;padding:150px 24px 150px}
.hero-page h1{font-size:clamp(3rem,7vw,6.2rem);line-height:1.08}
@media(max-width:720px){.hero-page{min-height:820px}}

.actions{display:flex;flex-wrap:wrap;justify-content:center;gap:12px;margin:34px 0 22px}
.actions.left{justify-content:flex-start;margin:30px 0 0}
.btn{display:inline-block;font-size:.72rem;font-weight:600;letter-spacing:.14em;text-transform:uppercase;text-decoration:none;padding:17px 26px;border:1px solid var(--jade);border-radius:2px;background:var(--jade);color:var(--ivory);transition:background-color .2s ease,color .2s ease}
.btn:hover{background:var(--ink)}
.btn-outline{background:transparent;color:var(--jade)}
.btn-outline:hover{background:var(--jade);color:var(--ivory)}
.text-link{display:inline-block;margin-top:6px;padding:8px 0;font-size:.72rem;font-weight:600;letter-spacing:.14em;text-transform:uppercase}

.rules{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:1fr 1fr;column-gap:clamp(30px,7vw,110px)}
.rules .spec{margin:10px 0 0}
.when{color:var(--jade);font-weight:600}
.rule-link{display:block;text-decoration:none}
.rule-link:hover strong{text-decoration:underline;text-underline-offset:6px;text-decoration-thickness:1px}
.count{margin:30px 0 4px}
@media(max-width:720px){.rules{grid-template-columns:1fr}.artwork-caption{white-space:normal;width:calc(100% - 48px);text-align:center}}

.finder{max-width:520px;margin:42px 0 10px;display:flex;flex-direction:column;gap:10px}
.finder label{font-size:.72rem;font-weight:600;letter-spacing:.14em;text-transform:uppercase}
.finder input{font:inherit;font-size:1rem;padding:16px 18px;border:1px solid var(--jade);border-radius:2px;background:var(--ivory);color:var(--jade);width:100%}
.finder input::placeholder{color:#6F7F74}

.city{margin-top:56px}
.city:first-of-type{margin-top:36px}
.city h3{margin-bottom:6px}

.tiles{max-width:100%;height:auto;display:block;margin:34px 0 6px}
.tile-face{fill:#FBF7EE;stroke:var(--jade);stroke-width:1.2}
.tile-ink{fill:var(--jade)}
.tile-coral{fill:var(--coral)}
.tile-sage{fill:var(--sage)}
.tile-label{font-family:Manrope,Arial,sans-serif;font-size:11px;letter-spacing:.12em;fill:#8A6F5D;text-transform:uppercase}
.han{font-family:'Noto Serif SC','Songti SC',SimSun,serif}

.steps{counter-reset:step;list-style:none;margin:0;padding:0}
.steps li{counter-increment:step;padding:28px 0 28px 64px;border-top:1px solid rgba(23,61,50,.17);position:relative}
.steps li::before{content:counter(step,decimal-leading-zero);position:absolute;left:0;top:28px;font-family:'Bodoni Moda',Georgia,serif;font-size:1.8rem;font-weight:500;color:#9B5148}
.steps strong{font-family:'Bodoni Moda',Georgia,serif;font-size:1.8rem;font-weight:500}
.steps p{margin:8px 0 0}

/* Tutorial: lives in the open space at the centre of the artwork. */
.tutorial{height:auto;min-height:clamp(600px,100vw,1100px);display:flex;align-items:center;justify-content:center;padding:clamp(90px,12vw,160px) 24px}
.tutorial-panel{width:100%;max-width:860px;background:rgba(247,240,227,.9);padding:clamp(28px,5vw,56px) clamp(20px,5vw,56px);text-align:center}
.tutorial-panel h2{margin-bottom:.2em}
.tut-stage{position:relative;overflow:hidden;margin:26px auto 0;height:180px;transition:height .5s ease}
.tt{position:absolute;left:0;top:0;width:54px;height:72px;padding:0;margin:0;border:0;background:none;font:inherit;color:inherit;cursor:default;
  transition:transform .9s cubic-bezier(.65,0,.35,1),opacity .6s ease,box-shadow .3s ease;border-radius:6px}
.tt:disabled{cursor:default}
.tt svg{display:block;width:100%;height:100%}
.tt.is-new::after{content:"New";position:absolute;left:50%;top:-15px;transform:translateX(-50%);font-size:.56rem;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:#9B5148;white-space:nowrap}
.is-asking .tt:not(:disabled){cursor:pointer}
.is-asking .tt:not(:disabled):hover{box-shadow:0 0 0 2px var(--jade)}
.tt.is-wrong{box-shadow:0 0 0 2px var(--coral)}
.tut-line{position:absolute;left:0;top:0;height:1px;background:var(--gold);transform-origin:left center;animation:tut-draw .7s cubic-bezier(.2,.7,.2,1) both}
@keyframes tut-draw{from{transform:scaleX(0)}to{transform:scaleX(1)}}
.tut-pool{position:absolute;left:0;right:0;top:0;margin:0;text-align:center;color:#9B5148;font-weight:600}
.tut-pool[hidden]{display:none}
.tut-win{margin:4px 0 0;font-family:'Bodoni Moda',Georgia,serif;font-size:clamp(2.2rem,5vw,3.2rem);font-weight:600;letter-spacing:-.03em;line-height:1.1;color:#9B5148}
.tut-caption{min-height:3.7em;max-width:540px;margin:10px auto 0;font-size:1.1rem}
.tut-dots{display:flex;justify-content:center;gap:6px;margin:4px 0 18px}
.tut-dot{width:22px;height:24px;padding:0;border:0;background:none;cursor:pointer;position:relative}
.tut-dot::after{content:"";position:absolute;left:3px;right:3px;top:11px;height:2px;background:rgba(23,61,50,.18);transition:background .3s ease}
.tut-dot.is-on::after{background:var(--gold)}
.tut-dot[aria-current="step"]::after{background:var(--jade)}
.tut-controls{display:flex;justify-content:center;align-items:center;gap:6px 18px}
.tut-next{min-width:220px;font-size:.8rem;padding:20px 34px;cursor:pointer;font-family:Manrope,Arial,sans-serif}
.tut-back{font:inherit;font-size:.72rem;font-weight:600;letter-spacing:.14em;text-transform:uppercase;color:#53685C;background:none;border:0;padding:14px 4px;cursor:pointer}
.tut-back[hidden]{display:none}
.tut-back:hover{color:var(--jade);text-decoration:underline;text-underline-offset:5px}
.tut-end{margin-top:34px}
.tut-end h3{font-size:clamp(1.7rem,3.4vw,2.2rem);margin:0}
.tut-end p{max-width:460px;margin:8px auto 0}
.tutorial .actions{margin-bottom:0}
@media(max-width:480px){.tut-next{min-width:0;flex:1}.tut-controls{gap:6px 12px}}
@media(prefers-reduced-motion:reduce){.tt,.tut-stage{transition-duration:.01s}}
@media(max-width:720px){.tutorial{height:auto;min-height:850px}}

/* Set picks on the homepage */
.picks{list-style:none;margin:40px 0 0;padding:0;display:grid;grid-template-columns:repeat(4,1fr);gap:clamp(20px,3vw,40px)}
.pick{border-top:1px solid rgba(23,61,50,.17);padding-top:26px}
.pick-tile{width:46px;height:62px;display:block;margin-bottom:18px}
.pick .eyebrow{margin:0 0 8px}
.pick strong{display:block;font-family:'Bodoni Moda',Georgia,serif;font-size:1.45rem;font-weight:500;line-height:1.25}
.pick p{margin:6px 0 0}
@media(max-width:900px){.picks{grid-template-columns:1fr 1fr}}
@media(max-width:480px){.picks{grid-template-columns:1fr}}

header{flex-wrap:wrap;gap:6px 20px}
.letter-form{display:flex;flex-direction:column;gap:10px}
.letter-form label{font-size:.72rem;font-weight:600;letter-spacing:.14em;text-transform:uppercase}
.letter-row{display:flex;flex-wrap:wrap;gap:10px}
.letter-row input{flex:1 1 220px;min-width:0;font:inherit;font-size:1rem;padding:16px 18px;border:1px solid var(--jade);border-radius:2px;background:var(--ivory);color:var(--jade)}
.letter-row .btn{cursor:pointer;font-family:Manrope,Arial,sans-serif}
.letter-row .btn:disabled{opacity:.6;cursor:wait}
.letter-status{margin:0;min-height:1.85em;font-weight:600}
.letter-note{margin:0;font-size:.9rem}
.hp{position:absolute;left:-9999px;width:1px;height:1px;opacity:0}

.footer .brand{color:var(--ivory)}
.footer a{color:var(--ivory)}
.footer .spec{color:#C6A064}
.footer-nav{display:flex;flex-wrap:wrap;justify-content:center;gap:4px 30px;margin:26px 0}
.footer-nav a{display:inline-block;padding:10px 0;font-size:.72rem;font-weight:600;letter-spacing:.14em;text-transform:uppercase;text-decoration:none}
.footer-nav a:hover{text-decoration:underline;text-underline-offset:5px}


/* ---------- Quiet motion: reveals and hairlines. Plays once; none for reduced motion. ---------- */
@keyframes cc-rise{from{opacity:0;transform:translateY(16px)}to{opacity:1;transform:none}}
@keyframes cc-line{from{transform:scaleX(0)}to{transform:scaleX(1)}}
.js .hero-inner > *{animation:cc-rise 1s cubic-bezier(.2,.7,.2,1) both}
.js .hero-inner > :nth-child(2){animation-delay:.12s}
.js .hero-inner > .line{animation:cc-line .9s cubic-bezier(.2,.7,.2,1) .45s both}
.js .hero-inner > :nth-child(4){animation-delay:.55s}
.js .hero-inner > :nth-child(5){animation-delay:.7s}
.js .hero-inner > :nth-child(6){animation-delay:.85s}
.tut-win:not([hidden]){animation:cc-rise .8s cubic-bezier(.2,.7,.2,1) .35s both}
.tut-end:not([hidden]){animation:cc-rise .9s cubic-bezier(.2,.7,.2,1) .9s both}
.tut-end .line{animation:cc-line .9s cubic-bezier(.2,.7,.2,1) 1.1s both}

.rv{opacity:0;transform:translateY(14px);transition:opacity .8s ease,transform .8s cubic-bezier(.2,.7,.2,1)}
.rv.is-in{opacity:1;transform:none}
/* Ruled blocks: the hairline draws across as the block arrives. */
.rule.rv,.pick.rv{position:relative;border-top-color:transparent}
.rule.rv::before,.pick.rv::before{content:"";position:absolute;left:0;right:0;top:-1px;height:1px;background:rgba(23,61,50,.17);transform:scaleX(0);transform-origin:left center;transition:transform 1s cubic-bezier(.2,.7,.2,1) .15s}
.rule.rv.is-in::before,.pick.rv.is-in::before{transform:scaleX(1)}
/* Tile drawings are dealt in one tile at a time. */
svg.tiles.rv{transform:none}
svg.tiles.rv > *{opacity:0;transition:opacity .5s ease}
svg.tiles.rv.is-in > *{opacity:1}

@media(prefers-reduced-motion:reduce){
.js .hero-inner > *,.js .hero-inner > .line,.tut-win:not([hidden]),.tut-end:not([hidden]),.tut-end .line,.tut-line{animation:none}
.rv,.rv::before,svg.tiles.rv > *{transition:none}
}

/* ---------- Play: the game sits on the artwork, in an ivory panel. ---------- */
.hero-sub{margin:0 0 18px}
.play{background-image:url('/artwork.webp');background-size:cover;background-position:center 30%;padding:110px clamp(8px,3vw,40px) clamp(40px,6vw,90px)}
.play-panel{max-width:1140px;margin:0 auto;background:rgba(247,240,227,.95);padding:clamp(14px,3vw,36px);position:relative}
.game{position:relative;min-height:520px}
.g-intro{text-align:center;padding:clamp(30px,7vw,90px) 10px}
.g-intro h1{font-size:clamp(3.4rem,8vw,6.6rem);line-height:1.04}
.g-intro p{max-width:540px;margin:16px auto;font-size:1.05rem}
.g-start{cursor:pointer;font-family:Manrope,Arial,sans-serif;font-size:.8rem;padding:20px 36px}
.g-top{display:flex;flex-wrap:wrap;gap:6px 22px;align-items:center;justify-content:space-between;border-bottom:1px solid rgba(23,61,50,.17);padding-bottom:10px}
.g-info{margin:0}
.g-toggles{display:flex;flex-wrap:wrap;gap:4px 18px;align-items:center}
.g-toggle,.g-link{font:inherit;font-size:.7rem;font-weight:600;letter-spacing:.14em;text-transform:uppercase;color:var(--jade);display:inline-flex;gap:7px;align-items:center;cursor:pointer;padding:10px 0;background:none;border:0}
.g-toggle input{accent-color:var(--jade);width:16px;height:16px;margin:0}
.g-link:hover{text-decoration:underline;text-underline-offset:5px}
.gt{display:inline-block;vertical-align:top;line-height:0}
.gt svg{display:block;width:100%;height:auto}
.gt-xs{width:15px}.gt-s{width:24px}.gt-m{width:32px}.gt-l{width:58px}
.gt.is-latest{border-radius:4px;box-shadow:0 0 0 2px var(--gold);animation:g-in .45s ease both}
@keyframes g-in{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:none}}
.g-opps{display:grid;grid-template-columns:repeat(3,1fr);gap:clamp(12px,2.4vw,30px);margin-top:14px}
.g-seat,.g-me{border-top:1px solid rgba(23,61,50,.17);padding-top:12px;min-width:0;position:relative}
.g-seat::before,.g-me::before{content:"";position:absolute;left:0;right:0;top:-1px;height:2px;background:var(--gold);transform:scaleX(0);transform-origin:left;transition:transform .5s ease}
.g-seat.is-turn::before,.g-me.is-turn::before{transform:scaleX(1)}
.g-head{display:flex;align-items:baseline;flex-wrap:wrap;gap:2px 10px}
.g-head strong{font-family:'Bodoni Moda',Georgia,serif;font-size:1.35rem;font-weight:500}
.g-head .spec{margin:0}
.g-think{color:#9B5148}
.g-wind{font-family:'Noto Serif SC','Songti SC',serif;font-weight:900;font-size:1.05rem;color:#9B5148}
.g-backs{display:flex;margin:8px 0 4px;padding-left:6px}
.g-backs .gt{margin-left:-3px}
.g-melds{display:flex;flex-wrap:wrap;gap:6px 10px;margin:8px 0}
.g-meld{display:inline-flex;gap:1px}
.g-bonus{opacity:.9}
.g-pond{display:flex;flex-wrap:wrap;gap:3px;margin-top:8px;min-height:34px}
.g-empty{font-size:.64rem;color:#8A6F5D;align-self:center}
.g-centre{display:flex;align-items:center;justify-content:center;gap:16px;min-height:104px;padding:16px 0;margin-top:10px;text-align:left}
.g-last{display:flex;flex-direction:column;align-items:center;gap:6px}.g-last .spec{margin:0;font-size:.62rem}
.g-msg{margin:0;max-width:440px;font-size:1.05rem;font-weight:500}
.g-me{margin-top:6px}
.g-me .g-pond{min-height:30px}
.g-hand{display:flex;flex-wrap:wrap;justify-content:center;gap:5px;margin:18px 0 8px;padding-top:12px}
.gh{width:clamp(40px,5.4vw,60px);padding:0;margin:0;border:0;background:none;cursor:pointer;border-radius:6px;transition:transform .18s ease;position:relative}
.gh svg{display:block;width:100%;height:auto}
.gh:disabled{cursor:default}
.gh:not(:disabled):hover{transform:translateY(-4px)}
.gh.is-sel,.gh.is-sel:hover{transform:translateY(-12px)}
.gh.is-new{margin-left:16px}
.gh.is-hint::after{content:"";position:absolute;left:22%;right:22%;bottom:-9px;height:3px;border-radius:2px;background:var(--gold)}
.g-actions{min-height:66px;display:flex;flex-direction:column;align-items:center;justify-content:center;margin-top:10px}
.g-btns{display:flex;flex-wrap:wrap;justify-content:center;gap:10px}
.g-btns .btn{cursor:pointer;font-family:Manrope,Arial,sans-serif;display:inline-flex;align-items:center;gap:8px}
.g-btns .btn:disabled{opacity:.45;cursor:default;background:var(--jade)}
.g-btns .btn.is-rec{box-shadow:0 0 0 2px var(--ivory),0 0 0 4px var(--gold)}
.g-btns .g-win{background:#9B5148;border-color:#9B5148;font-size:.8rem;padding:18px 30px}
.g-btns .g-win:hover{background:var(--coral);border-color:var(--coral)}
.g-chow .gt-xs{width:15px}
.g-ask{margin:0 0 10px;font-weight:600}
.g-wait{margin:0}
.g-coach{text-align:center;max-width:620px;margin:12px auto 0;min-height:1.85em}
.g-coach .eyebrow{margin-right:6px}
.g-over{display:flex;justify-content:center;padding:clamp(24px,5vw,60px) 0 10px;animation:cc-rise .6s cubic-bezier(.2,.7,.2,1) both;outline:none}
.g-over-panel{max-width:640px;width:100%;text-align:center}
.g-over h2{margin:.1em 0 .2em}
.g-win-hand{display:flex;flex-wrap:wrap;justify-content:center;gap:8px 12px;margin:22px 0}
.g-faan{list-style:none;padding:0;margin:0 auto 10px;max-width:460px;text-align:left}
.g-faan li{display:flex;justify-content:space-between;gap:16px;padding:10px 0;border-top:1px solid rgba(23,61,50,.17)}
.g-faan .g-total{font-weight:600;border-top:1px solid var(--jade)}
.g-rule{font-size:.9rem;margin:6px 0 18px}
.g-scores{border-collapse:collapse;margin:10px auto 0;min-width:280px}
.g-scores th,.g-scores td{padding:8px 14px;text-align:left;border-top:1px solid rgba(23,61,50,.17)}
.g-scores thead th{font-size:.68rem;letter-spacing:.14em;text-transform:uppercase;color:#8A6F5D;border-top:0}
.g-scores td{text-align:right}
.g-scores .is-you th,.g-scores .is-you td{font-weight:600}
.g-over .actions .btn{cursor:pointer;font-family:Manrope,Arial,sans-serif}
.g-record{margin:0}
.g-club{font-size:.95rem}
@media(max-width:820px){
  .g-opps{grid-template-columns:1fr;gap:0}
  .g-seat{display:grid;grid-template-columns:118px 1fr;column-gap:12px;padding:10px 0}
  .g-seat .g-head{grid-column:1;grid-row:1 / span 3;flex-direction:column;align-items:flex-start;gap:0}
  .g-seat .g-backs,.g-seat .g-melds,.g-seat .g-pond{grid-column:2}
  .g-seat .g-backs{margin-top:2px}
  .g-seat .g-pond{min-height:0}
  .gt-s{width:21px}
  .g-centre{min-height:84px;padding:10px 0}
  .gt-l{width:46px}
}
@media(max-width:560px){
  .play{padding-top:128px}
  .g-hand{gap:4px}
  .gh{width:calc((100% - 24px) / 7);max-width:52px}
  .gh.is-new{margin-left:0;box-shadow:0 0 0 2px var(--gold)}
  .g-seat{grid-template-columns:92px 1fr}
  .g-btns .btn{padding:15px 18px}
}
@media(prefers-reduced-motion:reduce){.gt.is-latest,.g-over{animation:none}.gh,.g-seat::before,.g-me::before{transition:none}}
@media(max-width:560px){
  header{display:block;padding:20px 20px 0}
  .header-note{display:flex;flex-wrap:wrap;gap:0 16px;margin-top:4px}
  .header-note a{margin-left:0;font-size:.66rem;letter-spacing:.1em;padding:10px 0}
  .play{padding-top:118px}
}

/* American mahjong additions */
.g-alt{margin-top:22px;font-size:.95rem}
.gt.is-need{opacity:.32;filter:grayscale(.4)}
.gh.is-in{box-shadow:0 0 0 2px var(--gold)}
.am-target{text-align:center;margin:14px auto 0;max-width:760px;padding-top:14px;border-top:1px solid rgba(23,61,50,.12)}
.am-target .spec{margin:0 0 10px}
.am-target strong{font-family:'Bodoni Moda',Georgia,serif;font-size:1.05rem;font-weight:500;letter-spacing:0;text-transform:none;color:var(--jade)}
.am-target-tiles{display:flex;flex-wrap:wrap;justify-content:center;gap:6px 10px}
.am-card{margin-top:26px;border-top:1px solid rgba(23,61,50,.17);padding-top:8px}
.am-card summary{cursor:pointer;font-size:.72rem;font-weight:600;letter-spacing:.14em;text-transform:uppercase;padding:12px 0}
.am-sec{margin:22px 0 6px;color:#9B5148}
.am-lines{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:1fr 1fr;column-gap:30px}
.am-lines li{display:flex;flex-direction:column;gap:6px;padding:12px 0;border-top:1px solid rgba(23,61,50,.1)}
.am-lines p{margin:0;line-height:1.5}
.am-line-tiles{display:flex;flex-wrap:wrap;gap:4px 8px}
.am-line-tiles .gt-xs{width:17px}
@media(max-width:720px){.am-lines{grid-template-columns:1fr}}
.section-quiet{padding-top:clamp(50px,7vw,90px);padding-bottom:clamp(50px,7vw,90px);border-top:1px solid rgba(23,61,50,.12)}
.section-quiet h3{font-size:clamp(1.7rem,3vw,2.3rem)}
.region-links{display:flex;flex-wrap:wrap;gap:4px 22px;margin:6px 0 10px}
.region-links a{font-family:'Bodoni Moda',Georgia,serif;font-size:1.35rem;text-decoration:none;padding:6px 0}
.region-links a:hover{text-decoration:underline;text-underline-offset:5px;text-decoration-thickness:1px}

/* ---------- Lessons ---------- */
.lesson{min-height:340px}
.ls-progress{display:flex;justify-content:center;gap:5px;margin:18px 0 6px}
.ls-progress span{width:28px;height:2px;background:rgba(23,61,50,.18);transition:background .3s ease}
.ls-progress .is-on{background:var(--jade)}
.ls-progress .is-done{background:var(--gold)}
.ls-count{margin:0 0 6px}
.ls-text{font-size:1.15rem;max-width:560px;margin:8px auto 20px;line-height:1.7}
.ls-groups{display:flex;flex-wrap:wrap;justify-content:center;gap:14px 22px;margin:6px 0 10px}
.ls-group{display:flex;flex-direction:column;align-items:center}
.ls-tiles{display:flex;gap:4px}
.ls-tile{width:clamp(38px,6vw,54px);padding:0;border:0;background:none;display:block;border-radius:6px}
.is-fresh .ls-tile{animation:ls-in .5s cubic-bezier(.2,.7,.2,1) both}
.ls-tile svg{display:block;width:100%;height:auto}
button.ls-tile{cursor:pointer;transition:transform .18s ease,box-shadow .2s ease}
button.ls-tile:hover{transform:translateY(-5px)}
.ls-tile.is-wrong{box-shadow:0 0 0 2px var(--coral)}
.ls-label{margin:8px 0 0;font-size:.64rem}
.is-small .ls-tile{width:clamp(26px,4vw,34px)}
.is-small{gap:6px 10px;margin:0}
@keyframes ls-in{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
.ls-options{display:flex;flex-wrap:wrap;justify-content:center;gap:12px;margin:10px 0}
.ls-option{font:inherit;font-weight:600;color:var(--jade);background:transparent;border:1px solid rgba(23,61,50,.35);border-radius:2px;padding:14px 18px;cursor:pointer;display:flex;flex-direction:column;align-items:center;gap:8px;min-width:120px;transition:border-color .2s ease,background .2s ease}
.ls-option:hover{border-color:var(--jade);background:rgba(23,61,50,.04)}
.ls-option.is-wrong{border-color:var(--coral)}
.ls-option.is-right{border-color:var(--gold);box-shadow:0 0 0 1px var(--gold)}
.ls-option:disabled{cursor:default}
.ls-feedback{min-height:1.85em;max-width:560px;margin:12px auto;font-weight:500}
.ls-feedback.is-good{color:var(--jade)}
.ls-feedback.is-good::before{content:"";display:inline-block;width:18px;height:1px;background:var(--gold);vertical-align:middle;margin-right:10px}
.ls-feedback.is-bad{color:#9B5148}
.ls-controls{display:flex;justify-content:center;align-items:center;gap:6px 18px;margin-top:8px}
.ls-controls .tut-next:disabled{opacity:.45;cursor:default}
.ls-done{padding:20px 0;animation:cc-rise .7s cubic-bezier(.2,.7,.2,1) both}
.ls-done h3{font-size:clamp(1.8rem,4vw,2.6rem);margin:0}
.ls-tick{display:none;color:var(--jade);font-weight:600}
.ls-card.is-done .ls-tick{display:inline}
.ls-card.is-done strong::after{content:" ✓";color:var(--gold)}
.ls-nav{display:grid;grid-template-columns:1fr 1fr;gap:2px 30px;margin-top:14px}
.ls-nav a{text-decoration:none;padding:9px 0;border-top:1px solid rgba(23,61,50,.12)}
.ls-nav a[aria-current="page"]{font-weight:600}
.ls-nav a:hover{text-decoration:underline;text-underline-offset:5px}
@media(max-width:720px){.ls-nav{grid-template-columns:1fr}.ls-text{font-size:1.05rem}}
@media(prefers-reduced-motion:reduce){.ls-tile,.ls-done{animation:none}}

/* Tutorial: the wall and your hand are labelled, so a drawn tile is seen leaving the wall. */
.tut-wall{position:absolute;left:0;right:0;top:4px;display:flex;flex-direction:column;align-items:center;gap:6px;pointer-events:none}
.tut-wall .spec,.tut-hand .spec{margin:0;font-size:.62rem;letter-spacing:.16em}
.tut-wall-row{display:flex;gap:3px;padding:6px 10px;border-bottom:1px solid rgba(23,61,50,.15)}
.tut-wall-row i{display:block;border-radius:3px;background:linear-gradient(160deg,#2B6352,#173D32);box-shadow:inset 0 0 0 1px rgba(198,160,100,.55),1px 2px 0 #102B23;transition:opacity .5s ease,transform .5s ease}
.tut-wall-row i.is-gone{opacity:0;transform:translateY(8px)}
.tut-hand{position:absolute;left:0;right:0;border-radius:6px;background:rgba(23,61,50,.05);border:1px solid rgba(23,61,50,.12);pointer-events:none;transition:top .5s ease,height .5s ease}
.tut-hand .spec{position:absolute;left:12px;top:8px;color:#8A6F5D}
.tut-glabel{position:absolute;margin:0;text-align:center;font-size:.6rem;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:#9B5148;white-space:nowrap;opacity:0;transition:opacity .5s ease;pointer-events:none}
.tut-glabel.is-in{opacity:1}
@media(prefers-reduced-motion:reduce){.tut-wall-row i,.tut-hand{transition:none}}
.tut-round{margin:14px 0 0;color:#9B5148;font-weight:600}

/* ---------- Game feel: the table, tiles in motion, the winning reveal ---------- */
.g-table{display:grid;grid-template-columns:repeat(3,1fr);gap:clamp(12px,2.4vw,30px);margin-top:14px}
.g-table .g-centre{grid-column:1/-1}
.g-wallcount{display:none}
@media(min-width:1000px){
  .g-table{grid-template-columns:1fr 1.15fr 1fr;grid-template-areas:". top ." "left mid right";align-items:start;row-gap:18px}
  .g-table .is-seat2{grid-area:top}
  .g-table .is-seat3{grid-area:left}
  .g-table .is-seat1{grid-area:right}
  .g-table .g-centre{grid-area:mid;grid-column:auto;flex-direction:column;justify-content:center;text-align:center;margin:0;min-height:240px;padding:22px;border:1px solid rgba(198,160,100,.55);border-radius:4px;background:radial-gradient(ellipse at center,rgba(139,159,131,.18),rgba(23,61,50,.04) 70%)}
  .g-table .g-msg{text-align:center}
  .g-wallcount{display:block;margin:0;font-size:.62rem}
}
@media(max-width:820px){.g-table{grid-template-columns:1fr;gap:0}}
.gh.is-drawn{animation:g-draw .55s cubic-bezier(.2,.7,.2,1) both}
@keyframes g-draw{from{opacity:0;transform:translateY(-34px) rotate(-4deg)}to{opacity:1;transform:none}}
.g-fly svg{display:block;width:100%;height:auto;filter:drop-shadow(0 6px 10px rgba(23,61,50,.18))}
.g-win-hand .gt{animation:g-flip .55s cubic-bezier(.2,.7,.2,1) both}
@keyframes g-flip{from{opacity:0;transform:perspective(500px) rotateY(80deg) translateY(6px)}to{opacity:1;transform:none}}
.g-win-hand .g-meld{position:relative;padding-bottom:9px}
.g-win-hand .g-meld::after{content:"";position:absolute;left:0;right:0;bottom:0;height:1px;background:var(--gold);transform:scaleX(0);transform-origin:left;animation:cc-line .6s cubic-bezier(.2,.7,.2,1) forwards;animation-delay:var(--d,0s)}
.g-over .g-faan li{animation:cc-rise .6s cubic-bezier(.2,.7,.2,1) both}
@media(prefers-reduced-motion:reduce){.gh.is-drawn,.g-win-hand .gt,.g-over .g-faan li{animation:none}.g-win-hand .g-meld::after{animation:none;transform:none}}

/* After-hand review */
.g-review{text-align:left;max-width:560px;margin:26px auto 22px;padding:20px 0 4px;border-top:1px solid rgba(23,61,50,.17)}
.g-review > p{margin:6px 0}
.g-review ul{list-style:none;margin:12px 0 0;padding:0}
.g-review li{display:flex;gap:18px;align-items:center;padding:14px 0;border-top:1px solid rgba(23,61,50,.1)}
.g-review li p{margin:0;line-height:1.6}
.g-rv-tiles{display:flex;align-items:center;gap:10px;flex:none}
.g-rv-col{display:flex;flex-direction:column;align-items:center;gap:4px}
.g-rv-col .spec{margin:0;font-size:.58rem}
.g-rv-arrow{color:var(--gold);font-size:1.1rem}
.g-rv-word{display:inline-block;min-width:58px;text-align:center;font-size:.7rem;font-weight:600;letter-spacing:.1em;text-transform:uppercase;padding:10px 6px;border:1px solid rgba(23,61,50,.25);border-radius:2px}
@media(max-width:480px){.g-review li{flex-direction:column;align-items:flex-start;gap:8px}}
.g-undo{cursor:pointer;font-family:Manrope,Arial,sans-serif;margin:4px 0 8px}
.gh.is-spare{margin-left:22px}
.gh.is-spare::before{content:"Spare";position:absolute;top:-18px;left:0;font-size:.56rem;font-weight:600;letter-spacing:.12em;text-transform:uppercase;color:#8A6F5D}
@media(max-width:560px){.gh.is-spare{margin-left:0}.gh.is-spare::before{display:none}}
.g-levelup{max-width:520px;margin:22px auto 0;padding:18px 20px;border:1px solid rgba(198,160,100,.6);border-radius:4px;background:rgba(198,160,100,.08)}
.g-levelup p{margin:4px 0 12px}
.g-levelup .btn{cursor:pointer;font-family:Manrope,Arial,sans-serif}

/* ---------- Header: a calm band so the logo and menu never sit on busy artwork ---------- */
.site-header{position:fixed;top:0;left:0;right:0;z-index:20;padding:12px clamp(20px,5vw,90px);background:rgba(247,240,227,.86);-webkit-backdrop-filter:blur(12px) saturate(1.1);backdrop-filter:blur(12px) saturate(1.1);border-bottom:1px solid rgba(198,160,100,.35);transition:background .3s ease,box-shadow .3s ease}
.site-header.is-scrolled{background:rgba(247,240,227,.95);box-shadow:0 6px 24px rgba(23,61,50,.06)}
.brand{display:inline-flex;align-items:center;gap:12px}
.brand-mark{width:54px;height:48px;display:block}
.site-header .brand{font-size:clamp(1.35rem,2.2vw,1.8rem)}
.site-header .header-note a{padding:10px 0}
.footer .brand{display:block}
@media(max-width:560px){
  .site-header{padding:10px 16px 4px}
  .brand-mark{width:40px;height:36px}
  .brand{gap:9px}
  .header-note{margin-top:2px}
}
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){.site-header{background:rgba(247,240,227,.97)}}

/* Tapping the wall to draw */
.tut-wall.is-asking{pointer-events:auto;cursor:pointer}
.tut-wall.is-asking .spec{color:#9B5148;font-weight:700}
.tut-wall.is-asking .spec::after{content:" · tap to draw"}
.tut-wall-row i.is-pick{transform:translateY(-6px);box-shadow:inset 0 0 0 1px rgba(198,160,100,.9),0 0 0 2px var(--gold),1px 2px 0 #102B23;animation:tut-pick 1.6s ease-in-out infinite}
@keyframes tut-pick{0%,100%{transform:translateY(-6px)}50%{transform:translateY(-2px)}}
.tut-wall.is-asking:focus-visible{outline:2px solid var(--jade);outline-offset:4px}
@media(prefers-reduced-motion:reduce){.tut-wall-row i.is-pick{animation:none}}
html{scroll-padding-top:96px}
@media(max-width:560px){html{scroll-padding-top:104px}}

/* Daily hand */
.dl-tiles{flex-wrap:wrap;justify-content:center;gap:3px}
.dl-hand .ls-tile{width:clamp(30px,6vw,48px)}
.dl-options{margin-top:18px}
.dl-option{min-width:0;padding:10px}
.dl-option svg{display:block;width:clamp(48px,11vw,62px);height:auto}
.dl-option:disabled{opacity:.4}
.dl-win .ls-tile{width:clamp(30px,5.4vw,46px)}
.ls-tile.is-win{border-radius:5px;box-shadow:0 0 0 2px var(--gold)}
.dl-stats{display:flex;justify-content:center;gap:clamp(18px,5vw,48px);margin:10px 0 4px}
.dl-stats div{display:flex;flex-direction:column;align-items:center}
.dl-stats strong{font-family:'Bodoni Moda',Georgia,serif;font-size:2rem;font-weight:500;line-height:1.2}
.dl-stats .spec{margin:0;font-size:.6rem}
.daily .actions .btn{cursor:pointer;font-family:Manrope,Arial,sans-serif}
.dl-copied{min-height:1.4em;margin:0}
@media(max-width:560px){.dl-options{gap:8px;flex-wrap:nowrap}.dl-option{padding:7px}.dl-option svg{width:clamp(40px,14vw,56px)}}

/* ---------- Header offset: artwork starts below the header bar, so nothing is hidden ---------- */
:root{--hdr:73px}
@media(max-width:560px){:root{--hdr:92px}}
body{padding-top:var(--hdr)}
.hero{padding-top:70px}
.hero-page{padding-top:80px}
.play{padding-top:28px}
@media(max-width:560px){.play{padding-top:22px}.hero{padding-top:56px}}

/* Homepage hero: the word Mahjong, and the game, first */
.hero-home{min-height:100svh;min-height:calc(100svh - var(--hdr));padding-bottom:110px}
.hero-home h1{font-size:clamp(4.2rem,11vw,9.5rem)}
.hero-hand{display:block;max-width:760px;margin:6px auto 0;text-decoration:none}
.hero-hand svg{display:block;width:100%;height:auto;filter:drop-shadow(0 10px 18px rgba(23,61,50,.10))}
.hero-hand .spec{display:block;margin-top:10px;font-size:.66rem}
.hero-hand:hover .hh-t{transform:translateY(-3px)}
.hh-t{animation:cc-rise .6s cubic-bezier(.2,.7,.2,1) both;transition:transform .25s ease}
.hero-home .spec a{color:inherit}
@media(max-width:560px){.hero-home{padding-bottom:80px}.hero-home h1{margin:.1em 0}}
@media(prefers-reduced-motion:reduce){.hh-t{animation:none}}
/* Small text over the artwork gets a soft paper halo so it stays legible. */
.hero .eyebrow,.hero .spec,.hero-hand .spec{text-shadow:0 0 10px rgba(247,240,227,.95),0 0 3px rgba(247,240,227,.9)}

/* ---------- Phones: the whole game on one screen ---------- */
.g-home,.g-settings-btn,.g-short,.g-count{display:none}
@media(max-width:700px){
  body.is-playing{padding-top:0}
  body.is-playing .site-header{display:none}
  body.is-playing .play{padding:0;background:var(--ivory)}
  body.is-playing .play-panel{padding:6px 10px 10px;background:var(--ivory)}
  .game{min-height:0}
  .g-top{flex-wrap:nowrap;gap:10px;padding-bottom:6px;align-items:center}
  .g-home{display:block;flex:none}
  .g-home img{display:block;width:34px;height:30px}
  .g-info{flex:1;font-size:.6rem;letter-spacing:.06em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .g-long{display:none}.g-short{display:inline}
  .g-settings-btn{display:inline-block;flex:none;font-size:.62rem;padding:6px 0}
  .g-toggles{display:none}
  .show-settings .g-toggles{display:flex;position:absolute;top:42px;left:0;right:0;z-index:15;background:var(--ivory);border:1px solid rgba(23,61,50,.15);border-radius:4px;padding:6px 14px;gap:2px 16px;box-shadow:0 10px 24px rgba(23,61,50,.12)}
  /* opponents: one compact row */
  .g-table{grid-template-columns:repeat(3,1fr);gap:8px;margin-top:6px}
  .g-table .g-seat{display:block;padding:6px 0 0;min-height:0}
  .g-seat .g-head{flex-direction:row;align-items:baseline;gap:4px;flex-wrap:wrap}
  .g-seat .g-head strong{font-size:1rem}
  .g-seat .g-wind{font-size:.8rem}
  .g-seat .g-place,.g-seat .g-think{display:none}
  .g-seat .g-count{display:block;width:100%;margin:0;font-size:.56rem}
  .g-seat .g-backs{display:none}
  .g-seat .g-melds{margin:4px 0 0;gap:3px 5px}
  .g-seat .g-melds .gt-s{width:12px}
  .g-pond{gap:2px;margin-top:4px;min-height:0}
  .g-pond .gt-s{width:16px}
  .g-pond .gt:nth-last-child(n+7){display:none}
  .g-empty{font-size:.52rem}
  /* the table */
  .g-table .g-centre{min-height:0;padding:6px 0;margin-top:4px;gap:12px}
  .gt-l{width:38px}
  .g-last .spec{font-size:.5rem}
  .g-msg{font-size:.88rem;line-height:1.45}
  /* you */
  .g-me{margin-top:2px;padding-top:6px}
  .g-me .g-head strong{font-size:1.05rem}
  .g-me .g-head .spec{font-size:.58rem}
  .g-me .g-pond{display:inline-flex;vertical-align:top;margin-top:4px}
  .g-melds-me{display:inline-flex;margin:4px 0 0 8px}
  .g-melds-me .gt-m{width:20px}
  .g-hand{margin:10px 0 4px;padding-top:10px;gap:4px}
  .gh{width:calc((100% - 24px) / 7);max-width:50px}
  .gh.is-sel,.gh.is-sel:hover{transform:translateY(-8px)}
  .g-actions{min-height:0;margin-top:4px}
  .g-btns{gap:8px}
  .g-btns .btn{padding:13px 16px;font-size:.66rem}
  .g-ask{margin:0 0 6px;font-size:.88rem}
  .g-coach{font-size:.84rem;line-height:1.45;margin-top:6px;min-height:0}
  .g-coach .eyebrow{font-size:.58rem}
  .am-target{margin-top:6px;padding-top:6px}
  .am-target .gt-s{width:17px}
  .am-target .spec{font-size:.56rem;margin-bottom:4px}
  .am-card{margin-top:12px}
  .gh.is-spare::before{display:none}
}
.g-explain{margin:0 auto 10px;max-width:560px;font-size:.92rem;line-height:1.55;color:#53685C;text-align:center}
.gh.is-use{transform:translateY(-10px);box-shadow:0 0 0 2px var(--gold)}
@media(max-width:700px){.g-explain{font-size:.8rem;margin-bottom:6px}.gh.is-use{transform:translateY(-7px)}}
.hero-lede{max-width:520px;margin:0 auto 18px !important;font-size:1.1rem}
.tut-tabs{display:inline-flex;margin:14px auto 0;border:1px solid rgba(23,61,50,.3);border-radius:2px;overflow:hidden}
.tut-tab{font:inherit;font-size:.68rem;font-weight:600;letter-spacing:.12em;text-transform:uppercase;padding:11px 16px;border:0;background:transparent;color:var(--jade);cursor:pointer}
.tut-tab[aria-selected="true"]{background:var(--jade);color:var(--ivory)}
.tut-tab:focus-visible{outline:2px solid var(--gold);outline-offset:-4px}
@media(max-width:400px){.tut-tab{padding:10px 11px;font-size:.62rem}}
/* Phones: instruction above the tiles, Back/Next always in reach while the tutorial is on screen */
.tut[hidden]{display:none !important}
@media(max-width:700px){
  .tut{display:flex;flex-direction:column}
  .tut-round{order:0;margin-top:10px}
  .tut-caption{order:1;min-height:4.8em;margin:4px auto 6px;font-size:1rem;line-height:1.6}
  .tut-stage{order:2}
  .tut-win{order:3}
  .tut-dots{order:4;margin:6px 0 4px}
  .tut-controls{order:5;position:sticky;bottom:0;z-index:6;margin:0 -20px;padding:10px 20px calc(10px + env(safe-area-inset-bottom));background:rgba(247,240,227,.97);box-shadow:0 -8px 18px rgba(23,61,50,.06)}
  .tut-end{order:6}
}
/* Phones: the whole tutorial on one screen */
@media(max-width:700px){
  .tutorial{padding:28px 6px 40px}
  .tutorial-panel{padding:20px 12px 0}
  .tut-tabs{margin-top:8px}
  .tut-tab{padding:10px 12px}
  .tut-round{margin:8px 0 0;font-size:.66rem}
  .tut-caption{min-height:4.8em;font-size:.97rem;line-height:1.6;margin:2px auto 4px}
  .tut-stage{margin-top:0;width:100%}
  .tut-wall{flex-direction:row;justify-content:center;gap:8px;top:2px}
  .tut-wall .spec{white-space:nowrap}
  .tut-wall-row{padding:4px 6px;gap:2px}
  .tut-pool{font-size:.58rem;letter-spacing:.06em}
  .tut-hand .spec{top:6px;left:10px;font-size:.56rem}
  .tut-glabel{font-size:.52rem;letter-spacing:.05em}
  .tut-dots{gap:4px;margin:2px 0 0}
  .tut-controls{margin:0 -12px;padding:8px 12px calc(8px + env(safe-area-inset-bottom))}
  .tut-next{min-height:46px}
}
/* Phones: the game fills the screen, table at the top, your tiles at the bottom where your thumb is */
@media(max-width:700px){
  body.is-playing .game{min-height:calc(100svh - 16px);min-height:calc(100dvh - 16px);display:flex;flex-direction:column}
  body.is-playing .g-table{flex:1;align-content:start}
  body.is-playing .g-centre{align-self:center}
  body.is-playing .g-me{padding-bottom:env(safe-area-inset-bottom)}
  .g-hand{row-gap:12px;padding-top:14px}
  .g-actions{margin-top:16px}
  .g-coach{margin-top:10px}
}

/* ---------- Homepage artwork in layers: the crane turns its head, the flowers sway ---------- */
.hero-home{position:relative;isolation:isolate;background-image:none}
.art-stage{position:absolute;inset:0;overflow:hidden;container-type:size;z-index:-1;pointer-events:none}
.art-stage::after{content:"";position:absolute;inset:0;background:linear-gradient(to bottom,rgba(247,240,227,.05) 0%,rgba(247,240,227,0) 72%,var(--ivory) 100%)}
.art{position:absolute;left:50%;top:0;width:max(100cqw,66.6667cqh);aspect-ratio:2/3;transform:translateX(-50%);background:url('/art/base.webp') 0 0/100% 100% no-repeat}
.ap{position:absolute;display:block;height:auto;max-width:none;will-change:transform;animation:cc-sway var(--d,7s) ease-in-out var(--dl,0s) infinite alternate}
@keyframes cc-sway{from{transform:rotate(calc(var(--a,1deg) * -1))}to{transform:rotate(var(--a,1deg))}}
.ap-crane-head{animation:cc-head 9s ease-in-out .4s infinite}
@keyframes cc-head{0%,4%{transform:rotate(0)}11%,25%{transform:rotate(-11deg)}31%{transform:rotate(3deg)}37%,46%{transform:rotate(0)}52%,58%{transform:rotate(-5deg)}64%,100%{transform:rotate(0)}}
@media(prefers-reduced-motion:reduce){.ap{animation:none}}
@supports not (width:1cqw){.art-stage{display:none}.hero-home{background-image:url('/artwork.webp')}}
h1.h2{font-weight:500;letter-spacing:-.035em;font-size:clamp(2.5rem,5vw,4.8rem);line-height:1.12;margin:.15em 0 .35em}
/* What to do next: one line above your tiles */
.g-prompt{margin:12px 0 0;text-align:center;font-size:.92rem;line-height:1.45;color:#53685C;min-height:1.45em}
.g-prompt.is-you{color:var(--jade);font-weight:600}
.g-prompt.is-you::before{content:"";display:inline-block;width:7px;height:7px;border-radius:50%;background:var(--gold);margin-right:9px;vertical-align:2px;animation:cc-pulse 1.6s ease-in-out infinite}
@keyframes cc-pulse{0%,100%{opacity:1;transform:scale(1)}50%{opacity:.35;transform:scale(.65)}}
@media(prefers-reduced-motion:reduce){.g-prompt.is-you::before{animation:none}}
@media(max-width:700px){.g-prompt{margin-top:8px;font-size:.82rem}}
/* Small tile pictures inside sentences (coach tips, table messages) */
.gt.gt-in{display:inline-block;width:1.25em;vertical-align:-.42em;margin:0 .12em}
.gt.gt-in svg{display:block;width:100%;height:auto}
.btn .gt-xs{display:inline-block;width:18px;vertical-align:-6px;margin-left:6px}

/* The artwork sits a touch smaller and softer behind the title, so the words read clearly */
.hero-home{background-color:#F9EBD7}
.art{width:calc(max(100cqw,66.6667cqh) * .93);-webkit-mask-image:linear-gradient(to right,transparent,#000 3%,#000 97%,transparent);mask-image:linear-gradient(to right,transparent,#000 3%,#000 97%,transparent)}
.art-stage::before{content:"";position:absolute;left:50%;top:38%;width:min(900px,120vw);height:min(560px,70%);transform:translate(-50%,-50%);background:radial-gradient(closest-side,rgba(247,240,227,.62),rgba(247,240,227,.3) 60%,rgba(247,240,227,0));z-index:1}
/* Tile guide (in the game) */
.g-tiles-btn{margin-left:auto}
.g-guide{position:fixed;inset:0;z-index:40;background:rgba(23,61,50,.35);display:flex;align-items:flex-start;justify-content:center;padding:4vh 12px;overflow-y:auto}
.g-guide-panel{background:var(--ivory);max-width:720px;width:100%;padding:22px clamp(16px,4vw,36px) 28px;border-radius:4px;box-shadow:0 20px 50px rgba(23,61,50,.2);text-align:left}
.g-guide-top{display:flex;justify-content:space-between;align-items:center}
.g-guide-top .eyebrow{margin:0}
.g-guide-lead{margin:8px 0 6px;font-size:.92rem;color:#53685C;line-height:1.6}
.g-guide-row{padding:14px 0;border-top:1px solid rgba(23,61,50,.12)}
.g-guide-row h3{font-size:1.25rem;margin:0}
.g-guide-row p{margin:2px 0 10px;font-size:.88rem;line-height:1.55}
.g-guide-tiles{display:flex;flex-wrap:wrap;gap:8px 6px}
.g-guide-t{display:flex;flex-direction:column;align-items:center;gap:4px}
.g-guide-t .spec{font-size:.58rem;margin:0}
@media(max-width:700px){.g-guide-t .gt-m{width:30px}.g-guide-row{padding:10px 0}}
@media(max-width:700px){.g-tiles-btn{flex:none;font-size:.62rem;padding:6px 0;margin-left:0}}
.g-tiles-btn{margin-right:16px}
/* The Clatter Card, written the way card players read it */
.nt-a{color:#2F6F4E}.nt-b{color:#B9483D}.nt-c{color:#34648C}.nt-x{color:#263B32}
.am-key{font-size:.86rem;line-height:1.55;border:1px solid rgba(23,61,50,.15);border-radius:4px;padding:10px 14px;margin:10px 0 6px;background:rgba(255,255,255,.35)}
.am-key p{margin:0 0 4px}.am-key ul{margin:0;padding-left:18px}.am-key li{margin:3px 0}
.am-row{display:flex;align-items:baseline;justify-content:space-between;gap:12px}
.am-note{margin:0;font-family:'Bodoni Moda',Georgia,serif;font-weight:600;font-size:1.25rem;letter-spacing:.06em;white-space:nowrap;overflow-x:auto}
.am-xc{flex:none;font-size:.72rem;font-weight:600;letter-spacing:.1em;color:#8A6F5D}
.am-name{margin:2px 0 4px;font-size:.84rem;line-height:1.45}
@media(max-width:700px){.am-note{font-size:1.02rem;letter-spacing:.03em}}
/* Labels for what's face up under each player */
.g-rowlabel{display:inline-block;margin:0 6px 0 0;font-size:.56rem;letter-spacing:.1em;vertical-align:middle;color:#8A6F5D}
.g-melds .g-rowlabel,.g-pond .g-rowlabel{line-height:1}
@media(max-width:700px){.g-rowlabel{font-size:.5rem;margin-right:4px}}
/* Phones: seat the players as they sit at the table (left, opposite, right) and say so */
@media(max-width:700px){
  .g-table .is-seat3{order:1}.g-table .is-seat2{order:2}.g-table .is-seat1{order:3}.g-table .g-centre{order:4}
  .g-seat .g-place{display:block;width:100%;margin:1px 0 0;font-size:.5rem;letter-spacing:.08em;color:#9B5148}
  .g-seat .g-head{flex-wrap:wrap}
}
.g-cardnote{font-size:.92rem;color:#53685C;max-width:560px;margin:0 auto 14px}
/* Phones: face-up tiles big enough to read */
@media(max-width:700px){
  .g-seat .g-melds .gt-s{width:21px}
  .g-pond .gt-s{width:24px}
  .g-seat .g-pond,.g-seat .g-melds{flex-wrap:wrap}
  .g-seat .g-rowlabel{display:block;width:100%;margin:0 0 2px}
  .g-me .g-pond .gt-s{width:26px}
}
/* Guides */
.gd-rules{margin-top:26px}
.gd-rules .rule strong a{color:inherit;text-decoration:none;border-bottom:1px solid rgba(198,160,100,.6)}
.gd-note{margin:18px 0 6px;font-size:1.7rem}
.gd-table{width:100%;max-width:720px;border-collapse:collapse;margin:26px 0 10px;font-size:.95rem}
.gd-table th,.gd-table td{text-align:left;padding:10px 8px;border-bottom:1px solid rgba(23,61,50,.14)}
.gd-table th{font-size:.68rem;letter-spacing:.14em;text-transform:uppercase;color:#8A6F5D;font-weight:600}
.gd-table td:last-child,.gd-table th:last-child{text-align:right;width:70px}
.gd-more{list-style:none;padding:0;margin:20px 0 0;display:flex;flex-wrap:wrap;gap:12px 28px}
.gd-more a{color:var(--jade);font-weight:600}
@media(max-width:700px){.gd-note{font-size:1.25rem}}
/* Only the tile just thrown can be taken: older discards fade, the takeable one glows */
.g-pond .gt-s:not(.is-latest){opacity:.62}
.g-last.is-takeable .gt{box-shadow:0 0 0 3px var(--gold),0 0 18px rgba(198,160,100,.55);border-radius:6px;animation:cc-take 1.4s ease-in-out infinite}
.g-last.is-takeable .spec{color:#9B5148;font-weight:700}
@keyframes cc-take{0%,100%{transform:translateY(0)}50%{transform:translateY(-4px)}}
@media(prefers-reduced-motion:reduce){.g-last.is-takeable .gt{animation:none}}
