:root {
  color-scheme: light;
  --desk: #f3f8f6;
  --sheet: #fff;
  --ink: #132d29;
  --pencil: #425f58;
  --accent: #006458;
  --rule: #d7e5df;
}

body { background: var(--desk); color: var(--ink); font-family: system-ui, sans-serif; }
.top { align-items: center; padding-block: 12px; column-gap: 12px; }
.top .brand { white-space: nowrap; }
.top nav { display: flex; margin-inline-start: auto; gap: 12px; }
.top nav a, .lang-menu > summary { min-height: 44px; align-content: center; }
.top nav a { min-inline-size: 44px; text-align: center; }
.lang-menu summary::after { content: ''; width: 6px; height: 6px; border: solid currentColor; border-width: 0 1px 1px 0; transform: translateY(-2px) rotate(45deg); }
.lang-menu ul { inset-inline-end: 0; inset-inline-start: auto; }
.top .all-tools { display: none; }
.hero { margin-inline: auto; padding: 22px 0 16px; text-align: center; }
.hero h1 { font-size: clamp(1.75rem, 5vw, 2.75rem); margin-block: 0 4px; }
.hero .lead { font-size: 1rem; margin-block: 0; }
.tool.sheet { background: var(--sheet); max-width: 640px; margin-inline: auto; padding: clamp(12px, 3vw, 24px); border-radius: 24px; }
.tool.sheet > .local-note { display: none; }
.info, .index, footer { max-width: 640px; margin-inline: auto; }
.info + .index { margin-block: 12px 24px; }
.clock-panel { background: var(--sheet); min-width: 0; }
.clock-panel button {
  min-height: 44px; border: 1px solid var(--rule); border-radius: 12px;
  background: #fff; color: var(--ink); font: inherit; font-weight: 700;
  padding: 5px 12px; cursor: pointer;
}
.clock-panel button:disabled { opacity: .58; cursor: default; }
.clock-panel button[aria-pressed=true] { border-color: var(--accent); background: #e0f2eb; }
.clock-panel :focus-visible { outline: 3px solid #007b6d; outline-offset: 3px; }
.clock-toolbar, .clock-presets, .clock-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.clock-toolbar { justify-content: space-between; }
.clock-view { display: flex; min-inline-size: 0; padding: 3px; margin: 0; border: 0; border-radius: 12px; background: #eaf3ef; }
.clock-view label { display: grid; position: relative; cursor: pointer; }
.clock-view input, .clock-sr { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
.clock-view span { display: grid; place-items: center; min-height: 44px; padding: 3px 9px; font-size: .9rem; font-weight: 700; border-radius: 9px; }
.clock-view input:checked + span { background: #fff; color: var(--accent); box-shadow: 0 1px 3px #152b2424; }
.clock-view input:focus-visible + span { outline: 3px solid #007b6d; }
.clock-toolbar .clock-full { margin-inline-start: auto; font-size: .9rem; }
.clock-presets { justify-content: center; margin-block: 12px 5px; }
.clock-presets button { flex: 0 1 auto; }
.clock-face {
  --remaining: 100%;
  position: relative; display: grid; place-content: center; text-align: center;
  min-height: 160px; margin-block: 6px 12px; isolation: isolate;
}
[data-mode=timer] .clock-face { min-height: clamp(174px, 51vw, 246px); }
[data-mode=timer][data-view=dial] .clock-face::before {
  content: ''; position: absolute; inset: 3px auto; left: 50%; transform: translateX(-50%);
  aspect-ratio: 1; background: conic-gradient(#188774 var(--remaining), #deebe5 0);
  border-radius: 50%; z-index: -2;
}
[data-mode=timer][data-view=dial] .clock-face::after {
  content: ''; position: absolute; inset: 12px auto; left: 50%; transform: translateX(-50%);
  aspect-ratio: 1; border-radius: 50%; background: #f2faf6; z-index: -1;
}
[data-mode=timer][data-view=digits] .clock-face {
  background: linear-gradient(to right, #188774 var(--remaining), #deebe5 0) center bottom / 82% 6px no-repeat, #f2faf6;
  border-radius: 20px;
}
[data-view=hourglass] .clock-face { padding-block-start: 132px; }
[data-view=hourglass] .clock-face::before, [data-view=hourglass] .clock-face::after {
  content: ''; position: absolute; top: 4px; left: 50%; transform: translateX(-50%);
  width: 92px; height: 63px; clip-path: polygon(0 0, 100% 0, 54% 100%, 46% 100%);
  background: linear-gradient(to top, #dd9754 var(--remaining), #f5ebe1 0);
}
[data-view=hourglass] .clock-face::after {
  top: 67px; clip-path: polygon(46% 0, 54% 0, 100% 100%, 0 100%);
  background: linear-gradient(to top, #dd9754 calc(100% - var(--remaining)), #f5ebe1 0);
}
.clock-readout { font: 750 clamp(2.4rem, 12vw, 5.25rem)/1 system-ui, sans-serif; font-variant-numeric: tabular-nums; white-space: nowrap; letter-spacing: -.045em; }
:where([data-view=dial][data-mode=timer]) .clock-readout { font-size: clamp(1.8rem, 8.8vw, 4rem); }
.clock-status { min-height: 1.4em; margin: 3px 0 0; color: #85400d; font-weight: 700; }
[data-state=done] .clock-readout { color: #85400d; }
.clock-actions { justify-content: center; }
.clock-actions button { min-width: 82px; }
.clock-actions .clock-primary { background: var(--accent); border-color: var(--accent); color: #fff; min-width: 134px; }
.clock-custom { text-align: center; margin-top: 6px; }
.clock-custom summary { min-height: 44px; align-content: center; cursor: pointer; }
.clock-form { display: flex; flex-wrap: wrap; align-items: end; justify-content: center; gap: 8px; }
.clock-form label { display: grid; text-align: start; font-size: .875rem; }
.clock-form input { width: 7ch; min-height: 44px; padding: 4px; font: inherit; border: 1px solid #708b82; border-radius: 8px; }
.clock-sound-note { text-align: center; color: var(--pencil); font-size: .875rem; margin: 6px 0 0; }
.clock-laps { margin-top: 14px; max-height: 260px; overflow: auto; }
.clock-laps table { width: 100%; text-align: start; border-collapse: collapse; }
.clock-laps :is(th, td) { text-align: start; padding: 7px; border-bottom: 1px solid var(--rule); }
.clock-dialog { box-sizing: border-box; border: 0; padding: 0; background: var(--sheet); color: var(--ink); width: 100%; height: 100%; max-width: none; max-height: none; }
.clock-dialog::backdrop { background: var(--sheet); }
.clock-dialog .clock-panel, .clock-panel:fullscreen { box-sizing: border-box; min-height: 100%; padding: 16px; overflow: auto; }
:is(.clock-dialog, :fullscreen) .clock-face { min-height: clamp(160px, 47vh, 500px); }
:is(.clock-dialog, :fullscreen) .clock-readout { font-size: clamp(2rem, min(11vw, 22vh), 10rem); }
@media (max-width: 450px) {
  .top nav { order: 3; margin-inline: 0; min-width: 100%; }
}
@media (max-width: 340px) {
  .clock-presets button { padding-inline: 8px; }
}
