* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --neon: #39ff14;
    --neon-bright: #5dff3c;
    --neon-dim: #28c40f;
    --bg0: #06060d;
    --bg1: #0f0f1f;
    --bg2: #1a1a35;
    --ink: #f0f0f6;
    --ink-soft: rgba(255, 255, 255, 0.72);
    --muted: rgba(255, 255, 255, 0.52);
    --line: rgba(255, 255, 255, 0.1);
    --line-strong: rgba(255, 255, 255, 0.18);
    --glass-bg: rgba(8, 8, 18, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
    --radius-pill: 999px;
    --radius-md: 14px;
    --radius-sm: 8px;
    --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
    --header-h: 104px;
}

html {
    scroll-behavior: smooth;
    overscroll-behavior: none;
    height: 100%;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Arial, sans-serif;
    color: var(--ink);
    background: var(--bg0);
    line-height: 1.5;
    overflow: hidden;
    height: 100%;
    -webkit-tap-highlight-color: transparent;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(57, 255, 20, 0.04) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(80, 80, 220, 0.05) 0%, transparent 40%);
    opacity: 0.8;
}

::selection {
    background: rgba(57, 255, 20, 0.25);
    color: var(--ink);
}

/* ===== sticky header ===== */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 20;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 22px;
    padding-top: max(12px, env(safe-area-inset-top));
    padding-left: max(22px, env(safe-area-inset-left));
    padding-right: max(22px, env(safe-area-inset-right));
    background: linear-gradient(180deg, rgba(8, 8, 18, 0.75) 0%, rgba(8, 8, 18, 0.45) 100%);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 8px 24px rgba(0, 0, 0, 0.25);
}

.header-left {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.brand {
    font-weight: 800;
    letter-spacing: 2px;
    font-size: 16px;
    color: #fff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: opacity 0.2s var(--ease);
}
.brand:hover { opacity: 0.85; }
.brand-mark {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    flex-shrink: 0;
    box-shadow: 0 0 12px rgba(57, 255, 20, 0.25), 0 2px 6px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.brand:hover .brand-mark {
    transform: translateY(-1px) rotate(-3deg);
    box-shadow: 0 0 18px rgba(57, 255, 20, 0.4), 0 4px 10px rgba(0, 0, 0, 0.5);
}
.brand span {
    color: var(--neon);
    text-shadow: 0 0 10px rgba(57, 255, 20, 0.6), 0 0 20px rgba(57, 255, 20, 0.25);
    margin-left: 1px;
    animation: neonPulse 3.5s ease-in-out infinite;
}
@keyframes neonPulse {
    0%, 100% { text-shadow: 0 0 10px rgba(57, 255, 20, 0.6), 0 0 20px rgba(57, 255, 20, 0.25); }
    50% { text-shadow: 0 0 14px rgba(57, 255, 20, 0.8), 0 0 28px rgba(57, 255, 20, 0.4); }
}

.hero-copy {
    position: relative;
    z-index: 6;
    width: 100%;
    max-width: 600px;
    text-align: left;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.85), 0 0 1px rgba(0, 0, 0, 0.5);
    pointer-events: none;
}
.hero-copy .eyebrow {
    animation: heroCopyIn 0.6s var(--ease) 0.15s both;
}
.hero-copy h1 {
    animation: heroCopyIn 0.6s var(--ease) 0.25s both;
}
@keyframes heroCopyIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-copy .sub,
.hero-copy .microcopy { display: none; }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 10px;
    font-weight: 700;
    color: var(--neon);
    margin-bottom: 4px;
    padding: 5px 14px;
    border-radius: var(--radius-pill);
    background: linear-gradient(180deg, rgba(57, 255, 20, 0.1) 0%, rgba(57, 255, 20, 0.04) 100%);
    border: 1px solid rgba(57, 255, 20, 0.15);
    box-shadow:
        0 0 16px rgba(57, 255, 20, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.eyebrow::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--neon);
    box-shadow: 0 0 8px var(--neon);
    animation: blink 2s ease-in-out infinite;
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.hero-copy h1 {
    font-size: clamp(13px, 2.6vw, 20px);
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -0.2px;
    color: #fff;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    margin-top: 4px;
    animation: creditIn 0.6s var(--ease) 0.5s both;
}

/* ===== newsletter ===== */
.newsletter-hdr {
    position: relative;
    z-index: 30;
}
.nl-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.02);
    color: var(--ink-soft);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease);
}
.nl-btn:hover {
    color: var(--neon);
    background: rgba(57, 255, 20, 0.05);
    border-color: rgba(57, 255, 20, 0.2);
}
.nl-form {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 280px;
    padding: 16px 18px;
    border-radius: var(--radius-md);
    border: 1px solid var(--line-strong);
    background: linear-gradient(180deg, rgba(10, 10, 22, 0.95) 0%, rgba(6, 6, 13, 0.95) 100%);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.04) inset,
        0 12px 40px rgba(0, 0, 0, 0.6);
    opacity: 0;
    transform: translateY(-4px);
    pointer-events: none;
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}
.nl-form.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.nl-pitch {
    font-size: 11px;
    color: var(--ink-soft);
    line-height: 1.5;
    margin: 0;
}
.nl-input {
    font-family: inherit;
    font-size: 13px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line-strong);
    background: rgba(255, 255, 255, 0.04);
    color: var(--ink);
    outline: none;
    transition: border-color 0.2s var(--ease);
}
.nl-input::placeholder { color: var(--muted); }
.nl-input:focus {
    border-color: rgba(57, 255, 20, 0.3);
}
.nl-submit {
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    padding: 9px 0;
    border-radius: var(--radius-sm);
    border: none;
    background: linear-gradient(180deg, var(--neon-bright) 0%, var(--neon-dim) 100%);
    color: #06140a;
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: filter 0.2s var(--ease), transform 0.15s var(--ease);
}
.nl-submit:hover { filter: brightness(1.08); transform: translateY(-1px); }
.nl-submit:active { transform: translateY(0) scale(0.97); }
.nl-hint {
    font-size: 9px;
    color: var(--muted);
    text-align: center;
    margin: 0;
}
.nl-feedback {
    font-size: 11px;
    color: var(--neon);
    text-align: center;
    margin: 0;
}



.site-nav { display: flex; gap: 6px; align-items: center; }
.site-nav a {
    color: var(--ink-soft);
    text-decoration: none;
    font-size: 13px;
    padding: 6px 12px;
    border-radius: var(--radius-pill);
    transition: color 0.15s var(--ease), background 0.15s var(--ease);
}
.site-nav a:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
.site-nav a.ghost { border: 1px solid var(--line); }

/* ===== hero (3D phone container) ===== */
.hero {
    position: relative;
    z-index: 2;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(60, 60, 140, 0.4) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 100%, rgba(57, 255, 20, 0.06) 0%, transparent 60%),
        linear-gradient(180deg, #0a0a1a 0%, #050510 100%);
}

#scene {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    touch-action: none;
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translate(-50%, -8px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

/* ===== buttons: shared ===== */
button {
    font-family: inherit;
    -webkit-appearance: none;
    appearance: none;
}

.btn,
.flip-btn,
.band {
    position: relative;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    transition:
        transform 0.18s var(--ease),
        box-shadow 0.18s var(--ease),
        background 0.2s var(--ease),
        color 0.2s var(--ease),
        filter 0.18s var(--ease);
}
.btn:focus-visible,
.flip-btn:focus-visible,
.band:focus-visible {
    outline: 2px solid var(--neon);
    outline-offset: 2px;
}
.btn:active,
.flip-btn:active,
.band:active {
    transform: translateY(1px) scale(0.98);
}

/* ===== bottom controls container ===== */
.hero-controls {
    position: absolute;
    z-index: 6;
    left: 50%;
    transform: translateX(-50%);
    bottom: max(18px, env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    gap: 0;
    align-items: center;
    animation: fadeInUp 0.8s var(--ease) 0.4s both;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translate(-50%, 8px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

.actions {
    display: flex;
    gap: clamp(6px, 0.8vw, 10px);
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

/* ===== band toggle: radio / podcasts ===== */
.band-toggle {
    position: absolute;
    z-index: 6;
    left: 50%;
    transform: translateX(-50%);
    top: calc(var(--header-h, 104px) + 14px);
    display: inline-flex;
    gap: 2px;
    padding: 3px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--line-strong);
    background: rgba(10, 10, 20, 0.65);
    backdrop-filter: blur(12px) saturate(140%);
    -webkit-backdrop-filter: blur(12px) saturate(140%);
    box-shadow: var(--shadow-md);
    animation: fadeInDown 0.8s var(--ease) 0.3s both;
}

.band {
    appearance: none;
    border: none;
    z-index: 1;
    font-size: clamp(11px, 0.5vw + 9px, 13px);
    font-weight: 700;
    color: var(--ink-soft);
    padding: clamp(6px, 0.5vw + 4px, 8px) clamp(11px, 1.2vw + 7px, 18px);
    border-radius: var(--radius-pill);
    background: transparent;
    letter-spacing: 0.2px;
}
.band:hover { color: #fff; }
.band:not(.on):hover { background: rgba(255, 255, 255, 0.06); }
.band.on {
    color: #06140a;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.15);
}

.band-slider {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
    width: 0;
    height: 0;
    border-radius: var(--radius-pill);
    background: linear-gradient(180deg, var(--neon-bright) 0%, var(--neon-dim) 100%);
    box-shadow:
        0 0 0 1px rgba(57, 255, 20, 0.4),
        0 4px 14px rgba(57, 255, 20, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
    pointer-events: none;
}
.band-toggle.slider-ready .band-slider {
    transition:
        transform 0.34s var(--ease),
        width 0.34s var(--ease),
        height 0.34s var(--ease);
}

/* ===== primary action button (search) ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(13px, 0.6vw + 11px, 14px);
    font-weight: 700;
    padding: clamp(10px, 0.7vw + 7px, 12px) clamp(14px, 1.4vw + 9px, 20px);
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    text-decoration: none;
    letter-spacing: 0.2px;
}
.btn.primary {
    background: linear-gradient(180deg, var(--neon-bright) 0%, var(--neon-dim) 100%);
    color: #06140a;
    box-shadow:
        0 0 0 1px rgba(57, 255, 20, 0.3),
        0 10px 28px rgba(40, 196, 15, 0.32),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.15);
}
.btn.primary:hover {
    transform: translateY(-2px);
    box-shadow:
        0 0 0 1px rgba(57, 255, 20, 0.5),
        0 14px 36px rgba(40, 196, 15, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);
    filter: brightness(1.08);
}
.btn.primary:active {
    transform: translateY(0) scale(0.97);
    filter: brightness(0.95);
}
.btn.ghost {
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    border: 1px solid var(--line);
}
.btn.ghost:hover { background: rgba(255, 255, 255, 0.1); border-color: var(--line-strong); }

/* ===== flip / stick secondary buttons ===== */
.flip-btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: clamp(12px, 0.6vw + 10px, 14px);
    font-weight: 600;
    color: #0c0c14;
    background: linear-gradient(180deg, #ffffff 0%, #d8d8d8 100%);
    border: 1px solid rgba(0, 0, 0, 0.08);
    padding: clamp(9px, 0.6vw + 6px, 11px) clamp(14px, 1.4vw + 9px, 20px);
    border-radius: var(--radius-pill);
    box-shadow:
        0 6px 18px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.flip-btn:hover {
    transform: translateY(-2px);
    box-shadow:
        0 10px 24px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    filter: brightness(1.05);
}
.flip-btn:active {
    transform: translateY(0) scale(0.97);
}
.flip-btn .dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--neon);
    box-shadow: 0 0 8px rgba(57, 255, 20, 0.9), 0 0 14px rgba(57, 255, 20, 0.5);
    animation: dotPulse 1.8s ease-in-out infinite;
}
@keyframes dotPulse {
    0%, 100% { box-shadow: 0 0 8px rgba(57, 255, 20, 0.9), 0 0 14px rgba(57, 255, 20, 0.5); }
    50% { box-shadow: 0 0 12px rgba(57, 255, 20, 1), 0 0 20px rgba(57, 255, 20, 0.7); }
}
.flip-btn.on {
    background: linear-gradient(180deg, var(--neon-bright) 0%, var(--neon-dim) 100%);
    color: #06140a;
    box-shadow:
        0 0 0 1px rgba(57, 255, 20, 0.4),
        0 8px 24px rgba(40, 196, 15, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.15);
}
.flip-btn.on .dot {
    background: #06140a;
    box-shadow: 0 0 0 1px rgba(6, 20, 10, 0.5);
    animation: none;
}

/* ===== loader ===== */
.loader {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    font-size: 11px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--ink-soft);
    background: radial-gradient(circle at 50% 30%, #1a1a35 0%, var(--bg0) 100%);
    transition: opacity 0.6s var(--ease);
}
.loader.hidden { opacity: 0; pointer-events: none; }
.loader-dots {
    display: inline-flex;
    gap: 6px;
}
.loader-dots span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--neon);
    box-shadow: 0 0 10px rgba(57, 255, 20, 0.6);
    animation: loaderBounce 1.2s ease-in-out infinite;
}
.loader-dots span:nth-child(2) { animation-delay: 0.15s; }
.loader-dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes loaderBounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-6px); opacity: 1; }
}

/* ===== now-playing bar (glass card, shown when a stream is active) ===== */
#nowPlaying {
    position: absolute;
    z-index: 7;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    opacity: 0;
    bottom: calc(max(18px, env(safe-area-inset-bottom)) + 72px);
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 20px 10px 18px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--line-strong);
    background: linear-gradient(180deg, rgba(10, 10, 22, 0.8) 0%, rgba(6, 6, 13, 0.75) 100%);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.04) inset,
        0 8px 32px rgba(0, 0, 0, 0.5);
    pointer-events: auto;
    white-space: nowrap;
    transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
    user-select: none;
    -webkit-user-select: none;
}
#nowPlaying.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
#nowPlaying::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, transparent 100%);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    -webkit-mask-composite: xor;
    pointer-events: none;
}
#nowPlaying .np-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
    text-align: left;
    line-height: 1.2;
    min-width: 0;
}
#nowPlaying .np-title {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
}
#nowPlaying .np-sub {
    font-size: 10px;
    font-weight: 500;
    color: var(--ink-soft);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
#nowPlaying .np-wave {
    display: inline-flex;
    align-items: flex-end;
    gap: 2px;
    height: 16px;
    flex-shrink: 0;
}
#nowPlaying .np-wave span {
    display: block;
    width: 3px;
    background: var(--neon);
    border-radius: 999px;
    animation: waveAnim 0.6s ease-in-out infinite alternate;
    box-shadow: 0 0 4px rgba(57, 255, 20, 0.4);
}
#nowPlaying .np-wave span:nth-child(1) { height: 6px; animation-delay: 0s; }
#nowPlaying .np-wave span:nth-child(2) { height: 12px; animation-delay: 0.08s; }
#nowPlaying .np-wave span:nth-child(3) { height: 8px; animation-delay: 0.16s; }
#nowPlaying .np-wave span:nth-child(4) { height: 14px; animation-delay: 0.04s; }
#nowPlaying .np-wave span:nth-child(5) { height: 7px; animation-delay: 0.12s; }
@keyframes waveAnim {
    from { transform: scaleY(0.4); opacity: 0.5; }
    to { transform: scaleY(1); opacity: 1; }
}

/* ===== responsive ===== */
@media (max-width: 880px) {
    .site-nav a:not(.ghost) { display: none; }
}

@media (max-width: 640px) {
    .site-header {
        align-items: center;
        gap: 8px;
        padding: 8px 14px;
        padding-top: max(8px, env(safe-area-inset-top));
        padding-left: max(14px, env(safe-area-inset-left));
        padding-right: max(14px, env(safe-area-inset-right));
    }
    .header-left { flex-direction: row; align-items: center; gap: 8px; }
    .hero-copy { display: none; }
    .brand { font-size: 15px; }
    .hero-controls { gap: 6px; bottom: max(14px, env(safe-area-inset-bottom)); }

    .header-right { flex-wrap: wrap; justify-content: flex-end; }
    .newsletter-hdr { order: 1; }
    .nl-label { display: none; }
    .nl-btn { padding: 6px 10px; font-size: 13px; }
    .nl-form { right: auto; left: 50%; transform: translateX(-50%) translateY(-4px); min-width: 260px; }
    .nl-form.open { transform: translateX(-50%) translateY(0); }
}

@media (max-height: 560px) {
    .hero-copy h1 { font-size: 13px; }
    .site-header { padding-top: max(8px, env(safe-area-inset-top)); padding-bottom: 8px; }
    .hero-controls { gap: 6px; }
}
@media (max-height: 430px) {
    .hero-copy .eyebrow { display: none; }
    .hero-copy h1 { font-size: 11px; }
    .hero-controls { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 6px; bottom: max(10px, env(safe-area-inset-bottom)); }
    .band { padding: 6px 10px; font-size: 11px; }
    .btn, .flip-btn { padding: 8px 12px; font-size: 12px; }
}

/* ===== Tools Panel (pomodoro + scratch) ===== */
.tools-panel {
    position: absolute;
    z-index: 7;
    left: 50%;
    transform: translateX(-50%) translateY(12px);
    bottom: calc(max(18px, env(safe-area-inset-bottom)) + 72px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.tools-panel.open {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}
.tools-inner {
    display: flex;
    gap: 12px;
    padding: 14px 18px;
    border-radius: var(--radius-md);
    border: 1px solid var(--line-strong);
    background: linear-gradient(180deg, rgba(10, 10, 22, 0.92) 0%, rgba(6, 6, 13, 0.9) 100%);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04) inset, 0 12px 40px rgba(0, 0, 0, 0.6);
}

.tool-pomo {
    text-align: center;
    min-width: 140px;
    font-family: 'Courier New', monospace;
}
.pomo-display {
    font-size: 28px;
    color: var(--neon);
    letter-spacing: 3px;
    font-weight: bold;
    text-shadow: 0 0 8px rgba(57, 255, 20, 0.3);
}
.pomo-status {
    font-size: 10px;
    color: var(--neon);
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.6;
    margin: 2px 0 8px;
}
.pomo-controls {
    display: flex;
    gap: 6px;
    justify-content: center;
}
.pomo-btn {
    font-family: 'Courier New', monospace;
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 5px 12px;
    border: 1px solid var(--neon);
    border-radius: 4px;
    background: transparent;
    color: var(--neon);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.pomo-btn:hover {
    background: var(--neon);
    color: #000;
}
.pomo-btn:active {
    transform: scale(0.95);
}

.tool-scratch {
    min-width: 180px;
    flex: 1;
}
.tool-scratch textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    color: var(--ink-soft);
    font-family: 'Courier New', monospace;
    font-size: 12px;
    padding: 8px;
    resize: vertical;
    outline: none;
    line-height: 1.4;
}
.tool-scratch textarea::placeholder {
    color: var(--muted);
}
.tool-scratch textarea:focus {
    border-color: rgba(57, 255, 20, 0.3);
}

/* ===== Footer ===== */
.site-footer {
    position: fixed;
    z-index: 5;
    left: 0;
    right: 0;
    bottom: 0;
    text-align: center;
    padding: 8px 20px;
    padding-bottom: max(8px, env(safe-area-inset-bottom));
    pointer-events: none;
}
.site-footer a {
    font-family: 'Courier New', monospace;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.1);
    text-decoration: none;
    letter-spacing: 2px;
    transition: color 0.3s;
    pointer-events: auto;
}
.site-footer a:hover {
    color: rgba(255, 255, 255, 0.3);
}

@media (max-width: 640px) {
    .tools-inner {
        flex-direction: column;
        gap: 14px;
        padding: 14px;
    }
    .tool-pomo { min-width: 0; }
    .tool-scratch { min-width: 0; }
    .tool-scratch textarea { font-size: 11px; }
    .pomo-display { font-size: 24px; }
}

@media (max-width: 380px) {
    .tools-panel {
        left: 10px;
        right: 10px;
        transform: translateY(12px);
        bottom: calc(max(18px, env(safe-area-inset-bottom)) + 68px);
    }
    .tools-panel.open {
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
