/* PILEHEAD // SEAT VIEW
   A first-person tabletop, not a grid of dashboards.
   The local player sits at the near rail; opponents sit across the far rail.
   Preserves the core .card and data-* contracts shared by local and online modes. */

:root {
  --table-wood:#3b2b21;
  --table-wood-lit:#69503a;
  --table-felt:#10493b;
  --table-felt-dark:#092d27;
  --table-stitch:#cab07e;
  --table-ivory:#f4ead2;
  --table-ink:#25352e;
  --table-shadow:#071713;
  --table-red:#d86a44;
  --table-gold:#f0c887;
  --card-w:94px;
  --card-h:132px;
  --card-radius:9px;
  --seat-focus:rgba(243,198,119,.72);
}
html{background:#171a16}
body {
  min-height:100svh;
  background:
    radial-gradient(ellipse at 50% 0%,#514037 0%,#25231e 62%,#171c19 100%);
  color:#f4ecd7;
}
body:before {
  content:"";position:fixed;inset:0;pointer-events:none;z-index:0;
  background:repeating-linear-gradient(95deg,transparent 0 68px,#00000006 69px 71px,transparent 72px 144px);
  opacity:.38;
}
body>.layout{position:relative;z-index:1}
.layout{max-width:1600px;padding:clamp(8px,1.8vw,22px) clamp(7px,1.4vw,24px) 38px}
.top {
  padding:6px clamp(6px,1.1vw,16px) 12px;
  margin-bottom:2px;
  align-items:center;
  border-bottom:1px solid #e9c99327;
}
.eyebrow{color:#e4b983;font-size:10px;letter-spacing:.15em}
.brand{font:900 clamp(23px,3vw,34px)/1 Georgia,serif;letter-spacing:-.04em}
.brand b{color:#ed9b66}
.links{gap:8px}
.links a,.links button{
  background:#261f1b90;border:1px solid #d5ba8961;color:#f2e5ca;
  padding:8px 13px;border-radius:999px;font-weight:750;
  transition:background .18s,border-color .18s;
}
.links a:hover,.links button:hover{background:#554133;border-color:#e8c48b}
body.pilehead-online #new{display:none}
.links .sound-toggle{display:flex;align-items:center;gap:7px}
.sound-toggle .sound-led{width:6px;height:6px;border-radius:50%;background:#8d8a7e}
.sound-toggle[aria-pressed="true"] .sound-led{background:#c3df9d;box-shadow:0 0 0 3px #98b47530}
.pitch{
  margin:0 auto;
  padding:12px 11px 9px;
  width:100%;
  justify-content:center;
  align-items:center;
  gap:7px 16px;
}
.pitch h1{
  font:700 clamp(13px,1.25vw,17px)/1.25 system-ui,sans-serif;
  color:#f9e8bf;
  text-shadow:0 2px 8px #0006;
  letter-spacing:.012em;
}
.pitch p{font-size:11px;color:#b4ac94}
body.pilehead-playing .table{
  display:grid;
  grid-template-rows:minmax(95px,auto) minmax(210px,1fr) auto minmax(150px,auto);
  gap:clamp(2px,.5vw,9px);
  position:relative;
  width:100%;
  min-height:clamp(615px,calc(100svh - 195px),900px);
  max-height:none;
  isolation:isolate;
  overflow:visible;
  border:clamp(7px,1.2vw,15px) solid transparent;
  border-radius:clamp(24px,3.4vw,52px);
  background:
    radial-gradient(ellipse 65% 82% at 50% 52%,#346d57a6,transparent 96%),
    repeating-linear-gradient(25deg,#c3dbb805 0 1px,transparent 1px 4px),
    radial-gradient(ellipse at 50% 46%,#155342 0%,#104536 48%,#0b332b 86%,#09281f 100%);
  background-clip:padding-box;
  box-shadow:
    0 24px 0 -13px #1c1712,
    0 34px 42px #0009,
    0 0 0 1px #a77e514f,
    inset 0 0 0 2px #cfaf75a8,
    inset 0 0 0 8px #173e2f,
    inset 0 20px 45px #041a14c7,
    inset 0 -32px 65px #031d16c5;
  padding:clamp(11px,1.65vw,27px) clamp(7px,2.8vw,40px) clamp(3px,1.1vw,13px);
  transform:none!important;
  animation:none;
}
body.pilehead-playing .table:before{
  content:"";position:absolute;inset:-12px;pointer-events:none;opacity:1;
  border-radius:inherit;border:12px solid transparent;z-index:0;
  background:
    linear-gradient(115deg,#957450bb,#402e24 18%,#634934 43%,#362820 63%,#98704a 100%) border-box;
  box-shadow:inset 0 0 0 1px #1d130faa;
  -webkit-mask:linear-gradient(#fff 0 0) padding-box,linear-gradient(#fff 0 0);
  -webkit-mask-composite:xor;
  mask-composite:exclude;
}
body.pilehead-playing .table:after {
  content:"";position:absolute;inset:17px;z-index:0;pointer-events:none;
  border:1px solid #dbc48a35;
  border-radius:clamp(18px,2.8vw,39px);
  box-shadow:inset 0 0 26px #061d1757;
}
body.pilehead-playing .table > * {position:relative;z-index:1}
body.pilehead-playing .table .opponents{
  display:grid;
  grid-template-columns:repeat(var(--opponent-count,3),minmax(0,1fr));
  gap:clamp(4px,1.5vw,22px);
  width:min(88%,900px);
  min-height:91px;
  justify-self:center;
  align-self:start;
  transform-origin:top center;
  perspective:900px;
  padding:0;
  overflow:visible;
}
body.pilehead-playing .table .opponent {
  position:relative;
  width:100%;
  min-width:0;
  max-width:none;
  flex:none;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
  padding:5px 3px 0;
  text-align:center;
  transform:translateY(var(--seat-drift,0px));
  opacity:.9;
  transition:opacity .18s,filter .18s;
}
body.pilehead-playing .table .opponent:first-child:last-child{--seat-drift:0px}
body.pilehead-playing .table .opponent:nth-child(2):nth-last-child(2){--seat-drift:-7px}
body.pilehead-playing .table .opponent.current {
  opacity:1;
  filter:drop-shadow(0 0 7px #f3c67c65);
}
body.pilehead-playing .table .opponent.finished{opacity:.42;filter:grayscale(.7)}
body.pilehead-playing .table .opponent strong{
  display:inline-flex;align-items:center;justify-content:center;
  gap:6px;padding:5px 10px;
  color:#eae1c9;
  background:#08271fcb;
  border:1px solid #9c9a6e7c;
  border-radius:999px;
  max-width:100%;
  font-size:clamp(10px,1vw,13px);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  box-shadow:0 5px 10px #0005;
}
body.pilehead-playing .table .opponent.current strong{
  color:#2e2519;background:#f0cc8b;border-color:#fff2c1;
  box-shadow:0 0 0 3px #ebc87b20,0 7px 13px #0005;
}
body.pilehead-playing .table .opponent small{
  display:block;color:#c0cdb7;font-size:clamp(9px,.8vw,11px);
  line-height:1.3;margin:3px auto;white-space:nowrap;
}
body.pilehead-playing .table .mini-cards{
  display:flex;justify-content:center;
  height:clamp(32px,3.9vw,54px);
  padding:2px 0;
  margin:5px 0 0;
  filter:drop-shadow(0 4px 4px #0007);
  transform:rotateX(18deg) scale(.95);
  transform-origin:center top;
}
body.pilehead-playing .table .mini-cards .mini {
  width:clamp(20px,2.5vw,33px);
  height:clamp(30px,3.4vw,47px);
  flex:0 1 auto;
  min-width:12px;
  max-width:33px;
  margin-left:clamp(-14px,-1.2vw,-6px);
  border-radius:4px;
  border:1px solid #e9e0c6;
  background:#f4ebd3;
  color:#1f3e31;
  font:900 clamp(12px,1.25vw,18px) Georgia,serif;
  box-shadow:0 2px 0 #baaa8a,0 3px 6px #0005;
  transform:rotate(var(--mini-angle,0deg));
}
body.pilehead-playing .table .mini-cards .mini.back {
  background:
    radial-gradient(circle at center,#e0bf805a 0 2px,transparent 3px),
    repeating-linear-gradient(42deg,#102d39 0 6px,#1c4952 6px 9px);
  border-color:#d3c29d;
  color:#e9d9b6;
}
body.pilehead-playing .table .mini-cards .mini:first-child{margin-left:0}
body.pilehead-playing .table .table-center {
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(135px,1.6fr) minmax(0,1fr);
  justify-content:stretch;align-items:center;
  gap:clamp(2px,3vw,60px);
  align-self:stretch;
  width:min(94%,1050px);
  margin:0 auto;
  padding:5px 0 2px;
  min-height:220px;
}
body.pilehead-playing .table .stack{
  position:relative;
  min-width:0;
  display:flex;flex-direction:column;
  align-items:center;justify-content:center;
  align-self:stretch;
  padding:6px 0;
  isolation:isolate;
}
body.pilehead-playing .table .stack-label{
  position:relative;color:#e6d1a6;
  font:850 clamp(9px,.88vw,11px) system-ui,sans-serif;
  letter-spacing:.15em;
  text-shadow:0 2px 4px #031611;
}
body.pilehead-playing .table .stack-count{
  font:600 clamp(10px,.89vw,12px) system-ui,sans-serif;
  letter-spacing:.02em;color:#c6d2ba;
  text-shadow:0 2px 5px #0009;
  max-width:100%;overflow-wrap:anywhere;
  margin-top:6px;min-height:14px;
}
body.pilehead-playing .table .stack:nth-child(1),
body.pilehead-playing .table .stack:nth-child(3){transform:scale(.86);transform-origin:center}
body.pilehead-playing .table .stack .pile-card{
  height:clamp(123px,15vw,180px);
  width:min(100%,235px);
  margin:8px auto 2px;
  position:relative;
  filter:none;
}
body.pilehead-playing .table .stack .pile-card .card,
body.pilehead-playing .table .stack .pile-card .placeholder{
  width:var(--card-w);height:var(--card-h);
  max-width:none;min-width:0;
}
body.pilehead-playing .table .stack .pile-card .card .value{
  font-size:clamp(42px,5vw,57px);
}
body.pilehead-playing .table .stack .pile-card>.card-wrap{
  transform:translateX(calc(-50% + var(--offset,0px))) rotate(var(--angle,0deg));
  top:4px;
}
body.pilehead-playing .table .stack .pile-card .card-wrap:last-child{z-index:4}
body.pilehead-playing .table .stack .pile-card .card-wrap:nth-last-child(2){z-index:3}
body.pilehead-playing .table .stack .pile-card .card-wrap:nth-last-child(3){z-index:2}
body.pilehead-playing .table .stack .pile-card .card-wrap:nth-last-child(4){z-index:1}
body.pilehead-playing .table .stack[data-play-target]{
  min-height:196px;
  background:radial-gradient(ellipse at 50% 55%,#fde4a912 0%,transparent 60%);
  border:1px dashed #f2d4964f;
  border-radius:26px;
  cursor:pointer;
  transition:background .15s,border-color .15s,box-shadow .15s,transform .15s;
}
body.pilehead-playing .table .stack[data-play-target]:before{
  content:"";position:absolute;inset:14px;
  border-radius:19px;
  border:1px solid #f2d4961c;pointer-events:none;
}
body.pilehead-playing .table .stack[data-play-target]:hover,
body.pilehead-playing .table .stack[data-play-target].drop-hover,
body.pilehead-playing .table .stack[data-play-target].is-armed {
  border-color:#f6cd75a5;
  background:radial-gradient(ellipse at 50% 50%,#f6ce6945,transparent 75%);
  box-shadow:0 0 0 5px #f4cf7523,inset 0 0 27px #f6d38a18;
}
body.pilehead-playing .table .stack[data-play-target].drop-hover{transform:scale(1.035)}
body.pilehead-playing .table .stack[data-play-target]:focus-visible{
  outline:3px solid #f5d18c;outline-offset:4px;
}
body.pilehead-playing .table .stack[data-play-target] .stack-count:last-child{
  display:inline-block;
  padding:5px 9px;border:1px solid #e8c27e67;background:#05291fe0;border-radius:999px;
  color:#f8d48e;min-width:max-content;
  font-weight:850;font-size:11px;margin-top:8px;
}
body.pilehead-playing .table .stack:nth-child(3) .placeholder{
  border:1px solid #d5b78970;color:#d6bb8d;
  border-radius:50%;height:96px;width:96px;
  background:radial-gradient(circle,#061f1aad 0%,transparent 75%);
  font-size:38px;
}
body.pilehead-playing .table .stack:nth-child(1) .pile-card>.card{
  left:50%;top:10px;
  transform:translateX(-50%) rotate(-4deg);
}
body.pilehead-playing .table .zone.your-up {
  width:min(100%,690px);
  margin:0 auto;
  padding:2px 4px 10px;
  min-height:112px;
  border:0;background:transparent;
}
body.pilehead-playing .table .zone .area-label{
  color:#e4d1a8;
  font-size:10px;font-weight:850;letter-spacing:.13em;
  text-align:center;justify-content:center;margin:0 0 3px;
}
body.pilehead-playing .table .zone .area-label span:last-child{
  color:#b8c8b2;font-weight:650;
}
body.pilehead-playing .table .zone .card-row{
  min-height:98px;align-items:center;flex-wrap:nowrap;
  overflow-x:auto;overflow-y:hidden;justify-content:safe center;
  gap:clamp(4px,1.2vw,12px);
  padding:7px 4px 10px;
}
body.pilehead-playing .table .zone .up-pair{flex:none}
body.pilehead-playing .table .zone .card{
  --card-w:70px;--card-h:97px;
  width:var(--card-w);height:var(--card-h);
}
body.pilehead-playing .table .zone .card .value{font-size:34px}
body.pilehead-playing .table .zone .card.back{border-color:#d6c6a6}
body.pilehead-playing .table .hand-area {
  position:relative;
  min-height:158px;
  border:0;
  border-top:1px solid #dfc88c3c;
  padding:1px 0 0;
  background:linear-gradient(to bottom,transparent 0%,#0a322777 42%,#051d17a3 100%);
  border-radius:0 0 24px 24px;
  box-shadow:0 12px 28px -18px #000a;
  align-self:end;
}
body.pilehead-playing .table .hand-area:before{
  content:"";position:absolute;inset:auto -5px -7px;
  height:6px;border-radius:999px;
  background:linear-gradient(90deg,transparent,#b39564 16%,#e5c992 51%,#b39564 84%,transparent);
  opacity:.43;pointer-events:none;
}
body.pilehead-playing .table .hand-area .area-label{
  margin:1px 0 0;
  padding:5px 8px;
  justify-content:center;gap:10px;
  color:#f3d7a0;
  font-size:10px;letter-spacing:.18em;
}
body.pilehead-playing .table .card-row.hand{
  display:flex;
  flex-wrap:nowrap;
  justify-content:safe center;
  align-items:flex-end;
  gap:0;
  width:100%;
  min-height:152px;
  max-width:none;
  padding:25px 18px 8px;
  overflow-x:auto;overflow-y:hidden;
  scrollbar-width:thin;
  scrollbar-color:#d6bb7e57 transparent;
  scroll-snap-type:x proximity;
  overscroll-behavior-inline:contain;
}
body.pilehead-playing .table .card-row.hand .card{
  position:relative;flex:0 0 var(--card-w);
  width:var(--card-w);height:var(--card-h);
  margin-left:var(--card-overlap,-14px);
  z-index:var(--fan-z,1);
  scroll-snap-align:center;
  transform-origin:50% 110%;
  transform:translateY(var(--fan-rise,0px)) rotate(var(--fan-angle,0deg));
  transition:transform 130ms cubic-bezier(.2,.7,.35,1.1),filter 130ms,box-shadow 130ms;
}
body.pilehead-playing .table .card-row.hand .card:first-child{margin-left:0}
body.pilehead-playing .table .card-row.hand .card.playable:not(:disabled):hover{
  z-index:50;
  transform:translateY(calc(var(--fan-rise,0px) - 19px)) rotate(0deg) scale(1.035);
  box-shadow:0 16px 26px #071a16ad;
}
body.pilehead-playing .table .card-row.hand .card.selected,
body.pilehead-playing .table .card-row.hand .card.selected:hover{
  z-index:55!important;
  transform:translateY(calc(var(--fan-rise,0px) - 25px)) rotate(0deg) scale(1.045)!important;
  box-shadow:0 0 0 3px #f8cf7e,0 18px 28px #071812cb!important;
  filter:brightness(1.035);
}
body.pilehead-playing .table .card {
  width:var(--card-w);height:var(--card-h);
  padding:7px;
  border:1.5px solid #e1d4b8;
  border-radius:var(--card-radius);
  color:var(--table-ink);
  background:
    radial-gradient(ellipse at 48% 35%,#fffdf0 0%,#f5eedb 64%,#e8dbc1 100%);
  box-shadow:
    0 1px 0 #ffffffbd inset,
    0 3px 0 #a89a7d,
    0 8px 16px #021913b3;
  will-change:auto;
  transition:transform 150ms,box-shadow 150ms,filter 150ms;
  transform-style:flat;
  user-select:none;
  -webkit-user-select:none;
  -webkit-tap-highlight-color:transparent;
}
body.pilehead-playing .table .card:after{
  inset:4px;border:1px solid #a18c6750;border-radius:5px;
}
body.pilehead-playing .table .card .mark{
  position:absolute;top:8px;left:8px;
  font:900 9px/1.1 system-ui,sans-serif;
  letter-spacing:.015em;text-align:left;
  max-width:55%;
}
body.pilehead-playing .table .card .value{
  font:900 clamp(41px,5.5vw,55px)/1 Georgia,serif;
  text-shadow:0 1px 0 #ffffffb8;
  margin:auto;
}
body.pilehead-playing .table .card .foot{
  position:absolute;bottom:7px;right:8px;
  font:900 10px/1 system-ui,sans-serif;
  letter-spacing:.01em;
}
body.pilehead-playing .table .card.action-card .value{
  font:900 clamp(30px,4.5vw,49px)/1 system-ui,sans-serif;
}
body.pilehead-playing .table .card[data-action="reset"]{background:radial-gradient(ellipse,#ecf7f8,#c8e4ed);color:#28567f}
body.pilehead-playing .table .card[data-action="ghost"]{background:radial-gradient(ellipse,#f8f1fe,#d7c6e7);color:#664081}
body.pilehead-playing .table .card[data-action="under"]{background:radial-gradient(ellipse,#fcf3d9,#f0d49f);color:#805026}
body.pilehead-playing .table .card[data-action="skip"]{background:radial-gradient(ellipse,#eff8ea,#cee8c6);color:#376348}
body.pilehead-playing .table .card[data-action="burn"]{background:radial-gradient(ellipse,#fff0e2,#eebc9f);color:#9f4a35}
body.pilehead-playing .table .card[data-action="dump"]{background:radial-gradient(ellipse,#ffeef3,#f2c5d7);color:#883453}
body.pilehead-playing .table .card.back{
  border:2px solid #d7c9ad;
  color:#f4d9a3;
  background:
    radial-gradient(circle at 50% 50%,transparent 0 23%,#d3c58c80 24% 25%,transparent 26%),
    repeating-linear-gradient(45deg,#12394b 0 5px,#245264 5px 8px,#163d4b 8px 11px);
}
body.pilehead-playing .table .card.back:before{
  content:"";position:absolute;inset:6px;border:1px solid #e9d8a86e;border-radius:4px;
}
body.pilehead-playing .table .card.back .value{font-size:25px;color:#eac994}
body.pilehead-playing .table .card:disabled{opacity:1;cursor:default}
body.pilehead-playing .table .card.playable{touch-action:none;cursor:grab}
body.pilehead-playing .table .card.playable:active{cursor:grabbing}
body.pilehead-playing .table .card:focus-visible{
  outline:3px solid #f2c87d;outline-offset:3px;
}
body.pilehead-playing .table .card-ghost{box-shadow:0 19px 38px #000b;z-index:101}
body.pilehead-playing .table .zone .card.playable:hover{
  box-shadow:0 0 0 2px #f3c675,0 12px 16px #0008;
}
body.pilehead-playing .toolbar {
  position:sticky;
  bottom:max(7px,env(safe-area-inset-bottom));
  z-index:50;
  display:flex;
  flex-wrap:nowrap;
  justify-content:center;align-items:center;
  gap:clamp(6px,1vw,12px);
  width:max-content;
  max-width:calc(100% - 10px);
  min-height:58px;
  margin:clamp(-8px,-1vw,-5px) auto 5px;
  padding:8px 12px;
  border:1px solid #dabd858a;
  border-radius:19px;
  background:linear-gradient(180deg,#332920f5,#1c201af6);
  box-shadow:0 8px 25px #0009,inset 0 1px 0 #f8dca221;
  backdrop-filter:blur(12px);
}
body.pilehead-playing .toolbar button{
  min-width:0;min-height:44px;
  padding:10px clamp(10px,1.6vw,20px);
  border-radius:11px;
  font-size:clamp(12px,1vw,15px);
  flex:0 1 auto;
  white-space:nowrap;
}
body.pilehead-playing .toolbar .primary{
  border-color:#fbd4a3;
  color:#30241b;
  background:linear-gradient(180deg,#ffd39d,#eda36c);
  box-shadow:0 3px 0 #8c5335,0 6px 11px #0005;
}
body.pilehead-playing .toolbar .secondary{
  border-color:#bda9807a;background:#4a3e31;
}
body.pilehead-playing .toolbar .slam{
  background:linear-gradient(#ec8558,#b83d2a);
  border:1px solid #f7be83;color:#fff0dc;
  box-shadow:0 3px 0 #6b291f,0 0 0 3px #e8724340;
  animation:slam-pulse 1.65s ease-in-out infinite;
}
body.pilehead-playing .toolbar .slam:disabled{animation:none;box-shadow:none}
body.pilehead-playing .toolbar button:disabled{
  opacity:.47;
  filter:grayscale(.25);
  box-shadow:none;
}
@keyframes slam-pulse{50%{box-shadow:0 3px 0 #6b291f,0 0 0 7px #e8724315}}
body.pilehead-playing .message{
  max-width:95%;
  text-align:center;margin:9px auto 4px;
  font-size:12px;line-height:1.45;color:#e8d5ac;min-height:16px;
}
body.pilehead-playing .meta{
  justify-content:center;gap:clamp(9px,2vw,24px);
  color:#b8aa8a;font-size:10px;
  margin:1px auto 2px;padding:4px 0;
}
body.pilehead-playing .event-list{
  justify-content:center;margin:5px auto 8px;
  max-width:100%;gap:6px;
}
body.pilehead-playing .event-list .event{
  border:1px solid #b4a77a4d;
  background:#211f1bbd;
  color:#cbbda0;font-size:10px;padding:5px 9px;
}
body.pilehead-playing .instructions{max-width:850px;margin:11px auto}
body.pilehead-playing .online-room-tools{
  width:min(100%,1080px);margin:0 auto 8px;
  background:#2a241eb8;
  border:1px solid #ddc29752;
  color:#ede0c3;
}
body.pilehead-playing .online-room-tools .online-pulse{background:#a9dd9a}
body.pilehead-playing .table .slam-banner{
  top:50%;z-index:20!important;
  border:3px solid #ffdb9c;
  background:linear-gradient(#ea8546,#c7512d);
  border-radius:17px;
  padding:17px 30px;
  font:900 clamp(34px,7vw,72px)/.95 Georgia,serif;
  letter-spacing:.05em;
  box-shadow:0 12px 40px #0009,0 0 0 12px #ffb77525;
}
.pilehead-physical-fx{
  position:fixed;z-index:120;pointer-events:none;left:0;top:0;
  width:var(--card-w);height:var(--card-h);
  transform-origin:50% 50%;
  box-shadow:0 8px 25px #0009;
}
.pilehead-cue{
  position:absolute;z-index:20!important;left:50%;top:47%;pointer-events:none;
  transform:translate(-50%,-50%);
  min-width:160px;padding:14px 27px;
  font:900 clamp(27px,5vw,57px)/1 Georgia,serif;
  text-align:center;text-transform:uppercase;letter-spacing:.08em;
  color:#fff1d1;text-shadow:0 3px 9px #5e2918;
  background:linear-gradient(145deg,#c96039ef,#813b2fe9);
  border:2px solid #f7ca80;border-radius:16px;
  box-shadow:0 10px 30px #0009,0 0 0 7px #daa96d23;
  animation:pilehead-cue .75s cubic-bezier(.19,.7,.22,1) both;
}
@keyframes pilehead-cue{
  0%{opacity:0;transform:translate(-50%,-30%) scale(.74) rotate(-5deg)}
  30%{opacity:1;transform:translate(-50%,-50%) scale(1.05) rotate(2deg)}
  80%{opacity:1;transform:translate(-50%,-50%) scale(1) rotate(0)}
  100%{opacity:0;transform:translate(-50%,-70%) scale(.94)}
}
.pilehead-hand-hint{
  position:absolute;z-index:3;left:50%;bottom:7px;transform:translateX(-50%);
  background:#081b15d9;color:#efd29b;
  border:1px solid #ddc28a6b;border-radius:999px;
  padding:5px 10px;font:650 10px system-ui;
  pointer-events:none;white-space:nowrap;
}
body.pilehead-playing .table.is-active-turn:after{border-color:#f5cd7738}
body.pilehead-playing .table:not(.is-active-turn) .hand-area{filter:saturate(.8)}
body.pilehead-playing .table:not(.is-active-turn) .card-row.hand .card{cursor:default}
body.pilehead-playing .table .card-row.hand::-webkit-scrollbar{height:5px}
body.pilehead-playing .table .card-row.hand::-webkit-scrollbar-thumb{background:#bea77a8a;border-radius:5px}
body.pilehead-playing .table .card-row.hand::-webkit-scrollbar-track{background:transparent}
/* Anchor in the player's seat: the closer the card, the larger it appears. */
@media (min-width:900px){
 body.pilehead-playing .table{grid-template-rows:minmax(105px,auto) minmax(230px,1fr) minmax(115px,auto) minmax(165px,auto)}
 body.pilehead-playing .table .opponents{width:min(70%,850px)}
 body.pilehead-playing .table .hand-area{width:min(100%,1120px);justify-self:center}
 body.pilehead-playing .table .zone.your-up{width:min(64%,730px)}
 body.pilehead-playing .table .card-row.hand{min-height:169px}
 body.pilehead-playing .table .card-row.hand .card{--card-w:106px;--card-h:147px}
 body.pilehead-playing .table .stack[data-play-target] .pile-card .card{--card-w:104px;--card-h:145px}
}
@media (max-width:700px){
 :root{--card-w:72px;--card-h:102px;--card-radius:7px}
 .layout{padding:5px 4px 30px}
 .top{padding:7px 7px 9px;gap:6px}
 .top .eyebrow{font-size:8px;letter-spacing:.09em}
 .brand{font-size:25px}
 .links{gap:4px}
 .links a,.links button{font-size:10px;padding:7px 8px}
 .links .sound-toggle{padding:6px 9px}
 .pitch{padding:9px 5px 7px;gap:2px 8px}
 .pitch h1{font-size:12px}
 .pitch p{font-size:9px}
 body.pilehead-playing .table{
  min-height:max(590px,calc(100svh - 162px));
  grid-template-rows:minmax(91px,auto) minmax(178px,1fr) minmax(90px,auto) minmax(134px,auto);
  gap:1px;
  border-width:6px;
  border-radius:25px;
  padding:9px 6px 4px;
  box-shadow:0 15px 0 -8px #1c1712,0 19px 30px #0009,inset 0 0 0 1px #d8bc84ad,inset 0 0 0 5px #173f2f;
 }
 body.pilehead-playing .table:before{inset:-8px;border-width:8px}
 body.pilehead-playing .table:after{inset:9px;border-radius:15px}
 body.pilehead-playing .table .opponents{
  width:100%;grid-template-columns:repeat(var(--opponent-count,3),minmax(0,1fr));
  gap:1px;min-height:85px;padding:3px 1px 0;
 }
 body.pilehead-playing .table .opponent{padding:1px 0}
 body.pilehead-playing .table .opponent strong{font-size:9px;padding:4px 6px;max-width:98%}
 body.pilehead-playing .table .opponent small{font-size:8px;margin:2px 0}
 body.pilehead-playing .table .mini-cards{height:32px;margin:2px 0 0}
 body.pilehead-playing .table .mini-cards .mini{
  width:21px;height:29px;min-width:11px;
  font-size:11px;margin-left:-8px;
 }
 body.pilehead-playing .table .table-center{
  grid-template-columns:minmax(0,.8fr) minmax(112px,1.5fr) minmax(0,.8fr);
  width:100%;min-height:176px;gap:0;padding:0;
 }
 body.pilehead-playing .table .stack{padding:2px 0}
 body.pilehead-playing .table .stack-label{font-size:8px}
 body.pilehead-playing .table .stack-count{font-size:9px;min-height:11px}
 body.pilehead-playing .table .stack .pile-card{height:112px;margin:4px auto 0}
 body.pilehead-playing .table .stack .pile-card .card{width:60px;height:87px}
 body.pilehead-playing .table .stack .pile-card .card .value{font-size:32px}
 body.pilehead-playing .table .stack:nth-child(1),
 body.pilehead-playing .table .stack:nth-child(3){transform:scale(.85)}
 body.pilehead-playing .table .stack[data-play-target]{
  min-height:167px;border-radius:16px;
 }
 body.pilehead-playing .table .stack[data-play-target]:before{inset:6px;border-radius:11px}
 body.pilehead-playing .table .stack[data-play-target] .stack-count:last-child{
  padding:4px 5px;font-size:9px;margin-top:4px;
 }
 body.pilehead-playing .table .stack:nth-child(3) .placeholder{width:66px;height:66px;font-size:27px}
 body.pilehead-playing .table .zone.your-up{
  padding:0 1px 5px;min-height:93px;
 }
 body.pilehead-playing .table .zone .area-label{font-size:8px;margin:0}
 body.pilehead-playing .table .zone .card-row{
  min-height:83px;gap:5px;padding:3px 1px 8px;
 }
 body.pilehead-playing .table .zone .card{
  --card-w:51px;--card-h:73px;
  width:var(--card-w);height:var(--card-h);padding:5px;
 }
 body.pilehead-playing .table .zone .card .value{font-size:26px}
 body.pilehead-playing .table .zone .card .mark{font-size:7px;top:4px;left:4px}
 body.pilehead-playing .table .zone .card .foot{font-size:7px;bottom:4px;right:4px}
 body.pilehead-playing .table .hand-area{
  min-height:127px;padding:0;
  border-radius:0 0 15px 15px;
 }
 body.pilehead-playing .table .hand-area .area-label{font-size:9px;padding:4px}
 body.pilehead-playing .table .card-row.hand{
  min-height:123px;max-height:143px;
  padding:21px 11px 4px;
 }
 body.pilehead-playing .table .card-row.hand .card{
  --card-w:72px;--card-h:102px;
  width:var(--card-w);height:var(--card-h);
 }
 body.pilehead-playing .table .card .mark{font-size:7px;top:6px;left:6px}
 body.pilehead-playing .table .card .value{font-size:39px}
 body.pilehead-playing .table .card.action-card .value{font-size:31px}
 body.pilehead-playing .table .card .foot{font-size:8px;bottom:6px;right:6px}
 body.pilehead-playing .toolbar{
  max-width:calc(100% - 10px);
  width:min(100%,500px);
  justify-content:space-around;
  min-height:52px;padding:6px;
  margin:-7px auto 5px;gap:5px;
  border-radius:14px;
 }
 body.pilehead-playing .toolbar button{
  flex:1 1 auto;min-height:42px;min-width:0;
  padding:8px 6px;font-size:11px;
  white-space:normal;
 }
 body.pilehead-playing .message{margin:6px auto 1px;font-size:11px}
 body.pilehead-playing .meta{font-size:9px;gap:9px}
 body.pilehead-playing .event-list{flex-wrap:nowrap;overflow-x:auto;justify-content:flex-start;scrollbar-width:none}
 body.pilehead-playing .event-list .event{white-space:nowrap;font-size:9px}
 body.pilehead-playing .online-room-tools{gap:4px;padding:5px 7px;font-size:10px;margin-bottom:5px}
 body.pilehead-playing .online-room-tools button{min-height:30px}
}
@media (max-width:380px){
 body.pilehead-playing .table .opponent strong{max-width:96%;padding:3px 4px;font-size:8px}
 body.pilehead-playing .table .opponent small{font-size:7px}
 body.pilehead-playing .table .stack:nth-child(1),body.pilehead-playing .table .stack:nth-child(3){transform:scale(.78)}
 body.pilehead-playing .table .table-center{grid-template-columns:minmax(0,.68fr) minmax(111px,1.55fr) minmax(0,.68fr)}
 body.pilehead-playing .table .card-row.hand .card{--card-w:68px;--card-h:98px}
 body.pilehead-playing .toolbar button{font-size:10px}
}
/* A landscape phone must still show the opponent end, the pile and your hand. */
@media (max-height:560px) and (orientation:landscape){
 body.pilehead-playing .table{
  min-height:460px;
  grid-template-rows:60px minmax(150px,1fr) 78px 105px;
  padding-top:5px;padding-bottom:2px;
 }
 body.pilehead-playing .table .opponents{min-height:55px;width:80%}
 body.pilehead-playing .table .opponent small{display:none}
 body.pilehead-playing .table .mini-cards{height:31px;margin:1px 0}
 body.pilehead-playing .table .table-center{min-height:140px}
 body.pilehead-playing .table .zone.your-up{min-height:74px}
 body.pilehead-playing .table .zone .card-row{min-height:70px}
 body.pilehead-playing .table .zone .card{width:45px;height:64px}
 body.pilehead-playing .table .hand-area{min-height:100px}
 body.pilehead-playing .table .card-row.hand{min-height:100px;max-height:110px;padding:12px 6px 2px}
 body.pilehead-playing .table .card-row.hand .card{--card-w:69px;--card-h:98px}
 body.pilehead-playing .toolbar{margin:2px auto}
}
@media (prefers-reduced-motion:reduce){
 *,*::before,*::after{scroll-behavior:auto!important}
 body.pilehead-playing .card,body.pilehead-playing .stack,
 body.pilehead-playing .table .card-row.hand .card,
 body.pilehead-playing .toolbar .slam{transition:none!important;animation:none!important}
 .pilehead-cue{animation:none!important}
}


/* The camera belongs to the player, not to a navigation header.
   Keep the menu out of the felt on small screens, without hiding navigation from keyboards. */
.table-menu-toggle{display:none}
@media(max-width:700px){
 body.pilehead-playing .top{position:relative;min-height:44px;justify-content:space-between}
 body.pilehead-playing .top .links{
  position:absolute;right:5px;top:calc(100% - 2px);
  width:min(260px,calc(100vw - 20px));
  display:none;flex-direction:column;align-items:stretch;gap:7px;
  z-index:120;background:#241e19f9;border:1px solid #d1b67e8c;
  border-radius:14px;padding:11px;
  box-shadow:0 16px 37px #000c;
  backdrop-filter:blur(12px);
 }
 body.pilehead-playing .top .links.is-open{display:flex}
 body.pilehead-playing .top .links a,
 body.pilehead-playing .top .links button{
  display:flex;justify-content:space-between;align-items:center;
  min-height:42px;width:100%;text-align:left;
  font-size:13px;padding:8px 13px;
  border-radius:9px;
 }
 body.pilehead-playing .table-menu-toggle{
  display:inline-flex;align-items:center;justify-content:center;
  min-height:38px;padding:8px 12px;
  border:1px solid #e1c28a90;border-radius:10px;
  background:#362a20;color:#f1e0bf;
  font-size:12px;font-weight:850;
 }
 body.pilehead-playing .table-menu-toggle:focus-visible{
  outline:3px solid #f8ca7d;outline-offset:3px;
 }
}


/* Held card backs are what a seated player sees across a real table.
   The exposed on-table cards remain in a separate row below. */
body.pilehead-playing .table .held-cards{
 display:flex;
 align-items:flex-end;justify-content:center;
 width:100%;min-height:34px;height:34px;
 padding:3px 2px 0;
 margin:4px auto 0;
 filter:drop-shadow(0 4px 4px #031b15b5);
}
body.pilehead-playing .table .held-back{
 position:relative;flex:0 0 auto;
 width:23px;height:33px;
 display:block;
 margin-left:-11px;
 border:1px solid #ddc8a3;border-radius:3px;
 transform-origin:50% 92%;
 transform:rotate(var(--hold-angle,0deg));
 background:
  radial-gradient(circle at center,#eed39385 0 1px,transparent 2px),
  repeating-linear-gradient(40deg,#0b2937 0 5px,#20505e 5px 8px);
 box-shadow:0 2px 0 #08303d,0 4px 7px #00160eae;
}
body.pilehead-playing .table .held-back:first-child{margin-left:0}
body.pilehead-playing .table .opponent.current .held-back{box-shadow:0 2px 0 #08303d,0 4px 10px #ddb37748}
body.pilehead-playing .table .opponent.finished .held-cards{opacity:.35}
@media(max-width:700px){
 body.pilehead-playing .table .held-cards{height:26px;min-height:26px;margin:2px auto 0}
 body.pilehead-playing .table .held-back{width:17px;height:25px;margin-left:-8px;border-radius:2px}
 body.pilehead-playing .table .mini-cards{margin:1px 0 0}
}


/* The game engine rerenders after every turn. Do NOT replay deal animations on
   already visible cards; only animate when first entering the physical scene. */
body.pilehead-playing .table .card-row:not(.hand) .card:not(.back){
 animation:none;
}
@keyframes pilehead-first-deal {
 from{opacity:0;filter:blur(3px);transform:translateY(-13px) scale(.94)}
 to{opacity:1;filter:blur(0);transform:translateY(0) scale(1)}
}
body.pilehead-playing .table.scene-entering .zone.your-up .card:not(.back){
 animation:pilehead-first-deal 320ms cubic-bezier(.18,.73,.29,1) both;
}
body.pilehead-playing .table.scene-entering .zone.your-up .card:nth-child(2){animation-delay:65ms}
body.pilehead-playing .table.scene-entering .zone.your-up .card:nth-child(3){animation-delay:120ms}
@media(prefers-reduced-motion:reduce){
 body.pilehead-playing .table.scene-entering .zone.your-up .card:not(.back){animation:none}
}


/* PILEHEAD · responsive physical-hand repair
   The whole tabletop must never become a horizontally scrollable page.
   Only the hand rail may scroll when a pickup produces many cards. */
html:has(body.pilehead-playing),body.pilehead-playing{
 max-width:100%;
 overflow-x:clip;
}
body.pilehead-playing .layout,
body.pilehead-playing #app,
body.pilehead-playing #app>.online-layout{
 width:100%;
 max-width:100%;
 min-width:0;
 box-sizing:border-box;
}
body.pilehead-playing .table{
 width:100%;
 max-width:100%;
 min-width:0;
 box-sizing:border-box;
 grid-template-columns:minmax(0,1fr);
 overflow:hidden;
}
body.pilehead-playing .table>*,
body.pilehead-playing .table .hand-area,
body.pilehead-playing .table .zone,
body.pilehead-playing .table .table-center,
body.pilehead-playing .table .opponents{
 min-width:0;
 max-width:100%;
 box-sizing:border-box;
}
body.pilehead-playing .table .hand-area{
 width:100%;
 position:relative;
 isolation:isolate;
 justify-self:stretch;
 padding-inline:0;
}
body.pilehead-playing .table .card-row.hand{
 box-sizing:border-box;
 min-width:0;
 width:100%;
 max-width:100%;
 justify-content:safe center;
 overflow-x:auto;
 overflow-y:hidden;
 scrollbar-width:thin;
 scroll-snap-type:none;
 touch-action:pan-x;
 padding-left:clamp(10px,2.5vw,20px);
 padding-right:clamp(10px,2.5vw,20px);
 overscroll-behavior-x:contain;
 -webkit-overflow-scrolling:touch;
}
body.pilehead-playing .table .card-row.hand .card{
 flex-shrink:0;
 margin-left:var(--card-overlap,-14px);
}
body.pilehead-playing .table .card-row.hand .card:first-child{margin-left:0}
body.pilehead-playing .table .hand-area.hand-overflow .card-row.hand{
 padding-inline:38px;
}
body.pilehead-playing .table .hand-scroll-arrow{
 position:absolute;z-index:25;
 top:54%;transform:translateY(-50%);
 display:grid;place-items:center;
 width:38px;height:48px;min-height:44px;
 padding:0;
 border-radius:12px;
 background:linear-gradient(155deg,#132f28ee,#081f1be8);
 border:1px solid #eed29aaf;color:#f9dc9f;
 box-shadow:0 4px 14px #071713a8;
 font:900 28px/1 Georgia,serif;
 touch-action:manipulation;
}
body.pilehead-playing .table .hand-scroll-arrow:hover,
body.pilehead-playing .table .hand-scroll-arrow:focus-visible{
 background:#39583d;color:#fff4c1;border-color:#ffe6b6;
}
body.pilehead-playing .table .hand-scroll-arrow[data-hand-scroll="-1"]{left:0}
body.pilehead-playing .table .hand-scroll-arrow[data-hand-scroll="1"]{right:0}
body.pilehead-playing .table .card-row.hand .card.selected{
 filter:brightness(1.055);
 animation:ph-paper-pick .18s cubic-bezier(.22,.74,.36,1) both;
}
@keyframes ph-paper-pick{
 0%{filter:brightness(.95) drop-shadow(0 0 0 transparent)}
 65%{filter:brightness(1.12) drop-shadow(0 7px 7px #00171070)}
 100%{filter:brightness(1.055)}
}
body.pilehead-playing .table .card-row.hand .card.playable:focus-visible{
 z-index:80!important;
 transform:translateY(calc(var(--fan-rise,0px) - 19px)) rotate(0deg)!important;
 outline:3px solid #f5d18c;outline-offset:2px;
}
body.pilehead-playing .table .stack[data-play-target]{
 box-shadow:inset 0 0 0 1px #f6d8a014;
}
body.pilehead-playing .table .stack[data-play-target].is-armed,
body.pilehead-playing .table .stack[data-play-target].drop-hover{
 box-shadow:inset 0 0 0 2px #ffe19c96,0 0 18px #f6c7715d;
}
body.pilehead-playing .toolbar{
 position:sticky;
 z-index:45;
 bottom:max(8px,env(safe-area-inset-bottom));
 display:grid;
 grid-template-columns:repeat(3,minmax(0,1fr));
 justify-items:stretch;
 align-items:stretch;
 width:min(100%,780px);
 max-width:100%;
 min-width:0;
 gap:7px;
 margin:6px auto 7px;
 padding:8px;
}
body.pilehead-playing .toolbar button{
 width:100%;
 min-width:0;
 max-width:100%;
 white-space:normal;
 line-height:1.15;
 overflow-wrap:break-word;
 padding:10px 7px;
}
body.pilehead-playing .playtest-tools{
 width:min(100%,780px);
 max-width:100%;
 margin:0 auto 7px;
 color:#a9b9a6;
 font:650 11px system-ui,sans-serif;
 text-align:right;
}
body.pilehead-playing .playtest-tools summary{
 cursor:pointer;
 padding:4px 8px;
 color:#b8bfa4;
 text-decoration:underline;
 text-underline-offset:3px;
}
body.pilehead-playing .playtest-tools .action{
 margin:6px;
 min-height:40px;
 font-size:12px;
}
body.pilehead-playing .table .hand-area .pilehead-hand-hint{
 z-index:26;
 bottom:2px;
 max-width:calc(100% - 92px);
 overflow:hidden;
 text-overflow:ellipsis;
}
@media (max-width:700px){
 body.pilehead-playing .layout{padding-inline:clamp(3px,1vw,8px)}
 body.pilehead-playing .table{
  padding-left:clamp(6px,1.8vw,12px);
  padding-right:clamp(6px,1.8vw,12px);
  grid-template-columns:minmax(0,1fr);
 }
 body.pilehead-playing .table .hand-area{min-height:143px}
 body.pilehead-playing .table .card-row.hand{
  min-height:134px;max-height:148px;
  padding-top:25px;
  padding-bottom:9px;
 }
 body.pilehead-playing .toolbar{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  width:calc(100% - 2px);
  margin:5px auto 6px;
  gap:6px;
  padding:7px;
 }
 body.pilehead-playing .toolbar button{
  min-height:47px;
  font-size:clamp(11px,3.1vw,14px);
  padding:8px 5px;
 }
 body.pilehead-playing .table .hand-scroll-arrow{
  top:56%;width:34px;height:44px;
  border-radius:10px;
 }
 body.pilehead-playing .table .hand-area.hand-overflow .card-row.hand{padding-inline:34px}
 body.pilehead-playing .table .zone .card-row{justify-content:safe center;max-width:100%;overflow-x:auto}
}
@media (max-width:380px){
 body.pilehead-playing .table .card-row.hand{min-height:131px}
 body.pilehead-playing .toolbar button{font-size:11px}
}
@media (max-height:560px) and (orientation:landscape){
 body.pilehead-playing .table .hand-area{min-height:119px}
 body.pilehead-playing .table .card-row.hand{
  min-height:111px;max-height:120px;padding-top:14px;padding-bottom:4px;
 }
}
@media (prefers-reduced-motion:reduce){
 body.pilehead-playing .table .card-row.hand .card.selected{animation:none!important}
 body.pilehead-playing .table .hand-scroll-arrow{transition:none!important}
}


/* Lifting two matching cards looks like a small physical stack. */
body.pilehead-playing .card-ghost{overflow:visible!important;z-index:999!important}
body.pilehead-playing .card-ghost .drag-count{
 position:absolute;z-index:99;right:-9px;top:-14px;
 display:inline-flex;align-items:center;justify-content:center;
 min-width:54px;min-height:30px;
 padding:4px 7px;border-radius:999px;
 border:2px solid #f7db9e;
 background:#133b30;color:#fff0c5;
 box-shadow:0 5px 13px #00160fa8;
 font:900 12px/1 system-ui,sans-serif;
 white-space:nowrap;
 transform:rotate(6deg);
}

/* Navigation now sits below the fan, never over card faces. */
body.pilehead-playing .table .hand-area.hand-overflow{padding-bottom:43px!important}
body.pilehead-playing .table .hand-scroll-arrow{
 top:auto!important;bottom:4px!important;transform:none!important;
 width:42px;height:34px;min-height:34px;border-radius:10px;font-size:24px;
}
body.pilehead-playing .table .hand-scroll-arrow[data-hand-scroll="-1"]{left:calc(50% - 50px)!important}
body.pilehead-playing .table .hand-scroll-arrow[data-hand-scroll="1"]{right:calc(50% - 50px)!important}
body.pilehead-playing .table .hand-sort-button{
 appearance:none;border:1px solid #d8c39696;background:#174439;color:#f8dfae;
 border-radius:10px;padding:6px 11px;font:800 12px/1.3 system-ui,sans-serif;
 cursor:pointer;min-height:32px;white-space:nowrap;z-index:2;
}
body.pilehead-playing .table .hand-sort-button:focus-visible{outline:2px solid #f49a62}
body.pilehead-playing .table .zone .up-pair{position:relative;display:inline-flex;flex:none;margin:0 4px 0 0}
body.pilehead-playing .table .zone .up-pair>.card.back{
 position:absolute;left:0;top:3px;transform:rotate(-5deg);
 pointer-events:none;z-index:0;
}
body.pilehead-playing .table .zone .up-pair>.card:not(.back){position:relative;z-index:1;transform:translate(5px,-4px)}
body.pilehead-playing .table .zone .up-pair>.card.selected:not(.back){transform:translate(5px,-12px)!important}
.online-lobby .setup-choice-guide{
 display:flex;flex-direction:column;gap:7px;margin:16px 0 12px;padding:14px 16px;
 border:1px solid #e6d49c64;border-radius:14px;background:#12392f;color:#f9e8c6;
}
.online-lobby .setup-choice-guide strong{font:800 15px system-ui,sans-serif}
.online-lobby .setup-choice-guide span{font-size:13px;line-height:1.5;color:#c2d3c7}
.online-lobby .setup-ready-controls{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin-top:18px}
.online-lobby .lobby-seat small{display:block;color:#eacb8d;font-size:11px;margin-top:3px}
.online-lobby .card-row .card.selected{outline:3px solid #efa46e;outline-offset:2px}
@media(max-width:700px){
 body.pilehead-playing .table .hand-area.hand-overflow{padding-bottom:43px!important}
 .online-lobby .setup-ready-controls>*{flex:1;min-width:145px}
}

/* End-of-game celebration. Both devices render from the authoritative result. */
.pilehead-result-backdrop{
 position:fixed;inset:0;z-index:2000;display:grid;place-items:center;
 overflow-y:auto;padding:20px 12px max(20px,env(safe-area-inset-bottom));
 background:radial-gradient(circle at 50% 22%,#9870464d,#021a17eE 57%);backdrop-filter:blur(10px);
}
.pilehead-result-panel{
 width:min(100%,500px);max-height:calc(100dvh - 28px);overflow-y:auto;
 text-align:center;padding:clamp(23px,5vw,38px);position:relative;
 background:radial-gradient(circle at 50% 0%,#2b5c4d,#133b32 53%,#10271f 100%);
 border:2px solid #d6ba7f;border-radius:26px;
 box-shadow:inset 0 0 0 5px #f5e4ae14,0 25px 100px #000b;
}
.pilehead-result-panel .result-glow{font-size:25px;letter-spacing:19px;color:#f3d08c;opacity:.86}
.pilehead-result-panel .result-medal{
 width:90px;height:90px;display:grid;place-items:center;margin:10px auto 16px;
 font-size:54px;color:#fce5b0;background:#7b61364d;
 border:2px solid #ffde98;border-radius:50%;box-shadow:0 0 0 9px #e7c77f1a,0 0 45px #ecc87545;
}
.pilehead-result-panel h2{font:900 clamp(32px,7vw,48px)/1.12 Georgia,serif;letter-spacing:-.045em;margin:7px 0 10px;color:#fff2d9}
.pilehead-result-panel .result-lead{font-size:17px;color:#e8dfc7;margin:6px 0 22px}
.pilehead-result-panel .result-winner{padding:13px;background:#102b26;border:1px solid #acbc905e;border-radius:12px;color:#dce4c8}
.pilehead-result-panel .result-winner strong{display:block;font:800 23px Georgia,serif;color:#f6d38e;margin-top:4px}
.pilehead-result-panel .result-ranking{display:grid;gap:7px;margin:15px 0}
.pilehead-result-panel .result-rank{display:grid;grid-template-columns:48px 1fr auto;align-items:center;gap:9px;padding:10px 12px;text-align:left;background:#0d2a23aa;border:1px solid #e0c4913d;border-radius:10px}
.pilehead-result-panel .result-position{font-size:10px;letter-spacing:.11em;color:#e4c384;font-weight:900}
.pilehead-result-panel .result-rank strong{font-weight:780;color:#fff0cf;font-size:14px}
.pilehead-result-panel .result-rank small{color:#b8cbbb;font-size:10px;text-transform:uppercase}
.pilehead-result-panel .result-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:9px;margin-top:22px}
.pilehead-result-panel .result-actions .action{display:inline-flex;align-items:center;justify-content:center;flex:1;min-width:150px;text-decoration:none}
.pilehead-result-panel .result-footnote{color:#a9bdb3;font-size:11px;line-height:1.4}
@media(max-width:420px){.pilehead-result-panel{padding:19px 14px}.pilehead-result-panel .result-glow{letter-spacing:9px}.pilehead-result-panel .result-medal{width:69px;height:69px;font-size:42px}}
@media(prefers-reduced-motion:no-preference){.pilehead-result-panel{animation:pilehead-result-arrive .46s cubic-bezier(.18,.9,.25,1.08) both}
@keyframes pilehead-result-arrive{from{transform:translateY(25px) scale(.95);opacity:.2}to{transform:translateY(0) scale(1);opacity:1}}}

.pilehead-result-panel .result-actions a.action.primary{background:#f49a62;border:1px solid #ffd1ac;color:#2e1b11;font-weight:900}
.pilehead-result-panel .result-actions a.action.primary:hover{background:#ffb177}

/* PILEHEAD / NIGHT AT THE TABLE
   One deliberate visual signature: real cards resting on a spotlighted felt table.
   Decorative layers use no imagery or layout-shifting JavaScript. */
:root{--ph-amber:#efbd75;--ph-paper:#f5e8c9;--ph-copper:#b86e46;--ph-felt:#0e4034;--ph-night:#10251f;--ph-edge:#61432f}
body.pilehead-playing .layout{max-width:1500px}
body.pilehead-playing .top{opacity:.88}
body.pilehead-playing .pitch{
 width:min(100%,1120px);display:flex;align-items:center;justify-content:space-between;
 padding:7px 12px 12px;gap:12px;
}
body.pilehead-playing .pitch h1{font-size:clamp(13px,1.4vw,18px);font-weight:850;letter-spacing:.015em}
body.pilehead-playing .pitch p{font-size:11px;letter-spacing:.035em}
body.pilehead-playing .table{
 background:
   radial-gradient(ellipse 46% 34% at 50% 48%,#52877330,transparent 93%),
   radial-gradient(ellipse 70% 75% at 52% 41%,#27645274,transparent 78%),
   repeating-linear-gradient(29deg,#d0e6be04 0 1px,transparent 1px 6px),
   radial-gradient(ellipse at 50% 40%,#194d3b,#0b372c 75%,#08291f 100%);
 box-shadow:0 25px 0 -15px #1a120e,0 38px 52px #0009,0 0 0 2px #a77e514f,
  inset 0 0 0 2px #cfaf75a8,inset 0 0 0 8px #173e2f,
  inset 0 14px 48px #030e0cbd,inset 0 -55px 80px #031710da;
}
body.pilehead-playing .table.is-active-turn{
 box-shadow:0 25px 0 -15px #1a120e,0 38px 52px #0009,0 0 0 2px #a77e514f,
  inset 0 0 0 2px #d8b97eb9,inset 0 0 0 8px #173e2f,
  inset 0 14px 48px #030e0cbd,inset 0 -55px 80px #031710da,0 0 40px #edc07d12;
}
body.pilehead-playing .table .stack[data-play-target]{
 background:radial-gradient(circle at 50% 48%,#e7ca8522 0%,#f6d99709 47%,transparent 78%);
 border:1px dashed #e5be785c;border-radius:28px;
 box-shadow:inset 0 0 0 1px #fff1c409;
}
body.pilehead-playing .table .stack[data-play-target].is-armed:after{
 content:"TAP TO PLAY";position:absolute;bottom:3px;font:800 9px/1 system-ui,sans-serif;
 letter-spacing:.15em;color:#fbd88e;pointer-events:none;
}
body.pilehead-playing .table .stack .pile-card .card-wrap:last-child{filter:drop-shadow(0 7px 8px #001c16b0)}
body.pilehead-playing .table .opponent.current{
 border-color:#f6d493;box-shadow:0 0 0 1px #f6d49365,0 0 32px #f1bf7c2b;
 background:linear-gradient(#1d453c,#0b302c);
}
body.pilehead-playing .table .opponent.current strong{color:#fff0c9}
body.pilehead-playing .table .opponent.finished{opacity:.58}
body.pilehead-playing .table .card-row.hand .card.selected{
 box-shadow:0 0 0 3px #ffd18b,0 18px 32px #071812de,0 0 23px #f4c17d39!important;
}
body.pilehead-playing .table .hand-area{background:linear-gradient(to bottom,transparent 0%,#0d302579 34%,#051811b8 100%)}
body.pilehead-playing .table .hand-area .area-label{justify-content:space-between;letter-spacing:.1em}
body.pilehead-playing .toolbar .primary:not(:disabled){
 background:linear-gradient(180deg,#ffe1ab,#efa66b);
}
body.pilehead-playing .message{max-width:800px;color:#e9d6b3}
.pilehead-table-hud{
 width:min(100%,1100px);margin:0 auto 9px;display:flex;
 align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;
 padding:7px 12px;border:1px solid #bdac8260;border-radius:12px;
 background:linear-gradient(110deg,#1d2923b8,#24221dbd);color:#f0dbaf;
 box-shadow:0 5px 17px #0003;
}
.pilehead-table-hud .hud-status{display:flex;align-items:center;gap:8px;font:800 12px/1.4 system-ui,sans-serif}
.pilehead-table-hud .hud-dot{width:7px;height:7px;border-radius:50%;background:#c5ae8c;box-shadow:0 0 0 3px #eec88718}
.pilehead-table-hud.is-my-turn .hud-dot{background:#bce9a4;box-shadow:0 0 0 4px #acd68d23}
.pilehead-table-hud .hud-meta{display:flex;gap:8px;flex-wrap:wrap;color:#c7c1ae;font:700 10px/1.4 system-ui,sans-serif}
.pilehead-table-hud .hud-meta span{background:#0b261eaf;padding:4px 8px;border:1px solid #a8b69a2f;border-radius:999px}
.pilehead-selection-note{
 display:inline-flex;align-items:center;gap:6px;color:#ffdf9a;font:800 11px system-ui,sans-serif;
 letter-spacing:.01em;
}
@media(max-width:700px){
 body.pilehead-playing .top{padding-bottom:5px}
 body.pilehead-playing .pitch{padding:4px 7px 8px;align-items:flex-start;gap:5px}
 body.pilehead-playing .pitch h1{font-size:12px}
 body.pilehead-playing .pitch p{font-size:9px}
 .pilehead-table-hud{padding:6px 9px;gap:5px;margin-bottom:7px}
 .pilehead-table-hud .hud-status{font-size:11px}
 .pilehead-table-hud .hud-meta{font-size:9px;gap:5px}
 .pilehead-table-hud .hud-meta span{padding:3px 6px}
}
/* FINAL HAND / cinematic result state */
.pilehead-result-backdrop{
 position:fixed;inset:0;z-index:2200;overflow-y:auto;
 display:flex;align-items:safe center;justify-content:center;
 background:radial-gradient(ellipse at 50% 45%,#29402eec,#071510f4 75%),#06110eee;
 padding:22px 12px max(22px,env(safe-area-inset-bottom));
 isolation:isolate;
}
.pilehead-result-backdrop .result-spotlight{
 position:fixed;inset:-22%;pointer-events:none;z-index:-1;
 background:conic-gradient(from 8deg at 50% 37%,transparent 0 4%,#dcb77709 5% 8%,transparent 12% 20%,#dcb77709 24% 29%,transparent 33% 46%,#dcb77712 52% 57%,transparent 62% 73%,#dcb7770b 76% 80%,transparent 85% 100%);
 opacity:.7;
}
.pilehead-result-backdrop .pilehead-result-panel{
 position:relative;overflow:visible;flex:0 1 560px;
 width:min(100%,560px);max-height:none;text-align:center;
 background:
  linear-gradient(#c9a97416 0 1px,transparent 1px calc(100% - 1px),#c9a97417 calc(100% - 1px)),
  radial-gradient(ellipse 95% 90% at 50% -20%,#346353,#163a30 60%,#0c2922 100%);
 border:1px solid #d9b67b;border-radius:22px;
 padding:0 clamp(17px,4vw,35px) clamp(21px,3vw,30px);
 box-shadow:0 0 0 7px #0b3027,0 0 0 8px #b9965e6b,0 22px 85px #000c,inset 0 0 0 2px #f0d39f19;
}
.pilehead-result-panel .result-head{
 display:flex;justify-content:space-between;align-items:center;gap:10px;
 border-bottom:1px solid #dac38a46;padding:16px 0 13px;color:#dfc79e;
 letter-spacing:.24em;font:850 10px/1.1 system-ui,sans-serif;
}
.pilehead-result-panel .result-head span:first-child{font-family:Georgia,serif;font-size:14px;letter-spacing:.08em}
.pilehead-result-panel .result-scene{
 position:relative;width:220px;height:175px;margin:-2px auto -3px;perspective:600px;
}
.pilehead-result-panel .result-scene-orbit{
 position:absolute;width:180px;height:125px;left:20px;top:24px;border:1px solid #d6b16e68;
 border-radius:50%;box-shadow:0 0 0 12px #f4cf7b08,0 0 48px #cf9e4f1b;
 transform:rotate(-18deg);
}
.pilehead-result-panel .result-fan-card{
 position:absolute;top:25px;left:65px;width:86px;height:118px;padding:0;display:flex;
 border-radius:7px;box-shadow:0 12px 23px #030e0cbf;overflow:hidden;
}
.pilehead-result-panel .result-fan-left{transform:translate(-38px,9px) rotate(-22deg)}
.pilehead-result-panel .result-fan-right{transform:translate(38px,9px) rotate(22deg)}
.pilehead-result-panel .result-fan-main{transform:translateY(-5px) rotate(-2deg)}
.pilehead-result-panel .result-fan-card .ph-back-plate{width:100%;height:100%}
.pilehead-result-panel .result-wreath{
 position:absolute;left:83px;top:72px;width:56px;height:56px;
 display:grid;place-items:center;border:2px solid #f5e4aa;border-radius:50%;
 background:radial-gradient(circle,#e7b96c,#8e512b);
 color:#fff2d6;font:900 32px/1 Georgia,serif;
 box-shadow:0 0 0 6px #d7ab6342,0 4px 21px #031b16d9;
 transform:rotate(-7deg);
}
.pilehead-result-panel .result-copy{margin:0 auto;max-width:465px}
.pilehead-result-panel .result-kicker{
 color:#e8c786;font:900 10px/1.3 system-ui,sans-serif;
 letter-spacing:.28em;margin-bottom:9px;
}
.pilehead-result-panel h2#pilehead-result-title{
 font:900 clamp(30px,7vw,52px)/1.02 Georgia,serif;
 letter-spacing:-.06em;color:#fff1ce;text-transform:uppercase;
 margin:0 0 13px;text-shadow:0 4px 23px #050e0bbb;
}
.pilehead-result-panel .result-lead{max-width:390px;margin:0 auto 19px;color:#d7e0cb;font-size:14px;line-height:1.6}
.pilehead-result-panel .result-winner{
 display:flex;align-items:center;justify-content:space-between;text-align:left;gap:12px;
 border-radius:9px;padding:13px 15px;background:#0a231c99;
 border:1px solid #d2ba805a;
}
.pilehead-result-panel .result-winner span{font:900 10px system-ui,sans-serif;color:#c6b389;letter-spacing:.15em}
.pilehead-result-panel .result-winner strong{display:inline;margin:0;font:900 clamp(16px,3.4vw,23px) Georgia,serif;color:#ffe1a1;overflow-wrap:anywhere}
.pilehead-result-panel .result-stats{
 display:grid;grid-template-columns:repeat(3,1fr);gap:0;padding:11px 0;
 color:#b9ccb6;font-size:10px;letter-spacing:.05em;border-bottom:1px solid #d0b17c40;
}
.pilehead-result-panel .result-stats span+span{border-left:1px solid #d0b17c30}
.pilehead-result-panel .result-stats b{display:block;font:900 22px Georgia,serif;color:#f3e1b8}
.pilehead-result-panel .result-rank-heading{
 display:flex;align-items:center;justify-content:space-between;gap:8px;
 margin:17px 0 9px;color:#e7d1a4;font:850 10px system-ui,sans-serif;letter-spacing:.14em;
}
.pilehead-result-panel .result-rank-heading span:last-child{color:#9eb5a6;font-size:9px;letter-spacing:.04em}
.pilehead-result-panel .result-ranking{display:grid;gap:6px;margin:0;padding:0;list-style:none}
.pilehead-result-panel .result-rank{
 display:flex;align-items:center;gap:11px;text-align:left;min-height:48px;
 background:#09241eb3;border:1px solid #bbab854a;border-radius:9px;
 padding:8px 11px;
}
.pilehead-result-panel .result-rank.is-champion{background:#6e54264d;border-color:#f1c77899}
.pilehead-result-panel .result-rank.is-pilehead{opacity:.83}
.pilehead-result-panel .result-position{
 width:38px;font:900 15px Georgia,serif;color:#f0cc86;letter-spacing:0;flex:none;
}
.pilehead-result-panel .result-person{display:flex;flex-direction:column;flex:1;min-width:0}
.pilehead-result-panel .result-person strong{font:800 13px system-ui,sans-serif;color:#f8f0d8;overflow-wrap:anywhere}
.pilehead-result-panel .result-person strong em{font:800 9px system-ui,sans-serif;color:#f1c984;letter-spacing:.08em;font-style:normal}
.pilehead-result-panel .result-person small{font:600 10px system-ui,sans-serif;color:#b7c8b8;margin-top:2px;text-transform:none}
.pilehead-result-panel .result-rank-symbol{font-size:19px;color:#f5c87c}
.pilehead-result-panel .result-actions{display:grid;grid-template-columns:1.3fr 1fr;gap:10px;margin-top:19px}
.pilehead-result-panel .result-actions .action{
 display:grid;place-items:center;width:100%;min-height:51px;margin:0;
 padding:9px 12px;text-decoration:none;white-space:normal;
 border-radius:11px;font:850 13px/1.2 system-ui,sans-serif;
}
.pilehead-result-panel .result-actions .action.primary{
 background:linear-gradient(180deg,#ffe0a5,#ed9b65);color:#372213;
 border-color:#ffdda1;box-shadow:0 3px 0 #885437;
}
.pilehead-result-panel .result-actions .action.secondary{background:#1f463a;color:#e6d3ac;border-color:#ae9d7559}
.pilehead-result-panel .result-footnote{color:#a6b6a1;margin:14px 0 0;font:600 10px/1.5 system-ui,sans-serif}
.result-confetti{position:fixed;inset:0;overflow:hidden;pointer-events:none}
.result-confetti i{
 position:absolute;top:-30px;left:var(--left);width:7px;height:13px;
 background:#efc574;border-radius:1px;opacity:0;
 animation:result-confetti-fall 3.25s linear var(--delay) 1 both;
 transform:rotate(12deg);
}
.result-confetti i:nth-child(3n){background:#f4e4c3;width:4px;height:9px}
.result-confetti i:nth-child(4n){background:#6ca98d;width:9px;height:10px}
.result-confetti i:nth-child(5n){background:#c17852;width:5px;height:14px}
@keyframes result-confetti-fall{
 0%{transform:translate3d(0,-25px,0) rotate(0deg);opacity:0}
 6%{opacity:1}
 84%{opacity:.94}
 100%{transform:translate3d(var(--drift),calc(100dvh + var(--travel)),0) rotate(var(--turn));opacity:0}
}
@media(prefers-reduced-motion:no-preference){
 .pilehead-result-panel .result-scene{animation:result-scene-reveal .7s cubic-bezier(.18,.76,.28,1.12) both}
 .pilehead-result-panel .result-wreath{animation:result-medal .7s .18s cubic-bezier(.2,.75,.25,1.12) both}
 @keyframes result-scene-reveal{from{transform:translateY(12px) scale(.87);opacity:.2}to{transform:translateY(0) scale(1);opacity:1}}
 @keyframes result-medal{from{transform:translateY(28px) scale(.5) rotate(-35deg);opacity:0}to{transform:translateY(0) scale(1) rotate(-7deg);opacity:1}}
}
@media(prefers-reduced-motion:reduce){
 .result-confetti i,.pilehead-result-panel,.pilehead-result-panel .result-wreath{animation:none!important;transition:none!important}
}
@media(max-width:520px){
 .pilehead-result-backdrop{align-items:flex-start;padding:10px 9px max(13px,env(safe-area-inset-bottom))}
 .pilehead-result-backdrop .pilehead-result-panel{padding:0 14px 17px;width:100%;border-radius:15px}
 .pilehead-result-panel .result-head{padding:12px 0 9px}
 .pilehead-result-panel .result-scene{height:150px;transform:scale(.88);transform-origin:top center;margin:0 auto -9px}
 .pilehead-result-panel .result-lead{font-size:12px;line-height:1.4;margin-bottom:12px}
 .pilehead-result-panel .result-ranking{gap:4px}
 .pilehead-result-panel .result-rank{min-height:42px;padding:7px 9px}
 .pilehead-result-panel .result-actions{margin-top:14px}
 .pilehead-result-panel .result-rank-heading{margin-top:13px}
}

/* Focus mode is intentionally reversible and preserves every game control. */
body.pilehead-focus .top{
 display:flex;align-items:center;justify-content:space-between;flex-wrap:nowrap;
 padding:3px 8px 7px;margin:0;border-color:#aa8c6138;
}
body.pilehead-focus .top .eyebrow{display:none}
body.pilehead-focus .top .brand{font-size:20px}
body.pilehead-focus .top .table-menu-toggle{display:none!important}
body.pilehead-focus .top .links{
 display:flex!important;position:static!important;width:auto!important;
 margin:0!important;padding:0!important;border:0!important;background:none!important;
 box-shadow:none!important;gap:0;
}
body.pilehead-focus .top .links > :not([data-fx-focus]){display:none!important}
body.pilehead-focus .top [data-fx-focus]{
 border:1px solid #b896645e;background:#302920a8;color:#e9d2a8;font-size:11px;
 padding:6px 10px;min-height:37px;display:inline-flex;align-items:center;
}
body.pilehead-focus .pitch,
body.pilehead-focus .online-room-tools,
body.pilehead-focus .meta,
body.pilehead-focus .event-list,
body.pilehead-focus .instructions{display:none!important}
body.pilehead-focus .layout{padding-top:3px}
body.pilehead-focus .table{min-height:clamp(570px,calc(100svh - 150px),1000px)}
body.pilehead-focus .pilehead-table-hud{margin-top:6px}
body.pilehead-focus .toolbar{margin-top:-6px}
body.pilehead-focus .message{margin-top:3px}
body.pilehead-focus .top:has([data-fx-focus]:focus-visible){outline:1px solid #d6b674}
@media(max-width:700px){
 body.pilehead-focus .layout{padding:2px 5px 11px}
 body.pilehead-focus .table{min-height:clamp(550px,calc(100svh - 160px),850px)}
 body.pilehead-focus .top{padding:2px 4px 5px}
 body.pilehead-focus .top .brand{font-size:19px}
}

/* The setup describes the exact table composition, including automated seats. */
.online-layout .online-seat-summary{
 max-width:100%;margin:3px 0 14px;
 padding:9px 12px;color:#d8f0c7;background:#103b31;
 border:1px solid #93ad845a;border-radius:10px;
 font:750 12px/1.4 system-ui,sans-serif;
}
.online-layout .online-seat-summary.is-invalid{color:#ffbbad;border-color:#e49a82}
.online-lobby .lobby-seat.is-bot{
 background:linear-gradient(145deg,#163b44,#153833);
 border:1px solid #83acb17d;
}
.online-lobby .lobby-seat.is-bot strong:before{content:"◈";color:#a8d8e0;margin-right:6px}
body.pilehead-playing .table .opponent.is-bot{border-style:dashed;border-color:#8dbcb26c}
.pilehead-result-panel .result-footnote a{
 color:#f1d299;text-decoration:underline;text-underline-offset:3px;
}

/* Readable, tactile feedback for effects, freshly drawn matches and exposed-card combos. */
.pilehead-effect-note{
 display:flex;align-items:flex-start;gap:11px;width:min(100%,880px);
 margin:9px auto 6px;padding:12px 16px;
 background:linear-gradient(105deg,#223f34ec,#122920ef);
 border:1px solid #d7b578a3;border-left:4px solid #eeb776;border-radius:12px;
 box-shadow:0 7px 20px #0005;
 color:#e7e6d4;font:650 12px/1.55 system-ui,sans-serif;
}
.pilehead-effect-note .effect-label{
 display:block;min-width:75px;color:#ffe5af;
 font:950 10px/1.5 system-ui,sans-serif;letter-spacing:.13em;
}
.pilehead-snap-choice,.pilehead-bridge-hint{
 width:min(100%,880px);margin:8px auto;padding:11px 14px;
 border-radius:11px;border:1px solid #edbd798c;
 background:radial-gradient(circle at 13% 30%,#e6b9763d,transparent 75%),#15392c;
 color:#f9e8c8;font:750 12px/1.6 system-ui,sans-serif;
}
.pilehead-snap-choice .action{
 display:inline-flex;min-height:36px;padding:7px 11px;margin-left:6px;
 border:1px solid #e3c9908e;background:#4d3f30;
 color:#ffecc7;font:800 11px system-ui,sans-serif;
}
.pilehead-bridge-hint{border-style:dashed;border-color:#bbd6a27f;background:#164134;color:#d9f0cb}
body.pilehead-playing .toolbar .snap:not(:disabled){
 background:linear-gradient(180deg,#f9d08c,#ce8b4e);
 color:#2a1b11;border:1.5px solid #ffe6b5;
 box-shadow:0 3px 0 #87472c,0 0 0 3px #e3a86e30;
 animation:pilehead-snap-breathe 1.45s ease-in-out infinite;
 font-weight:950;
}
body.pilehead-playing .toolbar .snap:disabled{
 display:none;
}
.pilehead-table-hud .hud-meta .hud-snap{
 color:#fff0ba;background:#67502ba8;border-color:#fbd28d9e;
}
@keyframes pilehead-snap-breathe{
 50%{box-shadow:0 3px 0 #87472c,0 0 0 7px #e7bd7c16}
}
body.pilehead-playing .table .pilehead-cue{
 pointer-events:none;min-width:clamp(170px,28vw,320px);
 border-radius:18px;padding:17px clamp(18px,4vw,34px);
 border:2px solid #ffe5ae;
 background:linear-gradient(150deg,#b15f3b,#663e2c);
 color:#fff4d7;text-shadow:0 2px 10px #432214;
 font-size:clamp(21px,3vw,43px);line-height:1.2;
 box-shadow:0 15px 60px #000c,0 0 0 9px #efbb7038;
}
@media(max-width:650px){
 .pilehead-effect-note{gap:8px;padding:10px 12px;font-size:11px}
 .pilehead-effect-note .effect-label{min-width:52px;font-size:9px}
 .pilehead-snap-choice,.pilehead-bridge-hint{font-size:11px;padding:10px}
 .pilehead-snap-choice .action{margin:7px 0 0}
 body.pilehead-playing .toolbar .snap:not(:disabled){flex:1 1 auto;font-size:12px}
}
@media(prefers-reduced-motion:reduce){
 body.pilehead-playing .toolbar .snap{animation:none!important}
}

/* Explain the selected special card before it is played. */
.pilehead-selected-effect{
 width:min(100%,880px);margin:8px auto 0;display:flex;align-items:center;
 gap:12px;padding:11px 15px;background:#243c3cd9;
 border:1px solid #8dbcb591;border-radius:12px;color:#e5efe6;
 font:700 12px/1.5 system-ui,sans-serif;
}
.pilehead-selected-effect strong{flex:none;font-size:10px;letter-spacing:.1em;color:#b9e9db}
@media(max-width:650px){.pilehead-selected-effect{align-items:flex-start;flex-direction:column;gap:4px}}

/* PHONE TABLE · NOVEMBER 2026
   Clear decisions, readable cards, content-driven felt. No gameplay DOM contracts change. */
body.pilehead-playing .toolbar.table-actions{
 display:flex;grid-template-columns:none;align-items:stretch;justify-content:stretch;
 flex-wrap:wrap;width:min(100%,780px);min-height:0;gap:7px;
}
body.pilehead-playing .table-actions .action{
 flex:1 1 auto;min-width:0;min-height:48px;
 white-space:normal;font-weight:900;
}
body.pilehead-playing .table-actions .primary{flex:2 1 170px}
body.pilehead-playing .table-actions .snap,
body.pilehead-playing .table-actions .slam{flex:1.5 1 140px}
body.pilehead-playing .table-actions .table-action-prompt{
 display:flex;flex:1;align-items:center;justify-content:center;flex-direction:column;gap:3px;
 min-height:44px;color:#ffe1a7;text-align:center;
 font:850 13px/1.25 system-ui,sans-serif;letter-spacing:.01em;
}
body.pilehead-playing .table-actions .table-action-prompt small{
 color:#bccbbb;font:650 10px/1.25 system-ui,sans-serif;
}
body.pilehead-playing .table .hand-controls{
 display:flex;align-items:center;justify-content:flex-end;gap:6px;min-width:0;
}
body.pilehead-playing .table .hand-clear-button{
 appearance:none;cursor:pointer;min-height:32px;padding:6px 9px;
 background:#684529;border:1px solid #e4b774;border-radius:9px;
 color:#f7e2b7;font:800 11px/1 system-ui,sans-serif;white-space:nowrap;
}
body.pilehead-playing .table .hand-clear-button:focus-visible{
 outline:3px solid #ffdf9d;outline-offset:2px;
}
body.pilehead-playing .table .area-label b{font:inherit;color:#dbcba7}
@media (max-width:700px) and (orientation:portrait){
 :root{--card-w:clamp(75px,21vw,89px);--card-h:clamp(106px,29vw,125px)}
 body.pilehead-playing .layout{padding:2px 5px max(14px,env(safe-area-inset-bottom))}
 body.pilehead-playing .top{padding:3px 8px 5px;min-height:40px;margin-bottom:0}
 body.pilehead-playing .top .brand{font-size:20px}
 body.pilehead-playing .top .eyebrow{display:none}
 body.pilehead-playing .top .table-menu-toggle{min-height:34px;padding:6px 10px}
 body.pilehead-playing .pitch{display:none}
 body.pilehead-playing .online-room-tools{
  margin:3px auto 5px;padding:4px 10px;min-height:32px;
  gap:6px;border-radius:10px;font-size:10px;
 }
 body.pilehead-playing .online-room-tools .action{
  min-height:30px;padding:5px 10px;font-size:10px;
 }
 body.pilehead-playing .online-room-tools>span:last-child{
  max-width:33%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
 }
 body.pilehead-playing .pilehead-table-hud{
  min-height:37px;margin:0 auto 7px;padding:7px 11px;
  border-radius:11px;gap:6px;flex-wrap:nowrap;
  background:linear-gradient(110deg,#253d2ee0,#1c2b25dd);
 }
 body.pilehead-playing .pilehead-table-hud .hud-status{
  font-size:12px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
 }
 body.pilehead-playing .pilehead-table-hud .hud-meta{
  display:flex;flex:none;gap:4px;align-items:center;white-space:nowrap;
 }
 body.pilehead-playing .pilehead-table-hud .hud-meta span{
  padding:4px 7px;font-size:9px;
 }
 body.pilehead-playing .pilehead-table-hud .hud-meta span:nth-child(2),
 body.pilehead-playing .pilehead-table-hud .hud-meta span:nth-child(3){display:none}
 body.pilehead-playing .table{
  min-height:0;height:auto;max-height:none;
  grid-template-rows:auto auto auto auto;
  gap:2px;overflow:hidden;
  padding:9px 7px 6px;border-width:5px;border-radius:23px;
  box-shadow:0 14px 0 -8px #1c1712,0 19px 30px #0008,inset 0 0 0 1px #d8bc84ad,inset 0 0 0 5px #173f2f;
 }
 body.pilehead-playing .table:before{inset:-7px;border-width:7px}
 body.pilehead-playing .table:after{inset:9px;border-radius:13px}
 body.pilehead-playing .table .opponents{
  width:100%;min-height:0;padding:1px 3px 2px;gap:3px;transform:none;
 }
 body.pilehead-playing .table .opponent{padding:0 1px;transform:none;min-width:0}
 body.pilehead-playing .table .opponent strong{
  max-width:100%;font-size:10px;padding:4px 9px;min-height:26px;
 }
 body.pilehead-playing .table .opponent small{
  font-size:9px;margin:2px auto 1px;line-height:1.2;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
 }
 body.pilehead-playing .table .held-cards{height:22px;min-height:22px;margin:1px auto 0;padding:1px 0 0}
 body.pilehead-playing .table .held-back{width:16px;height:22px;margin-left:-8px}
 body.pilehead-playing .table .mini-cards{height:27px;margin:1px auto 0;padding:0;transform:none}
 body.pilehead-playing .table .mini-cards .mini{
  width:19px;height:26px;min-width:10px;font-size:11px;margin-left:-8px;
 }
 body.pilehead-playing .table .table-center{
  min-height:160px;height:160px;align-self:center;
  width:100%;padding:0;gap:0;
  grid-template-columns:minmax(0,.8fr) minmax(122px,1.5fr) minmax(0,.8fr);
 }
 body.pilehead-playing .table .stack{padding:1px 0;min-height:0}
 body.pilehead-playing .table .stack-label{font-size:9px;letter-spacing:.12em}
 body.pilehead-playing .table .stack-count{font-size:10px;min-height:11px;margin-top:2px}
 body.pilehead-playing .table .stack .pile-card{height:98px;margin:4px auto 0}
 body.pilehead-playing .table .stack .pile-card .card{width:65px;height:92px}
 body.pilehead-playing .table .stack[data-play-target]{
  min-height:152px;padding:5px 0 2px;border-radius:19px;
 }
 body.pilehead-playing .table .stack[data-play-target]:before{inset:7px;border-radius:14px}
 body.pilehead-playing .table .stack[data-play-target] .stack-count:last-child{
  padding:4px 6px;margin-top:4px;font-size:10px;
 }
 body.pilehead-playing .table .stack:nth-child(3) .placeholder{width:62px;height:62px;font-size:24px}
 body.pilehead-playing .table .zone.your-up{
  min-height:0;padding:0 2px 3px;margin:0 auto;
 }
 body.pilehead-playing .table .zone .area-label{margin:0 0 2px;font-size:9px}
 body.pilehead-playing .table .zone .card-row{
  min-height:83px;padding:5px 2px 4px;gap:6px;align-items:flex-start;
 }
 body.pilehead-playing .table .zone .card{--card-w:55px;--card-h:77px}
 body.pilehead-playing .table .zone .up-pair{margin:0 1px}
 body.pilehead-playing .table .hand-area{
  min-height:0;align-self:auto;padding:2px 0 0;
  border-radius:0 0 13px 13px;
 }
 body.pilehead-playing .table .hand-area .area-label{
  margin:0;padding:5px 7px 2px;font-size:10px;letter-spacing:.05em;gap:5px;
 }
 body.pilehead-playing .table .hand-sort-button{
  min-height:30px;padding:5px 9px;font-size:11px;
 }
 body.pilehead-playing .table .hand-clear-button{
  min-height:30px;padding:5px 8px;font-size:10px;
 }
 body.pilehead-playing .table .card-row.hand{
  min-height:155px;max-height:none;
  padding:30px 10px 8px;align-items:flex-end;
  overflow-x:auto;overflow-y:hidden;
 }
 body.pilehead-playing .table .card-row.hand .card{
  --card-w:clamp(75px,21vw,89px);
  --card-h:clamp(106px,29vw,125px);
 }
 body.pilehead-playing .table .hand-area .pilehead-hand-hint{display:none}
 body.pilehead-playing .table .hand-area.hand-overflow{padding-bottom:36px!important}
 body.pilehead-playing .table .hand-scroll-arrow{bottom:3px!important;width:42px;height:30px;min-height:30px}
 body.pilehead-playing .toolbar.table-actions{
  position:sticky;bottom:max(7px,env(safe-area-inset-bottom));z-index:55;
  display:flex;grid-template-columns:none;flex-wrap:nowrap;
  width:calc(100% - 2px);max-width:100%;min-height:0;
  gap:7px;margin:8px auto 6px;padding:6px;border-radius:13px;
  background:linear-gradient(160deg,#292820f7,#19261ef9);
  box-shadow:0 9px 26px #0008,inset 0 1px 0 #f9dcaf25;
 }
 body.pilehead-playing .toolbar.table-actions .action{min-height:46px;font-size:13px;padding:8px 10px}
 body.pilehead-playing .toolbar.table-actions .primary{flex:2 1 180px}
 body.pilehead-playing .toolbar.table-actions .secondary,
 body.pilehead-playing .toolbar.table-actions .snap,
 body.pilehead-playing .toolbar.table-actions .slam{flex:1 1 auto}
 body.pilehead-playing .message{
  max-width:96%;margin:3px auto 1px;min-height:0;font-size:11px;
 }
 body.pilehead-playing .meta{display:none}
 body.pilehead-playing .event-list{margin:4px auto 6px}
 body.pilehead-playing .event-list .event{font-size:10px}
}
@media (max-width:360px) and (orientation:portrait){
 body.pilehead-playing .pilehead-table-hud .hud-meta span:first-child{display:none}
 body.pilehead-playing .table .opponent small{font-size:8px}
 body.pilehead-playing .table .zone .card{--card-w:51px;--card-h:72px}
 body.pilehead-playing .table .card-row.hand{min-height:148px}
 body.pilehead-playing .table .card-row.hand .card{--card-w:74px;--card-h:106px}
}
@media (max-height:700px) and (orientation:portrait) and (max-width:700px){
 body.pilehead-playing .table .table-center{min-height:148px;height:148px}
 body.pilehead-playing .table .stack[data-play-target]{min-height:143px}
 body.pilehead-playing .table .card-row.hand{min-height:146px}
 body.pilehead-playing .table .zone .card-row{min-height:78px}
}

/* Explain the result of the last move at the moment the next action is chosen.
   The selected action-card explanation takes priority over older move feedback. */
@media (max-width:700px) and (orientation:portrait){
 body.pilehead-playing .pilehead-selected-effect,
 body.pilehead-playing .pilehead-effect-note{
  display:flex;flex-direction:row;align-items:center;
  width:calc(100% - 8px);min-height:34px;
  margin:7px auto 2px;padding:7px 10px;
  gap:9px;border-radius:10px;
  font:650 11px/1.35 system-ui,sans-serif;
 }
 body.pilehead-playing .pilehead-effect-note .effect-label,
 body.pilehead-playing .pilehead-selected-effect strong{
  font:900 10px/1.25 system-ui,sans-serif;
  flex:0 0 auto;min-width:0;max-width:82px;
  letter-spacing:.05em;
 }
 body.pilehead-playing .pilehead-effect-note span:last-child,
 body.pilehead-playing .pilehead-selected-effect span{min-width:0}
 body.pilehead-playing .toolbar.table-actions{margin-top:5px}
}

/* Physical-card animations run in viewport space, so they survive DOM updates
   and never expose cards from an opponent's private hand. */
.pilehead-physical-fx{
 pointer-events:none!important;position:fixed!important;z-index:150!important;
 transform-origin:center center;backface-visibility:hidden;
 will-change:transform,opacity;contain:layout paint;
 filter:drop-shadow(0 9px 10px #03100cb8);
}
.pilehead-impact-particles{
 position:fixed;z-index:175;pointer-events:none;
 width:1px;height:1px;overflow:visible;
}
.pilehead-impact-particles i{
 position:absolute;left:-3px;top:-7px;width:6px;height:14px;
 border-radius:3px 3px 1px 1px;
 background:linear-gradient(#fff3c2,#ffae54,#c34c2d);
 box-shadow:0 0 9px #ffb86b;opacity:0;
 animation:pilehead-embers .72s ease-out var(--delay) both;
}
.pilehead-impact-particles.is-slam i{
 background:linear-gradient(#fff9d2,#d4f5bf,#6bd0ae);
 box-shadow:0 0 9px #a2ffd9;
}
@keyframes pilehead-embers{
 0%{opacity:0;transform:rotate(var(--angle)) translateY(0) scale(.3)}
 16%{opacity:1}
 65%{opacity:.96}
 100%{opacity:0;transform:rotate(var(--angle)) translateY(calc(0px - var(--radius))) scale(.16)}
}
body.pilehead-playing .table .pilehead-cue{
 pointer-events:none;max-width:min(80vw,440px);
 white-space:normal;overflow-wrap:break-word;
}
@media(max-width:700px){
 .pilehead-physical-fx{filter:drop-shadow(0 6px 7px #03100cb8)}
 body.pilehead-playing .table .pilehead-cue{
  padding:9px 11px;min-width:125px;max-width:68vw;
  border-width:1px;border-radius:12px;
  font-size:clamp(14px,3.8vw,22px);
  box-shadow:0 5px 18px #0009,0 0 0 5px #eeba7030;
 }
}
@media(prefers-reduced-motion:reduce){
 .pilehead-impact-particles i{animation:none!important;display:none!important}
 .pilehead-physical-fx{animation:none!important;transition:none!important}
}

/* Motion presentation control, in the existing table navigation. */
body.pilehead-playing .top .links .motion-toggle{
 border-color:#c7a77784;background:#203b32;color:#f5dcaf;
 min-height:37px;white-space:nowrap;
}
body.pilehead-playing .top .links .motion-toggle:focus-visible{
 outline:3px solid #ffd18d;outline-offset:2px;
}
body.pilehead-playing .top .links .motion-toggle:disabled{opacity:.7;cursor:not-allowed}
/* Cues live in viewport space so network rerenders never swallow them. */
.pilehead-cue.pilehead-cue-fixed{
 position:fixed!important;z-index:190!important;pointer-events:none!important;
 max-width:min(78vw,440px);min-width:0;
 white-space:normal;overflow-wrap:break-word;
 font-size:clamp(19px,4vw,41px);line-height:1.14;
 transform:translate(-50%,-50%);
}
.pilehead-quick-motion .pilehead-cue-fixed{animation-duration:.48s}
.pilehead-was-skipped{
 outline:3px solid #f0b4768a;outline-offset:3px;
 filter:grayscale(.55) brightness(.9);
 border-radius:12px;
}
@media(max-width:700px){
 .pilehead-cue.pilehead-cue-fixed{
  max-width:min(70vw,290px);padding:9px 12px;
  border-width:1px;border-radius:12px;
  font-size:clamp(14px,3.8vw,21px);
  box-shadow:0 6px 22px #000b,0 0 0 5px #eeba702c;
 }
}
@media(prefers-reduced-motion:reduce){
 .pilehead-was-skipped{transition:none!important}
 .pilehead-cue-fixed{animation:none!important}
}

/* Explicit Motion Off also disables decorative CSS animation, not only JS flights.
   Focus, selection, legal actions and accessible status text remain functional. */
body.pilehead-motion-off .table .card,
body.pilehead-motion-off .table .stack,
body.pilehead-motion-off .table .pilehead-cue,
body.pilehead-motion-off .table .zone .card,
body.pilehead-motion-off .table.scene-entering .card,
body.pilehead-motion-off .toolbar .slam,
body.pilehead-motion-off .result-confetti i,
body.pilehead-motion-off .pilehead-result-panel,
body.pilehead-motion-off .pilehead-result-panel .result-wreath{
 animation:none!important;transition:none!important;
}
body.pilehead-motion-off .result-confetti{display:none!important}

/* HAND STABILITY / NOV 2026
   The app reconstructs card DOM after authoritative moves. Never tween a
   newly mounted card from the un-fanned default transform to its settled fan:
   it looks like shaking, especially during bot turns and live polling.
   Motion is reserved for explicit plays, drags and the physical FX director. */
body.pilehead-playing .table .card-row.hand > .card{
 transition-property:box-shadow,filter!important;
 transition-duration:120ms!important;
 transition-timing-function:ease-out!important;
 animation:none!important;
}
@media (hover:none), (pointer:coarse){
 /* Mobile browsers may retain :hover after a tap. Do not lift an unselected
    card simply because its old DOM position is still under a finger. */
 body.pilehead-playing .table .card-row.hand > .card.playable:not(.selected):hover:not(:active){
  transform:translateY(var(--fan-rise,0px)) rotate(var(--fan-angle,0deg))!important;
  box-shadow:0 1px 0 #ffffffbd inset,0 3px 0 #a89a7d,0 8px 16px #021913b3!important;
 }
}
@media(prefers-reduced-motion:reduce){
 body.pilehead-playing .table .card-row.hand > .card{
  transition:none!important;animation:none!important;
 }
}

/* PILEHEAD / PRODUCTION GAMEPLAY SYSTEM · 2026-11-18
   Priority: turn → rule → cards → action. Deliberately calm typography, one
   physical felt surface, no decorative idle-card motion. */
:root{
 --ph-ui-paper:#f5ead1;
 --ph-ui-muted:#c9d5c5;
 --ph-ui-amber:#efbd77;
 --ph-ui-border:#d2b88a88;
 --ph-ui-shadow:#02120ed1;
 --ph-ui-teal:#184c3e;
}
body.pilehead-playing .layout{max-width:1260px}
body.pilehead-playing .pitch{display:none!important}
body.pilehead-playing .pilehead-table-hud{
 display:flex;align-items:center;justify-content:space-between;gap:16px;
 width:min(100%,1120px);margin:3px auto 12px;
 padding:11px 16px;min-height:64px;border-radius:16px;
 background:linear-gradient(115deg,#143b31,#132b26);
 border:1px solid #c0ad7b77;box-shadow:0 6px 22px #0004;
}
body.pilehead-playing .pilehead-table-hud .hud-main{
 display:flex;flex-direction:column;justify-content:center;gap:5px;
 min-width:0;flex:1 1 320px;
}
body.pilehead-playing .pilehead-table-hud .hud-status{
 display:flex;align-items:center;gap:9px;
 font:850 clamp(13px,1.4vw,17px)/1.1 system-ui,sans-serif;
 letter-spacing:.035em;white-space:nowrap;color:#f5ead1;
}
body.pilehead-playing .pilehead-table-hud.is-my-turn{
 border-color:#e9bd77;background:linear-gradient(110deg,#22483b,#162d27);
 box-shadow:0 0 0 1px #edc68639,0 6px 24px #0005;
}
body.pilehead-playing .pilehead-table-hud.is-my-turn .hud-status{color:#ffe8b9}
body.pilehead-playing .pilehead-table-hud .hud-guidance{
 font:650 clamp(11px,1.2vw,13px)/1.4 system-ui,sans-serif;
 letter-spacing:0;color:#c8d7c7;white-space:normal;
}
body.pilehead-playing .pilehead-table-hud .hud-meta{
 display:flex;align-items:center;justify-content:flex-end;flex:0 1 auto;
 flex-wrap:wrap;gap:6px;min-width:0;
}
body.pilehead-playing .pilehead-table-hud .hud-meta span{
 display:inline-flex;justify-content:center;align-items:center;
 min-height:28px;padding:6px 9px;border:1px solid #c7b68e55;
 border-radius:999px;background:#08251f8c;
 font:850 10px/1 system-ui,sans-serif;letter-spacing:.04em;
 color:#dce0c8;white-space:nowrap;
}
body.pilehead-playing .pilehead-table-hud .hud-meta .hud-rule{
 background:#e7cb9959;color:#fff0cd;border-color:#edcb84a0;
}
body.pilehead-playing .pilehead-table-hud .hud-meta .hud-urgent{
 background:#994b2c;color:#fff1d9;border-color:#fac08b;
}
body.pilehead-playing .online-room-tools{
 display:flex;flex-wrap:nowrap;justify-content:space-between;
 align-items:center;gap:10px;max-width:1120px;
 margin:0 auto 9px;padding:7px 12px;min-height:45px;
 border-radius:12px;background:#122b25bd;
}
body.pilehead-playing .online-room-tools .room-identity{
 display:flex;align-items:center;gap:7px;min-width:0;white-space:nowrap;
 color:#dfe8cf;font-weight:650;
}
body.pilehead-playing .online-room-tools .room-identity strong{
 color:#ffddb0;letter-spacing:.1em;font-size:12px;
}
body.pilehead-playing .online-room-tools .room-invite{
 border:1px solid #d9c39391;background:#355442;
 min-height:36px;padding:7px 15px;font-size:12px;white-space:nowrap;
}
body.pilehead-playing .online-room-tools .room-invite:focus-visible,
body.pilehead-playing .online-room-tools .room-invite:hover{
 background:#46634b;border-color:#ffe0aa;
}
body.pilehead-playing .online-room-tools .my-seat{
 max-width:32%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
 color:#d2dccc;font-weight:650;
}
body.pilehead-playing .table{
 width:min(100%,1120px);margin-inline:auto;isolation:isolate;
}
body.pilehead-playing .table .stack[data-play-target]{
 min-width:0;touch-action:manipulation;outline-offset:4px;
}
body.pilehead-playing .table .stack[data-play-target]:focus-visible{
 outline:3px solid #ffe2a8;outline-offset:4px;
}
body.pilehead-playing .table .hand-area .area-label{
 color:#f3dfbd;font-size:11px;
}
body.pilehead-playing .table .hand-controls{gap:8px}
body.pilehead-playing .table .hand-sort-button,
body.pilehead-playing .table .hand-clear-button{
 min-height:42px;min-width:62px;
 border:1px solid #d7bd8c9d;border-radius:10px;
 padding:8px 12px;line-height:1.1;
}
body.pilehead-playing .table .hand-clear-button{
 color:#fff0ce;background:#65472f;
}
body.pilehead-playing .table .hand-sort-button:focus-visible,
body.pilehead-playing .table .hand-clear-button:focus-visible{
 outline:3px solid #ffe2a8;outline-offset:3px;
}
body.pilehead-playing .table .card-row.hand>.card{
 /* Resting cards stay still; explicit selected/focus transforms are immediate. */
 transition-property:box-shadow,filter!important;
 animation:none!important;
}
body.pilehead-playing .toolbar.table-actions{
 display:flex;justify-content:center;align-items:stretch;gap:9px;
 max-width:840px;width:calc(100% - 10px);
 margin:10px auto;padding:8px;border-radius:15px;
 background:linear-gradient(155deg,#342f26ef,#152922fa);
 border:1px solid #aa98736f;box-shadow:0 7px 22px #0006;
}
body.pilehead-playing .toolbar.table-actions .action{
 min-height:54px;min-width:0;flex:1 1 120px;
 border-radius:11px;font:850 15px/1.1 system-ui,sans-serif;
 white-space:normal;
}
body.pilehead-playing .toolbar.table-actions .primary{flex:2 1 230px}
body.pilehead-playing .toolbar.table-actions .table-action-prompt{
 color:#f8dfaa;font:800 13px/1.4 system-ui,sans-serif;
 min-height:50px;padding:5px 12px;
}
body.pilehead-playing .toolbar.table-actions .table-action-prompt small{
 font:650 11px/1.35 system-ui,sans-serif;color:#c2d1c3;
}
body.pilehead-playing .pilehead-selected-effect,
body.pilehead-playing .pilehead-effect-note{
 width:min(100%,840px);margin:9px auto 0;
 min-height:48px;box-shadow:none;
 background:#143328e8;border:1px solid #c9ae7a7a;border-left:3px solid #e7bb7f;
 border-radius:12px;padding:11px 14px;
}
body.pilehead-playing .pilehead-selected-effect strong,
body.pilehead-playing .pilehead-effect-note .effect-label{
 color:#ffe1a6;letter-spacing:.04em;
}
body.pilehead-playing .move-history{
 width:min(100%,840px);margin:8px auto 16px;
 border:1px solid #8f977368;border-radius:11px;
 background:#0e2c25bf;color:#cbd5bf;
}
body.pilehead-playing .move-history summary{
 display:flex;align-items:center;justify-content:space-between;
 padding:12px 14px;min-height:46px;cursor:pointer;
 font:750 12px/1.3 system-ui,sans-serif;list-style:none;
}
body.pilehead-playing .move-history summary::-webkit-details-marker{display:none}
body.pilehead-playing .move-history summary:before{
 content:'▸';margin-right:9px;color:#e8c68c;
}
body.pilehead-playing .move-history[open] summary:before{content:'▾'}
body.pilehead-playing .move-history summary span{
 margin-left:auto;color:#a7c5b1;font-size:11px;
}
body.pilehead-playing .move-history summary:focus-visible{
 outline:3px solid #f6d39c;outline-offset:2px;
}
body.pilehead-playing .move-history .event-list{
 margin:0;padding:9px 12px 14px;
 border-top:1px solid #b3b68a44;
 justify-content:flex-start;flex-wrap:wrap;
}
body.pilehead-playing .connection-banner{
 display:flex;flex-wrap:wrap;align-items:center;gap:10px;
 width:min(100%,840px);margin:10px auto;padding:12px 14px;
 background:#5d2b25;border:1px solid #f3b390;
 border-radius:12px;color:#fff1d8;
 font:650 12px/1.5 system-ui,sans-serif;
}
body.pilehead-playing .connection-banner strong{font-weight:900}
body.pilehead-playing .connection-banner span{flex:1 1 180px}
body.pilehead-playing .connection-banner .action{
 min-height:44px;background:#7a4231;border-color:#f4ba91;color:#fff7df;
}
body.pilehead-focus .move-history{display:none!important}
@media(max-width:700px){
 body.pilehead-playing .pilehead-table-hud{
  gap:8px;flex-wrap:nowrap;min-height:61px;padding:9px 11px;
  border-radius:12px;margin-bottom:7px;
 }
 body.pilehead-playing .pilehead-table-hud .hud-main{flex:1 1 auto;gap:4px}
 body.pilehead-playing .pilehead-table-hud .hud-status{
  font-size:13px;overflow:hidden;text-overflow:ellipsis;
 }
 body.pilehead-playing .pilehead-table-hud .hud-guidance{
  font-size:10px;line-height:1.35;
 }
 body.pilehead-playing .pilehead-table-hud .hud-meta{
  flex:0 0 auto;gap:4px;justify-content:flex-end;
 }
 body.pilehead-playing .pilehead-table-hud .hud-meta span{
  display:none!important;
 }
 body.pilehead-playing .pilehead-table-hud .hud-meta .hud-rule,
 body.pilehead-playing .pilehead-table-hud .hud-meta .hud-urgent{
  display:inline-flex!important;min-height:27px;
  padding:6px 8px;font-size:9px;
 }
 body.pilehead-playing .online-room-tools{
  min-height:38px;padding:5px 8px;gap:5px;font-size:10px;
 }
 body.pilehead-playing .online-room-tools .room-identity strong{font-size:11px}
 body.pilehead-playing .online-room-tools .room-invite{padding:7px 9px;min-height:38px;font-size:11px}
 body.pilehead-playing .online-room-tools .my-seat{max-width:30%}
 body.pilehead-playing .table{
  border-radius:22px;
 }
 body.pilehead-playing .table .hand-area .area-label{font-size:10px}
 body.pilehead-playing .table .hand-sort-button,
 body.pilehead-playing .table .hand-clear-button{
  min-height:38px;min-width:52px;padding:7px 9px;font-size:11px;
 }
 body.pilehead-playing .toolbar.table-actions{
  position:sticky;bottom:max(7px,env(safe-area-inset-bottom));
  z-index:55;gap:6px;padding:7px;
  margin:7px auto 5px;
  border-radius:13px;flex-wrap:wrap;
 }
 body.pilehead-playing .toolbar.table-actions .action{
  min-height:50px;font-size:13px;
 }
 body.pilehead-playing .pilehead-selected-effect,
 body.pilehead-playing .pilehead-effect-note{
  min-height:40px;padding:9px 11px;font-size:11px;
 }
 body.pilehead-playing .move-history{margin-top:7px;margin-bottom:14px}
 .online-lobby .setup{padding:15px}
 .online-lobby .setup-ready-controls .action{min-height:48px}
}
@media(max-width:380px){
 body.pilehead-playing .pilehead-table-hud .hud-rule{font-size:8px!important}
 body.pilehead-playing .online-room-tools .my-seat{display:none}
 body.pilehead-playing .toolbar.table-actions .action{min-height:48px}
}
@media(prefers-reduced-motion:reduce){
 body.pilehead-playing .toolbar.table-actions .action,
 body.pilehead-playing .move-history summary{transition:none!important}
}

/* Stable live announcements are intentionally outside the rerendered game root. */
.visually-hidden{
 position:absolute!important;width:1px!important;height:1px!important;
 padding:0!important;margin:-1px!important;overflow:hidden!important;
 clip:rect(0,0,0,0)!important;white-space:nowrap!important;
 border:0!important;clip-path:inset(50%)!important;
}
/* Room preparation: participants can see whether the host is waiting on them. */
.online-lobby .lobby-progress{
 display:flex;align-items:center;justify-content:space-between;
 flex-wrap:wrap;gap:8px;margin:14px 0 9px;padding:11px 13px;
 border-radius:12px;border:1px solid #c5b68b7a;
 background:linear-gradient(110deg,#214b3b,#13382e);
 text-align:left;color:#e3e9d0;
}
.online-lobby .lobby-progress strong{
 font:850 15px/1.2 system-ui,sans-serif;color:#ffe1aa;
}
.online-lobby .lobby-progress span{
 font:650 12px/1.4 system-ui,sans-serif;color:#c6dac8;
}
.online-lobby .lobby-seats{margin-top:9px}
.online-lobby .lobby-seat{
 min-width:0;gap:5px;padding:11px;
 border-radius:12px;
}
.online-lobby .lobby-seat strong{
 min-width:0;overflow-wrap:anywhere;font-size:14px;
}
.online-lobby .setup-ready-controls{
 border-top:1px solid #dfc18b55;padding-top:15px;
}
.online-lobby .setup-ready-controls .action{min-height:48px}
.online-lobby .card-row .card:focus-visible{
 outline:3px solid #ffd592;outline-offset:3px;
}
@media(max-width:600px){
 .online-lobby .lobby-progress{flex-direction:column;align-items:flex-start}
 .online-lobby .lobby-seats{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
 .online-lobby .setup-choice-guide{font-size:12px;padding:11px 12px}
}

/* Permanent room problems are not connection failures. Keep a distinct action
   and never imply that Retry can repair incompatible or expired game state. */
.online-layout .room-issue{
 display:flex;align-items:center;flex-wrap:wrap;gap:12px;
 width:min(100%,840px);margin:12px auto;padding:14px 16px;
 border-radius:13px;border:1px solid #ddac75;
 background:linear-gradient(115deg,#4d3826,#372c24);
 color:#f6e6c7;font:650 12px/1.5 system-ui,sans-serif;
}
.online-layout .room-issue strong{font-size:13px;color:#ffe1ab}
.online-layout .room-issue span{flex:1 1 220px}
.online-layout .room-issue a.action{
 display:inline-flex;align-items:center;justify-content:center;
 color:#2b2419;background:#f3cc88;border:1px solid #ffdfac;
 text-decoration:none;min-height:44px;padding:9px 13px;
}
.online-layout .room-issue a.action:focus-visible{outline:3px solid #f9d29d;outline-offset:3px}
@media(max-width:600px){
 .online-layout .room-issue{align-items:flex-start;flex-direction:column;padding:12px}
 .online-layout .room-issue span{flex:none}
 .online-layout .room-issue a.action{width:100%}
}
