:root {
  --bg: #05060f;
  --panel: rgba(16, 20, 40, 0.78);
  --panel-hi: rgba(28, 34, 66, 0.92);
  --line: rgba(140, 160, 255, 0.18);
  --line-hi: rgba(140, 160, 255, 0.38);
  --text: #e7ebff;
  --muted: #8d95c4;
  --star: #ffe9a8;
  --gold: #ffd36b;
  --accent: #8fb3ff;
  --red: #ff6b81;
  --green: #6fe3b0;
  --radius: 14px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: radial-gradient(ellipse at 50% 0%, #16204a 0%, #0b0f28 40%, var(--bg) 75%) fixed;
  color: var(--text);
  font: 15px/1.5 ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
#sky { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.wrap { position: relative; z-index: 1; max-width: 1120px; margin: 0 auto; padding: 20px 16px 56px; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* top bar */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; font-weight: 700; letter-spacing: .04em; }
.brand svg { width: 18px; height: 18px; filter: drop-shadow(0 0 6px rgba(255, 220, 140, .7)); }
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--panel); color: var(--text); text-decoration: none; cursor: pointer;
  font-size: 13px; backdrop-filter: blur(6px); transition: border-color .15s, background .15s;
}
.pill:hover { border-color: var(--line-hi); background: var(--panel-hi); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; border-radius: 10px; border: 1px solid var(--line); cursor: pointer;
  background: var(--panel-hi); font-weight: 700; font-size: 14px; text-decoration: none; color: var(--text);
  transition: transform .08s, border-color .15s, background .15s, box-shadow .15s; -webkit-tap-highlight-color: transparent;
}
.btn:hover:not(:disabled) { border-color: var(--line-hi); }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn:focus-visible, .pill:focus-visible, .chip:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
.btn.gold { background: linear-gradient(180deg, #ffe39a, #f7c24f); color: #1a1405; border-color: transparent; box-shadow: 0 0 18px rgba(255, 211, 107, .25); }
.btn.gold:hover:not(:disabled) { box-shadow: 0 0 24px rgba(255, 211, 107, .45); }
.btn.red { background: rgba(255, 107, 129, .12); border-color: rgba(255, 107, 129, .4); color: #ffb3bf; }
.btn.ghost { background: transparent; }
.btn.sm { padding: 6px 10px; font-size: 12.5px; border-radius: 8px; }

/* panels & forms */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; backdrop-filter: blur(8px); }
.panel h2 { font-size: 12px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); margin: 0 0 14px; font-weight: 600; }
label { display: block; font-size: 12px; color: var(--muted); margin: 0 0 6px; letter-spacing: .04em; }
.field { margin-bottom: 14px; }
input[type=text], input[type=url], input[type=password], select, textarea {
  width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: rgba(5, 8, 22, .6); transition: border-color .15s;
}
input:hover, select:hover, textarea:hover { border-color: var(--line-hi); }
textarea { resize: vertical; min-height: 76px; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; min-width: 0; }

/* priority badges */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; border: 1px solid; white-space: nowrap; }
.badge.must { color: var(--red); border-color: rgba(255, 107, 129, .45); background: rgba(255, 107, 129, .1); }
.badge.love { color: var(--gold); border-color: rgba(255, 211, 107, .4); background: rgba(255, 211, 107, .08); }
.badge.nice { color: var(--green); border-color: rgba(111, 227, 176, .4); background: rgba(111, 227, 176, .08); }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); z-index: 50; opacity: 0;
  background: #0d1130; border: 1px solid var(--line-hi); border-radius: 12px; padding: 11px 16px; font-size: 13.5px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .55); transition: opacity .2s, transform .2s; pointer-events: none; max-width: calc(100% - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { border-color: rgba(255, 107, 129, .6); }

/* modal */
.scrim { position: fixed; inset: 0; z-index: 40; background: rgba(2, 3, 10, .7); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 16px; animation: fade .15s; }
.modal { width: 100%; max-width: 420px; background: #0c1030; border: 1px solid var(--line-hi); border-radius: 18px; padding: 22px; box-shadow: 0 20px 80px rgba(0, 0, 0, .6); animation: pop .18s ease-out; }
.modal h3 { margin: 0 0 6px; font-size: 18px; }
.modal p { margin: 0 0 16px; color: var(--muted); font-size: 13.5px; }
.modal .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 6px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }

footer { margin-top: 48px; text-align: center; color: var(--muted); font-size: 12px; }
footer a { color: var(--muted); }

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