:root {
    --bg-top: #0b1f29;
    --bg-bottom: #0f3947;
    --panel: rgba(12, 27, 35, 0.68);
    --panel-strong: rgba(9, 23, 30, 0.82);
    --panel-soft: rgba(255, 255, 255, 0.94);
    --panel-border: rgba(255, 255, 255, 0.16);
    --text: #eff9fc;
    --muted: #b7ced5;
    --ink: #183a47;
    --ink-soft: #56727d;
    --accent: #6dd6f0;
    --accent-strong: #ff9b7c;
    --user-color: #f6fbff;
    --shadow: 0 26px 70px rgba(0, 0, 0, 0.28);
    --radius: 30px;
    --theme-panel: rgba(9, 27, 35, 0.82);
    --theme-panel-light: rgba(255, 255, 255, 0.94);
    --theme-text: #eff9fc;
    --theme-ink: #183a47;
    --theme-muted: #b7ced5;
    --theme-accent: #6dd6f0;
    --theme-accent-strong: #ff9b7c;
    --theme-frame: rgba(255, 255, 255, 0.82);
    --theme-glass: rgba(255, 255, 255, 0.12);
    --theme-sand-top: #fff0a6;
    --theme-sand-bottom: #ffbf68;
    --theme-stage-filter: none;
    --control-bg: #f0f8ff;
    --control-bg-strong: #ffffff;
    --control-text: #004f62;
    --control-text-muted: #4d7680;
    --control-border: #80a7b1;
    --control-focus: #1f93b4;
    --control-focus-ring: rgba(31, 147, 180, 0.2);
    --control-accent: #ff6f61;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    color: var(--theme-text);
    font-family: "Inter", "Segoe UI", Calibri, sans-serif;
    background:
        radial-gradient(circle at top left, color-mix(in srgb, var(--theme-accent) 28%, transparent), transparent 24%),
        radial-gradient(circle at bottom right, color-mix(in srgb, var(--theme-accent-strong) 28%, transparent), transparent 26%),
        linear-gradient(
            160deg,
            color-mix(in srgb, var(--theme-panel) 88%, #06131a) 0%,
            color-mix(in srgb, var(--theme-accent) 16%, #12323f) 48%,
            color-mix(in srgb, var(--theme-panel) 72%, #0f3947) 100%
        );
    transition: background 180ms ease, color 180ms ease;
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

#clock-wrapper {
    width: min(100%, 1260px);
    margin: 0 auto;
    padding: 28px 18px 42px;
}

.clock-stage {
    position: relative;
    min-height: 860px;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--theme-frame) 18%, transparent);
    border-radius: var(--radius);
    background:
        radial-gradient(circle at top right, rgba(109, 214, 240, 0.14), transparent 22%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 30%),
        linear-gradient(180deg, rgba(7, 27, 36, 0.92), rgba(6, 22, 29, 0.96));
    box-shadow: var(--shadow);
    isolation: isolate;
    color: var(--theme-text);
    filter: var(--theme-stage-filter);
}

body.theme-daylight,
.clock-stage.theme-daylight {
    --theme-panel: rgba(246, 250, 250, 0.86);
    --theme-panel-light: rgba(255, 255, 255, 0.96);
    --theme-text: #14313a;
    --theme-ink: #14313a;
    --theme-muted: #59737c;
    --theme-accent: #178fb0;
    --theme-accent-strong: #e66f4d;
    --theme-frame: rgba(24, 75, 89, 0.72);
    --theme-glass: rgba(255, 255, 255, 0.36);
    --theme-sand-top: #ffe99a;
    --theme-sand-bottom: #f2a85b;
}

body.theme-chalkboard,
.clock-stage.theme-chalkboard {
    --theme-panel: rgba(12, 42, 36, 0.86);
    --theme-panel-light: rgba(228, 240, 229, 0.94);
    --theme-text: #eff7e8;
    --theme-ink: #18362e;
    --theme-muted: #bdd0bd;
    --theme-accent: #b8e3a0;
    --theme-accent-strong: #ffd27d;
    --theme-frame: rgba(232, 244, 224, 0.78);
    --theme-glass: rgba(232, 244, 224, 0.1);
    --theme-sand-top: #f7e7b0;
    --theme-sand-bottom: #c9a46c;
}

body.theme-sunset,
.clock-stage.theme-sunset {
    --theme-panel: rgba(42, 18, 29, 0.84);
    --theme-panel-light: rgba(255, 240, 230, 0.94);
    --theme-text: #fff5ec;
    --theme-ink: #492434;
    --theme-muted: #f1c9b8;
    --theme-accent: #ffb15f;
    --theme-accent-strong: #ff6b7d;
    --theme-frame: rgba(255, 218, 174, 0.82);
    --theme-glass: rgba(255, 220, 190, 0.13);
    --theme-sand-top: #ffd36d;
    --theme-sand-bottom: #ff7d5f;
}

body.theme-transparent,
.clock-stage.theme-transparent {
    --theme-panel: rgba(4, 12, 16, 0.42);
    --theme-panel-light: rgba(255, 255, 255, 0.18);
    --theme-text: #ffffff;
    --theme-ink: #ffffff;
    --theme-muted: rgba(255, 255, 255, 0.72);
    --theme-accent: #c7f6ff;
    --theme-accent-strong: #ffd0bf;
    --theme-frame: rgba(255, 255, 255, 0.62);
    --theme-glass: rgba(255, 255, 255, 0.16);
    --theme-sand-top: #fff5b8;
    --theme-sand-bottom: #ffc36b;
}

body.theme-forest,
.clock-stage.theme-forest {
    --theme-panel: rgba(14, 40, 29, 0.84);
    --theme-panel-light: rgba(235, 247, 230, 0.94);
    --theme-text: #f0f8e8;
    --theme-ink: #173626;
    --theme-muted: #b5d0ad;
    --theme-accent: #8fd17d;
    --theme-accent-strong: #e6c35b;
    --theme-frame: rgba(213, 235, 193, 0.78);
    --theme-glass: rgba(213, 235, 193, 0.12);
    --theme-sand-top: #f1d97a;
    --theme-sand-bottom: #c7a84f;
}

body.theme-berry,
.clock-stage.theme-berry {
    --theme-panel: rgba(47, 19, 50, 0.84);
    --theme-panel-light: rgba(255, 235, 250, 0.94);
    --theme-text: #fff1fb;
    --theme-ink: #4b1f4f;
    --theme-muted: #ecc2e6;
    --theme-accent: #f17ac6;
    --theme-accent-strong: #8ee7ff;
    --theme-frame: rgba(255, 210, 242, 0.78);
    --theme-glass: rgba(255, 210, 242, 0.13);
    --theme-sand-top: #ffd2ef;
    --theme-sand-bottom: #d66db6;
}

body.theme-mono,
.clock-stage.theme-mono {
    --theme-panel: rgba(18, 18, 18, 0.84);
    --theme-panel-light: rgba(245, 245, 245, 0.95);
    --theme-text: #f6f6f6;
    --theme-ink: #111111;
    --theme-muted: #c7c7c7;
    --theme-accent: #ffffff;
    --theme-accent-strong: #9a9a9a;
    --theme-frame: rgba(255, 255, 255, 0.82);
    --theme-glass: rgba(255, 255, 255, 0.12);
    --theme-sand-top: #f0f0f0;
    --theme-sand-bottom: #a8a8a8;
}

body.theme-ocean,
.clock-stage.theme-ocean {
    --theme-panel: rgba(6, 34, 55, 0.84);
    --theme-panel-light: rgba(226, 247, 255, 0.94);
    --theme-text: #edfaff;
    --theme-ink: #10384e;
    --theme-muted: #acd5e6;
    --theme-accent: #4fd1ff;
    --theme-accent-strong: #76f0ca;
    --theme-frame: rgba(196, 239, 255, 0.78);
    --theme-glass: rgba(196, 239, 255, 0.13);
    --theme-sand-top: #c7f7ff;
    --theme-sand-bottom: #63d6ed;
}

body.theme-candy,
.clock-stage.theme-candy {
    --theme-panel: rgba(45, 30, 55, 0.82);
    --theme-panel-light: rgba(255, 244, 252, 0.95);
    --theme-text: #fff7fd;
    --theme-ink: #3f274c;
    --theme-muted: #f2c7e4;
    --theme-accent: #ff89c2;
    --theme-accent-strong: #8be9ff;
    --theme-frame: rgba(255, 225, 246, 0.82);
    --theme-glass: rgba(255, 225, 246, 0.16);
    --theme-sand-top: #fff0a8;
    --theme-sand-bottom: #ff9ed8;
}

body.theme-glacier,
.clock-stage.theme-glacier {
    --theme-panel: rgba(208, 231, 234, 0.82);
    --theme-panel-light: rgba(255, 255, 255, 0.98);
    --theme-text: #0d5266;
    --theme-ink: #004f62;
    --theme-muted: #5d8793;
    --theme-accent: #1f93b4;
    --theme-accent-strong: #8fc9da;
    --theme-frame: rgba(0, 79, 98, 0.3);
    --theme-glass: rgba(255, 255, 255, 0.46);
    --theme-sand-top: #fffafa;
    --theme-sand-bottom: #d1eef4;
}

body.theme-citrus,
.clock-stage.theme-citrus {
    --theme-panel: rgba(232, 245, 233, 0.86);
    --theme-panel-light: rgba(255, 253, 231, 0.97);
    --theme-text: #215926;
    --theme-ink: #2e7d32;
    --theme-muted: #6e8f52;
    --theme-accent: #ffeb3b;
    --theme-accent-strong: #e67e22;
    --theme-frame: rgba(46, 125, 50, 0.32);
    --theme-glass: rgba(255, 255, 255, 0.3);
    --theme-sand-top: #fff9c4;
    --theme-sand-bottom: #a5d6a7;
}

body.theme-ember,
.clock-stage.theme-ember {
    --theme-panel: rgba(68, 33, 27, 0.84);
    --theme-panel-light: rgba(255, 243, 232, 0.96);
    --theme-text: #fff3e8;
    --theme-ink: #6a2d25;
    --theme-muted: #f0bc9f;
    --theme-accent: #ff6f61;
    --theme-accent-strong: #e67e22;
    --theme-frame: rgba(255, 204, 128, 0.56);
    --theme-glass: rgba(255, 194, 185, 0.14);
    --theme-sand-top: #ffcc80;
    --theme-sand-bottom: #ff6f61;
}

body.theme-midnight,
.clock-stage.theme-midnight {
    --theme-panel: rgba(0, 79, 98, 0.84);
    --theme-panel-light: rgba(240, 248, 255, 0.96);
    --theme-text: #eefcff;
    --theme-ink: #004f62;
    --theme-muted: #8fc9da;
    --theme-accent: #1f93b4;
    --theme-accent-strong: #ff6f61;
    --theme-frame: rgba(143, 201, 218, 0.52);
    --theme-glass: rgba(255, 255, 255, 0.14);
    --theme-sand-top: #fff9c4;
    --theme-sand-bottom: #ff6f61;
}

body.theme-terracotta,
.clock-stage.theme-terracotta {
    --theme-panel: rgba(255, 241, 238, 0.86);
    --theme-panel-light: rgba(255, 250, 240, 0.98);
    --theme-text: #7b3d31;
    --theme-ink: #8f452f;
    --theme-muted: #b87b68;
    --theme-accent: #ff6f61;
    --theme-accent-strong: #e67e22;
    --theme-frame: rgba(230, 126, 34, 0.3);
    --theme-glass: rgba(255, 194, 185, 0.26);
    --theme-sand-top: #fff3e8;
    --theme-sand-bottom: #ffcc80;
}

body.theme-obsidian,
.clock-stage.theme-obsidian {
    --theme-panel: rgba(16, 21, 24, 0.86);
    --theme-panel-light: rgba(242, 245, 246, 0.95);
    --theme-text: #f3f7f8;
    --theme-ink: #11181b;
    --theme-muted: #aebcc1;
    --theme-accent: #8fc9da;
    --theme-accent-strong: #ff6f61;
    --theme-frame: rgba(220, 220, 220, 0.5);
    --theme-glass: rgba(255, 255, 255, 0.1);
    --theme-sand-top: #f5f5f5;
    --theme-sand-bottom: #80a7b1;
}

body.theme-aurora,
.clock-stage.theme-aurora {
    --theme-panel: rgba(5, 38, 47, 0.86);
    --theme-panel-light: rgba(240, 248, 255, 0.95);
    --theme-text: #eefcff;
    --theme-ink: #063744;
    --theme-muted: #9fd7d3;
    --theme-accent: #1f93b4;
    --theme-accent-strong: #a5d6a7;
    --theme-frame: rgba(143, 201, 218, 0.52);
    --theme-glass: rgba(255, 255, 255, 0.12);
    --theme-sand-top: #fff9c4;
    --theme-sand-bottom: #8fc9da;
}

body.theme-plum,
.clock-stage.theme-plum {
    --theme-panel: rgba(38, 21, 43, 0.86);
    --theme-panel-light: rgba(255, 245, 252, 0.95);
    --theme-text: #fff3fb;
    --theme-ink: #3b1f42;
    --theme-muted: #d7b7d6;
    --theme-accent: #ffc2b9;
    --theme-accent-strong: #ff6f61;
    --theme-frame: rgba(255, 194, 185, 0.44);
    --theme-glass: rgba(255, 255, 255, 0.12);
    --theme-sand-top: #fffafa;
    --theme-sand-bottom: #ffc2b9;
}

body.theme-forge,
.clock-stage.theme-forge {
    --theme-panel: rgba(54, 33, 16, 0.88);
    --theme-panel-light: rgba(255, 243, 232, 0.95);
    --theme-text: #fff5ec;
    --theme-ink: #5b3415;
    --theme-muted: #e0b186;
    --theme-accent: #e67e22;
    --theme-accent-strong: #ffeb3b;
    --theme-frame: rgba(255, 204, 128, 0.5);
    --theme-glass: rgba(255, 255, 255, 0.1);
    --theme-sand-top: #ffcc80;
    --theme-sand-bottom: #e67e22;
}

.stage-background,
.stage-shade {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.stage-background {
    background:
        radial-gradient(circle at 28% 18%, rgba(255, 255, 255, 0.9), transparent 24%),
        linear-gradient(150deg, rgba(242, 249, 252, 0.96), rgba(219, 238, 244, 0.9));
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    transform: scale(1.02);
    will-change: opacity;
}

.stage-background-overlay {
    opacity: 0;
    transition: opacity 3200ms ease-in-out;
}

.stage-background-overlay.is-visible {
    opacity: 1;
}

.stage-shade {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.12)),
        radial-gradient(circle at center, transparent 40%, rgba(173, 204, 214, 0.12) 100%);
}

.stage-toolbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 3;
    padding: 14px 16px 0;
    pointer-events: none;
}

.stage-toolbar-shell {
    display: inline-flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    width: min(1120px, 100%);
    pointer-events: auto;
}

.stage-toolbar-bar,
.stage-toolbar-panel {
    border: 1px solid color-mix(in srgb, var(--theme-frame) 24%, transparent);
    background: color-mix(in srgb, var(--theme-panel) 20%, transparent);
    backdrop-filter: blur(18px);
    box-shadow: 0 18px 40px rgba(7, 21, 28, 0.18);
}

.stage-toolbar-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 999px;
    border-color: transparent;
    background: transparent;
    backdrop-filter: none;
    box-shadow: none;
}

.stage-toolbar-leading {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 10px;
}

.stage-toolbar-bar-main {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    flex-wrap: wrap;
}

.stage-toolbar-panel {
    padding: 14px;
    border-radius: 30px;
}

.stage-toolbar.menu-collapsed .stage-toolbar-panel {
    display: none;
}

.menu-toggle-button {
    flex: 0 0 auto;
    min-width: 0;
    padding-inline: 14px;
    font-size: 0.95rem;
    line-height: 1;
    white-space: nowrap;
}

.stage-toolbar-main {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
}

.stage-toolbar-row {
    display: flex;
    flex: 1 0 100%;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
}

.stage-toolbar-main > * {
    min-width: 0;
}

.toolbar-layout-only {
    display: none;
}

.stage-toolbar.layout-mode-active .toolbar-layout-only {
    display: inline-flex;
}

.toolbar-layout-quick-config {
    display: none;
}

.stage-toolbar.layout-mode-active .toolbar-layout-quick-config {
    display: inline-flex;
}

.stage-status {
    display: flex;
    flex: 1 1 280px;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.mode-badge,
.asset-status {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 6px 11px;
    border-radius: 999px;
    backdrop-filter: blur(18px);
}

.mode-badge {
    display: none;
}

.asset-status {
    display: none;
}

.stage-actions,
.button-row,
.time-presets,
.stack-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.toolbar-select-wrap {
    display: inline-flex;
    flex: 1 1 240px;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 6px 10px;
    border: 1px solid var(--control-border);
    border-radius: 999px;
    background: var(--control-bg);
    color: var(--control-text);
}

.toolbar-tool-picker {
    display: inline-flex;
    flex: 1 1 320px;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.toolbar-tool-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.toolbar-tool-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 6px 10px;
    border: 1px solid var(--control-border);
    border-radius: 999px;
    background: var(--control-bg);
    color: var(--control-text);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
}

.toolbar-tool-chip input {
    width: auto;
    min-height: 0;
    margin: 0;
}

.toolbar-color-picker {
    display: inline-flex;
    flex: 1 1 220px;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

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

.toolbar-color-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid color-mix(in srgb, var(--theme-frame) 18%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--theme-panel-light) 80%, white);
    transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.toolbar-color-chip.active {
    border-color: var(--theme-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-accent) 18%, transparent);
}

.toolbar-select-wrap-compact {
    max-width: 320px;
}

.toolbar-select-label {
    color: var(--control-text-muted);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.toolbar-select {
    min-width: 150px;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--control-text);
    font-size: 0.9rem;
    font-weight: 700;
    box-shadow: none;
    color-scheme: light;
}

.toolbar-select:focus {
    box-shadow: none;
}

.toolbar-select option {
    background: var(--control-bg-strong);
    color: var(--control-text);
}

.toolbar-config-row,
.toolbar-save-row {
    display: inline-flex;
    flex: 1 1 360px;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.toolbar-config-row-featured {
    padding: 6px;
    border: 1px solid color-mix(in srgb, var(--theme-accent) 40%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--theme-panel-light) 22%, transparent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-accent) 12%, transparent);
}

.toolbar-input-wrap {
    display: inline-flex;
    flex: 1 1 260px;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 6px 10px;
    border: 1px solid var(--control-border);
    border-radius: 999px;
    background: var(--control-bg);
}

.toolbar-input {
    min-width: 170px;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    outline: none;
    background: transparent;
    color: var(--control-text);
    box-shadow: none;
}

.toolbar-input::placeholder {
    color: var(--control-text-muted);
}

.toolbar-note {
    flex: 1 0 100%;
    color: color-mix(in srgb, var(--theme-text) 74%, transparent);
    font-size: 0.78rem;
    line-height: 1.35;
}

.toolbar-config-note {
    font-weight: 600;
}

.toolbar-button,
.preset-button,
.ghost-button,
.primary-button {
    min-height: 34px;
    padding: 7px 13px;
    border: 1px solid color-mix(in srgb, var(--theme-frame) 18%, transparent);
    border-radius: 999px;
    font-size: 0.84rem;
    font-weight: 700;
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.toolbar-button:hover,
.preset-button:hover,
.ghost-button:hover,
.primary-button:hover,
.palette-option:hover,
.asset-thumb:hover {
    transform: translateY(-1px);
}

.primary-button {
    background: var(--theme-panel-light);
    color: var(--theme-ink);
}

.ghost-button,
.preset-button,
.toolbar-button.ghost-button {
    background: color-mix(in srgb, var(--theme-panel) 72%, transparent);
    color: var(--theme-text);
}

.preset-button.active,
.palette-option.active {
    border-color: color-mix(in srgb, var(--theme-accent) 72%, transparent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-accent) 20%, transparent);
}

.stage-surface {
    position: relative;
    z-index: 2;
    min-height: 790px;
}

.stage-window {
    position: absolute;
    z-index: 2;
}

.window-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(7, 21, 28, 0.72);
    color: rgba(255, 255, 255, 0.92);
    font-size: 1.1rem;
    line-height: 1;
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
    transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.clock-stage:not(.layout-active) .window-close {
    display: none;
}

.window-close:hover {
    transform: translateY(-1px);
    background: rgba(255, 155, 124, 0.9);
    border-color: rgba(255, 155, 124, 0.98);
}

.clock-stage.layout-active .window-close {
    top: 42px;
}

.stage-window[hidden] {
    display: none;
}

.window-handle {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-bottom: 0;
    border-radius: 18px 18px 0 0;
    background: rgba(8, 22, 29, 0.8);
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: grab;
    user-select: none;
    touch-action: none;
    backdrop-filter: blur(14px);
}

.window-handle-analog {
    flex-wrap: wrap;
    align-items: center;
    row-gap: 10px;
}

.window-handle-time {
    flex-wrap: wrap;
    align-items: center;
    row-gap: 10px;
}

.window-handle-message {
    flex-wrap: wrap;
    align-items: center;
    row-gap: 10px;
}

.window-handle-analog .window-title,
.window-handle-analog .window-meta,
.window-handle-time .window-title,
.window-handle-time .window-meta,
.window-handle-message .window-title,
.window-handle-message .window-meta {
    order: 1;
}

.window-handle-analog .window-handle-actions,
.window-handle-time .window-handle-actions,
.window-handle-message .window-handle-actions {
    order: 3;
    width: 100%;
    margin-left: 0;
    flex-wrap: wrap;
}

.window-handle-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.window-handle-button {
    min-width: 28px;
    min-height: 28px;
    padding: 5px 10px;
    border: 1px solid color-mix(in srgb, var(--theme-frame) 24%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--theme-panel-light) 16%, transparent);
    color: rgba(255, 255, 255, 0.94);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
}

.window-handle-select {
    min-height: 28px;
    padding: 5px 28px 5px 10px;
    border: 1px solid color-mix(in srgb, var(--theme-frame) 24%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--theme-panel-light) 16%, transparent);
    color: rgba(255, 255, 255, 0.96);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    box-shadow: none;
    cursor: pointer;
    color-scheme: dark;
}

.window-handle-select option {
    color: #112831;
}

.window-handle-select:disabled {
    opacity: 0.46;
    cursor: default;
}

.analog-handle-select {
    min-width: 132px;
    flex: 1 1 auto;
}

.analog-dial-style-select {
    min-width: 122px;
    flex: 1 1 auto;
}

.time-effect-select {
    min-width: 120px;
    flex: 1 1 auto;
}

.message-effect-select {
    min-width: 120px;
    flex: 1 1 auto;
}

.window-font-button {
    padding-inline: 0;
    font-size: 0.9rem;
    line-height: 1;
}

.window-handle-button.active {
    background: color-mix(in srgb, var(--theme-accent) 24%, transparent);
    border-color: color-mix(in srgb, var(--theme-accent) 52%, transparent);
    color: #ffffff;
}

.window-handle-button:disabled {
    opacity: 0.4;
    cursor: default;
}

.clock-stage.layout-active .window-handle {
    display: flex;
}

.clock-stage.layout-active .stage-window {
    z-index: 4;
    touch-action: none;
    outline: 1px dashed color-mix(in srgb, var(--theme-accent) 58%, transparent);
    outline-offset: 6px;
    border-radius: 24px;
}

.clock-stage.layout-active .stage-window::before,
.clock-stage.layout-active .stage-window::after {
    content: "";
    position: absolute;
    z-index: 8;
    pointer-events: auto;
}

.clock-stage.layout-active .stage-window::before {
    top: 30px;
    right: -10px;
    bottom: -10px;
    width: 22px;
    cursor: ew-resize;
}

.clock-stage.layout-active .stage-window::after {
    right: -10px;
    bottom: -10px;
    width: 34px;
    height: 34px;
    border-right: 3px solid rgba(109, 214, 240, 0.72);
    border-bottom: 3px solid rgba(109, 214, 240, 0.72);
    border-radius: 0 0 12px 0;
    cursor: nwse-resize;
}

.clock-stage.layout-active .window-body {
    border-style: solid;
}

.stage-window.dragging {
    z-index: 7;
}

.stage-window.resizing {
    z-index: 8;
}

.stage-window.dragging .window-handle {
    cursor: grabbing;
}

.stage-window.touch-hold-dragging {
    cursor: grabbing;
}

.window-title {
    color: rgba(255, 255, 255, 0.92);
}

.window-meta {
    color: rgba(109, 214, 240, 0.9);
    font-size: 0.7rem;
}

.window-body {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 22px;
    backdrop-filter: blur(18px);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
}

.stage-window.window-transparent .window-body {
    background: color-mix(in srgb, var(--theme-panel) 22%, transparent) !important;
    border-color: color-mix(in srgb, var(--theme-frame) 32%, transparent) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

.stage-window.window-transparent.window-no-blur .window-body {
    background: transparent !important;
    border-color: transparent !important;
    backdrop-filter: none;
    box-shadow: none;
}

.stage-window.window-transparent .deadline-panel {
    background: color-mix(in srgb, var(--theme-panel-light) 10%, transparent) !important;
}

.stage-window.window-transparent.window-no-blur .deadline-panel {
    background: transparent !important;
}

.stage-window.window-transparent .progress-track {
    background: color-mix(in srgb, var(--theme-frame) 16%, transparent) !important;
}

.stage-window.window-transparent.window-no-blur .progress-track {
    background: transparent !important;
}

.clock-stage:not(.layout-active) .window-body {
    border-color: rgba(255, 255, 255, 0.08);
    background: var(--theme-panel);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.16);
}

.clock-stage.layout-active .window-handle + .window-body {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.summary-kicker,
.label {
    margin: 0 0 6px;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.deadline-body,
.time-body,
.message-body,
.logo-body {
    padding: 22px;
    background: linear-gradient(180deg, var(--theme-panel-light), rgba(232, 242, 245, 0.9));
    color: var(--theme-ink);
}

.deadline-body {
    display: grid;
    gap: 14px;
}

.deadline-big-value {
    color: var(--user-color);
    font-size: clamp(calc(1.6rem * var(--deadline-font-scale, 1)), calc(2.6vw * var(--deadline-font-scale, 1)), calc(2.6rem * var(--deadline-font-scale, 1)));
    line-height: 1.04;
    font-weight: 800;
}

.deadline-time-row {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: fit-content;
}

.deadline-layout-presets {
    display: none;
    flex-wrap: wrap;
    gap: 8px;
}

.clock-stage.layout-active .deadline-layout-presets {
    display: flex;
}

.deadline-layout-preset {
    min-height: 30px;
    padding: 6px 10px;
}

.deadline-time-display {
    display: inline-block;
}

.deadline-time-input {
    width: 5.6ch;
    min-width: 5.6ch;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--user-color);
    font: inherit;
    line-height: inherit;
    box-shadow: none;
    cursor: text;
    color-scheme: light;
    opacity: 1;
}

.deadline-time-input:focus {
    outline: 2px solid rgba(109, 214, 240, 0.72);
    outline-offset: 8px;
    border-radius: 10px;
}

.deadline-time-suffix {
    color: color-mix(in srgb, var(--user-color) 78%, transparent);
    font-size: clamp(calc(1.1rem * var(--deadline-font-scale, 1)), calc(1.7vw * var(--deadline-font-scale, 1)), calc(1.4rem * var(--deadline-font-scale, 1)));
    font-weight: 700;
}

.deadline-time-input::-webkit-calendar-picker-indicator {
    opacity: 0.88;
    cursor: pointer;
}

.deadline-time-input::-webkit-datetime-edit,
.deadline-time-input::-webkit-datetime-edit-fields-wrapper,
.deadline-time-input::-webkit-datetime-edit-hour-field,
.deadline-time-input::-webkit-datetime-edit-minute-field,
.deadline-time-input::-webkit-datetime-edit-text {
    color: var(--user-color);
    padding: 0;
}

.clock-stage.layout-active .deadline-time-row {
    padding: 8px 12px;
    border: 2px solid var(--control-border);
    border-radius: 14px;
    background: var(--control-bg-strong);
    box-shadow: 0 8px 18px rgba(15, 81, 100, 0.12);
}

.clock-stage.layout-active .deadline-time-display {
    display: none;
}

.clock-stage.layout-active .deadline-time-input {
    color: var(--user-color);
}

.clock-stage.layout-active .deadline-time-input::-webkit-datetime-edit,
.clock-stage.layout-active .deadline-time-input::-webkit-datetime-edit-fields-wrapper,
.clock-stage.layout-active .deadline-time-input::-webkit-datetime-edit-hour-field,
.clock-stage.layout-active .deadline-time-input::-webkit-datetime-edit-minute-field,
.clock-stage.layout-active .deadline-time-input::-webkit-datetime-edit-text {
    color: var(--user-color);
}

.clock-stage.layout-active .deadline-time-input::-webkit-calendar-picker-indicator {
    opacity: 1;
    filter: contrast(1.35) saturate(0.9);
}

.clock-stage:not(.layout-active) .deadline-time-input {
    display: none;
}

.clock-stage:not(.layout-active) .deadline-time-input::-webkit-calendar-picker-indicator {
    display: none;
}

.countdown-value {
    font-size: clamp(calc(1.45rem * var(--deadline-font-scale, 1)), calc(2vw * var(--deadline-font-scale, 1)), calc(2rem * var(--deadline-font-scale, 1)));
}

.deadline-panel {
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(15, 81, 100, 0.08);
}

.deadline-panel.alert {
    background: rgba(109, 214, 240, 0.16);
}

.deadline-panel.overdue {
    background: rgba(255, 155, 124, 0.18);
}

.chip-label {
    display: block;
    margin-bottom: 5px;
    color: #6a8892;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.countdown-progress {
    margin-top: 14px;
}

.progress-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    color: #4e6a74;
    font-size: calc(0.88rem * var(--deadline-font-scale, 1));
    font-weight: 700;
}

.progress-track {
    overflow: hidden;
    width: 100%;
    height: 12px;
    border-radius: 999px;
    background: rgba(15, 81, 100, 0.12);
}

.progress-fill {
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--theme-accent) 0%, var(--theme-accent-strong) 100%);
    transition: width 360ms ease;
}

.deadline-panel.overdue .progress-fill {
    background: linear-gradient(90deg, #ff9b7c 0%, #ffc7ae 100%);
}

.time-body {
    text-align: center;
    min-height: var(--window-height, auto);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#c-time-big {
    display: inline-flex;
    align-items: flex-start;
    gap: 0.24em;
    margin-bottom: 10px;
    color: var(--user-color);
    text-shadow: 0 12px 20px rgba(15, 81, 100, 0.12);
    transition: text-shadow 180ms ease, filter 180ms ease;
}

#c-time-big-main {
    font-size: clamp(calc(3rem * var(--time-font-scale, 1)), calc(var(--window-height, 190px) * 0.34 * var(--time-font-scale, 1)), calc(9rem * var(--time-font-scale, 1)));
    line-height: 0.95;
    font-weight: 800;
    letter-spacing: 0.03em;
}

#c-time-big-seconds {
    padding-top: 0.5em;
    color: color-mix(in srgb, var(--user-color) 88%, white 12%);
    font-size: clamp(calc(1.05rem * var(--time-font-scale, 1)), calc(var(--window-height, 190px) * 0.1 * var(--time-font-scale, 1)), calc(2.8rem * var(--time-font-scale, 1)));
    font-weight: 800;
    letter-spacing: 0.08em;
    transition: opacity 180ms ease, max-width 180ms ease, margin 180ms ease;
}

#c-date-big {
    color: color-mix(in srgb, var(--user-color) 76%, transparent);
    font-size: clamp(calc(1rem * var(--time-font-scale, 1)), calc(var(--window-height, 190px) * 0.07 * var(--time-font-scale, 1)), calc(2rem * var(--time-font-scale, 1)));
    font-weight: 700;
}

.stage-window[data-window="time"].hide-seconds #c-time-big-seconds {
    opacity: 0;
    max-width: 0;
    margin-left: -0.18em;
    overflow: hidden;
}

.stage-window[data-window="time"].time-effect-plain #c-time-big {
    text-shadow: 0 12px 20px rgba(15, 81, 100, 0.12);
    filter: none;
}

.stage-window[data-window="time"].time-effect-glow #c-time-big {
    text-shadow:
        0 0 10px color-mix(in srgb, var(--user-color) 72%, white),
        0 0 22px color-mix(in srgb, var(--user-color) 44%, white),
        0 12px 24px rgba(15, 81, 100, 0.18);
}

.stage-window[data-window="time"].time-effect-outline #c-time-big-main,
.stage-window[data-window="time"].time-effect-outline #c-time-big-seconds {
    color: transparent;
    -webkit-text-stroke: 1.6px var(--user-color);
    text-shadow: 0 6px 18px rgba(7, 21, 28, 0.24);
}

.stage-window[data-window="time"].time-effect-neon #c-time-big {
    text-shadow:
        0 0 8px color-mix(in srgb, var(--user-color) 88%, white),
        0 0 20px color-mix(in srgb, var(--user-color) 72%, white),
        0 0 38px color-mix(in srgb, var(--user-color) 48%, white);
    filter: saturate(1.18);
}

.stage-window[data-window="time"].time-effect-shadow #c-time-big-main,
.stage-window[data-window="time"].time-effect-shadow #c-time-big-seconds {
    text-shadow:
        0.06em 0.06em 0 rgba(6, 19, 26, 0.42),
        0.12em 0.12em 0 rgba(6, 19, 26, 0.18),
        0 10px 24px rgba(7, 21, 28, 0.2);
}

.analog-body,
.hourglass-body {
    padding: 26px 22px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 22px;
    background: rgba(9, 26, 33, 0.72);
    display: flex;
    justify-content: center;
    align-items: center;
}

.analog-body {
    min-height: 180px;
}

.analog-clock-mini,
.analog-clock-big {
    position: relative;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.98), rgba(209, 238, 244, 0.9));
    flex-shrink: 0;
}

.analog-dial {
    position: absolute;
    inset: 0;
    display: none;
    pointer-events: none;
}

.analog-minute-mark {
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 6.4%;
    border-radius: 999px;
    background: rgba(12, 43, 54, 0.58);
    transform:
        translate(-50%, -50%)
        rotate(var(--mark-rotation));
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.analog-hour-number {
    position: absolute;
    top: 50%;
    left: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.9em;
    height: 1.9em;
    color: #0d2d39;
    font-size: clamp(0.78rem, calc(var(--analog-clock-size, 320px) * 0.07), 1.45rem);
    font-weight: 800;
    line-height: 1;
    transform:
        translate(-50%, -50%);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.9);
}

.analog-clock-big.analog-style-transparent {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.08);
    box-shadow:
        inset 0 0 30px rgba(255, 255, 255, 0.18),
        0 18px 34px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(3px);
}

.analog-clock-big.analog-style-transparent::before {
    border-color: rgba(255, 255, 255, 0.36);
}

.analog-clock-big.analog-style-transparent .hand.hour,
.analog-clock-big.analog-style-transparent .hand.minute {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(233, 244, 248, 0.88));
    box-shadow: 0 0 0 1px rgba(9, 26, 33, 0.08);
}

.analog-clock-big.analog-style-transparent .center-dot {
    border-color: rgba(255, 255, 255, 0.88);
}

.analog-clock-big.analog-style-transparent .analog-dial {
    display: block;
}

.analog-clock-big.analog-style-transparent .analog-hour-number {
    color: rgba(255, 255, 255, 0.96);
    text-shadow: 0 1px 10px rgba(9, 26, 33, 0.4);
}

.analog-clock-big.analog-style-transparent .analog-minute-mark {
    background: rgba(255, 255, 255, 0.56);
    box-shadow: 0 0 0 1px rgba(9, 26, 33, 0.06);
}

.analog-clock-big.analog-style-chalk {
    border-color: rgba(232, 244, 224, 0.5);
    background:
        radial-gradient(circle at 38% 30%, rgba(255, 255, 255, 0.08), transparent 32%),
        #143831;
    box-shadow:
        inset 0 0 18px rgba(255, 255, 255, 0.08),
        0 18px 28px rgba(0, 0, 0, 0.2);
}

.analog-clock-big.analog-style-chalk::before {
    border-color: rgba(232, 244, 224, 0.32);
}

.analog-clock-big.analog-style-chalk .hand.hour,
.analog-clock-big.analog-style-chalk .hand.minute {
    background: linear-gradient(180deg, #f6fbf1, #dbe8d1);
}

.analog-clock-big.analog-style-minimal {
    border-color: rgba(24, 58, 71, 0.18);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 16px 26px rgba(0, 0, 0, 0.14);
}

.analog-clock-big.analog-style-minimal::before {
    inset: 15%;
    border-style: solid;
    border-color: rgba(15, 81, 100, 0.12);
}

.analog-clock-big.analog-style-readable {
    border-color: rgba(15, 81, 100, 0.42);
    background:
        radial-gradient(circle at center, rgba(255, 255, 255, 0.98) 0 56%, rgba(235, 246, 249, 0.98) 56% 100%);
    box-shadow:
        inset 0 0 0 8px rgba(255, 255, 255, 0.85),
        inset 0 0 0 14px rgba(15, 81, 100, 0.12),
        0 18px 30px rgba(0, 0, 0, 0.16);
}

.analog-clock-big.analog-style-readable::before {
    inset: 8%;
    border-style: solid;
    border-width: 2px;
    border-color: rgba(15, 81, 100, 0.22);
}

.analog-clock-big.analog-style-readable .analog-dial,
.analog-clock-big.analog-style-transparent .analog-dial {
    display: block;
}

.analog-clock-big.analog-style-readable.analog-dial-style-none .analog-dial,
.analog-clock-big.analog-style-transparent.analog-dial-style-none .analog-dial {
    display: none;
}

.analog-clock-big.analog-style-readable.analog-dial-style-balanced .analog-hour-number,
.analog-clock-big.analog-style-transparent.analog-dial-style-balanced .analog-hour-number {
    font-size: clamp(0.78rem, calc(var(--analog-clock-size, 320px) * 0.07), 1.45rem);
}

.analog-clock-big.analog-style-readable.analog-dial-style-balanced .analog-minute-mark,
.analog-clock-big.analog-style-transparent.analog-dial-style-balanced .analog-minute-mark {
    width: 2px;
    height: 5.8%;
}

.analog-clock-big.analog-style-readable.analog-dial-style-school .analog-hour-number,
.analog-clock-big.analog-style-transparent.analog-dial-style-school .analog-hour-number {
    width: 2.05em;
    height: 2.05em;
    font-size: clamp(0.9rem, calc(var(--analog-clock-size, 320px) * 0.08), 1.65rem);
    font-weight: 900;
}

.analog-clock-big.analog-style-readable.analog-dial-style-school .analog-minute-mark,
.analog-clock-big.analog-style-transparent.analog-dial-style-school .analog-minute-mark {
    width: 3px;
    height: 6.2%;
}

.analog-clock-big.analog-style-readable.analog-dial-style-school .analog-minute-mark.is-quarter,
.analog-clock-big.analog-style-transparent.analog-dial-style-school .analog-minute-mark.is-quarter {
    width: 4px;
    height: 7.8%;
}

.analog-clock-big.analog-style-readable.analog-dial-style-ring .analog-hour-number,
.analog-clock-big.analog-style-transparent.analog-dial-style-ring .analog-hour-number {
    width: 1.75em;
    height: 1.75em;
    font-size: clamp(0.72rem, calc(var(--analog-clock-size, 320px) * 0.055), 1.25rem);
    color: #244a57;
}

.analog-clock-big.analog-style-readable.analog-dial-style-ring .analog-dial::before,
.analog-clock-big.analog-style-transparent.analog-dial-style-ring .analog-dial::before {
    content: "";
    position: absolute;
    inset: 14%;
    border: 2px solid rgba(15, 81, 100, 0.12);
    border-radius: 50%;
}

.analog-clock-big.analog-style-readable.analog-dial-style-ring .analog-minute-mark,
.analog-clock-big.analog-style-transparent.analog-dial-style-ring .analog-minute-mark {
    width: 2px;
    height: 5.2%;
}

.analog-clock-big.analog-style-readable.analog-dial-style-ring .analog-minute-mark.is-quarter,
.analog-clock-big.analog-style-transparent.analog-dial-style-ring .analog-minute-mark.is-quarter {
    width: 3px;
    height: 6.8%;
}

.analog-clock-big.analog-style-readable.analog-dial-style-quarters .analog-hour-number,
.analog-clock-big.analog-style-transparent.analog-dial-style-quarters .analog-hour-number {
    width: 1.85em;
    height: 1.85em;
    font-size: clamp(0.86rem, calc(var(--analog-clock-size, 320px) * 0.072), 1.5rem);
}

.analog-clock-big.analog-style-readable.analog-dial-style-quarters .analog-hour-number:not([data-hour="12"]):not([data-hour="3"]):not([data-hour="6"]):not([data-hour="9"]),
.analog-clock-big.analog-style-transparent.analog-dial-style-quarters .analog-hour-number:not([data-hour="12"]):not([data-hour="3"]):not([data-hour="6"]):not([data-hour="9"]) {
    display: none;
}

.analog-clock-big.analog-style-readable.analog-dial-style-quarters .analog-minute-mark,
.analog-clock-big.analog-style-transparent.analog-dial-style-quarters .analog-minute-mark {
    width: 2px;
    height: 5.8%;
    opacity: 0.46;
}

.analog-clock-big.analog-style-readable.analog-dial-style-quarters .analog-minute-mark.is-quarter,
.analog-clock-big.analog-style-transparent.analog-dial-style-quarters .analog-minute-mark.is-quarter {
    width: 4px;
    height: 7.8%;
    opacity: 0.82;
}

.analog-clock-big.analog-style-transparent.analog-dial-style-ring .analog-hour-number {
    color: rgba(255, 255, 255, 0.78);
}

.analog-clock-big.analog-style-transparent.analog-dial-style-ring .analog-dial::before {
    border-color: rgba(255, 255, 255, 0.18);
}

.analog-clock-big.analog-style-readable .hand.hour {
    width: 10px;
    height: 28%;
    background: linear-gradient(180deg, #224d5b, #153e4b);
}

.analog-clock-big.analog-style-readable .hand.minute {
    width: 6px;
    height: 39%;
    background: linear-gradient(180deg, #1892ab, #0f7f95);
}

.analog-clock-big.analog-style-readable .hand.second {
    width: 2px;
    height: 42%;
    background: linear-gradient(180deg, #ff7860, #e7583e);
}

.analog-clock-big.analog-style-readable .center-dot {
    width: 14px;
    height: 14px;
    border-color: rgba(255, 255, 255, 0.96);
    background: #153e4b;
}

.analog-clock-mini {
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.72);
}

.analog-clock-big {
    width: min(100%, 68vw);
    aspect-ratio: 1;
    border: 5px solid rgba(109, 214, 240, 0.35);
    box-shadow:
        inset 0 0 24px rgba(255, 255, 255, 0.45),
        0 18px 28px rgba(0, 0, 0, 0.18);
}

.analog-clock-mini::before,
.analog-clock-big::before {
    content: "";
    position: absolute;
    inset: 10%;
    border: 1px dashed rgba(15, 81, 100, 0.16);
    border-radius: 50%;
}

.hand {
    position: absolute;
    left: 50%;
    bottom: 50%;
    transform: translateX(-50%) rotate(0deg);
    transform-origin: bottom center;
    border-radius: 999px;
}

.hand.hour {
    width: 8px;
    height: 28%;
    background: linear-gradient(180deg, color-mix(in srgb, var(--theme-ink) 90%, white), var(--theme-ink));
    box-shadow: 0 1px 4px rgba(8, 22, 29, 0.14);
}

.hand.minute {
    width: 6px;
    height: 39%;
    background: linear-gradient(180deg, color-mix(in srgb, var(--theme-accent) 88%, white), var(--theme-accent));
    box-shadow: 0 1px 4px rgba(8, 22, 29, 0.12);
}

.hand.second {
    width: 2px;
    height: 44%;
    background: linear-gradient(180deg, color-mix(in srgb, var(--theme-accent-strong) 78%, white), var(--theme-accent-strong));
    box-shadow: 0 1px 3px rgba(8, 22, 29, 0.1);
}

.analog-clock-mini .hand.hour {
    width: 3px;
    height: 26%;
}

.analog-clock-mini .hand.minute {
    width: 2px;
    height: 35%;
}

.analog-clock-mini .hand.second {
    width: 1px;
    height: 40%;
}

.center-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    background: var(--theme-accent-strong);
    transform: translate(-50%, -50%);
}

.hourglass-body {
    flex-direction: column;
    gap: 16px;
    min-height: 260px;
    color: var(--theme-text);
}

.hourglass {
    position: relative;
    width: min(190px, 100%);
    aspect-ratio: 0.66;
    filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.2));
    transform-origin: center center;
}

.hourglass.is-running {
    animation: hourglass-breathe 2400ms ease-in-out infinite;
}

.hourglass-cap,
.hourglass-post,
.hourglass::before,
.hourglass::after {
    content: "";
    position: absolute;
    background: var(--theme-frame);
}

.hourglass-cap {
    left: 6%;
    right: 6%;
    height: 12px;
    border-radius: 999px;
    box-shadow: inset 0 -3px 7px rgba(0, 0, 0, 0.16);
}

.hourglass-cap-top {
    top: 0;
}

.hourglass-cap-bottom {
    bottom: 0;
}

.hourglass-post {
    top: 7px;
    bottom: 7px;
    width: 8px;
    border-radius: 999px;
    opacity: 0.78;
}

.hourglass-post-left {
    left: 12%;
}

.hourglass-post-right {
    right: 12%;
}

.hourglass::before,
.hourglass::after {
    left: 49%;
    width: 2%;
    height: 38%;
    border-radius: 999px;
    opacity: 0.28;
    transform-origin: center bottom;
}

.hourglass::before {
    top: 9%;
    transform: rotate(25deg);
}

.hourglass::after {
    bottom: 9%;
    transform: rotate(-25deg);
}

.hourglass-chamber {
    position: absolute;
    left: 18%;
    width: 64%;
    height: 45%;
    overflow: hidden;
    border: 3px solid var(--theme-frame);
    background:
        linear-gradient(110deg, rgba(255, 255, 255, 0.26), transparent 28%),
        var(--theme-glass);
    box-shadow:
        inset 0 0 24px rgba(255, 255, 255, 0.1),
        inset 0 -18px 24px rgba(0, 0, 0, 0.06);
}

.hourglass-top {
    top: 10px;
    clip-path: polygon(4% 0, 96% 0, 56% 100%, 44% 100%);
}

.hourglass-bottom {
    bottom: 10px;
    clip-path: polygon(44% 0, 56% 0, 96% 100%, 4% 100%);
}

.hourglass-glass-shine {
    position: absolute;
    top: 10%;
    bottom: 10%;
    left: 22%;
    width: 12%;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.5), transparent);
    opacity: 0.6;
    z-index: 3;
}

.hourglass.is-running .hourglass-glass-shine {
    animation: glass-shimmer 3200ms ease-in-out infinite;
}

.hourglass-neck {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 4;
    width: 18px;
    height: 18px;
    border: 3px solid var(--theme-frame);
    background: rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    transform: translate(-50%, -50%);
}

.hourglass-stream {
    position: absolute;
    top: 48%;
    left: 50%;
    z-index: 5;
    width: 2px;
    height: 26%;
    background: transparent;
    border-radius: 999px;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 220ms ease;
}

.hourglass.is-running .hourglass-stream {
    animation: none;
}

.hourglass-stream-particles {
    position: absolute;
    top: 48%;
    left: 50%;
    z-index: 6;
    width: 34px;
    height: 42%;
    transform: translateX(-50%);
    pointer-events: none;
    overflow: visible;
}

.hourglass-bottom-grains {
    position: absolute;
    inset: 0;
    z-index: 4;
    pointer-events: none;
    overflow: hidden;
}

.hourglass-particle {
    position: absolute;
    display: block;
    border-radius: 50%;
    background:
        radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.74), transparent 42%),
        linear-gradient(180deg, var(--theme-sand-top), var(--theme-sand-bottom));
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.06),
        0 1px 2px rgba(44, 26, 5, 0.22);
    opacity: 0;
    will-change: transform, opacity;
}

.hourglass-particle-stream {
    left: 50%;
    top: 0;
}

.hourglass-particle-pile {
    z-index: 4;
    transform-origin: center bottom;
}

.hourglass-sand {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 50%;
    background:
        radial-gradient(circle at 50% 4px, rgba(255, 255, 255, 0.52), transparent 14px),
        linear-gradient(180deg, var(--theme-sand-top), var(--theme-sand-bottom));
    transition: height 360ms ease, clip-path 360ms ease;
}

.hourglass.is-running .hourglass-sand-bottom {
    animation: sand-settle 1800ms ease-in-out infinite;
}

.hourglass-sand-top {
    height: 100%;
}

.hourglass-sand-bottom {
    height: 0%;
    clip-path: polygon(4% 100%, 96% 100%, 84% 90%, 67% 88%, 50% 88%, 33% 88%, 16% 90%);
    opacity: 0.92;
}

.hourglass-caption {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    color: var(--theme-text);
    font-weight: 800;
    font-size: calc(1rem * var(--hourglass-font-scale, 1));
}

@keyframes hourglass-breathe {
    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-2px) scale(1.012);
    }
}

@keyframes glass-shimmer {
    0%,
    100% {
        opacity: 0.42;
        transform: translateX(0);
    }

    45% {
        opacity: 0.78;
        transform: translateX(8px);
    }
}

@keyframes sand-stream {
    0% {
        background-position: 0 0;
        transform: translateX(-50%) scaleY(0.92);
    }

    50% {
        transform: translateX(-50%) scaleY(1.08);
    }

    100% {
        background-position: 0 24px;
        transform: translateX(-50%) scaleY(0.92);
    }
}

@keyframes falling-grain {
    0% {
        opacity: 0;
        transform: translate(-50%, -2px) scale(0.8);
    }

    20% {
        opacity: 0.95;
    }

    100% {
        opacity: 0;
        transform: translate(calc(-50% + 7px), 54px) scale(0.55);
    }
}

@keyframes sand-settle {
    0%,
    100% {
        filter: brightness(1);
    }

    50% {
        filter: brightness(1.12);
    }
}

@media (prefers-reduced-motion: reduce) {
    .hourglass,
    .hourglass *,
    .hourglass::before,
    .hourglass::after {
        animation: none !important;
    }
}

.message-body {
    background:
        radial-gradient(circle at top right, color-mix(in srgb, var(--theme-accent) 26%, transparent), transparent 28%),
        linear-gradient(180deg, rgba(10, 25, 33, 0.84), rgba(7, 20, 27, 0.9));
    color: var(--theme-text);
}

.clock-stage:not(.layout-active) .deadline-body,
.clock-stage:not(.layout-active) .time-body,
.clock-stage:not(.layout-active) .message-body {
    background: var(--theme-panel);
    color: var(--theme-text);
}

.clock-stage.layout-active .deadline-body,
.clock-stage.layout-active .time-body,
.clock-stage.layout-active .message-body {
    background: var(--theme-panel);
    color: var(--theme-text);
}

.clock-stage:not(.layout-active) .stage-window[data-window="analog"] .window-body,
.clock-stage:not(.layout-active) .analog-body,
.clock-stage:not(.layout-active) .stage-window[data-window="hourglass"] .window-body,
.clock-stage:not(.layout-active) .hourglass-body {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
    backdrop-filter: none;
}

.clock-stage.layout-active .stage-window[data-window="analog"] .window-body,
.clock-stage.layout-active .analog-body,
.clock-stage.layout-active .stage-window[data-window="hourglass"] .window-body,
.clock-stage.layout-active .hourglass-body,
.clock-stage.layout-active .stage-window[data-window="logo"] .window-body {
    background: transparent;
    box-shadow: none;
}

.clock-stage:not(.layout-active) .stage-window[data-window="logo"] .window-body {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
    backdrop-filter: none;
}

.clock-stage:not(.layout-active) .label,
.clock-stage:not(.layout-active) .chip-label,
.clock-stage:not(.layout-active) .progress-meta,
.clock-stage:not(.layout-active) #c-date-big,
.clock-stage:not(.layout-active) .message-copy {
    color: color-mix(in srgb, var(--user-color) 76%, transparent);
}

.clock-stage.layout-active .label,
.clock-stage.layout-active .chip-label,
.clock-stage.layout-active .progress-meta,
.clock-stage.layout-active #c-date-big,
.clock-stage.layout-active .message-copy {
    color: color-mix(in srgb, var(--user-color) 76%, transparent);
}

.clock-stage:not(.layout-active) .deadline-big-value,
.clock-stage:not(.layout-active) #c-time-big,
.clock-stage:not(.layout-active) .message-title {
    color: var(--user-color);
    text-shadow: none;
}

.clock-stage.layout-active .deadline-big-value,
.clock-stage.layout-active #c-time-big,
.clock-stage.layout-active .message-title {
    color: var(--user-color);
    text-shadow: none;
}

.clock-stage.layout-active .deadline-time-input.deadline-big-value {
    color: var(--control-text);
}

.clock-stage:not(.layout-active) .deadline-time-suffix {
    color: color-mix(in srgb, var(--user-color) 86%, transparent);
}

.clock-stage.layout-active .deadline-time-suffix {
    color: color-mix(in srgb, var(--user-color) 78%, transparent);
}

.clock-stage:not(.layout-active) .deadline-panel {
    background: rgba(255, 255, 255, 0.06);
}

.clock-stage.layout-active .deadline-panel {
    background: rgba(255, 255, 255, 0.06);
}

.clock-stage:not(.layout-active) .progress-track {
    background: rgba(255, 255, 255, 0.12);
}

.clock-stage.layout-active .progress-track {
    background: rgba(255, 255, 255, 0.12);
}

.message-title {
    margin: 0 0 14px;
    color: var(--user-color);
    font-size: clamp(2rem, 5vw, 4.5rem);
    line-height: 1.02;
    font-weight: 900;
    text-wrap: balance;
    transition: text-shadow 180ms ease, filter 180ms ease, color 180ms ease;
}

.message-title[contenteditable="true"] {
    cursor: text;
}

.message-title[contenteditable="true"]:focus {
    outline: 2px solid rgba(109, 214, 240, 0.72);
    outline-offset: 8px;
    border-radius: 10px;
}

.message-title[contenteditable="true"]:empty::before {
    content: attr(data-placeholder);
    color: rgba(239, 249, 252, 0.42);
}

.message-copy {
    margin: 0;
    max-width: 34ch;
    color: color-mix(in srgb, var(--user-color) 88%, white 12%);
    font-size: clamp(1.18rem, 2.2vw, 1.7rem);
    line-height: 1.55;
    white-space: pre-wrap;
    transition: text-shadow 180ms ease, filter 180ms ease, color 180ms ease;
}

.stage-window[data-window="message"].message-effect-plain .message-title,
.stage-window[data-window="message"].message-effect-plain .message-copy {
    text-shadow: none;
    filter: none;
}

.stage-window[data-window="message"].message-effect-glow .message-title,
.stage-window[data-window="message"].message-effect-glow .message-copy {
    text-shadow:
        0 0 10px color-mix(in srgb, var(--user-color) 70%, white),
        0 0 24px color-mix(in srgb, var(--user-color) 34%, white);
}

.stage-window[data-window="message"].message-effect-outline .message-title,
.stage-window[data-window="message"].message-effect-outline .message-copy {
    color: transparent;
    -webkit-text-stroke: 1.2px var(--user-color);
    text-shadow: 0 6px 16px rgba(7, 21, 28, 0.22);
}

.stage-window[data-window="message"].message-effect-outline .message-copy {
    -webkit-text-stroke-width: 0.8px;
}

.stage-window[data-window="message"].message-effect-neon .message-title,
.stage-window[data-window="message"].message-effect-neon .message-copy {
    text-shadow:
        0 0 8px color-mix(in srgb, var(--user-color) 90%, white),
        0 0 18px color-mix(in srgb, var(--user-color) 70%, white),
        0 0 34px color-mix(in srgb, var(--user-color) 44%, white);
    filter: saturate(1.16);
}

.stage-window[data-window="message"].message-effect-shadow .message-title,
.stage-window[data-window="message"].message-effect-shadow .message-copy {
    text-shadow:
        0.05em 0.05em 0 rgba(6, 19, 26, 0.38),
        0.11em 0.11em 0 rgba(6, 19, 26, 0.16),
        0 10px 24px rgba(7, 21, 28, 0.18);
}

.message-copy[contenteditable="true"] {
    cursor: text;
}

.message-copy[contenteditable="true"]:focus {
    outline: 2px solid rgba(109, 214, 240, 0.58);
    outline-offset: 8px;
    border-radius: 10px;
}

.message-copy[contenteditable="true"]:empty::before {
    content: attr(data-placeholder);
    color: rgba(239, 249, 252, 0.42);
}

.logo-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 0;
    padding: 14px;
}

#logo-image {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
}

#logo-preview {
    display: block;
    max-width: 100%;
    max-height: 240px;
    object-fit: contain;
}

.clock-stage:not(.layout-active) #logo-image {
    filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.18));
}

.layout-hint {
    position: absolute;
    right: 20px;
    bottom: 18px;
    z-index: 5;
    max-width: min(420px, calc(100% - 40px));
    padding: 12px 16px;
    border: 1px solid rgba(109, 214, 240, 0.22);
    border-radius: 18px;
    background: rgba(8, 25, 31, 0.82);
    color: rgba(239, 249, 252, 0.92);
    font-size: 0.92rem;
    line-height: 1.45;
    backdrop-filter: blur(16px);
}

.editor-modal {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: none;
    align-items: stretch;
    justify-content: flex-end;
    padding: 12px;
    background: color-mix(in srgb, var(--theme-panel) 34%, transparent);
    backdrop-filter: blur(2px);
}

.editor-modal.open {
    display: flex;
}

.editor-panel {
    width: min(360px, calc(100vw - 24px));
    max-height: calc(100vh - 24px);
    overflow: auto;
    overflow-x: hidden;
    border: 1px solid color-mix(in srgb, var(--theme-frame) 18%, transparent);
    border-radius: 28px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--theme-panel-light) 94%, white), color-mix(in srgb, var(--theme-panel-light) 82%, white));
    color: var(--theme-ink);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
}

.editor-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding: 18px 18px 14px;
    border-bottom: 1px solid color-mix(in srgb, var(--theme-frame) 18%, transparent);
}

.editor-title {
    margin: 0;
    color: var(--theme-accent);
    font-size: clamp(1.22rem, 2vw, 1.7rem);
}

.editor-subtitle {
    margin: 6px 0 0;
    color: var(--theme-muted);
    line-height: 1.45;
}

.editor-close {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: color-mix(in srgb, var(--theme-accent) 10%, transparent);
    color: var(--theme-accent);
    font-size: 1.3rem;
    line-height: 1;
}

.editor-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 16px 16px 18px;
}

.control-card {
    min-width: 0;
    padding: 16px;
    border: 1px solid color-mix(in srgb, var(--theme-frame) 18%, transparent);
    border-radius: 22px;
    background: color-mix(in srgb, var(--theme-panel-light) 92%, white);
    box-shadow: 0 16px 34px rgba(15, 81, 100, 0.08);
}

.control-card-wide {
    grid-column: auto;
}

.control-card h2 {
    margin: 0 0 8px;
    color: var(--theme-accent);
    font-size: 1.08rem;
}

.control-card p {
    margin: 0 0 14px;
    color: var(--theme-muted);
    line-height: 1.45;
}

.field-label {
    display: block;
    margin: 16px 0 10px;
    color: var(--theme-accent);
    font-size: 0.95rem;
    font-weight: 700;
}

input[type="text"],
input[type="time"],
textarea,
select {
    width: 100%;
    min-height: 48px;
    padding: 14px 16px;
    border: 1px solid var(--control-border);
    border-radius: 16px;
    outline: none;
    color: var(--control-text);
    background: var(--control-bg-strong);
    transition: border-color 160ms ease, box-shadow 160ms ease;
    color-scheme: light;
}

textarea {
    resize: vertical;
}

input[type="text"]:focus,
input[type="time"]:focus,
textarea:focus,
select:focus {
    border-color: var(--control-focus);
    box-shadow: 0 0 0 4px var(--control-focus-ring);
}

select option {
    background: var(--control-bg-strong);
    color: var(--control-text);
}

.deadline-time-input,
.deadline-time-input:focus {
    width: auto;
    min-width: 0;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--theme-accent);
    box-shadow: none;
}

.inline-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 10px 14px;
    border: 1px solid color-mix(in srgb, var(--theme-frame) 18%, transparent);
    border-radius: 16px;
    background: color-mix(in srgb, var(--theme-accent) 6%, white);
    color: var(--theme-accent);
    font-weight: 700;
}

.inline-toggle input {
    width: auto;
    min-height: 0;
    margin: 0;
}

.slider-group {
    margin-top: 18px;
}

.slider-info {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 8px;
    color: var(--theme-accent);
    font-size: 0.95rem;
    font-weight: 700;
}

input[type="range"] {
    width: 100%;
    accent-color: var(--theme-accent);
}

.palette-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.palette-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 54px;
    padding: 10px 12px;
    border: 1px solid color-mix(in srgb, var(--theme-frame) 18%, transparent);
    border-radius: 16px;
    background: color-mix(in srgb, var(--theme-panel-light) 90%, white);
    color: var(--theme-ink);
    text-align: left;
    transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.swatch {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(0, 0, 0, 0.08);
    border-radius: 50%;
    flex-shrink: 0;
}

.time-input-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
}

.constellation-save-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: stretch;
}

.constellation-save-row input {
    min-width: 0;
}

.constellation-delete-button {
    width: 100%;
    margin-top: 10px;
}

.selection-note {
    margin-top: 12px;
    color: var(--theme-muted);
    font-size: 0.93rem;
    line-height: 1.45;
}

.asset-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
    max-height: 300px;
    overflow: auto;
    padding-right: 4px;
}

.asset-thumb {
    position: relative;
    overflow: hidden;
    min-height: 110px;
    padding: 0;
    border: 1px solid color-mix(in srgb, var(--theme-frame) 18%, transparent);
    border-radius: 18px;
    background: color-mix(in srgb, var(--theme-panel-light) 80%, white);
    transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.asset-thumb.active {
    border-color: var(--theme-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-accent) 18%, transparent);
}

.asset-thumb-image {
    position: absolute;
    inset: 0;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.asset-thumb-label {
    position: absolute;
    right: 8px;
    bottom: 8px;
    left: 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 9px;
    border-radius: 12px;
    background: rgba(9, 23, 30, 0.72);
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.25;
    text-align: left;
}

.asset-thumb-meta {
    color: rgba(255, 255, 255, 0.74);
    font-size: 0.68rem;
    font-weight: 600;
}

.logo-preview-card {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 160px;
    margin-top: 14px;
    padding: 18px;
    border: 1px solid rgba(15, 81, 100, 0.1);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.82);
}

.background-preview-card {
    overflow: hidden;
    min-height: 0;
    padding: 0;
    aspect-ratio: 1260 / 860;
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    border: 1px solid rgba(15, 81, 100, 0.12);
    box-shadow: 0 18px 36px rgba(15, 81, 100, 0.12);
}

.background-preview-surface {
    width: 100%;
    height: 100%;
    background:
        linear-gradient(150deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.16)),
        radial-gradient(circle at 28% 18%, rgba(242, 249, 252, 0.96), rgba(219, 238, 244, 0.9));
    background-repeat: no-repeat;
    background-size: cover, cover;
    background-position: center, center;
    transform: scale(1.02);
    transform-origin: center center;
}

.window-toggle-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

@media (max-width: 980px) {
    .editor-grid {
        grid-template-columns: 1fr;
    }

    .control-card-wide {
        grid-column: auto;
    }

    .background-preview-card {
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 720px) {
    #clock-wrapper {
        padding-inline: 12px;
    }

    .clock-stage {
        min-height: 1440px;
        border-radius: 24px;
    }

    .stage-toolbar {
        padding-inline: 10px;
    }

    .stage-toolbar-shell,
    .stage-toolbar-bar,
    .stage-toolbar-bar-main,
    .stage-toolbar-panel,
    .stage-toolbar-main {
        width: 100%;
    }

    .stage-toolbar-bar {
        align-items: flex-start;
        border-radius: 26px;
    }

    .stage-toolbar-leading {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .stage-toolbar-bar-main,
    .stage-toolbar-main,
    .stage-actions {
        align-items: stretch;
    }

    .stage-actions {
        width: 100%;
        flex-direction: column;
    }

    .stage-toolbar.menu-collapsed {
        align-items: flex-start;
    }

    .toolbar-button,
    .toolbar-tool-picker,
    .toolbar-select-wrap,
    .toolbar-config-row,
    .toolbar-save-row,
    .toolbar-input-wrap {
        width: 100%;
    }

    .stage-toolbar.layout-mode-active .toolbar-layout-only {
        display: flex;
    }

    .stage-toolbar.layout-mode-active .toolbar-layout-quick-config {
        display: flex;
    }

    .toolbar-config-row,
    .toolbar-save-row {
        align-items: stretch;
    }

    .menu-toggle-button {
        width: auto;
    }

    .toolbar-select,
    .toolbar-input {
        min-width: 0;
        width: 100%;
    }

    .stage-surface {
        min-height: 1360px;
    }

    .editor-panel {
        border-radius: 24px;
    }

    .editor-head,
    .editor-grid {
        padding-inline: 18px;
    }

    .palette-grid,
    .asset-grid,
    .window-toggle-grid {
        grid-template-columns: 1fr 1fr;
    }

    .time-input-row {
        flex-direction: column;
        align-items: stretch;
    }

    .constellation-save-row {
        grid-template-columns: 1fr;
    }
}
