/* ========================================
   Phrasal Verbs Lab - Real Headlines
   Travel & Navigation Theme
   Â© Cool English 2026
   CLASSROOM EDITION - Bold & Engaging
   ======================================== */

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Slate palette */
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;
    
    /* Cyan theme - primary */
    --cyan-50: #ecfeff;
    --cyan-100: #cffafe;
    --cyan-200: #a5f3fc;
    --cyan-300: #67e8f9;
    --cyan-400: #22d3ee;
    --cyan-500: #06b6d4;
    --cyan-600: #0891b2;
    --cyan-700: #0e7490;
    
    /* Amber - highlight color */
    --amber-100: #fef3c7;
    --amber-200: #fde68a;
    --amber-300: #fcd34d;
    --amber-400: #fbbf24;
    --amber-500: #f59e0b;
    --amber-600: #d97706;
    
    /* Emerald - success/revealed */
    --emerald-300: #6ee7b7;
    --emerald-400: #34d399;
    --emerald-500: #10b981;
    --emerald-600: #059669;
    
    /* Rose - for accents */
    --rose-400: #fb7185;
    --rose-500: #f43f5e;
    --rose-600: #e11d48;
    
    /* Paper texture */
    --paper: #fefcf8;
    --paper-dark: #f8f4eb;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0,0,0,0.25);
}

html, body {
    height: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(180deg, var(--cyan-100) 0%, var(--cyan-50) 30%, var(--slate-100) 100%);
    background-attachment: fixed;
    color: var(--slate-800);
    overflow: hidden;
}

.app {
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/* ========================================
   Header
   ======================================== */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 2rem;
    background: linear-gradient(135deg, var(--cyan-600) 0%, var(--cyan-700) 100%);
    box-shadow: 0 4px 20px rgba(6, 182, 212, 0.3);
    position: relative;
    z-index: 10;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.25);
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: white;
    transform: translateX(-3px);
}

.logo {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.title-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.main-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: white;
}

.theme-badge {
    background: var(--amber-400);
    color: var(--slate-900);
    font-size: 0.875rem;
    font-weight: 800;
    padding: 0.375rem 1rem;
    border-radius: 2rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Reset Button */
.reset-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.9rem;
    border-radius: 2rem;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.25);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 700;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.reset-btn:hover {
    background: rgba(255, 255, 255, 0.28);
    border-color: rgba(255, 255, 255, 0.6);
    transform: scale(1.04);
}

.reset-btn:active {
    transform: scale(0.97);
}

/* Progress */
.progress-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.15);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.progress-dots {
    display: flex;
    gap: 0.375rem;
}

.progress-dot {
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.progress-dot:hover {
    transform: scale(1.2);
    background: rgba(255, 255, 255, 0.5);
}

.progress-dot.active {
    background: white;
    transform: scale(1.3);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.8);
}

.progress-dot.completed {
    background: var(--emerald-400);
}

.progress-count {
    font-size: 1.5rem;
    font-weight: 900;
    color: white;
}

/* ========================================
   Main Content
   ======================================== */
.main-content {
    flex: 1;
    padding: 1.25rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    z-index: 5;
}

/* ========================================
   Newspaper Card - Bold Modern Design
   ======================================== */
.newspaper-card {
    flex: 1;
    background: var(--paper);
    border-radius: 1.5rem;
    padding: 1.5rem 2.5rem;
    box-shadow: 
        var(--shadow-2xl),
        0 0 0 1px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/* Subtle paper texture */
.newspaper-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
}

/* Subtle map grid pattern in bottom half */
.newspaper-card::after {
    content: '';
    position: absolute;
    top: 55%;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(6, 182, 212, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(6, 182, 212, 0.03) 1px, transparent 1px),
        linear-gradient(rgba(6, 182, 212, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(6, 182, 212, 0.02) 1px, transparent 1px);
    background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px;
    mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.5) 50%, rgba(0,0,0,0.3) 100%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.5) 50%, rgba(0,0,0,0.3) 100%);
    pointer-events: none;
}

/* Decorative corner flourishes */
.newspaper-card .corner-flourish {
    position: absolute;
    width: 60px;
    height: 60px;
    opacity: 0.15;
    pointer-events: none;
}

.newspaper-card .corner-flourish.top-left {
    top: 10px;
    left: 10px;
    border-top: 3px solid var(--slate-400);
    border-left: 3px solid var(--slate-400);
}

.newspaper-card .corner-flourish.top-right {
    top: 10px;
    right: 10px;
    border-top: 3px solid var(--slate-400);
    border-right: 3px solid var(--slate-400);
}

.newspaper-card .corner-flourish.bottom-left {
    bottom: 10px;
    left: 10px;
    border-bottom: 3px solid var(--slate-400);
    border-left: 3px solid var(--slate-400);
}

.newspaper-card .corner-flourish.bottom-right {
    bottom: 10px;
    right: 10px;
    border-bottom: 3px solid var(--slate-400);
    border-right: 3px solid var(--slate-400);
}

/* ========================================
   Masthead - Clean & Simple
   ======================================== */
.newspaper-masthead {
    text-align: center;
    padding-bottom: 1.25rem;
    border-bottom: 4px solid var(--slate-800);
    margin-bottom: 2.5rem;
    position: relative;
    z-index: 2;
}

.masthead-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--slate-900);
    letter-spacing: 0.02em;
    line-height: 1;
    text-transform: uppercase;
}

/* ========================================
   Headline Section - CLASSROOM SIZED
   ======================================== */
.headline-section {
    text-align: center;
    position: relative;
    z-index: 2;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    flex: 1;
}

.headline-category {
    display: inline-block;
    background: var(--rose-500);
    color: white;
    font-size: 1.1rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    padding: 0.5rem 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 15px rgba(244, 63, 94, 0.4);
}

/* HUGE headline text for classroom visibility */
.headline-text {
    font-size: clamp(5.5rem, 7.2vw, 8rem);
    font-weight: 900;
    color: var(--slate-800);
    line-height: 1.05;
    max-width: 100%;
    text-wrap: balance;
}

/* ========================================
   Phrasal Verb Highlight - GLOWING BOX
   ======================================== */
.phrasal-verb-highlight {
    display: inline-block;
    background: linear-gradient(135deg, var(--amber-300) 0%, var(--amber-400) 100%);
    padding: 0.1em 0.4em;
    margin: 0 0.1em;
    border-radius: 0.25em;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 
        0 4px 15px rgba(251, 191, 36, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    position: relative;
}

.phrasal-verb-highlight:hover {
    background: linear-gradient(135deg, var(--amber-400) 0%, var(--amber-500) 100%);
    transform: scale(1.05);
    box-shadow: 
        0 8px 25px rgba(251, 191, 36, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.phrasal-verb-highlight.revealed {
    background: linear-gradient(135deg, var(--emerald-400) 0%, var(--emerald-500) 100%);
    color: var(--slate-900);
    box-shadow: 
        0 4px 15px rgba(16, 185, 129, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.phrasal-verb-highlight.revealed::before {
    display: none;
}

/* ========================================
   Reveal Area
   ======================================== */
.reveal-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
    position: relative;
    z-index: 2;
}

/* ========================================
   Reveal Prompt - Big & Inviting
   ======================================== */
.reveal-prompt {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    width: 100%;
}

.reveal-prompt.hidden {
    display: none;
}

.reveal-instruction {
    font-size: 2rem;
    font-weight: 600;
    color: var(--slate-600);
    text-align: center;
}

.reveal-btn {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    background: linear-gradient(135deg, var(--cyan-500) 0%, var(--cyan-600) 100%);
    color: white;
    padding: 1.75rem 5rem;
    border-radius: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 
        0 8px 30px rgba(6, 182, 212, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border: none;
    position: relative;
    overflow: hidden;
}

.reveal-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent 40%, rgba(255,255,255,0.2) 50%, transparent 60%);
    transform: translateX(-100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    100% { transform: translateX(100%); }
}

.reveal-btn:hover {
    transform: scale(1.05);
    box-shadow: 
        0 12px 40px rgba(6, 182, 212, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.reveal-btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.4);
}

.reveal-btn-icon svg {
    width: 32px;
    height: 32px;
}

.reveal-btn-text {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

/* ========================================
   Meaning Revealed - SIMPLIFIED LAYOUT
   ======================================== */
.meaning-revealed {
    display: none;
    width: 100%;
    animation: revealCard 0.5s ease;
}

.meaning-revealed.visible {
    display: block;
}

@keyframes revealCard {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* ========================================
   Synonym & Definition - BIG & Bold
   ======================================== */
.meaning-content {
    display: flex;
    gap: 2rem;
    width: 100%;
}

.synonym-box,
.definition-box {
    padding: 1.75rem 2rem;
    border-radius: 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 160px;
    position: relative;
}

.synonym-box {
    flex: 1;
    background: linear-gradient(135deg, var(--amber-400) 0%, var(--amber-500) 100%);
    color: white;
    box-shadow: 
        var(--shadow-xl),
        0 0 60px rgba(251, 191, 36, 0.35);
}

.definition-box {
    flex: 2;
    background: linear-gradient(135deg, var(--emerald-400) 0%, var(--emerald-500) 100%);
    color: white;
    box-shadow: 
        var(--shadow-xl),
        0 0 60px rgba(16, 185, 129, 0.35);
}

.meaning-label {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 0.75rem;
    opacity: 0.9;
}

.synonym-text {
    font-size: 5rem;
    font-weight: 900;
    line-height: 1;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.definition-text {
    font-size: 5rem;
    font-weight: 900;
    line-height: 1.05;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Audio Button - inside synonym box */
.audio-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.audio-btn:hover {
    background: rgba(255, 255, 255, 0.4);
    border-color: white;
    transform: scale(1.1);
}

.audio-btn.playing {
    animation: audioPulse 0.5s ease infinite;
}

@keyframes audioPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

/* ========================================
   Footer
   ======================================== */
.footer {
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.9);
    border-top: 2px solid var(--cyan-200);
    text-align: center;
    position: relative;
    z-index: 10;
}

.footer p {
    font-size: 0.875rem;
    color: var(--slate-500);
    font-weight: 600;
}

/* ========================================
   Bottom Navigation - Big & Easy to Tap
   ======================================== */
.bottom-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem 1rem;
    position: relative;
    z-index: 10;
}

.bottom-nav-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: white;
    color: var(--cyan-700);
    border: 3px solid var(--cyan-400);
    padding: 1rem 2.5rem;
    border-radius: 1rem;
    font-size: 1.5rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-lg);
}

.bottom-nav-btn:hover:not(:disabled) {
    background: var(--cyan-500);
    border-color: var(--cyan-500);
    color: white;
    transform: scale(1.05);
    box-shadow: 0 8px 30px rgba(6, 182, 212, 0.4);
}

.bottom-nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.bottom-nav-btn svg {
    flex-shrink: 0;
}

/* ========================================
   Responsive Design - CLASSROOM FIRST
   ======================================== */

/* Short viewports — 1280×800 / Nest Hub Max */
@media (max-height: 820px) and (min-width: 769px) {
    .main-content {
        padding: 0.5rem 1.5rem;
        gap: 0.375rem;
    }
    .newspaper-card {
        padding: 0.75rem 1.75rem;
    }
    .newspaper-masthead {
        padding-bottom: 0.5rem;
        margin-bottom: 0.75rem;
    }
    .masthead-title {
        font-size: 1.5rem;
    }
    .headline-category {
        font-size: 0.875rem;
        padding: 0.3rem 1.25rem;
    }
    .headline-text {
        font-size: 3rem;
        line-height: 1.1;
    }
    .reveal-area {
        padding: 0.5rem 0;
    }
    .reveal-instruction {
        font-size: 1.25rem;
    }
    .reveal-btn {
        padding: 0.875rem 2.5rem;
    }
    .reveal-btn-icon {
        width: 2.5rem;
        height: 2.5rem;
    }
    .reveal-btn-text {
        font-size: 1.25rem;
    }
    .meaning-content {
        gap: 1rem;
    }
    .synonym-box,
    .definition-box {
        padding: 0.75rem 1.25rem;
        min-height: 0;
    }
    .meaning-label {
        font-size: 0.875rem;
        margin-bottom: 0.2rem;
    }
    .synonym-text {
        font-size: 3rem;
    }
    .definition-text {
        font-size: 3rem;
    }
    .bottom-nav {
        padding: 0 1.5rem 0.4rem;
    }
    .bottom-nav-btn {
        padding: 0.5rem 1.5rem;
        font-size: 1rem;
    }
    .footer {
        padding: 0.2rem;
    }
}

@media (max-width: 1400px) {
    .headline-text {
        font-size: 5.5rem;
    }
    
    .synonym-text {
        font-size: 4.5rem;
    }
    
    .definition-text {
        font-size: 4.5rem;
    }
}

@media (max-width: 1200px) {
    .headline-text {
        font-size: 4.5rem;
    }
    
    .reveal-instruction {
        font-size: 1.75rem;
    }
    
    .reveal-btn {
        padding: 1.5rem 4rem;
    }
    
    .reveal-btn-icon {
        width: 3.5rem;
        height: 3.5rem;
    }
    
    .reveal-btn-icon svg {
        width: 28px;
        height: 28px;
    }
    
    .reveal-btn-text {
        font-size: 1.75rem;
    }
    
    .newspaper-masthead {
        margin-bottom: 2rem;
    }
    
    .headline-section {
        gap: 1.25rem;
    }
    
    .synonym-text {
        font-size: 4rem;
    }
    
    .definition-text {
        font-size: 4rem;
    }
    
    .meaning-content {
        gap: 1.5rem;
    }
    
    .synonym-box,
    .definition-box {
        padding: 1.75rem 2rem;
        min-height: 160px;
    }
    
    .meaning-label {
        font-size: 1.25rem;
    }
    
    .bottom-nav-btn {
        padding: 0.875rem 2rem;
        font-size: 1.25rem;
    }
}

@media (max-width: 1024px) {
    .main-content {
        padding: 1rem 1.5rem;
    }
    
    .newspaper-card {
        padding: 1.25rem 1.5rem;
    }
    
    .masthead-title {
        font-size: 2rem;
    }
    
    .newspaper-masthead {
        margin-bottom: 1.75rem;
    }
    
    .headline-section {
        gap: 0.5rem;
    }
    
    .reveal-instruction {
        font-size: 1.5rem;
    }
    
    .reveal-btn {
        padding: 1.25rem 3rem;
    }
    
    .reveal-btn-icon {
        width: 3rem;
        height: 3rem;
    }
    
    .reveal-btn-icon svg {
        width: 24px;
        height: 24px;
    }
    
    .reveal-btn-text {
        font-size: 1.5rem;
    }
    
    .headline-text {
        font-size: 3.25rem;
    }
    
    .reveal-area {
        padding: 1.5rem 0;
    }
    
    .meaning-content {
        gap: 1.25rem;
    }
    
    .synonym-box,
    .definition-box {
        padding: 1.5rem;
        min-height: 160px;
    }
    
    .synonym-text {
        font-size: 3.5rem;
    }
    
    .definition-text {
        font-size: 3.5rem;
    }
    
    .audio-btn {
        width: 3rem;
        height: 3rem;
        top: 0.75rem;
        right: 0.75rem;
    }
    
    .audio-btn svg {
        width: 18px;
        height: 18px;
    }
    
    .reveal-btn {
        padding: 1.5rem 3rem;
    }
    
    .reveal-btn-text {
        font-size: 1.5rem;
    }
    
    .bottom-nav {
        padding: 0 1.5rem 0.75rem;
    }
    
    .bottom-nav-btn {
        padding: 0.75rem 1.5rem;
        font-size: 1.125rem;
    }
    
    .bottom-nav-btn svg {
        width: 24px;
        height: 24px;
    }
    
    .corner-flourish {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 768px) {
    html, body { height: auto; overflow-y: auto; overflow-x: hidden; }
    .app { height: auto; min-height: 100vh; overflow: visible; }
    .header {
        padding: 0.5rem 1rem;
    }
    
    .logo {
        display: none;
    }
    
    .main-title {
        font-size: 1.5rem;
    }
    
    .theme-badge {
        display: none;
    }

    .reset-btn-label {
        display: none;
    }

    .reset-btn {
        padding: 0.5rem 0.6rem;
    }
    
    .progress-dots {
        display: none;
    }
    
    .main-content {
        padding: 0.75rem;
        gap: 0.75rem;
    }
    
    .newspaper-card {
        padding: 1rem;
        border-radius: 1rem;
    }
    
    .newspaper-masthead {
        padding-bottom: 0.5rem;
        margin-bottom: 1.25rem;
    }
    
    .masthead-title {
        font-size: 1.5rem;
    }
    
    .headline-section {
        gap: 0.5rem;
    }
    
    .headline-category {
        font-size: 0.875rem;
        padding: 0.375rem 1.25rem;
    }
    
    .headline-text {
        font-size: 2.25rem;
    }
    
    .reveal-instruction {
        font-size: 1.25rem;
    }
    
    .reveal-btn {
        padding: 1rem 2rem;
        gap: 0.75rem;
    }
    
    .reveal-btn-icon {
        width: 2.5rem;
        height: 2.5rem;
    }
    
    .reveal-btn-icon svg {
        width: 20px;
        height: 20px;
    }
    
    .reveal-btn-text {
        font-size: 1.25rem;
    }
    
    .reveal-area {
        padding: 1rem 0;
    }
    
    .reveal-btn-icon {
        width: 3rem;
        height: 3rem;
    }
    
    .reveal-btn-icon svg {
        width: 24px;
        height: 24px;
    }
    
    .reveal-btn-text {
        font-size: 1.25rem;
    }
    
    .reveal-btn-hint {
        font-size: 0.875rem;
    }
    
    .meaning-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .synonym-box,
    .definition-box {
        padding: 1.25rem 1rem;
        min-height: auto;
    }
    
    .meaning-label {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .synonym-text {
        font-size: 2.75rem;
    }
    
    .definition-text {
        font-size: 2.75rem;
    }
    
    .audio-btn {
        width: 2.5rem;
        height: 2.5rem;
        top: 0.5rem;
        right: 0.5rem;
    }
    
    .audio-btn svg {
        width: 16px;
        height: 16px;
    }
    
    .footer p {
        font-size: 0.75rem;
    }
    
    .bottom-nav {
        padding: 0 0.75rem 0.5rem;
    }
    
    .bottom-nav-btn {
        padding: 0.625rem 1.25rem;
        font-size: 1rem;
        border-width: 2px;
    }
    
    .bottom-nav-btn svg {
        width: 20px;
        height: 20px;
    }
    
    .corner-flourish {
        display: none;
    }
}

@media (max-width: 480px) {
    .back-btn {
        width: 2.25rem;
        height: 2.25rem;
    }
    
    .main-title {
        font-size: 1.25rem;
    }
    
    .progress-count {
        font-size: 1.25rem;
    }
    
    .newspaper-card {
        padding: 0.875rem;
    }
    
    .masthead-title {
        font-size: 1.25rem;
    }
    
    .reveal-instruction {
        font-size: 1.125rem;
    }
    
    .reveal-btn {
        padding: 0.875rem 1.75rem;
        gap: 0.625rem;
    }
    
    .reveal-btn-icon {
        width: 2.25rem;
        height: 2.25rem;
    }
    
    .reveal-btn-icon svg {
        width: 18px;
        height: 18px;
    }
    
    .reveal-btn-text {
        font-size: 1.125rem;
    }
    
    .headline-text {
        font-size: 1.75rem;
    }
    
    .synonym-text {
        font-size: 2rem;
    }
    
    .definition-text {
        font-size: 2rem;
    }
    
    .bottom-nav-btn span {
        display: none;
    }
    
    .bottom-nav-btn {
        padding: 0.75rem 1rem;
    }
}

/* ========================================
   V4 RESPONSIVE CLIP/SCROLL SAFETY PATCH
   Same principle as Definitions V4:
   shrink first, then scroll the real content area instead of clipping.
   This patch is intentionally last so it wins the cascade.
   ======================================== */
@media (min-width: 900px) {
    html,
    body,
    .app {
        height: 100dvh;
        overflow: hidden;
    }

    .main-content {
        min-height: 0;
        overflow: hidden;
    }

    .newspaper-card {
        min-height: 0;
        overflow-y: auto;
        overflow-x: hidden;
        scrollbar-gutter: stable;
        overscroll-behavior: contain;
    }

    .headline-section {
        min-height: 0;
        justify-content: flex-start;
    }

    .newspaper-masthead,
    .reveal-area,
    .meaning-content,
    .bottom-nav,
    .footer {
        flex-shrink: 0;
    }
}

/* Medium teacher-laptop/projector heights, including responsive test panes around 1058px tall. */
@media (min-width: 900px) and (max-height: 1100px) {
    .header {
        padding-top: clamp(0.45rem, 0.8vh, 0.75rem);
        padding-bottom: clamp(0.45rem, 0.8vh, 0.75rem);
    }

    .main-content {
        padding-top: clamp(0.45rem, 0.9vh, 1rem);
        padding-bottom: clamp(0.45rem, 0.9vh, 1rem);
        gap: clamp(0.4rem, 0.8vh, 0.8rem);
    }

    .newspaper-card {
        padding: clamp(0.8rem, 1.4vh, 1.25rem) clamp(1.25rem, 2.2vw, 2rem);
    }

    .newspaper-masthead {
        padding-bottom: clamp(0.35rem, 0.7vh, 0.6rem);
        margin-bottom: clamp(0.45rem, 0.9vh, 0.85rem);
    }

    .masthead-title {
        font-size: clamp(1.35rem, 2.4vh, 1.8rem);
    }

    .headline-text {
        font-size: clamp(2.5rem, 5.2vh, 4rem);
        line-height: 1.05;
    }

    .reveal-area {
        padding-top: clamp(0.35rem, 0.8vh, 0.7rem);
        padding-bottom: clamp(0.35rem, 0.8vh, 0.7rem);
    }

    .reveal-btn {
        padding-top: clamp(0.7rem, 1.2vh, 1.1rem);
        padding-bottom: clamp(0.7rem, 1.2vh, 1.1rem);
    }

    .meaning-content {
        gap: clamp(0.8rem, 1.5vw, 1.5rem);
    }

    .synonym-box,
    .definition-box {
        padding: clamp(0.7rem, 1.2vh, 1rem) clamp(1rem, 1.8vw, 1.5rem);
        min-height: 0;
    }

    .synonym-text,
    .definition-text {
        font-size: clamp(1.6rem, 3.5vh, 2.4rem);
        line-height: 1.15;
    }

    .bottom-nav {
        padding-bottom: clamp(0.35rem, 0.8vh, 0.75rem);
    }

    .footer {
        padding-top: clamp(0.2rem, 0.5vh, 0.4rem);
        padding-bottom: clamp(0.2rem, 0.5vh, 0.4rem);
    }
}

@media (min-width: 900px) and (max-height: 820px) {
    .headline-text {
        font-size: clamp(2rem, 5.3vh, 3rem);
    }

    .synonym-text,
    .definition-text {
        font-size: clamp(1.35rem, 3.7vh, 2rem);
    }
}

@media (min-width: 900px) and (max-height: 720px) {
    .newspaper-card {
        padding: 0.65rem 1.25rem;
    }

    .headline-text {
        font-size: 2rem;
    }

    .reveal-btn {
        padding: 0.65rem 1.75rem;
    }
}
