/* Dannan Luggage — shared foundation
   Layout: storefront is a single 1200px column; POS is a two-pane counter (catalogue | ticket).
   Brand: Dannan purple and orange with a navy band, taken from the shop's printed card. The colours were
   read from a photo, so swap in the designer's exact codes here when we have them. */
:root {
  --paper: #f6f5f9;
  --surface: #ffffff;
  --tile: #ebe8f2;
  --ink: #1d1736;
  --muted: #5d5874;
  --line: #dcd8e6;
  --accent: #5b2ca0;
  --accent-hover: #4a2391;
  --on-accent: #ffffff;
  --tag: #f37a1f;
  --on-tag: #2a1405;
  --band: #24205e;
  --on-band: #efecfa;
  --band-muted: #b7b1d9;
  --logo-purple: #5b2ca0;
  --logo-light: #7c4fca;
  --logo-deep: #2c1f5c;
  --logo-orange: #f37a1f;
  --logo-word: #4a2391;
  --logo-sub: #f37a1f;
  --logo-tag: #2c1f5c;
  --ok: #1c6f46;
  --ok-soft: #ddf0e5;
  --warn: #9a5405;
  --warn-soft: #fbebd4;
  --danger: #b3261e;
  --danger-soft: #f9e0dd;
  --slip: #fbfbf8;
  --slip-ink: #1b1d1c;
  --scrim: rgb(14 10 30 / 0.55);
  --shadow: 0 1px 2px rgb(29 23 54 / 0.06), 0 10px 30px rgb(29 23 54 / 0.12);

  --font-display: "Montserrat", "Helvetica Neue", Arial, system-ui, sans-serif;
  --font-body: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --r-sm: 4px;
  --r-md: 8px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #110e1f;
    --surface: #191530;
    --tile: #221d3c;
    --ink: #ece8f7;
    --muted: #a39dbb;
    --line: #2e2849;
    --accent: #a07ae6;
    --accent-hover: #b796f0;
    --on-accent: #140c2b;
    --tag: #ff8a33;
    --on-tag: #2a1405;
    --band: #1b1745;
    --on-band: #efecfa;
    --band-muted: #a9a2cf;
    --logo-purple: #7c4fca;
    --logo-light: #9b74de;
    --logo-deep: #c9b6f0;
    --logo-orange: #ff8a33;
    --logo-word: #d9c8f7;
    --logo-sub: #ff8a33;
    --logo-tag: #e9e2f7;
    --ok: #5cc28e;
    --ok-soft: #15301f;
    --warn: #f0a54a;
    --warn-soft: #382611;
    --danger: #f0877d;
    --danger-soft: #3a1714;
    --scrim: rgb(0 0 0 / 0.65);
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 10px 30px rgb(0 0 0 / 0.4);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #110e1f;
  --surface: #191530;
  --tile: #221d3c;
  --ink: #ece8f7;
  --muted: #a39dbb;
  --line: #2e2849;
  --accent: #a07ae6;
  --accent-hover: #b796f0;
  --on-accent: #140c2b;
  --tag: #ff8a33;
  --on-tag: #2a1405;
  --band: #1b1745;
  --on-band: #efecfa;
  --band-muted: #a9a2cf;
  --logo-purple: #7c4fca;
  --logo-light: #9b74de;
  --logo-deep: #c9b6f0;
  --logo-orange: #ff8a33;
  --logo-word: #d9c8f7;
  --logo-sub: #ff8a33;
  --logo-tag: #e9e2f7;
  --ok: #5cc28e;
  --ok-soft: #15301f;
  --warn: #f0a54a;
  --warn-soft: #382611;
  --danger: #f0877d;
  --danger-soft: #3a1714;
  --scrim: rgb(0 0 0 / 0.65);
  --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 10px 30px rgb(0 0 0 / 0.4);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
p { margin: 0; }
a { color: inherit; }
img, svg { max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.wrap {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.mono { font-family: var(--font-mono); letter-spacing: 0.02em; }
.num { font-variant-numeric: tabular-nums; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Logo: redrawn from the shop card as outlined vectors; colours follow the theme */
.brand { display: inline-flex; align-items: center; gap: 0.75rem; text-decoration: none; }
.logo { display: block; height: 52px; width: auto; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0 1.15rem;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  background: transparent;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn-ghost { border-color: var(--line); background: var(--surface); color: var(--ink); }
.btn-ghost:hover:not(:disabled) { border-color: var(--ink); }
.btn-sm { min-height: 34px; padding: 0 0.8rem; font-size: 0.85rem; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.link-btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 0.82rem;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.link-btn:hover { color: var(--ink); }

.icon-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  cursor: pointer;
}
.icon-btn:hover { border-color: var(--ink); }
.icon-btn svg { width: 18px; height: 18px; }

/* Baggage-tag label: the punched hole is the one bit of ornament */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  padding: 0.38em 0.6em 0.38em 0.5em;
  border-radius: 2px 6px 6px 2px;
  background: var(--tag);
  color: var(--on-tag);
  font: 600 0.68rem/1 var(--font-mono);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
}
.tag::before {
  content: "";
  width: 0.45em;
  height: 0.45em;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  opacity: 0.55;
}

.proto-label {
  display: inline-block;
  padding: 0.3em 0.5em;
  border-radius: 2px;
  background: var(--tag);
  color: var(--on-tag);
  font: 600 0.66rem/1 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Quantity stepper */
.qty {
  display: inline-flex;
  align-items: stretch;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
}
.qty button {
  width: 42px;
  border: 0;
  background: transparent;
  font-size: 1.15rem;
  cursor: pointer;
}
.qty button:disabled { opacity: 0.35; cursor: not-allowed; }
.qty input, .qty .qty-val {
  width: 2.75rem;
  border: 0;
  background: transparent;
  text-align: center;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  align-self: center;
  -moz-appearance: textfield;
}
.qty input::-webkit-outer-spin-button,
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-sm { height: 34px; }
.qty-sm button { width: 32px; font-size: 1rem; }
.qty-sm .qty-val { width: 2rem; }

/* Dialogs */
dialog {
  padding: 0;
  border: 0;
  background: var(--surface);
  color: var(--ink);
}
dialog::backdrop { background: var(--scrim); }

.modal {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  border-radius: var(--r-md);
  box-shadow: var(--shadow);
}
.modal[open] { display: flex; flex-direction: column; }
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--line);
}
.modal-head h2 { font-size: 1.45rem; }
.modal-body { padding: 1.25rem; overflow: auto; }
.modal-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.6rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--line);
}

/* Toasts */
.toasts {
  position: fixed;
  left: 50%;
  bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
  z-index: 100;
  display: grid;
  gap: 0.5rem;
  width: min(440px, calc(100vw - 32px));
  transform: translateX(-50%);
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--r-sm);
  background: var(--ink);
  color: var(--paper);
  font-size: 0.9rem;
  box-shadow: var(--shadow);
  pointer-events: auto;
  animation: toast-in 0.2s ease-out;
  transition: opacity 0.25s, transform 0.25s;
}
.toast.out { opacity: 0; transform: translateY(6px); }
.toast-action {
  flex: none;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

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