:root {
  --bg0: #e8edf2;
  --bg1: #dfe6ee;
  --ink: #1a2430;
  --muted: #5a6b7d;
  --line: #c5d0dc;
  --card: rgba(255, 255, 255, 0.86);
  --accent: #c45c26;
  --accent-ink: #fff8f3;
  --focus: #2f5d8a;
  --ok: #1f6b4a;
  --danger: #a32323;
  --shadow: 0 18px 40px rgba(26, 36, 48, 0.1);
  --radius: 18px;
  --font-display: "Manrope", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, #f4f7fb 0%, transparent 55%),
    radial-gradient(900px 500px at 100% 0%, #d7e3ef 0%, transparent 50%),
    linear-gradient(165deg, var(--bg0), var(--bg1));
  line-height: 1.45;
}

.page {
  width: min(720px, calc(100% - 1.5rem));
  margin: 0 auto;
  padding: 1.5rem 0 3rem;
}

.page--wide {
  width: min(1180px, calc(100% - 1.5rem));
}

.top {
  margin-bottom: 1.25rem;
  animation: rise 0.5s ease both;
}

.brand {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--focus);
}

.user-badge {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background:
    radial-gradient(900px 500px at 20% 0%, #f4f7fb 0%, transparent 55%),
    linear-gradient(165deg, var(--bg0), var(--bg1));
}

.auth-gate[hidden] {
  display: none;
}

.auth-gate-card {
  width: min(440px, 100%);
  padding: 1.5rem 1.35rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}

.auth-gate-card h1 {
  margin: 0.25rem 0 0.75rem;
  font-family: var(--font-display);
  font-size: 1.45rem;
  line-height: 1.25;
}

.top h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.7rem, 4vw, 2.2rem);
  letter-spacing: -0.02em;
}

.lead {
  margin: 0.55rem 0 0;
  color: var(--muted);
  max-width: 38rem;
}

.mode-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1rem;
  padding: 0.3rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(197, 208, 220, 0.8);
  width: fit-content;
  max-width: 100%;
}

.mode-tab {
  border: 0;
  background: transparent;
  border-radius: 999px;
  padding: 0.55rem 1rem;
  font: inherit;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
}

.mode-tab.is-active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 4px 14px rgba(26, 36, 48, 0.08);
}

.mode-hint {
  margin: 0.7rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.report-view {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}

.report-content {
  margin: 0;
  padding: 1rem;
  border-radius: 14px;
  background: #f3f6f9;
  border: 1px solid var(--line);
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.5;
  max-height: min(55vh, 480px);
  overflow: auto;
}

.success-actions {
  display: grid;
  gap: 0.55rem;
  margin-top: 1rem;
}

.ghost.wide {
  width: 100%;
  border-radius: 14px;
  padding: 0.85rem 1rem;
}

.panel {
  background: var(--card);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.1rem 1.15rem 1.25rem;
  margin-bottom: 1rem;
  animation: rise 0.55s ease both;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.panel-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: flex-end;
}

.panel-head h2,
.success-panel h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 750;
}

.search-wrap input,
label input,
label textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
  font: inherit;
  color: var(--ink);
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search-wrap {
  margin-bottom: 0.75rem;
}

label {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0.9rem;
}

label span {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--muted);
}

label textarea {
  resize: vertical;
  min-height: 2.8rem;
}

label input:focus,
label textarea:focus,
.search-wrap input:focus {
  outline: none;
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(47, 93, 138, 0.18);
}

.row.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.row.three {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.75rem;
}

.field-block-title {
  margin: 0.35rem 0 0.55rem;
  font-family: var(--font-display);
  font-weight: 750;
  font-size: 0.95rem;
}

.field-block-title em {
  font-style: normal;
  font-weight: 500;
  color: var(--muted);
  font-size: 0.85rem;
}

.drone-block {
  margin: 0 0 0.4rem;
}

.drone-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.drone-block-head .field-block-title {
  margin: 0;
}

.ghost.compact {
  flex: 0 0 auto;
  white-space: nowrap;
  padding: 0.4rem 0.7rem;
  font-size: 0.88rem;
}

.drone-periods {
  display: grid;
  gap: 0.55rem;
}

.drone-period {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 0.55rem;
  align-items: end;
}

.drone-period .remove-drone {
  margin-bottom: 0.9rem;
  min-width: 2.4rem;
  padding: 0.7rem 0.55rem;
}

@media (max-width: 560px) {
  .drone-period {
    grid-template-columns: 1fr 1fr;
  }

  .drone-period .remove-drone {
    grid-column: 1 / -1;
    margin-bottom: 0;
  }
}

@media (max-width: 560px) {
  .row.two,
  .row.three {
    grid-template-columns: 1fr;
  }
}

.status {
  color: var(--muted);
  padding: 0.5rem 0.15rem 0.25rem;
}

.status.error {
  color: var(--danger);
}

.task-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
  max-height: min(52vh, 420px);
  overflow: auto;
}

.task-list li button {
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 14px;
  padding: 0.85rem 0.95rem;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
  border-left-width: 4px;
}

.task-list li button.status-planned {
  border-left-color: #2a5f96;
}

.task-list li button.status-progress {
  border-left-color: #1a6b45;
}

.task-list li button.status-review {
  border-left-color: #8a5a12;
}

.task-list li button:hover,
.task-list li button:focus-visible {
  border-color: var(--focus);
  background: #f5f8fb;
  outline: none;
}

.task-list li button:active {
  transform: scale(0.985);
}

.tasks-load-more {
  margin: 0.5rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
  text-align: center;
}

#task-scroll-sentinel {
  height: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
  border: 0;
}

.task-title {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.8rem;
}

.tag--planned {
  background: #e8f0fa;
  color: #2a5f96;
}

.tag--progress {
  background: #e3f5ea;
  color: #1a6b45;
}

.tag--review {
  background: #f7edd8;
  color: #8a5a12;
}

.tag--ok {
  background: #e4f4ec;
  color: var(--ok);
}

.tag--schedule {
  background: #f4efe8;
  color: #6d5c4d;
}

.schedule-empty {
  padding: 0.4rem 0 0.2rem;
}

.schedule-empty p {
  margin: 0 0 0.8rem;
  color: var(--muted);
}

.schedule-items {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 0.85rem;
  min-width: 0;
  max-width: 100%;
}

.schedule-items[hidden] {
  display: none !important;
}

.work-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 5.5rem auto auto;
  gap: 0.45rem;
  align-items: center;
  min-width: 0;
  max-width: 100%;
}

.work-item-select,
.work-item-volume {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
  font: inherit;
  color: var(--ink);
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.work-item-select:focus,
.work-item-volume:focus {
  outline: none;
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(47, 93, 138, 0.18);
}

.work-item-unit {
  min-width: 2rem;
  max-width: 3.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.88rem;
  color: var(--muted);
  white-space: nowrap;
}

.work-item-remove,
.work-item-add {
  justify-self: start;
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.work-item-remove:hover,
.work-item-add:hover {
  border-color: var(--focus);
  color: var(--focus);
  background: #f3f7fb;
  box-shadow: 0 4px 12px rgba(26, 36, 48, 0.08);
}

.work-item-remove:active,
.work-item-add:active {
  transform: translateY(1px);
}

@media (max-width: 560px) {
  .work-item {
    grid-template-columns: minmax(0, 1fr) 4.5rem auto;
    grid-template-areas:
      'select select remove'
      'volume unit remove';
    gap: 0.35rem;
  }

  .work-item-select {
    grid-area: select;
    padding: 0.55rem 0.65rem;
    font-size: 0.9rem;
  }

  .work-item-volume {
    grid-area: volume;
    padding: 0.55rem 0.65rem;
    font-size: 0.9rem;
  }

  .work-item-unit {
    grid-area: unit;
    justify-self: start;
    align-self: center;
    max-width: 3rem;
  }

  .work-item-remove {
    grid-area: remove;
    justify-self: end;
    align-self: start;
    padding: 0.3rem 0.55rem;
    font-size: 0.78rem;
  }
}

.schedule-editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  margin-top: 0.7rem;
}

.schedule-edit-row {
  margin-bottom: 0.45rem;
}

.schedule-edit-row input {
  width: 100%;
  min-width: 0;
}

.schedule-edit-num {
  width: 1.4rem;
  font-weight: 700;
  color: var(--muted);
}

.schedule-scroll {
  overflow: auto;
  max-height: min(72vh, 760px);
  padding: 0;
  border: 1px solid #1a2430;
  border-radius: 14px;
  background: #fff;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.gantt-legend {
  display: flex;
  gap: 1rem;
  padding: 0.55rem 0.75rem;
  color: var(--muted);
  font-size: 0.85rem;
  position: sticky;
  left: 0;
  background: #fff;
  border-bottom: 1px solid #1a2430;
}

.swatch {
  display: inline-block;
  width: 0.85rem;
  height: 0.85rem;
  margin-right: 0.35rem;
  border-radius: 3px;
  vertical-align: -2px;
}

.swatch-plan {
  background: #e85d4c;
}

.swatch-plan-weekend {
  background: #f2c94c;
}

.swatch-fact {
  background: #3e9b62;
}

.gantt {
  border-collapse: separate;
  border-spacing: 0;
  min-width: 100%;
  font-size: 0.78rem;
}

.schedule-edit-head,
.schedule-edit-row {
  display: grid;
  grid-template-columns: 1.4rem minmax(10rem, 1.6fr) 5.5rem 6rem 9.2rem 9.2rem auto;
  gap: 0.45rem;
  align-items: center;
  min-width: 0;
  max-width: 100%;
}

.schedule-editor {
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}

.schedule-edit-head {
  margin-bottom: 0.35rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.schedule-edit-date {
  display: grid;
  gap: 0.2rem;
  margin: 0;
  min-width: 0;
}

.schedule-edit-date span {
  display: none;
  font-size: 0.78rem;
  color: var(--muted);
}

.schedule-edit-date input {
  width: 100%;
  min-width: 0;
}

@media (max-width: 720px) {
  .schedule-edit-head {
    display: none;
  }

  .schedule-edit-date span {
    display: block;
  }

  .schedule-edit-row {
    grid-template-columns: 1.4rem 1fr auto;
    grid-template-areas:
      'num name remove'
      'unit unit unit'
      'volume volume volume'
      'start start start'
      'end end end';
    gap: 0.4rem;
    padding: 0.65rem 0.7rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    margin-bottom: 0.55rem;
  }

  .schedule-edit-row .schedule-edit-num {
    grid-area: num;
  }

  .schedule-edit-row [data-field='name'] {
    grid-area: name;
  }

  .schedule-edit-row [data-field='unit'] {
    grid-area: unit;
  }

  .schedule-edit-row [data-field='volumePlan'] {
    grid-area: volume;
  }

  .schedule-edit-row .schedule-edit-date:has([data-field='start']) {
    grid-area: start;
  }

  .schedule-edit-row .schedule-edit-date:has([data-field='end']) {
    grid-area: end;
  }

  .schedule-edit-row [data-remove] {
    grid-area: remove;
    justify-self: end;
  }
}

.schedule-items-hint {
  margin: -0.2rem 0 0.45rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.gantt th,
.gantt td {
  border-right: 1px solid #1a2430;
  border-bottom: 1px solid #1a2430;
  background: #fff;
  color: #1a2430;
  padding: 0;
  white-space: nowrap;
  overflow: hidden;
}

.gantt thead tr:first-child > th {
  border-top: 1px solid #1a2430;
}

.gantt th:first-child,
.gantt td:first-child {
  border-left: 1px solid #1a2430;
}

.gantt-sticky {
  position: sticky;
  z-index: 5;
  background: #fff !important;
  background-clip: padding-box;
}

.gantt thead .gantt-sticky {
  z-index: 8;
  top: 0;
}

.gantt-num {
  left: 0;
  width: 40px;
  min-width: 40px;
  max-width: 40px;
  text-align: center;
  font-weight: 700;
}

.gantt td.gantt-name {
  white-space: normal;
}

.gantt-name {
  left: 40px;
  width: 220px;
  min-width: 220px;
  max-width: 220px;
  white-space: normal;
  padding: 0.35rem 0.5rem;
  line-height: 1.3;
}

.gantt-unit {
  left: 260px;
  width: 52px;
  min-width: 52px;
  max-width: 52px;
  text-align: center;
}

.gantt-volume {
  left: 312px;
  width: 68px;
  min-width: 68px;
  max-width: 68px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.gantt-kind {
  left: 380px;
  width: 56px;
  min-width: 56px;
  max-width: 56px;
  text-align: center;
  font-weight: 700;
}

.gantt--desktop thead th:nth-child(1) {
  left: 0;
  width: 40px;
  min-width: 40px;
  max-width: 40px;
}

.gantt--desktop thead th:nth-child(2) {
  left: 40px;
  width: 220px;
  min-width: 220px;
  max-width: 220px;
}

.gantt--desktop thead th:nth-child(3) {
  left: 260px;
  width: 52px;
  min-width: 52px;
  max-width: 52px;
}

.gantt--desktop thead th:nth-child(4) {
  left: 312px;
  width: 68px;
  min-width: 68px;
  max-width: 68px;
}

.gantt--desktop thead th:nth-child(5) {
  left: 380px;
  width: 56px;
  min-width: 56px;
  max-width: 56px;
}

.gantt th.gantt-month,
.gantt th.gantt-day {
  position: sticky;
  background: #fff;
  color: #1a2430;
  text-align: center;
  font-weight: 700;
}

.gantt th.gantt-month {
  top: 0;
  z-index: 3;
  padding: 0.35rem 0.15rem;
  overflow: hidden;
  text-overflow: ellipsis;
  border-bottom: 0;
}

.gantt th.gantt-day,
.gantt td.gantt-cell {
  width: 32px;
  min-width: 32px;
  max-width: 32px;
}

.gantt th.gantt-day {
  top: var(--gantt-day-top, 1.85rem);
  border-top: 1px solid #1a2430;
  z-index: 3;
  background: #fff;
  font-weight: 600;
  color: #1a2430;
}

.gantt td.gantt-cell {
  z-index: 1;
}

.gantt-day span,
.gantt-day small {
  display: block;
  line-height: 1.1;
}

.gantt-day small {
  font-weight: 500;
  opacity: 0.75;
}

.gantt th.gantt-day.is-weekend {
  background: #f4f1ec;
  color: #1a2430;
}

.gantt td.gantt-cell.is-weekend {
  background: #f6f3ee;
}

.gantt td.gantt-cell.is-weekend.is-plan,
.gantt td.gantt-cell.is-plan {
  background: #e85d4c;
}

.gantt td.gantt-cell.is-weekend.is-plan-weekend,
.gantt td.gantt-cell.is-plan-weekend {
  background: #f2c94c;
}

.gantt td.gantt-cell.is-weekend.is-fact,
.gantt td.gantt-cell.is-fact {
  background: #3e9b62;
}

.gantt th.gantt-day.is-today {
  background: #dfeaf6;
  color: #1f4467;
}

.gantt td.gantt-cell.is-today:not(.is-plan):not(.is-plan-weekend):not(.is-fact) {
  background: #eef4fb;
}

.gantt-plan .gantt-kind { color: #9a3b32; }
.gantt-fact .gantt-kind { color: #1f6b45; }

.gantt-cell {
  width: 32px;
  min-width: 32px;
  max-width: 32px;
  height: 1.55rem;
  position: relative;
}

.gantt-hit {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.gantt-hit:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: -2px;
}

.gantt-mobile {
  display: none;
}

.gantt-mobile-unified-wrap {
  overflow: auto;
  max-height: min(72vh, 760px);
  max-height: min(72svh, 760px);
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: none;
  border: 1px solid #1a2430;
  border-radius: 12px;
  background: #fff;
}

.gantt--mobile-unified {
  margin: 0;
  font-size: 0.72rem;
}

.gantt--mobile-unified .gantt-mobile-info {
  padding: 0.35rem 0.4rem;
  white-space: normal;
  vertical-align: middle;
  text-align: left;
  line-height: 1.25;
  background: #fff !important;
}

.gantt--mobile-unified .gantt-kind {
  background: #fff !important;
}

.gantt--mobile-unified thead th.gantt-mobile-info {
  left: 0;
  width: 132px;
  min-width: 132px;
  max-width: 132px;
  box-shadow: none;
}

.gantt--mobile-unified td.gantt-mobile-info {
  left: 0;
  width: 132px;
  min-width: 132px;
  max-width: 132px;
}

.gantt--mobile-unified thead th.gantt-kind,
.gantt--mobile-unified td.gantt-kind {
  left: 132px;
  width: 34px;
  min-width: 34px;
  max-width: 34px;
}

.gantt--mobile-unified thead .gantt-mobile-info,
.gantt--mobile-unified thead .gantt-kind {
  z-index: 8;
  top: 0;
}

.gantt-mobile-info-title {
  font-weight: 700;
  font-size: 0.74rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gantt-mobile-info-meta {
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 500;
}

.gantt--mobile-unified th.gantt-month {
  top: 0;
  z-index: 3;
  font-size: 0.7rem;
  padding: 0.3rem 0.1rem;
}

.gantt--mobile-unified th.gantt-day {
  top: var(--gantt-day-top, 1.55rem);
  z-index: 3;
  width: 30px;
  min-width: 30px;
  max-width: 30px;
  font-size: 0.68rem;
}

.gantt--mobile-unified td.gantt-cell {
  width: 30px;
  min-width: 30px;
  max-width: 30px;
  height: 1.4rem;
}

@media (max-width: 720px) {
  .schedule-panel,
  #schedule-board {
    min-width: 0;
    max-width: 100%;
    overflow-x: clip;
  }

  .schedule-scroll {
    overflow: visible;
    max-height: none;
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 0;
  }

  .gantt-legend {
    border: 1px solid #1a2430;
    border-radius: 12px;
    margin-bottom: 0.55rem;
  }
}

.schedule-dialog {
  width: min(640px, calc(100% - 1.5rem));
  border: 0;
  border-radius: 16px;
  padding: 1rem 1rem 1.1rem;
  box-shadow: var(--shadow);
}

.schedule-dialog::backdrop {
  background: rgba(26, 36, 48, 0.45);
}

.schedule-dialog-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
}

.schedule-dialog-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.schedule-dialog-volumes {
  white-space: pre-wrap;
  margin: 0.6rem 0;
  font-weight: 600;
}

.tag--other {
  background: #eaf0f6;
  color: var(--focus);
}

.selected {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.15rem 0.75rem;
  align-items: start;
  padding: 0.8rem 0.9rem;
  margin-bottom: 1rem;
  border-radius: 14px;
  background: linear-gradient(135deg, #f0f5fa, #e8eef5);
  border: 1px solid #d3dde8;
}

.selected .label {
  grid-column: 1 / -1;
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.selected strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
}

.primary,
.ghost,
.linkish {
  font: inherit;
  cursor: pointer;
}

.primary {
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 0.95rem 1rem;
  background: linear-gradient(180deg, #d06630, var(--accent));
  color: var(--accent-ink);
  font-family: var(--font-display);
  font-weight: 750;
  font-size: 1.05rem;
  box-shadow: 0 10px 22px rgba(196, 92, 38, 0.28);
  transition: transform 0.15s ease, filter 0.15s ease;
}

.primary:hover {
  filter: brightness(1.04);
}

.primary:active {
  transform: translateY(1px);
}

.primary:disabled {
  opacity: 0.65;
  cursor: wait;
}

.ghost.wide,
.wizard-nav .ghost {
  border-radius: 14px;
  padding: 0.85rem 1rem;
}

.form-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  margin: 0 0 1rem;
}

.draft-hint {
  margin: 0;
  font-size: 0.88rem;
  color: var(--ok);
}

.wizard-bar {
  margin: 0 0 1.1rem;
}

.wizard-track {
  height: 6px;
  border-radius: 999px;
  background: #d7e0ea;
  overflow: hidden;
}

.wizard-fill {
  display: block;
  height: 100%;
  width: 25%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2f5d8a, #c45c26);
  transition: width 0.25s ease;
}

.wizard-label {
  margin: 0.45rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 500;
}

.form-step[hidden] {
  display: none !important;
}

.form-step.is-active {
  animation: rise 0.35s ease both;
}

.wizard-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-top: 0.35rem;
}

.wizard-nav .primary:only-child,
.wizard-nav .primary[hidden] + .primary,
.wizard-nav .primary:first-child:last-child {
  grid-column: 1 / -1;
}

.wizard-nav #step-next:only-of-type,
.wizard-nav #submit-btn:not([hidden]) {
  grid-column: span 1;
}

.wizard-nav #step-prev[hidden] ~ #step-next:not([hidden]) {
  grid-column: 1 / -1;
}

.wizard-nav #step-prev:not([hidden]) ~ #submit-btn:not([hidden]) {
  grid-column: 2;
}

.wizard-nav #step-prev:not([hidden]) ~ #step-next:not([hidden]) {
  grid-column: 2;
}

@media (max-width: 520px) {
  .wizard-nav {
    grid-template-columns: 1fr;
  }

  .wizard-nav #step-prev[hidden] ~ #step-next:not([hidden]),
  .wizard-nav #step-prev:not([hidden]) ~ #step-next:not([hidden]),
  .wizard-nav #step-prev:not([hidden]) ~ #submit-btn:not([hidden]) {
    grid-column: 1;
  }
}

.ghost {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  color: var(--muted);
}

.linkish {
  border: 0;
  background: transparent;
  color: var(--focus);
  font-weight: 600;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.error {
  color: var(--danger);
  margin: 0 0 0.75rem;
}

.success-panel {
  text-align: center;
  padding: 1.6rem 1.2rem;
}

.ok-badge {
  display: inline-block;
  margin: 0 0 0.6rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: #e4f4ec;
  color: var(--ok);
  font-weight: 600;
  font-size: 0.85rem;
}

.success-panel p {
  color: var(--muted);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
