/* Detective archive: the same warm noir palette and typography as the landing page. */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Oswald:wght@600;700&display=swap');
:root {
  color-scheme: dark;
  --bg: #0c0908;
  --panel: #1a1411;
  --raised: #261d17;
  --line: #3f3027;
  --text: #f3e8d8;
  --muted: #b9aaa0;
  --accent: #d35c2b;
  --gold: #edb28c;
  --font: 'Manrope', 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 110px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.75 var(--font); -webkit-font-smoothing: antialiased; }
body::before { content: ''; position: fixed; z-index: -1; inset: 0; background: radial-gradient(ellipse at 85% 0, #6e42211a, transparent 55%); pointer-events: none; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--gold); }
button, input, select { font: inherit; }
button, a, input, select { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .45; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
::selection { background: #9f441f; color: white; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
.shell { width: min(1120px, calc(100% - 64px)); margin-inline: auto; }
.player-header { position: sticky; top: 0; z-index: 10; border-bottom: 1px solid #d6b69a24; background: #0c0908f5; backdrop-filter: blur(18px); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 30px; min-height: 84px; }
.brand { display: inline-block; color: var(--text); font: 700 25px/1 'Oswald', Impact, sans-serif; letter-spacing: -.035em; white-space: nowrap; }
.brand span { display: block; margin-top: 7px; color: var(--muted); font: 500 9px/1.4 var(--font); letter-spacing: .17em; text-transform: uppercase; }
.header-inner nav { display: flex; gap: 28px; margin: 0 auto; color: #d7c7b8; font-size: 12px; font-weight: 600; }
#account-nav { min-width: 0; }
#account-nav .button { max-width: 260px; overflow-wrap: anywhere; }
.account-glyph { width: 17px; height: 17px; flex-shrink: 0; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 48px; padding: 12px 25px; border: 1px solid transparent; border-radius: 100px; background: var(--accent); color: #fff7ed; font-weight: 700; font-size: 13px; line-height: 1.45; text-align: center; box-shadow: 0 6px 20px #0003, 0 0 22px #b94b251c; transition: background .2s, border-color .2s, transform .2s; }
.button:hover { background: #ec753c; color: #fff7ed; transform: translateY(-1px); }
.button.secondary { border-color: #715847; background: transparent; color: #e6dace; box-shadow: none; }
.button.secondary:hover { background: #302219; border-color: #ae7d59; color: #fff7ed; }
.button.small { min-height: 40px; padding: 10px 17px; font-size: 12px; }
.button.quiet { background: transparent; color: var(--muted); padding: 8px 4px; box-shadow: none; }
.eyebrow { color: var(--gold); font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.muted { color: var(--muted); }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: var(--font); font-weight: 600; letter-spacing: -.04em; line-height: 1.25; overflow-wrap: anywhere; }
h1 { font-size: clamp(32px, 4vw, 50px); }
h2 { font-size: 30px; }
h3 { font-size: 22px; }
p { margin-bottom: 16px; }
section { margin: 44px 0; }
.section-heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 18px; margin-bottom: 22px; }
.section-heading h2 { margin: 0; }
.section-title > .eyebrow { display: block; margin-bottom: 7px; font-size: 9px; }
.welcome { position: relative; isolation: isolate; overflow: hidden; margin-top: 34px; padding: 40px 40px 0; border: 1px solid #d6b69a32; border-radius: 10px; background: #17110e; }
.welcome::before { content: ''; position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg, #17110e 0%, #17110ef5 35%, #17110e70 65%, #17110e22), linear-gradient(0deg, #17110e, transparent 65%), url('/assets/landing/evidence-desk-v2.opt.webp') right center / cover no-repeat; }
.welcome::after { content: ''; position: absolute; top: 0; left: 40px; width: 70px; height: 3px; background: var(--accent); }
.welcome > .eyebrow { display: inline-block; padding-bottom: 8px; border-bottom: 1px solid #edb28c45; }
.welcome h1 { max-width: 760px; margin: 18px 0 16px; }
.welcome > p { max-width: 480px; margin-bottom: 28px; font-size: 14px; }
.welcome > .button { margin-bottom: 36px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 30px -40px 0; border-top: 1px solid #d6b69a32; background: #100c0aed; }
.stat { position: relative; padding: 23px 28px; }
.stat + .stat { border-left: 1px solid #d6b69a24; }
.stat strong { display: block; margin-bottom: 3px; color: #f5dcc1; font-size: 29px; font-weight: 500; font-variant-numeric: tabular-nums; line-height: 1.35; }
.stat span { color: var(--muted); font-size: 11px; }
.quick-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; }
.panel { position: relative; min-width: 0; padding: 28px; border: 1px solid #d6b69a32; border-radius: 8px; background: linear-gradient(145deg, #231a14, #17110e); }
.panel h3 { margin: 12px 0; }
.panel p { color: var(--muted); }
.quick-grid .panel { display: flex; flex-direction: column; align-items: flex-start; min-height: 226px; }
.quick-grid .panel > .button { margin-top: auto; }
.quick-grid .panel:first-child::after { content: ''; position: absolute; width: 25px; height: 3px; top: -1px; right: 28px; background: var(--accent); }
.quick-grid .panel:last-child { border-style: dashed; background: linear-gradient(#211913eb, #17110eef), url('/assets/landing/corporate-paper-grain.svg'); }
.actions { display: flex; flex-wrap: wrap; gap: 9px; }
.active-game { padding-left: 34px; border-color: #a46f4555; box-shadow: inset 3px 0 var(--accent); background: linear-gradient(105deg, #302016, #17110e); }
.active-game > .eyebrow { display: inline-flex; align-items: center; gap: 9px; }
.active-game > .eyebrow::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.room-recovery { margin: 18px 0; padding: 22px; border: 1px solid #b48154; border-radius: 8px; background: #302016; }
.room-recovery h3 { margin: 10px 0; }
.room-recovery p { color: var(--muted); font-size: 13px; }
.room-recovery .actions .button { min-height: 44px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.filters input { flex: 1; min-width: 150px; }
.field { display: grid; gap: 8px; margin: 18px 0; }
.field > span, label { font-size: 13px; }
.field > span:first-child { color: #dccdbb; font-weight: 600; }
.field input, .field select, .filters input, .filters select { width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid #584234; border-radius: 6px; background: #100c0a; color: var(--text); box-shadow: inset 0 2px 5px #0002; }
input::placeholder { color: #978679; }
.filters select { width: auto; min-width: 170px; }
.field small { color: var(--muted); }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); }
.check { display: flex; align-items: flex-start; gap: 10px; margin: 20px 0; color: var(--muted); font-size: 12px; line-height: 1.8; }
.check input { width: 17px; height: 17px; margin-top: 4px; flex-shrink: 0; }
.check a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }
.password-row { display: flex; gap: 6px; }
.password-row input { flex: 1; min-width: 0; }
.password-row button { min-width: 72px; padding: 0 9px; border: 1px solid #584234; border-radius: 6px; background: #211711; color: #d7c7b8; font-size: 11px; }
.table-wrap { overflow: hidden; border: 1px solid var(--line); border-radius: 8px; }
.history { width: 100%; border-collapse: collapse; background: #17110e; }
.history th { padding: 15px 17px; background: #211811; color: #bdab99; font-size: 9px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; text-align: left; }
.history td { padding: 20px 17px; border-top: 1px solid var(--line); font-size: 12px; }
.history .game-name { font-size: 13px; font-weight: 700; }
.history td small { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; font-weight: 400; }
.history .actions { min-width: 180px; }
.history .button.small { min-height: 36px; padding: 8px 12px; font-size: 10px; }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border: 1px solid #65503e; border-radius: 4px; font-size: 10px; line-height: 1.4; white-space: nowrap; }
.status::before { content: ''; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.status.running { border-color: #45604b; color: #adc5a5; }
.status.paused { border-color: #8a6538; color: #e2bf83; }
.status.finished { color: #c4b19b; border-color: #584739; }
.case-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 24px; }
.case-card { display: flex; flex-direction: column; min-width: 0; padding: 12px; overflow: hidden; border: 1px solid #d6b69a32; border-radius: 10px; background: linear-gradient(150deg, #231a14, #17110e); transition: border-color .2s, transform .2s; }
.case-card:hover { transform: translateY(-3px); border-color: #956749; }
.case-cover { position: relative; aspect-ratio: 3 / 2; overflow: hidden; border-radius: 5px; background: #100c0a; }
.case-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.case-card:hover .case-cover img { transform: scale(1.025); }
.case-cover .badge { position: absolute; top: 12px; left: 12px; padding: 6px 10px; border: 1px solid #edb28c45; border-radius: 4px; background: #17110ee8; color: #f1d3b1; font-size: 9px; font-weight: 700; letter-spacing: .045em; text-transform: uppercase; }
.case-body { display: flex; flex-direction: column; flex: 1; padding: 22px 10px 10px; }
.case-body h3 { margin: 0 0 13px; font-size: 22px; font-weight: 650; }
.case-body p { color: var(--muted); font-size: 13px; line-height: 1.8; }
.case-meta { margin-bottom: 11px; color: var(--gold); font-size: 10px; font-weight: 600; }
.case-bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: auto; padding-top: 20px; }
.case-card .case-bottom { border-top: 1px solid #d6b69a24; margin-top: auto; }
.price { font-size: 21px; font-weight: 600; line-height: 1.4; white-space: nowrap; }
.price small { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; font-weight: 400; white-space: normal; }
.tabs { display: flex; gap: 4px; padding: 4px; border: 1px solid #d6b69a32; border-radius: 100px; background: #17110e; }
.tabs button { padding: 8px 17px; border: 0; border-radius: 100px; background: transparent; color: var(--muted); font-size: 11px; font-weight: 600; }
.tabs [aria-selected=true] { background: #a64d29; color: #fff7ed; }
.bundle-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.bundle { background: linear-gradient(130deg, #362319, #1b130f); }
.bundle ul { margin: 18px 0 22px; padding-left: 18px; color: #d0bca8; font-size: 12px; }
.bundle li { margin: 6px 0; }
.bundle .price s { margin-left: 8px; color: var(--muted); font-size: 12px; font-weight: 400; }
.badge.discount { display: inline-block; padding: 5px 10px; border: 1px solid #b37c5266; border-radius: 4px; background: #74402844; color: #f1bb8d; font-size: 11px; }
.empty { padding: 35px 24px; border: 1px dashed #584234; border-radius: 6px; color: var(--muted); background: #100c0a66; text-align: center; }
.empty .button { margin-top: 14px; }
.case-grid > .empty { grid-column: 1 / -1; }
.auth-layout { display: grid; grid-template-columns: .98fr 1fr; max-width: 980px; margin: 48px auto 58px; overflow: hidden; border: 1px solid #d6b69a32; border-radius: 10px; box-shadow: 0 30px 80px #0004; }
.auth-art { position: relative; isolation: isolate; display: flex; flex-direction: column; justify-content: flex-end; min-height: 620px; padding: 40px; background: linear-gradient(0deg, #0c0908 2%, #0c0908b5 35%, #0c090822 80%), url('/assets/landing/noir-hero-v3.opt.webp') 49% center / cover; }
.auth-art::before { content: ''; position: absolute; top: 35px; left: 40px; width: 35px; height: 2px; background: var(--accent); }
.auth-art h2 { margin: 16px 0; font-size: 42px; line-height: 1.2; letter-spacing: -.055em; }
.auth-art p { max-width: 340px; color: #d7c7b8; font-size: 13px; }
.auth-form { position: relative; padding: 35px 40px; background: linear-gradient(#211811f7,#17110efa),url('/assets/landing/corporate-paper-grain.svg'); }
.auth-form::before { content: ''; display: block; width: 100%; height: 3px; margin-bottom: 25px; background: linear-gradient(90deg, var(--accent) 40px, #d6b69a24 40px); }
.auth-form h1 { margin: 9px 0 15px; font-size: 29px; }
.auth-form > p { font-size: 12px; }
.auth-form .field { margin: 15px 0; }
.auth-form .button[type=submit] { width: 100%; margin-top: 8px; }
.auth-links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 22px; padding-top: 20px; border-top: 1px solid #d6b69a24; color: #d6b69a; font-size: 11px; }
.error { padding: 12px 14px; margin-bottom: 16px; border-left: 2px solid #c5705b; border-radius: 4px; background: #3a201a; color: #f5bda8; font-size: 12px; }
.notice { margin: 16px 0; padding: 13px 16px; border: 1px solid #78553b; border-left: 3px solid #bc7948; border-radius: 5px; background: #261b12; color: #d9b99a; font-size: 11px; }
.notice a { color: #f5dcc1; text-decoration: underline; }
.player-footer { display: flex; flex-wrap: wrap; gap: 30px; margin-top: 60px; padding: 35px 0 28px; border-top: 1px solid #d6b69a24; color: var(--muted); font-size: 11px; }
.player-footer div { display: flex; flex-wrap: wrap; gap: 17px; }
.player-footer p { flex-basis: 100%; margin: 0; font-size: 10px; }
.loading { padding: 100px 20px; color: var(--muted); text-align: center; }
dialog { width: min(620px, calc(100% - 32px)); max-height: calc(100dvh - 40px); padding: 30px; border: 1px solid #806047; border-radius: 9px; background: linear-gradient(#261c15f7,#17110efa),url('/assets/landing/corporate-paper-grain.svg'); color: var(--text); box-shadow: 0 30px 100px #0009; }
dialog::backdrop { background: #090603d9; backdrop-filter: blur(5px); }
.dialog-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 22px; padding-bottom: 18px; border-bottom: 1px solid #d6b69a32; }
.dialog-heading h2 { margin: 0; font-size: 25px; }
.dialog-close { flex-shrink: 0; width: 34px; height: 34px; padding: 0; border: 1px solid #806047; border-radius: 50%; background: transparent; color: #d7c7b8; font-size: 22px; line-height: 1; }
.dialog-close:hover { background: #3a291c; }
.case-option { display: flex; align-items: center; gap: 13px; margin: 10px 0; padding: 13px; border: 1px solid #584234; border-radius: 5px; background: #100c0a66; cursor: pointer; }
.case-option:has(input:checked) { border-color: #d78c56; background: #51352155; box-shadow: inset 2px 0 #d35c2b; }
.case-option img { width: 70px; height: 50px; object-fit: cover; border-radius: 3px; }
.case-option strong { display: block; font-size: 12px; }
.case-option small { color: var(--muted); font-size: 10px; }
.case-option input { width: 18px; height: 18px; margin-left: auto; flex-shrink: 0; }
.dialog-cover { width: 100%; max-height: 230px; margin-bottom: 20px; border-radius: 5px; object-fit: cover; }
.result-score { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin: 20px 0; color: #edb28c; font-size: 56px; font-weight: 500; letter-spacing: -.05em; line-height: 1.2; }
.result-score-value { white-space: nowrap; }
.result-score-max { font-size: 18px; letter-spacing: normal; white-space: nowrap; }
.orders { padding: 0; list-style: none; }
.orders li { display: flex; justify-content: space-between; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.guide { max-width: 780px; margin: 50px auto; }
.guide li { margin: 22px 0; }
.guide li::marker { color: var(--gold); }
.guide h1 { font-size: 42px; }
.skip { position: absolute; left: -10000px; }
.skip:focus { top: 8px; left: 20px; z-index: 30; padding: 10px; background: var(--panel); }
#toast { position: fixed; z-index: 50; bottom: 25px; left: 50%; display: none; width: max-content; max-width: calc(100% - 32px); padding: 13px 20px; border: 1px solid #a47750; border-radius: 6px; background: #302218; color: #f5dcc1; box-shadow: 0 10px 30px #0006; transform: translateX(-50%); }
#toast.show { display: block; }
.scroll-target { scroll-margin-top: 115px; }
@media (max-width: 1000px) {
  .header-inner { gap: 20px; }
  .header-inner nav { gap: 18px; }
  .stat { padding: 20px; }
  .auth-form { padding: 30px; }
  .auth-art { padding: 30px; }
  .auth-art::before { left: 30px; }
  .history th, .history td { padding-inline: 12px; }
  .history .actions { min-width: 130px; }
}
@media (max-width: 760px) {
  .shell { width: calc(100% - 32px); }
  .header-inner { flex-wrap: wrap; gap: 10px; min-height: 72px; padding: 14px 0 10px; }
  .brand { font-size: 23px; }
  .brand span { font-size: 8px; }
  #account-nav { max-width: 52%; }
  #account-nav .button { min-height: 38px; padding: 8px 12px; font-size: 10px; }
  .header-inner nav { order: 3; justify-content: space-between; width: 100%; margin-top: 4px; padding-top: 11px; border-top: 1px solid #d6b69a24; font-size: 11px; }
  .header-inner nav { flex-wrap: wrap; gap: 10px 16px; }
  .room-recovery { padding: 18px; }
  .room-recovery .actions { flex-direction: column; }
  section { margin: 32px 0; }
  .welcome { margin-top: 24px; padding: 28px 23px 0; }
  .welcome::after { left: 23px; }
  .welcome::before { background: linear-gradient(90deg,#17110eef,#17110ebb),url('/assets/landing/evidence-desk-v2.opt.webp') center / cover; }
  .welcome h1 { margin-top: 17px; font-size: 33px; }
  .welcome > p { margin-bottom: 25px; font-size: 12px; }
  .stats { grid-template-columns: repeat(2, minmax(0,1fr)); margin-inline: -23px; margin-top: 26px; }
  .stat { padding: 17px 22px; }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid #d6b69a24; }
  .stat strong { font-size: 25px; }
  .stat span { font-size: 10px; }
  .quick-grid, .bundle-grid { grid-template-columns: 1fr; gap: 14px; }
  .panel { padding: 24px; }
  .quick-grid .panel { min-height: 205px; }
  .section-heading h2 { font-size: 26px; }
  .section-heading .actions { width: 100%; }
  .section-heading .actions .button { flex: 1; }
  .tabs { width: 100%; }
  .tabs button { flex: 1; padding: 9px; font-size: 11px; }
  .filters select { min-width: 0; flex: 1; font-size: 11px; }
  .history, .history tbody, .history tr, .history td { display: block; }
  .history thead { display: none; }
  .table-wrap { overflow: visible; border: 0; background: transparent; }
  .history { background: transparent; }
  .history tr { margin-bottom: 12px; padding: 19px; border: 1px solid var(--line); border-radius: 6px; background: #1a1411; }
  .history td { display: flex; justify-content: space-between; gap: 15px; padding: 6px 0; border: 0; font-size: 12px; }
  .history td::before { content: attr(data-label); color: var(--muted); font-size: 11px; }
  .history td:first-child { display: block; margin-bottom: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
  .history td:first-child::before, .history td:last-child::before { display: none; }
  .history td:last-child { margin-top: 12px; }
  .history .actions { width: 100%; }
  .history .actions .button { flex: 1; min-height: 40px; font-size: 11px; }
  .case-grid { grid-template-columns: 1fr; gap: 18px; }
  .case-body { padding: 20px 8px 8px; }
  .case-body h3 { font-size: 23px; }
  .case-body p { font-size: 13px; }
  .auth-layout { display: block; margin: 24px auto 35px; }
  .auth-art { min-height: 210px; padding: 24px; background-position: 50% 40%; }
  .auth-art::before { top: 24px; left: 24px; }
  .auth-art h2 { margin-bottom: 0; font-size: 30px; }
  .auth-art p { display: none; }
  .auth-form { padding: 25px 23px; }
  .auth-form h1 { font-size: 27px; }
  .player-footer { margin-top: 40px; gap: 22px; }
  .player-footer > div { width: 100%; }
  .player-footer a { padding: 5px 0; }
  dialog { padding: 23px; }
  .dialog-heading h2 { font-size: 23px; }
  .case-option { gap: 10px; padding: 11px; }
  .case-option img { width: 50px; height: 45px; }
  .case-option strong { font-size: 11px; }
  .case-option small { font-size: 10px; }
  .orders li { font-size: 12px; }
  .guide h1 { font-size: 33px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }

.welcome.catalog-welcome { padding-bottom: 28px; }
.welcome.catalog-welcome h1 { max-width: 780px; margin-bottom: 0; font-size: clamp(24px, 3vw, 36px); line-height: 1.35; }
.welcome.catalog-welcome > .button { margin-top: 24px; margin-bottom: 0; }
.attempts-remaining { color: var(--muted); font-size: 13px; font-weight: 500; line-height: 1.5; }
