:root {
  color-scheme: light;
  --paper: #f5f6f4;
  --surface: #ffffff;
  --surface-soft: #fafaf8;
  --ink: #202523;
  --ink-soft: #3f4844;
  --muted: #737a76;
  --line: #dddfda;
  --line-strong: #c5c9c1;
  --green: #1f6d5d;
  --green-2: #e2f1ec;
  --gold: #a87508;
  --gold-2: #fff3cf;
  --red: #aa3f4a;
  --red-2: #f9e2e5;
  --blue: #285f87;
  --blue-2: #e4eff5;
  --focus: rgba(31, 109, 93, 0.18);
  --shadow: 0 10px 30px rgba(28, 32, 30, 0.07);
  --radius: 8px;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Yu Gothic", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--paper);
}

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

button {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 62px;
  padding: 12px clamp(18px, 4vw, 44px);
  border-bottom: 1px solid rgba(222, 219, 210, 0.9);
  background: rgba(245, 246, 244, 0.92);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 850;
  text-decoration: none;
  letter-spacing: 0;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

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

.ghost-link {
  color: var(--green);
  font-size: 0.92rem;
  font-weight: 750;
  text-decoration: none;
}

.main {
  width: min(1240px, calc(100% - 36px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.page-grid {
  display: grid;
  gap: 16px;
}

.create-layout,
.event-layout,
.manage-layout {
  grid-template-columns: minmax(330px, 0.78fr) minmax(520px, 1.22fr);
  align-items: start;
}

.manage-layout.wide {
  grid-template-columns: minmax(560px, 1.2fr) minmax(360px, 0.8fr);
  margin-top: 16px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  padding: 24px;
}

.primary-panel,
.response-panel,
.share-panel,
.final-panel {
  position: sticky;
  top: 78px;
}

.section-title {
  display: grid;
  gap: 4px;
  margin-bottom: 18px;
}

.section-title.compact {
  margin-bottom: 12px;
}

.eyebrow {
  margin: 0;
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0;
}

h1,
h2 {
  margin: 0;
  line-height: 1.12;
  letter-spacing: 0;
}

h1 {
  max-width: 14em;
  font-size: 3.15rem;
  font-weight: 860;
}

h2 {
  color: var(--ink-soft);
  font-size: 1.06rem;
  font-weight: 820;
}

.form-stack {
  display: grid;
  gap: 13px;
}

.field {
  display: grid;
  gap: 7px;
}

.field-label,
.share-row > span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 720;
}

.field-control {
  width: 100%;
  min-height: 43px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  padding: 10px 12px;
  outline: none;
  transition: border-color 0.14s ease, box-shadow 0.14s ease, background 0.14s ease;
}

.field-control:hover {
  border-color: var(--line-strong);
}

.field-control:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--focus);
}

.field-control.small {
  min-width: 92px;
  min-height: 38px;
  padding: 8px 9px;
}

textarea.field-control {
  resize: vertical;
}

.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  padding: 9px 14px;
  font-size: 0.92rem;
  font-weight: 760;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease, color 0.12s ease;
}

.button:hover {
  border-color: var(--line-strong);
  background: var(--surface-soft);
  transform: translateY(-1px);
}

.button:active {
  transform: translateY(0);
}

.button.primary {
  border-color: #1b5f51;
  background: var(--green);
  color: #fff;
}

.button.primary:hover {
  background: #185d50;
}

.button.danger {
  border-color: rgba(170, 63, 74, 0.28);
  color: var(--red);
}

.button.line {
  border-color: #20a35a;
  background: #20a35a;
  color: #fff;
}

.button.icon-only {
  width: 40px;
  min-width: 40px;
  padding: 0;
  font-size: 1.12rem;
}

.button-icon {
  font-weight: 900;
}

.form-actions,
.inline-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.form-actions.split {
  justify-content: space-between;
}

.schedule-editor {
  display: grid;
  gap: 14px;
}

.schedule-tools {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.bulk-controls,
.date-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.range-mark {
  color: var(--muted);
  font-weight: 800;
}

.calendar {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.calendar-nav,
.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.calendar-nav {
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  padding: 9px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
  text-align: center;
}

.calendar-weekdays {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-align: center;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.calendar-weekdays span {
  padding: 8px 0;
}

.calendar-grid {
  gap: 1px;
  background: var(--line);
}

.calendar-day,
.calendar-pad {
  min-height: 44px;
  border: 0;
  background: var(--surface);
}

.calendar-day {
  color: var(--ink);
  cursor: pointer;
  font-weight: 760;
}

.calendar-day:hover {
  background: #eef0eb;
}

.calendar-day.selected {
  background: var(--green);
  color: #fff;
}

.date-rows {
  display: grid;
  gap: 8px;
}

.date-row {
  justify-content: space-between;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.date-label {
  min-width: 86px;
  font-weight: 820;
}

.event-view {
  display: grid;
  gap: 16px;
}

.event-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.event-memo {
  max-width: 760px;
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.7;
  white-space: pre-wrap;
}

.status-banner {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  padding: 8px 13px;
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 760;
  white-space: nowrap;
}

.status-banner.confirmed {
  border-color: rgba(31, 109, 93, 0.22);
  background: var(--green-2);
  color: var(--green);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--gold);
}

.status-banner.confirmed .status-dot {
  background: var(--green);
}

.best-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  border: 1px solid rgba(40, 95, 135, 0.16);
  border-radius: var(--radius);
  background: var(--blue-2);
  padding: 11px 13px;
}

.best-label {
  color: var(--blue);
  font-size: 0.88rem;
  font-weight: 850;
  white-space: nowrap;
}

.best-items {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.best-chip {
  border: 1px solid rgba(40, 95, 135, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  padding: 7px 10px;
  font-size: 0.86rem;
  font-weight: 760;
}

.muted {
  color: var(--muted);
}

.status-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.status-choice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 43px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
}

.status-choice.ok.active,
.slot-cell.ok,
.matrix-status.ok {
  background: var(--green-2);
  color: var(--green);
}

.status-choice.maybe.active,
.slot-cell.maybe,
.matrix-status.maybe {
  background: var(--gold-2);
  color: var(--gold);
}

.status-choice.ng.active,
.slot-cell.ng,
.matrix-status.ng {
  background: var(--red-2);
  color: var(--red);
}

.status-symbol {
  font-size: 1.08rem;
  line-height: 1;
}

.paint-scroll,
.matrix-scroll {
  overflow: auto;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overscroll-behavior: contain;
}

.paint-scroll.painting {
  overflow: hidden;
}

.paint-grid {
  display: grid;
  min-width: max-content;
}

.paint-grid.editable {
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.grid-corner,
.grid-date,
.grid-time,
.slot-cell {
  min-height: 42px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.grid-corner,
.grid-date,
.grid-time {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.grid-time {
  position: sticky;
  left: 0;
  z-index: 2;
}

.grid-corner {
  position: sticky;
  left: 0;
  z-index: 3;
}

.slot-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 68px;
  border-top: 0;
  border-left: 0;
  font-weight: 920;
}

button.slot-cell {
  cursor: pointer;
}

.slot-cell.can-paint:active {
  transform: scale(0.97);
}

.slot-cell.missing {
  background: repeating-linear-gradient(135deg, #f0f1ed, #f0f1ed 6px, #e5e8e3 6px, #e5e8e3 12px);
}

.slot-cell.best,
.best-col {
  box-shadow: inset 0 0 0 2px rgba(40, 95, 135, 0.3);
}

.slot-cell.final,
.final-col {
  outline: 2px solid var(--green);
  outline-offset: -2px;
}

.matrix-table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.matrix-table th,
.matrix-table td {
  min-width: 72px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 9px 8px;
  text-align: center;
  vertical-align: middle;
}

.matrix-table thead th {
  position: sticky;
  top: 0;
  z-index: 4;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.sticky-col {
  position: sticky;
  left: 0;
  z-index: 5;
  min-width: 148px;
  max-width: 220px;
  background: var(--surface);
}

.participant-head {
  background: var(--surface-soft);
}

.participant-cell {
  text-align: left;
}

.participant-name,
.participant-comment,
.date-line,
.time-line {
  display: block;
}

.participant-name {
  font-weight: 820;
}

.participant-comment {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.35;
  white-space: pre-wrap;
}

.matrix-status {
  font-weight: 900;
}

.totals-row th,
.totals-row td {
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 820;
}

.share-tools {
  display: grid;
  gap: 12px;
}

.share-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 40px;
  align-items: center;
  gap: 8px;
}

.empty-state,
.center-state {
  display: grid;
  place-items: center;
  min-height: 150px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--muted);
  font-weight: 760;
  text-align: center;
  padding: 20px;
}

.empty-state.tight {
  min-height: 68px;
}

.center-state {
  min-height: 50vh;
  gap: 12px;
}

.loader {
  width: 34px;
  height: 34px;
  border: 4px solid var(--line);
  border-top-color: var(--green);
  border-radius: 999px;
  animation: spin 0.85s linear infinite;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 100;
  max-width: min(420px, calc(100vw - 36px));
  border: 1px solid rgba(31, 109, 93, 0.25);
  border-radius: var(--radius);
  background: var(--green);
  color: #fff;
  padding: 12px 14px;
  box-shadow: var(--shadow);
  font-weight: 780;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.toast.error {
  border-color: rgba(170, 63, 74, 0.32);
  background: var(--red);
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1100px) {
  .main {
    width: min(100% - 28px, 980px);
  }

  .create-layout,
  .event-layout,
  .manage-layout,
  .manage-layout.wide {
    grid-template-columns: 1fr;
  }

  .primary-panel,
  .response-panel,
  .share-panel,
  .final-panel {
    position: static;
  }

  .event-hero {
    grid-template-columns: 1fr;
    align-items: start;
  }

  h1 {
    font-size: 2.55rem;
  }
}

@media (max-width: 760px) {
  .main {
    width: min(100% - 20px, 720px);
    padding: 18px 0 42px;
  }

  .topbar {
    min-height: 56px;
    padding: 10px 12px;
  }

  .panel,
  .event-hero {
    padding: 16px;
  }

  h1 {
    font-size: 2.08rem;
  }

  .two-col {
    grid-template-columns: 1fr;
  }

  .status-picker {
    position: sticky;
    top: 56px;
    z-index: 10;
    padding: 8px 0;
    background: rgba(245, 246, 244, 0.94);
    backdrop-filter: blur(10px);
  }

  .status-choice {
    min-height: 42px;
    padding: 6px 4px;
    font-size: 0.86rem;
  }

  .schedule-tools,
  .bulk-controls,
  .date-row,
  .form-actions.split {
    align-items: stretch;
    flex-direction: column;
  }

  .bulk-controls .field-control,
  .date-row .field-control,
  .bulk-controls .button,
  .date-row .button {
    width: 100%;
  }

  .range-mark {
    text-align: center;
  }

  .calendar-day,
  .calendar-pad {
    min-height: 42px;
  }

  .paint-scroll,
  .matrix-scroll {
    margin-right: -4px;
  }

  .grid-corner,
  .grid-date,
  .grid-time,
  .slot-cell {
    min-height: 46px;
  }

  .grid-time,
  .grid-corner {
    min-width: 64px;
  }

  .slot-cell {
    min-width: 58px;
    font-size: 1rem;
  }

  .matrix-table th,
  .matrix-table td {
    min-width: 64px;
    padding: 8px 7px;
  }

  .sticky-col {
    min-width: 132px;
  }

  .share-row {
    grid-template-columns: 1fr 40px;
  }

  .share-row > span {
    grid-column: 1 / -1;
  }

  .best-strip {
    align-items: flex-start;
    flex-direction: column;
  }

  .status-banner {
    white-space: normal;
  }
}

@media (max-width: 420px) {
  .main {
    width: min(100% - 14px, 420px);
  }

  .brand-mark {
    width: 30px;
    height: 30px;
  }

  .panel,
  .event-hero {
    padding: 14px;
  }

  h1 {
    font-size: 1.86rem;
  }

  .button {
    width: 100%;
  }

  .button.icon-only,
  .share-row .button {
    width: 40px;
  }

  .inline-actions,
  .form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .status-picker {
    gap: 6px;
  }

  .status-choice {
    gap: 4px;
    font-size: 0.8rem;
  }
}

/* Usability scale overrides */
:root {
  font-size: 17px;
}

.topbar {
  min-height: 68px;
  padding: 14px clamp(18px, 4vw, 44px);
}

.ghost-link,
.button {
  font-size: 1rem;
}

.main {
  width: min(1280px, calc(100% - 28px));
  padding-top: 24px;
}

.page-grid {
  gap: 18px;
}

.panel {
  padding: 28px;
}

.primary-panel,
.response-panel,
.share-panel,
.final-panel {
  top: 84px;
}

.eyebrow {
  font-size: 0.82rem;
}

h1 {
  font-size: 3.35rem;
}

h2 {
  font-size: 1.22rem;
}

.field-label,
.share-row > span {
  font-size: 0.94rem;
}

.field-control {
  min-height: 52px;
  padding: 13px 14px;
  font-size: 1rem;
}

.field-control.small {
  min-height: 46px;
  padding: 10px 11px;
}

.button {
  min-height: 48px;
  padding: 12px 16px;
}

.button.icon-only {
  width: 48px;
  min-width: 48px;
  font-size: 1.22rem;
}

.calendar-nav {
  padding: 11px;
}

.calendar-weekdays,
.grid-corner,
.grid-date,
.grid-time,
.matrix-table thead th {
  font-size: 0.88rem;
}

.calendar-day,
.calendar-pad {
  min-height: 54px;
}

.date-row {
  padding: 12px;
}

.event-hero {
  padding: 30px;
}

.status-banner {
  min-height: 46px;
  padding: 10px 15px;
  font-size: 1rem;
}

.best-strip {
  min-height: 64px;
  padding: 13px 15px;
}

.best-label {
  font-size: 1rem;
}

.best-chip {
  padding: 9px 12px;
  font-size: 0.96rem;
}

.status-choice {
  min-height: 52px;
  font-size: 1rem;
}

.status-symbol {
  font-size: 1.24rem;
}

.grid-corner,
.grid-date,
.grid-time,
.slot-cell {
  min-height: 50px;
}

.slot-cell {
  min-width: 72px;
  font-size: 1.12rem;
}

.grid-time,
.grid-corner {
  min-width: 78px;
}

.matrix-table th,
.matrix-table td {
  min-width: 78px;
  padding: 11px 10px;
}

.sticky-col {
  min-width: 160px;
}

.empty-state,
.center-state {
  min-height: 170px;
}

.empty-state.tight {
  min-height: 78px;
}

.toast {
  max-width: min(480px, calc(100vw - 28px));
  padding: 14px 16px;
}

@media (max-width: 1100px) {
  .main {
    width: min(100% - 22px, 980px);
  }

  h1 {
    font-size: 2.75rem;
  }
}

@media (max-width: 760px) {
  :root {
    font-size: 18px;
  }

  .main {
    width: min(100% - 14px, 720px);
    padding-top: 14px;
  }

  .topbar {
    min-height: 62px;
    padding: 12px 10px;
  }

  .panel,
  .event-hero {
    padding: 18px;
  }

  h1 {
    font-size: 2.32rem;
  }

  .status-picker {
    top: 62px;
  }

  .status-choice {
    min-height: 52px;
    padding: 8px 6px;
    font-size: 0.98rem;
  }

  .calendar-day,
  .calendar-pad {
    min-height: 50px;
  }

  .grid-corner,
  .grid-date,
  .grid-time,
  .slot-cell {
    min-height: 54px;
  }

  .grid-time,
  .grid-corner {
    min-width: 78px;
  }

  .slot-cell {
    min-width: 72px;
    font-size: 1.14rem;
  }

  .matrix-table th,
  .matrix-table td {
    min-width: 74px;
    padding: 10px 9px;
  }

  .sticky-col {
    min-width: 150px;
  }
}

@media (max-width: 420px) {
  .main {
    width: min(100% - 10px, 420px);
  }

  .panel,
  .event-hero {
    padding: 16px;
  }

  h1 {
    font-size: 2.08rem;
  }

  .button.icon-only,
  .share-row .button {
    width: 48px;
  }

  .status-choice {
    font-size: 0.92rem;
  }
}
/* Schedule layout refinements */
.schedule-editor {
  gap: 12px;
}

.schedule-tools {
  align-items: flex-start;
  gap: 12px;
}

.schedule-tools .section-title {
  margin-bottom: 0;
}

.schedule-control-stack {
  display: flex;
  justify-content: flex-end;
  min-width: min(100%, 520px);
}

.bulk-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  width: 100%;
}

.time-range {
  display: grid;
  grid-template-columns: minmax(104px, 1fr) auto minmax(104px, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 230px;
}

.time-range .field-control.small {
  min-width: 0;
  width: 100%;
}

.reset-button {
  border-color: rgba(170, 63, 74, 0.24);
  color: var(--red);
}

.date-rows {
  gap: 10px;
}

.date-row {
  display: grid;
  grid-template-columns: minmax(92px, 1fr) minmax(238px, 0.8fr) 48px;
  align-items: center;
  gap: 10px;
  justify-content: initial;
}

.date-row .date-label {
  min-width: 0;
}

.date-time-range {
  width: 100%;
  min-width: 0;
}

@media (max-width: 1100px) {
  .schedule-control-stack {
    min-width: 0;
    width: 100%;
  }

  .bulk-controls {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .schedule-tools {
    display: grid;
    align-items: start;
    gap: 10px;
  }

  .bulk-controls,
  .date-row {
    flex-direction: row;
    align-items: center;
  }

  .bulk-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 8px;
  }

  .bulk-controls .field-control,
  .bulk-controls .button {
    width: auto;
  }

  .bulk-controls .time-range {
    min-width: 0;
    width: 100%;
  }

  .date-row {
    grid-template-columns: minmax(0, 1fr) 48px;
    gap: 8px;
  }

  .date-row .date-label {
    grid-column: 1 / -1;
  }

  .date-time-range {
    grid-column: 1;
    min-width: 0;
  }

  .date-row .button.icon-only {
    grid-column: 2;
    width: 48px;
  }
}

@media (max-width: 420px) {
  .bulk-controls {
    grid-template-columns: 1fr 1fr;
  }

  .bulk-controls .time-range {
    grid-column: 1 / -1;
  }

  .bulk-controls .button {
    width: 100%;
  }

  .time-range {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 6px;
  }
}
/* Final compact-width time range fix */
@media (max-width: 760px) {
  .bulk-controls .time-range {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  }
}
/* Calendar border rendering fix */
.calendar-grid {
  gap: 0;
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.calendar-day,
.calendar-pad {
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.calendar-grid > :nth-child(7n) {
  border-right: 0;
}

.calendar-day.selected {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.34);
}
/* Unified event page and horizontal time grid */
.event-tools-layout {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.72fr);
  align-items: start;
}

.event-tools-layout .panel,
.organizer-panel {
  position: static;
}

.organizer-actions {
  gap: 10px;
}

.paint-grid.horizontal-time .grid-time {
  position: sticky;
  top: 0;
  left: auto;
  z-index: 3;
}

.paint-grid.horizontal-time .grid-corner {
  top: 0;
  left: 0;
  z-index: 4;
}

.paint-grid.horizontal-time .row-date {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 92px;
  justify-content: flex-start;
  padding: 0 10px;
  text-align: left;
}

.paint-grid.horizontal-time .slot-cell {
  min-width: 64px;
}

.schedule-control-stack {
  min-width: min(100%, 580px);
}

.bulk-controls {
  flex-wrap: nowrap;
}

.date-row {
  grid-template-columns: minmax(92px, 0.72fr) minmax(260px, 1fr) 48px;
}

@media (min-width: 1101px) {
  :root {
    font-size: 16px;
  }

  .topbar {
    min-height: 60px;
    padding: 10px clamp(20px, 3vw, 38px);
  }

  .brand-mark {
    width: 30px;
    height: 30px;
  }

  .main {
    width: min(1160px, calc(100% - 72px));
    padding-top: 20px;
  }

  .page-grid,
  .event-view {
    gap: 14px;
  }

  .create-layout {
    grid-template-columns: minmax(320px, 0.74fr) minmax(460px, 1.26fr);
  }

  .event-layout {
    grid-template-columns: minmax(420px, 0.9fr) minmax(500px, 1.1fr);
  }

  .event-tools-layout {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.68fr);
  }

  .panel {
    padding: 22px;
  }

  .event-hero {
    padding: 24px;
  }

  h1 {
    font-size: 2.65rem;
  }

  h2 {
    font-size: 1.08rem;
  }

  .field-control {
    min-height: 46px;
    padding: 11px 12px;
  }

  .field-control.small {
    min-height: 42px;
    padding: 9px 10px;
  }

  .button {
    min-height: 44px;
    padding: 10px 14px;
  }

  .button.icon-only {
    width: 44px;
    min-width: 44px;
  }

  .calendar-day,
  .calendar-pad {
    min-height: 48px;
  }

  .best-strip {
    min-height: 56px;
    padding: 11px 13px;
  }

  .status-choice {
    min-height: 48px;
  }

  .grid-corner,
  .grid-date,
  .grid-time,
  .slot-cell {
    min-height: 44px;
  }

  .slot-cell {
    min-width: 64px;
    font-size: 1rem;
  }

  .matrix-table th,
  .matrix-table td {
    min-width: 72px;
    padding: 9px 8px;
  }

  .sticky-col {
    min-width: 148px;
  }
}

@media (max-width: 1100px) {
  .event-tools-layout {
    grid-template-columns: 1fr;
  }

  .organizer-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .paint-grid.horizontal-time .row-date {
    min-width: 88px;
    padding: 0 8px;
  }

  .paint-grid.horizontal-time .slot-cell {
    min-width: 66px;
  }

  .date-row {
    grid-template-columns: minmax(0, 1fr) 48px;
  }
}
/* Footer and SEO support pages */
.site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 24px 18px 36px;
  color: var(--muted);
  font-size: 0.86rem;
}

.site-footer a {
  color: var(--green);
  font-weight: 760;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.static-page {
  width: min(860px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 64px;
}

.static-page article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: clamp(22px, 5vw, 42px);
}

.static-page h1 {
  max-width: none;
  font-size: clamp(2rem, 4vw, 3rem);
}

.static-page h2 {
  margin-top: 28px;
  color: var(--ink);
  font-size: 1.16rem;
}

.static-page p,
.static-page li {
  color: var(--ink-soft);
  line-height: 1.8;
}

.static-page ul {
  padding-left: 1.3em;
}
