:root {
  color-scheme: light;
  --ink: #18191b;
  --muted: #70757d;
  --line: #dfe3e8;
  --paper: #f7f8f5;
  --panel: #ffffff;
  --panel-soft: #eff2ed;
  --accent: #19765d;
  --accent-dark: #115542;
  --danger: #9e2f3d;
  --shadow: 0 18px 46px rgba(38, 42, 36, 0.11);
  font-family: "Aptos", "Segoe UI", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100dvh;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(24, 25, 27, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(24, 25, 27, 0.035) 1px, transparent 1px),
    var(--paper);
  background-size: 34px 34px;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 282px minmax(0, 1fr);
  min-height: 100dvh;
}

.side-panel {
  position: sticky;
  top: 0;
  height: 100dvh;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 18px;
  padding: 20px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: white;
  font-weight: 900;
  letter-spacing: 0;
}

.brand strong,
.brand small {
  display: block;
}

.brand small,
.section-kicker,
.presence-panel span,
label small,
.recording-card span,
.recording-card small,
.empty-note {
  color: var(--muted);
}

.section-kicker {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.presence-panel,
.backlog-panel,
.inspector,
.topbar {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.presence-panel,
.backlog-panel,
.inspector {
  padding: 16px;
}

.presence-panel {
  display: grid;
  gap: 4px;
}

.online {
  color: var(--accent-dark);
}

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

.panel-title,
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 14px;
}

.panel-title {
  margin-bottom: 14px;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(30px, 4vw, 50px);
  line-height: 1;
}

.week-range {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 12px;
  font-weight: 900;
}

h2 {
  margin-bottom: 0;
  font-size: 18px;
}

.pill {
  min-width: 30px;
  min-height: 28px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.recording-stack {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 280px;
  border: 1px dashed transparent;
  border-radius: 8px;
}

.workspace {
  min-width: 0;
  padding: clamp(14px, 2.3vw, 28px);
  display: grid;
  gap: 16px;
}

.topbar {
  padding: 18px;
}

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

.primary-btn,
.secondary-btn,
.icon-btn {
  border-radius: 8px;
  min-height: 40px;
  border: 1px solid transparent;
  padding: 9px 13px;
  font-weight: 900;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.primary-btn {
  color: white;
  background: var(--accent);
}

.primary-btn:hover {
  background: var(--accent-dark);
}

.secondary-btn,
.icon-btn {
  color: var(--ink);
  border-color: var(--line);
  background: white;
}

.secondary-btn:hover,
.icon-btn:hover {
  background: var(--panel-soft);
}

.primary-btn:active,
.secondary-btn:active,
.icon-btn:active {
  transform: translateY(1px) scale(0.99);
}

.icon-btn {
  width: 40px;
  display: grid;
  place-items: center;
}

.zoom-label {
  min-width: 54px;
  text-align: center;
  color: var(--muted);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 12px;
  font-weight: 900;
}

.notice {
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  background: white;
  padding: 13px 15px;
}

.notice.error {
  border-left-color: var(--danger);
}

.hidden {
  display: none !important;
}

.planner-layout {
  display: grid;
  grid-template-columns: minmax(580px, 1fr) 318px;
  gap: 16px;
  align-items: start;
  min-width: 0;
}

.board-shell {
  min-width: 0;
  overflow: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 10px 10px, rgba(24, 25, 27, 0.08) 1px, transparent 1px),
    rgba(255, 255, 255, 0.68);
  background-size: 22px 22px;
  box-shadow: var(--shadow);
}

.board {
  --scale: 1;
  display: grid;
  grid-template-columns: repeat(6, minmax(calc(168px * var(--scale)), 1fr));
  gap: 10px;
  min-width: calc(1090px * var(--scale));
}

.day-heading {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 10px;
  min-height: 66px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-soft);
}

.day-heading span,
.day-heading em,
.day-heading strong {
  display: block;
}

.day-heading span {
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.day-heading em {
  margin-top: 3px;
  color: var(--accent-dark);
  font-style: normal;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 13px;
  font-weight: 900;
}

.day-heading strong {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.day-add-btn {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--accent-dark);
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.day-add-btn:hover {
  background: rgba(25, 118, 93, 0.1);
  border-color: rgba(25, 118, 93, 0.34);
}

.day-column {
  min-height: calc(640px * var(--scale));
  display: grid;
  grid-template-rows: auto 1fr;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.92);
  transition: background 160ms ease, box-shadow 160ms ease;
}

.day-column.selected {
  box-shadow: inset 0 0 0 2px rgba(25, 118, 93, 0.18);
}

.day-body {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 10px;
}

.drop-ready {
  background: rgba(25, 118, 93, 0.1);
  box-shadow: inset 0 0 0 2px rgba(25, 118, 93, 0.24);
}

.recording-card {
  min-height: 74px;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(24, 25, 27, 0.14);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  background: white;
  box-shadow: 0 12px 28px rgba(38, 42, 36, 0.1);
  cursor: grab;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.recording-card:hover,
.recording-card.selected {
  transform: translateY(-1px);
  border-color: rgba(25, 118, 93, 0.45);
  box-shadow: 0 16px 34px rgba(38, 42, 36, 0.14);
}

.recording-card.long {
  min-height: 104px;
}

.recording-card.dragging {
  opacity: 0.55;
  cursor: grabbing;
}

.recording-card strong,
.recording-card span,
.recording-card small {
  display: block;
}

.recording-card strong {
  font-size: 13px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.recording-card span,
.recording-card small {
  font-size: 11px;
  line-height: 1.35;
}

.recording-form {
  display: grid;
  gap: 12px;
}

.recording-form.disabled {
  opacity: 0.58;
}

label {
  display: grid;
  gap: 7px;
  font-size: 13px;
  font-weight: 900;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
  color: var(--ink);
  padding: 10px 11px;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(25, 118, 93, 0.14);
}

.form-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.empty-note {
  margin: 0;
  padding: 15px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.45;
}

.skeleton {
  min-height: 84px;
  position: relative;
  overflow: hidden;
  background: var(--panel-soft);
}

.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  animation: shimmer 1.2s infinite;
}

@keyframes shimmer {
  to {
    transform: translateX(100%);
  }
}

@media (max-width: 1120px) {
  .app-shell,
  .planner-layout {
    grid-template-columns: 1fr;
  }

  .side-panel,
  .inspector {
    position: static;
    height: auto;
  }
}

@media (max-width: 720px) {
  .workspace,
  .side-panel {
    padding: 14px;
  }

  .topbar,
  .panel-title {
    display: grid;
  }

  .actions,
  .form-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .icon-btn,
  .zoom-label {
    width: 100%;
  }

  .board {
    grid-template-columns: repeat(6, minmax(180px, 1fr));
    min-width: 1160px;
  }
}
