/**
 * Global Stylesheet - idioms.toolsyte.com
 * Pixel-Accurate Implementation of Approved 3D Visual Specification
 * New Interaction Model: Tap mascot -> Reveal modal -> Read/Interact -> Close -> Tap again
 */

/* ==========================================================================
   1. Design Tokens & Variables
   ========================================================================== */
:root {
    /* Color Palette */
    --color-bg-base: #fcfbf8;
    --color-bg-warm: #f8f5ee;
    --color-bg-surface: #ffffff;
    --color-bg-subtle: #f3efe6;

    --color-text-main: #0c1524;
    --color-text-secondary: #475569;
    --color-text-muted: #64748b;
    --color-text-light: #94a3b8;

    --color-accent: #2563eb;
    --color-accent-hover: #1d4ed8;
    --color-accent-soft: #eff6ff;
    --color-accent-border: #dbeafe;

    --color-amber: #b45309;
    --color-amber-bg: rgba(254, 243, 199, 0.75);
    --color-amber-border: rgba(245, 158, 11, 0.35);

    --color-border-subtle: #eae4d8;
    --color-border-medium: #e2e8f0;
    --color-border-hairline: rgba(255, 255, 255, 0.9);

    /* Typography */
    --font-family-base: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    
    /* Radii */
    --radius-sm: 0.5rem;
    --radius-md: 0.875rem;
    --radius-lg: 1.25rem;
    --radius-xl: 2.25rem;
    --radius-full: 9999px;

    /* Depth Shadows */
    --shadow-card-3d: 0 32px 72px -16px rgba(12, 21, 36, 0.11), 0 12px 28px -6px rgba(37, 99, 235, 0.05), inset 0 1px 0 rgba(255,255,255,0.95), inset 0 -1px 0 rgba(12,21,36,0.03);
    --shadow-pill: 0 2px 8px rgba(12, 21, 36, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    --shadow-active-pill: 0 6px 18px rgba(37, 99, 235, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.35);
    --shadow-pedestal: 0 16px 36px rgba(12, 21, 36, 0.12), 0 0 30px rgba(245, 158, 11, 0.2);

    /* Transitions */
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-bounce: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ==========================================================================
   2. Reset & Base HTML
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    scrollbar-gutter: stable;
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--color-bg-base);
    color: var(--color-text-main);
    font-family: var(--font-family-base);
    font-size: 1rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

body.modal-open {
    overflow: hidden;
}

img, svg {
    display: block;
    max-width: 100%;
    height: auto;
}

button {
    font-family: inherit;
    border: none;
    background: none;
    cursor: pointer;
    padding: 0;
}

a {
    color: var(--color-accent);
}

.skip-link {
    position: fixed;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 1000;
    padding: 0.65rem 0.9rem;
    border-radius: var(--radius-sm);
    background: var(--color-text-main);
    color: #ffffff;
    font-weight: 700;
    transform: translateY(-160%);
    transition: transform var(--transition-fast);
}

.skip-link:focus {
    transform: translateY(0);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.site-container {
    width: 100%;
    max-width: 1140px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.text-center {
    text-align: center;
}

.section-kicker {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 0.45rem;
}

.section-title {
    font-size: clamp(1.75rem, 3.5vw, 2.4rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    color: var(--color-text-main);
    margin: 0 0 0.5rem 0;
    line-height: 1.2;
}

.section-desc {
    font-size: 1.05rem;
    color: var(--color-text-secondary);
    max-width: 38rem;
    margin: 0 auto;
    line-height: 1.55;
}

/* ==========================================================================
   3. Hero: Mascot-Centered Interactive 3D Stage
   ========================================================================== */
.hero-section {
    position: relative;
    padding-top: 2.5rem;
    padding-bottom: 4.5rem;
    overflow-x: clip;
}

/* Ambient Stage Lighting & Arches */
.hero-stage-lighting {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.light-arch-bg {
    position: absolute;
    top: 5%;
    left: 50%;
    width: 720px;
    height: 540px;
    border-radius: 50% 50% 0 0;
    background: radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.85) 0%, rgba(248, 245, 238, 0.4) 60%, rgba(252, 251, 248, 0) 100%);
    filter: blur(25px);
    transform: translate(-50%, 0);
}

.light-radial-primary {
    position: absolute;
    top: 15%;
    left: 35%;
    width: 500px;
    height: 420px;
    background: radial-gradient(circle, rgba(219, 234, 254, 0.4) 0%, rgba(252, 251, 248, 0) 70%);
    filter: blur(40px);
}

.light-radial-warm {
    position: absolute;
    top: 20%;
    right: 25%;
    width: 520px;
    height: 420px;
    background: radial-gradient(circle, rgba(254, 243, 199, 0.35) 0%, rgba(252, 251, 248, 0) 70%);
    filter: blur(45px);
}

/* Floating 3D Props (Framing the mascot) */
.hero-scene-decor {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
}

.floating-prop {
    position: absolute;
    transition: transform 0.15s ease-out;
}

/* Replace clipped inline SVG shadows with a restrained alpha-following shadow. */
.hero-scene-decor .floating-prop svg {
    overflow: visible;
    filter: drop-shadow(0 3px 4px rgba(15, 23, 42, 0.12));
}

.hero-scene-decor .floating-prop svg g[filter] {
    filter: none;
}

.hero-scene-decor .prop-yellow-bulb svg {
    filter: drop-shadow(0 3px 5px rgba(180, 83, 9, 0.12));
}

.prop-quote-bubble {
    top: 10%;
    left: 8%;
    animation: floatDrift1 6.5s ease-in-out infinite;
}

.prop-blue-book {
    top: 36%;
    left: 7%;
    transform: scale(0.85);
    opacity: 0.85;
    animation: floatDrift2 7.5s ease-in-out infinite;
}

.prop-yellow-bulb {
    bottom: 18%;
    left: 12%;
    animation: floatDrift3 6s ease-in-out infinite;
}

.prop-purple-star {
    top: 14%;
    right: 9%;
    animation: floatDrift1 7s ease-in-out infinite;
}

.prop-pink-book {
    top: 40%;
    right: 8%;
    transform: scale(0.85);
    opacity: 0.85;
    animation: floatDrift2 6.8s ease-in-out infinite;
}

.sparkle-star {
    position: absolute;
    color: #fbbf24;
    font-size: 1.1rem;
    opacity: 0.75;
    animation: sparklePulse 3s ease-in-out infinite;
}

.sparkle-1 { top: 18%; left: 18%; animation-delay: 0s; }
.sparkle-2 { top: 12%; right: 22%; animation-delay: 1s; }
.sparkle-3 { top: 38%; right: 14%; animation-delay: 1.5s; }

.hero-container {
    position: relative;
    z-index: 2;
}

/* Header Text */
.hero-header-block {
    margin-bottom: 2.25rem;
}

.hero-title {
    font-size: clamp(2.4rem, 5.2vw, 3.75rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.1;
    color: var(--color-text-main);
    margin: 0 0 0.5rem 0;
}

.hero-subheading {
    font-size: 1.15rem;
    color: var(--color-text-secondary);
    font-weight: 500;
    margin: 0 0 1rem 0;
}

/* Discovery Counter (Gold Pill Badge) */
.discovery-tracker {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: var(--color-amber-bg);
    border: 1px solid var(--color-amber-border);
    padding: 0.35rem 0.95rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--color-amber);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.12);
}

/* Interactive Mascot Stage (Centered Hero Scene) */
.interactive-stage {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 580px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
}

.mascot-stage-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 10;
    width: 100%;
}

.mascot-platform-stage {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 400px;
}

/* 3D Pedestal Cylinder */
.pedestal-cylinder-base {
    position: absolute;
    bottom: 0.5rem;
    width: 340px;
    height: 58px;
    border-radius: 50%;
    background: radial-gradient(ellipse at 50% 30%, #fffbf0 0%, #faecd5 55%, #e8d7be 100%);
    border: 2px solid rgba(254, 243, 199, 0.95);
    box-shadow: var(--shadow-pedestal);
    z-index: 1;
    transition: transform 0.3s ease;
}

.pedestal-rim-glow {
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    box-shadow: 0 0 26px rgba(245, 158, 11, 0.35);
    pointer-events: none;
}

/* Contact Shadow Directly Below Shoes */
.shoes-contact-shadow {
    position: absolute;
    bottom: 0.95rem;
    width: 175px;
    height: 18px;
    border-radius: 50%;
    background: radial-gradient(ellipse at 50% 50%, rgba(12, 21, 36, 0.45) 0%, rgba(12, 21, 36, 0.15) 55%, transparent 75%);
    filter: blur(3.5px);
    z-index: 1;
    pointer-events: none;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.mascot-platform-stage.is-reacting .shoes-contact-shadow {
    animation: shadowContract 0.58s ease-out;
}

@keyframes shadowContract {
    0%, 100% { transform: scale(1); opacity: 1; }
    25% { transform: scale(0.82); opacity: 0.55; }
    65% { transform: scale(1.04); opacity: 1.05; }
}

.mascot-button {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 0;
    outline: none;
    transition: transform var(--transition-bounce);
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.mascot-button:focus-visible {
    outline: 3px solid var(--color-accent);
    outline-offset: 6px;
    border-radius: var(--radius-xl);
}

.mascot-button:hover .mascot-visual-wrap {
    transform: translateY(-3px) scale(1.012);
}

.mascot-button:active .mascot-visual-wrap {
    transform: translateY(2px) scale(0.98);
}

/* Mascot Click/Tap Spring Reaction */
.mascot-button.is-reacting .mascot-visual-wrap {
    animation: mascotReactionSpring 0.58s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes mascotReactionSpring {
    0% {
        transform: translateY(0) scale(1) rotate(0deg);
    }
    25% {
        transform: translateY(-8px) scale(1.03) rotate(1.8deg);
    }
    65% {
        transform: translateY(1.5px) scale(0.99) rotate(-0.5deg);
    }
    85% {
        transform: translateY(-0.75px) scale(1.004) rotate(0.2deg);
    }
    100% {
        transform: translateY(0) scale(1) rotate(0deg);
    }
}

.mascot-frame {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    position: relative;
}

/* Desktop Mascot Visual Scale */
.mascot-visual-wrap {
    width: 100%;
    max-width: 370px;
    aspect-ratio: 3 / 4;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--transition-bounce);
    animation: floatBreathing 4s ease-in-out infinite;
    filter: drop-shadow(0 12px 24px rgba(12, 21, 36, 0.12));
}

.mascot-graphic {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Hand Sparkle Reaction Burst Effect */
.hand-sparkle-burst {
    position: absolute;
    top: 24%;
    right: 4%;
    z-index: 15;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.4);
}

.hand-sparkle-burst.is-active {
    animation: sparkleBurst 0.42s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes sparkleBurst {
    0% {
        opacity: 0;
        transform: scale(0.2) rotate(-15deg);
    }
    35% {
        opacity: 1;
        transform: scale(1.25) rotate(10deg);
    }
    70% {
        opacity: 0.9;
        transform: scale(1.08) rotate(20deg);
    }
    100% {
        opacity: 0;
        transform: scale(0.5) translateY(-8px) rotate(30deg);
    }
}

.spark-main {
    color: #fbbf24;
    font-size: 1.75rem;
    line-height: 1;
    filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.85));
}

.spark-micro {
    position: absolute;
    top: -8px;
    right: -10px;
    font-size: 0.95rem;
}

/* Tap Cue Pill (Single Primary Action Cue) */
.tap-cue {
    position: absolute;
    bottom: -0.25rem;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: #ffffff;
    color: var(--color-text-main);
    border: 1px solid rgba(226, 232, 240, 0.9);
    padding: 0.45rem 1.15rem;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(12, 21, 36, 0.08), inset 0 1px 0 #fff;
    cursor: pointer;
    pointer-events: auto;
    animation: pulseCue 2.6s ease-in-out infinite;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.tap-cue:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(12, 21, 36, 0.12), inset 0 1px 0 #fff;
}

.tap-cue:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 3px;
}

.tap-icon {
    font-size: 0.95rem;
}

/* ==========================================================================
   4. Floating 3D Idiom Reveal Modal / Dialog
   ========================================================================== */
.idiom-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background-color: rgba(12, 21, 36, 0.36);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.28s ease;
}

.idiom-modal-backdrop.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* 3D Floating Idiom Modal Surface */
.idiom-modal-panel {
    background: linear-gradient(
        155deg,
        #ffffff 0%,
        #faf9f6 50%,
        #f5f3ed 100%
    );
    border-radius: 2rem;
    border: none;
    outline: none;
    padding: 0;
    width: min(580px, calc(100% - 2rem));
    max-height: min(620px, calc(100dvh - 3rem));
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow:
        0 24px 64px rgba(12, 21, 36, 0.14),
        0 6px 20px rgba(12, 21, 36, 0.05),
        0 0 50px rgba(219, 234, 254, 0.5);
    transform: translateY(8px) scale(0.98);
    opacity: 0;
    transition:
        transform 0.32s cubic-bezier(0.16, 1, 0.3, 1),
        opacity 0.32s ease;
    z-index: 2;
    overflow: hidden;
}

.idiom-modal-backdrop.is-open .idiom-modal-panel {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* Inner Top Surface Highlight Shimmer */
.idiom-modal-panel::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 35%;
    border-radius: 2rem 2rem 0 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.85) 0%, rgba(255,255,255,0) 100%);
    pointer-events: none;
    z-index: 0;
}

/* Modal Header (Stable Top Bar) */
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2rem 2.25rem 0.5rem 2.25rem;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.modal-meta-row {
    display: flex;
    align-items: center;
    margin: 0;
}

.modal-category-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-accent);
}

/* Close Button (Upper-Right) */
.modal-close-btn {
    width: 2.35rem;
    height: 2.35rem;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(226, 232, 240, 0.85);
    color: var(--color-text-secondary);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.15s ease, color 0.15s ease;
}

.modal-close-btn:hover {
    background: rgba(0, 0, 0, 0.08);
    color: var(--color-text-main);
    transform: scale(1.06);
}

.modal-close-btn:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* Modal Content Body (Scrolls vertically only when needed) */
.modal-content-body {
    flex: 1 1 auto;
    min-height: 0;
    padding: 0.25rem 2.25rem;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    z-index: 1;
    scrollbar-width: thin;
    scrollbar-color: rgba(37, 99, 235, 0.18) transparent;
}

.modal-content-body::-webkit-scrollbar {
    width: 5px;
}

.modal-content-body::-webkit-scrollbar-track {
    background: transparent;
}

.modal-content-body::-webkit-scrollbar-thumb {
    background-color: rgba(37, 99, 235, 0.18);
    border-radius: 9999px;
}

.modal-content-body::-webkit-scrollbar-thumb:hover {
    background-color: rgba(37, 99, 235, 0.35);
}

/* Dominant Idiom Title in Modal */
.modal-idiom-heading {
    font-size: clamp(2.1rem, 4.2vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.15;
    color: var(--color-text-main);
    margin: 0.25rem 0 1.25rem 0;
    word-break: break-word;
}

/* Editorial Sections */
.modal-section {
    margin-bottom: 1.15rem;
}

.section-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: 0.35rem;
}

.meaning-text {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--color-text-main);
    line-height: 1.55;
    margin: 0;
}

.example-text {
    font-size: 0.975rem;
    font-style: italic;
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin: 0;
    padding-left: 1rem;
    border-left: 2.5px solid rgba(37, 99, 235, 0.25);
}

/* Modal Action Bar (Stable Bottom Bar) */
.modal-action-bar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 1.15rem 2.25rem 1.85rem 2.25rem;
    border-top: 1px solid rgba(0, 0, 0, 0.04);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.utility-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

/* Action Pills */
.action-pill-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 1.15rem;
    border-radius: var(--radius-full);
    background: #ffffff;
    color: var(--color-text-secondary);
    border: 1px solid rgba(226, 232, 240, 0.9);
    font-size: 0.875rem;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(12, 21, 36, 0.04), 0 3px 8px rgba(12, 21, 36, 0.02), inset 0 1px 0 #ffffff;
    transition: all var(--transition-fast);
    cursor: pointer;
}
}

.action-pill-btn:hover {
    background-color: #ffffff;
    color: var(--color-text-main);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(12, 21, 36, 0.09), 0 1px 4px rgba(12, 21, 36, 0.04), inset 0 1px 0 rgba(255,255,255,1);
}

.action-pill-btn:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

.action-pill-btn:active {
    transform: translateY(1px) scale(0.97);
}

.action-pill-btn.is-active {
    background-color: #fee2e2;
    color: #ef4444;
    border-color: #fca5a5;
}

.action-pill-btn.is-active .action-icon {
    color: #ef4444;
}

/* Toast Feedback Notifications (Stacking above modal) */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}

.toast-message {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #0f172a;
    color: #ffffff;
    padding: 0.65rem 1.25rem;
    border-radius: var(--radius-full);
    border: 1px solid rgba(255, 255, 255, 0.14);
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(12, 21, 36, 0.25), 0 2px 6px rgba(12, 21, 36, 0.1);
    animation: toastPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: auto;
}

/* ==========================================================================
   5. Category Section
   ========================================================================== */
.categories-section {
    padding-top: 3.5rem;
    padding-bottom: 4rem;
}

.categories-section .section-header {
    margin-bottom: 2rem;
}

.category-pills-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.65rem;
    max-width: 920px;
    margin: 0 auto;
}

.category-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.65rem 1.35rem;
    border-radius: var(--radius-full);
    background-color: #ffffff;
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border-medium);
    font-size: 0.9375rem;
    font-weight: 600;
    box-shadow: var(--shadow-pill);
    transition: all var(--transition-fast);
}

.category-pill:hover {
    background-color: var(--color-bg-subtle);
    color: var(--color-text-main);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(12, 21, 36, 0.08);
}

.category-pill:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

.category-pill:active {
    transform: translateY(1px) scale(0.98);
}

.category-pill.is-active {
    background-color: var(--color-accent);
    color: #ffffff;
    border-color: var(--color-accent);
    box-shadow: var(--shadow-active-pill);
    font-weight: 700;
}

.category-pill.is-active .pill-icon {
    filter: brightness(1.2);
}

/* ==========================================================================
   6. Supporting Dual Feature Cards
   ========================================================================== */
.supporting-features-section {
    padding-top: 2rem;
    padding-bottom: 5rem;
}

.features-dual-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.feature-panel-card {
    background: #ffffff;
    border-radius: var(--radius-xl);
    border: 1px solid var(--color-border-medium);
    padding: 2.5rem;
    box-shadow: 0 12px 32px -6px rgba(12, 21, 36, 0.05), inset 0 1px 0 #ffffff;
    display: flex;
    flex-direction: column;
}

/* Why Card Layout */
.why-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1.75rem;
}

.why-visual-col {
    flex-shrink: 0;
}

.why-books-illustration {
    width: 140px;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.why-text-col {
    flex: 1;
}

.card-feature-title {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--color-text-main);
    margin: 0 0 0.75rem 0;
    line-height: 1.25;
}

.feature-p {
    font-size: 0.9375rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin: 0 0 0.5rem 0;
}

.feature-p:last-child {
    margin-bottom: 0;
}

/* How It Works Flow */
.how-card {
    justify-content: space-between;
}

.steps-flow-container {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.step-flow-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.step-badge-num {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: var(--radius-full);
    background: var(--color-accent);
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    box-shadow: 0 3px 8px rgba(37, 99, 235, 0.3);
}

.step-item-title {
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--color-text-main);
    margin: 0 0 0.35rem 0;
}

.step-item-desc {
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
    line-height: 1.5;
    margin: 0;
}

.step-connector-arrow {
    margin-top: 0.75rem;
    flex-shrink: 0;
}

/* ==========================================================================
   7. Editorial Homepage Sections
   ========================================================================== */
.editorial-section {
    padding: 5.5rem 0;
    scroll-margin-top: 5rem;
}

.editorial-section .section-header {
    margin-bottom: 2.75rem;
}

.editorial-narrow {
    max-width: 1040px;
}

.why-section,
.situations-section,
.faq-section {
    background: var(--color-bg-warm);
}

.editorial-points,
.featured-grid,
.situation-grid,
.benefit-grid {
    display: grid;
}

.three-column-points {
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
}

.editorial-points article {
    border-top: 2px solid var(--color-accent-border);
    padding-top: 1.4rem;
}

.point-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.6rem;
    height: 2.6rem;
    margin-bottom: 0.9rem;
    border-radius: 0.8rem;
    background: #ffffff;
    box-shadow: var(--shadow-pill);
}

.editorial-points h3,
.numbered-steps h3,
.idiom-preview h3,
.situation-grid h3,
.benefit-grid h3,
.faq-list h3 {
    margin: 0 0 0.45rem;
    color: var(--color-text-main);
    font-size: 1.05rem;
    line-height: 1.35;
}

.editorial-points p,
.numbered-steps p,
.idiom-preview p,
.situation-grid p,
.benefit-grid p,
.faq-list p,
.section-heading-split > p,
.faq-intro p {
    margin: 0;
    color: var(--color-text-secondary);
    line-height: 1.65;
}

.numbered-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: none;
}

.numbered-steps li {
    position: relative;
    display: flex;
    gap: 1rem;
    padding: 0 1.5rem;
}

.numbered-steps li:first-child {
    padding-left: 0;
}

.numbered-steps li:last-child {
    padding-right: 0;
}

.numbered-steps li + li {
    border-left: 1px solid var(--color-border-medium);
}

.numbered-steps .step-badge-num {
    flex: 0 0 2.25rem;
    margin: 0;
}

.featured-section {
    background: linear-gradient(180deg, #ffffff 0%, var(--color-bg-base) 100%);
}

.featured-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.idiom-preview {
    padding: 1.5rem;
    border: 1px solid var(--color-border-medium);
    border-radius: var(--radius-lg);
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(12, 21, 36, 0.04);
}

.idiom-preview > span {
    display: inline-block;
    margin-bottom: 0.65rem;
    color: var(--color-accent);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.idiom-preview h3 a {
    color: inherit;
    text-decoration-color: rgba(37, 99, 235, 0.35);
    text-decoration-thickness: 0.1em;
    text-underline-offset: 0.18em;
}

.idiom-preview h3 a:hover {
    color: var(--color-accent);
    text-decoration-color: currentColor;
}

.idiom-preview h3 a:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 3px;
    border-radius: 0.2rem;
}

.section-heading-split {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    gap: 3rem;
    align-items: end;
    margin-bottom: 2.75rem;
}

.section-heading-split .section-title {
    margin-bottom: 0;
}

.situation-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0 3rem;
}

.situation-grid article {
    display: grid;
    grid-template-columns: 2.7rem 1fr;
    gap: 1rem;
    padding: 1.5rem 0;
    border-top: 1px solid var(--color-border-subtle);
}

.situation-grid article > span {
    font-size: 1.35rem;
}

.benefits-section {
    background: #ffffff;
}

.benefit-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.benefit-grid article {
    padding: 1.35rem 1.35rem 0;
    border-top: 3px solid var(--color-accent-border);
}

.benefit-grid strong {
    display: block;
    margin-bottom: 0.65rem;
    color: var(--color-accent);
    font-size: 1.65rem;
    line-height: 1;
}

.faq-layout {
    display: grid;
    grid-template-columns: 0.7fr 1.3fr;
    gap: 5rem;
    align-items: start;
}

.faq-intro {
    position: sticky;
    top: 7rem;
}

.faq-list article {
    padding: 0 0 1.6rem;
    margin-bottom: 1.6rem;
    border-bottom: 1px solid var(--color-border-subtle);
}

.faq-list article:last-child {
    margin-bottom: 0;
}

.return-cta {
    padding: 4rem 0;
    background: var(--color-accent-soft);
}

.return-cta-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.return-cta h2 {
    margin: 0 0 0.35rem;
    font-size: clamp(1.55rem, 3vw, 2.1rem);
    line-height: 1.25;
}

.return-cta p {
    margin: 0;
    color: var(--color-text-secondary);
}

.primary-link-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-full);
    background: var(--color-accent);
    color: #ffffff;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22);
    transition: background var(--transition-fast), transform var(--transition-fast);
}

.primary-link-button:hover {
    background: var(--color-accent-hover);
    transform: translateY(-1px);
}

.primary-link-button:focus-visible {
    outline: 3px solid var(--color-text-main);
    outline-offset: 3px;
}

/* ==========================================================================
   8. Editorial and Legal Pages
   ========================================================================== */
.page-main {
    flex: 1;
}

.page-hero {
    padding: 4.5rem 0 3.75rem;
    background:
        radial-gradient(circle at 80% 10%, rgba(37, 99, 235, 0.09), transparent 28rem),
        linear-gradient(180deg, #ffffff 0%, var(--color-bg-warm) 100%);
    border-bottom: 1px solid var(--color-border-subtle);
}

.page-hero-inner {
    max-width: 850px;
}

.breadcrumb {
    margin-bottom: 1.25rem;
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

.breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.breadcrumb li + li::before {
    content: '/';
    margin-right: 0.45rem;
    color: var(--color-text-light);
}

.breadcrumb a {
    color: var(--color-text-secondary);
}

.page-title {
    margin: 0 0 1rem;
    font-size: clamp(2.35rem, 5vw, 4rem);
    line-height: 1.06;
    letter-spacing: -0.05em;
}

.page-lede {
    max-width: 730px;
    margin: 0;
    color: var(--color-text-secondary);
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    line-height: 1.7;
}

.last-updated {
    margin: 1.1rem 0 0;
    color: var(--color-text-muted);
    font-size: 0.875rem;
    font-weight: 600;
}

.page-content-wrap {
    padding-top: 4.5rem;
    padding-bottom: 6rem;
}

.reading-width {
    max-width: 800px;
}

.content-section + .content-section {
    margin-top: 3rem;
}

.content-section h2 {
    margin: 0 0 0.85rem;
    color: var(--color-text-main);
    font-size: clamp(1.35rem, 2.4vw, 1.75rem);
    letter-spacing: -0.025em;
    line-height: 1.3;
}

.content-section h3 {
    margin: 1.6rem 0 0.5rem;
    font-size: 1.05rem;
}

.content-section p,
.content-section li {
    color: var(--color-text-secondary);
    line-height: 1.8;
}

.content-section p {
    margin: 0.7rem 0;
}

.content-section ul {
    padding-left: 1.25rem;
}

.content-section a,
.contact-panel a {
    font-weight: 600;
    text-underline-offset: 0.18em;
}

.content-callout {
    margin: 2.5rem 0;
    padding: 1.5rem 1.65rem;
    border-left: 4px solid var(--color-accent);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    background: var(--color-accent-soft);
}

.content-callout p {
    margin: 0;
}

.fact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: 2rem 0;
}

.fact-grid article,
.contact-panel {
    padding: 1.5rem;
    border: 1px solid var(--color-border-medium);
    border-radius: var(--radius-lg);
    background: #ffffff;
}

.fact-grid h2,
.fact-grid h3,
.contact-panel h2 {
    margin-top: 0;
}

.contact-panel {
    margin-top: 2.5rem;
    background: var(--color-bg-warm);
}

.contact-email {
    display: inline-block;
    margin: 0.15rem 0 0.65rem;
    color: var(--color-accent);
    font-size: clamp(1.2rem, 3vw, 1.55rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    overflow-wrap: anywhere;
    text-underline-offset: 0.2em;
}

/* Legal directory landing page */
.legal-index-wrap {
    max-width: 1120px;
}

.legal-card-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 1.25rem;
}

.legal-card {
    grid-column: span 2;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 1.6rem;
    border: 1px solid var(--color-border-medium);
    border-radius: var(--radius-lg);
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(12, 21, 36, 0.055);
}

.legal-card:nth-child(4) {
    grid-column: 2 / span 2;
}

.legal-card:nth-child(5) {
    grid-column: 4 / span 2;
}

.legal-card h2 {
    margin: 0 0 0.7rem;
    color: var(--color-text-main);
    font-size: 1.2rem;
    letter-spacing: -0.02em;
    line-height: 1.35;
}

.legal-card p {
    margin: 0 0 1.25rem;
    color: var(--color-text-secondary);
    line-height: 1.7;
}

.legal-card-link {
    align-items: center;
    align-self: flex-start;
    display: inline-flex;
    margin-top: auto;
    min-height: 44px;
    padding: 0.35rem 0;
    color: var(--color-accent);
    font-weight: 700;
    text-underline-offset: 0.2em;
}

.legal-card-link:focus-visible {
    outline: 3px solid var(--color-accent);
    outline-offset: 4px;
    border-radius: 0.2rem;
}

.legal-contact-note {
    margin: 2rem 0 0;
    color: var(--color-text-secondary);
    text-align: center;
    line-height: 1.7;
}

.legal-contact-note a {
    color: var(--color-accent);
    font-weight: 700;
    overflow-wrap: anywhere;
    text-underline-offset: 0.2em;
}

@media (max-width: 960px) {
    .legal-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .legal-card,
    .legal-card:nth-child(4),
    .legal-card:nth-child(5) {
        grid-column: auto;
    }
}

@media (max-width: 680px) {
    .legal-card-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .legal-card {
        padding: 1.4rem;
    }

    .legal-contact-note {
        text-align: left;
    }
}

/* ========================================================================== 
   9. Keyframe Animations
   ========================================================================== */
@keyframes floatBreathing {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-4px);
    }
}

@keyframes pulseCue {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-3px);
    }
}

@keyframes floatDrift1 {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-10px) rotate(3deg);
    }
}

@keyframes floatDrift2 {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-8px) scale(1.03);
    }
}

@keyframes floatDrift3 {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-12px) rotate(-3deg);
    }
}

@keyframes sparklePulse {
    0%, 100% {
        opacity: 0.3;
        transform: scale(0.85);
    }
    50% {
        opacity: 0.95;
        transform: scale(1.15);
    }
}

@keyframes toastPop {
    0% {
        opacity: 0;
        transform: translateY(12px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ==========================================================================
   10. Intentional Responsive Breakpoints
   ========================================================================== */

/* Tablet Breakpoint (<= 960px) */
@media (max-width: 960px) {
    .hero-section {
        padding-top: 2rem;
        padding-bottom: 3.5rem;
    }

    .mascot-visual-wrap {
        max-width: 280px;
    }

    .pedestal-cylinder-base {
        width: 260px;
        height: 48px;
    }

    .shoes-contact-shadow {
        width: 140px;
        bottom: 0.85rem;
    }

    .features-dual-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .floating-prop {
        opacity: 0.65;
    }

    /* Use a calmer three-object scene on tablet-sized layouts. */
    .prop-blue-book,
    .prop-pink-book {
        display: none;
    }

    .prop-quote-bubble {
        top: 28%;
        left: 4%;
    }

    .prop-quote-bubble svg {
        width: 56px;
        height: 56px;
    }

    .prop-purple-star {
        top: 30%;
        right: 5%;
    }

    .prop-purple-star svg {
        width: 44px;
        height: 44px;
    }

    .prop-yellow-bulb {
        left: 8%;
    }

    .prop-yellow-bulb svg {
        width: 48px;
        height: auto;
    }

    .sparkle-1 { top: 28%; left: 20%; }
    .sparkle-2 { top: 32%; right: 20%; }
    .sparkle-3 { top: 55%; right: 12%; }

    .numbered-steps,
    .benefit-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem 0;
    }

    .numbered-steps li:nth-child(3) {
        border-left: 0;
        padding-left: 0;
    }

    .benefit-grid article:nth-child(3) {
        padding-left: 1.35rem;
    }
}

/* Mobile Breakpoint (<= 680px) */
@media (max-width: 680px) {
    .hero-section {
        padding-top: 1rem;
        padding-bottom: 2rem;
        overflow-x: clip;
    }

    .hero-header-block {
        margin-bottom: 0.85rem;
    }

    .hero-title {
        font-size: clamp(1.85rem, 6.2vw, 2.35rem);
        line-height: 1.12;
        margin: 0 0 0.35rem 0;
        word-break: break-word;
    }

    .hero-subheading {
        font-size: 0.95rem;
        line-height: 1.4;
        margin: 0 0 0.65rem 0;
    }

    .discovery-tracker {
        padding: 0.28rem 0.8rem;
        font-size: 0.8rem;
    }

    /* Reduce heavy decor on mobile to eliminate clutter & horizontal overflow */
    .prop-blue-book,
    .prop-pink-book,
    .prop-yellow-bulb {
        display: none !important;
    }

    .prop-quote-bubble {
        top: 42%;
        left: 1%;
        opacity: 0.72;
    }

    .prop-quote-bubble svg {
        width: 44px;
        height: 44px;
    }

    .prop-purple-star {
        top: 45%;
        right: 2%;
        opacity: 0.68;
    }

    .prop-purple-star svg {
        width: 36px;
        height: 36px;
    }

    .sparkle-star {
        font-size: 0.85rem;
        opacity: 0.6;
    }

    .sparkle-1 { top: 36%; left: 23%; }
    .sparkle-2 { top: 52%; right: 21%; }
    .sparkle-3 { top: 72%; right: 14%; }

    /* Mobile Hero Spacing Tightening */
    .hero-section {
        padding-top: 2rem;
        padding-bottom: 3.5rem;
    }

    .hero-kicker-stack {
        margin-bottom: 1rem;
    }

    /* Mascot scaled for mobile (+15.4% presence, 202px max-width) */
    .mascot-visual-wrap {
        max-width: 202px;
        aspect-ratio: 3 / 4;
    }

    .pedestal-cylinder-base {
        width: 215px;
        height: 38px;
        bottom: 0.35rem;
    }

    .shoes-contact-shadow {
        width: 115px;
        bottom: 0.65rem;
        height: 14px;
    }

    .tap-cue {
        bottom: -0.25rem;
        padding: 0.38rem 1rem;
        font-size: 0.84rem;
        gap: 0.35rem;
    }

    /* Floating Modal on Mobile */
    .idiom-modal-backdrop {
        padding: 0.75rem;
    }

    .idiom-modal-panel {
        width: min(440px, calc(100% - 1.5rem));
        max-height: calc(100dvh - 1.5rem);
        border-radius: 1.65rem;
    }

    .modal-header {
        padding: 1.35rem 1.35rem 0.25rem 1.35rem;
    }

    .modal-close-btn {
        width: 2.15rem;
        height: 2.15rem;
    }

    .modal-content-body {
        padding: 0.15rem 1.35rem;
    }

    .modal-idiom-heading {
        font-size: clamp(1.65rem, 6.2vw, 2.15rem);
        line-height: 1.15;
        margin: 0.15rem 0 1rem 0;
    }

    .modal-section {
        margin-bottom: 0.95rem;
    }

    .meaning-text {
        font-size: 0.975rem;
        line-height: 1.5;
    }

    .example-text {
        font-size: 0.9rem;
        line-height: 1.5;
        padding-left: 0.75rem;
        border-left-width: 2px;
    }

    .modal-action-bar {
        padding: 0.85rem 1.35rem 1.35rem 1.35rem;
        justify-content: center;
        width: 100%;
    }

    .utility-actions {
        display: flex;
        justify-content: space-between;
        gap: 0.4rem;
        width: 100%;
    }

    .action-pill-btn {
        flex: 1;
        justify-content: center;
        padding: 0.45rem 0.35rem;
        font-size: 0.82rem;
        gap: 0.25rem;
    }

    /* Sections Below */
    .categories-section {
        padding-top: 2rem;
        padding-bottom: 3rem;
    }

    .category-pills-wrap {
        gap: 0.45rem;
    }

    .category-pill {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }

    .supporting-features-section {
        padding-top: 1.5rem;
        padding-bottom: 3.5rem;
    }

    .editorial-section {
        padding: 4rem 0;
    }

    .three-column-points,
    .featured-grid,
    .situation-grid,
    .benefit-grid,
    .faq-layout,
    .section-heading-split,
    .fact-grid {
        grid-template-columns: 1fr;
    }

    .three-column-points,
    .featured-grid {
        gap: 1.25rem;
    }

    .numbered-steps {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .numbered-steps li,
    .numbered-steps li:first-child,
    .numbered-steps li:last-child,
    .numbered-steps li:nth-child(3) {
        padding: 1.25rem 0;
        border-left: 0;
        border-top: 1px solid var(--color-border-medium);
    }

    .numbered-steps li + li {
        border-left: 0;
    }

    .section-heading-split,
    .faq-layout {
        gap: 1.5rem;
    }

    .section-heading-split {
        margin-bottom: 1.5rem;
    }

    .faq-intro {
        position: static;
    }

    .return-cta-inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .page-hero {
        padding: 3rem 0 2.75rem;
    }

    .page-content-wrap {
        padding-top: 3.25rem;
        padding-bottom: 4.5rem;
    }

    .features-dual-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .feature-panel-card {
        padding: 1.65rem 1.35rem;
        border-radius: 1.5rem;
    }

    .why-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .steps-flow-container {
        flex-direction: column;
        gap: 1.25rem;
    }

    .step-connector-arrow {
        display: none;
    }

    .toast-container {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
    }

    .toast-message {
        width: 100%;
        justify-content: center;
    }
}

/* Give the centered mascot more presence when desktop width and height are available. */
@media (min-width: 992px) and (min-height: 601px) {
    .hero-section {
        padding-bottom: 2.5rem;
    }

    .mascot-platform-stage {
        max-width: 430px;
    }

    .mascot-visual-wrap {
        max-width: clamp(330px, calc(62.5vh - 50px), 430px);
    }

    .pedestal-cylinder-base {
        width: clamp(310px, calc(62.5vh - 90px), 390px);
    }

    .shoes-contact-shadow {
        width: clamp(170px, 26vh, 200px);
    }
}

/* Keep the larger desktop character balanced within medium-height laptop screens. */
@media (min-width: 992px) and (min-height: 601px) and (max-height: 820px) {
    .hero-section {
        padding-top: 0.75rem;
        padding-bottom: 1.5rem;
    }

    .interactive-stage {
        margin-top: -0.5rem;
    }

    .hero-header-block {
        margin-bottom: 0.35rem;
    }

    .hero-title {
        margin-bottom: 0.2rem;
        font-size: clamp(1.65rem, 5.5vh, 2.1rem);
    }

    .hero-subheading {
        margin-bottom: 0.35rem;
        font-size: 0.9rem;
        line-height: 1.3;
    }

    .discovery-tracker {
        padding: 0.2rem 0.75rem;
        font-size: 0.78rem;
    }
}

/* Keep the complete centered interaction legible only on genuinely short screens. */
@media (max-height: 600px) and (min-width: 481px) {
    .hero-section {
        padding-top: 0.75rem;
        padding-bottom: 1.5rem;
    }

    .hero-header-block {
        margin-bottom: 0.35rem;
    }

    .hero-title {
        margin-bottom: 0.2rem;
        font-size: clamp(1.65rem, 5.5vh, 2.1rem);
    }

    .hero-subheading {
        margin-bottom: 0.35rem;
        font-size: 0.9rem;
        line-height: 1.3;
    }

    .discovery-tracker {
        padding: 0.2rem 0.75rem;
        font-size: 0.78rem;
    }

    .mascot-visual-wrap {
        max-width: min(300px, 34vh);
    }

    .pedestal-cylinder-base {
        bottom: 0.3rem;
        width: min(260px, 36vh);
        height: clamp(1.5rem, 6vh, 2.5rem);
    }

    .shoes-contact-shadow {
        bottom: 0.55rem;
        width: min(120px, 18vh);
        height: 0.75rem;
    }

    .tap-cue {
        padding: 0.35rem 0.9rem;
        font-size: 0.8rem;
    }

    .prop-blue-book,
    .prop-pink-book,
    .prop-yellow-bulb {
        display: none;
    }

    .prop-quote-bubble,
    .prop-purple-star {
        opacity: 0.35;
    }
}

/* Extra Narrow Screen (<= 360px) */
@media (max-width: 360px) {
    .site-container {
        padding-left: 0.85rem;
        padding-right: 0.85rem;
    }

    .mascot-visual-wrap {
        max-width: 165px;
    }

    .pedestal-cylinder-base {
        width: 175px;
        height: 32px;
    }

    .shoes-contact-shadow {
        width: 95px;
    }

    .prop-purple-star {
        display: none;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .idiom-modal-panel {
        width: calc(100% - 0.75rem);
        border-radius: 1.35rem;
    }

    .modal-header {
        padding: 1.15rem 1rem 0.2rem 1rem;
    }

    .modal-content-body {
        padding: 0.1rem 1rem;
    }

    .modal-action-bar {
        padding: 0.75rem 1rem 1.15rem 1rem;
    }

    .modal-idiom-heading {
        font-size: 1.5rem;
    }

    .action-pill-btn {
        padding: 0.4rem 0.25rem;
        font-size: 0.76rem;
    }
}

/* ==========================================================================
   11. Accessibility & Reduced Motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .mascot-visual-wrap,
    .floating-prop,
    .tap-cue,
    .sparkle-star,
    .hand-sparkle-burst,
    .shoes-contact-shadow {
        animation: none !important;
    }

    .idiom-modal-backdrop,
    .idiom-modal-panel {
        transition: opacity 0.01ms !important;
        transform: none !important;
    }
}
