:root {
  color-scheme: dark;
  --bg: #0d1313;
  --panel: #151d1c;
  --line: #303c39;
  --ink: #f3eadb;
  --muted: #aebbb5;
  --accent: #e8b679;
  --green: #a8c5ab;
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Segoe UI", system-ui, sans-serif;
  --mono: "Cascadia Mono", Consolas, monospace;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: radial-gradient(ellipse at top right,#192522 0,transparent 45rem), var(--bg); font: 1rem/1.55 var(--sans); }
button, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
button, a, select, textarea { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
.skip:focus { position: fixed; z-index: 5; top: .5rem; left: .5rem; background: var(--ink); color: var(--bg); padding: .6rem; }
.shell { width: min(1200px, calc(100% - 64px)); margin-inline: auto; }
.top { border-bottom: 1px solid #283431; background: #111817; }
.top-inner { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; gap: 12px; align-items: center; text-align: left; background: none; border: 0; padding: 0; color: var(--ink); font: 1.45rem/1.12 var(--serif); }
.brand svg { width: 38px; height: 38px; padding: 4px; stroke: var(--accent); stroke-width: 1.5; fill: none; border: 1px solid #8b704e; }
.brand small { margin-top: 5px; display: block; color: var(--muted); font: .61rem var(--mono); letter-spacing: .12em; }
.top-actions { display: flex; align-items: center; gap: 24px; }
.status { color: var(--muted); font-size: .82rem; }
.status i { display: inline-block; border-radius: 50%; background: #88af94; width: 7px; height: 7px; margin-right: 5px; }
.sound, .secondary, .primary, .text-btn { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); color: var(--ink); background: #1b2623; padding: 9px 14px; border-radius: 4px; font-weight: 650; }
.sound { background: transparent; font-size: .83rem; color: var(--muted); }
.sound[aria-pressed="true"] { color: var(--accent); border-color: #765d3d; }
.secondary:hover, .sound:hover { background: #273532; color: var(--ink); }
.primary { color: #191713; background: var(--accent); border-color: var(--accent); }
.primary:hover { background: #f5c991; }
.primary:disabled { color: #b6c1bb; background: #25312e; border-color: var(--line); }
.text-btn { background: transparent; border-color: transparent; color: var(--accent); padding-inline: 5px; }
.text-btn:hover { text-decoration: underline; }
.muted { color: var(--muted); }
.ico { width: 18px; height: 18px; flex: none; stroke: currentColor; stroke-width: 1.55; fill: none; stroke-linecap: round; stroke-linejoin: round; }
#main { padding-top: 30px; min-height: 70vh; }
.hero { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; min-height: 440px; border: 1px solid #47524a; border-radius: 7px; background: #152422; }
.hero::after { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg,#081010f8 0%,#091111e0 27%,#0c151465 62%,#0911111a 100%),linear-gradient(0deg,#0a1212a3,transparent 44%); }
.art { position: absolute; inset: 0; z-index: -2; background-position: center; background-size: cover; }
.art.radio { background-image: url("arte/radio.webp"); background-position: center 55%; }
.art.pier { background-image: url("arte/cais.webp"); background-position: center 56%; }
.art.arquivo { background-image: url("arte/arquivo.webp"); background-position: center 56%; }
.hero-inner { width: min(100%, 680px); padding: 44px clamp(22px, 5.4vw, 72px); }
.kicker { display: flex; align-items: center; gap: 10px; color: var(--accent); letter-spacing: .14em; font: .8rem/1.5 var(--mono); text-transform: uppercase; }
.kicker i { height: 1px; width: 25px; flex: none; background: currentColor; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; }
.hero h1 { margin: 13px 0 12px; font-size: clamp(3.5rem, 8vw, 7rem); line-height: .97; letter-spacing: -.052em; }
.hero p { color: #e2e5dd; max-width: 38ch; margin-bottom: 24px; font-size: 1.08rem; }
.hero .player-greeting { margin-bottom: 7px; color: var(--accent); font-weight: 650; overflow-wrap: anywhere; }
.hero .primary { padding-inline: 16px; }
.hero-caption { position: absolute; bottom: 20px; right: 23px; display: flex; align-items: center; gap: 7px; color: #fff1d9; padding: 5px 8px; background: #131918ba; font: .76rem var(--mono); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin: 32px 0 14px; }
.section-head h2 { font-size: clamp(1.9rem, 3.8vw, 2.65rem); line-height: 1.03; margin-top: 3px; }
.section-head .meta { padding-bottom: 4px; text-align: right; }
.meta { color: var(--muted); font: .76rem/1.4 var(--mono); letter-spacing: .045em; }
.card-grid, .people-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.case-card { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; align-items: stretch; text-align: left; width: 100%; min-height: 206px; border-radius: 5px; border: 1px solid var(--line); padding: 16px; color: var(--ink); background: var(--panel); }
.case-card::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg,#121a19 20%,#121a19e0 55%,#131c1a4d); }
.case-card[disabled] .art { filter: saturate(.58); }
.case-card:not([disabled]):hover { border-color: var(--accent); }
.case-card.current { border-color: #a28457; }
.card-top { display: flex; align-items: start; justify-content: space-between; gap: 6px; margin-bottom: 41px; }
.case-id { font: .74rem var(--mono); letter-spacing: .11em; color: #ffe3b8; }
.badge { display: inline-flex; gap: 5px; align-items: center; font: .72rem/1.4 var(--mono); color: #e3eae4; padding: 3px 7px; border: 1px solid #64726c; border-radius: 2px; background: #101716e6; }
.badge .ico { width: 13px; height: 13px; }
.badge.active { color: var(--accent); border-color: #92754e; }
.badge.done { color: var(--green); border-color: #607e66; }
.case-card h3 { font-size: 1.55rem; line-height: 1.05; margin: auto 0 6px; }
.case-card p { color: var(--muted); font-size: .91rem; line-height: 1.4; }
.footer { border-top: 1px solid var(--line); margin-top: 32px; padding: 12px 0 18px; display: flex; justify-content: space-between; gap: 16px; align-items: center; color: var(--muted); font: .75rem var(--mono); }
.footer b { color: var(--accent); }
.footer button { font: .82rem var(--sans); }
.case-hero { min-height: 278px; }
.case-hero h1 { font-size: clamp(2.4rem, 6vw, 4.9rem); line-height: 1; }
.case-hero p { max-width: 51ch; margin: 0; }
.case-hero .hero-inner { padding-block: 30px; width: min(100%, 770px); }
.crumb { margin: 0 0 9px; }
.workspace { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 20px; align-items: start; margin-top: 20px; }
.desk, .sidebox { border: 1px solid var(--line); border-radius: 5px; background: var(--panel); min-width: 0; }
.tabs { display: flex; flex-wrap: wrap; padding-inline: 10px; border-bottom: 1px solid var(--line); }
.tabs button { display: inline-flex; color: var(--muted); gap: 7px; align-items: center; padding: 13px 10px 11px; border: 0; border-bottom: 2px solid transparent; background: none; font-size: .9rem; white-space: nowrap; }
.tabs button:hover, .tabs button[aria-pressed="true"] { color: var(--accent); }
.tabs button[aria-pressed="true"] { border-bottom-color: var(--accent); }
.desk-body, .sidebox { padding: 18px; }
.desk-body h2 { font-size: 1.9rem; line-height: 1.13; }
.desk-body > p { color: var(--muted); margin: 8px 0 14px; }
.side { display: grid; gap: 13px; }
.sidebox h2 { font-size: 1.35rem; margin-bottom: 8px; }
.sidebox p { color: var(--muted); font-size: .91rem; }
.sidebox .text-btn { font-size: .86rem; min-height: 36px; margin-top: 8px; }
.progress { height: 5px; margin: 12px 0 8px; background: #35423c; border-radius: 4px; overflow: hidden; }
.progress div { height: 100%; background: var(--accent); }
.tile { background: #111917; border: 1px solid var(--line); border-radius: 4px; color: var(--ink); text-align: left; padding: 12px; }
.tile:hover { border-color: #b59265; }
.tile strong, .tile .meta { display: block; }
.tile strong { margin: 3px 0 2px; }
.tile .state { display: block; margin-top: 9px; color: var(--green); font-size: .8rem; }
.tile .state.new { color: var(--accent); }
.person-tile { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.person-tile .portrait { border: 0; width: 100%; border-radius: 0; }
.person-tile .person-info { padding: 9px 11px 12px; }
.portrait { flex: none; width: 54px; aspect-ratio: 1; background: #243530 url("arte/elenco.webp") no-repeat; background-size: 400% 200%; border: 1px solid #66736a; border-radius: 3px; }
.identity { display: flex; align-items: center; gap: 12px; }
.identity .portrait { width: 78px; }
.identity h2 { font-size: 1.9rem; line-height: 1.05; }
.board { display: grid; gap: 9px; list-style: none; padding: 0; margin: 0; }
.board li { background: #111917; border-left: 2px solid #9e8054; padding: 9px 12px; }
.board p { color: var(--muted); font-size: .9rem; }
.notes { margin-top: 20px; }
.notes label { display: block; margin-bottom: 5px; font-weight: 650; }
textarea, select { width: 100%; padding: 9px; border: 1px solid #586660; border-radius: 4px; color: var(--ink); background: #0f1715; }
textarea { min-height: 95px; resize: vertical; }
.form-section { margin: 15px 0; padding: 0; border: 0; }
.form-section label, .form-section legend { display: block; margin-bottom: 4px; font-weight: 650; }
.form-section .check { display: flex; align-items: start; gap: 9px; padding: 7px 9px; margin: 3px 0; font-weight: 400; border: 1px solid var(--line); border-radius: 3px; }
.check input { accent-color: var(--accent); width: 16px; height: 16px; margin-top: .23em; flex: none; }
.feedback { color: #f2c8a3; margin: 9px 0; min-height: 1.5em; }
.feedback:empty { display: none; }
.resolution { border-left: 2px solid var(--green); background: #1c2c24; padding: 14px; margin: 14px 0; }
.resolution h3 { font-size: 1.35rem; margin-bottom: 5px; }
.resolution p + p { margin-top: 12px; }
dialog { color: var(--ink); width: min(590px, calc(100% - 32px)); max-height: min(680px, 90dvh); border: 1px solid #7c765f; border-radius: 7px; padding: 0; background: var(--panel); }
dialog::backdrop { background: #050a0ac9; }
.welcome { width: min(510px, calc(100% - 32px)); border-color: #96764e; background: radial-gradient(ellipse at top right,#27302a,transparent 73%),var(--panel); box-shadow: 0 18px 70px #0009; }
.welcome-content { padding: clamp(18px, 5vw, 31px); }
.welcome h2 { margin: 9px 0 12px; font-size: clamp(1.85rem, 5.8vw, 2.65rem); line-height: 1.05; }
.welcome h2:focus { outline: none; }
.welcome p { color: #ccd6ce; margin-bottom: 18px; }
.welcome label { display: block; margin-bottom: 6px; font-weight: 650; }
.welcome label span { margin-left: 6px; color: var(--muted); font-size: .82rem; font-weight: 400; }
.welcome input { width: 100%; min-height: 44px; padding: 9px 11px; border: 1px solid #65736b; border-radius: 4px; color: var(--ink); background: #0f1715; font: inherit; }
.welcome-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-top: 16px; }
.welcome-actions button { font-size: .9rem; line-height: 1.2; padding-inline: 8px; min-height: 44px; }
.modal-inner { position: relative; padding: 23px; }
.modal-inner h2 { padding-right: 35px; font-size: 2rem; line-height: 1.1; margin: 6px 0; }
.modal-inner p { color: #d2dbd3; margin: 12px 0; }
.modal-inner blockquote { margin: 14px 0; padding: 10px 13px; border-left: 2px solid var(--accent); color: var(--ink); background: #101915; }
.close { position: absolute; top: 12px; right: 12px; padding: 7px; min-height: 34px; }
.modal-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.talk-exchange > p { margin: 14px 0 5px; }
.talk-exchange > p strong { color: var(--accent); margin-right: 4px; }
.talk-exchange blockquote { margin: 7px 0 12px; }
.talk-exchange blockquote p { margin: 0; color: var(--ink); }
.talk-exchange blockquote p + p { margin-top: 7px; }
.talk-options { display: grid; gap: 6px; margin-top: 11px; }
.talk-options button { text-align: left; justify-content: start; line-height: 1.25; font-size: .94rem; }
.talk-options .text-btn { width: fit-content; }
.talk-options .meta { margin: 4px 0; }
.talk-pressure { min-height: 42px; padding: 8px 12px; border: 1px solid #785349; border-radius: 4px; background: #291f1c; color: #f1c1ae; }
.talk-pressure:hover { background: #3b2a25; }
.modal-inner .talk-closed { color: #f1c1ae; margin-bottom: 5px; }
.modal-inner .talk-record { display: flex; align-items: center; gap: 7px; color: var(--green); font-size: .88rem; }
.modal-inner .talk-options-label { margin-bottom: 0; color: var(--accent); }
.talk-transcript, .witness-notes { margin-top: 14px; }
.talk-transcript summary, .witness-notes summary { width: fit-content; padding: 4px 0; cursor: pointer; color: var(--muted); font-weight: 550; }
.talk-transcript .talk-exchange { font-size: .92rem; }
.witness-notes .board { margin-top: 7px; }
.hint { padding-top: 7px; color: var(--accent) !important; }
.finale-stamp { color: var(--green); }
@media (max-width: 820px) {
  .workspace { grid-template-columns: 1fr; }
  .side { grid-template-columns: 1fr 1fr; }
  .hero { min-height: 365px; }
  .case-hero { min-height: 245px; }
  .hero::after { background: linear-gradient(90deg,#081010f2,#091111b0 54%,#0c151436); }
}
@media (max-width: 600px) {
  .shell { width: calc(100% - 28px); }
  #main { padding-top: 16px; }
  .top-inner { min-height: 62px; }
  .brand { font-size: 1.24rem; gap: 7px; }
  .brand svg { width: 32px; height: 32px; }
  .status { display: none; }
  .hero { min-height: 410px; align-items: end; }
  .hero-inner { padding: 26px 17px 43px; }
  .hero h1 { font-size: clamp(2.9rem, 13vw, 4.6rem); }
  .hero p { font-size: 1rem; margin-bottom: 14px; }
  .hero::after { background: linear-gradient(0deg,#081010f7 0%,#091111cc 46%,#0c151428 100%); }
  .hero-caption { bottom: 10px; right: 10px; font-size: .68rem; }
  .case-hero { min-height: 260px; }
  .case-hero h1 { font-size: clamp(2rem, 8.9vw, 3.25rem); }
  .case-hero .hero-inner { padding: 20px 16px 30px; }
  .case-hero .hero-caption { display: none; }
  .card-grid { grid-template-columns: 1fr; }
  .case-card { min-height: 161px; }
  .card-top { margin-bottom: 25px; }
  .side { grid-template-columns: 1fr; }
  .tabs { padding-inline: 2px; }
  .tabs button { padding-inline: 8px; font-size: .82rem; }
  .tabs .ico { width: 15px; height: 15px; }
  .desk-body { padding: 13px; }
  .people-grid { gap: 6px; }
  .person-tile .person-info { padding: 6px; line-height: 1.2; }
  .person-tile .meta { font-size: .67rem; }
}
