:root {
  color-scheme: light dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --bg: #f5f6fa; --surface: #fff; --text: #171b2c; --muted: #61677a;
  --line: #dfe2ea; --accent: #5b4bd6; --accent-strong: #4938c2;
  --good: #137a4a; --warn: #9a5b00; --bad: #b3261e; --shadow: 0 8px 24px rgb(20 25 45 / 8%);
}
@media (prefers-color-scheme: dark) { :root { --bg: #151722; --surface: #202331; --text: #f3f4f8; --muted: #b5b9c8; --line: #373b4d; --accent: #9d91ff; --accent-strong: #b5adff; --shadow: none; } }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); }
button, input, a { font: inherit; }
.launcher { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.launcher-card { max-width: 520px; padding: 28px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); }
.panel { display: grid; gap: 12px; padding: 14px; max-width: 620px; margin: 0 auto; }
.panel-header { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 2px; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); }
h1, h2, p { margin-top: 0; } h1 { margin-bottom: 0; font-size: 1.25rem; line-height: 1.25; } h2 { margin-bottom: 0; font-size: .98rem; }
.eyebrow { margin: 0 0 2px; color: var(--muted); font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.card { padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); }
.section-heading, .inventory-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.badge { display: inline-flex; align-items: center; min-height: 24px; padding: 3px 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: .74rem; font-weight: 700; white-space: nowrap; }
.badge[data-tone="good"] { color: var(--good); border-color: color-mix(in srgb, var(--good) 35%, var(--line)); }
.badge[data-tone="warn"] { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 35%, var(--line)); }
.badge[data-tone="bad"] { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 35%, var(--line)); }
.metric-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; }
.metric-grid div { padding: 9px; border-radius: 10px; background: var(--bg); } dt { color: var(--muted); font-size: .72rem; } dd { margin: 3px 0 0; font-weight: 700; overflow-wrap: anywhere; }
.findings, .compact-list, .item-list, .chip-list { margin: 10px 0 0; padding-left: 20px; }
.item-list { display: grid; gap: 7px; list-style: none; padding-left: 0; }
.item-list li { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 7px; }
.chip-list { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; list-style: none; }
.chip-list li { padding: 4px 8px; border-radius: 999px; background: var(--bg); color: var(--muted); font-size: .76rem; }
.muted { color: var(--muted); } .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }
.button-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.button { min-height: 38px; padding: 8px 12px; border: 1px solid var(--accent); border-radius: 9px; background: var(--accent); color: #fff; font-weight: 700; cursor: pointer; text-decoration: none; }
.button:hover:not(:disabled) { background: var(--accent-strong); } .button.secondary { background: transparent; color: var(--accent); } .button.danger { background: var(--bad); border-color: var(--bad); }
.button:disabled { opacity: .45; cursor: not-allowed; }
.field-label { display: block; margin-bottom: 5px; color: var(--muted); font-size: .78rem; font-weight: 700; }
.input { width: 100%; min-height: 38px; border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; background: var(--bg); color: var(--text); }
.frame-title { min-height: 1.4em; margin: 10px 0 0; font-weight: 700; }
.write-card { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.write-preview { margin-top: 10px; padding: 10px; border-left: 3px solid var(--accent); background: var(--bg); border-radius: 6px; }
.write-preview p { margin: 5px 0 0; color: var(--muted); }
.confirm-row { display: flex; align-items: flex-start; gap: 8px; margin-top: 12px; font-size: .84rem; }
.confirm-row input { margin-top: 2px; }
.receipt { margin: 10px 0 0; padding: 8px 10px; border-radius: 8px; background: var(--bg); }
.receipt[data-tone="good"] { color: var(--good); }
.error { position: sticky; bottom: 8px; margin: 0; padding: 10px; border-radius: 9px; background: var(--bad); color: white; font-weight: 700; }
@media (max-width: 420px) { .metric-grid { grid-template-columns: 1fr; } .panel { padding: 10px; } }
@media (forced-colors: active) { .card, .button, .input, .badge { border: 1px solid ButtonText; } .button { forced-color-adjust: none; } }
