:root {
  --page: #f5f1e8;
  --paper: #fffcf6;
  --ink: #292921;
  --muted: #645e53;
  --line: #e3dacc;
  --accent: #a84227;
  --warm: #f2dfd0;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background: var(--page);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; cursor: pointer; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 22px clamp(22px, 6vw, 88px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 11px; font-family: Georgia, serif; font-size: 22px; font-weight: 700; }
.brand-mark { width: 16px; height: 16px; border: 4px solid var(--accent); border-radius: 50%; }
.top a { color: var(--muted); text-underline-offset: 4px; font-size: 14px; }
main { max-width: 1032px; padding: 56px 28px 64px; margin: 0 auto; }
.intro { margin-bottom: 30px; }
h1 { margin: 0; font-size: clamp(44px, 6.4vw, 78px); letter-spacing: -.045em; line-height: 1.08; }
.intro p { margin: 14px 0 0; color: var(--muted); font-size: 16px; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(250px, .52fr); gap: 18px; align-items: stretch; }
.timer-card, .side-card { background: var(--paper); border: 1px solid var(--line); border-radius: 24px; }
.timer-card { display: grid; justify-items: center; gap: 24px; padding: 28px 24px 32px; }
.modes { display: flex; gap: 3px; padding: 5px; background: var(--page); border: 1px solid var(--line); border-radius: 99px; }
.modes button { border: 0; border-radius: 99px; padding: 9px 16px; background: transparent; color: var(--muted); white-space: nowrap; }
.modes button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.dial { position: relative; display: grid; place-items: center; width: min(100%, 260px); aspect-ratio: 1; }
.dial-ring {
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: conic-gradient(var(--accent) 0 var(--progress, 0%), var(--warm) var(--progress, 0%) 100%);
  mask: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 0);
}
.dial-center { position: relative; text-align: center; }
.time { font-family: Georgia, "Times New Roman", serif; font-size: clamp(58px, 10vw, 76px); letter-spacing: -.075em; font-variant-numeric: lining-nums tabular-nums; line-height: 1; }
.phase { margin: 10px 0 0; color: var(--muted); font-size: 14px; }
.controls { display: flex; gap: 10px; }
.controls button { border-radius: 99px; border: 1px solid transparent; padding: 13px 21px; font-weight: 650; }
.controls .primary { min-width: 135px; background: var(--accent); color: white; }
.controls .primary:hover { background: #86331f; }
.controls .secondary { background: var(--paper); border-color: var(--line); color: var(--ink); }
.controls .secondary:hover { background: var(--page); }
.details { display: grid; gap: 18px; grid-template-rows: 1fr 1fr; }
.side-card { padding: 23px 24px; }
.side-label, .how h2 { margin: 0; font-size: 15px; font-weight: 700; }
.total { display: flex; align-items: baseline; gap: 11px; margin: 5px 0 0; }
.total span:first-child { font: 62px/1.1 Georgia, serif; color: var(--accent); }
.total span:last-child { font-size: 14px; color: var(--muted); }
.side-card p, .how ol { margin: 8px 0 0; color: var(--muted); font-size: 14px; line-height: 1.75; }
.how ol { padding-left: 21px; margin-top: 12px; }
.how li + li { margin-top: 4px; }
@media (max-width: 690px) {
  main { padding: 38px 18px 42px; }
  .layout { grid-template-columns: 1fr; }
  .details { grid-template-rows: auto; }
  .timer-card { padding: 24px 15px; gap: 20px; }
}
@media (max-width: 360px) {
  .modes button { padding-inline: 12px; }
  .controls button { padding-inline: 16px; }
}
