/* ══════════════════════════════════════════
   Nihongo Mastery — Fresh Glow Theme v1.0.6
   ══════════════════════════════════════════ */

/* ── Base: Premium Dark Background ── */
html,
body {
    background-color: #F8FAFC !important;
    color: #eef2ff;
    font-family: 'Plus Jakarta Sans', 'Noto Sans JP', 'Hiragino Sans', 'Yu Gothic UI', 'Meiryo', 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji' !important;
    font-synthesis: none;
    font-synthesis-weight: none;
    font-synthesis-style: none;
    font-kerning: normal;
    font-optical-sizing: auto;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

body,
button,
input,
select,
textarea {
    font-weight: 500;
}

.font-semibold {
    font-weight: 600 !important;
}

.font-bold {
    font-weight: 700 !important;
}

.font-extrabold,
.font-black {
    font-weight: 800 !important;
}

:root {
    --color-bg: #151e27;
    --color-bg-soft: #1c2631;
    --color-panel: rgba(21, 30, 39, 0.85);
    --color-panel-strong: rgba(17, 25, 33, 0.95);
    --color-border: rgba(255, 255, 255, 0.08);
    --color-border-strong: rgba(255, 255, 255, 0.15);
    --color-text: #eef2ff;
    --color-muted: #8ba3ba;
    --color-amber: #ec4899;
    --color-orange: #a855f7;
    --color-red: #f43f5e;
    --color-emerald: #14b8a6;
    --color-cyan: #3b82f6;
    --shadow-soft: 0 18px 60px rgba(0, 0, 0, 0.3);
    --shadow-panel: 0 24px 80px rgba(0, 0, 0, 0.4);
    --glow-amber: rgba(236, 72, 153, 0.28);
    --glow-orange: rgba(168, 85, 247, 0.2);
    --glow-violet: rgba(59, 130, 246, 0.18);
    --glow-cyan: rgba(20, 184, 166, 0.18);
}

/* ── Glass Components ── */
.glass-card {
    background: rgba(28, 38, 49, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--shadow-panel), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    border: 1px solid var(--color-border);
    transition: box-shadow 0.35s ease, border-color 0.35s ease, transform 0.25s ease;
    color: var(--color-text);
}

.glass-card:hover {
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.48),
                0 0 36px rgba(245, 197, 66, 0.08),
                inset 0 1px 0 rgba(255, 255, 255, 0.08);
    border-color: var(--color-border-strong);
}

.glass-panel {
    background: rgba(21, 30, 39, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.04);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    transition: border-color 0.3s ease;
    color: var(--color-text);
}

@media (min-width: 768px) {
    .glass-card {
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
    }
    .glass-panel {
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
    }
}

/* Space reserved for solid background */

/* ── Glowing Border Pulse on Focused Cards ── */
/* Use opacity-based glow instead of box-shadow animation to avoid repaints */
@keyframes glow-pulse {
    0%, 100% { opacity: 0.7; }
    50%       { opacity: 1; }
}

.glow-pulse-card {
    animation: glow-pulse 3s ease-in-out infinite;
    box-shadow: 0 0 28px rgba(234, 179, 8, 0.35), 0 8px 40px rgba(0,0,0,0.4);
}

/* ── Typography & Text Effects ── */
.logo-glow {
    background: linear-gradient(135deg, #32D96B, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 10px rgba(50, 217, 107, 0.3));
    /* Removed text-shimmer animation — filter animations are GPU-heavy */
    font-family: 'Plus Jakarta Sans', 'Noto Sans JP', 'Hiragino Sans', 'Yu Gothic UI', 'Meiryo', 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji' !important;
    font-weight: 800 !important;
    letter-spacing: -0.02em;
}

/* Removed @keyframes text-shimmer — was animating filter every 5s causing constant repaints */

.Japanese {
    font-family: 'Noto Sans JP', 'Hiragino Sans', 'Yu Gothic UI', 'Meiryo', 'MS PGothic', sans-serif;
}

/* Ensure emoji and symbol glyphs can fall back cleanly across app surfaces */
:where(span, div, p, h1, h2, h3, h4, h5, h6, button, a) {
    font-variant-emoji: emoji;
}

/* ── Shimmer Sweep Effect ── */
@keyframes shimmer-sweep {
    0%   { background-position: -200% center; }
    100% { background-position: 200% center; }
}

.logo-shimmer {
    background: linear-gradient(90deg, #32D96B 0%, #3b82f6 50%, #32D96B 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer-sweep 4s linear infinite;
}

/* ── Buttons & Interactive ── */
.btn-glow {
    box-shadow: 0 14px 34px rgba(245, 197, 66, 0.18),
                0 8px 22px rgba(2,6,23,0.28);
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

/* Shine sweep on hover */
.btn-glow::after {
    content: '';
    position: absolute;
    top: 0; left: -75%;
    width: 50%; height: 100%;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.25) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: skewX(-18deg);
    transition: left 0.55s ease;
    pointer-events: none;
}

.btn-glow:hover:not(:disabled)::after {
    left: 140%;
}

.btn-glow:hover:not(:disabled) {
    box-shadow: 0 18px 42px rgba(245, 197, 66, 0.24),
                0 10px 28px rgba(2,6,23,0.34);
    transform: translateY(-2px) scale(1.01);
}

.btn-glow:active:not(:disabled) {
    transform: translateY(0) scale(0.97);
    box-shadow: 0 10px 24px rgba(245, 197, 66, 0.2);
}

/* ── Utility Classes for slimming HTML ── */
.glass-item {
    background: #1c2631;
    border: 1px solid rgba(100, 130, 255, 0.14);
    box-shadow: 0 10px 28px rgba(4, 8, 28, 0.28);
}

.badge-base {
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-width: 1px;
}

/* ── Neon Border Accents ── */
.neon-amber {
    box-shadow: 0 0 8px rgba(245,197,66,0.34),
                0 0 24px rgba(245,197,66,0.12),
                inset 0 0 8px rgba(245,197,66,0.06);
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 5px; }

::-webkit-scrollbar-track { background: transparent; }

::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: transparent;
}

/* ── Animations ── */
@keyframes fadeInScale {
    0%   { opacity: 0; transform: scale(0.95) translateY(16px); }
    100% { opacity: 1; transform: scale(1)    translateY(0); }
}

@keyframes popIn {
    0%   { opacity: 0; transform: scale(0.82) translateY(18px); }
    70%  { transform: scale(1.03) translateY(-3px); }
    100% { opacity: 1; transform: scale(1)    translateY(0); }
}

@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

@keyframes float-up-down {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-8px); }
}

.animate-in  { animation: fadeInScale 0.35s ease forwards; }
.anim-in     { animation: popIn 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; }
/* float-hero: use will-change so browser promotes to GPU layer */
.float-hero  { animation: float-up-down 5s ease-in-out infinite; will-change: transform; }

/* ── Aurora Background Performance ── */
/* Isolate aurora to its own composite layer */
[aria-hidden="true"].fixed { contain: strict; }
/* Promote each orb to its own GPU layer */
[aria-hidden="true"].fixed > div {
    will-change: transform;
    transform: translateZ(0);
}

/* btn-attention-heartbeat: removed filter animation (forces full composite) */
@keyframes btn-attention-heartbeat {
    0%   { transform: scale(1);    }
    8%   { transform: scale(1.04); }
    16%  { transform: scale(1);    }
    24%  { transform: scale(1.04); }
    32%  { transform: scale(1);    }
    100% { transform: scale(1);    }
}

.anim-heartbeat {
    animation: btn-attention-heartbeat 4.5s infinite ease-in-out;
    transform-origin: center;
    will-change: transform;
}

.anim-heartbeat:hover, .anim-heartbeat:active {
    animation: none;
}

/* ── Additional Button Animation Types ── */

/* 1. Pulse */
@keyframes anim-pulse-kf {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(234, 179, 8, 0.4); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(234, 179, 8, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(234, 179, 8, 0); }
}
.anim-pulse {
    animation: anim-pulse-kf 2s infinite;
}

/* 2. Grow/Shrink */
@keyframes anim-grow-shrink-kf {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}
.anim-grow-shrink {
    animation: anim-grow-shrink-kf 3s infinite ease-in-out;
}

/* 3. 3D Press */
.anim-3d-press {
    position: relative;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
    box-shadow: 0 6px 0px rgba(249, 115, 22, 0.8), 0 10px 20px rgba(0,0,0,0.3);
    transform: translateY(-4px);
}
.anim-3d-press:active:not(:disabled) {
    box-shadow: 0 0px 0px rgba(249, 115, 22, 0.8), 0 4px 10px rgba(0,0,0,0.3);
    transform: translateY(2px);
}

/* 4. Jelly / Bouncy */
@keyframes anim-jelly-kf {
    0%, 100% { transform: scale(1, 1); }
    25% { transform: scale(0.9, 1.1); }
    50% { transform: scale(1.1, 0.9); }
    75% { transform: scale(0.95, 1.05); }
}
.anim-jelly {
    animation: anim-jelly-kf 0.8s ease-in-out infinite;
}
.anim-jelly-hover:hover {
    animation: anim-jelly-kf 0.6s ease-in-out;
}

/* 5. Liquid Fill */
.anim-liquid-fill {
    position: relative;
    overflow: hidden;
    z-index: 1;
}
.anim-liquid-fill::before {
    content: '';
    position: absolute;
    top: 100%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 40%;
    z-index: -1;
    transition: top 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.anim-liquid-fill:hover::before {
    top: -20%;
    animation: liquid-spin 3s linear infinite;
}
@keyframes liquid-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 6. Animated Gradients */
@keyframes gradient-shift-kf {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
.anim-gradient {
    background: transparent;
    background-size: 300% 300%;
    animation: gradient-shift-kf 4s ease infinite;
    color: white !important;
    border: none;
}

/* 7. Border Reveal */
.anim-border-reveal {
    position: relative;
    overflow: hidden;
}
.anim-border-reveal::before, .anim-border-reveal::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background-color: #f5c542;
    transition: all 0.3s ease;
}
.anim-border-reveal::before {
    top: 0; left: 0;
}
.anim-border-reveal::after {
    bottom: 0; right: 0;
}
.anim-border-reveal:hover::before, .anim-border-reveal:hover::after {
    width: 100%;
}

/* 8. Random / Jitter */
@keyframes anim-random-jitter-kf {
    0% { transform: translate(0, 0) rotate(0deg); }
    10% { transform: translate(-2px, 1px) rotate(-1deg); }
    20% { transform: translate(2px, -1px) rotate(1deg); }
    30% { transform: translate(-1px, 2px) rotate(-2deg); }
    40% { transform: translate(2px, -2px) rotate(2deg); }
    50% { transform: translate(-2px, 1px) rotate(-1deg); }
    60% { transform: translate(1px, -2px) rotate(1deg); }
    70% { transform: translate(-1px, -1px) rotate(-1deg); }
    80% { transform: translate(2px, 1px) rotate(1deg); }
    90% { transform: translate(-1px, 2px) rotate(-1deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}
.anim-random {
    animation: anim-random-jitter-kf 0.4s infinite;
}

/* 9. Random Glitch */
@keyframes anim-glitch-kf {
    0% { clip-path: inset(10% 0 80% 0); transform: translate(-2px, 2px); }
    20% { clip-path: inset(80% 0 10% 0); transform: translate(2px, -2px); }
    40% { clip-path: inset(40% 0 40% 0); transform: translate(-2px, -2px); }
    60% { clip-path: inset(20% 0 60% 0); transform: translate(2px, 2px); }
    80% { clip-path: inset(60% 0 20% 0); transform: translate(-2px, 0); }
    100% { clip-path: inset(10% 0 80% 0); transform: translate(2px, 0); }
}
.anim-glitch {
    position: relative;
}
.anim-glitch::before {
    content: attr(data-text);
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: inherit;
    color: inherit;
    display: flex; align-items: center; justify-content: center;
    left: 2px;
    text-shadow: -1px 0 red;
    animation: anim-glitch-kf 2s infinite linear alternate-reverse;
}
.anim-glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: inherit;
    color: inherit;
    display: flex; align-items: center; justify-content: center;
    left: -2px;
    text-shadow: -1px 0 blue;
    animation: anim-glitch-kf 3s infinite linear alternate-reverse;
}

/* ── Juicy Game Feedback ── */
@keyframes juice-combo-pulse-kf {
    0%   { transform: scale(1); }
    30%  { transform: scale(1.06); }
    60%  { transform: scale(0.97); }
    100% { transform: scale(1); }
}

.juice-combo-pulse { animation: juice-combo-pulse-kf 0.4s ease; }

@keyframes juice-celebrate-kf {
    0%   { box-shadow: 0 0 0px rgba(234,179,8,0); }
    40%  { box-shadow: 0 0 60px rgba(234,179,8,0.65), 0 0 120px rgba(249,115,22,0.35); }
    100% { box-shadow: 0 0 0px rgba(234,179,8,0); }
}

.juice-celebrate { animation: juice-celebrate-kf 0.6s ease; }

.home-shell {
    width: 100%;
    max-width: 1600px;
}

.hero-grid {
    display: grid;
    gap: 1.5rem;
}

.hero-panel {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    width: 100%;
    border: none;
    box-shadow: none;
    background: transparent;
}


.hero-stat {
    background: #1c2631;
    border: 1px solid rgba(100, 130, 255, 0.16);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), var(--shadow-soft);
    text-align: center;
}

.hero-track {
    background: #1c2631;
    border: 1px solid rgba(100, 130, 255, 0.12);
}

.shortcut-card {
    background: #1c2631;
    border: 1px solid rgba(100, 130, 255, 0.14);
    box-shadow: var(--shadow-soft);
}

.mission-grid {
    align-items: stretch;
}

.mission-card {
    position: relative;
    overflow: hidden;
    min-height: 12rem;
}

.mission-card::before {
    display: none;
}

.mission-card__badge,
.mission-card__title,
.mission-card__copy {
    position: relative;
    z-index: 1;
}

.mission-card__badge {
    margin-bottom: 0.75rem;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.mission-card__title {
    color: #f8fafc;
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 0.65rem;
}

.mission-card__copy {
    color: #cbd5e1;
    font-size: 0.92rem;
    line-height: 1.65;
}

.mission-card--amber {
    border-color: rgba(251, 191, 36, 0.18);
    background: #1c2631;
}

.mission-card--amber .mission-card__badge {
    color: #fcd34d;
}

.mission-card--cyan {
    border-color: rgba(34, 211, 238, 0.18);
    background: #1c2631;
}

.mission-card--cyan .mission-card__badge {
    color: #67e8f9;
}

.mission-card--emerald {
    border-color: rgba(52, 211, 153, 0.18);
    background: #1c2631;
}

.mission-card--emerald .mission-card__badge {
    color: #6ee7b7;
}

.lesson-browser-card {
    display: block;
    border: 1px solid rgba(100, 130, 255, 0.14);
    background: #1c2631;
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.lesson-browser-card:hover {
    transform: translateY(-2px);
    border-color: rgba(100, 180, 255, 0.3);
}

.homepage-hero-split {
    align-items: stretch;
}

.roadmap-flow {
    position: relative;
}

.roadmap-panel {
    background: #1c2631;
    border: 1px solid rgba(100, 130, 255, 0.12);
    box-shadow:
        0 20px 48px rgba(4, 8, 28, 0.36),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.roadmap-flow--journey {
    position: relative;
    padding: 0.85rem 0 0.35rem;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1rem;
    align-items: start;
}

.roadmap-stage {
    position: relative;
    display: block;
    width: 100%;
    margin-bottom: 0;
    z-index: 2;
}

.roadmap-stage__row {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.roadmap-stage__node-wrap {
    position: relative;
    min-height: 5.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    margin-bottom: -1.15rem;
}

.roadmap-stage__start {
    position: absolute;
    top: -0.45rem;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 0.95rem;
    padding: 0.5rem 0.9rem;
    background: #1c2631;
    border: 2px solid rgba(100, 130, 255, 0.28);
    color: #6dff00;
    font-size: 0.76rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    box-shadow: 0 10px 24px rgba(4, 8, 28, 0.3);
    z-index: 4;
}

.roadmap-stage__start::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -0.38rem;
    width: 0.72rem;
    height: 0.72rem;
    background: #1c2631;
    border-right: 2px solid rgba(100, 130, 255, 0.28);
    border-bottom: 2px solid rgba(100, 130, 255, 0.28);
    transform: translateX(-50%) rotate(45deg);
}

.roadmap-stage__node {
    position: relative;
    width: 4.75rem;
    height: 4.75rem;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.85rem;
    font-weight: 900;
    color: #fff;
    box-shadow:
        inset 0 -0.42rem 0 rgba(0, 0, 0, 0.18),
        0 0 0 0.46rem rgba(51, 65, 85, 0.76),
        0 16px 28px rgba(2, 6, 23, 0.32);
    z-index: 3;
}

.roadmap-stage__icon {
    line-height: 1;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.roadmap-stage__step {
    display: block;
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #7dd3fc;
}

.roadmap-stage__card {
    position: relative;
    width: 100%;
    text-align: center;
    padding: 1.85rem 0.9rem 1.05rem;
    background: #1c2631;
    border: 1px solid rgba(100, 130, 255, 0.14);
    border-radius: 1.5rem;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        0 16px 28px rgba(4, 8, 28, 0.2);
    min-height: 9rem;
    transition: transform 180ms ease, opacity 180ms ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    overflow: visible;
}

.roadmap-stage--link:hover .roadmap-stage__card {
    transform: translateY(-2px);
    border-color: rgba(250, 204, 21, 0.18);
}

.roadmap-stage::after {
    display: none;
}

.roadmap-stage--amber .roadmap-stage__node {
    background: transparent;
}

.roadmap-stage--cyan .roadmap-stage__node {
    background: transparent;
}

.roadmap-stage--emerald .roadmap-stage__node {
    background: transparent;
}

.roadmap-stage--violet .roadmap-stage__node {
    background: transparent;
}

.roadmap-stage--rose .roadmap-stage__node {
    background: transparent;
}

.roadmap-stage--next .roadmap-stage__node,
.roadmap-stage--path .roadmap-stage__node {
    filter: saturate(0.65) brightness(0.9);
}

.roadmap-stage--path .roadmap-stage__card {
    opacity: 0.94;
}

.roadmap-stage__label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.roadmap-stage__status {
    display: inline-flex;
}

.roadmap-stage__action {
    display: inline-flex;
    font-size: 0.88rem;
    text-align: center;
}

.roadmap-stage__card .rounded-full {
    background: #1c2631;
}

.feature-category-card {
    min-height: 14.5rem;
    background: #1c2631;
    border: 1px solid rgba(100, 130, 255, 0.14);
    box-shadow: var(--shadow-soft);
}

.feature-category-card:hover {
    transform: translateY(-2px);
    border-color: rgba(100, 180, 255, 0.28);
}

@media (max-width: 767px) {
    .roadmap-flow--journey {
        grid-template-columns: 1fr;
        gap: 0.9rem;
    }

    .roadmap-stage__row {
        gap: 0;
    }

    .roadmap-stage__node {
        width: 4.2rem;
        height: 4.2rem;
        font-size: 1.55rem;
        box-shadow:
            inset 0 -0.45rem 0 rgba(0, 0, 0, 0.18),
            0 0 0 0.42rem rgba(51, 65, 85, 0.82),
            0 12px 24px rgba(2, 6, 23, 0.28);
    }

    .roadmap-stage__start {
        top: -0.25rem;
        padding: 0.45rem 0.8rem;
        font-size: 0.7rem;
    }

    .roadmap-stage__card {
        text-align: center;
        padding: 1.65rem 1rem 0.9rem;
        min-height: auto;
    }

    .roadmap-stage__label {
        justify-content: center;
    }

    .roadmap-stage__node-wrap {
        grid-column: 1;
        min-height: 5.2rem;
        transform: none !important;
    }

}

.level-switcher {
    position: relative;
    padding: 0;
    border-radius: 1.1rem;
    box-shadow: none;
    background: transparent;
    border: none;
    width: calc(100% - 1.1rem);
    margin-inline: auto;
    margin-top: 0.6rem;
    margin-bottom: 0.45rem;
}

.level-switcher::before {
    content: '';
    position: absolute;
    inset: 0.15rem;
    border-radius: 0.95rem;
    background: transparent;
    box-shadow: none;
    pointer-events: none;
}

.level-tab {
    position: relative;
    z-index: 1;
    min-height: 2.9rem;
    letter-spacing: 0.02em;
    border: 1px solid rgba(148, 163, 184, 0.16) !important;
    box-shadow: none !important;
    font-size: 0.88rem;
}

.level-switcher + div {
    display: grid;
    gap: 0.55rem;
    margin-top: 0.45rem;
}

.level-tab:not(:disabled):hover {
    transform: translateY(-1px);
}

.sidebar-cta {
    position: relative;
    overflow: hidden;
    padding: 0.8rem 0.95rem;
    border-radius: 1rem;
    background: #1c2631;
    box-shadow:
        0 12px 26px rgba(4, 8, 28, 0.24),
        inset 0 1px 0 rgba(255,255,255,0.05);
    border-color: rgba(100, 130, 255, 0.2);
    min-height: 3.15rem;
}

.sidebar-cta > div {
    align-items: center;
}

.sidebar-cta > div > span:first-child {
    font-size: 0.95rem;
    width: 1.9rem;
    height: 1.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    background: rgba(100, 130, 255, 0.12);
    border: 1px solid rgba(255,255,255,0.08);
    flex-shrink: 0;
}

.sidebar-cta > div > span:last-child {
    font-size: 0.82rem;
}

.sidebar-cta > span:last-child {
    font-size: 0.9rem;
}

.sidebar-cta::before {
    display: none;
}

.level-switcher + div > .relative {
    overflow: hidden;
    border-radius: 1rem;
}

.level-switcher + div > .relative .level-tab {
    padding-right: 4.4rem;
}

.level-switcher + div > .relative > span {
    top: 50% !important;
    right: 0.7rem !important;
    transform: translateY(-50%);
    padding: 0.22rem 0.45rem;
    font-size: 0.56rem !important;
    letter-spacing: 0.16em;
    border-radius: 999px;
    box-shadow: 0 8px 18px rgba(99, 102, 241, 0.28);
}

.sidebar-unit-card {
    overflow: hidden;
    border-radius: 10px;
    background: #1c2631;
    border: 1px solid rgba(100, 130, 255, 0.12);
    box-shadow:
        0 14px 32px rgba(4, 8, 28, 0.24),
        inset 0 1px 0 rgba(255,255,255,0.04);
}

.sidebar-unit-card::before {
    display: none;
}

.sidebar-unit-card:hover {
    transform: translateY(-2px);
    border-color: rgba(100, 180, 255, 0.24);
    box-shadow:
        0 18px 40px rgba(4, 8, 28, 0.32),
        inset 0 1px 0 rgba(255,255,255,0.06);
}

.sidebar-unit-card h3 {
    line-height: 1.18;
    letter-spacing: -0.02em;
    font-size: 0.95rem;
}

.header-unit-type {
    display: inline-block;
    margin-top: 0.2rem;
    margin-bottom: 0.45rem;
}

.sidebar-unit-actions button {
    min-height: 2.15rem;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
    font-size: 0.68rem;
}

.sidebar-unit-actions {
    gap: 0.7rem;
}

.sidebar-unit-actions button:first-child {
    flex: 0.9 1 0%;
    padding-left: 0.85rem;
    padding-right: 0.85rem;
}

.sidebar-action-btn {
    white-space: nowrap;
}

.sidebar-unit-actions button:not(:disabled):hover {
    transform: translateY(-1px);
}

.word-strip {
    position: relative;
    overflow: hidden;
    border-radius: 1.8rem;
    border: 1px solid rgba(100, 130, 255, 0.28);
    background: #1c2631;
    box-shadow:
        0 18px 38px rgba(4, 8, 28, 0.28),
        inset 0 1px 0 rgba(255,255,255,0.06);
}

.word-strip::before {
    content: '';
    position: absolute;
    inset: 0;
    background: transparent;
    transform: translateX(-100%);
    transition: transform 0.75s ease;
    pointer-events: none;
}

.word-strip:hover::before {
    transform: translateX(100%);
}

.word-strip__inner {
    position: relative;
    z-index: 1;
    min-height: 3.2rem;
}

.word-strip__meta {
    padding-right: 0.75rem;
}

.word-strip__icon {
    width: 2.35rem;
    height: 2.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.9rem;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 12px 24px rgba(59, 130, 246, 0.16);
}

.word-strip__label {
    color: #a5b4fc;
    text-shadow: 0 0 18px rgba(99, 102, 241, 0.16);
}

.word-strip__content {
    min-width: 0;
    padding: 1rem 1.15rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.2rem;
    background: transparent;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
    overflow: hidden;
}

@media (max-width: 768px) {
    .word-strip__content {
        padding: 0.8rem 0.9rem;
    }
}

.word-strip__jp {
    letter-spacing: -0.04em;
    text-shadow: 0 0 24px rgba(129, 140, 248, 0.18);
}

.word-strip__romaji {
    color: #a5b4fc;
}

.word-strip__divider {
    width: 0.42rem;
    height: 0.42rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.22);
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.2);
}

.word-strip__en {
    color: #e2e8ff;
}

.word-strip__hear {
    border: 1px solid rgba(129,140,248,0.42);
    background: transparent;
    color: #dbe4ff;
    box-shadow:
        0 14px 24px rgba(37, 99, 235, 0.16),
        inset 0 1px 0 rgba(255,255,255,0.1);
}

.word-strip__hear:hover {
    background: transparent;
    border-color: rgba(165,180,252,0.55);
}

.word-feature__panel {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 1.25rem;
    border: none;
    background: rgba(28, 38, 49, 0.7);
    box-shadow:
        0 14px 28px rgba(2, 6, 23, 0.22),
        inset 0 1px 0 rgba(255,255,255,0.06);
}

.word-feature__panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background: transparent;
    transform: translateX(-100%);
    transition: transform 0.8s ease;
    pointer-events: none;
}

.word-feature__panel::after {
    content: '';
    position: absolute;
    inset: 0.7rem;
    border-radius: 0.95rem;
    border: none;
    pointer-events: none;
    opacity: 0.7;
}

.word-feature__panel:hover::before {
    transform: translateX(100%);
}

.word-feature__meta {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

.word-feature__badge {
    width: 2.4rem;
    height: 2.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.95rem;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.09);
    font-size: 1.05rem;
    flex-shrink: 0;
    box-shadow: 0 10px 22px rgba(59, 130, 246, 0.16);
}

.word-feature__label-group {
    display: flex;
    flex-direction: column;
    gap: 0.08rem;
}

.word-feature__eyebrow {
    font-size: 0.62rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.24em;
    color: #a5b4fc;
}

.word-feature__label {
    font-size: 0.8rem;
    font-weight: 800;
    color: #eef2ff;
}

.word-feature__content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    position: relative;
    z-index: 1;
    width: 100%;
}

.word-feature__main {
    display: flex;
    flex: 1;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.8rem 0.95rem;
    min-width: 0;
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

.word-feature__jp {
    font-size: clamp(1.8rem, 3vw, 2.35rem);
    font-weight: 900;
    color: #ffffff;
    letter-spacing: -0.04em;
    line-height: 1;
    text-shadow: 0 0 18px rgba(129, 140, 248, 0.12);
}

.word-feature__details {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem;
    min-width: 0;
}

.word-feature__romaji {
    font-size: 0.95rem;
    font-weight: 800;
    color: #a5b4fc;
}

.word-feature__divider {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.18);
    flex-shrink: 0;
}

.word-feature__en {
    font-size: 0.95rem;
    color: #e2e8ff;
}

.word-feature__hear {
    flex-shrink: 0;
    min-width: 6.5rem;
    padding: 0.78rem 1rem;
    border-radius: 0.9rem;
    border: 1px solid rgba(129,140,248,0.34);
    background: transparent;
    color: #dbe4ff;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    box-shadow:
        0 10px 18px rgba(37, 99, 235, 0.12),
        inset 0 1px 0 rgba(255,255,255,0.08);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.word-feature__hear:hover {
    transform: translateY(-1px);
    border-color: rgba(165,180,252,0.52);
    background: transparent;
    box-shadow:
        0 14px 28px rgba(37, 99, 235, 0.22),
        inset 0 1px 0 rgba(255,255,255,0.12);
}

.curriculum-browser { background: transparent; }

.mobile-lessons {
    display: none;
    gap: 1rem;
    width: 100%;
    box-sizing: border-box;
    max-width: 100%;
    margin-inline: auto;
}

.mobile-lessons__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: nowrap;
}

.mobile-lessons__header > div:first-child {
    flex-shrink: 0;
}

.mobile-lessons__header > div:first-child p {
    white-space: nowrap;
    font-size: 0.75rem;
}

.mobile-lessons__header > div:first-child h2 {
    white-space: nowrap;
    font-size: 1.35rem;
}

.mobile-level-toggle {
    display: inline-flex;
    padding: 0;
    border-radius: 999px;
    background: transparent;
    border: none;
    gap: 0.35rem;
    margin-left: auto;
}

.mobile-level-toggle button {
    min-width: 3rem;
    border: 0;
    background: transparent;
    color: #94a3b8;
    font-size: 0.72rem;
    font-weight: 900;
    padding: 0.55rem 0.85rem;
    border-radius: 999px;
    transition: background 0.18s ease, color 0.18s ease;
}

.mobile-level-toggle button.is-active {
    background: transparent;
    color: #fff;
}

.mobile-next-card {
    padding: 1rem;
    border-radius: 1.5rem;
    background: transparent;
    border: 1px solid rgba(148, 163, 184, 0.16);
    box-shadow: var(--shadow-soft);
}

.mobile-next-card__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.9rem;
    height: 2rem;
    padding: 0 0.7rem;
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.12);
    border: 1px solid rgba(34, 211, 238, 0.2);
    color: #a5f3fc;
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.mobile-lessons__list {
    display: grid;
    gap: 0.8rem;
}

.mobile-lesson-row {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    padding: 0.95rem 1rem;
    border-radius: 1.25rem;
    background: transparent;
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.mobile-lesson-row.is-locked {
    opacity: 0.62;
}

.mobile-lesson-row.is-complete {
    border-color: rgba(16, 185, 129, 0.2);
}

.mobile-lesson-row__index {
    width: 2rem;
    height: 2rem;
    flex: 0 0 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(148, 163, 184, 0.12);
    color: #cbd5e1;
    font-size: 0.72rem;
    font-weight: 900;
}

.mobile-lesson-row__state {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.5rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(148, 163, 184, 0.12);
    color: #94a3b8;
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.mobile-lesson-row__state.is-done {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
}

.mobile-lesson-row__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem;
    margin-top: 0.8rem;
    align-items: stretch;
}

.mobile-lesson-row__button {
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 0.9rem;
    padding: 0.75rem 0.95rem;
    font-size: 0.8rem;
    font-weight: 900;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
    min-width: 0;
    width: 100%;
}

.mobile-lesson-row__button.is-primary {
    flex: 1;
    background: rgba(34, 197, 94, 0.14);
    border-color: rgba(34, 197, 94, 0.3);
    color: #f8fafc;
}

.mobile-lesson-row__button.is-secondary {
    background: rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.24);
    color: #c7d2fe;
}

.mobile-lesson-row__button.is-disabled {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(148, 163, 184, 0.1);
    color: #64748b;
    cursor: not-allowed;
}

.cv-auto {
    content-visibility: auto;
    contain-intrinsic-size: 1px 900px;
}

.mastery-card {
    padding: 2rem;
    border-radius: 2rem;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.mastery-header {
    align-items: end;
    padding-bottom: 1.75rem;
    border-bottom: none;
}

.mastery-header .max-w-xs {
    max-width: 30rem;
}

.mastery-header h3 {
    font-size: clamp(2rem, 4vw, 3.25rem);
    line-height: 0.95;
    margin-bottom: 0.75rem;
}

.mastery-header p {
    font-size: 0.8rem;
    line-height: 1.8;
    color: var(--color-muted);
}

.mastery-stat-row {
    flex-wrap: wrap;
    justify-content: flex-end;
}

.mastery-stat-row > div {
    display: flex;
    align-items: center;
    min-width: 170px;
    justify-content: center;
    padding: 0.95rem 1.1rem;
    border-radius: 999px;
    background: transparent;
    box-shadow: none;
    text-align: center;
}

.mastery-link-grid {
    gap: 1.5rem;
}

.mastery-link-grid > div {
    padding: 1.25rem 1.25rem 1rem;
    border-radius: 1.35rem;
    background: transparent;
    box-shadow: none;
}

.mastery-link-grid h4 {
    margin-bottom: 1rem;
    padding-bottom: 0;
    border-bottom: none !important;
    color: #f8fafc;
    font-weight: 400 !important;
    letter-spacing: 0;
    font-kerning: normal;
    font-feature-settings: "kern" 1;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.mastery-link-grid h4::after {
    content: '';
    flex: 1 1 auto;
    min-width: 2.5rem;
    height: 1px;
    background: transparent;
    transform: translateY(1px);
}

.mastery-link-grid ul {
    display: grid;
    gap: 0.75rem;
}

.mastery-link-grid a {
    color: #cbd5e1 !important;
    transition: color 0.2s ease, transform 0.2s ease;
}

.mastery-link-grid a:hover {
    color: #fff !important;
    transform: translateX(3px);
}

.mastery-link-grid a.text-red-400,
.mastery-link-grid a.text-indigo-400 {
    color: #f8fafc !important;
    font-weight: 400;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.mastery-link-grid a.text-red-400::before,
.mastery-link-grid a.text-indigo-400::before {
    content: '';
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 999px;
    flex: 0 0 auto;
}

.mastery-link-grid a.text-red-400::before {
    background: transparent;
    box-shadow: 0 0 16px rgba(249, 115, 22, 0.35);
}

.mastery-link-grid a.text-indigo-400::before {
    background: transparent;
    box-shadow: 0 0 16px rgba(99, 102, 241, 0.35);
}

.mastery-footer-block {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: none !important;
}

.mastery-footer-block .space-y-4 {
    max-width: 38rem;
}

.mastery-footer-block .logo-glow {
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.12;
    display: inline-block;
    padding-bottom: 0.12em;
}

.mastery-footer-block p {
    color: var(--color-muted);
}

.mastery-footer-block .flex.gap-8 {
    gap: 1.25rem 2rem;
    padding: 0.95rem 1.5rem;
    border-radius: 999px;
    background: transparent;
}

.mastery-footer-block .flex.items-center.gap-6 {
    padding: 0.85rem 1.25rem;
    border-radius: 999px;
    background: transparent;
}

.footer-link-cluster {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.85rem;
    width: 100%;
    max-width: 62rem;
    padding: 0.4rem 0;
}

.footer-link-pill {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 11rem;
    padding: 0.95rem 1.2rem;
    border-radius: 1.2rem;
    border: 1px solid rgba(148, 163, 184, 0.12);
    background: transparent;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.68rem;
    font-weight: 900;
    transition: transform 0.22s ease, color 0.22s ease, border-color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
    box-shadow: 0 14px 32px rgba(2, 6, 23, 0.24);
    overflow: hidden;
}

.footer-link-pill::before {
    content: '';
    position: absolute;
    inset: auto 1rem 0.75rem;
    height: 2px;
    border-radius: 999px;
    background: transparent;
    transform: scaleX(0.3);
    opacity: 0;
    transition: transform 0.22s ease, opacity 0.22s ease;
}

.footer-link-pill:hover,
.footer-link-pill:focus-visible {
    color: #f8fafc;
    border-color: rgba(255, 122, 24, 0.34);
    background: transparent;
    box-shadow:
        0 18px 40px rgba(2, 6, 23, 0.34),
        0 0 0 1px rgba(255, 122, 24, 0.08);
    transform: translateY(-2px);
    outline: none;
}

.footer-link-pill:hover::before,
.footer-link-pill:focus-visible::before {
    opacity: 1;
    transform: scaleX(1);
}

.footer-link-pill.is-current {
    color: #f8fafc;
    border-color: rgba(255, 122, 24, 0.4);
    background: transparent;
}

.footer-link-pill.is-current::before {
    opacity: 1;
    transform: scaleX(1);
}

@media (max-width: 767px) {
    .mobile-lessons {
        display: grid;
        padding-inline: 0;
        width: 100%;
        max-width: 100%;
        margin-inline: auto;
        overflow: hidden;
    }

    .mobile-level-toggle {
        width: auto;
        margin-left: auto;
        justify-content: flex-end;
    }

    .mobile-next-card {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 1rem;
        overflow: hidden;
    }

    .mobile-lesson-row {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 0.95rem;
        overflow: hidden;
    }

    .mobile-lesson-row__actions {
        grid-template-columns: 1fr 1fr;
    }

    .level-switcher {
        padding: 0;
        width: calc(100% - 0.8rem);
        margin-top: 0.5rem;
        margin-bottom: 0.5rem;
    }

    .level-tab {
        min-height: 2.55rem;
        font-size: 0.78rem;
    }

    .level-switcher + div {
        gap: 0.45rem;
        margin-top: 0.5rem;
    }

    .sidebar-cta {
        padding: 0.72rem 0.9rem;
        border-radius: 0.95rem;
        min-height: 2.95rem;
    }

    .sidebar-cta > div > span:first-child {
        font-size: 0.85rem;
        width: 1.7rem;
        height: 1.7rem;
        border-radius: 0.7rem;
    }

    .sidebar-cta > div > span:last-child {
        font-size: 0.76rem;
    }

    .level-switcher + div > .relative .level-tab {
        padding-right: 3.9rem;
    }

    .level-switcher + div > .relative > span {
        right: 0.6rem !important;
        font-size: 0.52rem !important;
        padding: 0.2rem 0.38rem;
    }

    .sidebar-unit-card {
        border-radius: 10px;
    }

    .sidebar-unit-card h3 {
        font-size: 0.88rem;
    }

    .header-unit-type {
        margin-top: 0.16rem;
        margin-bottom: 0.38rem;
    }

    .sidebar-unit-actions button {
        min-height: 2rem;
        font-size: 0.64rem;
    }

    .sidebar-unit-actions {
        gap: 0.6rem;
    }

    .sidebar-unit-actions button:first-child {
        flex: 0.88 1 0%;
        padding-left: 0.78rem;
        padding-right: 0.78rem;
    }

    .word-feature__panel {
        padding: 1rem;
        border-radius: 1.05rem;
        gap: 0.8rem;
    }

    .word-feature__content {
        flex-direction: row;
        align-items: center;
        gap: 0.65rem;
    }

    .word-feature__main {
        gap: 0.55rem 0.7rem;
        flex-wrap: nowrap;
    }

    .word-feature__jp {
        font-size: 1.25rem;
    }

    .word-feature__details {
        gap: 0.35rem;
        flex-wrap: nowrap;
    }

    .word-feature__romaji,
    .word-feature__en {
        font-size: 0.74rem;
    }

    .word-feature__hear {
        width: auto;
        min-width: 5.2rem;
        padding: 0.68rem 0.78rem;
        border-radius: 0.85rem;
        font-size: 0.68rem;
    }

    .word-strip {
        border-radius: 1.3rem;
    }

    .mission-card {
        min-height: auto;
    }

    .mastery-card {
        padding: 1.4rem;
        border-radius: 1.5rem;
    }

    .mastery-header {
        padding-bottom: 1.25rem;
    }

    .mastery-link-grid {
        gap: 1rem;
    }

    .mastery-link-grid > div {
        padding: 1rem;
    }

    .mastery-header {
        align-items: center;
        text-align: center;
        gap: 1.5rem;
        margin-bottom: 2rem;
    }

    .mastery-header .max-w-xs {
        max-width: none;
        width: 100%;
        margin: 0 auto;
    }

    .mastery-header h3 {
        margin-bottom: 0.5rem;
    }

    .mastery-header p {
        max-width: 30ch;
        margin: 0 auto;
    }

    .mastery-stat-row {
        width: 100%;
        justify-content: center;
        gap: 0.85rem;
    }

    .mastery-stat-row > div {
        flex: 1 1 0;
        min-width: 0;
        max-width: 10.75rem;
        padding: 0.85rem 0.9rem;
    }

    .mastery-footer-block .flex.gap-8 {
        border-radius: 1.25rem;
    }

    .footer-link-cluster {
        gap: 0.7rem;
    }

    .footer-link-pill {
        min-width: calc(50% - 0.5rem);
        padding: 0.85rem 0.9rem;
        font-size: 0.62rem;
        letter-spacing: 0.14em;
    }
}

@media (max-width: 767px) {
    .mobile-lessons {
        padding-inline: 0;
        gap: 0.85rem;
        width: 100%;
        max-width: 100%;
        margin-inline: auto;
    }

    .mobile-lessons__header {
        align-items: flex-start;
    }

    .mobile-level-toggle {
        width: auto;
        margin-left: auto;
        justify-content: flex-end;
    }

    .mobile-level-toggle button {
        flex: 0 0 auto;
    }

    .mobile-next-card,
    .mobile-lesson-row {
        border-radius: 1.15rem;
    }

    .mobile-next-card {
        padding: 0.95rem;
    }

    .mobile-next-card__badge,
    .mobile-lesson-row__state {
        min-width: 0;
        padding-inline: 0.5rem;
    }

    .mobile-lesson-row {
        gap: 0.7rem;
        padding: 0.85rem;
    }

    .mobile-lesson-row__index {
        width: 1.9rem;
        height: 1.9rem;
        flex: 0 0 1.9rem;
    }

    .mobile-lesson-row__actions {
        grid-template-columns: 1fr 1fr;
    }

    .mobile-lesson-row__button {
        width: 100%;
        min-width: 0;
        padding: 0.72rem 0.85rem;
        font-size: 0.78rem;
    }
}

@media (min-width: 768px) {
    .hero-grid {
        gap: 2rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .logo-glow,
    .logo-shimmer,
    .float-hero,
    .glow-pulse-card,
    .animate-in,
    .anim-in {
        animation: none !important;
    }

    .btn-glow,
    .lesson-browser-card {
        transition: none;
    }
}


/* Clean educational design layer */
:root {
    --edu-bg: #07111f;
    --edu-panel: rgba(15, 27, 45, 0.92);
    --edu-panel-soft: rgba(20, 35, 56, 0.74);
    --edu-card: rgba(18, 31, 50, 0.86);
    --edu-card-hover: rgba(24, 42, 66, 0.92);
    --edu-border: rgba(148, 163, 184, 0.18);
    --edu-border-strong: rgba(148, 163, 184, 0.3);
    --edu-text: #f8fafc;
    --edu-muted: #aab7c9;
    --edu-soft: #dbeafe;
    --edu-accent: #f59e0b;
    --edu-accent-2: #38bdf8;
    --edu-good: #34d399;
    --edu-warn: #fbbf24;
    --edu-danger: #fb7185;
    --edu-radius: 24px;
    --edu-shadow: 0 22px 60px rgba(1, 7, 18, 0.28);
    --edu-shadow-soft: 0 14px 34px rgba(1, 7, 18, 0.2);
}

html,
body {
    background: rgba(28, 38, 49, 0.7);
}

.glass-card,
.glass-panel,
.glass-item,
.hero-panel,
.hero-stat,
.shortcut-card,
.lesson-browser-card,
.roadmap-panel,
.curriculum-browser { background: transparent; }

.glass-card:hover,
.shortcut-card:hover,
.lesson-browser-card:hover {
    border-color: var(--edu-border-strong) !important;
    box-shadow: var(--edu-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.07) !important;
}

/* Removed invisible logo overrides */

.btn-glow {
    background: transparent;
    border: 1px solid rgba(251, 191, 36, 0.34) !important;
    box-shadow: 0 14px 30px rgba(249, 115, 22, 0.2), 0 8px 18px rgba(2, 6, 23, 0.22) !important;
}

.hero-track,
.edu-progress-track {
    background: rgba(148, 163, 184, 0.12) !important;
    border: 1px solid rgba(148, 163, 184, 0.16) !important;
    box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.22) !important;
}

.edu-progress-fill {
    background: transparent;
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.18);
}

.edu-card,
.edu-lesson-card,
.edu-soft-panel,
.edu-example-card,
.edu-practice-card,
.edu-callout,
.edu-faq,
.edu-mission,
.edu-coach-note,
.edu-self-check,
.edu-path-card {
    background: transparent;
    border: 1px solid var(--edu-border);
    border-radius: var(--edu-radius);
    box-shadow: var(--edu-shadow-soft);
}

.edu-lesson-card {
    position: relative;
    overflow: hidden;
}

.edu-lesson-card::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: transparent;
    opacity: 0.75;
}

.edu-lesson-card:hover,
.edu-example-card:hover,
.edu-practice-card:hover,
.edu-path-card:hover {
    background: var(--edu-card-hover);
    border-color: var(--edu-border-strong);
    transform: translateY(-2px);
}

.edu-pill,
.edu-step-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(148, 163, 184, 0.08);
    color: var(--edu-soft);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.edu-pill {
    padding: 0.4rem 0.75rem;
}

.edu-step-pill {
    padding: 0.35rem 0.65rem;
}

.edu-icon {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid rgba(148, 163, 184, 0.18);
    color: #bae6fd;
    font-weight: 900;
}

.edu-section-label {
    color: #fcd34d;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    font-weight: 900;
}

.lesson-deep-section {
    color: var(--edu-muted);
}

.lesson-deep-section h2,
.content-rich h2 {
    margin-top: 3.5rem;
    margin-bottom: 1.25rem;
    color: var(--edu-text);
    letter-spacing: -0.02em;
}

.lesson-deep-section h3,
.content-rich h3 {
    color: var(--edu-text);
}

.lesson-table-card {
    border-radius: 1.25rem;
    border: 1px solid var(--edu-border);
    background: rgba(8, 18, 32, 0.54);
    overflow: hidden;
}

.lesson-table-card table {
    border-collapse: separate;
    border-spacing: 0;
}

.lesson-table-card thead tr {
    background: rgba(56, 189, 248, 0.08);
}

.edu-example-card {
    position: relative;
    padding: 1.25rem;
}

.edu-example-card::before {
    content: '';
    position: absolute;
    left: 0.85rem;
    top: 1rem;
    bottom: 1rem;
    width: 3px;
    border-radius: 999px;
    background: transparent;
    opacity: 0.7;
}

.edu-note {
    border-radius: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(2, 6, 23, 0.22);
    color: #cbd5e1;
}

.edu-faq details,
.edu-self-check li,
.edu-mission-task {
    border-radius: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(2, 6, 23, 0.2);
}

.edu-callout--amber {
    border-color: rgba(251, 191, 36, 0.2);
}

.edu-callout--rose {
    border-color: rgba(251, 113, 133, 0.2);
}

.edu-callout--blue {
    border-color: rgba(56, 189, 248, 0.2);
}

.edu-callout--emerald {
    border-color: rgba(52, 211, 153, 0.2);
}

.word-strip {
    background: transparent;
    border-color: rgba(148, 163, 184, 0.2) !important;
}

.word-strip__icon,
.word-strip__hear {
    background: rgba(56, 189, 248, 0.12) !important;
    border-color: rgba(56, 189, 248, 0.2) !important;
}

@media (max-width: 640px) {
    .edu-card,
    .edu-lesson-card,
    .edu-soft-panel,
    .edu-example-card,
    .edu-practice-card,
    .edu-callout,
    .edu-faq,
    .edu-mission,
    .edu-coach-note,
    .edu-self-check {
        border-radius: 18px;
    }
}
/* Palette refresh */
:root {
    --color-bg: #1c2631;
    --color-bg-soft: #111827;
    --color-panel: rgba(17, 24, 39, 0.84);
    --color-panel-strong: rgba(17, 24, 39, 0.96);
    --color-border: rgba(31, 41, 55, 0.95);
    --color-border-strong: rgba(59, 130, 246, 0.34);
    --color-text: #f9fafb;
    --color-muted: #9ca3af;
    --color-accent: #ff6a00;
    --color-accent-bright: #ff7a18;
    --color-accent-deep: #ff3d00;
    --color-secondary: #3b82f6;
    --color-success: #22c55e;
    --color-warning: #facc15;
}

body.bg-\[\#020617\] {
    background-color: var(--color-bg) !important;
    color: var(--color-text);
}

body.bg-\[\#020617\]::before,
body.bg-\[\#020617\]::after {
    content: '';
    position: fixed;
    border-radius: 9999px;
    pointer-events: none;
    filter: blur(80px);
    opacity: 0.8;
    z-index: 0;
}

body.bg-\[\#020617\]::before {
    width: 26rem;
    height: 26rem;
    top: -7rem;
    left: -8rem;
    background: rgba(28, 38, 49, 0.7);
}

body.bg-\[\#020617\]::after {
    width: 22rem;
    height: 22rem;
    right: -6rem;
    top: 14rem;
    background: rgba(28, 38, 49, 0.7);
}

.orb {
    position: fixed;
    border-radius: 9999px;
    pointer-events: none;
    filter: blur(80px);
    z-index: 0;
}

.orb-1 {
    width: 24rem;
    height: 24rem;
    top: -6rem;
    left: -7rem;
    background: rgba(28, 38, 49, 0.7);
}

.orb-2 {
    width: 20rem;
    height: 20rem;
    right: -5rem;
    top: 18rem;
    background: rgba(28, 38, 49, 0.7);
}

.orb-3 {
    width: 18rem;
    height: 18rem;
    bottom: 3rem;
    left: 22%;
    background: rgba(28, 38, 49, 0.7);
}

.glass-card {
    background: transparent;
    border-color: var(--color-border);
}

.glass-card:hover {
    border-color: var(--color-border-strong);
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.42),
                0 0 36px rgba(255, 106, 0, 0.08),
                inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* Restore glass components */
.glass-panel,
.glass-item,
.hero-stat,
.shortcut-card,
.lesson-browser-card {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--color-border);
}

.hero-track,
.curriculum-browser { background: transparent; }

/* Removed invisible logo overrides */

.btn-glow {
    background: transparent;
    border: 1px solid rgba(255, 122, 24, 0.32);
    box-shadow: 0 14px 34px rgba(255, 106, 0, 0.24),
                0 8px 22px rgba(2, 6, 23, 0.28);
}

.btn-glow:hover:not(:disabled) {
    box-shadow: 0 18px 42px rgba(255, 106, 0, 0.3),
                0 10px 28px rgba(2, 6, 23, 0.34);
}

.btn-glow:active:not(:disabled) {
    box-shadow: 0 10px 24px rgba(255, 106, 0, 0.24);
}

.badge-base {
    border-color: rgba(31, 41, 55, 0.95);
}

.neon-amber {
    box-shadow: 0 0 8px rgba(255, 106, 0, 0.34),
                0 0 24px rgba(255, 106, 0, 0.12),
                inset 0 0 8px rgba(255, 106, 0, 0.08);
}


::-webkit-scrollbar-thumb {
    background: transparent;
}

::-webkit-scrollbar-thumb:hover {
    background: transparent;
}

.search-modal-panel {
    width: 92vw;
    max-width: 980px;
    height: 80vh;
    max-height: 80vh;
}

@media (min-width: 768px) {
    .search-modal-panel {
        width: 50%;
    }
}

@media (min-width: 1200px) {
    html {
        font-size: 81% !important;
    }
}

/* ══ Performance: content-visibility for below-fold home sections ══ */
/* Tells the browser to skip layout/paint for off-screen content */
#featured-categories {
    content-visibility: auto;
    contain-intrinsic-size: 0 600px;
}

/* ══ Accessibility + Performance: prefers-reduced-motion ══ */
/* Disables ALL animations/transitions for users who opt out of motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    /* Keep the aurora blobs but freeze them */
    [aria-hidden="true"].fixed > div {
        animation: none !important;
    }
}

/* Design system refresh: soft green/red palette with lightweight surfaces. */
:root {
    --brand-primary: #22C55E;
    --brand-primary-soft: rgba(34, 197, 94, 0.12);
    --brand-primary-border: rgba(34, 197, 94, 0.28);
    --brand-red: #EF4444;
    --brand-red-soft: rgba(239, 68, 68, 0.12);
    --brand-red-border: rgba(239, 68, 68, 0.26);
    --brand-light: #F8FAFC;
    --brand-dark: #0F172A;
    --brand-panel: rgba(15, 23, 42, 0.88);
    --brand-panel-strong: rgba(15, 23, 42, 0.96);
    --brand-border: rgba(148, 163, 184, 0.16);
    --brand-border-strong: rgba(34, 197, 94, 0.34);
    --brand-text: #F8FAFC;
    --brand-muted: #CBD5E1;
    --color-bg: var(--brand-dark);
    --color-bg-soft: #111827;
    --color-panel: var(--brand-panel);
    --color-panel-strong: var(--brand-panel-strong);
    --color-border: var(--brand-border);
    --color-border-strong: var(--brand-border-strong);
    --color-text: var(--brand-text);
    --color-muted: var(--brand-muted);
    --color-accent: var(--brand-primary);
    --color-accent-bright: #4ADE80;
    --color-accent-deep: #16A34A;
    --color-secondary: var(--brand-red);
    --color-success: var(--brand-primary);
}

html,
body,
body.bg-\[\#020617\],
.bg-aurora-dark {
    background-color: var(--brand-dark) !important;
    color: var(--brand-text);
}

::selection {
    background: rgba(34, 197, 94, 0.35);
    color: var(--brand-light);
}

body.bg-\[\#020617\]::before {
    background: rgba(28, 38, 49, 0.7);
}

body.bg-\[\#020617\]::after {
    background: rgba(28, 38, 49, 0.7);
}

.orb-1 {
    background: rgba(28, 38, 49, 0.7);
}

.orb-2 {
    background: rgba(28, 38, 49, 0.7);
}

.orb-3 {
    background: rgba(28, 38, 49, 0.7);
}

.glass-card,
.glass-panel,
.glass-item,
.hero-panel,
.hero-stat,
.shortcut-card,
.lesson-browser-card,
.roadmap-panel,
.curriculum-browser,
.mobile-next-card,
.mobile-lesson-row,
.mastery-card,
.edu-card,
.edu-lesson-card,
.edu-soft-panel,
.edu-example-card,
.edu-practice-card,
.edu-callout,
.edu-faq,
.edu-mission,
.edu-coach-note,
.edu-self-check,
.edu-path-card {
    background: transparent;
    border-color: var(--brand-border) !important;
    box-shadow: 0 16px 42px rgba(2, 6, 23, 0.24), inset 0 1px 0 rgba(248, 250, 252, 0.04) !important;
}

.glass-card:hover,
.shortcut-card:hover,
.lesson-browser-card:hover,
.edu-lesson-card:hover,
.edu-example-card:hover,
.edu-practice-card:hover,
.edu-path-card:hover {
    border-color: var(--brand-border-strong) !important;
    box-shadow: 0 20px 54px rgba(2, 6, 23, 0.3), 0 0 28px rgba(34, 197, 94, 0.08) !important;
}

/* Removed invisible logo overrides */

.btn-glow,
.sidebar-unit-actions button:not(:disabled):first-child,
.mobile-lesson-row__button.is-primary {
    background: transparent;
    border-color: var(--brand-primary-border) !important;
    color: var(--brand-light) !important;
    box-shadow: 0 12px 26px rgba(34, 197, 94, 0.18), 0 8px 18px rgba(2, 6, 23, 0.22) !important;
}

.btn-glow:hover:not(:disabled),
.sidebar-unit-actions button:not(:disabled):first-child:hover,
.mobile-lesson-row__button.is-primary:hover {
    box-shadow: 0 16px 34px rgba(34, 197, 94, 0.24), 0 8px 20px rgba(2, 6, 23, 0.25) !important;
}

.level-switcher .level-tab:first-child[style*="background"] {
    background: transparent;
}

.level-switcher .level-tab:nth-child(2)[style*="background"] {
    background: transparent;
}

.mobile-level-toggle button.is-active {
    background: transparent;
    color: var(--brand-light) !important;
}

.hero-track > div,
.edu-progress-fill,
.bg-gradient-to-r.from-yellow-500,
.bg-gradient-to-r.from-yellow-400 {
    background: transparent;
}

.float-hero > div {
    background: transparent;
}

.badge-base.bg-amber-500\/10,
.badge-base.bg-emerald-500\/10,
.rounded-2xl.border.border-cyan-500\/20.bg-cyan-500\/10 {
    background: var(--brand-primary-soft) !important;
    border-color: var(--brand-primary-border) !important;
    color: #BBF7D0 !important;
}

.roadmap-stage__action,
.edu-section-label,
.hero-panel .text-amber-300,
.mobile-lessons .text-amber-300,
.mastery-section .text-amber-300 {
    color: #86EFAC !important;
}

.roadmap-stage--amber .roadmap-stage__node,
.roadmap-stage--emerald .roadmap-stage__node {
    background: transparent;
}

.roadmap-stage--rose .roadmap-stage__node {
    background: transparent;
}

.roadmap-stage__start,
.mobile-lesson-row__state.is-done,
.mobile-next-card__badge {
    background: var(--brand-primary-soft) !important;
    border-color: var(--brand-primary-border) !important;
    color: #BBF7D0 !important;
}

.roadmap-stage__start::after {
    background: rgba(15, 23, 42, 0.96) !important;
    border-color: var(--brand-primary-border) !important;
}

.word-strip {
    background: transparent;
    border-color: var(--brand-primary-border) !important;
}

.word-strip__icon,
.word-strip__hear {
    background: var(--brand-primary-soft) !important;
    border-color: var(--brand-primary-border) !important;
    color: #DCFCE7 !important;
}

.audio-icon-btn {
    width: 2.75rem;
    height: 2.75rem;
    min-width: 2.75rem;
    padding: 0 !important;
    border-radius: 999px !important;
}

.audio-icon-btn__svg {
    width: 1.15rem;
    height: 1.15rem;
    transition: transform 0.2s ease;
}

.audio-icon-btn:hover .audio-icon-btn__svg {
    transform: scale(1.12);
}

.word-strip__romaji,
.word-strip__label {
    color: #BBF7D0 !important;
}

.sidebar-cta {
    background: transparent;
    border-color: var(--brand-primary-border) !important;
}

.sidebar-cta > div > span:first-child {
    background: var(--brand-primary-soft) !important;
    border-color: var(--brand-primary-border) !important;
}

.sidebar-unit-card:hover {
    border-color: var(--brand-primary-border) !important;
}

.mobile-lesson-row.is-complete {
    border-color: var(--brand-primary-border) !important;
}

.mobile-lesson-row__button.is-secondary {
    background: var(--brand-red-soft) !important;
    border-color: var(--brand-red-border) !important;
    color: #FECACA !important;
}

.edu-lesson-card::before,
.edu-example-card::before {
    background: transparent;
}

@media (max-width: 768px) {
    .glass-card,
    .glass-panel,
    .glass-item,
    .hero-panel,
    .roadmap-panel,
    .mobile-next-card,
    .mobile-lesson-row {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }
}

/* High contrast pass for the soft light theme. */
.lesson-page-article,
.lesson-pattern,
.glass-card,
.glass-panel,
.glass-item,
.mobile-lessons,
.mastery-section,
.roadmap-panel,
.curriculum-browser,
.page-card,
.feature-tile {
    color: #1E293B !important;
}

.lesson-page-article :where(h1, h2, h3, h4, h5, h6, summary),
.lesson-pattern :where(h1, h2, h3, h4, h5, h6, summary),
.glass-card :where(h1, h2, h3, h4, h5, h6),
.glass-panel :where(h1, h2, h3, h4, h5, h6),
.mobile-lessons :where(h1, h2, h3, h4),
.mastery-section :where(h1, h2, h3, h4),
.roadmap-panel :where(h1, h2, h3, h4),
.page-card :where(h1, h2, h3, h4) {
    color: #0F172A !important;
}

.lesson-page-article :where(p, li, td, dd),
.lesson-pattern :where(p, li, td, dd),
.glass-card :where(p, li, td, dd),
.glass-panel :where(p, li, td, dd),
.mobile-lessons :where(p, li),
.mastery-section :where(p, li),
.roadmap-panel :where(p, li) {
    color: #334155 !important;
}

.lesson-page-article :where(small, .text-xs),
.lesson-pattern :where(small, .text-xs),
.glass-card :where(small, .text-xs),
.glass-panel :where(small, .text-xs) {
    color: #475569 !important;
}

.text-slate-50,
.text-slate-100,
.text-slate-200,
.text-white {
    color: #0F172A !important;
}

.text-slate-300,
.text-slate-300\/80,
.text-slate-400,
.text-slate-400\/80,
.text-slate-500 {
    color: #334155 !important;
}

.text-slate-600,
.text-slate-700,
.text-slate-800,
.text-slate-900 {
    color: #0F172A !important;
}

.text-amber-200,
.text-amber-300,
.text-amber-300\/80,
.text-amber-400,
.text-yellow-200,
.text-yellow-300,
.text-yellow-400,
.text-orange-200,
.text-orange-300,
.text-orange-400 {
    color: #92400E !important;
}

.text-emerald-200,
.text-emerald-300,
.text-emerald-400,
.text-green-200,
.text-green-300,
.text-green-400,
.text-lime-300,
.text-lime-400 {
    color: #047857 !important;
}

.text-red-200,
.text-red-300,
.text-red-400,
.text-rose-200,
.text-rose-300,
.text-rose-400,
.text-pink-200,
.text-pink-300,
.text-pink-400 {
    color: #B91C1C !important;
}

.text-blue-100,
.text-blue-200,
.text-blue-300,
.text-blue-400,
.text-cyan-100,
.text-cyan-200,
.text-cyan-300,
.text-cyan-400,
.text-sky-200,
.text-sky-300,
.text-sky-400,
.text-indigo-100,
.text-indigo-200,
.text-indigo-300,
.text-indigo-400,
.text-violet-200,
.text-violet-300,
.text-violet-400,
.text-purple-200,
.text-purple-300,
.text-purple-400 {
    color: #1D4ED8 !important;
}

.opacity-40,
.opacity-50 {
    opacity: 0.72 !important;
}

.opacity-60,
.opacity-70 {
    opacity: 0.84 !important;
}

.lesson-mini-label,
.edu-section-label,
.roadmap-stage__status,
.mobile-lessons__header p,
.mobile-lesson-row__state,
.badge-base,
.edu-pill,
.edu-step-pill {
    color: #475569 !important;
}

.btn-glow,
.btn-glow *,
.mobile-lesson-row__button.is-primary,
.mobile-lesson-row__button.is-primary *,
.mobile-next-card__button,
.mobile-next-card__button *,
.level-tab[style*="linear-gradient"],
.mobile-level-toggle button.is-active,
.mobile-level-toggle button.is-active *,
button[style*="linear-gradient"] {
    color: #FFFFFF !important;
}

.sidebar-unit-actions button:not(:disabled):last-child,
.sidebar-unit-actions button:not(:disabled):last-child *,
.mobile-lesson-row__button.is-secondary,
.mobile-lesson-row__button.is-secondary *,
.word-strip__hear,
.word-strip__hear * {
    color: #991B1B !important;
}

.lesson-audio-btn,
.lesson-audio-btn *,
.audio-icon-btn,
.audio-icon-btn * {
    color: #047857 !important;
}

a:not(.logo-glow):not(.logo-amber):not(.logo-shimmer) {
    color: inherit;
}

.lesson-page-article a,
.lesson-pattern a,
.mastery-section a,
.glass-card a:not(.logo-glow):not(.logo-amber):not(.logo-shimmer) {
    color: #047857 !important;
}

/* Word of the Day: clearer top/bottom rhythm and stronger light-theme contrast. */
.word-strip--featured {
    margin-block: 2rem 2.25rem !important;
    padding-block: 1.35rem !important;
    background:
        radial-gradient(circle at 12% 20%, rgba(34, 197, 94, 0.16), transparent 16rem),
        radial-gradient(circle at 92% 22%, rgba(239, 68, 68, 0.10), transparent 15rem),
        rgba(255, 255, 255, 0.94) !important;
    border: 1px solid rgba(15, 23, 42, 0.12) !important;
    box-shadow: 0 18px 46px rgba(15, 23, 42, 0.08) !important;
}

.word-strip--featured .word-strip__inner {
    align-items: stretch !important;
    gap: 0.8rem !important;
}

.word-strip--featured .word-strip__meta {
    width: 100%;
    padding: 0 !important;
    justify-content: flex-start;
}

.word-strip--featured .word-strip__icon {
    background: rgba(34, 197, 94, 0.12) !important;
    border-color: rgba(34, 197, 94, 0.24) !important;
    color: #047857 !important;
    box-shadow: none !important;
}

.word-strip--featured .word-strip__label {
    color: #047857 !important;
    text-shadow: none !important;
}

.word-strip--featured .word-strip__content {
    width: 100%;
    padding: 1rem 1.15rem !important;
    background: rgba(255, 255, 255, 0.82) !important;
    border-color: rgba(15, 23, 42, 0.10) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
}

.word-strip--featured .word-strip__jp {
    color: #0F172A !important;
    text-shadow: none !important;
}

.word-strip--featured .word-strip__romaji {
    color: #1D4ED8 !important;
}

.word-strip--featured .word-strip__en {
    color: #334155 !important;
}

.word-strip--featured .word-strip__divider {
    background: rgba(15, 23, 42, 0.22) !important;
    box-shadow: none !important;
}

.word-strip--featured .word-strip__hear {
    align-self: center;
    background: rgba(239, 68, 68, 0.08) !important;
    border-color: rgba(239, 68, 68, 0.22) !important;
    color: #047857 !important;
    box-shadow: none !important;
}

@media (min-width: 768px) {
    .word-strip--featured .word-strip__inner {
        display: grid !important;
        grid-template-columns: auto minmax(0, 1fr) auto;
        align-items: center !important;
    }

    .word-strip--featured .word-strip__meta {
        width: auto;
    }
}

@media (max-width: 767px) {
    .word-strip--featured {
        margin-block: 1.5rem 1.8rem !important;
        padding: 1.1rem !important;
    }

    .word-strip--featured .word-strip__hear {
        align-self: flex-end;
    }
}

.lesson-pattern-hero,
.lesson-pattern-section {
    position: relative;
    overflow: hidden;
}

.lesson-page-main,
.lesson-page-article,
.lesson-pattern,
.lesson-pattern-hero,
.lesson-pattern-section,
.lesson-pattern-card,
.lesson-mini-card,
.edu-card,
.edu-lesson-card,
.edu-soft-panel,
.edu-example-card,
.edu-practice-card,
.edu-callout,
.edu-faq,
.edu-mission,
.edu-coach-note,
.edu-self-check,
.edu-path-card {
    max-width: 100%;
    min-width: 0;
}

.lesson-page-article :where(.grid, .flex) > *,
.lesson-pattern :where(.grid, .flex) > * {
    min-width: 0;
}

.lesson-page-article :where(h1, h2, h3, h4, p, li, span, a, td, th, button, summary),
.lesson-pattern :where(h1, h2, h3, h4, p, li, span, a, td, th, button, summary) {
    overflow-wrap: anywhere;
}

.lesson-page-article :where(img, video, canvas, iframe, svg) {
    max-width: 100%;
}

.lesson-breadcrumb {
    max-width: 100%;
    overflow: hidden;
}

.lesson-breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem 0.7rem;
    min-width: 0;
}

.lesson-breadcrumb li,
.lesson-breadcrumb a,
.lesson-breadcrumb span {
    max-width: 100%;
}

.lesson-breadcrumb [aria-current="page"] {
    flex: 1 1 100%;
}

.lesson-table-card {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.lesson-table-card table {
    width: max-content;
    min-width: min(620px, 100vw);
}

.lesson-pattern-hero::before,
.lesson-pattern-section::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: rgba(28, 38, 49, 0.7);
    opacity: 0.8;
}

.lesson-pattern-hero > *,
.lesson-pattern-section > * {
    position: relative;
    z-index: 1;
}

.lesson-section-heading {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.lesson-section-number {
    display: inline-flex;
    width: 2.35rem;
    height: 2.35rem;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid rgba(34, 197, 94, 0.28);
    background: rgba(34, 197, 94, 0.12);
    color: #BBF7D0;
    font-size: 0.75rem;
    font-weight: 900;
    box-shadow: inset 0 1px 0 rgba(248, 250, 252, 0.08);
}

.lesson-mini-card,
.lesson-pattern-card {
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 1.2rem;
    background: rgba(15, 23, 42, 0.58);
    padding: 1rem;
    box-shadow: inset 0 1px 0 rgba(248, 250, 252, 0.04);
}

.lesson-mini-label {
    margin-bottom: 0.5rem;
    color: #94A3B8;
    font-size: 0.65rem;
    font-weight: 900;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.lesson-mini-value {
    color: #F8FAFC;
    font-weight: 900;
    line-height: 1.55;
}

.lesson-quiz-option {
    display: flex;
    min-height: 3rem;
    align-items: center;
    gap: 0.75rem;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 1rem;
    background: rgba(15, 23, 42, 0.72);
    padding: 0.85rem 1rem;
    color: #CBD5E1;
    font-weight: 800;
}

.lesson-quiz-option input {
    width: 1rem;
    height: 1rem;
    accent-color: #22C55E;
}

.lesson-pattern .content-rich h2 {
    font-size: clamp(1.35rem, 3vw, 1.8rem);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.lesson-pattern .content-rich h3 {
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

@media (max-width: 640px) {
    .lesson-page-main {
        padding-inline: 0.75rem !important;
    }

    .lesson-page-article {
        padding: 1rem !important;
        border-radius: 1.25rem !important;
        gap: 1.25rem !important;
    }

    .lesson-page-article h1,
    .lesson-pattern-hero h1 {
        font-size: clamp(1.7rem, 8.8vw, 2.35rem) !important;
        line-height: 1.08 !important;
        letter-spacing: -0.03em;
    }

    .lesson-page-article h2,
    .lesson-pattern-section h2 {
        font-size: clamp(1.25rem, 6vw, 1.75rem) !important;
        line-height: 1.18 !important;
    }

    .lesson-page-article h3 {
        font-size: clamp(1.05rem, 5vw, 1.35rem) !important;
        line-height: 1.25 !important;
    }

    .lesson-page-article p,
    .lesson-page-article li {
        line-height: 1.7 !important;
    }

    .lesson-page-article .font-japanese,
    .lesson-page-article .Japanese {
        font-size: clamp(1.35rem, 6.2vw, 1.8rem) !important;
        line-height: 1.35 !important;
        overflow-wrap: anywhere;
    }

    .lesson-table-card th,
    .lesson-table-card td {
        padding: 0.78rem 0.85rem !important;
        font-size: 0.86rem !important;
        line-height: 1.45 !important;
        vertical-align: top;
    }

    .lesson-table-card th {
        font-size: 0.82rem !important;
    }

    .lesson-table-card td.font-japanese,
    .lesson-table-card .font-japanese {
        font-size: clamp(1.05rem, 5vw, 1.35rem) !important;
        line-height: 1.45 !important;
        letter-spacing: -0.02em;
        white-space: normal;
    }

    .lesson-table-card td:nth-child(2),
    .lesson-table-card td:nth-child(3) {
        font-size: 0.8rem !important;
    }

    .lesson-breadcrumb {
        margin-bottom: 1.25rem !important;
        font-size: 0.78rem;
    }

    .lesson-breadcrumb [aria-current="page"] span {
        color: rgba(226, 232, 240, 0.86);
    }

    .lesson-pattern {
        gap: 1.25rem !important;
    }

    .lesson-pattern-hero,
    .lesson-pattern-section {
        border-radius: 1.25rem !important;
        padding: 1rem !important;
    }

    .lesson-section-heading {
        align-items: flex-start;
        gap: 0.75rem;
    }

    .lesson-section-number {
        width: 2rem;
        height: 2rem;
        font-size: 0.7rem;
    }

    .lesson-mini-card,
    .lesson-pattern-card {
        border-radius: 1rem;
        padding: 0.9rem;
    }

    .lesson-quiz-option {
        border-radius: 0.9rem;
        padding: 0.75rem;
    }

    .lesson-table-card {
        margin-inline: -0.25rem;
    }

    .lesson-table-card table {
        min-width: 430px;
    }
}

/* Refreshing background layer: cooler, softer, and less heavy than pure navy. */
:root {
    --brand-dark: #123047;
    --brand-panel: rgba(15, 39, 58, 0.82);
    --brand-panel-strong: rgba(15, 35, 52, 0.92);
    --brand-border: rgba(186, 230, 253, 0.22);
    --brand-border-strong: rgba(125, 211, 252, 0.38);
    --brand-primary-soft: rgba(34, 197, 94, 0.16);
    --brand-red-soft: rgba(239, 68, 68, 0.1);
}

html,
body,
body.bg-aurora-dark,
body.bg-\[\#020617\] {
    background: rgba(28, 38, 49, 0.7);
    color: var(--brand-text);
}

body.bg-\[\#020617\]::before {
    background: rgba(28, 38, 49, 0.7);
    opacity: 0.9 !important;
}

body.bg-\[\#020617\]::after {
    background: rgba(28, 38, 49, 0.7);
    opacity: 0.85 !important;
}

.fixed.inset-0.z-0[class*="bg-[#020617]/70"] {
    background: rgba(248, 250, 252, 0.035) !important;
}

.orb-1 {
    background: rgba(28, 38, 49, 0.7);
}

.orb-2 {
    background: rgba(28, 38, 49, 0.7);
}

.orb-3 {
    background: rgba(28, 38, 49, 0.7);
}

.glass-card,
.glass-panel,
.glass-item,
.hero-panel,
.hero-stat,
.shortcut-card,
.lesson-browser-card,
.roadmap-panel,
.curriculum-browser,
.mobile-next-card,
.mobile-lesson-row,
.mastery-card,
.edu-card,
.edu-lesson-card,
.edu-soft-panel,
.edu-example-card,
.edu-practice-card,
.edu-callout,
.edu-faq,
.edu-mission,
.edu-coach-note,
.edu-self-check,
.edu-path-card,
.lesson-pattern-hero,
.lesson-pattern-section,
.lesson-mini-card,
.lesson-pattern-card {
    background: transparent;
    border-color: var(--brand-border) !important;
    box-shadow: 0 18px 48px rgba(8, 20, 33, 0.22), inset 0 1px 0 rgba(248, 250, 252, 0.08) !important;
}

.lesson-pattern-hero::before,
.lesson-pattern-section::before {
    background: rgba(28, 38, 49, 0.7);
}

.site-ad-slot {
    width: fit-content;
    max-width: 100%;
    min-height: 0;
    margin: 1.5rem auto;
    padding: 0.18rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.site-ad-label {
    margin-bottom: 0.35rem;
    font-size: 0.55rem;
    line-height: 1;
    font-weight: 900;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.78);
}

#adsense-banner {
    padding: 0.75rem 1rem !important;
    display: none !important;
}

#adsense-banner > p {
    display: none !important;
}

#adsense-banner .adsbygoogle {
    width: min(100%, 330px);
    max-width: calc(100vw - 2rem);
    margin-inline: auto;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 0.55rem;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.18);
}

.site-ad-frame {
    width: 320px;
    max-width: 100%;
    height: 50px;
    display: block;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 0.5rem;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.22);
    box-shadow: 0 10px 24px rgba(2, 6, 23, 0.18);
    box-sizing: border-box;
}

.site-ad-slot--display {
    width: fit-content;
    max-width: 100%;
    min-height: 0;
    padding: 0.18rem;
    margin-block: 2rem;
    display: none;
}

.site-ad-frame--display {
    width: 300px;
    max-width: 100%;
    height: 250px;
    border-radius: 0.65rem;
}

@media (max-width: 767px) {
    .site-ad-slot {
        display: flex;
        width: fit-content;
        max-width: calc(100vw - 2rem);
        margin-block: 1rem;
    }

    .site-ad-slot:not(.site-ad-slot--display) {
        position: fixed;
        left: 50%;
        bottom: calc(env(safe-area-inset-bottom, 0px) + 0.5rem);
        transform: translateX(-50%);
        z-index: 80;
        margin: 0;
        width: min(320px, calc(100vw - 1rem));
        max-width: min(320px, calc(100vw - 1rem));
        padding: 0.25rem;
        border: 1px solid rgba(148, 163, 184, 0.32);
        border-radius: 0.75rem;
        background: rgba(255, 255, 255, 0.92);
        box-shadow: 0 10px 24px rgba(2, 6, 23, 0.16);
        box-sizing: border-box;
        overflow: hidden;
    }

    .site-ad-slot:not(.site-ad-slot--display) .site-ad-frame {
        width: 100% !important;
        max-width: 100% !important;
        border: 0 !important;
        border-radius: 0.5rem;
        box-shadow: none;
    }

    .site-ad-slot--display {
        display: flex;
        width: fit-content;
        max-width: calc(100vw - 2rem);
        padding: 0.28rem;
        border: 1px solid rgba(120, 98, 72, 0.28);
        border-radius: 0.85rem;
        background: rgba(255, 252, 245, 0.96);
        box-shadow: 0 10px 24px rgba(2, 6, 23, 0.12);
        box-sizing: border-box;
        overflow: hidden;
    }

    .site-ad-slot--display .site-ad-frame--display {
        width: 100% !important;
        max-width: 100% !important;
        border: 0 !important;
        border-radius: 0.58rem;
        box-shadow: none !important;
    }

    #adsense-banner {
        display: block !important;
        width: fit-content !important;
        max-width: calc(100vw - 2rem) !important;
        margin: 1rem auto !important;
        padding: 0.28rem !important;
        border: 1px solid rgba(120, 98, 72, 0.28) !important;
        border-radius: 0.85rem !important;
        background: rgba(255, 252, 245, 0.96) !important;
        box-shadow: 0 10px 24px rgba(2, 6, 23, 0.12) !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    #adsense-banner iframe[src*="ads-300x250.html"] {
        width: 300px !important;
        max-width: calc(100vw - 2rem) !important;
        height: 250px !important;
        display: block !important;
        margin: 0 auto !important;
        border: 0 !important;
        border-radius: 0.58rem !important;
        overflow: hidden !important;
        background: transparent !important;
        box-shadow: none !important;
    }
}

@media (min-width: 768px) {
    .w-full.overflow-hidden.rounded-2xl.glass-item:has(> .site-ad-slot--display),
    .flex.justify-center.px-4.my-8:has(> .site-ad-slot--display) {
        display: none !important;
    }
}

/* Final Word of the Day layout override: top label, bottom word content. */
.word-strip.word-strip--featured {
    max-width: 880px !important;
    margin-top: 2.3rem !important;
    margin-bottom: 2.8rem !important;
    padding: 1.15rem !important;
    border-radius: 2rem !important;
    background:
        linear-gradient(135deg, rgba(236, 253, 245, 0.96), rgba(255, 247, 237, 0.95)),
        #FFFFFF !important;
    border: 1px solid rgba(34, 197, 94, 0.22) !important;
    box-shadow: 0 20px 54px rgba(15, 23, 42, 0.10) !important;
}

.word-strip.word-strip--featured .word-strip__inner {
    display: grid !important;
    grid-template-columns: 1fr auto;
    grid-template-areas:
        "label hear"
        "word word";
    align-items: center !important;
    gap: 0.9rem 1rem !important;
    min-height: 0 !important;
}

.word-strip.word-strip--featured .word-strip__meta {
    grid-area: label;
    justify-content: center !important;
    padding: 0 !important;
    min-width: 0;
}

.word-strip.word-strip--featured .word-strip__icon {
    width: 2.15rem !important;
    height: 2.15rem !important;
    background: #DCFCE7 !important;
    border-color: rgba(34, 197, 94, 0.30) !important;
    color: #047857 !important;
}

.word-strip.word-strip--featured .word-strip__label {
    color: #047857 !important;
    font-size: 0.78rem !important;
    letter-spacing: 0.28em !important;
}

.word-strip.word-strip--featured .word-strip__content {
    grid-area: word;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 0.9rem 1.15rem !important;
    width: 100% !important;
    min-height: 5.4rem;
    padding: 1.2rem 1.35rem !important;
    border-radius: 1.55rem !important;
    background: rgba(255, 255, 255, 0.92) !important;
    border: 1px solid rgba(15, 23, 42, 0.12) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 1), 0 10px 26px rgba(15, 23, 42, 0.06) !important;
}

.word-strip.word-strip--featured .word-strip__jp {
    color: #0F172A !important;
    font-size: clamp(2.05rem, 4vw, 3.2rem) !important;
    line-height: 1 !important;
}

.word-strip.word-strip--featured .word-strip__romaji {
    color: #1D4ED8 !important;
    font-size: clamp(0.95rem, 1.4vw, 1.1rem) !important;
}

.word-strip.word-strip--featured .word-strip__en {
    color: #334155 !important;
    font-size: clamp(0.95rem, 1.4vw, 1.1rem) !important;
    font-weight: 800 !important;
}

.word-strip.word-strip--featured .word-strip__divider {
    display: block !important;
    width: 0.42rem !important;
    height: 0.42rem !important;
    background: rgba(15, 23, 42, 0.28) !important;
}

.word-strip.word-strip--featured .word-strip__hear {
    grid-area: hear;
    justify-self: end;
    align-self: center;
    background: #FEE2E2 !important;
    border-color: rgba(239, 68, 68, 0.24) !important;
    color: #047857 !important;
}

@media (max-width: 767px) {
    .word-strip.word-strip--featured {
        margin-top: 1.5rem !important;
        margin-bottom: 2rem !important;
        padding: 1rem !important;
    }

    .word-strip.word-strip--featured .word-strip__inner {
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "label hear"
            "word word";
    }

    .word-strip.word-strip--featured .word-strip__meta {
        justify-content: flex-start !important;
    }

    .word-strip.word-strip--featured .word-strip__content {
        flex-direction: column;
        align-items: flex-start !important;
        min-height: 7rem;
    }

    .word-strip.word-strip--featured .word-strip__divider {
        display: none !important;
    }
}

/* Soft Light UI Refresh: clean, modern, educational, and lighter than the old dark shell. */
:root {
    --soft-bg: #F8FAFC;
    --soft-bg-warm: #FFF7ED;
    --soft-bg-mint: #ECFDF5;
    --soft-bg-sky: #EFF6FF;
    --soft-surface: rgba(255, 255, 255, 0.86);
    --soft-surface-strong: rgba(255, 255, 255, 0.96);
    --soft-surface-tint: rgba(236, 253, 245, 0.82);
    --soft-border: rgba(15, 23, 42, 0.10);
    --soft-border-strong: rgba(34, 197, 94, 0.34);
    --soft-text: #0F172A;
    --soft-text-2: #334155;
    --soft-muted: #475569;
    --soft-primary: #22C55E;
    --soft-primary-dark: #16A34A;
    --soft-red: #EF4444;
    --soft-red-dark: #DC2626;
    --soft-amber: #F59E0B;
    --soft-blue: #2563EB;
    --soft-shadow: 0 18px 55px rgba(15, 23, 42, 0.09);
    --soft-shadow-small: 0 10px 28px rgba(15, 23, 42, 0.07);
    --brand-primary: var(--soft-primary);
    --brand-primary-soft: rgba(34, 197, 94, 0.13);
    --brand-primary-border: rgba(34, 197, 94, 0.28);
    --brand-red: var(--soft-red);
    --brand-red-soft: rgba(239, 68, 68, 0.10);
    --brand-red-border: rgba(239, 68, 68, 0.24);
    --brand-light: #FFFFFF;
    --brand-dark: var(--soft-bg);
    --brand-panel: var(--soft-surface);
    --brand-panel-strong: var(--soft-surface-strong);
    --brand-border: var(--soft-border);
    --brand-border-strong: var(--soft-border-strong);
    --brand-text: var(--soft-text);
    --brand-muted: var(--soft-muted);
    --color-bg: var(--soft-bg);
    --color-bg-soft: var(--soft-bg-sky);
    --color-panel: var(--soft-surface);
    --color-panel-strong: var(--soft-surface-strong);
    --color-border: var(--soft-border);
    --color-border-strong: var(--soft-border-strong);
    --color-text: var(--soft-text);
    --color-muted: var(--soft-muted);
}

html,
body,
body.bg-site-bg,
body.bg-aurora-dark,
body.bg-\[\#020617\] {
    background:
        radial-gradient(circle at 10% 0%, rgba(34, 197, 94, 0.18), transparent 28rem),
        radial-gradient(circle at 90% 8%, rgba(239, 68, 68, 0.11), transparent 26rem),
        radial-gradient(circle at 50% 100%, rgba(37, 99, 235, 0.10), transparent 30rem),
        linear-gradient(180deg, #F8FAFC 0%, #EFF6FF 48%, #F8FAFC 100%) !important;
    color: var(--soft-text) !important;
}

.bg-site-bg,
.bg-site-bg\/40,
.bg-site-bg\/50,
.bg-site-bg\/70,
.bg-site-bg\/80,
.bg-site-bg\/90,
.bg-aurora-dark,
.bg-\[\#020617\],
.bg-\[\#020617\]\/70,
.bg-slate-900,
.bg-slate-900\/40,
.bg-slate-900\/80,
.bg-slate-900\/88,
.bg-slate-900\/90,
.bg-\[\#020617\]\/20,
.bg-\[\#020617\]\/30,
.bg-\[\#020617\]\/40,
.bg-\[\#020617\]\/50,
.bg-black\/20,
.bg-black\/30,
.bg-black\/40,
.bg-black\/50,
.bg-black\/60,
.bg-indigo-900\/20,
.bg-indigo-900\/40,
.bg-indigo-900\/50,
.bg-blue-900\/20,
.bg-blue-900\/40,
.bg-blue-900\/50,
.bg-emerald-900\/20,
.bg-emerald-900\/40,
.bg-emerald-900\/50,
.bg-pink-900\/20,
.bg-pink-900\/40,
.bg-pink-900\/50,
.bg-purple-900\/20,
.bg-purple-900\/40,
.bg-purple-900\/50,
.bg-amber-900\/20,
.bg-amber-900\/40,
.bg-amber-900\/50,
.bg-orange-900\/20,
.bg-orange-900\/40,
.bg-orange-900\/50,
.bg-red-900\/20,
.bg-red-900\/40,
.bg-red-900\/50 {
    background-color: transparent !important;
}

.fixed.inset-0.z-0,
body.bg-\[\#020617\]::before,
body.bg-\[\#020617\]::after {
    background:
        radial-gradient(circle at 18% 20%, rgba(34, 197, 94, 0.13), transparent 24rem),
        radial-gradient(circle at 85% 35%, rgba(239, 68, 68, 0.09), transparent 22rem),
        transparent !important;
    opacity: 1 !important;
}

.bg-white\/5,
.bg-white\/10 {
    background-color: rgba(255, 255, 255, 0.64) !important;
}

.border-white\/5,
.border-white\/10,
.border-white\/20,
.border-slate-700,
.border-slate-800 {
    border-color: rgba(15, 23, 42, 0.10) !important;
}

.shadow-2xl,
.shadow-xl,
.shadow-lg {
    box-shadow: var(--soft-shadow-small) !important;
}

.orb-1,
.orb-2,
.orb-3 {
    background: rgba(34, 197, 94, 0.12) !important;
    filter: blur(34px);
}

.text-white,
.text-slate-100,
.text-slate-200 {
    color: var(--soft-text) !important;
}

.text-slate-300,
.text-slate-300\/80 {
    color: var(--soft-text-2) !important;
}

.text-slate-400,
.text-slate-400\/80,
.text-slate-500 {
    color: var(--soft-muted) !important;
}

.text-amber-300,
.text-amber-300\/80,
.text-amber-400,
.text-amber-500,
.text-amber-600,
.text-yellow-300,
.text-yellow-400,
.text-yellow-500,
.text-yellow-600,
.text-orange-200,
.text-orange-300,
.text-orange-300\/80,
.text-orange-400,
.text-orange-500,
.text-orange-600 {
    color: #9A3412 !important;
}

.text-emerald-200,
.text-emerald-300,
.text-emerald-300\/80,
.text-emerald-400,
.text-emerald-500,
.text-emerald-600,
.text-green-300,
.text-green-400,
.text-green-500,
.text-green-600,
.text-lime-300,
.text-lime-400,
.text-lime-500,
.text-lime-600 {
    color: #166534 !important;
}

.text-red-300,
.text-red-400,
.text-red-500,
.text-red-600,
.text-pink-300,
.text-pink-400,
.text-pink-500,
.text-pink-600,
.text-rose-200,
.text-rose-300,
.text-rose-400,
.text-rose-500,
.text-rose-600 {
    color: var(--soft-red-dark) !important;
}

.text-blue-200,
.text-indigo-300,
.text-indigo-400,
.text-indigo-500,
.text-indigo-600,
.text-blue-300,
.text-blue-400,
.text-blue-500,
.text-blue-600,
.text-cyan-200,
.text-cyan-300,
.text-cyan-300\/80,
.text-cyan-400,
.text-cyan-500,
.text-cyan-600,
.text-sky-200,
.text-sky-300,
.text-sky-400,
.text-sky-500,
.text-sky-600,
.text-indigo-200 {
    color: #1D4ED8 !important;
}

.text-violet-200,
.text-violet-300,
.text-violet-300\/80,
.text-violet-400,
.text-violet-500,
.text-violet-600,
.text-purple-200,
.text-purple-300,
.text-purple-400,
.text-purple-500,
.text-purple-600 {
    color: #6D28D9 !important;
}

.logo-glow,
.logo-amber,
.logo-shimmer {
    background: linear-gradient(135deg, #0F172A 0%, #16A34A 42%, #EF4444 100%) !important;
    background-clip: text !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    color: transparent !important;
    filter: none !important;
}

.glass-card,
.glass-panel,
.glass-item,
.hero-panel,
.hero-stat,
.shortcut-card,
.lesson-browser-card,
.roadmap-panel,
.curriculum-browser,
.mobile-next-card,
.mobile-lesson-row,
.mastery-card,
.edu-card,
.edu-lesson-card,
.edu-soft-panel,
.edu-example-card,
.edu-practice-card,
.edu-callout,
.edu-faq,
.edu-mission,
.edu-coach-note,
.edu-self-check,
.edu-path-card,
.lesson-page-article,
.lesson-pattern-hero,
.lesson-pattern-section,
.lesson-mini-card,
.lesson-pattern-card,
.lesson-table-card,
.roadmap-stage__card,
.sidebar-unit-card,
.sidebar-cta,
.word-strip,
.page-card,
.feature-tile {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.76)) !important;
    border-color: var(--soft-border) !important;
    color: var(--soft-text) !important;
    box-shadow: var(--soft-shadow) !important;
}

.glass-panel,
aside.glass-panel,
nav.glass-panel {
    background: rgba(255, 255, 255, 0.88) !important;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.glass-card:hover,
.glass-item:hover,
.shortcut-card:hover,
.lesson-browser-card:hover,
.edu-lesson-card:hover,
.edu-example-card:hover,
.edu-practice-card:hover,
.edu-path-card:hover,
.sidebar-unit-card:hover,
.mobile-lesson-row:hover,
.roadmap-stage--link:hover .roadmap-stage__card {
    border-color: var(--soft-border-strong) !important;
    box-shadow: 0 22px 64px rgba(34, 197, 94, 0.13), 0 14px 36px rgba(15, 23, 42, 0.08) !important;
}

.hero-panel,
.lesson-pattern-hero,
.mobile-next-card,
.sidebar-cta,
.word-strip {
    background:
        linear-gradient(135deg, rgba(236, 253, 245, 0.92), rgba(255, 247, 237, 0.86)),
        #FFFFFF !important;
}

.depth-modal {
    background: rgba(248, 250, 252, 0.72) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
}

.depth-modal::before,
.depth-modal::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.depth-modal::before {
    background:
        radial-gradient(circle at 18% 20%, rgba(34, 197, 94, 0.12), transparent 20rem),
        radial-gradient(circle at 84% 18%, rgba(59, 130, 246, 0.10), transparent 20rem),
        radial-gradient(circle at 50% 100%, rgba(239, 68, 68, 0.08), transparent 24rem);
}

.depth-modal__panel {
    position: relative;
    z-index: 1;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.94)) !important;
    border: 1px solid var(--soft-border-strong) !important;
    border-radius: 24px !important;
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.14), 0 14px 36px rgba(34, 197, 94, 0.08) !important;
    color: var(--soft-text) !important;
}

.depth-modal__header {
    background:
        linear-gradient(135deg, rgba(236, 253, 245, 0.96), rgba(239, 246, 255, 0.94), rgba(255, 247, 237, 0.92)) !important;
}

.depth-modal__header .h-1 {
    background: linear-gradient(90deg, #16A34A, #3B82F6, #EF4444) !important;
}

.depth-modal__header .absolute.opacity-\[0\.04\] {
    opacity: 0.05 !important;
    background-image:
        repeating-linear-gradient(0deg, rgba(15, 23, 42, 0.12) 0, rgba(15, 23, 42, 0.12) 1px, transparent 1px, transparent 40px),
        repeating-linear-gradient(90deg, rgba(15, 23, 42, 0.12) 0, rgba(15, 23, 42, 0.12) 1px, transparent 1px, transparent 40px) !important;
}

.depth-modal__header .absolute.top-4.left-4 {
    background: radial-gradient(circle, rgba(59, 130, 246, 0.20) 0%, transparent 72%) !important;
    filter: blur(16px) !important;
}

.depth-modal__header .w-11.h-11.rounded-2xl {
    background: linear-gradient(135deg, #16A34A, #3B82F6) !important;
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.16), 0 12px 28px rgba(59, 130, 246, 0.18) !important;
}

.depth-modal__header .w-1.h-1.rounded-full {
    background: #16A34A !important;
}

.depth-modal__header p[style*="color:#818cf8"] {
    color: var(--soft-blue) !important;
}

.depth-modal__header button {
    background: rgba(255, 255, 255, 0.74) !important;
    border: 1px solid var(--soft-border) !important;
    color: var(--soft-muted) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5) !important;
}

.depth-modal__header button:hover {
    background: rgba(254, 242, 242, 0.94) !important;
    border-color: rgba(239, 68, 68, 0.22) !important;
    color: #B91C1C !important;
}

.depth-modal__header > .mx-4 {
    background: linear-gradient(90deg, rgba(34, 197, 94, 0.26), rgba(59, 130, 246, 0.16), transparent) !important;
}

.depth-modal__tabs {
    background: transparent !important;
    padding: 0.75rem 0.75rem 0.35rem !important;
}

.depth-modal__tabs button {
    background: rgba(255, 255, 255, 0.72) !important;
    border: 1px solid var(--soft-border) !important;
    color: var(--soft-muted) !important;
    box-shadow: var(--soft-shadow-small) !important;
}

.depth-modal__tabs button:hover {
    background: rgba(255, 255, 255, 0.96) !important;
    border-color: var(--soft-border-strong) !important;
    color: var(--soft-text) !important;
}

.depth-modal__tabs button.text-white {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.14), rgba(59, 130, 246, 0.15), rgba(239, 68, 68, 0.09)) !important;
    border-color: rgba(59, 130, 246, 0.24) !important;
    color: var(--soft-text) !important;
    box-shadow: 0 12px 32px rgba(59, 130, 246, 0.12) !important;
}

.depth-modal__body div.rounded-xl[style*="border:1px solid"],
.depth-modal__body div.rounded-lg[style*="border:1px solid"],
.depth-modal__body div.rounded-2xl[style*="border:1px solid"],
.depth-modal__body div.rounded-full[style*="border:2px solid"],
.depth-modal__body div.rounded-xl.overflow-hidden {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(248, 250, 252, 0.88)) !important;
    border-color: var(--soft-border) !important;
    box-shadow: var(--soft-shadow-small) !important;
}

.depth-modal__body div.rounded-lg[style*="background:rgba(0,0,0,0.42)"] {
    background: linear-gradient(145deg, rgba(239, 246, 255, 0.94), rgba(236, 253, 245, 0.88)) !important;
    border: 1px solid rgba(59, 130, 246, 0.14) !important;
}

.depth-modal__body button[style*="background:rgba(99,102,241,0.15)"],
.depth-modal__body button[style*="background:rgba(99,102,241,0.18)"],
.depth-modal__body button[style*="background:rgba(99,102,241,0.4)"] {
    background: rgba(239, 246, 255, 0.96) !important;
    border: 1px solid rgba(59, 130, 246, 0.18) !important;
    color: var(--soft-blue) !important;
}

.depth-modal__body button[style*="background:linear-gradient(135deg,#6366f1,#8b5cf6)"] {
    background: linear-gradient(135deg, #16A34A, #3B82F6) !important;
    box-shadow: 0 10px 24px rgba(59, 130, 246, 0.20) !important;
}

.depth-modal__body button[style*="background:rgba(255,255,255,0.05)"],
.depth-modal__body button[style*="background:rgba(255,255,255,0.06)"] {
    background: rgba(255, 255, 255, 0.88) !important;
    border-color: var(--soft-border) !important;
    color: var(--soft-text-2) !important;
}

.depth-modal__footer {
    background: rgba(255, 255, 255, 0.82) !important;
    border-top: 1px solid var(--soft-border) !important;
}

.roadmap-panel,
.mastery-card,
.curriculum-browser {
    background:
        radial-gradient(circle at 12% 18%, rgba(34, 197, 94, 0.12), transparent 22rem),
        radial-gradient(circle at 88% 28%, rgba(239, 68, 68, 0.08), transparent 20rem),
        rgba(255, 255, 255, 0.86) !important;
}

.lesson-pattern-hero::before,
.lesson-pattern-section::before {
    background:
        radial-gradient(circle at top right, rgba(34, 197, 94, 0.12), transparent 18rem),
        transparent !important;
    opacity: 1 !important;
}

.lesson-mini-card,
.lesson-pattern-card,
.lesson-quiz-option,
.lesson-table-card,
.edu-note,
.edu-faq details,
.edu-self-check li,
.edu-mission-task {
    background: rgba(255, 255, 255, 0.82) !important;
    border-color: rgba(15, 23, 42, 0.10) !important;
    color: var(--soft-text-2) !important;
}

.lesson-mini-value,
.lesson-pattern-card strong,
.lesson-quiz-option strong,
.lesson-page-article strong {
    color: var(--soft-text) !important;
}

.lesson-mini-label,
.edu-pill,
.edu-step-pill {
    color: var(--soft-muted) !important;
}

.lesson-section-number,
.edu-icon,
.word-strip__icon,
.word-strip__hear,
.roadmap-stage__start,
.mobile-next-card__badge,
.mobile-lesson-row__state.is-done {
    background: rgba(34, 197, 94, 0.12) !important;
    border-color: rgba(34, 197, 94, 0.28) !important;
    color: #047857 !important;
}

.lesson-table-card thead tr {
    background: rgba(34, 197, 94, 0.12) !important;
}

.lesson-table-card th {
    color: #047857 !important;
}

.lesson-table-card td {
    color: var(--soft-text-2) !important;
    border-color: rgba(15, 23, 42, 0.08) !important;
}

.btn-glow,
.sidebar-unit-actions button:not(:disabled):first-child,
.mobile-lesson-row__button.is-primary,
.mobile-next-card__button,
.level-tab[style*="linear-gradient"],
.mobile-level-toggle button.is-active {
    background: linear-gradient(135deg, #15803D 0%, #166534 100%) !important;
    border-color: rgba(22, 101, 52, 0.34) !important;
    color: #FFFFFF !important;
    box-shadow: 0 14px 30px rgba(22, 101, 52, 0.22) !important;
}

.mobile-lesson-row__button.is-secondary,
.sidebar-unit-actions button:not(:disabled):last-child,
.roadmap-stage__action,
.word-strip__hear {
    background: rgba(239, 68, 68, 0.08) !important;
    border-color: rgba(239, 68, 68, 0.18) !important;
    color: #B91C1C !important;
}

.level-switcher,
.mobile-level-toggle {
    background: rgba(255, 255, 255, 0.70) !important;
    border-color: rgba(15, 23, 42, 0.08) !important;
    box-shadow: var(--soft-shadow-small) !important;
}

.hero-track,
.edu-progress-track {
    background: rgba(15, 23, 42, 0.08) !important;
    border-color: rgba(15, 23, 42, 0.08) !important;
}

.hero-track > div,
.edu-progress-fill,
.bg-gradient-to-r.from-yellow-500,
.bg-gradient-to-r.from-yellow-400 {
    background: linear-gradient(90deg, #22C55E, #F59E0B, #EF4444) !important;
}

.hero-progress-track,
.sidebar-progress-track,
.lesson-progress-track,
.edu-progress-track {
    background: rgba(15, 23, 42, 0.08) !important;
    border: 1px solid rgba(15, 23, 42, 0.08) !important;
    box-shadow: inset 0 1px 3px rgba(15, 23, 42, 0.08) !important;
}

.hero-progress-fill,
.sidebar-progress-fill,
.lesson-progress-fill,
.edu-progress-fill {
    position: relative;
    overflow: hidden;
    background: linear-gradient(90deg, #22C55E 0%, #3B82F6 45%, #F59E0B 75%, #EF4444 100%) !important;
    box-shadow: 0 8px 18px rgba(59, 130, 246, 0.16) !important;
}

.sidebar-user-stats {
    margin: 0.8rem 1rem 1rem !important;
    border: 1px solid rgba(15, 23, 42, 0.12) !important;
    border-top-color: rgba(15, 23, 42, 0.16) !important;
    border-radius: 1rem !important;
    background: rgba(255, 255, 255, 0.72) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), 0 10px 24px rgba(15, 23, 42, 0.05) !important;
}

.hero-progress-fill::after,
.sidebar-progress-fill::after,
.lesson-progress-fill::after,
.edu-progress-fill::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.10));
    opacity: 0.75;
}

.lesson-feedback-strip {
    border-top: 1px solid rgba(15, 23, 42, 0.10) !important;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.lesson-feedback-strip--correct {
    background: linear-gradient(135deg, rgba(236, 253, 245, 0.96), rgba(239, 246, 255, 0.94), rgba(255, 247, 237, 0.92)) !important;
    border-top-color: rgba(34, 197, 94, 0.16) !important;
}

.lesson-feedback-strip--incorrect {
    background: linear-gradient(135deg, rgba(254, 242, 242, 0.96), rgba(255, 241, 242, 0.94), rgba(255, 247, 237, 0.90)) !important;
    border-top-color: rgba(239, 68, 68, 0.18) !important;
}

.lesson-feedback-title {
    letter-spacing: -0.02em;
}

.lesson-feedback-title--correct {
    color: #166534 !important;
}

.lesson-feedback-title--incorrect {
    color: #B91C1C !important;
}

.lesson-feedback-strip p.text-slate-200,
.lesson-feedback-strip .text-white {
    color: var(--soft-text) !important;
}

.lesson-feedback-cta {
    border: 1px solid rgba(15, 23, 42, 0.08) !important;
    box-shadow: var(--soft-shadow-small) !important;
}

.lesson-feedback-cta--correct {
    background: linear-gradient(135deg, #22C55E, #3B82F6) !important;
    color: #FFFFFF !important;
    box-shadow: 0 14px 30px rgba(59, 130, 246, 0.20) !important;
}

.lesson-feedback-cta--incorrect {
    background: linear-gradient(135deg, #EF4444, #F97316) !important;
    color: #FFFFFF !important;
    box-shadow: 0 14px 30px rgba(239, 68, 68, 0.18) !important;
}

input,
textarea,
select,
.lesson-page-article input,
.lesson-page-article textarea {
    background: rgba(255, 255, 255, 0.92) !important;
    color: var(--soft-text) !important;
    border-color: rgba(15, 23, 42, 0.14) !important;
}

input::placeholder,
textarea::placeholder {
    color: #94A3B8 !important;
}

footer,
.mastery-footer-block {
    background: rgba(255, 255, 255, 0.84) !important;
    border-color: rgba(15, 23, 42, 0.10) !important;
    color: var(--soft-muted) !important;
}

.site-ad-frame,
#adsense-banner .adsbygoogle {
    background: rgba(255, 255, 255, 0.78) !important;
    border-color: rgba(15, 23, 42, 0.12) !important;
    box-shadow: var(--soft-shadow-small) !important;
}

@media (max-width: 768px) {
    .glass-card,
    .glass-panel,
    .glass-item,
    .hero-panel,
    .roadmap-panel,
    .mobile-next-card,
    .mobile-lesson-row,
    .lesson-page-article {
        background: rgba(255, 255, 255, 0.90) !important;
        box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08) !important;
    }
}

/* Final visual authority: Word of the Day must be a clear top/bottom card. */
.word-strip.word-strip--featured {
    max-width: 980px !important;
    margin-top: 2rem !important;
    margin-bottom: 2.4rem !important;
    padding: 1rem 1.15rem !important;
    border-radius: 1.8rem !important;
    background:
        linear-gradient(135deg, rgba(236, 253, 245, 0.98), rgba(255, 247, 237, 0.96)),
        #ffffff !important;
    border: 1px solid rgba(34, 197, 94, 0.24) !important;
    box-shadow: 0 20px 54px rgba(15, 23, 42, 0.11) !important;
}

.word-strip.word-strip--featured .word-strip__inner {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 1rem !important;
    min-height: 0 !important;
}

.word-strip.word-strip--featured .word-strip__meta {
    width: auto !important;
    padding: 0 !important;
    justify-content: flex-start !important;
    flex: 0 0 auto !important;
}

.word-strip.word-strip--featured .word-strip__icon {
    width: 2.15rem !important;
    height: 2.15rem !important;
    background: #DCFCE7 !important;
    border-color: rgba(34, 197, 94, 0.32) !important;
    color: #047857 !important;
    box-shadow: none !important;
}

.word-strip.word-strip--featured .word-strip__label {
    color: #047857 !important;
    font-size: 0.78rem !important;
    letter-spacing: 0.28em !important;
    text-shadow: none !important;
}

.word-strip.word-strip--featured .word-strip__content {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: auto !important;
    min-height: 4.2rem !important;
    gap: 0.85rem 1rem !important;
    padding: 0.9rem 1.1rem !important;
    border-radius: 1.35rem !important;
    background: rgba(255, 255, 255, 0.88) !important;
    border: 1px solid rgba(15, 23, 42, 0.12) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 1) !important;
}

.word-strip.word-strip--featured .word-strip__jp {
    color: #0F172A !important;
    font-size: clamp(1.85rem, 3.3vw, 2.75rem) !important;
    line-height: 1 !important;
    text-shadow: none !important;
    white-space: nowrap !important;
}

.word-strip.word-strip--featured .word-strip__romaji {
    color: #1D4ED8 !important;
    font-size: clamp(0.95rem, 1.4vw, 1.1rem) !important;
    white-space: nowrap !important;
}

.word-strip.word-strip--featured .word-strip__en {
    color: #334155 !important;
    font-size: clamp(0.95rem, 1.4vw, 1.1rem) !important;
    font-weight: 800 !important;
    white-space: nowrap !important;
}

.word-strip.word-strip--featured .word-strip__divider {
    display: block !important;
    width: 0.42rem !important;
    height: 0.42rem !important;
    background: rgba(15, 23, 42, 0.28) !important;
    box-shadow: none !important;
}

/* Keep homepage stat text crisp in the light theme.
   The page loads Plus Jakarta Sans up to 800, so avoid synthetic 900 rendering. */
.hero-stat p:first-child,
.hero-stat p:last-child,
.hero-track + p,
.hero-track + p span {
    text-shadow: none !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: geometricPrecision;
}

.hero-stat p:first-child {
    font-weight: 400 !important;
    letter-spacing: 0 !important;
}

.hero-stat p:last-child,
.hero-track + p span {
    font-weight: 400 !important;
    letter-spacing: 0 !important;
}

/* Keep compact uppercase UI labels with level numbers and short badges visually even.
   Plus Jakarta's small numerals can look optically undersized next to caps at tight sizes. */
.hero-stat p:first-child,
.hero-stat p:last-child,
.mastery-link-grid h4,
.mission-card__badge,
.roadmap-stage__step,
.level-switcher + div > .relative > span,
.level-tab,
.mobile-level-toggle button,
.mobile-next-card__badge,
.word-feature__eyebrow,
.word-strip.word-strip--featured .word-strip__label,
.footer-link-pill,
.edu-pill,
.edu-section-label,
.lesson-mini-label,
.site-ad-label,
.header-unit-type {
    font-family: 'Segoe UI', 'Arial', 'Plus Jakarta Sans', 'Noto Sans JP', 'Hiragino Sans', 'Yu Gothic UI', 'Meiryo', system-ui, -apple-system, BlinkMacSystemFont, sans-serif !important;
    font-variant-numeric: lining-nums proportional-nums;
    font-feature-settings: "lnum" 1, "pnum" 1, "kern" 1, "case" 1, "calt" 1;
    font-synthesis: none !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.word-strip.word-strip--featured .word-strip__hear {
    align-self: center !important;
    flex: 0 0 auto !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #FEE2E2 !important;
    border-color: rgba(239, 68, 68, 0.26) !important;
    color: #047857 !important;
    box-shadow: none !important;
    line-height: 1 !important;
    padding: 0 !important;
}

.word-strip.word-strip--featured .word-strip__hear .audio-icon-btn__svg {
    display: block !important;
    margin: 0 !important;
    transform: translateX(0.5px) !important;
}

/* Light roadmap readability fixes. */
.roadmap-stage__node {
    background: linear-gradient(145deg, #FFFFFF, #F1F5F9) !important;
    color: #0F172A !important;
    border: 0 !important;
    box-shadow:
        inset 0 -0.35rem 0 rgba(15, 23, 42, 0.08),
        0 0 0 0.44rem rgba(71, 85, 105, 0.88),
        0 14px 26px rgba(15, 23, 42, 0.20) !important;
}

.roadmap-stage__icon {
    color: #0F172A !important;
    opacity: 1 !important;
    text-shadow: none !important;
}

.roadmap-stage--amber .roadmap-stage__node {
    background: linear-gradient(145deg, #FEF3C7, #FFFFFF) !important;
}

.roadmap-stage--cyan .roadmap-stage__node {
    background: linear-gradient(145deg, #E0F2FE, #FFFFFF) !important;
}

.roadmap-stage--emerald .roadmap-stage__node {
    background: linear-gradient(145deg, #DCFCE7, #FFFFFF) !important;
}

.roadmap-stage--violet .roadmap-stage__node {
    background: linear-gradient(145deg, #EDE9FE, #FFFFFF) !important;
}

.roadmap-stage--rose .roadmap-stage__node {
    background: linear-gradient(145deg, #FFE4E6, #FFFFFF) !important;
}

.roadmap-stage__action {
    color: #0F172A !important;
    background: transparent !important;
    text-decoration: none !important;
    box-shadow: none !important;
}

.roadmap-stage__action::before,
.roadmap-stage__action::after {
    display: none !important;
}

/* Keep the START callout above the roadmap circle ring. */
.roadmap-stage__node-wrap {
    overflow: visible !important;
    isolation: isolate;
}

.roadmap-stage__start {
    top: -1.15rem !important;
    z-index: 30 !important;
    background: #DCFCE7 !important;
    border-color: rgba(34, 197, 94, 0.42) !important;
    color: #047857 !important;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.14) !important;
}

.roadmap-stage__start::after {
    z-index: -1 !important;
    background: #DCFCE7 !important;
    border-color: rgba(34, 197, 94, 0.42) !important;
}

.roadmap-stage__node {
    z-index: 2 !important;
}

/* Footer contrast guard: keep highlighted footer links readable on the light theme. */
.mastery-section .mastery-link-grid a,
.mastery-section .mastery-link-grid a.text-red-400,
.mastery-section .mastery-link-grid a.text-indigo-400,
.mastery-section .mastery-footer-block a:not(.logo-glow):not(.logo-amber):not(.logo-shimmer) {
    color: #047857 !important;
    opacity: 1 !important;
    text-shadow: none !important;
}

.mastery-section .mastery-link-grid a:hover,
.mastery-section .mastery-link-grid a.text-red-400:hover,
.mastery-section .mastery-link-grid a.text-indigo-400:hover,
.mastery-section .mastery-footer-block a:not(.logo-glow):not(.logo-amber):not(.logo-shimmer):hover {
    color: #0F172A !important;
}

.mastery-section .mastery-link-grid a.text-red-400::before,
.mastery-section .mastery-link-grid a.text-indigo-400::before {
    display: none !important;
}

@media (max-width: 767px) {
    .mastery-section .mastery-header p,
    .mastery-section .mastery-stat-row > div,
    .mastery-section .mastery-link-grid h4,
    .mastery-section .mastery-link-grid a,
    .mastery-section .mastery-footer-block a:not(.logo-glow):not(.logo-amber):not(.logo-shimmer),
    .mastery-section .mastery-footer-block p {
        font-family: 'Plus Jakarta Sans', 'Noto Sans JP', 'Hiragino Sans', 'Yu Gothic UI', 'Meiryo', 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif !important;
        font-variant-numeric: normal !important;
        font-feature-settings: "kern" 1, "liga" 1, "calt" 1 !important;
        font-kerning: normal !important;
        text-rendering: optimizeLegibility;
    }

    .mastery-section .mastery-stat-row > div {
        letter-spacing: 0 !important;
        word-spacing: 0 !important;
        font-weight: 400 !important;
    }

    .mastery-section .mastery-link-grid h4 {
        letter-spacing: 0 !important;
    }

    .mastery-section .mastery-link-grid a {
        letter-spacing: 0 !important;
        word-spacing: 0 !important;
    }

    .mastery-section .mastery-header p,
    .mastery-section .mastery-footer-block .space-y-4 > p {
        letter-spacing: 0 !important;
    }

    .mastery-section .mastery-footer-block > p:last-child,
    .mastery-section .mastery-footer-block > .flex.gap-8 {
        letter-spacing: 0 !important;
    }

    .word-strip.word-strip--featured {
        margin-top: 1.35rem !important;
        margin-bottom: 1.8rem !important;
        padding: 0.9rem !important;
    }

    .word-strip.word-strip--featured .word-strip__inner {
        flex-wrap: wrap !important;
        justify-content: flex-start !important;
        gap: 0.75rem !important;
    }

    .word-strip.word-strip--featured .word-strip__content {
        flex: 1 1 100% !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        align-items: flex-start !important;
        min-height: 0 !important;
    }

    .word-strip.word-strip--featured .word-strip__divider {
        display: none !important;
    }

    .word-strip.word-strip--featured .word-strip__jp,
    .word-strip.word-strip--featured .word-strip__romaji,
    .word-strip.word-strip--featured .word-strip__en {
        white-space: normal !important;
    }
}

/* ── Homepage Hero Badges Contrast & Quality Fixes ── */
.badge-base.bg-amber-500\/10 {
    background: rgba(251, 191, 36, 0.12) !important;
    border: 1px solid rgba(245, 158, 11, 0.3) !important;
    color: #9A3412 !important;
}

.badge-base.bg-white\/5 {
    background: rgba(15, 23, 42, 0.04) !important;
    border: 1px solid rgba(15, 23, 42, 0.1) !important;
    color: #334155 !important;
}

.badge-base.bg-emerald-500\/10 {
    background: rgba(16, 185, 129, 0.1) !important;
    border: 1px solid rgba(16, 185, 129, 0.28) !important;
    color: #166534 !important;
}

/* Make pattern box examples smaller and more elegant */
.lesson-pattern-card p.font-japanese {
    font-size: 1.05rem !important;
    line-height: 1.6 !important;
}
@media (min-width: 768px) {
    .lesson-pattern-card p.font-japanese {
        font-size: 1.18rem !important;
    }
}

/* Fix More Articles related links contrast in blog pages */
main.container > section a[href*=".html"] {
    background: rgba(15, 23, 42, 0.03) !important;
    border: 1px solid rgba(15, 23, 42, 0.08) !important;
    color: #0F172A !important;
    transition: all 0.2s ease-in-out !important;
}

main.container > section a[href*=".html"]:hover {
    background: rgba(15, 23, 42, 0.06) !important;
    color: #2563EB !important;
    border-color: rgba(37, 99, 235, 0.25) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.03) !important;
}

/* Fix unmapped neon colors in light theme to have high contrast (black/dark slate) */
.text-teal-200,
.text-teal-300,
.text-teal-300\/80,
.text-teal-400,
.text-teal-500,
.text-teal-600,
.text-cyan-200,
.text-cyan-300,
.text-cyan-300\/80,
.text-cyan-400,
.text-cyan-500,
.text-cyan-600 {
    color: #115E59 !important; /* Deep, beautiful, dark teal-green (extremely high contrast) */
}

.text-indigo-200,
.text-indigo-300,
.text-indigo-300\/80,
.text-indigo-400,
.text-indigo-500,
.text-indigo-600,
.text-violet-200,
.text-violet-300,
.text-violet-300\/80,
.text-violet-400,
.text-violet-500,
.text-violet-600,
.text-purple-200,
.text-purple-300,
.text-purple-300\/80,
.text-purple-400,
.text-purple-500,
.text-purple-600,
.text-blue-200,
.text-blue-300,
.text-blue-300\/80,
.text-blue-400,
.text-blue-500,
.text-blue-600 {
    color: #1E3A8A !important; /* Deep, beautiful, dark indigo-blue (extremely high contrast) */
}

/* Fix red duration badges visibility and style in light theme */
.bg-red-400\/10,
.border-red-400\/20,
.text-red-100 {
    background: rgba(239, 68, 68, 0.08) !important;
    border: 1px solid rgba(239, 68, 68, 0.22) !important;
    color: #9F1239 !important;
}

/* Ensure perfect contrast and premium style for all Start Practice / btn-glow buttons */
.btn-glow,
a.btn-glow,
.btn-glow *,
a.btn-glow * {
    color: #FFFFFF !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.12) !important;
}

.btn-glow,
a.btn-glow {
    background: linear-gradient(135deg, #16A34A 0%, #15803D 100%) !important;
    border: 1px solid rgba(22, 163, 74, 0.3) !important;
    box-shadow: 0 8px 24px rgba(22, 163, 74, 0.2) !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.btn-glow:hover,
a.btn-glow:hover {
    background: linear-gradient(135deg, #15803D 0%, #166534 100%) !important;
    transform: translateY(-1.5px) !important;
    box-shadow: 0 12px 32px rgba(22, 163, 74, 0.35) !important;
}

/* Keep lesson "Start Practice" CTA text white even under global light-theme text remaps */
.lesson-pattern-hero .btn-glow,
.lesson-pattern-hero a[href="#practice-section"],
.lesson-pattern-hero .btn-glow *,
.lesson-pattern-hero a[href="#practice-section"] * {
    color: #FFFFFF !important;
    -webkit-text-fill-color: #FFFFFF !important;
}

@media (max-width: 420px) {
    .badge-base,
    .mission-card__badge,
    .roadmap-stage__step,
    .level-switcher + div > .relative > span,
    .word-feature__eyebrow,
    .mastery-link-grid h4,
    .footer-link-pill,
    .edu-pill,
    .edu-section-label,
    .lesson-mini-label,
    .site-ad-label,
    .word-strip.word-strip--featured .word-strip__label {
        letter-spacing: 0 !important;
    }

    .word-feature__eyebrow,
    .edu-section-label,
    .word-strip.word-strip--featured .word-strip__label {
        font-size: 0.72rem !important;
    }
}

@media (max-width: 414px) {
    .mastery-section .mastery-stat-row {
        gap: 0.7rem !important;
    }

    .mastery-section .mastery-stat-row > div,
    .mastery-section .mastery-stat-row > div span,
    .mastery-section .mastery-link-grid h4,
    .mastery-section .mastery-link-grid a,
    .mastery-section .mastery-footer-block a:not(.logo-glow):not(.logo-amber):not(.logo-shimmer),
    .mastery-section .mastery-footer-block p {
        font-family: 'Plus Jakarta Sans', 'Noto Sans JP', 'Hiragino Sans', 'Yu Gothic UI', 'Meiryo', 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif !important;
        font-feature-settings: normal !important;
        font-variant-numeric: normal !important;
        font-kerning: normal !important;
        word-spacing: 0 !important;
    }

    .mastery-section .mastery-stat-row > div,
    .mastery-section .mastery-stat-row > div span,
    .mastery-section .mastery-link-grid h4,
    .mastery-section .mastery-link-grid a {
        letter-spacing: 0 !important;
    }

    .mastery-section .mastery-link-grid h4 {
        font-size: 0.78rem !important;
    }

    .mastery-section .mastery-link-grid ul {
        gap: 0.65rem !important;
    }

    .mastery-section .mastery-footer-block .space-y-4 > p,
    .mastery-section .mastery-footer-block > .flex.gap-8,
    .mastery-section .mastery-footer-block > p:last-child {
        letter-spacing: 0 !important;
    }
}

.hero-stat,
.hero-stat p,
.hero-stat p:first-child,
.hero-stat p:last-child,
.hero-stat span {
    font-family: 'Segoe UI', 'Plus Jakarta Sans', 'Noto Sans JP', 'Hiragino Sans', 'Yu Gothic UI', 'Meiryo', system-ui, -apple-system, BlinkMacSystemFont, sans-serif !important;
    font-weight: 400 !important;
    font-synthesis: none !important;
    font-variation-settings: normal !important;
    font-feature-settings: "lnum" 1, "kern" 1 !important;
    font-variant-numeric: lining-nums !important;
    letter-spacing: 0 !important;
    word-spacing: 0 !important;
    text-shadow: none !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.mastery-section .mastery-stat-row > div,
.mastery-section .mastery-stat-row > div span,
.mastery-section .mastery-link-grid h4,
.mastery-section .mastery-link-grid a,
.mastery-section .mastery-link-grid a.text-red-400,
.mastery-section .mastery-link-grid a.text-indigo-400,
.mastery-section .mastery-footer-block .flex.gap-8,
.mastery-section .mastery-footer-block .flex.gap-8 a {
    font-family: 'Segoe UI', 'Plus Jakarta Sans', 'Noto Sans JP', 'Hiragino Sans', 'Yu Gothic UI', 'Meiryo', system-ui, -apple-system, BlinkMacSystemFont, sans-serif !important;
    font-weight: 400 !important;
    font-synthesis: none !important;
    font-variant-numeric: lining-nums !important;
    font-feature-settings: "lnum" 1, "kern" 1 !important;
    letter-spacing: 0 !important;
    word-spacing: 0 !important;
    text-shadow: none !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Consistent ad frame styling across banner and display units. */
.site-ad-slot,
.site-ad-slot--display,
#adsense-banner,
.adsense-banner {
    padding: 0.28rem !important;
    border: 1px solid rgba(15, 23, 42, 0.14) !important;
    border-radius: 0.85rem !important;
    background: rgba(255, 255, 255, 0.88) !important;
    box-shadow: 0 10px 24px rgba(2, 6, 23, 0.12) !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

.site-ad-slot {
    width: fit-content;
    max-width: calc(100vw - 2rem);
}

.site-ad-frame,
.site-ad-frame--display,
#adsense-banner iframe[src*="ads-300x250.html"],
#adsense-banner .adsbygoogle,
.adsense-banner iframe[src*="ads-300x250.html"],
.adsense-banner .adsbygoogle {
    border: 0 !important;
    border-radius: 0.58rem !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: hidden !important;
}

.site-ad-frame {
    width: 320px !important;
    max-width: 100% !important;
    height: 50px !important;
}

.site-ad-frame--display,
#adsense-banner iframe[src*="ads-300x250.html"],
.adsense-banner iframe[src*="ads-300x250.html"] {
    width: 300px !important;
    max-width: calc(100vw - 2rem) !important;
    height: 250px !important;
}

/* PWA install prompt */
.pwa-install-popup {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 10000;
    width: min(92vw, 380px);
    opacity: 0;
    transform: translateY(18px);
    pointer-events: none;
    transition: opacity 0.24s ease, transform 0.24s ease;
}

.pwa-install-popup.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.pwa-install-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.85rem;
    align-items: center;
    padding: 0.9rem;
    border: 1px solid var(--soft-border, rgba(15, 23, 42, 0.10));
    border-radius: 1.25rem;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--soft-shadow, 0 18px 55px rgba(15, 23, 42, 0.09));
    color: var(--soft-text, #0F172A);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.pwa-install-icon {
    width: 2.65rem;
    height: 2.65rem;
    display: grid;
    place-items: center;
    border-radius: 1rem;
    border: 1px solid rgba(34, 197, 94, 0.22);
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.16), rgba(245, 158, 11, 0.16));
    font-size: 1.25rem;
}

.pwa-install-copy {
    min-width: 0;
}

.pwa-install-title,
.pwa-install-text {
    margin: 0;
}

.pwa-install-title {
    font-size: 0.98rem;
    line-height: 1.25;
    font-weight: 900;
    color: var(--soft-text, #0F172A);
}

.pwa-install-text {
    margin-top: 0.2rem;
    color: var(--soft-muted, #475569);
    font-size: 0.82rem;
    line-height: 1.45;
    font-weight: 700;
}

.pwa-install-actions {
    grid-column: 1 / -1;
    display: flex;
    gap: 0.55rem;
    justify-content: flex-end;
}

.pwa-install-primary,
.pwa-install-secondary {
    min-height: 2.35rem;
    padding: 0 0.9rem;
    border-radius: 0.9rem;
    font-weight: 900;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.pwa-install-primary {
    border: 0;
    color: #fff;
    background: linear-gradient(135deg, #22C55E, #F59E0B, #EF4444);
    box-shadow: 0 10px 26px rgba(34, 197, 94, 0.18);
}

.pwa-install-secondary {
    border: 1px solid var(--soft-border, rgba(15, 23, 42, 0.10));
    color: var(--soft-text, #0F172A);
    background: rgba(255, 255, 255, 0.8);
}

.pwa-install-primary:hover,
.pwa-install-secondary:hover {
    transform: translateY(-1px);
    box-shadow: var(--soft-shadow-small, 0 10px 28px rgba(15, 23, 42, 0.07));
}

@media (max-width: 520px) {
    .pwa-install-popup {
        left: 0.75rem;
        right: 0.75rem;
        bottom: 0.75rem;
        width: auto;
    }
}
