@import url(/static/fonts/fonts.css);

/* A gloomy back room: a dark table under a green lamp (generated picture),
   blued steel, brass cartridges and blood red. */
:root {
  --night: #0c0806;
  --ink: #1d1714;
  --red: #b3120f;
  --red-dark: #5e0807;
  --blood: #8a0b0b;
  --brass: #c9a043;
  --steel: #2b3036;
  --cream: #efe4cf;
  --paper: #f6efe2;
  --muted: #6f655b;
  --line: #e2d6c2;
  --good: #3d8a4d;
  --bad: #b3120f;
  --radius: 14px;
  --stencil: Anton, Impact, Haettenschweiler, 'Arial Narrow', sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
html { background: var(--night); }
body {
  min-height: 100vh;
  background:
    radial-gradient(ellipse 60% 45% at 50% 0%, rgba(150, 190, 120, .16), transparent 70%),
    radial-gradient(ellipse 120% 90% at 50% 100%, rgba(0, 0, 0, .8), transparent 60%),
    linear-gradient(180deg, #1d1410, #0c0806);
  background-attachment: fixed;
  color: var(--ink); font-family: Montserrat, system-ui, sans-serif; font-size: 15px; line-height: 1.45;
}
main { max-width: 1100px; margin: 0 auto; padding: 16px; }
h1, h2, h3 { margin: 0 0 .5rem; line-height: 1.2; }
h2 { font-weight: 800; color: var(--ink); }
p { margin: 0 0 .5rem; }
a { color: var(--red); }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.center-text { text-align: center; }

/* ---------------------------------------------------------------- logo */
.logo { display: inline-flex; flex-direction: column; align-items: center; line-height: 1; white-space: nowrap; user-select: none; }
.logo-top { font-family: Montserrat, sans-serif; font-style: italic; font-weight: 300; font-size: .42em; letter-spacing: .14em; color: var(--cream); margin-bottom: .08em; text-shadow: 0 .04em .1em #000; }
.logo-main { display: inline-flex; align-items: center; font-family: var(--stencil); letter-spacing: .05em; color: var(--red); text-shadow: 0 0 .25em rgba(179, 18, 15, .45), .03em .04em 0 #000; }
.logo-cyl { width: .78em; height: .78em; margin: 0 .03em; filter: drop-shadow(0 .03em .05em #000); }
.logo-cyl .cyl-rot { animation: logo-spin 9s cubic-bezier(.2,.7,.2,1) infinite; transform-origin: 0 0; }
@keyframes logo-spin { 0%, 70% { transform: rotate(0deg); } 85%, 100% { transform: rotate(720deg); } }
.hero-logo { font-size: clamp(2.8rem, 12vw, 6rem); }
.brand-logo { font-size: 1.3rem; flex-direction: row; gap: .35em; align-items: baseline; }
.brand-logo .logo-top { font-size: .55em; letter-spacing: .05em; }
.age-logo { font-size: 2.6rem; display: flex; margin: 0 auto 8px; }

/* ---------------------------------------------------------------- topbar */
.topbar { display: flex; align-items: center; gap: 12px; padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top)); background: rgba(8, 5, 4, .85); color: #fff; flex-wrap: wrap; backdrop-filter: blur(6px); border-bottom: 1px solid rgba(179, 18, 15, .4); }
.topbar a, .topbar .linkbtn { color: var(--cream); text-decoration: none; font-weight: 600; }
.brand { display: flex; align-items: center; padding: 4px 8px; }
.topbar nav { margin-left: auto; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; box-shadow: none; }

/* ---------------------------------------------------------------- forms */
label { display: block; font-weight: 700; font-size: .85rem; margin-bottom: 4px; color: var(--ink); }
input, select { width: 100%; padding: 11px 12px; border: 2px solid var(--line); border-radius: 10px; font: inherit; background: #fff; color: var(--ink); }
input:focus, select:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(179, 18, 15, .25); }
button, .btn { font: inherit; font-weight: 800; border: 0; border-radius: 10px; padding: 11px 18px; cursor: pointer; background: #3a3532; color: #fff; text-decoration: none; display: inline-block; box-shadow: 0 3px 0 #12100f; transition: transform .08s, filter .15s; }
button:hover { filter: brightness(1.1); }
button:active { transform: translateY(2px); box-shadow: 0 1px 0 #12100f; }
button:disabled { opacity: .45; cursor: default; }
.btn-accent { background: var(--red); box-shadow: 0 3px 0 var(--red-dark); }
.btn-accent:active { box-shadow: 0 1px 0 var(--red-dark); }
.btn-ghost { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 2px var(--line); }
.btn-small { padding: 6px 12px; font-size: .85rem; }
.btn-block { width: 100%; }
.sso-btn::before { content: '🔑 '; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 500; }
.check input { width: auto; }
.code-input { text-transform: uppercase; letter-spacing: .3em; font-weight: 900; font-size: 1.4rem; text-align: center; }

/* ---------------------------------------------------------------- layout */
.panel { background: var(--paper); border-radius: var(--radius); padding: 18px; box-shadow: 0 10px 30px rgba(0, 0, 0, .55); }
.stack > * + * { margin-top: 12px; }
.row { display: flex; gap: 8px; align-items: center; }
.grow { flex: 1; min-width: 0; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 16px; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.notice { padding: 12px 14px; border-radius: 10px; background: #fff; border-left: 5px solid var(--steel); }
.notice.err { border-left-color: var(--bad); }
.notice.ok { border-left-color: var(--good); background: #f1faf2; }
.pill { display: inline-block; font-size: .72rem; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: #ece3d6; color: var(--ink); margin-right: 4px; }
.pill.off { background: #f3f3f3; color: #888; }
.pill.blood { background: var(--blood); color: #fff; }
.dot { width: 14px; height: 14px; border-radius: 50%; display: inline-block; flex: none; box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgba(0,0,0,.15); }
.copybox { display: flex; gap: 6px; }
.copybox input { font-size: .85rem; }
.toast { position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 12px; border-left: 5px solid var(--red); z-index: 2000; max-width: calc(100vw - 32px); font-weight: 600; box-shadow: 0 8px 24px rgba(0,0,0,.45); animation: toast-in .25s ease-out; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 12px); } }
.spinner { width: 14px; height: 14px; border: 3px solid rgba(255,255,255,.35); border-top-color: var(--red); border-radius: 50%; display: inline-block; vertical-align: -2px; margin-right: 8px; animation: spin 0.9s linear infinite; }
.panel .spinner { border-color: var(--line); border-top-color: var(--red); }
@keyframes spin { to { transform: rotate(360deg); } }
.wait { color: var(--muted); font-weight: 600; }

/* ---------------------------------------------------------------- age gate */
.age-main { min-height: 100svh; display: grid; place-items: center; }
.age { max-width: 480px; text-align: center; border-top: 6px solid var(--red); }
.age h2 { font-family: var(--stencil); font-weight: 400; letter-spacing: .04em; color: var(--red); font-size: 1.8rem; }
.age .logo-top { color: var(--ink); text-shadow: none; }
.helpline { font-size: .8rem; color: #a99c8c; text-align: center; max-width: 640px; margin: 2rem auto 0; }
.age .helpline { color: var(--muted); margin-top: 1rem; }

/* ---------------------------------------------------------------- home */
.hero { text-align: center; margin: 22px 0 26px; color: #fff; }
.tagline { font-family: var(--stencil); letter-spacing: .25em; color: #a99c8c; font-size: .95rem; margin-top: 10px; }
.hero-props { position: relative; display: flex; justify-content: center; align-items: center; margin: 18px auto 6px; height: clamp(120px, 26vw, 190px); }
.hero-gun { height: 100%; filter: drop-shadow(0 14px 18px rgba(0,0,0,.8)); transform: rotate(-6deg); animation: hero-gun 1s cubic-bezier(.2,.8,.3,1.1) backwards .2s; }
.hero-cyl { position: absolute; width: clamp(56px, 12vw, 86px); right: calc(50% - clamp(160px, 34vw, 250px)); bottom: -6px; filter: drop-shadow(0 6px 10px #000); }
.hero-cyl .cyl-rot { animation: logo-spin 7s cubic-bezier(.2,.7,.2,1) infinite; transform-origin: 0 0; }
@keyframes hero-gun { from { opacity: 0; transform: translateX(-80px) rotate(-30deg); } }
.subtitle { font-size: 1.1rem; font-weight: 500; color: #e6d8c2; margin: 14px auto 0; max-width: 640px; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.rules { padding-left: 1.3rem; margin: 0; }
.rules li { margin-bottom: .55rem; }
.rules li::marker { color: var(--red); font-weight: 900; }

/* ---------------------------------------------------------------- cylinder */
.cyl { display: block; overflow: visible; }
.cyl-body { fill: url(#cyl-steel); stroke: #0d0f11; stroke-width: 1.5; }
.cyl-flute { fill: #16191c; }
.cyl-rim { fill: none; stroke: rgba(255,255,255,.08); stroke-width: 1; }
.ch-hole { fill: #070809; stroke: #3c434b; stroke-width: 1; }
.ch-brass { fill: #c9a043; stroke: #6e5419; stroke-width: .8; }
.ch-brass2 { fill: #e2c070; }
.ch-primer { fill: #9a7a3a; stroke: #5d4512; stroke-width: .5; }
.chamber .round { display: none; }
.chamber.loaded .round { display: inline; }
.chamber.fired .ch-hole { fill: #23272b; stroke: #59616a; }
.cyl-pin { fill: #16191c; stroke: #4a525a; stroke-width: 1; }
.cyl-pin2 { fill: #0a0b0c; }
.cartridge { display: block; }

/* ---------------------------------------------------------------- lobby */
.lobby { margin-top: 8px; }
.lobby-hero { margin: 10px 0 18px; }
.lobby-hero .hero-logo { font-size: clamp(2.4rem, 9vw, 4.6rem); }
.code-text { font-family: var(--stencil); font-size: clamp(2.6rem, 10vw, 3.6rem); letter-spacing: .2em; color: var(--red); text-shadow: 2px 3px 0 rgba(0,0,0,.25); }
.qr { width: 180px; height: 180px; display: block; margin: 0 auto; border-radius: 12px; border: 6px solid #fff; box-shadow: 0 0 0 3px var(--ink); }
.players .tags { margin-top: 2px; }
.lobby-wrap main { padding-bottom: 40px; }
.opts .check { margin: 6px 0; }

/* ---------------------------------------------------------------- table */
body.in-game { overflow: hidden; overscroll-behavior: none; }
.game { height: 100svh; display: flex; flex-direction: column; align-items: center; padding: max(6px, env(safe-area-inset-top)) max(6px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left)); gap: 6px; }
.board-wrap { flex: none; display: grid; place-items: center; }
.board { position: relative; container-type: size; border-radius: 3cqmin; overflow: hidden; background: #160d08 center / cover no-repeat; box-shadow: 0 10px 40px rgba(0,0,0,.8), inset 0 0 6cqmin rgba(0,0,0,.7); user-select: none; -webkit-user-select: none; }
.board.tall { aspect-ratio: 2 / 3; width: min(calc(100vw - 12px), calc((100svh - 150px) * 2 / 3)); background-image: url(/static/art/table-tall.webp); }
.board.wide { aspect-ratio: 3 / 2; width: min(calc(100vw - 12px), calc((100svh - 12px) * 1.5)); background-image: url(/static/art/table-wide.webp); }
.game.wide { flex-direction: row; justify-content: center; align-items: stretch; }
.game.wide .side { width: 300px; flex: none; }
.game.wide .board { width: min(calc(100vw - 330px), calc((100svh - 12px) * 1.5)); }
@media (max-width: 900px) { .game.wide .side { display: none; } .game.wide .board { width: min(calc(100vw - 12px), calc((100svh - 12px) * 1.5)); } }
.board.shake { animation: shake .6s cubic-bezier(.36,.07,.19,.97); }
@keyframes shake { 10%, 90% { translate: -.6cqmin 0; } 20%, 80% { translate: 1.2cqmin .4cqmin; } 30%, 50%, 70% { translate: -1.8cqmin -.6cqmin; } 40%, 60% { translate: 1.8cqmin .6cqmin; } }
.lamp-glow { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse 36% 30% at 50% 46%, rgba(255, 220, 160, .1), transparent 70%); }
.blood-layer { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; mix-blend-mode: multiply; opacity: .97; }

.hud { position: absolute; left: 50%; top: 28%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 2.4cqmin; color: var(--cream); white-space: nowrap; pointer-events: none; }
.board.tall .hud { top: 25%; }
.hud-cyl { width: 9cqmin; height: 9cqmin; filter: drop-shadow(0 .6cqmin .8cqmin #000); }
.hud-l { font-size: 1.9cqmin; letter-spacing: .14em; text-transform: uppercase; color: #bfb19c; text-shadow: 0 .2cqmin .4cqmin #000; }
.hud-n { font-family: var(--stencil); font-size: 5.4cqmin; letter-spacing: .06em; line-height: 1; text-shadow: 0 .3cqmin .6cqmin #000; }
.hud-n.hot { color: #ff5a48; text-shadow: 0 0 2cqmin rgba(255, 40, 20, .7), 0 .3cqmin .6cqmin #000; animation: hot 1s ease-in-out infinite alternate; }
@keyframes hot { to { opacity: .7; } }
.hud-shot { font-family: var(--stencil); font-size: 2.6cqmin; letter-spacing: .1em; color: #bfb19c; }

.table-gun { position: absolute; left: 50%; top: 50%; width: 30cqmin; z-index: 4; --r: 0deg; transform: translate(-50%, -50%) rotate(var(--r));
  transition: left .7s cubic-bezier(.3,.7,.3,1), top .7s cubic-bezier(.3,.7,.3,1), transform .9s cubic-bezier(.3,.7,.3,1), opacity .35s;
  filter: drop-shadow(0 1.4cqmin 1.4cqmin rgba(0,0,0,.75)); -webkit-user-drag: none; }
.board.tall .table-gun { width: 34cqmin; }
.table-gun.spinning { transition: left .7s, top .7s, transform 3.2s cubic-bezier(.12,.75,.2,1), opacity .35s; }
.table-gun.gone { opacity: 0; pointer-events: none; }
.table-gun.mine { cursor: pointer; filter: drop-shadow(0 1.4cqmin 1.4cqmin rgba(0,0,0,.75)) drop-shadow(0 0 1.6cqmin rgba(255, 200, 120, .55)); }
.table-gun.drop { animation: gun-drop .55s cubic-bezier(.3,1.5,.5,1); }
@keyframes gun-drop { from { opacity: 0; scale: 1.5; filter: drop-shadow(0 6cqmin 4cqmin rgba(0,0,0,.4)); } }

.ctrl { position: absolute; left: 50%; top: 66%; transform: translateX(-50%); width: 64cqw; z-index: 8; pointer-events: none; }
.board.tall .ctrl { top: 64%; width: 80cqw; }
.ctrl-in { display: flex; flex-direction: column; align-items: center; gap: 1.6cqmin; }
.ctrl-in button { pointer-events: auto; }
.thint { min-height: 3.4cqmin; text-align: center; font-size: 2.5cqmin; font-weight: 700; color: var(--cream); text-shadow: 0 .2cqmin .4cqmin #000, 0 0 1.2cqmin #000; }
.ctrl-in.mine .thint { color: #ffd9a8; }
.tbtn { font-family: var(--stencil); font-weight: 400; letter-spacing: .07em; line-height: 1; border-radius: 1.2cqmin; transition: opacity .2s, transform .1s, box-shadow .2s; }
.tbtn-lg { font-size: 4.2cqmin; padding: 1.6cqmin 3.6cqmin; background: linear-gradient(180deg, #3a3f45, #1c1f23); color: var(--cream); box-shadow: 0 .7cqmin 0 #0a0b0c, 0 1.4cqmin 2.4cqmin rgba(0,0,0,.7), inset 0 0 0 .25cqmin rgba(201, 160, 67, .6); }
.tbtn-lg.red { background: linear-gradient(180deg, #c3201a, #7c0b08); box-shadow: 0 .7cqmin 0 #3d0403, 0 1.4cqmin 2.4cqmin rgba(0,0,0,.7); }
.tbtn.go { animation: go 1.1s ease-in-out infinite alternate; }
@keyframes go { to { box-shadow: 0 .7cqmin 0 #0a0b0c, 0 0 3.4cqmin rgba(255, 200, 120, .55), inset 0 0 0 .25cqmin rgba(201, 160, 67, 1); } }
.tbtn:active { transform: translateY(.5cqmin); }
.corner { position: absolute; top: 2cqmin; z-index: 20; }
.corner.tl { left: 2cqmin; }
.corner.tr { right: 2cqmin; }
.tbtn-sm { font-size: 2.4cqmin; padding: 1cqmin 1.8cqmin; background: rgba(10, 7, 5, .75); color: var(--cream); box-shadow: 0 .4cqmin 1cqmin rgba(0,0,0,.5); }

.seat {
  position: absolute; z-index: 6; transform: translate(-50%, -50%); width: 22cqmin; text-align: center; color: var(--cream);
  background: linear-gradient(170deg, rgba(34, 30, 28, .93), rgba(14, 12, 11, .93)); border: .35cqmin solid var(--pc); border-radius: 1.4cqmin; padding: .8cqmin 1.2cqmin 1cqmin;
  box-shadow: 0 1cqmin 2.4cqmin rgba(0,0,0,.65); transition: box-shadow .3s, transform .3s, opacity .4s, filter .4s;
}
.seat.active { border-color: #ffd9a8; box-shadow: 0 0 0 .45cqmin rgba(255, 217, 168, .35), 0 0 4cqmin rgba(255, 190, 110, .55); transform: translate(-50%, -50%) scale(1.07); z-index: 7; }
.seat.offline { opacity: .6; }
.seat.dead { filter: grayscale(1); opacity: .75; border-color: var(--blood); background: linear-gradient(170deg, rgba(40, 6, 6, .93), rgba(14, 4, 4, .93)); }
.seat.dead .seat-name { text-decoration: line-through; text-decoration-color: var(--red); }
.seat.fled { opacity: .45; }
.seat.me .seat-name { color: #ffd9a8; }
.seat-name { font-weight: 800; font-size: 2.3cqmin; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seat-row { display: flex; align-items: center; justify-content: center; gap: 1.4cqmin; min-height: 2.6cqmin; font-size: 1.9cqmin; font-weight: 700; color: #bfb19c; }
.seat-deaths { color: #ff8a7a; }
.seat-dead { font-family: var(--stencil); font-size: 2.6cqmin; letter-spacing: .12em; color: #ff5a48; filter: none; }
.seat-fled { font-size: 1.9cqmin; color: #bfb19c; }

/* ---------------------------------------------------------------- overlays on the board */
.fx { position: absolute; inset: 0; z-index: 30; pointer-events: none; }
.ov { position: absolute; inset: 0; pointer-events: auto; display: flex; flex-direction: column; align-items: center; justify-content: center; animation: ov-in .4s ease-out; }
.ov.closing { animation: ov-out .45s ease-in forwards; pointer-events: none; }
@keyframes ov-in { from { opacity: 0; } }
@keyframes ov-out { to { opacity: 0; } }
.ov-caption { font-family: var(--stencil); color: var(--cream); font-size: 4.6cqmin; letter-spacing: .1em; text-shadow: 0 .4cqmin 1cqmin #000; margin-top: 3cqmin; opacity: 0; animation: cap-in .6s 2.3s forwards; }
@keyframes cap-in { to { opacity: 1; } }
.ov-caption.small { font-size: 3cqmin; animation-delay: .2s; }

.ov-load { background: radial-gradient(ellipse at 50% 45%, rgba(20, 16, 12, .55), rgba(5, 3, 2, .92) 70%); }
.ov-spin { background: radial-gradient(ellipse at 50% 45%, rgba(20, 16, 12, .25), rgba(5, 3, 2, .7) 70%); }
.cyl-wrap { position: relative; width: 52cqmin; height: 52cqmin; animation: cyl-in .6s cubic-bezier(.2,.8,.3,1.2) backwards; }
.cyl-wrap.small { width: 30cqmin; height: 30cqmin; }
.cyl-wrap .cyl { width: 100%; height: 100%; filter: drop-shadow(0 2cqmin 3cqmin #000); }
@keyframes cyl-in { from { transform: translateX(-30cqmin) rotate(-90deg); opacity: 0; } }
/* the cylinder winds up and then keeps turning while the overlay fades */
/* one flick sets the cylinder spinning: about 4400 deg/s at the start, then
   exponential decay (k = 0.8/s); it is faded out long before it stops.
   Motion blur while it is fast, so the chambers do not strobe */
.load-cyl .cyl-rot { transform-origin: 0 0; animation: cyl-swing 6s 1.7s linear both; }
.spin-cyl .cyl-rot { transform-origin: 0 0; animation: cyl-swing 6s .15s linear both; }
.load-cyl { animation: cyl-mblur 2.6s 1.7s ease-out both; }
.spin-cyl { animation: cyl-mblur 2.6s .15s ease-out both; }
@keyframes cyl-mblur { 0% { filter: drop-shadow(0 2cqmin 3cqmin #000); } 1% { filter: blur(3px) drop-shadow(0 2cqmin 3cqmin #000); } 100% { filter: blur(0) drop-shadow(0 2cqmin 3cqmin #000); } }
@keyframes cyl-swing { 0% { transform: rotate(0deg); } 2.5% { transform: rotate(622deg); } 5% { transform: rotate(1174deg); } 7.5% { transform: rotate(1663deg); } 10% { transform: rotate(2097deg); } 12.5% { transform: rotate(2482deg); } 15% { transform: rotate(2823deg); } 17.5% { transform: rotate(3126deg); } 20% { transform: rotate(3394deg); } 22.5% { transform: rotate(3632deg); } 25% { transform: rotate(3843deg); } 27.5% { transform: rotate(4031deg); } 30% { transform: rotate(4197deg); } 32.5% { transform: rotate(4344deg); } 35% { transform: rotate(4475deg); } 37.5% { transform: rotate(4591deg); } 40% { transform: rotate(4694deg); } 42.5% { transform: rotate(4785deg); } 45% { transform: rotate(4866deg); } 47.5% { transform: rotate(4937deg); } 50% { transform: rotate(5001deg); } 52.5% { transform: rotate(5057deg); } 55% { transform: rotate(5108deg); } 57.5% { transform: rotate(5152deg); } 60% { transform: rotate(5191deg); } 62.5% { transform: rotate(5226deg); } 65% { transform: rotate(5257deg); } 67.5% { transform: rotate(5285deg); } 70% { transform: rotate(5309deg); } 72.5% { transform: rotate(5331deg); } 75% { transform: rotate(5350deg); } 77.5% { transform: rotate(5367deg); } 80% { transform: rotate(5382deg); } 82.5% { transform: rotate(5395deg); } 85% { transform: rotate(5407deg); } 87.5% { transform: rotate(5418deg); } 90% { transform: rotate(5427deg); } 92.5% { transform: rotate(5435deg); } 95% { transform: rotate(5442deg); } 97.5% { transform: rotate(5449deg); } 100% { transform: rotate(5455deg); } }
.ov.fading { transition: opacity 1.6s ease-in; opacity: 0; pointer-events: none; }
.ov-spin.fading { transition-duration: 1.4s; }
.load-cyl .chamber.target .round { display: inline; opacity: 0; }
@keyframes appear { to { opacity: 1; } }
.load-cyl .chamber.target .round { animation: appear .01s 1.05s forwards; }
.fly-cart { position: absolute; width: 10cqmin; height: 10cqmin; left: calc(50% + var(--cx) - 5cqmin); top: calc(50% + var(--cy) - 5cqmin); opacity: 0;
  animation: cart-fly .55s .5s cubic-bezier(.3,.6,.4,1) forwards; filter: drop-shadow(0 1cqmin 1cqmin #000); }
@keyframes cart-fly { 0% { opacity: 1; transform: translate(40cqmin, 34cqmin) scale(2.2) rotate(40deg); } 90% { opacity: 1; transform: translate(0, 0) scale(1); } 100% { opacity: 0; transform: translate(0, 0) scale(.95); } }

/* the close-up at the temple */
.ov-temple { background: radial-gradient(ellipse 70% 60% at 45% 40%, #1c1612, #050302 75%); overflow: hidden; --p: 0; }
.vignette { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse 60% 55% at 45% 40%, transparent 40%, rgba(0,0,0,.85) 100%); transition: opacity .2s; }
.ov-temple.beat .vignette { animation: beat .35s ease-out; }
@keyframes beat { 0% { opacity: 1; transform: scale(1); } 30% { opacity: .9; transform: scale(.96); } 100% { opacity: 1; transform: scale(1); } }
.ov-temple.pulling .vignette { background: radial-gradient(ellipse calc(60% - var(--p) * 25%) calc(55% - var(--p) * 22%) at 45% 40%, transparent 40%, rgba(40,0,0,.95) 100%); }
.stage { position: relative; width: min(92cqw, 118cqh); aspect-ratio: 900 / 700; margin-top: -4cqmin; }
.stage-svg, .stage-blood { position: absolute; inset: 0; width: 100%; height: 100%; }
.stage-blood { pointer-events: none; }
.stage-svg .sil { fill: #080605; }
.stage-svg .rim { stroke: var(--pc); stroke-width: 3; stroke-opacity: .5; }
.stage-svg .hair { fill: #15100d; }
.stage-svg .arm-path { fill: none; stroke: #080605; stroke-width: 84; stroke-linecap: round; }
.stage-svg .person { transform-box: view-box; transform-origin: 160px 700px; }
.stage-svg .head { transform-box: view-box; transform-origin: 390px 400px; }
.stage-svg .arm { transform-box: view-box; transform-origin: 640px 700px; }
.stage-svg .gun { transform-box: view-box; transform-origin: 760px 360px; }
.stage-svg .flash { opacity: 0; }
.ov-temple { animation: ov-in .4s ease-out; }
.ov-temple .stage-svg .arm { animation: aim-in .8s cubic-bezier(.3,.8,.3,1) backwards; }
@keyframes aim-in { from { transform: translate(120px, 260px) rotate(18deg); } }
.ov-temple.pulling .gun { transform: rotate(calc(var(--p) * -3deg)); }
.ov-temple .person { animation: breathe 3.2s ease-in-out infinite; }
@keyframes breathe { 50% { transform: translateY(4px); } }
.ov-temple.clicked .gun { animation: dry .25s ease-out; }
@keyframes dry { 40% { transform: rotate(-2deg) translateX(3px); } }
.ov-temple.banged .person { animation: none; }
.ov-temple.banged .person { animation: fall 1.5s .05s cubic-bezier(.45,.05,.6,1) forwards; }
@keyframes fall { 0% { transform: none; } 12% { transform: translateX(-22px) rotate(-4deg); } 100% { transform: translate(-40px, 150px) rotate(-62deg); } }
.ov-temple.banged .head { animation: hit .5s cubic-bezier(.2,.9,.3,1) forwards; }
@keyframes hit { 0% { transform: none; } 25% { transform: translateX(-26px) rotate(-16deg); } 100% { transform: translateX(-10px) rotate(-24deg); } }
.ov-temple.banged .arm { animation: drop-arm 1.2s cubic-bezier(.3,.6,.4,1) forwards; }
@keyframes drop-arm { 0% { transform: none; } 10% { transform: translate(40px, -30px) rotate(-14deg); } 100% { transform: translate(160px, 420px) rotate(50deg); } }
.ov-temple.banged .flash { animation: flash .18s ease-out; }
@keyframes flash { 0% { opacity: 1; } 100% { opacity: 0; } }
.ov-temple.banged::after { content: ''; position: absolute; inset: 0; pointer-events: none; animation: whiteout .9s ease-out forwards; }
@keyframes whiteout { 0% { background: rgba(255, 250, 235, .95); } 12% { background: rgba(160, 0, 0, .55); } 100% { background: rgba(70, 0, 0, .35); } }
.ov-name { position: absolute; left: 0; right: 0; bottom: 4cqmin; text-align: center; font-family: var(--stencil); font-size: 4cqmin; letter-spacing: .12em; color: var(--cream); text-shadow: 0 .3cqmin 1cqmin #000; }
.ov-temple.mine .ov-name { bottom: auto; top: 3cqmin; }
.ov-odds { position: absolute; top: 3cqmin; right: 3cqmin; font-family: var(--stencil); font-size: 2.6cqmin; letter-spacing: .1em; color: #bfb19c; }
.ov-word { position: absolute; left: 0; right: 0; top: 40%; text-align: center; font-family: var(--stencil); font-size: 11cqmin; letter-spacing: .08em; color: #fff; text-shadow: 0 .5cqmin 2cqmin #000; pointer-events: none; z-index: 3; }
.ov-word:empty { display: none; }
.ov-temple.clicked .ov-word { animation: word .35s cubic-bezier(.2,1.6,.4,1); }
.ov-word.soft { font-size: 6cqmin; color: #cfe8c8; animation: word .35s; }
.ov-word.dead { font-size: 7cqmin; color: #ff4a3a; text-shadow: 0 0 3cqmin rgba(255, 0, 0, .6), 0 .5cqmin 2cqmin #000; animation: word .5s; }
@keyframes word { from { scale: 1.6; opacity: 0; } }
.pull-btn { position: absolute; bottom: 4cqmin; left: 50%; transform: translateX(-50%); width: 46cqmin; padding: 2.4cqmin 2cqmin 2cqmin; overflow: hidden; background: linear-gradient(180deg, #c3201a, #6e0907); color: #fff; font-size: 4.6cqmin; display: flex; flex-direction: column; align-items: center; gap: .6cqmin;
  box-shadow: 0 .8cqmin 0 #330302, 0 1.6cqmin 3cqmin rgba(0,0,0,.8); touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.ov-temple .pull-btn { animation: ov-in .4s .8s backwards; }
.pull-btn:active { transform: translateX(-50%) translateY(.5cqmin); }
.pull-ring { position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--p) * 100%); background: rgba(0, 0, 0, .45); pointer-events: none; }
.pull-label, .pull-hold { position: relative; }
.pull-hold { font-family: Montserrat, sans-serif; font-size: 1.8cqmin; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; opacity: .8; }
.ov-temple.fired .pull-btn { opacity: 0; pointer-events: none; transition: opacity .2s; }

/* ---------------------------------------------------------------- side panel */
.side { flex: 1 1 auto; min-height: 0; overflow: auto; width: min(100%, 560px); background: rgba(10, 7, 5, .88); color: #eee; border-radius: 12px; padding: 12px 14px; box-shadow: 0 8px 24px rgba(0,0,0,.4); }
.side h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: #a99c8c; margin: 0 0 4px; }
.side .list li { border-bottom-color: rgba(255,255,255,.08); padding: 6px 0; }
.side .muted { color: #a99c8c; }
.standings li.active strong { color: #ffd9a8; }
.standings li.dead { opacity: .55; }
.standings li.dead strong { text-decoration: line-through; text-decoration-color: var(--red); }
.row-between { display: flex; justify-content: space-between; gap: 8px; }
.log { list-style: none; margin: 10px 0 0; padding: 0; font-size: .78rem; }
.log li { opacity: .75; padding: 2px 0; }
.log li:first-child { opacity: 1; }

/* menu + modal overlays */
.menu { position: fixed; right: 12px; top: calc(max(8px, env(safe-area-inset-top)) + 44px); z-index: 1200; background: #fff; border-radius: 12px; padding: 6px; display: flex; flex-direction: column; min-width: 220px; box-shadow: 0 12px 30px rgba(0,0,0,.5); animation: pop .2s; }
.menu button { background: none; box-shadow: none; color: var(--ink); text-align: left; padding: 10px 12px; font-weight: 700; }
.menu button:hover { background: #f3ebe0; }
.overlay { position: fixed; inset: 0; z-index: 1300; background: rgba(8, 4, 2, .66); display: grid; place-items: center; padding: 16px; animation: fade-in .3s; backdrop-filter: blur(3px); }
.overlay.clear { background: transparent; backdrop-filter: none; }
.over-ov { animation: fade-in .8s; }
.over-ov.died { background: rgba(60, 0, 0, .72); }
.modal { width: min(480px, 100%); max-height: calc(100svh - 32px); overflow: auto; color: var(--ink); animation: pop .35s; }
.over { text-align: center; border-top: 6px solid var(--red); }
.over h2 { font-size: 2rem; font-weight: 400; font-family: var(--stencil); letter-spacing: .03em; color: var(--red); }
.over-icon { font-size: 52px; line-height: 1.1; animation: pop .5s; }
.over-why { font-weight: 700; }
.scores li { text-align: left; }
.scores li.lose { background: #f6dcd6; border-radius: 10px; padding-left: 8px; padding-right: 8px; }
.score { white-space: nowrap; font-weight: 700; }
@keyframes pop { 0% { scale: 1.15; } 100% { scale: 1; } }
@keyframes fade-in { from { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
}
