/* ═══════════════════════════════════════════════════════════════
   SBS — MODULE PAGES SHEET
   layered on intro.css · per-page accent tint via --page-accent
   ═══════════════════════════════════════════════════════════════ */

body[data-scene="evaluation"] { --page-accent: #22d3ee; --page-accent-2: #38bdf8; }
body[data-scene="lipsync"]    { --page-accent: #f472b6; --page-accent-2: #e879f9; }
body[data-scene="coach"]      { --page-accent: #a78bfa; --page-accent-2: #c084fc; }
body[data-scene="progress"]   { --page-accent: #fbbf24; --page-accent-2: #f472b6; }
body { --page-accent: var(--violet); --page-accent-2: var(--magenta); }
[data-theme="light"] body[data-scene="evaluation"] { --page-accent: #0891b2; }
[data-theme="light"] body[data-scene="lipsync"]    { --page-accent: #db2777; }
[data-theme="light"] body[data-scene="coach"]      { --page-accent: #7c3aed; }
[data-theme="light"] body[data-scene="progress"]   { --page-accent: #d97706; }

/* ═══ module hero ═══ */

.module-hero {
    display: grid;
    grid-template-columns: 1.08fr 0.92fr;
    gap: clamp(24px, 4vw, 60px);
    align-items: center;
    padding: clamp(50px, 8vh, 100px) 0 clamp(20px, 4vh, 50px);
    min-height: calc(100vh - 140px);
}
.module-hero .hero-title {
    font-size: clamp(36px, 4.8vw, 66px);
    margin-top: 20px;
}
.module-hero .hero-desc { margin-top: 20px; }

.module-hero-visual {
    position: relative;
    min-height: 440px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* liquid icon orb */
.icon-orb {
    position: relative;
    width: clamp(190px, 21vw, 250px);
    aspect-ratio: 1;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.28), rgba(139, 92, 246, 0.24) 46%, rgba(217, 70, 239, 0.16));
    border: 1px solid var(--glass-border);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    backdrop-filter: blur(16px) saturate(160%);
    box-shadow: var(--shadow-lg), inset 0 2px 14px rgba(255, 255, 255, 0.18), 0 0 60px color-mix(in srgb, var(--page-accent) 30%, transparent);
    animation: floaty 7s ease-in-out infinite;
    z-index: 1;
}
.icon-orb::before {
    content: "";
    position: absolute;
    inset: -7%;
    z-index: -1;
    border-radius: 43% 57% 51% 49% / 51% 44% 56% 49%;
    background: conic-gradient(from 0deg, var(--page-accent), var(--violet), var(--page-accent-2), var(--page-accent));
    opacity: 0.4;
    filter: blur(26px);
    animation: orb-spin 13s linear infinite, blob-morph 9s ease-in-out infinite;
}
.icon-orb::after {
    content: "";
    position: absolute;
    inset: 6%;
    border-radius: 50%;
    border: 1px dashed color-mix(in srgb, var(--page-accent) 45%, transparent);
    animation: orb-spin 30s linear infinite reverse;
}
.icon-svg {
    width: clamp(66px, 7.6vw, 92px);
    height: auto;
    color: #fff;
    filter: drop-shadow(0 8px 22px color-mix(in srgb, var(--page-accent) 65%, transparent));
    animation: floaty 5.2s ease-in-out infinite;
}
[data-theme="light"] .icon-svg { color: var(--page-accent); }
.icon-svg .wave { animation: icon-wave 2.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.icon-svg .wave.w2 { animation-delay: -0.5s; }
.icon-svg .wave.w3 { animation-delay: -1s; }

@keyframes icon-wave {
    0%, 100% { opacity: 0.35; transform: scale(0.94); }
    50% { opacity: 1; transform: scale(1.05); }
}

.status-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    padding: 7px 15px;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--page-accent) 45%, transparent);
    background: color-mix(in srgb, var(--page-accent) 12%, transparent);
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.22em;
    color: var(--page-accent);
}

/* ═══ showcase console ═══ */

.showcase { padding-top: clamp(40px, 6vh, 80px); }
.showcase-panel {
    width: min(880px, 100%);
    margin: 0 auto;
    border-radius: 30px;
    overflow: hidden;
    transform-style: preserve-3d;
}
.showcase-body {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(20px, 4vw, 48px);
    flex-wrap: wrap;
    padding: clamp(24px, 4vw, 44px);
}

/* — score ring (evaluation) — */
.score-ring {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    flex: 0 0 auto;
    transform: translateZ(34px);
}
.ring-wrap {
    position: relative;
    width: 168px;
    height: 168px;
    display: grid;
    place-items: center;
}
.ring-wrap svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.ring-wrap circle { fill: none; stroke-width: 9; stroke-linecap: round; }
.ring-bg { stroke: color-mix(in srgb, var(--page-accent) 16%, transparent); }
.ring-fg {
    stroke: url(#ringGrad);
    stroke: var(--page-accent);
    stroke-dasharray: 389;
    stroke-dashoffset: 389;
    transition: stroke-dashoffset 1.8s var(--ease) 0.35s;
    filter: drop-shadow(0 0 8px color-mix(in srgb, var(--page-accent) 70%, transparent));
}
.showcase-panel.visible .ring-fg { stroke-dashoffset: var(--ring-off, 38); }
.score-num {
    font-family: var(--disp);
    font-size: 46px;
    font-weight: 700;
    line-height: 1;
    background: linear-gradient(120deg, var(--title-b), var(--page-accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.score-cap {
    font-family: var(--mono);
    font-size: 9.5px;
    letter-spacing: 0.24em;
    color: var(--dim);
}

.ph-list {
    display: flex;
    flex-direction: column;
    gap: 13px;
    flex: 1;
    min-width: 250px;
    max-width: 380px;
}
.ph-row {
    display: grid;
    grid-template-columns: 54px 1fr 38px;
    align-items: center;
    gap: 12px;
    font-family: var(--mono);
    font-size: 12.5px;
    color: var(--muted);
    transform: translateZ(22px);
}
.ph { color: var(--ink); }
.ph-val { text-align: right; color: var(--page-accent); }
.ph-bar {
    height: 8px;
    border-radius: 6px;
    background: var(--glass-soft);
    border: 1px solid var(--glass-border);
    overflow: hidden;
}
.ph-bar i {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 6px;
    background: linear-gradient(90deg, var(--violet), var(--page-accent));
    box-shadow: 0 0 10px color-mix(in srgb, var(--page-accent) 60%, transparent);
    transition: width 1.3s var(--ease) calc(var(--d, 0s) + 0.4s);
}
.showcase-panel.visible .ph-bar i { width: var(--w); }
.ph-row.warn .ph-bar i { background: linear-gradient(90deg, var(--magenta), var(--page-accent-2)); }
.ph-row.warn .ph-val { color: var(--magenta); }

.wave-strip {
    width: 100%;
    padding: 0 clamp(20px, 4vw, 44px) 30px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 4px;
    height: 74px;
}
.wave-strip span {
    width: 5px;
    height: 18%;
    border-radius: 4px;
    background: linear-gradient(180deg, var(--page-accent), var(--violet));
    animation: eq 1.1s ease-in-out infinite alternate;
    animation-delay: calc(var(--i) * -0.09s);
    opacity: 0.85;
}

/* — viseme library (lipsync) — */
.viseme-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    width: 100%;
}
.viseme-card {
    flex: 1;
    min-width: 116px;
    max-width: 152px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px 12px 17px;
    border-radius: 18px;
    border: 1px solid var(--glass-border);
    background: var(--glass-soft);
    transform: translateZ(26px);
    transition: transform 0.35s var(--ease), border-color 0.35s, background 0.35s;
}
.viseme-card:hover {
    transform: translateZ(26px) translateY(-5px);
    border-color: color-mix(in srgb, var(--page-accent) 55%, transparent);
    background: color-mix(in srgb, var(--page-accent) 10%, transparent);
}
.viseme-card svg { width: 76px; color: var(--page-accent); overflow: visible; }
.viseme-card .lips-line {
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.viseme-card .lips-open {
    fill: color-mix(in srgb, var(--page-accent) 16%, transparent);
    stroke: currentColor;
    stroke-width: 2;
}
.viseme-card b {
    font-family: var(--disp);
    font-size: 19px;
    font-weight: 700;
    color: var(--ink);
}
.viseme-card span {
    font-family: var(--mono);
    font-size: 9.5px;
    letter-spacing: 0.18em;
    color: var(--dim);
}
.timeline-strip {
    display: flex;
    gap: 6px;
    width: 100%;
    padding: 0 clamp(20px, 4vw, 44px) 30px;
}
.timeline-strip i {
    flex: 1;
    height: 7px;
    border-radius: 5px;
    background: var(--glass-soft);
    border: 1px solid var(--glass-border);
}
.timeline-strip i.on {
    background: linear-gradient(90deg, var(--page-accent), var(--page-accent-2));
    box-shadow: 0 0 10px color-mix(in srgb, var(--page-accent) 55%, transparent);
}

/* — chat (coach) — */
.chat {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: min(430px, 100%);
    transform: translateZ(26px);
}
.bubble {
    max-width: 88%;
    padding: 13px 18px;
    border-radius: 20px;
    font-size: 14px;
    line-height: 1.55;
    color: var(--ink);
}
.bubble.me {
    align-self: flex-end;
    border-bottom-right-radius: 6px;
    background: linear-gradient(135deg, #7c3aed, #a855f7 60%, #d946ef);
    color: #fff;
    box-shadow: 0 10px 26px rgba(124, 58, 237, 0.35);
}
.bubble.ai {
    align-self: flex-start;
    border-bottom-left-radius: 6px;
    background: var(--glass-soft);
    border: 1px solid var(--glass-border);
}
.bubble.ai em {
    font-style: normal;
    font-family: var(--mono);
    color: var(--page-accent);
}
.bubble.typing { display: inline-flex; gap: 6px; padding: 15px 18px; }
.bubble.typing i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--page-accent);
    animation: dot-pulse 1.2s ease-in-out infinite;
}
.bubble.typing i:nth-child(2) { animation-delay: 0.18s; }
.bubble.typing i:nth-child(3) { animation-delay: 0.36s; }

.tone-curve {
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    background: var(--glass-soft);
}
.tone-curve svg { width: 100%; height: 58px; color: var(--page-accent); }
.tone-curve .curve {
    stroke: currentColor;
    stroke-width: 2.4;
    fill: none;
    stroke-linecap: round;
    stroke-dasharray: 460;
    stroke-dashoffset: 460;
    animation: curve-draw 3.4s var(--ease) infinite alternate;
    filter: drop-shadow(0 0 6px color-mix(in srgb, var(--page-accent) 70%, transparent));
}
.tone-curve .grid-line { stroke: var(--glass-border); stroke-width: 1; }
.suggest-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.suggest-chips span {
    padding: 7px 13px;
    border-radius: 999px;
    border: 1px solid var(--glass-border);
    background: var(--glass-soft);
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: 0.12em;
    color: var(--page-accent);
}

/* — dashboard (progress) — */
.dash {
    display: flex;
    flex-direction: column;
    gap: 22px;
    width: min(470px, 100%);
    transform: translateZ(26px);
}
.dash-head {
    display: flex;
    align-items: center;
    gap: 14px;
}
.flame {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    background: linear-gradient(140deg, color-mix(in srgb, var(--page-accent) 32%, transparent), color-mix(in srgb, var(--page-accent-2) 18%, transparent));
    border: 1px solid var(--glass-border);
    color: var(--page-accent);
    animation: flame-flicker 1.9s ease-in-out infinite;
}
.flame svg { width: 24px; }
.dash-head .stat-num {
    font-family: var(--disp);
    font-size: 44px;
    font-weight: 700;
    line-height: 1;
    background: linear-gradient(120deg, var(--title-b), var(--page-accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.dash-head em {
    font-style: normal;
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: 0.22em;
    color: var(--dim);
}

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 7px;
}
.cal-cell {
    aspect-ratio: 1;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    background: var(--glass-soft);
}
.showcase-panel.visible .cal-cell {
    animation: cell-pop 0.5s var(--ease) backwards;
    animation-delay: calc(var(--i) * 22ms);
}
.cal-cell.h1 { background: color-mix(in srgb, var(--page-accent) 18%, transparent); }
.cal-cell.h2 { background: color-mix(in srgb, var(--page-accent) 38%, transparent); }
.cal-cell.h3 {
    background: color-mix(in srgb, var(--page-accent) 62%, transparent);
    box-shadow: 0 0 12px color-mix(in srgb, var(--page-accent) 45%, transparent);
}
.cal-cell.today {
    border-color: var(--page-accent);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--page-accent) 35%, transparent);
}

.mini-stats { display: flex; gap: 12px; flex-wrap: wrap; }
.mini-stat {
    flex: 1;
    min-width: 104px;
    padding: 12px 16px;
    border-radius: 15px;
    border: 1px solid var(--glass-border);
    background: var(--glass-soft);
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.mini-stat .stat-num {
    font-family: var(--disp);
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(120deg, var(--title-b), var(--page-accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.mini-stat .stat-label {
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--dim);
}

/* ═══ steps ═══ */

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
    perspective: 1400px;
}
.step-index {
    font-family: var(--disp);
    font-size: 44px;
    font-weight: 700;
    line-height: 1;
    opacity: 0.4;
    background: linear-gradient(120deg, var(--page-accent), var(--page-accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    transform: translateZ(38px);
}

/* ═══ deep dive ═══ */

.deep-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 18px;
    align-items: stretch;
    perspective: 1400px;
}
.deep-grid .card h3 { font-size: 21px; }
.deep-grid .card p + p { margin-top: 14px; }
.deep-grid .card p strong { color: var(--ink); }

.cyber-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    list-style: none;
    transform: translateZ(18px);
}
.cyber-list li {
    position: relative;
    padding-left: 24px;
    font-size: 14.5px;
    color: var(--muted);
}
.cyber-list li::before {
    content: "◆";
    position: absolute;
    left: 0;
    top: 1px;
    font-size: 11px;
    color: var(--page-accent);
    text-shadow: 0 0 10px color-mix(in srgb, var(--page-accent) 80%, transparent);
}
.cyber-list li strong { color: var(--ink); font-weight: 600; }

/* ═══ more modules ═══ */

.more-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    perspective: 1400px;
}
.more-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 22px;
    color: inherit;
    text-decoration: none;
}
.more-card .feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 15px;
    flex: 0 0 auto;
    transform: translateZ(20px);
}
.more-card .feature-icon svg { width: 23px; height: 23px; }
.more-card h4 {
    font-family: var(--disp);
    font-size: 16px;
    font-weight: 700;
    transform: translateZ(16px);
}
.more-card p {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.16em;
    color: var(--page-accent);
    text-transform: uppercase;
    transform: translateZ(12px);
}
.more-card .go {
    margin-left: auto;
    color: var(--violet-2);
    font-size: 18px;
    transform: translateZ(16px);
    transition: transform 0.35s var(--ease);
}
.more-card:hover .go { transform: translateZ(16px) translateX(5px); }

/* dropdown links (modules pull-down) */
a.dropdown-item { text-decoration: none; }
a.dropdown-item:hover { transform: none; }

/* icon draw-on-hover for all recreated icons */
.feature-icon svg,
.icon-svg {
    stroke-dasharray: 220;
    stroke-dashoffset: 0;
}
.card:hover .feature-icon svg {
    animation: icon-draw 1.3s var(--ease);
}
@keyframes icon-draw {
    from { stroke-dashoffset: 220; }
    to { stroke-dashoffset: 0; }
}

/* ═══ showcase component keyframes ═══ */

@keyframes curve-draw {
    from { stroke-dashoffset: 460; }
    to { stroke-dashoffset: 0; }
}
@keyframes cell-pop {
    from { transform: scale(0.3); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
@keyframes flame-flicker {
    0%, 100% { transform: scale(1) rotate(-1.5deg); filter: brightness(1); }
    50% { transform: scale(1.07) rotate(1.5deg); filter: brightness(1.25); }
}

/* ═══ responsive ═══ */

@media (max-width: 940px) {
    .module-hero {
        grid-template-columns: 1fr;
        padding-top: 40px;
        min-height: 0;
        text-align: center;
    }
    .module-hero-text { display: flex; flex-direction: column; align-items: center; }
    .module-hero-visual { min-height: 360px; }
    .module-hero .hero-desc { margin-left: auto; margin-right: auto; }
    .module-hero .actions { justify-content: center; }
    .module-hero .hero-stats { justify-content: center; }
    .module-hero .phoneme-strip { justify-content: center; }
}
@media (max-width: 640px) {
    .showcase-body { flex-direction: column; }
    .ph-list { max-width: 100%; width: 100%; }
    .ring-wrap { width: 140px; height: 140px; }
    .score-num { font-size: 38px; }
    .viseme-card { min-width: 104px; max-width: 132px; padding: 16px 8px 14px; }
    .viseme-card svg { width: 62px; }
}
