/* Packing App — mobile-first styles. No inline styles are used (strict CSP). */

:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f0f2f5;
  --text: #1b2130;
  --muted: #5f6b7d;
  --border: #dfe3e9;
  --accent: #2563eb;
  --accent-text: #ffffff;
  --accent-weak: #e7efff;
  --ok: #15803d;
  --ok-weak: #e3f5e9;
  --warn: #a15c07;
  --warn-weak: #fdf1dc;
  --danger: #c0262d;
  --danger-weak: #fde8e8;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.08);
  --tap: 44px;
  --nav-h: 60px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1218;
    --surface: #171b23;
    --surface-2: #1f2430;
    --text: #e8ebf1;
    --muted: #9aa4b5;
    --border: #2b3240;
    --accent: #5b9bff;
    --accent-text: #0b1220;
    --accent-weak: #1b2a46;
    --ok: #4ade80;
    --ok-weak: #15301f;
    --warn: #f5b450;
    --warn-weak: #3a2a10;
    --danger: #ff7b7b;
    --danger-weak: #3d1a1c;
    --shadow: none;
    color-scheme: dark;
  }
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 16px);
}

a {
  color: var(--accent);
}

h1 {
  font-size: 1.5rem;
  line-height: 1.2;
  margin: 0;
}

h2 {
  font-size: 1.05rem;
  margin: 0 0 0.5rem;
}

code {
  background: var(--surface-2);
  border-radius: 4px;
  padding: 0.05em 0.35em;
  font-size: 0.9em;
}

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

.hint {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0.4rem 0 0.8rem;
}

[hidden] {
  display: none !important;
}

/* ---------------------------------------------------------------- top bar */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: calc(env(safe-area-inset-top) + 10px) 16px 10px;
  /* Solid background: a backdrop-filter here would trap the fixed bottom nav inside the header. */
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
}

/* Bottom tab bar on phones, inline in the top bar on wider screens. */
.nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: flex;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom);
}

.nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: var(--nav-h);
  color: var(--muted);
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.nav a.is-active {
  color: var(--accent);
}

.nav-ico {
  font-size: 1.3rem;
  line-height: 1;
}

@media (min-width: 760px) {
  body {
    padding-bottom: 40px;
  }
  .nav {
    position: static;
    border: 0;
    background: none;
    padding: 0;
    gap: 4px;
  }
  .nav a {
    flex-direction: row;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    font-size: 0.95rem;
    gap: 6px;
  }
  .nav a.is-active {
    background: var(--accent-weak);
  }
  .nav-ico {
    font-size: 1rem;
  }
}

.banner {
  position: sticky;
  top: calc(env(safe-area-inset-top) + 57px);
  z-index: 15;
  background: var(--warn-weak);
  color: var(--warn);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 8px 16px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

/* ------------------------------------------------------------------- page */

.view {
  max-width: 820px;
  margin: 0 auto;
  padding: 16px;
  outline: none;
}

.loading {
  text-align: center;
  color: var(--muted);
  padding: 3rem 1rem;
}

.page-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  margin: 4px 0 16px;
}

.page-title {
  flex: 1;
  min-width: 0;
}

.page-title h1 {
  overflow-wrap: anywhere;
}

.page-title p {
  margin: 0.25rem 0 0;
}

.trip-note {
  white-space: pre-line;
  font-size: 0.95rem;
}

.back {
  flex-basis: 100%;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

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

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  margin-bottom: 16px;
}

.notice {
  background: var(--accent-weak);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 16px;
}

.empty {
  text-align: center;
  color: var(--muted);
  padding: 2rem 1rem;
}

.empty h1 {
  color: var(--text);
  margin-bottom: 0.5rem;
}

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: var(--tap);
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

.btn:hover {
  background: var(--surface-2);
}

.btn:disabled,
.btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

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

.btn-primary:hover {
  background: color-mix(in srgb, var(--accent) 88%, #000);
}

.btn-danger {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}

.btn-danger:hover {
  background: color-mix(in srgb, var(--danger) 88%, #000);
}

.btn-ghost {
  background: transparent;
}

.btn-danger-text {
  color: var(--danger);
}

.btn-small {
  min-height: 36px;
  padding: 0 10px;
  font-size: 0.875rem;
}

.btn-block {
  width: 100%;
}

.icon-btn {
  min-width: var(--tap);
  padding: 0;
  font-size: 1.25rem;
}

.link-btn {
  background: none;
  border: 0;
  padding: 4px 0;
  color: var(--accent);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.button-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 60%, transparent);
  outline-offset: 2px;
}

/* ----------------------------------------------------------------- forms */

input,
select,
textarea {
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  min-height: var(--tap);
  padding: 8px 12px;
  width: 100%;
  font-size: 16px; /* prevents iOS zoom on focus */
}

textarea {
  resize: vertical;
  min-height: 80px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent);
}

input:disabled,
select:disabled,
textarea:disabled {
  opacity: 0.6;
}

input[type='file'] {
  padding: 8px;
}

.field {
  display: block;
  margin: 0 0 14px;
  border: 0;
  padding: 0;
}

.field > span,
.field > legend {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.field small {
  font-weight: 400;
  color: var(--muted);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.radio-row label,
.check-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  font-size: 0.95rem;
}

.radio-row input,
.check-inline input {
  width: 20px;
  height: 20px;
  min-height: 0;
  margin: 0;
  flex: none;
  accent-color: var(--accent);
}

.form-error {
  color: var(--danger);
  background: var(--danger-weak);
  border-radius: 8px;
  padding: 8px 12px;
  font-weight: 600;
  font-size: 0.9rem;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.toolbar {
  margin: 0 0 12px;
}

.add-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  margin: 20px 0 8px;
}

.add-form-top {
  margin-top: 0;
  margin-bottom: 16px;
}

.add-form .hint {
  margin-bottom: 0;
}

.add-title {
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.add-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.add-grid select {
  grid-column: 1;
  grid-row: 2;
}

.add-grid .btn {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.add-grid-2 .btn {
  grid-row: 1;
}

@media (min-width: 600px) {
  .add-grid {
    grid-template-columns: 1fr 200px auto;
  }
  .add-grid select {
    grid-column: 2;
    grid-row: 1;
  }
  .add-grid .btn {
    grid-column: 3;
    grid-row: 1;
  }
  .add-grid-2 {
    grid-template-columns: 1fr auto;
  }
  .add-grid-2 .btn {
    grid-column: 2;
  }
}

/* --------------------------------------------------------------- progress */

progress {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 8px;
  border: 0;
  border-radius: 999px;
  overflow: hidden;
  background: var(--surface-2);
  display: block;
}

progress::-webkit-progress-bar {
  background: var(--surface-2);
  border-radius: 999px;
}

progress::-webkit-progress-value {
  background: var(--ok);
  border-radius: 999px;
}

progress::-moz-progress-bar {
  background: var(--ok);
  border-radius: 999px;
}

.progress-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px 16px 14px;
  margin-bottom: 14px;
}

.progress-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  text-align: center;
  margin-bottom: 10px;
}

.progress-stats strong {
  display: block;
  font-size: 1.5rem;
  line-height: 1.1;
}

.progress-stats span {
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.progress-stats .accent strong {
  color: var(--accent);
}

/* ------------------------------------------------------------------- tabs */

.tabs {
  display: flex;
  gap: 4px;
  background: var(--surface-2);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 12px;
  overflow-x: auto;
  scrollbar-width: none;
}

.tab {
  flex: 1;
  min-height: 40px;
  padding: 0 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 600;
  font-size: 0.875rem;
  white-space: nowrap;
  cursor: pointer;
}

.tab.is-active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}

.tab-count {
  font-weight: 500;
  opacity: 0.75;
}

@media (max-width: 400px) {
  .tab {
    padding: 0 6px;
    font-size: 0.8rem;
  }
}

/* ------------------------------------------------------------- item rows */

.group {
  margin-bottom: 16px;
}

.group-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin: 0 4px 6px;
}

.group-count {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
}

.rows {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.row {
  display: grid;
  grid-template-columns: 56px 1fr 92px;
  align-items: center;
  min-height: 56px;
  border-top: 1px solid var(--border);
}

.row:first-child {
  border-top: 0;
}

.row-simple {
  grid-template-columns: 1fr auto;
  padding-right: 10px;
}

.row-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 8px;
  min-height: 56px;
  padding: 8px 4px;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  min-width: 0;
}

.row-simple .row-main {
  padding-left: 14px;
}

span.row-main {
  cursor: default;
}

.row-name {
  font-weight: 500;
  overflow-wrap: anywhere;
}

.row-note {
  flex-basis: 100%;
  color: var(--muted);
  font-size: 0.85rem;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.row-meta {
  font-size: 0.85rem;
  white-space: nowrap;
}

.row-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
  padding: 6px 0;
}

.row:not(.is-taken) .row-name {
  color: var(--muted);
}

.row.is-packed .row-name {
  text-decoration: line-through;
  text-decoration-color: color-mix(in srgb, var(--muted) 70%, transparent);
  color: var(--muted);
}

.row.is-taken {
  background: color-mix(in srgb, var(--accent-weak) 35%, var(--surface));
}

.row.is-packed {
  background: color-mix(in srgb, var(--ok-weak) 55%, var(--surface));
}

.is-muted {
  opacity: 0.6;
}

.qty {
  font-weight: 700;
  color: var(--accent);
  font-size: 0.9rem;
}

.badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--surface-2);
  color: var(--muted);
  white-space: nowrap;
  vertical-align: middle;
}

.badge-warn {
  background: var(--warn-weak);
  color: var(--warn);
}

.badge-ok {
  background: var(--ok-weak);
  color: var(--ok);
}

.badge-info {
  background: var(--accent-weak);
  color: var(--accent);
}

.badge-error {
  background: var(--danger-weak);
  color: var(--danger);
}

.badge-muted {
  background: var(--surface-2);
  color: var(--muted);
}

/* The two controls per trip row: "Take" (square, blue) and "Packed" (pill, green). */

.take,
.pack {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 56px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.ctl-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.cb {
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
  padding: 0;
  min-height: 0;
  flex: none;
  cursor: pointer;
  background-repeat: no-repeat;
  background-position: center;
  transition: background-color 0.12s, border-color 0.12s;
}

.cb-take {
  width: 28px;
  height: 28px;
  border: 2px solid color-mix(in srgb, var(--accent) 65%, var(--border));
  border-radius: 8px;
  background-color: var(--surface);
}

.cb-take:checked {
  background-color: var(--accent);
  border-color: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: 20px;
}

.take:has(.cb-take:checked) .ctl-label {
  color: var(--accent);
}

.pack {
  padding: 0 8px;
}

.cb-pack {
  width: 64px;
  height: 30px;
  border: 2px solid var(--border);
  border-radius: 999px;
  background-color: var(--surface-2);
  position: relative;
}

.cb-pack::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s;
}

.cb-pack:checked {
  background-color: var(--ok);
  border-color: var(--ok);
}

.cb-pack:checked::after {
  transform: translateX(34px);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4L18 8.5' fill='none' stroke='%2315803d' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: 16px;
  background-repeat: no-repeat;
  background-position: center;
}

.pack:has(.cb-pack:checked) .ctl-label {
  color: var(--ok);
}

.cb:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.cb:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 60%, transparent);
  outline-offset: 2px;
}

/* ----------------------------------------------------------------- trips */

.cards {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

@media (min-width: 760px) {
  .cards {
    grid-template-columns: 1fr 1fr;
  }
}

.trip-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  color: inherit;
  text-decoration: none;
  height: 100%;
}

.trip-card:hover {
  border-color: var(--accent);
}

.trip-card-head {
  display: flex;
  flex-direction: column;
}

.trip-card-name {
  font-weight: 700;
  font-size: 1.1rem;
  overflow-wrap: anywhere;
}

.trip-card-status {
  font-size: 0.9rem;
  color: var(--muted);
}

.trip-card-status strong {
  color: var(--accent);
}

.trip-card.is-done .trip-card-status {
  color: var(--ok);
  font-weight: 600;
}

/* ---------------------------------------------------------------- import */

.check-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  max-height: 55vh;
  overflow: auto;
}

.check-list li {
  border-top: 1px solid var(--border);
}

.check-list li:first-child {
  border-top: 0;
}

.check-list label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  min-height: var(--tap);
  cursor: pointer;
  flex-wrap: wrap;
}

.check-list input[type='checkbox'] {
  width: 22px;
  height: 22px;
  min-height: 0;
  margin: 0;
  flex: none;
  accent-color: var(--accent);
}

.check-list label > span:first-of-type {
  flex: 1;
  min-width: 0;
}

.check-list small {
  flex-basis: 100%;
  padding-left: 32px;
}

.import-main {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 6px;
  align-items: baseline;
}

.import-main small {
  flex-basis: 100%;
  padding-left: 0;
}

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

.chips .badge {
  font-size: 0.8rem;
  padding: 3px 10px;
}

.help {
  margin-top: 12px;
  font-size: 0.9rem;
  color: var(--muted);
}

.help summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
  min-height: 32px;
}

.copy-tools {
  margin-bottom: 6px;
  font-size: 0.9rem;
}

.archived {
  margin-top: 24px;
}

.archived .rows {
  margin-top: 8px;
}

/* -------------------------------------------------------------- settings */

.kv {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 16px;
  margin: 0;
  font-size: 0.92rem;
}

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

.kv dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.card h2 {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card h2 .link-btn {
  font-size: 0.9rem;
}

.login {
  max-width: 380px;
  margin: 8vh auto 0;
  padding: 24px;
}

.login h1 {
  margin-bottom: 1.25rem;
}

.login .btn-block {
  margin-top: 12px;
}

/* --------------------------------------------------------------- dialogs */

.modal {
  border: 0;
  padding: 0;
  border-radius: 16px;
  width: min(480px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.modal-wide {
  width: min(620px, calc(100vw - 24px));
}

.modal::backdrop {
  background: rgba(10, 14, 22, 0.5);
}

.modal-form {
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 24px);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 8px 0 18px;
}

.modal-head h2 {
  margin: 0;
  font-size: 1.15rem;
}

.modal-body {
  padding: 8px 18px 4px;
  overflow: auto;
}

.modal-body > p:first-child {
  margin-top: 0;
}

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

.dialog-extra {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  border-top: 1px solid var(--border);
  padding-top: 8px;
  margin-top: 4px;
}

.stepper {
  display: flex;
  gap: 6px;
  max-width: 200px;
}

.stepper input {
  text-align: center;
}

.stepper .btn {
  min-width: var(--tap);
  padding: 0;
  font-size: 1.3rem;
}

.menu-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 500;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.menu-item:hover {
  background: var(--surface-2);
}

.menu-item:disabled {
  opacity: 0.45;
}

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

@media (max-width: 520px) {
  .modal {
    width: 100vw;
    max-width: 100vw;
    margin: auto 0 0;
    border-radius: 16px 16px 0 0;
    max-height: 92dvh;
  }
  .modal-form {
    max-height: 92dvh;
  }
  .modal-foot {
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
  }
  .modal-foot .btn {
    flex: 1;
  }
}

/* ----------------------------------------------------------------- toasts */

.toasts {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 12px);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(440px, calc(100vw - 24px));
  pointer-events: none;
}

@media (min-width: 760px) {
  .toasts {
    bottom: 24px;
  }
}

.toast {
  background: #1f2633;
  color: #fff;
  padding: 12px 16px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  font-size: 0.95rem;
  transition: opacity 0.4s, transform 0.4s;
}

.toast-success {
  background: #166534;
}

.toast-warn {
  background: #8a4b05;
}

.toast-error {
  background: #a51d24;
}

.toast-hide {
  opacity: 0;
  transform: translateY(8px);
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
