:root {
  --bg: #04090a;
  --bg-deep: #020506;
  --panel: rgba(10, 24, 26, 0.42);
  --panel-solid: #071316;
  --line: rgba(94, 234, 212, 0.09);
  --line-mid: rgba(94, 234, 212, 0.16);
  --line-strong: rgba(94, 234, 212, 0.28);

  --text: #cfe9e5;
  --text-bright: #eafffb;
  --muted: #4e716e;
  --muted-bright: #6e9995;

  --accent: #5eead4;
  --accent-deep: #2dd4bf;
  --accent-glow: rgba(94, 234, 212, 0.18);

  --good: #5eead4;
  --warn: #e3b866;
  --bad: #e8736a;

  --font-mono: 'JetBrains Mono', 'Cascadia Mono', Consolas, 'Courier New', monospace;
  --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;

  --radius: 4px;
}

* { box-sizing: border-box; }

html { background: var(--bg-deep); }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
}

/* Teal wash from the top, echoing the glow behind the avatar on the site. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 1100px 620px at 50% -10%, rgba(94, 234, 212, 0.075), transparent 68%),
    radial-gradient(ellipse 700px 400px at 12% 108%, rgba(45, 212, 191, 0.045), transparent 70%);
}

.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 11px; }
.warn { color: var(--warn); }
.error { color: var(--bad); font-size: 11px; margin-top: 14px; }

/* ---------- drifting shards ---------- */
.particles { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.particles span {
  position: absolute;
  width: 9px; height: 9px;
  background: rgba(94, 234, 212, 0.05);
  border: 1px solid rgba(94, 234, 212, 0.07);
  transform: rotate(45deg);
  animation: drift linear infinite;
}
@keyframes drift {
  0%   { transform: translateY(14vh) rotate(45deg); opacity: 0; }
  12%  { opacity: 1; }
  88%  { opacity: 1; }
  100% { transform: translateY(-108vh) rotate(225deg); opacity: 0; }
}
.particles span:nth-child(1)  { left: 4%;  top: 96%; animation-duration: 46s; animation-delay: -2s;  }
.particles span:nth-child(2)  { left: 11%; top: 96%; animation-duration: 62s; animation-delay: -14s; width: 6px; height: 6px; }
.particles span:nth-child(3)  { left: 18%; top: 96%; animation-duration: 38s; animation-delay: -25s; }
.particles span:nth-child(4)  { left: 25%; top: 96%; animation-duration: 71s; animation-delay: -8s;  width: 12px; height: 12px; }
.particles span:nth-child(5)  { left: 32%; top: 96%; animation-duration: 52s; animation-delay: -33s; }
.particles span:nth-child(6)  { left: 39%; top: 96%; animation-duration: 44s; animation-delay: -19s; width: 6px; height: 6px; }
.particles span:nth-child(7)  { left: 46%; top: 96%; animation-duration: 67s; animation-delay: -41s; }
.particles span:nth-child(8)  { left: 53%; top: 96%; animation-duration: 41s; animation-delay: -6s;  width: 11px; height: 11px; }
.particles span:nth-child(9)  { left: 60%; top: 96%; animation-duration: 58s; animation-delay: -28s; }
.particles span:nth-child(10) { left: 67%; top: 96%; animation-duration: 49s; animation-delay: -12s; width: 7px; height: 7px; }
.particles span:nth-child(11) { left: 74%; top: 96%; animation-duration: 64s; animation-delay: -37s; }
.particles span:nth-child(12) { left: 81%; top: 96%; animation-duration: 43s; animation-delay: -22s; width: 10px; height: 10px; }
.particles span:nth-child(13) { left: 88%; top: 96%; animation-duration: 56s; animation-delay: -4s;  }
.particles span:nth-child(14) { left: 95%; top: 96%; animation-duration: 69s; animation-delay: -47s; width: 6px; height: 6px; }
.particles span:nth-child(15) { left: 8%;  top: 96%; animation-duration: 74s; animation-delay: -52s; }
.particles span:nth-child(16) { left: 29%; top: 96%; animation-duration: 60s; animation-delay: -16s; width: 8px; height: 8px; }
.particles span:nth-child(17) { left: 57%; top: 96%; animation-duration: 47s; animation-delay: -44s; }
.particles span:nth-child(18) { left: 84%; top: 96%; animation-duration: 66s; animation-delay: -30s; width: 7px; height: 7px; }

@media (prefers-reduced-motion: reduce) {
  .particles { display: none; }
}

/* ---------- top bar ---------- */
.topbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 32px;
  flex-wrap: wrap;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-size: 10px; font-weight: 500;
  letter-spacing: 0.34em;
  color: var(--muted-bright);
  text-transform: uppercase;
}
.dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 9px var(--accent);
  animation: pulse 2.8s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }
.topbar-right { display: flex; align-items: center; gap: 10px; }

.pill {
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 6px 13px;
  border-radius: 999px;
  background: rgba(94, 234, 212, 0.04);
  border: 1px solid var(--line);
  color: var(--muted-bright);
  white-space: nowrap;
}
.pill-good { color: var(--accent); border-color: var(--line-strong); background: rgba(94,234,212,.07); }
.pill-warn { color: var(--warn); border-color: rgba(227,184,102,.3); background: rgba(227,184,102,.06); }
.pill-bad  { color: var(--bad);  border-color: rgba(232,115,106,.3); background: rgba(232,115,106,.06); }

/* ---------- layout ---------- */
#app {
  position: relative;
  z-index: 1;
  max-width: 1000px;
  margin: 0 auto;
  padding: 8px 32px 80px;
}

/* Hairline rule with a centred label — the site's section marker. */
.divider {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 54px 0 22px;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-mid), transparent);
}
.divider span {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.panel {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  backdrop-filter: blur(2px);
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 18px;
}
.panel-title {
  font-size: 9px; letter-spacing: 0.28em; text-transform: uppercase; color: var(--muted);
}
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 18px; }

.lede { margin: 0 0 4px; color: var(--muted-bright); font-size: 12px; line-height: 1.75; }

/* Corner brackets, as around the avatar on the site. */
.bracket { position: absolute; width: 13px; height: 13px; pointer-events: none; }
.bracket-tl { top: -1px; left: -1px; border-top: 1px solid var(--line-strong); border-left: 1px solid var(--line-strong); }
.bracket-br { bottom: -1px; right: -1px; border-bottom: 1px solid var(--line-strong); border-right: 1px solid var(--line-strong); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  text-align: center;
  padding: 34px 24px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(ellipse 520px 190px at 50% 0%, rgba(94,234,212,.055), transparent 70%),
    var(--panel);
}
.hero-figure { display: flex; align-items: baseline; justify-content: center; gap: 12px; }
.hero-number {
  font-family: var(--font-display);
  font-size: 82px;
  font-weight: 600;
  line-height: 1;
  color: var(--text-bright);
  letter-spacing: -0.01em;
  text-shadow: 0 0 44px rgba(94, 234, 212, 0.28);
  font-variant-numeric: tabular-nums;
}
.hero-unit {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 28px;
  color: var(--accent);
}
.hero-meta {
  display: flex; align-items: center; justify-content: center;
  gap: 18px; flex-wrap: wrap; margin: 18px 0 26px;
}
.tier-badge {
  font-size: 9px; letter-spacing: 0.22em; text-transform: uppercase;
  padding: 6px 14px; border-radius: 999px;
  background: rgba(94, 234, 212, 0.07);
  border: 1px solid var(--line-strong);
  color: var(--accent);
}
.tier-badge.overload {
  background: rgba(232,115,106,.08); border-color: rgba(232,115,106,.35); color: var(--bad);
}
.hero-reset { font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.hero-reset strong { color: var(--accent); font-weight: 500; font-variant-numeric: tabular-nums; }
.hero-reset em { display: block; font-style: normal; margin-top: 3px; letter-spacing: 0.14em; }

/* segmented weekly bar */
.segbar { display: flex; gap: 3px; height: 6px; margin-bottom: 7px; }
.seg { position: relative; background: rgba(94,234,212,.05); border-radius: 1px; overflow: hidden; }
.seg-fill { position: absolute; inset: 0 auto 0 0; transition: width .55s cubic-bezier(.4,0,.2,1); }
.seg-4 .seg-fill { background: linear-gradient(90deg, var(--accent-deep), var(--accent)); box-shadow: 0 0 12px var(--accent-glow); }
.seg-2 .seg-fill { background: linear-gradient(90deg, #24a89b, var(--accent-deep)); }
.seg-1 .seg-fill { background: linear-gradient(90deg, #1a6f70, #24a89b); }
.segbar-legend { display: flex; gap: 3px; font-size: 8px; letter-spacing: .18em; color: var(--muted); }
.segbar-legend > div { text-align: center; }

/* ---------- stat tiles ---------- */
.stat-row { display: grid; gap: 10px; margin-top: 10px; }
.stat-row-2 { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.stat-row-4 { grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); }
.stat-row-5 { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }

.stat {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 18px 12px;
  text-align: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .25s, background .25s;
}
.stat:hover { border-color: var(--line-mid); background: rgba(10,24,26,.6); }
.stat-value {
  font-size: 19px; font-weight: 400; color: var(--accent);
  font-variant-numeric: tabular-nums; letter-spacing: -0.01em; line-height: 1.15;
}
.stat-label {
  font-size: 8px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); line-height: 1.5;
}
.stat-key { border-color: var(--line-mid); background: rgba(94,234,212,.045); }
.stat-key .stat-value { font-size: 24px; color: var(--accent); text-shadow: 0 0 24px var(--accent-glow); }

/* ---------- notes ---------- */
.note {
  margin: 14px 0 0;
  padding: 12px 15px;
  border-radius: var(--radius);
  border: 1px solid rgba(227,184,102,.22);
  background: rgba(227,184,102,.05);
  color: var(--warn);
  font-size: 11px;
  line-height: 1.65;
}

/* ---------- declare weekly total ---------- */
.declare {
  margin-top: 14px; padding: 18px 20px; border-radius: var(--radius);
  background: rgba(227,184,102,.045); border: 1px solid rgba(227,184,102,.2);
  display: flex; gap: 26px; align-items: flex-start; flex-wrap: wrap;
}
.declare-set { background: rgba(94,234,212,.045); border-color: var(--line-mid); }
.declare-copy { flex: 1 1 280px; display: flex; flex-direction: column; gap: 5px; }
.declare-copy strong { font-size: 11px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--text); }
.declare-copy .small { color: var(--muted-bright); line-height: 1.65; }
.declare-form .row { margin-top: 0; }
.declare-form input { width: 120px; }

/* ---------- weekly mission ---------- */
.mission-picker { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.mission-type {
  cursor: pointer; font: inherit; text-align: left;
  display: flex; flex-direction: column; gap: 3px;
  padding: 10px 16px; border-radius: var(--radius);
  background: transparent; border: 1px solid var(--line); color: var(--muted-bright);
  font-size: 11px; transition: all .25s;
}
.mission-type:hover { border-color: var(--line-mid); color: var(--text); }
.mission-type-active {
  border-color: var(--line-strong); color: var(--text-bright); background: rgba(94,234,212,.06);
}
.mission-type .small { font-size: 9px; letter-spacing: .14em; }

.mission-card {
  position: relative;
  background: rgba(3, 10, 11, 0.5);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.mission-card-head { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 16px; }
.mission-title { font-size: 11px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--text-bright); }
.mission-on { font-size: 9px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.mission-label {
  background: transparent; border: none; border-bottom: 1px dashed var(--line-mid);
  color: var(--accent); font-family: var(--font-mono); font-size: 11px; font-weight: 500;
  letter-spacing: .2em; text-transform: uppercase;
  padding: 2px 4px; border-radius: 0; max-width: 190px;
}
.mission-label:focus { border-bottom-color: var(--accent); outline: none; }
.mission-label::placeholder { color: var(--muted); letter-spacing: .1em; text-transform: none; }

.mission-track { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mtrack-seg {
  flex: 1 1 30px; min-width: 30px; height: 7px; border-radius: 1px;
  background: rgba(94,234,212,.05); border: 1px solid var(--line); transition: all .35s;
}
.mtrack-seg-done {
  background: linear-gradient(90deg, var(--accent-deep), var(--accent));
  border-color: transparent; box-shadow: 0 0 11px var(--accent-glow);
}
.mtrack-node {
  cursor: pointer; font: inherit; font-size: 10px; font-weight: 500; letter-spacing: .08em;
  min-width: 32px; padding: 5px 9px; border-radius: var(--radius);
  background: transparent; border: 1px solid var(--line); color: var(--muted);
  transition: all .25s;
}
.mtrack-node:hover { border-color: var(--line-strong); color: var(--text); }
.mtrack-node-done { background: rgba(94,234,212,.08); border-color: var(--line-strong); color: var(--accent); }
.mtrack-xp {
  margin-left: 5px; padding: 6px 13px; border-radius: var(--radius);
  font-size: 9px; font-weight: 500; letter-spacing: .16em; white-space: nowrap;
  background: transparent; border: 1px solid var(--line); color: var(--muted);
}
.mtrack-xp-done { background: rgba(94,234,212,.08); border-color: var(--line-strong); color: var(--accent); }
.mission-hint { margin: 14px 0 0; line-height: 1.7; }

/* ---------- goal ---------- */
.medal-picker { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-bottom: 22px; }
.medal-opt {
  cursor: pointer;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: var(--radius);
  padding: 14px 4px 11px;
  text-align: center;
  transition: all .25s;
}
.medal-opt:hover { border-color: var(--line-mid); transform: translateY(-2px); }
.medal-opt.selected { border-color: currentColor; background: rgba(94,234,212,.04); }

/* Real medal art, dimmed until chosen. Falls back to a colour disc offline. */
.medal-art { position: relative; display: block; margin: 0 auto 9px; }
.medal-art img {
  width: 100%; height: 100%; object-fit: contain; display: block;
  opacity: .45; filter: grayscale(.65) brightness(.8);
  transition: opacity .3s, filter .3s;
}
.medal-art .medal-dot { display: none; position: absolute; inset: 22%; border-radius: 50%; opacity: .55; }
.medal-art.no-image img { display: none; }
.medal-art.no-image .medal-dot { display: block; }

.medal-opt:hover .medal-art img { opacity: .8; filter: grayscale(.25) brightness(.95); }
.medal-opt.selected .medal-art img {
  opacity: 1; filter: drop-shadow(0 0 9px currentColor);
}
.medal-opt.selected .medal-art .medal-dot { opacity: 1; box-shadow: 0 0 14px currentColor; }

.medal-name {
  font-size: 8px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); display: block;
}
.medal-opt.selected .medal-name { color: var(--text-bright); }

.goal-bar-wrap { margin-bottom: 18px; }
.goal-bar { height: 6px; background: rgba(94,234,212,.05); border-radius: 1px; overflow: hidden; }
.goal-fill { height: 100%; transition: width .55s cubic-bezier(.4,0,.2,1), background .3s; opacity: .85; }
.goal-bar-labels {
  display: flex; justify-content: space-between; font-size: 10px;
  letter-spacing: .1em; margin-top: 9px; font-variant-numeric: tabular-nums;
}

.verdict {
  font-size: 11px; line-height: 1.7; padding: 13px 16px;
  border-radius: var(--radius); border: 1px solid var(--line); background: rgba(94,234,212,.02);
  color: var(--muted-bright);
}
.verdict-good { color: var(--accent); border-color: var(--line-strong); background: rgba(94,234,212,.05); }
.verdict-warn { color: var(--warn); border-color: rgba(227,184,102,.25); background: rgba(227,184,102,.05); }
.verdict-bad  { color: var(--bad);  border-color: rgba(232,115,106,.25); background: rgba(232,115,106,.05); }

/* ---------- projection ---------- */
.projection { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.medal-chip {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 18px 6px 8px; border-radius: 999px;
  background: rgba(94,234,212,.04); border: 1px solid var(--line-mid);
  font-size: 11px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase;
}
.medal-chip .medal-art { margin: 0; flex: none; }
.medal-chip .medal-art img { opacity: 1; filter: drop-shadow(0 0 7px currentColor); }
.medal-chip .medal-art .medal-dot { opacity: 1; box-shadow: 0 0 10px currentColor; }
.projection-text { display: flex; flex-direction: column; gap: 2px; }
.projection-text .small { font-size: 8px; letter-spacing: .22em; }
.proj-xp {
  font-family: var(--font-display); font-size: 26px; font-weight: 600;
  color: var(--text-bright); font-variant-numeric: tabular-nums; line-height: 1.2;
}

/* ---------- rank ---------- */
.rank-row { display: flex; align-items: center; gap: 18px; margin-bottom: 24px; }
.rank-badge {
  position: relative;
  width: 68px; height: 68px; flex: none;
  display: grid; place-items: center;
  border: 1px solid var(--line-mid);
  border-radius: var(--radius);
  background: radial-gradient(circle at 50% 40%, rgba(94,234,212,.07), transparent 70%);
  font-family: var(--font-display);
  font-size: 32px; font-weight: 600; color: var(--text-bright);
  text-shadow: 0 0 22px var(--accent-glow);
}
.rank-detail { flex: 1; min-width: 0; }
.sub-label { font-size: 8px; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); margin-bottom: 9px; }
.bar { height: 6px; background: rgba(94,234,212,.05); border-radius: 1px; overflow: hidden; }
.bar-fill {
  height: 100%; background: linear-gradient(90deg, var(--accent-deep), var(--accent));
  box-shadow: 0 0 12px var(--accent-glow); transition: width .55s cubic-bezier(.4,0,.2,1);
}
.bar-fill-alt { background: linear-gradient(90deg, #1a6f70, var(--accent-deep)); box-shadow: none; }
.rank-detail .bar { margin-bottom: 8px; }

/* ---------- activity ---------- */
.live-block {
  padding: 12px 15px; border-radius: var(--radius); margin-bottom: 14px;
  background: rgba(94,234,212,.05); border: 1px solid var(--line-mid);
  font-size: 11px; color: var(--accent); letter-spacing: .04em;
}
.event-list { list-style: none; margin: 0; padding: 0; max-height: 280px; overflow-y: auto; }
.event-list li {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 11px;
}
.event-list li:last-child { border-bottom: none; }
.event-xp { color: var(--accent); font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: .06em; }
.event-medal { color: var(--warn); font-weight: 500; letter-spacing: .1em; text-transform: uppercase; font-size: 10px; }

.event-list::-webkit-scrollbar { width: 3px; }
.event-list::-webkit-scrollbar-track { background: transparent; }
.event-list::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 2px; }

/* ---------- settings / forms ---------- */
.setting { padding: 20px 0; border-bottom: 1px solid var(--line); }
.setting:first-child { padding-top: 0; }
.setting:last-of-type { border-bottom: none; padding-bottom: 0; }
.setting > label {
  display: block; font-size: 10px; font-weight: 500;
  letter-spacing: .22em; text-transform: uppercase; color: var(--text); margin-bottom: 7px;
}
.setting .small { line-height: 1.7; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.path { display: block; margin-top: 10px; word-break: break-all; font-size: 10px; letter-spacing: .02em; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field-label {
  font-size: 8px; font-weight: 400; letter-spacing: .22em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 0;
}
.manual-form { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.field input { width: 150px; }

input[type=text], input[type=password], input[type=number], .select {
  background: rgba(3, 10, 11, 0.6);
  border: 1px solid var(--line);
  color: var(--text-bright);
  padding: 9px 12px;
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 300;
  letter-spacing: .06em;
  outline: none;
  transition: border-color .25s;
}
input:focus, .select:focus { border-color: var(--line-strong); }
input::placeholder { color: var(--muted); opacity: 1; }
.input-narrow { max-width: 160px; }
.select {
  font-size: 9px; letter-spacing: .18em; text-transform: uppercase;
  padding: 8px 11px; color: var(--muted-bright); cursor: pointer;
}
.select option { background: var(--panel-solid); color: var(--text); letter-spacing: normal; }

.btn {
  cursor: pointer;
  background: transparent;
  border: 1px solid var(--line-mid);
  color: var(--muted-bright);
  padding: 9px 18px;
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  transition: all .25s;
}
.btn:hover { border-color: var(--line-strong); color: var(--accent); background: rgba(94,234,212,.04); }
.btn:disabled { opacity: .3; cursor: not-allowed; }
.btn:disabled:hover { border-color: var(--line-mid); color: var(--muted-bright); background: transparent; }
.btn-primary { border-color: var(--line-strong); color: var(--accent); background: rgba(94,234,212,.06); }
.btn-primary:hover { background: rgba(94,234,212,.12); box-shadow: 0 0 18px var(--accent-glow); }
.btn-danger { border-color: rgba(232,115,106,.25); color: var(--bad); }
.btn-danger:hover { border-color: rgba(232,115,106,.5); color: var(--bad); background: rgba(232,115,106,.07); }

/* ---------- login ---------- */
#login-card { max-width: 540px; margin: 0 auto; }
.panel-login { padding: 28px; }
.login-tabs { display: flex; gap: 8px; margin: 20px 0 4px; }
.tab {
  cursor: pointer; background: transparent; border: 1px solid var(--line);
  color: var(--muted); padding: 8px 18px; border-radius: var(--radius);
  font-family: var(--font-mono); font-size: 9px; font-weight: 500;
  letter-spacing: .22em; text-transform: uppercase; transition: all .25s;
}
.tab:hover { border-color: var(--line-mid); color: var(--text); }
.tab-active { color: var(--accent); border-color: var(--line-strong); background: rgba(94,234,212,.05); }
.tab-body form { display: flex; flex-direction: column; gap: 14px; max-width: 300px; margin-top: 18px; }
.tab-body form .btn { align-self: flex-start; }
.qr-holder { display: grid; place-items: center; min-height: 250px; margin-top: 18px; }
.qr-holder img { border-radius: var(--radius); border: 1px solid var(--line-mid); padding: 8px; background: #fff; }

/* ---------- footer ---------- */
.foot {
  text-align: center; color: var(--muted); font-size: 8px;
  letter-spacing: .18em; text-transform: uppercase; line-height: 2;
  padding: 56px 0 0; margin-top: 40px; border-top: 1px solid var(--line);
}

/* ---------- responsive ---------- */
@media (max-width: 720px) {
  .topbar { padding: 16px 18px; }
  #app { padding: 8px 18px 60px; }
  .hero-number { font-size: 56px; }
  .medal-picker { grid-template-columns: repeat(3, 1fr); }
  .segbar-legend { display: none; }
  .divider { margin: 40px 0 18px; }
  .grid { grid-template-columns: 1fr; }
}
