:root,
[data-theme="light"] {
  --bg: #ebe6dc;
  --paper: #f7f4ed;
  --paper-2: #fbf9f4;
  --ink: #1c1914;
  --ink-soft: #5c564c;
  --line: #d8d0c2;
  --line-strong: #c4bbaa;
  --a: #243056;
  --b: #6e3030;
  --a-soft: rgba(36, 48, 86, 0.12);
  --b-soft: rgba(110, 48, 48, 0.12);
  --due: #8d2e1c;
  --due-wash: #f5e7e0;
  --due-mark: #efd0c4;
  --chip: #ece7dc;
  --chip-cfp: #f3e4dc;
  --chip-event: #e4e8ef;
  --chip-note: #ebe8e0;
  --shadow: 0 10px 30px rgba(40, 32, 18, 0.06);
  --serif: "Newsreader", Palatino, "Iowan Old Style", Georgia, serif;
  --sans: "Public Sans", "Avenir Next", "Segoe UI", sans-serif;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #0f0e0c;
  --paper: #171512;
  --paper-2: #1d1a16;
  --ink: #ece7dc;
  --ink-soft: #a59c8e;
  --line: #2f2a24;
  --line-strong: #433c33;
  --a: #8fa2d4;
  --b: #d08a7e;
  --a-soft: rgba(143, 162, 212, 0.16);
  --b-soft: rgba(208, 138, 126, 0.16);
  --due: #e08a72;
  --due-wash: #2a1b16;
  --due-mark: #4a2a20;
  --chip: #242019;
  --chip-cfp: #2c1d18;
  --chip-event: #1c2230;
  --chip-note: #232019;
  --shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  background:
    radial-gradient(1000px 480px at 50% -8%, color-mix(in srgb, var(--paper) 70%, white), transparent 70%),
    var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14.5px;
  line-height: 1.45;
}

button, input, textarea, select { font: inherit; color: inherit; }
button { background: none; border: none; padding: 0; cursor: pointer; }
::selection { background: color-mix(in srgb, var(--due-mark) 70%, var(--line)); }
:focus-visible { outline: 1px solid var(--ink); outline-offset: 2px; }

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
}

.topbar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto minmax(220px, 1fr);
  gap: 16px;
  align-items: center;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 8;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px);
}

.brand { min-width: 0; }

.eyebrow,
.sec-head h2,
.talk h2,
.field > span,
.about > span,
.entry-k,
.panel h3 {
  margin: 0;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.title-input {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.title-input:focus { outline: none; }

.cal-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.month-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.month-row h1 {
  margin: 0;
  min-width: 12ch;
  text-align: center;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 4px;
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1;
}

.icon-btn:hover,
.ghost-btn:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); }

.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.ghost-btn,
.primary {
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  letter-spacing: 0.02em;
}

.primary {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.primary:hover { filter: brightness(1.05); }
.primary:disabled { opacity: 0.55; cursor: progress; }

.seats {
  display: flex;
  gap: 12px;
  min-height: 40px;
}

.seat {
  display: flex;
  align-items: center;
  gap: 7px;
}

.pick {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--ink-soft);
}

.seats.needs-choice .pick { border-color: var(--line-strong); }
.seat.is-you .pick { border-color: currentColor; color: var(--seat); }
.seat.who-a { --seat: var(--a); }
.seat.who-b { --seat: var(--b); }

.pick svg, .pin svg, .who svg, .legend svg, .track-dot svg { width: 13px; height: 13px; display: block; }

.seat-name {
  display: block;
  font-size: 13px;
  min-width: 4ch;
}

.seat .pick { cursor: default; border-color: transparent !important; }

.you {
  display: block;
  height: 12px;
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.seat:not(.is-you) .you { visibility: hidden; }

.presence {
  min-height: 1.2em;
  margin: 0;
  padding: 6px 22px 0;
  color: var(--ink-soft);
  font-size: 12.5px;
}

.presence.is-warn { color: var(--due); }

.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(900px 420px at 50% -10%, color-mix(in srgb, var(--paper) 70%, white), transparent 70%),
    var(--bg);
}

.login-card {
  width: min(420px, 100%);
  padding: 28px 26px 24px;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
}

.login-card h1 {
  margin: 4px 0 0;
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.login-lead {
  margin: 8px 0 18px;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-style: italic;
}

.login-form { display: grid; gap: 4px; }
.login-form .primary { margin-top: 10px; width: 100%; }

.login-error {
  min-height: 1.2em;
  margin: 4px 0 0;
  color: var(--due);
  font-size: 14px;
}

.app[hidden] { display: none !important; }

.workspace {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr minmax(360px, 420px);
  min-height: 0;
}

.workspace.has-rail {
  grid-template-columns: minmax(300px, 380px) 1fr minmax(360px, 420px);
}

.rail:empty { display: none; }

.rail {
  position: sticky;
  top: 72px;
  align-self: start;
  max-height: calc(100vh - 84px);
  overflow: auto;
  border-right: 1px solid var(--line);
  background: var(--paper);
  padding: 16px 18px 22px;
}

.calendar {
  min-width: 0;
  padding: 8px 14px 20px;
  display: flex;
  flex-direction: column;
}

.dow, .grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.dow {
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 72px;
  z-index: 3;
  background: var(--paper);
}

.dow span {
  padding: 8px 8px 7px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.dow span.weekend { color: color-mix(in srgb, var(--ink-soft) 70%, transparent); }

.grid-shell {
  position: relative;
  flex: 1;
  min-height: 520px;
}

.track-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: visible;
}

.grid {
  position: relative;
  z-index: 2;
  border-left: 1px solid var(--line);
  height: 100%;
  min-height: inherit;
  grid-auto-rows: 1fr;
}

.cell {
  position: relative;
  min-height: 108px;
  padding: 6px 7px 8px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: transparent;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
}

.cell.weekend { background: color-mix(in srgb, var(--ink) 2.5%, transparent); }
.cell.is-out { background: color-mix(in srgb, var(--bg) 55%, var(--paper)); }
.cell.is-out .num { color: color-mix(in srgb, var(--ink-soft) 65%, transparent); }
.cell.is-today .num {
  background: var(--ink);
  color: var(--paper);
  border-radius: 999px;
}
.cell.is-selected { box-shadow: inset 0 0 0 1.5px var(--ink); }
.cell.is-deadline { background: var(--due-wash); }
.cell.is-overdue { background: color-mix(in srgb, var(--due-wash) 80%, var(--due)); }
.cell:hover { background: color-mix(in srgb, var(--ink) 4%, var(--paper)); }
.cell.is-deadline:hover { background: color-mix(in srgb, var(--due-wash) 85%, var(--ink)); }

.cell-top {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  min-height: 24px;
}

.pins { display: flex; gap: 3px; padding-top: 4px; flex-wrap: wrap; }
.pin { display: inline-flex; }
.who-a, .pin.who-a { color: var(--a); }
.who-b, .pin.who-b { color: var(--b); }

.num {
  margin-left: auto;
  width: 1.7em;
  height: 1.7em;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 500;
}

.chips {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 0;
}

.chip, .more {
  display: flex;
  width: 100%;
  min-width: 0;
  gap: 5px;
  align-items: baseline;
  text-align: left;
  padding: 2px 5px;
  border-radius: 3px;
  font-size: 12px;
  line-height: 1.3;
  background: var(--chip);
}

.chip.is-cfp { background: var(--chip-cfp); color: var(--due); }
.chip.is-event { background: var(--chip-event); }
.chip.is-note { background: var(--chip-note); }
.chip.is-past { opacity: 0.45; }
.chip.is-past .t { text-decoration: line-through; }

.chip .k, .more {
  flex: none;
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.chip.is-cfp .k { color: var(--due); }

.chip .t {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-family: var(--serif);
}

.chip:hover .t { text-decoration: underline; text-underline-offset: 2px; }
.more { background: transparent; padding-left: 2px; }

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: center;
  margin: 12px 2px 0;
  color: var(--ink-soft);
  font-size: 12px;
}

.legend .key { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); }
.swatch {
  width: 10px;
  height: 10px;
  background: var(--due-mark);
  box-shadow: inset 0 0 0 1px var(--due);
}
.track-swatch {
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
}

.sidebar {
  border-left: 1px solid var(--line);
  background: var(--paper);
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: calc(100vh - 72px);
  position: sticky;
  top: 72px;
  overflow: auto;
}

.panel {
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--line);
}

.sec-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
}

.count { letter-spacing: 0; }

.texty {
  color: var(--ink-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.danger { color: var(--due); }

.entry {
  padding: 0;
  border-bottom: 1px solid var(--line);
}

.entry.is-overdue { box-shadow: inset 2px 0 0 var(--due); }
.entry.is-current { background: color-mix(in srgb, var(--ink) 4%, transparent); }

.entry-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 9px;
  align-items: start;
  padding: 8px 0;
  cursor: pointer;
  list-style: none;
}

.entry-summary::-webkit-details-marker { display: none; }

.entry-main { min-width: 0; text-align: left; }

.entry-title {
  display: block;
  font-family: var(--serif);
  font-size: 15.5px;
  line-height: 1.3;
}

.countdown {
  align-self: start;
  margin-top: 2px;
  padding: 2px 6px;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 11px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.countdown.is-soon,
.countdown.is-overdue { color: var(--due); border-color: color-mix(in srgb, var(--due) 45%, var(--line)); }
.countdown.is-rolling { color: var(--ink); }
.countdown.is-muted { opacity: 0.65; }

.entry-detail {
  padding: 0 0 12px 0;
  display: grid;
  gap: 10px;
}

.entry-section h3 {
  margin: 0 0 3px;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 500;
}

.entry-section-body {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.entry-section-body p { margin: 0; white-space: pre-wrap; }

.entry-timeline {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 4px;
}

.entry-timeline li {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 8px;
  font-size: 12.5px;
}

.entry-timeline time {
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.entry-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding-top: 2px;
}

.excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 2px;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.entry-meta {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--ink-soft);
  font-size: 12px;
}

.entry-meta .who { display: inline-flex; }
.entry.is-overdue .entry-k,
.entry.is-overdue .countdown.is-overdue,
.entry.is-soon .countdown.is-soon { color: var(--due); }
.entry.is-past .entry-title { color: var(--ink-soft); }

a.jump {
  color: var(--ink);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.empty {
  margin: 6px 0 10px;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-style: italic;
}

#finished-wrap summary {
  cursor: pointer;
  list-style: none;
  padding: 8px 0;
  color: var(--ink-soft);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

#finished-wrap summary::-webkit-details-marker { display: none; }
#finished-wrap summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 6px;
}
#finished-wrap[open] summary::before { transform: rotate(90deg); }

.track-card {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.track-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.track-head .title {
  flex: 1;
  min-width: 0;
  font-family: var(--serif);
  font-size: 15px;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track-card.is-active .title { text-decoration: underline; text-underline-offset: 3px; }

.track-meta {
  margin-top: 2px;
  margin-left: 21px;
  color: var(--ink-soft);
  font-size: 12px;
}

.track-stops {
  margin: 4px 0 0 21px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.track-stop {
  display: flex;
  gap: 8px;
  align-items: baseline;
  width: 100%;
  text-align: left;
  font-size: 12.5px;
}

.track-stop time { flex: none; color: var(--ink-soft); }
.track-stop span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-soft);
}

.note-card {
  width: 100%;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.note-card .entry-title { font-size: 15px; }
.note-card .excerpt { -webkit-line-clamp: 3; }

.talk { flex: 1; display: flex; flex-direction: column; gap: 8px; border-bottom: none; }
#messages { flex: 1; overflow: auto; min-height: 70px; max-height: 220px; }

.msg { padding: 8px 0 10px; border-bottom: 1px solid var(--line); }
.msg header {
  display: flex;
  gap: 6px;
  align-items: center;
  color: var(--ink-soft);
  font-size: 12px;
}
.msg-name { color: var(--ink); }
.msg header .who { display: inline-flex; }
.msg header .texty { margin-left: auto; opacity: 0; }
.msg:hover .texty, .msg .texty:focus { opacity: 1; }
.msg-body {
  margin: 4px 0 0;
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.ref {
  display: inline-block;
  max-width: 100%;
  margin-top: 4px;
  padding: 2px 6px;
  border: 1px solid var(--line);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  text-align: left;
}

.margin-form { display: grid; gap: 8px; }
.about { display: flex; flex-direction: column; gap: 2px; }

.about select,
#margin-text,
.paste,
.field input,
.mark-slot input,
.track-create input {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  padding: 6px 0;
}

.about select {
  text-transform: none;
  letter-spacing: 0;
  font-size: 14px;
  color: var(--ink);
}

#margin-text, .paste {
  border: 1px solid var(--line);
  padding: 8px 10px;
  resize: vertical;
  background: color-mix(in srgb, var(--paper-2) 80%, transparent);
}

#margin-text { min-height: 68px; max-height: 140px; }
.paste {
  min-height: 130px;
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.5;
}

.margin-form .primary { justify-self: end; }

.field input:focus,
.about select:focus,
#margin-text:focus,
.paste:focus,
.mark-slot input:focus,
.track-create input:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 1px 0 var(--ink);
}

::placeholder { color: color-mix(in srgb, var(--ink-soft) 75%, transparent); }

.drawer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.rail h2, #drawer-title {
  margin: 2px 0 0;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.kinds {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 14px 0 6px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  overflow: hidden;
}

.link-row-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.inspect-status {
  min-height: 1.2em;
  margin: 4px 0 8px;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-style: italic;
  font-size: 13.5px;
}

.inspect-status.is-err { color: var(--due); font-style: normal; }

.deadline-choices {
  display: grid;
  gap: 6px;
  margin: 0 0 12px;
}

.deadline-choice {
  display: grid;
  gap: 2px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  text-align: left;
  background: color-mix(in srgb, var(--paper-2) 80%, transparent);
}

.deadline-choice.is-active,
.deadline-choice:hover {
  border-color: var(--ink);
}

.deadline-choice strong {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--due);
}

.deadline-choice span {
  font-family: var(--serif);
  font-size: 15px;
}

.deadline-choice em {
  color: var(--ink-soft);
  font-size: 12.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.submit-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 4px 0 8px;
}

.tag {
  display: inline-flex;
  padding: 2px 7px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

.submit-line {
  margin: 0 0 8px;
  font-size: 13.5px;
  color: var(--ink-soft);
}

.link-row {
  display: grid;
  gap: 2px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}

.link-row:hover .entry-title { text-decoration: underline; text-underline-offset: 2px; }

.link-url {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink-soft);
  font-size: 12px;
}

.kinds button {
  padding: 8px 6px;
  border-right: 1px solid var(--line-strong);
  font-size: 12.5px;
}

.kinds button:last-child { border-right: none; }
.kinds button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

.field { display: block; margin: 12px 0; }
.field > span { display: block; margin-bottom: 2px; }
.hint-inline {
  margin-left: 8px;
  letter-spacing: 0;
  text-transform: none;
  font-size: 12px;
}

.checkline {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 12px;
  font-size: 14px;
}

.reading { margin: 8px 0 14px; padding-top: 12px; border-top: 1px solid var(--line); }

.deadline-banner, .date-banner {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.3;
}

.deadline-banner { color: var(--due); }
.deadline-banner strong { font-weight: 600; }

.prose {
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.prose a, .msg-body a { color: var(--ink); }

mark.due-mark {
  background: var(--due-mark);
  color: var(--due);
  padding: 0 0.12em;
}

#form-status { min-height: 1.2em; margin: 8px 0; font-size: 13.5px; }
#form-status.is-err { color: var(--due); }
#form-status.is-ok { color: var(--ink-soft); font-family: var(--serif); font-style: italic; }

.drawer-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  position: sticky;
  bottom: 0;
  padding: 12px 0 4px;
  background: var(--paper);
  border-top: 1px solid var(--line);
}

.deadline-live { margin: 4px 0 8px; }
.deadline-live:empty, .deadline-live[hidden] { display: none; }

.byline {
  margin: 14px 0 0;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-style: italic;
}

.mark-block, .track-day { margin: 14px 0; }
.mark-slot {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
}

.mark-name { font-size: 13.5px; }
.mark-note { color: var(--ink-soft); font-family: var(--serif); font-style: italic; font-size: 13.5px; }

.day-entry {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-family: var(--serif);
}

.day-entry.is-past { opacity: 0.5; }
.new-entry { margin-top: 8px; padding-top: 4px; }

.track-create {
  display: grid;
  gap: 8px;
  margin: 8px 0 12px;
  padding: 10px;
  border: 1px dashed var(--line-strong);
}

.track-create .row {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.seats.nudge { animation: nudge 0.45s ease; }

@keyframes nudge {
  20% { transform: translateX(-3px); }
  40% { transform: translateX(3px); }
  60% { transform: translateX(-2px); }
  80% { transform: translateX(2px); }
}

@media (max-width: 1100px) {
  .topbar { grid-template-columns: 1fr; gap: 12px; }
  .top-actions { justify-content: flex-start; }
  .workspace,
  .workspace.has-rail { grid-template-columns: 1fr; }
  .sidebar {
    position: static;
    max-height: none;
    border-left: none;
    border-top: 1px solid var(--line);
  }
  .rail {
    position: static;
    max-height: none;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
  .dow { top: 0; }
  .chip .k { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .seats.nudge { animation: none; }
}
