:root {
  --bg: #f6f5f2;
  --card: #ffffff;
  --ink: #1d1d1b;
  --muted: #6b6a66;
  --line: #e6e4df;
  --accent: #1f5c4a;
  --accent-ink: #ffffff;
  --accent-soft: #e5efeb;
  --danger: #a33a2b;
  --radius: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141413;
    --card: #1d1d1b;
    --ink: #f1efe9;
    --muted: #a19f99;
    --line: #2f2e2b;
    --accent: #6fbf9f;
    --accent-ink: #10231c;
    --accent-soft: #1f3129;
    --danger: #e0806f;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #141413; --card: #1d1d1b; --ink: #f1efe9; --muted: #a19f99; --line: #2f2e2b;
  --accent: #6fbf9f; --accent-ink: #10231c; --accent-soft: #1f3129; --danger: #e0806f; color-scheme: dark;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; color: inherit; }
main { max-width: 980px; margin: 48px auto; padding: 0 16px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 520px;
  overflow: hidden;
}
.side { padding: 32px 28px; border-right: 1px solid var(--line); }
.content { padding: 32px 28px; }
.mark {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center; font-weight: 600; letter-spacing: .02em;
}
.owner { color: var(--muted); margin: 18px 0 2px; font-weight: 500; }
h1 { font-size: 24px; line-height: 1.25; margin: 0 0 22px; letter-spacing: -.01em; }
h2 { font-size: 16px; margin: 0 0 16px; }
.label { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 8px; }
.lengths { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.pill {
  border: 1px solid var(--line); background: transparent; border-radius: 999px;
  padding: 7px 14px; cursor: pointer;
}
.pill[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.meta { display: grid; gap: 6px; color: var(--muted); font-size: 14px; }
.meta strong { color: var(--ink); font-weight: 500; }
select.tz { width: 100%; padding: 7px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); }

.picker { display: grid; grid-template-columns: 1fr 200px; gap: 28px; }
.month-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.month-head h2 { margin: 0; }
.nav { display: flex; gap: 4px; }
.icon-btn {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line);
  background: transparent; cursor: pointer; display: grid; place-items: center;
}
.icon-btn:disabled { opacity: .35; cursor: default; }
.grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.dow { font-size: 12px; color: var(--muted); padding-bottom: 6px; }
.day {
  aspect-ratio: 1; border: 0; border-radius: 50%; background: transparent;
  color: var(--muted); cursor: default; max-width: 46px; width: 100%; justify-self: center;
}
.day.open { background: var(--accent-soft); color: var(--accent); font-weight: 600; cursor: pointer; }
.day.open:hover { outline: 2px solid var(--accent); }
.day[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.times { display: flex; flex-direction: column; gap: 8px; max-height: 400px; overflow-y: auto; }
.time {
  border: 1px solid var(--accent); color: var(--accent); background: transparent;
  border-radius: 8px; padding: 10px; font-weight: 600; cursor: pointer;
}
.time:hover { background: var(--accent-soft); }
.hint { color: var(--muted); font-size: 14px; }

form { display: grid; gap: 14px; max-width: 440px; }
label { display: grid; gap: 6px; font-weight: 500; font-size: 14px; }
input, textarea {
  border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: var(--card);
}
input:focus, textarea:focus, select:focus, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.hp { position: absolute; left: -10000px; }
.primary {
  background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 8px;
  padding: 11px 16px; font-weight: 600; cursor: pointer; justify-self: start;
}
.primary:disabled { opacity: .6; cursor: default; }
.link { background: none; border: 0; color: var(--accent); cursor: pointer; padding: 0; font-weight: 500; }
.chosen { padding: 12px 14px; border-radius: 10px; background: var(--accent-soft); margin-bottom: 18px; max-width: 440px; }
.error { color: var(--danger); font-size: 14px; min-height: 1.5em; margin: 0; }
.done h2 { font-size: 22px; }
.done a { color: var(--accent); }
footer { text-align: center; color: var(--muted); font-size: 12px; margin-top: 16px; }

@media (max-width: 760px) {
  main { margin: 16px auto; }
  .card { grid-template-columns: 1fr; }
  .side { border-right: 0; border-bottom: 1px solid var(--line); padding: 24px 20px; }
  .content { padding: 24px 20px; }
  .picker { grid-template-columns: 1fr; }
  .times { max-height: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
  .times > p { grid-column: 1 / -1; margin-bottom: 0; }
}
