/* ==========================================================================
   Code-built iPhone mockups with live Prismo screens.
   Everything inside .iphone is authored at real iPhone 16 Pro size and
   proportions (393 × 852 pt display, 421 × 880 with the frame) and scaled to
   fit its box by iphone.js, so it stays sharp at any size.

   Frame, from the outside in:
     4px  Black Titanium band (border), polished edge highlights (::before)
     10px black glass border around the display (padding)
     the display, 55px corner radius like the real one
   ========================================================================== */

.iphone-box {
    position: relative;
    aspect-ratio: 421 / 880;
    transform-style: preserve-3d;
}

.iphone {
    --s: 0.6;
    /* Brushed titanium: highlights catch the light on the top-left and
       bottom-right corners, the long sides stay dark. */
    --metal:
        radial-gradient(120px 120px at 0 0, rgba(255, 255, 255, 0.5), transparent 70%),
        radial-gradient(140px 140px at 100% 100%, rgba(255, 255, 255, 0.28), transparent 70%),
        radial-gradient(90px 220px at 100% 22%, rgba(255, 255, 255, 0.16), transparent 70%),
        linear-gradient(180deg, #5b5b61 0%, #3a3a3f 12%, #2b2b30 50%, #34343a 88%, #4b4b52 100%);
    position: absolute; left: 0; top: 0;
    width: 421px; height: 880px;
    transform: scale(var(--s));
    transform-origin: 0 0;
    border: 4px solid transparent;
    border-radius: 69px;
    padding: 10px;
    background: linear-gradient(#000, #000) padding-box, var(--metal) border-box;
    box-shadow:
        /* glass meets metal: a hairline where the cover glass ends */
        inset 0 0 0 1px rgba(255, 255, 255, 0.07),
        inset 0 0 0 1.5px #000,
        0 1px 2px rgba(0, 0, 0, 0.5),
        0 24px 48px -12px rgba(0, 0, 0, 0.55),
        0 70px 120px -30px rgba(0, 0, 0, 0.75);
    font-family: var(--font);
    color: #fff;
    letter-spacing: -0.01em;
    -webkit-font-smoothing: antialiased;
    user-select: none;
    text-align: left;
    line-height: 1.3;
}

/* Polished chamfers on both edges of the band */
.iphone::before {
    content: '';
    position: absolute; inset: -4px; z-index: 2;
    border-radius: inherit;
    pointer-events: none;
    box-shadow:
        inset 0 0 0 0.75px rgba(255, 255, 255, 0.34),
        inset 0 0 0 1.75px rgba(0, 0, 0, 0.38),
        inset 0 0 0 3.25px rgba(255, 255, 255, 0.05),
        inset 0 0 0 4px rgba(0, 0, 0, 0.6);
}

/* Buttons stand 3px proud of the band; Camera Control sits flush in it */
.iphone-btn {
    position: absolute; z-index: 1;
    width: 3px;
    background: linear-gradient(90deg, #1f1f23, #55555c 55%, #2c2c31);
    border-radius: 2px 0 0 2px;
    box-shadow: inset 0 0.5px 0 rgba(255, 255, 255, 0.25), inset 0 -0.5px 0 rgba(0, 0, 0, 0.6);
}
.iphone-btn--action { left: -7px; top: 156px; height: 30px; }
.iphone-btn--vol-up { left: -7px; top: 220px; height: 56px; }
.iphone-btn--vol-down { left: -7px; top: 290px; height: 56px; }
.iphone-btn--power { right: -7px; top: 242px; height: 90px; border-radius: 0 2px 2px 0; background: linear-gradient(270deg, #1f1f23, #55555c 55%, #2c2c31); }

.iphone-screen {
    position: relative;
    width: 393px; height: 852px;
    border-radius: 55px;
    overflow: hidden;
    background: #0c0a16;
    isolation: isolate;
}

/* Glass reflection, moves with the tilt (--gx set by iphone.js) */
.iphone-screen::after {
    content: '';
    position: absolute; inset: 0; z-index: 40;
    pointer-events: none;
    background: linear-gradient(115deg,
        transparent calc(var(--gx, 30%) - 30%),
        rgba(255, 255, 255, 0.05) var(--gx, 30%),
        transparent calc(var(--gx, 30%) + 22%));
}

.island {
    position: absolute; left: 50%; top: 11px; z-index: 30;
    width: 126px; height: 37px; margin-left: -63px;
    border-radius: 19px; background: #000;
}
/* Front camera: a dark lens with a faint blue coating reflection */
.island::after {
    content: ''; position: absolute; right: 12px; top: 11.5px;
    width: 14px; height: 14px; border-radius: 50%;
    background:
        radial-gradient(circle at 36% 34%, rgba(120, 140, 255, 0.55) 0 1.2px, transparent 2px),
        radial-gradient(circle at 50% 50%, #1a1c33 0 35%, #0b0c16 60%, #050508 100%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.statusbar {
    position: absolute; left: 0; right: 0; top: 0; z-index: 25; height: 54px;
    display: flex; align-items: center; justify-content: space-between;
    padding: 6px 30px 0 44px;
    font-size: 17px; font-weight: 600; letter-spacing: -0.02em;
}
.statusbar svg { height: 13px; width: auto; }
.statusbar-icons { display: flex; gap: 6px; align-items: center; }

.home-indicator {
    position: absolute; left: 50%; bottom: 8px; z-index: 30;
    width: 139px; height: 5px; margin-left: -69.5px;
    border-radius: 3px; background: rgba(255, 255, 255, 0.92);
}

/* Screens inside one phone stack on top of each other */
.scr {
    position: absolute; inset: 0;
    padding-top: 54px;
    background: radial-gradient(120% 60% at 50% 110%, #170b2a 0%, transparent 60%), #0c0a16;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.55s var(--ease), transform 0.7s var(--ease), visibility 0s linear 0.55s;
    transform: translateX(40px);
}
/* The old screen clears out quickly before the new one settles in, so the two never read as one */
.scr.is-active {
    opacity: 1; visibility: visible; transform: none;
    transition: opacity 0.45s ease 0.14s, transform 0.7s var(--ease) 0.06s, visibility 0s;
}
.scr.is-leaving {
    transform: translateX(-40px);
    transition: opacity 0.2s ease, transform 0.5s var(--ease), visibility 0s linear 0.2s;
}

/* ---------- Shared app components ---------- */

.a-row { display: flex; align-items: center; justify-content: space-between; }
.a-circle {
    width: 44px; height: 44px; border-radius: 50%;
    display: grid; place-items: center;
    background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.06);
}
.a-circle svg { width: 18px; height: 18px; }
.a-circle--violet { background: #8b5cf6; border-color: transparent; box-shadow: 0 6px 20px rgba(139, 92, 246, 0.45); }
.a-card {
    background: rgba(33, 28, 56, 0.72);
    border: 1px solid rgba(167, 139, 250, 0.16);
    border-radius: 26px;
}
.a-icon { width: 30px; height: 30px; object-fit: contain; }
.a-chip {
    display: inline-flex; align-items: center; gap: 6px;
    height: 32px; padding: 0 12px; border-radius: 10px;
    font-size: 13px; font-weight: 500;
    background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.1);
}
.a-tabbar {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 20;
    height: 86px; padding: 10px 18px 0;
    display: grid; grid-template-columns: repeat(4, 1fr);
    background: rgba(12, 10, 22, 0.94);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.a-tab { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; font-weight: 500; color: #8e8aa3; }
.a-tab svg { width: 25px; height: 25px; }
.a-tab.is-on { color: #a78bfa; }

/* ---------- Home ---------- */

.home-blob { position: absolute; right: -90px; top: -60px; width: 300px; height: 300px; border-radius: 50%; background: #5b2bb5; opacity: 0.55; }
.home-body { position: relative; padding: 20px 22px 0; }
.home-date { display: flex; align-items: center; gap: 8px; font-size: 14px; color: #a7a3bb; }
.home-date i { width: 7px; height: 7px; border-radius: 50%; background: #10b981; }
.home-hello { font-size: 32px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.12; margin-top: 6px; }
.home-hello span { color: #a78bfa; }
.home-level { display: flex; gap: 16px; align-items: center; padding: 18px; margin-top: 22px; }
.home-ring { width: 74px; height: 74px; flex-shrink: 0; }
.home-ring circle { fill: none; stroke-width: 7; }
.home-ring .bg { stroke: rgba(255, 255, 255, 0.08); }
.home-ring .fg { stroke: #f59e0b; stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; }
.home-ring text { fill: #fbbf24; font-size: 24px; font-weight: 700; font-family: var(--font); }
.home-level-info { flex: 1; }
.home-level-top { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 17px; }
.home-badge { margin-left: auto; font-size: 10px; font-weight: 800; letter-spacing: 0.06em; color: #1c1300; background: #f59e0b; padding: 3px 7px; border-radius: 6px; }
.home-xp { display: flex; justify-content: space-between; font-size: 12px; color: #a7a3bb; margin-top: 6px; }
.home-xp b { color: #fbbf24; }
.home-bar { height: 7px; border-radius: 4px; background: rgba(255, 255, 255, 0.08); margin-top: 8px; overflow: hidden; }
.home-bar i { display: block; height: 100%; width: 76%; border-radius: inherit; background: linear-gradient(90deg, #f59e0b, #fbbf24); transform-origin: left; }
.home-missions { margin-top: 14px; padding: 18px; }
.home-missions h4 { font-size: 17px; font-weight: 700; display: flex; justify-content: space-between; align-items: center; }
.home-missions h4 span { font-size: 11px; font-weight: 600; color: #34d399; background: rgba(16, 185, 129, 0.14); padding: 4px 8px; border-radius: 8px; }
.mission { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.mission-check { width: 36px; height: 36px; border-radius: 11px; background: #10b981; display: grid; place-items: center; flex-shrink: 0; }
.mission-check svg { width: 18px; height: 18px; color: #fff; }
.mission-text { flex: 1; font-size: 15px; font-weight: 600; }
.mission-text small { display: block; font-size: 12px; font-weight: 400; color: #8e8aa3; margin-top: 2px; }
.mission-xp { font-size: 12px; font-weight: 700; color: #34d399; background: rgba(16, 185, 129, 0.14); padding: 4px 8px; border-radius: 8px; }
.home-streak { display: flex; align-items: center; gap: 14px; margin-top: 14px; padding: 16px 18px; background: rgba(245, 158, 11, 0.08); border-color: rgba(245, 158, 11, 0.22); }
.home-streak b { font-size: 16px; }
.home-streak p { font-size: 12.5px; color: #a7a3bb; margin-top: 2px; line-height: 1.35; }

/* ---------- Capture ---------- */

.cap-body { padding: 14px 20px 0; }
.cap-note { margin-top: 16px; padding: 22px 22px 18px; min-height: 368px; display: flex; flex-direction: column; }
.cap-title { font-size: 25px; font-weight: 700; letter-spacing: -0.025em; line-height: 1.2; }
.cap-rule { width: 44px; height: 3px; border-radius: 2px; background: #8b5cf6; margin: 14px 0 16px; }
.cap-text { font-size: 16.5px; line-height: 1.6; color: #e9e6f5; flex: 1; }
.cap-hl {
    color: inherit;
    background-color: transparent;
    background-image: linear-gradient(90deg, rgba(139, 92, 246, 0.55), rgba(236, 72, 153, 0.45));
    background-repeat: no-repeat;
    border-radius: 4px;
    padding: 1px 2px; margin: 0 -2px;
    -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.cap-caret { display: inline-block; width: 2px; height: 19px; background: #a78bfa; vertical-align: -3px; margin-left: 1px; animation: cap-blink 1s steps(1) infinite; }
@keyframes cap-blink { 50% { opacity: 0; } }
.cap-foot { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid rgba(255, 255, 255, 0.07); padding-top: 14px; margin-top: 14px; font-size: 13px; color: #8e8aa3; }
.cap-mic { width: 50px; height: 50px; border-radius: 50%; background: #8b5cf6; display: grid; place-items: center; box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.5); animation: cap-pulse 2.4s ease-out infinite; }
.cap-mic svg { width: 20px; height: 20px; }
@keyframes cap-pulse { 0% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.55); } 70%, 100% { box-shadow: 0 0 0 16px rgba(139, 92, 246, 0); } }
.cap-row { display: flex; align-items: center; gap: 14px; padding: 16px 18px; margin-top: 14px; }
.cap-row-icon { width: 46px; height: 46px; border-radius: 14px; background: #8b5cf6; display: grid; place-items: center; flex-shrink: 0; }
.cap-row-icon svg { width: 22px; height: 22px; }
.cap-row-text { flex: 1; font-size: 16px; font-weight: 600; }
.cap-row-text small { display: block; font-size: 12.5px; font-weight: 400; color: #a7a3bb; margin-top: 3px; }
.cap-chev { width: 16px; height: 16px; color: #a78bfa; }
.cap-toggle { width: 52px; height: 32px; border-radius: 16px; background: rgba(255, 255, 255, 0.14); position: relative; transition: background-color 0.35s ease; flex-shrink: 0; }
.cap-toggle i { position: absolute; left: 3px; top: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; transition: transform 0.35s var(--ease); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3); }
.cap-toggle.is-on { background: #8b5cf6; }
.cap-toggle.is-on i { transform: translateX(20px); }

/* ---------- Knowledge Sync ---------- */

.sync-body { padding: 14px 20px 0; }
.sync-head { display: flex; align-items: center; justify-content: space-between; margin: 20px 4px 14px; font-size: 16px; font-weight: 600; }
.sync-head span:first-child { display: flex; align-items: center; gap: 8px; }
.sync-head span:first-child::before { content: '+'; color: #34d399; font-size: 22px; font-weight: 400; }
.sync-head span:last-child { color: #8e8aa3; font-size: 14px; font-weight: 500; font-variant-numeric: tabular-nums; }
.sync-card {
    position: relative; padding: 16px 16px 14px; margin-bottom: 12px;
    border-radius: 22px; background: rgba(21, 46, 52, 0.9);
    border: 1px solid rgba(52, 211, 153, 0.22);
}
.sync-new { display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: 0.06em; color: #34d399; background: rgba(16, 185, 129, 0.16); padding: 3px 7px; border-radius: 6px; }
.sync-title { display: flex; align-items: center; gap: 8px; font-size: 16.5px; font-weight: 700; margin-top: 10px; }
.sync-title img { width: 24px; height: 24px; }
.sync-src { font-size: 12.5px; color: #a7a3bb; margin-top: 4px; }
.sync-text { font-size: 13.5px; color: #cdd7d9; margin-top: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sync-folder { display: inline-flex; align-items: center; gap: 5px; margin-top: 12px; font-size: 12px; font-weight: 500; color: #c4b5fd; background: rgba(139, 92, 246, 0.2); padding: 5px 9px; border-radius: 8px; }
.sync-folder svg { width: 12px; height: 12px; }
.sync-check { position: absolute; right: 14px; top: 14px; width: 26px; height: 26px; border-radius: 50%; background: #10b981; display: grid; place-items: center; }
.sync-check svg { width: 14px; height: 14px; }
.sync-bar {
    position: absolute; left: 0; right: 0; bottom: 0; height: 120px; padding: 18px 20px 0;
    display: flex; gap: 14px; align-items: flex-start;
    background: linear-gradient(to top, #0c0a16 70%, rgba(12, 10, 22, 0));
}
.sync-skip { width: 90px; height: 54px; display: grid; place-items: center; font-size: 16px; font-weight: 600; color: #d6d2e6; }
.sync-btn { flex: 1; height: 54px; border-radius: 16px; background: linear-gradient(90deg, #8b5cf6, #a78bfa); display: flex; align-items: center; justify-content: center; white-space: pre; font-size: 17px; font-weight: 700; box-shadow: 0 10px 30px -8px rgba(139, 92, 246, 0.7); }

/* ---------- Quiz ---------- */

.quiz-body { padding: 14px 20px 0; }
.qz-top { display: flex; align-items: center; gap: 14px; }
.qz-prog { flex: 1; height: 10px; border-radius: 5px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.qz-prog i { display: block; height: 100%; width: 34%; background: #8b5cf6; border-radius: inherit; }
.qz-flame { display: flex; align-items: center; gap: 5px; height: 34px; padding: 0 10px; border-radius: 11px; background: rgba(245, 158, 11, 0.16); border: 1px solid rgba(245, 158, 11, 0.4); font-weight: 700; font-size: 15px; color: #fbbf24; }
.qz-flame img { width: 20px; height: 20px; }
.qz-meta { display: flex; justify-content: space-between; font-size: 13.5px; font-weight: 600; color: #8e8aa3; margin-top: 10px; font-variant-numeric: tabular-nums; }
.qz-type { display: flex; align-items: center; justify-content: space-between; margin-top: 22px; }
.qz-timer { width: 48px; height: 48px; }
.qz-timer circle { fill: none; stroke-width: 4; }
.qz-timer .bg { stroke: rgba(255, 255, 255, 0.08); }
.qz-timer .fg { stroke: #a78bfa; stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; }
.qz-timer text { fill: #c4b5fd; font-size: 16px; font-weight: 700; font-family: var(--font); }
.qz-q { font-size: 23px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.3; margin-top: 22px; }
.qz-opts { display: flex; flex-direction: column; gap: 12px; margin-top: 26px; }
.qz-opt {
    display: flex; align-items: center; gap: 14px; height: 60px; padding: 0 16px;
    border-radius: 16px; background: #212236; border: 1.5px solid rgba(255, 255, 255, 0.1);
    font-size: 16px; font-weight: 500;
    transition: background-color 0.35s ease, border-color 0.35s ease, transform 0.25s var(--ease);
}
.qz-opt b { width: 32px; height: 32px; border-radius: 9px; background: rgba(255, 255, 255, 0.08); display: grid; place-items: center; font-size: 14px; color: #b9b6c9; transition: background-color 0.35s ease, color 0.35s ease; }
.qz-opt.is-picked { border-color: #8b5cf6; background: rgba(139, 92, 246, 0.16); transform: scale(0.98); }
.qz-opt.is-picked b { background: #8b5cf6; color: #fff; }
.qz-opt.is-right { border-color: #10b981; background: rgba(16, 185, 129, 0.14); transform: none; }
.qz-opt.is-right b { background: #10b981; color: #fff; }
.qz-actions { position: absolute; left: 20px; right: 20px; bottom: 38px; display: flex; gap: 12px; }
.qz-hint { width: 96px; height: 56px; border-radius: 16px; border: 2px solid #f59e0b; color: #fbbf24; display: flex; align-items: center; justify-content: center; gap: 6px; font-weight: 600; font-size: 16px; }
.qz-check { flex: 1; height: 56px; border-radius: 16px; background: #2a2a3c; color: #8e8aa3; display: grid; place-items: center; font-weight: 600; font-size: 17px; transition: background-color 0.3s ease, color 0.3s ease; }
.qz-check.is-ready { background: #8b5cf6; color: #fff; }
.qz-sheet {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 22;
    padding: 22px 22px 40px;
    background: linear-gradient(180deg, #0f2a2a, #0c1d22);
    border-top: 2px solid #10b981;
    transform: translateY(105%);
    transition: transform 0.6s var(--ease);
}
.qz-sheet.is-open { transform: none; }
.qz-sheet-top { display: flex; align-items: center; gap: 12px; }
.qz-sheet-top img { width: 44px; height: 44px; padding: 7px; border-radius: 50%; background: rgba(255, 255, 255, 0.08); }
.qz-sheet-top b { flex: 1; font-size: 24px; color: #34d399; letter-spacing: -0.02em; }
.qz-sheet-top span { font-size: 14px; font-weight: 700; color: #34d399; border: 1.5px solid rgba(52, 211, 153, 0.55); padding: 5px 10px; border-radius: 999px; }
.qz-sheet p { font-size: 14.5px; line-height: 1.5; color: #d6e4e2; margin-top: 14px; }
.qz-continue { margin-top: 18px; height: 54px; border-radius: 16px; background: #10b981; display: grid; place-items: center; font-weight: 700; font-size: 17px; box-shadow: 0 6px 0 #0b8a60; }
.qz-tap {
    position: absolute; z-index: 35; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%;
    background: rgba(255, 255, 255, 0.35); border: 2px solid rgba(255, 255, 255, 0.7);
    opacity: 0; pointer-events: none;
}

/* ---------- Knowledge map ---------- */

/* Mirrors KnowledgeGraphViz / graphRendering.ts in the app: the aurora
   background, tinted discs with an outline, emoji icons, curved links in the
   child's colour and small grey labels under each node. */
.scr--map { background: linear-gradient(180deg, #0A0A0F 0%, #0f0a1e 35%, #12081f 70%, #0A0A0F 100%); }
.map-top { position: relative; z-index: 2; display: flex; justify-content: space-between; padding: 14px 20px 0; }
.map-top .a-circle { background: rgba(255, 255, 255, 0.1); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.map-svg { position: absolute; inset: 0; width: 393px; height: 852px; overflow: visible; }
.map-node { transform-box: fill-box; transform-origin: center; }
.map-icon { font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif; text-anchor: middle; dominant-baseline: central; }
.map-label {
    font-family: var(--font); font-weight: 500; text-anchor: middle;
    fill: rgba(255, 255, 255, 0.75);
    /* A halo in the background colour keeps labels readable over links, like the app */
    paint-order: stroke; stroke: #0f0a1e; stroke-width: 3px; stroke-linejoin: round;
}

/* ==========================================================================
   Placement on the page
   ========================================================================== */

/* Hero: three phones in 3D */
.hero-stage { perspective: 1800px; perspective-origin: 50% 20%; }
.hero-phones { position: absolute; inset: 0; transform-style: preserve-3d; }
.hero-phones .iphone-box { position: absolute; left: 50%; top: 0; width: clamp(240px, 26vw, 350px); margin-left: calc(clamp(240px, 26vw, 350px) / -2); }
.hero-phones .iphone-box--center { z-index: 3; }
.hero-phones .iphone-box--side { z-index: 1; top: 6%; }
.hero-phones .iphone-box--side .iphone::after {
    content: ''; position: absolute; inset: -4px; z-index: 50; border-radius: inherit;
    background: rgba(0, 0, 0, 0.28); pointer-events: none;
}

/* How it works: one phone, screens change with the steps */
.steps-visual .iphone-box { height: 100%; aspect-ratio: 421 / 880; margin: 0 auto; }
.steps-visual .progress-rail { left: -36px; }
.step-phone-inline.iphone-box { display: none; }

/* Feature tile: knowledge map */
.tile--graph .iphone-box { position: absolute; left: 50%; top: 0; width: min(340px, 64%); transform: translateX(-50%); }

@media (max-width: 860px) {
    .step-phone-inline.iphone-box { display: block; width: min(250px, 66%); margin: 40px auto 0; filter: none; }
}
@media (max-width: 640px) {
    .hero-phones .iphone-box { width: 226px; margin-left: -113px; }
    .tile--graph .iphone-box { width: 74%; }
}

.iphone-tilt { position: absolute; inset: 0; transform-style: preserve-3d; }
.scr-host { position: absolute; inset: 0; }

/* ---------- Library ---------- */

.lib-body { position: relative; padding: 16px 20px 0; }
.lib-title { font-size: 34px; font-weight: 700; letter-spacing: -0.03em; }
.lib-actions { display: flex; gap: 10px; align-items: center; }
.lib-actions .a-circle { width: 40px; height: 40px; }
.lib-graph { height: 40px; border-radius: 999px; font-weight: 600; font-size: 14px; background: rgba(255, 255, 255, 0.1); }
.lib-section { display: flex; align-items: center; gap: 8px; margin: 26px 4px 10px; font-size: 19px; font-weight: 700; }
.lib-section small { font-size: 12px; font-weight: 500; color: #8e8aa3; }
.lib-plus { margin-left: auto; width: 32px; height: 32px; }
.lib-plus svg { width: 15px; height: 15px; }
.lib-group { padding: 4px 0; border-radius: 22px; }
.lib-row { display: flex; align-items: center; gap: 14px; padding: 11px 16px; position: relative; transition: background-color 0.5s ease; }
.lib-row + .lib-row::before { content: ''; position: absolute; left: 74px; right: 16px; top: 0; height: 1px; background: rgba(255, 255, 255, 0.07); }
.lib-row.is-new { background: rgba(245, 158, 11, 0.1); }
.lib-icon {
    width: 46px; height: 46px; border-radius: 14px; flex-shrink: 0;
    display: grid; place-items: center;
    background: color-mix(in srgb, var(--c) 18%, transparent);
    border: 1.5px solid color-mix(in srgb, var(--c) 55%, transparent);
}
.lib-icon img { width: 28px; height: 28px; }
.lib-name { flex: 1; font-size: 16.5px; font-weight: 600; }
.lib-name small { display: block; font-size: 12.5px; font-weight: 400; color: #8e8aa3; margin-top: 2px; }
.lib-chev { width: 15px; height: 15px; color: #6b6780; }
.lib-badge {
    position: absolute; right: 40px; top: 50%; margin-top: -12px;
    height: 24px; padding: 0 9px; border-radius: 999px;
    font-size: 12px; font-weight: 700; line-height: 24px;
    color: #1c1300; background: #fbbf24;
}

/* ---------- Progress ---------- */

.prog-body { padding: 14px 20px 0; }
.prog-level { display: flex; gap: 16px; align-items: center; padding: 18px; margin-top: 16px; }
.prog-tier { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 12px; }
.prog-tier span { font-size: 10px; font-weight: 800; letter-spacing: 0.05em; color: #1c1300; background: #f59e0b; padding: 3px 7px; border-radius: 6px; }
.prog-tier b { color: #fbbf24; }
.prog-level .home-xp { margin-top: 6px; }
.prog-chips { display: flex; gap: 8px; margin-top: 16px; }
.prog-chips .a-chip { height: 34px; border-radius: 999px; font-size: 12.5px; white-space: nowrap; }
.prog-chips .a-chip img { width: 18px; height: 18px; }
.prog-chips .a-chip.is-on { border-color: rgba(167, 139, 250, 0.7); background: rgba(139, 92, 246, 0.2); }
.prog-head { display: flex; justify-content: space-between; align-items: center; margin: 20px 2px 12px; font-size: 14px; color: #a7a3bb; }
.prog-filter { font-size: 12px; font-weight: 600; color: #c4b5fd; border: 1px solid rgba(167, 139, 250, 0.5); padding: 5px 10px; border-radius: 9px; }
.prog-ach { display: flex; gap: 14px; align-items: center; padding: 14px 16px; margin-bottom: 10px; border-radius: 22px; }
.prog-ach b { font-size: 16px; }
.prog-ach p { font-size: 12.5px; color: #a7a3bb; margin-top: 2px; }
.prog-medal {
    width: 56px; height: 56px; border-radius: 50%; flex-shrink: 0;
    display: grid; place-items: center;
    background: color-mix(in srgb, var(--c) 16%, #120e22);
    border: 2px solid color-mix(in srgb, var(--c) 70%, transparent);
}
.prog-medal img { width: 32px; height: 32px; }
.prog-tags { display: flex; gap: 6px; margin-top: 8px; }
.prog-tags i {
    font-style: normal; font-size: 10px; font-weight: 700; letter-spacing: 0.03em;
    padding: 3px 8px; border-radius: 999px;
    color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent);
}
.prog-ach--new { border-color: rgba(245, 158, 11, 0.55); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
