* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: #f4f7fc; color: #0b1a33; font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', 'Microsoft YaHei', sans-serif; }
button { font: inherit; cursor: pointer; }
button:disabled { opacity: .45; cursor: not-allowed; }
[hidden] { display: none !important; }
button:focus-visible, a:focus-visible, .records-scroll:focus-visible { outline: 3px solid #8ec7ff; outline-offset: 3px; }
.calculator-header { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 16px; flex-shrink: 0; min-height: 66px; padding: 10px 28px; background: #fff; border-bottom: 1px solid #e7edf5; }
.calculator-plan { justify-self: start; display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 8px; color: #16803d; background: #eaf8ef; font-size: .8rem; font-weight: 500; }
.calculator-plan strong { font-size: .85rem; font-style: italic; font-weight: 800; }
.calculator-title { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0; font-size: 1.325rem; font-weight: 700; line-height: 1.4; }
.calculator-title-icon { display: grid; place-items: center; width: 36px; height: 36px; color: #006acd; }
.calculator-title-icon svg { width: 28px; height: 28px; }
.calculator-open-link { display: inline-flex; align-items: center; gap: 6px; justify-self: end; color: #69798d; font-size: .9rem; text-decoration: none; white-space: nowrap; }
.calculator-open-link:hover { color: #006acd; }
.calculator-main { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 32px; width: 100%; padding: 32px 24px 16px; }
.calculator-wrapper { display: flex; flex: 1 0 auto; align-items: center; justify-content: center; width: 100%; min-width: 0; }
.timing-layout { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: 24px; width: 100%; max-width: 1100px; align-items: stretch; }
.timing-card, .records-card { min-width: 0; padding: 26px; border: 1px solid #e5ebf3; border-radius: 24px; background: #fff; box-shadow: 0 12px 40px rgba(18,61,107,.06); }
.card-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-heading h2 { margin: 0; color: #315d8d; font-size: 1.05rem; font-weight: 600; }
.state-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 7px; background: #f0f4f9; color: #7c899c; font-size: .7rem; white-space: nowrap; }
.state-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
[data-state="running"] .state-badge { color: #16803d; background: #eaf8ef; }
[data-state="paused"] .state-badge { color: #9a6100; background: #fff4d9; }
.intro, .records-description { margin: 12px 0 0; color: #8895a7; font-size: .78rem; line-height: 1.8; }
.timer-face { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 15px; min-height: 190px; margin-top: 28px; padding: 26px 10px; border: 1px solid #e7edf5; border-radius: 18px; background: #f8faff; }
.display-label { color: #69798d; font-size: .8rem; }
.timer-value { color: #0b1a33; font: 600 clamp(1.9rem, 4vw, 3.1rem)/1.2 ui-monospace, SFMono-Regular, Consolas, monospace; font-variant-numeric: tabular-nums; letter-spacing: -1.5px; max-width: 100%; overflow-wrap: anywhere; text-align: center; }
.time-units { color: #96a3b5; font-size: .68rem; letter-spacing: 1px; }
.split-display { display: flex; align-items: center; justify-content: space-between; margin: 16px 0 24px; padding: 0 4px; color: #8895a7; font-size: .78rem; }
.split-display output { color: #315d8d; font: 500 1rem/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; font-variant-numeric: tabular-nums; }
.timer-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 10px 19px; border: 1px solid #dce5f0; border-radius: 10px; font-size: .85rem; font-weight: 600; line-height: 1.5; white-space: nowrap; }
.button.primary { color: #fff; background: #006acd; border-color: #006acd; min-width: 125px; }
.button.primary:hover { background: #0059b3; }
.button.secondary { color: #536f8b; background: #fff; }
.button.secondary:hover:not(:disabled) { color: #006acd; border-color: #bfd6ec; background: #eef4fe; }
.button.quiet { color: #69798d; background: #f5f7fb; border-color: #f5f7fb; }
.button.quiet:hover:not(:disabled) { background: #e9eef5; }
.button.small { min-height: 34px; padding: 7px 11px; font-size: .73rem; }
.keyboard-hint { margin: 18px 0 22px; color: #96a3b5; text-align: center; font-size: .7rem; }
.keyboard-hint kbd { font: inherit; color: #69798d; }
.keyboard-hint span { margin: 0 8px; }
.storage-hint { margin: 0; padding-top: 19px; border-top: 1px solid #eef2f8; color: #96a3b5; font-size: .72rem; line-height: 1.9; }
.timer-status { min-height: 40px; margin: 10px 0 0; color: #69798d; font-size: .75rem; line-height: 1.8; }
.timer-status.is-error { color: #b42318; }
.records-card { display: flex; flex-direction: column; }
.record-count { margin-left: 5px; color: #96a3b5; font-size: .72rem; font-weight: 400; }
.text-button { padding: 4px 0; border: 0; background: transparent; color: #8895a7; font-size: .75rem; }
.text-button:hover:not(:disabled) { color: #006acd; }
.records-empty { display: flex; flex: 1; min-height: 320px; flex-direction: column; align-items: center; justify-content: center; margin: 20px 0; padding: 24px 12px; border: 1px dashed #d9e2ef; border-radius: 16px; color: #96a3b5; text-align: center; }
.records-empty > span { color: #9ab9d9; font-size: 2.3rem; }
.records-empty h3 { margin: 12px 0 7px; color: #69798d; font-size: .95rem; font-weight: 500; }
.records-empty p { margin: 0; font-size: .74rem; line-height: 1.8; }
.records-scroll { flex: 1; min-height: 320px; max-height: 395px; margin: 20px 0; overflow: auto; border: 1px solid #dce5f0; border-radius: 14px; overscroll-behavior: contain; }
table { width: 100%; min-width: 460px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th { position: sticky; top: 0; padding: 12px 9px; background: #f3f6fc; color: #8895a7; font-size: .7rem; font-weight: 500; text-align: left; white-space: nowrap; }
td { padding: 15px 9px; border-top: 1px solid #eef2f8; color: #536f8b; font: .74rem/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: nowrap; }
td:first-child { color: #96a3b5; }
td:nth-child(2) { color: #006acd; font-weight: 600; }
td:last-child { color: #8895a7; font-size: .68rem; }
tbody tr:first-child { background: #f8fbff; }
.records-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: auto; }
.record-actions { display: flex; gap: 8px; }
.record-limit { color: #96a3b5; font-size: .66rem; }
.calculator-tips { flex-shrink: 0; width: 100%; max-width: 1100px; margin-top: auto; padding: 22px 4px 0; border-top: 1px solid #dce5f0; color: #69798d; font-size: .75rem; line-height: 1.9; }
.calculator-tips h2 { margin: 0 0 15px; color: #315d8d; font-size: .85rem; font-weight: 600; }
.tips-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 24px; }
.tips-grid p { margin: 0; }
.tips-grid strong { display: block; margin-bottom: 4px; color: #536277; font-weight: 600; }
@media (max-width: 1000px) { .timing-layout { grid-template-columns: 1fr; max-width: 620px; } .calculator-tips { max-width: 620px; } .tips-grid { grid-template-columns: 1fr; gap: 14px; } .records-empty { min-height: 220px; } .records-scroll { min-height: 220px; max-height: 370px; } }
@media (max-width: 767.98px) { .calculator-header { padding: 8px 16px; gap: 10px; } .calculator-plan { padding: 5px 8px; font-size: .72rem; } .calculator-title { gap: 7px; font-size: 1.175rem; } .calculator-open-link { font-size: .8rem; } .calculator-main { padding: 24px 16px 16px; } }
@media (max-width: 575.98px) { .calculator-header { grid-template-columns: minmax(0,1fr) auto; } .calculator-title { grid-column: 1 / -1; grid-row: 1; } .calculator-plan { grid-column: 1; grid-row: 2; } .calculator-open-link { grid-column: 2; grid-row: 2; } .calculator-main { padding: 20px 12px 16px; gap: 24px; } .timing-layout { gap: 18px; } .timing-card, .records-card { padding: 22px 16px; border-radius: 22px; } .timer-value { font-size: clamp(1.7rem,8vw,2.7rem); letter-spacing: -1px; } .timer-face { margin-top: 22px; min-height: 175px; } .button { padding: 9px 13px; font-size: .78rem; } .button.primary { min-width: 105px; } .timer-actions { gap: 8px; } .keyboard-hint { font-size: .65rem; } .records-empty p { font-size: .7rem; } }
