
:root {
  color-scheme: dark;
  --bg: #100c19;
  --sidebar: #14101e;
  --panel: #1b1528;
  --raised: #261c37;
  --ink: #faf5ff;
  --muted: #bdb1cd;
  --line: #372b47;
  --accent: #c8a2ff;
  --pink: #ffb4cf;
  --radius: 18px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(ellipse at 83% -30%, #352053 0, transparent 55%), var(--bg);
  color: var(--ink);
  font: 15px/1.5 system-ui, sans-serif;
}
h1, h2, h3, p, dl, dd { margin: 0; }
h1 { font-size: clamp(32px, 4.3vw, 60px); letter-spacing: -.06em; line-height: 1.05; }
h2 { font-size: 23px; letter-spacing: -.035em; }
h3 { font-size: 17px; }
p, .hint { color: var(--muted); }
svg { flex: none; vertical-align: middle; }
button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
  gap: 9px;
  min-height: 42px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--raised);
  color: var(--ink);
  text-decoration: none;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}
button:disabled { opacity: .5; cursor: default; }
.primary {
  background: linear-gradient(135deg, #d0adff, #b688f6);
  border-color: transparent;
  color: #241337;
}
.primary:hover { background: #e1c7ff; }
.plain { background: transparent; }
.plain:hover { background: var(--raised); }
:focus-visible { outline: 2px solid #dfc3ff; outline-offset: 3px; }
code { background: #342348; color: #eedaff; border-radius: 5px; padding: 2px 5px; }
.eyebrow, .sidebar-label { font-size: 11px; font-weight: 750; letter-spacing: .15em; }
.eyebrow { color: var(--accent); }
.pill {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  width: max-content;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: var(--panel);
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.pill svg { width: 14px; height: 14px; }
.brand { display: flex; gap: 12px; align-items: center; }
.brand strong, .brand small { display: block; }
.brand strong { letter-spacing: -.025em; font-size: 17px; }
.brand small { color: var(--muted); font-size: 12px; }
.logo {
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  flex: none;
  border: 1px solid #ae83ed;
  border-radius: 12px;
  background: linear-gradient(145deg, #a477ed, #57318d);
  box-shadow: 0 3px 18px #8e54cf3d, inset 0 0 0 3px #e2caff19;
  color: #fff;
  font: 750 19px Georgia, serif;
  letter-spacing: -.07em;
}
.card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); padding: clamp(16px, 2.5vw, 25px); }
.login { display: grid; place-items: center; min-height: 100vh; padding: 24px; }
.login-card { width: min(100%, 570px); padding: clamp(24px, 5vw, 46px); box-shadow: 0 22px 90px #07040b99; }
.login-copy { margin-top: 32px; }
.login-copy h1 { margin: 13px 0; }
.login-copy .button { margin-top: 23px; }
.dashboard-shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); max-width: 1560px; min-height: 100vh; margin: auto; }
.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  align-self: start;
  padding: 28px 16px 20px;
  border-right: 1px solid var(--line);
  background: var(--sidebar);
}
.sidebar .brand { padding: 0 6px; }
.sidebar-label { margin: 38px 12px 11px; color: var(--muted); }
.navigation { display: grid; gap: 5px; }
.navigation button { width: 100%; justify-content: start; padding: 9px 11px; background: transparent; border-color: transparent; color: var(--muted); text-align: left; }
.navigation button:hover { background: var(--panel); color: var(--ink); }
.navigation button[aria-current="page"] { border-color: #533875; background: #2c1d41; color: #ead7ff; }
.navigation svg { width: 17px; height: 17px; }
.logout { margin-top: auto; color: var(--muted); border-color: transparent; font-size: 13px; }
.logout svg { width: 16px; height: 16px; }
.workspace { width: min(100%, 1250px); margin: 0 auto; padding: 0 clamp(20px, 4vw, 55px) 50px; min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; min-height: 70px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.breadcrumb { display: flex; gap: 9px; align-items: center; color: var(--muted); font-size: 13px; }
.breadcrumb strong { color: var(--ink); font-weight: 600; }
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: 242px;
  padding: clamp(22px, 4.8vw, 52px);
  border: 1px solid #694695;
  border-radius: 22px;
  background: radial-gradient(ellipse at 82% 55%, #62329b 0, transparent 60%), linear-gradient(110deg, #221434, #391f59);
  box-shadow: 0 16px 50px #130a2299;
}
.hero-copy { position: relative; max-width: 490px; }
.hero h1 { margin: 12px 0; }
.hero p { max-width: 340px; color: #e2d2f2; }
.hero-art { position: absolute; z-index: -1; bottom: 0; right: -2%; width: 61%; max-width: 560px; height: auto; pointer-events: none; }
.page-title { padding: 6px 0 23px; }
.page-title h1 { font-size: clamp(30px, 4vw, 45px); margin: 7px 0 9px; }
.overview-stats, .overview-links { display: grid; gap: 14px; }
.overview-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 19px 0 24px; }
.stat { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 12px; padding: 16px; }
.stat-icon { grid-row: span 2; display: grid; place-items: center; width: 39px; height: 39px; border-radius: 10px; background: #35234f; color: var(--accent); }
.stat dt { font-size: 13px; color: var(--muted); }
.stat dd { font-size: clamp(16px, 2vw, 23px); font-weight: 750; letter-spacing: -.03em; overflow-wrap: anywhere; }
.section-title { margin-bottom: 12px; }
.overview-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.shortcut { padding: 0; overflow: hidden; }
.shortcut img { display: block; width: 100%; height: clamp(70px, 9vw, 115px); object-fit: cover; }
.shortcut-copy { padding: 16px; }
.shortcut-copy p { margin: 4px 0 12px; font-size: 14px; }
.shortcut-copy button { color: #e4cdff; }
.shortcut-copy button svg { width: 16px; height: 16px; }
.layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; gap: 16px; }
.preview { position: sticky; top: 16px; }
.discord { margin-top: 12px; border-left: 4px solid #a271f0; border-radius: 9px; background: #292233; padding: 13px; }
.discord img, .vault-art { display: block; width: 100%; border-radius: 7px; margin-bottom: 12px; }
.discord p { color: #e8dbf3; white-space: pre-wrap; overflow-wrap: anywhere; }
.discord h3 { overflow-wrap: anywhere; margin-bottom: 4px; }
.discord ul { padding-left: 19px; margin: 8px 0 0; overflow-wrap: anywhere; }
.preview-button { display: inline-block; margin-top: 12px; padding: 5px 9px; border-radius: 4px; background: #4d3e5e; overflow-wrap: anywhere; max-width: 100%; }
form { display: grid; gap: 13px; }
form p { margin-top: -7px; }
label { display: grid; gap: 5px; font-weight: 650; }
.check { display: flex; align-items: center; gap: 8px; }
.pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.pair > * { min-width: 0; }
input:not([type=checkbox]), textarea, select { width: 100%; min-width: 0; background: #130e1e; color: var(--ink); border: 1px solid var(--line); border-radius: 9px; padding: 9px; font: inherit; font-weight: 400; }
input[type=checkbox] { accent-color: #a76df1; width: 17px; height: 17px; flex: none; }
textarea { resize: vertical; }
.hint, .status { font-size: 13px; }
.status:not(:empty) { padding-top: 6px; color: #e2ceff; }
.status.error { color: var(--pink); }
.global:not(:empty) { margin-bottom: 16px; }
.product, .settings-group { min-width: 0; border: 1px solid var(--line); border-radius: 10px; margin: 0 0 12px; padding: 12px; display: grid; gap: 9px; }
.product legend, .settings-group legend { padding: 0 6px; color: var(--accent); font-weight: 700; }
.settings-group { margin: 0; padding: 14px; gap: 12px; }
.settings-group .hint { margin: 0; }
.welcome-tools, .welcome-preview-buttons { display: flex; flex-wrap: wrap; gap: 6px; }
.welcome-tools .plain { min-height: 32px; padding: 5px 9px; font-size: 13px; }
.settings-group input[type=color] { height: 40px; padding: 4px 8px; cursor: pointer; }
.settings-group input:disabled { opacity: .5; }
.welcome-preview-channel, #preview-welcome-ping { margin-top: 8px; }
#welcome-preview img:last-child { margin: 12px 0 0; }
.welcome-preview-buttons { margin-top: 8px; }
.welcome-preview-buttons .preview-button { margin-top: 0; }
.catalog-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.catalog-heading + .hint { margin-top: 0; }
#products { display: grid; gap: 8px; }
.product-entry { min-width: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--raised); }
.product-entry summary { cursor: pointer; padding: 11px 13px; overflow-wrap: anywhere; }
.product-entry summary::marker { color: var(--accent); }
.product-entry .product { margin: 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; }
.product-state { display: inline-block; margin-inline-start: 6px; font-size: 13px; color: var(--accent); }
.role-duration { min-width: 0; margin: 0; border: 1px solid var(--line); border-radius: 9px; padding: 9px; }
.duration-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(67px, 1fr)); gap: 7px; }
.duration-fields label { font-size: 13px; }
.role-duration .hint { margin: 7px 0 0; }
.shop-emoji-field { display: flex; align-items: center; gap: 10px; font-weight: 650; }
.shop-emoji-trigger { width: 44px; padding-inline: 4px; font-size: 21px; }
.emoji-picker {
  width: min(440px, calc(100% - 24px));
  max-height: calc(100dvh - 24px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  color: var(--ink);
}
.emoji-picker::backdrop { background: #0c0818bf; }
.emoji-picker-body { display: grid; gap: 10px; padding: 15px; }
.emoji-picker-body header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.emoji-picker-body header button { min-width: 40px; font-size: 20px; }
.emoji-picker-body #emoji-status:empty { display: none; }
.emoji-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(39px, 1fr));
  gap: 4px;
  max-height: min(42dvh, 320px);
  overflow-y: auto;
  padding: 2px 5px 2px 2px;
}
.emoji-grid button { justify-self: stretch; min-height: 40px; padding: 2px; font-size: 20px; overflow: hidden; }
#clear-emoji { justify-self: start; }
.product-caption .caption-count { display: block; text-align: right; margin-top: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
#preview-vault-intro { margin-bottom: 10px; }
.discord .vault-preview-list { padding: 0; list-style: none; }
.vault-preview-list li { display: grid; gap: 2px; padding: 8px 0; border-bottom: 1px solid #ffffff22; }
.vault-preview-list small { color: #ddd0ea; }
.vault-preview-pages { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; }
#empty-vault-preview { margin-top: 8px; }
.remove { color: var(--pink); }
.save-row { margin-top: 4px; }
.poll-fields { min-width: 0; margin: 0; padding: 0; border: 0; display: grid; gap: 13px; }
.poll-fields > .plain { justify-self: start; }
.poll-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 8px; }
#poll-preview-choices { list-style: none; padding: 0; display: grid; gap: 6px; }
#poll-preview-choices li { padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; }
.reward-rule { padding: 12px 14px; border-left: 3px solid var(--accent); border-radius: 8px; background: var(--raised); }
.vault-entry p { margin-top: 4px; }
.vault-entry .primary { margin-top: 16px; }
.vault-back { margin-bottom: 16px; }
@media (max-width: 1020px) {
  .dashboard-shell { grid-template-columns: 205px minmax(0, 1fr); }
  .stat { grid-template-columns: minmax(0, 1fr); row-gap: 4px; }
  .stat-icon { grid-row: auto; margin-bottom: 3px; }
}
@media (max-width: 780px) {
  .dashboard-shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; min-height: auto; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 12px 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar .brand { padding: 0; }
  .sidebar-label { display: none; }
  .navigation { grid-column: span 2; grid-row: 2; display: flex; flex-wrap: wrap; }
  .navigation button { width: auto; }
  .logout { margin: 0; }
  .topbar { min-height: 58px; margin-bottom: 17px; }
  .layout { grid-template-columns: minmax(0, 1fr); }
  .preview { position: static; }
}
@media (max-width: 490px) {
  .workspace { padding: 0 14px 36px; }
  .sidebar { padding: 10px 14px; }
  .navigation button { gap: 5px; padding: 7px 8px; font-size: 12px; min-height: 38px; }
  .navigation svg { width: 14px; height: 14px; }
  .logout { padding: 6px; font-size: 12px; }
  .hero { min-height: 205px; }
  .hero-art { width: 84%; opacity: .42; }
  .overview-stats { gap: 7px; }
  .stat { padding: 10px 7px; }
  .stat dt { font-size: 11px; }
  .stat dd { font-size: 15px; }
  .stat-icon { width: 29px; height: 29px; }
  .stat-icon svg { width: 16px; height: 16px; }
  .overview-links, .pair { grid-template-columns: minmax(0, 1fr); }
  .shortcut img { height: 100px; }
}
