/* This file is generated by splitting the original frontend/styles.css.
   See frontend/styles/tokens.css and themes.css for the design-token layers
   this file consumes. */



        /* Icon rail — the only persistent chrome besides the calendar itself.
           Deliberately flat and quiet: buttons are ghost by default, take
           color only on hover/active, so the rail doesn't compete with the
           calendar for attention (see js/app.js drawer functions for the
           active-state toggling this depends on). */
        #iconRail {
            width: 56px;
            flex-shrink: 0;
            background: var(--rail-bg);
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: var(--space-3) 0;
            gap: var(--space-1);
        }

        .rail-mark {
            width: 28px;
            height: 28px;
            border-radius: var(--radius-sm);
            background: var(--color-primary);
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: var(--space-3);
        }

        .mark-modern {
            display: block;
        }

        .mark-pixel {
            display: none;
        }

        [data-theme^="stardew"] .mark-modern {
            display: none;
        }

        [data-theme^="stardew"] .mark-pixel {
            display: block;
        }

        [data-theme^="stardew"] .rail-mark {
            border-radius: var(--radius-xs);
        }

        [data-theme^="stardew"] #iconRail {
            background-image: repeating-linear-gradient(180deg, rgba(0, 0, 0, 0.15) 0 2px, transparent 2px 34px);
            box-shadow: inset -2px 0 0 var(--soil-700), 2px 0 0 0 var(--soil-900);
        }

        [data-theme^="stardew"] .rail-btn:hover,
        [data-theme^="stardew"] .rail-btn[aria-pressed="true"] {
            box-shadow: var(--panel-frame);
            background: var(--wheat-50);
            color: var(--soil-900);
        }

        .rail-btn {
            min-width: 40px;
            min-height: 40px;
            padding: 0 6px;
            border: none;
            border-radius: var(--radius-sm);
            background: transparent;
            color: var(--rail-icon);
            cursor: var(--cursor-clickable);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: var(--text-label);
            font-weight: 600;
            transition: background-color var(--motion-fast) ease, color var(--motion-fast) ease;
        }

        .rail-btn:hover {
            background: rgba(255, 255, 255, 0.08);
            color: var(--rail-icon-active);
        }

        .rail-btn[aria-pressed="true"] {
            background: rgba(255, 255, 255, 0.1);
            color: var(--rail-icon-active);
        }

        .rail-spacer {
            flex: 1;
        }

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



        .sidebar-section-header {
            position: relative;
            display: flex;
            flex-direction: row;
            justify-content: space-between;
            align-items: center;
            gap: var(--space-2);
            padding-right: var(--space-5);
        }

        /* .close-btn's base rule (components.css) is written for a modal's
           generous padding — anchor it to the compact header row instead so
           it doesn't collide with the add-task button next to it. */
        .sidebar-section-header .close-btn,
        .chat-header .close-btn {
            top: 50%;
            right: var(--space-2);
            transform: translateY(-50%);
            font-size: var(--text-heading);
            color: var(--text-muted);
            cursor: var(--cursor-clickable);
        }

        .chat-header {
            position: relative;
            padding-right: var(--space-5);
        }

        /* Nudge these two modals' close "×" up into the very top-right corner.
           The base .close-btn sits at top/right 24px, which put the life-panel
           × on top of the day/week/month tab group in its title row — at 12px
           it clears the tabs entirely (sits fully above them). The buddy-status
           × gets the same corner nudge for visual parity. */
        #lifePanelModal .close-btn,
        #buddyStatusModal .close-btn {
            top: 12px;
            right: 12px;
        }

        .sidebar-section-label {
            font-size: var(--text-caption);
            font-weight: 600;
            letter-spacing: 0.06em;
            text-transform: uppercase;
            color: var(--text-muted);
            margin: 0;
            flex: 1;
        }



        #app-body {
            display: flex;
            flex-direction: row;
            flex: 1;
            min-height: 0;
            position: relative;
            overflow: hidden;
        }



        /* Calendar is the sole permanent surface now — full width, no
           competing siblings, no card chrome of its own. */
        #calendar-container {
            flex: 1;
            width: 100%;
            padding: var(--space-4);
            display: flex;
            flex-direction: column;
            min-height: 0;
        }



        /* Task panel — a real flex sibling of #calendar-container (already
           sits right after it in DOM order, so flex-direction:row puts it
           on the right automatically), collapsed to width:0 and expanding
           to push/shrink the calendar when opened. This is a deliberate,
           acknowledged exception to this app's "animate only transform/
           opacity" motion principle — the whole point here is a real
           layout reflow, which transform can't produce. box-sizing:border-
           box alone isn't enough to reach a true 0: with border-box, a
           width:0 element whose padding (var(--space-4), 24px each side)
           exceeds the declared width still renders at the padding's own
           size (48px), because the content box can only clamp to 0, not
           negative — so padding must collapse to 0 right alongside width,
           not stay constant. */
        .drawer {
            flex-shrink: 0;
            width: 0;
            min-width: 0;
            box-sizing: border-box;
            overflow: hidden;
            background: var(--bg-surface);
            box-shadow: var(--shadow-lg);
            padding: 0;
            display: flex;
            flex-direction: column;
            gap: var(--space-3);
            transition: width var(--motion-normal) var(--ease-standard), padding var(--motion-normal) var(--ease-standard);
        }

        #taskDrawer.open {
            width: 320px;
            padding: var(--space-4);
        }



        #chat-container {
            display: flex;
            flex-direction: column;
            height: 100%;
            overflow: hidden;
        }



        /* Floating chat window — tethered to the Study Buddy widget via
           Popper.js (see buddyWidget.js) rather than pinned to a viewport
           edge. position:fixed here is just the pre-Popper fallback state;
           Popper takes over with strategy 'fixed' once initialized. Opens
           with the same transform/opacity fade the widget's own flyout
           uses, kept separate from positioning (Popper is configured with
           gpuAcceleration:false so it positions via top/left, leaving
           transform free for this animation). */
        .buddy-chat-window {
            position: fixed;
            top: 0;
            left: 0;
            width: 320px;
            height: 480px;
            max-height: calc(100vh - 48px);
            max-width: calc(100vw - 32px);
            background: var(--bg-surface);
            box-shadow: var(--shadow-lg);
            border-radius: var(--radius-lg);
            overflow: hidden;
            z-index: var(--z-widget);
            padding: 0;
            display: flex;
            flex-direction: column;
            opacity: 0;
            transform: translateY(8px);
            pointer-events: none;
        }

        .buddy-chat-window.open {
            opacity: 1;
            transform: translateY(0);
            pointer-events: auto;
        }

        @media (prefers-reduced-motion: no-preference) {
            .buddy-chat-window {
                transition: opacity var(--motion-fast) ease, transform var(--motion-fast) ease;
            }
        }



        @media (max-width: 900px) {
            #taskDrawer.open {
                width: 100%;
            }
        }



        [data-theme="dark"] .top-auth-button.auth-primary {
            background: #f0813f !important;
            border-color: #f6a672 !important;
            color: #ffffff !important;
            box-shadow: 0 12px 28px rgba(15, 118, 110, 0.28) !important;
        }



        [data-theme^="stardew"] #calendar-container {
            background-image:
                repeating-linear-gradient(45deg, rgba(139, 90, 43, 0.06) 0px, rgba(139, 90, 43, 0.06) 2px, transparent 2px, transparent 13px),
                repeating-linear-gradient(-45deg, rgba(91, 140, 58, 0.05) 0px, rgba(91, 140, 58, 0.05) 2px, transparent 2px, transparent 13px) !important;
        }



        [data-theme^="stardew"] .top-auth-button.auth-primary {
            background: #5b8c3a !important;
            border-color: #7fb356 !important;
            color: #ffffff !important;
            box-shadow: 0 12px 28px rgba(91, 140, 58, 0.3) !important;
        }
