:root {
  --green: #006e2e;
  --red: #a90329;
  --gold: #ffb300;
  --muted: #9aa0a6;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100dvh;
  color: #eee;
  font: 1rem/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: linear-gradient(#45484d 9%, #000 65%) fixed #000;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

main {
  width: 80%;
  margin: 0 auto;
  padding: 1rem;
}

header { display: flex; justify-content: flex-end; gap: 0.5rem; }

header button {
  width: 3rem;
  min-height: 3rem;
  font-size: 1.5rem;
  background: #ffffff1a;
}

h1 {
  margin: 0.5rem 0 1rem;
  text-align: center;
  font-size: clamp(2.5rem, 11vw, 4.25rem);
  text-wrap: balance;
  color: #ccc;
  text-shadow: 2px 2px #000;
}

h2 { margin: 0 0 1rem; font-size: 1.1rem; color: var(--muted); font-weight: 500; }

/* LCD-style panel; no seven-segment font is bundled, so monospace + glow stands in. */
#readout {
  padding: 1rem;
  text-align: center;
  background: #040604;
  border: 2px solid #2a2d31;
  border-radius: 0.75rem;
  box-shadow: inset 0 0 1.5rem #000;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
#readout p { margin: 0; line-height: 1.1; }
.time { font-size: clamp(2rem, 10vw, 3.25rem); letter-spacing: 0.08em; color: #39ff7a; text-shadow: 0 0 0.6rem #39ff7a99; }
.cost { font-size: clamp(3rem, 18vw, 6rem); font-weight: 700; color: var(--gold); text-shadow: 0 0 0.75rem #ffb30099; }

.controls {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin: 1.25rem 0 2rem;
}

button {
  min-height: 3.5rem;
  border: 0;
  border-radius: 0.5rem;
  color: #fff;
  font: inherit;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  touch-action: manipulation;
}
button:active:not(:disabled) { filter: brightness(1.25); }
button:disabled { background: #3a3d42; color: #777; cursor: default; }
.start { background: var(--green); }
.stop, .reset { background: var(--red); }
.stop.save { background: #1a5fb4; }
.neutral { background: #3a3d42; }

form, #meetings, #intro { background: rgb(255 255 255 / 0.06); border-radius: 0.75rem; padding: 1rem; }

fieldset { border: 0; border-top: 1px solid #ffffff22; margin: 0 0 1rem; padding: 0.75rem 0 0; }
legend { padding-right: 0.5rem; color: var(--muted); }

label { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 0.25rem 1rem; margin-bottom: 0.5rem; }
label output { font-variant-numeric: tabular-nums; font-weight: 600; }
label input { grid-column: 1 / -1; width: 100%; height: 2.25rem; margin: 0; accent-color: var(--gold); }

select {
  min-height: 2.75rem;
  padding: 0 0.75rem;
  border: 1px solid #ffffff33;
  border-radius: 0.5rem;
  color: inherit;
  background: #1c1e21;
  font: inherit;
}

#version { margin: 1.5rem 0 0.5rem; text-align: center; font-size: 0.8rem; color: var(--muted); }

#rate { margin: 0; text-align: center; font-size: 1.25rem; font-weight: 600; color: var(--gold); }

#meetings ol { margin: 0 0 1rem; padding: 0; list-style: none; }
#meetings li { display: grid; gap: 0.15rem; padding: 0.75rem 0; border-top: 1px solid #ffffff22; }
#meetings li span { color: var(--muted); font-size: 0.9rem; }
#clear { width: 100%; }

label.check { display: flex; gap: 0.75rem; margin-bottom: 1rem; }
label.check input { width: 1.5rem; height: 1.5rem; }

#intro h3 { margin: 1.25rem 0 0.25rem; font-size: 1rem; }
#intro p, #intro li { color: #ccc; }
#intro ul { padding-left: 1.25rem; }
#intro .controls { grid-template-columns: 1fr 1fr; margin-bottom: 0; }

/* Phone in landscape: ~300px of height, so put the title and icons on one line and the clock beside its buttons. */
@media (orientation: landscape) and (max-height: 500px) {
  main { position: relative; width: 90%; padding: 0.5rem; }
  header { position: absolute; top: 0.5rem; right: 0.5rem; }
  header button { width: 2.5rem; min-height: 2.5rem; font-size: 1.25rem; }
  h1 { margin: 0 0 0.5rem; padding: 0 6rem; font-size: 1.5rem; }
  #clock { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: center; }
  #readout { padding: 0.5rem; }
  .time { font-size: 2rem; }
  .cost { font-size: 3.5rem; }
  .controls { grid-template-columns: 1fr; margin: 0; }
}
