.timer-page{--timer-waiting:#1d4ed8;--timer-running:#15803d;--timer-final:#c0392b;max-width:1080px;margin:0 auto;padding:clamp(2.5rem,6vw,4.5rem) clamp(1.25rem,4vw,1.5rem) 5rem}:root[data-theme=dark] .timer-page{--timer-waiting:#6fa8ff;--timer-running:#4ade80;--timer-final:#ff7a68}.timer-page .back-link{font-family:var(--font-mono);letter-spacing:.05em;color:var(--ink-muted);margin-bottom:2rem;font-size:.78rem;text-decoration:none;display:inline-block}.timer-page .back-link:hover{color:var(--ink)}.timer-page .page-header{max-width:720px;margin-bottom:2.5rem}.timer-page .eyebrow{font-family:var(--font-mono);letter-spacing:.1em;text-transform:uppercase;color:var(--ink-muted);align-items:center;gap:.55rem;margin:0 0 1rem;font-size:.78rem;display:flex}.timer-page .eyebrow-dot{background:var(--stamp-progress);border-radius:50%;flex-shrink:0;width:.5rem;height:.5rem}.timer-page h1{font-family:var(--font-serif);letter-spacing:-.01em;color:var(--primary);margin:0 0 1rem;font-size:clamp(2.1rem,5vw,2.9rem);font-weight:700;line-height:1.08}.timer-page .intro{color:var(--ink-muted);max-width:60ch;margin:0 0 1rem;font-size:1.05rem;line-height:1.6}.timer-page .color-legend{flex-wrap:wrap;gap:.5rem 1.5rem;margin:0;padding:0;list-style:none;display:flex}.timer-page .color-legend li{font-family:var(--font-mono);padding-left:1.1rem;font-size:.85rem;font-weight:600;position:relative}.timer-page .color-legend li:before{content:"";background:currentColor;border-radius:50%;width:.6rem;height:.6rem;position:absolute;top:.35em;left:0}.timer-page .legend-waiting{color:var(--timer-waiting)}.timer-page .legend-running{color:var(--timer-running)}.timer-page .legend-final{color:var(--timer-final)}.timer-page .setup-card{border:1px solid var(--rule);background:var(--paper);border-radius:10px;max-width:1080px;padding:2rem;box-shadow:0 14px 30px -18px #10385c40}.timer-page .setup-card-header{justify-content:flex-end;margin-bottom:1rem;display:flex}.timer-page .top-fields{border-bottom:1px solid var(--rule);grid-template-columns:1fr 1fr;gap:1rem;max-width:480px;margin-bottom:1.5rem;padding-bottom:1.5rem;display:grid}.timer-page .grades{grid-template-columns:repeat(auto-fit,minmax(300px,1fr));align-items:start;gap:1.5rem;margin-bottom:1.5rem;display:grid}.timer-page .grade-block{border:1px solid var(--rule);background:var(--paper);border-radius:8px;padding:1.25rem}.timer-page .grade-block-header{align-items:end;gap:.6rem;margin-bottom:1.25rem;display:flex}.timer-page .grade-name-field{flex:1}.timer-page .rows{flex-direction:column;gap:1rem;margin-bottom:1rem;display:flex}.timer-page .row{border-bottom:1px solid var(--rule);grid-template-columns:1fr 1fr auto;grid-template-areas:"subject subject subject""start end remove";align-items:end;gap:.6rem;padding-bottom:1rem;display:grid}.timer-page .row .field:first-child{grid-area:subject}.timer-page .row .field:nth-child(2){grid-area:start}.timer-page .row .field:nth-child(3){grid-area:end}.timer-page .row .remove-btn{grid-area:remove}.timer-page .row:last-child{border-bottom:none;padding-bottom:0}.timer-page .field{flex-direction:column;gap:.35rem;display:flex}.timer-page .field label{font-family:var(--font-mono);letter-spacing:.05em;text-transform:uppercase;color:var(--ink-muted);font-size:.7rem}.timer-page .field input{font-family:var(--font-serif);border:1px solid var(--rule-strong);background:var(--paper);color:var(--ink);box-sizing:border-box;border-radius:6px;width:100%;padding:.6rem .7rem;font-size:.95rem}.timer-page .field input:focus{outline:2px solid var(--stamp-progress);outline-offset:1px}:root[data-theme=dark] .timer-page .field input{color-scheme:dark}.timer-page .time-wheel{--wheel-item:42px;height:calc(var(--wheel-item) * 3);border:1px solid var(--rule-strong);background:var(--paper);border-radius:8px;align-items:center;gap:.4rem;padding:0 .6rem;display:inline-flex;position:relative;overflow:hidden;-webkit-mask-image:linear-gradient(#0000 0%,#000 30% 70%,#0000 100%);mask-image:linear-gradient(#0000 0%,#000 30% 70%,#0000 100%)}.timer-page .time-wheel.is-unset{opacity:.55}.timer-page .wheel-col{scroll-snap-type:y mandatory;scrollbar-width:none;width:3.4rem;height:100%;padding:var(--wheel-item) 0;box-sizing:border-box;outline:none;overflow-y:scroll}.timer-page .wheel-col::-webkit-scrollbar{display:none}.timer-page .wheel-item{height:var(--wheel-item);line-height:var(--wheel-item);text-align:center;font-family:var(--font-mono);letter-spacing:.03em;color:var(--ink-muted);scroll-snap-align:center;cursor:pointer;user-select:none;font-size:1.3rem;font-weight:700}.timer-page .time-wheel:not(.is-unset) .wheel-item.is-selected{color:var(--primary)}.timer-page .wheel-sep{font-family:var(--font-mono);color:var(--ink-muted);font-size:1.3rem;font-weight:700}.timer-page .wheel-highlight{height:var(--wheel-item);border-top:1px solid var(--rule);border-bottom:1px solid var(--rule);pointer-events:none;position:absolute;top:50%;left:0;right:0;transform:translateY(-50%)}.timer-page .remove-btn,.timer-page .remove-grade-btn{font-family:var(--font-mono);color:var(--ink-muted);border:1px solid var(--rule-strong);cursor:pointer;background:0 0;border-radius:6px;flex-shrink:0;width:2.4rem;height:2.4rem;font-size:1rem;line-height:1;transition:border-color .15s,color .15s}.timer-page .remove-btn:hover:not(:disabled),.timer-page .remove-grade-btn:hover:not(:disabled){color:#c0392b;border-color:#c0392b}.timer-page .remove-btn:disabled,.timer-page .remove-grade-btn:disabled{opacity:.35;cursor:not-allowed}.timer-page .btn-small{padding:.45rem .9rem;font-size:.78rem}.timer-page .field-error{color:#c0392b;margin:1rem 0 0;font-size:.85rem}.timer-page .btn-primary{width:100%;font-family:var(--font-mono);letter-spacing:.02em;color:#fff;background:var(--primary);cursor:pointer;border:none;border-radius:6px;margin-top:1.25rem;padding:.85rem 1.2rem;font-size:.9rem;font-weight:600;transition:background-color .15s;display:block}.timer-page .btn-primary:hover{background:var(--stamp-progress)}.timer-page .grid-header{text-align:center;margin-bottom:.25rem}.timer-page .school-name{font-family:var(--font-serif);color:var(--primary);font-size:clamp(1.25rem,3vw,1.75rem);font-weight:700}.timer-page .school-name:empty{display:none}.timer-page .room-display{font-family:var(--font-mono);letter-spacing:.06em;color:var(--ink-muted);margin:.35rem 0 1.5rem;font-size:.95rem}.timer-page .room-display:empty,.timer-page .grid-header:has(.school-name:empty):has(.room-display:empty){display:none}.timer-page .cards-row{grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:1.5rem;display:grid}.timer-page .timer-card{border:1px solid var(--rule);border-top:4px solid var(--rule-strong);background:var(--paper);text-align:center;border-radius:10px;max-width:560px;padding:1.75rem;transition:border-top-color .3s;box-shadow:0 14px 30px -18px #10385c40;container-type:inline-size}.timer-page .timer-card.state-waiting{border-top-color:var(--timer-waiting)}.timer-page .timer-card.state-running{border-top-color:var(--timer-running)}.timer-page .timer-card.state-final{border-top-color:var(--timer-final)}.timer-page .timer-card.is-critical{animation:.6s steps(1,jump-none) infinite card-blink}@keyframes card-blink{50%{border-color:var(--timer-final);box-shadow:0 0 0 3px var(--timer-final), 0 14px 30px -18px #10385c40}}.timer-page .grade-label{font-family:var(--font-mono);letter-spacing:.08em;text-transform:uppercase;color:var(--primary);margin:0 0 .75rem;font-size:.85rem;font-weight:700}.timer-page .grade-label:empty{display:none}.timer-page .status-label{font-family:var(--font-mono);letter-spacing:.1em;text-transform:uppercase;color:var(--ink-muted);background:color-mix(in srgb, var(--ink-muted) 12%, transparent);border-radius:999px;padding:.3rem .85rem;font-size:.78rem;font-weight:600;display:inline-block}.timer-page .status-label.state-waiting{color:var(--timer-waiting);background:color-mix(in srgb, var(--timer-waiting) 14%, transparent)}.timer-page .status-label.state-running{color:var(--timer-running);background:color-mix(in srgb, var(--timer-running) 14%, transparent)}.timer-page .status-label.state-final{color:var(--timer-final);background:color-mix(in srgb, var(--timer-final) 16%, transparent)}.timer-page .activity-name{font-family:var(--font-serif);color:var(--primary);margin:.4rem 0 1.25rem;font-size:clamp(1.2rem,6cqi,2.1rem);font-weight:700}.timer-page .timer-card hr{border:none;border-top:1px solid var(--rule);margin:0 0 1.5rem}.timer-page .clock-wrap{aspect-ratio:1;justify-content:center;align-items:center;width:clamp(210px,90cqi,460px);margin:0 auto 1.5rem;display:flex;position:relative}.timer-page .timer-card.state-done .clock-ring{display:none}.timer-page .timer-card.state-done .clock-wrap{aspect-ratio:auto;width:100%;min-height:clamp(160px,40cqi,260px)}.timer-page .clock-ring{width:100%;height:100%;position:absolute;inset:0;transform:rotate(-90deg)}.timer-page .ring-track{fill:none;stroke:var(--rule);stroke-width:5px}.timer-page .ring-progress{fill:none;stroke-width:5px;stroke-linecap:round;stroke-dasharray:282.743;stroke-dashoffset:0;transition:stroke-dashoffset .9s linear,stroke .3s}.timer-page .ring-progress.state-waiting{stroke:var(--timer-waiting)}.timer-page .ring-progress.state-running{stroke:var(--timer-running)}.timer-page .ring-progress.state-final{stroke:var(--timer-final);filter:drop-shadow(0 0 6px var(--timer-final));animation:1s ease-in-out infinite ring-pulse}@keyframes ring-pulse{0%,to{opacity:1}50%{opacity:.4}}.timer-page .clock{font-family:var(--font-mono);letter-spacing:.02em;color:var(--stamp-progress);margin:0;font-size:clamp(2.1rem,13cqi,4.4rem);font-weight:700;line-height:1;transition:color .3s}.timer-page .clock.state-waiting{color:var(--timer-waiting)}.timer-page .clock.state-running{color:var(--timer-running)}.timer-page .clock.state-final{color:var(--timer-final);animation:1s ease-in-out infinite timer-pulse}.timer-page .clock.state-done{font-family:var(--font-serif);letter-spacing:normal;color:var(--primary);font-size:clamp(1.8rem,15cqi,3.4rem);font-weight:700}@keyframes timer-pulse{0%,to{opacity:1}50%{opacity:.55}}@media (prefers-reduced-motion:reduce){.timer-page .clock.state-final{animation:none}.timer-page .timer-card.is-critical{border-color:var(--timer-final);animation:none}.timer-page .ring-progress{transition:none;animation:none}}.timer-page .timer-actions{justify-content:center;gap:.75rem;display:flex}.timer-page .timer-actions.global-actions{margin-top:1.75rem}.timer-page .timer-grid:fullscreen{background:var(--paper);box-sizing:border-box;flex-direction:column;justify-content:center;align-items:center;width:100%;height:100%;padding:3vh 3vw;display:flex;overflow-y:auto}.timer-page .timer-grid:fullscreen .cards-row{flex-wrap:wrap;justify-content:center;width:100%;display:flex}.timer-page .timer-grid:fullscreen .timer-card{flex:280px}.timer-page .btn-ghost{font-family:var(--font-mono);color:var(--primary);border:1px solid var(--rule-strong);cursor:pointer;background:0 0;border-radius:6px;padding:.55rem 1.1rem;font-size:.82rem;transition:border-color .15s,color .15s}.timer-page .btn-ghost:hover{border-color:var(--primary);color:var(--stamp-progress)}.timer-page .extend-btn{margin-top:-.5rem;margin-bottom:1rem}.timer-page .up-next{border-top:1px solid var(--rule);text-align:left;margin-top:1.5rem;padding-top:1.25rem}.timer-page .up-next:empty{display:none}.timer-page .up-next-title{font-family:var(--font-mono);letter-spacing:.08em;text-transform:uppercase;color:var(--ink-muted);margin:0 0 .75rem;font-size:.72rem}.timer-page .up-next-item{border-bottom:1px solid var(--rule);justify-content:space-between;gap:1rem;padding:.5rem 0;font-size:.85rem;display:flex}.timer-page .up-next-item:last-child{border-bottom:none}.timer-page .up-next-item .u-subject{color:var(--ink)}.timer-page .up-next-item .u-time{font-family:var(--font-mono);color:var(--ink-muted);white-space:nowrap}.timer-page .up-next-item.is-current .u-subject{color:var(--primary);font-weight:700}.timer-page .up-next-item.is-done{opacity:.55}.timer-page .up-next-item.is-done .u-subject,.timer-page .up-next-item.is-done .u-time{text-decoration:line-through}@media (width<=640px){.timer-page .top-fields{grid-template-columns:1fr}.timer-page .remove-btn{justify-self:start}}
