:root {
    --bg-desk: #4b6d59;
    
    /* Updated medium-opacity grey shadows */
    --hard-shadow: 8px 8px 0px rgba(0, 0, 0, 0.4);
    --hard-shadow-hover: 12px 12px 0px rgba(0, 0, 0, 0.3);
    
    /* Cartoon Colors */
    --color-tv: #95c7ff;
    --color-patreon: #ff914d;
    --color-twitch: #c195ff;
    --color-youtube: #ff6b6b;
    --color-insta: #ff9ee2;
    --color-tiktok: #4dedd3;
    --color-podcast: #3bb273;
    
    --font-cartoon: 'Wellfleet', sans-serif;
    --font-digital: 'Space Mono', monospace;
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    background-color: var(--bg-desk);
    background-image: radial-gradient(#c2b28c 2px, transparent 2px);
    background-size: 30px 30px;
    font-family: var(--font-cartoon);
    color: #111;
    margin: 0;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
    overscroll-behavior-x: contain;
    touch-action: manipulation;
}

/* --- THE GRID LAYOUT --- */
.desk-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1400px; /* Bumped up from 1200px */
    width: 100%;
    align-items: center;
    justify-items: center;
}

/* --- UNIVERSAL CUTOUT STYLING --- */
.cutout {
    border: none;
    box-shadow: var(--hard-shadow);
    border-radius: 12px;
    transition: all 0.2s ease-in-out;
    text-decoration: none;
    color: #111;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.cutout:hover {
    transform: translate(-4px, -4px) rotate(0deg) !important;
    box-shadow: var(--hard-shadow-hover);
    z-index: 50!important;
}

/* --- THE TV MONITOR (Skeuomorphic CRT) --- */
.tv-monitor {
    background-color: var(--color-tv);
    background-image: linear-gradient(145deg, rgba(255,255,255,0.4) 0%, rgba(0,0,0,0.1) 100%);
    padding: 1.5rem;
    border-radius: 24px 24px 30px 30px;
    grid-column: auto;
    width: 90%;
    max-width: none;
    /* Added 60px top margin to protect the antennae, and scaled down to 90% */
    margin: 60px auto 0 auto;
    transform: scale(0.9) rotate(-1deg);
    position: relative;
    box-shadow: 
        inset -6px -8px 15px rgba(0,0,0,0.2), 
        inset 6px 8px 15px rgba(255,255,255,0.6), 
        var(--hard-shadow);
}

.tv-monitor:hover {
    transform: scale(0.9) translate(-4px, -4px) rotate(-1deg) !important;
    z-index: 10;
}

/* --- THE ANTENNAS --- */
.tv-antennae {
    position: absolute;
    /* Locks the antennae flush to the top edge of the plastic shell */
    top: -65px; 
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 10px;
    z-index: -1;
}

.antenna-base {
    width: 40px;
    height: 15px;
    background: #444;
    border-radius: 10px 10px 0 0;
    box-shadow: inset 0px 4px 5px rgba(255,255,255,0.3), inset 0px -2px 3px rgba(0,0,0,0.5);
    margin: 0 -15px; /* Pulls the rods into the base */
    z-index: 2;
}

.antenna {
    width: 6px;
    height: 90px;
    /* Chrome metal tube effect */
    background: linear-gradient(90deg, #999 0%, #eee 40%, #fff 50%, #888 80%, #555 100%);
    position: relative;
    z-index: 1;
}

.antenna.left { transform: rotate(-35deg); transform-origin: bottom right; }
.antenna.right { transform: rotate(35deg); transform-origin: bottom left; }

.antenna-tip {
    width: 12px;
    height: 12px;
    background: #e0e0e0;
    border-radius: 50%;
    position: absolute;
    top: -6px;
    left: -3px;
    box-shadow: inset -2px -2px 4px rgba(0,0,0,0.4), inset 2px 2px 4px rgba(255,255,255,0.8);
}

/* --- THE CRT BEZEL & SCREEN --- */
.tv-body {
    display: flex;
    gap: 1.5rem;
    width: 100%;
}

.tv-bezel {
    flex-grow: 1;
    background: #1a1a1a;
    border-radius: 20px 20px 30px 30px;
    padding: 15px 15px 25px 15px;
    /* Creates the sloped plastic frame pushing deep into the screen */
    box-shadow: 
        inset 4px 4px 10px rgba(0,0,0,0.9), 
        inset -2px -2px 5px rgba(255,255,255,0.1), 
        1px 1px 2px rgba(255,255,255,0.4);
    position: relative;
    display: flex;
    flex-direction: column;
}

.tv-screen {
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #050505;
    /* Simulates the rounded glass bulb of a CRT */
    border-radius: 12px / 20px; 
    overflow: hidden;
    position: relative;
    /* The black rim of the unlit glass edge */
    box-shadow: inset 0px 0px 15px 5px rgba(0,0,0,1);
}

.tv-screen iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Pushes the video slightly under the glass shadow */
    z-index: 0; 
}

.screen-glare {
    position: absolute;
    inset: 0;
    /* Convex glass reflection using radial + linear gradients */
    background: 
        radial-gradient(circle at 30% 20%, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 50%),
        linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0) 40%);
    pointer-events: none;
    z-index: 5;
    border-radius: inherit;
}

.tv-brand {
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    color: #666;
    font-family: Arial, sans-serif;
    font-size: 0.65rem;
    font-weight: bold;
    letter-spacing: 2px;
}

/* Offline Screen Tweaks for the CRT */
.tv-offline {
    position: absolute;
    inset: 0;
    background-color: #0a0a0c; /* Deep tube off-color */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    color: #ccc;
    font-family: var(--font-cartoon);
    z-index: 1;
}
.offline-bug { font-size: 2.5rem; filter: grayscale(1) opacity(0.3); margin-bottom: 0.2rem; }
.offline-title { font-size: 1.6rem; font-weight: 700; color: #fff; margin: 0; letter-spacing: 1px; }
.offline-sub { font-size: 1rem; color: #666; margin: 0; }
.offline-btn {
    margin-top: 0.6rem;
    background-color: var(--color-youtube);
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 0.5rem 1.2rem;
    font-family: var(--font-cartoon);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: inset 1px 1px 2px rgba(255,255,255,0.4), 2px 2px 0px rgba(0,0,0,0.5);
    transition: transform 0.1s;
}
.offline-btn:active { transform: translateY(2px); box-shadow: inset 1px 1px 4px rgba(0,0,0,0.5), 0px 0px 0px rgba(0,0,0,0); }


/* --- THE HARDWARE CONTROLS --- */
.tv-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 60px;
    background: rgba(0,0,0,0.05);
    border-radius: 12px;
    padding: 10px 5px;
    box-shadow: inset 2px 2px 5px rgba(0,0,0,0.1), inset -1px -1px 2px rgba(255,255,255,0.5);
}

/* --- THE BROKEN KNOB EASTER EGG --- */
.knob-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 8px;
    position: relative; /* Gives the absolute stub a container to anchor to */
}

/* The exposed metal potentiometer shaft */
.knob-stub {
    position: absolute;
    top: 8px; 
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 12px;
    /* Metallic gradient catching light on the top-left */
    background: radial-gradient(circle at 30% 30%, #f0f0f0 0%, #777 100%);
    border-radius: 50%;
    /* * 1st shadow: Bright top-left rim highlight (convex)
     * 2nd shadow: Dark bottom-right inner core
     * 3rd shadow: The actual drop shadow cast onto the TV body 
     */
    box-shadow: 
        inset 1px 1px 2px rgba(255,255,255,0.9), 
        inset -1px -1px 2px rgba(0,0,0,0.5),
        2px 3px 4px rgba(0,0,0,0.6); 
    z-index: 0;
}

.tv-knob {
    width: 28px; 
    height: 28px;
    background-color: #222;
    border-radius: 50%;
    position: relative;
    z-index: 1; /* Keeps the plastic knob hiding the metal stub */
    box-shadow: 
        2px 4px 5px rgba(0,0,0,0.4), 
        inset -2px -2px 5px rgba(0,0,0,0.8), 
        inset 2px 2px 5px rgba(255,255,255,0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Adds a gravity transition for when it falls off */
    transition: transform 0.4s cubic-bezier(0.55, 0.085, 0.68, 0.53), opacity 0.4s ease-in;
}

/* The class JS will add to make it pop off */
.tv-knob.fallen {
    transform: translateY(80px) rotate(200deg) scale(0.6) !important;
    opacity: 0;
    pointer-events: none; /* Stops it from being clickable while invisible */
}
.knob-label {
    font-family: Arial, sans-serif;
    font-size: 0.5rem; /* Shrunk slightly */
    font-weight: bold;
    color: #333;
    margin-top: 3px;
}


.tv-knob.vhf-knob { transform: rotate(45deg); }
.tv-knob.uhf-knob { transform: rotate(-20deg); }
.tv-knob.whf-knob { transform: rotate(110deg); } /* Cranked past 11! */

.knob-ridge {
    position: absolute;
    width: 3px;
    height: 10px;
    top: 2px;
    background: #e0e0e0;
    border-radius: 2px;
    box-shadow: 0px 1px 2px rgba(0,0,0,0.5);
}

.knob-cap {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #eee 0%, #999 100%);
    box-shadow: inset 1px 1px 2px rgba(255,255,255,0.8), 0px 1px 3px rgba(0,0,0,0.6);
}

.power-led-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 12px; /* Reduced */
}

.power-led {
    width: 8px;
    height: 8px;
    background-color: #3bb273; /* Glowing Green */
    border-radius: 50%;
    box-shadow: 
        inset 1px 1px 2px rgba(255,255,255,0.6), 
        inset -1px -1px 2px rgba(0,0,0,0.4), 
        0px 0px 6px #3bb273;
}

/* True dotted speaker grille using a repeating background pattern */
.tv-speaker-grille {
    width: 40px;
    height: 60px;
    background-image: radial-gradient(#111 40%, transparent 45%);
    background-size: 6px 6px;
    border-radius: 4px;
    margin-top: auto;
    opacity: 0.8;
}

/* --- THE Dymo Label --- */
.tv-label-tape {
    position: absolute;
    bottom: 10px;
    left: 20px;
    background: #cc2929; /* Red label maker tape */
    color: #fff;
    font-family: 'Courier New', Courier, monospace;
    font-weight: bold;
    font-size: 0.8rem;
    padding: 2px 8px;
    letter-spacing: 1px;
    box-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    transform: rotate(-2deg);
    border-radius: 1px;
}

/* --- MOBILE ADJUSTMENTS --- */
@media (max-width: 800px) {
    .tv-body { flex-direction: column; }
    .tv-controls { 
        flex-direction: row; 
        width: 100%; 
        height: auto; 
        justify-content: space-around;
        padding: 10px;
    }
    .knob-group, .power-led-container { margin-bottom: 0; }
    .tv-speaker-grille { width: 80px; height: 30px; margin-top: 0; }
    .tv-label-tape { bottom: -10px; left: 50%; transform: translateX(-50%) rotate(1deg); }
}

/* --- TAPED NOTE --- */
.taped-note {
    grid-area: note;
    position: relative;
    bottom: auto; 
    right: auto;
    top: auto;
    left: auto;
    
    background-color: #fffde6;
    padding: 1.2rem 1.5rem;
    transform: rotate(-4deg);
    box-shadow: 6px 6px 0px rgba(0,0,0,0.3);
    font-family: var(--font-cartoon);
    text-align: center;
    z-index: 10;
    width: 100%;
    max-width: 240px;
    margin: auto;
}

.taped-note h3 {
    margin: 0 0 0.5rem 0;
    color: var(--color-youtube);
    font-size: 1.4rem;
    line-height: 1.1;
}

.taped-note p {
    margin: 0;
    font-size: 1.1rem;
    color: #444;
}

.tape {
    position: absolute;
    background-color: rgba(255, 255, 255, 0.5);
    width: 50px;
    height: 18px;
    backdrop-filter: blur(2px);
    box-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.tape-top {
    top: -8px;
    left: 50%;
    transform: translateX(-50%) rotate(-4deg);
}

.tape-bottom {
    bottom: -8px;
    left: 20%;
    transform: rotate(3deg);
}

/* --- MOBILE ADJUSTMENTS --- */
@media (max-width: 800px) {
    .desk-container { gap: 1.5rem; }
    .note { width: 100%; max-width: 250px; height: 100px; }
    .tv-label { font-size: 1.2rem; }
    
    /* Fix TV Aspect Ratio */
    .tv-body {
        flex-direction: column;
    }
    
    .tv-controls {
        flex-direction: row;
        justify-content: center;
        padding: 0.5rem 0 0 0;
        gap: 2rem;
    }
    
    .tv-speaker {
        flex-direction: row;
        margin-top: 0;
        align-items: center;
    }
    
    .speaker-hole {
        width: 6px;
        height: 25px;
    }

    
    .taped-note {
        transform: rotate(-2deg);
    }
}

/* --- STICKY NOTES & POLAROIDS (Socials) --- */
.note {
    padding: 1.5rem;
    width: 200px;
    height: 150px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
}

.patreon-note {
    background-color: var(--color-patreon);
    transform: rotate(3deg);
    text-align: center;
    height: auto;
    padding: 2rem 1.5rem;
    animation: gentle-pulse 2s infinite alternate;
}

@keyframes gentle-pulse {
    0% { transform: scale(1) rotate(3deg); }
    100% { transform: scale(1.05) rotate(3deg); }
}

.patreon-note h2 {
    margin: 0 0 0.5rem 0;
    font-size: 2rem;
    line-height: 1.1;
}

.social-twitch { background-color: var(--color-twitch); transform: rotate(-4deg); }
.social-youtube { background-color: var(--color-youtube); transform: rotate(2deg); }
.social-insta { background-color: var(--color-insta); transform: rotate(-2deg); }
.social-tiktok { background-color: var(--color-tiktok); transform: rotate(4deg); }

.nav-podcast { background-color: var(--color-podcast); transform: rotate(-3deg); }
.nav-soundboard { background-color: #fff; transform: rotate(2deg); }


/* Mobile adjustments */
@media (max-width: 600px) {
    .desk-container { gap: 1.5rem; }
    .note { width: 100%; max-width: 250px; height: 100px; }
    .tv-label { font-size: 1.2rem; }
}


/* --- THE SCRATCH PAD --- */
.scratch-pad {
    background-color: #fff9e6;
    background-image: repeating-linear-gradient(transparent, transparent 29px, #add8e6 29px, #add8e6 30px);
    background-attachment: local;
    width: 100%;
    max-width: 280px;
    height: 350px;
    position: relative;
    border-radius: 4px;
    transform: rotate(3deg);
    box-shadow: 8px 8px 0px rgba(0,0,0,0.3);
    padding-top: 40px; /* Space for the top binding */
    z-index:60;
}

.scratch-pad-binding {
    position: absolute;
    top: 0; left: 0; right: 0; height: 30px;
    background-color: #8b0000; /* Dark red legal pad binding */
    border-bottom: 2px solid #550000;
    border-radius: 4px 4px 0 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

#scratch-pad-text {
    width: 100%; height: 100%;
    border: none; outline: none; resize: none;
    background: transparent;
    font-family: var(--font-cartoon);
    font-size: 1.2rem;
    line-height: 30px; /* Perfectly aligns with the blue lines! */
    color: #000080; /* Ballpoint pen blue */
    padding: 0 1.5rem;
    box-sizing: border-box;
}

/* Mobile Adjustments */
@media (max-width: 800px) {
    .pb-two-column-list { grid-template-columns: 1fr; } /* Stacks to 1 column on phones */
    .phone-book-80s { padding: 2rem 1.5rem 2rem 3.5rem; }
}
/* --- THE TELEPHONE (AT&T 210) --- */
.telephone-outer {
    --att-beige: #f4efd8;
    --att-shadow: #d8d0b2;
    --att-btn-gray: #ced3c3;
    --att-panel-dark: #70756b;

    grid-area: phone;
    margin: 0;
    position: relative;
    transform: rotate(1deg);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.2s ease-in-out;
    z-index: 10;
}

.telephone-outer:hover {
    transform: translate(-4px, -4px) rotate(1deg);
    z-index: 50;
}


.telephone-outer::before {
    content: '';
    position: absolute;
    top: 5%;
    left: 20%;
    width: 60%;
    bottom: 5%;
    background-color: #b8a88a;
    border-radius: 30px;
    z-index: 0;
    box-shadow: var(--hard-shadow);
    transition: box-shadow 0.2s ease-in-out;
}

.telephone-outer:hover::before {
    box-shadow: var(--hard-shadow-hover);
}

.telephone {
    display: flex;
    flex-direction: column;
    align-items: center;
    filter: drop-shadow(5px 5px 0px rgba(0,0,0,0.2));
    position: relative;
    z-index: 1;
    user-select: none;
}

/* Phone Cord Adjustment */
.phone-cord-svg {
    position: absolute;
    bottom: -140px;
    left: 50%;
    transform: translateX(-50%);
    width: 55px;
    height: 150px;
    z-index: -1;
}

/* This locks the hook switch to the top section */
.earpiece-section {
    position: relative;
    z-index: 3; 
    display: flex;
    justify-content: center;
    width: 100%;
}

/* The modular jack at the bottom */
.cord-plug {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 12px;
    background: #999;
    border-radius: 2px 2px 6px 6px;
    box-shadow: inset 0px 4px 5px rgba(0,0,0,0.3), 0px 2px 3px rgba(0,0,0,0.2);
    z-index: 1; /* Tucks neatly behind the mouthpiece (which is z-index: 2) */
}

/* 1. EARPIECE */
.earpiece-block {
    width: 200px;
    height: 165px;
    top: 20px;
    right: 7px;
    background-color: var(--att-beige);
    border-radius: 65px 65px 45px 45px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 3;
box-shadow: inset 8px 15px 20px rgba(255, 255, 255, 0.7), inset -14px 0px 15px var(--att-shadow);
}


.speaker-indent {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background-color: #e5deb7;
    box-shadow: inset 0px 12px 18px rgba(0,0,0,0.15), inset 0px -5px 10px rgba(255,255,255,0.6);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

/* Radial Earpiece Layout */
.ear-hole-radial {
    position: relative;
    width: 80px; 
    height: 80px;
}

.ear-hole {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(0,0,0,0.8);
    box-shadow: inset 1px 2px 3px rgba(0,0,0,0.9), 0px 1px 1px rgba(255,255,255,0.7);
    
    /* Stack them all perfectly dead-center to start */
    position: absolute;
    top: 50%;
    left: 50%;
    margin: -3.5px 0 0 -3.5px; 
}

/* * The Magic: We rotate the hole based on its inline variable (--i), 
 * and then "push" it outward using translateY. 
 */

.ear-hole.inner {
    /* 360deg / 6 holes = 60deg apart. Pushed out 16px */
    transform: rotate(calc(60deg * var(--i))) translateY(-16px);
}

.ear-hole.outer {
    /* 360deg / 12 holes = 30deg apart. Pushed out 32px */
    transform: rotate(calc(30deg * var(--i))) translateY(-32px);
}

.mouth-slits { 
    margin-top: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.m-slit { 
    width: 24px; 
    height: 2px; 
    background: rgba(0,0,0,0.5); 
    border-radius: 2px; 
    box-shadow: 0px 1px 1px rgba(255,255,255,0.6); 
}

.m-slit:nth-child(2) { width: 75%; margin: 0 auto; }

.hook-switch {
    position: absolute;
    bottom: -30px;
    left: 48%;                      /* Pull it to the middle */
    transform: translateX(-50%);    /* Perfectly center it */
    width: 60px;
    height: 16px;
    background: var(--att-shadow);
    border-radius: 4px 4px 2px 2px;
    box-shadow: inset 0px -4px 5px rgba(0,0,0,0.3), 0px 2px 3px rgba(0,0,0,0.2);
    z-index: -1; 
}
/* 2. HANDLE & KEYPAD */
.handle-block {
    width: 185px;
    background-color: var(--att-beige);
    margin-top: -35px;
    padding: 75px 10px 50px; /* Reduced side padding so buttons can grow wider */
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
    box-shadow: inset -10px 0px 15px var(--att-shadow), inset 10px 0px 15px rgba(255,255,255,0.5);
    box-sizing: border-box;
}

/* The transparent wrapper that replaces the dark panel */
.keypad-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px; /* Increased vertical breathing room */
    box-sizing: border-box;
    padding: 0 4px; /* Slight buffer from the plastic edges */
}

/* The Screen */
.phone-screen {
    background-color: #8ca58c; 
    width: 100%; /* Now auto-fills the wider wrapper */
    height: 36px; /* Slightly taller */
    border-radius: 6px;
    box-shadow: inset 2px 2px 5px rgba(0,0,0,0.3), 0px 2px 0px rgba(255,255,255,0.5);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 0.5rem;
    font-family: var(--font-digital);
    font-size: 1.3rem; /* Slightly larger text */
    color: #111;
    box-sizing: border-box;
    overflow: hidden;
    white-space: nowrap;
    margin-bottom: 4px;
}

/* Top Actions Layout */
.top-actions {
    display: flex;
    width: 100%;
    gap: 12px; 
}

.top-actions .btn {
    flex: 1; 
    height: 32px; /* Taller actions */
    font-size: 0.8rem;
}

.keypad-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px; /* Much wider gaps between keys */
}

/* Core Button Styles */
.btn {
    height: 32px; /* Taller buttons (was 24px) */
    background-color: var(--att-btn-gray);
    border: none;
    border-radius: 4px;
    box-shadow: 1px 3px 0px #979d8c, inset 1px 1px 2px rgba(255,255,255,0.8);
    position: relative;
    cursor: pointer;
    color: #111;
    padding: 0;
}

.btn:active, .btn.keyboard-active {
    transform: translateY(2px) !important;
    box-shadow: 0px 1px 0px #979d8c, inset 1px 1px 4px rgba(0,0,0,0.3) !important;
}

/* Actions */
.action-btn { color: #fff; font-family: var(--font-cartoon); font-weight: 700; }
.clear-btn { background-color: var(--color-youtube); box-shadow: 1px 3px 0px #b34a4a, inset 1px 1px 2px rgba(255,255,255,0.4); }
.call-btn { background-color: var(--color-podcast); box-shadow: 1px 3px 0px #2a7d51, inset 1px 1px 2px rgba(255,255,255,0.4); }
.clear-btn:active, .clear-btn.keyboard-active { box-shadow: 0px 1px 0px #b34a4a, inset 1px 1px 4px rgba(0,0,0,0.3) !important;}
.call-btn:active, .call-btn.keyboard-active { box-shadow: 0px 1px 0px #2a7d51, inset 1px 1px 4px rgba(0,0,0,0.3) !important;}

/* Typography inside Numpad */
.num {
    position: absolute;
    top: 4px; left: 6px; /* Shifted slightly for the larger button */
    font-family: 'Arial Narrow', Arial, sans-serif;
    font-size: 15px; /* Bumped up */
    font-weight: 800;
    font-style: italic;
}
.alpha {
    position: absolute;
    bottom: 3px; right: 5px; /* Shifted slightly */
    font-family: 'Arial Narrow', Arial, sans-serif;
    font-size: 7px; /* Bumped up */
    font-weight: bold;
    letter-spacing: 0.5px;
}

/* Hardware Switches */
.config-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 8px; }
.config-col { display: flex; flex-direction: column; align-items: center; justify-content: space-between; height: 24px; }
/* Changed text color to #555 so it reads clearly against the beige body! */
.micro-text { font-family: Arial, sans-serif; font-size: 5px; color: #555; font-weight: bold; letter-spacing: 0.2px; text-transform: uppercase;}
.switch-groove { width: 14px; height: 6px; background: #4a4d46; border-radius: 3px; box-shadow: inset 1px 1px 2px rgba(0,0,0,0.5); position: relative; }
.switch-nub { width: 6px; height: 6px; background: #e0e0e0; border-radius: 50%; position: absolute; top: 0; box-shadow: 1px 1px 2px rgba(0,0,0,0.5); }
.nub-left { left: 0; } .nub-center { left: 4px; } .nub-right { right: 0; }

/* 3. MOUTHPIECE */
.mouthpiece-block {
    width: 185px;
    height: 100px;
    top: -20px;
    background-color: var(--att-beige);
    border-radius: 30px 30px 65px 65px;
    margin-top: -20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    box-shadow: inset -10px -15px 25px var(--att-shadow), inset 10px 5px 15px rgba(255,255,255,0.6);
}

.brand { margin-top: 25px; display: flex; align-items: center; gap: 6px; color: #111; font-family: Arial, sans-serif;}
.brand svg { width: 16px; height: 16px; }
.brand .at-t { font-weight: 900; font-size: 14px; letter-spacing: -0.5px; }
.brand .model { font-size: 11px; font-weight: 600; margin-left: 2px;}


/* --- INTERACTIVE LAYOUT (Rows) --- */
.interactive-layout {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    gap: 5rem; 
    width: 100%;
    max-width: 1300px; /* Bumped up from 1100px */
    margin: 0 auto;
}

.desk-row {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
    justify-content: center;
    align-items: center;
    width: 100%;
}

/* TOP ROW: TV (2/3) and Right Column (1/3) */
.top-row {
    display: grid;
    grid-template-columns: 2fr 1fr; /* 2/3 left, 1/3 right split! */
    gap: 2.5rem;
    align-items: center;
    width: 100%;
}

@media (max-width: 900px) {
    .top-row { grid-template-columns: 1fr; } /* Stacks perfectly in a single column on mobile */
}



/* Right Column for stacking the notes */
.top-right-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3rem; /* Nice spacing between the two notes */
    width: 100%;
}

/* Ensure the Taped Note fits inside the column without blowing out */
.taped-note {
    grid-area: auto; /* Overrides any previous grid-area properties */
    position: relative;
    background-color: #fffde6;
    padding: 1.2rem 1.5rem;
    transform: rotate(-4deg);
    box-shadow: 6px 6px 0px rgba(0,0,0,0.3);
    font-family: var(--font-cartoon);
    text-align: center;
    z-index: 10;
    width: 100%;
    max-width: 260px;
    margin: 0 auto;
}

.telephone-outer { margin: 0; }

/* --- THE FOLDED 1980s YELLOW PAGES --- */
.phone-book-folded {
    z-index:60;
    width: calc(100% - 35px);
    max-width: 450px; /* Slimmer, single-page look */
    margin: 0 auto;
    border-radius: 4px 16px 16px 4px;
    padding: 2.5rem 3rem 5.5rem 5rem;
    position: relative;
    color: #111;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease-in-out;
    background-color: transparent; 
    
    /* Left edge shadow suggests a cover wrapped around the back */
    box-shadow: 
        inset 15px 0px 15px rgba(0,0,0,0.1), /* Spine curve */
        -8px 0px 0px #645713, /* Folded cover edge peeking out */
        -10px 0px 10px rgba(0,0,0,0.15), /* Folded cover drop shadow */
        12px 12px 0px rgba(0,0,0,0.3), /* Desk drop shadow */
        4px 4px 0px #e6c32e, /* Page edges layer 1 */
        8px 8px 0px #cca300; /* Page edges layer 2 */
}

.phone-book-folded::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #fae99e;
    border-radius: inherit;
    z-index: 0; /* Sits right at the base */
    pointer-events: none; /* Prevents it from accidentally blocking mouse clicks */
}

.pb-header, 
.pb-directory-single, 
#index-view {
    position: relative;
    z-index: 1;
}

.pb-folded-spine,
.pb-controls {
    z-index: 1; 
}

.pb-index-tab {
    z-index: -1; 
}

.phone-book-folded:hover {
    transform: translate(-4px, -4px) rotate(-1deg) !important;
    box-shadow: 
        inset 15px 0px 15px rgba(0,0,0,0.1),
        -8px 0px 0px #645713,
        -10px 0px 10px rgba(0,0,0,0.15),
        16px 16px 0px rgba(0,0,0,0.25), 
        4px 4px 0px #e6c32e,
        8px 8px 0px #cca300 !important;
    z-index: 50 !important; /* <--- Fixes Yellow Pages shadow clipping */
}

.pb-folded-spine {
    position: absolute;
    left: 0; top: 0; bottom: 0; width: 30px;
    background: linear-gradient(to right, rgba(0,0,0,0.15), rgba(0,0,0,0));
    border-radius: 4px 0 0 4px;
    pointer-events: none;
}

.pb-header {
    text-align: center;
    border-bottom: 4px double #111;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    font-family: "Ranchers";
}

.pb-header h2 {
    margin: 0;
    font-family: "Ranchers", sans-serif;
    font-size: 3rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    font-weight: 900;
}

.pb-header p {
    margin: 0;
    font-weight: bold;
    color: #333;
}

/* --- THE SINGLE-COLUMN FLOW --- */
.pb-directory-single {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    width: 100%;
    min-height: 420px; /* Lock the content area height so page turns don't resize the book */
}

.pb-category-header {
    font-family: var(--font-cartoon);
    font-size: 1rem;
    font-weight: 900;
    text-transform: uppercase;
    border-bottom: 3px double #111;
    margin-top: 2rem;
    margin-bottom: 0.8rem;
    color: #111;
}

.pb-directory-single .pb-category-header:first-child { margin-top: 0; }

.pb-normal-entry {
    display: flex;
    align-items: baseline;
    margin-bottom: 0.4rem;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.pb-normal-entry:last-child {
    border-bottom: none;
}

.pb-normal-entry .pb-name { font-weight: bold; color: #222; }

.pb-dots {
    flex-grow: 1;
    border-bottom: 2px dotted #555;
    margin: 0 4px;
    position: relative;
    top: -4px;
}

.pb-number, .pb-ad-number {
    font-family: var(--font-digital);
    font-weight: bold;
    color: #111;
}

/* --- MINIMAL INLINE ADVERTISEMENTS --- */
.pb-ad-entry {
    border: 2px solid #222; /* Clean, bold black outline */
    border-radius: 4px;
    padding: 0.6rem 0.8rem;
    background-color: rgba(255, 255, 255, 0.4); /* Extremely subtle highlight */
    box-shadow: 3px 3px 0 rgba(0,0,0,0.1);
}

.pb-ad-header {
    display: flex;
    align-items: baseline;
    width: 100%;
    margin-bottom: 0.3rem;
}

.pb-ad-title {
    font-family: var(--font-cartoon);
    font-size: 1.1rem;
    font-weight: 900;
    color: #111;
    text-transform: uppercase;
}

.pb-ad-subtitle {
    font-size: 0.85rem;
    font-weight: bold;
    margin-bottom: 0.3rem;
    text-transform: uppercase;
}

.pb-ad-desc {
    font-size: 0.85rem;
    margin-bottom: 0;
    line-height: 1.3;
    color: #333;
}

/* --- SKEUOMORPHIC FOLDED CORNER PAGINATION --- */
.pb-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Lets you click the book through this container */
}

.pb-indicator-container {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    text-align: center;
    border-top: 1px dashed rgba(0,0,0,0.15);
    padding-top: 0.5rem;
}

#pb-page-indicator {
    font-family: var(--font-digital);
    font-weight: bold;
    color: #555;
}

.pb-btn {
    position: absolute;
    bottom: 0;
    width: 65px;
    height: 65px;
    border: none;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    pointer-events: auto; /* Makes the corners clickable again */
    color: transparent;
    z-index: 20;
}

/* The Bottom-Right "Next Page" Fold */
#pb-next, #idx-next {
    right: 0;
    /* Creates the diagonal fold color */
    background: linear-gradient(135deg, transparent 50%, #cca300 50%);
    /* Casts a shadow onto the page underneath */
    box-shadow: -4px -4px 6px rgba(0,0,0,0.15);
    border-radius: 0 0 16px 0; /* Matches the book's outer corner */
}

#pb-next::after {
    content: '►';
    position: absolute;
    bottom: 12px;
    right: 12px;
    color: #111;
    font-size: 1.2rem;
    opacity: 0.5;
}

#pb-next:hover {
    width: 85px;
    height: 85px;
    background: linear-gradient(135deg, transparent 50%, #d9ac00 50%); /* Brightens on hover */
}

/* The Bottom-Left "Prev Page" Fold */
#pb-prev, #idx-prev {
    left: 0;
    /* Reverse diagonal for the left side */
    background: linear-gradient(225deg, transparent 50%, #cca300 50%);
    box-shadow: 4px -4px 6px rgba(0,0,0,0.15);
    border-radius: 0 0 0 4px; 
}

#pb-prev::after {
    content: '◄';
    position: absolute;
    bottom: 12px;
    left: 12px;
    color: #111;
    font-size: 1.2rem;
    opacity: 0.5;
}

#pb-prev:hover {
    width: 85px;
    height: 85px;
    background: linear-gradient(225deg, transparent 50%, #d9ac00 50%);
}

/* --- THE POST-IT INDEX TAB --- */
.pb-index-tab {
    position: absolute;
    top: 60px; 
    right: -35px; /* Tucks it slightly inside the book */
    width: 45px;
    height: 70px;
    background-color: #ff9ee2; /* Classic neon pink post-it */
    border-radius: 0 4px 4px 0;
    box-shadow: 4px 4px 0px rgba(0,0,0,0.15);
    font-family: var(--font-cartoon);
    font-weight: bold;
    font-size: 1.1rem;
    color: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    cursor: pointer;
    z-index: -1; /* Slides beautifully behind the yellow cover */
    transition: right 0.2s, background-color 0.2s;
}

.pb-index-tab:hover {
    right: -45px; /* Pulls out when hovered */
    background-color: #ffb5eb;
}

/* --- THE INDEX LIST VIEW --- */
.index-item {
    font-family: var(--font-cartoon);
    font-size: 1.1rem;
    color: #333;
    cursor: pointer;
    border-bottom: 2px dotted rgba(0,0,0,0.2);
    padding-bottom: 4px;
    display: flex;
    justify-content: space-between;
    transition: color 0.1s, border-bottom-color 0.1s;
}

.index-item:hover {
    color: var(--color-youtube); /* Highlights red on hover */
    border-bottom-color: var(--color-youtube);
}

.index-item-page {
    font-family: var(--font-digital);
    font-size: 0.9rem;
    color: #777;
}

/* --- YELLOW PAGES MOBILE FIXES --- */
@media (max-width: 600px) {
    /* Fix the Header and Subheading sizes */
    .pb-header h2 {
        font-size: 1.7rem !important; /* Shrunk from 2.2rem */
        letter-spacing: 1px;
    }

    .pb-header p {
        font-size: 0.8rem;
    }

    /* Fix the Height and Padding */
    .phone-book-folded {
        /* Reduce padding so content has more horizontal room (prevents excessive wrapping) */
        padding: 1.5rem 1.5rem 5rem 3.5rem !important; 
        
        /* Enforce a stable height */
        height: 580px; 
        min-height: 580px;
        display: flex;
        flex-direction: column;
    }

    /* Ensure the list fills the space but doesn't blow out the container */
    .pb-directory-single {
        min-height: unset !important; /* Remove the old min-height */
        flex-grow: 1;
        overflow: hidden; /* Keeps the "fixed" look */
    }

    /* 4. Shrink entry text slightly to help it fit on one line */
    .pb-normal-entry {
        font-size: 0.85rem;
    }
    
    .pb-ad-title {
        font-size: 0.95rem;
    }
}

/* --- GLOBAL MOBILE REORDER & TYPOGRAPHY FIXES --- */
@media (max-width: 900px) {
   
    /* Flatten the containers so we can reorder children globally */
    .top-row, 
    .schedule-row,
    .middle-row, 
    .top-right-column {
        display: contents!important; 
    }

    /* Make the main layout a single vertical flex column */
    .interactive-layout {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 3rem; /* Spacing between all desk items */
    }

    /* Set the Mobile Order */
    .tv-monitor          { order: 1; }
    .taped-note          { order: 2; }
    .schedule-board      { order: 3; } /* Tucks the schedule right under the TV/Note */
    .telephone-outer     { order: 4; }
    .scratch-pad         { order: 5; }
    .phone-book-folded   { order: 6; }
    .patreon-note        { order: 7; } /* Jumps to the bottom! */

    /* Mobile Styling for the Patreon Button */
    .patreon-note {
        width: 100%;
        max-width: 280px;
        margin-bottom: 4rem; /* Add extra room at the very bottom of the page */
        animation: none; /* Optional: turn off pulse if it's too distracting at the bottom */
    }
}

/* --- RESTORE DESKTOP LAYOUT --- */
@media (min-width: 901px) {
    .phone-book-folded { order: 1; }
    .telephone-outer   { order: 2; }
    .scratch-pad       { order: 3; }
}

/* --- THE SCHEDULE BOARD --- */
.schedule-row {
    width: 100%;
    display: flex;
    justify-content: center;
}

.schedule-board {
    background-color: #f4e8d1;
    background-image: linear-gradient(rgba(255,255,255,0.2) 1px, transparent 1px);
    background-size: 100% 1.5rem;
    padding: 2.5rem 2rem 2rem 2rem;
    width: 100%;
    max-width: 1000px; /* Wide horizontal layout on desktop */
    position: relative;
    border-radius: 8px;
    font-family: var(--font-cartoon);
}

.clipboard-clip {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px; /* Slightly wider clip for the wider board */
    height: 30px;
    background: linear-gradient(to bottom, #ccc, #888);
    border-radius: 10px 10px 4px 4px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.4), inset 0 2px 4px rgba(255,255,255,0.5);
    z-index: 2;
}

.clipboard-clip::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 12px; height: 12px;
    background: #222;
    border-radius: 50%;
    box-shadow: inset 1px 1px 2px rgba(0,0,0,0.8);
}

.schedule-board h2 {
    margin: 0 0 1.5rem 0;
    text-align: center;
    color: #333;
    font-size: 1.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-bottom: 2px solid rgba(0,0,0,0.2);
    padding-bottom: 0.5rem;
}

/* Horizontal Grid for Days */
#schedule-list {
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* 5 columns for desktop */
    gap: 1.5rem;
}

.schedule-day {
    padding: 1rem;
    border-radius: 8px;
    border-top: 5px solid transparent; /* Highlight border is on top for horizontal */
    background-color: rgba(0,0,0,0.03);
    transition: all 0.2s;
    text-align: center;
    display: flex;
    flex-direction: column;
}

.schedule-day .day-name {
    font-weight: 900;
    font-size: 1rem;
    text-transform: uppercase;
    color: #555;
}

.schedule-day .day-theme {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--color-youtube);
    margin: 0.5rem 0;
}

.schedule-day .day-desc {
    font-size: 0.85rem;
    color: #444;
    line-height: 1.3;
}

/* Highlight for the Current Day */
.schedule-day.current-day {
    background-color: rgba(255, 255, 255, 0.8);
    border-top: 6px solid var(--color-podcast);
    box-shadow: 4px 4px 0px rgba(0,0,0,0.1);
    transform: translateY(-4px); /* Pops out towards the user */
}

.schedule-day.current-day .day-name {
    color: var(--color-podcast);
}

/* Action Buttons */
.schedule-actions {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px dashed rgba(0,0,0,0.2);
}

.schedule-actions .action-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    text-decoration: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    box-shadow: 4px 4px 0px rgba(0,0,0,0.2);
    transition: transform 0.1s, box-shadow 0.1s;
}

.schedule-actions .action-btn:active {
    transform: translate(4px, 4px);
    box-shadow: 0px 0px 0px transparent;
}

.schedule-actions .email-btn { background-color: var(--color-tv); color: #111; }
.schedule-actions .call-btn { background-color: var(--color-podcast); color: #fff; }

/* --- MOBILE RESPONSIVENESS --- */
@media (max-width: 900px) {
    #schedule-list {
        grid-template-columns: 1fr; /* Stack vertically */
        gap: 0.8rem;
    }
    
    .schedule-board {
        max-width: 400px; /* Constrain back to a vertical clipboard size */
        padding: 2rem 1.5rem 1.5rem 1.5rem;
    }

    .schedule-day {
        text-align: left;
        border-top: none;
        border-left: 4px solid transparent;
        display: block;
    }
    
    .schedule-day.current-day {
        border-top: none;
        border-left: 6px solid var(--color-podcast);
        transform: translateX(4px);
    }

    .schedule-actions {
        flex-direction: column;
    }
}