:root {
  color-scheme: dark;
  --bg: #0c100b;
  --panel: #141a12;
  --panel-glass: rgba(20, 27, 17, 0.72);
  --muted: #a4ab98;
  --text: #f0ead8;
  --purple: #c47b42;
  --purple-bright: #df9b60;
  --pink: #a66c3d;
  --cyan: #a8b785;
  --emerald: #98ae77;
  --line: rgba(168, 146, 94, 0.22);
  --line-soft: rgba(255, 255, 255, 0.08);
  --glow-purple: 0 10px 34px -6px rgba(109, 131, 76, 0.45);
  --glow-card: 0 20px 45px -15px rgba(0, 0, 0, 0.75), 0 0 28px rgba(168, 146, 94, 0.14);
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  background-image:
    radial-gradient(ellipse 65% 40% at 12% -5%, rgba(109, 131, 76, 0.18), transparent 60%),
    radial-gradient(ellipse 55% 35% at 88% 8%, rgba(180, 117, 61, 0.12), transparent 55%),
    radial-gradient(ellipse 50% 40% at 50% 100%, rgba(147, 168, 109, 0.08), transparent 65%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

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

button, a, input, select, textarea {
  -webkit-tap-highlight-color: transparent;
}

button, a {
  touch-action: manipulation;
}

button {
  cursor: pointer;
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

h1, h2, h3, p {
  margin: 0;
}

html h1 {
  font-weight: 800;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -1.6px;
  line-height: 1.12;
}

html h2 {
  font-weight: 750;
  font-size: 20px;
  letter-spacing: -0.5px;
}

html h3 {
  font-weight: 700;
  font-size: 16px;
}

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

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

.small {
  font-size: 12px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 2.2px;
  color: #cfab7d;
  text-transform: uppercase;
}

.accent {
  color: #e5c49a;
}

.danger {
  color: #fda4af;
}

.success {
  color: #b2c58c;
}

.row {
  display: flex;
  align-items: center;
  gap: 12px;
}

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

.stack {
  display: grid;
  gap: 16px;
}

.wrap {
  flex-wrap: wrap;
}

.grow {
  flex: 1;
  min-width: 0;
}

.btn, .icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  border-radius: 13px;
  padding: 10px 18px;
  font-weight: 600;
  transition: background 0.2s, border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}

.btn:hover, .icon-button:hover {
  background: rgba(168, 146, 94, 0.16);
  border-color: rgba(168, 146, 94, 0.55);
  box-shadow: 0 0 20px rgba(168, 146, 94, 0.18);
}

.btn:active, .icon-button:active {
  transform: translateY(1px);
}

.btn.primary {
  background: linear-gradient(135deg, #ae6836 0%, #df9b60 55%, #ad6634 100%);
  border-color: rgba(222, 191, 142, 0.45);
  color: #f5efdf;
  box-shadow: var(--glow-purple);
}

.btn.primary:hover {
  background: linear-gradient(135deg, #c47b42 0%, #edb07d 55%, #a66c3d 100%);
  border-color: rgba(238, 217, 180, 0.7);
  box-shadow: 0 12px 38px -4px rgba(168, 146, 94, 0.6);
}

.btn.danger {
  background: rgba(244, 63, 94, 0.1);
  color: #fda4af;
  border-color: rgba(244, 63, 94, 0.28);
}

.btn.danger:hover {
  background: rgba(244, 63, 94, 0.2);
  border-color: rgba(244, 63, 94, 0.55);
}

.btn.tiny {
  padding: 7px 12px;
  min-height: 34px;
  font-size: 12px;
  border-radius: 10px;
}

.icon-button {
  width: 42px;
  padding: 0;
  flex-shrink: 0;
}

.icon {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.panel {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.045) 0%, rgba(255, 255, 255, 0.018) 100%);
  border: 1px solid var(--line);
  border-radius: 20px;
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.65);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.4px;
  padding: 5px 10px;
  border-radius: 8px;
  background: rgba(32, 40, 24, 0.88);
  color: #e8ddbd;
  border: 1px solid rgba(168, 146, 94, 0.38);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.badge.cyan {
  background: rgba(31, 44, 24, 0.9);
  color: #c5d6ab;
  border-color: rgba(147, 168, 109, 0.4);
}

.badge.pink {
  background: rgba(52, 34, 20, 0.9);
  color: #e0b38a;
  border-color: rgba(180, 117, 61, 0.45);
}

.badge.gray {
  background: rgba(31, 37, 26, 0.9);
  color: #a7ad9c;
  border-color: rgba(255, 255, 255, 0.14);
}

.age-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 3px 7px;
  border-radius: 6px;
  color: #e0b38a;
  background: rgba(180, 117, 61, 0.14);
  border: 1px solid rgba(180, 117, 61, 0.38);
}

.field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.field > span, .field > label {
  font-size: 12px;
  font-weight: 600;
  color: #c8cfb9;
}

input:not([type=checkbox]):not([type=file]), select, textarea {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 11px 14px;
  color: var(--text);
  background: rgba(17, 24, 14, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}

input::placeholder, textarea::placeholder {
  color: #8b9481;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--purple-bright);
  box-shadow: 0 0 0 3px rgba(168, 146, 94, 0.16);
  background: #1b2317;
}

input[type=checkbox] {
  accent-color: var(--purple-bright);
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

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

select {
  cursor: pointer;
}

option {
  background: #192014;
}

label.check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #cdd2c1;
  cursor: pointer;
  min-height: 42px;
  user-select: none;
}

.error {
  font-size: 13px;
  color: #fda4af;
  padding: 12px 15px;
  background: rgba(54, 18, 34, 0.85);
  border: 1px solid rgba(244, 63, 94, 0.4);
  border-radius: 12px;
}

.empty {
  padding: 68px 24px;
  text-align: center;
  border: 1px dashed rgba(168, 146, 94, 0.32);
  background: radial-gradient(circle at 50% 0%, rgba(168, 146, 94, 0.07), transparent 70%);
  border-radius: 20px;
  color: var(--muted);
  grid-column: 1 / -1;
}

.empty h3 {
  color: var(--text);
  margin-bottom: 6px;
}

.empty .btn {
  margin-top: 18px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  white-space: nowrap;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.6px;
}

.logo-mark {
  width: 36px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(140deg, #df9b60 0%, #ae6836 55%, #a66c3d 100%);
  box-shadow: 0 0 26px rgba(168, 146, 94, 0.42);
  color: white;
}

.logo-mark svg {
  width: 22px;
  height: 22px;
}

.logo span:last-child {
  background: linear-gradient(95deg, #f5efdf 20%, #e5c49a 70%, #e0b38a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.offline {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  background: #31251b;
  padding: 12px 18px;
  border: 1px solid #765338;
  border-radius: 12px;
  max-width: calc(100% - 32px);
  text-align: center;
}

dialog {
  padding: 0;
  background: #151b12;
  color: var(--text);
  border: 1px solid rgba(168, 146, 94, 0.38);
  border-radius: 24px;
  box-shadow: 0 35px 120px rgba(0, 0, 0, 0.85), 0 0 50px rgba(109, 131, 76, 0.18);
  max-height: 90dvh;
  max-width: calc(100% - 24px);
  width: 780px;
}

dialog::backdrop {
  background: rgba(6, 10, 5, 0.82);
  backdrop-filter: blur(12px);
}

dialog[open] {
  animation: appear 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.dialog-head {
  padding: 22px 26px;
  position: sticky;
  top: 0;
  background: rgba(21, 27, 18, 0.94);
  backdrop-filter: blur(12px);
  z-index: 2;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.dialog-body {
  padding: 26px;
}

.dialog-foot {
  padding: 18px 26px;
  position: sticky;
  bottom: 0;
  background: rgba(21, 27, 18, 0.94);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  max-width: min(400px, calc(100% - 32px));
  z-index: 150;
  background: rgba(26, 35, 20, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(168, 146, 94, 0.5);
  border-radius: 14px;
  padding: 14px 18px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.65);
  animation: appear 0.18s ease-out;
}

.toast.is-error {
  border-color: #be123c;
  color: #fecdd3;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid #ffffff30;
  border-top-color: var(--purple-bright);
  border-radius: 50%;
  display: inline-block;
  animation: spin 0.7s linear infinite;
}

.pager {
  display: flex;
  justify-content: center;
  gap: 14px;
  align-items: center;
  margin-top: 32px;
  color: var(--muted);
  font-size: 12px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

@keyframes appear {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

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

@media (max-width: 600px) {
  .btn { padding: 10px 13px; }
  .dialog-head, .dialog-body { padding: 18px; }
  .dialog-foot { padding: 14px 18px; }
  dialog { max-height: 93dvh; border-radius: 18px; }
  .toast { right: 16px; bottom: 16px; }
}

/* haze store — cream lettering, moss, warm amber. */
:root {
  --line: rgba(174, 190, 140, .2);
  --line-soft: rgba(222, 226, 197, .1);
  --glow-purple: 0 7px 24px -12px rgba(196, 123, 66, .55);
  --glow-card: 0 18px 40px -20px #000, 0 0 0 1px #8b9b6430;
}
html { scroll-behavior: smooth; }
body { background-image: radial-gradient(ellipse 70% 42% at 50% 0, #39472a26, transparent 75%); }
.logo { gap: 10px; font-size: 24px; letter-spacing: -1.3px; }
.brand-moon { width: 27px; height: 32px; flex: 0 0 27px; }
.logo .logo-name {
  font-family: "Arial Black", "Trebuchet MS", system-ui, sans-serif;
  font-weight: 950;
  text-transform: lowercase;
  color: #1a1b12;
  background: none;
  -webkit-text-stroke: 1.35px #e8ddbd;
  paint-order: stroke fill;
  text-shadow: 0 2px 0 #060904;
}
.btn.primary { background: #b87943; border-color: #d79c67; color: #fff8ea; }
.btn.primary:hover { background: #ce8b50; border-color: #edb681; box-shadow: 0 7px 26px -12px #b8794370; }
.btn:hover, .icon-button:hover { box-shadow: none; }
.panel { background: linear-gradient(145deg, #20291bd9, #151c12f2); border-color: #414c31; }
.badge { background: #313c24ed; color: #e4e8cd; border-color: #7f925b80; box-shadow: none; }
.badge.cyan { background: #283522ed; color: #d7e5bd; border-color: #8caa625c; }
.badge.pink { background: #49301ded; color: #f1c291; border-color: #bd854f7a; }
.age-badge { color: #d9cfb3; background: #11170dc9; border-color: #bdc69b40; font-weight: 600; }
input:not([type=checkbox]):not([type=file]), select, textarea { border-color: #3b472e; }
input::placeholder, textarea::placeholder { opacity: 1; }
input:focus, select:focus, textarea:focus { box-shadow: 0 0 0 3px #c6956124; }
input[type=checkbox] { accent-color: #a5b47c; }
dialog { border-color: #5b6745; box-shadow: 0 35px 120px #000c; }
.logo-name { overflow-wrap: normal; }
