@font-face {
    font-family: 'Mesgentia';
    src: url('/assets/fonts/Mesgentia.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    ascent-override: 100%;
    descent-override: 20%;
    line-gap-override: 0%;
}

@font-face {
    font-family: 'Mineko';
    src: url('/assets/fonts/Mineko.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    ascent-override: 97.5%;
    descent-override: 22.5%;
    line-gap-override: 0%;
}

:root {
    --primary: #B8878C;
    --primary-light: #c9a8a8;
    --primary-lighter: #e8d4d4;
    --primary-hover: #dcc3c6;
    --background: #FDF8F4;
    --cream: #f8f0f0;
    --text: #555;
    --text-muted: #6B6B6B;
    --white: #fff;
    --window-bg: var(--white);
    --accent: #B8878C;
    --grid-color: rgba(222, 184, 184, 0.08);
    --timer-color: #555;
    --scale: 1;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --timer-font: 'Inter', sans-serif;
    --timer-size: 56px;
    --border-color: var(--primary-light);
    --sync-fill: #f1f1ef;
}

:root[data-theme="dark"] {
    --background: #121212;
    --white: #1e1e1e;
    --cream: #252525;
    --text: #e3e3e2;
    --text-muted: #9b9a97;
    --primary-light: #37352f;
    --primary-lighter: #2f2f2f;
    --border-color: #2f2f2f;
    --sync-fill: #2a2a2a;
    color-scheme: dark;
}

:root[data-theme="light"] {
    --background: #FDF8F4;
    --white: #fff;
    --cream: #f8f0f0;
    --text: #555;
    --text-muted: #6B6B6B;
    --sync-fill: #f1f1ef;
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --background: #121212;
        --white: #1e1e1e;
        --cream: #252525;
        --text: #e3e3e2;
        --text-muted: #9b9a97;
        --primary-light: #37352f;
        --primary-lighter: #2f2f2f;
        --border-color: #2f2f2f;
        --sync-fill: #2a2a2a;
        color-scheme: dark;
    }
}

@font-face {
    font-family: 'Segment7';
    src: url('/assets/fonts/Segment7-4Gml.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Vaticanus';
    src: url('/assets/fonts/Vaticanus-G3yVG.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Minecraft';
    src: url('/assets/fonts/MinecraftRegular-Bmg3.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Undertale';
    src: url('/assets/fonts/HachicroUndertaleBattleFontRegular-L3zlg.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Classy-Pixels';
    src: url('/assets/fonts/ClassyPixels.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Imprima';
    src: url('/assets/fonts/Imprima-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Lora';
    src: url('/assets/fonts/Lora-Regular.ttf?v=2') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Lora';
    src: url('/assets/fonts/Lora-Bold.ttf?v=2') format('truetype');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'Lora';
    src: url('/assets/fonts/Lora-Italic.ttf?v=2') format('truetype');
    font-weight: normal;
    font-style: italic;
}

@font-face {
    font-family: 'Lora';
    src: url('/assets/fonts/Lora-BoldItalic.ttf?v=2') format('truetype');
    font-weight: bold;
    font-style: italic;
}

@font-face {
    font-family: '60s Stripe';
    src: url('/assets/fonts/60sSTRIPE.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Bright Lights';
    src: url('/assets/fonts/BrightLights.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Curvilingus';
    src: url('/assets/fonts/Curvilingus.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Fanzine';
    src: url('/assets/fonts/Fanzine.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'LT Glockenspiel';
    src: url('/assets/fonts/LT-Glockenspiel-Black.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: '3D Isometric';
    src: url('/assets/fonts/3DIsometric-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: '3D Isometric';
    src: url('/assets/fonts/3DIsometric-Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'Alpha Prota';
    src: url('/assets/fonts/AlphaProta-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Alpha Prota';
    src: url('/assets/fonts/AlphaProta-Italic.ttf') format('truetype');
    font-weight: normal;
    font-style: italic;
}

@font-face {
    font-family: 'Scarbes';
    src: url('/assets/fonts/Scarbes.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'McKloud';
    src: url('/assets/fonts/Mckloud-Black.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Pixtile';
    src: url('/assets/fonts/Pixtile-lx8xq.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Ringus';
    src: url('/assets/fonts/Ringus-lxLoV.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Ringus';
    src: url('/assets/fonts/RingusItalic-9Mm1B.ttf') format('truetype');
    font-weight: normal;
    font-style: italic;
}

@font-face {
    font-family: 'Monsieur La Doulaise';
    src: url('/assets/fonts/MonsieurLaDoulaiseRegular-O5YP.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Vergilia';
    src: url('/assets/fonts/Vergilia.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Afternoon';
    src: url('/assets/fonts/AfternoonRegular-Wy0DG.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'fs Karajan';
    src: url('/assets/fonts/FsKarajanRegular-Jpo0B.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}


@font-face {
    font-family: 'Gossip Med Cross Stitch';
    src: url('/assets/fonts/Gossip-MedCrossStitch.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Gossip High Cross Stitch';
    src: url('/assets/fonts/Gossip-HighCrossStitch.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}


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

html {
    background: transparent !important;
}

body {
    font-family: var(--font-family);
    background: transparent !important;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.y2k-window {
    width: 100%;
    background: var(--window-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    max-width: 320px;
    min-height: 210px;
    zoom: var(--scale);
}

.y2k-title-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 12px;
    border-bottom: 1px solid var(--border-color);
}

.y2k-title-bar-left {
    display: flex;
    align-items: center;
    gap: 6px;
}

.y2k-window-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
}

.y2k-title-text {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--accent);
}

.y2k-title-bar-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

.y2k-settings-btn {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-muted);
    transition: background-color 0.15s, color 0.15s;
    padding: 0;
}

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

.y2k-settings-btn svg {
    display: block;
    transition: transform 0.3s ease;
}

.y2k-settings-btn:hover svg {
    transform: rotate(45deg);
}

.timer-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 16px 18px;
    background-color: var(--window-bg);
    background-image: linear-gradient(var(--grid-color) 1px, transparent 1px),
                      linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 8px 8px;
    border-radius: 0 0 20px 20px;
}

.mode-tabs {
    display: flex;
    gap: 4px;
    background: var(--primary-lighter);
    border-radius: 14px;
    padding: 3px;
    margin-bottom: 12px;
}

.mode-tab {
    padding: 6px 12px;
    font-size: 9px;
    font-weight: 600;
    font-family: var(--font-family);
    background: transparent;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.mode-tab:hover {
    color: var(--text);
}

.mode-tab.active {
    background: var(--window-bg);
    color: var(--accent);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.timer-display {
    font-size: calc(var(--timer-size) * var(--timer-font-scale, 1));
    font-weight: var(--timer-font-weight, 700);
    font-family: var(--timer-font);
    color: var(--timer-color);
    letter-spacing: 2px;
    margin-bottom: 12px;
    font-variant-numeric: tabular-nums;
    text-shadow: var(--glow-spread, none);
}

.timer-btn {
    padding: 6px 24px;
    font-size: 10px;
    font-weight: 600;
    font-family: var(--font-family);
    background: var(--window-bg);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    cursor: pointer;
    color: var(--accent);
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.2s ease;
}

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

.timer-btn:active {
    transform: scale(0.97);
}

.timer-btn.running {
    background: var(--accent);
    color: var(--on-accent, var(--white));
    border-color: var(--accent);
}

.font-select {
    width: 100%;
    padding: 6px 26px 6px 10px;
    font-size: 10px;
    font-family: var(--font-family);
    background: var(--primary-lighter);
    border: none;
    border-radius: 999px;
    cursor: pointer;
    color: var(--text);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 1 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
}

.font-select:focus {
    outline: none;
}

.settings-panel.active {
    display: block;
}

.settings-content {
    padding: 12px;
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--primary-lighter);
}

.settings-header h3 {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.settings-close {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-muted);
    opacity: 0.5;
    transition: opacity 0.15s, background-color 0.15s;
}

.settings-close:hover {
    opacity: 1;
    background: var(--primary-hover);
}

.settings-section {
    margin-bottom: 12px;
}

.settings-section:last-child {
    margin-bottom: 0;
}

.settings-label,
.sync-section label,
.share-link-section label {
    font-size: 9px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 6px;
    display: block;
}

.number-input {
    width: 100%;
    padding: 7px 10px;
    font-size: 10px;
    font-family: var(--font-family);
    background: var(--primary-lighter);
    border: none;
    border-radius: 12px;
    color: var(--text);
    outline: none;
}

.number-input:focus {
    background: var(--white);
    box-shadow: 0 0 0 1px var(--primary);
}

.color-input-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

#accent-color,
#timer-color,
#glow-color,
#bg-color {
    width: 18px;
    height: 18px;
    border: 1px solid var(--primary-lighter);
    border-radius: 50%;
    cursor: pointer;
    -webkit-appearance: none;
    padding: 0;
}

#accent-color::-webkit-color-swatch-wrapper,
#timer-color::-webkit-color-swatch-wrapper,
#glow-color::-webkit-color-swatch-wrapper,
#bg-color::-webkit-color-swatch-wrapper {
    padding: 0;
}

#accent-color::-webkit-color-swatch,
#timer-color::-webkit-color-swatch,
#glow-color::-webkit-color-swatch,
#bg-color::-webkit-color-swatch {
    border: none;
    border-radius: 50%;
}

/* title bar swatch comes from kou-theme.css at 28px; every swatch stays even with its hex box */
.settings-panel #titlebar-color,
.settings-panel .titlebar-clear {
    width: 18px;
    height: 18px;
}

/* the clear x is just the x: no pad shape, full strength so it reads in light and dark */
.settings-panel .titlebar-clear {
    background: none;
    opacity: 1;
    margin-left: -6px;
}

/* a 10px x; its ink sits 8px from the hex box, the same gap as the swatch (nari, 10/02) */
.settings-panel .titlebar-clear svg {
    width: 10px;
    height: 10px;
}

.settings-panel .titlebar-clear:hover {
    color: var(--text);
}

.color-hex {
    width: 62px;
    height: 18px;
    font-size: 10px;
    font-family: inherit;
    color: var(--text);
    font-weight: 400;
    background: var(--primary-lighter);
    border: none;
    border-radius: 999px;
    padding: 3px 6px;
    text-align: center;
    outline: none;
    transition: background-color 0.15s ease;
}

.color-hex:focus {
    background: var(--primary-light);
}

.scale-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.scale-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 3px;
    background: var(--primary-lighter);
    border-radius: 2px;
    outline: none;
}

.scale-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: var(--accent);
    border-radius: 50%;
    cursor: pointer;
}

.scale-value {
    font-size: 10px;
    color: var(--text);
    min-width: 32px;
    text-align: right;
}

.settings-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 220px;
    max-width: calc(100% - 24px);
    max-height: 80vh;
    overflow: hidden;
    background: var(--white);
    border: 1px solid var(--primary);
    border-radius: 16px;
    display: none;
    z-index: 1000;
    box-sizing: border-box;
    box-shadow: none;
}

.settings-scroll-wrapper {
    max-height: calc(80vh - 2px);
    overflow-y: auto;
    overflow-x: hidden;
    border-radius: 15px;
}

.font-select option {
    background: var(--white);
    color: var(--text);
}

.settings-scroll-wrapper::-webkit-scrollbar {
    width: 4px;
}

.settings-scroll-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

.settings-scroll-wrapper::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 2px;
}

.settings-panel.active {
    display: block;
}

.settings-panel .window-style-btn.active {
    color: var(--on-accent, var(--white));
}

.settings-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    display: none;
    z-index: 999;
}

.settings-overlay.active {
    display: block;
}

.sync-section {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.sync-section label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

.sync-status-panel {
    background: var(--primary-lighter);
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 8px;
    border: 1px solid var(--primary-lighter);
}

.sync-status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    min-height: 24px;
}

.sync-status-row:not(:last-child) {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.sync-label {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 500;
    line-height: 1.3;
}

.sync-value {
    font-size: 10px;
    color: var(--text);
    font-weight: 500;
    line-height: 1.3;
    display: flex;
    align-items: center;
}

.sync-status-value {
    color: var(--text-muted);
}

.sync-check {
    font-size: 12px;
}

.sync-time-value {
    color: var(--text-muted);
    font-size: 10px;
}

.sync-code-row {
    flex-wrap: nowrap;
    gap: 6px;
}

.sync-code-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    background: var(--white);
    border-radius: 999px;
    border: 1px solid var(--primary-lighter);
    min-width: 0;
    gap: 6px;
    flex-shrink: 1;
    max-width: 100%;
    cursor: pointer;
    transition: all 0.15s ease;
}

.sync-code-pill:hover {
    background: var(--primary-hover);
}

.sync-code-pill:active {
    transform: scale(0.97);
}

.sync-code-value {
    font-family: 'Courier Prime', monospace;
    font-size: 10px;
    font-weight: 600;
    color: var(--primary);
    letter-spacing: 0.3px;
    margin-top: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.share-link-section {
    margin-top: 10px;
    padding-top: 10px;
    margin-bottom: 10px;
    border-top: 1px solid var(--primary-lighter);
}

.share-link-container {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--primary-lighter);
    border-radius: 999px;
    padding: 6px 6px 6px 10px;
}

.share-link-input {
    flex: 1;
    min-width: 0;
    padding: 4px 0;
    border: none;
    background: transparent;
    font-size: 9px;
    font-family: 'Inter', sans-serif;
    color: var(--text);
    outline: none;
    text-overflow: ellipsis;
    line-height: 1.4;
}

.share-copy-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    padding: 0;
    background: var(--primary);
    color: var(--on-accent, white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.share-copy-btn:hover {
    opacity: 0.85;
    transform: scale(1.05);
}

.share-copy-btn:active {
    transform: scale(0.95);
}

.share-copy-btn svg {
    flex-shrink: 0;
}

.sync-buttons-row {
    display: flex;
    flex-direction: row;
    gap: 6px;
    width: 100%;
}

.sync-buttons-row .sync-btn {
    flex: 1;
    min-width: 0;
    font-size: 9px;
    padding: 6px 10px;
}

.sync-error-panel {
    background: rgba(231, 76, 60, 0.1);
    border-radius: 999px;
    padding: 8px 12px;
    margin-bottom: 8px;
    border: 1px solid rgba(231, 76, 60, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
}

.sync-error-icon {
    font-size: 14px;
    color: #c0392b;
}

.sync-error-message {
    font-size: 10px;
    color: #c0392b;
    flex: 1;
}

.sync-controls {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.sync-btn {
    flex: 1;
    min-width: 60px;
    padding: 6px 10px;
    border: none;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s ease;
    background: var(--primary);
    color: var(--on-accent, white);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sync-btn:hover {
    opacity: 0.85;
    transform: scale(1.02);
}

.sync-btn:active {
    transform: scale(0.98);
}

.sync-btn.secondary {
    background: var(--sync-fill);
    color: var(--text);
}

.sync-btn.danger {
    background: rgba(231, 76, 60, 0.15);
    color: #c0392b;
}

.sync-btn.danger:hover {
    background: rgba(231, 76, 60, 0.25);
}

#sync-code-input {
    flex: 1;
    min-width: 60px;
    padding: 6px 10px;
    border: none;
    border-radius: 999px;
    font-size: 9px;
    font-family: inherit;
    background: var(--primary-lighter);
    transition: background-color 0.15s ease;
}

#sync-code-input:focus {
    outline: none;
    background: var(--primary-light);
}

.sync-hint {
    font-size: 9px;
    color: var(--text-muted);
    margin: 6px 0 0 0;
    text-align: center;
}

.intensity-options {
    display: flex;
    gap: 2px;
    background: var(--primary-lighter);
    border-radius: 10px;
    padding: 2px;
}

.intensity-btn {
    flex: 1;
    padding: 5px 8px;
    font-size: 9px;
    font-family: var(--font-family);
    font-weight: 500;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.intensity-btn:hover {
    color: var(--text);
}

.intensity-btn.active {
    background: var(--white);
    color: var(--text);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.sync-status-panel .unlink-btn {
    width: 100%;
    margin-top: 8px;
    font-size: 9px;
}

.timer-container.hide-grid {
    background-image: none !important;
}

.y2k-window.hide-border {
    border-color: transparent !important;
    background: transparent !important;
    box-shadow: none !important;
}

.y2k-window.hide-border .y2k-title-bar {
    background-color: transparent !important;
    border-bottom-color: transparent !important;
}

[data-titlebar="custom"] .y2k-window.hide-border .y2k-title-bar #settings-btn svg,
[data-titlebar="custom"] .y2k-window.hide-border .y2k-title-bar #settings-btn svg * {
    color: var(--primary, var(--border-color, #b8878c));
}

.y2k-window.hide-border .timer-container {
    background-color: transparent !important;
}

html.has-window-bg {
    --kou-titlebar-bg: var(--white);
}

html.has-window-bg .y2k-window.hide-border,
html.has-window-bg .y2k-window.hide-border .timer-container {
    background-color: var(--window-bg) !important;
}

.setting-toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.setting-toggle-row .settings-label {
    margin-bottom: 0;
}

.cute-toggle {
    position: relative;
    display: inline-block;
    width: 32px;
    height: 18px;
    flex-shrink: 0;
}

.cute-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--primary-lighter);
    transition: .2s ease;
    border-radius: 999px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 2px;
    bottom: 2px;
    background-color: var(--white);
    transition: .2s ease;
    border-radius: 50%;
}

.cute-toggle input:checked + .toggle-slider {
    background-color: var(--primary);
}

.cute-toggle input:checked + .toggle-slider:before {
    transform: translateX(14px);
}

[data-shape="square"] .mode-tabs,
[data-shape="square"] .mode-tab {
    border-radius: 0;
}

[data-shape="square"] .timer-container,
[data-shape="square"] .settings-scroll-wrapper {
    border-radius: 0;
}

.credits-section {
    border-top: 1px solid rgba(0,0,0,0.08);
    padding-top: 10px;
    margin-top: 4px;
}

.credits-line {
    font-size: 9px;
    line-height: 1.5;
    color: var(--text-muted);
    margin: 0 0 3px 0;
}

.credits-line:last-child {
    margin-bottom: 0;
}

.credits-box {
    max-height: 64px;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 8px 10px;
    background: var(--primary-lighter);
    border-radius: 10px;
}

.credits-box::-webkit-scrollbar {
    width: 4px;
}

.credits-box::-webkit-scrollbar-track {
    background: transparent;
}

.credits-box::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 2px;
}

[data-shape="square"] .credits-box {
    border-radius: 0;
}

.credits-line a {
    color: var(--text-muted);
    text-decoration: underline;
    white-space: nowrap;
}

[data-shape="square"] #sync-code-input {
    border-radius: 0;
}


/* the title stays put while the settings scroll, like kourie's. it sits outside
   the scroller now, in the same spot as before, and the scroller keeps its 4px
   gutter so the line under the title ends where the rows do. nari 2026-10-02. */
.settings-panel.active {
    display: flex;
    flex-direction: column;
}

.settings-panel > .settings-header {
    flex-shrink: 0;
    margin: 12px 16px 0 12px;
}

.settings-panel > .settings-scroll-wrapper {
    min-height: 0;
    scrollbar-gutter: stable;
}

/* the pill words (Curve / Square, Outline / Filled): the line is trimmed to the letters, then
   lifted so the middle point between the capital tops and the lowercase tops sits at the middle
   of the pill. it reads each font's own cap and x-heights, so it fits every widget font; same 25px
   pill. browsers without text-box or the cap unit keep a centered line. nari, 10/02 */
.settings-panel .window-style-btn {
    text-box: trim-both cap alphabetic;
    height: 25px;
    padding-top: 0;
    padding-bottom: 0;
    padding-bottom: calc((1cap - 1ex) / 2);
}

/* Imprima sits a hair high with the rule above, so it comes down a quarter pixel (nari's pick) */
@container style(--font-family: 'Imprima', sans-serif) {
    .settings-panel .window-style-btn {
        padding-bottom: calc((1cap - 1ex) / 2 - 0.5px);
    }
}
