.game-shell.theme-toss {
  --toss-line:#a4a78e;
}

.page-game .game-shell.theme-toss .play > .toss-grid {
  width:min(100%,34rem); aspect-ratio:1; margin:0 auto;
  padding:clamp(.42rem,1.05vw,.88rem); gap:2px;
  border:clamp(.43rem,1.15vw,1rem) solid #b4722d; border-radius:clamp(.72rem,1.55vw,1.35rem);
  background:#f0dfb0;
  background-clip:padding-box;
  box-shadow:inset 0 0 0 clamp(.38rem,1vw,.84rem) #56371c,0 .3rem 0 #7f4a26,0 1rem 2rem -.63rem #63462c8c;
  position:relative; isolation:isolate;
}
.toss-grid::before {
  content:""; position:absolute; pointer-events:none; z-index:-1;
  inset:calc(clamp(.43rem,1.15vw,1rem) * -1); border-radius:inherit;
  background:var(--throwing-wood);
  border:1px solid #986027; box-shadow:inset 0 0 0 2px #f1c17580,inset 0 0 3px 6px #8b4e2138;
  mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);
  mask-composite:exclude; padding:clamp(.43rem,1.15vw,1rem);
}
.game-shell.theme-toss .toss-grid button {
  border:0; border-radius:0; padding:0; opacity:1;
  background:
    radial-gradient(circle closest-side,#fff0 44%,#c1d49b37 45% 46.5%,#fff0 48% 69%,#c1d49b44 70% 71.5%,#fff0 73%),
    repeating-linear-gradient(123deg,#ffffff0b 0 1px,#00000006 1px 3px,transparent 4px 6px),#163e2c;
  color:#fff1cb;
}
.game-shell.theme-toss .toss-grid button:enabled:hover { background-color:#28563a; box-shadow:inset 0 0 0 2px #f9dc91 }
.game-shell.theme-toss .toss-grid button.is-winning { background-color:#50633a; box-shadow:inset 0 0 0 3px #ffcf6f }
.game-shell.theme-toss .toss-grid button:focus-visible { outline:3px solid #ffc66b; outline-offset:-4px; z-index:1 }
.game-shell.theme-toss .toss-grid .toss-position {
  position:absolute; inset:clamp(.28rem,.75vw,.65rem) auto auto clamp(.34rem,.75vw,.72rem);
  color:#fff1cb; font-weight:850; font-size:clamp(.78rem,2.2vmin,1.4rem);
}
.theme-toss .paper-ball {
  width:66%; color:#173d27; font-size:clamp(1.9rem,6.7vmin,5rem); font-weight:900;
  background-image:url("paper-ball.webp"); filter:drop-shadow(3px 7px 4px #051d15a6) sepia(.17);
  text-shadow:0 1px #fff5d6;
}
.theme-toss .paper-team-1 { color:#a4390e }

.theme-toss .toss-console { width:100%; min-width:0; text-align:start; color:var(--toss-ink) }
.game-shell.theme-toss .toss-console .session-banner { margin:0; text-align:start; padding:0 }
.game-shell.theme-toss .toss-console .session-banner h2 {
  text-align:start; color:var(--toss-ink); margin:.3rem 0 0; line-height:1.04;
  font-size:clamp(1.9rem,4.2vw,4.2rem); letter-spacing:-.035em;
}
.game-shell.theme-toss .toss-console p { max-width:none; margin:.55rem 0; text-align:start; line-height:1.45 }
.game-shell.theme-toss .toss-console :is(.meta,.arena-tally) { color:var(--toss-ink); font-weight:780 }
.theme-toss .toss-record,.theme-toss .toss-first { color:var(--toss-muted); font-size:.92rem }
.toss-throw-progress { display:grid; grid-template-columns:repeat(12,minmax(0,1fr)); gap:.35rem; justify-items:center; padding:.35rem 0 .7rem }
.toss-throw-progress i { display:block; width:min(100%,.92rem); aspect-ratio:1; border:1px solid #56735b; border-radius:50% }
.toss-throw-progress .is-used { background:var(--toss-ink) }
.game-shell.theme-toss .toss-console .toss-score {
  display:flex; justify-content:space-between; align-items:center; gap:.6rem; flex-wrap:wrap;
  padding:.55rem 0; border-block:1px solid var(--toss-line); font-weight:750;
}
.toss-score-values { display:flex; align-items:center; gap:clamp(.35rem,1.3vw,.9rem) }
.toss-score-values strong { font-size:clamp(1.45rem,2.55vw,2.4rem); font-variant-numeric:tabular-nums }
.toss-score-values i { font-style:normal; font-size:1.55rem; line-height:1 }
.toss-score-values i:last-child { color:#aa4614 }
.game-shell.theme-toss .toss-console .actions { justify-content:flex-start; flex-wrap:wrap; gap:.45rem; margin:.75rem 0 }
.game-shell.theme-toss .toss-console .actions .button {
  min-height:44px; white-space:normal; color:var(--toss-ink); border-color:#668171; background:#fff8ea;
}
.game-shell.theme-toss .toss-console .actions :is([data-action="field:miss"],[data-action^="next:"]) {
  flex-basis:100%; color:#23321b; border-color:#b7742d; background:var(--toss-orange); font-weight:800;
}
.game-shell.theme-toss .toss-console .actions :is([data-action="field:miss"],[data-action^="next:"]):hover { background:#f4b461 }
.theme-toss :is(.toss-log,.toss-rounds) {
  margin-top:.8rem; background:transparent; border:0; border-top:1px solid var(--toss-line);
  border-radius:0; padding:.55rem 0; text-align:start;
}
.theme-toss :is(.toss-log,.toss-rounds) summary { color:var(--toss-ink); font-weight:700 }
.theme-toss :is(.toss-log,.toss-rounds) li { padding:.25rem 0; font-size:.9rem; overflow-wrap:anywhere }
@media(prefers-reduced-motion:no-preference){
  .theme-toss .toss-grid button { transition:background-color .15s,box-shadow .15s }
}
@media(min-width:760px){
  .page-game .game-shell.theme-toss .play:has(> .toss-console) {
    display:grid; grid-template-columns:minmax(0,1.32fr) minmax(0,1fr); grid-template-rows:auto;
    gap:clamp(1.2rem,4vw,4rem); align-content:start; align-items:start; padding-top:clamp(1rem,3vh,2rem);
  }
  .page-game .game-shell.wide.theme-toss .play > .toss-grid {
    grid-area:1 / 1 / 2 / 2; width:min(100%,calc(100dvh - 140px),47rem);
  }
  .page-game .game-shell.wide.theme-toss .play > .toss-console { grid-area:1 / 2 / 2 / 3; align-self:start }
}
@media(max-width:759px){
  .page-game .game-shell.theme-toss .play:has(> .toss-console) { padding-top:.85rem; justify-content:flex-start }
  .theme-toss .toss-console { margin:.85rem auto 0 }
}
