* { box-sizing: border-box; }
:root { font-family: system-ui, 'Microsoft YaHei', sans-serif; color: #153f3a; background: #f4f5ee; --ink: #17594d; }
body { margin: 0; }
header { border-bottom: 1px solid #cbd3c8; }
.mast { max-width: 1240px; margin: auto; padding: 22px 40px; display: flex; gap: 14px; align-items: center; }
.mark { width: 36px; height: 36px; flex: none; }
h1 { margin: 0; font-size: clamp(20px, 2vw, 28px); line-height: 1.35; letter-spacing: -.04em; }
.wordmark { margin-left: auto; width: 165px; height: auto; max-height: 52px; object-fit: contain; }
main { width: min(960px, calc(100% - 64px)); margin: clamp(32px, 6vh, 66px) auto; }
.face { color: var(--ink); padding: clamp(35px, 6vh, 72px) 24px 36px; text-align: center; background: #e8eee2; border: 1px solid #becdbd; border-radius: 22px; position: relative; }
.face::before { content: ''; position: absolute; inset: 12px; pointer-events: none; border: 1px solid #cdd9c9; border-radius: 13px; }
h2 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: .12em; }
#clock { margin: 15px 0 22px; font: 600 clamp(72px, 13vw, 144px)/1.13 ui-monospace, 'Courier New', monospace; letter-spacing: -.075em; font-variant-numeric: tabular-nums; }
.rail { width: min(72%, 560px); height: 8px; margin: auto; border-radius: 8px; background: #cad5c6; overflow: hidden; }
#bar { height: 100%; background: currentColor; transform-origin: left; }
.signal { margin-top: 22px; display: inline-flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 650; }
.signal i { width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
body[data-tone='warning'] { --ink: #875000; }
body[data-tone='ended'] { --ink: #ab312a; }
.controls { margin: 32px auto 0; max-width: 680px; display: flex; align-items: flex-start; justify-content: center; gap: 20px; }
.field { flex: 1; min-width: 0; }
label { display: block; margin-bottom: 8px; font-size: 16px; font-weight: 650; line-height: 24px; }
input, button { font: inherit; font-size: 18px; border-radius: 9px; min-height: 52px; }
input { color: #153f3a; background: #fffefa; border: 1px solid #9baea1; width: 100%; padding: 8px 14px; }
input:disabled { background: #e9ece5; }
.actions { display: flex; gap: 12px; margin-top: 32px; }
button { cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 10px 28px; font-weight: 650; }
#toggle { background: #174e43; border: 1px solid #174e43; color: white; }
#reset { border: 1px solid #9baea1; color: #244c40; background: transparent; }
button:hover:enabled { filter: brightness(.91); }
button:disabled { opacity: .48; cursor: default; }
:focus-visible { outline: 3px solid #246ab5; outline-offset: 4px; }
.control-icon { width: 0; height: 0; border-left: 11px solid currentColor; border-top: 7px solid transparent; border-bottom: 7px solid transparent; }
body[data-mode='running'] .control-icon { width: 11px; height: 14px; border: 0; border-inline: 4px solid currentColor; }
.reset-icon { width: 15px; height: 15px; border: 2px solid currentColor; border-left-color: transparent; border-radius: 50%; position: relative; }
.reset-icon::before { content: ''; position: absolute; left: -3px; top: -2px; border-right: 5px solid currentColor; border-block: 4px solid transparent; transform: rotate(-35deg); }
.guide, #storage-feedback { max-width: 680px; margin: 18px auto 0; color: #52655a; font-size: 15px; line-height: 1.65; }
#error { display: block; color: #a42f27; margin-top: 5px; }
[hidden] { display: none !important; }
@media (max-width: 820px) { .wordmark { display: none; } }
@media (max-width: 600px) { .mast { padding: 16px 20px; gap: 10px; } .mark { width: 30px; height: 30px; } main { width: calc(100% - 32px); margin-top: 26px; } .face { padding: 38px 12px 32px; } #clock { font-size: clamp(64px, 19vw, 80px); } #clock.long { font-size: clamp(42px, 13vw, 64px); } .rail { width: 78%; } .controls { display: block; margin-top: 24px; } .actions { margin-top: 14px; } button { flex: 1; padding-inline: 12px; } }
@media (min-width: 601px) { #clock.long { font-size: clamp(80px, 10vw, 130px); } }