/* 17NAS Pomodoro — Warm Study Desk & Cat Companion Design System (Stage 1) */

@font-face {
    font-family: 'PomoTimerRounded';
    src: url('/assets/pomodoro/fonts/timer-rounded-700.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0030-003A;
}

/* ===== 0. Warm Design Tokens (Light & Dark — Zero Cool Blue/Purple) ===== */
body.pomo-warm-body {
    background: #FFF8EE !important;
}
html[data-theme="dark"]:has(body.pomo-warm-body),
html.dark:has(body.pomo-warm-body),
html[data-theme="dark"] body.pomo-warm-body,
html.dark body.pomo-warm-body {
    background: #1B1714 !important;
}

/* Stage 3: Harmonize top navbar seamlessly with warm study desk & fix false "网络检测" highlight */
body.pomo-warm-body .top-navbar {
    background: #FFF8EE !important;
    border-bottom: 1px solid #EADFCF !important;
    box-shadow: none !important;
}
html[data-theme="dark"] body.pomo-warm-body .top-navbar,
html.dark body.pomo-warm-body .top-navbar {
    background: #1B1714 !important;
    border-bottom: 1px solid rgba(244, 233, 220, 0.10) !important;
}
body.pomo-warm-body .top-navbar .site-nav-network:not(.is-current) > summary {
    background: transparent !important;
    color: inherit !important;
}
body.pomo-warm-body .top-navbar .site-nav-network:not(.is-current) > summary:hover {
    background: rgba(59, 42, 32, 0.06) !important;
}
html[data-theme="dark"] body.pomo-warm-body .top-navbar .site-nav-network:not(.is-current) > summary:hover,
html.dark body.pomo-warm-body .top-navbar .site-nav-network:not(.is-current) > summary:hover {
    background: rgba(244, 233, 220, 0.08) !important;
}
body.pomo-warm-body .top-navbar .site-nav-network:not(.is-current) .site-nav-primary {
    font-weight: 500;
}

html.pomo-zen-open,
body.pomo-zen-open {
    overflow: hidden !important;
}

.pomo-workspace-root,
.pomo-modal-backdrop,
.pomo-toast,
.pomo-coffee-toast {
    --font-sans: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-timer: 'PomoTimerRounded', ui-rounded, 'SF Pro Rounded', 'PingFang SC', sans-serif;

    /* Light Mode: Warm Cream Desk */
    --bg: #FFF8EE;
    --surface: #FFFDF8;
    --surface-2: #F6EFE2;
    --surface-hover: #EFE4D2;
    --text: #3B2A20;
    --text-muted: #7C6758;
    --border: #EADFCF;
    --border-strong: #DACAB4;
    --range-track: rgba(59, 42, 32, 0.12);

    /* Primary Tomato Red + Honey Yellow + Sage Break Green */
    --accent: #E5533D;
    --accent-hover: #D44530;
    --accent-on: #FFFDF8;
    --accent-soft: rgba(229, 83, 61, 0.11);
    --accent-soft-2: rgba(229, 83, 61, 0.06);

    --honey: #F2B45A;
    --honey-soft: rgba(242, 180, 90, 0.22);
    --honey-ink: #6D4813;

    --break-accent: #5E8860;
    --break-hover: #4F7651;
    --break-on: #FFFDF8;
    --break-soft: rgba(94, 136, 96, 0.16);

    --ring-track: rgba(59, 42, 32, 0.10);
    --shadow-stage: 0 14px 40px rgba(59, 42, 32, 0.08);
    --shadow-hover: 0 10px 26px rgba(59, 42, 32, 0.09);
    --stage-bg: linear-gradient(155deg, #FFFDF8 0%, #FAF0E1 100%);
    --scrim-light: linear-gradient(180deg, rgba(255, 248, 238, 0.30) 0%, rgba(255, 248, 238, 0.14) 52%, rgba(255, 248, 238, 0.34) 100%);

    font-family: var(--font-sans);
    font-weight: 500;
    color: var(--text);
}

/* Dark Mode: Warm Espresso Black (No Blue-Black) */
html[data-theme="dark"] .pomo-workspace-root,
html.dark .pomo-workspace-root,
html[data-theme="dark"] .pomo-modal-backdrop,
html.dark .pomo-modal-backdrop,
html[data-theme="dark"] .pomo-toast,
html.dark .pomo-toast,
html[data-theme="dark"] .pomo-coffee-toast,
html.dark .pomo-coffee-toast {
    --bg: #1B1714;
    --surface: #26201B;
    --surface-2: #312922;
    --surface-hover: #3B3128;
    --text: #F4E9DC;
    --text-muted: #B6A393;
    --border: rgba(244, 233, 220, 0.10);
    --border-strong: rgba(244, 233, 220, 0.18);
    --range-track: rgba(244, 233, 220, 0.14);

    --accent: #F0694F;
    --accent-hover: #DF583E;
    --accent-on: #FFFDF8;
    --accent-soft: rgba(240, 105, 79, 0.18);
    --accent-soft-2: rgba(240, 105, 79, 0.10);

    --honey: #F2B45A;
    --honey-soft: rgba(242, 180, 90, 0.18);
    --honey-ink: #F7CB83;

    --break-accent: #8AB38B;
    --break-hover: #78A379;
    --break-on: #1B1714;
    --break-soft: rgba(138, 179, 139, 0.20);

    --ring-track: rgba(244, 233, 220, 0.12);
    --shadow-stage: 0 18px 48px rgba(8, 5, 3, 0.45);
    --shadow-hover: 0 12px 30px rgba(8, 5, 3, 0.36);
    --stage-bg: linear-gradient(155deg, #2B241E 0%, #201A16 100%);
}

/* Per-theme readability & dark-scene luminous contrast tokens (MIT WebGL2 rain & snow scenes stay crisp!) */
.pomo-stage[data-pomo-theme="rain"],
.pomo-stage[data-pomo-theme="snow"] {
    --text: #F6ECE0;
    --text-muted: #D5C4B3;
    --surface: rgba(24, 19, 17, 0.88);
    --surface-2: rgba(34, 27, 23, 0.90);
    --surface-hover: rgba(46, 37, 31, 0.94);
    --border: rgba(255, 240, 224, 0.16);
    --border-strong: rgba(255, 240, 224, 0.28);
    --ring-track: rgba(255, 240, 224, 0.18);
    --accent: #F0694F;
    --accent-hover: #DF583E;
    --accent-on: #FFFDF8;
    --break-accent: #7EB281;
    --break-hover: #6DA170;
    --break-on: #151210;
    --honey-soft: rgba(242, 180, 90, 0.22);
    --honey-ink: #FAD38C;
    --stage-bg: #141016;
    --shadow-stage: 0 20px 52px rgba(10, 7, 12, 0.34);
    color: var(--text);
}
.pomo-stage[data-pomo-theme="rain"] .pomo-stage-scrim {
    background: radial-gradient(circle at 50% 44%, rgba(16, 11, 16, 0.10) 0%, rgba(12, 8, 14, 0.24) 68%, rgba(10, 6, 12, 0.34) 100%);
    pointer-events: none;
}
.pomo-stage[data-pomo-theme="snow"] .pomo-stage-scrim {
    background: radial-gradient(circle at 50% 44%, rgba(16, 20, 44, 0.12) 0%, rgba(14, 18, 38, 0.24) 68%, rgba(10, 14, 30, 0.36) 100%);
    pointer-events: none;
}
.pomo-stage[data-pomo-theme="rain"] .pomo-ring-disc,
.pomo-stage[data-pomo-theme="snow"] .pomo-ring-disc {
    fill: #181312;
    fill-opacity: 0.74;
}
.pomo-stage[data-pomo-theme="rain"] .pomo-mode-seg,
.pomo-stage[data-pomo-theme="snow"] .pomo-mode-seg,
.pomo-stage[data-pomo-theme="rain"] .pomo-cycle-bar,
.pomo-stage[data-pomo-theme="snow"] .pomo-cycle-bar,
.pomo-stage[data-pomo-theme="rain"] .pomo-dur-summary-pill,
.pomo-stage[data-pomo-theme="snow"] .pomo-dur-summary-pill,
.pomo-stage[data-pomo-theme="rain"] .pomo-current-task-btn,
.pomo-stage[data-pomo-theme="snow"] .pomo-current-task-btn,
.pomo-stage[data-pomo-theme="rain"] .pomo-ghost-icon,
.pomo-stage[data-pomo-theme="snow"] .pomo-ghost-icon,
.pomo-stage[data-pomo-theme="rain"] .pomo-goal-pill,
.pomo-stage[data-pomo-theme="snow"] .pomo-goal-pill,
.pomo-stage[data-pomo-theme="rain"] .pomo-icon-btn,
.pomo-stage[data-pomo-theme="snow"] .pomo-icon-btn {
    background: rgba(20, 15, 16, 0.68);
    border: 1px solid rgba(255, 240, 224, 0.16);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.pomo-stage[data-pomo-theme="rain"] .pomo-mode-seg,
.pomo-stage[data-pomo-theme="snow"] .pomo-mode-seg {
    padding: 3px;
}
.pomo-stage[data-pomo-theme="rain"] .pomo-title-line h1,
.pomo-stage[data-pomo-theme="snow"] .pomo-title-line h1 {
    text-shadow: 0 2px 10px rgba(8, 6, 12, 0.55);
}
.pomo-stage[data-pomo-theme="rain"] .pomo-dur-popover,
.pomo-stage[data-pomo-theme="snow"] .pomo-dur-popover,
.pomo-stage[data-pomo-theme="rain"] .pomo-task-picker,
.pomo-stage[data-pomo-theme="snow"] .pomo-task-picker {
    background: #241E19;
    border-color: rgba(244, 233, 220, 0.16);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.55);
}
html[data-theme="dark"] .pomo-stage[data-pomo-theme="paper"] .pomo-stage-scrim,
html.dark .pomo-stage[data-pomo-theme="paper"] .pomo-stage-scrim {
    background: linear-gradient(180deg, rgba(27, 23, 20, 0.72) 0%, rgba(27, 23, 20, 0.58) 55%, rgba(27, 23, 20, 0.76) 100%);
}
html[data-theme="dark"] .pomo-stage[data-pomo-theme="paper"] .pomo-stage-bg-img,
html.dark .pomo-stage[data-pomo-theme="paper"] .pomo-stage-bg-img {
    filter: brightness(0.76) sepia(0.18);
}

/* Override site-wide dark input tint (#1a2330) with warm espresso surfaces */
html[data-theme="dark"] .pomo-workspace-root :is(input, select, textarea):not([type="checkbox"]):not([type="radio"]):not([type="range"]),
html.dark .pomo-workspace-root :is(input, select, textarea):not([type="checkbox"]):not([type="radio"]):not([type="range"]),
html[data-theme="dark"] .pomo-modal-backdrop :is(input, select, textarea):not([type="checkbox"]):not([type="radio"]):not([type="range"]),
html.dark .pomo-modal-backdrop :is(input, select, textarea):not([type="checkbox"]):not([type="radio"]):not([type="range"]) {
    background-color: var(--surface-2) !important;
    color: var(--text) !important;
    border-color: var(--border) !important;
}

/* ===== Page Container ===== */
.pomo-workspace-root {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 24px 64px;
    box-sizing: border-box;
}
.pomo-workspace-root *, .pomo-workspace-root *::before, .pomo-workspace-root *::after {
    box-sizing: border-box;
}

.pomo-workspace-root button:focus-visible,
.pomo-workspace-root input:focus-visible,
.pomo-workspace-root select:focus-visible,
.pomo-workspace-root a:focus-visible,
.pomo-workspace-root summary:focus-visible,
.pomo-modal-backdrop button:focus-visible,
.pomo-modal-backdrop input:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.pomo-workspace-root button:active:not(:disabled),
.pomo-modal-backdrop button:active:not(:disabled) {
    transform: scale(0.97);
}

/* CSS Tooltips (hover-capable pointer or keyboard focus-visible only) */
[data-tooltip] { position: relative; }
[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    padding: 5px 10px;
    border-radius: 8px;
    background: #3B2A20;
    color: #FFFDF8;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.3;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.16s ease, transform 0.16s ease;
    z-index: 60;
    box-shadow: 0 6px 18px rgba(59, 42, 32, 0.18);
}
html[data-theme="dark"] [data-tooltip]::after,
html.dark [data-tooltip]::after {
    background: #14100D;
    border: 1px solid rgba(244, 233, 220, 0.14);
}
@media (hover: hover) {
    [data-tooltip]:hover:not(:active)::after {
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) translateY(0);
    }
}
[data-tooltip]:focus-visible::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}
[data-tooltip][aria-expanded="true"]::after {
    opacity: 0 !important;
    visibility: hidden !important;
}
.pomo-stage-top [data-tooltip]::after,
.pomo-zen-exit[data-tooltip]::after,
[data-tooltip-pos="bottom"]::after {
    bottom: auto;
    top: calc(100% + 8px);
    transform: translateX(-50%) translateY(-4px);
}
@media (hover: hover) {
    .pomo-stage-top [data-tooltip]:hover:not(:active)::after,
    .pomo-zen-exit[data-tooltip]:hover:not(:active)::after,
    [data-tooltip-pos="bottom"]:hover:not(:active)::after {
        transform: translateX(-50%) translateY(0);
    }
}
.pomo-stage-top [data-tooltip]:focus-visible::after,
[data-tooltip-pos="bottom"]:focus-visible::after {
    transform: translateX(-50%) translateY(0);
}

/* ===== Banners ===== */
.pomo-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 16px;
    margin-bottom: 16px;
    border-radius: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    font-size: 13.5px;
}
.pomo-banner-inner { display: flex; align-items: center; gap: 10px; }
.pomo-banner-ico { font-size: 20px; }
.pomo-banner-inner strong { display: block; font-size: 14px; font-weight: 700; }
.pomo-banner-inner p { margin: 2px 0 0; font-size: 12.5px; color: var(--text-muted); }
.pomo-banner-actions { display: flex; align-items: center; gap: 8px; }
.pomo-sync-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft);
    flex-shrink: 0;
}
.pomo-sync-audio-btn {
    padding: 6px 12px;
    border-radius: 999px;
    border: none;
    background: var(--accent);
    color: var(--accent-on);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}
.pomo-btn-ghost {
    width: 32px; height: 32px; border-radius: 10px; border: none;
    background: transparent; color: var(--text-muted);
    font-size: 20px; line-height: 1; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    transition: background 0.16s ease, color 0.16s ease;
}
.pomo-btn-ghost:hover { background: var(--surface-hover); color: var(--text); }

/* ===== 1. Workbench Grid (Stage + Side Panel) ===== */
.pomo-workbench {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 24px;
    align-items: stretch;
    margin-bottom: 40px;
}

/* ===== Stage (Fixed Height 640px, Zero Layout Shift Across All 5 States) ===== */
.pomo-stage {
    --stage-accent: var(--accent);
    --stage-accent-hover: var(--accent-hover);
    --stage-accent-on: var(--accent-on);
    --stage-accent-soft: var(--accent-soft);

    position: relative;
    display: flex;
    flex-direction: column;
    height: 640px;
    padding: 24px;
    border-radius: 28px;
    background: var(--stage-bg);
    box-shadow: var(--shadow-stage);
    overflow: visible; /* allows sticker cat feet to peek gently over bottom edge */
    transition: background 0.3s ease;
}

.pomo-stage[data-phase="short"],
.pomo-stage[data-phase="long"] {
    --stage-accent: var(--break-accent);
    --stage-accent-hover: var(--break-hover);
    --stage-accent-on: var(--break-on);
    --stage-accent-soft: var(--break-soft);
}

/* Inner clipped layer for MIT WebGL2 scenes, warm paper texture, subtle scrim & confetti */
.pomo-stage-bg-clip {
    position: absolute;
    inset: 0;
    border-radius: 28px;
    overflow: hidden;
    pointer-events: auto;
    z-index: 0;
}
.pomo-stage-bg-clip [data-ld-part="wallpaper-rain-window"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}
.pomo-stage-bg-clip [data-ld-part="wallpaper-rain-window"]::before {
    display: none;
    height: 0;
}
.pomo-stage-bg-clip [data-ld-part="wallpaper-rain-window"] .sound {
    display: none !important;
}
.pomo-stage-bg-clip [data-ld-part="wallpaper-rain-window"][data-palette="study"] {
    --ld-bg: #ffbe6b;
    --ld-surface: #69c2ad;
    --ld-fg: #16100d;
    --ld-muted: #4b5d82;
    --ld-accent: #e56b55;
}
.pomo-stage-bg-clip [data-ld-part="wallpaper-snow-cabin"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}
.pomo-stage-bg-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.78;
    pointer-events: none;
    transition: opacity 0.35s ease;
}
.pomo-stage-scrim {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: var(--scrim-light);
    pointer-events: none;
    transition: background 0.35s ease;
}
.pomo-confetti-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    pointer-events: none;
}

/* ① Top Bar (Minimal: Logo + Title + Goal Pill | Theme + Fullscreen) */
.pomo-stage-top {
    position: relative;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-shrink: 0;
}

.pomo-brand-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.pomo-logo {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    flex-shrink: 0;
}
.pomo-title-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.pomo-title-line h1 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--text);
    white-space: nowrap;
}

.pomo-goal-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 999px;
    border: none;
    background: rgba(255, 253, 248, 0.78);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.3;
    cursor: pointer;
    transition: background 0.16s ease, color 0.16s ease;
    max-width: 210px;
}
html[data-theme="dark"] .pomo-goal-pill,
html.dark .pomo-goal-pill {
    background: rgba(38, 32, 27, 0.75);
}
.pomo-goal-pill span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.pomo-goal-pill:hover {
    background: var(--honey-soft);
    color: var(--honey-ink);
}
.pomo-goal-pill.is-set {
    background: var(--honey-soft);
    color: var(--honey-ink);
    font-weight: 700;
}

.pomo-top-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.pomo-icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    border: none;
    background: rgba(255, 253, 248, 0.80);
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.16s ease, color 0.16s ease, transform 0.15s ease;
}
html[data-theme="dark"] .pomo-icon-btn,
html.dark .pomo-icon-btn {
    background: rgba(38, 32, 27, 0.78);
}
.pomo-icon-btn:hover,
.pomo-icon-btn[aria-expanded="true"] {
    background: var(--surface);
    color: var(--stage-accent);
}

/* Inline 3-Scene Switcher Pills & Snow Cabin Mood Micro-Bar */
.pomo-scene-pills {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    border-radius: 999px;
    background: rgba(255, 253, 248, 0.84);
    border: 1px solid var(--border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
html[data-theme="dark"] .pomo-scene-pills,
html.dark .pomo-scene-pills,
.pomo-stage[data-pomo-theme="rain"] .pomo-scene-pills,
.pomo-stage[data-pomo-theme="snow"] .pomo-scene-pills {
    background: rgba(20, 15, 16, 0.70);
    border-color: rgba(255, 240, 224, 0.16);
}
.pomo-scene-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.16s ease, color 0.16s ease;
}
.pomo-scene-pill:hover {
    color: var(--text);
}
.pomo-scene-pill.active {
    background: var(--stage-accent);
    color: var(--stage-accent-on);
    font-weight: 700;
}
.pomo-scene-ico {
    font-size: 13px;
    line-height: 1;
}
.pomo-cabin-mood {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    border-radius: 999px;
    background: rgba(20, 15, 16, 0.70);
    border: 1px solid rgba(255, 240, 224, 0.16);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.pomo-cabin-mood[hidden] { display: none; }
.pomo-mood-chip {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: none;
    background: transparent;
    font-size: 13px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0.65;
    transition: background 0.16s ease, opacity 0.16s ease, transform 0.12s ease;
}
.pomo-mood-chip:hover { opacity: 1; }
.pomo-mood-chip.active {
    background: rgba(255, 212, 138, 0.24);
    opacity: 1;
}

/* ===== Stage Core (Strict Fixed Vertical Flow, Zero Layout Shift, Lets Background Glass Receive Pointer Events) ===== */
.pomo-stage-core {
    position: relative;
    z-index: 8;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 8px 0 4px;
    pointer-events: none;
}
.pomo-stage-core .pomo-mode-seg,
.pomo-stage-core .pomo-ring-meta,
.pomo-stage-core .pomo-current-task-wrap,
.pomo-stage-core .pomo-actions-block {
    pointer-events: auto;
}

/* ② Mode Tabs Pill */
.pomo-mode-seg {
    display: inline-flex;
    align-items: center;
    padding: 4px;
    border-radius: 999px;
    background: rgba(255, 253, 248, 0.86);
    gap: 4px;
}
html[data-theme="dark"] .pomo-mode-seg,
html.dark .pomo-mode-seg {
    background: rgba(38, 32, 27, 0.86);
}
.pomo-mode-btn {
    padding: 7px 18px;
    border-radius: 999px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.18s ease, color 0.18s ease;
}
.pomo-mode-btn:hover { color: var(--text); }
.pomo-mode-btn.active {
    background: var(--stage-accent);
    color: var(--stage-accent-on);
    font-weight: 700;
}

/* ③ Brand Tomato Ring Timer (Fixed 272px across ALL 5 states — Zero Resize!) */
.pomo-clock-wrap {
    position: relative;
    width: 272px;
    height: 272px;
    margin-top: 8px; /* breathing room for tomato leaf */
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pomo-ring-leaf {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 52px;
    height: 26px;
    z-index: 3;
    pointer-events: none;
    filter: drop-shadow(0 2px 4px rgba(59, 42, 32, 0.12));
}

.pomo-ring-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
    overflow: visible;
}
.pomo-ring-disc {
    fill: var(--surface);
    fill-opacity: 0.86;
    transition: fill 0.25s ease;
}
.pomo-ring-track {
    fill: none;
    stroke: var(--ring-track);
    stroke-width: 10;
}
.pomo-ring-progress {
    fill: none;
    stroke: var(--stage-accent);
    stroke-width: 10;
    stroke-linecap: round;
    stroke-dasharray: 804.2477;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1s linear, stroke 0.25s ease, opacity 0.25s ease, filter 0.25s ease;
}

/* Exact 5-State Ring Treatment */
.pomo-stage[data-status="idle"] .pomo-ring-progress {
    opacity: 0.34;
    transition: stroke-dashoffset 0.25s ease, stroke 0.25s ease, opacity 0.25s ease;
}
/* Paused: keeps original stage accent color at 60% opacity (NEVER gray!) */
.pomo-stage[data-status="paused"] .pomo-ring-progress {
    stroke: var(--stage-accent);
    opacity: 0.60;
}
.pomo-stage[data-status="running"] .pomo-clock-wrap.is-ending .pomo-ring-progress {
    animation: pomo-ring-breathe 1.2s ease-in-out infinite;
}
.pomo-stage[data-status="completed"] .pomo-ring-progress {
    opacity: 1;
    filter: drop-shadow(0 0 12px var(--stage-accent));
}
@keyframes pomo-ring-breathe {
    0%, 100% { stroke-width: 10; opacity: 1; }
    50% { stroke-width: 12; opacity: 0.80; }
}

.pomo-clock-inner {
    position: absolute;
    inset: 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    pointer-events: none;
}

.pomo-time-display {
    font-family: var(--font-timer);
    font-size: clamp(72px, 5.4vw, 80px);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    color: var(--text);
}

.pomo-status-label {
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}
.pomo-stage[data-status="running"] .pomo-status-label,
.pomo-stage[data-status="completed"] .pomo-status-label {
    color: var(--stage-accent);
    font-weight: 700;
}

/* Ring Meta Row: Tomato Cycle Dots + Compact Collapsible Duration Pill */
.pomo-ring-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    min-height: 30px;
}

.pomo-cycle-bar {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(255, 253, 248, 0.80);
    cursor: default;
}
html[data-theme="dark"] .pomo-cycle-bar,
html.dark .pomo-cycle-bar {
    background: rgba(38, 32, 27, 0.80);
}
.pomo-cycle-dots {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.pomo-cdot {
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--border-strong);
    transition: color 0.2s ease, transform 0.2s ease;
}
.pomo-cdot svg { width: 15px; height: 15px; display: block; }
.pomo-cdot.is-done { color: var(--stage-accent); }
.pomo-cdot.is-current { color: var(--stage-accent); }
.pomo-cycle-text {
    font-size: 12.5px;
    font-weight: 500;
    color: var(--text-muted);
}

/* Duration Summary Pill & Floating Popover (Zero Stage Height Change!) */
.pomo-dur-anchor {
    position: relative;
    z-index: 16;
}
.pomo-dur-summary-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    border: none;
    background: rgba(255, 253, 248, 0.82);
    color: var(--text);
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.16s ease, color 0.16s ease, opacity 0.2s ease;
}
html[data-theme="dark"] .pomo-dur-summary-pill,
html.dark .pomo-dur-summary-pill {
    background: rgba(38, 32, 27, 0.82);
}
.pomo-dur-summary-pill:hover {
    background: var(--surface);
    color: var(--stage-accent);
}
.pomo-dur-edit-ico { opacity: 0.65; }
.pomo-stage[data-status="running"] .pomo-dur-summary-pill,
.pomo-stage[data-status="paused"] .pomo-dur-summary-pill {
    opacity: 0.62;
    pointer-events: none;
}

.pomo-dur-popover {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    left: auto;
    width: 356px;
    max-width: calc(100vw - 48px);
    padding: 16px;
    border-radius: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: 0 18px 44px rgba(59, 42, 32, 0.16);
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 40;
    animation: pomo-pop-in 0.16s ease;
}
.pomo-dur-popover[hidden] { display: none; }
html[data-theme="dark"] .pomo-dur-popover,
html.dark .pomo-dur-popover {
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.55);
}

.pomo-dur-row {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    width: 100%;
}
.pomo-dur-lbl {
    width: 40px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    text-align: right;
    white-space: nowrap;
}
.pomo-dur-group {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: center;
    gap: 4px;
    width: 100%;
    padding: 3px;
    border-radius: 14px;
    background: var(--surface-2);
}
.pomo-seg-chip {
    min-width: 0;
    width: 100%;
    height: 30px;
    padding: 0 4px;
    border-radius: 10px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 12.5px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease;
}
#pomoBreakPresets .pomo-seg-chip[data-bmins="0"] { grid-column: span 2; }
.pomo-seg-chip:hover { color: var(--text); background: var(--surface); }
.pomo-seg-chip.active {
    background: var(--stage-accent);
    color: var(--stage-accent-on);
    font-weight: 700;
}

.pomo-custom-stepper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    width: 100%;
    height: 36px;
    padding: 3px 6px;
    border-radius: 14px;
    background: var(--surface-2);
    border: 1.5px solid var(--stage-accent);
}
.pomo-custom-stepper[hidden] { display: none; }
.pomo-stepper-btn,
.pomo-stepper-close {
    width: 28px; height: 28px; border-radius: 9px; border: none;
    background: var(--surface); color: var(--text);
    font-size: 15px; font-weight: 700; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
}
.pomo-stepper-close { background: var(--stage-accent); color: var(--stage-accent-on); font-size: 13px; }
.pomo-stepper-field {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 12.5px; color: var(--text-muted); margin: 0;
}
.pomo-stepper-field input {
    width: 46px; height: 26px; border: none; background: transparent;
    color: var(--text); font-size: 14px; font-weight: 700; text-align: center;
    font-variant-numeric: tabular-nums; -moz-appearance: textfield;
}
.pomo-stepper-field input::-webkit-inner-spin-button,
.pomo-stepper-field input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* ④ Current Task Pill */
.pomo-current-task-wrap {
    position: relative;
    z-index: 12;
}
.pomo-current-task-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: min(360px, 78vw);
    height: 36px;
    padding: 0 16px;
    border-radius: 999px;
    border: none;
    background: rgba(255, 253, 248, 0.86);
    color: var(--text-muted);
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.16s ease, color 0.16s ease;
}
html[data-theme="dark"] .pomo-current-task-btn,
html.dark .pomo-current-task-btn {
    background: rgba(38, 32, 27, 0.86);
}
.pomo-current-task-btn:hover { background: var(--surface); color: var(--text); }
.pomo-current-task-btn.has-task { color: var(--text); font-weight: 700; }
.pomo-ct-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--border-strong); flex-shrink: 0;
}
.pomo-current-task-btn.has-task .pomo-ct-dot { background: var(--stage-accent); }
.pomo-ct-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pomo-ct-chev { flex-shrink: 0; opacity: 0.65; transition: transform 0.16s ease; }
.pomo-current-task-btn[aria-expanded="true"] .pomo-ct-chev { transform: rotate(180deg); }

.pomo-task-picker {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    width: 280px;
    max-height: 230px;
    overflow-y: auto;
    padding: 6px;
    border-radius: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: 0 14px 36px rgba(59, 42, 32, 0.16);
    z-index: 35;
}
.pomo-picker-item {
    width: 100%; display: flex; align-items: center; justify-content: space-between;
    gap: 8px; padding: 8px 10px; border-radius: 10px; border: none;
    background: transparent; color: var(--text); font-size: 13px; font-weight: 500;
    text-align: left; cursor: pointer;
}
.pomo-picker-item:hover { background: var(--surface-2); }
.pomo-picker-item.is-selected { background: var(--stage-accent-soft); color: var(--stage-accent); font-weight: 700; }
.pomo-picker-item.is-action { color: var(--stage-accent); font-weight: 700; border-top: 1px solid var(--border); margin-top: 4px; padding-top: 9px; border-radius: 0 0 10px 10px; }
.pomo-picker-item-txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pomo-picker-pomo { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; color: var(--stage-accent); flex-shrink: 0; }

/* ⑤ Action Row: ONE Primary Tomato Button + TWO Ghost Icon Buttons */
.pomo-actions-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 54px;
    justify-content: center;
    margin-top: 8px;
}
.pomo-actions-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.pomo-btn-primary {
    min-width: 196px;
    height: 54px;
    padding: 0 28px;
    border-radius: 999px;
    border: none;
    background: var(--stage-accent);
    color: var(--stage-accent-on);
    font-size: 16px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 10px 24px -8px rgba(229, 83, 61, 0.45);
    transition: background 0.16s ease, transform 0.15s ease, box-shadow 0.2s ease;
}
.pomo-stage[data-phase="short"] .pomo-btn-primary,
.pomo-stage[data-phase="long"] .pomo-btn-primary {
    box-shadow: 0 10px 24px -8px rgba(123, 163, 124, 0.45);
}
.pomo-btn-primary:hover {
    background: var(--stage-accent-hover);
}

.pomo-ghost-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.pomo-ghost-icon {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: none;
    background: rgba(255, 253, 248, 0.72);
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.16s ease, color 0.16s ease, transform 0.15s ease;
}
html[data-theme="dark"] .pomo-ghost-icon,
html.dark .pomo-ghost-icon {
    background: rgba(38, 32, 27, 0.72);
}
.pomo-ghost-icon:hover {
    background: var(--surface);
    color: var(--stage-accent);
}

/* ⑥ Living Hand-Drawn Cat Companion (Bottom-Left Hero, 28-Frame Sprite Atlas + Spring Physics) */
.pomo-cat-companion {
    position: absolute;
    left: 16px;
    bottom: 6px;
    z-index: 9;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    pointer-events: none;
}
.pomo-cat-companion.is-hidden { display: none; }
.pomo-living-cat-mount {
    position: relative;
    display: inline-flex;
    align-items: flex-end;
    justify-content: center;
    pointer-events: none;
}

.living-cat-host {
    position: relative;
    display: inline-flex;
    align-items: flex-end;
    justify-content: center;
    pointer-events: none;
}
.living-cat-interactive {
    position: relative;
    width: 192px;
    height: 192px;
    cursor: pointer;
    outline: none;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    pointer-events: auto;
}
.living-cat-interactive:focus-visible {
    outline: 2.5px solid var(--stage-accent, #E5533D);
    outline-offset: 4px;
    border-radius: 22px;
}
.living-cat-rig-slot {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

/* Living Cat Speech Bubble */
.living-cat-bubble {
    position: absolute;
    left: 50%;
    top: -10px;
    transform: translateX(-50%) translateY(6px) scale(0.94);
    padding: 6px 13px;
    border-radius: 999px;
    background: #FFFDF8;
    border: 1.5px solid #EADFCF;
    box-shadow: 0 8px 22px rgba(59, 42, 32, 0.14);
    color: #3B2A20;
    font-size: 12.5px;
    font-weight: 700;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 14;
}
.living-cat-bubble::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -6px;
    width: 10px;
    height: 10px;
    background: #FFFDF8;
    border-right: 1.5px solid #EADFCF;
    border-bottom: 1.5px solid #EADFCF;
    transform: translateX(-50%) rotate(45deg);
}
.living-cat-bubble.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
}
html[data-theme="dark"] .living-cat-bubble,
html.dark .living-cat-bubble,
.pomo-stage[data-pomo-theme="rain"] .living-cat-bubble,
.pomo-stage[data-pomo-theme="snow"] .living-cat-bubble {
    background: #2C241E;
    border-color: rgba(244, 233, 220, 0.18);
    color: #F4E9DC;
}
html[data-theme="dark"] .living-cat-bubble::after,
html.dark .living-cat-bubble::after,
.pomo-stage[data-pomo-theme="rain"] .living-cat-bubble::after,
.pomo-stage[data-pomo-theme="snow"] .living-cat-bubble::after {
    background: #2C241E;
    border-color: rgba(244, 233, 220, 0.18);
}

/* Living Cat Floating Hearts / Notes / Starlight Particles */
.living-cat-particles {
    position: absolute;
    inset: -24px -18px 0;
    pointer-events: none;
    overflow: visible;
    z-index: 12;
}
.cat-particle {
    position: absolute;
    display: inline-flex;
    opacity: 0;
    animation: cat-particle-float 1.15s cubic-bezier(0.2, 0.8, 0.25, 1) forwards;
}
@keyframes cat-particle-float {
    0% { opacity: 0; transform: translate(0, 6px) scale(0.55); }
    18% { opacity: 1; transform: translate(calc(var(--dx, 0px) * 0.35), -10px) scale(1.08); }
    100% { opacity: 0; transform: translate(var(--dx, 0px), -58px) scale(0.82); }
}

/* Sprite-Gen 28-Frame Anchored Atlas + Spring Physics Overlay */
.living-cat-sprite-rig {
    position: relative;
    width: 100%;
    height: 100%;
}
.sprite-ground-shadow {
    position: absolute;
    left: 53%;
    bottom: 7px;
    width: 68%;
    height: 16px;
    transform: translateX(-50%);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(16, 10, 12, 0.48) 0%, rgba(18, 10, 14, 0.18) 56%, rgba(18, 10, 14, 0) 78%);
    pointer-events: none;
}
.pomo-stage[data-pomo-theme="paper"] .sprite-ground-shadow {
    background: radial-gradient(circle, rgba(91, 60, 41, 0.24) 0%, rgba(91, 60, 41, 0.08) 56%, rgba(91, 60, 41, 0) 78%);
}
.sprite-body-transform {
    position: relative;
    width: 100%;
    height: 100%;
    transform-origin: 54% 91%;
    will-change: transform;
}
.sprite-frame-view {
    width: 100%;
    height: 100%;
    background-repeat: no-repeat;
    background-size: 400% 700%;
    background-position: 0% 0%;
    filter: var(--cat-ambient-filter, brightness(0.92) contrast(1.03) sepia(0.10) saturate(1.04) drop-shadow(0 6px 12px rgba(12, 7, 12, 0.42)));
    transition: filter 0.55s ease;
    pointer-events: none;
}
.pomo-stage[data-pomo-theme="paper"] .sprite-frame-view {
    --cat-ambient-filter: brightness(1.0) contrast(1.0) drop-shadow(0 6px 12px rgba(59, 42, 32, 0.14));
}
.pomo-stage[data-pomo-theme="snow"] .sprite-frame-view {
    --cat-ambient-filter: brightness(0.90) contrast(1.04) saturate(1.02) drop-shadow(0 7px 14px rgba(10, 14, 34, 0.52));
}
.sprite-hit {
    position: absolute;
    cursor: pointer;
}
.sprite-hit-head { left: 28%; top: 10%; width: 52%; height: 42%; border-radius: 50%; }
.sprite-hit-body { left: 26%; top: 48%; width: 54%; height: 44%; border-radius: 24px; }
.sprite-hit-tail { left: 6%; top: 38%; width: 24%; height: 48%; border-radius: 20px; }

.sprite-zzz {
    position: absolute;
    right: 16px;
    top: 48px;
    display: flex;
    gap: 5px;
    font-family: ui-rounded, 'SF Pro Rounded', sans-serif;
    font-weight: 700;
    color: #E8D5C2;
    text-shadow: 0 2px 6px rgba(24, 16, 10, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.pomo-stage[data-pomo-theme="paper"] .sprite-zzz {
    color: #7C6758;
    text-shadow: none;
}
.sprite-zzz.is-active { opacity: 1; }
.sprite-zzz.is-active span {
    display: inline-block;
    animation: sprite-zzz-float 2.4s ease-in-out infinite;
}
.sprite-zzz span:nth-child(1) { font-size: 13px; animation-delay: 0s; }
.sprite-zzz span:nth-child(2) { font-size: 18px; animation-delay: 0.45s; }
.sprite-zzz span:nth-child(3) { font-size: 14px; animation-delay: 0.9s; }
@keyframes sprite-zzz-float {
    0% { opacity: 0; transform: translate(0, 8px) scale(0.85); }
    45% { opacity: 1; transform: translate(6px, -10px) scale(1.05); }
    100% { opacity: 0; transform: translate(14px, -26px) scale(0.9); }
}

.pomo-empty-svg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    border-radius: 18px;
    background: var(--surface-2);
    color: var(--text-muted);
    margin-bottom: 10px;
}

/* ===== Fullscreen Zen Mode (Clean Full-Bleed BG, No Dark Inner Box, 220px Cat) ===== */
.pomo-zen-exit {
    display: none;
    position: absolute;
    top: 24px;
    right: 24px;
    z-index: 30;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: opacity 0.35s ease, color 0.16s ease;
}
.pomo-zen-exit:hover { color: var(--stage-accent); }

.pomo-stage.is-zen {
    position: fixed;
    inset: 0;
    z-index: 9500;
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    padding: 40px;
    margin: 0;
    box-shadow: none;
}
.pomo-stage.is-zen .pomo-stage-bg-clip { border-radius: 0; }
.pomo-stage.is-zen .pomo-stage-bg-img { opacity: 0.90; }
.pomo-stage.is-zen .pomo-zen-exit { display: inline-flex; }
.pomo-stage.is-zen .pomo-stage-top,
.pomo-stage.is-zen .pomo-mode-seg,
.pomo-stage.is-zen .pomo-ring-meta { display: none !important; }
.pomo-stage.is-zen .pomo-stage-core { gap: 24px; }
.pomo-stage.is-zen .pomo-clock-wrap { width: 312px; height: 312px; }
.pomo-stage.is-zen .pomo-time-display { font-size: 88px; }
.pomo-stage.is-zen .pomo-cat-companion { left: 36px; bottom: 20px; }
.pomo-stage.is-zen .living-cat-interactive { width: 224px; height: 224px; }
.pomo-stage.is-zen .pomo-actions-block,
.pomo-stage.is-zen .pomo-zen-exit,
.pomo-stage.is-zen .pomo-current-task-wrap { transition: opacity 0.4s ease; }
.pomo-stage.is-zen.zen-idle .pomo-actions-block,
.pomo-stage.is-zen.zen-idle .pomo-zen-exit,
.pomo-stage.is-zen.zen-idle .pomo-current-task-wrap {
    opacity: 0;
    pointer-events: none;
}

/* ===== Side Panel (Harmonized Warm Tokens, Equal Height 640px) ===== */
.pomo-side-panel {
    display: flex;
    flex-direction: column;
    height: 640px;
    border-radius: 28px;
    background: var(--surface);
    border: 1px solid var(--border);
    overflow: hidden;
}

.pomo-panel-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    padding: 0 8px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.pomo-tab-btn {
    position: relative;
    height: 48px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: color 0.16s ease;
}
.pomo-tab-btn:hover { color: var(--text); }
.pomo-tab-btn.active { color: var(--accent); font-weight: 700; }
.pomo-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 18px;
    right: 18px;
    height: 2.5px;
    border-radius: 2px 2px 0 0;
    background: var(--accent);
}
.pomo-tab-badge {
    padding: 1px 6px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 11px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.pomo-tab-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

.pomo-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
}
.pomo-tab-pane { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.pomo-tab-pane[hidden] { display: none; }

/* Tasks Tab */
.pomo-pane-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.pomo-tasks-summary { font-size: 12px; font-weight: 500; color: var(--text-muted); }
.pomo-text-btn { border: none; background: transparent; color: var(--text-muted); font-size: 12px; font-weight: 500; cursor: pointer; padding: 2px 6px; border-radius: 8px; }
.pomo-text-btn:hover { color: var(--accent); background: var(--accent-soft); }

.pomo-task-form { display: flex; gap: 8px; margin-bottom: 14px; }
.pomo-input {
    flex: 1; min-width: 0; height: 40px; padding: 0 12px;
    border-radius: 14px; border: 1px solid var(--border);
    background: var(--surface-2); color: var(--text); font-size: 13.5px; font-weight: 500;
    transition: border-color 0.16s ease, background 0.16s ease;
}
.pomo-input:focus { outline: none; border-color: var(--accent); background: var(--surface); }

.pomo-btn-accent {
    height: 40px; padding: 0 16px; border-radius: 14px; border: none;
    background: var(--accent); color: var(--accent-on); font-size: 13.5px; font-weight: 700;
    cursor: pointer; white-space: nowrap; transition: background 0.16s ease;
}
.pomo-btn-accent:hover { background: var(--accent-hover); }

.pomo-task-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.pomo-task-item {
    display: flex; align-items: center; gap: 10px; padding: 10px 12px;
    border-radius: 14px; background: var(--surface-2); border: 1px solid transparent;
    cursor: pointer; transition: background 0.16s ease, border-color 0.16s ease;
}
.pomo-task-item:hover { background: var(--surface-hover); }
.pomo-task-item.is-active { background: var(--accent-soft-2); border-color: var(--accent); }

.pomo-task-chk {
    width: 19px; height: 19px; border-radius: 50%; border: 1.8px solid var(--border-strong);
    background: transparent; color: var(--accent-on); font-size: 11px; font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; cursor: pointer; padding: 0;
}
.pomo-task-chk:hover { border-color: var(--accent); }
.pomo-task-item.is-done .pomo-task-chk { background: var(--accent); border-color: var(--accent); }

.pomo-task-text { flex: 1; min-width: 0; font-size: 13.5px; line-height: 1.4; color: var(--text); word-break: break-word; }
.pomo-task-item.is-done { opacity: 0.66; }
.pomo-task-item.is-done .pomo-task-text { text-decoration: line-through; color: var(--text-muted); }

.pomo-task-active-tag {
    font-size: 11px; font-weight: 700; color: var(--accent-on); background: var(--accent);
    padding: 2px 7px; border-radius: 999px; flex-shrink: 0;
}
.pomo-task-pomos {
    display: inline-flex; align-items: center; gap: 3px;
    font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums;
    color: var(--accent); background: var(--accent-soft); padding: 2px 8px; border-radius: 999px; flex-shrink: 0;
}
.pomo-task-pomos.is-zero { color: var(--text-muted); background: transparent; padding: 2px 4px; opacity: 0.72; }
.pomo-brand-tom-ico { width: 14px; height: 14px; display: inline-block; flex-shrink: 0; color: currentColor; }

.pomo-task-del {
    width: 24px; height: 24px; border-radius: 8px; border: none; background: transparent;
    color: var(--text-muted); font-size: 16px; line-height: 1;
    display: inline-flex; align-items: center; justify-content: center; cursor: pointer; opacity: 0.45;
}
.pomo-task-item:hover .pomo-task-del, .pomo-task-del:focus-visible { opacity: 1; }
.pomo-task-del:hover { color: var(--accent); background: var(--accent-soft); }

.pomo-task-empty {
    margin: auto 0; padding: 20px 8px 14px; text-align: center;
    display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.pomo-empty-img { width: 132px; height: auto; display: block; object-fit: contain; }
.pomo-task-empty p { margin: 0; font-size: 13px; line-height: 1.55; color: var(--text-muted); max-width: 240px; }

.pomo-quick-add-box {
    margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border);
    display: flex; flex-direction: column; gap: 8px;
}
.pomo-quick-add-lbl { font-size: 12px; font-weight: 500; color: var(--text-muted); }
.pomo-suggest-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pomo-suggest-chip {
    padding: 5px 10px; border-radius: 999px; border: none;
    background: var(--surface-2); color: var(--text); font-size: 12px; font-weight: 500; cursor: pointer;
    transition: background 0.16s ease, color 0.16s ease;
}
.pomo-suggest-chip:hover { background: var(--accent-soft); color: var(--accent); }

/* Sounds Tab */
.pomo-pane-sub { margin: 0 0 12px; font-size: 12px; color: var(--text-muted); }
.pomo-sound-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.pomo-preset-pill {
    padding: 6px 12px; border-radius: 999px; border: none;
    background: var(--surface-2); color: var(--text-muted); font-size: 12px; font-weight: 500; cursor: pointer;
}
.pomo-preset-pill:hover { color: var(--text); background: var(--surface-hover); }
.pomo-preset-pill.active { background: var(--accent-soft); color: var(--accent); font-weight: 700; }

.pomo-sound-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.pomo-sound-row {
    display: grid; grid-template-columns: 116px 1fr; align-items: center; gap: 10px;
    height: 52px; padding: 0 10px; border-radius: 14px; background: var(--surface-2);
    border: 1px solid transparent; transition: background 0.18s ease, border-color 0.18s ease;
}
.pomo-sound-row.is-on { background: var(--accent-soft-2); border-color: var(--accent-soft); }
.pomo-sound-toggle {
    display: inline-flex; align-items: center; gap: 8px; border: none; background: transparent;
    color: var(--text); font-size: 13px; font-weight: 500; cursor: pointer; padding: 0; min-width: 0; text-align: left;
}
.pomo-snd-svg {
    width: 32px; height: 32px; border-radius: 10px; background: var(--surface);
    color: var(--text-muted); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.pomo-sound-row.is-on .pomo-snd-svg { background: var(--accent-soft); color: var(--accent); }
.pomo-snd-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.pomo-range-wrap { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; }
.pomo-range {
    -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 999px;
    background: linear-gradient(to right, var(--accent) 0%, var(--accent) var(--val, 0%), var(--range-track) var(--val, 0%), var(--range-track) 100%);
    outline: none; cursor: pointer;
}
.pomo-range::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none; width: 15px; height: 15px; border-radius: 50%;
    background: var(--accent); border: 2px solid var(--surface); box-shadow: 0 1px 4px rgba(59, 42, 32, 0.22); cursor: pointer;
}
.pomo-range::-moz-range-thumb {
    width: 15px; height: 15px; border-radius: 50%; background: var(--accent); border: 2px solid var(--surface); cursor: pointer;
}
.pomo-range::-moz-range-track { background: transparent; }

.pomo-snd-pct {
    width: 34px; text-align: right; font-size: 11.5px; font-weight: 700;
    font-variant-numeric: tabular-nums; color: var(--accent); opacity: 0; transition: opacity 0.15s ease; flex-shrink: 0;
}
.pomo-sound-row:hover .pomo-snd-pct, .pomo-sound-row:focus-within .pomo-snd-pct,
.pomo-master-row:hover .pomo-snd-pct, .pomo-master-row:focus-within .pomo-snd-pct { opacity: 1; }

.pomo-sound-footer { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 12px; }
.pomo-master-row { display: flex; align-items: center; gap: 10px; }
.pomo-master-lbl, .pomo-chime-lbl { font-size: 12.5px; font-weight: 500; color: var(--text-muted); white-space: nowrap; }
.pomo-chime-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pomo-chime-controls { display: flex; align-items: center; gap: 6px; }
.pomo-select {
    height: 32px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--border);
    background: var(--surface-2); color: var(--text); font-size: 12.5px; font-weight: 500; cursor: pointer;
}
.pomo-btn-outline-sm {
    height: 32px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--border);
    background: var(--surface); color: var(--text); font-size: 12px; font-weight: 500; cursor: pointer; white-space: nowrap;
}
.pomo-btn-outline-sm:hover { border-color: var(--accent); color: var(--accent); }

/* Settings Tab */
.pomo-set-group { margin-bottom: 16px; }
.pomo-set-heading { margin: 0 0 8px 2px; font-size: 12px; font-weight: 700; color: var(--text-muted); }
.pomo-set-row {
    position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 10px 12px; border-radius: 14px; background: var(--surface-2); margin-bottom: 6px;
    cursor: pointer; user-select: none;
}
.pomo-set-row:last-child { margin-bottom: 0; }
.pomo-set-select-row { cursor: default; }
.pomo-set-row-desc { align-items: flex-start; }
.pomo-set-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pomo-set-text strong { font-size: 13.5px; font-weight: 500; color: var(--text); }
.pomo-set-text small { font-size: 12px; line-height: 1.45; color: var(--text-muted); }
.pomo-set-title-line { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.pomo-set-ico { color: var(--accent); flex-shrink: 0; }
.pomo-exp-tag { padding: 1px 7px; border-radius: 999px; background: var(--honey-soft); color: var(--honey-ink); font-size: 11px; font-weight: 700; }
.pomo-notify-meta { display: inline-flex; align-items: center; gap: 8px; }
.pomo-perm-badge { font-size: 11.5px; color: var(--text-muted); }
.pomo-perm-badge.is-granted { color: var(--accent); font-weight: 700; }
.pomo-inline-link { border: none; background: transparent; color: var(--accent); font-size: 11.5px; font-weight: 700; padding: 0; cursor: pointer; text-decoration: underline; }
.pomo-set-row input[type="checkbox"] { position: absolute; opacity: 0; width: 0; height: 0; }
.pomo-switch {
    position: relative; width: 38px; height: 22px; border-radius: 999px;
    background: var(--border-strong); flex-shrink: 0; transition: background 0.18s ease; margin-top: 1px;
}
.pomo-switch::after {
    content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%;
    background: #FFFDF8; box-shadow: 0 1px 3px rgba(59, 42, 32, 0.22); transition: transform 0.18s ease;
}
.pomo-set-row input:checked + .pomo-switch { background: var(--accent); }
.pomo-set-row input:checked + .pomo-switch::after { transform: translateX(16px); }

.pomo-set-footer { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.pomo-set-shortcuts { margin: 0 0 2px; font-size: 11.5px; color: var(--text-muted); text-align: center; }
.pomo-btn-secondary-full {
    width: 100%; height: 38px; border-radius: 14px; border: 1px solid var(--border);
    background: var(--surface); color: var(--text); font-size: 13px; font-weight: 500;
    display: inline-flex; align-items: center; justify-content: center; gap: 7px; cursor: pointer;
}
.pomo-btn-secondary-full:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft-2); }
.pomo-reset-link { border: none; background: transparent; color: var(--text-muted); font-size: 12px; cursor: pointer; padding: 4px 8px; }
.pomo-reset-link:hover { color: var(--text); text-decoration: underline; }

/* ===== 2. Below-Fold Cards (Warm Tokens Harmonized) ===== */
.pomo-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: 24px;
    margin-bottom: 40px;
}
.pomo-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.pomo-card-head h2 { margin: 0; font-size: 16px; font-weight: 700; color: var(--text); }
.pomo-btn-outline {
    height: 36px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--border);
    background: var(--surface); color: var(--text); font-size: 13px; font-weight: 500;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; white-space: nowrap;
}
.pomo-btn-outline:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft-2); }

.pomo-data-grid { display: grid; grid-template-columns: 4fr 6fr; gap: 24px; align-items: stretch; }
.pomo-data-left { display: flex; flex-direction: column; justify-content: space-between; gap: 16px; }
.pomo-goal-ring-box { display: flex; align-items: center; gap: 14px; padding: 4px 0 16px; border-bottom: 1px solid var(--border); }
.pomo-mini-ring-wrap { position: relative; width: 64px; height: 64px; flex-shrink: 0; }
.pomo-mini-ring-svg { width: 64px; height: 64px; transform: rotate(-90deg); }
.pomo-mini-ring-track { fill: none; stroke: var(--ring-track); stroke-width: 7; }
.pomo-mini-ring-prog { fill: none; stroke: var(--accent); stroke-width: 7; stroke-linecap: round; stroke-dasharray: 226.1947; stroke-dashoffset: 226.1947; transition: stroke-dashoffset 0.5s ease, opacity 0.2s ease; }
.pomo-mini-ring-val { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 13.5px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text); }
.pomo-goal-ring-info { flex: 1; min-width: 0; }
.pomo-goal-ring-info strong { display: block; font-size: 14.5px; font-weight: 700; color: var(--text); }
.pomo-goal-ring-info span { display: block; margin-top: 2px; font-size: 12px; color: var(--text-muted); }
.pomo-goal-edit-btn {
    height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border);
    background: var(--surface-2); color: var(--text); font-size: 12px; font-weight: 500; cursor: pointer; white-space: nowrap; flex-shrink: 0;
}
.pomo-goal-edit-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft-2); }

.pomo-kpi-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; flex: 1; align-items: center; }
.pomo-kpi { position: relative; padding: 8px 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 4px; }
.pomo-kpi + .pomo-kpi::before { content: ''; position: absolute; left: 0; top: 18%; bottom: 18%; width: 1px; background: var(--border); }
.pomo-kpi strong { font-size: 26px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--text); }
.pomo-kpi-lbl { font-size: 12px; color: var(--text-muted); }
.pomo-kpi-delta { margin-top: 2px; font-size: 11px; font-weight: 700; color: var(--accent); }
.pomo-kpi-delta.is-neg { color: var(--text-muted); }

.pomo-data-right { display: flex; }
.pomo-chart-shell { flex: 1; display: grid; grid-template-columns: 28px 1fr; gap: 8px; padding: 16px 16px 12px 12px; border-radius: 18px; background: var(--surface-2); min-height: 200px; }
.pomo-chart-yaxis { display: flex; flex-direction: column; justify-content: space-between; padding-bottom: 24px; font-size: 11px; font-variant-numeric: tabular-nums; color: var(--text-muted); text-align: right; }
.pomo-chart-plot { position: relative; display: flex; flex-direction: column; }
.pomo-chart-bars { position: relative; flex: 1; display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; align-items: end; border-top: 1px dashed var(--border); padding-top: 8px; }
.pomo-chart-bars::after { content: ''; position: absolute; left: 0; right: 0; bottom: 24px; height: 1px; background: var(--border-strong); pointer-events: none; }
.pomo-bar-col { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 8px; }
.pomo-bar-track { width: 100%; flex: 1; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 2px; }
.pomo-bar-fill { width: 100%; max-width: 28px; min-height: 4px; border-radius: 7px 7px 2px 2px; background: var(--accent); opacity: 0.30; transition: height 0.35s ease, opacity 0.16s ease; }
.pomo-bar-col:hover .pomo-bar-fill { opacity: 0.72; }
.pomo-bar-col.is-today .pomo-bar-fill { opacity: 1; }
.pomo-bar-col.is-zero .pomo-bar-fill { height: 34% !important; background: transparent; opacity: 1; border: 1.5px dashed var(--border-strong); border-bottom: none; }
.pomo-bar-day { font-size: 11.5px; font-variant-numeric: tabular-nums; color: var(--text-muted); height: 16px; line-height: 16px; }
.pomo-bar-col.is-today .pomo-bar-day { color: var(--accent); font-weight: 700; }
.pomo-chart-empty-msg { position: absolute; inset: 6px 0 auto 0; display: flex; align-items: center; justify-content: center; gap: 8px; pointer-events: none; padding: 4px 12px; }
.pomo-empty-chart-img { width: 62px; height: auto; display: block; object-fit: contain; flex-shrink: 0; }
.pomo-chart-empty-msg span { padding: 6px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--text-muted); font-size: 12.5px; text-align: center; }
.pomo-data-privacy { display: flex; align-items: center; gap: 6px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); font-size: 12px; color: var(--text-muted); }

/* Related Tools & Edu */
.pomo-section-label { margin: 0 0 16px; font-size: 15px; font-weight: 700; color: var(--text); }
.pomo-related-compact { margin-bottom: 40px; }
.pomo-related-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.pomo-rel-compact-card {
    display: flex; align-items: center; gap: 12px; min-height: 72px; padding: 12px 16px;
    border-radius: 18px; background: var(--surface); border: 1px solid var(--border);
    text-decoration: none; color: var(--text); transition: border-color 0.16s ease, box-shadow 0.18s ease, transform 0.16s ease;
}
.pomo-rel-compact-card:hover { border-color: var(--accent); box-shadow: var(--shadow-hover); transform: translateY(-1px); text-decoration: none; }
.pomo-rel-ico { width: 36px; height: 36px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.pomo-rel-ico svg { width: 18px; height: 18px; }
.pomo-rel-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pomo-rel-copy strong { font-size: 14px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pomo-rel-copy span { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pomo-rel-arrow { color: var(--text-muted); font-size: 15px; transition: transform 0.16s ease, color 0.16s ease; }
.pomo-rel-compact-card:hover .pomo-rel-arrow { color: var(--accent); transform: translateX(3px); }

.pomo-edu-section { display: flex; flex-direction: column; gap: 40px; }
.pomo-steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.pomo-step-card { display: flex; align-items: flex-start; gap: 12px; padding: 20px; border-radius: 20px; background: var(--surface); }
.pomo-step-img { width: 52px; height: 52px; object-fit: contain; flex-shrink: 0; display: block; }
.pomo-step-card strong { display: block; font-size: 14.5px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.pomo-step-card p { margin: 0; font-size: 13px; line-height: 1.55; color: var(--text-muted); }

.pomo-faq-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.pomo-faq-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.pomo-faq-item { background: var(--surface); border-radius: 18px; overflow: hidden; }
.pomo-faq-item summary {
    padding: 16px 20px; font-size: 14px; font-weight: 700; color: var(--text); cursor: pointer;
    list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.pomo-faq-item summary::-webkit-details-marker { display: none; }
.pomo-faq-item summary::after { content: '+'; font-size: 18px; font-weight: 500; color: var(--text-muted); flex-shrink: 0; }
.pomo-faq-item[open] summary::after { content: '−'; color: var(--accent); }
.pomo-faq-body p { margin: 0; padding: 0 20px 16px; font-size: 13.5px; line-height: 1.65; color: var(--text-muted); }

/* ===== Modals, Toast, Coffee, Lock Overlay ===== */
.pomo-modal-backdrop {
    position: fixed; inset: 0; z-index: 9800; background: rgba(27, 23, 20, 0.54);
    backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; padding: 20px;
}
.pomo-modal-card {
    width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto;
    background: var(--surface); border: 1px solid var(--border); border-radius: 24px;
    padding: 24px; color: var(--text); box-shadow: 0 24px 60px rgba(27, 23, 20, 0.28);
}
.pomo-modal-sm { max-width: 420px; }
.pomo-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.pomo-modal-head h3 { margin: 0; font-size: 16px; font-weight: 700; }
.pomo-modal-title-ico { display: inline-flex; align-items: center; gap: 8px; color: var(--accent); }
.pomo-modal-title-ico span { color: var(--text); }
.pomo-modal-head p { margin: 4px 0 0; font-size: 13px; color: var(--text-muted); }
.pomo-goal-form { display: flex; flex-direction: column; gap: 12px; }
.pomo-goal-date-row { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-muted); }
.pomo-modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }
.pomo-btn-lg { height: 42px; padding: 0 20px; }
.pomo-share-url-box { width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
.pomo-canvas-stage { display: flex; justify-content: center; margin-bottom: 16px; border-radius: 16px; overflow: hidden; background: #26201B; }
.pomo-canvas-stage canvas { max-width: 100%; max-height: 58vh; width: auto; height: auto; display: block; }

.pomo-lock-overlay { position: fixed; inset: 0; z-index: 99999; background: radial-gradient(circle at 50% 35%, #2D251E 0%, #16120F 72%); color: #F4E9DC; display: flex; align-items: center; justify-content: center; user-select: none; overflow: hidden; }
.pomo-lock-paw-layer { position: fixed; inset: 0; pointer-events: none; z-index: 1; }
.pomo-lock-paw { position: fixed; width: 42px; height: 42px; color: rgba(242, 180, 90, 0.44); transform: translate(-50%, -50%) rotate(var(--pr, 0deg)); animation: pomo-paw-pop 4.5s ease-out forwards; }
.pomo-lock-paw svg { width: 100%; height: 100%; }
@keyframes pomo-paw-pop { 0% { opacity: 0; transform: translate(-50%, -50%) rotate(var(--pr, 0deg)) scale(0.6); } 12% { opacity: 0.9; transform: translate(-50%, -50%) rotate(var(--pr, 0deg)) scale(1); } 100% { opacity: 0; transform: translate(-50%, -50%) rotate(var(--pr, 0deg)) scale(1.06); } }
.pomo-lock-cat { position: fixed; bottom: 24px; right: 36px; width: 86px; height: 54px; color: rgba(244, 233, 220, 0.42); z-index: 1; pointer-events: none; }
.pomo-lock-inner { position: relative; z-index: 2; text-align: center; max-width: 520px; padding: 20px; }
.pomo-lock-ring-wrap { position: relative; width: 196px; height: 196px; margin: 0 auto 20px; border-radius: 50%; cursor: pointer; }
.pomo-lock-ring-svg { width: 196px; height: 196px; transform: rotate(-90deg); }
.pomo-lr-track { fill: none; stroke: rgba(244, 233, 220, 0.14); stroke-width: 4.5; }
.pomo-lr-prog { fill: none; stroke: #8AB38B; stroke-width: 4.5; stroke-linecap: round; stroke-dasharray: 502.65; stroke-dashoffset: 0; transition: stroke-dashoffset 0.85s linear; }
.pomo-lr-unlock { fill: none; stroke: #F2B45A; stroke-width: 6; stroke-linecap: round; stroke-dasharray: 502.65; stroke-dashoffset: 502.65; opacity: 0; transition: stroke-dashoffset 0.05s linear, opacity 0.15s; }
.pomo-lock-ring-wrap.is-holding .pomo-lr-unlock { opacity: 1; }
.pomo-lock-ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.pomo-padlock { width: 34px; height: 38px; color: #8AB38B; transition: color 0.2s, transform 0.2s; }
.pomo-lock-ring-wrap.is-holding .pomo-padlock { color: #F2B45A; transform: scale(1.08); }
.pomo-lock-timer { font-family: var(--font-timer); font-size: 32px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pomo-lock-sub { font-size: 11px; color: rgba(244, 233, 220, 0.65); font-weight: 500; }
.pomo-lock-inner h2 { font-size: 24px; font-weight: 700; margin: 0 0 8px; }
.pomo-lock-hint { font-size: 14px; color: rgba(244, 233, 220, 0.72); margin: 0 0 18px; line-height: 1.55; }
.pomo-lock-pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 15px; border-radius: 999px; background: rgba(244, 233, 220, 0.08); font-size: 13px; color: rgba(244, 233, 220, 0.82); margin-bottom: 20px; }
.pomo-lock-dot { width: 8px; height: 8px; border-radius: 50%; background: #8AB38B; }
.pomo-lock-esc-wrap { max-width: 280px; margin: 0 auto; }
.pomo-lock-esc-track { height: 4px; border-radius: 999px; background: rgba(244, 233, 220, 0.14); overflow: hidden; margin-bottom: 8px; }
.pomo-lock-esc-fill { height: 100%; width: 0%; background: #F2B45A; transition: width 0.05s linear; }
.pomo-lock-esc-hint { margin: 0; font-size: 12px; color: rgba(244, 233, 220, 0.56); }

.pomo-toast {
    position: fixed; top: 72px; left: 50%; transform: translateX(-50%); z-index: 9600;
    padding: 10px 20px; border-radius: 999px; background: var(--accent); color: var(--accent-on);
    font-size: 14px; font-weight: 700; box-shadow: 0 12px 30px rgba(59, 42, 32, 0.22);
    display: inline-flex; align-items: center; gap: 7px;
}

.pomo-coffee-toast {
    position: fixed; right: 20px; bottom: 20px; width: 312px; max-width: calc(100vw - 28px);
    padding: 16px 16px 14px; border-radius: 20px; background: var(--surface); border: 1px solid var(--border);
    color: var(--text); box-shadow: 0 18px 42px rgba(59, 42, 32, 0.18); z-index: 9500; overflow: hidden;
    transition: opacity 0.28s ease, transform 0.28s ease;
}
.pomo-coffee-toast.is-hiding { opacity: 0; transform: translateY(10px); pointer-events: none; }
.pomo-coffee-top-right { position: absolute; top: 10px; right: 10px; display: flex; align-items: center; gap: 6px; }
.pomo-coffee-secs { font-size: 11px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.pomo-coffee-close { width: 24px; height: 24px; border-radius: 6px; border: none; background: transparent; color: var(--text-muted); font-size: 18px; cursor: pointer; }
.pomo-coffee-head { display: flex; align-items: center; gap: 12px; padding-right: 48px; margin-bottom: 12px; }
.pomo-coffee-cup { width: 34px; height: 46px; color: var(--accent); flex-shrink: 0; display: inline-flex; }
.pomo-coffee-cup svg { width: 100%; height: 100%; }
.pomo-coffee-head strong { display: block; font-size: 14px; font-weight: 700; }
.pomo-coffee-head p { margin: 2px 0 0; font-size: 12px; color: var(--text-muted); }
.pomo-coffee-tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 8px; }
.pomo-coffee-btn { height: 34px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font-size: 13.5px; font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.pomo-coffee-btn:hover, .pomo-coffee-pop { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.pomo-coffee-foot { font-size: 11px; color: var(--text-muted); text-align: center; }
.pomo-coffee-bar-track { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--border); }
.pomo-coffee-bar { height: 100%; width: 100%; background: var(--accent); transition: width 0.1s linear; }

/* ===== Stage 3: Dedicated Mobile In-Page 4-Tab Bar (hidden on desktop) ===== */
.pomo-mobile-bar {
    display: none;
}

/* ===== Responsive Breakpoints (1024px Tablet & 375px Mobile) ===== */
@media (max-width: 1120px) {
    .pomo-workbench { grid-template-columns: 1fr; }
    .pomo-stage { height: 616px; }
    .pomo-side-panel { height: auto; min-height: 360px; max-height: 520px; }
    .living-cat-interactive { width: 164px; height: 164px; }
    .pomo-data-grid, .pomo-related-row, .pomo-steps-grid { grid-template-columns: 1fr; }
}

@media (max-width: 767px) {
    /* Hide site-wide network mobile nav ONLY on pomodoro.php */
    body.pomo-warm-body #mobileNav {
        display: none !important;
    }

    .pomo-workspace-root { padding: 14px 12px 92px; }
    .pomo-workbench { gap: 14px; margin-bottom: 24px; }

    /* Mobile Tab View Switching: Timer vs Side Panel (Tasks / Sounds / Settings) */
    .pomo-workbench[data-mobile-view="timer"] .pomo-side-panel {
        display: none;
    }
    .pomo-workbench[data-mobile-view="panel"] .pomo-stage {
        display: none;
    }
    .pomo-workbench[data-mobile-view="panel"] .pomo-side-panel {
        display: flex;
        min-height: 480px;
    }

    .pomo-stage {
        height: auto;
        min-height: 540px;
        padding: 12px 14px 8px;
        border-radius: 24px;
    }
    .pomo-stage-bg-clip { border-radius: 24px; }
    .pomo-stage-top {
        gap: 6px;
        flex-wrap: nowrap;
    }
    .pomo-logo { width: 24px; height: 24px; }
    .pomo-title-line h1 { font-size: 13.5px; }
    .pomo-stage[data-pomo-theme="snow"] .pomo-title-line h1 { display: none; }
    .pomo-goal-pill { display: none; }
    .pomo-top-actions { gap: 5px; }
    .pomo-cabin-mood { padding: 2px; gap: 1px; }
    .pomo-mood-chip { width: 25px; height: 25px; font-size: 12px; }
    .pomo-scene-pill { padding: 0 7px; height: 26px; font-size: 11.5px; }
    .pomo-scene-lbl { display: none; }
    .pomo-icon-btn { width: 32px; height: 32px; border-radius: 11px; }

    .pomo-stage-core { gap: 10px; padding: 6px 0 2px; }
    .pomo-clock-wrap { width: 214px; height: 214px; margin-top: 4px; }
    .pomo-ring-leaf { width: 40px; height: 20px; top: -10px; }
    .pomo-time-display { font-size: 58px; }
    .pomo-ring-meta { gap: 7px; }

    /* Mobile: Dock 122px Living Cat in clean bottom flow below action row — ZERO overlap on 375px! */
    .pomo-cat-companion {
        position: relative;
        left: auto;
        bottom: auto;
        margin: 0 auto -2px;
        z-index: 9;
    }
    .living-cat-interactive { width: 122px; height: 122px; }
    .living-cat-bubble { font-size: 12px; padding: 5px 11px; top: -6px; }

    .pomo-actions-block { width: 100%; height: auto; margin-top: 2px; }
    .pomo-actions-row { width: 100%; }
    .pomo-btn-primary { flex: 1; min-width: 0; height: 48px; }
    .pomo-ghost-icon { width: 44px; height: 44px; }

    .pomo-dur-popover {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        width: min(332px, calc(100vw - 32px));
    }
    .pomo-card { padding: 18px 16px; border-radius: 22px; }
    .pomo-faq-grid { grid-template-columns: 1fr; }
    .pomo-side-panel { border-radius: 22px; max-height: none; min-height: 0; }
    .pomo-panel-tabs { display: none; }

    /* Dedicated Mobile 4-Tab Bottom Bar */
    .pomo-mobile-bar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1200;
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        align-items: center;
        padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
        background: rgba(255, 253, 248, 0.94);
        border-top: 1px solid #EADFCF;
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        box-shadow: 0 -6px 24px rgba(59, 42, 32, 0.08);
    }
    html[data-theme="dark"] .pomo-mobile-bar,
    html.dark .pomo-mobile-bar {
        background: rgba(27, 23, 20, 0.94);
        border-top-color: rgba(244, 233, 220, 0.12);
        box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.42);
    }
    .pomo-mob-tab {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        height: 48px;
        border: none;
        border-radius: 14px;
        background: transparent;
        color: #7C6758;
        font-size: 11px;
        font-weight: 600;
        cursor: pointer;
        transition: color 0.16s ease, background 0.16s ease;
    }
    html[data-theme="dark"] .pomo-mob-tab,
    html.dark .pomo-mob-tab {
        color: #B6A393;
    }
    .pomo-mob-tab.active {
        color: #E5533D;
        background: rgba(229, 83, 61, 0.10);
        font-weight: 700;
    }
    html[data-theme="dark"] .pomo-mob-tab.active,
    html.dark .pomo-mob-tab.active {
        color: #F0694F;
        background: rgba(240, 105, 79, 0.16);
    }
    .pomo-mob-ico-wrap {
        position: relative;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    .pomo-mob-badge {
        position: absolute;
        top: -5px;
        right: -9px;
        min-width: 16px;
        height: 16px;
        padding: 0 4px;
        border-radius: 999px;
        background: #E5533D;
        color: #FFFDF8;
        font-size: 10px;
        font-weight: 700;
        line-height: 16px;
        text-align: center;
    }
    .pomo-mob-dot {
        position: absolute;
        top: -2px;
        right: -4px;
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: #E5533D;
    }
    .pomo-coffee-toast {
        bottom: 72px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .pomo-ring-progress,
    .pomo-stage-bg-img { animation: none !important; transition-duration: 0.01ms !important; }
}
