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

:root {
    /* Light Theme - Warm & Literary (matching MonoSuite) */
    --bg-primary: #faf9f7;
    --bg-secondary: #f0ede8;
    --bg-tertiary: #e8e4dd;
    --text-primary: #2c2c2c;
    --text-secondary: #6b6b6b;
    --text-muted: #8a8a8a;
    --accent: #c45d3e;
    --accent-hover: #a84d32;
    --accent-secondary: #2d5a4a;
    --border-color: #e4e0db;
    --border-subtle: #ebe8e3;
    --toolbar-bg: rgba(250, 249, 247, 0.92);
    --shadow-sm: 0 1px 2px rgba(44, 44, 44, 0.04);
    --shadow-md: 0 4px 12px rgba(44, 44, 44, 0.08);
    --shadow-lg: 0 12px 32px rgba(44, 44, 44, 0.12);

    /* Timer-specific colors */
    --mode-focus: #c45d3e;
    --mode-deep: #2d5a4a;
    --mode-break: #5fa386;
    --mode-custom: #6366f1;
    --warning-color: #f59e0b;

    /* Sizing */
    --header-height: 56px;
    --toolbar-height: 52px;
    --status-bar-height: 40px;
    --touch-target-min: 44px;
    --timer-size: 280px;
    --progress-stroke-width: 8px;

    /* Typography */
    --font-display: 'Fraunces', Georgia, serif;
    --font-body: 'Source Serif 4', Georgia, serif;
    --font-ui: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Animation */
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
    --duration-fast: 150ms;
    --duration-normal: 250ms;
    --duration-slow: 400ms;
}

[data-theme="dark"] {
    --bg-primary: #1c1b19;
    --bg-secondary: #282623;
    --bg-tertiary: #333028;
    --text-primary: #e8e4de;
    --text-secondary: #9a958c;
    --text-muted: #6e6a62;
    --accent: #e07a5f;
    --accent-hover: #eb8d74;
    --accent-secondary: #5fa386;
    --border-color: #3a3632;
    --border-subtle: #302d29;
    --toolbar-bg: rgba(28, 27, 25, 0.92);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.4);

    --mode-focus: #e07a5f;
    --mode-deep: #5fa386;
    --mode-break: #7ec8a8;
}

body {
    font-family: var(--font-ui);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    transition: background var(--duration-normal) var(--ease-out),
                color var(--duration-normal) var(--ease-out);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
    overflow-x: hidden;
}

::selection {
    background: var(--accent);
    color: white;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ========== HEADER ========== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--toolbar-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-subtle);
    padding: 0 20px;
    z-index: 100;
    transition: transform var(--duration-normal) var(--ease-out),
                opacity var(--duration-normal) var(--ease-out),
                margin-left var(--duration-normal) var(--ease-out);
}

.header-content {
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left,
.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand-link {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: -0.02em;
    cursor: pointer;
    transition: color var(--duration-fast) var(--ease-out);
}

.brand-link:hover {
    color: var(--accent-hover);
}

.btn-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 8px;
    font-size: 18px;
    transition: all var(--duration-fast) var(--ease-out);
}

.btn-icon:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

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

.btn-header {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all var(--duration-fast) var(--ease-out);
    white-space: nowrap;
}

.btn-header:hover {
    background: var(--bg-tertiary);
}

.btn-header.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

/* ========== SIDEBAR ========== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    z-index: 150;
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform var(--duration-normal) var(--ease-out);
}

body.sidebar-open .sidebar {
    transform: translateX(0);
}

body.sidebar-open .header,
body.sidebar-open .main-content,
body.sidebar-open .toolbar,
body.sidebar-open .status-bar {
    margin-left: 280px;
}

.sidebar-header {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: var(--header-height);
}

.sidebar-title {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: -0.02em;
}

.sidebar-section {
    padding: 16px;
    border-bottom: 1px solid var(--border-subtle);
}

.sidebar-section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.session-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.session-item {
    padding: 10px 12px;
    background: var(--bg-primary);
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
}

.session-item:hover {
    background: var(--bg-tertiary);
}

.session-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.session-item-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.session-item-duration {
    font-size: 12px;
    color: var(--text-muted);
}

.session-item-time {
    font-size: 11px;
    color: var(--text-muted);
}

.session-empty {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-size: 13px;
}

/* ========== TOOLBAR ========== */
.toolbar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    height: var(--toolbar-height);
    background: var(--toolbar-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-subtle);
    z-index: 99;
    transition: opacity var(--duration-normal) var(--ease-out),
                margin-left var(--duration-normal) var(--ease-out);
}

.toolbar-content {
    height: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.preset-buttons {
    display: flex;
    gap: 6px;
}

.btn-preset {
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 500;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 8px;
    transition: all var(--duration-fast) var(--ease-out);
    white-space: nowrap;
}

.btn-preset:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-preset.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.btn-preset[data-mode="deep90"].active {
    background: var(--mode-deep);
    border-color: var(--mode-deep);
}

.btn-preset[data-mode="break5"].active {
    background: var(--mode-break);
    border-color: var(--mode-break);
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.gentle-nag-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
}

.gentle-nag-toggle input {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
}

/* ========== MAIN CONTENT ========== */
.main-content {
    min-height: 100vh;
    padding-top: calc(var(--header-height) + var(--toolbar-height) + 40px);
    padding-bottom: calc(var(--status-bar-height) + 40px);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: margin-left var(--duration-normal) var(--ease-out);
}

/* ========== TIMER ========== */
.timer-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    --current-mode-color: var(--mode-focus);
}

.timer-wrapper[data-mode="focus25"],
.timer-wrapper[data-mode="focus45"] {
    --current-mode-color: var(--mode-focus);
}

.timer-wrapper[data-mode="deep90"] {
    --current-mode-color: var(--mode-deep);
}

.timer-wrapper[data-mode="break5"] {
    --current-mode-color: var(--mode-break);
}

.timer-mode {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--current-mode-color);
    transition: color var(--duration-normal) var(--ease-out);
}

.timer-circle {
    position: relative;
    width: var(--timer-size);
    height: var(--timer-size);
}

.progress-ring {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.progress-ring-bg {
    fill: none;
    stroke: var(--border-color);
    stroke-width: var(--progress-stroke-width);
}

.progress-ring-fill {
    fill: none;
    stroke: var(--current-mode-color);
    stroke-width: var(--progress-stroke-width);
    stroke-linecap: round;
    stroke-dasharray: 816.81;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 0.5s ease-out,
                stroke var(--duration-normal) var(--ease-out);
}

.timer-display {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.timer-time {
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    line-height: 1;
}

.timer-label {
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-top: 8px;
}

/* Timer warning */
.timer-warning {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid var(--warning-color);
    border-radius: 8px;
    color: var(--warning-color);
    font-size: 14px;
    font-weight: 500;
    animation: gentle-pulse 2s ease-in-out infinite;
}

.timer-warning.hidden {
    display: none;
}

@keyframes gentle-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Timer controls */
.timer-controls {
    display: flex;
    gap: 12px;
}

.btn-control {
    padding: 14px 32px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
    min-width: 100px;
}

.btn-start {
    background: var(--accent);
    color: white;
}

.btn-start:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.btn-pause {
    background: var(--warning-color);
    color: white;
}

.btn-pause:hover {
    filter: brightness(1.1);
}

.btn-reset {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-reset:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-control.hidden {
    display: none;
}

/* Extend buttons */
.extend-buttons {
    display: flex;
    gap: 8px;
}

.extend-buttons.hidden {
    display: none;
}

.btn-extend {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: 6px;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
}

.btn-extend:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--accent);
}

/* ========== TEMPLATES SECTION ========== */
.templates-section {
    width: 100%;
    max-width: 700px;
    margin-top: 48px;
    padding: 0 20px;
}

.templates-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.templates-title {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.btn-add-template {
    width: 32px;
    height: 32px;
}

.template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.template-card {
    padding: 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-left: 4px solid var(--template-color, var(--accent));
    border-radius: 10px;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
    position: relative;
}

.template-card:hover {
    background: var(--bg-tertiary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.template-card-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.template-card-duration {
    font-size: 12px;
    color: var(--text-muted);
}

.template-card-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: none;
}

.template-card:hover .template-card-actions {
    display: flex;
}

.template-card .btn-icon {
    width: 28px;
    height: 28px;
}

/* ========== STATUS BAR ========== */
.status-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--status-bar-height);
    background: var(--toolbar-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--border-subtle);
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-muted);
    z-index: 50;
    transition: opacity var(--duration-normal) var(--ease-out),
                margin-left var(--duration-normal) var(--ease-out);
}

.status-left,
.status-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-divider {
    color: var(--border-color);
}

/* ========== MODALS ========== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 1;
    visibility: visible;
    transition: all var(--duration-normal) var(--ease-out);
}

.modal-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

.modal {
    background: var(--bg-primary);
    border-radius: 14px;
    width: 90%;
    max-width: 420px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-lg);
    transform: translateY(0);
    transition: transform var(--duration-normal) var(--ease-out);
}

.modal-overlay.hidden .modal {
    transform: translateY(20px);
}

.modal-header {
    padding: 20px 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.btn-close {
    color: var(--text-muted);
}

.modal-body {
    padding: 24px 20px;
}

.modal-footer {
    padding: 0 20px 20px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.modal-subtitle {
    color: var(--text-secondary);
    margin: 0 20px 20px;
    font-size: 15px;
}

.modal-body p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.modal-body h4 {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 20px 0 10px;
}

.modal-body ul {
    margin: 0 0 16px;
    padding-left: 20px;
}

.modal-body li {
    font-size: 14px;
    margin-bottom: 6px;
    color: var(--text-secondary);
}

.modal-body kbd {
    display: inline-block;
    padding: 2px 6px;
    font-size: 12px;
    font-family: var(--font-ui);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
}

.modal-footer-info {
    padding: 16px 20px;
    border-top: 1px solid var(--border-subtle);
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
}

.modal-footer-info a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--duration-fast) var(--ease-out);
}

.modal-footer-info a:hover {
    color: var(--accent-hover);
}

/* About modal close button positioning */
#aboutModal .btn-close {
    position: absolute;
    top: 16px;
    right: 16px;
}

.setting-group {
    margin-bottom: 20px;
}

.setting-group:last-child {
    margin-bottom: 0;
}

.setting-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
    cursor: pointer;
}

.setting-label input[type="checkbox"] {
    margin-right: 8px;
    accent-color: var(--accent);
}

.setting-control {
    display: flex;
    align-items: center;
    gap: 12px;
}

.setting-select,
.setting-input {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    transition: border-color var(--duration-fast) var(--ease-out);
}

.setting-select:focus,
.setting-input:focus {
    outline: none;
    border-color: var(--accent);
}

.setting-slider {
    flex: 1;
    accent-color: var(--accent);
}

#volumeValue {
    min-width: 40px;
    text-align: right;
    font-size: 13px;
    color: var(--text-secondary);
}

.color-picker {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.color-option {
    width: 32px;
    height: 32px;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
}

.color-option:hover {
    transform: scale(1.1);
}

.color-option.selected {
    border-color: var(--text-primary);
    box-shadow: 0 0 0 2px var(--bg-primary);
}

.btn-primary {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
}

.btn-primary:hover {
    background: var(--accent-hover);
}

.btn-secondary {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
}

.btn-secondary:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* ========== TOAST ========== */
.toast {
    position: fixed;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: all var(--duration-normal) var(--ease-out);
    z-index: 500;
}

.toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.toast.hidden {
    display: none;
}

/* ========== FOCUS MODE ========== */
.focus-trigger {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    z-index: 99;
    pointer-events: none;
}

body.focus-mode .templates-section {
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--duration-normal) var(--ease-out);
}

body.focus-mode .header,
body.focus-mode .toolbar,
body.focus-mode .status-bar {
    opacity: 0;
    transition: opacity var(--duration-normal) var(--ease-out);
}

body.focus-mode .focus-trigger {
    pointer-events: all;
}

/* Header and toolbar appear together */
body.focus-mode .focus-trigger:hover + .sidebar + .header,
body.focus-mode .header:hover,
body.focus-mode:has(.toolbar:hover) .header {
    opacity: 1;
}

body.focus-mode .focus-trigger:hover ~ .toolbar,
body.focus-mode .toolbar:hover,
body.focus-mode:has(.header:hover) .toolbar {
    opacity: 1;
}

body.focus-mode .status-bar:hover {
    opacity: 1;
}

body.focus-mode .main-content {
    padding-top: 120px;
}

/* ========== RUNNING STATE ========== */
body.timer-running .btn-preset {
    opacity: 0.5;
    pointer-events: none;
}

body.timer-running .btn-preset.active {
    opacity: 1;
}

body.timer-running .template-card {
    opacity: 0.5;
    pointer-events: none;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .toolbar-content {
        padding: 0 12px;
    }

    .preset-buttons {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        padding: 4px 0;
    }

    .preset-buttons::-webkit-scrollbar {
        display: none;
    }

    .btn-preset {
        padding: 8px 12px;
        font-size: 12px;
    }

    .gentle-nag-toggle .toggle-label {
        display: none;
    }

    body.sidebar-open .header,
    body.sidebar-open .main-content,
    body.sidebar-open .toolbar,
    body.sidebar-open .status-bar {
        margin-left: 0;
    }

    .sidebar {
        width: 100%;
        max-width: 320px;
    }

    .timer-time {
        font-size: 3rem;
    }

    .template-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }
}

@media (max-width: 480px) {
    :root {
        --timer-size: 240px;
    }

    .header {
        padding: 0 12px;
    }

    .timer-time {
        font-size: 2.5rem;
    }

    .timer-controls {
        flex-wrap: wrap;
        justify-content: center;
    }

    .btn-control {
        padding: 12px 24px;
        font-size: 14px;
    }

    .templates-section {
        padding: 0 12px;
        margin-top: 32px;
    }

    .template-grid {
        grid-template-columns: 1fr 1fr;
    }

    .template-card {
        padding: 12px;
    }
}

/* Touch devices */
@media (hover: none) and (pointer: coarse) {
    .template-card-actions {
        display: flex;
    }

    button {
        min-height: var(--touch-target-min);
    }
}

/* Sidebar overlay for mobile */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 140;
    opacity: 0;
    visibility: hidden;
    transition: all var(--duration-normal) var(--ease-out);
}

body.sidebar-open .sidebar-overlay {
    opacity: 1;
    visibility: visible;
}
