:root {
  color-scheme: dark;
  --ink: #f2f6f5;
  --muted: #a9b8b4;
  --panel: rgba(16, 29, 28, 0.86);
  --line: rgba(166, 232, 213, 0.17);
  --accent: #58e2b2;
  --accent-dark: #0f3128;
  --danger: #ff8b7e;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; color: var(--ink); background: radial-gradient(circle at 80% 0, #193c38 0, transparent 35%), #071110; }
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; opacity: .07; background-image: linear-gradient(var(--accent) 1px, transparent 1px), linear-gradient(90deg, var(--accent) 1px, transparent 1px); background-size: 42px 42px; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.topbar { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; max-width: 1100px; margin: auto; padding: 24px; }
.topbar-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.brand { display: inline-flex; align-items: center; flex: 0 1 auto; text-decoration: none; }
.brand img { display: block; width: clamp(230px, 30vw, 320px); height: auto; }
.version-badge { color: var(--muted); font-size: .68rem; font-variant-numeric: tabular-nums; letter-spacing: .04em; opacity: .72; white-space: nowrap; }
.shell { position: relative; z-index: 1; width: min(920px, calc(100% - 32px)); margin: 7vh auto 64px; }
.eyebrow { color: var(--accent); text-transform: uppercase; letter-spacing: .18em; font-size: .76rem; font-weight: 800; }
h1 { max-width: 760px; margin: 12px 0 18px; font-size: clamp(2.5rem, 8vw, 5.5rem); line-height: .98; letter-spacing: -.055em; }
h2 { font-size: clamp(1.75rem, 4vw, 3rem); margin: 8px 0 14px; }
.event-title { max-width: 720px; margin-top: 10px; font-size: clamp(1.55rem, 3vw, 2.25rem); line-height: 1.12; letter-spacing: -.025em; }
p { color: var(--muted); line-height: 1.65; }
.lede { max-width: 690px; font-size: 1.1rem; }
.panel { margin-top: 32px; padding: clamp(22px, 5vw, 42px); border: 1px solid var(--line); border-radius: 22px; background: var(--panel); box-shadow: 0 24px 90px rgba(0,0,0,.35); backdrop-filter: blur(14px); }
.setup { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 26px; }
label { display: grid; gap: 8px; color: var(--muted); font-size: .9rem; font-weight: 700; }
input, select { width: 100%; padding: 14px 16px; color: var(--ink); border: 1px solid var(--line); border-radius: 10px; background: #091817; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 11px 18px; border: 1px solid transparent; border-radius: 10px; color: #06110e; background: var(--accent); font-weight: 850; }
.button:hover { filter: brightness(1.08); transform: translateY(-1px); }
.button--ghost { color: var(--ink); border-color: var(--line); background: rgba(255,255,255,.04); }
.inventory-button--new { color: #06110e; border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 3px rgba(88,226,178,.14), 0 0 24px rgba(88,226,178,.2); animation: inventory-pulse 1.8s ease-in-out infinite; }
.inventory-new-indicator { padding: 3px 7px; border-radius: 999px; color: var(--accent); background: #06110e; font-size: .64rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.setup + .button { margin-top: 18px; }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 18px; }
.metric { padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: rgba(0,0,0,.18); }
.metric__label { display: block; color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; }
.metric__value { display: block; margin-top: 4px; font-size: 1.15rem; }
.event-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: .8rem; }
.choices { display: grid; gap: 11px; margin-top: 26px; }
.choice { padding: 16px 18px; text-align: left; color: var(--ink); border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.035); }
.choice:hover { border-color: var(--accent); background: var(--accent-dark); }
.helplines { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.history { display: grid; gap: 12px; padding: 0; list-style: none; }
.history li { padding: 14px; border: 1px solid var(--line); border-radius: 10px; }
.history strong { display: block; margin-bottom: 5px; }
dialog { width: min(600px, calc(100% - 32px)); color: var(--ink); border: 1px solid var(--line); border-radius: 18px; background: #0c1c1a; box-shadow: 0 30px 100px #000; }
dialog::backdrop { background: rgba(0,0,0,.72); backdrop-filter: blur(4px); }
.modal-close { float: right; color: var(--muted); border: 0; background: transparent; font-size: 2rem; }
.confirmation-selection { margin: 22px 0; padding: 16px 18px; color: var(--ink); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 10px; background: rgba(88,226,178,.07); }
.feedback-dialog__choice { margin: 22px 0 12px; color: var(--ink); }
.feedback-dialog__choice span, .logbook-list__feedback span { display: block; margin-bottom: 5px; color: var(--muted); font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.feedback-dialog__text { margin: 0; padding: 18px; color: var(--ink); border: 1px solid rgba(88,226,178,.3); border-left: 3px solid var(--accent); border-radius: 10px; background: rgba(88,226,178,.07); }
.modal-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.inventory-list { display: grid; gap: 10px; padding: 0; list-style: none; }
.inventory-list li { border-radius: 9px; }
.inventory-list__item--new { box-shadow: 0 0 0 2px rgba(88,226,178,.58); }
.inventory-list button { width: 100%; padding: 14px; text-align: left; color: var(--ink); border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.03); }
.inventory-list__item--new button { border-color: rgba(88,226,178,.45); background: rgba(88,226,178,.08); }
.inventory-list__heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.inventory-list__new-badge { flex: 0 0 auto; padding: 3px 7px; border-radius: 999px; color: #06110e; background: var(--accent); font-size: .64rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.inventory-item-content { margin-top: 20px; }
.inventory-content { display: grid; gap: 16px; }
.inventory-content > p { margin: 0; }
.inventory-video { display: block; width: 100%; max-height: min(52vh, 420px); border: 1px solid var(--line); border-radius: 12px; background: #030807; box-shadow: 0 16px 44px rgba(0,0,0,.35); }
.inventory-content__caption { display: block; margin-top: -7px; color: var(--muted); line-height: 1.5; }
.inventory-content__link { justify-self: start; text-decoration: none; }
.arda-logo-card { display: grid; place-items: center; min-height: 210px; padding: 32px; overflow: hidden; border: 1px solid rgba(88,226,178,.34); border-radius: 16px; background: radial-gradient(circle at 78% 12%, rgba(88,226,178,.25), transparent 30%), linear-gradient(145deg, #102d29, #07110f); box-shadow: inset 0 1px rgba(255,255,255,.05), 0 18px 50px rgba(0,0,0,.3); }
.arda-logo-card__wordmark { color: var(--ink); font-size: clamp(3rem, 12vw, 5.5rem); font-weight: 950; line-height: .9; letter-spacing: .14em; text-indent: .14em; }
.arda-logo-card__wordmark::after { content: ""; display: block; width: 54%; height: 5px; margin: 15px auto 0; border-radius: 999px; background: var(--accent); box-shadow: 0 0 20px rgba(88,226,178,.5); }
.arda-logo-card__tagline { margin-top: 18px; color: var(--accent); font-size: .72rem; font-weight: 800; letter-spacing: .18em; text-align: center; text-transform: uppercase; }
.new-item-callout { display: grid; gap: 6px; margin-top: 18px; padding: 14px 16px; border: 1px solid rgba(88,226,178,.35); border-radius: 10px; background: rgba(88,226,178,.08); }
.new-item-callout span { color: var(--muted); font-size: .7rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.logbook-list { display: grid; gap: 14px; margin: 24px 0 0; padding: 0; list-style: none; }
.logbook-list > li { padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.025); }
.logbook-list__event, .logbook-list__choice span, .logbook-list__effects > span, .logbook-list__items > span { display: block; margin-bottom: 5px; color: var(--muted); font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.logbook-list__choice { margin: 14px 0; color: var(--ink); }
.logbook-list__feedback { margin: -4px 0 18px; padding: 12px 14px; color: var(--ink); border-left: 3px solid var(--accent); border-radius: 8px; background: rgba(88,226,178,.07); }
.logbook-list__effects ul { display: grid; gap: 7px; margin: 8px 0 0; padding: 0; list-style: none; }
.logbook-list__effects li { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.logbook-list__effects strong { white-space: nowrap; color: var(--accent); }
.logbook-list__effects small { color: var(--muted); font-weight: 600; }
.logbook-list__items { margin-top: 16px; }
.logbook-list__items ul { display: grid; gap: 5px; margin: 8px 0 0; padding: 0; color: var(--accent); list-style: none; }
.scoreboard { width: 100%; border-collapse: collapse; }
.scoreboard th, .scoreboard td { padding: 10px; text-align: left; border-bottom: 1px solid var(--line); }
.toast-container { position: fixed; z-index: 10; right: 24px; bottom: 24px; width: min(360px, calc(100% - 32px)); pointer-events: none; }
.metric-toast { padding: 18px; border: 1px solid rgba(88,226,178,.38); border-radius: 14px; color: var(--ink); background: rgba(12,28,26,.96); box-shadow: 0 18px 60px rgba(0,0,0,.55); backdrop-filter: blur(16px); animation: toast-in .28s ease-out both; }
.metric-toast--leaving { animation: toast-out .22s ease-in both; }
.metric-toast__title { display: block; margin-bottom: 11px; color: var(--muted); font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.metric-toast__inventory { margin-top: 13px; padding-top: 12px; border-top: 1px solid var(--line); }
.metric-toast__section-title { display: block; margin-bottom: 8px; color: var(--accent); font-size: .7rem; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.metric-toast__inventory li { justify-content: flex-start; }
.metric-toast__inventory li span { color: var(--accent); font-size: .72rem; }
.metric-toast__inventory strong { white-space: normal; }
.metric-toast ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.metric-toast li { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; }
.metric-toast strong { white-space: nowrap; font-size: 1.05rem; }
@keyframes toast-in { from { opacity: 0; transform: translateY(14px) scale(.98); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px) scale(.98); } }
@keyframes inventory-pulse { 50% { box-shadow: 0 0 0 5px rgba(88,226,178,.08), 0 0 30px rgba(88,226,178,.28); } }
@media (max-width: 650px) { .topbar { align-items: flex-start; flex-wrap: wrap; padding: 16px; } .brand img { width: min(160px, 43vw); } .topbar-actions { flex-wrap: nowrap; } .topbar-actions .button { min-height: 40px; padding: 8px 11px; font-size: .82rem; } .setup { grid-template-columns: 1fr; } .metrics { grid-template-columns: 1fr 1fr; } .shell { margin-top: 3vh; } .toast-container { right: 16px; bottom: 16px; } }
@media (prefers-reduced-motion: reduce) { .metric-toast, .metric-toast--leaving, .inventory-button--new { animation-duration: .01ms; animation-iteration-count: 1; } }
