/* ============================================================
   Fyreside portal — themed subscriber experience
   Three themes (Atelier · Hearth · Studio) × Light/Dark
   Mobile-first; desktop shows a centered 440px column.
   ============================================================ */

.portal-themed { --tab-h: 66px; }
.portal-themed *,
.portal-themed *::before,
.portal-themed *::after { box-sizing: border-box; }

.portal-themed { background: var(--bg); color: var(--ink); min-height: 100vh; font-size: 14px; line-height: 1.5; }

/* Links and buttons inherit color and drop defaults — components paint accents themselves. */
.portal-themed a { color: inherit; text-decoration: none; }
.portal-themed button { font-family: inherit; color: inherit; background: transparent; }

/* Default SVG sizing inside small chrome (play, icons, tag arrows) */
.portal-themed .cover .play svg,
.portal-themed .hero .play svg { width: 12px; height: 12px; }
.portal-themed .back svg,
.portal-themed .ic svg { width: 14px; height: 14px; }

/* Mobile: full width. Desktop: center and frame */
.portal-themed .scr {
    max-width: 460px;
    margin: 0 auto;
    background: var(--bg);
    color: var(--ink);
    min-height: 100vh;
    padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 12px);
    position: relative;
    font-size: 14px;
    line-height: 1.5;
}
@media (min-width: 768px) {
    .portal-themed { padding: 24px 12px; }
    .portal-themed .scr {
        min-height: calc(100vh - 48px);
        border-radius: 20px;
        box-shadow: 0 24px 60px -28px rgba(0,0,0,.25);
        overflow: hidden;
    }
}

/* Shared buttons */
.portal-themed .btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    padding: 11px 16px; border-radius: 10px;
    font: 500 13px Inter, system-ui, sans-serif;
    cursor: pointer; border: 0; text-decoration: none;
}
.portal-themed .btn.primary { background: var(--accent); color: #fff; }
.portal-themed .btn.ink { background: var(--ink); color: var(--bg); }
.portal-themed .btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--ink); }
.portal-themed .btn-sm { padding: 8px 12px; font-size: 12px; }

/* Bottom tab bar */
.portal-themed .tabbar {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
    background: var(--surface);
    border-top: 1px solid var(--line);
    padding: 8px 10px calc(10px + env(safe-area-inset-bottom));
    display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px;
    max-width: 460px; margin: 0 auto;
    backdrop-filter: blur(10px);
}
.portal-themed .tabbar .tb {
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    font-size: 10px; color: var(--ink-2);
    padding: 6px 2px; border-radius: 8px; font-weight: 500;
    text-decoration: none;
}
.portal-themed .tabbar .tb.active { color: var(--accent); }
.portal-themed .tabbar .tb svg { width: 20px; height: 20px; stroke-width: 2; }
.portal-themed .tabbar .tb.active svg { stroke-width: 2.2; }

/* Top bar (shared shell inside each screen) */
.portal-themed .topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 16px 12px;
}
.portal-themed .topbar .n { font-size: 16px; font-weight: 600; letter-spacing: -.01em; display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.portal-themed .topbar .n .brand-logo { height: 28px; width: 28px; object-fit: contain; border-radius: 6px; flex: 0 0 auto; }
.portal-themed .topbar .r { display: flex; gap: 8px; align-items: center; }
.portal-themed .topbar .ic {
    width: 30px; height: 30px; border-radius: 50%;
    background: var(--surface-2);
    display: grid; place-items: center; color: var(--ink-2);
    border: 0; cursor: pointer; text-decoration: none;
}
.portal-themed .topbar .ic svg { width: 14px; height: 14px; }
.portal-themed .topbar .av {
    width: 32px; height: 32px; border-radius: 50%;
    background: linear-gradient(135deg, var(--avatar-a, #eed6bf), var(--avatar-b, #4e2518));
    display: grid; place-items: center; color: #fff; font-size: 12px; font-weight: 600;
    text-decoration: none;
}

/* ================================================================
   OPTION A — ATELIER (editorial, serif, monochrome + clay)
   ================================================================ */
.portal-themed.a.theme-light {
    --bg:#f4f1ea; --surface:#fdfbf6; --surface-2:#eceadf;
    --ink:#17130e; --ink-2:#4a4239; --ink-3:#8b8275;
    --line:#e4dfd2; --line-2:#ece8db;
    --accent:#b8563d; --accent-soft:#f4dccf; --good:#385540; --warn:#b07330;
}
.portal-themed.a.theme-dark {
    --bg:#141211; --surface:#1c1917; --surface-2:#25211c;
    --ink:#f1ebde; --ink-2:#b8aea0; --ink-3:#7a7164;
    --line:#2a261f; --line-2:#221e18;
    --accent:#d9765a; --accent-soft:rgba(217,118,90,.18); --good:#86b697; --warn:#d98a3a;
}

.portal-themed .topbar { border-bottom: 1px solid var(--line-2); }
.portal-themed .topbar .n { font-family: 'Instrument Serif', serif; font-weight: 400; font-size: 18px; }

/* HOME */
.portal-themed .home .greeting { padding: 16px 16px 0; }
.portal-themed .home .greeting .kick {
    font-family: 'JetBrains Mono', monospace; font-size: 10px;
    letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3);
}
.portal-themed .home .greeting h1 {
    font-family: 'Instrument Serif', serif; font-weight: 400;
    font-size: 30px; line-height: 1.02; letter-spacing: -.02em; margin: 4px 0 10px;
}
.portal-themed .home .greeting h1 em { font-style: italic; color: var(--accent); display: block; }
.portal-themed .home .empty { padding: 32px 16px; text-align: center; }

.portal-themed .home .cont { margin-top: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; }
.portal-themed .home .cont .cover { position: relative; aspect-ratio: 16/9; background: linear-gradient(135deg, #eed6bf, #4e2518); }
.portal-themed .home .cont .cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.portal-themed .home .cont .cover .tag { position: absolute; top: 8px; left: 8px; background: rgba(255,255,255,.9); color: var(--ink); padding: 3px 8px; border-radius: 999px; font-family: 'JetBrains Mono', monospace; font-size: 9px; letter-spacing: .14em; }
.portal-themed .home .cont .cover .play { position: absolute; bottom: 8px; right: 8px; width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.95); display: grid; place-items: center; color: var(--accent); text-decoration: none; }
.portal-themed .home .cont .cover .play svg { width: 12px; height: 12px; }
.portal-themed .home .cont .cover .bar { position: absolute; bottom: 0; left: 0; right: 0; height: 3px; background: rgba(0,0,0,.2); }
.portal-themed .home .cont .cover .bar i { display: block; height: 100%; background: var(--accent); }
.portal-themed .home .cont .body { padding: 12px 14px; }
.portal-themed .home .cont .body .k { font-family: 'JetBrains Mono', monospace; font-size: 9px; letter-spacing: .12em; color: var(--ink-3); text-transform: uppercase; }
.portal-themed .home .cont .body h3 { font-family: 'Instrument Serif', serif; font-weight: 400; font-size: 18px; letter-spacing: -.01em; margin: 3px 0 6px; line-height: 1.15; }
.portal-themed .home .cont .body .meta { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-3); gap: 10px; }
.portal-themed .home .cont .body .meta span { display: inline-flex; gap: 4px; align-items: baseline; }
.portal-themed .home .cont .body .meta b { font-family: 'Instrument Serif', serif; font-weight: 400; font-size: 14px; color: var(--ink); letter-spacing: -.005em; }

.portal-themed .home .streak { margin: 14px 16px 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); display: flex; flex-direction: column; gap: 6px; }
.portal-themed .home .streak .t { font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.portal-themed .home .streak b { font-family: 'Instrument Serif', serif; font-weight: 400; font-size: 17px; }
.portal-themed .home .streak .days { display: flex; gap: 3px; }
.portal-themed .home .streak .days i { width: 14px; height: 14px; border-radius: 3px; background: var(--line); display: block; }
.portal-themed .home .streak .days i.on { background: var(--accent); }
.portal-themed .home .streak .d { font-size: 11.5px; color: var(--ink-2); line-height: 1.35; }

.portal-themed .home .sh { padding: 18px 16px 8px; }
.portal-themed .home .sh .k { font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: .16em; color: var(--ink-3); text-transform: uppercase; }
.portal-themed .home .sh h2 { font-family: 'Instrument Serif', serif; font-weight: 400; font-size: 22px; letter-spacing: -.015em; margin: 2px 0 0; }
.portal-themed .home .sh h2 em { font-style: italic; color: var(--accent); }
.portal-themed .home .sh { position: relative; padding-right: 64px; }
.portal-themed .home .sh .all { position: absolute; right: 16px; top: 22px; font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }

.portal-themed .home .shelf { padding: 0; }
.portal-themed .home .lib { padding: 0 16px; display: grid; gap: 8px; }
.portal-themed .home .lib .c {
    display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; align-items: center;
    padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
    text-decoration: none; color: var(--ink);
}
.portal-themed .home .lib .c .cv {
    width: 44px; height: 44px; border-radius: 8px;
    background: linear-gradient(135deg, #eed6bf, #4e2518);
    background-size: cover; background-position: center;
    position: relative;
}
.portal-themed .home .lib .c .cv .pr { display: none; }
.portal-themed .home .lib .c .b { display: contents; }
.portal-themed .home .lib .c .b .k { display: none; }
.portal-themed .home .lib .c .b h4 {
    grid-column: 2; margin: 0;
    font-family: 'Instrument Serif', serif; font-weight: 400; font-size: 14px; line-height: 1.15;
}
.portal-themed .home .lib .c .b .p {
    grid-column: 3;
    display: inline-flex; align-items: baseline; gap: 6px;
}
.portal-themed .home .lib .c .b .p span {
    font-size: 10px; color: var(--ink-3); font-family: 'JetBrains Mono', monospace; letter-spacing: .08em; text-transform: uppercase;
}
.portal-themed .home .lib .c .b .p b {
    font-family: 'Instrument Serif', serif; font-weight: 400; font-size: 14px; color: var(--accent);
}

.portal-themed .home .comm { margin: 14px 16px 0; padding: 12px 14px; border-radius: 12px; background: var(--ink); color: var(--bg); }
.portal-themed .home .comm .h { display: flex; justify-content: space-between; align-items: center; font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: #c4bdb0; }
.portal-themed .home .comm .h .d { width: 6px; height: 6px; border-radius: 50%; background: #65e08a; animation: pl 2s infinite; }
.portal-themed .home .comm p { margin: 6px 0 0; font-family: 'Instrument Serif', serif; font-size: 14px; line-height: 1.35; }
.portal-themed .home .comm .who { margin-top: 8px; font-size: 11px; color: #c4bdb0; display: flex; align-items: center; gap: 6px; }
.portal-themed .home .comm .who .av { width: 18px; height: 18px; border-radius: 50%; background: linear-gradient(135deg, #d7c2a4, #6e4a2d); }

.portal-themed .home .promo { margin: 14px 16px 0; padding: 14px; border: 1px dashed var(--line); border-radius: 12px; display: grid; grid-template-columns: 50px 1fr auto; gap: 10px; align-items: center; text-decoration: none; color: var(--ink); }
.portal-themed .home .promo .c { width: 50px; height: 50px; border-radius: 8px; background: linear-gradient(135deg, #d9e2cf, #3d5642); background-size: cover; background-position: center; }
.portal-themed .home .promo b { font-family: 'Instrument Serif', serif; font-size: 14px; display: block; margin-bottom: 2px; }
.portal-themed .home .promo span { font-size: 11px; color: var(--ink-2); display: block; }
.portal-themed .home .promo .p { font-family: 'Instrument Serif', serif; font-size: 16px; color: var(--accent); }
.portal-themed .home .promo .k { display: none; }
.portal-themed .home .promo > .btn { display: none; }

/* CATALOG */
.portal-themed .cat .top { padding: 14px 16px 10px; display: flex; align-items: baseline; gap: 8px; border-bottom: 1px solid var(--line-2); }
.portal-themed .cat .top h1 { flex: 1; margin: 0; font-family: 'Instrument Serif', serif; font-weight: 400; font-size: 26px; line-height: 1.05; letter-spacing: -.02em; color: var(--ink); }
.portal-themed .cat .top h1 em { font-style: italic; color: var(--accent); }
.portal-themed .cat .search { margin: 12px 16px 0; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; display: flex; align-items: center; gap: 8px; color: var(--ink-3); font-size: 12.5px; }
.portal-themed .cat .chips { margin: 12px 16px 0; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.portal-themed .cat .chips::-webkit-scrollbar { display: none; }
.portal-themed .cat .chips span,
.portal-themed .cat .chips a { flex: 0 0 auto; padding: 6px 11px; border: 1px solid var(--line); border-radius: 999px; font-size: 11px; color: var(--ink-2); background: var(--surface); font-family: 'JetBrains Mono', monospace; letter-spacing: .06em; text-transform: uppercase; text-decoration: none; cursor: pointer; }
.portal-themed .cat .chips span.on,
.portal-themed .cat .chips a.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.portal-themed .cat .flagship { margin: 14px 16px 0; border-radius: 14px; overflow: hidden; background: var(--ink); color: var(--bg); position: relative; text-decoration: none; display: block; }
.portal-themed .cat .flagship .cover { aspect-ratio: 16/10; background: linear-gradient(135deg, #4e2518, #17130e); background-size: cover; background-position: center; position: relative; }
.portal-themed .cat .flagship .cover .live { position: absolute; top: 8px; left: 8px; background: var(--accent); color: #fff; padding: 3px 7px; border-radius: 3px; font-family: 'JetBrains Mono', monospace; font-size: 9px; letter-spacing: .14em; text-transform: uppercase; }
.portal-themed .cat .flagship .body { padding: 12px 14px 14px; }
.portal-themed .cat .flagship .body .k { font-family: 'JetBrains Mono', monospace; font-size: 9px; letter-spacing: .12em; color: var(--accent); text-transform: uppercase; }
.portal-themed .cat .flagship .body h3 { font-family: 'Instrument Serif', serif; font-weight: 400; font-size: 20px; margin: 4px 0 6px; line-height: 1.1; color: var(--bg); }
.portal-themed .cat .flagship .body p { margin: 0 0 10px; font-size: 12px; color: #c4bdb0; line-height: 1.45; }
.portal-themed .cat .flagship .body .row { display: flex; justify-content: space-between; align-items: center; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.12); gap: 10px; }
.portal-themed .cat .flagship .body .row .p { font-family: 'Instrument Serif', serif; font-size: 17px; display: block; }
.portal-themed .cat .flagship .body .row .p span { display: block; font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }

.portal-themed .cat .grid { margin: 14px 16px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.portal-themed .cat .grid .c { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; text-decoration: none; color: var(--ink); display: block; }
.portal-themed .cat .grid .c .cv { aspect-ratio: 4/3; background-size: cover; background-position: center; }
.portal-themed .cat .grid .c .b { padding: 8px 10px 10px; }
.portal-themed .cat .grid .c .b .k { font-family: 'JetBrains Mono', monospace; font-size: 9px; letter-spacing: .1em; color: var(--ink-3); text-transform: uppercase; }
.portal-themed .cat .grid .c .b h4 { margin: 2px 0 5px; font-family: 'Instrument Serif', serif; font-weight: 400; font-size: 14px; line-height: 1.15; letter-spacing: -.005em; }
.portal-themed .cat .grid .c .b .p { font-family: 'Instrument Serif', serif; font-size: 14px; color: var(--accent); }

/* PLAYER */
.portal-themed .play > .top { display: none; }
.portal-themed .play .video { background: #000; aspect-ratio: 16/9; position: relative; overflow: hidden; }
.portal-themed .play .video iframe,
.portal-themed .play .video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: contain; background: #000; }
.portal-themed .play .video .bg { position: absolute; inset: 0; background: linear-gradient(160deg, #4e2518, #1a0a05); }
.portal-themed .play .video .empty { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: rgba(255,255,255,.85); text-align: center; padding: 0 24px; }
.portal-themed .play .video .empty svg { color: rgba(255,255,255,.5); }
.portal-themed .play .video .empty b { font-size: 14px; font-weight: 500; letter-spacing: -.01em; }
.portal-themed .play .video .empty span { font-size: 12px; color: rgba(255,255,255,.6); }
.portal-themed .play .video .back { position: absolute; top: 10px; left: 10px; width: 30px; height: 30px; border-radius: 50%; background: rgba(0,0,0,.5); display: grid; place-items: center; color: #fff; z-index: 3; text-decoration: none; }
.portal-themed .play .body { padding: 14px 16px; }
.portal-themed .play .body .k { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--ink-3); letter-spacing: .12em; text-transform: uppercase; }
.portal-themed .play h1 { font-family: 'Instrument Serif', serif; font-weight: 400; font-size: 22px; margin: 3px 0 6px; line-height: 1.15; letter-spacing: -.01em; }
.portal-themed .play .sub { font-size: 11.5px; color: var(--ink-3); }
.portal-themed .play .up .mod-grp { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.portal-themed .play .up .mod-grp + .mod-grp { margin-top: 8px; }
.portal-themed .play .up .mod-grp summary { display: grid; grid-template-columns: 28px 1fr auto 18px; gap: 9px; align-items: center; padding: 10px 12px; cursor: pointer; list-style: none; font-size: 13.5px; }
.portal-themed .play .up .mod-grp summary::-webkit-details-marker { display: none; }
.portal-themed .play .up .mod-grp summary .mg-n { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--ink-3); text-align: center; }
.portal-themed .play .up .mod-grp summary .mg-t { font-weight: 600; color: var(--ink); }
.portal-themed .play .up .mod-grp summary .mg-c { font-family: 'JetBrains Mono', monospace; font-size: 10.5px; color: var(--ink-3); letter-spacing: .04em; }
.portal-themed .play .up .mod-grp summary .mg-x { color: var(--ink-3); transition: transform .15s ease; }
.portal-themed .play .up .mod-grp[open] summary .mg-x { transform: rotate(180deg); }
.portal-themed .play .up .mod-grp[open] summary { border-bottom: 1px solid var(--line-2); }
.portal-themed .play .up .mod-grp .mg-body { padding: 6px 8px 8px; display: grid; gap: 6px; }
.portal-themed .play .up .mod-grp .mg-body .u { background: transparent; border: 0; padding: 8px 6px; border-radius: 8px; }
.portal-themed .play .up .mod-grp .mg-body .u:hover { background: var(--surface-2); }
.portal-themed .play .up .mod-grp .mg-body .u.cur { background: var(--surface-2); }
.portal-themed .play .my-notes { padding: 14px 0; display: grid; gap: 12px; }
.portal-themed .play .my-notes .hint { margin: 0; font-size: 13.5px; color: var(--ink-3); line-height: 1.5; }
.portal-themed .play .my-notes textarea { width: 100%; min-height: 160px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font: 400 15px/1.55 'Inter', system-ui, sans-serif; resize: vertical; box-sizing: border-box; }
.portal-themed .play .my-notes textarea:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft, rgba(0,0,0,.05)); }
.portal-themed .play .my-notes .row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.portal-themed .play .my-notes .status { font-size: 12.5px; color: var(--ink-3); font-family: 'JetBrains Mono', monospace; letter-spacing: .04em; }

.portal-themed .play .my-feedback { padding: 14px 0; display: grid; gap: 12px; }
.portal-themed .play .my-feedback .hint { margin: 0; font-size: 13.5px; color: var(--ink-3); line-height: 1.5; }
.portal-themed .play .my-feedback textarea { width: 100%; min-height: 120px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font: 400 15px/1.55 'Inter', system-ui, sans-serif; resize: vertical; box-sizing: border-box; }
.portal-themed .play .my-feedback textarea:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft, rgba(0,0,0,.05)); }
.portal-themed .play .my-feedback .row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.portal-themed .play .my-feedback .status { font-size: 12.5px; color: var(--ink-3); font-family: 'JetBrains Mono', monospace; letter-spacing: .04em; }
.portal-themed .play .lesson-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0 4px; }
.portal-themed .play .lesson-nav .ln-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 11px 14px; border-radius: 10px; background: var(--ink); color: var(--bg); font-size: 13.5px; font-weight: 600; text-decoration: none; border: 1px solid var(--ink); cursor: pointer; }
.portal-themed .play .lesson-nav .ln-btn.ln-disabled { background: var(--surface); color: var(--ink-3); border-color: var(--line); cursor: not-allowed; opacity: .55; }
.portal-themed .play .lesson-nav .ln-prev { justify-content: flex-start; padding-left: 12px; }
.portal-themed .play .lesson-nav .ln-next { justify-content: flex-end; padding-right: 12px; }
.portal-themed .play .acts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin: 10px 0 14px; }
.portal-themed .play .acts .a { padding: 9px; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; font-size: 11.5px; color: var(--ink-2); display: flex; align-items: center; justify-content: center; gap: 5px; cursor: pointer; }
.portal-themed .play .acts .a.done { background: var(--good); color: #fff; border-color: var(--good); }
.portal-themed .play .acts button.a { border: 1px solid var(--line); font: inherit; }
.portal-themed .play .tabs { border-bottom: 2px solid var(--line); display: flex; gap: 6px; margin: 14px 0 0; overflow-x: auto; scrollbar-width: none; }
.portal-themed .play .tabs::-webkit-scrollbar { display: none; }
.portal-themed .play .tabs .t { padding: 12px 16px; margin-bottom: -2px; font-size: 14.5px; font-weight: 600; color: var(--ink-2); background: transparent; border: 0; border-bottom: 3px solid transparent; cursor: pointer; letter-spacing: -.005em; white-space: nowrap; transition: color .15s ease, border-color .15s ease, background .15s ease; }
.portal-themed .play .tabs .t:hover { color: var(--ink); background: var(--surface-2); border-radius: 6px 6px 0 0; }
.portal-themed .play .tabs .t.on { color: var(--accent, var(--ink)); border-color: var(--accent, var(--ink)); background: transparent; }
.portal-themed .play .tabs .t.t-selfie { display: inline-flex; align-items: center; gap: 7px; color: var(--accent); background: var(--surface-2); border-color: var(--accent); border-radius: 8px 8px 0 0; font-weight: 750; box-shadow: inset 0 0 0 1px var(--accent); }
.portal-themed .play .tabs .t.t-selfie::before { content: ""; width: 7px; height: 7px; border-radius: 999px; background: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.portal-themed .play .tabs .t.t-selfie.on { color: #fff; background: var(--accent); border-color: var(--accent); }
.portal-themed .play .tabs .t.t-selfie.on::before { background: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.25); }
.portal-themed .play .up { margin-top: 12px; display: grid; gap: 8px; }
.portal-themed .play .up .u { display: grid; grid-template-columns: 28px 1fr auto; gap: 9px; align-items: center; padding: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--ink); }
.portal-themed .play .up .u .n { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--ink-3); text-align: center; }
.portal-themed .play .up .u b { font-family: 'Instrument Serif', serif; font-weight: 400; font-size: 13px; line-height: 1.15; display: block; }
.portal-themed .play .up .u span { font-size: 10px; color: var(--ink-3); }
.portal-themed .play .up .u .st { font-family: 'JetBrains Mono', monospace; font-size: 9px; color: var(--ink-3); letter-spacing: .06em; text-transform: uppercase; }
.portal-themed .play .up .u.cur { background: var(--surface-2); border-color: var(--accent); }
.portal-themed .play .up .u.cur .st { color: var(--accent); }
.portal-themed .play .up .u.done .n { color: var(--good); }

/* LIBRARY */
.portal-themed .lib .head { padding: 10px 16px; }
.portal-themed .lib .head h1 { font-family: 'Instrument Serif', serif; font-weight: 400; font-size: 24px; margin: 0; letter-spacing: -.015em; }
.portal-themed .lib .head .sub { font-size: 11px; color: var(--ink-3); margin-top: 2px; font-family: 'JetBrains Mono', monospace; letter-spacing: .06em; text-transform: uppercase; }
.portal-themed .lib .subtabs { padding: 12px 16px 0; display: flex; gap: 12px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.portal-themed .lib .subtabs::-webkit-scrollbar { display: none; }
.portal-themed .lib .subtabs .st { padding: 8px 0; font-size: 12px; color: var(--ink-3); border-bottom: 2px solid transparent; white-space: nowrap; font-weight: 500; }
.portal-themed .lib .subtabs .st.on { color: var(--ink); border-color: var(--ink); }
.portal-themed .lib .list { padding: 12px 16px; display: grid; gap: 10px; }
.portal-themed .lib .list .c { display: grid; grid-template-columns: 90px 1fr; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; text-decoration: none; color: var(--ink); }
.portal-themed .lib .list .c .cv { background: linear-gradient(135deg, #eed6bf, #4e2518); background-size: cover; background-position: center; }
.portal-themed .lib .list .c .b { padding: 10px 12px; }
.portal-themed .lib .list .c .k { font-family: 'JetBrains Mono', monospace; font-size: 9px; letter-spacing: .1em; color: var(--ink-3); text-transform: uppercase; }
.portal-themed .lib .list .c h4 { font-family: 'Instrument Serif', serif; font-weight: 400; font-size: 15px; margin: 2px 0 6px; line-height: 1.15; letter-spacing: -.005em; }
.portal-themed .lib .list .c .prog { height: 3px; background: var(--line); border-radius: 2px; margin-bottom: 5px; }
.portal-themed .lib .list .c .prog i { display: block; height: 100%; background: var(--accent); border-radius: 2px; }
.portal-themed .lib .list .c .meta { font-size: 10.5px; color: var(--ink-3); display: flex; justify-content: space-between; font-family: 'JetBrains Mono', monospace; letter-spacing: .04em; }
.portal-themed .lib .list .c.done .meta b { color: var(--good); text-transform: uppercase; }

/* SUBSCRIPTIONS */
.portal-themed .subs .head { padding: 14px 16px 6px; }
.portal-themed .subs .head .kick { font-family: 'JetBrains Mono', monospace; font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px; }
.portal-themed .subs .head h1 { font-family: 'Instrument Serif', serif; font-weight: 400; font-size: 26px; margin: 0; letter-spacing: -.015em; line-height: 1.05; }
.portal-themed .subs .head h1 em { font-style: italic; color: var(--accent); }
.portal-themed .subs .head .sub { font-family: 'JetBrains Mono', monospace; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-top: 6px; }
.portal-themed .subs .grid { padding: 14px 16px; display: grid; gap: 12px; }
@media (min-width: 720px) { .portal-themed .subs .grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .portal-themed .subs .grid { grid-template-columns: 1fr 1fr 1fr; } }
.portal-themed .subs .plan { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; gap: 12px; }
.portal-themed .subs .plan > .cover { aspect-ratio: 16/9; background: linear-gradient(135deg, #eed6bf, #4e2518); position: relative; overflow: hidden; }
.portal-themed .subs .plan > .cover img,
.portal-themed .subs .plan > .cover video,
.portal-themed .subs .plan > .cover iframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.portal-themed .subs .plan > .cover .cover-fallback { position: absolute; inset: 0; }
.portal-themed .subs .plan > .cover.playable { cursor: pointer; }
.portal-themed .subs .plan > .cover.playable .play { position: absolute; inset: 0; margin: auto; width: 52px; height: 52px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; border: 0; display: grid; place-items: center; cursor: pointer; backdrop-filter: blur(2px); }
.portal-themed .subs .plan > .cover.playable .play svg { transform: translateX(1px); }
.portal-themed .subs .plan > .cover.playable:hover .play { background: rgba(0,0,0,.7); }
.portal-themed .subs .plan > .row,
.portal-themed .subs .plan > .price,
.portal-themed .subs .plan > .d,
.portal-themed .subs .plan > .incl-k,
.portal-themed .subs .plan > .incl,
.portal-themed .subs .plan > .cta { margin-left: 16px; margin-right: 16px; }
.portal-themed .subs .plan > .row { margin-top: 16px; }
.portal-themed .subs .plan > .cta { margin-bottom: 16px; }
.portal-themed .subs .plan:not(:has(> .cover)) > .row { margin-top: 16px; }
.portal-themed .subs .plan.is-active { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.portal-themed .subs .plan .row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.portal-themed .subs .plan .row h3 { margin: 0; font-family: 'Instrument Serif', serif; font-weight: 400; font-size: 20px; letter-spacing: -.01em; line-height: 1.1; color: var(--ink); }
.portal-themed .subs .plan .badge { font-family: 'JetBrains Mono', monospace; font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; padding: 3px 7px; border-radius: 999px; background: var(--accent); color: #fff; }
.portal-themed .subs .plan .price { display: flex; align-items: baseline; gap: 6px; }
.portal-themed .subs .plan .price strong { font-family: 'Instrument Serif', serif; font-weight: 400; font-size: 30px; color: var(--ink); }
.portal-themed .subs .plan .price span { font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.portal-themed .subs .plan .d { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }
.portal-themed .subs .plan .incl-k { font-family: 'JetBrains Mono', monospace; font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.portal-themed .subs .plan .incl { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.portal-themed .subs .plan .incl li { font-size: 13px; color: var(--ink); padding-left: 16px; position: relative; line-height: 1.4; }
.portal-themed .subs .plan .incl li::before { content: "·"; position: absolute; left: 4px; top: -1px; color: var(--accent); font-weight: 700; }
.portal-themed .subs .plan .cta { margin-top: auto; padding-top: 6px; }
.portal-themed .subs .plan .cta .btn { width: 100%; display: inline-flex; align-items: center; justify-content: center; padding: 11px 14px; border-radius: 999px; font-weight: 600; font-size: 13.5px; letter-spacing: -.005em; text-decoration: none; }
.portal-themed .subs .plan .cta .active-line { font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.portal-themed .subs .empty { margin: 24px 16px; padding: 28px 18px; text-align: center; border: 1px dashed var(--line); border-radius: 14px; background: var(--surface); display: grid; gap: 8px; justify-items: center; }
.portal-themed .subs .empty .k { font-family: 'JetBrains Mono', monospace; font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
.portal-themed .subs .empty h4 { margin: 0; font-family: 'Instrument Serif', serif; font-weight: 400; font-size: 20px; }
.portal-themed .subs .empty p { margin: 0; font-size: 13.5px; color: var(--ink-2); }
.portal-themed .subs .empty .btn.ghost { display: inline-block; padding: 9px 14px; border: 1px solid var(--line); border-radius: 999px; font-weight: 600; font-size: 12.5px; color: var(--ink); text-decoration: none; }

/* PROFILE */
.portal-themed .pro .head { padding: 18px 16px; border-bottom: 1px solid var(--line-2); display: grid; grid-template-columns: 64px 1fr; gap: 14px; align-items: center; }
.portal-themed .pro .head .av { width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(135deg, #d9e2cf, #3d5642); display: grid; place-items: center; color: #fff; font-weight: 600; font-size: 22px; flex: 0 0 auto; }
.portal-themed .pro .head .head-text { min-width: 0; }
.portal-themed .pro .head .eye { font-family: 'JetBrains Mono', monospace; font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 4px; }
.portal-themed .pro .head h1 { font-family: 'Instrument Serif', serif; font-weight: 400; font-size: 26px; margin: 0; letter-spacing: -.015em; line-height: 1.05; overflow: hidden; text-overflow: ellipsis; }
.portal-themed .pro .head .h { font-size: 11px; color: var(--ink-3); font-family: 'JetBrains Mono', monospace; letter-spacing: .08em; margin-top: 4px; text-transform: uppercase; }
.portal-themed .pro .stats { margin: 0; padding: 14px 16px; background: transparent; border: 0; border-bottom: 1px solid var(--line-2); border-radius: 0; display: grid; grid-template-columns: 1fr 1fr 1fr; text-align: center; }
.portal-themed .pro .stats > div { border-right: 1px solid var(--line-2); padding: 0 6px; }
.portal-themed .pro .stats > div:last-child { border: 0; }
.portal-themed .pro .stats > div b { display: block; font-family: 'Instrument Serif', serif; font-weight: 400; font-size: 24px; line-height: 1; margin-bottom: 5px; color: var(--ink); }
.portal-themed .pro .stats > div span { font-size: 9px; color: var(--ink-3); font-family: 'JetBrains Mono', monospace; letter-spacing: .14em; text-transform: uppercase; display: block; }
.portal-themed .pro .section { margin: 16px 16px 0; }
.portal-themed .pro .section .title { font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 7px; }
/* Reset DaisyUI `.menu` flex/padding bleed (loaded globally via cdn) so the
   portal's row-card layout actually fills the section width. */
.portal-themed .pro .menu, .portal-themed .pro-set .menu {
    background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
    display: block; padding: 0; width: auto; gap: 0;
}
.portal-themed .pro .menu .m { padding: 12px 14px; display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 13px; border-bottom: 1px solid var(--line-2); text-decoration: none; color: var(--ink); width: 100%; background: transparent; border-left: 0; border-right: 0; border-top: 0; font-family: inherit; cursor: pointer; }
.portal-themed .pro .menu .m > span:first-child { flex: 0 0 auto; white-space: nowrap; }
.portal-themed .pro .menu .m:last-child { border: 0; }
.portal-themed .pro .menu .m .r { color: var(--ink-3); font-size: 11px; display: flex; align-items: center; gap: 5px; text-align: right; min-width: 0; }
.portal-themed .pro .menu .m .r svg { width: 10px; height: 10px; }

/* ================================================================
   OPTION B — HEARTH (warm journal)
   ================================================================ */
.portal-themed.b.theme-light {
    --bg:#f7f1e8; --surface:#fbf6ee; --surface-2:#ede5d4;
    --ink:#2d1f14; --ink-2:#6b5a45; --ink-3:#a89879;
    --line:#e0d4bf; --line-2:#ebe2cf;
    --accent:#c87545; --good:#7a8b4d;
}
.portal-themed.b.theme-dark {
    --bg:#1a1510; --surface:#221a12; --surface-2:#2a2018;
    --ink:#f3e6d1; --ink-2:#bfae93; --ink-3:#7c6f5a;
    --line:#2f2520; --line-2:#262019;
    --accent:#e69268; --good:#a9c08a;
}

.portal-themed.b .topbar .n { font-family: 'Fraunces', serif; font-weight: 500; font-size: 17px; letter-spacing: -.01em; }
.portal-themed.b .topbar .ic { border: 1px solid var(--line-2); background: var(--surface); }

/* ================================================================
   OPTION C — STUDIO (bold magazine)
   ================================================================ */
.portal-themed.c.theme-light {
    --bg:#f0ece2; --surface:#fff; --surface-2:#e6e1d3;
    --ink:#0f0e0c; --ink-2:#3a3832; --ink-3:#7a766b;
    --line:#d9d3c2; --line-2:#e3ddcc;
    --accent:#d9452b; --good:#1e4d3d;
}
.portal-themed.c.theme-dark {
    --bg:#0c0b09; --surface:#161411; --surface-2:#1e1b16;
    --ink:#f4efe1; --ink-2:#bbb29e; --ink-3:#6d665a;
    --line:#241f18; --line-2:#1b1712;
    --accent:#ef6144; --good:#7da794;
}

.portal-themed.c .topbar { border-bottom: 1px solid var(--ink); padding: 10px 16px; }
.portal-themed.c .topbar .n { font-weight: 700; font-size: 15px; letter-spacing: -.01em; text-transform: uppercase; }
.portal-themed.c .topbar .ic { width: 30px; height: 30px; border: 1px solid var(--ink); border-radius: 0; background: transparent; color: var(--ink); }
.portal-themed.c .topbar .av { width: 32px; height: 32px; border-radius: 0; background: linear-gradient(135deg, #e8d5c2, #3d1e14); }
.portal-themed.c .mast { padding: 8px 16px; display: flex; justify-content: space-between; font-family: 'JetBrains Mono', monospace; font-size: 9.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3); border-bottom: 1px solid var(--line-2); }

/* Profile head — desktop layout (mobile already uses the same grid in base) */
@media (min-width: 1024px) {
  .portal-themed .pro .head { padding: 24px 32px; grid-template-columns: 80px 1fr; }
  .portal-themed .pro .head .av { width: 80px; height: 80px; font-size: 26px; }
  .portal-themed .pro .head h1 { font-size: 32px; }

  /* Certificate row grid on desktop (mobile keeps the horizontal scroller) */
  .portal-themed .pro .cert {
    grid-template-columns: 1fr 1fr;
    grid-auto-flow: row;
  }
}

/* Settings page topbar (the back-arrow header) */
.portal-themed .pro .topbar .ic { background: var(--surface-2); }
.portal-themed .pro .topbar .ic svg { width: 14px; height: 14px; }

/* Certificate scroller (mobile horizontal scroller per spec §3.20) */
.portal-themed .pro .cert {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 1fr);
  gap: 10px; overflow-x: auto; padding: 4px 2px 8px;
  scroll-snap-type: x mandatory;
}
.portal-themed .pro .cert .ct {
  scroll-snap-align: start;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  display: flex; flex-direction: column; gap: 4px;
  min-height: 130px; color: var(--ink);
  background-size: cover; background-position: center;
}
.portal-themed .pro .cert .ct .n { font-family: 'JetBrains Mono', monospace; font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.portal-themed .pro .cert .ct b { font-family: 'Instrument Serif', serif; font-weight: 400; font-size: 17px; line-height: 1.15; color: var(--ink); margin: 4px 0 8px; }
.portal-themed .pro .cert .ct .sig { font-family: 'Caveat', cursive; font-size: 17px; color: var(--accent); margin-top: auto; }
.portal-themed .pro .cert .ct .dt { font-family: 'JetBrains Mono', monospace; font-size: 9.5px; letter-spacing: .12em; color: var(--ink-3); text-transform: uppercase; }
.portal-themed .pro .cert .ct.lock {
  background: var(--surface-2);
  color: var(--ink-3);
  border-style: dashed;
}
.portal-themed .pro .cert .ct.lock b { color: var(--ink-2); }
.portal-themed .pro .cert .ct.lock .sig { color: var(--ink-3); font-style: italic; }

/* Profile menu items (design uses span+r, not b) */
.portal-themed .pro .menu .m span:first-child { font-weight: 500; }
.portal-themed .pro .row2 { display: contents; }
.portal-themed .pro .menu .m.m-readonly { color: var(--ink-3); cursor: default; }
.portal-themed .pro .menu .m.m-readonly .r { color: var(--ink-3); }

/* Library subtabs — links + count badges (theme-aware) */
.portal-themed .lib .subtabs .st { text-decoration: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.portal-themed .lib .subtabs .st span {
  background: var(--surface-2);
  color: var(--ink-3);
  font-size: 9.5px; font-weight: 600;
  padding: 1px 6px; border-radius: 999px;
  font-family: Inter, system-ui, sans-serif;
  letter-spacing: 0; text-transform: none;
  min-width: 16px; text-align: center;
}
.portal-themed .lib .subtabs .st.on span { background: var(--accent); color: #fff; }

/* Completed-card "earned" overlay pill */
.portal-themed .lib .c .cv { position: relative; }
.portal-themed .lib .c.done .cv .earned {
  position: absolute; top: 8px; left: 8px;
  background: var(--good, #1a7f4a); color: #fff;
  padding: 3px 9px; border-radius: 999px;
  font-size: 10px; font-weight: 600;
  font-family: Inter, system-ui, sans-serif;
  letter-spacing: .02em;
  z-index: 2;
  display: inline-flex; align-items: center; gap: 4px;
}

/* Library head — desktop-only kicker (mono uppercase) */
.portal-themed .lib .head .kick { display: none; }

/* Card cover progress overlay (visible on desktop card grid) */
.portal-themed .lib .c .cv .pr { display: none; }
.portal-themed .lib .c .cv .pr i { display: block; height: 100%; background: var(--accent); }

/* Card meta — accent percent on right */
.portal-themed .lib .list .c .meta .p { color: var(--accent); font-weight: 500; }
.portal-themed .lib .list .c.done .cv::after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.35); z-index: 1; }
.portal-themed .lib .list .c.done .cv .earned { z-index: 2; }
/* Marketplace flagship 3-stat meta strip */
.portal-themed .cat .flagship .body .meta {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 0; margin: 12px 0;
  border-top: 1px solid rgba(255,255,255,.12);
  border-bottom: 1px solid rgba(255,255,255,.12);
  padding: 10px 0;
}
.portal-themed .cat .flagship .body .meta { color: var(--bg); }
.portal-themed .cat .flagship .body .meta div { padding: 0 10px; border-right: 1px solid rgba(255,255,255,.12); }
.portal-themed .cat .flagship .body .meta div:last-child { border-right: 0; }
.portal-themed .cat .flagship .body .meta b {
  display: block;
  font-family: 'Instrument Serif', serif; font-weight: 400;
  font-size: 14px; line-height: 1.1; margin-bottom: 2px;
}
.portal-themed .cat .flagship .body .meta span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px; letter-spacing: .14em; text-transform: uppercase;
  color: rgba(255,255,255,.55);
}

/* Card .r row (count · price) — used in marketplace grid cards */
.portal-themed .cat .grid .c .b .r {
  display: flex; justify-content: space-between; align-items: baseline; gap: 8px;
  margin-top: 4px;
}
.portal-themed .cat .grid .c .b .r > span:first-child {
  font-size: 10.5px; color: var(--ink-3);
  font-family: 'JetBrains Mono', monospace; letter-spacing: .04em;
}
/* Flagship cover play overlay */
.portal-themed .cat .flagship .cover .play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(255,255,255,.95); display: grid; place-items: center;
  color: var(--accent); text-decoration: none;
}
.portal-themed .cat .flagship .cover .play svg { width: 18px; height: 18px; }

/* Flagship description clamp */
.portal-themed .cat .flagship .body p {
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

/* Search input inside .search wrapper */
.portal-themed .cat .search { display: flex; align-items: center; gap: 8px; }
.portal-themed .cat .search input::placeholder { color: var(--ink-3); }

/* Pulse animation */
@keyframes pl { 50% { opacity: .5; } }

/* Cross-theme visibility: the HTML emits all theme variants of labels; hide unused. */
.portal-themed .cont .cover .stamp,
.portal-themed .cont .cover .live,
.portal-themed .cont .body .prog,
.portal-themed .cont .body .bar { display: none; }
.portal-themed.b .cont .cover .tag,
.portal-themed.b .cont .cover .live,
.portal-themed.b .cont .cover .bar,
.portal-themed.b .cont .body .k,
.portal-themed.b .cont .body .bar { display: none; }
.portal-themed.c .cont .cover .tag,
.portal-themed.c .cont .cover .stamp,
.portal-themed.c .cont .body .k,
.portal-themed.c .cont .body .prog { display: none; }
/* Home comm header variants */

/* Home promo: A has no .k eyebrow on mobile; desktop reveal in media block */
.portal-themed .home .promo .k { display: none; }

/* Home hero eyebrow */
.portal-themed .home .hero .wave { display: none; }

/* Home library row: A uses plain span */
.portal-themed .home .lib .r .t .k { display: none; }

/* Empty state */
.portal-themed .empty { padding: 32px 16px; text-align: center; color: var(--ink-3); }
.portal-themed .empty h4 { color: var(--ink); margin: 8px 0 4px; font-family: 'Instrument Serif', serif; font-weight: 400; font-size: 18px; }
.portal-themed.b .empty h4 { font-family: 'Fraunces', serif; }
.portal-themed.c .empty h4 { font-family: 'Fraunces', serif; }

/* ============================================================
   DETAIL — course overview screen (Atelier canonical)
   Mobile: full-bleed hero with title + sticky price footer
   Desktop: 2-col hero (cover + side panel) and 2-col body (syllabus + aside)
   ============================================================ */
.portal-themed .det .hero {
    position: relative;
    background: var(--surface-2);
    color: var(--ink);
    overflow: hidden;
}
.portal-themed .det .hero .cover-wrap {
    position: relative;
    width: 100%;
    background: linear-gradient(160deg, #eed6bf, #4e2518);
}
.portal-themed .det .hero .cover-img {
    display: block; width: 100%; height: auto; max-height: 60vh;
    object-fit: contain; object-position: center;
}
.portal-themed .det .hero .cover-wrap.no-img {
    aspect-ratio: 16/9;
}
.portal-themed .det .hero .top {
    position: absolute; top: 12px; left: 12px; right: 12px; z-index: 2;
    display: flex; justify-content: space-between; align-items: center;
    pointer-events: none;
}
.portal-themed .det .hero .top > * { pointer-events: auto; }
.portal-themed .det .hero .back {
    width: 32px; height: 32px; border-radius: 50%;
    background: rgba(0,0,0,.45); backdrop-filter: blur(10px);
    display: grid; place-items: center; color: #fff; text-decoration: none;
}
.portal-themed .det .hero .play {
    position: absolute;
    top: 50%; left: 50%; transform: translate(-50%,-50%);
    width: 56px; height: 56px; border-radius: 50%;
    background: rgba(255,255,255,.95);
    display: grid; place-items: center; color: var(--accent); text-decoration: none;
    box-shadow: 0 4px 16px rgba(0,0,0,.25); z-index: 2;
}
.portal-themed .det .hero .btm {
    padding: 16px 16px 14px;
    background: var(--surface-2);
    border-bottom: 1px solid var(--line-2);
}
.portal-themed .det .hero .btm .k {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9.5px; letter-spacing: .16em;
    text-transform: uppercase; color: var(--ink-3);
}
.portal-themed .det .hero .btm h1 {
    font-family: 'Instrument Serif', serif; font-weight: 400;
    font-size: 28px; line-height: 1.05; letter-spacing: -.015em;
    margin: 6px 0 0; color: var(--ink);
}

.portal-themed .det .body { padding: 16px 16px 96px; }
.portal-themed .det .hero .side { display: none; }

.portal-themed .det .by {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 0 12px;
    border-bottom: 1px solid var(--line-2);
}
.portal-themed .det .by .av {
    width: 32px; height: 32px; border-radius: 50%;
    background: linear-gradient(135deg, #eed6bf, #4e2518);
    background-size: cover; background-position: center;
    flex: 0 0 32px;
}
.portal-themed .det .by > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.portal-themed .det .by b {
    font-family: 'Instrument Serif', serif; font-weight: 400;
    font-size: 14px; color: var(--ink); line-height: 1;
}
.portal-themed .det .by span {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px; letter-spacing: .08em;
    color: var(--ink-3); text-transform: uppercase;
}
.portal-themed .det .by .badge { margin-left: auto; }

.portal-themed .det .hero .side .meta { display: none; }

.portal-themed .det .meta {
    display: grid; grid-template-columns: 1fr 1fr 1fr;
    margin-top: 14px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 12px 0;
}
.portal-themed .det .meta div { padding: 0 10px; border-right: 1px solid var(--line); }
.portal-themed .det .meta div:last-child { border-right: 0; }
.portal-themed .det .meta b {
    display: block;
    font-family: 'Instrument Serif', serif; font-weight: 400;
    font-size: 16px; line-height: 1; margin-bottom: 3px; color: var(--ink);
}
.portal-themed .det .meta span {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px; letter-spacing: .08em;
    color: var(--ink-3); text-transform: uppercase;
}

.portal-themed .det .progress {
    margin-top: 14px; padding: 12px 14px;
    background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
    display: flex; justify-content: space-between; align-items: center;
    gap: 10px; font-size: 12px; color: var(--ink-2);
}
.portal-themed .det .progress .bar {
    flex: 1; height: 4px; background: var(--line);
    border-radius: 3px; overflow: hidden;
}
.portal-themed .det .progress .bar i { display: block; height: 100%; background: var(--accent); }
.portal-themed .det .progress .pct {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px; color: var(--accent);
}

.portal-themed .det .syl { margin-top: 22px; }
.portal-themed .det .syl h2 {
    font-family: 'Instrument Serif', serif; font-weight: 400;
    font-size: 22px; letter-spacing: -.015em;
    margin: 0 0 10px; color: var(--ink);
}
.portal-themed .det .syl h2 em { font-style: italic; color: var(--accent); }
.portal-themed .det .syl .m {
    display: grid; grid-template-columns: 32px 1fr auto;
    gap: 10px; padding: 12px 0;
    border-bottom: 1px solid var(--line-2);
    align-items: center;
}
.portal-themed .det .syl .m:last-child { border-bottom: 0; }
.portal-themed .det .syl .m .n {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px; letter-spacing: .08em; color: var(--ink-3);
}
.portal-themed .det .syl .m b {
    font-family: 'Instrument Serif', serif; font-weight: 400;
    font-size: 16px; line-height: 1.2; color: var(--ink);
}
.portal-themed .det .syl .m > div span {
    display: block; margin-top: 2px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px; letter-spacing: .08em;
    color: var(--ink-3); text-transform: uppercase;
}
.portal-themed .det .syl .m .d {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px; letter-spacing: .08em; color: var(--ink-3);
}

.portal-themed .det .price.sticky {
    position: fixed; bottom: calc(var(--tab-h) + env(safe-area-inset-bottom));
    left: 0; right: 0;
    z-index: 35;
    padding: 12px 16px calc(16px + env(safe-area-inset-bottom));
    background: var(--surface);
    border-top: 1px solid var(--line);
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.portal-themed .det .price.sticky .p {
    font-family: 'Instrument Serif', serif;
    font-size: 22px; line-height: 1; color: var(--ink);
}
.portal-themed .det .price.sticky .p span {
    display: block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px; letter-spacing: .14em;
    color: var(--ink-3); text-transform: uppercase;
    margin-bottom: 4px;
}
.portal-themed .det .price.sticky .btn { flex: 1; }

/* Aside cards (mobile: stacked under syllabus, desktop: column right) */
.portal-themed .det .aside {
    margin-top: 22px;
    display: grid; gap: 14px;
}
.portal-themed .det .aside .card {
    padding: 18px 18px 16px;
    border: 1px solid var(--line);
    background: var(--surface);
    border-radius: 14px;
}
.portal-themed .det .aside .card .tl {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px; letter-spacing: .14em;
    text-transform: uppercase; color: var(--ink-3);
    margin-bottom: 8px;
}
.portal-themed .det .aside .card b {
    display: block;
    font-family: 'Instrument Serif', serif; font-weight: 400;
    font-size: 18px; line-height: 1.2; letter-spacing: -.01em;
    color: var(--ink);
}
.portal-themed .det .aside .card .list {
    margin-top: 12px;
    display: grid; gap: 8px;
    font-size: 12.5px; color: var(--ink-2);
}
.portal-themed .det .aside .card .list div {
    display: flex; align-items: flex-start; gap: 8px;
}
.portal-themed .det .aside .card .list div svg {
    width: 12px; height: 12px; color: var(--accent);
    flex: 0 0 12px; margin-top: 4px;
}
.portal-themed .det .aside .card.ask {
    background: var(--surface); color: var(--ink-2);
}
.portal-themed .det .aside .card.ask .tl { color: var(--ink-3); }
.portal-themed .det .aside .card.ask b { color: var(--ink); font-size: 14px; }
.portal-themed .det .aside .card.ask .i {
    margin-top: 10px; padding: 8px 10px;
    background: var(--surface-2); border-radius: 8px;
    font-family: 'Instrument Serif', serif; font-style: italic;
    font-size: 13px; color: var(--ink-2);
}
.portal-themed .det .aside .card.ask .wa {
    margin-top: 10px;
    display: flex; justify-content: space-between; align-items: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px; letter-spacing: .12em;
    color: var(--ink-3); text-transform: uppercase;
}
.portal-themed .det .aside .card.ask .wa .g {
    background: #25D366; color: #fff;
    padding: 7px 13px; border-radius: 999px;
    font-family: Inter, sans-serif; font-weight: 500;
    font-size: 11px; letter-spacing: .04em; text-transform: uppercase;
    display: inline-flex; align-items: center; gap: 6px;
    text-decoration: none;
}
.portal-themed .det .aside .card.ask .wa .g svg {
    width: 11px; height: 11px; color: #fff;
}

/* Shared: content blocks under Player's up-next (lesson body / rich content) */
.portal-themed .play .acts .a[disabled],
.portal-themed .play .acts .a:disabled { opacity: .45; cursor: not-allowed; }
.portal-themed .play .acts .a svg { width: 12px; height: 12px; flex: 0 0 12px; }

/* Pane system — hidden by default, .show reveals */
.portal-themed .play .pane { display: none; }
.portal-themed .play .pane.show { display: block; }

/* Notes block — design uses italic editorial type for the lesson notes */
.portal-themed .play .notes { font-family: 'Instrument Serif', serif; font-style: italic; font-size: 14.5px; line-height: 1.55; color: var(--ink-2); }
.portal-themed .play .notes > * + * { margin-top: 10px; }
.portal-themed .play .notes img { max-width: 100%; border-radius: 8px; display: block; }
.portal-themed .play .notes iframe,
.portal-themed .play .notes video { width: 100%; aspect-ratio: 16/9; border-radius: 8px; background: #000; display: block; }

/* mobile-only utility — hidden at desktop breakpoint below */
.portal-themed .mobile-only { /* visible by default */ }
.portal-themed .play .acts .desktop-only { display: none; }
.portal-themed .play .video .back { /* mobile: visible overlay */ }

.portal-themed .play .ccontent { padding: 14px 16px 0; color: var(--ink-2); font-size: 13.5px; line-height: 1.6; }
.portal-themed .play .ccontent > * + * { margin-top: 10px; }
.portal-themed .play .ccontent img { max-width: 100%; border-radius: 8px; display: block; }
.portal-themed .play .ccontent iframe,
.portal-themed .play .ccontent video { width: 100%; aspect-ratio: 16/9; border-radius: 8px; background: #000; display: block; }
.portal-themed .play .ccheckpoints { padding: 14px 16px 0; }
.portal-themed .play .ccheckpoints h3 { font-family: inherit; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 8px; font-weight: 600; }
.portal-themed .play .ccheckpoint { padding: 12px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; background: var(--surface); }
.portal-themed .play .ccheckpoint.is-done { border-color: var(--good); }
.portal-themed .play .ccp-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.portal-themed .play .ccp-title { font-weight: 600; color: var(--ink); flex: 1; font-size: 13px; }
.portal-themed .play .ccp-pill { font-size: 10px; padding: 2px 7px; border-radius: 999px; background: var(--line-2); color: var(--ink-3); text-transform: uppercase; letter-spacing: .08em; }
.portal-themed .play .ccp-pill-ok { background: var(--good); color: #fff; }
.portal-themed .play .ccp-prompt { margin: 4px 0 10px; color: var(--ink-2); font-size: 12.5px; }
.portal-themed .play .ccp-preview { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.portal-themed .play .ccp-preview img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; }
.portal-themed .play .ccp-preview-meta { font-size: 11px; color: var(--ink-3); }
.portal-themed .play .ccp-upload-btn { display: inline-block; padding: 8px 12px; border-radius: 8px; background: var(--accent); color: #fff; font-weight: 500; font-size: 12px; cursor: pointer; }
.portal-themed .play .ccheckpoint.is-done .ccp-upload-btn { background: var(--line-2); color: var(--ink-2); }

/* ================================================================
   Desktop sidebar + tabbar hide (mobile default: hidden sidebar)
   ================================================================ */
.portal-themed .portal-side { display: none; }

/* Player rail — mobile shows inline up-next, desktop shows side rail */
.portal-themed .play .desktop-up { display: none; }
.portal-themed .play .desktop-up .hd {
    font-family: 'JetBrains Mono', monospace; font-size: 10px;
    letter-spacing: .14em; color: var(--ink-3); text-transform: uppercase;
    display: flex; justify-content: space-between;
    padding: 16px 18px; border-bottom: 1px solid var(--line);
}

/* ================================================================
   DESKTOP LAYER — sidebar shell + wider screens (min-width: 1024px)
   All mobile styles above are preserved. This layer reshapes the
   container, reveals the sidebar, hides the tabbar, and widens
   per-screen layouts into multi-column grids matching the design.
   ================================================================ */
@media (min-width: 1024px) {
    /* --- root shell: sidebar + main --- */
    .portal-themed { padding: 0; min-height: 100vh; }
    .portal-themed.portal-root {
        display: grid;
        grid-template-columns: 240px 1fr;
        align-items: stretch;
    }
    .portal-themed .tabbar { display: none; }

    /* remove mobile centering frame */
    .portal-themed .scr {
        max-width: none;
        margin: 0;
        border-radius: 0;
        box-shadow: none;
        overflow: visible;
        padding-bottom: 60px;
        min-height: calc(100vh - 0px);
    }

    /* sidebar */
    .portal-themed .portal-side {
        display: flex; flex-direction: column; gap: 4px;
        padding: 18px 14px;
        background: var(--nav-bg, var(--ink));
        color: var(--nav-ink, var(--bg));
        position: sticky; top: 0;
        height: 100vh; overflow-y: auto;
        border-right: 1px solid var(--line);
    }
    .portal-themed .portal-side .brand {
        padding: 6px 10px 16px; margin-bottom: 14px;
        border-bottom: 1px solid rgba(255,255,255,.08);
        display: flex; align-items: center; gap: 10px;
    }
    .portal-themed .portal-side .brand .lg {
        width: 32px; height: 32px; border-radius: 50%;
        background: linear-gradient(135deg,#eed6bf,#4e2518);
        background-size: cover; background-position: center;
        flex: 0 0 32px;
    }
    .portal-themed .portal-side .brand .n {
        font-weight: 600; font-size: 13px; letter-spacing: -.01em;
    }
    .portal-themed .portal-side .brand .sb {
        font-size: 10.5px; color: var(--nav-ink-3, var(--ink-3)); margin-top: 1px;
    }
    .portal-themed .portal-side .lbl {
        font-family: 'JetBrains Mono', monospace;
        font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase;
        color: var(--nav-ink-3, var(--ink-3));
        padding: 14px 10px 6px;
    }
    .portal-themed .portal-side .lnk {
        display: grid; grid-template-columns: 18px 1fr auto; gap: 10px;
        align-items: center; padding: 9px 10px; border-radius: 8px;
        font-size: 13px; color: var(--nav-ink-3, var(--ink-3));
        text-decoration: none;
    }
    .portal-themed .portal-side .lnk svg { width: 16px; height: 16px; }
    .portal-themed .portal-side .lnk.active {
        background: rgba(255,255,255,.08);
        color: var(--nav-ink, var(--bg));
    }
    .portal-themed .portal-side .lnk:hover { color: var(--nav-ink, var(--bg)); }
    .portal-themed .portal-side .foot {
        margin-top: auto; padding: 10px;
        font-size: 10px; color: var(--nav-ink-3, var(--ink-3)); line-height: 1.4;
        border-top: 1px solid rgba(255,255,255,.06);
    }

    /* theme-specific sidebar tokens */
    .portal-themed.a.theme-light .portal-side { background: #17130e; color: #eceadf; --nav-ink-3: #8b8275; }
    .portal-themed.a.theme-dark  .portal-side { background: #0d0c0a; color: #f1ebde; --nav-ink-3: #7a7164; }
    .portal-themed.b.theme-light .portal-side { background: var(--surface); color: var(--ink); --nav-ink-3: var(--ink-3); border-right: 1px solid var(--line); }
    .portal-themed.b.theme-dark  .portal-side { background: var(--surface); color: var(--ink); --nav-ink-3: var(--ink-3); border-right: 1px solid var(--line); }
    .portal-themed.b .portal-side .lnk.active { background: var(--surface-2); color: var(--ink); }
    .portal-themed.c.theme-light .portal-side { background: #0f0e0c; color: #f0ece2; --nav-ink-3: #8c857a; }
    .portal-themed.c.theme-dark  .portal-side { background: #050504; color: #f4efe1; --nav-ink-3: #6d665a; }

    /* --- wider content padding --- */
    .portal-themed .portal-main { min-width: 0; }
    .portal-themed .scr .topbar,
    .portal-themed .scr .hero,
    .portal-themed .scr .streak,
    .portal-themed .scr .comm,
    .portal-themed .scr .sh,
    .portal-themed .scr .lib,
    .portal-themed .scr .promo,
    .portal-themed .scr .cont,
    .portal-themed .scr .grid,
    .portal-themed .scr .flagship,
    .portal-themed .scr .top,
    .portal-themed .scr .search,
    .portal-themed .scr .chips,
    .portal-themed .scr .list,
    .portal-themed .scr .subtabs,
    .portal-themed .scr .head,
    .portal-themed .scr .stats,
    .portal-themed .scr .section {
        max-width: 1280px;
    }
    .portal-themed .scr .topbar,
    .portal-themed .portal-main > .portal-topbar { padding: 18px 32px; max-width: 1280px; }

    /* on desktop, hide topbar brand name (already in sidebar) but keep actions */
    .portal-themed .scr .topbar .n,
    .portal-themed .portal-main > .portal-topbar .n { display: none; }

    /* --- HOME: 2-column hero, 3-col library --- */
    .portal-themed .home { padding: 16px 32px 40px; }
    .portal-themed .home .greeting { padding: 4px 0 0 !important; max-width: 1280px; }
    .portal-themed .home .greeting h1 { font-size: 48px !important; line-height: 1.02; }
    .portal-themed .home .greeting h1 br { display: none; }
    .portal-themed .home .greeting h1 em { display: inline; }
    .portal-themed .home .greeting .kick { margin-bottom: 6px; }
    .portal-themed .home .hero {
        display: grid; grid-template-columns: 1.35fr 1fr; gap: 24px;
        max-width: 1280px; margin: 20px 0 0;
    }
    .portal-themed .home .hero .side { display: flex; flex-direction: column; gap: 16px; }
    .portal-themed .home .hero .cont { margin: 0 !important; max-width: none; }
    .portal-themed .home .hero .streak { margin: 0 !important; max-width: none; }
    .portal-themed .home .hero .comm { margin: 0 !important; max-width: none; }
    .portal-themed .home .cont .cover { aspect-ratio: 16/7; }
    .portal-themed .home .cont .body { padding: 20px 24px; }
    .portal-themed .home .cont .body h3 { font-size: 28px !important; }
    .portal-themed .home .streak { padding: 20px !important; }
    .portal-themed .home .streak b { font-size: 32px !important; }
    .portal-themed .home .comm { padding: 20px 22px !important; }
    .portal-themed .home .sh { padding: 24px 0 10px !important; max-width: 1280px; }
    .portal-themed .home .sh h2 { font-size: 28px !important; }
    .portal-themed .home .sh .all { position: static !important; margin-left: auto; }
    .portal-themed .home .shelf { max-width: 1280px; }
    .portal-themed .home .shelf .sh { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 24px 0 12px !important; }
    .portal-themed .home .lib {
        padding: 0 !important;
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 14px !important;
        max-width: 1280px;
    }
    .portal-themed .home .lib .c {
        grid-template-columns: 1fr !important;
        padding: 0 !important;
        overflow: hidden;
        display: flex !important;
        flex-direction: column;
        min-height: 240px;
    }
    .portal-themed .home .lib .c .cv {
        width: 100% !important; height: 160px !important;
        border-radius: 0 !important;
        position: relative;
    }
    .portal-themed .home .lib .c .cv .pr {
        display: block !important;
        position: absolute; left: 0; right: 0; bottom: 0;
        height: 3px; background: rgba(0,0,0,.2);
    }
    .portal-themed .home .lib .c .cv .pr i {
        display: block; height: 100%; background: var(--accent);
    }
    .portal-themed .home .lib .c .b {
        display: flex !important; flex-direction: column; gap: 6px;
        padding: 14px 16px; flex: 1;
    }
    .portal-themed .home .lib .c .b .k {
        display: block !important;
        font-family: 'JetBrains Mono', monospace; font-size: 9.5px;
        letter-spacing: .12em; color: var(--ink-3); text-transform: uppercase;
    }
    .portal-themed .home .lib .c .b h4 { font-size: 18px !important; margin: 0; line-height: 1.15; }
    .portal-themed .home .lib .c .b .p {
        display: flex !important; justify-content: space-between; align-items: baseline;
        margin-top: auto; gap: 8px;
    }
    .portal-themed .home .lib .c .b .p span { font-size: 11px; }
    .portal-themed .home .lib .c .b .p b { font-size: 15px !important; }
    .portal-themed .home .promo {
        margin: 20px 0 0 !important;
        padding: 22px 24px !important;
        grid-template-columns: 100px 1fr auto auto !important;
        gap: 18px !important;
        max-width: 1280px;
    }
    .portal-themed .home .promo .c { width: 100px !important; height: 72px !important; }
    .portal-themed .home .promo b { font-size: 22px !important; }
    .portal-themed .home .promo .k { display: block; font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: .14em; color: var(--ink-3); text-transform: uppercase; margin-bottom: 3px; }
    .portal-themed .home .promo .sub { font-size: 12px; color: var(--ink-3); margin-top: 4px; }
    .portal-themed .home .promo .p { font-size: 24px !important; }
    .portal-themed .home .promo > .btn { display: inline-flex; align-items: center; padding: 10px 18px; background: var(--ink); color: var(--bg); border-radius: 999px; font-size: 12px; font-weight: 500; text-decoration: none; }

    /* --- CATALOG: 4-col grid --- */
    .portal-themed .cat { padding: 24px 32px 40px; }
    .portal-themed .cat .top { padding: 0 0 16px !important; border-bottom: 1px solid var(--line); }
    .portal-themed .cat .top h1 { font-size: 40px !important; letter-spacing: -.025em; }
    .portal-themed .cat .search { margin: 16px 0 0 !important; width: 380px; }
    .portal-themed .cat .chips { margin: 18px 0 0 !important; flex-wrap: wrap; }
    .portal-themed .cat .flagship {
        margin: 22px 0 0 !important;
        display: grid !important;
        grid-template-columns: 1.3fr 1fr !important;
    }
    .portal-themed .cat .flagship .cover { aspect-ratio: auto !important; min-height: 340px; }
    .portal-themed .cat .flagship .body { padding: 32px 36px !important; display: flex; flex-direction: column; justify-content: center; }
    .portal-themed .cat .flagship .body h3 { font-size: 36px !important; }
    .portal-themed .cat .flagship .body p { font-size: 14px !important; line-height: 1.5; }
    .portal-themed .cat .grid {
        margin: 22px 0 0 !important;
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 14px !important;
    }
    .portal-themed .cat .grid .c .b { padding: 14px 16px; }
    .portal-themed .cat .grid .c .b h4 { font-size: 18px !important; }

    /* --- DETAIL: 2-col hero (cover + side panel) + 2-col body (syllabus + aside) --- */
    .portal-themed .det { padding: 24px 32px 40px; max-width: 1280px; }
    .portal-themed .det .hero {
        aspect-ratio: auto;
        display: grid !important;
        grid-template-columns: 1.4fr 1fr;
        gap: 0;
        padding: 0;
        background: transparent;
        border-radius: 14px;
        overflow: hidden;
        margin-bottom: 28px;
        min-height: 380px;
        color: inherit;
    }
    .portal-themed .det .hero::after { display: none; }
    .portal-themed .det .hero .cover-wrap {
        grid-column: 1; grid-row: 1;
        position: relative; aspect-ratio: auto;
        background: linear-gradient(160deg, #eed6bf, #4e2518);
        overflow: hidden;
    }
    .portal-themed .det .hero .cover-img {
        width: 100%; height: 100%; max-height: none;
        object-fit: cover;
    }
    .portal-themed .det .hero .back {
        position: absolute; top: 24px; left: 24px;
        z-index: 3;
    }
    .portal-themed .det .hero .play {
        position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
        width: 76px; height: 76px;
    }
    .portal-themed .det .hero .play svg { width: 24px; height: 24px; }
    .portal-themed .det .hero .btm { display: none; }

    .portal-themed .det .hero .side {
        display: flex !important; flex-direction: column;
        grid-column: 2; grid-row: 1;
        background: var(--surface);
        padding: 32px 36px;
        gap: 14px;
        color: var(--ink);
    }
    .portal-themed .det .hero .side .k {
        font-family: 'JetBrains Mono', monospace;
        font-size: 10px; letter-spacing: .16em;
        text-transform: uppercase; color: var(--accent);
    }
    .portal-themed .det .hero .side h1 {
        font-family: 'Instrument Serif', serif; font-weight: 400;
        font-size: 44px; line-height: 1.02; letter-spacing: -.02em;
        margin: 0; color: var(--ink);
    }
    .portal-themed .det .hero .side h1 em { font-style: italic; color: var(--accent); }
    .portal-themed .det .hero .side p {
        margin: 0;
        font-family: 'Instrument Serif', serif;
        font-size: 16px; line-height: 1.45; color: var(--ink-2);
    }
    .portal-themed .det .hero .side .by {
        padding: 14px 0 0; border-bottom: 0;
        border-top: 1px solid var(--line);
        margin-top: auto;
    }
    .portal-themed .det .hero .side .price {
        display: flex; justify-content: space-between; align-items: center;
        gap: 12px; padding-top: 14px;
        border-top: 1px solid var(--line);
    }
    .portal-themed .det .hero .side .price .p {
        font-family: 'Instrument Serif', serif;
        font-size: 28px; line-height: 1; color: var(--ink);
    }
    .portal-themed .det .hero .side .price .p span {
        display: block;
        font-family: 'JetBrains Mono', monospace;
        font-size: 9px; letter-spacing: .14em;
        color: var(--ink-3); text-transform: uppercase;
        margin-bottom: 4px;
    }

    .portal-themed .det .body {
        padding: 0 !important;
        display: grid !important;
        grid-template-columns: 1fr 300px;
        gap: 40px;
        align-items: start;
    }
    .portal-themed .det .body .progress,
    .portal-themed .det .body .syl { grid-column: 1; }
    .portal-themed .det .body > .by { display: none; }
    .portal-themed .det .body > .meta { display: none; }
    .portal-themed .det .hero .side .meta {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        border-top: 1px solid var(--line);
        border-bottom: 1px solid var(--line);
        padding: 12px 0;
        margin: 0;
    }
    .portal-themed .det .body .syl { margin-top: 0; }
    .portal-themed .det .body .syl h2 { font-size: 32px; margin-bottom: 14px; }
    .portal-themed .det .body .syl .m b { font-size: 18px; }

    .portal-themed .det .price.sticky { display: none !important; }

    .portal-themed .det .aside {
        grid-column: 2; grid-row: 1 / span 6;
        align-self: start;
        margin-top: 0;
        position: sticky; top: 24px;
    }
    .portal-themed .det .aside .card { padding: 20px 22px; }
    .portal-themed .det .aside .card b { font-size: 20px; }

    /* --- PLAYER: video + side rail --- */
    .portal-themed .play {
        display: grid !important;
        grid-template-columns: 1fr 340px !important;
        align-items: start;
    }
    .portal-themed .play > .top,
    .portal-themed .play .video,
    .portal-themed .play .body,
    .portal-themed .play .ccontent,
    .portal-themed .play .ccheckpoints,
    .portal-themed .play .pane { grid-column: 1; }
    .portal-themed .play > .top {
        display: flex; justify-content: space-between; align-items: center;
        padding: 16px 32px; border-bottom: 1px solid var(--line);
        font-family: 'JetBrains Mono', monospace; font-size: 10.5px;
        letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3);
    }
    .portal-themed .play > .top .bk { color: var(--ink); text-decoration: none; }
    .portal-themed .play > .top .bk:hover { color: var(--accent); }
    .portal-themed .play .mobile-up,
    .portal-themed .play .mobile-only { display: none !important; }
    .portal-themed .play .acts .desktop-only { display: flex; }
    .portal-themed .play .video .back { display: none; }
    .portal-themed .play .desktop-up {
        display: block !important;
        grid-column: 2;
        grid-row: 1 / span 20;
        position: sticky; top: 0;
        max-height: 100vh;
        overflow-y: auto;
        background: var(--surface);
        border-left: 1px solid var(--line);
        padding: 0;
    }
    .portal-themed .play .desktop-up .u {
        display: grid;
        grid-template-columns: 34px 1fr auto;
        gap: 10px; align-items: center;
        padding: 14px 18px;
        border-bottom: 1px solid var(--line);
        text-decoration: none; color: var(--ink);
        border-radius: 0;
    }
    .portal-themed .play .desktop-up .u .n {
        font-family: 'JetBrains Mono', monospace; font-size: 11px;
        color: var(--ink-3); text-align: center;
    }
    .portal-themed .play .desktop-up .u b {
        font-family: 'Instrument Serif', serif; font-weight: 400;
        font-size: 14.5px; display: block; line-height: 1.15;
    }
    .portal-themed .play .desktop-up .u span {
        font-size: 10.5px; color: var(--ink-3);
    }
    .portal-themed .play .desktop-up .u .st {
        font-family: 'JetBrains Mono', monospace; font-size: 9.5px;
        color: var(--ink-3); letter-spacing: .08em; text-transform: uppercase;
    }
    .portal-themed .play .desktop-up .u.cur { background: var(--surface-2); }
    .portal-themed .play .desktop-up .u.cur .st { color: var(--accent); }
    .portal-themed .play .desktop-up .u.done .n { color: var(--good); }

    .portal-themed .play .video { border-radius: 0 !important; }
    .portal-themed .play .body { padding: 20px 32px !important; }
    .portal-themed .play h1 { font-size: 32px !important; }
    .portal-themed .play .acts { grid-template-columns: repeat(4, 1fr) !important; }

    /* --- LIBRARY: 3-col card grid on desktop --- */
    .portal-themed .lib { padding: 24px 32px 40px; }
    .portal-themed .lib .head { padding: 0 0 12px !important; }
    .portal-themed .lib .head .kick {
        display: block;
        font-family: 'JetBrains Mono', monospace; font-size: 10.5px;
        letter-spacing: .14em; color: var(--ink-3);
        text-transform: uppercase; margin-bottom: 6px;
    }
    .portal-themed .lib .head h1 { font-size: 40px !important; }
    .portal-themed .lib .head .sub { display: none; }
    .portal-themed .lib .subtabs { padding: 12px 0 0 !important; border-top: 1px solid var(--line); }
    .portal-themed .lib .subtabs .st { padding: 12px 0 !important; font-size: 14px !important; }
    .portal-themed .lib .list {
        padding: 18px 0 0 !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 14px !important;
    }
    .portal-themed .lib .list .c {
        grid-template-columns: 1fr !important;
        display: flex !important;
        flex-direction: column;
    }
    .portal-themed .lib .list .c .cv {
        aspect-ratio: 16/9;
        min-height: 0;
    }
    .portal-themed .lib .list .c .cv .pr {
        display: block;
        position: absolute; left: 0; right: 0; bottom: 0;
        height: 3px; background: rgba(0,0,0,.2); z-index: 1;
    }
    .portal-themed .lib .list .c .b { padding: 14px 16px !important; }
    .portal-themed .lib .list .c .b .prog { display: none; }
    .portal-themed .lib .list .c h4 { font-size: 18px !important; }

    /* --- PROFILE: head + 4-col stats + row2 --- */
    .portal-themed .pro { padding: 24px 32px 40px; }
    .portal-themed .pro .head {
        text-align: left !important;
        display: grid !important;
        grid-template-columns: 96px 1fr auto;
        gap: 22px;
        align-items: center;
        padding: 0 0 24px !important;
        border-bottom: 1px solid var(--line);
    }
    .portal-themed .pro .head .av {
        width: 96px !important; height: 96px !important;
        margin: 0 !important; font-size: 30px !important;
    }
    .portal-themed .pro .head h1 { font-size: 36px !important; }
    .portal-themed .pro .stats {
        margin: 22px 0 0 !important;
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 14px !important;
        padding: 0 !important;
        background: transparent !important;
        border: 0 !important;
    }
    .portal-themed .pro .stats > div {
        padding: 18px 20px !important;
        background: var(--surface);
        border: 1px solid var(--line) !important;
        border-radius: 12px;
        text-align: left;
    }
    .portal-themed .pro .stats > div b { font-size: 40px !important; margin-bottom: 6px !important; }
    .portal-themed .pro .stats > div span { color: var(--ink-2); }
    .portal-themed .pro .section {
        margin: 28px 0 0 !important;
        max-width: 820px;
    }
    .portal-themed .pro .row2 {
        display: grid;
        grid-template-columns: 1.2fr 1fr;
        gap: 28px;
        max-width: 1280px;
        margin: 28px 0 0;
    }
    .portal-themed .pro .row2 .section {
        margin: 0 !important;
        max-width: none;
    }

    /* --- MARKETPLACE alias: uses .cat classes already --- */

    /* --- COURSES listing page (lib variant with course tiles) --- */
    /* already covered by .lib above */
}

/* ================================================================
   Extra-wide breakpoint — further polish past 1440px
   ================================================================ */
@media (min-width: 1440px) {
    .portal-themed.portal-root { grid-template-columns: 260px 1fr; }
    .portal-themed .home,
    .portal-themed .cat,
    .portal-themed .det,
    .portal-themed .lib,
    .portal-themed .pro { padding: 28px 44px 60px; }
    .portal-themed .play .body { padding: 24px 44px !important; }
}

/* ================================================================
   COURSE LANDING PAGE (/courses/{id})
   Public pre-enrollment sales page — themed in Atelier/Hearth/Studio
   using the creator's microsite theme. Self-contained section, not
   dependent on the portal shell.
   ================================================================ */

/* Outer shell wraps the themed top bar + main content */
.clp-shell {
    background: var(--bg);
    color: var(--ink);
    min-height: 100vh;
    font-size: 14px;
    line-height: 1.5;
}
.clp-shell main { display: block; }

.clp-topbar {
    position: sticky; top: 0; z-index: 20;
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px;
    padding: 14px 20px;
    background: color-mix(in oklab, var(--bg) 92%, transparent);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}
.clp-topbar-brand {
    display: inline-flex; align-items: center; gap: 10px;
    color: var(--ink);
    text-decoration: none;
    min-width: 0;
}
.clp-topbar-logo {
    width: 32px; height: 32px; border-radius: 8px;
    object-fit: contain; background: var(--surface);
    border: 1px solid var(--line); padding: 2px;
    flex: 0 0 32px;
}
.clp-topbar-sigil {
    width: 32px; height: 32px; border-radius: 8px;
    background: var(--accent); color: #fff;
    display: inline-grid; place-items: center;
    font-weight: 600; font-size: 14px;
    flex: 0 0 32px;
}
.clp-topbar-name {
    font-weight: 600; font-size: 15px; letter-spacing: -0.01em;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.portal-themed .clp-topbar-name { font-family: 'Instrument Serif', serif; font-weight: 400; font-size: 18px; }
.portal-themed.b .clp-topbar-name { font-family: 'Fraunces', serif; font-weight: 500; font-size: 17px; }
.portal-themed.c .clp-topbar-name { font-family: 'Fraunces', serif; font-weight: 500; font-size: 17px; }
.clp-topbar-right { display: inline-flex; align-items: center; gap: 10px; }
.portal-themed .clp-topbar-link {
    color: var(--ink-2); font-size: 13px; font-weight: 500;
    padding: 8px 4px; text-decoration: none;
}
.portal-themed .clp-topbar-link:hover { color: var(--ink); }
.portal-themed .clp-topbar-cta {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px; border-radius: 999px;
    background: var(--ink); color: var(--bg);
    font-size: 13px; font-weight: 500;
    text-decoration: none;
    border: 1px solid var(--ink);
}
.portal-themed .clp-topbar-cta:hover { filter: brightness(1.08); }
.portal-themed.c .clp-topbar-cta { border-radius: 0; }

.clp.portal-themed {
    display: block;
    background: var(--bg);
    color: var(--ink);
    max-width: 1080px;
    margin: 0 auto;
    padding: 28px 28px 120px;
    min-height: auto;
    font-size: 15px;
    line-height: 1.6;
}
.clp * { box-sizing: border-box; }
.clp a { color: inherit; text-decoration: none; }

.clp-back {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 13px; color: var(--ink-3);
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: .04em;
}
.clp-back:hover { color: var(--ink); }

.clp-hero { margin: 28px 0 12px; max-width: 780px; }
.clp-eyebrow {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px; letter-spacing: .18em;
    text-transform: uppercase; color: var(--ink-3);
    margin-bottom: 16px;
}
.clp-title {
    font-weight: 400;
    font-size: clamp(42px, 7vw, 78px); line-height: 1.02;
    letter-spacing: -0.03em; margin: 0;
    color: var(--ink);
}
.clp-title-dot { color: var(--accent); font-style: italic; }
.clp-tagline {
    font-style: italic; font-weight: 400;
    font-size: 22px; line-height: 1.4; color: var(--accent);
    margin: 18px 0 0; max-width: 620px;
}
.clp .clp-lede-wrap { margin: 14px 0 0; max-width: 580px; }
.clp .clp-lede {
    font-size: 15px; line-height: 1.55; color: var(--ink-3);
    margin: 0;
    white-space: pre-line;
}
.clp .clp-lede em { font-style: italic; color: var(--ink); }
.clp .clp-lede.is-clipped {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: normal;
    max-height: calc(1.55em * 3);
}
.clp .clp-lede-toggle {
    margin-top: 6px; padding: 0; border: 0; background: none; cursor: pointer;
    color: var(--accent, var(--ink)); font: 600 11.5px/1 'JetBrains Mono', monospace;
    letter-spacing: .08em; text-transform: uppercase;
}
.clp .clp-lede-toggle:hover { text-decoration: underline; }
.clp-meta {
    display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
    margin-top: 26px; font-size: 13px; color: var(--ink-3);
    font-family: 'JetBrains Mono', monospace; letter-spacing: .04em;
}
.clp-meta span { display: inline-flex; align-items: center; gap: 6px; }
.clp-meta-dot {
    width: 3px; height: 3px; border-radius: 50%; background: var(--ink-3);
    display: inline-block;
}
.clp-meta-em { color: var(--accent); font-weight: 500; }

.clp-cta-row {
    display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
    margin-top: 28px;
}
.portal-themed .clp-btn-primary {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 14px 26px; border-radius: 999px;
    background: var(--accent); color: #fff;
    font-weight: 500; font-size: 15px;
    border: 1px solid var(--accent);
    cursor: pointer; transition: transform .15s, filter .15s;
}
.portal-themed .clp-btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.portal-themed .clp-btn-primary svg { transition: transform .2s; }
.portal-themed .clp-btn-primary:hover svg { transform: translateX(3px); }
.portal-themed .clp-btn-big { padding: 16px 32px; font-size: 16px; }
.portal-themed .clp-btn-ghost {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 13px 20px; border-radius: 999px;
    background: transparent; color: var(--ink);
    font-weight: 500; font-size: 14.5px;
    border: 1px solid var(--line);
    cursor: pointer;
}
.portal-themed .clp-btn-ghost:hover { background: var(--surface-2); border-color: var(--ink); }

.clp-cover-top { margin-bottom: 24px; }
.clp-cover {
    margin: 32px auto; max-width: 960px;
    border-radius: 18px; overflow: hidden;
    aspect-ratio: 16/9;
    background: var(--surface);
    box-shadow: 0 24px 48px -24px rgba(0,0,0,.3);
}
.clp-cover iframe, .clp-cover video {
    width: 100%; height: 100%; display: block; object-fit: cover; border: 0;
}
.clp-cover img { width: 100%; height: 100%; display: block; object-fit: cover; border: 0; }
.clp-cover-playable { position: relative; cursor: pointer; }
.clp-cover-poster { width: 100%; height: 100%; object-fit: cover; }
.clp-cover-fallback {
    background: var(--surface-2);
    background-image: radial-gradient(circle at 50% 50%,
        color-mix(in oklab, var(--accent) 20%, var(--surface-2)) 0%,
        var(--surface-2) 70%);
}
.clp-cover-play {
    position: absolute; inset: 0; margin: auto;
    width: 76px; height: 76px; border-radius: 50%;
    background: rgba(255,255,255,.95); color: var(--accent);
    border: 0; cursor: pointer;
    display: grid; place-items: center;
    box-shadow: 0 12px 36px rgba(0,0,0,.35);
    transition: transform .15s, background .15s;
}
.clp-cover-play svg { margin-left: 3px; }
.clp-cover-playable:hover .clp-cover-play { transform: scale(1.06); background: #fff; }

.clp-section { margin-top: 68px; padding-top: 48px; border-top: 1px solid var(--line); }
.clp-section-head { margin-bottom: 28px; max-width: 640px; }
.clp-section-title {
    font-weight: 400;
    font-size: clamp(30px, 4.5vw, 44px); line-height: 1.1;
    letter-spacing: -0.02em; margin: 0; color: var(--ink);
}
.clp-section-title em { font-style: italic; color: var(--accent); }

/* Instructor */
.clp-instructor-card {
    display: flex; gap: 22px; align-items: flex-start;
    background: var(--surface); border: 1px solid var(--line);
    border-radius: 16px; padding: 22px;
}
.clp-instructor-avatar {
    flex: 0 0 auto; width: 84px; height: 84px; border-radius: 50%;
    object-fit: cover; border: 1px solid var(--line);
}
.clp-instructor-avatar-fallback {
    display: grid; place-items: center;
    font-size: 30px; font-weight: 500; color: var(--accent);
    background: var(--surface-2);
}
.clp-instructor-meta { flex: 1; min-width: 0; }
.clp-instructor-name { font-size: 22px; color: var(--ink); font-weight: 500; }
.clp-instructor-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
    color: var(--accent); margin-top: 4px;
}
.clp-instructor-bio {
    margin: 12px 0 0; font-size: 14.5px; line-height: 1.65; color: var(--ink-2);
    white-space: pre-line;
}

/* Outcomes */
.clp-outcomes-list {
    list-style: none; padding: 0; margin: 0;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
}
.clp-outcomes-list li {
    display: flex; gap: 12px; align-items: flex-start;
    padding: 16px 18px; background: var(--surface);
    border: 1px solid var(--line); border-radius: 12px;
    font-size: 14.5px; line-height: 1.5; color: var(--ink);
}
.clp-outcomes-list svg { color: var(--accent); flex-shrink: 0; margin-top: 2px; }

/* Curriculum */
.clp-modules { display: flex; flex-direction: column; gap: 10px; }
.clp-module {
    background: var(--surface);
    border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
    transition: border-color .15s;
}
.clp-module[open] { border-color: var(--accent); }
.clp-module > summary {
    display: flex; align-items: center; gap: 18px;
    padding: 16px 20px; cursor: pointer; list-style: none;
}
.clp-module > summary::-webkit-details-marker { display: none; }
.clp-module-num {
    flex-shrink: 0; width: 40px; height: 40px; border-radius: 10px;
    background: var(--surface-2); display: inline-grid; place-items: center;
    font-weight: 500;
    font-size: 14px; color: var(--accent);
    border: 1px solid var(--line);
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: .04em;
}
.clp-module-meta { flex: 1; min-width: 0; }
.clp-module-title { font-size: 17px; font-weight: 500; letter-spacing: -0.005em; color: var(--ink); }
.clp-module-sub {
    font-size: 11.5px; color: var(--ink-3); margin-top: 2px;
    font-family: 'JetBrains Mono', monospace; letter-spacing: .04em;
}
.clp-chev { color: var(--ink-3); transition: transform .2s; flex-shrink: 0; }
.clp-module[open] .clp-chev { transform: rotate(180deg); }
.clp-lessons {
    padding: 0 20px 18px 76px;
    display: flex; flex-direction: column; gap: 6px;
}
.clp-lesson {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px; border-radius: 10px;
    background: var(--bg);
    font-size: 13.5px; color: var(--ink);
}
.clp-lesson-num {
    font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--ink-3);
    width: 24px; letter-spacing: .04em;
}
.clp-lesson-title { flex: 1; }
.clp-free {
    font-family: 'JetBrains Mono', monospace; font-size: 10px; text-transform: uppercase;
    letter-spacing: .1em; padding: 3px 8px; border-radius: 999px;
    background: var(--surface-2); color: var(--accent);
}
.clp-empty { padding: 8px 0; color: var(--ink-3); font-size: 13px; }

/* Reviews */
.clp-reviews-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
}
.clp-review {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: 14px; padding: 22px;
}
.clp-review-stars { display: flex; gap: 2px; color: var(--accent); margin-bottom: 12px; }
.clp-review-body {
    font-style: italic; font-size: 16px; line-height: 1.55;
    color: var(--ink); margin: 0 0 16px;
}
.clp-review-author { font-size: 13px; color: var(--ink-2); }
.clp-review-author strong { display: block; color: var(--ink); font-weight: 600; }
.clp-review-media-img {
    display: block; width: 100%; max-width: 100%; height: auto; max-height: 280px;
    object-fit: contain; background: var(--surface-2);
    border: 1px solid var(--line); border-radius: 10px; margin: 0 0 12px;
}
.clp-review-media-video {
    position: relative; width: 100%; aspect-ratio: 16/9;
    border-radius: 10px; overflow: hidden; margin: 0 0 12px; background: #000;
}
.clp-review-media-video iframe,
.clp-review-media-video video {
    position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
}

/* FAQs */
.clp-faqs-list { display: flex; flex-direction: column; gap: 10px; max-width: 780px; }
.clp-faq {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: 12px; overflow: hidden;
}
.clp-faq[open] { border-color: var(--accent); }
.clp-faq > summary {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 16px 20px; cursor: pointer; list-style: none;
    font-size: 16px; font-weight: 500; color: var(--ink);
}
.clp-faq > summary::-webkit-details-marker { display: none; }
.clp-faq[open] .clp-chev { transform: rotate(180deg); }
.clp-faq-body {
    padding: 0 20px 20px; color: var(--ink-2); font-size: 14.5px; line-height: 1.65;
    white-space: pre-line;
}

/* Enroll (single plan) */
.clp-enroll-card {
    background: var(--ink); color: var(--bg);
    border-radius: 24px; padding: 52px 32px; text-align: center;
    max-width: 640px; margin: 0 auto;
}
.clp-enroll-eyebrow { color: var(--accent); margin-bottom: 14px; }
.clp-price {
    font-weight: 400;
    font-size: clamp(56px, 10vw, 84px); line-height: 1; letter-spacing: -0.03em;
    color: var(--bg);
}
.clp-enroll-note {
    color: rgba(255,255,255,.64); margin: 14px 0 28px; font-size: 15px;
}
.portal-themed .clp-enroll-card .clp-btn-primary {
    background: var(--bg); color: var(--ink); border-color: var(--bg);
}
.portal-themed .clp-enroll-card .clp-btn-primary:hover { background: #fff; filter: none; }
.portal-themed .clp-enroll-card .clp-member a { color: var(--bg); }
.clp-refund {
    display: inline-flex; align-items: center; gap: 8px; justify-content: center;
    margin: 20px 0 0; font-size: 13px; color: rgba(255,255,255,.76);
}
.clp-refund svg { color: var(--accent); }
.clp-member { margin-top: 16px; font-size: 13px; color: rgba(255,255,255,.7); }
.clp-member a { color: var(--bg); text-decoration: underline; text-underline-offset: 3px; }

/* Enroll (multi-plan tiers) */
.clp-tier-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px; max-width: 980px; margin: 24px auto 0;
}
.clp-tier {
    background: var(--ink); color: var(--bg);
    border-radius: 22px; padding: 30px 24px; text-align: left;
    position: relative; display: flex; flex-direction: column; gap: 12px;
}
.clp-tier.is-default { outline: 2px solid var(--accent); outline-offset: -2px; }
.clp-tier-badge {
    position: absolute; top: -12px; left: 24px;
    background: var(--accent); color: #fff;
    padding: 4px 12px; border-radius: 999px;
    font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
}
.clp-tier-name { font-size: 22px; color: var(--bg); font-weight: 500; }
.clp-tier-price { font-size: 38px; line-height: 1; color: var(--bg); font-weight: 400; }
.clp-tier-period { font-size: 13px; color: rgba(255,255,255,.6); margin-left: 4px; font-weight: 400; }
.clp-tier-validity { color: rgba(255,255,255,.68); font-size: 13px; margin: 0; }
.clp-tier-desc { color: rgba(255,255,255,.82); font-size: 14px; margin: 0; }
.clp-tier-perks { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-direction: column; gap: 4px; }
.clp-tier-perks li {
    color: rgba(255,255,255,.86); font-size: 13px;
    padding-left: 18px; position: relative;
}
.clp-tier-perks li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); }
.portal-themed .clp-tier .clp-btn-primary {
    background: var(--bg); color: var(--ink); border-color: var(--bg); margin-top: auto;
}
.portal-themed .clp-tier .clp-btn-primary:hover { background: #fff; filter: none; }

/* Sticky mobile CTA */
.portal-themed .clp-sticky {
    position: fixed; bottom: 14px; left: 14px; right: 14px; z-index: 30;
    display: none; align-items: center; justify-content: space-between; gap: 12px;
    padding: 12px 16px 12px 18px;
    background: var(--ink); color: var(--bg);
    border-radius: 999px;
    box-shadow: 0 12px 24px -8px rgba(0,0,0,.4);
}
.clp-sticky-price { display: inline-flex; align-items: baseline; gap: 8px; }
.clp-sticky-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; opacity: .7; }
.clp-sticky-price strong { font-size: 17px; font-weight: 500; }
.clp-sticky-cta { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; }

.clp-toast {
    position: fixed; top: 14px; left: 14px; right: 14px; z-index: 50;
    display: flex; align-items: flex-start; gap: 12px;
    background: #1F1914; color: #FAF6EF;
    padding: 14px 16px; border-radius: 14px;
    box-shadow: 0 12px 24px -8px rgba(0,0,0,.3);
    max-width: 400px;
}
.clp-toast button {
    margin-left: auto; background: transparent; border: 0; color: inherit;
    font-size: 20px; cursor: pointer; opacity: .7;
}
.clp-toast-sub { font-size: 12.5px; opacity: .72; margin-top: 2px; }

@media (min-width: 640px) {
    .clp-toast { left: auto; }
}
@media (max-width: 640px) {
    .clp.portal-themed { padding: 18px 18px 100px; }
    .clp-hero { margin-top: 16px; }
    .clp-lede { font-size: 15.5px; }
    .clp-tagline { font-size: 19px; }
    .clp-lessons { padding-left: 66px; }
    .clp-enroll-card { padding: 40px 22px; }
    .clp-instructor-card { flex-direction: column; gap: 14px; }
    .clp-sticky { display: flex; }
    .clp-section { margin-top: 52px; padding-top: 36px; }
}

/* --- Atelier (a): Instrument Serif titles, monochrome clay --- */
.clp.portal-themed.a .clp-title,
.clp.portal-themed.a .clp-section-title,
.clp.portal-themed.a .clp-price,
.clp.portal-themed.a .clp-tier-price,
.clp.portal-themed.a .clp-tier-name,
.clp.portal-themed.a .clp-instructor-name,
.clp.portal-themed.a .clp-module-title,
.clp.portal-themed.a .clp-faq > summary,
.clp.portal-themed.a .clp-sticky-price strong,
.clp.portal-themed.a .clp-review-body {
    font-family: 'Instrument Serif', serif;
}

/* --- Hearth (b): Fraunces + Caveat accents --- */
.clp.portal-themed.b .clp-title,
.clp.portal-themed.b .clp-section-title,
.clp.portal-themed.b .clp-price,
.clp.portal-themed.b .clp-tier-price,
.clp.portal-themed.b .clp-tier-name,
.clp.portal-themed.b .clp-instructor-name,
.clp.portal-themed.b .clp-module-title,
.clp.portal-themed.b .clp-faq > summary,
.clp.portal-themed.b .clp-sticky-price strong,
.clp.portal-themed.b .clp-review-body {
    font-family: 'Fraunces', serif;
}
.clp.portal-themed.b .clp-title { font-weight: 500; }
.clp.portal-themed.b .clp-tagline { font-family: 'Caveat', cursive; font-style: normal; font-size: 26px; }
.clp.portal-themed.b .clp-eyebrow { font-family: 'Caveat', cursive; font-size: 16px; letter-spacing: 0; text-transform: none; color: var(--accent); }
.clp.portal-themed.b .clp-meta { font-family: 'Fraunces', serif; letter-spacing: 0; font-style: italic; }
.clp.portal-themed.b .clp-module[open],
.clp.portal-themed.b .clp-faq[open] { border-color: var(--accent); }
.clp.portal-themed.b .clp-module { border-style: dashed; }
.clp.portal-themed.b .clp-module-sub { font-family: 'Fraunces', serif; font-style: italic; letter-spacing: 0; }
.clp.portal-themed.b .clp-lesson-num { font-family: 'Caveat', cursive; font-size: 14px; letter-spacing: 0; }
.clp.portal-themed.b .clp-btn-primary { font-family: 'Fraunces', serif; font-weight: 500; }

/* --- Studio (c): Fraunces + bold editorial mono --- */
.clp.portal-themed.c .clp-title,
.clp.portal-themed.c .clp-section-title,
.clp.portal-themed.c .clp-price,
.clp.portal-themed.c .clp-tier-price,
.clp.portal-themed.c .clp-tier-name,
.clp.portal-themed.c .clp-instructor-name,
.clp.portal-themed.c .clp-module-title,
.clp.portal-themed.c .clp-faq > summary,
.clp.portal-themed.c .clp-sticky-price strong,
.clp.portal-themed.c .clp-review-body {
    font-family: 'Fraunces', serif;
}
.clp.portal-themed.c .clp-title { font-weight: 500; letter-spacing: -0.035em; }
.clp.portal-themed.c .clp-section-title { font-weight: 500; }
.clp.portal-themed.c .clp-module,
.clp.portal-themed.c .clp-faq,
.clp.portal-themed.c .clp-review,
.clp.portal-themed.c .clp-tier,
.clp.portal-themed.c .clp-enroll-card,
.clp.portal-themed.c .clp-instructor-card,
.clp.portal-themed.c .clp-cover,
.clp.portal-themed.c .clp-outcomes-list li,
.clp.portal-themed.c .clp-lesson {
    border-radius: 0;
}
.clp.portal-themed.c .clp-btn-primary,
.clp.portal-themed.c .clp-btn-ghost,
.clp.portal-themed.c .clp-sticky { border-radius: 0; }
.clp.portal-themed.c .clp-section { border-top-color: var(--ink); }
.clp.portal-themed.c .clp-eyebrow { color: var(--accent); }


/* ================================================================
   COMPONENT UTILITIES — promoted from inline styles
   These are reusable, theme-aware classes used across portal slices.
   Added 2026-04-30 by component-standardizer.
   ================================================================ */

/* --- Form input (heavy hitter, AccountSettings) --- */
.portal-themed .input {
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--bg);
    color: var(--ink);
    font-size: 13px;
    font-family: inherit;
    line-height: 1.3;
}
.portal-themed .input:focus {
    outline: none;
    border-color: var(--accent);
}
.portal-themed .input::placeholder { color: var(--ink-3); }
.portal-themed .input-grow { flex: 1; min-width: 0; }

/* --- Form row layouts --- */
.portal-themed .form-row {
    width: 100%;
    display: flex;
    gap: 6px;
    margin-top: 8px;
}
.portal-themed .form-row.tight { gap: 6px; margin-top: 6px; }
.portal-themed .form-col {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 6px;
}

/* Stacked .menu .m row variant — used for forms inside settings panels */
.portal-themed .pro .menu .m.m-stack {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}
.portal-themed .pro .menu .m.m-stack .m-head {
    display: flex;
    justify-content: space-between;
    width: 100%;
    align-items: center;
}

/* --- Badges (PRIMARY / VERIFIED / UNVERIFIED + status messages) --- */
.portal-themed .badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: .02em;
    text-transform: uppercase;
    display: inline-block;
    line-height: 1.4;
}
.portal-themed .badge-primary { background: var(--accent-soft, #ffedd5); color: var(--accent, #ea580c); }
.portal-themed .badge-success { background: rgba(26,127,74,.12); color: var(--good); }
.portal-themed .badge-warning { background: rgba(217,138,58,.12); color: var(--warn); }

/* --- Form status messages (inline notices) --- */
.portal-themed .form-msg {
    font-size: 12px;
    margin-top: 4px;
    line-height: 1.35;
}
.portal-themed .form-msg.ok { color: var(--good); }
.portal-themed .form-msg.err { color: var(--accent); }
.portal-themed .form-msg.muted { color: var(--ink-3); }
.portal-themed .form-hint {
    font-size: 11.5px;
    color: var(--ink-3);
    margin-top: 4px;
    line-height: 1.4;
}
.portal-themed .form-hint-tight {
    font-size: 11px;
    color: var(--ink-3);
    margin-top: 0;
    line-height: 1.35;
}

/* --- Linked-identity row (AccountSettings: backup emails/phones) --- */
.portal-themed .identity-list {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 4px;
}
.portal-themed .identity-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--bg);
}
.portal-themed .identity-row .id-main {
    min-width: 0;
    flex: 1;
}
.portal-themed .identity-row .id-kind {
    font-size: 10px;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: .08em;
    color: var(--ink-3);
}
.portal-themed .identity-row .id-value {
    font-size: 13px;
    color: var(--ink);
    overflow: hidden;
    text-overflow: ellipsis;
}
.portal-themed .identity-row .id-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

/* --- Small icon-button (the ✕ / ★ in identity rows) --- */
.portal-themed .btn.btn-icon {
    font-size: 11px;
    padding: 4px 8px;
}
.portal-themed .btn.btn-icon.danger { color: var(--accent, #ea580c); }

/* --- Menu link (de-link the underline on .m anchors) --- */
.portal-themed .pro .menu a.m,
.portal-themed .pro .menu .m { text-decoration: none; }

/* --- Empty-state CTA spacing (replaces inline style="margin-top:12px") --- */
.portal-themed .empty .btn { margin-top: 12px; }

/* --- Profile head extras --- */
.portal-themed .pro .head .em {
    font-size: 11.5px;
    color: var(--ink-3);
    margin-top: 3px;
}

/* --- Dashboard "padded section" wrapper --- */
.portal-themed .home .pad-x { padding: 0 16px; }

/* --- Dashboard streak meta line (replaces inline font-size + color) --- */
.portal-themed .home .streak .streak-meta {
    font-size: 11px;
    color: var(--ink-3);
    margin-top: 2px;
}

/* --- Search input field reset (Marketplace input element) --- */
.portal-themed .search input,
.portal-themed .search input[type="search"] {
    border: 0;
    background: transparent;
    font: inherit;
    color: inherit;
    flex: 1;
    outline: none;
    min-width: 0;
}

/* --- ComingSoon placeholder pane --- */
.portal-themed .empty.empty-soon {
    margin: 24px 16px;
    padding: 32px 20px;
    border: 1px dashed var(--line);
    border-radius: 14px;
    text-align: center;
    color: var(--ink-2);
}
.portal-themed .empty.empty-soon .icon-lg {
    width: 32px;
    height: 32px;
    color: var(--ink-3);
    margin-bottom: 8px;
}
.portal-themed .empty.empty-soon h4 { margin: 0 0 4px; }
.portal-themed .empty.empty-soon p {
    margin: 0 0 14px;
    font-size: 13px;
    color: var(--ink-3);
}

/* --- form-element uses :select (so the <select> in identity-add inherits .input look) --- */
.portal-themed select.input {
    /* keep native select rendering of options; just match input chrome */
    appearance: auto;
}

/* --- Misc form helpers --- */
.portal-themed .btn.btn-self-start { align-self: flex-start; }
.portal-themed .m-form { margin: 0; width: 100%; }
.portal-themed .pro .menu .m.m-full { width: 100%; }
.portal-themed .m-form-inline { margin: 0; }
.portal-themed .form-contents { display: contents; }

/* --- Visually-hidden (a11y label without visual presence) --- */
.portal-themed .vh {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0);
    white-space: nowrap; border: 0;
}

/* ================================================================
   ACCOUNT SETTINGS — iOS-Settings-style row pattern

   Aligns with Profile screen reference: sectioned .menu cards with
   .m rows showing label + value + chevron, where each row expands
   inline (<details>) to reveal an edit form. Inherits theme tokens
   (bg/ink/accent) so Atelier / Hearth / Studio adapt automatically.
   ================================================================ */

/* Hide the inherited .pro head/stats — settings has its own header */
.portal-themed .pro-set .head,
.portal-themed .pro-set .stats { display: none; }

/* Section spacing within settings (uses .pro .section already; tighten
   the first-section gap below the topbar). */
.portal-themed .pro-set .section:first-of-type { margin-top: 14px; }
.portal-themed .pro-set .section-lede {
    margin: -2px 0 10px;
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--ink-2);
}

/* --- Accordion row inside .menu ---
   <details class="m-acc"><summary class="m">…</summary>…</details>
   Summary mimics a regular .m row; body slides under it. */
.portal-themed .pro-set .menu .m-acc {
    border-bottom: 1px solid var(--line-2);
}
.portal-themed .pro-set .menu .m-acc:last-child { border-bottom: 0; }

.portal-themed .pro-set .menu .m-acc > summary {
    list-style: none;
    cursor: pointer;
    padding: 12px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--ink);
    border: 0;
}
.portal-themed .pro-set .menu .m-acc > summary::-webkit-details-marker { display: none; }
.portal-themed .pro-set .menu .m-acc > summary::marker { content: ""; }
.portal-themed .pro-set .menu .m-acc > summary > b,
.portal-themed .pro-set .menu .m-acc > summary > span:first-child {
    font-weight: 500;
    flex: 0 0 auto;
    white-space: nowrap;
}
.portal-themed .pro-set .menu .m-acc > summary .r {
    color: var(--ink-3);
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 6px;
    text-align: right;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.portal-themed .pro-set .menu .m-acc > summary .r svg {
    width: 10px;
    height: 10px;
    flex: 0 0 auto;
    transition: transform .18s ease;
}
.portal-themed .pro-set .menu .m-acc[open] > summary .r svg { transform: rotate(90deg); }
.portal-themed .pro-set .menu .m-acc > summary .r.is-empty { font-style: italic; color: var(--ink-3); }

/* Slight visual cue when the row is open */
.portal-themed .pro-set .menu .m-acc[open] {
    background: var(--surface-2);
}
.portal-themed .pro-set .menu .m-acc[open] > summary .r { color: var(--accent); }

/* Body of an open accordion row */
.portal-themed .pro-set .menu .m-acc-body {
    padding: 4px 14px 16px;
    border-top: 1px solid var(--line-2);
}
.portal-themed .pro-set .menu .m-form-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
}
.portal-themed .pro-set .menu .m-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.portal-themed .pro-set .menu .m-lbl {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9.5px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--ink-3);
}
.portal-themed .pro-set .menu .m-req {
    color: var(--accent);
    margin-left: 3px;
}
.portal-themed .pro-set .menu .m-input {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 12px;
    font: inherit;
    font-size: 14px;
    color: var(--ink);
    line-height: 1.3;
    transition: border-color .15s;
}
.portal-themed .pro-set .menu .m-input:focus {
    outline: none;
    border-color: var(--ink-2);
}
.portal-themed .pro-set .menu .m-input::placeholder {
    color: var(--ink-3);
}
.portal-themed .pro-set .menu .m-input[type="password"] {
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: .12em;
}
.portal-themed .pro-set .menu .m-input-code {
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 18px;
    letter-spacing: .35em;
}
.portal-themed .pro-set .menu select.m-input {
    appearance: auto;
}

.portal-themed .pro-set .menu .m-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 2px;
}
.portal-themed .pro-set .menu .m-cta {
    background: var(--ink);
    color: var(--bg);
    border: 0;
    border-radius: 8px;
    padding: 9px 16px;
    font: inherit;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity .15s;
}
.portal-themed .pro-set .menu .m-cta:hover,
.portal-themed .pro-set .menu .m-cta:focus { opacity: .85; outline: none; }

.portal-themed .pro-set .menu .m-msg {
    margin: 0 0 6px;
    font-size: 12px;
    line-height: 1.4;
    padding: 8px 10px;
    border-radius: 6px;
    background: var(--surface);
    border: 1px solid var(--line);
}
.portal-themed .pro-set .menu .m-msg.ok { color: var(--good); border-color: color-mix(in oklab, var(--good) 30%, var(--line)); }
.portal-themed .pro-set .menu .m-msg.err { color: var(--accent); border-color: color-mix(in oklab, var(--accent) 30%, var(--line)); }
.portal-themed .pro-set .menu .m-msg.muted { color: var(--ink-2); }
.portal-themed .pro-set .m-msg-block { margin: 0 0 10px; }
.portal-themed .pro-set .menu .m-hint {
    margin: 0 0 4px;
    font-size: 12px;
    color: var(--ink-2);
    line-height: 1.4;
}
.portal-themed .pro-set .menu .m-hint b { font-weight: 600; color: var(--ink); }

/* --- Linked-identity (.m-stack) row variant for backup contacts --- */
.portal-themed .pro-set .menu .m.m-stack {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--line-2);
}
.portal-themed .pro-set .menu .m.m-stack:last-child { border-bottom: 0; }
.portal-themed .pro-set .menu .m.m-stack .m-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 10px;
}
.portal-themed .pro-set .menu .m.m-stack .m-head > span:first-child {
    font-weight: 500;
    font-size: 13px;
}
.portal-themed .pro-set .menu .m.m-stack .m-head .r {
    display: inline-flex;
    gap: 6px;
    align-items: center;
}

.portal-themed .pro-set .m-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    letter-spacing: .12em;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
    line-height: 1.4;
}
.portal-themed .pro-set .m-tag-primary { background: color-mix(in oklab, var(--accent) 14%, transparent); color: var(--accent); }
.portal-themed .pro-set .m-tag-ok { background: color-mix(in oklab, var(--good) 16%, transparent); color: var(--good); }
.portal-themed .pro-set .m-tag-warn { background: var(--surface-2); color: var(--ink-3); }

.portal-themed .pro-set .m-id-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
}
.portal-themed .pro-set .m-id-val {
    font-size: 13px;
    color: var(--ink-2);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}
.portal-themed .pro-set .m-id-acts {
    display: inline-flex;
    gap: 12px;
    flex: 0 0 auto;
}
.portal-themed .pro-set .m-link {
    background: transparent;
    border: 0;
    padding: 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--ink-2);
    cursor: pointer;
    border-bottom: 1px solid transparent;
    transition: color .15s, border-color .15s;
}
.portal-themed .pro-set .m-link:hover { color: var(--ink); border-color: var(--ink); }
.portal-themed .pro-set .m-link-danger { color: var(--ink-3); }
.portal-themed .pro-set .m-link-danger:hover { color: var(--accent); border-color: var(--accent); }

/* ----- Theme adaptations (Hearth: dashed; Studio: square + bold) ----- */

/* Hearth (b): warm rounded with dashed dividers */
.portal-themed.b .pro-set .menu .m-acc { border-bottom-style: dashed; }
.portal-themed.b .pro-set .menu .m-acc-body { border-top-style: dashed; }
.portal-themed.b .pro-set .menu .m.m-stack { border-bottom-style: dashed; }
.portal-themed.b .pro-set .menu .m-input { border-style: dashed; border-radius: 10px; }
.portal-themed.b .pro-set .menu .m-cta { border-radius: 999px; }
.portal-themed.b .pro-set .menu .m-acc[open] > summary > span:first-child { font-family: 'Fraunces', serif; font-weight: 500; }

/* Studio (c): hairline solid, square corners, uppercase */
.portal-themed.c .pro-set .menu { border-radius: 0; border-color: var(--ink); }
.portal-themed.c .pro-set .menu .m-input { border-radius: 0; border-color: var(--ink); }
.portal-themed.c .pro-set .menu .m-cta { border-radius: 0; text-transform: uppercase; letter-spacing: .12em; font-size: 11px; }
.portal-themed.c .pro-set .menu .m-msg { border-radius: 0; }
.portal-themed.c .pro-set .menu .m-acc[open] { background: transparent; }
.portal-themed.c .pro-set .menu .m-acc[open] > summary { border-bottom: 1px solid var(--ink); }
.portal-themed.c .pro-set .menu .m-tag { border-radius: 0; }

/* Desktop polish */
@media (min-width: 1024px) {
    .portal-themed .pro-set .section { margin: 18px 32px 0; max-width: 720px; }
    .portal-themed .pro-set .menu .m-acc > summary { padding: 14px 18px; }
    .portal-themed .pro-set .menu .m-acc-body { padding: 4px 18px 18px; }
}

/* ================================================================
   LEGACY .set-* rules retained below for backward compatibility
   (in case any other slice references them). Not used by
   AccountSettings.cshtml after this redesign.
   ================================================================ */

/* Editorial intro — replaces avatar + eyebrow header */
.portal-themed .pro-set .set-intro {
    padding: 28px 22px 22px;
    border-bottom: 1px solid var(--line-2);
}
.portal-themed .pro-set .set-eyebrow {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9.5px;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--ink-3);
    margin-bottom: 14px;
}
.portal-themed .pro-set .set-title {
    font-family: 'Instrument Serif', serif;
    font-weight: 400;
    font-size: 30px;
    line-height: 1.05;
    letter-spacing: -.02em;
    margin: 0 0 6px;
    color: var(--ink);
}
.portal-themed .pro-set .set-title em {
    font-style: italic;
    color: var(--accent);
}
.portal-themed .pro-set .set-lede {
    margin: 0;
    font-size: 13px;
    line-height: 1.45;
    color: var(--ink-2);
    max-width: 32ch;
}

/* Block — a section group. No card chrome. Hairline divider above. */
.portal-themed .pro-set .set-block {
    padding: 22px 22px 4px;
    border-top: 1px solid var(--line-2);
}
.portal-themed .pro-set .set-block:first-of-type { border-top: 0; }
.portal-themed .pro-set .set-block-tight {
    padding: 14px 22px 28px;
}
.portal-themed .pro-set .set-kicker {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9.5px;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--ink-3);
    margin-bottom: 14px;
}
.portal-themed .pro-set .set-block-lede {
    margin: -8px 0 14px;
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--ink-2);
    max-width: 40ch;
}

/* Setting row: collapsed by default. Tap to reveal form. */
.portal-themed .pro-set .set-row {
    border-top: 1px solid var(--line-2);
}
.portal-themed .pro-set .set-row:first-of-type { border-top: 1px solid var(--line); }
.portal-themed .pro-set .set-row:last-of-type { border-bottom: 1px solid var(--line); }
.portal-themed .pro-set .set-row > summary {
    list-style: none;
    cursor: pointer;
    padding: 16px 0;
    display: grid;
    grid-template-columns: 80px 1fr auto;
    align-items: baseline;
    gap: 14px;
    color: var(--ink);
    transition: background-color .15s ease;
}
.portal-themed .pro-set .set-row > summary::-webkit-details-marker { display: none; }
.portal-themed .pro-set .set-row > summary::marker { content: ""; }
.portal-themed .pro-set .set-row > summary:hover { background: rgba(0,0,0,.015); }

.portal-themed .pro-set .set-k {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9.5px;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--ink-3);
}
.portal-themed .pro-set .set-v {
    font-family: 'Instrument Serif', serif;
    font-size: 17px;
    line-height: 1.25;
    color: var(--ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}
.portal-themed .pro-set .set-v-empty {
    font-style: italic;
    color: var(--ink-3);
}
.portal-themed .pro-set .set-edit {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--ink-2);
    border-bottom: 1px solid var(--ink-2);
    padding-bottom: 1px;
    transition: color .15s, border-color .15s;
}
.portal-themed .pro-set .set-row[open] > summary .set-edit,
.portal-themed .pro-set .set-row > summary:hover .set-edit {
    color: var(--accent);
    border-color: var(--accent);
}
.portal-themed .pro-set .set-row[open] > summary .set-v {
    color: var(--ink-2);
}

/* Edit body: form area shown inside the open <details> */
.portal-themed .pro-set .set-edit-body {
    padding: 4px 0 22px;
}
.portal-themed .pro-set .set-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.portal-themed .pro-set .set-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.portal-themed .pro-set .set-field-lbl {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9.5px;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--ink-3);
}
.portal-themed .pro-set .set-req {
    color: var(--accent);
    margin-left: 3px;
}
.portal-themed .pro-set .set-input {
    width: 100%;
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--line);
    padding: 8px 0;
    font: inherit;
    font-family: 'Instrument Serif', serif;
    font-size: 17px;
    color: var(--ink);
    line-height: 1.3;
    border-radius: 0;
    transition: border-color .15s;
}
.portal-themed .pro-set .set-input:focus {
    outline: none;
    border-bottom-color: var(--ink);
}
.portal-themed .pro-set .set-input[type="password"] {
    font-family: 'JetBrains Mono', monospace;
    font-size: 15px;
    letter-spacing: .12em;
}
.portal-themed .pro-set .set-input::placeholder {
    color: var(--ink-3);
    font-style: italic;
}
.portal-themed .pro-set .set-input-code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 22px;
    letter-spacing: .4em;
    text-align: center;
}
.portal-themed .pro-set select.set-input {
    appearance: auto;
    padding: 8px 0;
    font-family: 'Instrument Serif', serif;
    font-size: 17px;
}

.portal-themed .pro-set .set-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 4px;
}
/* Quiet text-style CTA — only visual emphasis is the accent underline */
.portal-themed .pro-set .set-cta {
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--ink);
    padding: 6px 0 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--ink);
    cursor: pointer;
    border-radius: 0;
    transition: color .15s, border-color .15s;
}
.portal-themed .pro-set .set-cta:hover,
.portal-themed .pro-set .set-cta:focus {
    color: var(--accent);
    border-color: var(--accent);
    outline: none;
}

.portal-themed .pro-set .set-msg {
    margin: 0 0 10px;
    font-size: 12.5px;
    line-height: 1.4;
    padding-left: 10px;
    border-left: 2px solid var(--line);
}
.portal-themed .pro-set .set-msg.ok { color: var(--good); border-color: var(--good); }
.portal-themed .pro-set .set-msg.err { color: var(--accent); border-color: var(--accent); }
.portal-themed .pro-set .set-msg.muted { color: var(--ink-2); }
.portal-themed .pro-set .set-msg-block { margin: 0 0 14px; }
.portal-themed .pro-set .set-hint {
    margin: -2px 0 4px;
    font-size: 12.5px;
    color: var(--ink-2);
    line-height: 1.4;
}
.portal-themed .pro-set .set-hint b {
    font-family: 'Instrument Serif', serif;
    font-weight: 400;
    color: var(--ink);
}

/* Identity (linked contact) list — quiet rows, no badge pills */
.portal-themed .pro-set .set-id-list {
    list-style: none;
    margin: 0 0 14px;
    padding: 0;
    border-top: 1px solid var(--line);
}
.portal-themed .pro-set .set-id {
    padding: 12px 0;
    border-bottom: 1px solid var(--line-2);
}
.portal-themed .pro-set .set-id-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}
.portal-themed .pro-set .set-id-kind {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9.5px;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--ink-3);
}
.portal-themed .pro-set .set-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    letter-spacing: .12em;
    text-transform: uppercase;
    padding: 1px 0;
    border-bottom: 1px solid currentColor;
    background: transparent;
}
.portal-themed .pro-set .set-tag-primary { color: var(--accent); }
.portal-themed .pro-set .set-tag-ok { color: var(--good); }
.portal-themed .pro-set .set-tag-warn { color: var(--warn, var(--ink-2)); }

.portal-themed .pro-set .set-id-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
}
.portal-themed .pro-set .set-id-val {
    font-family: 'Instrument Serif', serif;
    font-size: 16px;
    color: var(--ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}
.portal-themed .pro-set .set-id-acts {
    display: inline-flex;
    gap: 14px;
    flex: 0 0 auto;
}
.portal-themed .pro-set .set-link {
    background: transparent;
    border: 0;
    padding: 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--ink-2);
    cursor: pointer;
    border-bottom: 1px solid transparent;
}
.portal-themed .pro-set .set-link:hover {
    color: var(--ink);
    border-color: var(--ink);
}
.portal-themed .pro-set .set-link-danger { color: var(--ink-3); }
.portal-themed .pro-set .set-link-danger:hover {
    color: var(--accent);
    border-color: var(--accent);
}

/* "+ add another" row sits flush within the block, no separate card */
.portal-themed .pro-set .set-row-add { border-top: 1px solid var(--line-2); }
.portal-themed .pro-set .set-row-add > summary {
    grid-template-columns: 80px 1fr auto;
}
.portal-themed .pro-set .set-row-add .set-edit {
    font-family: 'Instrument Serif', serif;
    font-size: 22px;
    line-height: 1;
    border: 0;
    padding-bottom: 0;
    color: var(--ink-2);
    letter-spacing: 0;
}
.portal-themed .pro-set .set-row-add[open] > summary .set-edit { color: var(--accent); transform: rotate(45deg); }

/* Sign out — quiet bottom action with hairline frame */
.portal-themed .pro-set .set-signout {
    width: 100%;
    background: transparent;
    border: 1px solid var(--line);
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--ink-2);
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: .18em;
    text-transform: uppercase;
    cursor: pointer;
    transition: color .15s, border-color .15s;
}
.portal-themed .pro-set .set-signout:hover {
    color: var(--accent);
    border-color: var(--accent);
}
.portal-themed .pro-set .set-signout-arr {
    font-family: 'Instrument Serif', serif;
    font-size: 16px;
    letter-spacing: 0;
    transition: transform .15s;
}
.portal-themed .pro-set .set-signout:hover .set-signout-arr { transform: translateX(3px); }

/* ----- Theme adaptations ----- */

/* Hearth (b): use Fraunces italic for editorial values; soften kickers */
.portal-themed.b .pro-set .set-title,
.portal-themed.b .pro-set .set-v,
.portal-themed.b .pro-set .set-input,
.portal-themed.b .pro-set .set-id-val { font-family: 'Fraunces', serif; }
.portal-themed.b .pro-set .set-title em { font-family: 'Fraunces', serif; font-style: italic; }
.portal-themed.b .pro-set .set-row,
.portal-themed.b .pro-set .set-row:first-of-type,
.portal-themed.b .pro-set .set-row:last-of-type,
.portal-themed.b .pro-set .set-id-list,
.portal-themed.b .pro-set .set-id { border-style: dashed; }
.portal-themed.b .pro-set .set-input { border-bottom-style: dashed; }

/* Studio (c): bold uppercase headings, hairline solid borders, no italic */
.portal-themed.c .pro-set .set-title {
    font-family: 'Fraunces', serif;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 26px;
    letter-spacing: -.01em;
}
.portal-themed.c .pro-set .set-title em { font-style: normal; }
.portal-themed.c .pro-set .set-v,
.portal-themed.c .pro-set .set-input,
.portal-themed.c .pro-set .set-id-val { font-family: 'Fraunces', serif; font-weight: 400; }
.portal-themed.c .pro-set .set-eyebrow,
.portal-themed.c .pro-set .set-kicker { color: var(--accent); letter-spacing: .26em; }

/* Desktop polish: anchor max-width, larger intro */
@media (min-width: 768px) {
    .portal-themed .pro-set .set-intro { padding: 40px 32px 30px; }
    .portal-themed .pro-set .set-title { font-size: 40px; }
    .portal-themed .pro-set .set-block { padding: 32px 32px 8px; }
    .portal-themed .pro-set .set-block-tight { padding: 18px 32px 40px; }
    .portal-themed .pro-set .set-row > summary { grid-template-columns: 120px 1fr auto; padding: 18px 0; }
}

/* --- ComingSoon (Saved/Downloads stubs) --- */
.portal-themed .scr.soon { padding: 24px 16px 80px; max-width: 820px; margin: 0 auto; }
.portal-themed .scr.soon .head { margin-bottom: 24px; }
.portal-themed .scr.soon .head .k { font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px; }
.portal-themed .scr.soon .head h1 { margin: 0 0 6px; font-family: 'Instrument Serif', serif; font-weight: 400; font-size: 28px; color: var(--ink); }
.portal-themed .scr.soon .head h1 em { color: var(--accent); font-style: italic; }
.portal-themed .scr.soon .head .sub { font-size: 13px; color: var(--ink-2); }
@media (min-width: 1024px) {
    .portal-themed .scr.soon { padding: 32px 32px 60px; }
    .portal-themed .scr.soon .head h1 { font-size: 40px; }
}

/* --- Orders & receipts --- */
.portal-themed .scr.rcp { max-width: 820px; margin: 0 auto; padding-bottom: 80px; }
.portal-themed .scr.rcp .topbar { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line-2); }
.portal-themed .scr.rcp .topbar .ic { width: 30px; height: 30px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; color: var(--ink-2); text-decoration: none; }
.portal-themed .scr.rcp .topbar .n { flex: 1; font-family: 'Instrument Serif', serif; font-size: 17px; color: var(--ink); }
.portal-themed .scr.rcp .head { padding: 20px 16px 14px; }
.portal-themed .scr.rcp .head .k { font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px; }
.portal-themed .scr.rcp .head h1 { margin: 0 0 10px; font-family: 'Instrument Serif', serif; font-weight: 400; font-size: 28px; line-height: 1.05; letter-spacing: -.02em; color: var(--ink); }
.portal-themed .scr.rcp .head h1 em { color: var(--accent); font-style: italic; }
.portal-themed .scr.rcp .head .sub { font-size: 12.5px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.portal-themed .scr.rcp .head .sub .t { font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.portal-themed .scr.rcp .head .sub b { font-family: 'Instrument Serif', serif; font-weight: 400; font-size: 22px; color: var(--ink); letter-spacing: -.01em; }
.portal-themed .scr.rcp .head .sub .c { font-size: 11.5px; color: var(--ink-3); }

.portal-themed .scr.rcp .list { display: flex; flex-direction: column; gap: 8px; padding: 4px 16px 8px; }
.portal-themed .scr.rcp .list .r {
    display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center;
    padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
}
.portal-themed .scr.rcp .list .r .dt { text-align: center; line-height: 1; }
.portal-themed .scr.rcp .list .r .dt b { display: block; font-family: 'Instrument Serif', serif; font-weight: 400; font-size: 18px; color: var(--ink); letter-spacing: -.01em; }
.portal-themed .scr.rcp .list .r .dt span { display: block; margin-top: 3px; font-family: 'JetBrains Mono', monospace; font-size: 9.5px; letter-spacing: .12em; color: var(--ink-3); }
.portal-themed .scr.rcp .list .r .bd .ttl { font-family: 'Instrument Serif', serif; font-size: 15px; line-height: 1.2; color: var(--ink); }
.portal-themed .scr.rcp .list .r .bd .meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 5px; font-family: 'JetBrains Mono', monospace; font-size: 9px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.portal-themed .scr.rcp .list .r .bd .meta .tx { color: var(--ink-3); }
.portal-themed .scr.rcp .list .r .bd .badge { padding: 3px 7px; border-radius: 999px; font-size: 8.5px; letter-spacing: .14em; line-height: 1; }
.portal-themed .scr.rcp .list .r .bd .badge.ok { background: color-mix(in oklab, var(--good) 16%, transparent); color: var(--good); }
.portal-themed .scr.rcp .list .r .bd .badge.no { background: color-mix(in oklab, var(--accent) 14%, transparent); color: var(--accent); }
.portal-themed .scr.rcp .list .r .bd .badge.ref { background: var(--surface-2); color: var(--ink-2); }
.portal-themed .scr.rcp .list .r .bd .badge.pend { background: var(--surface-2); color: var(--ink-3); }
.portal-themed .scr.rcp .list .r .amt { font-family: 'Instrument Serif', serif; font-size: 18px; color: var(--ink); letter-spacing: -.01em; white-space: nowrap; }
.portal-themed .scr.rcp .list .r .amt:has(+*),
.portal-themed .scr.rcp .list .r .amt { text-align: right; }

.portal-themed .scr.rcp .empty { margin: 14px 16px; padding: 28px 20px; text-align: center; background: var(--surface-2); border: 1px dashed var(--line); border-radius: 14px; }
.portal-themed .scr.rcp .empty h4 { margin: 0 0 6px; font-family: 'Instrument Serif', serif; font-weight: 400; font-size: 18px; color: var(--ink); }
.portal-themed .scr.rcp .empty p { margin: 0 0 14px; font-size: 13px; color: var(--ink-2); }

.portal-themed .scr.rcp .foot { margin: 14px 16px 0; padding: 12px 14px; background: var(--surface-2); border-radius: 12px; font-size: 11.5px; color: var(--ink-3); line-height: 1.45; }

@media (min-width: 1024px) {
    .portal-themed .scr.rcp .topbar { padding: 14px 32px; }
    .portal-themed .scr.rcp .head { padding: 28px 32px 18px; }
    .portal-themed .scr.rcp .head h1 { font-size: 40px; }
    .portal-themed .scr.rcp .list { padding: 4px 32px 8px; }
    .portal-themed .scr.rcp .foot { margin: 14px 32px 0; }
}

/* Hearth (b) receipts: Fraunces + Caveat + dashed dividers */
.portal-themed.b .scr.rcp .topbar .n,
.portal-themed.b .scr.rcp .head h1,
.portal-themed.b .scr.rcp .head .sub b,
.portal-themed.b .scr.rcp .list .r .dt b,
.portal-themed.b .scr.rcp .list .r .bd .ttl,
.portal-themed.b .scr.rcp .list .r .amt,
.portal-themed.b .scr.rcp .empty h4 { font-family: 'Fraunces', serif; }
.portal-themed.b .scr.rcp .head .k,
.portal-themed.b .scr.rcp .head .sub .t { font-family: 'Caveat', cursive; font-size: 15px; letter-spacing: 0; text-transform: none; color: var(--accent); }
.portal-themed.b .scr.rcp .list .r { border-style: solid; }
.portal-themed.b .scr.rcp .list .r + .r { border-top: 1px dashed var(--line); }

/* Studio (c) receipts: hairline solid + mono uppercase + square */
.portal-themed.c .scr.rcp .topbar .n,
.portal-themed.c .scr.rcp .head h1,
.portal-themed.c .scr.rcp .head .sub b,
.portal-themed.c .scr.rcp .list .r .dt b,
.portal-themed.c .scr.rcp .list .r .bd .ttl,
.portal-themed.c .scr.rcp .list .r .amt,
.portal-themed.c .scr.rcp .empty h4 { font-family: 'Fraunces', serif; }
.portal-themed.c .scr.rcp .topbar { border-color: var(--ink); }
.portal-themed.c .scr.rcp .list .r { border-radius: 0; border-color: var(--ink); }
.portal-themed.c .scr.rcp .empty { border-radius: 0; border-style: solid; }
.portal-themed.c .scr.rcp .foot { border-radius: 0; }
.portal-themed.c .scr.rcp .list .r .bd .badge { border-radius: 0; }

/* ============================================================
   THEME B — HEARTH (warm journal: Fraunces serif + Caveat cursive,
   dashed borders, soft rounded shapes, polaroid feel).
   These rules override the cross-theme structural rules above.
   Atelier (.a) keeps the structural defaults; Hearth (.b) and
   Studio (.c) re-skin via the layers below.
   ============================================================ */

/* --- Hearth typography: serif headings, cursive kickers --- */
.portal-themed.b h1,
.portal-themed.b h2,
.portal-themed.b h3,
.portal-themed.b h4 { font-family: 'Fraunces', serif; font-weight: 500; }
.portal-themed.b .greeting h1,
.portal-themed.b .lib .head h1,
.portal-themed.b .pro .head h1 { font-weight: 400; }
.portal-themed.b .greeting .kick,
.portal-themed.b .shelf .sh .k,
.portal-themed.b .home .comm .h .k,
.portal-themed.b .promo .k,
.portal-themed.b .cont .body .k,
.portal-themed.b .lib .c .b .k,
.portal-themed.b .lib .head .k,
.portal-themed.b .pro .head .eye,
.portal-themed.b .pro .section .title,
.portal-themed.b .play .kind,
.portal-themed.b .det .by .rt {
    font-family: 'Caveat', cursive;
    font-size: 15px;
    letter-spacing: 0;
    text-transform: none;
    color: var(--accent);
}

/* --- Hearth shapes: soft, rounded, dashed dividers --- */
.portal-themed.b .cont,
.portal-themed.b .lib .c,
.portal-themed.b .grid .c,
.portal-themed.b .promo,
.portal-themed.b .streak,
.portal-themed.b .empty,
.portal-themed.b .ask,
.portal-themed.b .stats,
.portal-themed.b .menu,
.portal-themed.b .syl .card,
.portal-themed.b .home .comm { border-radius: 14px; }
.portal-themed.b .btn,
.portal-themed.b .chips span,
.portal-themed.b .chips a,
.portal-themed.b .search,
.portal-themed.b .topbar .ic { border-radius: 999px; }
.portal-themed.b .streak,
.portal-themed.b .syl .m,
.portal-themed.b .det .by,
.portal-themed.b .det .meta,
.portal-themed.b .pro .stats div,
.portal-themed.b .pro .menu .m,
.portal-themed.b .play .tabs,
.portal-themed.b .play .tabs .t,
.portal-themed.b .det .price,
.portal-themed.b .ask { border-style: dashed; }

/* --- Hearth: community/circle note becomes warm accent card --- */
.portal-themed.b .home .comm {
    background: var(--accent);
    color: #fff;
    border: 0;
}
.portal-themed.b .home .comm .h .k,
.portal-themed.b .home .comm p,
.portal-themed.b .home .comm .who { color: #fff; }
.portal-themed.b .home .comm .h .k { opacity: .9; }
.portal-themed.b .home .comm p { font-style: italic; }

/* --- Hearth profile: polaroid certificate cards with slight rotation --- */
.portal-themed.b .pro .cert .ct { transform: rotate(-.5deg); }
.portal-themed.b .pro .cert .ct:nth-child(even) { transform: rotate(.5deg); }
.portal-themed.b .pro .head .av { box-shadow: 0 4px 12px -4px rgba(0,0,0,.15); border: 3px solid var(--surface); }

/* --- Hearth course detail: italic Fraunces description --- */
.portal-themed.b .det .desc { font-family: 'Fraunces', serif; }
.portal-themed.b .det .desc b { font-weight: 500; }

/* ============================================================
   THEME C — STUDIO (bold magazine: Fraunces + JetBrains Mono
   uppercase, hairline solid borders, rectilinear shapes,
   ink-dominated palette).
   ============================================================ */

/* --- Studio typography: serif headings, mono uppercase kickers --- */
.portal-themed.c h1,
.portal-themed.c h2,
.portal-themed.c h3,
.portal-themed.c h4 { font-family: 'Fraunces', serif; font-weight: 500; }
.portal-themed.c .greeting h1,
.portal-themed.c .lib .head h1,
.portal-themed.c .pro .head h1 { font-weight: 400; letter-spacing: -.02em; }
.portal-themed.c .greeting .kick,
.portal-themed.c .shelf .sh .k,
.portal-themed.c .shelf .sh .all,
.portal-themed.c .home .comm .h .k,
.portal-themed.c .promo .k,
.portal-themed.c .cont .body .k,
.portal-themed.c .cont .body .meta,
.portal-themed.c .lib .c .b .k,
.portal-themed.c .lib .head .k,
.portal-themed.c .pro .head .eye,
.portal-themed.c .pro .head .h,
.portal-themed.c .pro .section .title,
.portal-themed.c .pro .stats span,
.portal-themed.c .play .kind,
.portal-themed.c .play .sub,
.portal-themed.c .play .acts .a,
.portal-themed.c .play .tabs .t,
.portal-themed.c .play .up .u .n,
.portal-themed.c .play .up .u span,
.portal-themed.c .play .up .u .st,
.portal-themed.c .det .by span,
.portal-themed.c .det .by .rt,
.portal-themed.c .det .meta span,
.portal-themed.c .det .syl .m .n,
.portal-themed.c .det .syl .m span,
.portal-themed.c .det .syl .m .d,
.portal-themed.c .det .syl h2,
.portal-themed.c .det .price .p span,
.portal-themed.c .lib .subtabs .st,
.portal-themed.c .chips span,
.portal-themed.c .chips a,
.portal-themed.c .menu .m .r {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9.5px;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.portal-themed.c .greeting .kick,
.portal-themed.c .shelf .sh .k,
.portal-themed.c .home .comm .h .k,
.portal-themed.c .promo .k,
.portal-themed.c .pro .head .eye,
.portal-themed.c .pro .section .title { color: var(--accent); letter-spacing: .18em; }

/* --- Studio shapes: rectilinear, hairline solid borders --- */
.portal-themed.c .cont,
.portal-themed.c .lib .c,
.portal-themed.c .grid .c,
.portal-themed.c .promo,
.portal-themed.c .streak,
.portal-themed.c .empty,
.portal-themed.c .ask,
.portal-themed.c .stats,
.portal-themed.c .menu,
.portal-themed.c .syl .card,
.portal-themed.c .home .comm,
.portal-themed.c .btn,
.portal-themed.c .btn.primary,
.portal-themed.c .chips span,
.portal-themed.c .chips a,
.portal-themed.c .search,
.portal-themed.c .topbar .ic,
.portal-themed.c .play .acts,
.portal-themed.c .play .acts .a,
.portal-themed.c .play .tabs,
.portal-themed.c .pro .head .av,
.portal-themed.c .pro .cert .ct,
.portal-themed.c .lib .c .cv,
.portal-themed.c .grid .c .cv,
.portal-themed.c .promo .c,
.portal-themed.c .lib .c .b,
.portal-themed.c .det .price,
.portal-themed.c .det .hero .play { border-radius: 0; }
.portal-themed.c .cont,
.portal-themed.c .lib .c,
.portal-themed.c .grid .c,
.portal-themed.c .promo,
.portal-themed.c .syl .card,
.portal-themed.c .ask { border: 1px solid var(--ink); }
.portal-themed.c .topbar { border-color: var(--ink); }

/* --- Studio: streak becomes inverted ink block --- */
.portal-themed.c .home .streak {
    background: var(--ink);
    color: var(--bg);
    border: 0;
    border-radius: 0;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.portal-themed.c .home .streak .t { color: rgba(255,255,255,.7); }
.portal-themed.c .home .streak b { color: var(--accent); font-family: 'Fraunces', serif; text-transform: none; letter-spacing: -.01em; }
.portal-themed.c .home .streak .d { color: rgba(255,255,255,.6); }
.portal-themed.c .home .streak .days i { background: rgba(255,255,255,.15); border-radius: 0; }
.portal-themed.c .home .streak .days i.on { background: var(--accent); }

/* --- Studio: promo becomes inverted ink block --- */
.portal-themed.c .home .promo {
    background: var(--ink);
    color: var(--bg);
    border: 0;
    border-radius: 0;
}
.portal-themed.c .home .promo b { color: var(--bg); }
.portal-themed.c .home .promo .sub { color: rgba(255,255,255,.6); }
.portal-themed.c .home .promo .p { color: var(--accent); }

/* --- Studio: community/circle note in accent block --- */
.portal-themed.c .home .comm {
    background: var(--accent);
    color: #fff;
    border: 0;
    border-radius: 0;
}
.portal-themed.c .home .comm .h .k,
.portal-themed.c .home .comm p,
.portal-themed.c .home .comm .who { color: #fff; }
.portal-themed.c .home .comm .h .k { opacity: .9; }

/* --- Studio detail: drop cap on description (magazine touch) --- */
.portal-themed.c .det .desc { font-family: 'Fraunces', serif; }
.portal-themed.c .det .desc::first-letter {
    font-family: 'Fraunces', serif;
    font-size: 42px;
    float: left;
    line-height: .85;
    margin: 4px 6px -2px 0;
    color: var(--accent);
    font-weight: 500;
}

/* --- Studio price bar: ink block with mono kicker --- */
.portal-themed.c .det .price {
    background: var(--ink);
    color: var(--bg);
    border: 0;
    border-radius: 0;
}
.portal-themed.c .det .price .p { font-family: 'Fraunces', serif; font-weight: 500; }
.portal-themed.c .det .price .btn { border-radius: 0; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }

/* --- Studio CTA buttons: square, mono uppercase --- */
.portal-themed.c .btn {
    border-radius: 0;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    font-size: 11.5px;
}

/* --- Studio: avatar squared (matches topbar treatment) --- */
.portal-themed.c .pro .head .av,
.portal-themed.c .by .av,
.portal-themed.c .who .av { border-radius: 0; }

/* --- Studio profile: editorial typography --- */
.portal-themed.c .pro .head { border-color: var(--ink); }
.portal-themed.c .pro .head h1 { font-family: 'Fraunces', serif; font-weight: 500; font-size: 24px; line-height: 1; letter-spacing: -.02em; }
.portal-themed.c .pro .stats { border-color: var(--ink); border-bottom-width: 1px; }
.portal-themed.c .pro .stats > div b {
    font-family: 'Fraunces', serif;
    font-weight: 500;
    font-size: 22px;
    color: var(--accent);
}
.portal-themed.c .pro .stats > div span { font-size: 8.5px; letter-spacing: .14em; margin-top: 4px; }
.portal-themed.c .pro .section { border-bottom: 1px solid var(--ink); padding: 14px 16px; margin: 0; }
.portal-themed.c .pro .section:last-child { border-bottom: 0; }

/* Studio: auto-number profile sections "01 · TITLE" / "02 · …" */
.portal-themed.c .scr.pro { counter-reset: pro-num; }
.portal-themed.c .pro .section { counter-increment: pro-num; }
.portal-themed.c .pro .section .title::before {
    content: counter(pro-num, decimal-leading-zero) " · ";
    color: var(--accent);
}

/* Studio: menu rows use bold serif label + mono uppercase value */
.portal-themed.c .pro .menu { background: transparent; border: 0; border-radius: 0; }
.portal-themed.c .pro .menu .m {
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
}
.portal-themed.c .pro .menu .m:last-child { border-bottom: 0; }
.portal-themed.c .pro .menu .m b { font-family: 'Fraunces', serif; font-weight: 500; font-size: 14px; }

/* --- Hearth: replace uppercase eyebrow with cursive greeting --- */
.portal-themed.b .pro .head .eye {
    font-family: 'Caveat', cursive;
    font-size: 18px;
    letter-spacing: 0;
    text-transform: none;
    color: var(--accent);
    margin-bottom: 2px;
}
.portal-themed.b .pro .head h1 { font-family: 'Fraunces', serif; }
.portal-themed.b .pro .stats > div b { font-family: 'Fraunces', serif; font-weight: 500; }
.portal-themed.b .pro .menu .m b { font-family: 'Fraunces', serif; font-weight: 500; }
