.timer-widget { display: flex; flex-direction: column; text-align: center; }
.timer-widget .panelhead { margin-bottom: 20px; }
.timer-clock { position: relative; width: 190px; height: 190px; margin: 0 auto 24px; border-radius: 50%; background: var(--paper); box-shadow: var(--inset); }
.clock-mark { position: absolute; color: var(--muted); font: 11px var(--font-mono); }
.mark-top { top: 12px; left: 50%; transform: translateX(-50%); }
.mark-bottom { bottom: 12px; left: 50%; transform: translateX(-50%); }
.mark-left { top: 50%; left: 12px; transform: translateY(-50%); }
.mark-right { top: 50%; right: 12px; transform: translateY(-50%); }
.clock-hand { position: absolute; left: calc(50% - 1px); bottom: 50%; width: 2px; height: 65px; background: var(--ink); border-radius: 2px; transform-origin: center bottom; }
.clock-pin { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--ink); top: calc(50% - 4px); left: calc(50% - 4px); }
.timer-oled { display: grid; gap: 8px; padding: 14px 18px; width: 190px; margin: auto auto 0; border-radius: 8px; background: #000; color: #fff; text-align: center; }
.timer-oled output { display: block; font: 15px var(--font-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.timer-controls { display: flex; justify-content: center; gap: 14px; margin: 0 0 28px; }
.timer-controls button { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; padding: 12px; box-shadow: var(--small-raised); }
.timer-controls svg { width: 22px; height: 22px; }
.timer-controls button[aria-pressed="true"] { box-shadow: var(--inset); color: var(--green); background: var(--paper-2); }
.timer-controls button:disabled { box-shadow: var(--inset); background: var(--paper); color: var(--ink); cursor: default; opacity: 1; }
.legend .time-bars { width: 9px; height: 12px; background: var(--muted); opacity: .45; }
.cards { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px 300px; gap: 24px; }
.chartwrap #chart > line, .chartwrap #chart > text, .chartwrap #chart > path { pointer-events: none; }
.layout > div:first-child { display: grid; grid-column: 1; grid-row: 1; gap: 24px; min-width: 0; }
.layout > aside { display: grid; grid-column: 2 / 4; grid-row: 1; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-self: start; align-items: stretch; }
.layout > aside > .inputpanel { grid-column: 1; grid-row: 1; }
.layout > aside > .timer-widget { grid-column: 2; grid-row: 1; }
.layout > div:first-child > .panel { grid-column: 1; width: 100%; min-width: 0; }
.layout > div:first-child > section:first-child { grid-column: 1; grid-row: 1; }
.layout > div:first-child > .history { grid-column: 1; grid-row: 2; margin-top: 0; }
.layout > aside > .inputpanel, .layout > aside > .timer-widget { align-self: stretch; }
@media (forced-colors: none) {
  .card, .panel, button, .button, input, textarea, dialog, .import-box, .legacy-offer, .project-row, .error-box { border: 0; }
  button.primary { background: var(--paper); color: var(--ink); box-shadow: var(--small-raised); }
  button.primary:hover:not(:disabled) { background: var(--paper-2); }
  button.primary:active:not(:disabled) { background: var(--paper-2); box-shadow: var(--inset); }
}
.timer-controls button:disabled:hover, .timer-controls button:disabled:active { box-shadow: var(--inset); background: var(--paper); color: var(--ink); border-color: var(--line); transform: none; }
.inputpanel #entrySubmit { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; padding: 12px; margin: 20px auto 0; box-shadow: var(--small-raised); }
.inputpanel #entrySubmit svg { width: 22px; height: 22px; }
.inputpanel #entrySubmit:active { box-shadow: var(--inset); }
.chart-tooltip { position: fixed; z-index: 100; pointer-events: none; padding: 7px 10px; border-radius: 9px; background: var(--ink); color: var(--paper); font: 12px var(--font-sans); box-shadow: 0 3px 12px #0002; max-width: calc(100vw - 16px); }
.chart-value { cursor: default; }
.history td input { width: 110px; min-width: 90px; margin: 0; padding: 8px 10px; }
.inputpanel #entryWords {
  font-family: var(--font-mono);
  display: block;
  width: 100%;
  height: 132px;
  padding: 12px 6px;
  text-align: center;
  font-size: 72px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -3px;
  font-variant-numeric: tabular-nums;
  border-radius: 18px;
}
.inputpanel #entryWords, .inputpanel #entryWords::placeholder { font-family: 'Geist Mono', ui-monospace, monospace; }
.inputpanel #entryWords::placeholder { font-size: 56px; letter-spacing: -2px; opacity: .45; }
input:focus, input:focus-visible, textarea:focus, textarea:focus-visible, select:focus, select:focus-visible { outline: none; }
.goal-item > strong, .history td:nth-child(2), .history td:nth-child(3), .history td:nth-child(6), .history td input { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.inputpanel .dailygoal, .inputpanel .dailygoal .goal-item > strong { font-family: var(--font-sans); }
.layout > aside > .inputpanel { display: flex; flex-direction: column; }
.inputpanel .dailygoal { margin-top: auto; }
.inputpanel #entryForm { margin-bottom: 24px; }
.inputpanel .dailygoal #entryTodayNote { display: block; margin-bottom: 14px; }
.chart-value:focus-visible { outline: 2px solid var(--muted); outline-offset: 3px; }
@media (max-width: 1100px) {
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .layout { grid-template-columns: minmax(0, 1fr) 270px; }
  .layout > div:first-child { grid-column: 1 / -1; grid-row: 1; }
  .layout > div:first-child > section:first-child { grid-column: 1 / -1; grid-row: 1; }
  .layout > aside { grid-column: 1 / -1; grid-row: 2; grid-template-columns: minmax(0, 1fr) 270px; }
  .layout > div:first-child > .history { grid-column: 1; grid-row: 2; }
}
@media (max-width: 700px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .layout { grid-template-columns: minmax(0, 1fr); }
  .layout > aside { grid-template-columns: minmax(0, 1fr); }
  .layout > aside > .timer-widget { grid-column: 1; grid-row: 2; }
  .layout > div:first-child > section:first-child { grid-row: 1; }
  .layout > div:first-child > .history { grid-row: 2; }
}
@media (prefers-reduced-motion: reduce) { .timer-controls button { transition: none; } }
