:root {
  --bg-deep: #050505;
  --bg-mid: #111111;
  --ink: #f5f5f5;
  --ink-muted: rgba(245, 245, 245, 0.58);
  --ink-soft: rgba(245, 245, 245, 0.38);
  --accent: #ffffff;
  --glass: rgba(255, 255, 255, 0.06);
  --glass-strong: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.16);
  --glass-border-hover: rgba(255, 255, 255, 0.34);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --font-display: "Syne", system-ui, sans-serif;
  --font-body: "Manrope", system-ui, sans-serif;
  --shadow-soft: 0 20px 50px rgba(0, 0, 0, 0.45);
  --ok: #9ae6b4;
  --err: #feb2b2;
  --soft-red: #e87878;
  --soft-red-soft: rgba(232, 120, 120, 0.2);
  --soft-red-border: rgba(232, 120, 120, 0.5);
  --page-pad: clamp(1.25rem, 4vw, 3.5rem);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

/* Dark minimal scrollbar (all pages) */
* {
  scrollbar-width: thin;
  scrollbar-color: #141414 transparent;
}
*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
*::-webkit-scrollbar-track {
  background: #050505;
}
*::-webkit-scrollbar-thumb {
  background: #141414;
  border-radius: 99px;
  border: 2px solid #050505;
}
*::-webkit-scrollbar-thumb:hover {
  background: #222;
}
*::-webkit-scrollbar-corner {
  background: #050505;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg-deep);
  line-height: 1.55;
}

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }

.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(255,255,255,0.12), transparent 55%),
    radial-gradient(ellipse 70% 45% at 90% 10%, rgba(255,255,255,0.08), transparent 50%),
    radial-gradient(ellipse 60% 40% at 50% 100%, rgba(255,255,255,0.06), transparent 55%),
    linear-gradient(165deg, #000 0%, #0d0d0d 45%, #050505 100%);
}

.glass {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: var(--shadow-soft);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem var(--page-pad);
  background: rgba(5,5,5,0.55);
  border-bottom: 1px solid var(--glass-border);
  backdrop-filter: blur(16px);
}

.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

.nav {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: transparent;
  cursor: pointer;
  transition: 0.2s ease;
  white-space: nowrap;
}

.btn:hover { border-color: var(--glass-border-hover); background: rgba(255,255,255,0.06); }
.btn-primary { background: #fff; color: #000; border-color: #fff; font-weight: 600; }
.btn-primary:hover { background: #e8e8e8; }
.btn-ghost { background: transparent; }
.btn-danger { border-color: rgba(254,178,178,0.45); color: var(--err); }
.btn-sm { padding: 0.45rem 0.85rem; font-size: 0.9rem; }
.btn-success {
  background: #22c55e;
  border-color: #22c55e;
  color: #fff;
  font-weight: 600;
}
.btn-success:hover { background: #16a34a; border-color: #16a34a; }
.links-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-bottom: 0.85rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.links-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 650;
  color: #fff;
}
.links-count { font-size: 1rem; font-weight: 500; }
.links-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.links-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1.25rem;
  min-height: 0.5rem;
}
.links-pills .link-pill {
  cursor: grab;
}
.links-pills .link-pill:active {
  cursor: grabbing;
}
.link-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  height: 2.5rem;
  padding: 0 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.45);
  background: rgba(255,255,255,0.05);
  color: #fff;
  font-size: 0.88rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, opacity 0.15s ease;
}
.link-pill:hover {
  border-color: #fff;
  background: rgba(255,255,255,0.12);
}
.link-pill.is-dragging {
  opacity: 0.45;
}
.link-pill.is-drag-over {
  border-color: rgba(74, 222, 128, 0.7);
  background: rgba(34, 197, 94, 0.1);
}
.link-pill-ico {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  color: #fff;
  line-height: 0;
}
.link-pill-ico svg,
.link-pill-ico img {
  width: 18px;
  height: 18px;
  display: block;
  object-fit: contain;
}
.link-pill-text {
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.links-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.field-label.row-between {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
}
[data-custom-icon-wrap][hidden],
.field[hidden] {
  display: none !important;
}
.field-hint {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
  line-height: 1.35;
}
.links-form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.35rem;
}
.btn-create {
  background: linear-gradient(180deg, #f97316 0%, #c2410c 100%);
  border-color: #c2410c;
  color: #fff;
  font-weight: 650;
  min-width: 7rem;
}
.btn-create:hover {
  background: linear-gradient(180deg, #fb923c 0%, #ea580c 100%);
  border-color: #ea580c;
  color: #fff;
}
.btn-hide-solid {
  background: #dc2626;
  border-color: #dc2626;
  color: #fff;
  font-weight: 600;
}
.btn-hide-solid:hover {
  background: #b91c1c;
  border-color: #b91c1c;
  color: #fff;
}
.req { color: #ef4444; font-weight: 700; }

.tags-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-bottom: 0.85rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.tags-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 650;
  color: #fff;
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
}
.tags-count {
  font-size: 1rem;
  font-weight: 500;
}
.tags-pills {
  margin-bottom: 1.25rem;
  min-height: 0.5rem;
}
.tags-form {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}
.tag-edit-modal {
  position: relative;
  width: min(380px, 100%);
  padding-top: 1.1rem;
}
.tag-modal-close {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  z-index: 2;
}
.tag-edit-modal .tags-form {
  gap: 0.85rem;
}
.tag-edit-modal .field {
  padding-right: 2rem;
}
.tag-modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-top: 0.15rem;
}
.btn-modal-delete {
  background: #dc2626;
  border-color: #dc2626;
  color: #fff;
  font-weight: 650;
  border-radius: 999px;
  padding: 0.7rem 1rem;
}
.btn-modal-delete:hover {
  background: #b91c1c;
  border-color: #b91c1c;
  color: #fff;
}
.btn-modal-save {
  background: linear-gradient(180deg, #f97316 0%, #c2410c 100%);
  border-color: #c2410c;
  color: #fff;
  font-weight: 650;
  border-radius: 999px;
  padding: 0.7rem 1rem;
}
.btn-modal-save:hover {
  background: linear-gradient(180deg, #fb923c 0%, #ea580c 100%);
  border-color: #ea580c;
  color: #fff;
}

.links-limit-note {
  margin: 0 0 1rem;
}

.shop-shell .shop-frame {
  padding: 1.25rem 1.35rem 1.6rem;
}
.shop-top {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}
.shop-heading {
  margin: 0 0 1.25rem;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.35rem);
  letter-spacing: -0.03em;
}
.shop-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}
.shop-grid:has(.shop-card:only-child) {
  grid-template-columns: minmax(0, 1fr);
  max-width: 420px;
}
.shop-card {
  display: flex;
  flex-direction: column;
  min-height: 168px;
  padding: 1.1rem 1.15rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.035);
}
.shop-card-ico {
  width: 2.35rem;
  height: 2.35rem;
  display: grid;
  place-items: center;
  border-radius: 10px;
  margin-bottom: 0.85rem;
  color: #fff;
}
.shop-card-ico.tone-blue { background: #2563eb; }
.shop-card-ico.tone-orange { background: #c2410c; }
.shop-card-ico.tone-green { background: #16a34a; }
.shop-card-ico.tone-red { background: #b91c1c; }
.shop-card-ico.tone-teal { background: #0f766e; }
.shop-card-ico.tone-indigo { background: #4f46e5; }
.shop-card h3 {
  margin: 0 0 0.35rem;
  font-size: 1.12rem;
  font-weight: 700;
  color: #fff;
}
.shop-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.9rem;
  line-height: 1.4;
  flex: 1;
}
.shop-card-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 1rem;
}
.btn-shop-view {
  background: #fff;
  border-color: #fff;
  color: #0a0a0a;
  font-weight: 650;
  border-radius: 999px;
  padding: 0.4rem 0.95rem;
  min-width: 4.5rem;
}
.btn-shop-view:hover {
  background: #e8e8e8;
  border-color: #e8e8e8;
  color: #000;
}

.shop-premium-split {
  display: grid;
  grid-template-columns: minmax(180px, 0.9fr) minmax(280px, 1.1fr);
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  min-height: 420px;
}
.shop-premium-visual {
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, #1d4ed8 0%, #2563eb 45%, #3b82f6 100%);
  padding: 2rem;
}
.shop-premium-diamond {
  color: rgba(191, 219, 254, 0.95);
  filter: drop-shadow(0 10px 28px rgba(0, 0, 0, 0.28));
}
.shop-premium-body {
  padding: 1.35rem 1.45rem 1.5rem;
  background: rgba(12, 12, 14, 0.92);
}
.shop-premium-body h1 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 2.4vw, 1.9rem);
  letter-spacing: -0.03em;
}
.shop-premium-lead {
  margin: 0 0 0.85rem;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.95rem;
}
.shop-premium-price {
  margin: 0 0 1rem;
  font-size: clamp(1.55rem, 2.5vw, 2rem);
  font-weight: 750;
  color: #fff;
  letter-spacing: -0.02em;
}
.shop-perk-list {
  list-style: none;
  margin: 0 0 1.15rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.shop-perk-list li {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.9rem;
  line-height: 1.35;
  padding-left: 0.15rem;
}
.shop-perk-list li::before {
  content: '— ';
  color: rgba(255, 255, 255, 0.45);
}
.shop-pay-field {
  margin-bottom: 0.9rem;
}
.shop-pay-select {
  position: relative;
}
.shop-pay-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 2.75rem;
  padding: 0.55rem 0.85rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.35);
  color: rgba(255, 255, 255, 0.78);
  cursor: pointer;
  font: inherit;
  text-align: left;
}
.shop-pay-trigger:hover,
.shop-pay-select.is-open .shop-pay-trigger {
  border-color: rgba(255, 255, 255, 0.28);
}
.shop-pay-chev {
  display: grid;
  place-items: center;
  width: 1.4rem;
  height: 1.4rem;
  flex-shrink: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.16);
  padding-right: 0.7rem;
  margin-right: 0.1rem;
  color: rgba(255, 255, 255, 0.55);
}
.shop-pay-value {
  flex: 1;
  min-width: 0;
}
.shop-pay-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 20;
  padding: 0.35rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #141416;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
}
.shop-pay-menu[hidden] {
  display: none !important;
}
.shop-pay-option {
  width: 100%;
  display: block;
  padding: 0.55rem 0.7rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  text-align: left;
  font: inherit;
  cursor: pointer;
}
.shop-pay-option:hover,
.shop-pay-option.is-selected {
  background: #2563eb;
  color: #fff;
}
.shop-premium-status {
  margin: 0.25rem 0 0;
  font-weight: 600;
}
.btn-shop-buy {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-color: #fff;
  color: #0a0a0a;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.85rem 1rem;
  text-decoration: none;
}
.btn-shop-buy:hover {
  background: #ececec;
  border-color: #ececec;
  color: #000;
}

@media (max-width: 860px) {
  .shop-grid {
    grid-template-columns: 1fr;
  }
  .shop-premium-split {
    grid-template-columns: 1fr;
  }
  .shop-premium-visual {
    min-height: 180px;
  }
}

.tracks-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0.85rem 0 1.15rem;
}
.track-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  height: 2.5rem;
  padding: 0 1rem 0 0.45rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.45);
  background: rgba(255,255,255,0.05);
  color: #fff;
  font: inherit;
  font-size: 0.88rem;
  cursor: grab;
}
.track-pill:active { cursor: grabbing; }
.track-pill:hover {
  border-color: #fff;
  background: rgba(255,255,255,0.12);
}
.track-pill.is-dragging { opacity: 0.45; }
.track-pill.is-drag-over {
  border-color: var(--accent, #f97316);
  box-shadow: 0 0 0 1px var(--accent, #f97316);
}
.track-pill-ico {
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.track-pill-ico img,
.track-pill-ico svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.track-pill-ico svg {
  width: 0.9rem;
  height: 0.9rem;
}
.tracks-form {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}
.track-drop {
  position: relative;
  min-height: 7.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}
.track-drop.has-file {
  border-style: solid;
  border-color: rgba(255,255,255,0.28);
  background: rgba(255,255,255,0.04);
}
.track-drop.has-file .track-drop-ui { display: none; }
.track-file-preview {
  max-width: 120px;
  max-height: 96px;
  object-fit: contain;
  border-radius: 10px;
  display: block;
}
.track-file-preview[hidden] { display: none !important; }
.track-file-name {
  max-width: 90%;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.85);
  word-break: break-all;
  text-align: center;
  line-height: 1.3;
}
.track-file-name[hidden] { display: none !important; }
.track-edit-preview {
  max-width: 120px;
  max-height: 120px;
  object-fit: contain;
  border-radius: 12px;
  margin: 0 auto;
}
.track-cover-delete {
  position: absolute;
  right: 0.65rem;
  bottom: 0.65rem;
  z-index: 2;
}
.track-edit-modal {
  position: relative;
  width: min(440px, 100%);
  padding-top: 1.1rem;
}

.btn-buy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.95rem;
  border-radius: 10px;
  border: 1px solid var(--soft-red-border);
  background: var(--soft-red-soft);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.btn-buy:hover {
  background: rgba(232, 120, 120, 0.32);
  border-color: rgba(232, 120, 120, 0.7);
  color: #fff;
}

.custom-badges-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-bottom: 0.85rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.custom-badges-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 650;
  color: #fff;
}
.custom-badge-promo {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.03);
}
.custom-badge-promo strong {
  display: block;
  color: #fff;
  font-size: 0.98rem;
}
.custom-badge-promo .muted {
  margin: 0.2rem 0 0;
  font-size: 0.85rem;
  line-height: 1.35;
}
.custom-badge-promo-icon {
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.04), 0 0 18px rgba(255,255,255,0.06);
}
.custom-badges-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.custom-badges-empty {
  padding: 1.5rem 1rem;
  text-align: center;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.02);
}
.custom-badge-row {
  display: grid;
  grid-template-columns: 3.25rem 1fr auto;
  gap: 0.85rem;
  align-items: center;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.03);
}
.custom-badge-row-icon {
  width: 3.25rem;
  height: 3.25rem;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  overflow: hidden;
}
.custom-badge-row-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.custom-badge-row-meta strong {
  display: block;
  color: #fff;
}
.custom-badge-row-meta .muted {
  font-size: 0.82rem;
}
.custom-badge-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.custom-badge-drop {
  min-height: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  cursor: pointer;
}
.custom-badge-drop-ui {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  text-align: center;
  pointer-events: none;
}
.custom-badge-drop-ui p { margin: 0; color: rgba(255,255,255,0.7); }
.custom-badge-preview {
  max-width: 96px;
  max-height: 96px;
  object-fit: contain;
  border-radius: 10px;
  display: block;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  min-height: 100%;
  min-height: 100dvh;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: safe center;
  padding: max(1.25rem, env(safe-area-inset-top)) 1.25rem max(1.25rem, env(safe-area-inset-bottom));
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.modal-overlay::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}
.modal-overlay[hidden] { display: none !important; }
html.modal-open,
body.modal-open {
  overflow: hidden !important;
}
.modal-card {
  width: min(440px, 100%);
  flex: 0 0 auto;
  max-height: none;
  overflow: visible;
  padding: 1.25rem 1.35rem 1.35rem;
  border-radius: 18px;
  background: rgba(18, 18, 18, 0.78);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: var(--shadow-soft);
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.1rem;
}
.modal-head h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 650;
  color: #fff;
}
.modal-card .links-form {
  gap: 0.95rem;
}
.modal-card .field-label {
  color: rgba(255, 255, 255, 0.88);
}
.modal-card .dropzone {
  min-height: 7.5rem;
}
.modal-card .row-between {
  margin-top: 0.35rem;
}

@media (max-width: 640px) {
  .custom-badge-row {
    grid-template-columns: 2.75rem 1fr;
  }
  .custom-badge-row-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }
}

.btn-accent {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.28);
}


.btn-lg {
  padding: 0.85rem 1.55rem;
  font-size: 1rem;
  min-width: 9.5rem;
  border-radius: 999px;
}

.btn-glass {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  border-radius: 999px;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  font-weight: 600;
}
.btn-glass:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.45);
}

.home-page .brand-bolt {
  color: var(--soft-red);
}

.home-topbar .topbar-inner {
  grid-template-columns: auto 1fr auto;
}

.home-top-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.15rem 0.35rem;
  flex-wrap: wrap;
}

.home-top-nav .top-nav-link {
  text-decoration: none;
}

.home-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.1rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.35);
  border: 1px solid rgba(96, 165, 250, 0.45);
  color: #dbeafe;
  font-size: 0.88rem;
  max-width: 100%;
}

.home-hero {
  min-height: calc(100vh - 110px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: var(--page-pad) 0 1.5rem;
  text-align: center;
  gap: 3rem;
}

.hero {
  min-height: calc(100vh - 96px);
  display: grid;
  place-items: center;
  padding: var(--page-pad);
  text-align: center;
}

.hero-inner { max-width: 720px; padding: 0 var(--page-pad); }

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 8vw, 5rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  margin: 0 0 1rem;
}

.hero p {
  color: var(--ink-muted);
  font-size: 1.1rem;
  margin: 0 auto 1.75rem;
  max-width: 34rem;
}

.hero-actions { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }

.home-marquee {
  width: 100%;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  padding: 0.25rem 0 0.5rem;
}

.home-marquee-track {
  display: flex;
  gap: 0.85rem;
  width: max-content;
  padding: 0 var(--page-pad);
}

.home-marquee-track.is-animated {
  animation: homeMarquee 42s linear infinite;
}

.home-marquee:hover .home-marquee-track.is-animated {
  animation-play-state: paused;
}

@keyframes homeMarquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.home-user-card {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 190px;
  padding: 0.55rem 0.85rem 0.55rem 0.55rem;
  border-radius: 16px;
  text-align: left;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.home-user-card:hover {
  border-color: rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.08);
  transform: translateY(-2px);
}

.home-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.18);
}

.home-user-fallback {
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.08);
  font-weight: 700;
  font-size: 0.95rem;
}

.home-user-meta {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}

.home-user-meta strong {
  font-size: 0.92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-user-meta .muted {
  font-size: 0.78rem;
}

.auth-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 1.5rem 0 0;
}
.auth-body > .auth-card {
  margin: auto;
  width: min(420px, calc(100% - 3rem));
}
.auth-body > .site-footer {
  margin-top: 1.5rem;
  width: 100%;
}

.auth-card {
  width: min(420px, 100%);
  padding: 2rem;
  border-radius: var(--radius-lg);
}

.auth-card h1 {
  font-family: var(--font-display);
  margin: 0 0 0.35rem;
  font-size: 1.8rem;
}

.auth-card .muted, .muted { color: var(--ink-muted); }
.auth-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.25rem; }
.auth-forgot {
  width: 100%;
  margin-top: 0.15rem;
  color: var(--ink-muted);
  border-color: transparent;
  background: transparent;
}
.auth-forgot:hover {
  color: #fff;
  border-color: var(--glass-border);
  background: rgba(255,255,255,0.04);
}
.auth-forgot-row {
  display: flex;
  justify-content: flex-end;
  margin: -0.15rem 0 0.15rem;
}
.auth-forgot-link {
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,0.45);
  font-size: 0.86rem;
  cursor: pointer;
  padding: 0.15rem 0.1rem;
}
.auth-forgot-link:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-card-modern {
  padding: 2rem 1.6rem 1.6rem;
}
.auth-card-modern h1 {
  margin-bottom: 1.25rem;
}
.auth-form {
  display: grid;
  gap: 0.75rem;
}
.auth-input-row {
  display: flex;
  align-items: stretch;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(12px);
  overflow: hidden;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.auth-input-row:focus-within {
  border-color: rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.06);
}
.auth-input-row input {
  border: 0 !important;
  background: transparent !important;
  border-radius: 0 !important;
  padding: 0.95rem 1rem;
  color: #fff;
  width: 100%;
  min-width: 0;
}
.auth-input-row input::placeholder {
  color: rgba(255,255,255,0.38);
}
.auth-slug-prefix {
  display: flex;
  align-items: center;
  padding: 0 0.2rem 0 1rem;
  color: rgba(255,255,255,0.42);
  font-size: 0.92rem;
  white-space: nowrap;
  user-select: none;
  border-right: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.18);
}
.auth-slug-row input {
  padding-left: 0.75rem;
}
.auth-pass-row {
  position: relative;
}
.auth-pass-row input {
  padding-right: 3rem;
}
.auth-pass-row input::-ms-reveal,
.auth-pass-row input::-ms-clear {
  display: none;
}
.auth-eye {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  width: 2.4rem;
  height: 2.4rem;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,0.55);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 10px;
  padding: 0;
  z-index: 2;
}
.auth-eye:hover { color: #fff; background: rgba(255,255,255,0.06); }
.auth-eye .eye-icon {
  width: 1.15rem;
  height: 1.15rem;
  display: block;
  flex-shrink: 0;
  pointer-events: none;
}
.auth-submit {
  margin-top: 0.35rem;
  width: 100%;
  border-radius: 999px;
  font-weight: 700;
}
.auth-terms {
  margin: 0.35rem 0 0;
  text-align: center;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.45);
  line-height: 1.45;
}
.auth-terms a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.form-grid { display: grid; gap: 0.9rem; margin-top: 1.25rem; }

label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.9rem;
  color: var(--ink-muted);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="number"],
input[type="color"],
textarea,
select {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: rgba(0,0,0,0.45);
  color: #fff;
  outline: none;
  color-scheme: dark;
}

textarea { min-height: 110px; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: rgba(255,255,255,0.45); }

select option,
select optgroup {
  background: #0d0d0d;
  color: #fff;
}

.custom-select {
  position: relative;
  width: 100%;
}
.custom-select-native {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.custom-select-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #fff;
  text-align: left;
  cursor: pointer;
}
.custom-select-trigger::after {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-right: 1.5px solid rgba(255,255,255,0.65);
  border-bottom: 1.5px solid rgba(255,255,255,0.65);
  transform: rotate(45deg);
  margin-top: -0.2rem;
  flex-shrink: 0;
}
.custom-select.open .custom-select-trigger {
  border-color: rgba(255,255,255,0.4);
}
.custom-select-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 0.35rem);
  z-index: 40;
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(8, 8, 8, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.45);
  max-height: 240px;
  overflow: auto;
  display: none;
}
.custom-select.open .custom-select-menu { display: block; }
.custom-select-option {
  padding: 0.65rem 0.8rem;
  border-radius: 10px;
  color: #fff;
  cursor: pointer;
  font-size: 0.95rem;
}
.custom-select-option:hover,
.custom-select-option.is-active {
  background: rgba(255,255,255,0.1);
}
.custom-select-option.is-selected {
  background: rgba(232, 120, 120, 0.22);
  color: #fff;
}
.custom-select-option.has-font-preview {
  font-size: 1.05rem;
  line-height: 1.35;
}
.custom-select.is-locked .custom-select-trigger {
  opacity: 0.72;
  cursor: pointer;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
}

.checkbox-row input { width: auto; }

.toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 100;
  padding: 0.85rem 1.1rem;
  border-radius: 14px;
  border: 1px solid var(--glass-border);
  background: rgba(20,20,20,0.92);
  backdrop-filter: blur(12px);
  transform: translateY(120%);
  opacity: 0;
  transition: 0.25s ease;
  max-width: min(360px, calc(100vw - 2rem));
}
.toast.show { transform: translateY(0); opacity: 1; }
.ok { color: var(--ok); }
.err { color: var(--err); }

/* ===== Topbar ===== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0.85rem var(--page-pad) 0;
}

.topbar-inner,
.glass-frame {
  background: rgba(18, 18, 18, 0.78);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: var(--shadow-soft);
}

.topbar-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 0.65rem 0.9rem;
  border-radius: 18px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.brand-bolt {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: rgba(232, 120, 120, 0.14);
  border: 1px solid rgba(232, 120, 120, 0.35);
  font-size: 0.95rem;
  color: var(--soft-red);
}

.brand-text { font-size: 1rem; }

.top-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.15rem 0.35rem;
}

.top-nav-link {
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--ink-muted);
  padding: 0.55rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.95rem;
  position: relative;
  transition: color 0.2s ease, background 0.2s ease;
  text-decoration: none;
}

.top-nav-link:hover,
.top-nav-link.active {
  color: #fff;
  background: rgba(255,255,255,0.08);
}
.top-nav-link.active {
  font-weight: 600;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.dropdown { position: relative; }

.lang-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.7rem 0.4rem 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: rgba(0,0,0,0.35);
  cursor: pointer;
  color: #fff;
  max-width: 220px;
}

.lang-pill:hover { border-color: var(--glass-border-hover); }
.lang-pill-text {
  font-size: 0.86rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lang-pill .chev {
  width: 10px;
  height: 8px;
  opacity: 0.75;
  flex: 0 0 auto;
  transition: transform 0.2s ease;
}
.dropdown.open .lang-pill .chev { transform: rotate(180deg); }

.flag {
  width: 22px;
  height: 15px;
  border-radius: 3px;
  flex: 0 0 auto;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.12);
}

.avatar-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  background: #1a1a1a;
  display: grid;
  place-items: center;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.avatar-btn:hover { border-color: #fff; transform: translateY(-1px); }
.avatar-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.avatar-fallback-sm,
.avatar-fallback-lg {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-family: var(--font-display);
  font-weight: 700;
  color: #fff;
  background: #222;
}
.avatar-fallback-lg { font-size: 1.6rem; }

.dropdown-menu {
  position: absolute;
  top: calc(100% + 0.55rem);
  right: 0;
  min-width: 220px;
  padding: 0.4rem;
  border-radius: 14px;
  border: 1px solid var(--glass-border);
  background: rgba(16,16,16,0.96);
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 40px rgba(0,0,0,0.55);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
  z-index: 90;
}
.dropdown.open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  text-align: left;
  padding: 0.7rem 0.75rem;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  font-size: 0.92rem;
}
.dropdown-item:hover { background: rgba(255,255,255,0.06); }
.dropdown-item-danger { color: #f0a0a0; }
.dropdown-item.is-active { background: rgba(255,255,255,0.08); }

.lang-menu { min-width: 260px; max-height: none; overflow: visible; }
.lang-item-text { display: grid; gap: 0.1rem; line-height: 1.2; }
.lang-item-text strong { font-weight: 600; }

.user-menu { min-width: 230px; }
.user-menu-head {
  display: block;
  padding: 0.65rem 0.75rem 0.75rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 0.25rem;
  color: inherit;
  text-decoration: none;
  transition: background 0.15s ease;
  cursor: pointer;
}
.user-menu-head:hover {
  background: rgba(255,255,255,0.06);
}
.user-menu-head strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 0.2rem;
  color: #fff;
}
.user-menu-link {
  display: block;
  color: var(--ink-muted);
  font-size: 0.82rem;
  word-break: break-all;
}
.user-menu-head:hover .user-menu-link { color: #fff; }

.dash-shell {
  padding: 1rem var(--page-pad) 3rem;
}

.dash-frame {
  max-width: 980px;
  margin: 0 auto;
  padding: 1.25rem 1.35rem 1.75rem;
  border-radius: 22px;
}

.dash-frame-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1rem;
}

.chip-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.06);
  font-size: 0.85rem;
  color: #fff;
}

.dash-hero {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
}

.dash-hero-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.35);
  background: #1a1a1a;
}

.dash-hero-text { flex: 1; min-width: 180px; }
.dash-hero-text h1 { margin: 0; }

.panel { display: none; animation: fadeUp 0.35s ease; }
.panel.active { display: block; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.panel h1 {
  font-family: var(--font-display);
  margin: 0 0 0.35rem;
  font-size: 1.9rem;
  letter-spacing: -0.03em;
}

.card {
  margin-top: 1.25rem;
  padding: 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.03);
}

.card h3 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.85rem;
  margin-top: 1.25rem;
}

.stat {
  padding: 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.04);
  min-width: 0;
  overflow: hidden;
}

.stat b {
  display: block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.5rem;
  margin-top: 0.25rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
  font-variant-numeric: lining-nums tabular-nums;
  letter-spacing: 0.01em;
}

.row-between {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.list { display: grid; gap: 0.65rem; }

.list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 0.95rem;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: rgba(0,0,0,0.25);
}

.preview-media {
  width: 72px;
  height: 72px;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid var(--glass-border);
  background: #111;
}

.preview-banner {
  width: 100%;
  max-height: 140px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--glass-border);
  margin-bottom: 0.85rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}

.file-row {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  align-items: center;
}

.hint { font-size: 0.85rem; color: var(--ink-soft); margin-top: 0.35rem; }

@media (max-width: 980px) {
  .topbar-inner {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand right"
      "nav nav";
  }
  .brand-mark { grid-area: brand; }
  .top-nav { grid-area: nav; justify-content: flex-start; }
  .topbar-right { grid-area: right; }
  .lang-pill-text { display: none; }
}

@media (max-width: 900px) {
  .grid-2 { grid-template-columns: 1fr; }
}

.premium-banner {
  background: linear-gradient(90deg, #1d4ed8, #2563eb);
  text-align: center;
  padding: 0.55rem 1rem;
  font-size: 0.9rem;
}
.premium-banner a { color: #fff; font-weight: 600; }

.btn-save {
  background: var(--soft-red);
  border-color: var(--soft-red);
  color: #fff;
  font-weight: 700;
  border-radius: 12px;
}
.btn-save:hover { background: #d66666; border-color: #d66666; }
.btn-reset {
  background: #8b1e1e;
  border-color: #8b1e1e;
  color: #fff;
  font-weight: 700;
  border-radius: 12px;
}
.btn-reset:hover { background: #a32626; }
.btn-discord {
  width: 100%;
  background: #5865F2;
  border-color: #5865F2;
  color: #fff;
  margin-top: 0.75rem;
  border-radius: 12px;
}

.form-actions {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.5rem;
  align-items: center;
}

.param-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.param-row span { display: grid; gap: 0.2rem; }
.param-row-text { display: grid; gap: 0.2rem; min-width: 0; }
.param-row-title {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.param-row-locked .check-mark:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.param-row .premium-lock {
  color: #f0a84a;
}

/* Empty when off, green check when on */
.check-mark {
  appearance: none;
  -webkit-appearance: none;
  width: 1.35rem !important;
  height: 1.35rem !important;
  margin: 0;
  flex-shrink: 0;
  border: 1.5px solid rgba(255, 255, 255, 0.28);
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.check-mark::after {
  content: '';
  width: 0.32rem;
  height: 0.58rem;
  border: solid transparent;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translate(-1px, -1px);
  opacity: 0;
  transition: opacity 0.12s ease;
}
.check-mark:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.5);
}
.check-mark:checked {
  border-color: #4ade80;
  background: rgba(34, 197, 94, 0.18);
  box-shadow: 0 0 0 1px rgba(74, 222, 128, 0.25);
}
.check-mark:checked::after {
  border-color: #4ade80;
  opacity: 1;
}
.check-mark:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.check-mark:focus-visible {
  outline: 2px solid rgba(74, 222, 128, 0.45);
  outline-offset: 2px;
}

.section-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}
#panel-parameters .section-head,
#panel-miscellaneous .section-head,
#panel-extras .section-head,
#panel-account .section-head {
  margin-top: 1.75rem;
}
.section-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.25);
}

.account-stack {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  margin-top: 1.25rem;
}
.account-premium-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
  padding: 1rem 1.15rem;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
}
.account-premium-card.is-active {
  border-color: rgba(250, 204, 21, 0.35);
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.1), rgba(255,255,255,0.03));
}
.account-premium-main {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
}
.account-premium-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: rgba(255,255,255,0.55);
  background: rgba(255,255,255,0.06);
}
.account-premium-card.is-active .account-premium-icon {
  color: #fde68a;
  background: rgba(250, 204, 21, 0.14);
}
.account-premium-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}
.account-premium-label {
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: 600;
}
.account-premium-plan {
  font-size: 1.15rem;
  color: #fff;
  font-weight: 700;
  line-height: 1.2;
}
.account-premium-meta {
  font-size: 0.88rem;
  color: var(--ink-muted);
  line-height: 1.35;
}
.account-premium-cta {
  flex-shrink: 0;
}
.account-block {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.account-block-desc {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
  max-width: 52rem;
}
.account-actions {
  display: flex;
  justify-content: flex-end;
}
.account-info-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin: 0;
}
.account-info-ico {
  flex-shrink: 0;
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.1rem;
  color: #93c5fd;
}
.account-info-ico svg {
  width: 100%;
  height: 100%;
  display: block;
}
.account-pass-row {
  position: relative;
  display: flex;
  align-items: center;
}
.account-pass-row input {
  width: 100%;
  padding-right: 2.75rem;
}
.account-pass-toggle {
  position: absolute;
  right: 0.55rem;
  top: 50%;
  transform: translateY(-50%);
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(255,255,255,0.65);
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
}
.account-pass-toggle:hover { color: #fff; background: rgba(255,255,255,0.08); }
.account-pass-toggle svg {
  width: 1.05rem;
  height: 1.05rem;
}
.account-pass-hint {
  margin: 0.2rem 0 0;
  font-size: 0.8rem;
}
.account-pass-hint.is-error {
  color: #f87171;
}
.account-soon-input,
.account-discord-input {
  opacity: 0.85;
}
.account-discord-input.is-linked {
  opacity: 1;
  color: var(--ink);
}
.discord-stat-add,
.stat .discord-stat-linked {
  display: block;
  font-family: var(--font-body);
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 0.25rem;
  color: inherit;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
  font-variant-numeric: lining-nums tabular-nums;
}
.discord-stat-add:hover {
  text-decoration: underline;
}

.char-count {
  font-size: 0.78rem;
  color: var(--ink-soft);
  flex-shrink: 0;
}

.choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.choice-card {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 7.5rem;
  padding: 1rem;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.55);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.choice-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.choice-card:hover {
  border-color: rgba(255,255,255,0.28);
  color: rgba(255,255,255,0.85);
}
.choice-card.is-selected,
.choice-card:has(input:checked) {
  border-color: rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.08);
  color: #fff;
}

.field {
  display: grid;
  gap: 0.4rem;
}
.field-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}
.field-label {
  font-size: 0.92rem;
  font-weight: 600;
  color: #fff;
}
.profile-form {
  gap: 1.1rem;
}
.profile-form input[type="text"],
.profile-form textarea {
  border-radius: 14px;
  padding: 0.85rem 1rem;
  background: rgba(255,255,255,0.04);
}
.profile-form textarea {
  min-height: 140px;
}

.slug-input {
  display: flex;
  align-items: stretch;
  width: 100%;
  min-height: 3rem;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.035);
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.slug-input:focus-within {
  border-color: rgba(255,255,255,0.28);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.04);
}
.slug-input-prefix {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding: 0 0.85rem 0 1rem;
  color: rgba(255,255,255,0.38);
  font-size: 0.92rem;
  font-weight: 500;
  white-space: nowrap;
  user-select: none;
  background: rgba(0,0,0,0.28);
  border-right: 1px solid rgba(255,255,255,0.1);
}
.slug-input input[type="text"] {
  flex: 1;
  min-width: 0;
  margin: 0;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0.85rem 1rem 0.85rem 0.85rem;
  color: #fff;
  font: inherit;
  font-weight: 500;
  outline: none;
}
.slug-input input[type="text"]:focus {
  outline: none;
  box-shadow: none !important;
}

.alias-manage-btn {
  width: 100%;
  justify-content: center;
  min-height: 3rem;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.035);
  color: rgba(255,255,255,0.55);
  font-weight: 500;
}
.alias-manage-btn:hover {
  color: #fff;
  border-color: rgba(255,255,255,0.28);
  background: rgba(255,255,255,0.06);
}
.alias-modal-desc {
  margin: 0 0 0.85rem;
  line-height: 1.45;
}
.alias-warn {
  background: rgba(249, 115, 22, 0.16);
  border-color: rgba(249, 115, 22, 0.45);
  color: #ffd3a8;
}
.alias-current {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0 0 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.03);
}
.alias-current-row {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}
.alias-current-link {
  color: #fff;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.alias-current-link:hover { text-decoration: underline; }
.alias-modal-actions {
  margin-top: 0.35rem;
  gap: 0.75rem;
}

.lock { color: var(--soft-red); font-size: 0.8rem; margin-left: 0.35rem; }

.premium-field-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.45rem;
  margin-bottom: 0;
}
.premium-field-head .field-label {
  margin: 0;
}
.premium-lock {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #f0a84a;
  text-decoration: none;
  flex-shrink: 0;
  line-height: 0;
}
.premium-lock:hover { color: #ffc16a; }
.premium-lock-tip {
  pointer-events: none;
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%) translateY(4px) scale(0.96);
  white-space: nowrap;
  padding: 0.55rem 0.9rem;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.14);
  background: #000;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0.01em;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 20;
}
.premium-lock:hover .premium-lock-tip,
.premium-lock:focus-visible .premium-lock-tip {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
}
.premium-field select:disabled,
.premium-field .custom-select.is-locked .custom-select-trigger {
  opacity: 0.72;
  cursor: pointer;
}
.custom-select.is-locked .custom-select-trigger {
  opacity: 0.72;
}
.soon { color: var(--ink-muted); font-size: 1.1rem !important; font-weight: 500 !important; }

.frame-url-tools { display: flex; align-items: center; gap: 0.4rem; }
.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.05);
  color: #fff;
  cursor: pointer;
}
.icon-btn:hover { border-color: var(--soft-red); color: var(--soft-red); }

.chart-card canvas { max-height: 260px; }
.chart-card h3 {
  font-variant-numeric: lining-nums tabular-nums;
}

.info-banner, .warn-banner {
  padding: 0.75rem 1rem;
  border-radius: 12px;
  margin: 0.75rem 0;
  font-size: 0.92rem;
}
.info-banner { background: rgba(37, 99, 235, 0.35); border: 1px solid rgba(96,165,250,0.45); }
.warn-banner { background: var(--soft-red-soft); border: 1px solid var(--soft-red-border); color: #ffc9c9; }

.extras-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 1rem 0;
}
.extras-tab {
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: transparent;
  color: var(--ink-muted);
  cursor: pointer;
}
.extras-tab.active, .extras-tab:hover {
  color: #fff;
  border-color: rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.06);
}
.extra-panel { display: none; }
.extra-panel.active { display: block; animation: fadeUp 0.3s ease; }

.pills { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.75rem 0; }
.pill {
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.22);
  font-size: 0.85rem;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
}
.tag-pill {
  cursor: grab;
  font: inherit;
  line-height: 1.2;
  transition: border-color 0.15s ease, background 0.15s ease, opacity 0.15s ease;
}
.tag-pill:active { cursor: grabbing; }
.tag-pill:hover {
  border-color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.08);
}
.tag-pill.is-dragging { opacity: 0.45; }
.tag-pill.is-drag-over {
  border-color: rgba(74, 222, 128, 0.7);
  background: rgba(34, 197, 94, 0.1);
}
.tags-pills .tag-pill {
  padding: 0.45rem 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: transparent;
}

.badge-board {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 1rem;
}
.badge-board-item {
  display: grid;
  grid-template-columns: 1.25rem 2.5rem 1fr auto;
  gap: 0.65rem;
  align-items: center;
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.03);
  transition: border-color 0.15s ease, background 0.15s ease, opacity 0.15s ease;
}
.badge-board-item.is-locked {
  opacity: 0.55;
}
.badge-board-item.is-earned {
  border-color: rgba(255,255,255,0.28);
  background: rgba(255,255,255,0.06);
}
.badge-board-item.is-earned.is-off {
  opacity: 0.72;
  border-color: rgba(255,255,255,0.14);
}
.badge-board-item.is-dragging {
  opacity: 0.45;
}
.badge-board-item.is-drag-over {
  border-color: rgba(74, 222, 128, 0.55);
  background: rgba(34, 197, 94, 0.08);
}
.badge-drag {
  display: grid;
  place-items: center;
  color: rgba(255,255,255,0.35);
  cursor: grab;
  user-select: none;
}
.badge-drag:active { cursor: grabbing; }
.badge-drag-spacer {
  visibility: hidden;
  pointer-events: none;
}
.badge-board-item[draggable="true"] {
  cursor: grab;
}
.badge-board-icon {
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  color: #fff;
  line-height: 0;
}
.badge-board-icon img,
.badge-board-img {
  width: 24px !important;
  height: 24px !important;
  max-width: 24px !important;
  max-height: 24px !important;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}
.badge-board-svg {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: var(--badge-theme, #fff);
  line-height: 0;
}
.badge-board-svg svg {
  width: 24px !important;
  height: 24px !important;
  display: block;
  flex-shrink: 0;
  fill: currentColor;
  color: inherit;
}
.badge-board-item.is-earned .badge-board-svg {
  color: var(--badge-theme, #fff);
  filter: drop-shadow(0 0 4px color-mix(in srgb, var(--badge-theme, #fff) 45%, transparent));
}
.badge-board-meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}
.badge-board-meta strong {
  font-size: 0.95rem;
}
.badge-board-meta .muted {
  font-size: 0.8rem;
  line-height: 1.3;
}
.badge-board-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.badge-check,
.badge-toggle {
  display: inline-grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.25);
  border: 1px solid rgba(74, 222, 128, 0.55);
  color: #86efac;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  line-height: 0;
}
.badge-toggle-check {
  display: block;
  width: 14px;
  height: 14px;
}
.badge-toggle.is-off {
  background: transparent;
  border-color: rgba(255,255,255,0.22);
  color: transparent;
}
.badge-toggle.is-off .badge-toggle-check {
  opacity: 0;
}
.badge-toggle.is-off:hover {
  border-color: rgba(74, 222, 128, 0.55);
}
.badge-toggle.is-off:hover .badge-toggle-check {
  opacity: 0.35;
  color: #86efac;
}
.btn-show-badges {
  background: transparent;
  border-color: rgba(74, 222, 128, 0.65);
  color: #86efac;
}
.btn-show-badges:hover {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(74, 222, 128, 0.85);
}

.og-card {
  border-left: 4px solid #fff;
  background: #1e1f22;
  border-radius: 8px;
  padding: 0.85rem 1rem;
  margin-top: 0.75rem;
}
.og-site { font-size: 0.75rem; color: #b5bac1; }
.og-title { font-weight: 700; margin: 0.2rem 0; }
.og-url { color: #00a8fc; font-size: 0.85rem; word-break: break-all; }
.og-img { width: 100%; max-height: 180px; object-fit: cover; border-radius: 8px; margin-top: 0.65rem; }

.embed-preview-block {
  margin: 1rem 0 1.15rem;
}
.embed-preview-block h3 {
  margin: 0 0 0.65rem;
  font-size: 1rem;
}
.embed-preview-note {
  margin: 0.65rem 0 0;
  font-style: italic;
}
.extras-panel-tools {
  margin-bottom: 0.75rem;
}
.extras-count {
  font-size: 0.9rem;
}
.discord-preview {
  border-radius: 14px;
  border: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.35);
  padding: 1rem 1.05rem;
}
.discord-msg {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 0.75rem;
}
.discord-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: #111;
}
.discord-msg-head {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  flex-wrap: wrap;
}
.discord-user {
  font-weight: 700;
  color: #fff;
}
.discord-time {
  font-size: 0.75rem;
  color: var(--ink-muted);
}
.discord-link {
  display: inline-block;
  margin: 0.15rem 0 0.45rem;
  color: #00a8fc;
  font-size: 0.95rem;
  word-break: break-all;
}
.discord-link:hover { text-decoration: underline; }
.discord-embed {
  border-left: 4px solid #fff;
  border-radius: 4px;
  background: #2b2d31;
  padding: 0.55rem 0.75rem 0.75rem;
  max-width: 420px;
}
.discord-embed-inner {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.discord-embed-site {
  color: #b5bac1;
  font-size: 0.75rem;
  line-height: 1.3;
  margin-bottom: 0.15rem;
}
.discord-embed-site.is-empty { display: none; }
.discord-embed-title {
  color: #00a8fc;
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1.3;
}
.discord-embed-title.is-empty { display: none; }
.discord-embed-desc {
  margin-top: 0.2rem;
  color: #dbdee1;
  font-size: 0.88rem;
  white-space: pre-wrap;
  word-break: break-word;
}
.discord-embed-desc.is-empty { display: none; }
.discord-embed-media {
  border-radius: 8px;
  overflow: hidden;
  background: #111214;
  min-height: 120px;
}
.discord-embed-media img {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  display: block;
}
.discord-embed-fallback {
  min-height: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 1.25rem 0.75rem;
  text-align: center;
  color: #fff;
}
.discord-embed-fallback strong {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.discord-embed-fallback span {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.72);
}
.embed-preview-block[data-embed-size="Small"] .discord-embed-inner {
  display: grid;
  grid-template-columns: 1fr 88px;
  gap: 0.65rem;
  align-items: start;
}
.embed-preview-block[data-embed-size="Small"] .discord-embed-media {
  min-height: 88px;
  width: 88px;
  height: 88px;
  border-radius: 6px;
}
.embed-preview-block[data-embed-size="Small"] .discord-embed-media img {
  width: 88px;
  height: 88px;
  max-height: none;
}
.embed-preview-block[data-embed-size="Small"] .discord-embed-fallback {
  min-height: 88px;
  padding: 0.35rem;
}
.embed-preview-block[data-embed-size="Small"] .discord-embed-fallback strong {
  font-size: 0.78rem;
}
.embed-preview-block[data-embed-size="Small"] .discord-embed-fallback span {
  font-size: 0.65rem;
}
.embed-form .req { color: #f87171; }
.field.is-locked .custom-select,
.field.is-locked select {
  opacity: 0.72;
}

.dropzone {
  border: 1px dashed rgba(255,255,255,0.25);
  border-radius: 14px;
  padding: 1.5rem;
  text-align: center;
  position: relative;
}
.dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.favicon-card h3 { margin-bottom: 0.85rem; }
.favicon-box {
  position: relative;
  height: 160px;
  min-height: 160px;
  max-height: 160px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.favicon-box.has-file {
  min-height: 160px;
}
.favicon-box.has-file .favicon-preview {
  margin: auto;
}
.favicon-drop {
  border-style: solid;
  padding: 0;
  gap: 0.55rem;
}
.favicon-drop-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.45);
  line-height: 0;
  margin: 0;
}
.favicon-drop-icon svg { width: 28px; height: 28px; display: block; }
.favicon-drop p {
  margin: 0;
  color: rgba(255,255,255,0.55);
  font-size: 0.92rem;
  line-height: 1.2;
  text-align: center;
}
.favicon-preview {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: #111;
}
.favicon-preview-round {
  border-radius: 50%;
}
.favicon-delete {
  position: absolute;
  right: 0.85rem;
  bottom: 0.85rem;
}
.favicon-hint {
  margin: 0.65rem 0 0;
  font-size: 0.82rem;
}

.media-field .field-head {
  margin-bottom: 0.55rem;
}
.media-box {
  position: relative;
  height: 160px;
  min-height: 160px;
  max-height: 160px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.media-box-wide {
  min-height: 160px;
}
.media-box-banner {
  height: 160px;
  min-height: 160px;
  max-height: 160px;
  position: relative;
}
.media-box.has-file {
  min-height: 160px;
}
.media-box-banner.has-file {
  min-height: 160px;
}
.media-drop {
  border-style: solid;
  padding: 0;
  gap: 0.55rem;
}
.media-box-banner.media-drop {
  padding: 0;
}
.media-drop-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.45);
  line-height: 0;
  margin: 0;
}
.media-drop-icon svg { width: 28px; height: 28px; display: block; }
.media-drop p {
  margin: 0;
  color: rgba(255,255,255,0.55);
  font-size: 0.92rem;
  line-height: 1.2;
  text-align: center;
}
.media-preview-full {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.media-box-banner .media-preview-full {
  position: absolute;
  inset: 0;
  min-height: 0;
  border: 0;
  border-radius: 0;
}
.media-delete {
  position: absolute;
  right: 0.85rem;
  bottom: 0.85rem;
  z-index: 2;
}
.media-hint {
  margin: 0.65rem 0 0;
  font-size: 0.82rem;
}

.color-field {
  width: 100%;
}
.color-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.4rem;
}
.color-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--ink-soft);
  font-size: 0.8rem;
  user-select: none;
}
.color-hex {
  width: 4.75rem;
  padding: 0 !important;
  margin: 0;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: rgba(245, 245, 245, 0.45) !important;
  text-align: right;
  outline: none !important;
  box-shadow: none !important;
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.color-hex:focus {
  color: rgba(245, 245, 245, 0.78) !important;
}
.color-swatch-wrap {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 41px;
  padding: 0.55rem 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  transition: border-color 0.2s ease, background 0.2s ease;
}
.color-swatch-wrap:hover {
  border-color: var(--glass-border-hover);
}
.color-swatch-wrap:focus-within {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(0, 0, 0, 0.55);
}
.color-swatch {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 22px;
  padding: 0 !important;
  margin: 0;
  border: 0 !important;
  border-radius: 999px !important;
  background: transparent !important;
  cursor: pointer;
  outline: none;
}
.color-swatch::-webkit-color-swatch-wrapper {
  padding: 0;
}
.color-swatch::-webkit-color-swatch {
  border: 0;
  border-radius: 999px;
}
.color-swatch::-moz-color-swatch {
  border: 0;
  border-radius: 999px;
}

.speed-field {
  width: 100%;
}
.speed-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.4rem;
}
.speed-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--ink-soft);
  font-size: 0.8rem;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  user-select: none;
}
.speed-edit {
  width: 2.75rem;
  padding: 0 !important;
  margin: 0;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: rgba(245, 245, 245, 0.42) !important;
  text-align: right;
  outline: none !important;
  box-shadow: none !important;
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1;
}
.speed-edit:focus {
  color: rgba(245, 245, 245, 0.72) !important;
}
.speed-max {
  color: var(--ink-soft);
  line-height: 1;
}
.speed-pencil {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  flex-shrink: 0;
}
.speed-pencil:hover {
  color: var(--ink-muted);
  background: rgba(255, 255, 255, 0.06);
}
.speed-pencil svg {
  display: block;
  width: 14px;
  height: 14px;
}
.speed-control {
  display: flex;
  align-items: stretch;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  transition: border-color 0.2s ease, background 0.2s ease;
}
.speed-unit {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 3rem;
  padding: 0.7rem 0.85rem;
  border-right: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink-soft);
  font-size: 0.88rem;
  line-height: 1;
  flex-shrink: 0;
  user-select: none;
}
.speed-slider-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 1.1rem;
  background: transparent;
}
.speed-control:hover {
  border-color: var(--glass-border-hover);
}
.speed-control:focus-within {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(0, 0, 0, 0.55);
}
.speed-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    var(--soft-red) 0%,
    var(--soft-red) var(--speed-pct, 50%),
    rgba(255, 255, 255, 0.14) var(--speed-pct, 50%),
    rgba(255, 255, 255, 0.14) 100%
  );
  outline: none;
  cursor: pointer;
  margin: 0;
  padding: 0;
  border: 0;
  accent-color: var(--soft-red);
}
.speed-range::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: transparent;
}
.speed-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  margin-top: -5px;
  border-radius: 50%;
  background: var(--soft-red);
  border: 0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  cursor: grab;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.speed-range:active::-webkit-slider-thumb {
  cursor: grabbing;
  transform: scale(1.08);
  box-shadow: 0 0 0 4px var(--soft-red-soft);
}
.speed-range::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 0;
}
.speed-range::-moz-range-progress {
  height: 6px;
  border-radius: 999px;
  background: var(--soft-red);
}
.speed-range::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--soft-red);
  border: 0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  cursor: grab;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.35rem var(--page-pad) 1.75rem;
  color: var(--ink-soft);
  font-size: 0.85rem;
  border-top: 1px solid rgba(255,255,255,0.06);
  margin-top: auto;
}
.footer-copy { color: rgba(245,245,245,0.42); }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.85rem; }
.footer-links a:hover { color: #fff; }
.footer-social {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.footer-social-link {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: rgba(255,255,255,0.72);
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.03);
  transition: 0.2s ease;
}
.footer-social-link:hover {
  color: #fff;
  border-color: rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.08);
}
.footer-social-link svg {
  width: 16px;
  height: 16px;
  display: block;
}

.home-main {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 96px);
}

.home-stats {
  padding: 3.5rem var(--page-pad) 4rem;
}

.home-stats-inner {
  max-width: 980px;
  margin: 0 auto;
  text-align: center;
}

.home-stats-title {
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 3.4vw, 2.15rem);
  line-height: 1.25;
  margin: 0 0 0.85rem;
  font-weight: 700;
}

.home-stats-accent {
  color: var(--soft-red);
}

.home-stats-sub {
  color: var(--ink-muted);
  max-width: 42rem;
  margin: 0 auto 2rem;
  font-size: 1rem;
}

.home-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.home-stat-card {
  border-radius: 18px;
  padding: 1.15rem 1.2rem;
  text-align: left;
}

.home-stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.home-stat-top strong {
  font-size: clamp(1.35rem, 2.8vw, 1.85rem);
  letter-spacing: -0.02em;
}

.home-stat-icon {
  width: 28px;
  height: 28px;
  color: var(--soft-red);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.home-stat-icon svg {
  width: 22px;
  height: 22px;
}

@media (max-width: 760px) {
  .home-stats-grid { grid-template-columns: 1fr; }
}

.stats-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) {
  .stats-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.admin-tabs { margin-top: 1rem; }
.admin-tabs .extras-tab { text-decoration: none; }
.admin-section-title {
  margin: 1.5rem 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 650;
  color: #fff;
}
.admin-subhead {
  margin: 1rem 0 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
}
.admin-search {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin: 1rem 0 0.75rem;
}
.admin-search input[type="search"] {
  flex: 1;
  min-width: 200px;
}
.admin-hint { margin-bottom: 0.75rem; }
.admin-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--glass-border);
  border-radius: 14px;
}
.admin-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.92rem;
}
.admin-table th,
.admin-table td {
  padding: 0.75rem 0.9rem;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  vertical-align: middle;
}
.admin-table th {
  color: var(--ink-muted);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.admin-table tbody tr:last-child td {
  border-bottom: none;
}
.admin-table th:last-child,
.admin-table td:last-child {
  min-width: 12rem;
}
.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  min-height: 2.1rem;
}
.admin-table-owner .admin-actions {
  flex-wrap: nowrap;
  white-space: nowrap;
}
.admin-days {
  min-width: 7.5rem;
  padding: 0.35rem 0.5rem;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  background: rgba(0,0,0,0.25);
  color: #fff;
}
.admin-badges-card,
.admin-owner-card { margin-top: 0.5rem; }
.admin-owner-card textarea {
  width: 100%;
  min-height: 8rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
}
.admin-custom-badges { margin-top: 1rem; }
.admin-badge-ico.inline {
  display: inline-grid;
  vertical-align: middle;
  margin-right: 0.4rem;
}
.admin-uid-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.admin-uid-row input {
  flex: 1;
}
.admin-owned-badges {
  min-height: 2.5rem;
  padding: 0.65rem 0.8rem;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: rgba(0,0,0,0.22);
  font-size: 0.9rem;
}
.admin-badge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.55rem;
}
.admin-badge-option {
  display: grid;
  grid-template-columns: auto 22px 1fr;
  gap: 0.55rem;
  align-items: start;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.03);
  cursor: pointer;
}
.admin-badge-option strong {
  display: block;
  color: #fff;
  font-size: 0.92rem;
}
.admin-badge-option .muted {
  display: block;
  font-size: 0.78rem;
  line-height: 1.35;
  margin-top: 0.15rem;
}
.admin-badge-img,
.admin-badge-ico {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  object-fit: contain;
  margin-top: 0.15rem;
  color: #fff;
  line-height: 0;
}
.admin-badge-ico svg {
  width: 22px;
  height: 22px;
  display: block;
  fill: currentColor;
}
.admin-badge-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.role-pill {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.2);
  font-size: 0.78rem;
}
.role-pill.role-owner {
  border-color: rgba(250, 204, 21, 0.55);
  color: #fde68a;
  background: rgba(250, 204, 21, 0.12);
}
.role-pill.role-admin {
  border-color: rgba(96, 165, 250, 0.55);
  color: #bfdbfe;
  background: rgba(59, 130, 246, 0.15);
}
.role-pill.role-user {
  color: var(--ink-muted);
}

/* Reveal Screen Text editor */
.reveal-md-field .char-count {
  color: var(--ink-soft);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}
.reveal-md-box {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.reveal-md-box textarea,
.reveal-md-preview {
  width: 100%;
  min-height: 120px;
  padding: 0.95rem 1rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(245, 245, 245, 0.88);
  resize: vertical;
  font-size: 0.95rem;
  line-height: 1.55;
  outline: none;
  box-shadow: none;
}
#bioTextarea,
.profile-form .reveal-md-preview {
  min-height: 200px;
}
.reveal-md-preview {
  display: block;
  color: #fff;
}
.reveal-md-preview[hidden],
.reveal-md-box textarea[hidden] {
  display: none !important;
}
.reveal-md-bar {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.7rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.8rem;
  color: #fff;
}
.reveal-md-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #fff;
  text-decoration: none;
  padding-right: 0.85rem;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}
.reveal-md-link:hover {
  color: #ffc16a;
}
.reveal-md-btn {
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  cursor: pointer;
  padding: 0;
  font: inherit;
}
.reveal-md-btn:hover {
  color: #fff;
}
.reveal-md-btn[hidden] {
  display: none !important;
}

/* Markdown docs page */
.markdown-page .markdown-hero {
  margin-bottom: 1.5rem;
}
.markdown-tip {
  margin: 0.85rem 0;
  color: rgba(255, 255, 255, 0.85);
}
.markdown-note {
  border-left: 3px solid rgba(255, 255, 255, 0.55);
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 0 12px 12px 0;
  color: rgba(255, 255, 255, 0.8);
}
.markdown-table {
  display: grid;
  gap: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  overflow: hidden;
}
.markdown-table-head,
.markdown-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding: 0.85rem 1rem;
  align-items: center;
}
.markdown-table-head {
  background: rgba(255, 255, 255, 0.05);
  font-weight: 600;
  color: #fff;
}
.markdown-row {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.markdown-tag {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
  color: rgba(245, 245, 245, 0.75);
  white-space: pre-wrap;
  word-break: break-word;
}
.markdown-preview {
  color: #fff;
}
@media (max-width: 720px) {
  .markdown-table-head,
  .markdown-row {
    grid-template-columns: 1fr;
  }
}

/* —— Leaderboard —— */
.leaderboard-frame {
  max-width: 920px;
}
.leaderboard-title {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0.15rem 0 1.35rem;
}
.leaderboard-empty {
  margin: 0.5rem 0 0;
}
.leaderboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem 0.85rem;
}
.lb-card {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: stretch;
  column-gap: 0.75rem;
  padding: 0 0.95rem 0 0;
  border-radius: 16px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.045);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
  overflow: hidden;
}
.lb-card:hover {
  border-color: var(--glass-border-hover);
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}
.lb-rank {
  box-sizing: border-box;
  min-width: 2.5rem;
  padding: 0 0.85rem;
  border-right: 1px solid var(--glass-border);
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lb-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #111;
  align-self: center;
  margin: 0.75rem 0;
}
.lb-meta {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.1rem;
  min-width: 0;
  padding: 0.75rem 0;
}
.lb-name {
  font-weight: 700;
  font-size: 0.98rem;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lb-slug {
  font-size: 0.82rem;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lb-views {
  min-width: 2.4rem;
  padding: 0.28rem 0.55rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.88rem;
  font-weight: 600;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff;
  text-align: center;
  font-variant-numeric: tabular-nums;
  opacity: 1;
  align-self: center;
}
@media (max-width: 720px) {
  .leaderboard-grid {
    grid-template-columns: 1fr;
  }
}

