/* ==========================================================================
   NEVRR for Desktop: the signed-in dashboard shell.
   Its own surface, deliberately not the marketing site's nav/hero/footer.
   Loads after styles.css and reuses its tokens (--bg, --primary, fonts).
   ========================================================================== */

/* Tell the browser this is a dark UI, so any control we don't style by hand
   (fields, dropdowns, scrollbars, autofill) renders dark instead of white. */
:root { color-scheme: dark; }

/* The shell's panels carry `display` on a class, which outranks the UA's
   [hidden] rule. Without this, hiding a panel does nothing. */
[hidden] { display: none !important; }

/* ------------------------------------------------------------- App shell -- */
.app { display: flex; min-height: 100vh; }

.app-side {
  position: sticky; top: 0; align-self: flex-start;
  width: 248px; flex: none; height: 100vh;
  display: flex; flex-direction: column; gap: 8px;
  padding: 26px 16px 18px;
  border-right: 1px solid var(--divider);
  background: rgba(10, 15, 26, 0.72);
  backdrop-filter: blur(18px);
}
.side-brand { display: flex; align-items: center; gap: 10px; padding: 0 10px 22px; }
.side-brand .wordmark {
  font-family: var(--font-brand); font-weight: 800; font-size: 1.28rem; letter-spacing: 0.04em;
  background: linear-gradient(180deg, #fff, #c3ccdb);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.side-nav { display: flex; flex-direction: column; gap: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border: 0; border-radius: 14px; cursor: pointer;
  background: none; color: var(--text-secondary);
  font-family: var(--font-display); font-weight: 700; font-size: 0.98rem; text-align: left;
  transition: background 0.18s, color 0.18s;
}
.nav-item svg { width: 20px; height: 20px; flex: none; }
.nav-item:hover { color: #fff; background: rgba(255, 255, 255, 0.05); }
.nav-item.active { color: #fff; background: linear-gradient(180deg, rgba(46, 92, 242, 0.9), rgba(18, 56, 199, 0.9)); box-shadow: 0 10px 26px -12px rgba(27, 70, 233, 0.9); }
.side-foot { margin-top: auto; padding: 14px 10px 0; border-top: 1px solid var(--divider); }
.side-user { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; min-width: 0; }
.side-user .avatar { width: 34px; height: 34px; flex: none; }
.side-user-name { font-weight: 700; font-size: 0.92rem; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-link { background: none; border: 0; padding: 0; cursor: pointer; color: var(--text-tertiary); font: inherit; font-size: 0.86rem; font-weight: 600; }
.side-link:hover { color: #fff; }

.app-main { flex: 1; min-width: 0; }
.view { max-width: 720px; margin-inline: auto; padding: 40px 24px 80px; }
/* One rhythm for stacked cards, rather than a margin hand-written per card. */
.view > .card + .card { margin-top: 16px; }
.view-head { margin-bottom: 24px; }
.view-head h1 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); letter-spacing: -0.02em; }
.view-head p { color: var(--text-secondary); margin-top: 6px; }

/* Mobile: sidebar becomes the app's bottom tab bar. */
@media (max-width: 860px) {
  .app { flex-direction: column; }
  .app-side {
    position: fixed; bottom: 0; left: 0; right: 0; top: auto; z-index: 60;
    width: auto; height: auto; flex-direction: row; gap: 0; align-self: stretch;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    border-right: 0; border-top: 1px solid var(--divider);
  }
  .side-brand, .side-foot { display: none; }
  .side-nav { flex: 1; flex-direction: row; }
  .nav-item {
    flex: 1; flex-direction: column; gap: 5px; padding: 8px 4px; border-radius: 12px;
    font-size: 0.72rem; text-align: center; letter-spacing: 0.01em;
  }
  .nav-item.active { background: none; color: var(--primary-bright); box-shadow: none; }
  .view { padding: 26px 18px 110px; }
}

/* --------------------------------------------------------------- Avatars -- */
.avatar {
  width: 40px; height: 40px; border-radius: 50%; flex: none; overflow: hidden;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #2E5CF2, #8552F2);
  color: #fff; font-family: var(--font-display); font-weight: 800; font-size: 0.82rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ------------------------------------------------------------------ Home -- */
.hero-opal {
  position: relative; overflow: hidden; text-align: center;
  padding: 34px 24px 30px; margin-bottom: 16px;
}
.hero-opal::before {
  content: ""; position: absolute; inset: -40% 20% 40%;
  background: radial-gradient(circle, var(--opal-glow, rgba(92, 123, 255, 0.55)), transparent 68%);
  filter: blur(46px); opacity: 0.55; pointer-events: none;
}
.hero-opal > * { position: relative; }
.hero-gem { width: 132px; margin: 0 auto 16px; filter: drop-shadow(0 18px 34px rgba(0, 0, 0, 0.6)); }
.hero-opal-name { font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; }
.hero-opal-sub { color: var(--text-tertiary); font-size: 0.84rem; margin-top: 2px; }
.hero-streak {
  display: flex; align-items: baseline; justify-content: center; gap: 10px; flex-wrap: wrap;
  margin-top: 20px; font-family: var(--font-display); font-variant-numeric: tabular-nums; line-height: 1;
}
.hero-streak .d {
  font-weight: 800; font-size: clamp(3.2rem, 9vw, 4.6rem);
  background: linear-gradient(180deg, #7d96ff, #1B46E9);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-streak .rest { font-weight: 700; font-size: clamp(1.1rem, 3vw, 1.4rem); color: #fff; }
.hero-since { color: var(--text-tertiary); font-size: 0.86rem; margin-top: 12px; }

.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.stat-card { padding: 18px 16px; text-align: center; }
.stat-card .k { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-tertiary); }
.stat-card .v { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.3rem, 3.4vw, 1.7rem); margin-top: 10px; font-variant-numeric: tabular-nums; }
.stat-card .v.gold { background: var(--grad-gold); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-card .v.green { background: linear-gradient(180deg, #5cf0a0, #18C964); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-card .s { color: var(--text-tertiary); font-size: 0.78rem; margin-top: 6px; }
@media (max-width: 560px) {
  .stat-row { grid-template-columns: 1fr; }
  .stat-card { display: flex; align-items: baseline; justify-content: space-between; text-align: left; padding: 14px 16px; }
  .stat-card .v { margin-top: 0; }
  .stat-card .s { display: none; }
}

.rewire { margin-bottom: 16px; }
.rewire-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.rewire-head h3 { font-family: var(--font-display); font-weight: 800; font-size: 1.02rem; }
.rewire-head span { font-family: var(--font-display); font-weight: 800; color: var(--primary-bright); font-variant-numeric: tabular-nums; }
.rewire-bar { height: 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.rewire-fill { height: 100%; border-radius: 999px; background: var(--grad-progress); transition: width 0.6s ease; }
.rewire p { color: var(--text-tertiary); font-size: 0.84rem; margin-top: 10px; }

/* -------------------------------------------------- Journal + reasons --- */
.sec-head .count { display: grid; place-items: center; min-width: 26px; height: 26px; padding: 0 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); font-family: var(--font-display); font-weight: 700; font-size: 0.8rem; color: #fff; }
.j-today .k { font-size: 0.66rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-tertiary); margin-bottom: 8px; }
.j-title { font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; margin-bottom: 6px; }
.j-body { color: var(--text-secondary); font-size: 0.94rem; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.j-empty .muted { font-size: 0.92rem; line-height: 1.55; }
.j-today, .j-empty { margin-bottom: 16px; }
#journalCard .composer { margin-top: 14px; }
/* Two buttons, no fields: group them at the right rather than letting the
   shared auto-margin push only the first one over. */
#journalCard .composer .row { justify-content: flex-end; }
#journalCard .composer .row .btn { margin-left: 0; }
.j-recent { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--divider); display: flex; flex-direction: column; gap: 10px; }
.j-row { display: flex; gap: 12px; align-items: baseline; font-size: 0.88rem; }
.j-date { flex: none; width: 52px; color: var(--text-tertiary); font-weight: 600; }
.j-snip { flex: 1; min-width: 0; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.reasons { display: flex; flex-direction: column; gap: 12px; list-style: none; }
.reasons li { position: relative; padding-left: 24px; color: var(--text-secondary); font-size: 0.95rem; line-height: 1.5; }
.reasons li::before {
  content: ""; position: absolute; left: 4px; top: 8px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--primary-bright); box-shadow: 0 0 12px rgba(92, 123, 255, 0.8);
}

.quote {
  margin-top: 16px; padding: 26px 28px; text-align: center;
  color: rgba(255, 255, 255, 0.85); font-size: 0.98rem; line-height: 1.65;
}
.quote::before, .quote::after {
  display: block; font-family: Georgia, serif; font-size: 1.9rem; line-height: 0.6;
  color: var(--primary-bright);
}
.quote::before { content: "\201C"; margin-bottom: 14px; }
.quote::after { content: "\201D"; margin-top: 20px; }

/* ------------------------------------------------------------ Protection -- */
.shield { display: flex; align-items: flex-start; gap: 14px; }
.shield-ic { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; background: rgba(27, 70, 233, 0.18); border: 1px solid rgba(92, 123, 255, 0.3); }
.shield-ic svg { width: 20px; height: 20px; color: var(--primary-bright); }
.shield-body { flex: 1; min-width: 0; }
.shield-body h3 { font-family: var(--font-display); font-weight: 800; font-size: 1.02rem; margin-bottom: 6px; }
.shield-body p { color: var(--text-secondary); font-size: 0.92rem; line-height: 1.55; }
.shield-actions { margin-top: 16px; }
.os-tabs { display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 16px; border-radius: 999px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--divider); }
.os-tab { background: none; border: 0; padding: 8px 16px; border-radius: 999px; color: var(--text-secondary); font-family: var(--font-display); font-weight: 700; font-size: 0.88rem; cursor: pointer; transition: color 0.18s, background 0.18s; }
.os-tab:hover { color: #fff; }
.os-tab.active { background: var(--primary); color: #fff; }
.steps { margin: 16px 0 12px; padding-left: 20px; list-style: decimal; display: flex; flex-direction: column; gap: 9px; color: var(--text-secondary); font-size: 0.92rem; line-height: 1.55; }
.steps li::marker { color: var(--primary-bright); font-weight: 700; }
.steps strong { color: #fff; }
.copy-row { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 14px; border-radius: 14px; background: rgba(0, 0, 0, 0.35); border: 1px solid var(--divider); }
.copy-row code { flex: 1; min-width: 0; word-break: break-all; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.82rem; color: #cdd7ff; }
.fineprint { color: var(--text-tertiary); font-size: 0.82rem; line-height: 1.55; margin-top: 12px; }
@media (max-width: 560px) {
  .os-tabs { display: flex; }
  .os-tab { flex: 1; }
  .copy-row { flex-direction: column; align-items: stretch; }
}

/* ------------------------------------------------------------- Community -- */
/* Sits between the composer card and the feed, so it carries the same 16px
   rhythm as the stacked cards on either side of it. */
.feed-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 16px 0; }
.seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--divider); }
.seg button { background: none; border: 0; padding: 7px 16px; border-radius: 999px; color: var(--text-secondary); font-family: var(--font-display); font-weight: 700; font-size: 0.88rem; cursor: pointer; }
.seg button.active { background: var(--primary); color: #fff; }
.seg button:hover:not(.active) { color: #fff; }

.post { padding: 20px; margin-bottom: 12px; }
.post-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.post-who { flex: 1; min-width: 0; }
.post-name { font-weight: 700; font-size: 0.92rem; color: #fff; }
.post-meta { color: var(--text-tertiary); font-size: 0.8rem; }
.tag { padding: 5px 12px; border-radius: 999px; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.02em; color: #cdd7ff; background: rgba(27, 70, 233, 0.18); border: 1px solid rgba(92, 123, 255, 0.28); white-space: nowrap; }
.post h3 { font-family: var(--font-display); font-weight: 800; font-size: 1.08rem; line-height: 1.3; margin-bottom: 6px; }
.post-body { color: var(--text-secondary); font-size: 0.94rem; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.post-actions { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.act {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--divider); color: var(--text-secondary);
  font-weight: 600; font-size: 0.86rem; cursor: pointer; font-variant-numeric: tabular-nums;
  transition: color 0.18s, background 0.18s, border-color 0.18s;
}
.act svg { width: 15px; height: 15px; }
.act:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.act.on { color: #FF6B8A; border-color: rgba(255, 107, 138, 0.4); background: rgba(255, 107, 138, 0.12); }
.act.on svg { fill: currentColor; }
.act:disabled { opacity: 0.55; cursor: default; }

.comments { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--divider); }
.comment { display: flex; gap: 10px; padding: 10px 0; }
.comment .avatar { width: 30px; height: 30px; font-size: 0.7rem; }
.comment-b { flex: 1; min-width: 0; }
.comment-h { font-size: 0.84rem; margin-bottom: 2px; }
.comment-h b { color: #fff; font-weight: 700; }
.comment-h span { color: var(--text-tertiary); margin-left: 6px; }
.comment-t { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }

/* Every text field in the dashboard, in one place. The reply box used to miss
   this and fell back to the browser default: a white box, with the reset's
   `color: inherit` putting white text in it. Reads as a well sunk into the
   card rather than a lighter patch on top of it. */
.composer textarea,
.composer input,
.comment-form input {
  width: 100%;
  padding: 13px 16px;
  border-radius: 14px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.5;
  color: #fff;
  background: rgba(7, 11, 20, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35);
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.composer textarea::placeholder,
.composer input::placeholder,
.comment-form input::placeholder { color: var(--text-tertiary); }
.composer textarea:hover,
.composer input:hover,
.comment-form input:hover { border-color: rgba(255, 255, 255, 0.16); }
.composer textarea:focus,
.composer input:focus,
.comment-form input:focus {
  outline: none;
  border-color: rgba(92, 123, 255, 0.7);
  background: rgba(7, 11, 20, 0.72);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35), 0 0 0 3px rgba(92, 123, 255, 0.16);
}
.composer textarea { min-height: 96px; resize: vertical; line-height: 1.55; }
.composer .row { display: flex; gap: 10px; margin-top: 10px; align-items: center; flex-wrap: wrap; }
.composer select {
  padding: 11px 34px 11px 14px; border-radius: 999px; font-family: var(--font-display); font-weight: 700; font-size: 0.88rem;
  background-color: rgba(255, 255, 255, 0.04); border: 1px solid var(--divider); color: #fff; cursor: pointer;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23A0AABF' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.composer select option { background: #131A2B; color: #fff; }
.composer .row .btn { margin-left: auto; }
.comment-form { display: flex; gap: 10px; margin-top: 12px; }
.comment-form input { flex: 1; }

/* ------------------------------------------- Clean-time count-up bars ---- */
/* The app draws these as a sheared rounded rectangle: the top edge leans
   right by 14px over a 56px height, the bottom edge stays put. skewX(-14deg)
   about the bottom-left corner is the same transform. Only the track and fill
   are skewed; the numbers sit upright on top, as in the app. */
.ctb { padding: 22px; }
.ctb-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.ctb-head > span:first-child { font-weight: 600; font-size: 0.98rem; color: rgba(255, 255, 255, 0.9); }
.ctb-gem { font-family: var(--font-display); font-weight: 900; font-size: 0.7rem; letter-spacing: 0.18em; white-space: nowrap; }

.ctb-row { position: relative; height: 56px; }
.ctb-row + .ctb-row { margin-top: 10px; }
.ctb-shape { position: absolute; inset: 0 14px 0 0; }
.ctb-track, .ctb-fill {
  position: absolute; top: 0; bottom: 0; left: 0;
  border-radius: 15px;
  transform: skewX(-14deg); transform-origin: bottom left;
}
.ctb-track { right: 0; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.08); }
.ctb-fill { max-width: 100%; transition: width 0.5s linear; }
.ctb-num {
  position: absolute; left: 24px; top: 50%; transform: translateY(-50%);
  display: flex; align-items: baseline; gap: 7px;
}
.ctb-num b { font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; color: #fff; font-variant-numeric: tabular-nums; }
.ctb-num span { font-size: 1.25rem; font-weight: 500; color: rgba(255, 255, 255, 0.75); }
@media (prefers-reduced-motion: reduce) { .ctb-fill { transition: none; } }
@media (max-width: 560px) {
  .ctb { padding: 18px 16px; }
  .ctb-row { height: 50px; }
  .ctb-num { left: 18px; }
  .ctb-num b { font-size: 1.4rem; }
  .ctb-num span { font-size: 1.05rem; }
}

/* -------------------------------------------------------------- Progress -- */
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.sec-head h3 { font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; }
.big-pct { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; background: var(--grad-progress); -webkit-background-clip: text; background-clip: text; color: transparent; }

.radar-wrap { display: grid; place-items: center; padding: 0 0 14px; }
.radar { width: min(300px, 88%); height: auto; overflow: visible; }

.axis-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 560px) { .axis-grid { grid-template-columns: repeat(2, 1fr); } }
.axis { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 14px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--surface-stroke); }
.axis .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.axis .l { flex: 1; min-width: 0; font-size: 0.84rem; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.axis .p { font-family: var(--font-display); font-weight: 800; font-size: 0.86rem; color: #fff; font-variant-numeric: tabular-nums; }

.save-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; text-align: center; }
.save-row .k, .mini-stats .k, .trigger-hero .k { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-tertiary); }
.save-row .v { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.1rem, 2.8vw, 1.5rem); margin-top: 8px; font-variant-numeric: tabular-nums; }
.save-row .v.gold, .mini-stats .v.gold { background: var(--grad-gold); -webkit-background-clip: text; background-clip: text; color: transparent; }
@media (max-width: 460px) { .save-row { grid-template-columns: 1fr; text-align: left; } .save-row > div { display: flex; align-items: baseline; justify-content: space-between; } .save-row .v { margin-top: 0; } }

.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; text-align: center; margin-bottom: 20px; }
.mini-stats .v { font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; margin-top: 8px; font-variant-numeric: tabular-nums; }
.mini-stats .v small { font-size: 0.55em; font-weight: 700; color: var(--text-tertiary); margin-left: 1px; }
.mini-stats .v.green { background: linear-gradient(180deg, #5cf0a0, #18C964); -webkit-background-clip: text; background-clip: text; color: transparent; }

.bars { display: flex; align-items: flex-end; gap: 8px; height: 132px; padding-top: 18px; }
.bar-col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; min-width: 0; }
.bar-val { font-size: 0.7rem; font-weight: 700; color: var(--text-tertiary); font-variant-numeric: tabular-nums; }
.bar { width: 100%; max-width: 40px; border-radius: 6px 6px 3px 3px; background: rgba(92, 123, 255, 0.28); }
.bar.live { background: var(--grad-progress); box-shadow: 0 6px 18px -8px rgba(46, 184, 219, 0.9); }

.trigger-hero { display: flex; align-items: center; gap: 16px; padding: 16px; margin-bottom: 20px; border-radius: 18px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--surface-stroke); }
.trigger-hero .emoji { font-size: 2.2rem; line-height: 1; flex: none; }
.trigger-hero .t { font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; margin: 4px 0 2px; }

.breakdown { display: flex; flex-direction: column; gap: 10px; }
.bd-row { display: flex; align-items: center; gap: 12px; }
.bd-l { width: 40%; max-width: 170px; font-size: 0.86rem; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bd-track { flex: 1; height: 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); overflow: hidden; }
.bd-fill { display: block; height: 100%; border-radius: 999px; background: var(--grad-progress); }
.bd-n { width: 22px; text-align: right; font-size: 0.82rem; font-weight: 700; color: var(--text-tertiary); font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------------- Profile -- */
.prof-head { display: flex; align-items: center; gap: 18px; padding: 26px; margin-bottom: 16px; }
.prof-head .avatar { width: 78px; height: 78px; font-size: 1.4rem; }
.prof-id { min-width: 0; }
.prof-id h2 { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; letter-spacing: -0.02em; }
.prof-id .sub { color: var(--text-tertiary); font-size: 0.88rem; margin-top: 4px; }
.prof-bio { color: var(--text-secondary); font-size: 0.92rem; margin-top: 10px; line-height: 1.55; }
@media (max-width: 560px) { .prof-head { flex-direction: column; text-align: center; gap: 14px; } }

.sec-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 26px 0 14px; }
.sec-title h3 { font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; }
.sec-title span { color: var(--text-tertiary); font-size: 0.84rem; }

.opal-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
@media (max-width: 560px) { .opal-grid { grid-template-columns: repeat(3, 1fr); } }
.opal {
  padding: 14px 8px 12px; border-radius: 18px; text-align: center;
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--surface-stroke);
}
/* Fixed box: the gem art has mixed aspect ratios, and without it the labels
   sit at a different height in every cell. */
.opal img { width: 52px; height: 72px; object-fit: contain; margin: 0 auto 8px; }
.opal .n { font-family: var(--font-display); font-weight: 700; font-size: 0.8rem; color: #fff; }
.opal .d { color: var(--text-tertiary); font-size: 0.72rem; margin-top: 2px; }
.opal.locked img { filter: grayscale(1) brightness(0.5); opacity: 0.5; }
.opal.locked .n { color: var(--text-tertiary); }
.opal.now { border-color: rgba(92, 123, 255, 0.5); background: rgba(27, 70, 233, 0.12); box-shadow: 0 10px 30px -16px rgba(27, 70, 233, 0.9); }

/* ------------------------------------------------------ States + sign-in -- */
.state { text-align: center; color: var(--text-secondary); padding: 36px 24px; }
.state .btn { margin-top: 14px; }
.err { color: var(--danger); font-size: 0.9rem; }
.skel { border-radius: 20px; background: linear-gradient(90deg, rgba(255,255,255,0.04), rgba(255,255,255,0.08), rgba(255,255,255,0.04)); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
.skel + .skel { margin-top: 12px; }
.skel-post { height: 148px; }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skel { animation: none; } }

.signin-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.signin { width: min(420px, 100%); text-align: center; padding: 38px 30px; }
.signin .wordmark { font-family: var(--font-brand); font-weight: 800; font-size: 1.6rem; letter-spacing: 0.04em; background: linear-gradient(180deg, #fff, #c3ccdb); -webkit-background-clip: text; background-clip: text; color: transparent; }
.signin h1 { font-size: 1.4rem; margin: 18px 0 8px; }
.signin p { color: var(--text-secondary); font-size: 0.94rem; line-height: 1.55; margin-bottom: 24px; }
.btn-provider {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  width: 100%; margin-bottom: 10px; padding: 15px 20px;
  border-radius: 999px; border: 1px solid transparent; cursor: pointer;
  font-family: var(--font-display); font-weight: 700; font-size: 1rem; line-height: 1;
  transition: transform 0.18s ease, filter 0.2s ease;
}
.btn-provider:hover { transform: translateY(-2px); filter: brightness(1.05); }
.btn-provider:disabled { opacity: 0.6; cursor: wait; transform: none; }
.btn-apple { background: #000; color: #fff; border-color: rgba(255, 255, 255, 0.25); }
.btn-apple img { width: 18px; height: 18px; object-fit: contain; }
.btn-google { background: #fff; color: #1f1f1f; }
.btn-google svg { width: 20px; height: 20px; flex: none; }
/* Outranks `.signin p`, which would otherwise paint the error as body text. */
.signin .err { color: var(--danger); font-size: 0.9rem; margin: 0; }
.signin-foot { font-size: 0.84rem; color: var(--text-tertiary); margin: 18px 0 0; }
.signin-foot a { color: var(--primary-bright); }

.notice {
  padding: 16px 18px; margin-bottom: 16px; border-radius: 18px; line-height: 1.55; font-size: 0.9rem;
  color: var(--text-secondary);
  border: 1px solid rgba(245, 196, 81, 0.35);
  background: linear-gradient(180deg, rgba(245, 196, 81, 0.12), rgba(245, 196, 81, 0.04));
}
.notice strong { color: var(--accent); }
.btn-sm { padding: 10px 18px; font-size: 0.86rem; }
