:root {
  color-scheme: light;
  --bg: oklch(1 0 0);
  --surface: oklch(0.968 0.003 40);
  --surface-strong: oklch(0.928 0.006 40);
  --ink: oklch(0.18 0.017 40);
  --muted: oklch(0.43 0.02 40);
  --line: oklch(0.86 0.006 40);
  --primary: oklch(0.47 0.15 36);
  --primary-hover: oklch(0.42 0.15 36);
  --accent: oklch(0.33 0.105 225);
  --success-bg: oklch(0.91 0.05 150);
  --success-ink: oklch(0.29 0.08 150);
  --disabled-bg: oklch(0.925 0 0);
  --disabled-ink: oklch(0.5 0 0);
  --danger: oklch(0.48 0.17 25);
  --focus: oklch(0.66 0.13 55);
  --shadow: 0 4px 8px oklch(0.18 0.017 40 / 0.08);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

h1,
h2,
h3,
p {
  text-wrap: pretty;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
  text-wrap: balance;
}

h1 {
  font-size: 1.75rem;
  line-height: 1.15;
}

h2 {
  font-size: 1.22rem;
  line-height: 1.2;
}

h3 {
  font-size: 1rem;
}

p {
  line-height: 1.55;
}

.entry-screen {
  display: grid;
  min-height: 100vh;
  padding: 24px;
  place-items: center;
}

.entry-form {
  display: grid;
  width: min(100%, 520px);
  gap: 18px;
  justify-items: center;
  animation: panel-in 220ms ease both;
}

.entry-form h1 {
  max-width: 16ch;
  text-align: center;
}

.entry-control {
  display: grid;
  width: min(100%, 440px);
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  box-shadow: var(--shadow);
}

.admin-login-form {
  justify-items: stretch;
  width: min(100%, 420px);
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  box-shadow: var(--shadow);
}

.admin-login-form h1 {
  max-width: none;
  text-align: left;
}

label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 650;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--ink);
  outline: none;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease;
}

input {
  min-height: 46px;
  padding: 0 14px;
}

.entry-control input {
  border: 0;
  border-radius: 8px;
}

textarea {
  min-height: 96px;
  resize: vertical;
  padding: 12px 13px;
  line-height: 1.5;
}

input::placeholder,
textarea::placeholder {
  color: oklch(0.5 0.018 40);
}

input:focus,
textarea:focus,
button:focus-visible {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px oklch(0.66 0.13 55 / 0.22);
}

.entry-control:focus-within {
  border-color: var(--focus);
  box-shadow:
    var(--shadow),
    0 0 0 3px oklch(0.66 0.13 55 / 0.2);
}

.entry-control input:focus {
  box-shadow: none;
}

textarea[readonly] {
  background: oklch(0.985 0.001 40);
}

.primary-button,
.secondary-button,
.icon-button,
.platform-tab {
  min-height: 42px;
  border-radius: 10px;
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.primary-button {
  border: 0;
  padding: 0 20px;
  background: var(--primary);
  color: var(--bg);
  font-weight: 760;
}

.primary-button:hover {
  background: var(--primary-hover);
}

.primary-button:disabled {
  background: oklch(0.72 0.018 40);
  cursor: wait;
}

.primary-button:active,
.secondary-button:active,
.icon-button:active,
.platform-tab:active,
.choice-option:active {
  transform: translateY(1px);
}

.primary-button.wide {
  width: 100%;
}

.secondary-button {
  border: 1px solid var(--line);
  padding: 0 12px;
  background: var(--bg);
  color: var(--ink);
  font-weight: 650;
}

.secondary-button:hover {
  border-color: oklch(0.72 0.012 40);
  background: var(--surface);
}

.icon-button {
  display: inline-grid;
  width: 36px;
  min-height: 36px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--muted);
}

.icon-button:hover {
  border-color: oklch(0.72 0.012 40);
  color: var(--ink);
  background: var(--surface);
}

.icon-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.form-hint {
  min-height: 20px;
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

.form-hint.error {
  color: var(--danger);
  font-weight: 650;
}

.work-shell {
  display: grid;
  width: min(920px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px 0 44px;
  align-content: start;
  gap: 16px;
}

.admin-shell {
  width: min(1180px, calc(100% - 32px));
}

.work-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 52px;
}

.session-box {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
}

.session-box strong {
  max-width: 220px;
  overflow: hidden;
  padding-left: 8px;
  font-size: 0.94rem;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.platform-stage {
  display: grid;
  min-height: calc(100vh - 152px);
  place-items: center;
}

.platform-card {
  display: grid;
  width: min(100%, 480px);
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  box-shadow: var(--shadow);
  animation: panel-in 220ms ease both;
}

.platform-card h2 {
  text-align: center;
}

.platform-choice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.choice-option {
  display: grid;
  gap: 2px;
  min-height: 76px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  text-align: center;
}

.choice-option span {
  align-self: end;
  font-weight: 780;
}

.choice-option small {
  align-self: start;
  font-size: 0.76rem;
  font-weight: 650;
}

.choice-option:hover {
  color: var(--ink);
  background: oklch(0.985 0.001 40);
}

.choice-option.active {
  border-color: oklch(0.82 0.025 36);
  background: var(--bg);
  color: var(--ink);
  box-shadow: 0 2px 5px oklch(0.18 0.017 40 / 0.08);
}

.loading-panel {
  display: grid;
  min-height: calc(100vh - 152px);
  gap: 12px;
  place-items: center;
  align-content: center;
  color: var(--muted);
  font-weight: 700;
  animation: panel-in 180ms ease both;
}

.loading-panel p {
  margin: 0;
}

.loader-ring {
  width: 44px;
  height: 44px;
  border: 3px solid var(--surface-strong);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: loader-spin 800ms linear infinite;
}

.platform-switch {
  display: inline-grid;
  width: fit-content;
  max-width: 100%;
  grid-template-columns: repeat(2, minmax(128px, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.platform-tab {
  display: grid;
  min-width: 128px;
  gap: 1px;
  border: 0;
  padding: 8px 13px;
  background: transparent;
  color: var(--muted);
  text-align: left;
}

.platform-tab span {
  font-weight: 760;
}

.platform-tab small {
  font-size: 0.74rem;
  font-weight: 650;
}

.platform-tab.active {
  background: var(--bg);
  color: var(--ink);
  box-shadow: 0 2px 5px oklch(0.18 0.017 40 / 0.08);
}

.platform-tab.disabled {
  color: var(--disabled-ink);
}

.task-panel,
.admin-panel {
  display: grid;
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
}

.task-panel.reveal-panel {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 240ms ease,
    transform 240ms ease;
}

.task-panel.reveal-panel.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.section-label {
  margin: 0 0 6px;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 760;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--success-bg);
  color: var(--success-ink);
  font-size: 0.8rem;
  font-weight: 760;
  white-space: nowrap;
}

.status-pill.neutral {
  background: oklch(0.92 0.02 225);
  color: var(--accent);
}

.review-fields {
  display: grid;
  gap: 14px;
}

.form-note {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--primary);
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.otz-form {
  gap: 18px;
}

.otz-field {
  display: grid;
  gap: 8px;
}

.otz-caption {
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 700;
}

.otz-caption .otz-hint {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 500;
}

.nec-star {
  color: var(--danger);
  font-weight: 700;
}

.otz-rating {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: oklch(0.985 0.001 40);
}

.otz-stars {
  color: oklch(0.78 0.16 80);
  font-size: 1.4rem;
  letter-spacing: 3px;
  line-height: 1;
}

.otz-rating-label {
  font-weight: 700;
}

.otz-pick {
  margin-left: auto;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--success-bg);
  color: var(--success-ink);
  font-size: 0.78rem;
  font-weight: 760;
  white-space: nowrap;
}

.otz-buttons {
  display: flex;
  gap: 10px;
}

.otz-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--muted);
  font-weight: 700;
}

.otz-btn.on {
  border-color: var(--success-ink);
  background: var(--success-bg);
  color: var(--success-ink);
}

.otz-radios {
  display: grid;
  gap: 8px;
}

.otz-radio {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.otz-radio .otz-dot {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border: 2px solid var(--line);
  border-radius: 50%;
}

.otz-radio.on {
  border-color: var(--success-ink);
  background: var(--success-bg);
  color: var(--success-ink);
  font-weight: 650;
}

.otz-radio.on .otz-dot {
  border-color: var(--success-ink);
  background:
    radial-gradient(circle, var(--success-ink) 0 4px, transparent 5px);
}

.otz-check {
  margin-left: auto;
  font-style: normal;
  font-weight: 800;
}

.otz-value {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: oklch(0.985 0.001 40);
  font-weight: 700;
}

.otz-photo {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: oklch(0.985 0.001 40);
}

.otz-photo img {
  display: block;
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  border-radius: 8px;
  background: var(--surface);
}

.otz-photo-actions {
  display: flex;
  gap: 8px;
}

.otz-photo-actions .copy-button {
  text-align: center;
  text-decoration: none;
  line-height: 30px;
}

.empty-state {
  padding: 18px;
  border-radius: 10px;
  background: var(--surface);
}

.empty-state p {
  margin: 6px 0 0;
  color: var(--muted);
}

.empty-state.compact {
  margin-top: 12px;
}

select {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--ink);
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

select:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px oklch(0.66 0.13 55 / 0.22);
}

.copy-button {
  align-self: start;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 650;
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}

.copy-button:hover {
  border-color: oklch(0.72 0.012 40);
  color: var(--ink);
  background: var(--surface);
}

.actions-cell {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.btn-danger {
  color: var(--danger);
  border-color: oklch(0.82 0.05 25);
}

.btn-danger:hover {
  background: oklch(0.97 0.01 25);
  border-color: var(--danger);
}

.admin-columns {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
  gap: 16px;
  align-items: start;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}

table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  background: var(--bg);
}

th,
td {
  padding: 12px 13px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--surface);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 760;
}

td {
  font-size: 0.92rem;
}

tr:last-child td {
  border-bottom: 0;
}

.title-cell {
  max-width: 360px;
  font-weight: 650;
}

.row-thumb {
  display: block;
  float: left;
  width: 40px;
  height: 40px;
  margin: 0 10px 2px 0;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-photo-preview {
  display: grid;
  gap: 8px;
  justify-items: start;
}

.admin-photo-preview img {
  width: 100%;
  max-height: 200px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.admin-import {
  display: grid;
  gap: 12px;
  margin-top: 4px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.admin-import h3 {
  margin: 0;
  font-size: 1rem;
}

input[type="file"] {
  padding: 9px 12px;
  min-height: 46px;
}

@media (max-width: 760px) {
  .entry-screen {
    padding: 18px;
  }

  .entry-form h1 {
    font-size: 1.5rem;
  }

  .entry-control {
    grid-template-columns: 1fr;
    padding: 8px;
  }

  .primary-button {
    width: 100%;
  }

  .work-shell,
  .admin-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 16px;
  }

  .work-topbar,
  .panel-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .session-box {
    justify-content: space-between;
  }

  .platform-switch {
    width: 100%;
    grid-template-columns: 1fr 1fr;
  }

  .platform-stage,
  .loading-panel {
    min-height: calc(100vh - 132px);
  }

  .platform-card {
    padding: 18px;
  }

  .platform-choice {
    grid-template-columns: 1fr;
  }

  .platform-tab {
    min-width: 0;
  }

  .admin-columns {
    grid-template-columns: 1fr;
  }
}

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

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .task-panel.reveal-panel,
  .modal-card.reveal-panel {
    opacity: 1;
    transform: none;
  }

  .entry-form,
  .platform-card,
  .loading-panel,
  .stat-card,
  .task-card {
    animation: none;
  }
}

/* ---- Login card ---- */
.login-card {
  width: min(100%, 460px);
  padding: 30px 26px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg);
  box-shadow: var(--shadow);
}

.login-badge {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 14px;
  background: var(--primary);
  color: var(--bg);
  font-size: 1.5rem;
}

.login-sub {
  max-width: 32ch;
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  text-align: center;
}

/* ---- Button spinner ---- */
.primary-button {
  position: relative;
}

.primary-button.small {
  min-height: 36px;
  padding: 0 14px;
  font-size: 0.88rem;
}

.btn-spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid oklch(1 0 0 / 0.4);
  border-top-color: var(--bg);
  border-radius: 50%;
  animation: loader-spin 700ms linear infinite;
}

.primary-button.loading .btn-label {
  visibility: hidden;
}

.primary-button.loading .btn-spinner {
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  margin: -8px 0 0 -8px;
}

/* ---- Account topbar ---- */
.account-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.account-id {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.account-avatar {
  display: grid;
  flex: none;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 12px;
  background: var(--primary);
  color: var(--bg);
  font-size: 1.2rem;
  font-weight: 800;
}

.account-meta {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.account-meta strong {
  overflow: hidden;
  font-size: 1.05rem;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-role {
  color: var(--muted);
  font-size: 0.82rem;
}

/* ---- Tabs ---- */
.account-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  overflow-x: auto;
  scrollbar-width: none;
}

.account-tabs::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  white-space: nowrap;
  transition: background-color 160ms ease, color 160ms ease;
}

.tab-btn.active {
  background: var(--bg);
  color: var(--ink);
  box-shadow: 0 2px 5px oklch(0.18 0.017 40 / 0.08);
}

.tab-count {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  place-items: center;
  border-radius: 999px;
  background: var(--primary);
  color: var(--bg);
  font-size: 0.74rem;
  font-weight: 800;
}

/* ---- Tab panes ---- */
.tab-pane {
  display: grid;
  gap: 16px;
}

.tab-pane.pane-anim {
  animation: panel-in 220ms ease both;
}

.hello-line {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 760;
}

.pane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* ---- Stats ---- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.stat-card {
  display: grid;
  gap: 4px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg);
  box-shadow: var(--shadow);
  animation: panel-in 240ms ease both;
}

.stat-icon {
  font-size: 1.4rem;
  line-height: 1;
}

.stat-value {
  font-size: 1.7rem;
  font-weight: 820;
  line-height: 1.1;
}

.stat-label {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 650;
}

.overview-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(135deg, var(--surface), var(--bg));
}

.overview-cta h2 {
  margin-bottom: 4px;
}

.overview-cta p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

/* ---- Task cards ---- */
.task-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.task-card {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg);
  box-shadow: var(--shadow);
  animation: panel-in 240ms ease both;
}

.task-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.task-platform {
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.task-card-title {
  font-size: 1rem;
  font-weight: 740;
}

.task-card-desc {
  display: -webkit-box;
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  overflow: hidden;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.task-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 2px;
}

.task-date {
  color: var(--muted);
  font-size: 0.8rem;
}

/* ---- Modal ---- */
body.modal-open {
  overflow: hidden;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  padding: 20px;
  place-items: center;
  background: oklch(0.18 0.017 40 / 0.45);
  animation: fade-in 180ms ease both;
}

.modal-card {
  display: grid;
  width: min(100%, 640px);
  max-height: calc(100vh - 40px);
  grid-template-rows: auto 1fr auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg);
  box-shadow: 0 18px 50px oklch(0.18 0.017 40 / 0.3);
}

.modal-card.reveal-panel {
  opacity: 0;
  transform: translateY(18px) scale(0.98);
  transition: opacity 220ms ease, transform 220ms ease;
}

.modal-card.reveal-panel.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}

.modal-body {
  display: grid;
  gap: 16px;
  padding: 20px 22px;
  overflow-y: auto;
}

.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 22px;
  border-top: 1px solid var(--line);
}

.copy-button.copied {
  border-color: var(--success-ink);
  color: var(--success-ink);
  background: var(--success-bg);
}

/* ---- Toast ---- */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  z-index: 60;
  padding: 12px 20px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 650;
  box-shadow: 0 8px 24px oklch(0.18 0.017 40 / 0.3);
  transform: translate(-50%, 20px);
  opacity: 0;
  transition: opacity 240ms ease, transform 240ms ease;
}

.toast.show {
  transform: translate(-50%, 0);
  opacity: 1;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 760px) {
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .overview-cta {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .overview-cta .primary-button {
    width: 100%;
  }

  .task-list {
    grid-template-columns: 1fr;
  }

  .modal-foot {
    flex-direction: column-reverse;
  }

  .modal-foot button {
    width: 100%;
  }
}
