body.cas-page {
    overflow-x: hidden;
}

body.cas-lock {
    overflow: hidden;
}

.cas-page-main {
    min-width: 0;
}

.cas-panel {
    background: #fff;
    border: 1px solid #f1f5f9;
    border-radius: 1.5rem;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.06);
    padding: 1.1rem 1.1rem 1.25rem;
}

.cas-now-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 1.25rem;
}

.cas-toolbar-analog {
    width: 5.5rem;
    height: 5.5rem;
    flex: 0 0 auto;
}

.cas-toolbar-analog svg,
.cas-analog svg {
    width: 100%;
    height: auto;
    display: block;
}

.cas-kicker {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #b8962e;
}

.cas-now {
    margin: 0.1rem 0 0;
    font-family: Outfit, system-ui, sans-serif;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.04em;
    line-height: 1;
    font-size: clamp(2.4rem, 8vw, 3.6rem);
    color: #0f172a;
}

.cas-date {
    margin: 0.35rem 0 0;
    color: #64748b;
    font-size: 0.95rem;
}

.cas-date::first-letter,
.cas-fs-sub::first-letter {
    text-transform: uppercase;
}

.cas-now-actions,
.cas-add-row,
.cas-chips,
.cas-actions,
.cas-fs-actions,
.cas-dialog-foot {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.cas-chips[hidden] {
    display: none;
}

.cas-now-actions {
    margin-left: auto;
}

.cas-add-row {
    margin-top: 1rem;
}

.cas-block {
    margin-top: 1.1rem;
}

.cas-label,
.cas-board-title {
    margin: 0 0 0.55rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #94a3b8;
}

.cas-board-title {
    margin: 1.4rem 0 0.7rem;
}

.cas-note,
.cas-help {
    margin: 0.65rem 0 0;
    color: #64748b;
    font-size: 0.875rem;
    line-height: 1.45;
}

.cas-note a {
    color: #b8962e;
    font-weight: 700;
}

.cas-btn,
.cas-chip,
.cas-chip-go,
.cas-mode,
.cas-icon-btn,
.cas-fs-close {
    min-height: 44px;
    border-radius: 0.9rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #334155;
    font-weight: 650;
    font-weight: 600;
    font-size: 0.92rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.4rem 0.85rem;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.cas-btn:hover,
.cas-chip:hover,
.cas-chip-go:hover,
.cas-mode:hover,
.cas-icon-btn:hover,
.cas-fs-close:hover {
    border-color: rgba(212, 175, 55, 0.7);
}

.cas-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.cas-btn-primary {
    border: 0;
    color: #fff;
    background: linear-gradient(90deg, #d4af37, #b8962e);
    box-shadow: 0 8px 18px rgba(184, 150, 46, 0.22);
}

.cas-btn-primary:hover {
    border: 0;
    box-shadow: 0 10px 22px rgba(184, 150, 46, 0.3);
}

.cas-btn-ghost {
    background: transparent;
    border-color: transparent;
    color: #64748b;
}

.cas-btn-danger {
    color: #e11d48;
    border-color: #ffe4e6;
    background: #fff;
}

.cas-btn-block {
    width: 100%;
}

.cas-chip {
    padding: 0;
    overflow: hidden;
}

.cas-chip-go {
    border: 0;
    border-radius: 0;
    background: transparent;
    min-height: 44px;
}

.cas-chip-side {
    width: 44px;
    min-width: 44px;
    min-height: 44px;
    border: 0;
    border-left: 1px solid #e2e8f0;
    background: transparent;
    color: #64748b;
    cursor: pointer;
}

.cas-chip-side:hover {
    color: #b8962e;
}

.cas-chip-side.is-danger:hover {
    color: #e11d48;
}

.cas-chip small {
    display: block;
    font-weight: 500;
    color: #94a3b8;
    font-size: 0.75rem;
}

.cas-suggest {
    min-height: 44px;
}

.cas-empty {
    margin: 0;
    color: #64748b;
}

.cas-board {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    min-width: 0;
}

.cas-card {
    min-width: 0;
    background: #fff;
    border: 1px solid #f1f5f9;
    border-radius: 1.5rem;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
    padding: 1rem;
}

.cas-card.is-urgent {
    border-color: #fecdd3;
}

.cas-card.is-done {
    border-color: #fb7185;
    animation: cas-pulse 1.15s ease-in-out infinite;
}

.cas-card-head {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.cas-badge {
    width: 44px;
    height: 44px;
    border-radius: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    background: #fff7e6;
    color: #b8962e;
}

.cas-card.is-stopwatch .cas-badge {
    background: #e0f2fe;
    color: #0369a1;
}

.cas-card.is-clock .cas-badge {
    background: #f8fafc;
    color: #0f172a;
}

.cas-card-titles {
    min-width: 0;
    flex: 1;
}

.cas-kind {
    display: block;
    color: #94a3b8;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.cas-name {
    display: block;
    width: 100%;
    min-width: 0;
    margin-top: 0.1rem;
    border: 0;
    border-bottom: 1px solid transparent;
    background: transparent;
    color: #0f172a;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    padding: 0.15rem 0;
    min-height: 44px;
}

.cas-name:focus {
    outline: none;
    border-bottom-color: #d4af37;
}

.cas-face {
    position: relative;
    display: grid;
    place-items: center;
    margin: 0.35rem 0 0.8rem;
    min-height: 11.5rem;
}

.cas-analog {
    width: min(100%, 13.5rem);
}

.cas-ringwrap {
    position: relative;
    width: min(100%, 16rem);
    aspect-ratio: 1;
}

.cas-progress {
    width: 100%;
    height: auto;
    display: block;
}

.cas-progress-bg,
.cas-progress-fg,
.cas-dial-track,
.cas-dial-arc {
    fill: none;
}

.cas-progress-bg {
    stroke: #f1f5f9;
    stroke-width: 8;
}

.cas-progress-fg {
    stroke: #d4af37;
    stroke-width: 8;
    stroke-linecap: round;
}

.cas-card.is-urgent .cas-progress-fg,
.cas-card.is-done .cas-progress-fg,
.cas-fs.is-urgent .cas-progress-fg,
.cas-fs.is-done .cas-progress-fg {
    stroke: #e11d48;
}

.cas-ring-center {
    position: absolute;
    inset: 18%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-width: 0;
}

.cas-digits,
.cas-fs-digits {
    margin: 0;
    font-family: Outfit, system-ui, sans-serif;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.045em;
    line-height: 0.95;
    color: #0f172a;
}

.cas-digits {
    font-size: clamp(2.1rem, 6vw, 3.4rem);
}

.cas-digits.is-long {
    font-size: clamp(1.15rem, 3.6vw, 1.7rem);
}

.cas-sub,
.cas-fs-sub {
    margin: 0.35rem 0 0;
    color: #64748b;
    font-size: 0.92rem;
}

.cas-card.is-done .cas-sub,
.cas-fs.is-done .cas-fs-sub {
    color: #e11d48;
    font-weight: 700;
}

.cas-laps {
    list-style: none;
    margin: 0.8rem 0 0;
    padding: 0;
    display: grid;
    gap: 0.35rem;
}

.cas-laps li {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    font-variant-numeric: tabular-nums;
    color: #334155;
    background: #f8fafc;
    border-radius: 0.75rem;
    padding: 0.45rem 0.7rem;
    font-size: 0.92rem;
}

.cas-delta {
    color: #94a3b8;
    margin-left: 0.35rem;
}

.cas-laps .cas-more {
    width: 100%;
}

.cas-face-disk {
    fill: #fff;
    stroke: #e2e8f0;
    stroke-width: 3;
}

.cas-tick {
    stroke: #cbd5e1;
    stroke-width: 2;
}

.cas-tick.is-major {
    stroke: #94a3b8;
    stroke-width: 2.5;
}

.cas-num {
    fill: #475569;
    font-size: 13px;
    font-family: Outfit, system-ui, sans-serif;
    font-weight: 650;
    font-weight: 600;
}

.cas-hhand {
    stroke: #0f172a;
    stroke-width: 5;
    stroke-linecap: round;
}

.cas-mhand {
    stroke: #0f172a;
    stroke-width: 3.5;
    stroke-linecap: round;
}

.cas-shand {
    stroke: #d4af37;
    stroke-width: 2;
    stroke-linecap: round;
}

.cas-cap {
    fill: #d4af37;
    stroke: #fff;
    stroke-width: 2;
}

.cas-modal {
    position: fixed;
    inset: 0;
    z-index: 1400;
    background: rgba(15, 23, 42, 0.46);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: max(0.75rem, env(safe-area-inset-top)) 0.75rem max(0.75rem, env(safe-area-inset-bottom));
    overflow: auto;
}

.cas-modal.hidden,
.cas-fs.hidden {
    display: none;
}

.cas-dialog {
    width: min(100%, 36rem);
    margin: auto;
    background: #fff;
    border-radius: 1.5rem;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.2);
    overflow: hidden;
}

.cas-dialog-head,
.cas-dialog-body,
.cas-dialog-foot {
    padding: 1rem 1rem 0.9rem;
}

.cas-dialog-head {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    background: linear-gradient(135deg, #fffbeb, #fff 48%, #f8fafc);
    border-bottom: 1px solid #f1f5f9;
}

.cas-dialog-head h2 {
    margin: 0;
    font-size: 1.2rem;
    letter-spacing: -0.03em;
    color: #0f172a;
}

.cas-dialog-head p {
    margin: 0.2rem 0 0;
    color: #64748b;
    font-size: 0.875rem;
}

.cas-dialog-icon {
    width: 44px;
    height: 44px;
    border-radius: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: #b8962e;
    box-shadow: 0 6px 16px rgba(184, 150, 46, 0.15);
    flex: 0 0 auto;
}

.cas-icon-btn {
    width: 44px;
    padding: 0;
    margin-left: auto;
}

.cas-field {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 0.3rem;
}

.cas-input {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    min-height: 44px;
    border-radius: 0.9rem;
    border: 1px solid #e2e8f0;
    padding: 0.45rem 0.75rem;
    color: #0f172a;
    background: #fff;
}

.cas-input:focus,
.cas-dial-input:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

.cas-modes {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.35rem;
    margin-top: 0.85rem;
    padding: 0.3rem;
    border-radius: 1rem;
    background: #f8fafc;
}

.cas-mode {
    width: 100%;
    border-color: transparent;
    background: transparent;
    font-size: 0.86rem;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
}

.cas-mode.is-on {
    background: #fff;
    border-color: rgba(212, 175, 55, 0.7);
    color: #0f172a;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.05);
}

.cas-readout {
    margin: 0.9rem 0 0.35rem;
    text-align: center;
    font-family: Outfit, system-ui, sans-serif;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.04em;
    font-size: clamp(1.8rem, 6vw, 2.6rem);
    color: #0f172a;
}

.cas-readout.is-compact {
    font-size: clamp(1.05rem, 3.2vw, 1.45rem);
    letter-spacing: -0.03em;
    line-height: 1.25;
}

.cas-datebox[hidden] {
    display: none;
}

.cas-datebox {
    margin-top: 0.75rem;
}

.cas-cal {
    border: 1px solid #e2e8f0;
    border-radius: 1.15rem;
    background: linear-gradient(180deg, #fff, #f8fafc);
    padding: 0.65rem 0.55rem 0.7rem;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.cas-cal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    margin-bottom: 0.35rem;
}

.cas-cal-title {
    margin: 0;
    font-weight: 700;
    letter-spacing: -0.03em;
    text-transform: capitalize;
    color: #0f172a;
}

.cas-cal-nav {
    width: 44px;
    height: 44px;
    border-radius: 0.9rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #334155;
    cursor: pointer;
}

.cas-cal-nav:hover {
    border-color: rgba(212, 175, 55, 0.7);
}

.cas-cal-week,
.cas-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.15rem;
}

.cas-cal-week {
    margin-bottom: 0.15rem;
    color: #94a3b8;
    font-size: 0.72rem;
    font-weight: 700;
    text-align: center;
}

.cas-cal-day {
    min-height: 44px;
    border: 1px solid transparent;
    border-radius: 0.75rem;
    background: transparent;
    color: #0f172a;
    font-weight: 650;
    font-weight: 600;
    cursor: pointer;
}

.cas-cal-day.is-out {
    color: #94a3b8;
}

.cas-cal-day.is-today {
    border-color: rgba(212, 175, 55, 0.55);
}

.cas-cal-day.is-on {
    background: linear-gradient(180deg, #f3e2a4, #d4af37);
    color: #0f172a;
    box-shadow: 0 6px 14px rgba(184, 150, 46, 0.22);
}

.cas-cal-day:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.cas-date-fields {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
    margin-top: 0.65rem;
    min-width: 0;
}

.cas-date-field {
    display: grid;
    gap: 0.25rem;
    min-width: 0;
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 700;
}

.cas-date-field .cas-input {
    text-align: center;
}

.cas-dials {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-top: 0.35rem;
}

.cas-dials.is-three .cas-dial:last-child {
    grid-column: 1 / -1;
    max-width: 13rem;
    width: 100%;
    justify-self: center;
}

.cas-dial {
    position: relative;
    touch-action: none;
    user-select: none;
    cursor: grab;
    border-radius: 1.25rem;
    background: linear-gradient(180deg, #fff, #f8fafc);
    border: 1px solid #e2e8f0;
    padding: 0.35rem 0.35rem 0.6rem;
}

.cas-dial:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

.cas-dial svg {
    width: 100%;
    height: auto;
    display: block;
}

.cas-dial-track {
    stroke: #e2e8f0;
    stroke-width: 8;
}

.cas-dial-arc {
    stroke: #d4af37;
    stroke-width: 8;
    stroke-linecap: round;
}

.cas-dial-hand {
    stroke: #0f172a;
    stroke-width: 4;
    stroke-linecap: round;
}

.cas-dial-face {
    position: relative;
}

.cas-dial-read {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
}

.cas-dial-read b {
    display: block;
    font-family: Outfit, system-ui, sans-serif;
    font-size: 1.55rem;
    letter-spacing: -0.04em;
    font-variant-numeric: tabular-nums;
    color: #0f172a;
    line-height: 1;
}

.cas-dial-read span {
    color: #94a3b8;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.cas-dial-input {
    display: block;
    width: calc(100% - 1rem);
    margin: 0.15rem auto 0;
    min-width: 0;
    min-height: 44px;
    text-align: center;
    border-radius: 0.8rem;
    border: 1px solid #e2e8f0;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    color: #0f172a;
}

.cas-dialog-foot {
    border-top: 1px solid #f1f5f9;
    display: grid;
    gap: 0.45rem;
}

.cas-fs {
    position: fixed;
    inset: 0;
    z-index: 1500;
    background:
        radial-gradient(circle at top, rgba(212, 175, 55, 0.16), transparent 36%),
        #0f172a;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: max(5.25rem, calc(env(safe-area-inset-top) + 4.25rem)) 1rem max(1rem, env(safe-area-inset-bottom));
    text-align: center;
    overflow: auto;
}

.cas-fs:fullscreen,
.cas-fs:-webkit-full-screen {
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at top, rgba(212, 175, 55, 0.16), transparent 36%),
        #0f172a;
}

.cas-fs::backdrop {
    background: #0f172a;
}

.cas-fs-top {
    position: absolute;
    top: max(0.75rem, env(safe-area-inset-top));
    left: max(0.75rem, env(safe-area-inset-left));
    right: max(0.75rem, env(safe-area-inset-right));
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.cas-fs-brand {
    display: flex;
    align-items: center;
    min-width: 0;
    background: #fff;
    border-radius: 999px;
    padding: 0.35rem 0.9rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.cas-fs-brand img {
    display: block;
    height: 2.6rem;
    width: auto;
    max-width: min(12rem, 48vw);
    object-fit: contain;
}

.cas-fs-close {
    position: static;
    flex: 0 0 auto;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.14);
}

.cas-fs-name {
    margin: 0 0 0.4rem;
    font-size: clamp(1.3rem, 4vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.03em;
}

.cas-fs-face {
    width: min(70vw, 42vh);
}

.cas-fs-face:empty {
    display: none;
}

.cas-fs-digits {
    color: #fff;
    font-size: clamp(4rem, 16vw, 9rem);
}

.cas-fs-digits.is-long {
    font-size: clamp(1.7rem, 7vw, 3.5rem);
}

.cas-fs-sub {
    color: rgba(255, 255, 255, 0.72);
    font-size: 1.15rem;
}

.cas-fs.is-done .cas-fs-sub,
.cas-fs.is-urgent .cas-fs-digits {
    color: #fecdd3;
}

.cas-fs-actions {
    margin-top: 1.25rem;
    justify-content: center;
    max-width: 40rem;
}

.cas-fs-actions .cas-btn {
    min-height: 52px;
    padding-inline: 1rem;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.16);
}

.cas-fs-actions .cas-btn-primary {
    background: linear-gradient(90deg, #d4af37, #b8962e);
    color: #fff;
    border: 0;
}

.cas-fs-hint {
    margin: 1rem 0 0;
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.85rem;
}

.cas-toast {
    position: fixed;
    left: 50%;
    bottom: max(1rem, env(safe-area-inset-bottom));
    transform: translate(-50%, 140%);
    z-index: 1600;
    background: #0f172a;
    color: #fff;
    border-radius: 999px;
    padding: 0.7rem 1rem;
    font-size: 0.92rem;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.25);
    max-width: min(92vw, 28rem);
    text-align: center;
    transition: transform 0.2s ease;
    pointer-events: none;
}

.cas-toast.is-on {
    transform: translate(-50%, 0);
}

@keyframes cas-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.28); }
    50% { box-shadow: 0 0 0 8px rgba(244, 63, 94, 0); }
}

@media (max-height: 740px) {
    .cas-fs-face {
        width: min(42vw, 24vh);
    }

    .cas-fs-digits {
        font-size: clamp(2.8rem, 12vw, 4.5rem);
    }
}

@media (max-width: 720px) {
    .cas-now-actions {
        margin-left: 0;
        width: 100%;
    }

    .cas-now-actions .cas-btn,
    .cas-add-row .cas-btn {
        flex: 1 1 auto;
    }

    .cas-add-row .cas-btn {
        flex: 1 1 0;
        min-width: 0;
    }
}

@media (min-width: 768px) {
    .cas-panel {
        padding: 1.35rem 1.4rem 1.45rem;
    }

    .cas-board {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1100px) {
    .cas-board {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (prefers-reduced-motion: reduce) {
    .cas-card.is-done {
        animation: none;
    }

    .cas-toast {
        transition: none;
    }
}
