:root {
  color-scheme: dark;
  --ink: #f4efe4;
  --muted: #a39886;
  --line: rgba(232, 197, 122, 0.28);
  --gold: #e8c57a;
  --gold-2: #8a6a32;
  --bg: #090a0c;
  --panel: #121418;
  --up: #7dcea0;
  --down: #e07a72;
  --flat: #a39886;
  font-family: "Segoe UI", "Avenir Next", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--ink); }
body {
  background-image:
    radial-gradient(circle at 12% -10%, rgba(232, 197, 122, 0.16), transparent 34%),
    linear-gradient(180deg, #101216, #090a0c 28%);
}
a { color: inherit; }
button, input { font: inherit; color: inherit; }
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; letter-spacing: 0.16em; font-size: 12px; }
.mark {
  width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid var(--gold);
  background: radial-gradient(circle at 35% 30%, #f4efe4, var(--gold) 42%, #1a140c 43%);
}
nav { display: flex; gap: 14px; font-size: 13px; }
nav a { text-decoration: none; color: var(--muted); }
nav a[aria-current="page"] { color: var(--gold); }
.signout { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 0; }
.wrap { width: min(1080px, calc(100% - 32px)); margin: 28px auto 64px; }
h1 { font-weight: 500; letter-spacing: -0.03em; font-size: 34px; margin: 0 0 8px; }
.lede { color: var(--muted); margin: 0 0 22px; max-width: 62ch; }
.lamps, .plates, .facts { display: grid; gap: 12px; }
.lamps { grid-template-columns: repeat(4, 1fr); margin-bottom: 18px; }
.plates { grid-template-columns: repeat(4, 1fr); margin: 18px 0; }
.lamp, .plate, .sheet, .print {
  background: rgba(18, 20, 24, 0.92);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.lamp, .plate { padding: 16px; }
.lamp b, .plate b { display: block; font-weight: 500; }
.lamp span, .plate span, .quiet { color: var(--muted); font-size: 13px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 8px; background: var(--flat); }
.dot.on { background: var(--up); }
.dot.off { background: var(--down); }
.plate { text-decoration: none; min-height: 140px; display: flex; flex-direction: column; justify-content: space-between; }
.plate:hover { border-color: var(--gold); }
.facts { grid-template-columns: 1fr 1fr; }
.sheet { padding: 18px 18px 8px; }
.sheet h2 { margin: 0 0 12px; font-size: 15px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); }
.row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid rgba(232, 197, 122, 0.12); font-size: 14px; }
.row span { color: var(--muted); }
.tail { margin-top: 18px; }
.logline, .trade {
  font-family: Consolas, "Cascadia Mono", monospace;
  font-size: 12px;
  padding: 7px 0;
  border-top: 1px solid rgba(232, 197, 122, 0.1);
  color: #d9d0c2;
}
.login-body { min-height: 100vh; display: grid; place-items: center; }
.login-card {
  width: min(420px, calc(100% - 32px));
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(12, 13, 16, 0.94);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}
.login-card h1 { font-size: 28px; }
label { display: block; margin: 14px 0 6px; color: var(--muted); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
input[type="text"], input[type="password"], input[type="search"] {
  width: 100%;
  background: #0c0d10;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
}
input:focus { border-color: var(--gold); }
.enter, .watch {
  margin-top: 18px;
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 12px 16px;
  background: linear-gradient(180deg, #f0d7a2, var(--gold) 40%, #b8924a);
  color: #1a140c;
  cursor: pointer;
}
.watch { width: auto; margin: 0; }
.err { min-height: 1.2em; color: var(--down); font-size: 13px; }
.err.ok { color: var(--gold); }
.account-card { width: min(460px, 100%); margin-top: 8px; }
.finder { display: flex; gap: 10px; align-items: end; margin-bottom: 16px; }
.finder label { flex: 1; }
.stage {
  position: relative;
  height: 220px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(232, 197, 122, 0.05), transparent 40%),
    #0c0d10;
  cursor: pointer;
  overflow: hidden;
}
.stage canvas, .overlay canvas { width: 100%; height: 100%; display: block; }
.stage .hint {
  position: absolute; inset: auto 16px 16px 16px;
  color: var(--muted); font-size: 13px;
}
.price { font-size: 28px; letter-spacing: -0.03em; }
.price.up { color: var(--up); }
.price.down { color: var(--down); }
.price.flat { color: var(--flat); }
.overlay {
  position: fixed; inset: 0;
  background: rgba(5, 6, 8, 0.82);
  display: none;
  padding: 24px;
}
.overlay.open { display: grid; }
.overlay .frame {
  width: min(1100px, 100%);
  margin: auto;
  height: min(78vh, 760px);
  background: #0c0d10;
  border: 1px solid var(--gold);
  border-radius: 20px;
  padding: 16px;
  display: grid;
  grid-template-rows: auto 1fr auto;
}
.overlay header { display: flex; justify-content: space-between; align-items: center; }
.close-chart { background: none; border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; cursor: pointer; }
.prints { max-height: 160px; overflow: auto; }
.note { color: var(--muted); font-size: 13px; }
.filter { max-width: 280px; }
@media (max-width: 800px) {
  .lamps, .plates, .facts { grid-template-columns: 1fr; }
  .top { align-items: flex-start; flex-direction: column; }
  h1 { font-size: 28px; }
}
