/* main.css */
/* Meriono Web 2.0 Master Stylesheet */
/* FINAL REVISION: UI Swap (Timer Right / Controls Left) */
/* UPDATED: Connected Controls (Wrapper Architecture) */

/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
    --bg-body: #000;
    --stage-radius: 0px;
    --white: #ffffff;
    --text-dark: #1a1b26;
    --accent-orange: #ff914d;
    --accent-yellow: #f39c12;
    --bar-bg: rgba(255, 255, 255, 0.3);
    --border-width: 1.5px;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --font-main: var(--font-lato), sans-serif;
    --font-display: var(--font-nunito), sans-serif;
    --z-video: 0;
    --z-loader: 5;
    --z-ui: 20;
    --z-bar: 60;
    --z-modal: 120;
    --z-popup: 220;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --layout-side-inset: clamp(24px, 2.8vw, 44px);
    --layout-top-inset: clamp(24px, 2.6vh, 40px);
    --layout-inset: var(--layout-side-inset);
    --top-row-y: calc(var(--layout-top-inset) + var(--safe-top));
    --timer-optical-offset: 0px;
    --bar-top-gap: var(--layout-top-inset);
    --bar-height: clamp(64px, 8.4vh, 80px);
    --bar-gap: clamp(14px, 1.8vh, 24px);
    --bar-inline-safe: clamp(22px, 3vw, 52px);
    --bar-max-width: clamp(760px, 50vw, 920px);
    --timer-time-width: 6.2ch;
    --timer-widget-width: clamp(220px, 18vw, 286px);
    --timer-slot-gap: clamp(14px, 1.2vw, 22px);
    --timer-right-inset: calc(var(--layout-side-inset) - 4px);
    --bar-right-reserve: calc(var(--timer-widget-width) + var(--timer-slot-gap));
    --bar-width: min(var(--bar-max-width), calc(100% - (var(--layout-side-inset) * 2) - var(--bar-right-reserve)));
    --bar-radius: clamp(22px, 2vw, 34px);
    --bar-vpad: clamp(8px, 1vh, 13px);
    --bar-xpad: clamp(22px, 2vw, 36px);
    --bar-bottom-gap: clamp(52px, 2vh, 72px);
    --ui-top-anchor: calc(var(--top-row-y) + var(--bar-height) + var(--bar-bottom-gap));
    --ui-top-offset-left: 0px;
    --ui-top-offset-right: 0px;
    --ui-top-anchor-left: calc(var(--ui-top-anchor) + var(--ui-top-offset-left));
    --ui-top-anchor-right: calc(var(--ui-top-anchor) + var(--ui-top-offset-right));
    --ui-bottom-anchor: calc(var(--layout-side-inset) + var(--safe-bottom));
    --ui-edge-gap: var(--layout-side-inset);
    --panel-toggle-offset: 96px;
    --control-btn-size: clamp(48px, 3.4vw, 60px);
    --control-label-size: clamp(15px, 1.1vw, 19px);
    --control-icon-size: clamp(20px, 1.45vw, 25px);
    --timer-ring-size: clamp(52px, 3.2vw, 64px);
    --timer-text-size: clamp(42px, 2.9vw, 60px);
    --panel-toggle-width: clamp(44px, 3vw, 56px);
    --panel-toggle-height: clamp(66px, 6vh, 84px);
    --panel-toggle-font-size: clamp(34px, 2.4vw, 44px);
    --notes-toggle-center-y: clamp(calc(var(--ui-top-anchor-right) + var(--panel-toggle-offset)), 50%, calc(100% - var(--ui-bottom-anchor) - var(--panel-toggle-offset)));
    --atm-pill-font-size: clamp(13px, 0.95vw, 16px);
    --atm-pill-pad-y: clamp(8px, 0.9vh, 11px);
    --atm-pill-pad-x: clamp(18px, 1.35vw, 26px);
    --slider-track-width: clamp(6px, 0.45vw, 9px);
    --slider-knob-size: clamp(18px, 1.3vw, 24px);
    --vol-label-size: clamp(12px, 0.9vw, 14px);
    --panel-width: clamp(320px, 24vw, 420px);
    --notes-panel-width: min(calc(var(--panel-width) * 1.5), calc(100vw - (var(--layout-side-inset) * 2)));
    --tools-panel-width: var(--notes-panel-width);
    --notes-card-surface: #f8f9fa;
}

* {
    box-sizing: border-box;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    margin: 0;
    padding: 0;
}

input,
textarea {
    user-select: text;
}

html,
body {
    width: 100%;
    height: 100%;
    min-height: 100vh;
    background-color: var(--bg-body);
    font-family: var(--font-main);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow: hidden;
    padding-top: 0;
}

/* =========================================
   2. STAGE & VIDEO LAYERS
   ========================================= */
#meriono-stage {
    position: relative;
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    max-height: none;
    aspect-ratio: auto;
    border-radius: var(--stage-radius);
    overflow: hidden;
    isolation: isolate;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
    background: #111;
    margin: 0;
    cursor: default;
}

@supports (height: 100dvh) {
    #meriono-stage {
        height: 100dvh;
        min-height: 100dvh;
    }
}

@supports not (height: 100dvh) {
    @supports (-webkit-touch-callout: none) {

        html,
        body {
            height: -webkit-fill-available;
            min-height: -webkit-fill-available;
        }

        #meriono-stage {
            height: -webkit-fill-available;
            min-height: -webkit-fill-available;
        }
    }
}

#meriono-stage.user-idle {
    cursor: none;
}

/* KRİTİK GÜNCELLEME (IDLE STATE FIX):
   Kullanıcı boşta kaldığında (idle), Overlay içindeki tüm öğeleri gizle,
   ANCAK .timer-widget-container sınıfına sahip öğeyi (Sayaç) HARİÇ TUT.
   
   Böylece sayaç ekranda kalırken diğerleri kaybolur.
*/
#meriono-stage.user-idle .overlay>*:not(.timer-widget-container) {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

#atmVideo,
.overlay,
.loader {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#atmVideo {
    object-fit: cover;
    border-radius: var(--stage-radius);
    z-index: var(--z-video);
}

.loader {
    display: none;
    align-items: center;
    justify-content: center;
    z-index: var(--z-loader);
    background: rgba(0, 0, 0, 0.4);
}

.loader::after {
    content: "";
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top: 5px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* =========================================
   3. UI OVERLAY STRUCTURE
   ========================================= */
.overlay {
    padding: 30px;
    z-index: var(--z-ui);
    pointer-events: none;
    /* Konteyner tıklanamaz, içerik tıklanabilir */
    transition: opacity 0.5s ease;
}

.overlay>* {
    pointer-events: auto;
}

/* 3.1 Top Right Controls (ARTIK SOLDA) */
.top-right {
    position: absolute;
    top: var(--ui-top-anchor-left);
    left: var(--layout-side-inset);
    display: flex;
    flex-direction: column;
    gap: clamp(16px, 1.6vh, 22px);
    align-items: flex-start;
    /* flex-end -> flex-start */
    max-width: min(36vw, 480px);
}

.control-row {
    display: flex;
    align-items: center;
    gap: clamp(14px, 1.3vw, 20px);
    flex-direction: row-reverse;
    /* [Label][Btn] -> [Btn][Label] görünümü için */
}

.control-label {
    color: var(--white);
    font-size: var(--control-label-size);
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    white-space: nowrap;
}

.control-btn {
    width: var(--control-btn-size);
    height: var(--control-btn-size);
    background: linear-gradient(160deg, rgba(30, 30, 30, 0.72), rgba(6, 6, 6, 0.62));
    border: 1px solid rgba(255, 255, 255, 0.24);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.08),
        0 0 14px rgba(255, 255, 255, 0.12),
        0 8px 16px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(7px) saturate(125%);
    -webkit-backdrop-filter: blur(7px) saturate(125%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    touch-action: manipulation;
    transition: var(--transition);
}

.control-btn:hover {
    transform: scale(1.08);
    filter: brightness(1.12);
    border-color: rgba(255, 255, 255, 0.34);
}

.icon {
    width: var(--control-icon-size);
    height: var(--control-icon-size);
    fill: #fff;
}

@supports (-webkit-touch-callout: none) {
    .control-btn {
        backdrop-filter: blur(5px) saturate(115%);
        -webkit-backdrop-filter: blur(5px) saturate(115%);
    }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .control-btn {
        background: rgba(8, 8, 8, 0.9);
    }
}

/* 3.2 Bottom Controls Wrapper (YENİ YAPISAL GRUPLAMA) */
.bottom-controls-group {
    position: absolute;
    left: var(--layout-side-inset);
    bottom: var(--ui-bottom-anchor);
    display: flex;
    align-items: flex-end;
    /* Slider ve butonları alttan hizalar */
    gap: clamp(28px, 3vw, 54px);
    z-index: 20;
    max-width: calc(100% - (var(--ui-edge-gap) * 2));
}

/* 3.3 Volume Sliders */
.volume-group {
    /* Position removed here, handled by wrapper */
    display: flex;
    gap: clamp(16px, 1.4vw, 24px);
}

.vol-slider-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    height: clamp(140px, 16vh, 180px);
}

.vol-label {
    color: var(--white);
    font-size: var(--vol-label-size);
    font-weight: 900;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.custom-slider {
    position: relative;
    width: var(--slider-track-width);
    flex: 1;
    background: var(--bar-bg);
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: flex-end;
}

.slider-fill {
    width: 100%;
    background: var(--white);
    border-radius: 4px;
    pointer-events: none;
}

.slider-knob {
    position: absolute;
    left: 50%;
    transform: translateX(-50%) translateY(50%);
    width: var(--slider-knob-size);
    height: var(--slider-knob-size);
    background: transparent;
    border: 3px solid var(--white);
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    transition: bottom 0.1s linear;
}

/* 3.4 Atmosphere Selector */
.atmosphere-list-wrapper {
    /* Position removed here, handled by wrapper */
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    /* Butonları sola yaslar */
    gap: 12px;
    /* z-index ebeveyn tarafından yönetilir */
}

.atm-row {
    display: flex;
    gap: 8px;
}

.atm-pill {
    background: linear-gradient(160deg, rgba(30, 30, 30, 0.72), rgba(6, 6, 6, 0.62));
    color: #fff;
    padding: var(--atm-pill-pad-y) var(--atm-pill-pad-x);
    border-radius: 999px;
    font-size: var(--atm-pill-font-size);
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.24);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.08),
        0 0 12px rgba(255, 255, 255, 0.1),
        0 6px 14px rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(7px) saturate(125%);
    -webkit-backdrop-filter: blur(7px) saturate(125%);
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s, filter 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}

.atm-pill:hover {
    filter: brightness(1.1);
    border-color: rgba(255, 255, 255, 0.34);
}

.atm-pill.active {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.72), rgba(228, 228, 228, 0.52));
    color: #121212;
    border-color: rgba(255, 255, 255, 0.82);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.26),
        0 0 16px rgba(255, 255, 255, 0.24),
        0 8px 16px rgba(0, 0, 0, 0.36);
}

.atm-pill.active:hover {
    filter: brightness(1.03);
    border-color: rgba(255, 255, 255, 0.9);
}

@supports (-webkit-touch-callout: none) {
    .atm-pill {
        backdrop-filter: blur(5px) saturate(115%);
        -webkit-backdrop-filter: blur(5px) saturate(115%);
    }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .atm-pill {
        background: rgba(8, 8, 8, 0.9);
    }
}

.idle-lock-wrapper {
    position: absolute;
    right: var(--layout-side-inset);
    bottom: var(--ui-bottom-anchor);
    z-index: 20;
}

.idle-lock-btn {
    background: linear-gradient(160deg, rgba(30, 30, 30, 0.72), rgba(6, 6, 6, 0.62));
    color: #fff;
    padding: var(--atm-pill-pad-y) var(--atm-pill-pad-x);
    border-radius: 999px;
    font-size: var(--atm-pill-font-size);
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.24);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.08),
        0 0 12px rgba(255, 255, 255, 0.1),
        0 6px 14px rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(7px) saturate(125%);
    -webkit-backdrop-filter: blur(7px) saturate(125%);
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s, filter 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}

.idle-lock-btn:hover {
    filter: brightness(1.1);
    border-color: rgba(255, 255, 255, 0.34);
}

.idle-lock-btn.is-active {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.72), rgba(228, 228, 228, 0.52));
    color: #121212;
    border-color: rgba(255, 255, 255, 0.82);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.26),
        0 0 16px rgba(255, 255, 255, 0.24),
        0 8px 16px rgba(0, 0, 0, 0.36);
}

.idle-lock-btn.is-active:hover {
    filter: brightness(1.03);
    border-color: rgba(255, 255, 255, 0.9);
}

@supports (-webkit-touch-callout: none) {
    .idle-lock-btn {
        backdrop-filter: blur(5px) saturate(115%);
        -webkit-backdrop-filter: blur(5px) saturate(115%);
    }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .idle-lock-btn {
        background: rgba(8, 8, 8, 0.9);
    }
}

/* =========================================
   4. LEFT SIDE MUSIC PANEL
   ========================================= */
.panel-toggle {
    position: absolute;
    left: var(--layout-side-inset);
    top: clamp(calc(var(--ui-top-anchor-left) + var(--panel-toggle-offset)), 50%, calc(100% - var(--ui-bottom-anchor) - var(--panel-toggle-offset)));
    transform: translateY(-50%);
    width: var(--panel-toggle-width);
    height: var(--panel-toggle-height);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    touch-action: manipulation;
    z-index: 30;
    color: #fff;
    font-size: var(--panel-toggle-font-size);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.5s ease;
}

.panel-toggle.open {
    transform: translateY(-50%) translateX(calc(var(--panel-width) + 16px)) rotate(180deg);
}

.music-panel {
    position: absolute;
    top: var(--ui-top-anchor-left);
    bottom: var(--ui-bottom-anchor);
    left: var(--layout-side-inset);
    width: var(--panel-width);
    max-height: calc(100% - var(--ui-top-anchor-left) - var(--ui-bottom-anchor));
    background: var(--white);
    border-radius: 24px;
    box-shadow: 10px 0 40px rgba(0, 0, 0, 0.6);
    transform: translateX(-120%);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 25;
    display: flex;
    flex-direction: column;
    padding: 20px;
    gap: 10px;
    color: var(--text-dark);
}

.music-panel.open {
    transform: translateX(0);
}

/* 4.1 Right Side Notes Panel */
.notes-panel-toggle {
    position: absolute;
    right: var(--layout-side-inset);
    top: var(--notes-toggle-center-y);
    transform: translateY(-50%);
    width: var(--panel-toggle-width);
    height: var(--panel-toggle-height);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    touch-action: manipulation;
    z-index: 46;
    color: #fff;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: linear-gradient(165deg, rgba(22, 22, 22, 0.62), rgba(8, 8, 8, 0.7));
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.08);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), filter 0.24s ease, border-color 0.24s ease;
    font-family: var(--font-display);
    font-size: clamp(20px, 1.7vw, 30px);
    font-weight: 900;
    letter-spacing: 0.35px;
    line-height: 1;
}

.notes-panel-toggle svg {
    width: clamp(26px, 2vw, 34px);
    height: clamp(26px, 2vw, 34px);
    fill: currentColor;
    pointer-events: none;
}

.notes-panel-toggle:hover {
    filter: brightness(1.1);
    border-color: rgba(255, 255, 255, 0.42);
}

.notes-panel-toggle.open {
    transform: translateY(-50%) translateX(calc((var(--notes-panel-width) * -1) - 16px));
}

.tools-panel-toggle {
    position: absolute;
    right: var(--layout-side-inset);
    top: calc(var(--notes-toggle-center-y, 50%) + var(--panel-toggle-height) + 12px);
    transform: translateY(-50%);
    width: var(--panel-toggle-width);
    height: var(--panel-toggle-height);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    touch-action: manipulation;
    z-index: 46;
    color: #fff;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: linear-gradient(165deg, rgba(22, 22, 22, 0.62), rgba(8, 8, 8, 0.7));
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.08);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), filter 0.24s ease, border-color 0.24s ease;
    font-family: var(--font-display);
    font-size: clamp(20px, 1.7vw, 30px);
    font-weight: 900;
    letter-spacing: 0.35px;
}

.tools-panel-toggle:hover {
    filter: brightness(1.1);
    border-color: rgba(255, 255, 255, 0.42);
}

.tools-panel-toggle.open {
    transform: translateY(-50%) translateX(calc((var(--tools-panel-width) * -1) - 16px));
}

#meriono-stage.notes-panel-open .tools-panel-toggle {
    z-index: 44;
}

#meriono-stage.tools-panel-open .notes-panel-toggle {
    z-index: 44;
}

.notes-panel {
    position: absolute;
    top: var(--ui-top-anchor-right);
    bottom: var(--ui-bottom-anchor);
    right: var(--layout-side-inset);
    width: var(--notes-panel-width);
    max-height: calc(100% - var(--ui-top-anchor-right) - var(--ui-bottom-anchor));
    background: #000000;
    border: 1px solid rgba(255, 255, 255, 0.24);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-radius: 24px;
    box-shadow:
        -10px 0 40px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.08),
        0 0 14px rgba(255, 255, 255, 0.1);
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 45;
    display: flex;
    flex-direction: column;
    padding: 20px;
    gap: 12px;
    color: var(--text-dark);
    overflow: hidden;
}

.notes-panel.open {
    transform: translateX(0);
}

.tools-panel {
    position: absolute;
    top: var(--ui-top-anchor-right);
    bottom: var(--ui-bottom-anchor);
    right: var(--layout-side-inset);
    width: var(--tools-panel-width);
    max-height: calc(100% - var(--ui-top-anchor-right) - var(--ui-bottom-anchor));
    background: #f7f8fb;
    border: 1px solid rgba(12, 18, 34, 0.12);
    border-radius: 24px;
    box-shadow:
        -10px 0 40px rgba(0, 0, 0, 0.54),
        0 0 0 1px rgba(255, 255, 255, 0.3);
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 45;
    display: flex;
    flex-direction: column;
    padding: 14px;
    gap: 10px;
    overflow: hidden;
}

.tools-panel.open {
    transform: translateX(0);
}

.tools-panel-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    border-bottom: 1px solid rgba(15, 24, 43, 0.12);
    padding: 0 4px 10px;
}

.tools-panel-back-btn {
    width: 34px;
    height: 34px;
    min-width: 34px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    background: #050505;
    color: #ffffff;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.28);
    transition: none;
}

.tools-panel-back-btn svg {
    width: 19px;
    height: 19px;
    display: block;
    fill: currentColor;
}

.tools-panel-header-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding-left: 4px;
}

.tools-panel-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(18px, 1.45vw, 24px);
    font-weight: 900;
    color: rgba(12, 22, 40, 0.92);
    letter-spacing: 0.2px;
}

.tools-panel-content {
    flex: 1;
    min-height: 0;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(12, 18, 34, 0.1);
    background: #ffffff;
}

.tools-panel-iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    background: #ffffff;
}

@supports (-webkit-touch-callout: none) {
    .notes-panel {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .notes-panel {
        background: #000000;
    }
}

.notes-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 12px;
}

.notes-panel-header-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-left: 6px;
}

.notes-panel-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(20px, 1.5vw, 28px);
    font-weight: 900;
    letter-spacing: 0.3px;
    color: rgba(255, 255, 255, 0.96);
}

.notes-panel-subtitle {
    margin: 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: clamp(12px, 0.9vw, 14px);
    font-weight: 600;
    line-height: 1.35;
}

.notes-card-stack {
    flex: 1;
    position: relative;
    min-height: 0;
    overflow-y: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-right: 4px;
    padding-bottom: 4px;
}

.notes-card-stack::-webkit-scrollbar {
    display: none;
}

.notes-card-stack> :not(.notes-search-shell):not(.notes-detailed-shell) {
    flex: 0 0 auto;
}

.notes-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-radius: 16px;
    border: 1px solid rgba(18, 18, 18, 0.08);
    background: linear-gradient(170deg, #ffffff 0%, #f0f0f0 100%);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
    padding: 14px 14px 12px;
}

.notes-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.notes-card-title {
    margin: 0;
    font-size: clamp(15px, 1.05vw, 18px);
    font-weight: 900;
    color: #131313;
}

.notes-card-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 64px;
    height: 26px;
    border-radius: 999px;
    padding: 0 10px;
    background: #131313;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.2px;
}

.notes-card-text {
    margin: 0;
    color: #3d3d3d;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.42;
}

.notes-card-action {
    align-self: flex-start;
    border: 1.5px solid #131313;
    background: #fff;
    color: #131313;
    border-radius: 999px;
    height: 34px;
    padding: 0 14px;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.2px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.notes-card-action:hover {
    transform: translateY(-1px);
    background: #131313;
    color: #fff;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
}

/* 4.15 Notes Preview Card */
.notes-preview-card {
    width: 93%;
    margin-right: auto;
    min-height: 136px;
    border-radius: 16px;
    border: 1px solid rgba(14, 14, 14, 0.09);
    background: linear-gradient(172deg, #fdfdfd 0%, #f3f4f5 100%);
    box-shadow: 0 10px 20px rgba(7, 7, 7, 0.12);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 9px;
    text-align: left;
    cursor: pointer;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.notes-preview-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 24px rgba(7, 7, 7, 0.16);
    border-color: rgba(14, 14, 14, 0.14);
}

.notes-completed-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 18px;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(76, 175, 80, 0.96);
    color: #fff;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.16px;
    white-space: nowrap;
}

/* Edit popup keeps the badge in DOM and toggles [hidden]; ensure display respects hidden (inline-flex would win otherwise). */
.notes-completed-badge[hidden] {
    display: none !important;
}

.notes-preview-card:focus-visible {
    outline: none;
    border-color: rgba(241, 122, 42, 0.5);
    box-shadow:
        0 0 0 2px rgba(241, 122, 42, 0.18),
        0 14px 24px rgba(7, 7, 7, 0.16);
}

.notes-preview-top {
    min-height: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.notes-preview-top-left,
.notes-preview-top-right {
    display: inline-flex;
    align-items: center;
    min-height: 18px;
}

.notes-preview-top-right {
    color: #4a4a4a;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.12px;
    font-variant-numeric: tabular-nums;
    margin-left: auto;
    gap: 8px;
    justify-content: flex-end;
}

.notes-preview-priority-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.22);
}

.notes-preview-priority-dot.priority-high {
    background: #cf2023;
}

.notes-preview-priority-dot.priority-medium {
    background: #e6772f;
}

.notes-preview-priority-dot.priority-low {
    background: #ffdf00;
}

.notes-preview-note-body,
.notes-preview-task-body {
    min-height: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.notes-preview-note-title {
    margin: 0;
    color: #1a1a1a;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notes-preview-note-text {
    margin: 0;
    color: #3f3f3f;
    font-size: 11px;
    font-weight: 650;
    line-height: 1.42;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
}

.notes-preview-task-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow: hidden;
    padding-left: 1px;
}

.notes-preview-task-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
}

.notes-preview-task-radio {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1.5px solid rgba(17, 17, 17, 0.85);
    background: #ffffff;
    box-sizing: border-box;
}

.notes-preview-task-radio.is-done {
    background: #151515;
    border-color: #151515;
    position: relative;
}

.notes-preview-task-radio.is-done::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #ffffff;
    transform: translate(-50%, -50%);
}

.notes-preview-task-text {
    color: #2b2b2b;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notes-preview-task-empty {
    margin: 0;
    color: #6a6a6a;
    font-size: 11px;
    font-weight: 700;
}

.notes-preview-bottom {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: #2f2f2f;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.12px;
    font-variant-numeric: tabular-nums;
}

.notes-preview-bottom-time {
    min-width: 0;
}

.notes-preview-restore-btn {
    border: 1px solid rgba(17, 17, 17, 0.22);
    background: rgba(255, 255, 255, 0.92);
    color: #171717;
    min-height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.14px;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.notes-preview-restore-btn:hover {
    border-color: rgba(17, 17, 17, 0.34);
    background: rgba(255, 255, 255, 1);
}

.notes-delete-countdown-badge {
    background: rgba(203, 43, 43, 0.96);
    color: #fff;
}

@media (max-width: 767px) {
    .notes-preview-card {
        min-height: 126px;
        padding: 10px;
        gap: 8px;
    }

    .notes-preview-note-text {
        -webkit-line-clamp: 3;
    }
}

/* 4.15B Notes Tasks Card */
.notes-tasks-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-radius: 16px;
    border: 1px solid rgba(14, 14, 14, 0.08);
    background: var(--notes-card-surface);
    box-shadow: 0 12px 24px rgba(7, 7, 7, 0.12);
    padding: 12px;
    min-height: 174px;
}

.notes-search-shell+.notes-tasks-card,
.notes-detailed-shell+.notes-tasks-card {
    margin-top: 8px;
}

.notes-tasks-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 20px;
}

.notes-tasks-card[data-view="collapsed"] .notes-tasks-header {
    margin: -12px -12px 2px;
    padding: 8px 12px 12px;
    border-bottom: 1px solid rgba(12, 12, 12, 0.08);
}

.notes-tasks-title {
    margin: 0;
    color: #171717;
    font-family: var(--font-display);
    font-size: clamp(14px, 1.02vw, 18px);
    font-weight: 900;
    letter-spacing: 0.2px;
}

.notes-tasks-close-btn {
    width: 100%;
    min-height: 38px;
    border-radius: 11px;
    border: 1px solid rgba(18, 18, 18, 0.2);
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.92), rgba(243, 244, 245, 0.88));
    color: #171717;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.2px;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.notes-tasks-close-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(18, 18, 18, 0.32);
    box-shadow: 0 8px 14px rgba(0, 0, 0, 0.16);
}

.notes-tasks-loading,
.notes-tasks-empty {
    flex: 1 1 auto;
    min-height: 120px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    text-align: center;
}

.notes-tasks-loading[hidden],
.notes-tasks-empty[hidden],
.notes-tasks-scroller[hidden] {
    display: none !important;
}

.notes-tasks-loading p,
.notes-tasks-empty p {
    margin: 0;
    color: #1f1f1f;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.16px;
    line-height: 1.35;
}

.notes-tasks-loading-spinner {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid rgba(22, 22, 22, 0.2);
    border-top-color: rgba(22, 22, 22, 0.86);
    animation: notesTasksSpin 0.8s linear infinite;
}

@keyframes notesTasksSpin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.notes-tasks-empty-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #0f0f0f;
    border: 1px solid rgba(15, 15, 15, 0.92);
    box-shadow: none;
}

.notes-tasks-empty-icon svg {
    width: 26px;
    height: 26px;
    transform: translateY(-1px);
}

.notes-tasks-empty-icon path {
    fill: none;
    stroke: #fff;
    stroke-width: 3.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.notes-tasks-scroller {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    overflow-y: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
    padding: 0 12px 0 12px;
}

.notes-tasks-card[data-view="collapsed"] .notes-tasks-scroller {
    overflow: visible;
    padding-bottom: 4px;
}

.notes-tasks-scroller::-webkit-scrollbar {
    display: none;
}

.notes-tasks-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 10px;
    row-gap: 14px;
    align-items: start;
}

.notes-tasks-grid>.notes-tasks-item,
.notes-tasks-grid>.notes-tasks-item:nth-child(odd),
.notes-tasks-grid>.notes-tasks-item:nth-child(even) {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
}

.notes-tasks-grid>.notes-tasks-item .notes-preview-card {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
}

.notes-tasks-card[data-view="collapsed"] .notes-tasks-grid>.notes-tasks-item:nth-child(n + 5) {
    display: none;
}

.notes-tasks-card[data-view="collapsed"] .notes-preview-card {
    box-shadow: 0 6px 12px rgba(7, 7, 7, 0.1);
    transition: none;
}

.notes-tasks-card[data-view="collapsed"] .notes-preview-card:hover {
    transform: none;
    box-shadow: 0 6px 12px rgba(7, 7, 7, 0.1);
    border-color: rgba(14, 14, 14, 0.09);
}

.notes-tasks-footer {
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: stretch;
    padding: 0 12px;
}

.notes-tasks-card[data-view="collapsed"] .notes-tasks-footer {
    margin-top: 12px;
}

.notes-tasks-card[data-view="collapsed"][data-can-expand="false"] {
    min-height: auto;
}

.notes-tasks-card[data-view="collapsed"][data-can-expand="false"] .notes-tasks-footer,
.notes-tasks-card[data-view="collapsed"][data-state="ready"][data-can-expand="false"] .notes-tasks-footer {
    display: none;
    min-height: 0;
    margin-top: 0;
    padding: 0;
}

.notes-tasks-card[data-view="collapsed"][data-can-expand="false"] .notes-tasks-scroller {
    padding-bottom: 12px;
}

.notes-tasks-shortcuts-card {
    margin-top: 8px;
}

.notes-tasks-shortcuts-group {
    width: 100%;
    max-width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
    align-items: stretch;
}

.notes-tasks-shortcuts-divider {
    width: calc(100% - 24px);
    height: 1px;
    margin: 10px auto;
    background: rgba(255, 255, 255, 0.46);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.notes-tasks-notes-heading-card {
    width: 100%;
    margin: 0 0 12px;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.56);
    background: rgba(255, 255, 255, 0.92);
}

.notes-tasks-notes-heading-title {
    margin: 0;
    color: #141414;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.2px;
    line-height: 1.2;
}

.notes-tasks-note-previews-section {
    width: 100%;
    padding: 8px 0 0;
}

.notes-tasks-note-previews-section .notes-tasks-note-previews-scroller {
    max-height: min(52vh, 520px);
    overflow-y: auto;
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-bottom: 0 !important;
}

.notes-tasks-note-previews-section .notes-tasks-note-previews-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 10px !important;
    row-gap: 13px !important;
    justify-items: stretch;
    align-items: stretch;
}

.notes-tasks-note-previews-section .notes-tasks-note-previews-grid>.notes-search-result-item {
    min-width: 0;
    width: 100%;
    display: flex;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.notes-tasks-note-previews-section .notes-tasks-note-previews-grid>.notes-search-result-item:nth-child(odd),
.notes-tasks-note-previews-section .notes-tasks-note-previews-grid>.notes-search-result-item:nth-child(even) {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.notes-tasks-note-previews-section .notes-tasks-note-previews-grid>.notes-search-result-item .notes-preview-card {
    width: 100% !important;
    min-height: 172px;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.notes-tasks-note-previews-spacer {
    width: 100%;
    height: 0;
    pointer-events: none;
}

.notes-tasks-note-previews-sentinel {
    width: 100%;
    height: 2px;
}

.notes-tasks-note-previews-backtop {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.34);
    background: #0f0f0f;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 12px auto 0;
    position: relative;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    opacity: 0;
    pointer-events: none;
    cursor: pointer;
    transition: opacity 0.24s ease, transform 0.24s ease, border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.14),
        0 0 14px rgba(255, 255, 255, 0.2);
}

.notes-tasks-note-previews-backtop.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.notes-tasks-note-previews-backtop svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.notes-tasks-note-previews-backtop:hover {
    transform: translateX(-50%) translateY(-1px);
    border-color: rgba(255, 255, 255, 0.52);
    background: #080808;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.22),
        0 0 18px rgba(255, 255, 255, 0.28);
}

.notes-tasks-shortcut-launcher {
    min-width: 0;
    border: 1px solid rgba(14, 14, 14, 0.08);
    background: var(--notes-card-surface);
    justify-content: center;
    padding: 0 10px;
    gap: 8px;
}

.notes-tasks-shortcut-launcher-icon {
    position: static;
    width: 18px;
    height: 18px;
    transform: none;
    right: auto;
}

#notesTasksTrashBtn {
    padding: 0;
    gap: 0;
}

#notesTasksTrashBtn .notes-tasks-shortcut-launcher-icon {
    width: 26px;
    height: 26px;
    margin: 0 auto;
    position: static;
    top: auto;
    right: auto;
    transform: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.notes-tasks-shortcut-launcher-icon svg {
    width: 100%;
    height: 100%;
}

.notes-tasks-shortcut-launcher-icon circle,
.notes-tasks-shortcut-launcher-icon path {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.notes-tasks-see-more {
    width: 100%;
    min-height: 34px;
    border-radius: 999px;
    border: 1.5px solid #131313;
    background: #131313;
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.2px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.notes-tasks-see-more:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 14px rgba(0, 0, 0, 0.18);
}

.notes-panel-tasks-expanded .notes-tasks-card {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
    margin: 0;
    padding: 0;
    gap: 12px;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    z-index: 82;
}

.notes-panel-tasks-expanded .notes-tasks-header,
.notes-panel-tasks-expanded .notes-tasks-footer {
    display: none;
}

.notes-panel-tasks-expanded .notes-tasks-close-btn {
    width: calc(100% - 24px);
    margin: 0 12px;
    min-height: 48px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: linear-gradient(160deg, rgba(30, 30, 30, 0.72), rgba(10, 10, 10, 0.68));
    color: rgba(255, 255, 255, 0.96);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.24);
}

.notes-panel-tasks-expanded .notes-tasks-close-btn:hover {
    transform: none;
    border-color: rgba(255, 255, 255, 0.34);
    background: linear-gradient(160deg, rgba(36, 36, 36, 0.74), rgba(14, 14, 14, 0.7));
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.24);
}

.notes-panel-tasks-expanded .notes-tasks-scroller {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 10px 12px 10px;
}

.notes-panel-tasks-expanded .notes-tasks-grid {
    row-gap: 10px;
}

.notes-panel-tasks-expanded .notes-tasks-grid .notes-preview-card {
    transition: none;
}

.notes-panel-tasks-expanded .notes-tasks-grid .notes-preview-card:hover {
    transform: none;
    box-shadow: 0 6px 12px rgba(7, 7, 7, 0.1);
    border-color: rgba(14, 14, 14, 0.09);
}

.notes-tasks-blackout {
    position: absolute;
    inset: 0;
    background: #000;
    border-radius: 24px;
    opacity: 0;
    pointer-events: none;
    z-index: 90;
    transition: opacity 0.26s ease;
}

.notes-panel-tasks-blackout-visible .notes-tasks-blackout {
    opacity: 1;
}

.notes-panel-tasks-content-hidden .notes-card-stack> :not(.notes-tasks-card) {
    display: none !important;
}

.notes-tasks-shortcuts-page {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    z-index: 82;
}

.notes-tasks-shortcuts-feedback {
    min-height: 100%;
    padding: 0 18px 12px;
    box-sizing: border-box;
}

.notes-tasks-shortcuts-scroller {
    height: auto;
    min-height: 0;
    flex: 1 1 auto;
    padding-top: 0;
    padding-bottom: 12px;
}

.notes-tasks-shortcuts-grid {
    column-gap: 18px;
    row-gap: 18px;
    justify-items: stretch;
    align-items: stretch;
}

.notes-tasks-shortcuts-grid>.notes-search-result-item {
    width: 100%;
    display: flex;
}

.notes-tasks-shortcuts-grid>.notes-search-result-item:nth-child(odd),
.notes-tasks-shortcuts-grid>.notes-search-result-item:nth-child(even) {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.notes-tasks-shortcuts-grid>.notes-search-result-item .notes-preview-card {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
}

.notes-panel-shortcuts-search-mirror-surface .notes-tasks-shortcuts-page:not([hidden]) {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.notes-panel-shortcuts-search-mirror-surface .notes-tasks-shortcuts-page:not([hidden]) .notes-tasks-close-btn {
    flex: 0 0 auto;
    margin: 0 12px 24px;
}

.notes-panel-shortcuts-search-mirror-surface .notes-tasks-shortcuts-page .notes-tasks-close-btn {
    width: calc(100% - 24px);
    margin: 0 12px;
    min-height: 48px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: linear-gradient(160deg, rgba(30, 30, 30, 0.72), rgba(10, 10, 10, 0.68));
    color: rgba(255, 255, 255, 0.96);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.24);
}

.notes-panel-shortcuts-search-mirror-surface .notes-tasks-shortcuts-page .notes-tasks-close-btn:hover {
    transform: none;
    border-color: rgba(255, 255, 255, 0.34);
    background: linear-gradient(160deg, rgba(36, 36, 36, 0.74), rgba(14, 14, 14, 0.7));
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.24);
}

.notes-panel-shortcuts-search-mirror-surface .notes-tasks-shortcuts-page .notes-tasks-empty-trash-btn {
    border-color: rgba(219, 74, 74, 0.46);
    background: linear-gradient(160deg, rgba(106, 20, 20, 0.62), rgba(58, 10, 10, 0.72));
    margin-top: -12px;
    margin-bottom: 12px;
}

.notes-panel-shortcuts-search-mirror-surface #notesTasksTrashPage:not([hidden]) #notesTasksTrashCloseBtn {
    margin-bottom: 14px;
}

.notes-panel-shortcuts-search-mirror-surface #notesTasksTrashPage:not([hidden]) #notesTasksEmptyTrashBtn {
    margin-top: -4px;
}

.notes-panel-shortcuts-search-mirror-surface #notesTasksTrashPage:not([hidden]) #notesTasksTrashScroller {
    margin-top: 10px;
}

.notes-panel-shortcuts-search-mirror-surface .notes-tasks-shortcuts-page .notes-tasks-empty-trash-btn:hover {
    border-color: rgba(229, 94, 94, 0.58);
    background: linear-gradient(160deg, rgba(122, 24, 24, 0.68), rgba(64, 12, 12, 0.78));
}

.notes-panel-shortcuts-search-mirror-surface .notes-tasks-shortcuts-page .notes-tasks-empty-trash-btn.is-loading {
    opacity: 0.82;
    pointer-events: none;
}

.notes-panel-shortcuts-search-mirror-surface .notes-tasks-shortcuts-page .notes-tasks-empty-trash-btn.is-armed {
    border-color: rgba(239, 126, 126, 0.72);
    box-shadow: 0 0 0 1px rgba(201, 65, 65, 0.26), 0 10px 22px rgba(0, 0, 0, 0.24);
}

.notes-tasks-trash-action-error {
    width: calc(100% - 24px);
    margin: -4px 12px 10px;
    color: rgba(255, 170, 170, 0.95);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.14px;
    line-height: 1.35;
}

/* During shortcuts close transition, hide Close button immediately with blackout. */
.notes-panel-shortcuts-search-mirror-closing .notes-tasks-shortcuts-page .notes-tasks-close-btn {
    opacity: 0;
    pointer-events: none;
}

/* Keep shortcuts close animation clean: hide page content immediately under blackout while state flips. */
.notes-panel-shortcuts-search-mirror-closing .notes-tasks-shortcuts-page> :not(.notes-tasks-close-btn) {
    opacity: 0;
    pointer-events: none;
}

@media (max-width: 560px) {
    .notes-tasks-grid {
        grid-template-columns: 1fr;
    }

    .notes-tasks-grid>.notes-tasks-item {
        margin-left: 0;
        margin-right: auto;
    }
}

/* 4.16 Notes Search UI */
.notes-search-top-row {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-top: 8px;
    padding-inline: 0;
    box-sizing: border-box;
    position: relative;
    z-index: 6;
}

.notes-search-top-row.is-open {
    gap: 0;
    left: 0;
}

.notes-search-top-row.is-detailed-open {
    gap: 0;
    left: 0;
    min-height: 48px;
    padding-bottom: 0;
    margin-bottom: 0;
}

.notes-detailed-top-bar {
    display: none;
}

.notes-search-launcher-group {
    width: 100%;
    max-width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr);
    gap: 10px;
    align-items: stretch;
}

.notes-search-close-btn {
    position: absolute;
    left: 0;
    top: 50%;
    width: 48px;
    min-width: 48px;
    height: 48px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0);
    background: rgba(0, 0, 0, 0);
    color: rgba(255, 255, 255, 0.94);
    font-size: 22px;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-50%) scale(0.96);
    pointer-events: none;
    overflow: hidden;
    padding: 0;
    margin: 0;
    transition:
        opacity 0.2s ease,
        transform 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease,
        filter 0.2s ease;
}

.notes-search-top-row.is-open .notes-search-close-btn,
.notes-search-top-row.is-detailed-open .notes-search-close-btn {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) scale(1);
    pointer-events: auto;
    border-color: rgba(255, 255, 255, 0.28);
    background: linear-gradient(160deg, rgba(30, 30, 30, 0.72), rgba(10, 10, 10, 0.68));
}

.notes-search-close-btn:hover {
    filter: brightness(1.08);
    border-color: rgba(255, 255, 255, 0.36);
}

.notes-search-launcher {
    position: relative;
    width: 100%;
    max-width: 100%;
    min-height: 56px;
    margin: 0 auto;
    border-radius: 16px;
    border: 1px solid rgba(14, 14, 14, 0.08);
    background: var(--notes-card-surface);
    color: #1d1d1d;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(7, 7, 7, 0.12);
    overflow: hidden;
}

.notes-search-launcher:hover {
    border-color: rgba(14, 14, 14, 0.16);
    box-shadow: 0 14px 26px rgba(7, 7, 7, 0.16);
}

.notes-detailed-launcher {
    min-width: 0;
    border: 1px solid rgba(14, 14, 14, 0.08);
    background: var(--notes-card-surface);
    justify-content: center;
    padding: 0 10px;
    gap: 8px;
}

.notes-detailed-launcher-text {
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.2px;
    color: rgba(18, 18, 18, 0.88);
    white-space: nowrap;
}

.notes-detailed-dots {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.notes-detailed-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.24);
}

.notes-detailed-dot.high {
    background: #cf2023;
}

.notes-detailed-dot.medium {
    background: #e6772f;
}

.notes-detailed-dot.low {
    background: #ffdf00;
}

.notes-search-top-row.is-open .notes-search-launcher {
    flex: 0 1 auto;
    width: calc(100% - 64px);
    max-width: calc(100% - 64px);
    min-width: 0;
    min-height: 48px;
    margin-left: 64px;
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06), 0 10px 22px rgba(7, 7, 7, 0.16);
}

.notes-search-top-row.is-open .notes-search-launcher-group {
    display: block;
}

.notes-search-top-row.is-open .notes-detailed-launcher {
    display: none;
}

.notes-search-top-row.is-detailed-open .notes-search-launcher-group {
    display: none;
}

.notes-search-top-row.is-detailed-open .notes-detailed-top-bar {
    flex: 0 1 auto;
    width: calc(100% - 68px);
    max-width: calc(100% - 68px);
    min-width: 0;
    min-height: 48px;
    margin-left: 60px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06), 0 10px 22px rgba(7, 7, 7, 0.16);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 18px;
    padding: 6px 10px;
    box-sizing: border-box;
    position: relative;
    flex-wrap: nowrap;
    overflow: hidden;
}

.notes-search-launcher-icon {
    position: absolute;
    top: 50%;
    right: calc(50% - 86px);
    width: 17px;
    height: 17px;
    color: rgba(16, 16, 16, 0.78);
    display: inline-flex;
    transform: translateY(-50%);
    z-index: 2;
    pointer-events: none;
}

.notes-search-launcher-icon svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
}

.notes-search-launcher-text {
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.2px;
    color: rgba(18, 18, 18, 0.88);
}

.notes-search-top-row.is-open .notes-search-launcher-text {
    opacity: 0;
}

.notes-search-top-row.is-open .notes-search-launcher-icon {
    right: 10px;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: #000;
    color: #fff;
    align-items: center;
    justify-content: center;
    transform: translateY(-50%);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.32);
    pointer-events: auto;
    cursor: pointer;
}

.notes-search-top-row.is-open .notes-search-launcher-icon svg {
    width: 14px;
    height: 14px;
    stroke-width: 2.8;
}

.notes-search-input {
    position: absolute;
    inset: 0;
    width: 100%;
    min-height: 100%;
    border: none;
    background: transparent;
    color: #171717;
    padding: 0 44px 0 14px;
    font-size: 13px;
    font-weight: 800;
    outline: none;
    opacity: 0;
    pointer-events: none;
    z-index: 1;
}

.notes-search-top-row.is-open .notes-search-input {
    opacity: 1;
    pointer-events: auto;
}

.notes-search-shell {
    width: 100%;
    flex: 1 1 auto;
    min-height: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    opacity: 0;
    transform: none;
    padding-top: 18px;
    position: relative;
    z-index: 4;
}

.notes-search-shell.is-active {
    display: flex;
    opacity: 1;
    transform: none;
}

.notes-search-shell:not(.notes-detailed-shell) {
    position: relative;
    padding-top: 44px;
}

.notes-search-shell:not(.notes-detailed-shell)::before {
    content: "";
    position: absolute;
    left: 0;
    right: 8px;
    top: 20px;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
    pointer-events: none;
}

.notes-detailed-shell {
    position: relative;
    padding-top: 44px;
}

.notes-detailed-shell::before {
    content: "";
    position: absolute;
    left: 0;
    right: 8px;
    top: 20px;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
    pointer-events: none;
}

.notes-detailed-toolbar {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 0 12px;
}

.notes-detailed-date-btn {
    min-height: 30px;
    padding: 0 10px;
    border-radius: 10px;
    border: none;
    background: rgba(16, 16, 16, 0.9);
    color: rgba(255, 255, 255, 0.96);
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.16);
    transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
}

.notes-detailed-date-btn:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.22);
}

.notes-detailed-priority-group {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 30px;
    padding: 0;
    border-radius: 0;
    border: none;
    background: transparent;
    flex: 0 0 auto;
    margin-left: 6px;
}

.notes-detailed-priority-btn {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: none;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.22);
    cursor: pointer;
    padding: 0;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.notes-detailed-priority-btn.priority-high {
    background: #cf2023;
}

.notes-detailed-priority-btn.priority-medium {
    background: #e6772f;
}

.notes-detailed-priority-btn.priority-low {
    background: #ffdf00;
}

.notes-detailed-priority-btn.is-selected {
    transform: scale(1.04);
}

.notes-detailed-priority-btn:hover {
    transform: scale(1.1);
}

.notes-detailed-priority-btn.is-selected::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
    transform: translate(-50%, -50%);
}

.notes-detailed-mode-switch {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: center;
    gap: 0;
    min-height: 30px;
    min-width: 156px;
    padding: 3px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.86);
    background:
        linear-gradient(160deg, rgba(255, 255, 255, 0.74) 0%, rgba(245, 245, 245, 0.5) 100%),
        radial-gradient(120% 100% at 30% 0%, rgba(255, 255, 255, 0.66) 0%, rgba(242, 242, 242, 0.24) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow:
        0 0 0 1px rgba(18, 18, 18, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        inset 0 -1px 0 rgba(255, 255, 255, 0.45),
        0 8px 14px rgba(0, 0, 0, 0.1);
    margin-inline: 0;
    flex: 0 0 auto;
    isolation: isolate;
}

/* Brain Dump ile aynı thumb kayma efekti (3 segment) */
.notes-detailed-mode-switch::before {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: calc((100% - 6px) / 3);
    height: calc(100% - 6px);
    border-radius: 999px;
    background: linear-gradient(168deg, #151515 0%, #070707 100%);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.22);
    transition: transform 0.36s cubic-bezier(0.22, 0.9, 0.32, 1);
    will-change: transform;
    z-index: 0;
    pointer-events: none;
}

.notes-detailed-mode-switch:has(.notes-detailed-mode-btn[data-mode="note"].is-selected)::before {
    transform: translateX(0);
}

.notes-detailed-mode-switch:has(.notes-detailed-mode-btn[data-mode="all"].is-selected)::before {
    transform: translateX(100%);
}

.notes-detailed-mode-switch:has(.notes-detailed-mode-btn[data-mode="task"].is-selected)::before {
    transform: translateX(200%);
}

.notes-detailed-date-btn {
    flex: 0 0 auto;
    margin-left: 4px;
}

.notes-detailed-mode-btn {
    border: none;
    background: transparent;
    color: #2b2b2b;
    font-size: 11px;
    font-weight: 900;
    border-radius: 999px;
    cursor: pointer;
    min-height: 24px;
    letter-spacing: 0.12px;
    transition: color 0.2s ease, transform 0.2s ease;
    position: relative;
    z-index: 1;
}

.notes-detailed-mode-btn[data-mode="all"] {
    min-width: 28px;
}

.notes-detailed-mode-btn.is-selected {
    background: transparent;
    color: #fff;
    box-shadow: none;
}

.notes-detailed-mode-btn:active {
    transform: scale(0.98);
}

.notes-detailed-date-popover {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: min(320px, calc(100vw - 40px), calc(var(--notes-panel-width, 460px) - 38px));
    max-width: calc(var(--notes-panel-width, 460px) - 38px);
    margin: 0;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: #fff;
    box-shadow: 0 16px 24px rgba(0, 0, 0, 0.22);
    z-index: 36;
}

.notes-detailed-date-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.notes-detailed-date-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.notes-detailed-date-field>span {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.2px;
    color: rgba(68, 68, 68, 0.95);
}

.notes-detailed-date-field>input {
    min-height: 30px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    background: #fff;
    color: #171717;
    font-size: 11px;
    font-weight: 700;
    padding: 0 8px;
}

.notes-detailed-task-only {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(0, 0, 0, 0.12);
}

.notes-detailed-recurring {
    margin-top: 8px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 800;
    color: rgba(24, 24, 24, 0.86);
}

.notes-detailed-results-scroller {
    padding-top: 0;
    padding-bottom: 10px;
    padding-left: 34px;
    padding-right: 34px;
}

.notes-detailed-shell .notes-search-results-grid {
    padding-top: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 16px;
    row-gap: 16px;
    justify-items: stretch;
    align-items: stretch;
}

.notes-detailed-shell .notes-search-result-item {
    width: 100%;
    display: flex;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.notes-detailed-shell .notes-search-result-item .notes-preview-card {
    width: 100%;
    min-height: 136px;
    height: 100%;
    margin-left: 0;
    margin-right: 0;
}

.notes-detailed-back-top {
    position: absolute;
    right: 16px;
    bottom: 16px;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(0, 0, 0, 0.76);
    color: rgba(255, 255, 255, 0.95);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.18px;
    cursor: pointer;
    z-index: 6;
}

.notes-detailed-back-top:hover {
    border-color: rgba(255, 255, 255, 0.48);
    filter: brightness(1.05);
}

.notes-search-blackout {
    position: absolute;
    inset: 0;
    background: #000;
    border-radius: 24px;
    opacity: 0;
    pointer-events: none;
    z-index: 80;
    transition: opacity 0.26s ease;
}

.notes-panel-search-blackout-visible .notes-search-blackout {
    opacity: 1;
}

.notes-search-feedback {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    text-align: center;
}

.notes-search-feedback-text,
.notes-search-error {
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.18px;
    line-height: 1.25;
}

.notes-search-status-icon-wrap {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
}

.notes-search-spinner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2.2px solid rgba(255, 255, 255, 0.28);
    border-top-color: rgba(255, 255, 255, 0.92);
    animation: notesSearchSpin 0.8s linear infinite;
}

.notes-search-warning {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notes-search-warning svg {
    width: 100%;
    height: 100%;
}

.notes-search-warning path {
    fill: rgba(255, 255, 255, 0.16);
    stroke: rgba(255, 255, 255, 0.92);
    stroke-width: 1.8;
}

.notes-search-warning line,
.notes-search-warning circle {
    stroke: rgba(255, 255, 255, 0.96);
    fill: rgba(255, 255, 255, 0.96);
    stroke-width: 1.9;
}

.notes-search-spinner[hidden],
.notes-search-warning[hidden],
.notes-search-feedback-text[hidden],
.notes-search-error[hidden],
.notes-search-feedback[hidden] {
    display: none !important;
}

.notes-search-error {
    flex: 0 0 auto;
    min-height: auto;
    margin-top: auto;
    justify-content: flex-end;
    padding-bottom: 6px;
}

@keyframes notesSearchSpin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.notes-search-results-scroller {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    overflow-y: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
    padding: 0 12px 0 12px;
}

.notes-search-results-scroller::-webkit-scrollbar {
    display: none;
}

.notes-search-results-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    align-items: start;
}

.notes-search-shell:not(.notes-detailed-shell) .notes-search-results-scroller {
    padding-top: 0;
    padding-left: 34px;
    padding-right: 34px;
}

.notes-search-shell:not(.notes-detailed-shell) .notes-search-results-grid {
    padding-top: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 16px;
    row-gap: 16px;
    justify-items: stretch;
    align-items: stretch;
}

.notes-search-shell:not(.notes-detailed-shell) .notes-search-result-item {
    width: 100%;
    display: flex;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.notes-search-shell:not(.notes-detailed-shell) .notes-search-result-item .notes-preview-card {
    width: 100%;
    min-height: 136px;
    height: 100%;
    margin-left: 0;
    margin-right: 0;
}

.notes-search-results-grid>.notes-search-result-item:nth-child(odd) {
    margin-left: 0;
    margin-right: auto;
}

.notes-search-results-grid>.notes-search-result-item:nth-child(even) {
    margin-left: auto;
    margin-right: 0;
}

/* Kayar panel arama sonuçları: önizleme bloğunu hizalı tut (odd/even kaydırmasını kapat); grid gap aynı */
.notes-detailed-shell .notes-search-results-grid>.notes-search-result-item:nth-child(odd),
.notes-detailed-shell .notes-search-results-grid>.notes-search-result-item:nth-child(even),
.notes-search-shell:not(.notes-detailed-shell) .notes-search-results-grid>.notes-search-result-item:nth-child(odd),
.notes-search-shell:not(.notes-detailed-shell) .notes-search-results-grid>.notes-search-result-item:nth-child(even) {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.notes-search-result-item {
    opacity: 0;
    transform: translateY(8px);
    animation: notesSearchResultIn 0.28s ease forwards;
    animation-delay: calc(var(--notes-search-index, 0) * 22ms);
}

@keyframes notesSearchResultIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notes-panel-search-content-hidden .notes-card-stack> :not(.notes-search-shell):not(.notes-detailed-shell):not(.notes-search-top-row):not(.notes-search-blackout) {
    display: none !important;
}

/* Task shortcuts (Completed / Trash): same blackout + stack visibility as search, separate panel classes so search close does not clear shortcut state. */
.notes-panel-shortcuts-search-mirror-blackout-visible .notes-search-blackout {
    opacity: 1;
}

.notes-panel-shortcuts-search-mirror-content-hidden .notes-card-stack> :not(.notes-search-shell):not(.notes-detailed-shell):not(.notes-search-top-row):not(.notes-search-blackout):not(.notes-tasks-shortcuts-page) {
    display: none !important;
}

.notes-panel-shortcuts-search-mirror-surface .notes-search-shell,
.notes-panel-shortcuts-search-mirror-surface .notes-detailed-shell {
    display: none !important;
}

.notes-panel-shortcuts-search-mirror-surface .notes-search-top-row {
    display: none !important;
}

@media (max-width: 560px) {
    .notes-search-top-row.is-detailed-open .notes-detailed-top-bar {
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 8px;
        width: calc(100% - 60px);
        max-width: calc(100% - 60px);
        min-height: 56px;
        padding: 8px;
    }

    .notes-search-top-row.is-detailed-open .notes-detailed-mode-switch {
        min-width: 0;
        width: 100%;
    }

    .notes-detailed-date-grid {
        grid-template-columns: 1fr;
    }

    .notes-detailed-date-popover {
        width: calc(100% - 16px);
        margin-inline: 8px;
    }

    .notes-search-results-grid {
        grid-template-columns: 1fr;
    }

    .notes-search-results-grid>.notes-search-result-item {
        margin-left: 0;
        margin-right: auto;
    }

    .notes-detailed-shell .notes-search-results-grid>.notes-search-result-item,
    .notes-search-shell:not(.notes-detailed-shell) .notes-search-results-grid>.notes-search-result-item {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

/* 4.2 Brain Dump Card (DF Notes) */
.brain-dump-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-radius: 16px;
    border: 1px solid rgba(14, 14, 14, 0.08);
    background: var(--notes-card-surface);
    box-shadow: 0 12px 24px rgba(7, 7, 7, 0.12);
    padding: 12px;
    min-height: 290px;
}

.brain-dump-header {
    display: flex;
    align-items: center;
    margin: -12px -12px 0;
    padding: 8px 12px 12px;
    border-bottom: 1px solid rgba(12, 12, 12, 0.08);
}

.brain-dump-heading {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.brain-dump-new-wrap {
    margin-left: auto;
    min-width: 180px;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.brain-dump-title {
    margin: 0;
    color: #141414;
    font-family: var(--font-display);
    font-size: clamp(16px, 1.08vw, 20px);
    font-weight: 900;
    letter-spacing: 0.2px;
}

.brain-dump-new-btn {
    border: 1px solid rgba(18, 18, 18, 0.22);
    background: rgba(255, 255, 255, 0.72);
    color: #121212;
    min-height: 24px;
    min-width: 128px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.15px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.brain-dump-new-btn.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.brain-dump-new-btn:hover {
    background: rgba(255, 255, 255, 0.94);
    border-color: rgba(18, 18, 18, 0.34);
}

.brain-dump-countdown {
    position: relative;
    width: 28px;
    height: 28px;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.94);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.brain-dump-countdown.is-visible {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.brain-dump-countdown svg {
    width: 28px;
    height: 28px;
    transform: rotate(-90deg);
}

.brain-dump-countdown-track {
    fill: none;
    stroke: rgba(18, 18, 18, 0.16);
    stroke-width: 2;
}

.brain-dump-countdown-progress {
    fill: none;
    stroke: #f17a2a;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-dasharray: 69.12;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 0.1s linear;
}

.brain-dump-countdown span {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1d1d1d;
    font-size: 9px;
    font-weight: 900;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.brain-dump-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 18px;
    text-align: center;
}

.brain-dump-meta-label {
    font-size: 11px;
    font-weight: 800;
    color: #707070;
    letter-spacing: 0.2px;
}

.brain-dump-meta-value {
    font-size: 12px;
    font-weight: 900;
    color: #1c1c1c;
    letter-spacing: 0.2px;
    font-variant-numeric: tabular-nums;
}

.brain-dump-meta-bottom {
    margin-top: auto;
}

#brainDumpSyncStatus {
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.24px;
    color: #101010;
}

.brain-dump-card[data-sync-status="syncing"] #brainDumpSyncStatus {
    color: #101010;
}

.brain-dump-card[data-sync-status="sync-pending"] #brainDumpSyncStatus {
    color: #101010;
}

.brain-dump-card[data-sync-status="sync-error"] #brainDumpSyncStatus {
    color: #101010;
}

.brain-dump-grid {
    display: grid;
    grid-template-columns: minmax(132px, 1fr) minmax(0, 3fr);
    gap: 12px;
    min-height: 214px;
    align-items: stretch;
}

.brain-dump-controls {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 2px 0 0;
    margin-top: 10px;
    min-height: 100%;
}

.brain-dump-mode-shell {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.brain-dump-mode-toggle {
    position: relative;
    width: 100%;
    max-width: 144px;
    min-height: 40px;
    padding: 4px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.86);
    background:
        linear-gradient(160deg, rgba(255, 255, 255, 0.74) 0%, rgba(245, 245, 245, 0.5) 100%),
        radial-gradient(120% 100% at 30% 0%, rgba(255, 255, 255, 0.66) 0%, rgba(242, 242, 242, 0.24) 100%);
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 0;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow:
        0 0 0 1px rgba(18, 18, 18, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        inset 0 -1px 0 rgba(255, 255, 255, 0.45),
        0 10px 18px rgba(0, 0, 0, 0.12);
    isolation: isolate;
}

.brain-dump-mode-thumb {
    position: absolute;
    top: 4px;
    left: 4px;
    width: calc(50% - 4px);
    height: calc(100% - 8px);
    border-radius: 999px;
    background: linear-gradient(168deg, #151515 0%, #070707 100%);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.22);
    transition: transform 0.36s cubic-bezier(0.22, 0.9, 0.32, 1);
    will-change: transform;
    z-index: 0;
}

.brain-dump-mode-toggle[data-mode="task"] .brain-dump-mode-thumb {
    transform: translateX(100%);
}

.brain-dump-mode-option {
    position: relative;
    z-index: 1;
    border: none;
    background: transparent;
    color: #2b2b2b;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
    min-height: 30px;
    border-radius: 999px;
    transition: color 0.2s ease, transform 0.2s ease;
}

.brain-dump-mode-option.active {
    color: #fff;
}

.brain-dump-mode-option:active {
    transform: scale(0.98);
}

.brain-dump-priority {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    min-height: 30px;
}

.brain-dump-priority-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    position: relative;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.22);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.brain-dump-priority-dot:hover {
    transform: scale(1.1);
}

.brain-dump-priority-dot.high {
    background: #cf2023;
}

.brain-dump-priority-dot.medium {
    background: #e6772f;
}

.brain-dump-priority-dot.low {
    background: #ffdf00;
}

.brain-dump-priority-dot.is-selected::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
    transform: translate(-50%, -50%);
}

.brain-dump-controls-divider {
    width: 78px;
    height: 1px;
    border-radius: 999px;
    background: rgba(20, 20, 20, 0.14);
    margin: 1px 0 0;
    align-self: center;
}

.brain-dump-schedule-wrap {
    width: 100%;
    display: flex;
    justify-content: center;
    position: relative;
}

.brain-dump-schedule-btn {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.72);
    background:
        radial-gradient(95% 95% at 28% 20%, rgba(255, 255, 255, 0.92) 0%, rgba(247, 247, 247, 0.76) 52%, rgba(233, 233, 233, 0.62) 100%),
        linear-gradient(160deg, rgba(255, 255, 255, 0.64) 0%, rgba(236, 236, 236, 0.42) 100%);
    color: #121212;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.86),
        0 6px 14px rgba(0, 0, 0, 0.16);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.brain-dump-schedule-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.9);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.92),
        0 9px 16px rgba(0, 0, 0, 0.2);
}

.brain-dump-schedule-btn.is-configured {
    border-color: rgba(255, 155, 74, 0.9);
    background:
        radial-gradient(95% 95% at 28% 20%, rgba(255, 187, 126, 0.95) 0%, rgba(255, 154, 72, 0.9) 52%, rgba(241, 117, 34, 0.86) 100%),
        linear-gradient(160deg, rgba(255, 176, 102, 0.82) 0%, rgba(232, 118, 41, 0.76) 100%);
    color: #ffffff;
    box-shadow:
        inset 0 1px 0 rgba(255, 232, 209, 0.72),
        0 8px 16px rgba(194, 95, 31, 0.34);
}

.brain-dump-schedule-btn.is-configured:hover {
    border-color: rgba(255, 200, 152, 0.95);
    box-shadow:
        inset 0 1px 0 rgba(255, 241, 226, 0.76),
        0 10px 18px rgba(194, 95, 31, 0.38);
}

.brain-dump-schedule-btn svg {
    width: 21px;
    height: 21px;
    fill: currentColor;
}

.brain-dump-schedule-btn:focus-visible {
    outline: none;
    box-shadow:
        0 0 0 2px rgba(20, 20, 20, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.92),
        0 9px 16px rgba(0, 0, 0, 0.2);
}

.brain-dump-schedule-popover {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    transform: none;
    width: min(288px, calc(100vw - 40px), calc(var(--notes-panel-width, 460px) - 38px));
    max-width: calc(var(--notes-panel-width, 460px) - 38px);
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: #fff;
    box-shadow: 0 16px 24px rgba(0, 0, 0, 0.22);
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 36;
}

.brain-dump-schedule-wrap[hidden],
.brain-dump-schedule-btn[hidden],
.brain-dump-schedule-popover[hidden] {
    display: none !important;
}

.brain-dump-popover-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.brain-dump-popover-field span {
    color: #444;
    font-size: 10px;
    font-weight: 800;
}

.brain-dump-popover-field input,
.brain-dump-popover-field select {
    width: 100%;
    min-height: 30px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    background: #fff;
    color: #171717;
    font-size: 12px;
    font-weight: 700;
    padding: 0 8px;
    font-variant-numeric: tabular-nums;
}

.brain-dump-end-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 104px;
    gap: 6px;
    align-items: center;
}

.brain-dump-popover-field input[data-invalid="true"] {
    border-color: rgba(172, 31, 31, 0.6);
    box-shadow: 0 0 0 2px rgba(172, 31, 31, 0.1);
}

.brain-dump-repeat-field {
    gap: 6px;
}

.brain-dump-repeat-select {
    width: 100%;
    min-height: 30px;
    border-radius: 8px;
    border: 1px solid rgba(18, 18, 18, 0.12);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(245, 246, 247, 0.95) 100%);
    color: #1a1a1a;
    font-size: 10px;
    font-weight: 800;
    text-align: left;
    padding: 0 10px;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.brain-dump-repeat-select:hover {
    border-color: rgba(18, 18, 18, 0.22);
}

.brain-dump-repeat-select:focus-visible {
    outline: none;
    border-color: rgba(18, 18, 18, 0.3);
    box-shadow: 0 0 0 2px rgba(18, 18, 18, 0.08);
}

.brain-dump-weekly-days {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.brain-dump-weekly-days[hidden] {
    display: none !important;
}

.brain-dump-weekly-days-label {
    color: #3f3f3f;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.12px;
}

.brain-dump-weekly-days-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
}

.brain-dump-weekday-btn {
    min-height: 28px;
    border-radius: 999px;
    border: 1px solid rgba(18, 18, 18, 0.2);
    background: #ffffff;
    color: #1a1a1a;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12px;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.brain-dump-weekday-btn:hover {
    border-color: rgba(18, 18, 18, 0.3);
    transform: translateY(-1px);
}

.brain-dump-weekday-btn.is-selected {
    background: #f17a2a;
    border-color: rgba(221, 106, 21, 0.92);
    color: #ffffff;
    box-shadow: 0 5px 12px rgba(211, 97, 17, 0.28);
}

.brain-dump-weekday-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(241, 122, 42, 0.24);
}

.brain-dump-save-btn {
    margin-top: auto;
    width: 100%;
    min-height: 34px;
    border-radius: 999px;
    border: 1.5px solid #131313;
    background: #131313;
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.2px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.brain-dump-save-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 8px 14px rgba(0, 0, 0, 0.18);
}

.brain-dump-save-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    box-shadow: none;
}

.brain-dump-content {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-left: 12px;
    max-width: calc(100% - 12px);
    min-height: 100%;
}

.brain-dump-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.brain-dump-field-label {
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.2px;
    color: #535353;
}

.brain-dump-title-input,
.brain-dump-note-input,
.brain-dump-task-input {
    width: 100%;
    border-radius: 10px;
    border: 1px solid rgba(16, 16, 16, 0.055);
    background: linear-gradient(180deg, #fbfbfb 0%, #f7f8f9 100%);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.035);
    color: #171717;
    padding: 8px 10px;
    font-size: 12px;
    font-weight: 700;
    outline: none;
    resize: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.brain-dump-title-input:focus,
.brain-dump-note-input:focus,
.brain-dump-task-input:focus,
.brain-dump-popover-field input:focus,
.brain-dump-popover-field select:focus {
    border-color: rgba(18, 18, 18, 0.16);
    box-shadow:
        inset 0 1px 2px rgba(0, 0, 0, 0.05),
        0 0 0 2px rgba(20, 20, 20, 0.05);
}

.brain-dump-note-input {
    min-height: 120px;
    max-height: none;
    height: 100%;
    resize: none;
    line-height: 1.45;
}

.brain-dump-note-field,
.brain-dump-task-field {
    flex: 1 1 auto;
    min-height: 0;
}

.brain-dump-task-editor {
    min-height: 154px;
    max-height: none;
    height: 100%;
    border-radius: 10px;
    border: 1px solid rgba(16, 16, 16, 0.055);
    background: linear-gradient(180deg, #fbfbfb 0%, #f7f8f9 100%);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.035);
    padding: 8px;
    overflow-y: auto;
}

.brain-dump-task-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.brain-dump-task-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
}

.brain-dump-task-radio {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1.5px solid #1a1a1a;
    background: #fff;
    cursor: pointer;
    position: relative;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.brain-dump-task-radio.is-done {
    background: rgba(76, 175, 80, 0.96);
    border-color: rgba(76, 175, 80, 0.96);
}

.brain-dump-task-radio.is-done::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
    transform: translate(-50%, -50%);
}

.brain-dump-task-remove {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid rgba(20, 20, 20, 0.22);
    background: rgba(255, 255, 255, 0.7);
    color: #252525;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    line-height: 1;
    font-weight: 900;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.brain-dump-task-remove:hover {
    background: rgba(20, 20, 20, 0.1);
    border-color: rgba(20, 20, 20, 0.32);
    transform: scale(1.04);
}

/* 4.3 Notes Edit Card Overlay */
.notes-panel {
    position: absolute;
}

.notes-panel.notes-panel-edit-open .notes-panel-header,
.notes-panel.notes-panel-edit-open .notes-card-stack {
    filter: blur(6px);
    pointer-events: none;
    user-select: none;
}

.notes-edit-overlay {
    position: absolute;
    inset: 1px;
    z-index: 58;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 28px;
    border-radius: inherit;
    overflow: hidden;
    contain: paint;
}

.notes-edit-overlay.open {
    display: flex;
}

.notes-edit-backdrop {
    position: absolute;
    inset: 0;
    border: none;
    margin: 0;
    padding: 0;
    background: rgba(8, 8, 8, 0.26);
    backdrop-filter: blur(12px) saturate(120%);
    -webkit-backdrop-filter: blur(12px) saturate(120%);
    border-radius: inherit;
    cursor: pointer;
}

.notes-edit-card {
    position: relative;
    width: min(568px, calc(100% - 60px));
    max-height: calc(100% - 42px);
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-radius: 18px;
    border: 1px solid rgba(14, 14, 14, 0.08);
    background: #f8f9fa;
    box-shadow: 0 14px 30px rgba(8, 8, 8, 0.2);
    padding: 12px;
    overflow: visible;
}

.notes-edit-header {
    display: grid;
    grid-template-columns: minmax(132px, 1fr) minmax(0, 2.4fr);
    align-items: center;
    min-height: 22px;
}

.notes-edit-badges {
    grid-column: 2;
    justify-self: end;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-right: 4px;
}

.notes-edit-last-modified {
    grid-column: 1;
    justify-self: center;
    margin: 0;
    color: #202020;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.18px;
    font-variant-numeric: tabular-nums;
    text-align: center;
}

.notes-edit-completed-badge {
    position: relative;
    right: 2px;
}

.notes-edit-delete-countdown-badge {
    position: relative;
    right: 0;
}

.notes-edit-grid {
    display: grid;
    grid-template-columns: minmax(132px, 1fr) minmax(0, 2.4fr);
    gap: 12px;
    min-height: 214px;
    align-items: stretch;
    overflow: visible;
}

.notes-edit-controls {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 2px 0 0;
    margin-top: 8px;
    min-height: 100%;
    overflow: visible;
}

.notes-edit-delete-btn {
    width: 122px;
    max-width: 122px;
    min-height: 36px;
    align-self: center;
    border-radius: 999px;
    border: 1px solid rgba(23, 23, 23, 0.2);
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.9), rgba(243, 244, 245, 0.86));
    color: #171717;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.2px;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.notes-edit-delete-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(23, 23, 23, 0.32);
    box-shadow: 0 8px 16px rgba(8, 8, 8, 0.14);
}

.notes-edit-delete-btn.is-armed {
    background: linear-gradient(160deg, #141414 0%, #070707 100%);
    color: #fff;
    border-color: rgba(11, 11, 11, 0.95);
}

.notes-edit-restore-btn {
    border-color: rgba(49, 121, 80, 0.45);
    background: linear-gradient(160deg, rgba(69, 152, 102, 0.22), rgba(53, 131, 88, 0.26));
}

.notes-edit-restore-btn:hover {
    border-color: rgba(49, 121, 80, 0.62);
}

.notes-edit-content {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-left: 10px;
    max-width: calc(100% - 10px);
    min-height: 100%;
}

.notes-edit-undo-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 34px;
    border-radius: 11px;
    border: 1px solid rgba(18, 18, 18, 0.12);
    background: rgba(255, 255, 255, 0.74);
    padding: 6px 10px;
}

.notes-edit-undo-bar[hidden] {
    display: none !important;
}

.notes-edit-trash-notice {
    border-color: rgba(177, 59, 59, 0.28);
    background: rgba(255, 236, 236, 0.92);
}

.notes-edit-floating-trash-notice {
    position: relative;
    width: min(568px, calc(100% - 60px));
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 34px;
    border-radius: 11px;
    border: 1px solid rgba(177, 59, 59, 0.28);
    background: rgba(255, 236, 236, 0.92);
    padding: 6px 10px;
}

.notes-edit-floating-trash-notice[hidden] {
    display: none !important;
}

.notes-edit-floating-trash-text {
    margin: 0;
    color: #1f1f1f;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14px;
    line-height: 1.3;
}

#notesEditUndoText {
    margin: 0;
    color: #1f1f1f;
    font-size: 11px;
    font-weight: 780;
    letter-spacing: 0.14px;
    line-height: 1.3;
}

.notes-edit-undo-btn {
    border: 1px solid rgba(17, 17, 17, 0.22);
    background: rgba(255, 255, 255, 0.88);
    color: #161616;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.15px;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.notes-edit-undo-btn:hover {
    border-color: rgba(17, 17, 17, 0.34);
    background: rgba(255, 255, 255, 1);
}

.notes-edit-meta {
    margin-top: auto;
    min-height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#notesEditSyncStatus {
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.24px;
    color: #101010;
}

.notes-edit-card[data-sync-status="syncing"] #notesEditSyncStatus,
.notes-edit-card[data-sync-status="sync-pending"] #notesEditSyncStatus,
.notes-edit-card[data-sync-status="sync-error"] #notesEditSyncStatus {
    color: #101010;
}

@media (max-width: 920px) {
    .notes-edit-overlay {
        padding: 22px;
    }

    .notes-edit-card {
        width: min(552px, calc(100% - 44px));
        max-height: calc(100% - 30px);
    }

    .notes-edit-floating-trash-notice {
        width: min(552px, calc(100% - 44px));
    }
}

@media (max-width: 767px) {
    .notes-edit-overlay {
        padding: 16px;
    }

    .notes-edit-card {
        width: calc(100% - 18px);
        min-height: 74%;
        max-height: 100%;
        border-radius: 14px;
    }

    .notes-edit-header {
        grid-template-columns: minmax(92px, 108px) minmax(0, 1fr);
    }

    .notes-edit-grid {
        grid-template-columns: minmax(92px, 108px) minmax(0, 1fr);
        gap: 10px;
    }

    .notes-edit-controls {
        margin-top: 2px;
    }

    .notes-edit-delete-btn {
        width: 108px;
        max-width: 108px;
        min-height: 34px;
        font-size: 11px;
    }

    .notes-edit-content {
        margin-left: 10px;
        max-width: calc(100% - 10px);
    }

    .notes-edit-undo-bar {
        flex-direction: column;
        align-items: flex-start;
        padding: 8px 9px;
    }

    .notes-edit-floating-trash-notice {
        width: calc(100% - 18px);
    }
}

.mp-header {
    display: flex;
    justify-content: center;
    gap: 10px;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 12px;
    margin-bottom: 5px;
}

.mp-mode-btn {
    width: 76px;
    height: 40px;
    border-radius: 10px;
    border: 2px solid #000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.mp-mode-btn:hover {
    background: #f0f0f0;
}

.mp-mode-btn.active {
    background: #000;
    color: #fff;
}

.mp-mode-btn svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.mp-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-right: 5px;
}

.mp-list::-webkit-scrollbar {
    width: 4px;
}

.mp-list::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.mp-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 4px;
    font-size: 14px;
    font-weight: 600;
}

.mp-row.active-track span {
    color: var(--accent-orange) !important;
}

.mp-play-icon {
    width: clamp(34px, 2vw, 42px);
    height: clamp(34px, 2vw, 42px);
    flex-shrink: 0;
    cursor: pointer;
    color: #000;
}

.mp-play-icon svg {
    width: 100%;
    height: 100%;
}

.mp-row.active-track .mp-play-icon {
    color: var(--accent-orange);
}

.mp-add-icon {
    width: clamp(24px, 1.6vw, 30px);
    height: clamp(24px, 1.6vw, 30px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
    flex-shrink: 0;
    color: #000;
    border: 2px solid currentColor;
}

.mp-add-icon svg {
    width: clamp(12px, 0.9vw, 16px);
    height: clamp(12px, 0.9vw, 16px);
    fill: currentColor;
}

.mp-footer {
    border-top: 1px solid #e0e0e0;
    padding-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mp-mode-label {
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    color: #666;
    margin-bottom: 4px;
}

.mp-controls-box {
    border: 2px solid #000;
    border-radius: 20px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 90px;
}

.mp-nav-btn {
    cursor: pointer;
    font-size: 24px;
    color: #000;
    font-weight: 300;
}

.mp-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    text-align: center;
}

.mp-now-playing {
    font-size: 14px;
    font-weight: 500;
    color: #000;
    margin-bottom: 6px;
    margin-top: 8px;
}

.mp-next-playing {
    font-size: 10px;
    font-weight: 600;
    color: #666;
    margin-bottom: 8px;
}

.warning-text {
    color: var(--accent-yellow) !important;
    font-weight: 700 !important;
}

.mp-bottom-actions {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    width: 100%;
    margin-top: 4px;
}

.dots-side {
    display: flex;
    gap: 12px;
    align-items: center;
}

.dots-side.left {
    justify-content: flex-end;
    padding-right: 6px;
}

.dots-side.right {
    justify-content: flex-start;
    padding-left: 6px;
}

.mp-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    border: 1px solid #000;
}

.mp-dot.filled {
    background: #000;
}

.mp-dot.viewing {
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #000;
}

.mp-action-x {
    width: 16px;
    height: 16px;
    background: #000;
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 900;
    cursor: pointer;
}

/* =========================================
   5. TIMER WIDGET (ARTIK SAĞ ÜST)
   ========================================= */
.timer-widget-container {
    position: absolute;
    top: calc(var(--top-row-y) + var(--bar-height) + var(--timer-optical-offset));
    right: var(--timer-right-inset);
    /* Left -> Right */
    width: var(--timer-widget-width);
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: flex-end;
    cursor: pointer;
    z-index: 40;
    /* Overlay(50) altındadır. Overlay açılınca tıklanamaz. */
    transition: filter 0.2s;
    flex-direction: row-reverse;
    /* [Ring][Time] -> [Time][Ring] görünümü için */
    transform: translateY(-100%);
}

.timer-widget-container:hover {
    filter: brightness(1.05);
}

.timer-widget-ring {
    width: var(--timer-ring-size);
    height: var(--timer-ring-size);
    flex-shrink: 0;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.4);
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.timer-widget-ring svg {
    width: clamp(24px, 1.7vw, 30px);
    height: clamp(24px, 1.7vw, 30px);
    stroke: white;
}

/* Halka Animasyonu (Sadece Hover) */
.timer-widget-container:hover .timer-widget-ring {
    border-color: #fff;
    background: rgba(0, 0, 0, 0.5);
    animation: rotateRing 8s linear infinite;
}

@keyframes rotateRing {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Timer Metni */
.timer-widget-time {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: var(--timer-text-size);
    width: var(--timer-time-width);
    min-width: var(--timer-time-width);
    text-align: right;
    font-variant-numeric: tabular-nums;
    color: rgba(255, 255, 255, 0.85);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    opacity: 1;
    transition: opacity 0.3s;
    pointer-events: auto;
}

/* UX KURALI: .hidden class
   Bu class UI.js tarafından isTextVisible state'ine göre kontrol edilir.
   Asla kendi kendine oluşmaz.
*/
.timer-widget-time.hidden {
    opacity: 0;
    pointer-events: none;
}

/* =========================================
   6. TIMER MENU OVERLAY (MODAL)
   ========================================= */
.mt-overlay-wrapper {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;

    z-index: var(--z-modal);
    /* Widget ve barın üstü */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    /* Varsayılan: Pasif (Alttakiler tıklanabilir) */

    transition: opacity 0.3s ease;
}

/* UX KURALI: .open class
   Bu class UI.js tarafından isMenuOpen state'ine göre kontrol edilir.
   Açıldığında pointer-events: auto olur ve Widget'ı bloklar.
*/
.mt-overlay-wrapper.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* MERKEZİ LAYOUT KAPSAYICI */
.mt-layout {
    position: relative;
    --mf-side-gap: 42px;
    --mf-side-layout-width: min(94vw, 980px);
    --mf-side-top-offset: 79px;
    --mf-side-bottom-offset: 10px;
    width: min(94vw, 980px);
    max-width: min(94vw, 980px);
    height: min(66vh, 545px);
    max-height: calc(100% - (var(--ui-top-anchor-left) + var(--ui-bottom-anchor)));
    display: flex;
    justify-content: center;
}

/* KART STİLİ */
.mt-card {
    position: relative;
    background:
        linear-gradient(165deg, rgba(26, 26, 29, 0.98) 0%, rgba(8, 8, 10, 0.98) 100%);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        0 26px 64px rgba(0, 0, 0, 0.56),
        inset 0 0 0 1px rgba(255, 255, 255, 0.03);
    padding: 14px 16px 10px;
    width: 100%;
    height: 100%;
    min-height: 100%;
    max-height: 100%;
    overflow: visible;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto minmax(0, 1fr);
    column-gap: 8px;
    row-gap: 12px;
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 2;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

.mt-overlay-wrapper.open .mt-card {
    transform: translateY(0);
}

.mt-card button,
.mt-card input,
.mt-card select {
    -webkit-appearance: none;
    appearance: none;
    font: inherit;
    -webkit-tap-highlight-color: transparent;
}

.mt-icon-btn,
.mt-tab,
.mt-btn,
.mt-cb-input,
.mt-cb-select,
.mt-cb-add {
    -webkit-text-fill-color: currentColor;
}

.mt-header-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 6px;
    grid-column: 2;
    grid-row: 1;
    padding: 0;
    margin: 0;
}

.mt-icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.06);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.86);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.16);
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    font-size: 17px;
}

.mt-icon-btn svg {
    width: 18px;
    height: 18px;
}

.mt-icon-btn:hover {
    border-color: rgba(255, 255, 255, 0.7);
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.26);
}

/* --- GÖSTER/GİZLE VE ALARM BUTONU ACTIVE STATE (SİYAH) --- */
.mt-icon-btn.active-black {
    background: #fff;
    border-color: #fff;
    color: #0f1014;
}

/* SVG RENK YÖNETİMİ */
.mt-icon-btn.active-black svg,
.mt-icon-btn.active-black svg path {
    fill: currentColor;
    stroke: currentColor;
}

/* Göz ikonu özel durumu */
.mt-icon-btn.active-black svg circle {
    fill: #fff;
    stroke: #0f1014;
}

/* ----------------------------------------------- */

/* =========================================
   6.5 FOCUS SWITCH + PANES
   ========================================= */
.mt-focus-switch-shell {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 0;
}

.mt-focus-switch {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    width: min(100%, 336px);
    min-height: 36px;
    border-radius: 999px;
    padding: 3px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 10px 24px rgba(0, 0, 0, 0.28);
}

.mt-focus-switch.is-locked {
    opacity: 0.78;
}

.mt-focus-switch-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: calc(50% - 3px);
    height: calc(100% - 6px);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.75);
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
}

.mt-focus-switch[data-pane="basic"] .mt-focus-switch-thumb {
    transform: translateX(100%);
}

.mt-focus-switch-option {
    position: relative;
    z-index: 1;
    height: 30px;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.15px;
    border-radius: 999px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.mt-focus-switch-option.active {
    color: #0f1014;
}

.mt-focus-switch-option:disabled {
    cursor: not-allowed;
}

.mt-header-divider {
    grid-column: 1 / span 2;
    grid-row: 2;
    height: 1px;
    width: 100%;
    margin-top: 4px;
    background: rgba(255, 255, 255, 0.3);
}

.mt-pane-stack {
    grid-column: 1 / span 2;
    grid-row: 3;
    min-height: 0;
    height: 100%;
    display: flex;
    overflow: visible;
}

.mt-pane {
    width: 100%;
    min-height: 0;
    height: 100%;
    display: none;
}

.mt-pane.active {
    display: flex;
}

.mt-pane[hidden] {
    display: none !important;
}

.mt-pane-meriono {
    border-radius: 18px;
    border: none;
    background:
        radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 35%, rgba(0, 0, 0, 0) 62%),
        linear-gradient(180deg, rgba(14, 14, 18, 0.96) 0%, rgba(8, 8, 11, 0.98) 100%);
    position: relative;
    overflow: visible;
    height: 100%;
}

.mt-pane-basic {
    min-height: 0;
    height: 100%;
    overflow: hidden;
}

/* =========================================
   6.6 MERIONO FOCUS (STATIC UI SHELL)
   ========================================= */
.mf-main-shell {
    width: 100%;
    height: 100%;
}

.mf-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    gap: 14px;
    width: 100%;
    height: 100%;
    min-height: 0;
}

.mf-left,
.mf-right {
    min-height: 0;
    border-radius: 16px;
}

.mf-left {
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: linear-gradient(180deg, rgba(10, 10, 14, 0.94) 0%, rgba(6, 6, 9, 0.97) 100%);
    padding: 14px 14px 12px;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr) auto auto auto;
    row-gap: 10px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.mf-focus-badge {
    justify-self: start;
    align-self: start;
    min-height: 26px;
    padding: 4px 12px;
    border-radius: 99px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 2px;
    line-height: 1;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.mf-focus-badge[data-phase="focus"],
.mf-focus-badge:not([data-phase]) {
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.mf-focus-badge[data-phase="break"] {
    border-color: var(--accent-orange);
    color: var(--accent-orange);
    background: rgba(255, 145, 77, 0.1);
}

.mf-focus-badge[data-phase="none"] {
    border-color: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.82);
    background: rgba(255, 255, 255, 0.08);
}

.mf-time {
    text-align: center;
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(44px, 5vw, 62px);
    letter-spacing: -2px;
    line-height: 1;
    color: #fff;
    font-variant-numeric: tabular-nums;
    transform: translateY(-12px);
}

.mf-scene-placeholder {
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: linear-gradient(180deg, rgba(10, 10, 14, 0.94) 0%, rgba(6, 6, 9, 0.97) 100%);
    box-shadow: none;
    min-height: 0;
    align-self: start;
    height: calc(100% - 20px);
    position: relative;
    overflow: hidden;
}

.mf-scene-content {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.mf-scene-content>* {
    width: 100%;
    height: 100%;
}

.mf-scene-blackout {
    position: absolute;
    inset: 0;
    background: #000;
    opacity: 0;
    pointer-events: none;
    z-index: 2;
    transition: opacity 0.42s ease;
}

.mf-scene-transitioning .mf-scene-blackout {
    transition-duration: 0.28s;
}

.mf-scene-blackout-visible .mf-scene-blackout {
    opacity: 1;
    transition-duration: 0.42s;
}

.mf-progress {
    height: 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
    margin-top: -14px;
}

.mf-progress-fill {
    height: 100%;
    width: 0%;
    background: rgba(255, 255, 255, 0.96);
    transition: width 1s linear;
}

.mf-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    width: min(100%, 84%);
    justify-self: center;
    margin-top: -1px;
}

.mf-btn {
    flex: 1;
    min-width: 80px;
    height: 42px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: #111319;
    color: #f3f4f7;
    font-weight: 900;
    font-size: 11px;
    letter-spacing: 0;
    text-transform: none;
    cursor: pointer;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.16);
    transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    overflow: hidden;
}

.mf-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.34);
}

.mf-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    filter: grayscale(100%);
}

.mf-btn-primary {
    background: rgba(255, 255, 255, 0.96);
    border-color: rgba(255, 255, 255, 0.96);
    color: #0f1014;
}

.mf-btn-warn {
    border-color: rgba(217, 171, 51, 0.94);
    color: rgba(217, 171, 51, 0.94);
    background: rgba(0, 0, 0, 0.2);
}

.mf-btn.warn.confirm-mode,
.mf-btn-warn.confirm-mode {
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.mf-status {
    text-align: center;
    min-height: 16px;
    font-size: 12px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.82);
    margin-top: 8px;
}

.mf-right {
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: linear-gradient(180deg, rgba(16, 17, 22, 0.96) 0%, rgba(10, 11, 16, 0.98) 100%);
    padding: 12px 12px 10px;
    display: grid;
    grid-template-rows: auto auto auto minmax(0, 1fr);
    row-gap: 8px;
}

.mf-command-top,
.mf-command-bottom {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mf-command-top {
    width: 100%;
    justify-content: flex-end;
    min-width: 0;
}

.mf-command-bottom {
    justify-content: flex-end;
    margin-top: 10px;
}

.mf-rank-pill,
.mf-days-pill,
.mf-df-pill {
    min-height: 44px;
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.86);
    background: rgba(130, 130, 136, 0.5);
    color: #fff;
    font-size: 14px;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    white-space: nowrap;
    box-sizing: border-box;
}

.mf-rank-pill {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
}

.mf-days-pill {
    min-width: 44px;
    padding: 0 12px;
    transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.mf-days-pill.mf-days-pill--white {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.86);
    background: rgba(130, 130, 136, 0.5);
}

.mf-days-pill.mf-days-pill--yellow {
    color: #e1b746;
    border-color: rgba(225, 183, 70, 0.94);
    background: rgba(95, 76, 28, 0.32);
}

.mf-days-pill.mf-days-pill--red {
    color: #e36262;
    border-color: rgba(227, 98, 98, 0.94);
    background: rgba(108, 34, 34, 0.34);
}

.mf-days-pill.mf-days-pill--green {
    color: #71cf7f;
    border-color: rgba(113, 207, 127, 0.94);
    background: rgba(40, 88, 49, 0.34);
}

.mf-days-pill.mf-days-pill--blue {
    color: #6db4ff;
    border-color: rgba(109, 180, 255, 0.94);
    background: rgba(39, 72, 110, 0.36);
}

.mf-df-pill {
    appearance: none;
    -webkit-appearance: none;
    justify-content: center;
    gap: 4px;
    min-width: 132px;
    background: rgba(255, 255, 255, 0.96);
    border-color: rgba(255, 255, 255, 0.96);
    color: #0e1015;
    cursor: pointer;
    font-family: inherit;
    transition: background-color 0.22s cubic-bezier(0.22, 1, 0.36, 1), color 0.22s ease;
}

.mf-df-pill [data-df-value] {
    font-weight: 900;
    letter-spacing: 0.18px;
    transition: opacity 0.16s ease, color 0.16s ease;
}

.mf-df-pill:hover {
    background: #dedede;
    color: #0a0d13;
}

.mf-df-pill:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.9);
    outline-offset: 2px;
}

.mf-icon-btn {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.86);
    background: rgba(130, 130, 136, 0.38);
    color: rgba(255, 255, 255, 0.98);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.mf-icon-btn svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.mf-icon-btn:hover {
    border-color: rgba(255, 255, 255, 0.96);
    background: rgba(150, 150, 156, 0.5);
    color: #fff;
    transform: translateY(-1px);
}

.mf-icon-btn.active {
    border-color: rgba(255, 255, 255, 0.92);
    background: rgba(255, 255, 255, 0.94);
    color: #101218;
}

.mf-divider {
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.26);
    border-radius: 999px;
    margin-top: 8px;
}

.mf-cycle {
    min-height: 0;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    row-gap: 8px;
    margin-top: 12px;
}

.mf-tabs {
    display: flex;
    gap: 6px;
}

.mf-tab {
    flex: 1;
    min-width: 0;
    height: 34px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.26);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.84);
    font-size: 11px;
    font-weight: 900;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.mf-tab:hover {
    border-color: rgba(255, 255, 255, 0.54);
    color: #fff;
}

.mf-tab.active {
    border-color: rgba(255, 255, 255, 0.94);
    background: rgba(255, 255, 255, 0.94);
    color: #0f1014;
}

.mf-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 11px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.76);
    margin-top: 6px;
    margin-bottom: 12px;
}

.mf-info b {
    color: rgba(255, 255, 255, 0.98);
}

.mf-right-scroll {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    padding-right: 3px;
}

.mf-right-scroll::-webkit-scrollbar {
    width: 4px;
}

.mf-right-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.26);
    border-radius: 4px;
}

.mf-builder-row {
    display: none;
    gap: 8px;
    margin-bottom: 6px;
    padding: 0 2px;
}

.mf-builder-row.show {
    display: flex;
}

.mf-cb-input,
.mf-cb-select {
    flex: 1;
    height: 36px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.26);
    padding: 0 10px;
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
    font-size: 13px;
    font-weight: 800;
    outline: none;
}

.mf-cb-select {
    padding-right: 32px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px;
}

.mf-cb-add {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.32);
    background: rgba(255, 255, 255, 0.92);
    color: #111319;
    font-size: 18px;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.mf-playlist {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-top: 6px;
    contain: paint;
}

.mf-side-layer {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: inherit;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 14;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mf-side-layer.has-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.mf-side-panel {
    position: absolute;
    left: 50%;
    top: 50%;
    width: clamp(430px, 50%, 560px);
    max-width: calc(100% - 24px);
    height: calc(100% - 25px);
    max-height: calc(100% - 25px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: linear-gradient(180deg, rgba(20, 20, 25, 0.97) 0%, rgba(9, 11, 16, 0.99) 100%);
    box-shadow: 0 28px 56px rgba(0, 0, 0, 0.52);
    padding: 16px;
    opacity: 0;
    transform: translate(-50%, calc(-50% + 10px)) scale(0.985);
    transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.mf-side-panel.open {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: auto;
}

.mf-side-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.mf-side-header h3 {
    margin: 0;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-size: 18px;
    font-weight: 900;
}

.mf-side-icon {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.mf-side-icon svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: rgba(255, 255, 255, 0.94);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.mf-accordion,
.mf-market-list,
.mf-inventory-list {
    min-height: 0;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-right: 4px;
    contain: paint;
}

.mf-accordion::-webkit-scrollbar,
.mf-market-list::-webkit-scrollbar,
.mf-inventory-list::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.mf-rank-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mf-rank-toggle,
.mf-market-section {
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    min-height: 34px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.2px;
}

.mf-rank-toggle {
    cursor: pointer;
}

.mf-rank-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mf-ship-row,
.mf-market-row,
.mf-inventory-row {
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    min-height: 38px;
    padding: 0 12px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
}

.mf-ship-row span:first-child,
.mf-market-row span:first-child,
.mf-inventory-row span:first-child {
    font-size: 12px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.96);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mf-ship-count,
.mf-market-price,
.mf-inventory-count {
    min-width: 30px;
    height: 26px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
}

.mf-market-toggle {
    height: 34px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    padding: 3px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3px;
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.08);
}

.mf-market-toggle button {
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: rgba(255, 255, 255, 0.78);
    font-size: 11px;
    font-weight: 900;
    cursor: pointer;
}

.mf-market-toggle button.active {
    background: rgba(255, 255, 255, 0.94);
    color: #101218;
}

.mf-balance-inline {
    appearance: none;
    -webkit-appearance: none;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    padding: 0 10px;
    font-size: 10px;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.9);
    white-space: nowrap;
    cursor: pointer;
    font-family: inherit;
    transition: background-color 0.22s cubic-bezier(0.22, 1, 0.36, 1), color 0.22s ease;
}

.mf-balance-inline [data-df-value] {
    letter-spacing: 0.18px;
    transition: opacity 0.16s ease, color 0.16s ease;
}

.mf-balance-inline:hover {
    background: #dedede;
    color: #0a0d13;
}

.mf-balance-inline:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.9);
    outline-offset: 2px;
}

/* Harbor-only visual refinement (content layout only) */
#mfHarborPanel .mf-side-header {
    justify-content: flex-start;
    margin-bottom: 18px;
}

#mfHarborPanel .mf-side-header h3 {
    font-size: 19px;
    letter-spacing: 0.9px;
}

#mfHarborPanel .mf-accordion {
    gap: 18px;
    padding-right: 0;
    padding-top: 10px;
}

#mfHarborPanel .mf-rank-group {
    gap: 10px;
}

#mfHarborPanel .mf-rank-toggle {
    min-height: 50px;
    border-radius: 16px;
    background: rgba(8, 10, 14, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.12);
    justify-content: center;
    padding: 0 14px;
    font-size: 14px;
    letter-spacing: 0.35px;
    transition: background 0.22s ease, border-color 0.22s ease;
}

#mfHarborPanel .mf-rank-group.open .mf-rank-toggle {
    background: rgba(120, 122, 128, 0.58);
    border-color: rgba(255, 255, 255, 0.16);
}

#mfHarborPanel .mf-rank-caret {
    display: none;
}

#mfHarborPanel .mf-rank-body {
    gap: 10px;
    overflow: hidden;
    transition: max-height 0.26s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease;
    will-change: max-height, opacity;
}

#mfHarborPanel .mf-rank-body[hidden] {
    display: none !important;
}

#mfHarborPanel .mf-ship-row {
    border: 0;
    background: transparent;
    min-height: auto;
    padding: 0;
    gap: 12px;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
}

#mfHarborPanel .mf-ship-row span:first-child {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(120, 122, 128, 0.54);
    padding: 0 22px 0 14px;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#mfHarborPanel .mf-ship-row span:first-child.mf-label-long {
    font-size: 10.6px;
    letter-spacing: 0.14px;
}

#mfHarborPanel .mf-ship-row span:first-child.mf-label-xlong {
    font-size: 9.6px;
    letter-spacing: 0.04px;
}

#mfHarborPanel .mf-ship-row span:first-child.mf-label-wrap {
    white-space: normal;
    text-overflow: clip;
    line-height: 1.08;
    max-height: calc(1.08em * 2);
    font-size: 9.6px;
    letter-spacing: 0.04px;
    overflow: hidden;
}

#mfHarborPanel .mf-ship-row span:first-child::before {
    content: "";
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    opacity: 0;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

#mfHarborPanel .mf-rank-group[data-rank="crew"] .mf-ship-row span:first-child::before {
    opacity: 1;
    background-image: url("/assets/ships/crew.png");
}

#mfHarborPanel .mf-rank-group[data-rank="deckhand"] .mf-ship-row span:first-child::before {
    opacity: 1;
    background-image: url("/assets/ships/deckhand.png");
}

#mfHarborPanel .mf-rank-group[data-rank="quartermaster"] .mf-ship-row span:first-child::before {
    opacity: 1;
    background-image: url("/assets/ships/quartermaster.png");
}

#mfHarborPanel .mf-rank-group[data-rank="captain"] .mf-ship-row span:first-child::before {
    opacity: 1;
    background-image: url("/assets/ships/captain.png");
}

#mfHarborPanel .mf-ship-count {
    min-width: 56px;
    height: 44px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(120, 122, 128, 0.54);
    color: #fff;
    font-size: 15px;
    font-weight: 900;
    padding: 0 10px;
}

/* Inventory-only visual refinement (content layout only) */
#mfInventoryPanel .mf-side-header {
    justify-content: flex-start;
    margin-bottom: 18px;
}

#mfInventoryPanel .mf-side-header h3 {
    font-size: 19px;
    letter-spacing: 0.9px;
}

#mfInventoryPanel .mf-inventory-list {
    gap: 14px;
    padding-top: 10px;
    padding-right: 0;
}

#mfMarketPanel .mf-side-header {
    flex: 0 0 auto;
    margin-bottom: 18px;
}

#mfMarketPanel .mf-market-toggle {
    flex: 0 0 44px;
    margin-bottom: 14px;
    background: linear-gradient(180deg, rgba(130, 132, 138, 0.56) 0%, rgba(112, 114, 120, 0.52) 100%);
    border: 1px solid rgba(255, 255, 255, 0.14);
    padding: 4px;
    height: 44px;
    min-height: 44px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 8px 20px rgba(0, 0, 0, 0.24);
}

#mfMarketPanel .mf-market-toggle button {
    height: 100%;
    min-height: 0;
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-sizing: border-box;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.2px;
    color: rgba(255, 255, 255, 0.88);
    background: transparent;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

#mfMarketPanel .mf-market-toggle button.active {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.24);
    background: #0d0f14;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.34);
}

#mfMarketPanel .mf-market-toggle button:not(.active):hover {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

#mfMarketPanel .mf-balance-inline {
    min-height: 36px;
    min-width: 170px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.96);
    color: #0f1117;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.2px;
    justify-content: center;
}

#mfMarketPanel .mf-balance-inline:hover {
    background: #dedede;
    color: #0a0d13;
}

#mfMarketPanel .mf-market-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding-top: 10px;
    padding-right: 0;
    gap: 10px;
}

#mfMarketPanel .mf-market-list[hidden] {
    display: none !important;
}

#mfMarketPanel[data-market-mode="sell"] #mfMarketSellList,
#mfMarketPanel[data-market-mode="buy"] #mfMarketBuyList {
    display: flex;
}

#mfMarketPanel .mf-market-rank {
    min-height: 50px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(120, 122, 128, 0.58);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.35px;
    text-transform: uppercase;
    margin-top: 10px;
}

#mfMarketPanel .mf-market-rank:first-child {
    margin-top: 0;
}

#mfMarketPanel .mf-market-row {
    border: 0;
    background: transparent;
    min-height: auto;
    padding: 0;
    gap: 10px;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: stretch;
}

#mfMarketPanel .mf-market-item-label {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(120, 122, 128, 0.54);
    padding: 0 14px;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: rgba(255, 255, 255, 0.96);
}

#mfMarketPanel .mf-market-item-label.mf-label-long {
    font-size: 10.6px;
    letter-spacing: 0.14px;
}

#mfMarketPanel .mf-market-item-label.mf-label-xlong {
    font-size: 9.6px;
    letter-spacing: 0.04px;
}

#mfMarketPanel .mf-market-item-label.mf-label-wrap {
    white-space: normal;
    text-overflow: clip;
    line-height: 1.08;
    max-height: calc(1.08em * 2);
    font-size: 9.6px;
    letter-spacing: 0.04px;
    overflow: hidden;
}

#mfMarketPanel .mf-market-row-ship .mf-market-item-label::before {
    content: "";
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    opacity: 0;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

#mfMarketPanel .mf-market-row-ship[data-rank="crew"] .mf-market-item-label::before {
    opacity: 1;
    background-image: url("/assets/ships/crew.png");
}

#mfMarketPanel .mf-market-row-ship[data-rank="deckhand"] .mf-market-item-label::before {
    opacity: 1;
    background-image: url("/assets/ships/deckhand.png");
}

#mfMarketPanel .mf-market-row-ship[data-rank="quartermaster"] .mf-market-item-label::before {
    opacity: 1;
    background-image: url("/assets/ships/quartermaster.png");
}

#mfMarketPanel .mf-market-row-ship[data-rank="captain"] .mf-market-item-label::before {
    opacity: 1;
    background-image: url("/assets/ships/captain.png");
}

#mfMarketPanel .mf-market-owned,
#mfMarketPanel .mf-market-action {
    min-width: 56px;
    height: 44px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(120, 122, 128, 0.54);
    color: #fff;
    font-size: 15px;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
}

#mfMarketPanel .mf-market-action {
    min-width: 78px;
    width: 78px;
    box-sizing: border-box;
    font-size: 12px;
    letter-spacing: 0.2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

#mfMarketPanel .mf-market-action:hover {
    border-color: rgba(255, 255, 255, 0.24);
}

#mfMarketPanel .mf-market-action.is-confirm {
    border-color: rgba(255, 255, 255, 0.94);
    background: rgba(255, 255, 255, 0.94);
    color: #111319;
}

#mfMarketPanel .mf-market-action.is-disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

#mfMarketPanel .mf-market-action.is-disabled:hover {
    border-color: rgba(255, 255, 255, 0.1);
}

#mfMarketPanel .mf-market-row-freeze .mf-market-item-label {
    justify-content: flex-start;
    padding: 0 16px;
}

#mfMarketPanel .mf-market-row-freeze .mf-market-item-label::before {
    content: "";
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m10 20-1.25-2.5L6 18'/%3E%3Cpath d='M10 4 8.75 6.5 6 6'/%3E%3Cpath d='m14 20 1.25-2.5L18 18'/%3E%3Cpath d='m14 4 1.25 2.5L18 6'/%3E%3Cpath d='m17 21-3-6h-4'/%3E%3Cpath d='m17 3-3 6 1.5 3'/%3E%3Cpath d='M2 12h6.5L10 9'/%3E%3Cpath d='m20 10-1.5 2 1.5 2'/%3E%3Cpath d='M22 12h-6.5L14 15'/%3E%3Cpath d='m4 10 1.5 2L4 14'/%3E%3Cpath d='m7 21 3-6-1.5-3'/%3E%3Cpath d='m7 3 3 6h4'/%3E%3C/svg%3E");
}

#mfInventoryPanel .mf-inventory-row {
    border: 0;
    background: transparent;
    min-height: auto;
    padding: 0;
    gap: 12px;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
}

#mfInventoryPanel .mf-inventory-row span:first-child {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 56px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(120, 122, 128, 0.54);
    padding: 0 18px 0 16px;
    font-size: 15px;
    font-weight: 900;
    letter-spacing: 0.32px;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#mfInventoryPanel .mf-inventory-row span:first-child::before {
    content: "";
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m10 20-1.25-2.5L6 18'/%3E%3Cpath d='M10 4 8.75 6.5 6 6'/%3E%3Cpath d='m14 20 1.25-2.5L18 18'/%3E%3Cpath d='m14 4 1.25 2.5L18 6'/%3E%3Cpath d='m17 21-3-6h-4'/%3E%3Cpath d='m17 3-3 6 1.5 3'/%3E%3Cpath d='M2 12h6.5L10 9'/%3E%3Cpath d='m20 10-1.5 2 1.5 2'/%3E%3Cpath d='M22 12h-6.5L14 15'/%3E%3Cpath d='m4 10 1.5 2L4 14'/%3E%3Cpath d='m7 21 3-6-1.5-3'/%3E%3Cpath d='m7 3 3 6h4'/%3E%3C/svg%3E");
}

#mfInventoryPanel .mf-inventory-count {
    min-width: 64px;
    height: 56px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(120, 122, 128, 0.54);
    color: #fff;
    font-size: 18px;
    font-weight: 900;
    padding: 0 12px;
}

.mf-market-insufficient-overlay {
    position: absolute;
    inset: 0;
    z-index: 38;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    background: rgba(6, 8, 12, 0.6);
    backdrop-filter: blur(9px);
    -webkit-backdrop-filter: blur(9px);
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.mf-market-insufficient-overlay.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.mf-market-insufficient-card {
    width: min(468px, calc(100% - 16px));
    min-height: 186px;
    margin: auto;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: linear-gradient(180deg, rgba(30, 32, 38, 0.96) 0%, rgba(14, 16, 21, 0.97) 100%);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
    padding: 14px 22px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 25px;
}

.mf-market-insufficient-message {
    margin: 0;
    text-align: center;
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.2px;
    line-height: 1.35;
}

.mf-market-insufficient-close {
    color: #0d0f14;
    min-width: 86px;
    height: 34px;
    padding: 0 14px;
    font-size: 13px;
    font-weight: 700;
    border-radius: 10px;
    background: #ffffff;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.72);
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
    box-shadow: none;
}

.mf-market-insufficient-close:hover {
    background: #f1f1f1;
}

.mf-market-insufficient-close:active {
    transform: translateY(1px);
}

/* =========================================
   7. TIMER CARD INTERNALS
   ========================================= */
.mt-main {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 0;
}

.mt-main-horizontal {
    display: grid;
    grid-template-columns: minmax(310px, 1.08fr) minmax(250px, 0.92fr);
    gap: 16px;
    width: 100%;
    min-height: 0;
    height: 100%;
    overflow: hidden;
}

.mt-basic-left,
.mt-basic-right {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
}

.mt-basic-left {
    justify-content: flex-start;
    padding-bottom: 6px;
    z-index: 1;
}

.mt-basic-right {
    overflow: hidden;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    gap: 8px;
    z-index: 0;
}

.mt-top {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    padding: 2px 0;
    margin-bottom: 0;
}

.mt-top::-webkit-scrollbar {
    display: none;
}

.mt-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: nowrap;
    justify-content: flex-start;
    width: auto;
    flex: 0 0 auto;
    min-width: 0;
}

.mt-tab {
    height: 34px;
    padding: 0 14px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.82);
    white-space: nowrap;
    font-weight: 900;
    font-size: 12px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
    transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.mt-tab:hover {
    border-color: rgba(255, 255, 255, 0.42);
    color: #fff;
    box-shadow: 0 7px 14px rgba(0, 0, 0, 0.3);
}

.mt-tab.active {
    background: rgba(255, 255, 255, 0.94);
    border-color: rgba(255, 255, 255, 0.94);
    color: #0f1014;
}

.mt-clock {
    background: linear-gradient(180deg, #111217 0%, #08080c 100%);
    color: #fff;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    min-height: 200px;
    height: 200px;
    flex: 0 0 200px;
}

.mt-phase {
    position: absolute;
    top: 20px;
    left: 20px;
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 99px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
}

.mt-phase.focus {
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
}

.mt-phase.break {
    border-color: var(--accent-orange);
    color: var(--accent-orange);
    background: rgba(255, 145, 77, 0.1);
}

/* [YENİ] ALARM GÖSTERGESİ (CLOCK İÇİ) */
.mt-alarm-indicator {
    position: absolute;
    top: 20px;
    right: 20px;
    color: var(--accent-orange);
    /* Sabit, dikkat çekici renk */
    opacity: 0;
    /* Varsayılan olarak gizli */
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.mt-alarm-indicator.show {
    opacity: 1;
}


.mt-time {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 76px;
    letter-spacing: -3px;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    margin-top: 0;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    width: 100%;
}

.mt-progress {
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.18);
    margin-top: 2px;
}

.mt-progress-fill {
    height: 100%;
    width: 0%;
    background: rgba(255, 255, 255, 0.95);
    transition: width 1s linear;
}

.mt-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 2px;
    position: relative;
    z-index: 2;
}

.mt-btn {
    flex: 1;
    min-width: 80px;
    height: 44px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: #111319;
    color: #f3f4f7;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.16);
    transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    overflow: hidden;
}

.mt-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.34);
}

.mt-btn.primary {
    background: rgba(255, 255, 255, 0.94);
    border-color: rgba(255, 255, 255, 0.94);
    color: #0f1014;
}

.mt-btn.warn {
    border-color: rgba(217, 171, 51, 0.94);
    color: rgba(217, 171, 51, 0.94);
    background: rgba(0, 0, 0, 0.2);
}

.mt-btn.warn.confirm-mode {
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.mt-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    filter: grayscale(100%);
}

.mt-confirm-row {
    display: flex;
    width: 100%;
    height: 100%;
}

.mt-confirm-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #fff;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    margin: 0;
    transition: all 0.2s;
}

.mt-confirm-btn.no {
    border-right: 1px solid rgba(255, 255, 255, 0.26);
}

.mt-confirm-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.mt-btn.warn.confirm-mode .mt-confirm-btn {
    color: #fff;
}

.mt-btn.warn.confirm-mode .mt-confirm-btn.no {
    border-right: 1px solid rgba(255, 255, 255, 0.26);
}

.mt-btn.warn.confirm-mode .mt-confirm-btn:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.mt-status {
    text-align: center;
    font-weight: 700;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.72);
    margin-top: 8px;
    min-height: 16px;
}

.mt-info-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.72);
    padding: 6px 2px 12px 2px;
    margin-top: 4px;
    margin-bottom: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.mt-info-bar b {
    color: rgba(255, 255, 255, 0.96);
}

.mt-right-scroll {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    padding-right: 3px;
}

.mt-right-scroll::-webkit-scrollbar {
    width: 4px;
}

.mt-right-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.26);
    border-radius: 4px;
}

.mt-builder-row {
    display: none;
    gap: 8px;
    margin-bottom: 6px;
    padding: 0 2px;
}

.mt-builder-row.show {
    display: flex;
}

.mt-cb-input,
.mt-cb-select {
    flex: 1;
    height: 36px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0 10px;
    color: #f5f6f9;
    background-color: rgba(255, 255, 255, 0.06);
    font-weight: 800;
    font-size: 13px;
    outline: none;
}

.mt-cb-select {
    padding-right: 34px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f4f5f8' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
}

.mt-cb-add {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.92);
    color: #101114;
    font-weight: 900;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mt-cb-input::-webkit-outer-spin-button,
.mt-cb-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.mt-icon-btn:focus-visible,
.mt-tab:focus-visible,
.mt-btn:focus-visible,
.mt-cb-input:focus-visible,
.mt-cb-select:focus-visible,
.mt-cb-add:focus-visible {
    outline: 2px solid rgba(0, 0, 0, 0.2);
    outline-offset: 2px;
}

.mt-playlist {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 0;
    padding-top: 6px;
    max-height: none;
    overflow: visible;
    padding-right: 0;
    contain: paint;
}

.mt-play-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.mt-play-item:hover {
    border-color: rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.11);
}

.mt-play-item.active {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.56);
    color: #fff;
}

.mt-play-item.drag-over {
    border: 2px dashed rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.2);
    opacity: 0.85;
}

.mt-play-text {
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 8px;
    color: #fff;
}

.mt-play-dur {
    font-size: 11px;
    font-weight: 900;
    opacity: 0.76;
    white-space: nowrap;
    color: rgba(255, 255, 255, 0.9);
}

.mt-play-item.active .mt-play-dur {
    opacity: 1;
}

.mt-play-del {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    color: #f3f4f7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 900;
    margin-left: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.mt-play-del:hover {
    background: rgba(255, 79, 79, 0.9);
    color: #fff;
}

/* =========================================
   7.1 ALARM SETTINGS STYLES
   ========================================= */

/* Master Toggle Button */
.btn-alarm-master {
    width: 100%;
    min-height: 56px;
    border-radius: 16px;
    border: 1.5px solid rgba(255, 255, 255, 0.9);
    background: rgba(0, 0, 0, 0.42);
    color: #fff;
    font-weight: 900;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 14px;
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.2),
        0 10px 22px rgba(0, 0, 0, 0.3);
}

.btn-alarm-master.active {
    background: rgba(255, 255, 255, 0.16);
    border-color: #fff;
}

.btn-alarm-master:hover {
    transform: translateY(-1px);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2), 0 6px 18px rgba(0, 0, 0, 0.28);
}

.alarm-master-text {
    line-height: 1.2;
    text-align: left;
}

/* Ayar Satırları */
.alarm-setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border: 1.5px solid rgba(255, 255, 255, 0.46);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.alarm-setting-row:last-child {
    border-bottom: 1.5px solid rgba(255, 255, 255, 0.3);
}

.alarm-setting-label {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

.alarm-setting-controls {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.settings-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1.5px solid rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.5px;
    flex-shrink: 0;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.22);
}

.settings-status.off {
    background: rgba(255, 255, 255, 0.02);
    color: rgba(255, 255, 255, 0.78);
    border-color: rgba(255, 255, 255, 0.56);
}

/* Toggle Switch Görünümü */
.meriono-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.meriono-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.meriono-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.18);
    border: 1.5px solid rgba(255, 255, 255, 0.56);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.28);
    transition: .3s;
}

.meriono-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    top: 50%;
    bottom: auto;
    background-color: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transform: translateY(-50%);
    transition: .3s;
}

input:checked+.meriono-slider {
    background-color: rgba(255, 255, 255, 0.94);
    border-color: #fff;
}

input:checked+.meriono-slider:before {
    background-color: #111;
    transform: translate(20px, -50%);
}

.meriono-slider.round {
    border-radius: 24px;
}

.meriono-slider.round:before {
    border-radius: 50%;
}


/* =========================================
   7.2 FOCUS AWAY POPUP
   ========================================= */

.focus-away-popup-overlay {
    position: absolute;
    inset: 0;
    z-index: calc(var(--z-popup) - 1);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    background: rgba(0, 0, 0, 0.64);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transition: opacity 0.28s ease, visibility 0.28s ease;
    will-change: opacity;
    contain: paint;
}

.focus-away-popup-overlay.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.focus-away-popup-card {
    background: #fff;
}

.focus-away-popup-overlay.open .focus-away-popup-card {
    transform: scale(1);
    opacity: 1;
}

/* =========================================
   7.2 CAPTAIN OATH POPUP
   ========================================= */

.oath-popup-overlay {
    position: absolute;
    inset: 0;
    z-index: var(--z-popup);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    background: rgba(0, 0, 0, 0.64);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    will-change: opacity;
    contain: paint;
}

.oath-popup-overlay.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.oath-popup-card {
    background: #fff;
}

.oath-popup-overlay.open .oath-popup-card {
    transform: scale(1);
    opacity: 1;
}

.btn-popup.oath-popup-action {
    width: auto;
    max-width: calc(100% - 44px);
    min-height: 44px;
    margin-top: 22px;
    margin-inline: auto;
    padding-inline: 22px;
}

/* =========================================
   7.2 ALARM POPUP OVERLAY STİLLERİ (YENİ)
   ========================================= */

.alarm-popup-overlay {
    position: absolute;
    inset: 0;

    background: rgba(0, 0, 0, 0.64);
    /* Karartma */
    backdrop-filter: none;
    /* Güçlü Blur */
    -webkit-backdrop-filter: none;

    display: flex;
    align-items: center;
    justify-content: center;

    z-index: var(--z-popup);
    /* En üst katman */

    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    /* Varsayılan: Kapalı ve tıklanamaz */
    transition: opacity 0.3s ease;
    will-change: opacity;
    contain: paint;
}

/* Popup Açıkken */
.alarm-popup-overlay.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    /* Tüm overlay tıklanabilir (alttakileri bloklar) */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.alarm-popup-card {
    background: var(--white);
    border-radius: 24px;
    padding: 32px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8);
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.alarm-popup-overlay.open .alarm-popup-card {
    transform: scale(1);
}

#alarmStepCard[hidden],
#alarmCycleCard[hidden] {
    display: none !important;
}

.alarm-popup-title {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 28px;
    color: #000;
    margin-bottom: 8px;
}

.alarm-popup-sub {
    font-size: 15px;
    font-weight: 500;
    color: #666;
    margin-bottom: 24px;
}

.alarm-popup-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Popup Butonları */
.btn-popup {
    width: 100%;
    height: 48px;
    border-radius: 14px;
    font-weight: 800;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Baskın Buton (Continue) */
.btn-popup.primary {
    background: #000;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-popup.primary:hover {
    background: #222;
    transform: translateY(-2px);
}

/* Pasif Buton (Pause) */
.btn-popup.secondary {
    background: transparent;
    color: #555;
    border: 2px solid #ddd;
}

.btn-popup.secondary:hover {
    background: #f5f5f5;
    color: #000;
    border-color: #000;
}

.alarm-cycle-card {
    width: min(92%, 760px);
    min-height: 356px;
    background: #fff;
    border-radius: 24px;
    padding: clamp(24px, 3.2vw, 36px) clamp(20px, 4vw, 46px);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8);
    text-align: center;
    display: grid;
    place-items: center;
    margin: auto;
    transform: scale(0.95);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
}

.alarm-popup-overlay.open .alarm-cycle-card:not([hidden]) {
    transform: scale(1);
    opacity: 1;
}

.alarm-cycle-content {
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transform: translateY(-14px);
}

.alarm-cycle-animation {
    width: clamp(132px, 16vw, 176px);
    height: clamp(132px, 16vw, 176px);
    margin: 0 auto clamp(2px, 0.7vw, 6px);
    pointer-events: none;
}

.alarm-cycle-animation>svg {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

.alarm-cycle-title {
    margin: 0 0 12px;
    color: #111;
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(24px, 2.55vw, 34px);
    line-height: 1.08;
}

.alarm-cycle-sub {
    margin: 0;
    width: min(100%, 560px);
    max-width: 560px;
    padding-inline: clamp(8px, 1.1vw, 14px);
    color: #3d3d3d;
    font-size: clamp(14px, 1.35vw, 18px);
    font-weight: 600;
    line-height: 1.45;
    text-wrap: balance;
    text-align: center;
}

@media (max-width: 900px) {
    .alarm-cycle-card {
        width: min(92%, 620px);
        min-height: 332px;
    }
}

/* =========================================
   7.3 AUTH REQUIRED OVERLAY
   ========================================= */
.auth-required-overlay {
    position: absolute;
    inset: 0;
    z-index: 230;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(16px, 3vw, 36px);
    background: rgba(0, 0, 0, 0.68);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    will-change: opacity;
    contain: paint;
}

.auth-required-overlay.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.auth-loading-shell,
.auth-required-card {
    transition: opacity 0.24s ease, visibility 0.24s ease, transform 0.24s ease;
}

.auth-loading-shell {
    position: absolute;
    top: 50%;
    left: 50%;
    width: clamp(112px, 15vw, 132px);
    height: clamp(112px, 15vw, 132px);
    border-radius: 22px;
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    background: linear-gradient(165deg, rgba(4, 4, 4, 0.96), rgba(12, 12, 12, 0.92));
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.09),
        0 0 20px rgba(255, 255, 255, 0.08),
        0 24px 56px rgba(0, 0, 0, 0.72);
    display: grid;
    place-items: center;
    transform: translate(-50%, -50%);
}

.auth-loading-spinner {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.22);
    border-top-color: #fff;
    animation: spin 0.85s linear infinite;
}

.auth-required-overlay[data-auth-view="loading"] .auth-loading-shell {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: none;
}

.auth-required-overlay[data-auth-view="loading"] .auth-required-card {
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px) scale(0.985);
    pointer-events: none;
}

.auth-required-overlay[data-auth-view="prompt"] .auth-loading-shell {
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, calc(-50% - 8px)) scale(0.965);
    pointer-events: none;
}

.auth-required-overlay[data-auth-view="prompt"] .auth-required-card {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.auth-required-card {
    width: min(100%, 460px);
    border-radius: 24px;
    border: 1.5px solid rgba(255, 255, 255, 0.26);
    background: linear-gradient(165deg, rgba(18, 18, 18, 0.92), rgba(8, 8, 8, 0.86));
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.1),
        0 0 22px rgba(255, 255, 255, 0.1),
        0 20px 60px rgba(0, 0, 0, 0.68);
    color: #fff;
    padding: clamp(28px, 4vw, 42px);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
}

.auth-required-badge {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.5px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.08);
}

.auth-required-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(28px, 2.6vw, 36px);
    line-height: 1.1;
    color: #fff;
}

.auth-required-message {
    margin: 0;
    max-width: 32ch;
    font-size: clamp(14px, 1.1vw, 17px);
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.86);
}

.auth-required-status {
    margin: 0;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.4px;
    color: rgba(255, 255, 255, 0.72);
}

.auth-required-actions {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 10px;
}

.auth-required-btn {
    width: 100%;
    min-height: 52px;
    border-radius: 13px;
    border: 1.5px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.auth-required-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.52);
    background: rgba(255, 255, 255, 0.16);
}

.auth-required-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

.auth-required-btn.primary {
    background: #fff;
    color: #111;
    border-color: #fff;
}

.auth-required-btn.primary:hover {
    background: #f3f3f3;
}

.auth-required-btn.ghost {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.9);
}

/* =========================================
   7.4 SUBSCRIPTION VERIFICATION POPUP
   ========================================= */
.subscription-verification-overlay {
    position: absolute;
    inset: 0;
    z-index: 225;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(16px, 3vw, 36px);
    background: rgba(0, 0, 0, 0.68);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    will-change: opacity;
    contain: paint;
}

.subscription-verification-overlay.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.subscription-verification-card {
    width: min(100%, 460px);
    border-radius: 24px;
    border: 1.5px solid rgba(255, 255, 255, 0.26);
    background: linear-gradient(165deg, rgba(18, 18, 18, 0.92), rgba(8, 8, 8, 0.86));
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.1),
        0 0 22px rgba(255, 255, 255, 0.1),
        0 20px 60px rgba(0, 0, 0, 0.68);
    color: #fff;
    padding: clamp(28px, 4vw, 42px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
    text-align: center;
}

.subscription-verification-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(28px, 2.6vw, 36px);
    line-height: 1.1;
    color: #fff;
    font-weight: 900;
}

.subscription-verification-message {
    margin: 0;
    max-width: 32ch;
    font-size: clamp(14px, 1.1vw, 17px);
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.86);
}

.subscription-verification-actions {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 10px;
}

.subscription-verification-btn {
    width: 100%;
    min-height: 52px;
    border-radius: 13px;
    border: 1.5px solid rgba(255, 255, 255, 0.28);
    background: #fff;
    color: #111;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.subscription-verification-btn:hover {
    transform: translateY(-1px);
    border-color: #fff;
    background: #f3f3f3;
}

#meriono-stage.auth-locked .overlay>*:not(.auth-required-overlay),
#meriono-stage.auth-locked>#account-bar,
#meriono-stage.auth-locked>#accountBarInformationBtn {
    opacity: 0;
    pointer-events: none;
}


/* =========================================
   8. ACCOUNT BAR & OVERLAY
   ========================================= */

/* Account Bar (Modern) */
#account-bar {
    position: absolute;
    top: var(--top-row-y);
    left: var(--layout-side-inset);
    width: var(--bar-width);
    min-height: var(--bar-height);
    padding-block: var(--bar-vpad);
    padding-inline: var(--bar-xpad);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(160deg, rgba(30, 30, 30, 0.72), rgba(6, 6, 6, 0.62));
    border-radius: var(--bar-radius);
    border: 1px solid rgba(255, 255, 255, 0.24);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.1),
        0 0 18px rgba(255, 255, 255, 0.14),
        0 14px 28px rgba(0, 0, 0, 0.52);
    color: #fff;
    z-index: var(--z-bar);
    pointer-events: auto;
    backdrop-filter: blur(8px) saturate(130%);
    -webkit-backdrop-filter: blur(8px) saturate(130%);
}

#meriono-stage.user-idle>#account-bar {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

#accountBarInformationBtn {
    position: absolute;
    top: calc(var(--top-row-y) + 4px);
    left: min(
        calc(var(--layout-side-inset) + var(--bar-width) + clamp(10px, 1vw, 16px)),
        calc(100% - var(--layout-side-inset) - var(--bar-height))
    );
    width: var(--bar-height);
    height: var(--bar-height);
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: linear-gradient(160deg, rgba(30, 30, 30, 0.72), rgba(6, 6, 6, 0.62));
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.08),
        0 0 14px rgba(255, 255, 255, 0.12),
        0 8px 16px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(7px) saturate(125%);
    -webkit-backdrop-filter: blur(7px) saturate(125%);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    z-index: var(--z-bar);
    touch-action: manipulation;
    transition: var(--transition);
}

#accountBarInformationBtn:hover {
    transform: scale(1.08);
    filter: brightness(1.12);
    border-color: rgba(255, 255, 255, 0.34);
}

#accountBarInformationBtn:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.86);
    outline-offset: 2px;
}

#accountBarInformationBtn:active {
    transform: scale(1.02);
}

#accountBarInformationBtn img {
    width: clamp(22px, 1.5vw, 30px);
    height: clamp(22px, 1.5vw, 30px);
    display: block;
    pointer-events: none;
}

#meriono-stage.user-idle>#accountBarInformationBtn {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

@supports (-webkit-touch-callout: none) {
    #account-bar {
        backdrop-filter: blur(6px) saturate(120%);
        -webkit-backdrop-filter: blur(6px) saturate(120%);
    }

    #accountBarInformationBtn {
        backdrop-filter: blur(5px) saturate(115%);
        -webkit-backdrop-filter: blur(5px) saturate(115%);
    }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    #account-bar {
        background: rgba(8, 8, 8, 0.9);
    }

    #accountBarInformationBtn {
        background: rgba(8, 8, 8, 0.9);
    }
}

.ab-left {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-right: clamp(24px, 2vw, 40px);
}

.ab-logo {
    width: auto;
    height: auto;
    max-height: calc(var(--bar-height) - 18px);
    object-fit: contain;
}

.ab-brand {
    font-family: var(--font-display);
    font-weight: 900;
    letter-spacing: 0.6px;
    font-size: clamp(18px, 1.3vw, 24px);
    line-height: 1;
    white-space: nowrap;
}

.ab-right {
    display: flex;
    gap: clamp(9px, 0.9vw, 14px);
    align-items: center;
    flex-shrink: 0;
}

.ab-pills-wrapper {
    display: flex;
    align-items: center;
    gap: clamp(6px, 0.6vw, 10px);
}

.ab-pill {
    padding: clamp(6px, 0.7vh, 9px) clamp(12px, 1.1vw, 16px);
    border-radius: 999px;
    font-size: clamp(12px, 0.9vw, 14px);
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.08);
}

.ab-plan-pill {
    position: relative;
    user-select: none;
    -webkit-user-select: none;
}

.ab-pill.ab-upgrade-cta {
    cursor: pointer;
    border-color: rgba(255, 178, 92, 0.62);
    box-shadow: inset 0 0 0 1px rgba(255, 178, 92, 0.2);
    transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
    animation: ab-free-upgrade-glow 5.6s ease-in-out infinite;
}

.ab-pill.ab-upgrade-cta:hover {
    border-color: rgba(255, 193, 118, 0.88);
    box-shadow:
        inset 0 0 0 1px rgba(255, 193, 118, 0.28),
        0 0 14px rgba(255, 165, 74, 0.28);
}

.ab-pill.ab-upgrade-cta:focus-visible {
    outline: none;
    border-color: rgba(255, 205, 139, 0.96);
    box-shadow:
        0 0 0 2px rgba(255, 196, 128, 0.32),
        0 0 16px rgba(255, 175, 94, 0.28);
}

.ab-pill.ab-upgrade-cta::after {
    content: attr(data-upgrade-hint);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    transform: translateX(-50%) translateY(5px);
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(8, 8, 12, 0.93);
    color: #f7f7f8;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.22px;
    line-height: 1;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
    z-index: 2;
}

.ab-pill.ab-upgrade-cta:hover::after,
.ab-pill.ab-upgrade-cta:focus-visible::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

@keyframes ab-free-upgrade-glow {
    0%,
    75%,
    100% {
        box-shadow: inset 0 0 0 1px rgba(255, 178, 92, 0.18);
    }

    36% {
        box-shadow:
            inset 0 0 0 1px rgba(255, 193, 118, 0.32),
            0 0 12px rgba(255, 165, 74, 0.22);
    }
}

.ab-btn,
.ab-icon {
    height: clamp(36px, 4.4vh, 42px);
    padding: 0 clamp(12px, 1vw, 16px);
    border-radius: 9px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    cursor: pointer;
    font-size: clamp(12px, 0.9vw, 14px);
}

.ab-icon {
    width: clamp(36px, 4.4vh, 42px);
    padding: 0;
}

.ab-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: #fff;
}

.ab-icon svg {
    width: clamp(18px, 1.25vw, 22px);
    height: clamp(18px, 1.25vw, 22px);
    fill: currentColor;
    stroke: currentColor;
    flex-shrink: 0;
}

.ab-icon:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.14);
}

/* Account Overlay (ortalanmış) */
.account-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(16px, 2.4vh, 28px) clamp(12px, 2vw, 20px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: var(--z-modal);
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    will-change: opacity;
    contain: paint;
}

.account-overlay.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* [KORUNAN BLOK] Kart stilleri */
.account-card {
    width: clamp(720px, 76vw, 1120px);
    max-width: 95vw;
    max-height: min(86vh, 800px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.72);
    color: #fff;
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(16px);
    padding: 18px;
    contain: paint;
}

.account-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 800;
    margin-bottom: 14px;
    padding: 2px 2px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

#account-panel-title {
    font-family: var(--font-display);
    font-size: clamp(20px, 1.7vw, 26px);
    letter-spacing: 0.4px;
}

.account-card.is-auth-panel #account-panel-title {
    display: none;
}

.account-card.is-auth-panel .account-card-header {
    min-height: auto;
}

#account-panel-close {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #fff;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    cursor: pointer;
}

.account-card-body {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding-right: 0;
}

.account-card-body::-webkit-scrollbar {
    width: 8px;
}

.account-card-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.28);
    border-radius: 999px;
}

.account-card [hidden] {
    display: none !important;
}

.account-auth-views {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding-right: 6px;
    padding-bottom: 16px;
}

.account-auth-views::-webkit-scrollbar {
    width: 8px;
}

.account-auth-views::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.26);
    border-radius: 999px;
}

.account-auth-view {
    width: min(100%, 560px);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.account-auth-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.account-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    font-size: 13px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.88);
}

.account-field input {
    width: 100%;
    height: 44px;
    border-radius: 12px;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    padding: 0 12px;
    font-size: 14px;
    font-family: var(--font-main);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.account-field input:focus {
    border-color: rgba(255, 255, 255, 0.72);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.1);
}

.account-auth-error {
    margin: 0;
    color: #ffd3d3;
    font-size: 12px;
    font-weight: 700;
}

.account-auth-submit {
    width: 100%;
    min-height: 46px;
    border-radius: 12px;
    border: 1.5px solid #fff;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.account-auth-submit:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.2);
}

.account-side-tab-link {
    justify-content: space-between;
    gap: 12px;
    text-decoration: none;
}

.account-side-tab-link svg {
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
}

.account-auth-link {
    width: fit-content;
    border: none;
    background: none;
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
    padding: 2px 0;
}

.account-auth-link:hover {
    color: #fff;
}

.account-app-shell {
    flex: 1 1 auto;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(220px, 270px) minmax(0, 1fr);
    gap: 20px;
    overflow: hidden;
}

.account-side-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 2px 0;
    border: none;
    border-radius: 0;
    background: transparent;
    align-self: stretch;
}

.account-side-tab {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    min-height: 42px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1.5px solid rgba(255, 255, 255, 0.34);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    text-align: left;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.account-side-tab:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.58);
}

.account-side-tab.active {
    background: rgba(255, 255, 255, 0.2);
    border-color: #fff;
}

.account-side-brand {
    display: block;
    width: 100%;
    text-align: center;
    align-self: center;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.76);
    font-family: var(--font-main);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.account-side-brand:hover {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.account-app-shell>.account-main-content {
    min-height: 0;
    overflow-y: auto;
    padding: 4px 6px 4px 22px;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.account-overlay.is-shell-panel .account-card-header {
    margin-bottom: 18px;
}

.account-app-shell>.account-main-content::-webkit-scrollbar {
    width: 8px;
}

.account-app-shell>.account-main-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.26);
    border-radius: 999px;
}

.account-main-view {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.account-info-grid {
    display: grid;
    gap: 10px;
}

.account-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
}

.account-info-row span {
    font-size: 13px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.8);
}

.account-info-row b {
    font-size: 13px;
    color: #fff;
}

.account-logout {
    margin-top: 6px;
}

.settings-center {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 100%;
}

.settings-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(28px, 2.5vw, 34px);
    font-weight: 900;
    color: #fff;
}

.settings-subtitle {
    margin: -6px 0 2px;
    font-size: clamp(14px, 1.1vw, 16px);
    font-weight: 600;
    color: rgba(255, 255, 255, 0.86);
}

.settings-section-title {
    margin: 0;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.3px;
    text-transform: none;
    color: rgba(255, 255, 255, 0.82);
}

.settings-section-title.settings-section-spaced {
    margin-top: 14px;
}

.settings-main-title {
    margin: 0;
}

.settings-divider {
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.22);
}

.settings-divider-main {
    margin: 9px 0 11px;
}

.settings-divider-section {
    margin: 8px 0 12px;
}

#accountPlaceholder {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
}

.settings-center .alarm-setting-row {
    border-bottom-color: rgba(255, 255, 255, 0.3);
}

.settings-center .alarm-setting-label {
    color: #fff;
}

.settings-subsection {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.settings-subsection.is-plan-locked {
    opacity: 0.62;
}

.cookie-settings-section {
    width: 100%;
}

.cookie-settings-row {
    align-items: center;
    gap: 14px;
}

.cookie-settings-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-left: auto;
}

.cookie-consent-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 148px;
    height: 40px;
    border-radius: 999px;
    border: 1.5px solid rgba(255, 255, 255, 0.66);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-family: var(--font-main);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.2px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.cookie-consent-btn--settings {
    min-width: 132px;
    height: 36px;
}

.cookie-consent-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.84);
}

.cookie-consent-btn:active {
    transform: translateY(1px);
}

.cookie-consent-btn.is-active {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.9);
}

.cookie-consent-btn:focus-visible {
    outline: 2px solid rgba(255, 145, 77, 0.94);
    outline-offset: 2px;
}

.cookie-consent-banner {
    position: fixed;
    left: auto;
    right: max(16px, env(safe-area-inset-right, 0px));
    bottom: calc(var(--ui-bottom-anchor) + 4px);
    width: min(520px, calc(100vw - 28px));
    max-width: 520px;
    z-index: 116;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1.5px solid rgba(255, 255, 255, 0.22);
    background: linear-gradient(160deg, rgba(2, 2, 2, 0.95) 0%, rgba(8, 8, 8, 0.94) 100%);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.44);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.cookie-consent-banner[hidden] {
    display: none !important;
}

.cookie-consent-text {
    margin: 0;
    color: rgba(255, 255, 255, 0.92);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
}

.cookie-consent-link {
    color: var(--accent-orange);
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 800;
}

.cookie-consent-link:focus-visible {
    outline: 2px solid rgba(255, 145, 77, 0.95);
    outline-offset: 2px;
    border-radius: 4px;
}

.cookie-consent-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
}

.cookie-consent-actions .cookie-consent-btn {
    width: 100%;
    min-width: 0;
}

.information-center {
    gap: 0;
    height: auto;
    min-height: 0;
    overflow: visible;
}

.information-blank-view {
    width: 100%;
    min-height: clamp(240px, 48vh, 520px);
    border-radius: 14px;
    border: 1.5px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.02);
    overflow: hidden;
}

#accountTabBtnInformationBlank,
#accountTabBtnInformationGamification,
#accountTabBtnInformationDfNotes,
#accountTabBtnInformationDfTools,
#accountTabBtnInformationInterfaceComponents,
#accountTabBtnInformationSettingsPanel,
#accountTabBtnInformationMusic,
#accountTabLinkSupport {
    min-height: 52px;
    line-height: 1.2;
    white-space: normal;
    text-wrap: balance;
}

.information-first-look-image {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.information-guide-stack {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin: 0;
    padding: 0;
    gap: 0;
    line-height: 0;
}

.information-guide-image {
    display: block;
    width: 100%;
    height: auto;
    margin: 0;
    padding: 0;
    border: 0;
}

.information-center img,
.information-center video,
.information-center canvas,
.information-center svg {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-user-drag: none;
    user-drag: none;
    -webkit-touch-callout: none;
    pointer-events: none;
}

.information-blank-view {
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

.account-overlay.is-information-panel .account-app-shell>.account-main-content {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.account-overlay.is-information-panel .account-app-shell>.account-main-content::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

.account-overlay.is-information-panel .information-center {
    padding-right: 0;
}

/* =========================================
   9. BREAKPOINTS (Desktop / Tablet / Mobile Fallback)
   ========================================= */

@media (max-width: 1024px) {
    #accountBarInformationBtn {
        display: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }

    .cookie-settings-row {
        align-items: flex-start;
    }

    .cookie-settings-controls {
        width: 100%;
        justify-content: flex-end;
        flex-wrap: wrap;
    }

    .cookie-consent-banner {
        left: auto;
        right: max(10px, env(safe-area-inset-right, 0px));
        bottom: calc(max(10px, env(safe-area-inset-bottom, 0px)) + 6px);
        width: min(420px, calc(100vw - 20px));
        max-width: calc(100vw - 20px);
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 12px 14px;
    }

    .cookie-consent-actions {
        width: 100%;
    }

    /* Basic Focus: dar ekranlarda kontrol butonlarının çakışmasını engelle */
    #mtPaneBasic .mt-basic-left {
        min-width: 0;
    }

    #mtPaneBasic .mt-row {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
        align-items: stretch;
    }

    #mtPaneBasic .mt-btn {
        min-width: 0;
        width: 100%;
        padding: 0 8px;
        font-size: clamp(11px, 1.35vw, 13px);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* Tablet */
@media (min-width: 768px) and (max-width: 1200px) {
    :root {
        --layout-side-inset: clamp(18px, 2.2vw, 30px);
        --layout-top-inset: clamp(18px, 2vh, 30px);
        --bar-top-gap: var(--layout-top-inset);
        --bar-height: clamp(60px, 7.8vh, 72px);
        --bar-inline-safe: clamp(16px, 2.2vw, 28px);
        --bar-max-width: clamp(700px, 56vw, 840px);
        --bar-vpad: clamp(7px, 0.9vh, 11px);
        --bar-xpad: clamp(18px, 1.7vw, 30px);
        --bar-bottom-gap: clamp(18px, 1.5vh, 24px);
        --timer-time-width: 6ch;
        --timer-widget-width: clamp(208px, 20vw, 248px);
        --timer-slot-gap: clamp(12px, 1.1vw, 18px);
        --timer-right-inset: calc(var(--layout-side-inset) - 4px);
        --timer-optical-offset: 0px;
        --panel-width: clamp(290px, 33vw, 360px);
        --control-btn-size: clamp(44px, 3.2vw, 54px);
        --control-label-size: clamp(14px, 1.05vw, 17px);
        --control-icon-size: clamp(18px, 1.3vw, 22px);
        --timer-ring-size: clamp(48px, 3vw, 58px);
        --timer-text-size: clamp(38px, 2.6vw, 52px);
        --panel-toggle-width: clamp(40px, 2.8vw, 50px);
        --panel-toggle-height: clamp(60px, 5.4vh, 74px);
        --panel-toggle-font-size: clamp(30px, 2.2vw, 38px);
        --atm-pill-font-size: clamp(12px, 0.9vw, 14px);
        --atm-pill-pad-y: clamp(7px, 0.8vh, 10px);
        --atm-pill-pad-x: clamp(14px, 1.1vw, 20px);
        --slider-track-width: clamp(6px, 0.4vw, 8px);
        --slider-knob-size: clamp(17px, 1.2vw, 22px);
    }

    .mt-layout {
        max-width: min(95vw, 820px);
    }

    .mt-layout {
        --mf-side-layout-width: min(95vw, 820px);
    }

    .mt-main-horizontal {
        grid-template-columns: minmax(270px, 1fr) minmax(220px, 0.92fr);
        gap: 14px;
    }

    .mt-pane-meriono {
        height: 100%;
    }

    .mf-grid {
        grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr);
        gap: 12px;
    }

    .mf-side-layer {
        inset: 0;
        left: 0;
        right: 0;
        width: auto;
    }

    .mf-side-panel {
        width: min(clamp(420px, 54vw, 560px), calc(100% - 24px));
        height: calc(100% - 25px);
        max-height: calc(100% - 25px);
        box-shadow: 0 24px 48px rgba(0, 0, 0, 0.46);
    }

    .account-card {
        width: clamp(560px, 82vw, 860px);
        max-width: 95vw;
    }

    .account-app-shell {
        grid-template-columns: minmax(200px, 250px) minmax(0, 1fr);
    }

}

/* Tablet portrait: alarm panel stack */
@media (min-width: 768px) and (max-width: 1200px) and (orientation: portrait) {
    .mt-layout {
        max-width: min(95vw, 760px);
        --mf-side-layout-width: min(95vw, 760px);
    }

    .mt-main-horizontal {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .mt-pane-meriono {
        height: 100%;
    }

    .mf-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .mf-side-layer {
        inset: 0;
        left: 0;
        right: 0;
        width: auto;
    }

    .account-card {
        width: clamp(560px, 90vw, 920px);
    }
}

/* Compact heights (tablet + small laptop) */
@media (min-width: 768px) and (max-height: 1100px) {
    :root {
        --layout-side-inset: clamp(18px, 2vw, 30px);
        --layout-top-inset: clamp(18px, 2vh, 28px);
        --bar-top-gap: var(--layout-top-inset);
        --bar-height: clamp(60px, 7.6vh, 72px);
        --bar-bottom-gap: clamp(28px, 2.8vh, 40px);
        --panel-toggle-offset: 88px;
    }

    .vol-slider-wrapper {
        height: clamp(128px, 14vh, 164px);
    }
}

/* Short heights (laptops/tablet landscape) */
@media (min-width: 768px) and (max-height: 900px) {
    :root {
        --layout-side-inset: clamp(16px, 1.7vw, 24px);
        --layout-top-inset: clamp(14px, 1.6vh, 22px);
        --bar-top-gap: var(--layout-top-inset);
        --bar-height: clamp(58px, 7.1vh, 66px);
        --bar-max-width: clamp(680px, 54vw, 820px);
        --bar-vpad: clamp(6px, 0.8vh, 10px);
        --bar-xpad: clamp(16px, 1.5vw, 26px);
        --bar-bottom-gap: clamp(20px, 2vh, 28px);
        --timer-time-width: 5.8ch;
        --timer-widget-width: clamp(198px, 16vw, 234px);
        --timer-slot-gap: clamp(10px, 1vw, 16px);
        --timer-right-inset: calc(var(--layout-side-inset) - 6px);
        --timer-optical-offset: 0px;
        --control-btn-size: clamp(42px, 3vw, 50px);
        --timer-ring-size: clamp(46px, 2.9vw, 56px);
        --timer-text-size: clamp(35px, 2.4vw, 48px);
        --panel-width: clamp(280px, 23vw, 340px);
        --panel-toggle-offset: 80px;
    }

    .top-right {
        gap: 12px;
    }

    .bottom-controls-group {
        gap: 16px;
    }

    .vol-slider-wrapper {
        height: clamp(120px, 13vh, 148px);
    }

    .mt-main-horizontal {
        grid-template-columns: 1fr;
    }

    .mf-grid {
        grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
        gap: 10px;
    }

    .mf-side-layer {
        inset: 0;
        left: 0;
        right: 0;
        width: auto;
    }

    .account-card {
        width: clamp(620px, 84vw, 980px);
        max-height: min(86vh, 620px);
    }

}

/* Mobile fallback (not primary target) */
@media (max-width: 767px) {
    :root {
        --layout-side-inset: 12px;
        --layout-top-inset: 12px;
        --bar-top-gap: var(--layout-top-inset);
        --bar-vpad: 6px;
        --bar-xpad: 14px;
        --bar-height: 52px;
        --bar-inline-safe: 12px;
        --bar-max-width: 760px;
        --bar-bottom-gap: 12px;
        --timer-time-width: 5.6ch;
        --timer-widget-width: clamp(154px, 42vw, 186px);
        --timer-slot-gap: 8px;
        --timer-right-inset: calc(var(--layout-side-inset) - 2px);
        --timer-optical-offset: 0px;
        --panel-width: min(86vw, 320px);
        --control-btn-size: 40px;
        --control-label-size: 13px;
        --control-icon-size: 17px;
        --timer-ring-size: 44px;
        --timer-text-size: 28px;
        --panel-toggle-width: 36px;
        --panel-toggle-height: 56px;
        --panel-toggle-font-size: 28px;
        --atm-pill-font-size: 12px;
        --atm-pill-pad-y: 7px;
        --atm-pill-pad-x: 14px;
        --slider-track-width: 6px;
        --slider-knob-size: 16px;
        --vol-label-size: 11px;
        --ui-top-offset-left: 6px;
        --ui-top-offset-right: 0px;
        --notes-panel-width: min(94vw, 460px);
    }

    .top-right {
        left: 50%;
        transform: translateX(-50%);
        align-items: center;
    }

    .bottom-controls-group {
        left: 50%;
        transform: translateX(-50%);
        flex-direction: column-reverse;
        align-items: center;
        gap: 18px;
    }

    .music-panel {
        left: 12px;
        width: min(86vw, 320px);
    }

    .notes-panel-toggle {
        right: 12px;
    }

    .tools-panel-toggle {
        right: 12px;
    }

    .notes-panel {
        right: 12px;
        width: var(--notes-panel-width);
    }

    .tools-panel {
        right: 12px;
        width: var(--tools-panel-width);
    }

    .brain-dump-grid {
        grid-template-columns: minmax(104px, 1fr) minmax(0, 3fr);
        gap: 10px;
    }

    .brain-dump-mode-toggle {
        max-width: 126px;
        min-height: 38px;
    }

    .brain-dump-priority-dot {
        width: 16px;
        height: 16px;
    }

    .brain-dump-schedule-btn {
        width: 42px;
        height: 42px;
    }

    .brain-dump-schedule-btn svg {
        width: 19px;
        height: 19px;
    }

    .brain-dump-schedule-popover {
        width: min(258px, calc(100vw - 32px), calc(var(--notes-panel-width, 460px) - 30px));
        max-width: calc(var(--notes-panel-width, 460px) - 30px);
    }

    .brain-dump-content {
        margin-left: 8px;
        max-width: calc(100% - 8px);
    }

    .brain-dump-note-input {
        min-height: 100px;
        max-height: none;
        height: 100%;
    }

    .brain-dump-task-editor {
        min-height: 132px;
        max-height: none;
        height: 100%;
    }

    .mt-layout {
        justify-content: center;
        max-width: min(96vw, 560px);
    }

    .mt-main-horizontal {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    #mtPaneBasic .mt-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    #mtPaneBasic #btnStart {
        grid-column: 1 / -1;
    }

    .mt-pane-meriono {
        height: 100%;
    }

    .mf-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .mf-side-layer {
        inset: 0;
        width: auto;
    }

    .mf-side-panel {
        width: min(92vw, 560px);
        height: calc(100% - 25px);
        max-height: calc(100% - 25px);
        border-radius: 16px;
    }

    .account-card {
        width: min(96vw, 860px);
        max-height: min(84vh, 620px);
    }

    .account-app-shell {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .account-side-nav {
        flex-direction: row;
        align-items: center;
        flex-wrap: wrap;
        overflow-x: visible;
        row-gap: 8px;
        padding-bottom: 0;
    }

    .account-side-tab {
        flex: 0 0 auto;
        min-width: 130px;
    }

    .account-side-brand {
        flex: 1 1 100%;
        margin-top: 2px;
        padding-top: 8px;
        text-align: center;
    }

    .account-app-shell>.account-main-content {
        border-left: none;
        padding-right: 2px;
        padding-left: 2px;
    }

    .settings-title {
        font-size: clamp(24px, 6.4vw, 30px);
    }

    .ab-pill {
        display: none;
    }

    .auth-required-overlay {
        padding: 24px 20px;
    }

    .auth-required-card {
        width: min(100%, 420px);
        padding: 28px 22px;
        gap: 18px;
    }

    .auth-required-title {
        font-size: clamp(24px, 7vw, 30px);
    }

    .auth-required-message {
        font-size: 14px;
    }

    .subscription-verification-overlay {
        padding: 24px 20px;
    }

    .subscription-verification-card {
        width: min(100%, 420px);
        padding: 28px 22px;
        gap: 18px;
    }

    .subscription-verification-title {
        font-size: clamp(24px, 7vw, 30px);
    }

    .subscription-verification-actions {
        justify-content: stretch;
    }

    .subscription-verification-btn {
        width: 100%;
    }
}

@media (max-width: 420px) {
    #mtPaneBasic .mt-row {
        grid-template-columns: 1fr;
        gap: 7px;
    }

    #mtPaneBasic #btnStart {
        grid-column: auto;
    }

    #mtPaneBasic .mt-btn {
        height: 42px;
        font-size: 12px;
    }
}

/* =========================================
   9.1 FOCUS DESKTOP LOCK (Meriono + Basic)
   Keep both focus panes in desktop layout at all widths.
   ========================================= */
#mtPaneMeriono,
#mtPaneBasic {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

#mtPaneMeriono .mf-main-shell,
#mtPaneBasic .mt-main-horizontal {
    min-width: 640px;
}

#mtPaneMeriono .mf-grid {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    gap: 14px;
}

#mtPaneBasic .mt-main-horizontal {
    grid-template-columns: minmax(310px, 1.08fr) minmax(250px, 0.92fr);
    gap: 16px;
}

#mtPaneBasic .mt-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

#mtPaneBasic #btnStart {
    grid-column: auto;
}

/* =========================================
   10. IDLE OVERRIDES (MUST BE LAST FOR SPECIFICITY/ORDER)
   ========================================= */
#meriono-stage.user-idle>.mt-overlay-wrapper.open,
#meriono-stage.user-idle>.account-overlay.open,
#meriono-stage.user-idle>.alarm-popup-overlay.open,
#meriono-stage.user-idle>.focus-away-popup-overlay.open,
#meriono-stage.user-idle>.oath-popup-overlay.open,
#meriono-stage.user-idle>.auth-required-overlay.open,
#meriono-stage.user-idle>.subscription-verification-overlay.open {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

/* Custom DF Login Card */
.custom-df-card {
    background-color: #ffffff !important;
    background-image: none !important;
    width: 360px !important;
    min-width: 360px !important;
    padding: 60px 30px !important;
    border-radius: 24px !important;
    box-shadow: 0 15px 35px rgba(0,0,0,0.08) !important;
    text-align: center !important;
    border: none !important;
    display: block !important;
    color: #1a1a1a !important;
}

.df-logo-group {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 15px !important;
    margin-bottom: 65px !important;
}

.df-logo {
    width: 70px !important;
    height: 70px !important;
    object-fit: contain !important;
}

.df-link-icon {
    width: 24px !important;
    height: 24px !important;
    fill: none !important;
    stroke: #a0aec0 !important;
    stroke-width: 2 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
}

.df-title {
    font-size: 24px !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
    margin: 0 0 12px 0 !important;
    letter-spacing: -0.5px !important;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
}

.df-description {
    font-size: 15px !important;
    color: #666666 !important;
    margin: 0 0 25px 0 !important;
    line-height: 1.5 !important;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
}

.df-button {
    display: inline-block !important;
    background-color: #1a1a1a !important;
    color: #ffffff !important;
    text-decoration: none !important;
    padding: 14px 45px !important;
    border-radius: 14px !important;
    font-weight: 600 !important;
    font-size: 16px !important;
    transition: background-color 0.3s ease, transform 0.2s ease !important;
    border: none !important;
    cursor: pointer !important;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
}

.df-button:hover {
    background-color: #f97316 !important;
    transform: translateY(-2px) !important;
}
