/* Account page (crux-account.html): sidebar app shell, overview, journal, binder, rosary, classes & profile.
   Tokens, buttons, and the rosary art come from crux-home.css; saint cards from crux-card-ui.css. */

:root {
  /* Names used by the sign-in forms, modals, and teacher/family tools */
  --navy-card: #1c2240;
  --gold-dark: #b8895a;
  --text-primary: #ffffff;
  --text-secondary: rgba(255,255,255,0.74);
  --border: rgba(212,165,116,0.15);
  --border-gold: rgba(212,165,116,0.32);
}

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 1.5rem; }
.serif { font-family: var(--serif); }
.muted { color: var(--text-muted); }

/* Small buttons */
.btn-small {
  font-family: var(--sans); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.3px; cursor: pointer;
  padding: 0.6rem 1rem; border-radius: 7px; border: 1.5px solid var(--gold); background: var(--gold); color: var(--navy-deep);
  text-decoration: none; display: inline-flex; align-items: center; gap: 0.4rem; min-height: 40px;
}
.btn-small.line { background: transparent; color: var(--gold); border-color: rgba(212,165,116,0.35); }
.btn-small.line:hover { border-color: var(--gold); }
.btn-small.danger { background: transparent; color: #e8a0a0; border-color: rgba(232,160,160,0.35); }
.btn-text { background: none; border: 0; color: var(--gold); font: 600 0.78rem var(--sans); cursor: pointer; }

/* Meter */
.meter { height: 6px; border-radius: 3px; background: rgba(255,255,255,0.08); overflow: hidden; }
.meter i { display: block; height: 100%; background: linear-gradient(90deg, #b8834f, var(--gold-light)); border-radius: 3px; }

/* Journal */
.j-entry { border: 1px solid rgba(212,165,116,0.14); border-radius: 12px; background: rgba(37,43,71,0.35); margin-bottom: 0.75rem; }
.j-entry summary { list-style: none; cursor: pointer; padding: 1.05rem 3rem 1.05rem 1.25rem; position: relative; display: flex; flex-direction: column; gap: 0.25rem; }
.j-entry summary::-webkit-details-marker { display: none; }
.j-entry summary::after { content: '+'; position: absolute; right: 1.2rem; top: 50%; transform: translateY(-50%); color: var(--gold); font: 300 1.3rem var(--sans); transition: transform 0.2s; }
.j-entry[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.j-title { font-family: var(--serif); font-size: 1.12rem; }
.j-title b { color: var(--gold-light); margin-right: 0.35rem; }
.j-meta { font-family: var(--sans); font-size: 0.72rem; color: var(--text-muted); letter-spacing: 0.3px; }
.j-body { padding: 0 1.25rem 1.2rem; }
.j-resp { padding: 1rem 0; border-top: 1px solid rgba(255,255,255,0.06); }
.j-prompt { font-family: var(--sans); font-size: 0.8rem; line-height: 1.5; color: var(--text-muted); }
.j-answer { font-size: 1.15rem; line-height: 1.6; color: var(--white); margin-top: 0.45rem; }
.j-saved { margin: 0.45rem 0 0; padding-left: 0.85rem; border-left: 2px solid var(--gold); font-style: italic; font-size: 1.05rem; line-height: 1.55; color: var(--text-soft); white-space: pre-line; }
.j-body .link-arrow { display: inline-block; margin-top: 0.6rem; }

/* Card tiers */
.tier { display: grid; grid-template-columns: 1fr auto; gap: 0.3rem 1rem; font-family: var(--sans); font-size: 0.78rem; margin-bottom: 0.7rem; }
.tier span { color: var(--text-soft); }
.tier b { color: var(--white); font-weight: 600; }
.tier i { grid-column: 1 / -1; height: 5px; border-radius: 3px; background: rgba(255,255,255,0.07); overflow: hidden; }
.tier i em { display: block; height: 100%; border-radius: 3px; }
.tier-uncommon i em { background: #7fb38a; }
.tier-rare i em { background: #6f9be0; }
.tier-legendary i em { background: linear-gradient(90deg, #d4a574, #f3d9a8); }

/* Rosary sets */
.r-set { display: grid; grid-template-columns: 6.5rem 1fr 2rem; align-items: center; gap: 0.8rem; font-family: var(--sans); font-size: 0.8rem; margin-bottom: 0.55rem; }
.r-set span { color: var(--text-soft); }
.r-set b { text-align: right; }
.r-set i { height: 6px; border-radius: 3px; background: rgba(255,255,255,0.07); overflow: hidden; }
.r-set i em { display: block; height: 100%; background: var(--gold); border-radius: 3px; }

/* Classes, awards */
.class-list { list-style: none; }
.class-list li { padding: 0.85rem 1rem; border-radius: 10px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06); margin-bottom: 0.6rem; }
.class-list b { display: block; font-family: var(--serif); font-size: 1.08rem; }
.class-list small { font-family: var(--sans); font-size: 0.75rem; color: var(--text-muted); }
.join label { display: block; font-family: var(--sans); font-size: 0.72rem; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--text-muted); margin: 1.1rem 0 0.5rem; }
.join div { display: flex; gap: 0.5rem; }
.join input, .fld input, .fld textarea {
  flex: 1; min-width: 0; width: 100%; padding: 0.7rem 0.85rem; border-radius: 8px; border: 1px solid rgba(212,165,116,0.2);
  background: rgba(255,255,255,0.04); color: var(--white); font: 400 0.95rem var(--sans);
}
.award { padding: 0.9rem 1rem; border-radius: 10px; background: rgba(212,165,116,0.06); border: 1px solid rgba(212,165,116,0.14); margin-bottom: 0.6rem; }
.award-top { display: flex; justify-content: space-between; gap: 1rem; }
.award-top b { font-family: var(--serif); font-size: 1.05rem; }
.award-top span { font: 700 0.78rem var(--sans); color: var(--gold); white-space: nowrap; }
.award small { font-family: var(--sans); font-size: 0.72rem; color: var(--text-muted); }
.award p { font-style: italic; color: var(--text-soft); margin-top: 0.35rem; font-size: 1.02rem; }

/* Settings */
.set-grid { border: 1px solid rgba(255,255,255,0.07); border-radius: 12px; overflow: hidden; }
.set-row { display: grid; grid-template-columns: 9rem 1fr auto; align-items: center; gap: 1rem; padding: 0.85rem 1rem; border-bottom: 1px solid rgba(255,255,255,0.06); font-family: var(--sans); font-size: 0.85rem; }
.set-row:last-child { border-bottom: 0; }
.set-row span { color: var(--text-muted); }
.set-row b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.set-row .ok { font-style: normal; font-size: 0.72rem; color: #8fc79b; }
h4 { font-family: var(--serif); font-size: 1.2rem; margin: 1.8rem 0 0.3rem; }
.hint { font-size: 1rem; color: var(--text-muted); margin-bottom: 0.8rem; }
.fld { display: block; font-family: var(--sans); font-size: 0.72rem; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--text-muted); margin-bottom: 0.8rem; }
.fld input, .fld textarea { margin-top: 0.4rem; text-transform: none; letter-spacing: 0; resize: vertical; }
.set-acts { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.set-acts.end { margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid rgba(255,255,255,0.06); }

/* Card strips */
.strip { display: flex; gap: 0.8rem; overflow-x: auto; padding: 0.4rem 0.2rem 0.9rem; scrollbar-width: thin; }
.strip .home-card { flex: 0 0 auto; transition: transform 0.2s; }
.strip .home-card:hover { transform: translateY(-4px); }

/* Live rosary art (copied from the homepage) */
.rosary-art .chain { fill: none; stroke: rgba(212,165,116,0.32); stroke-width: 1.3; stroke-dasharray: 2.2 2.6; stroke-linecap: round; }


@media (max-width: 560px) {
  .wrap { padding: 0 1rem; }
  .set-row { grid-template-columns: 1fr auto; }
  .set-row span { grid-column: 1 / -1; margin-bottom: -0.6rem; font-size: 0.72rem; }
}

.shell { display: grid; grid-template-columns: 268px minmax(0, 1fr); min-height: 100vh; }
/* ── Sidebar ── */
.side {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 1.6rem 1.1rem 1.2rem;
  background: linear-gradient(180deg, #161a30, #10132a); border-right: 1px solid rgba(212,165,116,0.12);
  display: flex; flex-direction: column; gap: 1.4rem;
}
.side .logo { font-family: var(--serif); font-weight: 900; letter-spacing: 5px; color: var(--gold); text-decoration: none; font-size: 1.25rem; padding: 0 0.6rem; }
.me { display: grid; grid-template-columns: 48px 1fr; gap: 0.2rem 0.8rem; align-items: center; padding: 1rem 0.8rem; border-radius: 14px; background: rgba(212,165,116,0.07); border: 1px solid rgba(212,165,116,0.14); }
.avatar { grid-row: span 2; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font: 900 1.3rem var(--serif); color: var(--navy-deep); background: linear-gradient(135deg, #f3d9a8, #b8834f); }
.me b { font-family: var(--serif); font-size: 1.15rem; }
.me small { font-family: var(--sans); font-size: 0.72rem; color: var(--gold-light); }
.me .meter { grid-column: 1 / -1; margin-top: 0.6rem; }
.me .xp { grid-column: 1 / -1; display: flex; justify-content: space-between; font: 500 0.7rem var(--sans); color: var(--text-muted); margin-top: 0.1rem; }
.snav { display: flex; flex-direction: column; gap: 2px; }
.snav button, .snav a {
  appearance: none; background: none; border: 0; cursor: pointer; text-align: left; text-decoration: none;
  display: flex; align-items: center; gap: 0.75rem; padding: 0.68rem 0.8rem; border-radius: 9px;
  font: 500 0.86rem var(--sans); color: var(--text-soft);
}
.snav svg { width: 18px; height: 18px; flex: 0 0 auto; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; opacity: 0.85; }
.snav button:hover, .snav a:hover { background: rgba(255,255,255,0.04); color: var(--white); }
.snav button[aria-selected="true"] { background: rgba(212,165,116,0.14); color: var(--gold-light); }
.snav .n { margin-left: auto; font-size: 0.7rem; color: var(--text-muted); }
.snav .dot { margin-left: auto; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.side-label { font: 700 0.62rem var(--sans); letter-spacing: 2.5px; text-transform: uppercase; color: var(--text-muted); padding: 0 0.8rem; margin-bottom: 0.3rem; }
.side .bottom { margin-top: auto; }

/* ── Main ── */
.main { padding: 2.2rem clamp(1.2rem, 3vw, 3rem) 6rem; max-width: 1180px; }
.top { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.top h1 { font-family: var(--serif); font-size: clamp(1.8rem, 3.4vw, 2.5rem); font-weight: 900; line-height: 1.1; }
.top p { color: var(--text-muted); font-size: 1.08rem; margin-top: 0.3rem; }
.view[hidden] { display: none; }

/* Bento */
.bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1rem; }
.tile { border-radius: 16px; padding: 1.4rem; background: rgba(37,43,71,0.5); border: 1px solid rgba(212,165,116,0.13); position: relative; overflow: hidden; display: flex; flex-direction: column; }
.tile .k { font: 700 0.66rem var(--sans); letter-spacing: 2px; text-transform: uppercase; color: var(--gold); }
.tile h2 { font-family: var(--serif); font-size: 1.5rem; line-height: 1.2; margin: 0.45rem 0 0.35rem; }
.tile p { color: var(--text-soft); font-size: 1.04rem; line-height: 1.5; }
.tile .open { margin-top: auto; padding-top: 1rem; background: none; border: 0; text-align: left; cursor: pointer; font: 700 0.78rem var(--sans); color: var(--gold); text-decoration: none; }
.t-next { grid-column: span 4; grid-row: span 2; background: linear-gradient(150deg, rgba(212,165,116,0.16), rgba(26,31,54,0.95) 55%); border-color: rgba(212,165,116,0.3); }
.path { list-style: none; margin: 1.1rem 0 0.4rem; display: grid; gap: 0.15rem; }
.path li { display: grid; grid-template-columns: 26px 1fr; gap: 0.8rem; align-items: center; padding: 0.42rem 0; font-size: 1.05rem; color: var(--text-muted); }
.path li::before { content: ''; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,0.2); justify-self: center; }
.path li.d { color: var(--text-soft); }
.path li.d::before { background: var(--gold); border-color: var(--gold); box-shadow: inset 0 0 0 4px #20253f; }
.path li.n { color: var(--white); font-weight: 600; }
.path li.n::before { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(212,165,116,0.2); }
.path li.n span::after { content: 'Up next'; margin-left: 0.6rem; font: 700 0.62rem var(--sans); letter-spacing: 1.5px; text-transform: uppercase; color: var(--navy-deep); background: var(--gold); padding: 0.2rem 0.45rem; border-radius: 4px; vertical-align: middle; display: inline-block; white-space: nowrap; }
.t-next .btn-primary { align-self: flex-start; margin-top: auto; }
.t-pray { grid-column: span 2; grid-row: span 2; align-items: center; text-align: center; }
.t-pray svg.rosary-art { height: 250px; width: auto; margin: 0.4rem 0 0.2rem; }
.t-pray .open { text-align: center; }
.t-journal { grid-column: span 3; }
.t-journal blockquote { font-size: 1.12rem; font-style: italic; line-height: 1.5; color: var(--white); margin-top: 0.6rem; }
.t-binder { grid-column: span 3; }
.t-wait { grid-column: span 6; flex-direction: row; align-items: center; gap: 0.6rem; flex-wrap: wrap; padding: 1rem 1.4rem; background: transparent; border-style: dashed; }
.chip { font: 600 0.74rem var(--sans); padding: 0.45rem 0.8rem; border-radius: 999px; border: 1px solid var(--gold-border); color: var(--text-soft); text-decoration: none; background: rgba(255,255,255,0.02); cursor: pointer; }
.chip.gold { color: var(--gold-light); border-color: rgba(212,165,116,0.4); background: var(--gold-dim); }

/* Favorite saints shelf (from Draft 3) */
.shelf { border-radius: 16px; padding: 1.3rem 1.4rem 1rem; margin-bottom: 1rem; text-align: center; background: radial-gradient(ellipse at 50% 0%, rgba(212,165,116,0.13), rgba(26,31,54,0.6) 70%); border: 1px solid rgba(212,165,116,0.22); }
.shelf-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.shelf-head .k { font: 700 0.66rem var(--sans); letter-spacing: 2px; text-transform: uppercase; color: var(--gold); }
.shelf-head button { background: none; border: 0; cursor: pointer; font: 700 0.74rem var(--sans); color: var(--gold); }
.shelf-row { display: flex; justify-content: center; gap: 1.2rem; margin-top: 1rem; padding-bottom: 1rem; position: relative; }
.shelf-row::after { content: ''; position: absolute; left: 8%; right: 8%; bottom: 0; height: 3px; border-radius: 2px; background: linear-gradient(90deg, transparent, rgba(212,165,116,0.55), transparent); }
.shelf-row .home-card { transition: transform 0.2s; }
.shelf-row .home-card:hover { transform: translateY(-4px); }
.shelf.big-shelf .shelf-row { gap: 1.6rem; }
.t-binder .big { margin: 0.6rem 0 0.9rem; }

/* Journal two-pane */
.reader { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 1.4rem; align-items: start; }
.studies { display: grid; gap: 0.6rem; }
.studies button { appearance: none; text-align: left; cursor: pointer; padding: 1rem 1.1rem; border-radius: 12px; border: 1px solid rgba(255,255,255,0.07); background: rgba(255,255,255,0.02); color: var(--white); }
.studies button b { display: block; font-family: var(--serif); font-size: 1.12rem; }
.studies button span { display: block; font-size: 0.98rem; color: var(--text-soft); }
.studies button small { display: block; font: 500 0.7rem var(--sans); color: var(--text-muted); margin-top: 0.4rem; }
.studies button.on { border-color: var(--gold); background: rgba(212,165,116,0.1); }
.page { border-radius: 16px; padding: 2rem 2.2rem; background: rgba(37,43,71,0.45); border: 1px solid rgba(212,165,116,0.13); }
.page h2 { font-family: var(--serif); font-size: 1.7rem; }
.page .sub { font: 500 0.75rem var(--sans); color: var(--text-muted); margin: 0.3rem 0 1rem; }
.page .j-resp:first-of-type { border-top: 0; }

/* Binder view */
.b-head { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 1.4rem; margin-bottom: 1.8rem; }
.box { border-radius: 16px; padding: 1.4rem; background: rgba(37,43,71,0.45); border: 1px solid rgba(212,165,116,0.13); }
.box h3 { font: 700 0.68rem var(--sans); letter-spacing: 2.5px; text-transform: uppercase; color: var(--gold); margin-bottom: 1rem; }
.box + .box { margin-top: 1rem; }
.b-head .box + .box { margin-top: 0; align-self: start; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 1rem; }
.grid-cards .ccard { --w: 118px !important; }
.big { font-family: var(--serif); font-size: 2.4rem; font-weight: 900; color: var(--gold-light); line-height: 1; }
.big small { font-size: 1rem; color: var(--text-muted); font-weight: 400; }
.acts { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 1.1rem; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.4rem; align-items: start; }
.r-hero { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 1.6rem; align-items: center; }
.r-hero svg.rosary-art { height: 300px; width: auto; }

/* Phone: top bar + bottom tab bar */
.mtop, .mbar { display: none; }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { display: none; }
  .mtop { display: flex; position: sticky; top: 0; z-index: 60; align-items: center; justify-content: space-between; padding: 0.8rem 1rem; background: rgba(15,18,34,0.95); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(212,165,116,0.1); }
  .mtop .logo { font-family: var(--serif); font-weight: 900; letter-spacing: 4px; color: var(--gold); text-decoration: none; }
  .mtop .who { display: flex; align-items: center; gap: 0.6rem; font: 600 0.75rem var(--sans); color: var(--gold-light); }
  .mtop .avatar { width: 34px; height: 34px; font-size: 1rem; }
  .mbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: rgba(15,18,34,0.97); border-top: 1px solid rgba(212,165,116,0.15); padding: 0.35rem 0 calc(0.35rem + env(safe-area-inset-bottom)); }
  .mbar button { appearance: none; background: none; border: 0; display: flex; flex-direction: column; align-items: center; gap: 0.2rem; padding: 0.4rem 0; font: 600 0.62rem var(--sans); color: var(--text-muted); cursor: pointer; }
  .mbar svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
  .mbar button[aria-selected="true"] { color: var(--gold); }
  .main { padding: 1.4rem 1rem 7rem; }
  .bento { grid-template-columns: 1fr; }
  .t-next, .t-pray, .t-journal, .t-binder, .t-wait { grid-column: auto; grid-row: auto; }
  .t-pray { display: grid; grid-template-columns: minmax(0, 1fr) auto; text-align: left; align-items: center; gap: 0 1rem; }
  .t-pray svg.rosary-art { height: 150px; margin: 0; grid-row: span 2; }
  .t-pray .open { text-align: left; padding-top: 0.6rem; }
  .shelf { padding: 1rem 0.7rem 0.8rem; }
  .shelf-row { gap: 0.4rem; }
  .shelf-row .ccard { --w: 62px !important; }
  .shelf.big-shelf .shelf-row { gap: 0.4rem; }
  .reader, .b-head, .split, .r-hero { grid-template-columns: 1fr; }
  .page { padding: 1.4rem; }
  .grid-cards { grid-template-columns: repeat(3, 1fr); gap: 0.6rem; }
  .grid-cards .ccard { --w: 100px !important; }
}

/* ── Signed out: sign in, reset, register ── */
.account-container {
    max-width: 960px;
    width: 100%;
    margin: 0 auto;
    padding: 3rem 1.5rem 5rem;
    position: relative;
    z-index: 1;
}

/* ─── LOGO ─────────────────────────────────────── */
.auth-logo {
    text-align: center;
    margin-bottom: 2.5rem;
}

.auth-logo h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    font-weight: 900;
    letter-spacing: 10px;
    background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 50%, var(--gold-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.auth-logo p {
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 400;
    letter-spacing: 4px;
    text-transform: uppercase;
}

/* ─── AUTH CARDS ────────────────────────────────── */
.auth-card {
    max-width: 440px;
    margin: 0 auto;
    background: rgba(28, 34, 64, 0.9);
    border: 1px solid var(--border-gold);
    border-radius: 16px;
    padding: 2.5rem;
    backdrop-filter: blur(12px);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(212, 165, 116, 0.06);
}

.auth-card h2 {
    font-family: 'Playfair Display', serif;
    color: var(--text-primary);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
}

.firebase-badge {
    background: rgba(212, 165, 116, 0.08);
    color: var(--gold);
    border: 1px solid rgba(212, 165, 116, 0.2);
    padding: 0.35rem 0.9rem;
    border-radius: 20px;
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    display: inline-block;
    margin-bottom: 1.5rem;
}

/* ─── FORMS ─────────────────────────────────────── */
.form-group { margin-bottom: 1.25rem; }

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    letter-spacing: 0.9px;
    text-transform: uppercase;
}

.form-group input {
    width: 100%;
    padding: 0.9rem 1rem;
    border: 1.5px solid rgba(212, 165, 116, 0.18);
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 165, 116, 0.1);
}

.form-group input::placeholder { color: rgba(240, 236, 228, 0.22); }

/* ─── BUTTONS ───────────────────────────────────── */
.auth-card .btn {
    width: 100%;
    padding: 0.95rem;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.4px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.auth-card .btn-primary {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: var(--navy-deep);
}

.auth-card .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(212, 165, 116, 0.35);
}

.auth-card .btn-secondary {
    background: rgba(212, 165, 116, 0.1);
    color: var(--gold);
    border: 1px solid rgba(212, 165, 116, 0.25);
    margin-top: 0.75rem;
}

.auth-card .btn-secondary:hover {
    background: rgba(212, 165, 116, 0.18);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(212, 165, 116, 0.2);
}

.auth-card .btn-logout {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 0.75rem;
}

.auth-card .btn-logout:hover {
    border-color: #ef4444;
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.06);
}

/* ─── TOGGLE AUTH ───────────────────────────────── */
.toggle-auth {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.toggle-auth a {
    color: var(--gold);
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    touch-action: manipulation;
}

.toggle-auth a:hover { text-decoration: underline; }

/* ─── MESSAGES ──────────────────────────────────── */
.error-message {
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
    padding: 0.85rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 3px solid #ef4444;
    font-size: 0.875rem;
}

.success-message {
    background: rgba(34, 197, 94, 0.1);
    color: #86efac;
    padding: 0.85rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 3px solid #22c55e;
    font-size: 0.875rem;
}

/* ─── ROLE TOGGLE ───────────────────────────────── */
.role-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    padding: 0.85rem 0.5rem;
    border: 1.5px solid rgba(212, 165, 116, 0.15);
    border-radius: 10px;
    text-align: center;
    transition: all 0.2s;
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    color: var(--text-primary);
}

.role-option.role-active {
    border-color: var(--gold);
    background: rgba(212, 165, 116, 0.1);
}

.role-option:hover { border-color: var(--gold-dark); }

/* ── Notices: confirm email, Alpha Pack gift ── */
.verify-banner { margin: 0 0 1rem; }
.verify-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; background: rgba(212, 165, 116, 0.08); border: 1px solid var(--border-gold); border-radius: 12px; padding: 1rem 1.25rem; font-family: 'Inter', sans-serif; font-size: 0.9rem; line-height: 1.5; color: var(--text-secondary); }
.verify-banner strong { color: var(--text-primary); display: block; }
.verify-text { flex: 1 1 320px; min-width: 0; }
.verify-status { display: block; margin-top: 0.25rem; color: var(--gold-light); font-weight: 600; }
.verify-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.verify-btn { font: 600 0.82rem 'Inter', sans-serif; padding: 0.6rem 1rem; border-radius: 8px; border: 1px solid var(--border-gold); background: transparent; color: var(--gold); cursor: pointer; min-height: 40px; }
.verify-btn-primary { background: var(--gold); color: var(--navy-deep); border-color: var(--gold); }
.verify-btn:disabled { opacity: 0.55; cursor: default; }
.alpha-gift-banner {
    display: none;
    background: linear-gradient(135deg, rgba(26,31,54,0.97) 0%, rgba(20,24,44,0.97) 100%);
    border: 1px solid rgba(212,165,116,0.4);
    border-radius: 16px;
    padding: 1.75rem 2rem;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
    animation: giftSlideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.alpha-gift-banner.visible { display: block; }
.alpha-gift-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 20% 50%, rgba(212,165,116,0.07) 0%, transparent 60%);
    pointer-events: none;
}
@keyframes giftSlideIn {
    from { opacity: 0; transform: translateY(-16px); }
    to   { opacity: 1; transform: translateY(0); }
}
.gift-dismiss {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    line-height: 1;
    padding: 0.25rem;
    transition: color 0.15s;
}
.gift-dismiss:hover { color: var(--gold); }
.gift-eyebrow {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 0.5rem;
}
.gift-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.35rem;
}
.gift-body {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.1rem;
    line-height: 1.6;
}
.gift-cards {
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}
.gift-card-chip {
    padding: 0.25rem 0.65rem;
    background: rgba(212,165,116,0.1);
    border: 1px solid rgba(212,165,116,0.22);
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--gold-dark);
    letter-spacing: 0.3px;
}
.gift-card-chip.legendary {
    background: rgba(212,165,116,0.18);
    border-color: rgba(212,165,116,0.45);
    color: var(--gold);
}
.gift-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--gold);
    color: var(--navy);
    font-size: 0.82rem;
    font-weight: 700;
    padding: 0.55rem 1.2rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: background 0.15s;
    text-decoration: none;
}
.gift-cta:hover { background: var(--gold-light); }

/* ── 1-of-1 and module cards ── */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 1rem;
}

/* My Binder summary (cards come from crux-card-ui) */
.saint-card {
    width: 100px;
    height: 142px;
    border-radius: 10px;
    background: linear-gradient(170deg, #1c2650 0%, #0f1535 100%);
    border: 1px solid rgba(212, 165, 116, 0.28);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.6), 0 1px 0 rgba(255, 255, 255, 0.05) inset;
    flex-shrink: 0;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    cursor: default;
}

.saint-card:hover {
    transform: translateY(-5px) rotate(1.5deg);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.7), 0 0 22px rgba(212, 165, 116, 0.12);
}

.saint-card::before {
    content: '✟';
    position: absolute;
    font-size: 6.5rem;
    color: rgba(212, 165, 116, 0.07);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -56%);
    line-height: 1;
}

.card-rarity-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--gold) 50%, transparent 100%);
}

.card-wordmark {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-size: 0.95rem;
    letter-spacing: 5px;
    background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 50%, var(--gold-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 1;
}

.card-saint-name {
    position: absolute;
    bottom: 9px;
    font-size: 0.5rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: rgba(212, 165, 116, 0.55);
    z-index: 1;
    text-align: center;
    width: 88%;
}

.card-cta {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.6rem;
    padding-left: 0.5rem;
}

.pack-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(212, 165, 116, 0.07);
    border: 1px solid rgba(212, 165, 116, 0.18);
    color: var(--gold-dark);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    text-transform: uppercase;
}

.saint-card.clickable { cursor: pointer; text-decoration: none; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.saint-card.clickable:hover { transform: translateY(-6px) rotate(1.5deg); box-shadow: 0 20px 48px rgba(0,0,0,0.7), 0 0 28px rgba(212,165,116,0.18); }
.saint-card.clickable::after { content: 'View →'; position: absolute; bottom: 26px; font-size: 0.42rem; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: rgba(212,165,116,0.6); opacity: 0; transition: opacity 0.2s; }
.saint-card.clickable:hover::after { opacity: 1; }

.saint-card.oneof1 {
    border: none;
    padding: 0;
    overflow: hidden;
    position: relative;
}
.saint-card.oneof1::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 12px;
    background: linear-gradient(90deg,#ff0080,#ff8c00,#ffe000,#00ff80,#00c8ff,#8000ff,#ff0080);
    background-size: 200% 100%;
    animation: rainbow-strip 3s linear infinite;
    z-index: 0;
}
.saint-card.oneof1 .oneof1-inner {
    position: relative;
    z-index: 1;
    background: #0c0a14;
    border-radius: 10px;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    gap: 0.35rem;
}
.saint-card.oneof1 .oneof1-name {
    font-family: 'Cinzel', serif;
    font-size: 0.62rem;
    font-weight: 700;
    color: #fff;
    text-align: center;
    letter-spacing: 0.5px;
    line-height: 1.3;
}
.saint-card.oneof1 .oneof1-sub {
    font-family: 'EB Garamond', serif;
    font-size: 0.65rem;
    font-style: italic;
    color: rgba(255,255,255,0.45);
    text-align: center;
}
.saint-card.oneof1 .oneof1-badge {
    font-family: 'Cinzel', serif;
    font-size: 0.42rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    background: linear-gradient(90deg,#ff0080,#ff8c00,#ffe000,#00ff80,#00c8ff,#8000ff);
    background-size: 200% 100%;
    animation: rainbow-strip 3s linear infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.saint-card.oneof1:hover::after { content: 'View Card →'; }
@keyframes rainbow-text {
    0%   { background-position: 0% 0; }
    100% { background-position: 200% 0; }
}
@keyframes rainbow-strip {
    0%   { background-position: 0% 0; }
    100% { background-position: 200% 0; }
}

.card-rarity-bar.legendary {
    background: linear-gradient(90deg, transparent 0%, #d4a574 20%, #f5e6c8 50%, #d4a574 80%, transparent 100%);
    height: 3px;
    animation: legendaryShimmer 2.5s ease-in-out infinite;
}
@keyframes legendaryShimmer {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}
.card-rarity-bar.epic {
    background: linear-gradient(90deg, transparent 0%, #b464ff 20%, #dba8ff 50%, #b464ff 80%, transparent 100%);
    height: 3px;
    animation: legendaryShimmer 2.5s ease-in-out infinite;
}
.card-rarity-bar.rare {
    background: linear-gradient(90deg, transparent 0%, #8ab4d4 50%, transparent 100%);
    height: 2px;
}
.card-rarity-bar.uncommon {
    background: linear-gradient(90deg, transparent 0%, #6dbd8a 50%, transparent 100%);
    height: 2px;
}

.card-rarity-badge {
    position: absolute;
    bottom: 24px;
    font-size: 0.38rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(212,165,116,0.4);
    z-index: 1;
}

/* ── Favorites picker and add-child modals ── */
.fav-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    z-index: 500;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}
.fav-modal-overlay.open { display: flex; }
.fav-modal {
    background: var(--navy-light);
    border: 1px solid rgba(212,165,116,0.2);
    border-radius: 16px;
    width: 100%;
    max-width: 700px;
    height: 90vh;
    max-height: 760px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.fav-modal-head {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}
.fav-modal-title {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}
.fav-modal-sub {
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}
.fav-modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    line-height: 1;
    padding: 0.25rem;
    transition: color 0.15s;
}
.fav-modal-close:hover { color: var(--gold); }
.fav-modal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
    justify-items: center;
    grid-auto-rows: max-content;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem;
    align-content: start;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}
.fav-selectable {
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.15s;
    position: relative;
    width: 104px;
    padding: 2px;
}
.fav-selectable:hover { border-color: rgba(212,165,116,0.4); }
.fav-selectable.selected { border-color: var(--gold); box-shadow: 0 0 12px rgba(212,165,116,0.3); }
.fav-selectable.selected::after {
    content: '✓';
    position: absolute;
    z-index: 5;
    top: 0.3rem;
    right: 0.3rem;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--gold);
    color: var(--navy);
    font-size: 0.65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
.fav-selectable > img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    display: block;
}
.fav-selectable-name {
    padding: 0.3rem 0.4rem;
    background: rgba(15,18,34,0.95);
    font-family: 'Inter', sans-serif;
    font-size: 0.55rem;
    font-weight: 600;
    color: rgba(212,165,116,0.7);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.fav-modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.07);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}
.fav-count-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    color: var(--text-muted);
}
.fav-save-btn {
    font-family: 'Cinzel', serif;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--navy);
    background: var(--gold);
    border: none;
    border-radius: 4px;
    padding: 0.5rem 1.25rem;
    cursor: pointer;
    transition: opacity 0.2s;
}
.fav-save-btn:hover { opacity: 0.85; }
.fav-save-btn:disabled { opacity: 0.4; cursor: default; }
.fav-page-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.fav-page-btn {
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 0.9rem;
    line-height: 1;
    width: 28px;
    height: 28px;
    cursor: pointer;
    transition: background 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.fav-page-btn:hover:not(:disabled) { background: rgba(212,165,116,0.15); color: var(--gold); }
.fav-page-btn:disabled { opacity: 0.3; cursor: default; }
.fav-page-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.68rem;
    color: var(--text-muted);
    min-width: 60px;
    text-align: center;
}

/* ─── DASHBOARD GRID ────────────────────────────── */

/* ── Family (parent accounts) ── */
.parent-section {
    background: rgba(28, 34, 64, 0.55);
    border: 1px solid rgba(212, 165, 116, 0.18);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.parent-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}
.parent-section-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
}
.children-grid {
    display: flex;
    gap: 0.85rem;
    flex-wrap: wrap;
}
.child-card {
    background: rgba(255,255,255,0.04);
    border: 2px solid rgba(212,165,116,0.14);
    border-radius: 12px;
    padding: 1.1rem 1.1rem 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 110px;
    text-align: center;
    position: relative;
    user-select: none;
}
.child-card:hover {
    border-color: rgba(212,165,116,0.4);
    background: rgba(212,165,116,0.06);
    transform: translateY(-2px);
}
.child-card.active-child {
    border-color: var(--gold);
    background: rgba(212,165,116,0.1);
}
.child-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
    color: var(--navy-deep);
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.6rem;
}
.child-name {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}
.child-meta {
    font-size: 0.66rem;
    color: var(--text-muted);
    letter-spacing: 0.3px;
}
.child-active-dot {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gold);
    display: none;
}
.child-card.active-child .child-active-dot { display: block; }
.add-child-tile {
    background: transparent;
    border: 2px dashed rgba(212,165,116,0.22);
    border-radius: 12px;
    padding: 1.1rem 1.1rem 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 110px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-family: 'Inter', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}
.add-child-tile:hover {
    border-color: rgba(212,165,116,0.5);
    color: var(--gold);
    background: rgba(212,165,116,0.04);
    transform: translateY(-2px);
}
.active-child-bar {
    display: none;
    margin-top: 1rem;
    padding: 0.65rem 1rem;
    background: rgba(212,165,116,0.07);
    border: 1px solid rgba(212,165,116,0.18);
    border-radius: 8px;
    font-size: 0.8rem;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.active-child-bar.visible { display: flex; }
.active-child-bar-text { color: var(--text-muted); }
.active-child-bar-text strong { color: var(--gold); }
.active-child-bar-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    text-decoration: underline;
    white-space: nowrap;
    padding: 0;
}
.active-child-bar-btn:hover { color: var(--text-secondary); }
/* Add child modal */
.add-child-modal-inner {
    background: var(--navy-mid);
    border: 1px solid rgba(212,165,116,0.22);
    border-radius: 16px;
    width: 100%;
    max-width: 380px;
    padding: 2rem;
}
.add-child-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}
.add-child-modal-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
}
.add-child-modal-sub {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.5;
    max-width: 260px;
}

/* ─── PROGRESS BAR ──────────────────────────────── */

/* ── Classes, teacher setup ── */
.btn-join {
    padding: 0.875rem 1.25rem;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--navy-deep);
    border: none;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    letter-spacing: 0.3px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.btn-join:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(212, 165, 116, 0.35);
}

.btn-join:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

.join-feedback {
    margin-top: 0.6rem;
    font-size: 0.85rem;
    font-weight: 600;
    display: none;
}

.join-feedback.success { color: #86efac; display: block; }
.join-feedback.error   { color: #fca5a5; display: block; }
.no-data {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
    text-align: center;
    padding: 0.75rem;
}

/* ─── CLASS CODE DISPLAY ────────────────────────── */
.class-code-display {
    background: rgba(212, 165, 116, 0.08);
    color: var(--gold);
    font-family: 'Courier New', monospace;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    text-align: center;
    padding: 1rem;
    border-radius: 10px;
    margin: 0.75rem 0;
    cursor: pointer;
    transition: opacity 0.2s, background 0.2s;
    user-select: all;
    border: 1px solid rgba(212, 165, 116, 0.22);
}

.class-code-display:hover { opacity: 0.8; }
.class-code-hint { font-size: 0.75rem; color: var(--text-muted); text-align: center; margin-top: 0.3rem; }

/* ─── TEACHER CARD VARIANTS ─────────────────────── */

/* ── Signed-in shell vs. sign-in forms ── */
body:not(.signed-in) .mtop, body:not(.signed-in) .mbar, body:not(.signed-in) .shell { display: none !important; }
body.signed-in #authView { display: none; }
#authView { min-height: 100vh; font-family: var(--sans); }
#authView .back-link { display: inline-block; margin: 1.2rem 0 0 1.2rem; font: 600 0.78rem var(--sans); color: var(--text-muted); text-decoration: none; }
#authView .back-link:hover { color: var(--gold); }
.auth-card .form-group label, .auth-card .toggle-auth, .auth-card .error-message, .auth-card .success-message { font-family: var(--sans); }

/* ── Notices above every view ── */
.notices > * + * { margin-top: 0; }
.notices:empty { display: none; }
.alpha-gift-banner { font-family: var(--sans); }
.parent-section { font-family: var(--sans); }
.parent-section-head .btn-text { font-size: 0.74rem; }

/* ── Empty states and small bits ── */
.empty { color: var(--text-muted); font-size: 1.05rem; line-height: 1.55; }
.empty a, .empty button { color: var(--gold); }
.no-data { font-family: var(--sans); }
.shelf-empty { padding: 1.2rem 0 0.6rem; color: var(--text-soft); font-size: 1.05rem; }
.shelf-empty .btn-small { margin-top: 0.8rem; }
.t-next .sub-link { margin-top: 0.8rem; font: 600 0.74rem var(--sans); color: var(--text-muted); text-decoration: none; }
.t-next .sub-link:hover { color: var(--gold); }
.t-next .acts-row { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; margin-top: auto; }
.t-next .acts-row .btn-primary { margin-top: 0; }
.stories-list { display: grid; gap: 0.5rem; }
.stories-list a { display: block; padding: 0.7rem 0.9rem; border-radius: 10px; border: 1px solid rgba(212,165,116,0.18); text-decoration: none; }
.stories-list b { display: block; font-family: var(--serif); font-size: 1.02rem; }
.stories-list small { font: 500 0.72rem var(--sans); color: var(--text-muted); }

/* XP breakdown */
.xp-rows { display: grid; gap: 0.1rem; font-family: var(--sans); font-size: 0.85rem; }
.xp-rows div { display: flex; justify-content: space-between; padding: 0.5rem 0; border-bottom: 1px solid rgba(255,255,255,0.06); }
.xp-rows span { color: var(--text-muted); }
.xp-rows .tot { border-bottom: 0; font-weight: 700; color: var(--gold-light); }
.xp-level { display: flex; justify-content: space-between; font: 500 0.74rem var(--sans); color: var(--text-muted); margin: 1rem 0 0.4rem; }
.pack-nudge { margin-top: 1rem; padding: 0.9rem 1rem; border-radius: 10px; background: var(--gold-dim); border: 1px solid rgba(212,165,116,0.3); display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; flex-wrap: wrap; font-family: var(--sans); font-size: 0.82rem; color: var(--text-soft); }
.pack-nudge[hidden] { display: none; }

/* Settings extras */
.set-row .edit-row { display: flex; gap: 0.4rem; grid-column: 2 / -1; }
.set-row .edit-row input { flex: 1; min-width: 0; padding: 0.5rem 0.7rem; border-radius: 7px; border: 1px solid rgba(212,165,116,0.3); background: rgba(255,255,255,0.04); color: var(--white); font: 400 0.9rem var(--sans); }
.set-row .warn { font-style: normal; font-size: 0.72rem; color: var(--gold-light); }
.save-note { font: 600 0.78rem var(--sans); color: #8fc79b; align-self: center; }
.save-note.err { color: #fca5a5; }
.join input { text-transform: uppercase; letter-spacing: 0.1em; }
.join-feedback { font-family: var(--sans); }
#teacherSetupContent .form-group { margin-bottom: 0.8rem; }
#teacherSetupContent .form-group label { display: block; font: 600 0.72rem var(--sans); letter-spacing: 1px; text-transform: uppercase; color: var(--text-muted); margin-bottom: 0.4rem; }
#teacherSetupContent p { font-family: var(--sans); }
.child-view .hide-for-child { display: none !important; }
.t-journal blockquote { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }

/* hidden always wins over display rules above */
[hidden] { display: none !important; }
.join input::placeholder { text-transform: none; letter-spacing: 0; }
.forgot-row { display: flex; justify-content: flex-end; margin: -0.4rem 0 1rem; }
.link-btn { background: none; border: 0; padding: 0; color: var(--gold); font: 500 0.82rem 'Inter', sans-serif; cursor: pointer; }
.link-btn:hover { color: var(--gold-light); text-decoration: underline; }
.auth-help { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.5; margin: 0 0 1.25rem; }
.t-next.no-path { grid-row: auto; }
.main { min-width: 0; }
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .grid-cards { gap: 0.5rem; }
  .grid-cards .ccard { --w: 92px !important; }
}

/* ── Favorite saints showcase (Overview): five equal cards on a lit shelf ── */
.showcase { position: relative; border-radius: 18px; padding: 1.1rem 1.4rem 0.9rem; margin-bottom: 1.1rem; text-align: center;
  background: radial-gradient(ellipse 75% 70% at 50% 0%, rgba(212,165,116,0.18), rgba(212,165,116,0) 70%), linear-gradient(180deg, #1c2241 0%, #151a33 100%);
  border: 1px solid rgba(212,165,116,0.28); box-shadow: inset 0 1px 0 rgba(255,236,190,0.1); }
.showcase-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.showcase-head .k { font: 700 0.68rem var(--sans); letter-spacing: 2.5px; text-transform: uppercase; color: var(--gold); }
.showcase-head button { background: none; border: 0; cursor: pointer; font: 700 0.76rem var(--sans); color: var(--gold); }
.showcase-stage { position: relative; display: flex; justify-content: center; align-items: flex-end; gap: 24px; padding: 1rem 0 1rem; }
.showcase-stage::after { content: ''; position: absolute; left: 8%; right: 8%; bottom: 0.45rem; height: 2px; border-radius: 2px; background: linear-gradient(90deg, transparent, rgba(232,201,160,0.7), transparent); box-shadow: 0 0 14px rgba(212,165,116,0.4); }
.sc-slot { position: relative; transition: transform 0.25s ease; }
.sc-slot::before { content: ''; position: absolute; left: 50%; top: -18%; width: 160%; height: 110%; transform: translateX(-50%); pointer-events: none; z-index: -1;
  background: radial-gradient(ellipse 50% 55% at 50% 30%, rgba(255,232,180,0.16), rgba(255,232,180,0) 70%); }
.sc-slot .home-card { display: block; }
.sc-slot .ccard { filter: drop-shadow(0 12px 18px rgba(0,0,0,0.5)); transition: filter 0.25s; }
.sc-slot:hover, .sc-slot.on { transform: translateY(-6px); }
.sc-slot.on .ccard { filter: drop-shadow(0 12px 18px rgba(0,0,0,0.5)) drop-shadow(0 0 16px rgba(255,214,120,0.45)); }
.showcase-spot { min-height: 1.6rem; display: flex; justify-content: center; align-items: baseline; gap: 0.7rem; flex-wrap: wrap; font-size: 1rem; line-height: 1.4; }
.sc-hint { font: 500 0.78rem var(--sans); color: var(--text-muted); }
.sc-name { font-family: var(--serif); font-weight: 700; font-size: 1.15rem; color: var(--white); }
.sc-quote { font-family: var(--serif); font-style: italic; color: var(--text-soft); max-width: 46ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-link { font: 700 0.74rem var(--sans); color: var(--gold); text-decoration: none; white-space: nowrap; }
.sc-link:hover { color: var(--gold-light); }
@media (max-width: 700px) {
  .showcase { padding: 0.9rem 0.8rem 0.8rem; }
  .showcase-stage { gap: 8px; }
  .sc-quote { display: none; }
}
