/* Dane’s Kitchen - 57Beef */
/* 57Beef game kit v2 styles (copied into each kit game's game.css at build time).
   Only what the game area needs: the site's own stylesheet already draws the top bar, the pause menu,
   the How to play sheet and the buttons inside them. Rules are wrapped in :where(...) so they never
   outweigh the game's own main.css, which comes after this file. */
main.kit-stage { display: flex; align-items: center; justify-content: center; padding-bottom: env(safe-area-inset-bottom); }
main.kit-stage:focus { outline: none; }
[hidden] { display: none !important; }
:where(.kit-stage) .play { position: relative; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
/* buttons inside the game area and the end box */
:where(.kit-stage, .kit-end) .btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; padding: 8px 16px; border-radius: 10px;
  border: 1px solid var(--outline); background: var(--surface-2); color: var(--text); font: 600 17px var(--sans); text-decoration: none; cursor: pointer; touch-action: manipulation; }
:where(.kit-stage, .kit-end) .btn:hover { filter: brightness(1.12); }
:where(.kit-stage, .kit-end) .btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
:where(.kit-stage) .btn[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
:where(.kit-stage, .kit-end) .btn:disabled { opacity: .5; cursor: default; }
:where(.kit-stage, .kit-end) .stack { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
:where(.kit-stage) .row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
:where(.kit-stage, .kit-end) .small { font-size: 14px; }
:where(.kit-stage, .kit-end) .dim { color: var(--text-dim); }
/* end-of-round box (a site sheet made by the kit) */
dialog.kit-end .dlg-title { margin: 0 0 8px; font: 600 24px/1.2 var(--serif); }
dialog.kit-end .end-line { margin: 4px 0; font-size: 20px; font-variant-numeric: tabular-nums; }
dialog.kit-end .stack .btn { margin-top: 0; }
/* How to play: the game's own drawn picture and picture figures */
.help-art { display: block; width: 100%; max-width: 300px; aspect-ratio: 2 / 1; margin: 0 auto 12px; background: var(--bg); border-radius: 10px; }
.howto-figs img { display: block; width: 132px; height: 96px; object-fit: contain; background: #15110d; border: 1px solid var(--line); border-radius: var(--radius); }
/* title / overlay screens inside the game area */
:where(.kit-stage) .screen { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  padding: 16px; text-align: center; background: rgba(20, 17, 15, .94); overflow: auto; }
:where(.kit-stage) .screen[hidden] { display: none; }
:where(.kit-stage) .screen h2 { margin: 0; font: 700 32px/1.15 var(--serif); color: var(--accent); }
:where(.kit-stage) .screen p { margin: 0; max-width: 340px; color: var(--text-dim); }
:where(.kit-stage) .opt { display: flex; flex-direction: column; align-items: center; gap: 4px; }
:where(.kit-stage) .opt-label { font-size: 14px; color: var(--text-dim); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
:where(.kit-stage) .opt .row .btn { min-width: 64px; padding: 6px 12px; font-size: 15px; }
:where(.kit-stage) .hud { font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { .kit-stage *, .kit-end * { transition-duration: 1ms !important; animation-duration: 1ms !important; } }
.reduce .kit-stage *, .reduce .kit-end * { transition-duration: 1ms !important; animation-duration: 1ms !important; }

/* game */
.play { position: relative; display: flex; flex-direction: column; align-items: center; width: 100%; height: 100%; padding: 4px 8px 8px; gap: 4px; }
.top { display: flex; align-items: center; gap: 8px; width: 100%; max-width: 560px; min-height: 0; }
.dane { display: block; }
#dane-host { width: 72px; height: 78px; flex: 0 0 auto; }
.bubble { position: relative; flex: 1 1 auto; background: #fff6ee; color: #2a1820; border-radius: 14px; padding: 6px 12px; font-size: 15px; line-height: 1.25; box-shadow: 0 3px 10px rgba(0,0,0,.4); display: flex; flex-direction: column; }
.bubble::before { content: ""; position: absolute; left: -9px; top: 50%; margin-top: -8px; border: 8px solid transparent; border-right-color: #fff6ee; border-left: 0; }
.bubble .sig { align-self: flex-end; font-size: 12px; color: #b0306a; font-weight: 700; font-style: italic; }
.bubble.pop { animation: pop 260ms ease-out; }
@keyframes pop { 40% { transform: scale(1.05); } }
.reduce .bubble.pop { animation: none; }
.hud { display: flex; gap: 12px; align-items: center; color: var(--text-dim); font-size: 14px; flex-wrap: wrap; justify-content: center; }
.dname { color: #ff8ec0; font-weight: 700; }
.btn.sm { padding: 3px 10px; font-size: 14px; min-height: 32px; }
.instr { margin: 0; font-weight: 700; font-size: 17px; color: var(--text); text-align: center; min-height: 1.3em; }
.board { position: relative; flex: 1 1 auto; min-height: 0; width: 100%; display: flex; align-items: center; justify-content: center; }
#cv { display: block; touch-action: none; border-radius: 16px; box-shadow: 0 6px 18px rgba(0,0,0,.5); cursor: pointer; user-select: none; -webkit-user-select: none; }
.result { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 3; background: rgba(28,20,26,.95); border: 2px solid #ff8ec0; border-radius: 16px; padding: 14px 18px; text-align: center; min-width: 220px; }
.result[hidden] { display: none; }
.rscore { margin: 0; font: 800 34px var(--sans); color: var(--accent); }
.rline { margin: 4px 0 10px; color: var(--text); }
.screen { background: radial-gradient(circle at 50% 30%, #3a2232 0%, #1a1418 70%); }
.screen h2 { color: #ff8ec0; }
.dane.big { width: 150px; height: 170px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; width: 100%; max-width: 680px; }
.card { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; min-height: 74px; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--outline); background: var(--surface-2); color: var(--text); font: 600 16px var(--sans); cursor: pointer; }
.card:disabled { opacity: .45; cursor: default; }
.card small { font-weight: 400; font-size: 13px; color: var(--text-dim); }
.card .md { font-size: 13px; font-weight: 700; }
.md.gold { color: #ffd34a; } .md.silver { color: #d6dde6; } .md.bronze { color: #e0a070; } .md.none { color: var(--text-dim); }
.medal { width: 72px; height: 72px; }
.steps { margin: 0; padding-left: 20px; text-align: left; color: var(--text-dim); font-size: 14px; }
@media (min-width: 700px) { #dane-host { width: 92px; height: 100px; } .bubble { font-size: 17px; } .dane.big { width: 190px; height: 216px; } }
@media (max-height: 640px) { .dane.big { width: 110px; height: 125px; } }
.dane.big { width: 180px; height: 205px; }
@media (min-width: 900px) { #dane-host { width: 124px; height: 134px; } .dane.big { width: 230px; height: 262px; } }
@media (max-height: 640px) { .dane.big { width: 110px; height: 125px; } }
#picker, #practice { justify-content: flex-start; }
