/* Fullscreen clock & stopwatch / countdown widgets */
.ttw-page {
    min-height: calc(100vh - 56px);
    background: #0b1220;
    color: #e5e7eb;
}
.ttw-wrap {
    max-width: 960px;
    margin: 0 auto;
    padding: 20px 16px 48px;
}
.ttw-crumb {
    font-size: 13px;
    color: #94a3b8;
    margin-bottom: 16px;
}
.ttw-crumb a { color: #cbd5e1; text-decoration: none; }
.ttw-crumb a:hover { color: #38bdf8; }

.ttw-stage {
    background: radial-gradient(1200px 500px at 50% -10%, #1e3a5f 0%, #0b1220 55%);
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 18px;
    padding: 28px 20px 24px;
    text-align: center;
}
.ttw-stage.is-done {
    animation: ttwFlash .6s ease 3;
}
@keyframes ttwFlash {
    0%,100% { box-shadow: inset 0 0 0 0 transparent; }
    50% { box-shadow: inset 0 0 0 3px #f97316; }
}

.ttw-label {
    font-size: 14px;
    color: #94a3b8;
    margin-bottom: 8px;
}
.ttw-digits {
    font-variant-numeric: tabular-nums;
    font-family: "Segoe UI", Consolas, Menlo, monospace;
    font-weight: 700;
    letter-spacing: .04em;
    line-height: 1.1;
    color: #f8fafc;
    font-size: clamp(42px, 12vw, 96px);
}
.ttw-digits .ms {
    font-size: .42em;
    opacity: .7;
    margin-left: 6px;
}
.ttw-sub {
    margin-top: 12px;
    font-size: 16px;
    color: #cbd5e1;
}
.ttw-progress {
    height: 6px;
    background: rgba(255,255,255,.08);
    border-radius: 999px;
    margin: 18px auto 0;
    max-width: 420px;
    overflow: hidden;
}
.ttw-progress > i {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #38bdf8, #22c55e);
    border-radius: inherit;
    transition: width .2s linear;
}

.ttw-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 18px;
}
.ttw-btn {
    border: 0;
    border-radius: 999px;
    padding: 10px 18px;
    font-size: 14px;
    cursor: pointer;
    background: #1e293b;
    color: #e2e8f0;
}
.ttw-btn:hover { background: #334155; }
.ttw-btn-primary { background: #0284c7; color: #fff; }
.ttw-btn-primary:hover { background: #0369a1; }
.ttw-btn-warn { background: #c2410c; color: #fff; }
.ttw-btn-muted { background: transparent; border: 1px solid rgba(255,255,255,.12); }

.ttw-opts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    justify-content: center;
    margin-top: 16px;
    font-size: 13px;
    color: #94a3b8;
}
.ttw-opts label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.ttw-opts select, .ttw-opts input[type="number"] {
    background: #111827;
    border: 1px solid rgba(255,255,255,.12);
    color: #e5e7eb;
    border-radius: 8px;
    padding: 6px 8px;
}
.ttw-tabs {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 14px;
}
.ttw-tab {
    border: 1px solid rgba(255,255,255,.1);
    background: transparent;
    color: #94a3b8;
    border-radius: 999px;
    padding: 8px 16px;
    cursor: pointer;
}
.ttw-tab.active {
    background: #0284c7;
    border-color: #0284c7;
    color: #fff;
}
.ttw-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: 14px 0 4px;
}
.ttw-preset {
    border: 1px solid rgba(255,255,255,.1);
    background: #111827;
    color: #cbd5e1;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 13px;
    cursor: pointer;
}
.ttw-preset:hover, .ttw-preset.active {
    border-color: #38bdf8;
    color: #fff;
}
.ttw-inputs {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
    margin-top: 10px;
}
.ttw-inputs input {
    width: 64px;
    text-align: center;
    font-size: 18px;
    background: #111827;
    border: 1px solid rgba(255,255,255,.12);
    color: #fff;
    border-radius: 8px;
    padding: 8px 4px;
}
.ttw-laps {
    margin-top: 20px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
}
.ttw-laps h3 {
    margin: 0 0 8px;
    font-size: 14px;
    color: #94a3b8;
    font-weight: 500;
}
.ttw-laps table {
    width: 100%;
    border-collapse: collapse;
    font-variant-numeric: tabular-nums;
    font-family: Consolas, Menlo, monospace;
    font-size: 13px;
}
.ttw-laps th, .ttw-laps td {
    padding: 8px 6px;
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.ttw-laps .best { color: #4ade80; }
.ttw-laps .worst { color: #fb7185; }
.ttw-hint {
    margin-top: 16px;
    font-size: 12px;
    color: #64748b;
    text-align: center;
    line-height: 1.6;
}
.ttw-page.is-fs {
    position: fixed;
    inset: 0;
    z-index: 9999;
    min-height: 100vh;
    background: #020617;
    overflow: auto;
}
.ttw-page.is-fs .ttw-wrap { max-width: none; padding-top: 8vh; }
.ttw-page.is-fs .ttw-digits { font-size: clamp(64px, 18vw, 160px); }
.ttw-page.is-fs .ttw-crumb,
.ttw-page.is-fs .ttw-hint { display: none; }

body.ttw-fs-lock .top-header { display: none; }

/* 秒表倒计时：浅色主题（大屏时钟仍用深色） */
.ttw-page.ttw-light {
    background: #f3f4f6;
    color: #111827;
}
.ttw-page.ttw-light .ttw-crumb { color: #6b7280; }
.ttw-page.ttw-light .ttw-crumb a { color: #374151; }
.ttw-page.ttw-light .ttw-crumb a:hover { color: #0284c7; }
.ttw-page.ttw-light .ttw-stage {
    background: #fff;
    border: 1px solid rgba(0,0,0,.08);
    box-shadow: 0 8px 24px rgba(15,23,42,.06);
}
.ttw-page.ttw-light .ttw-label { color: #6b7280; }
.ttw-page.ttw-light .ttw-digits { color: #0f172a; }
.ttw-page.ttw-light .ttw-digits .ms { color: #64748b; }
.ttw-page.ttw-light .ttw-progress { background: #e5e7eb; }
.ttw-page.ttw-light .ttw-btn { background: #e5e7eb; color: #111827; }
.ttw-page.ttw-light .ttw-btn:hover { background: #d1d5db; }
.ttw-page.ttw-light .ttw-btn-primary { background: #0284c7; color: #fff; }
.ttw-page.ttw-light .ttw-btn-primary:hover { background: #0369a1; }
.ttw-page.ttw-light .ttw-btn-warn { background: #ea580c; color: #fff; }
.ttw-page.ttw-light .ttw-btn-muted {
    background: #fff;
    border: 1px solid rgba(0,0,0,.1);
    color: #374151;
}
.ttw-page.ttw-light .ttw-opts { color: #6b7280; }
.ttw-page.ttw-light .ttw-opts select,
.ttw-page.ttw-light .ttw-opts input[type="number"],
.ttw-page.ttw-light .ttw-inputs input {
    background: #fff;
    border: 1px solid rgba(0,0,0,.12);
    color: #111827;
}
.ttw-page.ttw-light .ttw-tab {
    border-color: rgba(0,0,0,.12);
    color: #6b7280;
    background: #fff;
}
.ttw-page.ttw-light .ttw-tab.active {
    background: #0284c7;
    border-color: #0284c7;
    color: #fff;
}
.ttw-page.ttw-light .ttw-preset {
    background: #fff;
    border-color: rgba(0,0,0,.12);
    color: #374151;
}
.ttw-page.ttw-light .ttw-preset:hover,
.ttw-page.ttw-light .ttw-preset.active {
    border-color: #0284c7;
    color: #0284c7;
}
.ttw-page.ttw-light .ttw-laps h3 { color: #6b7280; }
.ttw-page.ttw-light .ttw-laps th,
.ttw-page.ttw-light .ttw-laps td {
    border-bottom-color: rgba(0,0,0,.06);
    color: #111827;
}
.ttw-page.ttw-light .ttw-hint { color: #9ca3af; }
.ttw-page.ttw-light.is-fs {
    background: #0b1220;
    color: #e5e7eb;
}
.ttw-page.ttw-light.is-fs .ttw-stage {
    background: radial-gradient(1200px 500px at 50% -10%, #1e3a5f 0%, #0b1220 55%);
    border-color: rgba(255,255,255,.06);
    box-shadow: none;
}
.ttw-page.ttw-light.is-fs .ttw-digits { color: #f8fafc; }
.ttw-page.ttw-light.is-fs .ttw-label { color: #94a3b8; }
