/* The page is a pedestal: dark room, round glass, a few quiet controls. */

:root {
  --bezel: #141416;
  --room: #0b0b0d;
  --ink: #b8b6ae;
  --ink-dim: #6d6c66;
  --accent: #d7bd3e;            /* panel yellow */
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--room);
  color: var(--ink);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  display: flex;
  justify-content: center;
}

main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 28px 16px 40px;
  width: 100%;
  max-width: 720px;
}

.clock { display: flex; justify-content: center; }

.bezel {
  position: relative;
  border-radius: 50%;
  padding: 14px;
  background: var(--bezel);
  box-shadow: 0 0 0 1px #26262a, 0 18px 60px rgba(0, 0, 0, 0.6);
}

/* A long press is a dial gesture here -- the knob's save and the 3 s
 * self-test hold both need it -- so nothing that stands in for the knob may
 * be a long-press target for the OS.  Without these, iOS Safari answers a
 * held finger with the callout menu (select/copy on the button, save-image
 * on the canvas) and swallows the press. */
#panel, button {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

#panel {
  display: block;
  width: min(76vmin, 560px);
  height: min(76vmin, 560px);
  border-radius: 50%;
  image-rendering: pixelated;
  touch-action: none;           /* wheel/drag belongs to the dial            */
  cursor: pointer;
}

/* Not `none`: the buttons want the tap, but not the double-tap zoom that
 * delays it.  PRESS is the exception -- a finger held for the save or the
 * 3 s self-test drifts, and a drift the browser reads as a pan cancels the
 * pointer mid-hold. */
button { touch-action: manipulation; }
#push { touch-action: none; }


.controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

button, input[type="datetime-local"] {
  font: inherit;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--ink);
  background: #17171a;
  border: 1px solid #2b2b30;
  border-radius: 6px;
  padding: 9px 14px;
  cursor: pointer;
}

button:hover { border-color: #3d3d44; }
button:active { background: #202024; }
button:disabled { color: var(--ink-dim); cursor: default; }

#push { min-width: 110px; }
#ccw, #cw { min-width: 52px; }

.time button { font-size: 12px; padding: 7px 10px; }

/* Minus over plus, one magnitude per column: the pairs read as a stack of
 * steps rather than a six-button smear. */
.jumps { flex-direction: column; gap: 8px; }
.jumps .row { display: flex; gap: 10px; justify-content: center; }
.jumps button { min-width: 66px; }

#now:not(:disabled) { color: var(--accent); border-color: #4a4322; }

input[type="datetime-local"] {
  color-scheme: dark;
  cursor: auto;
}
