:root {
  color-scheme: dark;
  --bg: #0b1018;
  --bg-2: #111827;
  --surface: #182131;
  --surface-elev: #202b3f;
  --text: #f1efe9;
  --muted: #b3ad9f;
  --primary: #8e2b34;
  --primary-strong: #b43d48;
  --secondary: #b79358;
  --success: #5d8968;
  --danger: #9b3641;
  --border: #6d665d66;
  --shadow: 0 16px 38px rgba(0, 0, 0, 0.45);
  --btn-shadow: 0 6px 0 rgba(49, 16, 22, 0.72), 0 12px 20px rgba(0, 0, 0, 0.28);
  --btn-shadow-soft: 0 4px 0 rgba(8, 12, 20, 0.78), 0 10px 18px rgba(0, 0, 0, 0.22);
  --btn-shadow-pressed: 0 2px 0 rgba(8, 12, 20, 0.82), 0 5px 10px rgba(0, 0, 0, 0.2);
  --title-font: "Spectral", Georgia, serif;
  --body-font: "Inter", system-ui, -apple-system, Segoe UI, sans-serif;
}
* { box-sizing: border-box; }
html,
body {
  overscroll-behavior-y: none;
}
body {
  margin: 0;
  font-family: var(--body-font);
  background:
    radial-gradient(circle at 12% 8%, #27344b66 0%, transparent 35%),
    radial-gradient(circle at 85% 25%, #57212444 0%, transparent 30%),
    radial-gradient(circle at center, #00000000 52%, #00000099 100%),
    linear-gradient(165deg, var(--bg), var(--bg-2));
  color: var(--text);
}
body::before { content:""; position:fixed; inset:0; pointer-events:none; opacity:.07; background-image: radial-gradient(#d9d0be 0.7px, transparent 0.7px); background-size: 3px 3px; }
.app-shell { min-height: 100vh; padding: 16px 14px 20px; max-width: 720px; margin: 0 auto; }
.card { background: linear-gradient(180deg, #1d2738, #141d2b); border: 1px solid var(--border); border-radius: 16px; padding: 15px; margin-bottom: 10px; box-shadow: var(--shadow); }
.phase-card { border-left: 3px solid #7e3240; }
.role-reveal-card { margin-top: 12px; border-left: 3px solid #5a769a; }
.role-reveal-list { margin: 8px 0 0; padding-left: 18px; }
.role-reveal-list li { margin: 4px 0; }
h1,h2,h3 { margin: 0 0 10px; font-family: var(--title-font); letter-spacing: .02em; }
.game-title { font-size: clamp(2rem, 8vw, 2.8rem); text-transform: uppercase; letter-spacing: .08em; color: #e9e0cf; }
.subtitle { margin: 0 0 14px; font-size: .92rem; color: var(--secondary); }
label { display:block; font-size:.88rem; color:var(--muted); margin-bottom:6px; }
input, select, button { width:100%; border-radius: 10px; border:1px solid #4a4f5a; background:#101725; color:var(--text); padding:11px; font-size:1rem; }
.checkbox-row { display:flex; align-items:center; gap:10px; margin:8px 0; }
.checkbox-row input[type="checkbox"] { width:auto; margin:0; padding:0; }
.checkbox-row span { color:var(--muted); font-size:.88rem; line-height:1.3; }
button,
[role="button"] {
  position: relative;
  background:
    linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,0) 42%),
    linear-gradient(180deg, var(--primary-strong), var(--primary));
  border-color:#d6828b88;
  border-bottom-color:#5f2028;
  border-bottom-width:3px;
  box-shadow: var(--btn-shadow), inset 0 1px 0 rgba(255,255,255,.22), inset 0 -1px 0 rgba(0,0,0,.22);
  cursor:pointer;
  font-weight:800;
  letter-spacing:.01em;
  min-height:42px;
  text-shadow:0 1px 0 rgba(0,0,0,.28);
  touch-action:manipulation;
  transition: transform .12s ease, filter .12s ease, box-shadow .12s ease, border-color .12s ease;
  user-select:none;
}
button:hover:not(:disabled),
[role="button"]:hover {
  filter: brightness(1.08) saturate(1.05);
  transform: translateY(-1px);
}
button:active:not(:disabled),
[role="button"]:active {
  border-bottom-width:1px;
  box-shadow: var(--btn-shadow-pressed), inset 0 2px 6px rgba(0,0,0,.28);
  transform: translateY(2px);
}
button:focus-visible,
[role="button"]:focus-visible {
  outline:3px solid rgba(233, 200, 137, .95);
  outline-offset:3px;
  box-shadow: 0 0 0 5px rgba(183,147,88,.2), var(--btn-shadow), inset 0 1px 0 rgba(255,255,255,.2);
}
button.secondary {
  background:
    linear-gradient(180deg, rgba(255,255,255,.13), rgba(255,255,255,0) 42%),
    linear-gradient(180deg, #37445b, #222c3d);
  border-color:#6f7d9977;
  border-bottom-color:#151c2a;
  box-shadow: var(--btn-shadow-soft), inset 0 1px 0 rgba(255,255,255,.16), inset 0 -1px 0 rgba(0,0,0,.2);
}
.help-action-btn {
  background:
    linear-gradient(180deg, rgba(255,255,255,.22), rgba(255,255,255,0) 42%),
    linear-gradient(180deg, #e2b85e, #a87424);
  border-color:#ffe09a99;
  border-bottom-color:#654211;
  color:#fff8e6;
  box-shadow: 0 6px 0 rgba(88,54,12,.82), 0 12px 20px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.3);
}
button:disabled {
  opacity:.5;
  filter: grayscale(.25) brightness(.82);
  cursor:not-allowed;
  transform:none;
  box-shadow: 0 2px 0 rgba(8,12,20,.72), inset 0 1px 0 rgba(255,255,255,.08);
}
button:disabled:hover { transform:none; filter: grayscale(.25) brightness(.82); }
.row { display:flex; gap:8px; }
.row > * { flex:1; }
.small { font-size:.85rem; color:var(--muted); }
.error,.ready-error { background:#6d1b293d; border:1px solid #d57d8a66; color:#ffe3e5; padding:10px; border-radius:10px; }
.kpi { font-size: 2rem; letter-spacing: .26em; font-weight: 900; text-align:center; margin:8px 0; }
ul.players { margin: 8px 0 0; padding-left: 18px; }
#qr-box { display:flex; justify-content:center; padding:10px; background:#f4eddc; border-radius:10px; width:fit-content; margin:10px auto 0; border:2px solid #ccb991; }
.mode-toggle { display:flex; gap:8px; margin-bottom:10px; }
.mode-toggle button.active { outline:2px solid var(--secondary); outline-offset:2px; box-shadow: 0 0 0 4px rgba(183,147,88,.16), var(--btn-shadow); }

.hud { position: sticky; top: 8px; z-index: 4; backdrop-filter: blur(2px); }
.hud-top { display:flex; justify-content:space-between; align-items:center; margin-bottom:8px; }
.objective-grid { display:grid; gap:8px; }
.objective-card { border:1px solid #6f675e70; border-radius:12px; padding:9px; background:linear-gradient(160deg,#1a202e,#24293a); }
.objective-head, .objective-meta { display:flex; justify-content:space-between; align-items:center; gap:8px; }
.objective-head h3 { font-size: .98rem; margin-bottom:2px; line-height: 1.15; }
.objective-location-sub { display:block; margin-top:1px; font-family: var(--body-font); font-size:.74rem; line-height:1.15; color:var(--muted); font-weight:700; letter-spacing:.01em; }
.objective-progress-inline { font-size: .92em; font-weight: 700; letter-spacing: .01em; }
.objective-meta { min-height: 0.5rem; margin-bottom: 6px; }
.objective-card.locked { opacity:.55; }
.objective-card.completed { box-shadow: inset 0 0 0 1px #8cb88988; }
.objective-provisions { border-left:3px solid #b88d54; }
.objective-weapons { border-left:3px solid #98505f; }
.objective-propaganda { border-left:3px solid #8ea0b4; }
.gauge.segmented { height: 15px; border:1px solid #5b6270; border-radius:999px; overflow:hidden; background:
  repeating-linear-gradient(to right, #0f131d 0 calc((100% / var(--segments)) - 2px), #364053 calc((100% / var(--segments)) - 2px) calc(100% / var(--segments))); }
.gauge span { display:block; height:100%; background: linear-gradient(90deg, #8e2b34, #b79358); }
.objective-card.completed .gauge span { background: linear-gradient(90deg, #557f61, #86b492); }
.delta { color: #e2c88d; font-weight:700; }
.results-grid { gap: 12px; }
.result-card { padding: 10px 12px; }
.result-gauge { display:grid; grid-template-columns: repeat(var(--segments), minmax(0, 1fr)); gap:4px; margin-top:10px; }
.result-seg { height: 18px; border-radius: 5px; border:1px solid #5f6573; background:#101522; }
.result-seg.seg-old { background: linear-gradient(180deg,#7b3542,#5f2c38); border-color:#9d5b68; }
.result-seg.seg-new { background: linear-gradient(180deg,#b49763,#927a4f); border-color:#d6bd8d; }
.result-seg.seg-empty { opacity: .8; }
.result-delta { font-weight: 800; font-size: .92rem; white-space:nowrap; }
.delta-positive { color: #d8c18a; }
.delta-neutral { color: var(--muted); }
.result-card.completed .result-delta { color: #9cc9a7; }
.result-animate .seg-old { animation: oldFill .28s ease-out both; }
.result-animate .seg-new { animation: newFill .45s ease-out .25s both; transform-origin: left center; }
.result-animate .result-delta { animation: deltaIn .35s ease-out .35s both; opacity: 0; }
@keyframes oldFill { from { opacity: 0; } to { opacity: 1; } }
@keyframes newFill { from { transform: scaleX(0.25); filter: brightness(.8); } to { transform: scaleX(1); filter: brightness(1); } }
@keyframes deltaIn { from { opacity:0; transform: translateY(4px);} to { opacity:1; transform:translateY(0);} }

.choices { display:grid; gap:8px; }
.choice-btn, .vote-btn {
  text-align:left;
  padding:12px;
  border-radius:12px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,0) 46%),
    linear-gradient(180deg,#303c56,#1d2738);
  border-color:#68769388;
  border-bottom-color:#111827;
  box-shadow: var(--btn-shadow-soft), inset 0 1px 0 rgba(255,255,255,.16);
}
.choice-btn.active {
  outline:2px solid var(--secondary);
  outline-offset:2px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,0) 42%),
    linear-gradient(180deg,#4a425c,#2c3346);
  border-color:#d2ae6b;
  box-shadow: 0 0 0 4px rgba(183,147,88,.14), var(--btn-shadow-soft), inset 0 1px 0 rgba(255,255,255,.18);
}
.choice-btn.active::after {
  content:"✓";
  float:right;
  font-weight:900;
  color:#f1d59e;
}
.vote-btn-success {
  background:
    linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,0) 42%),
    linear-gradient(180deg,#386948,#254635);
  border-color:#8cc59a;
  border-bottom-color:#173320;
  color:#e7fff0;
  outline:2px solid #95cfa3;
  outline-offset:2px;
}
.choice-confirm, .choice-submitted { margin:10px 0; padding:12px; border-radius:12px; border:1px solid #67605677; background:#1a2232; }
.choice-confirm { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.choice-confirm p { margin:0; line-height:1.25; }
.choice-submitted { border-color:#5f8a68; background:#1b2b22; }
.small-btn { width:auto; display:inline-block; padding:7px 12px; min-height:34px; flex:0 0 auto; }
.action-zone { margin-top: 12px; padding-top: 10px; border-top: 1px dashed #7f6f5e66; }
.action-choice-row { align-items: stretch; flex-wrap: wrap; }
.action-choice-row button { min-width: 0; border-radius:14px; }
#act-sabotage {
  background:
    linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,0) 42%),
    linear-gradient(180deg,#873240,#641d2a);
  border-color:#e48794aa;
  border-bottom-color:#3c1018;
}
#act-no-action {
  background:
    linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,0) 42%),
    linear-gradient(180deg,#414b5e,#2a3140);
}
.action-label-row { display:inline-flex; align-items:center; justify-content:center; gap:7px; width:100%; }
.action-info-trigger { width:24px; min-width:24px; height:24px; font-size:.82rem; flex:0 0 auto; pointer-events:auto; }


.timer-shell { display:flex; flex-direction:column; align-items:center; gap:8px; margin:10px auto 10px; }
.timer-ring-wrap { width:min(74vw,260px); aspect-ratio:1/1; position:relative; display:grid; place-items:center; }
.timer-ring { width:100%; height:100%; transform: rotate(-90deg); }
.timer-ring-bg,.timer-ring-progress { fill:none; stroke-width:11; }
.timer-ring-bg { stroke:#2b3345; }
.timer-ring-progress { stroke: var(--secondary); transition: stroke-dashoffset .8s linear, stroke .25s ease; stroke-linecap: round; }
.timer-seconds { font-size: clamp(2.4rem, 13vw, 4rem); font-weight: 900; }
.timer-unit, .timer-status, .timer-wait { color: var(--muted); }
.timer-danger .timer-ring-progress { stroke: #cb4f5c; }
.timer-danger .timer-seconds { color:#ffcad0; }

.utility-bar { display:flex; justify-content:flex-end; margin-bottom:6px; }
.utility-btn-row { display:flex; gap:6px; }
.utility-btn { width:auto; padding:6px 10px; min-height:34px; font-size:.85rem; background:linear-gradient(180deg,#354057,#242d3e); }
.modal-backdrop { position: fixed; inset:0; z-index:20; background: rgba(5,8,12,.8); display:flex; align-items:center; justify-content:center; padding:14px; }
.modal-card { width:min(100%,540px); background:linear-gradient(180deg,#1f2839,#182132); border:1px solid #7d716369; border-radius:14px; padding:16px; position:relative; }
.modal-close { position:absolute; top:9px; right:10px; width:34px; min-height:34px; padding:0; border-radius:999px; }

.info-label-row { display:flex; align-items:center; gap:8px; }
.bluff-help-card {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px dashed #8e9aaf;
  border-radius: 10px;
  background: rgba(166, 188, 212, 0.08);
}
.bluff-help-card h4 {
  margin: 0 0 6px;
  font-size: .95rem;
}
.bluff-help-card-title {
  color: var(--secondary);
  font-weight: 700;
}
.bluff-help-card p {
  margin: 0 0 6px;
  font-size: .92rem;
}
.bluff-help-card p.small { font-size: .8rem; }
.info-help-trigger { width:28px; min-width:28px; height:28px; min-height:28px; border-radius:999px; padding:0; display:inline-flex; align-items:center; justify-content:center; font-size:.92rem; font-weight:900; line-height:1; background: linear-gradient(180deg,#43506a,#252f43); border:1px solid #8190ad88; border-bottom:2px solid #121926; color:var(--text); box-shadow: 0 3px 0 rgba(8,12,20,.78), 0 6px 12px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.16); }
.status-success { color: var(--success); font-weight: 700; }
.status-danger { color: var(--danger); font-weight: 700; }
@media (max-width: 768px) {
  .info-label-row { gap:6px; margin-bottom:6px; }
  .info-help-trigger { width:30px; min-width:30px; height:30px; }
}


.ready-btn-ready { background: linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,0) 42%), linear-gradient(180deg,#4f7a5b,#35543f); border-color:#91c89c; border-bottom-color:#1f3828; }
.ready-waiting { color:#cbd9f3; }
.advanced-options { margin-top:12px; border-top:1px solid #70635557; padding-top:10px; }
.host-tools-sound { margin-top: 10px; margin-bottom: 8px; }
.host-tools-sound .timer-audio-controls { align-items: flex-start; margin-left: 0; }
.host-tools-sound .timer-audio-hint { text-align: left; max-width: 100%; }
.advanced-body { margin-top:10px; border:1px solid #6c474f66; border-radius:10px; padding:10px; background:#261a21; }
.danger-btn { background: linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,0) 42%), linear-gradient(180deg,#8b2b3a,#611b27); border-color:#dd7788; border-bottom-color:#3c1018; }
.pause-overlay { position:fixed; inset:0; background:rgba(0,0,0,.68); display:flex; align-items:center; justify-content:center; padding:16px; z-index:10; }

@media (max-width: 768px) {
  /* Final mobile density adjustments */
  .app-shell { padding: 9px 9px 12px; }
  .card { padding: 9px; margin-bottom: 5px; border-radius: 14px; }
  h1, h2, h3 { margin-bottom: 6px; }
  h2 { font-size: 1.26rem; }
  button, input, select { padding: 9px; }
  .small { font-size: .79rem; line-height: 1.25; }
  .hud { top: 3px; padding-top: 0; padding-bottom: 0; }
  .hud-top { margin-bottom: 2px; }
  .objective-grid { gap: 4px; }
  .objective-card { padding: 5px 6px; border-radius: 10px; }
  .objective-head h3 { font-size: .86rem; margin-bottom: 0; }
  .objective-head .small { font-size: .67rem; }
  .objective-progress-inline { font-size: .88em; }
  .objective-meta { margin-bottom: 4px; }
  .gauge.segmented { height: 10px; }
  .phase-card { margin-top: 6px; }
  .phase-card > .small { margin-top: -2px; margin-bottom: 3px; }
  .timer-shell { gap: 3px; margin: 2px auto 4px; }
  .timer-ring-wrap { width: min(41vw, 150px); }
  .timer-ring-bg, .timer-ring-progress { stroke-width: 10; }
  .timer-seconds { font-size: clamp(1.6rem, 8.2vw, 2.5rem); line-height: 1; }
  .timer-unit { font-size: .78rem; line-height: 1.1; }
  .choices { gap: 6px; }
  .choice-btn, .vote-btn { padding: 9px; }
  .action-zone { margin-top: 7px; padding-top: 7px; }
}
.role-preferences { margin-top: 12px; padding-top: 10px; border-top: 1px solid #58657f55; }
.role-preferences .local-pref-card { max-width: 100%; }
.local-pref-card { display:flex; flex-direction:column; gap:3px; padding:7px 9px; border:1px solid #58657f55; border-radius:10px; background:rgba(35,44,61,.58); max-width:250px; }
.local-pref-toggle { display:flex; align-items:center; gap:6px; font-size:.8rem; color:var(--muted); font-weight:700; }
.local-pref-toggle input { width:auto; margin:0; }
.local-pref-hint { line-height:1.2; }
.timer-audio-controls { display:flex; flex-direction:column; align-items:flex-end; gap:4px; margin-left:8px; }
.timer-audio-toggle { display:flex; align-items:center; gap:6px; font-size:.8rem; color:var(--muted); }
.timer-audio-toggle input { width:auto; margin:0; }
.timer-audio-hint { max-width:230px; text-align:right; }
@media (max-width: 768px) {
  .utility-bar { justify-content:space-between; align-items:flex-start; gap:8px; }
  .local-pref-card { max-width:100%; }
  .timer-audio-controls { align-items:flex-start; margin-left:0; }
  .timer-audio-hint { text-align:left; max-width:100%; }
}

.discussion-actions { display:flex; flex-direction:column; gap:8px; }

.result-sabotage { margin-top: 8px; display: inline-block; padding: 3px 8px; border-radius: 999px; background: rgba(203,79,92,0.18); border: 1px solid #cb4f5c; color: #ffcad0; font-weight: 800; font-size: .82rem; }

.warning-text{margin:8px 0;padding:10px;border-left:4px solid #f0ad4e;background:rgba(240,173,78,.12);color:#ffd38a;font-weight:600;}

/* Home / entry screen */
.home-shell {
  position: relative;
  isolation: isolate;
  min-height: calc(100vh - 36px);
  display: grid;
  align-content: center;
  gap: 12px;
  padding: clamp(6px, 2vw, 18px) 0;
}
.home-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    linear-gradient(115deg, transparent 0 48%, rgba(183, 147, 88, .08) 48% 48.25%, transparent 48.25% 100%),
    linear-gradient(24deg, transparent 0 59%, rgba(180, 61, 72, .12) 59% 59.22%, transparent 59.22% 100%),
    repeating-linear-gradient(90deg, rgba(241,239,233,.025) 0 1px, transparent 1px 76px),
    repeating-linear-gradient(0deg, rgba(241,239,233,.018) 0 1px, transparent 1px 76px);
  mask-image: linear-gradient(to bottom, transparent, #000 8%, #000 92%, transparent);
}
.home-atmosphere { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.moon-mark { position: absolute; top: 7vh; right: max(18px, 9vw); width: 84px; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #efe6d7, #aeb8c7 52%, transparent 54%); opacity: .22; filter: blur(.2px); }
.dossier-mark { position: absolute; left: -20px; top: 19vh; transform: rotate(-13deg); border: 2px solid rgba(203,79,92,.34); color: rgba(255,202,208,.42); padding: 8px 18px; border-radius: 4px; font-size: .84rem; letter-spacing: .24em; font-weight: 900; }
.signal-line { position: absolute; width: 34vw; max-width: 360px; height: 1px; background: linear-gradient(90deg, transparent, rgba(183,147,88,.36), transparent); transform-origin: left center; opacity: .75; }
.signal-line::before, .signal-line::after { content: ""; position: absolute; top: -4px; width: 9px; height: 9px; border-radius: 50%; background: rgba(180,61,72,.55); box-shadow: 0 0 24px rgba(180,61,72,.45); }
.signal-line::before { left: 18%; }
.signal-line::after { right: 12%; }
.signal-line-one { left: 8vw; bottom: 20vh; transform: rotate(-19deg); }
.signal-line-two { right: 5vw; top: 36vh; transform: rotate(24deg); }
.home-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(16px, 3.4vw, 24px);
  border: 1px solid rgba(183, 147, 88, .28);
  border-radius: 24px;
  background:
    radial-gradient(circle at 12% 15%, rgba(180,61,72,.18), transparent 32%),
    radial-gradient(circle at 84% 10%, rgba(90,118,154,.2), transparent 34%),
    linear-gradient(180deg, rgba(31,40,57,.92), rgba(13,18,28,.96));
  box-shadow: 0 24px 70px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.04);
  text-align: center;
}
.home-hero::after { content: "ŒIL OUVERT"; position: absolute; right: -26px; bottom: 18px; transform: rotate(-9deg); color: rgba(183,147,88,.11); border: 1px solid rgba(183,147,88,.16); padding: 8px 24px; font-weight: 900; letter-spacing: .18em; }
.eyebrow { color: #d9c08e; font-size: .76rem; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; margin-bottom: 8px; }
.home-intro { max-width: 560px; margin: -4px auto 10px; color: #d8d2c8; line-height: 1.45; }
.info-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; margin: 10px 0 0; }
.info-pills span { border: 1px solid rgba(183,147,88,.34); background: rgba(10,15,24,.52); color: #f2dfb7; border-radius: 999px; padding: 7px 10px; font-size: .82rem; font-weight: 800; }
.entry-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.entry-card { position: relative; overflow: hidden; margin-bottom: 0; padding: 17px; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.entry-card::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(135deg, rgba(183,147,88,.1), transparent 38%), radial-gradient(circle at 92% 12%, rgba(203,79,92,.18), transparent 28%); opacity: .7; }
.entry-card { border-color: rgba(217,192,142,.38); box-shadow: 0 18px 42px rgba(0,0,0,.42), 0 0 0 1px rgba(183,147,88,.08) inset; }
.entry-card-head { position: relative; display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.entry-icon { flex: 0 0 42px; height: 42px; display: grid; place-items: center; border-radius: 14px; background: linear-gradient(160deg, rgba(180,61,72,.28), rgba(16,23,37,.8)); border: 1px solid rgba(199,104,111,.48); color: #ffced4; font-size: 1.35rem; box-shadow: inset 0 1px 0 rgba(255,255,255,.06); }
.entry-form { position: relative; display: grid; gap: 8px; }
.entry-form button {
  margin-top: 4px;
  min-height: 48px;
  font-family: var(--body-font);
  font-weight: 700;
  letter-spacing: 0;
  background:
    linear-gradient(180deg, rgba(255,255,255,.22), rgba(255,255,255,0) 42%),
    linear-gradient(180deg, #e2b85e, #a87424);
  border-color: #ffe09a99;
  border-bottom-color: #654211;
  color: #fff8e6;
  box-shadow: 0 10px 24px rgba(168, 116, 36, .26), 0 6px 0 rgba(88, 54, 12, .82), inset 0 1px 0 rgba(255,255,255,.3);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.22);
}
.entry-form input { min-height: 46px; background: rgba(8,13,22,.82); border-color: rgba(129,137,154,.62); }
.entry-form input:focus { outline: 2px solid rgba(183,147,88,.62); outline-offset: 1px; border-color: rgba(217,192,142,.7); }
.how-strip { border: 1px solid rgba(109,102,93,.48); border-radius: 18px; background: rgba(12,17,27,.68); padding: 13px 15px; box-shadow: 0 16px 36px rgba(0,0,0,.28); }
.how-strip h2 { font-size: 1.08rem; margin-bottom: 8px; color: #ead9b8; }
.how-strip ol { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; counter-reset: steps; }
.how-strip li { counter-increment: steps; position: relative; padding: 10px 10px 10px 38px; border-radius: 12px; background: rgba(31,39,55,.62); color: #d8d2c8; font-size: .82rem; line-height: 1.28; }
.how-strip li::before { content: counter(steps); position: absolute; left: 10px; top: 9px; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: rgba(180,61,72,.86); color: #fff3f4; font-weight: 900; font-size: .72rem; }

@media (max-width: 768px) {
  .home-shell { min-height: auto; align-content: start; gap: 10px; padding-top: 4px; }
  .home-hero { padding: 14px 12px; border-radius: 18px; }
  .home-hero .game-title { font-size: clamp(2rem, 12vw, 2.55rem); margin-bottom: 5px; }
  .home-intro { font-size: .88rem; margin-bottom: 8px; }
  .info-pills { gap: 5px; margin: 8px 0 0; }
  .info-pills span { padding: 6px 8px; font-size: .76rem; }
  .entry-grid, .how-strip ol { grid-template-columns: 1fr; }
  .entry-card { padding: 13px; border-radius: 16px; }
  .entry-card-head { margin-bottom: 10px; }
  .entry-icon { flex-basis: 38px; height: 38px; border-radius: 12px; }
  .how-strip { padding: 11px; }
  .how-strip li { padding-top: 9px; padding-bottom: 9px; }
  .moon-mark { width: 56px; top: 4vh; right: 18px; }
  .dossier-mark { display: none; }
}

/* Compact carry-over of the latest public results during private info/discussion. */
.latest-evolution-hud .hud-top { margin-bottom: 6px; }
.latest-evolution-grid { gap: 5px; }
.latest-evolution-card { padding: 6px 8px; }
.latest-evolution-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; align-items: center; gap: 6px; }
.latest-evolution-row h3 { min-width: 0; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9rem; }
.latest-value { color: var(--muted); font-size: .78rem; font-weight: 800; white-space: nowrap; }
.latest-delta { min-width: 2.15rem; padding: 1px 6px; border-radius: 999px; background: rgba(183,147,88,.12); text-align: center; line-height: 1.35; }
.latest-sabotage { padding: 1px 5px; border-radius: 999px; background: rgba(203,79,92,0.18); border: 1px solid #cb4f5c88; color: #ffcad0; font-size: .74rem; font-weight: 900; line-height: 1.25; white-space: nowrap; }
.latest-gauge { height: 9px; margin-top: 4px; }

@media (max-width: 768px) {
  .latest-evolution-hud { padding-bottom: 6px; }
  .latest-evolution-hud .hud-top { margin-bottom: 3px; }
  .latest-evolution-grid { gap: 3px; }
  .latest-evolution-card { padding: 4px 6px; }
  .latest-evolution-row { gap: 4px; }
  .latest-evolution-row h3 { font-size: .8rem; }
  .latest-value { font-size: .7rem; }
  .latest-delta { min-width: 1.85rem; padding: 0 5px; font-size: .72rem; }
  .latest-sabotage { padding: 0 4px; font-size: .68rem; }
  .latest-gauge { height: 7px; margin-top: 3px; }
}

.private-warning { display:flex; align-items:center; justify-content:space-between; gap:8px; margin:8px 0; padding:8px 10px; border:1px solid #d6a24f77; border-radius:12px; background:#3a2715; color:#ffe8bd; font-weight:700; font-size:.9rem; }
.private-stamp { display:inline-block; flex:0 0 auto; transform:rotate(-6deg); border:2px solid #c46a6acc; color:#e79b9bcc; border-radius:5px; padding:2px 6px; font-size:.72rem; letter-spacing:.08em; font-weight:900; opacity:.82; }
.prep-text { display:grid; gap:7px; margin:8px 0; }
.prep-text p { margin:0; line-height:1.35; }
.initial-prep-card .ready-btn { margin-top:8px; }
@media (max-width: 768px) {
  .private-warning { padding:7px 8px; font-size:.8rem; }
  .private-stamp { font-size:.64rem; padding:1px 5px; }
  .prep-text { gap:6px; }
  .prep-text p { font-size:.92rem; line-height:1.28; }
}

.home-secondary-link { margin: 2px 0 0; text-align: center; }
.home-secondary-link a,
.audio-back-link {
  color: var(--muted);
  font-size: .86rem;
  text-decoration: none;
  border-bottom: 1px solid rgba(179, 173, 159, .35);
}
.home-secondary-link a:hover,
.audio-back-link:hover { color: var(--secondary); border-bottom-color: var(--secondary); }

.audio-shell { max-width: 680px; display: grid; align-content: center; gap: 12px; }
.audio-hero { text-align: left; }
.audio-back-link { display: inline-block; margin-bottom: 14px; }
.audio-player-card { display: grid; gap: 14px; }
.audio-now { display: grid; gap: 4px; padding: 12px; border: 1px solid rgba(183,147,88,.28); border-radius: 12px; background: rgba(11,16,24,.45); }
.audio-now strong { font-family: var(--title-font); font-size: 1.35rem; color: #f3e4c8; }
.audio-controls { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.audio-options { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 14px; }
.audio-volume { margin: 0; }
.audio-volume span { display: block; margin-bottom: 6px; color: var(--muted); }
.audio-volume input { padding: 0; accent-color: var(--secondary); }
.audio-loop { margin: 0 0 2px; white-space: nowrap; }
.audio-empty { border: 1px dashed rgba(183,147,88,.42); border-radius: 12px; padding: 13px; background: rgba(11,16,24,.32); }
.audio-empty h2 { font-size: 1.15rem; margin-bottom: 6px; }
.audio-empty p { margin: 0; color: var(--muted); line-height: 1.4; }
.audio-empty code { color: #f1d59e; }

@media (max-width: 560px) {
  .audio-shell { align-content: start; }
  .audio-controls { grid-template-columns: 1fr 1fr; }
  .audio-options { grid-template-columns: 1fr; }
  .audio-loop { white-space: normal; }
}

.audio-control-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 58px;
  padding: 9px 8px;
  border-radius: 999px;
  font-size: .78rem;
  letter-spacing: .02em;
}
.audio-control-btn .player-icon { font-size: 1.2rem; line-height: 1; }
.audio-play-btn {
  background:
    linear-gradient(180deg, rgba(255,255,255,.24), rgba(255,255,255,0) 42%),
    linear-gradient(180deg, #e0b65f, #a87325);
  border-color:#ffe0a0aa;
  border-bottom-color:#6d4314;
  color:#fff8e9;
  box-shadow: 0 6px 0 rgba(89,55,12,.82), 0 12px 20px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.3);
}
.audio-play-btn:focus-visible {
  box-shadow: 0 0 0 5px rgba(226,184,94,.22), 0 6px 0 rgba(89,55,12,.82), 0 12px 20px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.3);
}
