/* ==========================================================================
   Slučaj za večeras — "Projekcija"
   Igra je filmsko veče: tamna sala (kino plava), svetlo projektora (amber),
   dokazi su papiri pod lampom (manila, pisaća mašina). Crvena samo za optužbu.
   ========================================================================== */

:root {
  --aud: #182127;
  --aud-deep: #0f171c;
  --aud-2: #1f2a31;
  --aud-3: #29363e;
  --line: rgba(217, 226, 228, 0.12);
  --line-2: rgba(217, 226, 228, 0.22);
  --fog: #dbe3e5;
  --fog-2: #9fb0b6;
  --fog-3: #6f8188;
  --lamp: #f0a83a;
  --lamp-2: #ffc46b;
  --lamp-ink: #2a1a05;
  --signal: #d4483b;
  --signal-2: #e86a5c;
  --manila: #e3cf9f;
  --manila-2: #d4bd86;
  --paper: #f1ede3;
  --ink: #23211d;
  --ink-2: #5a5448;
  --ok: #7fb59a;

  --display: "Big Shoulders Display", "Arial Narrow", "Roboto Condensed", "Helvetica Neue", sans-serif;
  --serif: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --type: "Special Elite", "Courier New", Courier, monospace;

  --r: 3px;
  --shadow: 0 14px 40px rgba(3, 8, 12, 0.5);
  --topbar: 64px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { font-size: 16px; }
html.tv { font-size: 21px; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--aud);
  color: var(--fog);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--lamp); }
:focus-visible { outline: 2px solid var(--lamp); outline-offset: 2px; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 800; letter-spacing: 0.01em; line-height: 1; }

.ic { width: 1.15em; height: 1.15em; flex: none; }

/* ---------------- dugmad ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  font-family: var(--display); font-weight: 700; font-size: 1.05rem; letter-spacing: 0.03em;
  padding: 0.55em 1.1em; border-radius: var(--r); border: 1px solid transparent;
  background: var(--aud-3); color: var(--fog);
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn.primary { background: var(--lamp); color: var(--lamp-ink); }
.btn.primary:hover:not(:disabled) { background: var(--lamp-2); }
.btn.danger { background: var(--signal); color: #fff6f2; }
.btn.danger:hover:not(:disabled) { background: var(--signal-2); }
.btn.ghost { background: transparent; border-color: var(--line-2); }
.btn.ghost:hover:not(:disabled) { border-color: var(--fog-2); }
.btn.small { font-size: 0.92rem; padding: 0.4em 0.8em; }
.btn.big { font-size: 1.3rem; padding: 0.6em 1.4em; }
.btn.icon-only { padding: 0.45em; width: 2.3em; height: 2.3em; }
.btn .cost { font-family: var(--serif); font-weight: 400; font-size: 0.8em; opacity: 0.75; }

.screen { min-height: 100vh; }

/* ==========================================================================
   POČETNA
   ========================================================================== */
#home { padding: 0 clamp(16px, 4vw, 56px) 64px; max-width: 1360px; margin: 0 auto; }
.home-bar { display: flex; align-items: center; justify-content: space-between; padding: 22px 0 10px; }
.wordmark { font-family: var(--display); font-weight: 900; font-size: 1.6rem; letter-spacing: 0.02em; color: var(--lamp); }
.home-bar-actions { display: flex; gap: 8px; }

.home-main { display: grid; grid-template-columns: 1fr minmax(420px, 0.95fr); gap: clamp(24px, 4vw, 64px); align-items: start; padding-top: 28px; }
.home-title { font-size: clamp(2.6rem, 5.4vw, 4.6rem); font-weight: 800; line-height: 0.95; letter-spacing: -0.005em; max-width: 12ch; color: var(--fog); }
.home-lead { max-width: 52ch; color: var(--fog-2); font-size: 1.1rem; margin: 22px 0 26px; }
.how { list-style: none; counter-reset: how; padding: 0; margin: 0; display: grid; gap: 10px; max-width: 46ch; }
.how li { counter-increment: how; position: relative; padding-left: 2.4rem; color: var(--fog-2); }
.how li::before { content: counter(how); position: absolute; left: 0; top: -0.1em; font-family: var(--display); font-weight: 900; font-size: 1.6rem; color: var(--lamp); line-height: 1; }
.how b { color: var(--fog); font-weight: 600; }

/* fascikla */
.dossier-form { position: relative; padding-top: 30px; }
.folder-tab {
  position: absolute; top: 0; left: 22px; height: 34px; padding: 6px 22px 0;
  background: var(--manila); color: var(--ink); border-radius: 6px 6px 0 0;
  font-family: var(--display); font-weight: 800; font-size: 1.05rem; letter-spacing: 0.03em;
}
.folder {
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(255, 255, 255, 0.18), transparent 60%),
    repeating-linear-gradient(0deg, rgba(90, 70, 30, 0.035) 0 2px, transparent 2px 5px),
    var(--manila);
  color: var(--ink);
  border-radius: 0 6px 6px 6px;
  padding: 26px 26px 22px;
  box-shadow: var(--shadow);
  display: grid; gap: 16px;
}
.field { display: grid; gap: 6px; }
.field-label { font-size: 0.95rem; color: var(--ink-2); }
.field-label em { font-style: normal; opacity: 0.75; }
.folder textarea, .folder input[type="text"] {
  width: 100%; border: 1px solid rgba(60, 45, 20, 0.25); border-radius: 2px;
  background: var(--paper); color: var(--ink);
  font-family: var(--type); font-size: 1rem; line-height: 1.5; padding: 12px 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 1px 0 rgba(60, 45, 20, 0.08);
}
.folder textarea { resize: vertical; min-height: 7.5em; }
.folder textarea:focus, .folder input:focus { outline: 2px solid var(--ink); outline-offset: 1px; }
.examples { display: flex; flex-wrap: wrap; gap: 6px; margin-top: -6px; }
.examples button {
  border: 1px dashed rgba(60, 45, 20, 0.45); background: transparent; color: var(--ink);
  border-radius: 999px; padding: 3px 11px; font-size: 0.92rem;
}
.examples button:hover { background: rgba(255, 255, 255, 0.35); }
.field-row { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 12px; }
.seg { border: 0; padding: 0; margin: 0; min-width: 0; }
.seg legend { font-size: 0.92rem; color: var(--ink-2); margin-bottom: 5px; }
.seg { display: flex; flex-wrap: wrap; }
.seg label { min-width: 0; }
.seg legend { width: 100%; }
.seg label { flex: 1; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span {
  display: block; text-align: center; padding: 6px 2px; font-family: var(--display); font-weight: 700; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  border: 1px solid rgba(60, 45, 20, 0.35); margin-left: -1px; background: rgba(255, 255, 255, 0.22); cursor: pointer;
}
.seg label:first-of-type span { border-radius: 3px 0 0 3px; margin-left: 0; }
.seg label:last-of-type span { border-radius: 0 3px 3px 0; }
.seg input:checked + span { background: var(--ink); color: var(--manila); border-color: var(--ink); }
.seg input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.form-foot { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding-top: 4px; }
.form-foot .btn.primary { background: var(--ink); color: var(--manila); }
.form-foot .btn.primary:hover:not(:disabled) { background: #000; }
.engine-line { margin: 0; font-size: 0.92rem; color: var(--ink-2); flex: 1; min-width: 200px; }
.engine-line button { background: none; border: 0; padding: 0; text-decoration: underline; color: var(--ink); }
.engine-line .warn { color: #8a2c20; }

/* polica */
.shelf { margin-top: 64px; }
.shelf-title { font-size: 1.9rem; margin-bottom: 18px; }
.shelf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.case-card {
  text-align: left; border: 1px solid var(--line); background: var(--aud-2); border-radius: 4px; padding: 0; overflow: hidden;
  display: grid; grid-template-rows: auto 1fr auto; transition: border-color 0.15s, transform 0.15s;
}
.case-card:hover { border-color: var(--lamp); transform: translateY(-2px); }
.case-spine { height: 8px; background: var(--manila-2); }
.case-card[data-tone="mracno"] .case-spine { background: #5d6b78; }
.case-card[data-tone="zabavno"] .case-spine { background: #c98f5a; }
.case-body { padding: 14px 16px 8px; }
.case-setting { font-size: 0.92rem; color: var(--fog-3); font-style: italic; margin: 0 0 6px; }
.case-name { font-family: var(--display); font-weight: 800; font-size: 1.6rem; line-height: 1; margin: 0 0 6px; color: var(--fog); }
.case-tag { margin: 0; color: var(--fog-2); font-size: 0.95rem; }
.case-meta { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 16px 14px; }
.chip { font-size: 0.78rem; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--fog-2); white-space: nowrap; }
.chip.hot { border-color: var(--lamp); color: var(--lamp); }
.chip.bad { border-color: var(--signal); color: var(--signal-2); }
.empty-shelf { color: var(--fog-3); font-style: italic; }

/* ==========================================================================
   GENERISANJE
   ========================================================================== */
.forge { display: grid; grid-template-columns: minmax(320px, 420px) 1fr; gap: 40px; padding: 40px clamp(16px, 4vw, 56px); max-width: 1400px; margin: 0 auto; }
.leader { position: relative; width: 140px; height: 140px; margin-bottom: 18px; }
.leader svg { width: 100%; height: 100%; }
.leader-ring { fill: none; stroke: var(--line-2); stroke-width: 3; }
.leader line { stroke: var(--line); stroke-width: 1.5; }
.leader-sweep { fill: rgba(240, 168, 58, 0.22); }
.leader-num { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--display); font-weight: 900; font-size: 4rem; color: var(--lamp); }
.forge-title { font-size: 2.6rem; }
.forge-sub { color: var(--fog-2); margin: 8px 0 18px; }
.forge-bar { height: 6px; background: var(--aud-3); border-radius: 3px; overflow: hidden; margin-bottom: 22px; }
.forge-bar-fill { height: 100%; width: 2%; background: var(--lamp); transition: width 0.4s ease; }
.stages { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 10px; }
.stage-row { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; color: var(--fog-3); }
.stage-row .st-dot { width: 12px; height: 12px; margin-top: 6px; border-radius: 50%; border: 2px solid var(--fog-3); }
.stage-row.active { color: var(--fog); }
.stage-row.active .st-dot { border-color: var(--lamp); background: var(--lamp); animation: pulse 1.1s ease-in-out infinite; }
.stage-row.done { color: var(--fog-2); }
.stage-row.done .st-dot { border-color: var(--ok); background: var(--ok); }
.stage-row.warn .st-dot { border-color: var(--lamp); background: transparent; }
.stage-row.fail .st-dot { border-color: var(--signal); background: var(--signal); }
.stage-row.skip { opacity: 0.55; }
.st-label { font-family: var(--display); font-weight: 700; font-size: 1.15rem; }
.st-detail { display: block; font-size: 0.92rem; color: var(--fog-3); }
.forge-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.forge-right { min-height: 70vh; }
.cast-title { min-height: 120px; border-bottom: 1px solid var(--line); padding-bottom: 18px; margin-bottom: 22px; }
.cast-wait { color: var(--fog-3); font-style: italic; }
.cast-title h3 { font-size: clamp(2.6rem, 5vw, 4.2rem); color: var(--fog); animation: rise 0.7s ease both; }
.cast-title p { color: var(--fog-2); font-size: 1.15rem; margin: 10px 0 0; font-style: italic; animation: rise 0.7s 0.15s ease both; }
.cast-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.cast-card { animation: castIn 0.6s cubic-bezier(.2, .8, .2, 1) both; }
.cast-card .portrait { width: 100%; aspect-ratio: 4 / 5; height: auto; border-radius: 3px; display: block; }
.cast-card .cc-name { font-family: var(--display); font-weight: 800; font-size: 1.25rem; line-height: 1.05; margin-top: 8px; }
.cast-card .cc-role { font-size: 0.92rem; color: var(--fog-3); line-height: 1.35; margin-top: 3px; }
.cast-card.victim .cc-role { color: var(--signal-2); }
.forge-notes { margin-top: 18px; color: var(--fog-3); font-size: 0.92rem; display: grid; gap: 4px; }
.forge-error { margin-top: 16px; padding: 14px 16px; border: 1px solid var(--signal); border-radius: 4px; color: var(--fog); background: rgba(212, 72, 59, 0.08); }

/* ==========================================================================
   MODOVI
   ========================================================================== */
.modes { padding: 28px clamp(16px, 4vw, 56px) 48px; max-width: 1180px; margin: 0 auto; }
.modes .back { margin-bottom: 18px; }
.modes-head { margin-bottom: 28px; }
.setting { color: var(--lamp); font-family: var(--display); font-weight: 700; letter-spacing: 0.04em; margin: 0 0 6px; }
.modes-title { font-size: clamp(2.8rem, 6vw, 5rem); }
.modes-tag { color: var(--fog-2); font-size: 1.2rem; font-style: italic; margin: 10px 0 0; }
.mode-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.mode-card {
  text-align: left; background: var(--aud-2); border: 1px solid var(--line); border-radius: 4px; padding: 20px 20px 18px;
  display: grid; gap: 10px; align-content: start; transition: border-color 0.15s, background 0.15s;
}
.mode-card:hover { border-color: var(--fog-2); }
.mode-card.on { border-color: var(--lamp); background: #2a2a24; box-shadow: inset 0 0 0 1px var(--lamp); }
.mode-name { font-family: var(--display); font-weight: 900; font-size: 2rem; color: var(--fog); }
.mode-card.on .mode-name { color: var(--lamp); }
.mode-desc { color: var(--fog-2); }
.mode-for { font-size: 0.92rem; color: var(--fog-3); font-style: italic; }
.party-setup { margin-top: 22px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 4px; background: var(--aud-2); }
.party-setup h3 { font-size: 1.4rem; margin-bottom: 12px; }
.party-names { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin-bottom: 12px; }
.party-names .pn { display: flex; gap: 6px; }
.party-names input { flex: 1; min-width: 0; background: var(--aud); border: 1px solid var(--line-2); border-radius: var(--r); padding: 8px 10px; }
.modes-foot { display: flex; justify-content: flex-end; gap: 12px; margin-top: 26px; flex-wrap: wrap; }

/* ==========================================================================
   IGRA
   ========================================================================== */
.game { height: 100vh; display: flex; flex-direction: column; overflow: hidden; }
.topbar {
  height: var(--topbar); flex: none; display: flex; align-items: center; gap: 16px; padding: 0 16px;
  border-bottom: 1px solid var(--line); background: var(--aud-deep);
}
.tb-title { min-width: 0; }
.tb-case { font-family: var(--display); font-weight: 800; font-size: 1.35rem; line-height: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 26vw; }
.tb-setting { font-size: 0.92rem; color: var(--fog-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 26vw; }
.acts { list-style: none; display: flex; gap: 4px; margin: 0 auto; padding: 0; }
.acts li { display: flex; align-items: center; gap: 6px; font-family: var(--display); font-weight: 700; font-size: 0.95rem; color: var(--fog-3); padding: 4px 10px; border-radius: 999px; border: 1px solid transparent; }
.acts li.on { color: var(--lamp-ink); background: var(--lamp); }
.acts li.done { color: var(--fog-2); border-color: var(--line-2); }
.acts .n { font-weight: 900; }
.tb-stats { display: flex; gap: 14px; align-items: baseline; font-family: var(--display); font-weight: 700; color: var(--fog-2); white-space: nowrap; }
.tb-stats b { color: var(--fog); font-size: 1.25rem; font-weight: 900; }
.tb-stats .score b { color: var(--lamp); }
.tb-actions { display: flex; gap: 8px; align-items: center; }

.turnbar { flex: none; display: flex; align-items: center; gap: 12px; padding: 8px 16px; background: #222b2a; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.players { display: flex; gap: 6px; flex-wrap: wrap; }
.player { display: flex; align-items: center; gap: 6px; padding: 3px 10px 3px 4px; border-radius: 999px; border: 1px solid var(--line-2); font-family: var(--display); font-weight: 700; }
.player .av { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 0.75rem; color: var(--aud-deep); background: var(--fog-2); }
.player.on { border-color: var(--lamp); background: rgba(240, 168, 58, 0.14); }
.player.on .av { background: var(--lamp); }
.player .pts { color: var(--fog-2); font-weight: 600; }
.turn-msg { flex: 1; min-width: 200px; color: var(--fog-2); }
.turn-msg b { color: var(--fog); }

.game-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: 250px 1fr 300px; }
.rail, .notebook { overflow-y: auto; padding: 16px; border-right: 1px solid var(--line); }
.notebook { border-right: 0; border-left: 1px solid var(--line); }
.rail-h { font-size: 1.05rem; letter-spacing: 0.05em; color: var(--fog-2); margin: 4px 0 10px; font-weight: 800; }
.rail-h:not(:first-child) { margin-top: 22px; }

.cast-rail { display: grid; gap: 6px; }
.who {
  display: grid; grid-template-columns: 46px 1fr auto; gap: 10px; align-items: center; text-align: left;
  background: transparent; border: 1px solid transparent; border-radius: 4px; padding: 5px 6px;
}
.who:hover { background: var(--aud-2); }
.who.on { border-color: var(--lamp); background: var(--aud-2); }
.who .portrait { width: 46px; height: 56px; border-radius: 3px; display: block; }
.who-name { font-family: var(--display); font-weight: 800; font-size: 1.1rem; line-height: 1.05; display: block; }
.who-role { font-size: 0.92rem; color: var(--fog-3); line-height: 1.25; display: block; }
.badge { font-family: var(--display); font-weight: 800; font-size: 0.78rem; min-width: 1.5em; height: 1.5em; padding: 0 0.4em; border-radius: 999px; display: inline-grid; place-items: center; background: var(--lamp); color: var(--lamp-ink); }
.badge.dim { background: transparent; border: 1px solid var(--line-2); color: var(--fog-3); }

.rooms { display: grid; gap: 4px; }
.room { display: flex; align-items: center; gap: 8px; padding: 6px 4px 6px 8px; border-radius: 4px; }
.room:hover { background: var(--aud-2); }
.room-name { flex: 1; font-size: 0.95rem; line-height: 1.25; }
.room.done .room-name { color: var(--fog-3); }
.room .btn { font-size: 0.92rem; padding: 0.3em 0.6em; }

/* ---------------- pozornica ---------------- */
.stage { overflow-y: auto; padding: 20px clamp(14px, 2.4vw, 32px) 40px; position: relative; }
.objective {
  display: grid; grid-template-columns: 1fr auto; gap: 8px 18px; align-items: center;
  padding: 16px 18px; border-radius: 4px; background: var(--aud-2); border-left: 4px solid var(--lamp); margin-bottom: 22px;
}
.obj-kicker { font-family: var(--display); font-weight: 700; color: var(--lamp); font-size: 0.98rem; letter-spacing: 0.03em; }
.obj-title { font-family: var(--display); font-weight: 900; font-size: 1.9rem; line-height: 1; margin: 2px 0 4px; }
.obj-text { margin: 0; color: var(--fog-2); }
.obj-progress { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; font-size: 0.92rem; color: var(--fog-3); }
.obj-bar { flex: 1; height: 5px; background: var(--aud-3); border-radius: 3px; overflow: hidden; max-width: 340px; position: relative; }
.obj-bar i { position: absolute; inset: 0 auto 0 0; background: var(--lamp); border-radius: 3px; transition: width 0.4s; }
.obj-bar u { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--fog-2); }
.objective .btn.pulse { animation: glow 1.6s ease-in-out infinite; }

.board-sec { margin-bottom: 26px; }
.board-h { display: flex; align-items: baseline; gap: 10px; font-size: 1.25rem; margin-bottom: 12px; }
.board-h small { font-family: var(--serif); font-weight: 400; font-size: 0.92rem; color: var(--fog-3); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 16px; }

.tag {
  position: relative; text-align: left; border: 0; border-radius: 4px 4px 4px 4px;
  background:
    radial-gradient(90% 60% at 20% 0%, rgba(255, 255, 255, 0.25), transparent 70%),
    var(--manila);
  color: var(--ink); padding: 26px 14px 14px; min-height: 150px;
  display: grid; align-content: start; gap: 5px;
  box-shadow: 0 8px 18px rgba(3, 8, 12, 0.35);
  transform: rotate(var(--rot, 0deg));
  transition: transform 0.15s, box-shadow 0.15s;
}
.tag::before { content: ""; position: absolute; top: 10px; left: 50%; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--aud); box-shadow: inset 0 0 0 2px var(--manila-2); }
.tag:hover { transform: rotate(0deg) translateY(-3px); box-shadow: 0 14px 26px rgba(3, 8, 12, 0.45); }
.tag .tg-ic { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(35, 33, 29, 0.08); color: var(--ink); }
.tag .tg-ic .ic { width: 20px; height: 20px; }
.tag .tg-kind { font-size: 0.92rem; color: var(--ink-2); }
.tag .tg-name { font-family: var(--display); font-weight: 800; font-size: 1.22rem; line-height: 1.02; }
.tag .tg-where { font-size: 0.92rem; color: var(--ink-2); font-style: italic; }
.tag.read { background: #cdbd93; }
.tag.read .tg-name { color: #3d382e; }
.tag.fresh { box-shadow: 0 0 0 3px var(--lamp), 0 10px 28px rgba(240, 168, 58, 0.35); animation: tagIn 0.6s cubic-bezier(.2, .9, .3, 1.2) both; }
.tag .ribbon { position: absolute; top: 8px; right: 8px; font-family: var(--display); font-weight: 800; font-size: 0.75rem; background: var(--signal); color: #fff; padding: 1px 7px; border-radius: 2px; }
.tag.locked {
  background: transparent; color: var(--fog-3); border: 1px dashed var(--line-2); box-shadow: none; cursor: default; transform: none;
}
.tag.locked::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line-2); }
.tag.locked .tg-ic { background: transparent; color: var(--fog-3); border: 1px dashed var(--line-2); }
.tag.locked .tg-name { font-size: 1.05rem; color: var(--fog-2); }
.tag.locked .tg-where { color: var(--lamp); font-style: normal; font-family: var(--display); font-weight: 700; font-size: 0.9rem; }
.later-note { color: var(--fog-3); font-style: italic; margin: 4px 0 0; }

/* ispitivanje */
.view-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.view-head h2 { font-size: 1.6rem; }
.interro { display: grid; grid-template-columns: minmax(200px, 300px) 1fr; gap: 26px; align-items: start; }
.interro-left { position: sticky; top: 0; }
.frame { border-radius: 4px; overflow: hidden; box-shadow: var(--shadow); border: 6px solid #0c1216; }
.frame .portrait { width: 100%; height: auto; aspect-ratio: 4 / 5; display: block; }
.interro-name { font-size: 2.2rem; margin-top: 14px; }
.interro-role { color: var(--fog-2); margin: 4px 0 6px; }
.interro-voice { color: var(--fog-3); font-style: italic; font-size: 0.92rem; margin: 0; }
.script { display: grid; gap: 14px; margin-bottom: 22px; }
.line { max-width: 64ch; }
.line .spk { font-family: var(--display); font-weight: 800; font-size: 0.95rem; letter-spacing: 0.06em; color: var(--fog-3); display: block; margin-bottom: 2px; }
.line.you .spk { color: var(--lamp); }
.line.them .txt { font-size: 1.12rem; color: var(--fog); }
.line.you .txt { color: var(--fog-2); }
.line .free-tag { font-family: var(--serif); font-weight: 400; letter-spacing: 0; font-size: 0.92rem; color: var(--fog-3); margin-left: 6px; }
.script-empty { color: var(--fog-3); font-style: italic; }
.qlist-h { font-size: 1.1rem; color: var(--fog-2); margin: 6px 0 10px; }
.qlist { display: grid; gap: 8px; }
.q {
  text-align: left; display: flex; justify-content: space-between; gap: 12px; align-items: center;
  background: var(--aud-2); border: 1px solid var(--line-2); border-radius: 4px; padding: 11px 14px; font-size: 1.02rem;
}
.q:hover:not(:disabled) { border-color: var(--lamp); }
.q .cost { color: var(--fog-3); font-size: 0.92rem; white-space: nowrap; }
.q.confront { border-color: rgba(212, 72, 59, 0.6); }
.q-tag { display: flex; align-items: center; gap: 6px; font-family: var(--display); font-weight: 800; font-size: 0.92rem; color: var(--signal-2); margin-bottom: 4px; }
.q-tag svg { width: 14px; height: 14px; }
.confront-box { margin-top: 18px; border-top: 1px dashed rgba(60, 45, 20, 0.35); padding-top: 14px; }
.confront-box p { margin: 0 0 10px; color: var(--ink-2); font-family: var(--display); font-weight: 700; }
.confront-box .confront-list { display: flex; flex-wrap: wrap; gap: 8px; }
.confront-box .btn { color: #8f2219; background: rgba(160, 40, 30, 0.07); border: 1.5px solid rgba(160, 40, 30, 0.7); }
.confront-box .btn:hover { background: rgba(160, 40, 30, 0.14); }
.confront-box .btn .cost { color: var(--ink-2); }
.cast-note { font-size: 0.92rem; color: var(--fog-3); margin: 6px 2px 0; }
.q-locked { color: var(--fog-3); font-size: 0.92rem; padding: 6px 2px; display: flex; gap: 8px; align-items: center; }
.free-q { display: flex; gap: 8px; margin-top: 12px; }
.free-q input { flex: 1; min-width: 0; background: var(--aud); border: 1px solid var(--line-2); border-radius: var(--r); padding: 10px 12px; }
.free-q-note { font-size: 0.92rem; color: var(--fog-3); margin: 6px 0 0; }

.portrait .pt-lid { animation: blink 5.5s infinite; }
.portrait .pt-breath { animation: breath 4.8s ease-in-out infinite; transform-origin: 100px 230px; }
.talking .portrait .pt-mouth-open { animation: talk 0.22s steps(2) infinite; }
.talking .portrait .pt-mouth-shut { opacity: 0; }

/* čitač */
.reader { max-width: 680px; margin: 0 auto; }
.sheet {
  position: relative; background: var(--paper); color: var(--ink); border-radius: 2px; padding: 34px 38px 30px;
  box-shadow: 0 24px 50px rgba(3, 8, 12, 0.55); transform: rotate(-0.4deg);
  background-image: repeating-linear-gradient(0deg, transparent 0 27px, rgba(70, 90, 110, 0.07) 27px 28px);
  animation: sheetIn 0.45s cubic-bezier(.2, .8, .2, 1) both;
}
.sheet .stamp {
  position: absolute; top: 18px; right: 22px; font-family: var(--display); font-weight: 900; font-size: 1rem; letter-spacing: 0.06em;
  color: var(--signal); border: 2px solid var(--signal); padding: 2px 10px; border-radius: 3px; transform: rotate(4deg); opacity: 0.85;
}
.sheet h3 { font-size: 2rem; color: var(--ink); margin-right: 120px; }
.sheet .look { font-style: italic; color: var(--ink-2); margin: 10px 0 16px; }
.sheet .text { font-family: var(--type); font-size: 1.08rem; line-height: 1.7; white-space: pre-wrap; border-top: 1px solid rgba(35, 33, 29, 0.15); border-bottom: 1px solid rgba(35, 33, 29, 0.15); padding: 14px 0; }
.sheet .ctx { font-size: 0.9rem; color: var(--ink-2); margin: 14px 0 0; }
.reader-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 22px; }

/* beležnica */
.nb-sec + .nb-sec { margin-top: 26px; }
.victim-card { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: start; }
.victim-card .portrait { width: 64px; height: 80px; border-radius: 3px; filter: grayscale(0.7) contrast(1.05); }
.vc-name { font-family: var(--display); font-weight: 800; font-size: 1.2rem; line-height: 1.05; }
.vc-line { font-size: 0.92rem; color: var(--fog-2); line-height: 1.4; margin: 2px 0 0; }
.nb-note { font-size: 0.92rem; color: var(--fog-3); margin: -4px 0 10px; }
.timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.timeline li { display: grid; grid-template-columns: 3.4rem 1fr; gap: 8px; font-size: 0.92rem; line-height: 1.35; animation: rise 0.4s ease both; }
.timeline .t { font-family: var(--display); font-weight: 800; color: var(--lamp); }
.timeline .src { display: block; font-size: 0.92rem; color: var(--fog-3); }
.timeline .tl-empty { display: block; color: var(--fog-3); font-style: italic; }
.facts { padding-left: 18px; margin: 0; font-size: 0.92rem; color: var(--fog-2); display: grid; gap: 6px; }

.mobile-tabs { display: none; }
.nb-toggle { display: none !important; }
@media (max-width: 1180px) and (min-width: 901px) { .nb-toggle { display: inline-flex !important; } }

/* ==========================================================================
   MODAL, TOAST
   ========================================================================== */
.modal-wrap { position: fixed; inset: 0; z-index: 60; background: rgba(6, 10, 13, 0.72); display: grid; place-items: center; padding: 16px; animation: fade 0.2s ease both; }
.modal { width: min(760px, 100%); max-height: 92vh; overflow-y: auto; background: var(--aud-2); border: 1px solid var(--line-2); border-radius: 6px; padding: 26px 28px; box-shadow: var(--shadow); animation: pop 0.25s ease both; }
.modal h2 { font-size: 2rem; margin-bottom: 6px; }
.modal .sub { color: var(--fog-2); margin: 0 0 18px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.steps { display: flex; gap: 6px; margin-bottom: 16px; font-family: var(--display); font-weight: 700; font-size: 0.92rem; color: var(--fog-3); }
.steps span { padding: 2px 10px; border-radius: 999px; border: 1px solid var(--line); }
.steps span.on { color: var(--lamp-ink); background: var(--lamp); border-color: var(--lamp); }
.steps span.done { color: var(--fog-2); border-color: var(--line-2); }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.pick { background: var(--aud); border: 2px solid var(--line); border-radius: 4px; padding: 6px 6px 10px; text-align: left; }
.pick .portrait { width: 100%; height: auto; aspect-ratio: 4/5; border-radius: 2px; display: block; }
.pick .pk-name { font-family: var(--display); font-weight: 800; font-size: 1.1rem; display: block; margin-top: 6px; line-height: 1; }
.pick .pk-role { font-size: 0.92rem; color: var(--fog-3); display: block; }
.pick:hover { border-color: var(--fog-2); }
.pick.on { border-color: var(--signal); box-shadow: 0 0 0 2px var(--signal); }
.proof-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.proof { text-align: left; display: grid; grid-template-columns: 26px 1fr; gap: 8px; align-items: center; background: var(--aud); border: 1px solid var(--line-2); border-radius: 4px; padding: 8px 10px; }
.proof .ic { color: var(--fog-2); }
.proof b { font-family: var(--display); font-weight: 800; font-size: 1.05rem; display: block; line-height: 1.05; }
.proof small { color: var(--fog-3); font-size: 0.92rem; }
.proof.on { border-color: var(--lamp); background: rgba(240, 168, 58, 0.1); }
.proof.on .ic { color: var(--lamp); }
.fq { margin-bottom: 18px; }
.fq-q { font-family: var(--display); font-weight: 800; font-size: 1.3rem; margin-bottom: 8px; }
.fq-opts { display: grid; gap: 6px; }
.fq-opt { text-align: left; background: var(--aud); border: 1px solid var(--line-2); border-radius: 4px; padding: 9px 12px; }
.fq-opt.on { border-color: var(--lamp); background: rgba(240, 168, 58, 0.1); }
.verdict-bad { border-left: 4px solid var(--signal); padding: 12px 16px; background: rgba(212, 72, 59, 0.08); border-radius: 3px; }
.verdict-hint { border-left: 4px solid var(--lamp); padding: 12px 16px; background: rgba(240, 168, 58, 0.08); border-radius: 3px; font-size: 1.1rem; }
.settings-grid { display: grid; gap: 14px; }
.settings-grid label { display: grid; gap: 4px; font-size: 0.92rem; color: var(--fog-2); }
.settings-grid input[type="text"], .settings-grid input[type="password"] { background: var(--aud); border: 1px solid var(--line-2); border-radius: var(--r); padding: 9px 11px; color: var(--fog); }
.settings-grid .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.provider-pick { display: flex; gap: 8px; flex-wrap: wrap; }
.provider-pick label { display: flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 999px; color: var(--fog); cursor: pointer; }
.provider-pick input:checked + span { color: var(--lamp); }
.check { display: flex !important; grid-template-columns: none; align-items: center; gap: 8px !important; color: var(--fog) !important; }
.settings-note { font-size: 0.92rem; color: var(--fog-3); margin: 0; }

.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 70; display: grid; gap: 8px; justify-items: end; pointer-events: none; }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 10px; max-width: 360px;
  background: var(--manila); color: var(--ink); padding: 10px 14px; border-radius: 3px; box-shadow: var(--shadow);
  animation: toastIn 0.35s cubic-bezier(.2, .8, .2, 1.1) both; border: 0; text-align: left;
}
.toast.info { background: var(--aud-3); color: var(--fog); }
.toast b { font-family: var(--display); font-weight: 800; font-size: 1.05rem; }
.toast.out { animation: toastOut 0.3s ease both; }
.float-pts { position: fixed; z-index: 80; font-family: var(--display); font-weight: 900; font-size: 1.4rem; pointer-events: none; animation: floatUp 1.2s ease-out both; }
.float-pts.minus { color: var(--signal-2); }
.float-pts.plus { color: var(--lamp); }

/* ==========================================================================
   KINO (uvod, činovi, finale, zavesa)
   ========================================================================== */
.cinema {
  position: fixed; inset: 0; z-index: 50; background: var(--aud-deep); color: var(--fog);
  display: grid; grid-template-rows: 8vh 1fr auto 8vh; overflow: hidden;
}
.cinema::before, .cinema::after { content: ""; background: #000; }
.cinema::after { grid-row: 4; }
.cinema::before { grid-row: 1; }
.cin-grain { position: absolute; inset: -50%; pointer-events: none; opacity: 0.08; animation: grain 0.8s steps(4) infinite;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }
.cin-stage { grid-row: 2; position: relative; display: grid; place-items: center; padding: 20px clamp(16px, 6vw, 96px); overflow-y: auto; }
.cin-inner { width: min(1100px, 100%); text-align: center; }
.cin-controls { grid-row: 3; display: flex; justify-content: center; gap: 12px; padding: 14px; flex-wrap: wrap; }
.cin-kicker { font-family: var(--display); font-weight: 700; letter-spacing: 0.08em; color: var(--lamp); font-size: 1.1rem; margin: 0 0 18px; }
.cin-title { font-size: clamp(3.4rem, 10vw, 8.5rem); font-weight: 900; line-height: 0.9; letter-spacing: 0.01em; }
.cin-title.reveal-in { animation: titleIn 1.6s cubic-bezier(.15, .7, .2, 1) both; }
.cin-tag { font-size: clamp(1.1rem, 2.2vw, 1.6rem); font-style: italic; color: var(--fog-2); margin: 18px 0 0; }
.cin-text { font-size: clamp(1.15rem, 2.3vw, 1.75rem); line-height: 1.5; max-width: 34ch; margin: 0 auto; text-align: left; min-height: 3em; }
.cin-text.center { text-align: center; }
.cin-small { color: var(--fog-3); font-size: 1rem; margin-top: 18px; }
.lineup { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 160px)); justify-content: center; gap: 18px; margin-top: 26px; }
.lineup .cast-card { text-align: left; }
.lineup .cast-card:nth-child(1) { animation-delay: 0.05s; } .lineup .cast-card:nth-child(2) { animation-delay: 0.2s; }
.lineup .cast-card:nth-child(3) { animation-delay: 0.35s; } .lineup .cast-card:nth-child(4) { animation-delay: 0.5s; }
.lineup .cast-card:nth-child(5) { animation-delay: 0.65s; } .lineup .cast-card:nth-child(6) { animation-delay: 0.8s; }
.lineup .cast-card:nth-child(7) { animation-delay: 0.95s; } .lineup .cast-card:nth-child(8) { animation-delay: 1.1s; }
.victim-reveal { display: grid; grid-template-columns: 220px 1fr; gap: 32px; align-items: center; text-align: left; max-width: 820px; margin: 0 auto; }
.victim-reveal .portrait { width: 100%; height: auto; aspect-ratio: 4/5; border-radius: 3px; filter: grayscale(0.8) contrast(1.1); animation: develop 2.4s ease both; }
.victim-reveal h3 { font-size: clamp(2.4rem, 5vw, 4rem); }
.victim-reveal .vr-role { color: var(--fog-2); font-style: italic; margin: 6px 0 14px; font-size: 1.2rem; }
.vr-fact { display: grid; grid-template-columns: 7.5rem 1fr; gap: 8px; margin: 4px 0; }
.vr-fact span:first-child { font-family: var(--display); font-weight: 700; color: var(--fog-3); }
.act-num { font-family: var(--display); font-weight: 900; font-size: clamp(6rem, 18vw, 14rem); color: var(--lamp); line-height: 0.8; animation: titleIn 1.4s ease both; }
.act-name { font-size: clamp(2.6rem, 6vw, 5rem); margin-top: 6px; animation: rise 0.8s 0.4s ease both; }
.act-narr { font-size: clamp(1.1rem, 2.2vw, 1.5rem); color: var(--fog-2); max-width: 40ch; margin: 22px auto 0; animation: rise 0.8s 0.8s ease both; }
.act-goal { margin: 22px auto 0; display: inline-block; padding: 10px 18px; border: 1px solid var(--lamp); color: var(--lamp); border-radius: 3px; font-family: var(--display); font-weight: 700; font-size: 1.2rem; animation: rise 0.8s 1.2s ease both; }
.killer-reveal { display: grid; grid-template-columns: 280px 1fr; gap: 36px; align-items: center; text-align: left; max-width: 900px; margin: 0 auto; }
.killer-reveal .frame { position: relative; }
.killer-reveal .stamp-big {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-12deg); font-family: var(--display); font-weight: 900; font-size: 2.6rem;
  color: var(--signal); border: 5px solid var(--signal); padding: 2px 16px; border-radius: 6px; background: rgba(15, 23, 28, 0.25);
  animation: stamp 0.45s 0.6s cubic-bezier(.3, 1.6, .5, 1) both;
}
.killer-reveal h3 { font-size: clamp(2.6rem, 6vw, 4.4rem); }
.killer-reveal p { font-size: 1.15rem; color: var(--fog-2); }
.chain-list { list-style: none; counter-reset: ch; padding: 0; margin: 0 auto; max-width: 860px; text-align: left; display: grid; gap: 14px; }
.chain-list li { counter-increment: ch; display: grid; grid-template-columns: 2.6rem 1fr; gap: 12px; animation: rise 0.6s ease both; }
.chain-list li::before { content: counter(ch); font-family: var(--display); font-weight: 900; font-size: 2.2rem; color: var(--lamp); line-height: 1; }
.chain-list .step { font-size: 1.15rem; }
.chain-list .items { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.secrets { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; text-align: left; max-width: 1000px; margin: 0 auto; }
.secret { display: grid; grid-template-columns: 54px 1fr; gap: 10px; background: var(--aud-2); padding: 10px; border-radius: 4px; animation: rise 0.5s ease both; }
.secret .portrait { width: 54px; height: 66px; border-radius: 3px; }
.secret b { font-family: var(--display); font-weight: 800; font-size: 1.1rem; display: block; }
.secret p { margin: 2px 0 0; font-size: 0.92rem; color: var(--fog-2); line-height: 1.4; }
.herrings { max-width: 900px; margin: 18px auto 0; text-align: left; display: grid; gap: 10px; }
.herring { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; font-size: 0.95rem; border-top: 1px solid var(--line); padding-top: 10px; }
.herring span:first-child { color: var(--fog-3); text-decoration: line-through; text-decoration-color: rgba(212, 72, 59, 0.6); }
.score-big { font-family: var(--display); font-weight: 900; font-size: clamp(4rem, 12vw, 9rem); color: var(--lamp); line-height: 0.9; }
.rank { font-family: var(--display); font-weight: 800; font-size: 2.2rem; margin-top: 6px; }
.score-lines { max-width: 460px; margin: 18px auto 0; text-align: left; display: grid; gap: 4px; color: var(--fog-2); }
.score-lines div { display: flex; justify-content: space-between; border-bottom: 1px dotted var(--line-2); padding: 3px 0; }
.scoreboard { max-width: 760px; margin: 0 auto; display: grid; gap: 10px; text-align: left; }
.sb-row { display: grid; grid-template-columns: 2.4rem 1fr auto; gap: 14px; align-items: center; background: var(--aud-2); padding: 12px 16px; border-radius: 4px; animation: rise 0.5s ease both; }
.sb-row.win { box-shadow: inset 0 0 0 2px var(--lamp); }
.sb-place { font-family: var(--display); font-weight: 900; font-size: 1.8rem; color: var(--fog-3); }
.sb-row.win .sb-place { color: var(--lamp); }
.sb-name { font-family: var(--display); font-weight: 800; font-size: 1.4rem; }
.sb-name { display: block; }
.sb-detail { display: block; font-size: 0.92rem; color: var(--fog-3); }
.sb-pts { font-family: var(--display); font-weight: 900; font-size: 1.8rem; }
.curtain-name { font-size: clamp(3rem, 9vw, 7rem); color: var(--lamp); }

/* ==========================================================================
   ANIMACIJE
   ========================================================================== */
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@keyframes glow { 0%, 100% { box-shadow: 0 0 0 0 rgba(240, 168, 58, 0.6); } 50% { box-shadow: 0 0 0 8px rgba(240, 168, 58, 0); } }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: scale(0.97); } to { opacity: 1; transform: none; } }
@keyframes castIn { from { opacity: 0; transform: translateY(18px) rotate(-2deg); filter: brightness(2) blur(4px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes tagIn { 0% { opacity: 0; transform: translateY(-16px) rotate(-6deg) scale(1.05); } 100% { opacity: 1; transform: rotate(var(--rot, 0deg)); } }
@keyframes sheetIn { from { opacity: 0; transform: translateY(24px) rotate(-2deg); } to { opacity: 1; transform: rotate(-0.4deg); } }
@keyframes toastIn { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(30px); } }
@keyframes floatUp { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-56px); } }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(0); } 94%, 96% { transform: scaleY(1); } }
@keyframes breath { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-1.6px); } }
@keyframes talk { 0% { opacity: 1; transform: scaleY(1); } 100% { opacity: 1; transform: scaleY(0.35); } }
@keyframes titleIn { from { opacity: 0; letter-spacing: 0.25em; filter: blur(8px); } to { opacity: 1; letter-spacing: 0.01em; filter: none; } }
@keyframes develop { from { filter: grayscale(1) brightness(3) blur(6px); } to { filter: grayscale(0.8) contrast(1.1); } }
@keyframes stamp { from { opacity: 0; transform: translate(-50%, -50%) rotate(-12deg) scale(2.2); } to { opacity: 1; transform: translate(-50%, -50%) rotate(-12deg) scale(1); } }
@keyframes grain { 0% { transform: translate(0, 0); } 25% { transform: translate(-4%, 3%); } 50% { transform: translate(3%, -2%); } 75% { transform: translate(-2%, -4%); } 100% { transform: translate(0, 0); } }
.talking .portrait .pt-mouth-open { transform-box: fill-box; transform-origin: center; }

/* ==========================================================================
   ILUSTROVANI AVATARI (kartice sa okvirom; u malim sličicama isečak lica)
   ========================================================================== */
.portrait.avatar { display: block; position: relative; overflow: hidden; background: none; }
.portrait.avatar img { display: block; width: 100%; height: 100%; object-fit: cover; -webkit-user-select: none; user-select: none; }
.portrait.avatar .av-face { display: none; }

/* velike kartice: odnos stranica kartice, bez tuđeg okvira */
.cast-card .portrait.avatar, .pick .portrait.avatar, .frame .portrait.avatar, .victim-reveal .portrait.avatar {
  aspect-ratio: 405 / 720; height: auto; border-radius: 0;
}
.frame:has(.portrait.avatar) { border: 0; box-shadow: none; background: none; border-radius: 0; overflow: visible; }
.frame:has(.portrait.avatar) .portrait.avatar { filter: drop-shadow(0 14px 26px rgba(0, 0, 0, 0.55)); }
.victim-reveal .portrait.avatar { width: min(100%, 210px, 30vh); margin: 0 auto; }
.killer-reveal .frame .portrait.avatar { width: min(100%, 230px, 32vh); margin: 0 auto; }
.interro:has(.portrait.avatar) { grid-template-columns: minmax(160px, 210px) 1fr; }
.interro-left .frame .portrait.avatar { width: min(100%, 210px, 34vh); }
.pick .portrait.avatar { transition: transform 0.25s ease; }
.pick:hover .portrait.avatar, .pick.on .portrait.avatar { transform: translateY(-3px); }

/* male sličice: lice */
.who .portrait.avatar, .secret .portrait.avatar, .victim-card .portrait.avatar { aspect-ratio: 4 / 5; border-radius: 3px; }
.who .portrait.avatar .av-card, .secret .portrait.avatar .av-card, .victim-card .portrait.avatar .av-card { display: none; }
.who .portrait.avatar .av-face, .secret .portrait.avatar .av-face, .victim-card .portrait.avatar .av-face { display: block; }

/* život u slici: blago disanje dok se ispituje, jači sjaj dok lik govori */
.interro .portrait.avatar .av-card { animation: avBreath 6.5s ease-in-out infinite; transform-origin: 50% 85%; }
.talking .portrait.avatar .av-card { animation: avBreath 6.5s ease-in-out infinite, avTalk 0.9s ease-in-out infinite; }
@keyframes avBreath { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.012); } }
@keyframes avTalk { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.09) saturate(1.05); } }

/* ==========================================================================
   KORICA SLUČAJA + SCENA ZLOČINA
   ========================================================================== */
.cover { display: grid; gap: 22px; margin-bottom: 26px; }
.cover-art {
  min-height: clamp(240px, 44vh, 440px); border-radius: 6px; position: relative; overflow: hidden; margin-bottom: 22px;
  display: flex; align-items: flex-end; padding: clamp(18px, 3vw, 40px);
  background: var(--scene, url("../img/scene/crime-scene.webp")) center 58% / cover no-repeat, var(--aud-deep);
  box-shadow: var(--shadow);
}
.cover-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 14, 18, 0.05) 25%, rgba(10, 14, 18, 0.88) 100%); }
.cover-art .modes-head { position: relative; z-index: 1; margin: 0; max-width: 900px; }
.cover-art .modes-title { text-shadow: 0 2px 18px rgba(0, 0, 0, 0.6); }
.cover-facts { display: flex; flex-wrap: wrap; gap: 8px 22px; list-style: none; margin: 0; padding: 0; color: var(--fog-2); font-size: 1.02rem; }
.cover-facts li { position: relative; padding-left: 14px; }
.cover-facts li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 6px; height: 6px; border-radius: 50%; background: var(--lamp); }
.cover-note { margin: 0; color: var(--fog-2); font-size: 1.1rem; max-width: 60ch; }
.cover-note b { color: var(--fog); }
.cover-done { border-left: 4px solid var(--fog-3); padding: 6px 0 6px 16px; }
.cover-done.ok { border-color: var(--lamp); }
.cover-done-title { font-family: var(--display); font-weight: 800; font-size: 1.8rem; margin: 0; line-height: 1.05; }
.cover-done-line { margin: 6px 0 0; color: var(--fog-2); }
.cover-next { margin: 10px 0 0; color: var(--fog-3); }
.cover-next b { color: var(--fog); font-variant-numeric: tabular-nums; }

.daily-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: -6px 0 18px; }
.daily-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.daily-meta { color: var(--fog-2); font-size: 0.98rem; }
a.btn { text-decoration: none; display: inline-flex; align-items: center; }
#resetBtn { margin-right: auto; }

/* slobodna pitanja (model) — prvo polje u ispitivanju */
.free-box { margin: 18px 0 6px; padding: 14px 16px 12px; border: 1px solid var(--line); border-left: 3px solid var(--lamp); border-radius: 4px; background: var(--aud-2); }
.free-box .qlist-h { margin-top: 0; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.free-left { font-family: var(--serif, inherit); font-weight: 400; font-size: 0.9rem; color: var(--fog-3); letter-spacing: 0; }
.free-box .free-q { margin-top: 8px; }
.free-box .free-q-note { margin-bottom: 0; }
.free-q-off { margin: 16px 0 4px; color: var(--fog-3); font-size: 0.95rem; border-left: 3px solid var(--line); padding-left: 10px; }

/* uvodni film: scena zločina u pozadini, polako se primiče */
.cin-backdrop {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: var(--scene, url("../img/scene/crime-scene.webp")) center / cover no-repeat;
  opacity: 0.3; transform-origin: 60% 55%; animation: kenBurns 40s ease-out forwards; transition: opacity 1.2s ease;
}
.cin-backdrop::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(8, 11, 14, 0.35) 0%, rgba(8, 11, 14, 0.85) 75%); }
.cin-backdrop.dim { opacity: 0.12; }
.cinema > .cin-stage, .cinema > .cin-controls { position: relative; z-index: 1; }
@keyframes kenBurns { from { transform: scale(1.02) translate(0, 0); } to { transform: scale(1.14) translate(-1.5%, -1%); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .cin-grain { display: none; }
}

/* ==========================================================================
   MANJI EKRANI
   ========================================================================== */
@media (max-width: 1180px) {
  .game-grid { grid-template-columns: 230px 1fr; }
  .notebook { display: none; }
  .game-grid.show-notebook .notebook { display: block; position: fixed; right: 0; top: var(--topbar); bottom: 0; width: min(340px, 90vw); background: var(--aud-deep); z-index: 40; box-shadow: var(--shadow); }
}
@media (max-width: 900px) {
  .home-main { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .forge { grid-template-columns: 1fr; }
  .mode-cards { grid-template-columns: 1fr; }
  .acts, .tb-setting { display: none; }
  .tb-case { max-width: 40vw; }
  .game-grid { grid-template-columns: 1fr; }
  .rail, .notebook { display: none; border: 0; }
  .game-grid[data-tab="rail"] .rail { display: block; }
  .game-grid[data-tab="rail"] .stage { display: none; }
  .game-grid[data-tab="notebook"] .notebook { display: block; position: static; width: auto; box-shadow: none; }
  .game-grid[data-tab="notebook"] .stage { display: none; }
  .mobile-tabs { display: flex; flex: none; border-top: 1px solid var(--line); background: var(--aud-deep); }
  .mobile-tabs button { flex: 1; background: none; border: 0; padding: 12px 6px; font-family: var(--display); font-weight: 800; color: var(--fog-3); }
  .mobile-tabs button.on { color: var(--lamp); }
  .interro, .interro:has(.portrait.avatar) { grid-template-columns: minmax(0, 1fr); }
  .interro-left { position: static; display: grid; grid-template-columns: 110px 1fr; gap: 14px; align-items: center; }
  .interro-name { margin-top: 0; font-size: 1.7rem; }
  .victim-reveal, .killer-reveal { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .victim-reveal .portrait, .killer-reveal .frame { max-width: 220px; }
  .herring { grid-template-columns: 1fr; }
  .tb-stats .time { display: none; }
  .topbar { gap: 8px; padding: 0 10px; }
  #hintBtn .lbl { display: none; }
  .objective { grid-template-columns: 1fr; }
  .objective .btn { justify-self: start; }
}
@media (max-width: 600px) {
  .tb-title, #accuseBtn, #tvToggle { display: none; }
  .topbar { overflow-x: auto; }
  .tb-stats { gap: 10px; }
}

/* ---------- misterija dana: izbor brze ili grupne ---------- */
.today-head { margin: 10px 0 26px; max-width: 760px; }
.today-title { font-size: clamp(2.6rem, 6vw, 4.6rem); line-height: 0.95; }
.today-lead { color: var(--fog-2); font-size: 1.15rem; margin: 12px 0 0; }
.today-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.today-card { padding: 24px 24px 22px; gap: 12px; cursor: pointer; }
.today-card:hover, .today-card:focus-visible { border-color: var(--lamp); }
.today-kind { font-family: var(--display); font-weight: 800; font-size: 1.05rem; color: var(--lamp); }
.today-card .mode-name { font-size: clamp(1.8rem, 3.2vw, 2.5rem); line-height: 1; }
.today-card .mode-desc { font-style: italic; }
.today-facts { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 0; margin: 2px 0 0; color: var(--fog-2); font-size: 0.95rem; }
.today-status { font-size: 0.95rem; color: var(--fog-3); }
.today-status.ok { color: #8fd19e; }
.today-status.live { color: var(--lamp); }
.today-card .btn { justify-self: start; margin-top: 4px; pointer-events: none; }
.today-next { color: var(--fog-3); margin-top: 22px; }
@media (max-width: 760px) { .today-cards { grid-template-columns: 1fr; } }

/* ---------- izgled tragova po vrsti ---------- */
.ev-clock { float: right; margin: 0 0 10px 18px; width: 128px; text-align: center; }
.ev-clock svg { width: 128px; height: 128px; display: block; }
.ev-clock .rim { fill: #f7f3e8; stroke: var(--ink); stroke-width: 2.5; }
.ev-clock .ticks line { stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; }
.ev-clock .hh { stroke: var(--ink); stroke-width: 4; stroke-linecap: round; }
.ev-clock .mh { stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; }
.ev-clock .pin { fill: #8f2219; }
.ev-clock figcaption { font-family: var(--type); font-size: 0.92rem; color: var(--ink-2); margin-top: 2px; }

.sheet .ev-phone { border: none; padding: 0; margin: 4px 0; max-width: 380px; background: #11161a; border-radius: 22px; padding: 14px 14px 18px; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25); font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; white-space: pre-wrap; }
.ev-phone-top { color: #9fb0b6; font-size: 0.78rem; text-align: center; padding-bottom: 10px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); margin-bottom: 12px; }
.ev-bubble { background: #2b3a44; color: #eef3f4; border-radius: 16px 16px 16px 4px; padding: 10px 13px; font-size: 1rem; line-height: 1.45; display: inline-block; }

.sheet .ev-receipt { max-width: 320px; margin: 6px auto; background: #fbfaf5; border: none; padding: 16px 18px 26px; font-family: "Courier New", ui-monospace, monospace; font-size: 0.95rem; line-height: 1.55; color: #2e2c28;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12); position: relative;
  -webkit-mask: linear-gradient(#000 0 0) top / 100% calc(100% - 10px) no-repeat, conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 14px 10px repeat-x;
          mask: linear-gradient(#000 0 0) top / 100% calc(100% - 10px) no-repeat, conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 14px 10px repeat-x; }

.sheet .ev-news { font-family: var(--serif); font-size: 1.02rem; line-height: 1.55; column-count: 2; column-gap: 22px; column-rule: 1px solid rgba(35, 33, 29, 0.2); text-align: justify; hyphens: auto; background: #ece5d3; padding: 14px 16px; border: none; }
.sheet .ev-news::first-letter { font-family: var(--display); font-weight: 900; font-size: 2.6em; float: left; line-height: 0.85; margin: 4px 6px 0 0; }
@media (max-width: 560px) { .sheet .ev-news { column-count: 1; } }

.sheet .ev-telegram { background: #efe2a8; border: none; padding: 16px 18px; font-family: var(--type); letter-spacing: 0.06em; line-height: 1.7; box-shadow: inset 0 0 0 1px rgba(60, 45, 20, 0.25); }

.sheet .ev-hand { font-family: "Caveat", "Segoe Print", "Bradley Hand", cursive; font-size: 1.55rem; line-height: 1.35; color: #24324a; border: none; padding: 10px 6px 10px 18px;
  background: repeating-linear-gradient(transparent 0 calc(1.35em - 1px), rgba(60, 90, 140, 0.18) calc(1.35em - 1px) 1.35em); transform: rotate(-0.6deg); }

.sheet .ev-lab { border: 1.5px solid rgba(35, 33, 29, 0.55); padding: 0; font-family: var(--serif); white-space: normal; }
.ev-lab-head { display: flex; justify-content: space-between; gap: 12px; padding: 7px 12px; border-bottom: 1.5px solid rgba(35, 33, 29, 0.55); font-family: var(--display); font-weight: 800; font-size: 0.95rem; background: rgba(35, 33, 29, 0.06); }
.ev-lab-body { padding: 12px; font-family: var(--type); white-space: pre-wrap; line-height: 1.65; }

.sheet .ev-absence { border: 2px dashed rgba(143, 34, 25, 0.55); border-radius: 4px; padding: 14px 16px; font-family: var(--serif); font-style: italic; }
.sheet .ev-statement { border-left: 3px solid rgba(35, 33, 29, 0.45); border-top: none; border-bottom: none; padding: 6px 0 6px 16px; font-family: var(--serif); font-size: 1.1rem; }

/* ---------- fotografije dokaza ---------- */
.tag .tg-photo { display: block; height: 92px; margin: -6px -4px 4px; border-radius: 2px; background: #1a1612 center / cover no-repeat; box-shadow: 0 0 0 4px #f7f3e8, 0 3px 8px rgba(0, 0, 0, 0.3); }
.ev-photo { float: right; width: min(46%, 260px); margin: 4px 0 12px 18px; padding: 8px 8px 22px; background: #f7f3e8; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.28); transform: rotate(1.6deg); }
.ev-photo img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.sheet .ev-photo + .look { margin-top: 14px; }
@media (max-width: 560px) { .ev-photo { float: none; width: 100%; margin: 6px 0 14px; transform: none; } }

/* ---------- skica mesta ---------- */
.board-tabs { display: flex; gap: 6px; margin: 4px 0 18px; }
.board-tabs button { display: inline-flex; align-items: center; gap: 7px; font-family: var(--display); font-weight: 700; font-size: 1rem; color: var(--fog-2); background: transparent; border: 1px solid var(--line-2); border-radius: 999px; padding: 6px 14px; }
.board-tabs button .ic { width: 16px; height: 16px; }
.board-tabs button.on { color: var(--lamp-ink, #1b1406); background: var(--lamp); border-color: var(--lamp); }
.map-wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.map-paper { background: radial-gradient(90% 60% at 20% 0%, rgba(255, 255, 255, 0.22), transparent 70%), var(--manila); border-radius: 4px; padding: 12px 12px 10px; box-shadow: 0 8px 18px rgba(3, 8, 12, 0.35);
  background-image: linear-gradient(rgba(60, 45, 20, 0.07) 1px, transparent 1px), linear-gradient(90deg, rgba(60, 45, 20, 0.07) 1px, transparent 1px); background-size: 24px 24px; }
.map-svg { width: 100%; height: auto; display: block; }
.map-building { fill: none; stroke: var(--ink); stroke-width: 5; }
.map-room rect { fill: rgba(255, 252, 240, 0.35); stroke: var(--ink); stroke-width: 1.6; }
.map-room.out rect { fill: rgba(120, 140, 110, 0.12); stroke-dasharray: 7 6; }
.map-room.searched rect { fill: rgba(255, 252, 240, 0.6); }
.map-room-name { font-family: var(--display); font-weight: 800; font-size: 26px; fill: var(--ink); }
.map-pin { cursor: pointer; }
.map-pin circle { fill: #8f2219; stroke: #f7f3e8; stroke-width: 2.5; }
.map-pin text { font-family: var(--display); font-weight: 900; font-size: 19px; fill: #fff; text-anchor: middle; pointer-events: none; }
.map-pin.fresh circle { fill: var(--lamp); }
.map-pin.fresh text { fill: #1b1406; }
.map-pin:hover circle, .map-pin:focus-visible circle { stroke: var(--ink); stroke-width: 3; }
.map-pin:focus { outline: none; }
.map-pin.unknown { cursor: default; }
.map-pin.unknown circle { fill: transparent; stroke: var(--ink-2); stroke-dasharray: 3 3; stroke-width: 1.6; }
.map-pin.unknown text { fill: var(--ink-2); }
.map-body path { stroke: #8f2219; stroke-width: 4; stroke-linecap: round; }
.map-body text { font-family: var(--serif); font-style: italic; font-size: 21px; fill: #8f2219; }
.map-side-h { font-family: var(--display); font-weight: 800; font-size: 24px; fill: var(--ink); }
.map-person { font-family: var(--serif); font-size: 21px; fill: var(--ink); }
.map-note { font-size: 0.92rem; color: var(--ink-2); margin: 6px 4px 0; font-style: italic; }
.map-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.map-legend button { width: 100%; text-align: left; display: flex; gap: 10px; align-items: flex-start; background: var(--aud-2); border: 1px solid var(--line-2); border-radius: 4px; padding: 8px 10px; color: var(--fog); }
.map-legend button:hover { border-color: var(--lamp); }
.map-legend b { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: #8f2219; color: #fff; font-family: var(--display); font-size: 0.92rem; }
.map-legend .fresh b { background: var(--lamp); color: #1b1406; }
.map-legend .lg-name { display: block; font-family: var(--display); font-weight: 800; font-size: 1rem; line-height: 1.1; }
.map-legend .lg-where { display: block; font-size: 0.92rem; color: var(--fog-3); margin-top: 2px; }
.map-empty { color: var(--fog-3); font-style: italic; }

.badge.dot { width: 12px; height: 12px; min-width: 0; padding: 0; border-radius: 50%; }

/* ---------- oblačić na skici ---------- */
.map-paper { position: relative; }
.map-pin.on circle { stroke: var(--ink); stroke-width: 3.5; }
.map-pop { position: absolute; z-index: 5; width: 290px; display: grid; gap: 4px; padding: 12px 14px 14px; background: #f7f1e1; color: var(--ink);
  border: 1px solid rgba(60, 45, 20, 0.45); border-radius: 3px; box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4); }
.map-pop[hidden] { display: none; }
.map-pop .mp-photo { display: block; height: 110px; margin: -4px -6px 6px; background: #1a1612 center / cover no-repeat; border: 4px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25); }
.map-pop .mp-kind { font-size: 0.75rem; color: var(--ink-2); }
.map-pop .mp-name { font-family: var(--display); font-weight: 800; font-size: 1.2rem; line-height: 1.05; }
.map-pop .mp-where { font-size: 0.92rem; color: var(--ink-2); font-style: italic; }
.map-pop .mp-text { font-family: var(--type); font-size: 0.92rem; line-height: 1.45; margin: 4px 0 6px; }
.map-pop .btn { justify-self: start; }


/* ==========================================================================
   VIKTORIJANSKA KARTOTEKA — detektiv iz 19. veka pod gasnom lampom
   Noćna boca-zelena, mesing, pečatni vosak; Didone naslovi (Playfair),
   tekst kao u knjigama tog doba (Old Standard). Papiri ostaju papiri.
   ========================================================================== */
:root {
  --aud: #0e1813;
  --aud-deep: #09110d;
  --aud-2: #14231b;
  --aud-3: #1c3026;
  --line: rgba(201, 164, 90, 0.16);
  --line-2: rgba(201, 164, 90, 0.34);
  --fog: #ece2c9;
  --fog-2: #cdbf9f;
  --fog-3: #aa9d7f;
  --lamp: #c9a45a;
  --lamp-2: #e2c37e;
  --lamp-ink: #1d1406;
  --signal: #8f2a22;
  --signal-2: #b5402f;
  --manila: #e9ddbd;
  --manila-2: #d5c497;
  --paper: #f4ecd6;
  --ink: #2a2018;
  --ink-2: #5f503c;
  --ok: #9fc28a;
  --display: "Brygada 1918", "Iowan Old Style", Georgia, serif;
  --sc: "Spectral SC", "Brygada 1918", Georgia, serif;
  --serif: "Brygada 1918", "Iowan Old Style", Georgia, serif;
  --r: 2px;
}
body {
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(201, 164, 90, 0.08), transparent 60%),
    radial-gradient(140% 120% at 50% 120%, rgba(0, 0, 0, 0.55), transparent 60%),
    var(--aud);
  background-attachment: fixed;
  font-size: 1.08rem;
}
h1, h2, h3 { font-weight: 700; letter-spacing: 0; }
::selection { background: rgba(201, 164, 90, 0.35); }

/* žig (wordmark): kurziv Didone sa mesinganim crtama */
.wordmark { font-family: var(--display); font-style: italic; font-weight: 800; letter-spacing: 0; color: var(--lamp-2); display: inline-flex; align-items: center; gap: 12px; }
.wordmark::before, .wordmark::after { content: ""; width: 26px; height: 1px; background: linear-gradient(90deg, transparent, var(--lamp)); }
.wordmark::after { transform: scaleX(-1); }

/* dugmad: mesingana pločica, crni grafit, pečatni vosak */
.btn { font-family: var(--sc); font-weight: 700; letter-spacing: 0.04em; border-radius: 2px; }
.btn.primary { background: linear-gradient(180deg, #e2c37e, #b88f43); color: var(--lamp-ink); box-shadow: inset 0 1px 0 rgba(255, 245, 210, 0.6), inset 0 -1px 0 rgba(80, 55, 15, 0.45), 0 2px 8px rgba(0, 0, 0, 0.35); border: 1px solid #8a6a2c; }
.btn.primary:hover:not(:disabled) { background: linear-gradient(180deg, #ecd08f, #c49a4c); }
.btn.ghost { border: 1px solid var(--line-2); color: var(--fog); background: rgba(9, 17, 13, 0.35); }
.btn.ghost:hover:not(:disabled) { border-color: var(--lamp); color: var(--lamp-2); }
.btn.danger { background: radial-gradient(120% 140% at 30% 20%, #b5402f, #7a221b 70%); color: #f6e7d6; border: 1px solid #5c1712; box-shadow: inset 0 1px 0 rgba(255, 210, 190, 0.25), 0 2px 8px rgba(0, 0, 0, 0.35); }
.btn.danger:hover:not(:disabled) { background: radial-gradient(120% 140% at 30% 20%, #c64b38, #8a271f 70%); }

/* naslovi sekcija: mala slova, mesing, tanka linija do kraja */
.rail-h, .board-h, .qlist-h { font-family: var(--sc); font-weight: 700; letter-spacing: 0.06em; color: var(--lamp-2); display: flex; align-items: baseline; gap: 10px; }
.board-h::after, .rail-h::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line-2), transparent); transform: translateY(-4px); }
.board-h small { font-family: var(--serif); letter-spacing: 0; color: var(--fog-3); font-weight: 400; }

/* gornja traka kao zaglavlje novina: dvostruka linija */
.topbar { background: linear-gradient(180deg, #0b140f, #09110d); border-bottom: 3px double var(--line-2); }
.tb-case { font-family: var(--display); font-weight: 800; letter-spacing: 0; }
.tb-setting { font-style: italic; }
.acts li { font-family: var(--sc); font-weight: 700; letter-spacing: 0.04em; }
.acts li.on { background: linear-gradient(180deg, #e2c37e, #b88f43); color: var(--lamp-ink); }
.tb-stats { font-family: var(--sc); letter-spacing: 0.03em; }

/* okviri kartoteke: dvostruki tanki rub (unutrašnji je mesingan) */
.objective, .mode-card, .cover, .party-setup {
  background: linear-gradient(180deg, rgba(28, 48, 38, 0.55), rgba(20, 35, 27, 0.55));
  border: 1px solid var(--line-2);
  box-shadow: inset 0 0 0 5px rgba(9, 17, 13, 0.6), inset 0 0 0 6px var(--line), 0 10px 30px rgba(0, 0, 0, 0.35);
  border-radius: 2px;
}
.objective { border-left: 1px solid var(--line-2); }
.obj-kicker, .today-kind { font-family: var(--sc); font-weight: 700; letter-spacing: 0.05em; color: var(--lamp-2); }
.obj-title { font-family: var(--display); font-weight: 700; }

/* izbor dana: veliki naslov u kurzivu sa ukrasnom crtom i rombom */
.today-title { font-family: var(--display); font-style: italic; font-weight: 800; font-size: clamp(2.8rem, 6.4vw, 5rem); line-height: 1; }
.today-title::after { content: ""; display: block; width: 180px; height: 9px; margin-top: 16px;
  background: linear-gradient(var(--lamp), var(--lamp)) left 50% / 70px 1px no-repeat, linear-gradient(var(--lamp), var(--lamp)) right 50% / 70px 1px no-repeat,
    linear-gradient(45deg, transparent 42%, var(--lamp) 42% 58%, transparent 58%) center / 9px 9px no-repeat, linear-gradient(-45deg, transparent 42%, var(--lamp) 42% 58%, transparent 58%) center / 9px 9px no-repeat; }
.today-lead { font-style: italic; }
.today-card .mode-name { font-family: var(--display); font-weight: 800; }
.today-card:hover, .today-card:focus-visible { box-shadow: inset 0 0 0 5px rgba(9, 17, 13, 0.6), inset 0 0 0 6px var(--lamp), 0 14px 36px rgba(0, 0, 0, 0.45); }
.mode-name { color: var(--fog); }

/* naslovna slika slučaja: sepija vinjeta preko scene */
.cover-art { filter: sepia(0.18) saturate(0.85); }
.modes-title { font-family: var(--display); font-style: italic; font-weight: 800; }
.setting { font-family: var(--sc); letter-spacing: 0.06em; color: var(--lamp-2); }

/* tragovi na tabli: ostareo papir, tamnije ivice */
.tag { background: radial-gradient(120% 90% at 50% 40%, #f2e8cb 0%, #e6d7af 70%, #d8c493 100%); box-shadow: inset 0 0 26px rgba(120, 90, 40, 0.22), 0 8px 18px rgba(0, 0, 0, 0.45); border-radius: 1px; }
.tag .tg-name { font-family: var(--display); font-weight: 800; }
.tag .tg-kind { font-family: var(--sc); letter-spacing: 0.04em; }
.tag.locked { background: transparent; box-shadow: none; border: 1px dashed var(--line-2); }
.tag.locked .tg-name { color: var(--fog-2); }

/* papir traga */
.sheet { background: radial-gradient(130% 100% at 50% 30%, #f8f1dc 0%, #efe3c2 75%, #e2d09f 100%); box-shadow: inset 0 0 40px rgba(120, 90, 40, 0.18), 0 18px 40px rgba(0, 0, 0, 0.5); }
.sheet h3 { font-family: var(--display); font-weight: 800; }
.sheet .stamp { font-family: var(--sc); color: #8f2a22; border-color: #8f2a22; }

/* ispitivanje */
.interro-name { font-family: var(--display); font-weight: 800; }
.line .spk { font-family: var(--sc); letter-spacing: 0.04em; }
.q { background: rgba(20, 35, 27, 0.7); border-color: var(--line-2); border-radius: 2px; }
.q:hover:not(:disabled) { border-color: var(--lamp); }
.q-tag { font-family: var(--sc); color: #d9785f; }

/* osumnjičeni i sobe */
.who-name, .room-name { font-family: var(--display); font-weight: 700; }
.badge { background: var(--lamp); color: var(--lamp-ink); }

/* skica: plan na pergamentu, mastilo sepija */
.map-paper { background-color: #efe3c2; background-image: linear-gradient(rgba(95, 80, 60, 0.07) 1px, transparent 1px), linear-gradient(90deg, rgba(95, 80, 60, 0.07) 1px, transparent 1px), radial-gradient(130% 100% at 50% 30%, transparent 60%, rgba(120, 90, 40, 0.25)); background-size: 24px 24px, 24px 24px, 100% 100%; }
.map-room-name { font-family: var(--display); font-weight: 700; font-style: italic; }
.map-side-h { font-family: var(--sc); }
.board-tabs button { font-family: var(--sc); letter-spacing: 0.04em; }
.board-tabs button.on { background: linear-gradient(180deg, #e2c37e, #b88f43); color: var(--lamp-ink); border-color: #8a6a2c; }

/* bioskop (uvod, činovi, finale): stara gravura */
.cin-kicker { font-family: var(--sc); letter-spacing: 0.08em; color: var(--lamp-2); }
.act-name, .killer-reveal h3 { font-family: var(--display); font-style: italic; font-weight: 800; }
.act-num { font-family: var(--display); font-weight: 900; color: var(--lamp); }
.stamp-big { font-family: var(--sc); }
.score-big, .rank { font-family: var(--display); font-weight: 800; }

/* toast i modal */
.toast { background: var(--paper); color: var(--ink); border: 1px solid rgba(95, 80, 60, 0.4); font-family: var(--serif); }
.modal { background: linear-gradient(180deg, #16261e, #111d17); border: 1px solid var(--line-2); box-shadow: inset 0 0 0 5px rgba(9, 17, 13, 0.6), inset 0 0 0 6px var(--line), 0 30px 70px rgba(0, 0, 0, 0.6); border-radius: 2px; }
.modal h2 { font-family: var(--display); font-style: italic; font-weight: 800; }

/* ==========================================================================
   ZAPISNIK SA SASLUŠANJA — izjava, sobe koje lik pominje, džepni sat
   ========================================================================== */
.izjava {
  position: relative; color: var(--ink); margin: 0 0 20px; padding: 22px 26px 18px 58px; border-radius: 1px;
  background:
    linear-gradient(90deg, transparent 40px, rgba(143, 42, 34, 0.45) 40px 41px, transparent 41px),
    repeating-linear-gradient(180deg, transparent 0 29px, rgba(70, 90, 120, 0.16) 29px 30px),
    radial-gradient(130% 100% at 50% 30%, #f7efd8 0%, #ecdfbb 78%, #dccb98 100%);
  background-position: 0 0, 0 14px, 0 0;
  box-shadow: inset 0 0 36px rgba(120, 90, 40, 0.18), 0 14px 32px rgba(0, 0, 0, 0.45);
}
.izj-h {
  font-family: var(--sc); font-weight: 700; letter-spacing: 0.08em; font-size: 0.92rem; color: #8f2a22;
  display: flex; align-items: center; gap: 10px; margin-bottom: 6px;
}
.izj-h::after { content: ""; flex: 1; height: 1px; background: rgba(143, 42, 34, 0.35); }
.izj-text { font-family: var(--serif); font-style: italic; font-size: 1.16rem; line-height: 30px; margin: 0; max-width: 66ch; text-wrap: pretty; }
.izj-text::before { content: "„"; }
.izj-text::after { content: "”"; }
.izj-rooms { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px dashed rgba(60, 45, 20, 0.35); }
.izj-rooms > span { font-family: var(--sc); font-size: 0.92rem; letter-spacing: 0.05em; color: var(--ink-2); }
.room-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 2px; font-family: var(--display); font-weight: 700; font-size: 0.95rem;
  color: var(--ink); background: rgba(255, 250, 235, 0.55); border: 1px solid rgba(60, 45, 20, 0.45); cursor: pointer;
}
.room-chip svg { width: 15px; height: 15px; }
.room-chip small { font-family: var(--serif); font-weight: 400; font-size: 0.92rem; color: var(--ink-2); }
.room-chip.open:hover { border-color: #8a6a2c; background: rgba(226, 195, 126, 0.35); }
.room-chip.done { opacity: 0.62; }
.room-chip.locked { color: #7a221b; border-style: dashed; border-color: rgba(143, 42, 34, 0.6); background: rgba(143, 42, 34, 0.05); cursor: not-allowed; }
.room-chip:disabled { cursor: default; }
.izj-refuse { margin: 12px 0 0; font-family: var(--serif); font-style: italic; color: #7a221b; line-height: 1.5; }
.izj-refuse span { display: block; font-style: normal; font-size: 0.92rem; color: var(--ink-2); margin-top: 2px; }

/* pitanje uz džepni sat: dve četvrti brojčanika, svaka je jedno pitanje */
.ask-box {
  display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 18px; align-items: center; margin: 4px 0 18px; padding: 16px 18px;
  background: linear-gradient(180deg, rgba(28, 48, 38, 0.55), rgba(20, 35, 27, 0.55)); border: 1px solid var(--line-2);
  box-shadow: inset 0 0 0 4px rgba(9, 17, 13, 0.55), inset 0 0 0 5px var(--line);
}
.ask-box .qlist-h { margin: 0 0 2px; }
.ask-box .qlist-h small { font-family: var(--serif); font-weight: 400; letter-spacing: 0; color: var(--fog-3); }
.ask-box .free-q { margin-top: 8px; }
.ask-box .free-q input { font-family: var(--serif); font-size: 1.05rem; background: rgba(9, 17, 13, 0.6); border-color: var(--line-2); color: var(--fog); }
.ask-box .free-q input:focus { outline: none; border-color: var(--lamp); box-shadow: 0 0 0 2px rgba(201, 164, 90, 0.25); }
.ask-box.spent { grid-template-columns: 60px minmax(0, 1fr); opacity: 0.9; }
.ask-box.spent .ask-clock { width: 60px; }
.free-q-off { margin: 0; color: var(--fog-2); font-style: italic; }
.ask-clock { width: 76px; height: auto; display: block; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.45)); }
.ask-clock .rim { fill: #f1e6c8; stroke: #b88f43; stroke-width: 4; }
.ask-clock .crown { fill: #b88f43; }
.ask-clock .left { fill: rgba(201, 164, 90, 0.18); stroke: rgba(95, 80, 60, 0.35); stroke-width: 0.8; }
.ask-clock .spent { fill: rgba(143, 42, 34, 0.72); }
.ask-clock .hand { stroke: #2a2018; stroke-width: 2.5; stroke-linecap: round; transition: transform 0.8s cubic-bezier(0.3, 1.4, 0.5, 1); }
.ask-clock .pin { fill: #2a2018; }
.confront-row { margin-top: 6px; }
.confront-row .qlist-h small { font-family: var(--serif); font-weight: 400; letter-spacing: 0; color: var(--fog-3); }
.confront-row .q { margin-bottom: 8px; width: 100%; }

/* sobe na tabli: zatvorene dok ih niko ne pomene, zaključane dok se ne ubedi */
.room.closed .room-name { color: var(--fog-3); font-style: italic; }
.room.closed .btn { opacity: 0.85; border-style: dashed; }
.room.closed .btn svg { width: 13px; height: 13px; }

/* skica: soba koju niko nije pomenuo je bleda, zaključana je šrafirana */
.map-room.hidden-room rect { opacity: 0.35; stroke-dasharray: 6 6; }
.map-room.hidden-room .map-room-name { opacity: 0.45; }
.map-room.locked-room rect { fill: rgba(143, 42, 34, 0.06); }
.map-pin.lock { cursor: default; }
.map-pin.lock circle { fill: #f1e6c8; stroke: #8f2a22; stroke-width: 2.5; }
.map-pin.lock path { fill: none; stroke: #8f2a22; stroke-width: 2.2; stroke-linejoin: round; }

@media (max-width: 720px) {
  .izjava { padding: 18px 16px 16px 46px; background-position: 0 0, 0 12px, 0 0; }
  .izjava { background:
    linear-gradient(90deg, transparent 30px, rgba(143, 42, 34, 0.45) 30px 31px, transparent 31px),
    repeating-linear-gradient(180deg, transparent 0 29px, rgba(70, 90, 120, 0.16) 29px 30px),
    radial-gradient(130% 100% at 50% 30%, #f7efd8 0%, #ecdfbb 78%, #dccb98 100%); }
  .ask-box { grid-template-columns: 52px minmax(0, 1fr); gap: 12px; padding: 12px; }
  .ask-clock { width: 52px; }
}
@media (prefers-reduced-motion: reduce) { .ask-clock .hand { transition: none; } }
/* dugmad na papiru traga (suoči / pokaži trag): crveno mastilo, ne tamna pločica */
.confront-box .btn, .confront-box .btn.ghost { color: #7a221b; background: rgba(143, 42, 34, 0.06); border: 1.5px solid rgba(143, 42, 34, 0.65); font-family: var(--sc); }
.confront-box .btn:hover:not(:disabled), .confront-box .btn.ghost:hover:not(:disabled) { background: rgba(143, 42, 34, 0.13); color: #5c1712; border-color: #7a221b; }
.confront-box .btn .cost { color: var(--ink-2); opacity: 0.85; }
.confront-box + .confront-box { margin-top: 12px; padding-top: 12px; }
/* naslovna: kartica predmeta ima unutrašnji razmak; slika dobija mesingani rub */
.cover { padding: 20px 26px 22px; gap: 16px; }
.cover-art { border-radius: 2px; box-shadow: inset 0 0 0 1px var(--line-2), 0 18px 40px rgba(0, 0, 0, 0.45); }
.cover-facts li::before { border-radius: 0; transform: rotate(45deg); width: 5px; height: 5px; }
@media (max-width: 600px) { .cover { padding: 16px 16px 18px; } }

/* kraj: tragovi koje igrač nije našao su bledi i to piše na njima */
.chain-list .chip.missed { opacity: 0.55; border-style: dashed; font-style: italic; }

/* ==========================================================================
   MUZIKA — samo dugme dole levo (zvuk je običan mp3, bez plejera)
   ========================================================================== */
.music-dock { position: fixed; left: 14px; bottom: 14px; z-index: 60; }
.md-toggle {
  font-family: var(--sc); font-size: 0.92rem; letter-spacing: 0.04em; color: var(--fog-2); cursor: pointer;
  background: rgba(14, 24, 19, 0.88); border: 1px solid var(--line); padding: 6px 11px; border-radius: 2px;
}
.md-toggle::before { content: "♪ "; color: var(--lamp); }
.music-dock.playing .md-toggle { color: var(--lamp); border-color: var(--line-2); }
.md-toggle:hover:not(:disabled) { border-color: var(--lamp); color: var(--lamp); }
.md-toggle:focus-visible { outline: 2px solid var(--lamp); outline-offset: 2px; }
.md-toggle:disabled { opacity: 0.6; cursor: default; }
.today-credit { margin-top: 6px; font-family: var(--serif); font-style: italic; font-size: 0.92rem; color: var(--fog-3); }
@media (max-width: 720px) { .music-dock { left: 8px; bottom: 70px; } }
@media print { .music-dock { display: none; } }

/* kraj: lažna teorija i istina su jasno obeležene */
.herring .h-lab { font-family: var(--sc); font-weight: 700; font-size: 0.78em; letter-spacing: 0.04em; margin-right: 4px; }
.herring span:first-child .h-lab { color: var(--fog-3); }
.herring span:last-child .h-lab { color: var(--ok, #8fbf8a); }

/* ==========================================================================
   Uvod: „Da li želite da postanete detektiv?”
   Slika je cela pozadina; tekst stoji levo, preko tamnog dela kancelarije.
   Na uspravnom telefonu slika je gore, tekst ispod nje.
   ========================================================================== */
.intro { position: relative; min-height: 100vh; min-height: 100svh; display: grid; align-items: center; overflow: hidden; background: var(--aud-deep); }
.intro-art, .intro-art img { position: absolute; inset: 0; width: 100%; height: 100%; }
.intro-art img { object-fit: cover; object-position: 62% 40%; animation: introIn 1.6s ease-out both; }
.intro::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(9, 17, 13, 0.94) 0%, rgba(9, 17, 13, 0.82) 30%, rgba(9, 17, 13, 0.25) 58%, rgba(9, 17, 13, 0) 75%),
              linear-gradient(0deg, rgba(9, 17, 13, 0.7), transparent 30%); }
.intro-body { position: relative; z-index: 1; max-width: 34rem; margin-left: clamp(20px, 6vw, 96px); padding: 40px 0; animation: introText 0.9s 0.35s ease-out both; }
.intro-kicker { margin: 0 0 14px; font-family: var(--display); font-style: italic; font-weight: 700; color: var(--lamp-2); font-size: 1.05rem; display: flex; align-items: center; gap: 12px; }
.intro-kicker::before { content: ""; width: 34px; height: 1px; background: var(--lamp); }
.intro-title { font-size: clamp(2.4rem, 5.2vw, 4.4rem); line-height: 1.02; color: var(--fog); text-wrap: balance; }
.intro-lead { margin: 18px 0 28px; font-size: 1.15rem; line-height: 1.55; color: var(--fog-2); max-width: 30rem; }
.intro-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
@keyframes introIn { from { transform: scale(1.06); opacity: 0.4; } to { transform: none; opacity: 1; } }
@keyframes introText { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.how-list { margin: 14px 0 6px; padding-left: 1.3em; display: grid; gap: 10px; }
.how-list b { font-family: var(--display); color: var(--lamp-2); }
@media (max-width: 700px) and (orientation: portrait) {
  .intro { align-items: end; }
  .intro-art { bottom: auto; height: 62svh; }
  .intro-art img { object-position: 50% 30%; }
  .intro::after { background: linear-gradient(180deg, rgba(9, 17, 13, 0) 0%, rgba(9, 17, 13, 0) 34%, rgba(9, 17, 13, 0.9) 56%, var(--aud-deep) 66%); }
  .intro-body { margin: 0; padding: 0 20px calc(28px + env(safe-area-inset-bottom)); max-width: none; }
  .intro-title { font-size: clamp(2.1rem, 9.5vw, 2.8rem); }
  .intro-lead { font-size: 1.02rem; margin: 12px 0 22px; }
  .intro-actions .btn { flex: 1 1 100%; justify-content: center; min-height: 48px; }
}
@media (prefers-reduced-motion: reduce) { .intro-art img, .intro-body { animation: none; } }

/* ---------------- sat (rezultat je vreme) ---------------- */
.topbar .time.score b { font-variant-numeric: tabular-nums; color: var(--lamp-2); }
.float-pts.minus { color: var(--signal-2); }

/* ---------------- kraj: vreme, deljenje, dnevna tabela ---------------- */
.end-time { display: grid; justify-items: center; gap: 2px; margin: 10px 0 16px; text-align: center; }
.end-time span { font-family: var(--sc); font-size: 0.92rem; letter-spacing: 0.08em; color: var(--fog-3); }
.end-time b { font-family: var(--display); font-weight: 800; font-size: clamp(3rem, 12vw, 4.6rem); line-height: 1; color: var(--lamp-2); font-variant-numeric: tabular-nums; }
.end-time em { font-family: var(--display); font-style: italic; color: var(--fog); font-size: 1.15rem; }
.end-share { display: flex; justify-content: center; margin-bottom: 18px; }
.end-share .btn { min-height: 46px; }
.lb-form { border-top: 1px solid var(--line); padding-top: 14px; margin-bottom: 12px; }
.lb-form label { display: block; font-family: var(--display); font-weight: 700; margin-bottom: 8px; }
.lb-form > div { display: flex; gap: 8px; }
.lb-form input { flex: 1; min-width: 0; min-height: 44px; padding: 8px 12px; background: var(--aud-deep); border: 1px solid var(--line-2); border-radius: 2px; color: var(--fog); font-size: 16px; }
.lb-h { font-size: 1.1rem; margin: 6px 0 8px; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.lb-h small { font-family: var(--serif); font-weight: 400; font-size: 0.92rem; color: var(--fog-3); }
.lb-rows { list-style: none; margin: 0 0 6px; padding: 0; display: grid; gap: 2px; }
.lb-rows li { display: grid; grid-template-columns: 2.2em 1fr auto; gap: 10px; align-items: baseline; padding: 7px 10px; background: rgba(0, 0, 0, 0.18); }
.lb-rows li.me { background: rgba(201, 164, 90, 0.16); outline: 1px solid var(--line-2); }
.lb-rows li.gap { margin-top: 8px; }
.lb-pos { font-family: var(--display); font-weight: 800; color: var(--fog-3); }
.lb-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-name small { color: var(--fog-3); font-style: italic; margin-left: 4px; }
.lb-time { font-variant-numeric: tabular-nums; font-family: var(--display); font-weight: 700; color: var(--lamp-2); }
.lb-empty { color: var(--fog-3); font-style: italic; margin: 8px 0; }
.share-text { width: 100%; min-height: 110px; background: var(--aud-deep); border: 1px solid var(--line-2); color: var(--fog); padding: 10px; font-size: 16px; }

html.on-intro .music-dock { display: none; }

/* ==========================================================================
   TELEFON — pregled 360–430 px
   ========================================================================== */
.game { height: 100vh; height: 100dvh; }
.tb-clues { display: inline-flex; align-items: baseline; gap: 4px; }
.tb-clues .ic { align-self: center; color: var(--fog-3); }
@media (max-width: 900px) {
  .tb-stats .time { display: inline-flex; align-items: center; gap: 5px; }
  .tb-stats .time .ic { color: var(--lamp); }
  .mobile-tabs { padding-bottom: env(safe-area-inset-bottom); }
  .mobile-tabs button { min-height: 50px; }
  html.in-game .music-dock { display: none; }
  .objective .obj-title { font-size: clamp(1.45rem, 6vw, 2rem); line-height: 1.1; }
  .objective .obj-text { font-size: 0.98rem; }
}
@media (max-width: 700px) {
  #tvToggle, #tvToggle2, #tvToggle3 { display: none; }
  .modes-foot { justify-content: stretch; }
  .modes-foot .btn.big { flex: 1 1 100%; justify-content: center; min-height: 52px; }
  .modes-foot .btn.ghost:not(.small) { flex: 1 1 100%; justify-content: center; }
  /* muzika: mala okrugla ikonica dole desno, ne preko teksta */
  .music-dock { left: auto; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); }
  .md-toggle { width: 44px; height: 44px; padding: 0; border-radius: 50%; font-size: 0; position: relative; display: grid; place-items: center; }
  .md-toggle::before { content: "♪"; font-size: 1.25rem; color: var(--fog-3); }
  .music-dock.playing .md-toggle::before { color: var(--lamp); }
  .music-dock:not(.playing) .md-toggle::after { content: ""; position: absolute; width: 26px; height: 2px; background: var(--fog-3); transform: rotate(-45deg); }
}
@media (max-width: 600px) {
  .topbar { overflow: visible; padding: 0 8px; }
  .tb-clues .lbl { display: none; }
  .tb-stats { gap: 12px; }
  .tb-stats b { font-size: 1.15rem; }
  /* ispitivanje: manja slika, da izjava i pitanje budu bliže vrhu */
  .interro-left { grid-template-columns: 76px 1fr; gap: 12px; }
  .interro-name { font-size: 1.45rem; }
  .interro-voice { font-size: 0.92rem; margin: 4px 0 0; }
  .free-q input, .lb-form input, input[type="text"], textarea { font-size: 16px; }
  .modal { padding: 20px 16px; max-height: 94dvh; }
  .modal-actions { flex-wrap: wrap; }
  .modal-actions .btn { flex: 1 1 auto; justify-content: center; min-height: 46px; }
}
@media (max-width: 600px) {
  .objective { padding: 14px 16px; gap: 10px; }
  .objective .obj-title { font-size: 1.32rem; }
  .objective .obj-text { font-size: 0.92rem; line-height: 1.45; margin: 6px 0 0; }
  .objective .btn { padding: 0.45em 1em; }
}
@media (max-width: 700px) { .screen.modes, .screen.today { padding-bottom: 76px; } }
@media (max-width: 600px) {
  .izj-text { font-size: 1.04rem; }  /* red ostaje 30px, linije papira se poklapaju */
  .view-head { margin-bottom: 12px; }
  .view-head h2 { font-size: 1.35rem; }
}
.lb-note { margin: 6px 0 0; font-size: 0.92rem; color: var(--fog-3); font-style: italic; }

/* misterija.live/test123: probni slučajevi */
.is-test .today-lead { border-left: 3px solid currentColor; padding-left: 12px; }
.is-test #todayNext { display: none; }

/* ---------- čišćenje AI šablona ----------
 * bez natpisa iznad naslova, okviri bez trake sa jedne strane, crtana ikonica umesto znaka ♪,
 * sitni tekst svetliji i krupniji (tokeni --fog-2/--fog-3 i donja granica veličine iznad). Kurziv ostaje. */
.btn .cost { font-size: max(0.8em, 12.5px); opacity: 0.9; }
.modes-head .setting, .cin-setting {
  font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: 0; color: var(--fog-2);
  font-size: 1rem; line-height: 1.45; margin: 12px 0 0;
}
.cin-setting { font-size: clamp(1rem, 1.8vw, 1.25rem); margin-top: 22px; text-align: center; }
.cin-kicker { font-family: var(--display); font-weight: 700; letter-spacing: 0; color: var(--fog); font-size: clamp(1.35rem, 3vw, 2rem); line-height: 1.15; }
.today-facts { display: block; margin: 12px 0 0; color: var(--fog-2); font-size: 1rem; line-height: 1.45; }
.cover-facts li { padding-left: 0; }
.cover-facts li::before { display: none; }
.verdict-bad { border: 1px solid rgba(212, 72, 59, 0.5); border-radius: 2px; }
.verdict-hint { border: 1px solid rgba(201, 164, 90, 0.45); border-radius: 2px; }
.cover-done { border: 1px solid var(--line-2); padding: 10px 14px; border-radius: 2px; }
.free-box { border-left-width: 1px; }
.free-q-off { border-left: none; padding-left: 0; }
.is-test .today-lead { border-left: none; padding-left: 0; }
.today-title::after { display: none; }
.today-lead { margin-top: 14px; }
.intro-kicker { position: absolute; z-index: 2; top: calc(18px + env(safe-area-inset-top)); left: clamp(20px, 6vw, 96px); margin: 0; font-weight: 700; font-size: 1.15rem; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6); }
.intro-kicker::before { display: none; }
.md-toggle::before {
  content: ""; display: inline-block; width: 1em; height: 1em; vertical-align: -0.15em; margin-right: 6px; background: var(--lamp);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18V5l12-2v13'/%3E%3Ccircle cx='6' cy='18' r='3'/%3E%3Ccircle cx='18' cy='16' r='3'/%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' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18V5l12-2v13'/%3E%3Ccircle cx='6' cy='18' r='3'/%3E%3Ccircle cx='18' cy='16' r='3'/%3E%3C/svg%3E") center / contain no-repeat;
}
@media (max-width: 900px) {
  .md-toggle::before { content: ""; width: 1.2rem; height: 1.2rem; margin: 0; background: var(--fog-3); }
  .music-dock.playing .md-toggle::before { background: var(--lamp); }
}
/* Brygada je šira od Playfaira: dugmad i naslovi papira da se ne lome u tri reda */
.btn { letter-spacing: 0.02em; }
.sheet h3 { font-size: clamp(1.55rem, 6.2vw, 2.1rem); line-height: 1.08; }
.line .free-tag { margin-left: 0; }
/* portreti 19. veka (cele figure): na telefonu u ispitivanju lice, cela figura je tu presitna */
@media (max-width: 700px) {
  .interro-left .frame .portrait.avatar { aspect-ratio: 4 / 5; }
  .interro-left .frame .portrait.avatar .av-card { display: none; }
  .interro-left .frame .portrait.avatar .av-face { display: block; }
}

/* naslov u uvodnom filmu: bez animacije razmaka slova (prelamao je redove i trzao), samo pojava */
@keyframes titleIn { from { opacity: 0; transform: scale(1.04); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
.cin-title.reveal-in, .act-num { will-change: opacity, transform, filter; }

/* osumnjičeni: cela postava vidljiva odmah, bez skrolovanja (visina slike po ekranu) */
.lineup-scene { width: 100%; text-align: center; }
.lineup-scene .cin-kicker { margin-bottom: 10px; }
.lineup-text { font-size: clamp(1rem, 1.5vw, 1.3rem); max-width: 52ch; min-height: 0; }
.lineup { --h: clamp(150px, 36vh, 330px); display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 18px; margin-top: 16px; }
.lineup .cast-card { width: calc(var(--h) * 0.5625); text-align: left; }
.lineup .cast-card .portrait.avatar { width: 100%; height: var(--h); aspect-ratio: auto; }
.lineup .cc-name { font-size: clamp(0.95rem, 1.4vw, 1.2rem); margin-top: 6px; }
.lineup .cc-role { font-size: 0.92rem; }
@media (max-width: 700px) {
  .lineup { --h: clamp(110px, 17.5vh, 200px); gap: 8px 14px; margin-top: 12px; }
  .lineup.n3 { --h: min(26vh, calc((100vw - 76px) / 3 / 0.5625)); }
  .lineup-text { font-size: 0.98rem; line-height: 1.45; }
  .lineup .cc-name { font-size: 0.92rem; line-height: 1.15; }
  .lineup .cc-role { font-size: 0.85rem; line-height: 1.2; }
}
/* telefon: u postavi lica (4:5) u mreži, da stane i da se imena čitaju */
@media (max-width: 700px) {
  .lineup { --h: min(17vh, 160px); display: grid; grid-template-columns: repeat(2, max-content); justify-content: center; }
  .lineup.n3 { --h: min(19vh, calc((100vw - 76px) / 3 / 0.8)); grid-template-columns: repeat(3, max-content); }
  .lineup.n5, .lineup.n6 { grid-template-columns: repeat(3, max-content); --h: min(15vh, calc((100vw - 76px) / 3 / 0.8)); }
  .lineup .cast-card { width: calc(var(--h) * 0.8); }
  .lineup .portrait.avatar .av-card { display: none; }
  .lineup .portrait.avatar .av-face { display: block; }
}
/* visina slike prema stvarnoj visini ekrana (tekst i dugme zauzimaju ostatak) */
.lineup { --h: clamp(120px, calc(100vh - 520px), 330px); }
@supports (height: 100dvh) { .lineup { --h: clamp(120px, calc(100dvh - 520px), 330px); } }
@media (max-width: 700px) {
  .lineup { --h: clamp(90px, calc((100vh - 560px) / 2), 160px); }
  @supports (height: 100dvh) { .lineup { --h: clamp(90px, calc((100dvh - 560px) / 2), 160px); } }
  .lineup.n3 { --h: min(19vh, calc((100vw - 76px) / 3 / 0.8)); }
}

/* ==========================================================================
   Leva traka u igri: ništa ne sme da je proširi u stranu
   (duga imena prostorija i dugme „pretraženo” su je ranije terali da se skroluje vodoravno)
   ========================================================================== */
.rail { overflow-x: hidden; }
.who { grid-template-columns: 46px minmax(0, 1fr) auto; }
.who-name, .who-role { overflow-wrap: break-word; hyphens: auto; }
.room { flex-wrap: wrap; row-gap: 4px; }
.room-name { flex: 1 1 7.5em; min-width: 0; overflow-wrap: break-word; hyphens: auto; }
.room .btn { flex: none; max-width: 100%; margin-left: auto; white-space: normal; text-align: center; }

/* Muzika: u igri je gasi zvučnik gore, pa dugme dole ne stoji preko trake */
html.in-game .music-dock { display: none; }
/* na telefonu: okruglo dugme mora da se vidi */
@media (max-width: 700px) {
  .md-toggle { width: 46px; height: 46px; background: rgba(9, 17, 13, 0.94); border: 1px solid rgba(201, 164, 90, 0.65); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.55); }
  .md-toggle::before { width: 1.35rem; height: 1.35rem; background: var(--fog); }
  .music-dock.playing .md-toggle { border-color: var(--lamp); }
  .music-dock.playing .md-toggle::before { background: var(--lamp); }
  .music-dock:not(.playing) .md-toggle::after { width: 28px; background: var(--fog); }
}

/* Tabela se uvek vidi: na karticama dana i na koricama slučaja */
.today-card .btn { pointer-events: auto; margin-top: 0; }
.today-card:focus-within { border-color: var(--lamp); }
.today-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 4px; }
.today-board .ic, #boardBtn .ic { color: var(--lamp); }
