:root {
  --bg: #080b12;
  --bg-2: #0b0f18;
  --panel: rgba(21, 27, 40, 0.72);
  --panel-solid: #141a27;
  --sunk: #0a0e17;
  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.12);
  --text: #eef2f8;
  --muted: #97a3b8;
  --dim: #5f6b80;
  --accent: #6d8dff;
  --accent-2: #a06bff;
  --crest: #e5533d;
  --green: #43d17f;
  --red: #ff6161;
  --amber: #f0b429;
  --mono: ui-monospace, "Cascadia Mono", "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
  --sans: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --r: 14px;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 28px -12px rgba(0,0,0,.7);
}

* { box-sizing: border-box; }

/* The hidden attribute has to win. The browser's own [hidden] rule is a plain
   attribute selector, so any id rule like `#shell { display: flex }` outranks
   it and the element keeps rendering while claiming to be hidden. That left
   the app shell laid out underneath the sign-in card, reachable by Tab even
   though nothing was visible. */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(900px 500px at 12% -8%, rgba(109,141,255,.14), transparent 60%),
    radial-gradient(700px 420px at 92% 4%, rgba(160,107,255,.10), transparent 60%);
}

.num { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.2px; }
.pos { color: var(--green); }
.neg { color: var(--red); }
.muted { color: var(--muted); }
.dim { color: var(--dim); }

/* ---------- layout ---------- */
#shell { display: flex; height: 100vh; overflow: hidden; position: relative; z-index: 1; }

#sidebar {
  width: 208px; flex: 0 0 208px;
  background: linear-gradient(180deg, rgba(15,20,31,.9), rgba(9,12,20,.9));
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  padding: 18px 0 10px;
  backdrop-filter: blur(10px);
}

.brand { display: flex; align-items: center; gap: 11px; padding: 0 16px 18px; }
.brand img {
  /* The Lapras sprite is 68x72 pixel art, so height only (a square box would
     squash it) and nearest-neighbour scaling to keep the pixels crisp. */
  height: 46px; width: auto;
  image-rendering: pixelated;
  filter: drop-shadow(0 3px 8px rgba(160,107,255,.45));
}

.gatemark {
  height: 72px; width: auto; display: block;
  margin: 0 auto 14px;
  image-rendering: pixelated;
  filter: drop-shadow(0 4px 12px rgba(160,107,255,.45));
}
.brand h1 { font-size: 14.5px; margin: 0; line-height: 1.2; letter-spacing: -.2px; }
.brand span {
  font-size: 9.5px; letter-spacing: .18em; color: var(--dim); font-weight: 600;
}

nav { display: flex; flex-direction: column; gap: 2px; padding: 0 9px; }
nav button {
  position: relative;
  background: none; border: 0; color: var(--muted);
  text-align: left; padding: 9px 12px; font-size: 13px;
  cursor: pointer; border-radius: 9px;
  display: flex; align-items: center; gap: 10px;
  font-family: inherit; transition: .13s;
}
nav button:hover { color: var(--text); background: rgba(255,255,255,.045); }
nav button.on {
  color: #fff;
  background: linear-gradient(90deg, rgba(109,141,255,.20), rgba(160,107,255,.09));
  box-shadow: inset 0 0 0 1px rgba(109,141,255,.24);
}
nav button.on::before {
  content: ""; position: absolute; left: -9px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 17px; border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
}
nav .ico { width: 16px; text-align: center; opacity: .75; font-size: 13px; }

.sidefoot {
  margin-top: auto; padding: 12px 16px 4px; font-size: 10.5px;
  color: var(--dim); line-height: 1.6; border-top: 1px solid var(--line);
}

#main { flex: 1; overflow: auto; padding: 26px 30px 70px; scroll-behavior: smooth; }
#main::-webkit-scrollbar { width: 11px; }
#main::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.09); border-radius: 8px;
  border: 3px solid transparent; background-clip: content-box;
}
#main::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.17); background-clip: content-box; }

.screen { display: none; animation: rise .22s ease both; }
.screen.on { display: block; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }

.head { margin-bottom: 20px; display: flex; align-items: flex-start; gap: 16px; }
.head h2 {
  margin: 0 0 4px; font-size: 23px; letter-spacing: -.5px; font-weight: 650;
}
.head p { margin: 0; color: var(--muted); font-size: 12.5px; }
.head .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }

/* ---------- panels ---------- */
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}
.panel > h3 {
  margin: 0 0 14px; font-size: 10.5px; letter-spacing: .13em;
  text-transform: uppercase; color: var(--muted); font-weight: 700;
}
.panel > h3 small {
  text-transform: none; letter-spacing: 0; color: var(--dim);
  font-weight: 400; margin-left: 8px; font-size: 11.5px;
}

.grid { display: grid; gap: 12px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1250px) {
  .g4, .g5 { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 950px)  { .g3, .g2 { grid-template-columns: 1fr; } }

/* ---------- stat tiles ---------- */
.tile {
  background: linear-gradient(160deg, rgba(255,255,255,.035), rgba(255,255,255,.012));
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  transition: .14s;
}
.tile:hover { border-color: var(--line-2); transform: translateY(-1px); }
.tile.hi {
  border-color: rgba(109,141,255,.34);
  background: linear-gradient(160deg, rgba(109,141,255,.14), rgba(160,107,255,.05));
}
.tile .k {
  font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 8px; font-weight: 600;
}
.tile .v { font-family: var(--mono); font-size: 22px; letter-spacing: -.7px; }
.tile .s { font-size: 11px; color: var(--dim); margin-top: 5px; }

.section-label {
  font-size: 10.5px; letter-spacing: .13em; text-transform: uppercase;
  color: var(--muted); margin: 24px 0 10px; font-weight: 700;
  display: flex; align-items: center; gap: 9px;
}
.chip {
  font-size: 9.5px; letter-spacing: .04em; padding: 3px 9px;
  border-radius: 20px; background: rgba(255,255,255,.07); color: var(--muted);
  text-transform: none; font-weight: 500;
}

/* ---------- forms ---------- */
label.f {
  display: block; font-size: 11px; color: var(--muted); margin-bottom: 6px;
  font-weight: 500;
}
input, select, textarea, button { font-family: inherit; font-size: 13px; }
/* Every text-ish input, listed explicitly. The desktop tracker had no password
   field so `password` was missing here, and the sign-in box rendered one raw
   browser input among styled ones. `email` and `search` are here for the same
   reason before they get added. */
input[type=text], input[type=password], input[type=email], input[type=search],
input[type=number], input[type=date], select, textarea {
  width: 100%;
  background: var(--sunk);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  padding: 9px 11px;
  font-family: var(--mono);
  transition: .13s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: rgba(109,141,255,.6);
  box-shadow: 0 0 0 3px rgba(109,141,255,.12);
}
input::placeholder { color: #3b455a; }
select { font-family: var(--sans); }
.field { margin-bottom: 13px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 120px; }

.btn {
  background: linear-gradient(135deg, var(--accent), #5a76e8);
  color: #fff; border: 0; border-radius: 10px;
  padding: 10px 17px; cursor: pointer; font-weight: 600;
  box-shadow: 0 2px 10px -2px rgba(109,141,255,.5);
  transition: .13s;
}
.btn:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.ghost {
  background: rgba(255,255,255,.06); color: var(--text); box-shadow: none;
  border: 1px solid var(--line);
}
.btn.danger { background: none; color: var(--red); padding: 10px 12px; box-shadow: none; }
.btn.sm { padding: 6px 12px; font-size: 12px; }
.btn.icon { background: none; color: var(--dim); padding: 3px 8px; box-shadow: none; }
.btn.icon:hover { color: var(--red); transform: none; }

.computed {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 10px 0; border-top: 1px solid var(--line);
  font-size: 12.5px; color: var(--muted);
}
.computed .num { font-size: 15px; color: var(--text); }

.hint { font-size: 11.5px; color: var(--dim); margin-top: 8px; line-height: 1.6; }
.hint.warn { color: var(--amber); }
.hint.good { color: var(--green); }

/* ---------- tables ---------- */
.tablebox {
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: auto;              /* sticky header needs this container (spec 5) */
  max-height: calc(100vh - 210px);
  background: var(--panel);
  box-shadow: var(--shadow);
}
.tablebox::-webkit-scrollbar { width: 11px; height: 11px; }
.tablebox::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.1); border-radius: 8px;
  border: 3px solid transparent; background-clip: content-box;
}
table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
thead th {
  position: sticky; top: 0; z-index: 2;
  background: #10151f;
  border-bottom: 1px solid var(--line-2);
  color: var(--muted); font-weight: 700;
  font-size: 9.5px; letter-spacing: .11em; text-transform: uppercase;
  padding: 11px 12px; text-align: right; white-space: nowrap;
}
thead th:first-child, tbody td:first-child { text-align: left; }
thead th.l, tbody td.l { text-align: left; }
tbody td {
  padding: 8px 12px; text-align: right; white-space: nowrap;
  border-bottom: 1px solid rgba(255,255,255,.045);
  font-family: var(--mono); font-variant-numeric: tabular-nums;
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: rgba(255,255,255,.04); }
tbody tr.click { cursor: pointer; }
tbody td.l { font-family: var(--sans); }
tbody tr.faded td { color: var(--dim); }
tbody td input { padding: 5px 8px; border-radius: 7px; font-size: 12px; }

.badge {
  display: inline-block; font-size: 9px; letter-spacing: .04em;
  padding: 2px 7px; border-radius: 5px; margin-left: 6px;
  font-family: var(--sans); vertical-align: middle; font-weight: 600;
}
.badge.gap  { background: rgba(240,180,41,.16); color: var(--amber); }
.badge.itp  { background: rgba(109,141,255,.18); color: #9db2ff; }
.badge.loan { background: rgba(109,141,255,.16); color: #8fa8ff; }
.badge.low  { background: rgba(255,97,97,.16); color: #ff9d9d; }
.badge.ok   { background: rgba(67,209,127,.16); color: var(--green); }

/* ---------- charts ---------- */
.chartbox { position: relative; height: 232px; }
.chartbox.tall { height: 305px; }

/* ---------- upload ---------- */
.drop {
  border: 1.5px dashed var(--line-2);
  border-radius: 12px; padding: 34px; text-align: center;
  color: var(--muted); cursor: pointer; transition: .15s;
  background: rgba(255,255,255,.015);
}
.drop:hover, .drop.over {
  border-color: rgba(109,141,255,.6); color: var(--text);
  background: rgba(109,141,255,.07);
}
.drop .big { font-size: 27px; margin-bottom: 9px; opacity: .8; }

.thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.thumb {
  width: 66px; height: 46px; border-radius: 7px; object-fit: cover;
  border: 1px solid var(--line-2);
}

.spinner {
  display: inline-block; width: 13px; height: 13px;
  border: 2px solid rgba(255,255,255,.18); border-top-color: var(--accent);
  border-radius: 50%; animation: spin .7s linear infinite; vertical-align: -2px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.empty { text-align: center; padding: 46px 20px; color: var(--dim); }
.empty img { width: 64px; image-rendering: pixelated; opacity: .35; margin-bottom: 10px; }

/* species row sprite */
.sp { display: flex; align-items: center; gap: 9px; }
.sp img { width: 26px; height: 26px; image-rendering: pixelated; }

#toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(8px);
  background: #1b2333; border: 1px solid var(--line-2); color: var(--text);
  padding: 11px 20px; border-radius: 11px; font-size: 13px;
  opacity: 0; pointer-events: none; transition: .2s; z-index: 50;
  box-shadow: var(--shadow);
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.bad { border-color: rgba(255,97,97,.5); }

/* ---------- calendar ---------- */
table.cal { table-layout: fixed; border-collapse: separate; border-spacing: 5px; }
table.cal thead th {
  position: static; background: none; border: 0;
  padding: 0 0 4px; text-align: center;
  font-size: 9.5px; letter-spacing: .12em; color: var(--dim);
}
table.cal td {
  height: 74px; vertical-align: top; padding: 7px 8px;
  border: 1px solid var(--line); border-radius: 9px;
  text-align: left; font-family: var(--sans);
  transition: .12s; overflow: hidden;
}
table.cal td.calpad { border: 0; background: none; }
table.cal tbody tr:hover { background: none; }

.calcell { cursor: pointer; background: rgba(255,255,255,.02); }
.calcell:hover { border-color: var(--line-2); transform: translateY(-1px); }
.calday {
  font-size: 10.5px; color: var(--dim); font-family: var(--mono);
  margin-bottom: 5px;
}
.calamt {
  font-family: var(--mono); font-size: 14px; letter-spacing: -.4px;
  font-variant-numeric: tabular-nums;
}
.calamt.dim { font-size: 10px; letter-spacing: 0; }
.calnote {
  font-size: 9.5px; color: var(--dim); margin-top: 3px; line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.cal-pos  { background: rgba(67,209,127,.10); border-color: rgba(67,209,127,.26); }
.cal-pos  .calamt { color: var(--green); }
.cal-pos  .calday { color: rgba(67,209,127,.75); }
.cal-neg  { background: rgba(255,97,97,.10); border-color: rgba(255,97,97,.26); }
.cal-neg  .calamt { color: var(--red); }
.cal-neg  .calday { color: rgba(255,97,97,.75); }
.cal-flat { background: rgba(255,255,255,.03); }
.cal-skip { background: rgba(240,180,41,.07); border-color: rgba(240,180,41,.2); }
.cal-empty { background: rgba(255,255,255,.012); border-style: dashed; }
.cal-empty .calday { color: #39445a; }

textarea { resize: vertical; min-height: 90px; line-height: 1.5; }

/* eggs-per-month share bar */
.bar {
  height: 7px; width: 100%; min-width: 70px; border-radius: 99px;
  background: rgba(255,255,255,.06); overflow: hidden;
}
.bar span {
  display: block; height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

/* ================= web build: auth, setups, uploads ================= */

/* ---------- sign in / sign up ---------- */
#gate {
  position: fixed; inset: 0; z-index: 100;
  display: none; align-items: center; justify-content: center;
  background: radial-gradient(900px 600px at 50% -10%, rgba(109,141,255,.16), transparent 60%), var(--bg);
}
#gate.on { display: flex; }
.gatecard {
  width: 380px; max-width: 92vw;
  background: var(--panel-solid); border: 1px solid var(--line);
  border-radius: 18px; padding: 28px; box-shadow: var(--shadow);
}
.gatecard h1 { margin: 0 0 4px; font-size: 21px; letter-spacing: -.4px; }
.gatecard .sub { color: var(--muted); font-size: 12.5px; margin-bottom: 20px; }
.gatetabs { display: flex; gap: 4px; margin-bottom: 18px; }
.gatetabs button {
  flex: 1; background: rgba(255,255,255,.04); border: 1px solid var(--line);
  color: var(--muted); padding: 8px; border-radius: 9px; cursor: pointer;
  font-family: inherit; font-size: 12.5px;
}
.gatetabs button.on {
  background: linear-gradient(135deg, rgba(109,141,255,.22), rgba(160,107,255,.1));
  color: #fff; border-color: rgba(109,141,255,.4);
}
.gatecard .btn { width: 100%; margin-top: 6px; }
.gateerr { color: var(--red); font-size: 12px; margin-top: 12px; min-height: 16px; line-height: 1.5; }

/* ---------- invite code ---------- */
.invite {
  display: flex; align-items: center; gap: 14px;
  background: linear-gradient(150deg, rgba(109,141,255,.14), rgba(160,107,255,.05));
  border: 1px solid rgba(109,141,255,.3); border-radius: 12px; padding: 16px 18px;
}
.invite .code {
  font-family: var(--mono); font-size: 30px; letter-spacing: 5px;
  font-weight: 600; color: #fff;
}
.invite .meter { flex: 1; }
.invite .bar { height: 5px; border-radius: 99px; background: rgba(255,255,255,.09); overflow: hidden; }
.invite .bar span {
  display: block; height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 1s linear;
}

/* ---------- setup cards ---------- */
.setup {
  background: var(--panel); border: 1px solid var(--line);
  border-left: 3px solid var(--accent); border-radius: 12px;
  padding: 14px 16px; margin-bottom: 10px;
}
.setup.archived { opacity: .5; border-left-color: var(--dim); }
.setup.bad { border-left-color: var(--red); }
.setup .top { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.setup .nm { font-size: 14px; font-weight: 600; }
.setup .cost { margin-left: auto; font-family: var(--mono); font-size: 16px; }
.setup .parts { margin-top: 8px; font-size: 11.5px; color: var(--dim); line-height: 1.7; }
.setup .parts b { color: var(--muted); font-weight: 600; }

/* ---------- egg entry rows ---------- */
.eggrow {
  display: flex; align-items: center; gap: 12px; padding: 9px 0;
  border-bottom: 1px solid var(--line);
}
.eggrow:last-child { border-bottom: 0; }
.eggrow .who { flex: 1; min-width: 0; }
.eggrow .who b { font-size: 13px; font-weight: 600; }
.eggrow .who small { display: block; color: var(--dim); font-size: 11px; margin-top: 2px; }
.eggrow input { width: 130px; }
.eggrow .added { width: 92px; text-align: right; font-family: var(--mono); font-size: 12.5px; }

/* ---------- upload ---------- */
.drop {
  border: 1.5px dashed var(--line-2); border-radius: 12px; padding: 34px;
  text-align: center; color: var(--muted); cursor: pointer; transition: .15s;
  background: rgba(255,255,255,.015);
}
.drop:hover, .drop.over {
  border-color: rgba(109,141,255,.6); color: var(--text);
  background: rgba(109,141,255,.07);
}
.drop .big { font-size: 27px; margin-bottom: 9px; opacity: .8; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.thumb { width: 74px; height: 46px; border-radius: 7px; object-fit: cover; border: 1px solid var(--line-2); }

.flag {
  border: 1px solid rgba(240,180,41,.32); background: rgba(240,180,41,.09);
  color: #f7d488; border-radius: 10px; padding: 11px 14px;
  font-size: 12.5px; line-height: 1.6; margin-bottom: 9px;
}
.flag.bad { border-color: rgba(255,97,97,.35); background: rgba(255,97,97,.08); color: #ffb3b3; }
.flag.good { border-color: rgba(67,209,127,.3); background: rgba(67,209,127,.08); color: #8ee7b4; }

.pill2 {
  display: inline-block; font-size: 10px; padding: 2px 8px; border-radius: 20px;
  background: rgba(255,255,255,.07); color: var(--muted); margin-left: 6px;
}
.pill2.run { background: rgba(109,141,255,.2); color: #9db2ff; }
.pill2.done { background: rgba(67,209,127,.18); color: var(--green); }
.pill2.fail { background: rgba(255,97,97,.18); color: #ff9d9d; }

/* ---------- public landing ---------- */
/* Shown to signed-out visitors. Carries no member data at all, so it can be
   public without any of the isolation questions the app itself has. */
#landing {
  position: fixed; inset: 0; z-index: 90; overflow-y: auto;
  background:
    radial-gradient(820px 520px at 78% -8%, rgba(160,107,255,.20), transparent 62%),
    radial-gradient(700px 460px at 12% 8%, rgba(109,141,255,.13), transparent 60%),
    var(--bg);
}

.lbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 16px 26px; max-width: 1060px; margin: 0 auto;
}
.lbrand { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.lbrand img {
  height: 46px; width: auto;
  image-rendering: pixelated;
  filter: drop-shadow(0 3px 8px rgba(160,107,255,.4));
}
.lbrand span { font-size: 16.5px; letter-spacing: -.3px; }

.lhero {
  max-width: 1060px; margin: 0 auto; padding: 26px 26px 10px;
  display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  gap: 44px; align-items: center;
}
.lhero-art {
  width: 100%; height: auto; border-radius: 22px;
  border: 1px solid var(--line-2);
  box-shadow: 0 24px 70px -26px rgba(160,107,255,.75), var(--shadow);
}
.ltag {
  display: inline-block; margin-bottom: 14px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase;
  color: var(--accent-2);
}
.lhero-copy h1 {
  margin: 0 0 14px; font-size: 38px; line-height: 1.1; letter-spacing: -1px;
}
.lhero-copy p {
  margin: 0 0 24px; color: var(--muted); font-size: 15px; line-height: 1.65;
  max-width: 46ch;
}
.lcta { display: flex; gap: 10px; flex-wrap: wrap; }
.lcta .btn { width: auto; padding: 11px 22px; }
.btn.ghost {
  background: rgba(255,255,255,.05); border: 1px solid var(--line-2);
  color: var(--text);
}
.btn.ghost:hover { background: rgba(255,255,255,.09); }
.lnote { margin-top: 14px; color: var(--dim); font-size: 12px; }

.lboard {
  max-width: 1060px; margin: 34px auto 0; padding: 24px 26px 26px;
}
.lboard > * { max-width: 640px; }
.lboard-head { display: flex; align-items: center; gap: 12px; }
.lboard-head h2 { margin: 0; font-size: 19px; letter-spacing: -.3px; }
.chip.soon {
  background: rgba(240,180,41,.14); border: 1px solid rgba(240,180,41,.34);
  color: var(--amber); font-size: 10.5px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px;
}
.lboard-sub { color: var(--muted); font-size: 13px; margin: 10px 0 18px; line-height: 1.6; }

/* Placeholder rows. Shapes only, never names or numbers, so nothing about a
   real person is implied before the sharing question is answered. */
.lrank { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.lrank li {
  display: flex; align-items: center; gap: 14px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; padding: 13px 16px;
}
.lpos {
  width: 22px; text-align: center; font-family: var(--mono);
  font-size: 12.5px; color: var(--dim); flex: none;
}
.lskel {
  height: 9px; border-radius: 999px;
  background: linear-gradient(90deg, rgba(255,255,255,.09), rgba(255,255,255,.045));
}
.lskel.w-lg { width: 168px; }
.lskel.w-md { width: 132px; }
.lskel.w-sm { width: 96px; }
.lskel.tail { width: 74px; margin-left: auto; }

.lfoot {
  max-width: 1060px; margin: 10px auto 0; padding: 26px;
  color: var(--dim); font-size: 11.5px;
  border-top: 1px solid var(--line); text-align: center;
}

.lback {
  width: 100%; margin-top: 12px; background: none; border: 0;
  color: var(--dim); font-family: inherit; font-size: 12px; cursor: pointer;
  padding: 6px;
}
.lback:hover { color: var(--muted); }

@media (max-width: 860px) {
  .lhero { grid-template-columns: 1fr; gap: 26px; padding-top: 8px; }
  .lhero-art { max-width: 260px; margin: 0 auto; }
  .lhero-copy h1 { font-size: 29px; }
}

/* ---------- leaderboard template ---------- */
.sample {
  background: rgba(240,180,41,.10); border: 1px solid rgba(240,180,41,.30);
  color: var(--amber); border-radius: 12px; padding: 12px 16px;
  font-size: 12.5px; line-height: 1.6; margin-bottom: 20px;
}
.sample b { color: var(--amber); }

.podium {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 12px; align-items: end; margin-bottom: 22px; max-width: 620px;
}
.pod {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; padding: 16px 14px; text-align: center;
  display: flex; flex-direction: column; gap: 5px;
}
.pod b { font-size: 14px; }
.pod .num { font-size: 13px; color: var(--green); }
.pod small { color: var(--dim); font-size: 11px; }
.pmed {
  width: 26px; height: 26px; margin: 0 auto 2px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700; color: #1a1205;
}
.pod.first  { padding-top: 26px; border-color: rgba(240,180,41,.42); }
.pod.first .pmed  { background: linear-gradient(160deg, #ffd76e, #e0a41c); }
.pod.second .pmed { background: linear-gradient(160deg, #dfe6f2, #9fb0c6); }
.pod.third .pmed  { background: linear-gradient(160deg, #e6a877, #b9713c); }

table.board th.r, table.board td.r { text-align: right; }
table.board td.pos { color: var(--green); }
table.board td.neg { color: var(--red); }
table.board tbody tr:nth-child(-n+3) td:nth-child(2) { font-weight: 600; }

.decide { margin: 0; padding-left: 18px; color: var(--muted); font-size: 12.5px; }
.decide li { margin-bottom: 9px; line-height: 1.65; }
.decide li:last-child { margin-bottom: 0; }

@media (max-width: 620px) {
  .podium { grid-template-columns: 1fr; align-items: stretch; }
  .pod.first { padding-top: 16px; }
}

/* ---------- dashboard right rail ---------- */
.dashwrap {
  display: grid; grid-template-columns: minmax(0, 1fr) 262px;
  gap: 20px; align-items: start;
}
.dashmain { min-width: 0; }
.dashrail { position: sticky; top: 0; }
.panel.rail { padding: 16px; }
.panel.rail > h3 { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; }

.minirank { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 7px; }
.minirank li {
  display: flex; align-items: center; gap: 10px;
  font-size: 12.5px; padding: 7px 9px; border-radius: 9px;
  background: rgba(255,255,255,.03); border: 1px solid var(--line);
}
.minirank b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis;
              white-space: nowrap; font-weight: 500; }
.minirank .num { font-size: 12px; color: var(--green); }
.minirank .num.neg { color: var(--red); }
.mpos {
  width: 19px; height: 19px; flex: none; border-radius: 50%;
  display: grid; place-items: center; font-size: 10.5px; font-weight: 700;
  background: rgba(255,255,255,.07); color: var(--dim);
}
.mpos.p1 { background: linear-gradient(160deg, #ffd76e, #e0a41c); color: #1a1205; }
.mpos.p2 { background: linear-gradient(160deg, #dfe6f2, #9fb0c6); color: #1a1205; }
.mpos.p3 { background: linear-gradient(160deg, #e6a877, #b9713c); color: #1a1205; }

.railnote { color: var(--dim); font-size: 11px; line-height: 1.55; margin: 0 0 12px; }
.panel.rail .btn.sm { width: 100%; }

@media (max-width: 1180px) {
  .dashwrap { grid-template-columns: 1fr; }
  .dashrail { position: static; }
  .panel.rail { max-width: 420px; }
}


/* ---------- hub import ---------- */
.drop.sm { padding: 20px; }
.drop.sm .big { font-size: 22px; }
.hubmsg {
  margin-top: 14px; padding: 13px 16px; border-radius: 11px;
  font-size: 12.5px; line-height: 1.6;
}
.hubmsg.ok  { background: rgba(67,209,127,.09);  border: 1px solid rgba(67,209,127,.28); }
.hubmsg.bad { background: rgba(255,97,97,.09);   border: 1px solid rgba(255,97,97,.3); color: var(--red); }
.hubmsg.ask { background: rgba(240,180,41,.09);  border: 1px solid rgba(240,180,41,.3); }
.hubmsg b { color: var(--text); }
.hubmsg ul { margin: 8px 0 12px; padding-left: 18px; color: var(--muted); }
.hubmsg li { margin-bottom: 3px; }
