/* Game pages: the hero and the start screen (game pages designer, 2026-10-24; review items 6 and 8).
   Loaded only on pages with a game banner (site/game_page.py). The banner markup is reworked by game_page.apply(); the
   start screen (.kst) is drawn by kg-gamepage.js on pages with the role dealer. Calm mode (html.calm) and reduced motion
   hold everything still. Colours: the Keyhole gold for the one main button, the game's own colour on its art and tiles. */

/* ---------- the hero: one main button, How to play as a link, Share as an icon, the facts as chips ---------- */
.kgp .gb-ctas { align-items: center; gap: 0.4rem 1.2rem; }
.btn.kgp-go { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem; width: auto; margin: 0; min-height: 3.25rem;
  padding: 0.7rem 1.6rem; border-radius: 0.6rem; border: 1px solid #6b4d10; color: #2a1c04; font-weight: 800; font-size: 1.08rem; letter-spacing: 0.01em;
  background: linear-gradient(180deg, #f7cf6b 0%, #e3a72f 55%, #c98d1c 100%); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.45) inset, 0 -2px 0 rgba(0, 0, 0, 0.18) inset, 0 6px 0 #6b4d10, 0 12px 26px rgba(0, 0, 0, 0.45);
  text-decoration: none; transition: transform 120ms ease, box-shadow 120ms ease, filter 160ms ease; }
.btn.kgp-go.kgp-play::before, .kst-launch .btn.kgp-go::before { content: ""; width: 1.3rem; height: 1.3rem; flex: none; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24' fill='none' stroke='currentColor' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath class='ki-a' fill='none' d='M7.5 4.8v14.4a.9.9 0 0 0 1.37.77l11.3-7.2a.9.9 0 0 0 0-1.54L8.87 4.03A.9.9 0 0 0 7.5 4.8Z'/%3E%3Cpath fill='currentColor' stroke='none' d='M10.85 10.85A1.46 1.46 0 1 1 12.35 10.85L13.22 14.10H9.97Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24' fill='none' stroke='currentColor' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath class='ki-a' fill='none' d='M7.5 4.8v14.4a.9.9 0 0 0 1.37.77l11.3-7.2a.9.9 0 0 0 0-1.54L8.87 4.03A.9.9 0 0 0 7.5 4.8Z'/%3E%3Cpath fill='currentColor' stroke='none' d='M10.85 10.85A1.46 1.46 0 1 1 12.35 10.85L13.22 14.10H9.97Z'/%3E%3C/svg%3E") center / contain no-repeat; }
.btn.kgp-go::after { content: none; }
.btn.kgp-go.kgp-play, .kst-launch .btn.kgp-go { padding-left: 1.3rem; }
.btn.kgp-go:hover, .btn.kgp-go:focus-visible { color: #2a1c04; border-color: #6b4d10; filter: brightness(1.06); }
.btn.kgp-go:active { transform: translateY(4px); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.45) inset, 0 2px 0 #6b4d10, 0 6px 14px rgba(0, 0, 0, 0.4); }
.gb-link { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 0.2rem; color: #f4efe6; font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px;
  text-underline-offset: 0.3em; text-decoration-color: rgba(244, 239, 230, 0.45); text-shadow: 0 1px 8px rgba(0, 0, 0, 0.7); }
.gb-link:hover, .gb-link:focus-visible { color: var(--gold-ink, #f0c25a); text-decoration-color: currentColor; }
.gb-share { position: absolute; z-index: 3; top: 1rem; right: max(1rem, calc(50vw - 38rem)); display: grid; place-items: center; width: 2.9rem; height: 2.9rem; padding: 0;
  border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.4); background: rgba(10, 10, 10, 0.5); color: #fff; cursor: pointer;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); transition: transform 140ms ease, background 160ms ease, border-color 160ms ease; }
.gb-share svg { width: 1.3rem; height: 1.3rem; }
.gb-share:hover, .gb-share:focus-visible { border-color: var(--gold, #e3a72f); background: rgba(10, 10, 10, 0.72); transform: translateY(-1px); }
.gb-share:active { transform: scale(0.92); }
.gb-facts { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0.1rem 0 0; padding: 0; list-style: none; }
.gb-facts li { display: inline-flex; align-items: center; gap: 0.45rem; min-height: 2.1rem; padding: 0.25rem 0.8rem 0.25rem 0.6rem; border-radius: 99px;
  border: 1px solid rgba(255, 255, 255, 0.22); background: rgba(8, 8, 8, 0.45); color: #f4efe6; font-family: var(--body); font-weight: 700; font-size: 0.92rem;
  letter-spacing: 0; text-transform: none; line-height: 1.2; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.gb-facts .kgp-ic { width: 1.15rem; height: 1.15rem; flex: none; color: var(--gold-ink, #f0c25a); }
.gd-snooze .gb-facts .kgp-ic { color: #b9e4ff; }
.gd-murder-in-the-dark .gb-facts .kgp-ic { color: #ff8a80; }

/* phones and tablets: the art band on top (about 45 per cent of the screen), the words on solid ground below it.
   The same fix Scott approved for the home banners: no text over the picture. */
@media (max-width: 1023px) {
  .game-banner.kgp { display: block; min-height: 0; padding: 0; margin-bottom: 1.2rem; background: var(--t-bg, #0b0d0e); }
  .game-banner.kgp .gb-art { position: relative; inset: auto; z-index: 0; height: 45vh; height: 45svh; min-height: 14rem; max-height: 34rem; transform: none !important; translate: none !important; will-change: auto; }
  .game-banner.kgp::before { display: none; }
  .game-banner.kgp::after, .themed .game-banner.kgp::after, .game-banner.kgp.gb-right::after, .gd-banner .game-banner.kgp::after {
    inset: auto 0 auto 0; top: calc(max(14rem, min(45vh, 34rem)) - 5rem); top: calc(max(14rem, min(45svh, 34rem)) - 5rem); height: 5rem; z-index: 1;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0), var(--t-bg, #0b0d0e)); }
  .game-banner.kgp .gb-copy { position: relative; z-index: 2; max-width: 42rem; margin: 0.5rem 0 0; padding: 0 max(1rem, env(safe-area-inset-left)) 0.4rem; gap: 0.7rem; }
  .game-banner.kgp .gb-tag { text-shadow: none; font-size: 1.08rem; }
  .game-banner.kgp .gb-eyebrow { text-shadow: none; }
  .game-banner.kgp .gb-down { display: none; }
  .game-banner.kgp .gb-share { top: 0.8rem; right: 0.8rem; }
  .game-banner.kgp .gb-facts li { background: rgba(255, 255, 255, 0.05); }
  .gb-right.kgp { justify-items: start; }
  /* the button straight under the title and facts, so it is on the first screen; the longer line follows it */
  .game-banner.kgp .gb-copy > * { order: 2; }
  .game-banner.kgp .gb-eyebrow { order: 0; }
  .game-banner.kgp .gb-copy > h1 { order: 1; }
  .game-banner.kgp .gb-ctas { order: 3; margin-top: 0.2rem; }
  .game-banner.kgp .gb-tag { order: 4; margin-top: 0.1rem; }
}
@media (max-width: 1023px) and (max-height: 760px) {
  .game-banner.kgp .gb-art { height: 38vh; height: 38svh; min-height: 12rem; }
  .game-banner.kgp::after, .themed .game-banner.kgp::after, .game-banner.kgp.gb-right::after, .gd-banner .game-banner.kgp::after {
    top: calc(max(12rem, 38vh) - 5rem); top: calc(max(12rem, 38svh) - 5rem); }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .game-banner.kgp .gb-art { height: 46vh; height: 46svh; }
  .game-banner.kgp .gb-copy { padding-inline: 2rem; }
}
@media (max-width: 380px) { .btn.kgp-go { padding-inline: 1.1rem 1.4rem; } .gb-facts li { font-size: 0.86rem; } }

/* ---------- the page panel where the form used to be ---------- */
.kst-launch { display: flex; align-items: center; gap: 1rem; max-width: 34rem; margin: 1.1rem 0 2rem; padding: 0.9rem; border-radius: 1rem;
  border: 1px solid rgba(227, 167, 47, 0.38); background: linear-gradient(135deg, rgba(227, 167, 47, 0.1), rgba(0, 0, 0, 0.25) 60%); }
.gd-murder-in-the-dark .kst-launch { border-color: rgba(255, 90, 78, 0.42); background: linear-gradient(135deg, rgba(255, 90, 78, 0.14), rgba(0, 0, 0, 0.3) 60%); }
.gd-snooze .kst-launch { border-color: rgba(185, 167, 255, 0.45); background: linear-gradient(135deg, rgba(185, 167, 255, 0.14), rgba(0, 0, 0, 0.3) 60%); }
.kst-launch-art { flex: none; width: 5.2rem; aspect-ratio: 896 / 1206; border-radius: 0.5rem; background: #111 center / cover no-repeat; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5); transform: rotate(-3deg); transition: transform 220ms ease; }
.kst-launch:hover .kst-launch-art { transform: rotate(0deg) scale(1.04); }
.kst-launch-t { display: grid; gap: 0.35rem; justify-items: start; }
.kst-launch-k { margin: 0; font: 900 1.45rem/1 var(--display); text-transform: uppercase; }
.kst-launch-l { margin: 0; color: var(--muted, #a7a191); font-size: 0.95rem; line-height: 1.35; }
.kst-launch .kgp-go { margin-top: 0.25rem; }

/* ---------- the start screen ---------- */
.kst { --acc: #e3a72f; --acc-soft: rgba(227, 167, 47, 0.16); --bg1: #1d2224; --bg2: #0d0f10; --line: rgba(243, 234, 214, 0.17); --mut: #c3b9a6;
  position: fixed; inset: 0; z-index: 1900; display: flex; flex-direction: column; color: #f3ead6; font-family: var(--body);
  background: radial-gradient(120% 70% at 50% 0%, var(--bg1), var(--bg2) 72%); overflow: hidden; }
.kst-mitd { --acc: #ff5a4e; --acc-soft: rgba(255, 90, 78, 0.15); --bg1: #2a0907; --bg2: #0b0707; }
.kst-snooze { --acc: #b9a7ff; --acc-soft: rgba(185, 167, 255, 0.16); --bg1: #221c52; --bg2: #0c0b1f; }
.kst[hidden] { display: none; }
html.kst-on, html.kst-on body { overflow: hidden; }
html.kst-on .kg-bar, html.kst-on .kg-keypill, html.kst-on .keys-pill { visibility: hidden; }
.kst-in .kst-top, .kst-in .kst-how { animation: kst-drop 420ms cubic-bezier(.2, 1.3, .5, 1) both; }
.kst-in .kst-scroll { animation: kst-rise 480ms 60ms cubic-bezier(.2, 1.1, .4, 1) both; }
.kst-in .kst-art { animation: kst-fade 700ms ease both; }
@keyframes kst-drop { from { opacity: 0; transform: translateY(-14px); } }
@keyframes kst-rise { from { opacity: 0; transform: translateY(26px); } }
@keyframes kst-fade { from { opacity: 0; transform: scale(1.06); } }
.kst-art { position: absolute; left: 0; right: 0; top: 0; height: min(42vh, 24rem); height: min(42svh, 24rem); background: center 40% / cover no-repeat; opacity: 0.55; pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, #000 25%, transparent); mask-image: linear-gradient(180deg, #000 25%, transparent); }
.kst-mitd .kst-art { background-position: 75% 40%; }
.kst-snooze .kst-art { background-position: 68% 45%; }
.kst-top { position: relative; display: flex; align-items: center; gap: 0.6rem; padding: calc(0.55rem + env(safe-area-inset-top)) max(0.9rem, env(safe-area-inset-right)) 0.1rem max(0.9rem, env(safe-area-inset-left)); }
.kst-round { flex: none; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; padding: 0; border-radius: 50%; border: 1px solid rgba(243, 234, 214, 0.35);
  background: rgba(10, 8, 8, 0.55); color: #f3ead6; cursor: pointer; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); transition: transform 140ms ease, border-color 160ms ease, color 160ms ease; }
.kst-round svg { width: 1.35rem; height: 1.35rem; }
.kst-round:hover, .kst-round:focus-visible { border-color: var(--gold, #e3a72f); color: var(--gold-ink, #f0c25a); }
.kst-round:active { transform: scale(0.9); }
.kst-brand { flex: 1; min-width: 0; margin: 0; text-align: center; white-space: nowrap; font: 900 clamp(1.35rem, 6.6vw, 2.9rem)/0.92 var(--display); text-transform: uppercase; letter-spacing: 0.01em; color: #f6efe0;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.85); }
.kst-brand span, .kst-brand .h1-a { color: var(--acc); }
.kst-snooze .kst-brand { color: #fff3c4; }
.kst-snooze .kst-brand span { color: #b9e4ff; }
.kst-how { position: relative; max-width: 32rem; margin: 0.35rem auto 0.55rem; padding: 0 1.1rem; text-align: center; font-size: 0.9rem; line-height: 1.35; color: #f1e8d6;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.95); }
.kst-scroll { position: relative; flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 0 max(0.9rem, env(safe-area-inset-right)) 0 max(0.9rem, env(safe-area-inset-left)); }
.kst .dealer.kst-dealer { max-width: 34rem; min-height: 100%; margin: 0 auto; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
.kst .dl-setup { display: flex; flex-direction: column; gap: 0.55rem; min-height: 100%; }
.kst .dl-setup > h3 { position: absolute; width: 1px; height: 1px; margin: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* the game and the way to deal: picture tiles */
.kst .dl-mode { display: grid; grid-template-columns: 1fr 1fr; gap: 0.55rem; margin: 0; }
.kst .dl-mode button { position: relative; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 0.6rem; row-gap: 0.1rem; align-items: center; text-align: left;
  min-height: 3.9rem; padding: 0.55rem 0.7rem; border-radius: 0.95rem; border: 1.5px solid var(--line); color: inherit; font: inherit; cursor: pointer;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.02)); box-shadow: 0 4px 0 rgba(0, 0, 0, 0.35);
  transition: transform 120ms ease, border-color 180ms ease, background 180ms ease, box-shadow 120ms ease; }
.kst .dl-mode button .kst-ic { grid-row: 1 / 3; width: 1.9rem; height: 1.9rem; color: var(--mut); transition: color 180ms ease, transform 260ms cubic-bezier(.3, 1.6, .5, 1); }
.kst .dl-mode button b { font: 900 1.12rem/1 var(--display); text-transform: uppercase; letter-spacing: 0.02em; }
.kst .dl-mode button span { font-size: 0.78rem; line-height: 1.2; color: var(--mut); }
.kst .dl-mode button[aria-checked="true"] { border-color: var(--acc); background: linear-gradient(180deg, var(--acc-soft), rgba(255, 255, 255, 0.02)); box-shadow: inset 0 0 0 1px var(--acc), 0 4px 0 rgba(0, 0, 0, 0.35), 0 0 22px var(--acc-soft); }
.kst .dl-mode button[aria-checked="true"] .kst-ic { color: var(--acc); transform: scale(1.12); }
.kst .dl-mode button[aria-checked="true"]::after { content: ""; position: absolute; top: 0.4rem; right: 0.4rem; width: 1.05rem; height: 1.05rem; border-radius: 50%;
  background: var(--acc) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23140b06' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 70% no-repeat; }
.kst .dl-mode button:hover { border-color: rgba(243, 234, 214, 0.4); }
.kst .dl-mode button:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.35); }
.kst .dl-hint { margin: 0; font-size: 0.82rem; line-height: 1.35; color: var(--mut); text-align: center; }

/* players (a dial) and murderers (dice) side by side */
.kst-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0.55rem; }
.kst-pair.kst-solo { grid-template-columns: 1fr; }
.kst .dl-row { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 0.25rem; margin: 0; padding: 0.5rem 0.4rem 0.45rem; border-radius: 0.95rem;
  border: 1.5px solid var(--line); background: rgba(255, 255, 255, 0.035); }
.kst .dl-lab { font: 800 0.9rem/1 var(--display-plain); text-transform: uppercase; letter-spacing: 0.08em; color: #ddd2bf; }
.kst .dl-step { position: relative; display: block; width: 8.4rem; height: 6.6rem; margin: 0 auto; }
.kst-dial { position: absolute; left: 50%; top: 0; width: 6.6rem; height: 6.6rem; margin-left: -3.3rem; }
.kst-dial-svg { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; overflow: visible; border-radius: 50%; }
.kst-dial-svg:active { cursor: grabbing; }
.kst-dial-track { fill: none; stroke: rgba(243, 234, 214, 0.14); stroke-width: 9; stroke-linecap: round; }
.kst-dial-ticks line { stroke: rgba(243, 234, 214, 0.28); stroke-width: 1.4; stroke-linecap: round; }
.kst-dial-val { fill: none; stroke: var(--acc); stroke-width: 9; stroke-linecap: round; filter: drop-shadow(0 0 5px var(--acc)); }
.kst-dial-knob { fill: #fff8ea; stroke: var(--acc); stroke-width: 3; transition: r 140ms ease; }
.kst-dial-svg:active .kst-dial-knob, .kst-dial-svg:focus-visible .kst-dial-knob { r: 10; }
.kst .kst-dial .dl-num { position: absolute; inset: 0; display: grid; place-items: center; min-width: 0; padding-bottom: 0.2rem; font: 900 2.5rem/1 var(--display); color: #fff; pointer-events: none; }
.kst .dl-step .dl-btn { position: absolute; bottom: -0.25rem; width: 2.75rem; height: 2.75rem; border-radius: 50%; border: 1.5px solid var(--line); background: rgba(16, 14, 14, 0.9); color: #f3ead6;
  font: 800 1.4rem/1 var(--display); box-shadow: 0 3px 0 rgba(0, 0, 0, 0.4); transition: transform 110ms ease, border-color 160ms ease; }
.kst .dl-step .dl-btn[data-act="less"] { left: 0; }
.kst .dl-step .dl-btn[data-act="more"] { right: 0; }
.kst .dl-step .dl-btn:hover:not(:disabled) { border-color: var(--acc); }
.kst .dl-step .dl-btn:active:not(:disabled) { transform: translateY(2px) scale(0.94); box-shadow: none; }
.kst .dl-seg { display: flex; gap: 0.55rem; justify-content: center; align-items: center; flex: 1; border: 0; border-radius: 0; overflow: visible; padding-top: 0.3rem; }
.kst .dl-seg button { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 0.25rem; width: 3.7rem; height: 4.7rem; padding: 0.45rem 0 0.35rem; border-radius: 0.8rem;
  border: 1.5px solid var(--line); background: #1b1d1f; color: #f3ead6; font: 800 0.78rem/1 var(--body); text-transform: uppercase; letter-spacing: 0.06em; cursor: pointer;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.45); transition: transform 140ms cubic-bezier(.3, 1.6, .5, 1), background 180ms ease, color 180ms ease, box-shadow 120ms ease; }
.kst .dl-seg button::before { content: ""; width: 2.5rem; height: 2.5rem; border-radius: 0.55rem; background-color: rgba(255, 255, 255, 0.06); flex: none;
  background-image: radial-gradient(circle, currentColor 0 0.3rem, transparent 0.33rem); background-repeat: no-repeat; background-position: center; background-size: 100% 100%; }
.kst .dl-seg button[data-act="m2"]::before { background-image: radial-gradient(circle at 28% 28%, currentColor 0 0.28rem, transparent 0.31rem), radial-gradient(circle at 72% 72%, currentColor 0 0.28rem, transparent 0.31rem); }
.kst .dl-seg button[aria-pressed="true"] { background: #f6efe0; color: #1b0f0c; border-color: var(--acc); box-shadow: 0 4px 0 rgba(0, 0, 0, 0.45), 0 0 0 2px var(--acc), 0 0 18px var(--acc-soft); }
.kst .dl-seg button[aria-pressed="true"]::before { background-color: transparent; color: var(--acc); }
.kst-mitd .dl-seg button[aria-pressed="true"]::before { color: #c0261c; }
.kst .dl-seg button:active:not(:disabled) { transform: translateY(3px) rotate(-10deg) scale(0.95); box-shadow: none; }
.kst .dl-seg button:disabled { opacity: 0.32; cursor: not-allowed; }

/* the extra roles: cards that flip on */
.kst-addons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; }
.kst-addons.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.kst-addons.n1 { grid-template-columns: 1fr; }
.kst .dl-check.kst-card { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 0.3rem; margin: 0; padding: 0.55rem 0.6rem 0.6rem; min-height: 5.6rem; border-radius: 0.95rem;
  border: 1.5px solid var(--line); background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015)); cursor: pointer; box-shadow: 0 4px 0 rgba(0, 0, 0, 0.35);
  transition: border-color 200ms ease, background 220ms ease, transform 120ms ease, box-shadow 120ms ease; transform-style: preserve-3d; }
.kst .dl-check input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.kst .dl-check:focus-within { outline: 3px solid var(--gold, #e3a72f); outline-offset: 2px; }
.kst .dl-check.kst-card > .kst-ic { width: 1.7rem; height: 1.7rem; color: var(--mut); transition: color 200ms ease, transform 300ms cubic-bezier(.3, 1.6, .5, 1); }
.kst .kst-t { display: grid; gap: 0.15rem; }
.kst .kst-t b { font: 800 0.98rem/1.02 var(--display-plain); text-transform: uppercase; letter-spacing: 0.02em; }
.kst .kst-t small { font-size: 0.74rem; line-height: 1.25; color: #b9af9d; }
.kst .kst-sw { position: absolute; top: 0.55rem; right: 0.55rem; width: 2rem; height: 1.15rem; border-radius: 99px; background: rgba(255, 255, 255, 0.14); transition: background 200ms ease; }
.kst .kst-sw i { position: absolute; top: 0.15rem; left: 0.15rem; width: 0.85rem; height: 0.85rem; border-radius: 50%; background: #d8cfbf; transition: transform 220ms cubic-bezier(.3, 1.5, .5, 1), background 200ms ease; }
.kst .dl-check.is-on { border-color: var(--acc); background: linear-gradient(180deg, var(--acc-soft), rgba(255, 255, 255, 0.02)); box-shadow: inset 0 0 0 1px var(--acc), 0 4px 0 rgba(0, 0, 0, 0.35); }
.kst .dl-check.is-on > .kst-ic { color: var(--acc); transform: rotate(-8deg) scale(1.12); }
.kst .dl-check.is-on .kst-sw { background: var(--acc); }
.kst .dl-check.is-on .kst-sw i { transform: translateX(0.85rem); background: #1b0f0c; }
.kst .dl-check.kst-card:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.35); }
.kst .dl-check.kst-flip { animation: kst-flip 420ms cubic-bezier(.3, 1.3, .5, 1); }
@keyframes kst-flip { 0% { transform: perspective(500px) rotateY(0); } 45% { transform: perspective(500px) rotateY(80deg); } 100% { transform: perspective(500px) rotateY(0); } }
.kst .dl-check.kst-sub { grid-column: 1 / -1; display: flex; align-items: center; gap: 0.6rem; margin: 0; min-height: 2.75rem; padding: 0.3rem 3.2rem 0.3rem 0.7rem; border-radius: 0.7rem;
  border: 1px dashed var(--line); background: rgba(0, 0, 0, 0.2); cursor: pointer; position: relative; }
.kst .dl-check.kst-sub .kst-t b { font: 700 0.86rem/1.2 var(--body); text-transform: none; letter-spacing: 0; }
.kst .dl-check.kst-sub .kst-sw { top: 50%; margin-top: -0.58rem; }
.kst .dl-few { margin: 0; text-align: center; }
.kst .dl-mail { padding: 0.7rem; border-radius: 0.9rem; border: 1px solid var(--line); background: rgba(0, 0, 0, 0.25); }

/* the foot: the safety line, Calm mode, then the one Deal button; it stays put at the bottom */
.kst-foot { position: sticky; bottom: 0; z-index: 3; margin: auto -0.9rem 0; padding: 0.5rem 0.9rem calc(0.7rem + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(0, 0, 0, 0), var(--bg2) 28%); }
.kst-foot-row { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; margin: 0 0 0.45rem; }
.kst-safe { margin: 0; font-size: 0.78rem; line-height: 1.3; color: var(--mut); }
.kst-linkbtn { display: inline; min-height: 0; padding: 0; border: 0; background: none; color: var(--gold-ink, #f0c25a); font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 0.2em; cursor: pointer; }
.kst-calm { flex: none; display: inline-flex; align-items: center; gap: 0.4rem; min-height: 2.75rem; padding: 0.3rem 0.75rem; border-radius: 99px; border: 1.5px solid var(--line);
  background: rgba(255, 255, 255, 0.05); color: #e9e0cf; font: 700 0.82rem/1 var(--body); cursor: pointer; transition: border-color 180ms ease, background 180ms ease; }
.kst-calm .kst-ic { width: 1.1rem; height: 1.1rem; transform-origin: 50% 0; animation: kst-swing 2.4s ease-in-out infinite; }
.kst-calm[aria-pressed="true"] { border-color: var(--gold, #e3a72f); background: rgba(227, 167, 47, 0.16); color: var(--gold-ink, #f0c25a); }
.kst-calm[aria-pressed="true"] .kst-ic { animation: none; }
@keyframes kst-swing { 0%, 100% { transform: rotate(-14deg); } 50% { transform: rotate(14deg); } }
.kst .kst-foot .dl-go { position: relative; display: flex; width: 100%; min-height: 3.5rem; margin: 0; justify-content: center; padding: 0.7rem 1.2rem; border-radius: 0.75rem; border: 1px solid #6b4d10;
  color: #2a1c04; font: 900 1.35rem/1 var(--display); text-transform: uppercase; letter-spacing: 0.03em;
  background: linear-gradient(180deg, #f7cf6b 0%, #e3a72f 55%, #c98d1c 100%); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.45) inset, 0 6px 0 #6b4d10, 0 14px 28px rgba(0, 0, 0, 0.5);
  transition: transform 110ms ease, box-shadow 110ms ease, filter 160ms ease; }
.kst .kst-foot .dl-go::after { content: none; }
.kst .kst-foot .dl-go:hover { filter: brightness(1.06); color: #2a1c04; }
.kst .kst-foot .dl-go:active:not(:disabled) { transform: translateY(5px); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.45) inset, 0 1px 0 #6b4d10, 0 4px 10px rgba(0, 0, 0, 0.4); }
.kst .kst-foot .dl-go:disabled { filter: grayscale(0.6) brightness(0.7); cursor: not-allowed; }
.kst:not(.kst-in) .kst-foot .dl-go:not(:disabled), .kst.kst-in .kst-foot .dl-go:not(:disabled) { animation: kst-glow 2.8s 1.2s ease-in-out infinite; }
@keyframes kst-glow { 0%, 100% { box-shadow: 0 1px 0 rgba(255, 255, 255, 0.45) inset, 0 6px 0 #6b4d10, 0 14px 28px rgba(0, 0, 0, 0.5); }
  50% { box-shadow: 0 1px 0 rgba(255, 255, 255, 0.45) inset, 0 6px 0 #6b4d10, 0 14px 28px rgba(0, 0, 0, 0.5), 0 0 26px rgba(240, 194, 90, 0.55); } }

/* phones: tighter, so the whole start screen fits 375 by 667 with no scrolling (the notes stay for screen readers and in the rules) */
@media (max-width: 519px) {
  .kst .kst-card .kst-t small { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .kst .dl-check.kst-card { min-height: 4.4rem; padding: 0.5rem 0.55rem; }
  .kst .dl-mode button { display: block; min-height: 3.5rem; padding: 0.5rem 0.6rem 0.45rem; overflow: hidden; }
  .kst .dl-mode button b { display: block; padding-right: 0.9rem; font-size: 0.9rem; letter-spacing: 0; }
  .kst .dl-mode button[aria-checked="true"]::after { top: 0.3rem; right: 0.3rem; width: 0.9rem; height: 0.9rem; }
  .kst .dl-check.kst-card .kst-t b { font-size: 0.84rem; }
  .kst .dl-check.kst-card > .kst-ic { width: 1.45rem; height: 1.45rem; }
  .kst .dl-setup { gap: 0.45rem; }
  .kst .dl-row { padding-top: 0.4rem; }
  .kst-foot { padding-top: 0.35rem; }
  .kst-foot-row { margin-bottom: 0.35rem; }
  .kst .dl-mode button span { display: block; position: relative; z-index: 1; font-size: 0.74rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .kst .dl-mode button .kst-ic { position: absolute; right: -0.35rem; bottom: -0.45rem; width: 2.6rem; height: 2.6rem; opacity: 0.35; }
  .kst .dl-mode button[aria-checked="true"] .kst-ic { opacity: 0.9; }
  .kst-how { font-size: 0.84rem; margin-bottom: 0.45rem; }
  .kst .dl-hint { font-size: 0.78rem; }
  .kst-safe { font-size: 0.76rem; }
}
@media (max-height: 700px) and (max-width: 519px) {
  .kst-how { font-size: 0.84rem; margin-bottom: 0.4rem; }
  .kst .dl-setup { gap: 0.45rem; }
  .kst .dl-step { height: 5.7rem; }
  .kst-dial { width: 5.7rem; height: 5.7rem; margin-left: -2.85rem; }
  .kst .kst-dial .dl-num { font-size: 2.2rem; }
  .kst .dl-mode button { min-height: 3.3rem; }
  .kst-top { padding-top: calc(0.4rem + env(safe-area-inset-top)); }
}
/* tablets and up: roomier tiles; desktops: the art fills the screen and the set-up sits on a glass panel */
@media (min-width: 768px) {
  .kst-how { font-size: 1rem; }
  .kst .dl-mode button { min-height: 4.6rem; padding: 0.7rem 0.9rem; }
  .kst .dl-mode button b { font-size: 1.3rem; }
  .kst .dl-mode button span { font-size: 0.86rem; }
  .kst .dl-check.kst-card { min-height: 7rem; }
  .kst .kst-t small { font-size: 0.8rem; }
  .kst .dl-step { width: 9.4rem; height: 7.4rem; }
  .kst-dial { width: 7.4rem; height: 7.4rem; margin-left: -3.7rem; }
}
@media (min-width: 1024px) {
  .kst-art { height: 100%; opacity: 0.42; -webkit-mask-image: radial-gradient(120% 90% at 50% 30%, #000 30%, transparent 85%); mask-image: radial-gradient(120% 90% at 50% 30%, #000 30%, transparent 85%); }
  .kst-top { width: min(40rem, 100%); margin: 0 auto; padding-top: 1.4rem; }
  .kst-scroll { padding-bottom: 0; }
  .kst .dealer.kst-dealer { max-width: 40rem; padding: 1rem 1.2rem 0; border-radius: 1.2rem 1.2rem 0 0; background: rgba(10, 9, 9, 0.62); border: 1px solid var(--line); border-bottom: 0;
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
  .kst-foot { margin-inline: -1.2rem; padding-inline: 1.2rem; }
}

/* ---------- the rules sheet ("?") ---------- */
.kst-sheet { position: fixed; inset: 0; z-index: 2250; display: flex; align-items: flex-end; justify-content: center; background: rgba(0, 0, 0, 0.62); }
.kst-sheet[hidden] { display: none; }
.kst-sheet-in { width: min(38rem, 100%); max-height: 86vh; max-height: 86svh; overflow-y: auto; overscroll-behavior: contain; padding: 0 1.2rem calc(1.4rem + env(safe-area-inset-bottom));
  border-radius: 1.2rem 1.2rem 0 0; background: #17191a; color: #ece4d2; border: 1px solid rgba(243, 234, 214, 0.16); box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.6);
  animation: kst-rise 320ms cubic-bezier(.2, 1.1, .4, 1) both; }
.kst-sheet-top { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 0 0.6rem; background: #17191a; }
.kst-sheet-h { margin: 0; font: 900 1.7rem/1 var(--display); text-transform: uppercase; }
.kst-sheet-line { margin: 0 0 0.8rem; padding: 0.7rem 0.85rem; border-radius: 0.7rem; background: rgba(227, 167, 47, 0.12); border-left: 3px solid var(--gold, #e3a72f); font-weight: 700; line-height: 1.4; }
.kst-sheet-body h3 { margin: 1.1rem 0 0.4rem; font: 800 1.15rem/1.1 var(--display-plain); text-transform: uppercase; letter-spacing: 0.04em; color: var(--gold-ink, #f0c25a); }
.kst-sheet-body ol, .kst-sheet-body ul { margin: 0 0 0.6rem; padding-left: 1.3rem; line-height: 1.5; }
.kst-sheet-body li { margin: 0 0 0.35rem; }
.kst-sheet-body p { margin: 0 0 0.6rem; line-height: 1.5; }
.kst-sheet-body a { color: var(--gold-ink, #f0c25a); }
@media (min-width: 768px) { .kst-sheet { align-items: center; } .kst-sheet-in { border-radius: 1.2rem; max-height: 80vh; } }

/* ---------- inside the game window: the one-line how to play and the "?" ---------- */
.kst-strip { display: flex; align-items: center; gap: 0.65rem; max-width: 30rem; margin: 0 auto 0.8rem; padding: 0.4rem 0.75rem 0.4rem 0.4rem; border-radius: 0.7rem;
  border-left: 3px solid var(--gold, #e3a72f); background: rgba(255, 255, 255, 0.06); }
.kst-strip .kst-q-shell { width: 2.75rem; height: 2.75rem; }
.kst-strip p { margin: 0; font-size: 0.9rem; line-height: 1.35; color: #f1e8d6; }
.kst-strip b { margin-right: 0.3rem; font: 800 0.74rem/1 var(--body); text-transform: uppercase; letter-spacing: 0.1em; color: var(--gold-ink, #f0c25a); }
.skin-snooze .kst-strip { border-left-color: #b9a7ff; }
.skin-snooze .kst-strip b { color: #d3c8ff; }

/* ---------- the first-play coach mark: a ghost hand that shows the move ---------- */
.kst-coach { position: fixed; z-index: 2300; width: 0; height: 0; pointer-events: none; }
.kst-coach-hand { position: absolute; left: -0.6rem; top: -0.4rem; display: block; width: 3.2rem; height: 3.2rem; color: #fff; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.8));
  animation: kst-press 1.3s ease-in-out infinite; }
.kst-coach-hand .kst-ic { width: 100%; height: 100%; fill: rgba(255, 255, 255, 0.92); stroke: #1b1d1f; stroke-width: 1.4; }
.kst-coach-hand::before { content: ""; position: absolute; left: 0.35rem; top: 0.1rem; width: 1.4rem; height: 1.4rem; border-radius: 50%; border: 3px solid rgba(240, 194, 90, 0.9);
  animation: kst-ping 1.3s ease-out infinite; }
.kst-coach.is-drag .kst-coach-hand { animation: kst-drag 1.8s ease-in-out infinite; }
.kst-coach-b { position: absolute; left: 50%; top: 2.9rem; transform: translateX(-50%); width: max-content; max-width: 15rem; padding: 0.45rem 0.75rem; border-radius: 0.6rem;
  background: #f6efe0; color: #1b1d1f; font: 700 0.86rem/1.25 var(--body); text-align: center; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.55); animation: kst-drop 300ms ease both; }
.kst-coach-b::before { content: ""; position: absolute; left: 50%; top: -0.35rem; margin-left: -0.35rem; border: 0.35rem solid transparent; border-top: 0; border-bottom-color: #f6efe0; }
@keyframes kst-press { 0%, 100% { transform: translate(0, 0) scale(1); } 40%, 70% { transform: translate(0.15rem, 0.25rem) scale(0.9); } }
@keyframes kst-ping { 0% { transform: scale(0.4); opacity: 0; } 40% { opacity: 1; } 100% { transform: scale(1.8); opacity: 0; } }
@keyframes kst-drag { 0%, 100% { transform: translate(-1.6rem, 0.6rem); } 50% { transform: translate(1.6rem, -1rem); } }

/* Calm mode and reduced motion: everything holds still */
html.calm .kst *, html.calm .kst, html.calm .kst-sheet-in, html.calm .kst-coach *, html.calm .kst-launch-art,
.kst-coach.is-still * { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) {
  .kst *, .kst, .kst-sheet-in, .kst-coach *, .kst-launch-art, .btn.kgp-go, .gb-share { animation: none !important; transition: none !important; }
}

/* one box on its own (Snooze Bandit's players, no murderers to pick): the label beside the dial, to keep the phone screen to one screen */
.kst-pair.kst-solo .dl-row { flex-direction: row; justify-content: center; gap: 1.4rem; }
/* the page's scroll-in reveal never moves the dealer once it lives in the start screen */
.kst .dealer.kst-dealer { transform: none !important; opacity: 1 !important; animation: none !important; translate: none !important; }
