/* ============================================================
   fangs.my dashboard (layout follows guns.lol's dashboard)
   ============================================================ */
:root {
  --d-bg: #0b0b0b;
  --d-panel: #111111;
  --d-panel-2: #151515;
  --d-line: #1d1d1d;
  --d-text: #f4f4f4;
  --d-muted: #9a9a9a;
  --d-tint: #2a1518;          /* red-tinted cards (guns uses purple) */
  --d-tint-border: #45212a;
  --d-active: rgba(160, 40, 52, 0.38);
  --d-btn: rgba(165, 52, 62, 0.45);
  --d-btn-border: rgba(214, 72, 84, 0.55);
  --sb-w: 288px;
}
.dash-body { background: var(--d-bg); color: var(--d-text); min-height: 100vh; }
/* Keep page and panel scrollbars in the dashboard's existing dark palette. */
:where(html, .dash-body *) { scrollbar-width: thin; scrollbar-color: #444 #0b0b0b; }
:where(html, .dash-body *)::-webkit-scrollbar { width: 8px; height: 8px; }
:where(html, .dash-body *)::-webkit-scrollbar-track { background: #0b0b0b; }
:where(html, .dash-body *)::-webkit-scrollbar-thumb { background: #444; border: 2px solid #0b0b0b; border-radius: 8px; }
:where(html, .dash-body *)::-webkit-scrollbar-thumb:hover { background: #666; }
:where(html, .dash-body *)::-webkit-scrollbar-button { display: none; }
:where(html, .dash-body *)::-webkit-scrollbar-corner { background: #0b0b0b; }
@media (forced-colors: active) {
  :where(html, .dash-body *) { scrollbar-color: auto; }
}
.dash-body i.fa-solid, .dash-body i.fa-regular, .dash-body i.fa-brands { line-height: 1; }

/* ---------------- sidebar ---------------- */
.sb {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sb-w);
  z-index: 40;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 16px 16px;
  background: var(--d-panel);
  border-radius: 0 34px 34px 0;
  overflow-y: auto;
}
.sb-brand-row { display: flex; align-items: center; justify-content: space-between; padding: 4px 8px 18px; }
.sb .brand h1 { font-size: 25px; }
.sb .brand .logo { width: 32px; height: 32px; }
.sb-close { display: none; background: none; border: 0; color: var(--d-muted); font-size: 22px; cursor: pointer; }
.sb-search {
  width: 100%;
  height: 46px;
  padding: 0 10px 0 14px;
  display: flex;
  align-items: center;
  gap: 11px;
  background: var(--d-panel);
  border: 1.6px solid var(--d-line);
  border-radius: 14px;
  color: #d8d8d8;
  font: inherit;
  font-size: 15.5px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.sb-search:hover { border-color: #2a2a2a; background: #141414; }
.sb-search span { flex: 1; text-align: left; }
kbd {
  font-family: inherit;
  font-size: 11.5px;
  color: var(--d-muted);
  padding: 2px 7px;
  border: 1.4px solid #2a2a2a;
  border-radius: 7px;
}
.sb-sep { height: 1.6px; background: var(--d-line); margin: 20px 10px 14px; }
.sb-nav { display: flex; flex-direction: column; gap: 4px; }
.sb-item {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 13px;
  border: 0;
  border-radius: 15px;
  background: transparent;
  color: #ececec;
  font: inherit;
  font-size: 17px;
  cursor: pointer;
  transition: background 0.2s;
}
.sb-item > i:first-child { width: 20px; text-align: center; font-size: 16px; }
.sb-item span { flex: 1; text-align: left; }
.sb-item:hover { background: #181818; }
.sb-item.on { background: var(--d-active); }
.sb-chev { font-size: 13px; transition: transform 0.3s; }
.sb-group.open .sb-chev { transform: rotate(180deg); }
.sb-group.open > .sb-item { background: var(--d-active); }
.sb-sub { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.3s ease; }
.sb-group.open .sb-sub { grid-template-rows: 1fr; }
.sb-sub > div { overflow: hidden; display: flex; flex-direction: column; padding-left: 47px; }
.sb-sub a { padding: 5px 0; font-size: 15px; color: #8d8d8d; transition: color 0.2s; }
.sb-sub a:first-child { margin-top: 6px; }
.sb-sub a:last-child { margin-bottom: 6px; }
.sb-sub a:hover, .sb-sub a.on { color: #fff; }

.sb-bottom { display: flex; flex-direction: column; gap: 14px; }
.sb-box { padding: 18px 20px; background: var(--d-panel-2); border-radius: 24px; display: flex; flex-direction: column; gap: 11px; }
.sb-btn {
  height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border-radius: 13px;
  font-size: 15.5px;
  font-weight: 500;
  color: #fff;
  transition: filter 0.2s, transform 0.15s;
}
.sb-btn:hover { filter: brightness(1.15); }
.sb-btn:active { transform: scale(0.98); }
.sb-btn.help { background: #23264d; border: 1.6px solid #4851c9; }
.sb-btn.mypage { background: var(--d-btn); border: 1.6px solid var(--d-btn-border); }
.sb-share {
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 999px;
  background: rgba(120, 30, 42, 0.55);
  border: 1.6px solid var(--d-btn-border);
  color: #fff;
  font: inherit;
  font-size: 16px;
  cursor: pointer;
  transition: filter 0.2s;
}
.sb-share:hover { filter: brightness(1.15); }
.sb-user { display: flex; align-items: center; gap: 11px; padding: 12px 14px; background: var(--d-panel-2); border-radius: 20px; }
.sb-user .av, .sb-user img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; background: linear-gradient(135deg, #f05561, #6b1c24); display: grid; place-items: center; font-weight: 700; text-transform: uppercase; }
.sb-user b { display: block; font-size: 15px; font-weight: 600; color: #fff; }
.sb-user small { display: block; font-size: 12.5px; color: var(--d-muted); }
.sb-user .grow { flex: 1; min-width: 0; }
.sb-user .grow b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-user button { background: none; border: 0; color: var(--d-muted); font-size: 16px; cursor: pointer; padding: 6px; border-radius: 8px; }
.sb-user button:hover { color: #ff6b75; background: #1d1d1d; }

/* ---------------- main ---------------- */
.dash-view {
  margin-left: var(--sb-w);
  padding: 44px 48px 80px;
  min-height: 100vh;
}
.dash-view > section { max-width: 1080px; margin: 0 auto; animation: pageIn 0.35s ease both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.dash-top { display: none; }
.sb-dim { display: none; }

.h-title { font-size: 25px; font-weight: 500; color: #ededed; margin: 8px 0 18px; }
.h-title.center { text-align: center; font-size: 36px; margin: 10px 0 40px; }
.panel-d {
  background: var(--d-panel);
  border-radius: 22px;
  padding: 26px 28px;
}
.panel-d + .panel-d, .panel-d + .h-title, .grid + .h-title, .grid + .panel-d { margin-top: 22px; }
.ph-row { display: flex; align-items: center; gap: 12px; }
.ph-row h2 { font-size: 25px; font-weight: 500; color: #f2f2f2; }
.ph-row > i { font-size: 20px; color: #f2f2f2; }
.ph-sub { margin-top: 8px; color: var(--d-muted); font-size: 16px; }

.grid { display: grid; gap: 18px; }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g2 { grid-template-columns: 1.4fr 1fr; }

/* tinted stat cards (Overview / Analytics) */
.tcard {
  position: relative;
  padding: 22px 26px;
  border-radius: 22px;
  background: var(--d-tint);
  border: 1.6px solid var(--d-tint-border);
  transition: transform 0.2s, border-color 0.2s;
}
.tcard:hover { transform: translateY(-2px); border-color: #5a2a33; }
.tcard h4 { font-size: 18px; font-weight: 500; color: #f4f4f4; }
.tcard .val { margin-top: 18px; font-size: 30px; font-weight: 700; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tcard .sub { margin-top: 6px; font-size: 15px; color: #b3a7a9; }
.tcard > i { position: absolute; top: 22px; right: 24px; font-size: 20px; color: #f0f0f0; }

.btn-d {
  height: 44px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 13px;
  border: 1.6px solid #262626;
  background: #1c1c1c;
  color: #f2f2f2;
  font: inherit;
  font-size: 15.5px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.15s, filter 0.2s;
}
.btn-d:hover { background: #242424; }
.btn-d:active { transform: scale(0.98); }
.btn-d.primary { background: var(--d-btn); border-color: var(--d-btn-border); color: #fff; }
.btn-d.primary:hover { filter: brightness(1.15); }
.btn-d.danger { color: #ff7b84; border-color: #3a1d21; }
.btn-d.block { width: 100%; justify-content: flex-start; }
.btn-d[disabled] { opacity: 0.55; cursor: default; }
.btn-d .spin { width: 15px; height: 15px; border-radius: 50%; border: 2px solid rgba(255,255,255,.3); border-top-color: #fff; animation: spin .7s linear infinite; }

/* inputs */
.f-label { display: flex; align-items: center; gap: 7px; font-size: 16.5px; font-weight: 500; color: #ededed; margin: 18px 0 9px; }
.f-label:first-child { margin-top: 0; }
.f-label small { font-weight: 400; color: var(--d-muted); font-size: 13.5px; }
.f-input {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 50px;
  padding: 0 14px;
  border-radius: 15px;
  background: #0d0d0d;
  border: 1.6px solid #161616;
  transition: border-color 0.2s;
}
.f-input:focus-within { border-color: rgba(214, 72, 84, 0.55); }
.f-input > i { color: #6f6f6f; font-size: 16px; width: 20px; text-align: center; }
.f-input input, .f-input select, .f-input textarea {
  flex: 1;
  min-width: 0;
  background: none;
  border: 0;
  outline: none;
  color: #f0f0f0;
  font: inherit;
  font-size: 15.5px;
}
.f-input select { appearance: none; cursor: pointer; }
.f-input select option { background: #151515; }
.f-input.ta { height: auto; align-items: flex-start; padding: 12px 14px; }
.f-input textarea { resize: vertical; min-height: 70px; line-height: 1.45; }
.f-input .eye { background: none; border: 0; color: #8a8a8a; cursor: pointer; font-size: 16px; }
.f-row { display: flex; gap: 10px; align-items: center; }
.f-row .f-input { flex: 1; }
.f-hint { margin-top: 7px; font-size: 13.5px; color: var(--d-muted); }
.f-card { background: var(--d-panel); border-radius: 22px; padding: 22px 22px 24px; }
.settings-col { max-width: 800px; margin: 0 auto; }

input[type=color] { width: 34px; height: 34px; border: 0; padding: 0; background: none; cursor: pointer; }
input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
input[type=color]::-webkit-color-swatch { border: 2px solid #2a2a2a; border-radius: 9px; }
input[type=range] { -webkit-appearance: none; appearance: none; flex: 1; height: 6px; border-radius: 9px; background: #262626; outline: none; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--accent-strong); border: 3px solid #1a1a1a; cursor: pointer; }
input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--accent-strong); border: 3px solid #1a1a1a; cursor: pointer; }

.switch { position: relative; width: 44px; height: 26px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: #2a2a2a; cursor: pointer; transition: background 0.2s; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform 0.2s; }
.switch input:checked + span { background: var(--accent-strong); }
.switch input:checked + span::after { transform: translateX(18px); }

/* ---------------- overview ---------------- */
.progress { display: flex; align-items: center; gap: 16px; margin-top: 22px; }
.progress .bar { flex: 1; height: 26px; border-radius: 99px; background: #0d0d0d; border: 1.6px solid #1a1a1a; overflow: hidden; }
.progress .bar i { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, #a3202d, #e23744); transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.progress span { color: #bdbdbd; font-size: 15.5px; white-space: nowrap; }
.alert-d { margin-top: 20px; padding: 18px 20px; border-radius: 18px; background: #181818; border: 1.6px solid #1f1f1f; }
.alert-d b { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 500; color: #fff; }
.alert-d b i { color: #f5a524; }
.alert-d p { margin-top: 8px; color: #a9a9a9; font-size: 15.5px; line-height: 1.5; }
.alert-d.done b i { color: #4ade80; }
.todo { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.todo button {
  height: 52px; padding: 0 18px; display: flex; align-items: center; gap: 14px;
  border-radius: 999px; border: 1.6px solid #1f1f1f; background: #181818; color: #f0f0f0;
  font: inherit; font-size: 16.5px; cursor: pointer; transition: background 0.2s;
}
.todo button:hover { background: #1f1f1f; }
.todo button span { flex: 1; text-align: left; }
.todo button.done { opacity: 0.55; }
.todo button.done > i:first-child { color: #4ade80; }
.manage h3 { font-size: 23px; font-weight: 600; color: #fff; }
.manage p { margin-top: 6px; color: #a9a9a9; font-size: 15.5px; }
.manage .stack { margin-top: 16px; display: flex; flex-direction: column; gap: 11px; }
.manage .stack .btn-d { height: 50px; border-radius: 15px; background: #262626; border-color: #2c2c2c; }
.manage .stack .btn-d:hover { background: #2e2e2e; }

/* ---------------- analytics ---------------- */
.range-box { display: flex; flex-direction: column; gap: 12px; }
.range-box .top { display: flex; align-items: center; gap: 12px; }
.range-box .top b { font-size: 19px; font-weight: 500; }
.chip { padding: 5px 12px; border-radius: 99px; background: var(--d-tint); border: 1.6px solid var(--d-btn-border); font-size: 13.5px; color: #f2f2f2; }
.chart-wrap { position: relative; height: 280px; margin-top: 16px; }
.chart-wrap svg { width: 100%; height: 100%; overflow: visible; }
.chart-tip { position: absolute; pointer-events: none; padding: 8px 11px; background: #1b1b1b; border: 1.6px solid #2a2a2a; border-radius: 10px; font-size: 13px; color: #eee; white-space: nowrap; transform: translate(-50%, -115%); opacity: 0; transition: opacity 0.15s; }
.legend { display: flex; gap: 18px; margin-top: 10px; font-size: 13.5px; color: #aaa; }
.legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 7px; background: var(--c); vertical-align: -1px; }

/* ---------------- badges ---------------- */
.badge-row {
  display: flex; align-items: center; gap: 18px;
  padding: 18px 22px; border-radius: 20px; background: var(--d-panel);
  transition: background 0.2s;
}
.badge-row + .badge-row { margin-top: 14px; }
.badge-row:hover { background: #141414; }
.badge-row > i { font-size: 22px; width: 28px; text-align: center; }
.badge-row .txt { flex: 1; }
.badge-row b { display: block; font-size: 19px; font-weight: 500; color: #fff; }
.badge-row small { display: block; margin-top: 3px; font-size: 15px; color: #a9a9a9; }
.badge-row .btn-d { min-width: 150px; border-radius: 15px; background: #181818; }
.badge-row .owned { display: inline-flex; align-items: center; gap: 7px; color: #4ade80; font-size: 14.5px; padding: 0 12px; }
.dd-title { display: inline-flex; align-items: center; gap: 12px; font-size: 25px; color: #ededed; background: none; border: 0; font-family: inherit; cursor: pointer; margin: 8px 0 18px; }
.dd-title i { font-size: 15px; }

/* ---------------- customize ---------------- */
.uploads { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.up-col h4 { font-size: 19px; font-weight: 500; margin-bottom: 12px; color: #f0f0f0; }
.dropzone {
  position: relative;
  height: 160px;
  border-radius: 16px;
  border: 1.6px solid #1d1d1d;
  background: #0e0e0e;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  color: #7c7c7c; font-size: 15px; cursor: pointer; overflow: hidden;
  transition: border-color 0.2s, background 0.2s;
}
.dropzone:hover, .dropzone.drag { border-color: rgba(214, 72, 84, 0.55); background: #131012; }
.dropzone > i { font-size: 30px; color: #f2f2f2; }
.dropzone img, .dropzone video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dropzone.has-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,.7)); }
.dropzone .rm {
  position: absolute; top: 9px; right: 9px; z-index: 2;
  width: 32px; height: 32px; border-radius: 10px; border: 0;
  background: rgba(0,0,0,.65); color: #ff7b84; cursor: pointer;
}
.dropzone .fname { position: absolute; left: 12px; bottom: 10px; z-index: 2; color: #fff; font-size: 13px; }
.dropzone .busy { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; background: rgba(0,0,0,.6); }
.dropzone.wide { height: 180px; }
.up-col.full { grid-column: 1 / -1; }
.premium-banner {
  position: relative; overflow: hidden;
  margin-top: 46px; height: 96px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: #24121a; border: 1.6px solid #4a2028;
  font-size: 19px; color: #f2f2f2;
}
.premium-banner::before {
  content: ""; position: absolute; left: 34px; top: -14px; width: 150px; height: 150px;
  background: url("/assets/logo.svg") center/contain no-repeat; opacity: 0.12; transform: rotate(-14deg);
}
.premium-banner a { color: #ff7f89; font-weight: 600; display: inline-flex; gap: 6px; align-items: center; }
.cz-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px 24px; }
.cz-grid .wide2 { grid-column: span 2; }
.cz-grid .full { grid-column: 1 / -1; }
.color-input { display: flex; align-items: center; gap: 10px; }
.color-input code { color: #cfcfcf; font-family: inherit; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 50px; padding: 0 16px; border-radius: 15px; background: #0d0d0d; border: 1.6px solid #161616; }
.save-bar {
  position: sticky; bottom: 18px; z-index: 5;
  margin-top: 26px; padding: 14px 18px; border-radius: 18px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: rgba(20, 20, 20, 0.92); backdrop-filter: blur(10px); border: 1.6px solid #262626;
  transform: translateY(20px); opacity: 0; pointer-events: none; transition: all 0.25s ease;
}
.save-bar.show { transform: none; opacity: 1; pointer-events: auto; }
.save-bar span { color: #cfcfcf; font-size: 15px; }

/* ---------------- links ---------------- */
.social-grid { margin-top: 24px; display: grid; grid-template-columns: repeat(auto-fill, minmax(66px, 1fr)); gap: 16px; }
.social-tile {
  position: relative;
  aspect-ratio: 1;
  border-radius: 20px;
  border: 1.6px solid #1a1a1a;
  background: #141414;
  display: grid; place-items: center;
  font-size: 30px;
  cursor: pointer;
  transition: transform 0.18s, background 0.2s, border-color 0.2s;
}
.social-tile:hover { transform: translateY(-3px); background: #1a1a1a; border-color: #262626; }
.social-tile.added { border-color: rgba(214, 72, 84, 0.6); }
.social-tile.added::after {
  content: "\f00c"; font-family: "Font Awesome 6 Free"; font-weight: 900;
  position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center; font-size: 10px; color: #fff; background: var(--accent-strong);
}
.social-tile .box { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; font-size: 20px; color: #fff; }
.social-tile .rot { transform: rotate(14deg); }
.custom-url {
  margin-top: 24px; max-width: 500px;
  display: flex; align-items: center; gap: 18px;
  padding: 14px 18px; border-radius: 18px; border: 1.6px solid #1a1a1a; background: #121212;
  cursor: pointer; transition: background 0.2s, border-color 0.2s;
}
.custom-url:hover { background: #171717; border-color: #262626; }
.custom-url > i { font-size: 32px; color: #e4e4e4; }
.custom-url b { display: block; font-size: 17px; font-weight: 500; color: #fff; }
.custom-url small { display: block; margin-top: 3px; font-size: 14.5px; color: #a3a3a3; }
.my-links { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.my-links { min-width: 0; container-type: inline-size; }
.my-link:not(.soc-row) { flex-wrap: wrap; }
.my-link:not(.soc-row) > .txt { flex: 1 1 140px; overflow-wrap: anywhere; }
.my-link .act { max-width: 100%; flex-wrap: wrap; align-items: center; margin-left: auto; }
@container (max-width: 480px) {
  .my-link:not(.soc-row) > .act { flex-basis: 100%; justify-content: flex-end; }
}
.reorder-grip { touch-action: none; user-select: none; cursor: grab; }
.reorder-row { cursor: grab; }
.reorder-row :is(input, textarea, select, [contenteditable=true]) { cursor: text; }
.reorder-row :is(button, a, label) { cursor: pointer; }
.reorder-ghost.invalid-drop { opacity: .55; }
.reorder-grip:focus-visible { outline: 2px solid #e23744; outline-offset: 4px; border-radius: 4px; }
.is-reordering, .is-reordering * { cursor: grabbing!important; user-select: none!important; }
.reorder-ghost { opacity: .95; box-shadow: 0 12px 36px #0009; }
.my-link.dragging, .sb-card.dragging { opacity: .25; outline: 1px dashed #e23744; }
.my-link.dragging, .reorder-ghost { transition: none!important; }
.my-link {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px; border-radius: 16px; background: #141414; border: 1.6px solid #1c1c1c;
  animation: pageIn 0.25s ease both;
}
.my-link .ic { width: 40px; height: 40px; border-radius: 12px; background: #0e0e0e; display: grid; place-items: center; font-size: 19px; flex-shrink: 0; }
.my-link .txt { flex: 1; min-width: 0; }
.my-link b { display: block; color: #fff; font-size: 15.5px; font-weight: 500; }
.my-link small { display: block; color: #9a9a9a; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.my-link .act { display: flex; gap: 6px; }
.icon-b { display: inline-grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px; padding: 0; line-height: 1; border-radius: 10px; border: 1.6px solid #232323; background: #191919; color: #bdbdbd; cursor: pointer; transition: color 0.2s, background 0.2s; }
.icon-b:hover { background: #222; color: #fff; }
.icon-b.del:hover { color: #ff6b75; }
.empty-d { padding: 26px; text-align: center; color: #8a8a8a; border: 1.6px dashed #222; border-radius: 16px; }

/* ---------------- templates ---------------- */
.tabs-d { display: flex; align-items: center; gap: 6px; padding: 8px; border-radius: 999px; background: var(--d-panel); border: 1.6px solid #161616; flex-wrap: wrap; }
.tabs-d button.tab { height: 46px; padding: 0 18px; border-radius: 999px; border: 0; background: none; color: #e8e8e8; font: inherit; font-size: 16.5px; cursor: pointer; transition: background 0.2s; }
.tabs-d button.tab:hover { background: #181818; }
.tabs-d button.tab.on { background: #1f1f1f; }
.tabs-d .spacer { flex: 1; }
.tabs-d .btn-d { border-radius: 999px; height: 48px; }
.tpl-tools { margin-top: 18px; display: grid; grid-template-columns: 1fr 300px 56px; gap: 14px; }
.tpl-tools .f-input { height: 56px; border-radius: 999px; background: var(--d-panel); border-color: #181818; padding-left: 20px; }
.tpl-tools .sq { height: 56px; border-radius: 18px; background: var(--d-panel); border: 1.6px solid #181818; color: #fff; font-size: 17px; cursor: pointer; }
.tpl-grid { margin-top: 26px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }
.tpl {
  border-radius: 22px; overflow: hidden; background: var(--d-panel); border: 1.6px solid #1a1a1a;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s;
  animation: pageIn 0.35s ease both;
}
.tpl:hover { transform: translateY(-4px); border-color: #2a2a2a; }
.tpl-prev { position: relative; height: 240px; display: grid; place-items: center; overflow: hidden; }
.tpl-prev .fx { position: absolute; inset: 0; pointer-events: none; }
.tpl-prev .mini {
  position: relative; width: 62%; padding: 16px; border-radius: 14px;
  display: flex; align-items: center; gap: 12px;
  background: rgba(10, 10, 10, 0.5); backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,.08);
}
.tpl-prev .mini .a { width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0; }
.tpl-prev .mini b { display: block; color: #fff; font-size: 15px; }
.tpl-prev .mini small { display: block; color: #bbb; font-size: 11px; margin-top: 2px; }
.tpl-prev .mini .dots { display: flex; gap: 5px; margin-top: 7px; }
.tpl-prev .mini .dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.7); }
.tpl-prev .fav { position: absolute; top: 14px; right: 14px; z-index: 2; background: none; border: 0; font-size: 24px; color: #f5c518; cursor: pointer; transition: transform 0.2s; }
.tpl-prev .fav:hover { transform: scale(1.15); }
.tpl-info { padding: 22px 26px 24px; }
.tpl-info .who { display: flex; align-items: center; gap: 14px; }
.tpl-info .who .a { width: 48px; height: 48px; border-radius: 50%; background: #181818; display: grid; place-items: center; font-size: 13px; color: #ddd; }
.tpl-info b { display: block; font-size: 21px; font-weight: 500; color: #fff; }
.tpl-info small { display: block; color: #9a9a9a; font-size: 16px; }
.tpl-meta { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 16px; color: #a8a8a8; font-size: 15.5px; }
.tpl-meta span { display: inline-flex; align-items: center; gap: 6px; }
.tpl-tags { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.tpl-tags span { padding: 5px 12px; border-radius: 99px; background: var(--d-tint); border: 1.6px solid var(--d-tint-border); color: #f0d6d9; font-size: 14.5px; }
.tpl-actions { margin-top: 16px; display: flex; gap: 10px; }
.tpl-actions .btn-d { flex: 1; }

/* ---------------- premium / image host ---------------- */
.prem-hero { text-align: center; padding: 36px 20px 10px; }
.prem-hero h1 { font-size: 40px; font-weight: 600; }
.prem-hero p { margin-top: 10px; color: #a9a9a9; font-size: 17px; }
.prem-card { max-width: 460px; margin: 30px auto 0; padding: 30px; border-radius: 24px; border: 1.6px solid #3b1c21; background-image: url("/assets/pattern.svg"), linear-gradient(180deg, #2a1418, #141010); background-size: cover; }
.prem-card .price { font-size: 42px; font-weight: 600; margin-top: 10px; }
.prem-card .price small { font-size: 17px; color: #bcbcbc; font-weight: 400; }
.prem-card ul { list-style: none; margin: 22px 0 26px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.prem-card li { display: flex; gap: 9px; align-items: center; font-size: 15.5px; }
.prem-card li i { color: var(--accent-strong); }
.prem-card .btn-d { width: 100%; height: 50px; border-radius: 999px; }
.prem-owned { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 99px; background: rgba(74, 222, 128, 0.1); color: #4ade80; font-size: 14.5px; margin-top: 12px; }
.img-grid { margin-top: 20px; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.img-card { border-radius: 16px; overflow: hidden; background: #121212; border: 1.6px solid #1c1c1c; animation: pageIn 0.3s ease both; }
.img-card .thumb { height: 150px; background: #0b0b0b center/cover no-repeat; display: block; }
.img-card .meta { padding: 10px 12px; display: flex; align-items: center; gap: 8px; }
.img-card .meta .txt { flex: 1; min-width: 0; }
.img-card .meta b { display: block; font-size: 13.5px; font-weight: 500; color: #eee; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.img-card .meta small { font-size: 12px; color: #8a8a8a; }

/* ---------------- customize editor + live preview ---------------- */
.dash-view > section:has(.cz-wrap) { max-width: 1400px; }
.cz-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.cz-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.cz-tools .btn-d { height: 38px; font-size: 14px; }
.cz-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 6px; border-radius: 18px; background: var(--d-panel); scrollbar-width: none; margin-bottom: 18px; }
.cz-tabs button { flex-shrink: 0; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 12px; border: 0; background: none; color: #cfcfcf; font: inherit; font-size: 14.5px; cursor: pointer; transition: background .2s, color .2s; }
.cz-tabs button:hover { background: #181818; color: #fff; }
.cz-tabs button.on { background: var(--d-active); color: #fff; }
.cz-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 20px; align-items: start; }
.cz-edit > .panel-d + .panel-d { margin-top: 18px; }
.cz-grid .fld.full { grid-column: 1 / -1; }
.cz-preview { position: sticky; top: 20px; height: calc(100vh - 40px); border-radius: 22px; overflow: hidden; background: #000; border: 1.6px solid #222; display: flex; flex-direction: column; }
.cz-pv-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; background: #111; font-size: 13.5px; color: #ccc; }
.cz-pv-head a { color: #ff7f89; }
.cz-preview iframe { flex: 1; width: 100%; border: 0; }
.cz-pv-close, .cz-prev-btn { display: none !important; }
.font-sample { font-size: 18px; color: #fff; min-width: 34px; text-align: right; }
.my-link.drag { cursor: grab; }
.my-link.dragging { opacity: .4; }
.t-title { width: 100%; background: none; border: 0; border-bottom: 1.6px dashed transparent; color: #fff; font: inherit; font-size: 15.5px; outline: none; }
.t-title:hover, .t-title:focus { border-bottom-color: #444; }
@media (max-width: 1280px) {
  .cz-wrap { grid-template-columns: 1fr; }
  .cz-preview { display: none; position: fixed; inset: 12px; z-index: 150; height: auto; }
  .cz-preview.open { display: flex; animation: modalIn .2s ease both; }
  .cz-pv-close, .cz-prev-btn { display: inline-flex !important; }
}

.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 8px; }
.thumbs button { aspect-ratio: 1; border-radius: 10px; border: 2px solid #222; background: #0d0d0d center/cover no-repeat; color: #777; cursor: pointer; transition: border-color .2s, transform .15s; }
.thumbs button:hover { transform: scale(1.05); }
.thumbs button.on { border-color: var(--accent-strong); box-shadow: 0 0 0 2px rgba(226,55,68,.3); }

/* ---------------- support tickets ---------------- */
.sb-count { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; background: var(--accent-strong); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; animation: scaleIn 0.25s ease both; }
.sb-count[hidden] { display: none; }
.tk { padding: 0; overflow: hidden; }
.tk summary { list-style: none; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 18px 22px; cursor: pointer; transition: background 0.2s; }
.tk summary::-webkit-details-marker { display: none; }
.tk summary:hover { background: #141414; }
.tk summary b { font-size: 16.5px; color: #fff; font-weight: 500; }
.tk summary small { color: #8a8a8a; font-size: 13.5px; flex: 1; }
.tk summary > i { color: #888; transition: transform 0.25s; }
.tk[open] summary > i { transform: rotate(180deg); }
.tk-st { padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; text-transform: capitalize; background: rgba(74, 222, 128, 0.12); color: #4ade80; }
.tk-st.closed { background: #1f1f1f; color: #9a9a9a; }
.tk-body { padding: 4px 22px 20px; animation: fadeIn6 0.25s ease both; }
.tk-msg { padding: 12px 14px; border-radius: 14px; background: #161616; border: 1.6px solid #1f1f1f; }
.tk-msg + .tk-msg { margin-top: 10px; }
.tk-msg.staff { background: #1d1214; border-color: #3a1d22; margin-left: 24px; }
.tk-msg b { font-size: 14px; color: #fff; }
.tk-msg b i { color: var(--accent-strong); }
.tk-msg small { margin-left: 8px; color: #7a7a7a; font-size: 12.5px; }
.tk-msg p { margin-top: 6px; color: #cfcfcf; font-size: 15px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.chip { white-space: nowrap; }
.panel-d + #tks > .panel-d:first-child, #tks > .panel-d + .panel-d, #aview > .panel-d + .panel-d, #aview > div + .panel-d { margin-top: 14px; }
#tks { margin-top: 18px; display: flex; flex-direction: column; gap: 14px; }

/* ---------------- modals ---------------- */
.modal-wrap {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: start center;
  padding: 12vh 16px 16px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  animation: fadeBg 0.18s ease both;
}
.modal-wrap[hidden] { display: none; }
@keyframes fadeBg { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: 520px; max-width: 100%;
  padding: 24px; border-radius: 22px;
  background: #121212; border: 1.6px solid #222;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  animation: modalIn 0.22s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(-10px) scale(0.97); } to { opacity: 1; transform: none; } }
.modal-wrap.closing { animation: fadeBgOut 0.17s ease forwards; }
.modal-wrap.closing .modal { animation: modalOut 0.17s ease forwards; }
@keyframes fadeBgOut { to { opacity: 0; } }
@keyframes modalOut { to { opacity: 0; transform: translateY(-6px) scale(0.97); } }

/* keyboard focus ring everywhere in the dashboard */
.dash-body :is(button, a, input, select, textarea, [tabindex]):focus-visible { outline: 2px solid rgba(226, 55, 68, 0.75); outline-offset: 2px; }
.f-input :is(input, select, textarea):focus-visible { outline: none; }
/* smoother hovers: only animate cheap properties, let the browser prepare */
.tcard, .tpl { will-change: transform; }
.sb { scrollbar-width: thin; scrollbar-color: #2a2a2a transparent; }
.modal h3 { display: flex; align-items: center; gap: 12px; font-size: 21px; font-weight: 600; color: #fff; }
.modal h3 .ic { width: 42px; height: 42px; border-radius: 12px; background: #0c0c0c; display: grid; place-items: center; font-size: 21px; }
.modal p.m-sub { margin-top: 8px; color: #a5a5a5; font-size: 15px; }
.modal .m-actions { margin-top: 22px; display: flex; justify-content: flex-end; gap: 10px; }
.search-modal { padding: 0; overflow: hidden; width: 600px; }
.search-row { display: flex; align-items: center; gap: 12px; padding: 0 18px; height: 60px; border-bottom: 1.6px solid #1e1e1e; color: #8a8a8a; }
.search-row input { flex: 1; background: none; border: 0; outline: none; color: #fff; font: inherit; font-size: 17px; }
.search-results { max-height: 380px; overflow-y: auto; padding: 8px; }
.search-results button {
  width: 100%; display: flex; align-items: center; gap: 13px;
  padding: 11px 14px; border-radius: 12px; border: 0; background: none;
  color: #e6e6e6; font: inherit; font-size: 15.5px; text-align: left; cursor: pointer;
}
.search-results button i { width: 20px; text-align: center; color: #9a9a9a; }
.search-results button small { margin-left: auto; color: #777; font-size: 13px; }
.search-results button.on, .search-results button:hover { background: #1d1d1d; }
.search-results .none { padding: 22px; text-align: center; color: #888; }

/* ---------------- responsive ---------------- */
@media (max-width: 1180px) {
  .g3 { grid-template-columns: 1fr 1fr; }
  .uploads, .cz-grid { grid-template-columns: 1fr 1fr; }
  .tpl-tools { grid-template-columns: 1fr 200px 56px; }
}
@media (max-width: 980px) {
  .sb { transform: translateX(-102%); transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1); box-shadow: 0 0 60px rgba(0,0,0,.6); }
  .sb.open { transform: none; }
  .sb-close { display: block; }
  .sb-dim { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(0,0,0,.55); opacity: 0; pointer-events: none; transition: opacity 0.25s; }
  .sb-dim.open { opacity: 1; pointer-events: auto; }
  .dash-top {
    display: flex; align-items: center; justify-content: space-between;
    position: sticky; top: 0; z-index: 30;
    padding: 12px 18px; background: rgba(11, 11, 11, 0.9); backdrop-filter: blur(10px);
    border-bottom: 1.6px solid #161616;
  }
  .dash-top .brand h1 { font-size: 22px; }
  .dash-top .brand .logo { width: 30px; height: 30px; }
  .dash-burger { background: none; border: 0; color: #fff; font-size: 22px; cursor: pointer; padding: 6px; }
  .dash-view { margin-left: 0; padding: 24px 18px 70px; }
  .g2 { grid-template-columns: 1fr; }
  .tpl-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .g3, .uploads, .cz-grid { grid-template-columns: 1fr; }
  .cz-grid .wide2 { grid-column: auto; }
  .tpl-tools { grid-template-columns: 1fr 56px; }
  .tpl-tools .sort { grid-column: 1 / -1; grid-row: 2; }
  .h-title.center { font-size: 28px; }
  .ph-row h2 { font-size: 20px; }
  .tabs-d { flex-wrap: nowrap; overflow-x: auto; border-radius: 22px; scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; }
  .tabs-d::-webkit-scrollbar { display: none; }
  .tabs-d button.tab { flex-shrink: 0; height: 42px; padding: 0 14px; font-size: 15px; scroll-snap-align: start; }
  .tabs-d .spacer { display: none; }
  .tabs-d .btn-d { flex-shrink: 0; height: 42px; }
  .tpl-prev { height: 200px; }
  .tpl-info { padding: 18px 18px 20px; }
  .badge-row { flex-wrap: wrap; }
  .badge-row .btn-d { min-width: 0; width: 100%; }
  .prem-card ul { grid-template-columns: 1fr; }
  .panel-d { padding: 20px; }
}

/* ============================================================
   shell v2: slimmer sidebar with look switcher, top bar
   ============================================================ */
:root { --sb-w: 272px; --tb-h: 64px; }
.sb { border-radius: 0; background: #0d0d0d; border-right: 1px solid #1a1a1a; padding: 18px 14px 14px; gap: 14px; transition: transform .35s cubic-bezier(.16,1,.3,1); }
.sb-top { display: flex; flex-direction: column; min-height: 0; }
.sb-brand-row { padding: 2px 6px 16px; }
.sb .brand .logo { filter: drop-shadow(0 0 10px rgba(226,55,68,.45)); }
.look-wrap { position: relative; margin-bottom: 14px; }
.sb-look { width: 100%; display: flex; align-items: center; gap: 11px; padding: 9px 12px 9px 9px; border-radius: 14px; background: #141414; border: 1px solid #1f1f1f; color: #eee; font: inherit; cursor: pointer; text-align: left; transition: border-color .2s, background .2s; }
.sb-look:hover, .sb-look.open { border-color: #2c2c2c; background: #171717; }
.lk-av { width: 34px; height: 34px; border-radius: 10px; overflow: hidden; display: grid; place-items: center; background: linear-gradient(135deg, #f05561, #6b1c24); font-weight: 700; text-transform: uppercase; flex-shrink: 0; }
.lk-av img { width: 100%; height: 100%; object-fit: cover; }
.sb-look .grow { flex: 1; min-width: 0; }
.sb-look b { display: block; font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-look small { display: block; font-size: 12px; color: #8a8a8a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lk-chev { font-size: 11px; color: #777; transition: transform .25s; }
.sb-look.open .lk-chev { transform: rotate(180deg); }
.look-menu, .um-menu { position: absolute; left: 0; right: 0; z-index: 5; padding: 6px; border-radius: 14px; background: #151515; border: 1px solid #262626; box-shadow: 0 18px 50px rgba(0,0,0,.6); animation: menuIn .18s ease both; }
.look-menu { top: calc(100% + 6px); }
.look-menu[hidden] { display: none; }
@keyframes menuIn { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.look-menu button, .um-menu a, .um-menu button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 0; border-radius: 9px; background: none; color: #ddd; font: inherit; font-size: 14px; cursor: pointer; text-align: left; transition: background .15s; }
.look-menu button:hover, .um-menu a:hover, .um-menu button:hover { background: #1f1f1f; }
.look-menu button > i, .um-menu i { width: 16px; text-align: center; color: #8a8a8a; }
.look-menu .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.look-menu small { font-size: 12px; color: #777; }
.look-menu em { font-style: normal; font-size: 11.5px; color: #4ade80; padding: 2px 7px; border-radius: 99px; background: rgba(74,222,128,.1); }
.lm-sw { width: 18px; height: 18px; border-radius: 6px; flex-shrink: 0; border: 1px solid #ffffff1a; }
.lm-label { font-size: 11px; text-transform: uppercase; letter-spacing: .7px; color: #666; padding: 6px 10px 4px; }
.lm-empty { font-size: 13px; color: #888; padding: 4px 10px 8px; line-height: 1.4; }
.lm-sep { height: 1px; background: #232323; margin: 6px 4px; }

.sb-panes { position: relative; display: grid; }
.sb-pane { grid-area: 1 / 1; display: flex; flex-direction: column; gap: 2px; transition: transform .35s cubic-bezier(.16,1,.3,1), opacity .22s ease; }
.sb-pane:not(.on) { pointer-events: none; opacity: 0; transform: translateX(36px); visibility: hidden; transition: transform .35s cubic-bezier(.16,1,.3,1), opacity .22s ease, visibility 0s .35s; }
.sb-pane.left:not(.on) { transform: translateX(-36px); }
.sb-item { height: 40px; font-size: 15px; border-radius: 11px; padding: 0 12px; gap: 12px; color: #cfcfcf; text-decoration: none; transition: background .2s, color .2s; }
.sb-item > i:first-child { font-size: 14.5px; color: #8f8f8f; transition: color .2s; }
.sb-item:hover { background: #161616; color: #fff; }
.sb-item:hover > i:first-child { color: #fff; }
.sb-item.on { background: linear-gradient(90deg, rgba(226,55,68,.2), rgba(226,55,68,.05)); color: #fff; box-shadow: inset 2px 0 0 #e23744; }
.sb-item.on > i:first-child { color: #ff5a66; }
.sb-item .sb-chev { font-size: 11px; color: #666; }
.sb-back { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 10px; margin-bottom: 6px; border: 0; background: none; color: #fff; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; border-radius: 10px; transition: background .2s; }
.sb-back:hover { background: #161616; }
.sb-back i { font-size: 12px; color: #888; transition: transform .2s; }
.sb-back:hover i { transform: translateX(-2px); }

.sb-bottom { gap: 10px; }
.sb-search { height: 40px; font-size: 14.5px; border-radius: 11px; background: #121212; border: 1px solid #1f1f1f; color: #9a9a9a; }
.sb-sharerow { display: flex; gap: 8px; }
.sb-share { flex: 1; height: 40px; border-radius: 11px; font-size: 14.5px; font-weight: 500; background: #e23744; border: 0; box-shadow: 0 6px 24px rgba(226,55,68,.22); transition: filter .2s, transform .15s; }
.sb-share:active { transform: scale(.98); }
.sb-eye { width: 40px; height: 40px; flex-shrink: 0; border-radius: 11px; display: grid; place-items: center; background: #151515; border: 1px solid #232323; color: #ccc; transition: color .2s, border-color .2s; }
.sb-eye:hover { color: #fff; border-color: #343434; }
.sb-user { position: relative; padding: 9px 10px 9px 10px; border-radius: 14px; background: #121212; border: 1px solid #1d1d1d; }
.sb-user .grow small { font-size: 11.5px; color: #777; }
.sb-user .grow b { font-size: 14px; }
.sb-user .av, .sb-user > img { width: 34px; height: 34px; }
.sb-user > button:hover { color: #fff; background: #1d1d1d; }
.um-menu { bottom: calc(100% + 6px); box-shadow: 0 -10px 40px rgba(0,0,0,.5); }
.um-menu .danger, .um-menu .danger i { color: #ff6b75; }
.theme-sw { display: grid; grid-template-columns: repeat(3, 1fr); padding: 3px; border-radius: 11px; background: #121212; border: 1px solid #1d1d1d; }
.theme-sw button { height: 30px; border: 0; border-radius: 8px; background: none; color: #707070; font-size: 13px; cursor: pointer; transition: background .2s, color .2s; }
.theme-sw button:hover { color: #ddd; }
.theme-sw button.on { background: #232323; color: #fff; }

/* top bar */
.topbar { position: sticky; top: 0; z-index: 30; margin-left: var(--sb-w); height: var(--tb-h); display: flex; align-items: center; gap: 12px; padding: 0 28px; background: rgba(11,11,11,.82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid #171717; transition: margin-left .35s cubic-bezier(.16,1,.3,1); }
.topbar .dash-burger, .tb-brand { display: none; }
.tb-ic { position: relative; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; border: 0; background: none; color: #999; font-size: 15px; cursor: pointer; transition: background .2s, color .2s; }
.tb-ic:hover { background: #161616; color: #fff; }
.tb-crumb { display: flex; align-items: center; gap: 10px; padding-left: 14px; border-left: 1px solid #222; font-size: 14.5px; color: #777; white-space: nowrap; }
.tb-crumb i { font-size: 10px; }
.tb-crumb b { color: #eee; font-weight: 500; }
.tb-r { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.tb-pill { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; margin-right: 6px; border-radius: 99px; border: 1px solid #262626; background: #121212; color: #ddd; font-size: 14px; transition: border-color .2s, color .2s; }
.tb-pill:hover { border-color: #383838; color: #fff; }
.tb-bell { position: relative; }
#bellDot { position: absolute; top: 3px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: #e23744; color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; animation: scaleIn .25s ease both; }
#bellDot[hidden] { display: none; }
.notif { position: absolute; right: 0; top: calc(100% + 8px); width: 350px; max-width: calc(100vw - 24px); border-radius: 16px; background: #131313; border: 1px solid #252525; box-shadow: 0 24px 60px rgba(0,0,0,.6); overflow: hidden; animation: menuIn .18s ease both; }
.notif[hidden] { display: none; }
.nt-head { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 16px 11px; border-bottom: 1px solid #1f1f1f; }
.nt-head small { color: #777; font-size: 12px; }
.nt-list { max-height: 360px; overflow-y: auto; padding: 6px; }
.nt-list button { position: relative; width: 100%; display: flex; gap: 11px; align-items: flex-start; padding: 10px; border: 0; border-radius: 10px; background: none; color: #ddd; font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.nt-list button:hover { background: #1b1b1b; }
.nt-list button.new::after { content: ""; position: absolute; right: 12px; top: 18px; width: 7px; height: 7px; border-radius: 50%; background: #e23744; }
.nt-ic { width: 32px; height: 32px; border-radius: 9px; background: #1d1d1d; display: grid; place-items: center; flex-shrink: 0; color: #ff6b75; font-size: 13px; }
.nt-list .grow { flex: 1; min-width: 0; padding-right: 14px; line-height: 1.35; }
.nt-list small { display: block; color: #777; font-size: 12px; margin-top: 3px; }
.nt-empty { padding: 34px 16px; text-align: center; color: #888; font-size: 14px; }
.nt-empty i { display: block; font-size: 22px; margin-bottom: 10px; opacity: .6; }
.dash-view { padding-top: 32px; transition: margin-left .35s cubic-bezier(.16,1,.3,1); }
html.sb-collapsed .sb { transform: translateX(-102%); }
html.sb-collapsed .topbar, html.sb-collapsed .dash-view { margin-left: 0; }

/* overview */
.ov-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.ov-title { font-size: 28px; font-weight: 600; letter-spacing: -.3px; color: #f4f4f4; }
.ov-title span { color: #ff5a66; }
.ov-head .ph-sub { font-size: 15px; }
.ov-head .ph-sub a { color: #ddd; text-decoration: underline; text-decoration-color: #444; text-underline-offset: 3px; }
.ov-act { display: flex; gap: 10px; }
.g4 { grid-template-columns: repeat(4, 1fr); }
.st { position: relative; padding: 18px 20px; border-radius: 18px; background: #111; border: 1px solid #1c1c1c; transition: border-color .2s, transform .2s; }
.st:hover { border-color: #2a2a2a; transform: translateY(-2px); }
.st small { display: block; font-size: 13.5px; color: #8f8f8f; }
.st b { display: block; margin-top: 10px; font-size: 27px; font-weight: 700; letter-spacing: -.4px; font-variant-numeric: tabular-nums; color: #fff; }
.st em { display: block; margin-top: 4px; font-style: normal; font-size: 12.5px; color: #6f6f6f; }
.st-ic { position: absolute; top: 16px; right: 16px; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: rgba(226,55,68,.12); color: #ff5a66; font-size: 13px; }
.ov-charts { grid-template-columns: 1fr 300px; margin-top: 18px; }
.ch-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.f-input.sm { height: 36px; padding: 0 12px; border-radius: 10px; width: auto; }
.f-input.sm select { font-size: 14px; padding-right: 6px; }
.seg { display: flex; padding: 3px; border-radius: 10px; background: #0b0b0b; border: 1px solid #1f1f1f; }
.seg button { height: 28px; padding: 0 12px; border: 0; border-radius: 7px; background: none; color: #888; font: inherit; font-size: 13px; cursor: pointer; transition: background .2s, color .2s; }
.seg button:hover { color: #ddd; }
.seg button.on { background: #232323; color: #fff; }
.ch-total { margin: 16px 0 4px; }
.ch-total b { font-size: 26px; font-weight: 700; color: #fff; }
.ch-total small { margin-left: 8px; color: #777; font-size: 13.5px; }
.dev h3 { font-size: 18px; font-weight: 600; color: #f2f2f2; }
.donut { position: relative; width: 168px; margin: 18px auto 16px; }
.donut svg { display: block; width: 100%; }
.dn-c { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.dn-c b { font-size: 22px; color: #fff; }
.dn-c small { color: #777; font-size: 12px; }
.dev-legend { display: flex; flex-direction: column; gap: 9px; }
.dev-legend div { display: flex; align-items: center; gap: 10px; font-size: 14px; color: #bbb; }
.dev-legend i { width: 16px; text-align: center; }
.dev-legend span { flex: 1; }
.dev-legend b { color: #fff; font-variant-numeric: tabular-nums; }

/* sections builder */
.sec-add { margin-top: 18px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.sec-add button { display: grid; grid-template-columns: 34px 1fr; grid-template-rows: auto auto; column-gap: 11px; align-items: center; text-align: left; padding: 12px; border-radius: 14px; border: 1px dashed #2a2a2a; background: #0d0d0d; color: #eee; font: inherit; cursor: pointer; transition: border-color .2s, background .2s, transform .15s; }
.sec-add button:hover:not(:disabled) { border-color: #e23744; background: #141011; }
.sec-add button:active { transform: scale(.98); }
.sec-add button:disabled { opacity: .4; cursor: not-allowed; }
.sec-add i { grid-row: span 2; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: #1a1a1a; color: #ff5a66; }
.sec-add b { font-size: 14.5px; font-weight: 600; }
.sec-add small { font-size: 12.5px; color: #808080; }
.sec-list { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }
.sb-card { border-radius: 18px; background: #111; border: 1px solid #1d1d1d; overflow: hidden; animation: pageIn .3s ease both; transition: border-color .2s, opacity .2s; }
.sb-card.dragging { opacity: .45; border-color: #e23744; }
.sb-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid #1a1a1a; }
.grip { cursor: grab; color: #555; padding: 4px 6px; touch-action: none; }
.grip:hover { color: #aaa; }
.sb-ic { width: 30px; height: 30px; flex-shrink: 0; border-radius: 9px; display: grid; place-items: center; background: #1a1a1a; color: #ff5a66; font-size: 13px; }
.sb-title { flex: 1; min-width: 0; background: none; border: 0; outline: none; color: #fff; font: inherit; font-size: 15.5px; font-weight: 600; padding: 6px 8px; border-radius: 8px; transition: background .2s; }
.sb-title:hover, .sb-title:focus { background: #181818; }
.sb-head small { color: #666; font-size: 12.5px; margin-right: 4px; }
.sb-head .icon-b:disabled { opacity: .25; pointer-events: none; }
.sb-body { padding: 14px; }
.sb-body textarea { width: 100%; resize: vertical; min-height: 96px; padding: 12px; border-radius: 12px; background: #0b0b0b; border: 1px solid #222; color: #eee; font: inherit; font-size: 14.5px; line-height: 1.5; outline: none; transition: border-color .2s; }
.sb-body textarea:focus { border-color: #e23744; }
.sb-note { display: flex; gap: 9px; align-items: baseline; color: #999; font-size: 14px; }
.sb-note a { color: #ff6b75; }
.sb-imgs { display: flex; flex-wrap: wrap; gap: 8px; }
.sb-imgs > span { position: relative; width: 84px; height: 84px; border-radius: 12px; background: center / cover #181818; }
.sb-imgs > span button { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0,0,0,.7); color: #fff; font-size: 11px; cursor: pointer; opacity: 0; transition: opacity .2s; }
.sb-imgs > span:hover button, .sb-imgs > span button:focus-visible { opacity: 1; }
.sb-imgs .add { width: 84px; height: 84px; border-radius: 12px; border: 1px dashed #333; background: none; color: #aaa; font: inherit; font-size: 13px; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; transition: border-color .2s, color .2s; }
.sb-imgs .add:hover { border-color: #e23744; color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips span { display: inline-flex; align-items: center; gap: 6px; padding: 5px 6px 5px 11px; border-radius: 99px; background: #1a1a1a; border: 1px solid #262626; font-size: 13.5px; }
.chips button { width: 20px; height: 20px; border-radius: 50%; border: 0; background: #262626; color: #aaa; font-size: 10px; cursor: pointer; transition: background .2s, color .2s; }
.chips button:hover { background: #e23744; color: #fff; }
.sec-save { position: sticky; bottom: 18px; z-index: 5; margin: 20px auto 0; width: max-content; max-width: 100%; display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 18px; border-radius: 16px; background: #161616; border: 1px solid #2a2a2a; box-shadow: 0 16px 50px rgba(0,0,0,.6); transform: translateY(20px); opacity: 0; pointer-events: none; transition: transform .3s cubic-bezier(.16,1,.3,1), opacity .2s; }
.sec-save.on { transform: none; opacity: 1; pointer-events: auto; }
.sec-save span { font-size: 14px; color: #bbb; margin-right: 6px; }
.pick-grid { margin-top: 16px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; max-height: 340px; overflow-y: auto; }
.pick-grid button, .pk-up { aspect-ratio: 1; border-radius: 12px; border: 2px solid transparent; background: center / cover #181818; cursor: pointer; position: relative; transition: border-color .15s; }
.pick-grid button i { position: absolute; top: 6px; right: 6px; width: 20px; height: 20px; border-radius: 50%; background: #e23744; color: #fff; font-size: 10px; display: grid; place-items: center; opacity: 0; transform: scale(.6); transition: opacity .15s, transform .15s; }
.pick-grid button.on { border-color: #e23744; }
.pick-grid button.on i { opacity: 1; transform: none; }
.pk-up { border: 1px dashed #333; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: #aaa; font-size: 13px; }
.pk-up:hover { border-color: #e23744; color: #fff; }

/* saved looks */
.look-grid { margin-top: 18px; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.look-grid > .empty-d { grid-column: 1 / -1; }
.look-card { border-radius: 18px; background: #111; border: 1px solid #1d1d1d; overflow: hidden; transition: border-color .2s, transform .2s; }
.look-card:hover { transform: translateY(-2px); border-color: #2a2a2a; }
.look-card.live { border-color: rgba(74,222,128,.35); }
.lc-prev { height: 120px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; }
.lc-av { width: 46px; height: 46px; border-radius: 50%; overflow: hidden; border: 2px solid; display: grid; place-items: center; font-weight: 700; text-transform: uppercase; background: #222; }
.lc-av img { width: 100%; height: 100%; object-fit: cover; }
.lc-prev i { display: block; width: 90px; height: 6px; border-radius: 3px; }
.lc-prev i + i { width: 60px; }
.lc-info { padding: 12px 14px 4px; }
.lc-info input { width: 100%; background: none; border: 0; outline: none; color: #fff; font: inherit; font-size: 15px; font-weight: 600; padding: 4px 6px; margin-left: -6px; border-radius: 7px; }
.lc-info input:hover, .lc-info input:focus { background: #1a1a1a; }
.lc-info small { color: #777; font-size: 12.5px; }
.lc-act { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px 14px; }
.pill-live { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: #4ade80; padding: 6px 11px; border-radius: 99px; background: rgba(74,222,128,.1); }
.pill-live i { font-size: 7px; }

/* light theme: flip the dark UI, keep pictures looking normal */
html.light-d { filter: invert(1) hue-rotate(180deg); background: #f4f4f4; }
html.light-d :is(img, video, iframe, canvas, .sb-imgs > span, .pick-grid button, .thumb) { filter: invert(1) hue-rotate(180deg); }
html.theme-anim { transition: filter .35s ease; }

@media (max-width: 1180px) {
  .g4 { grid-template-columns: 1fr 1fr; }
  .ov-charts { grid-template-columns: 1fr; }
  .dev { display: grid; grid-template-columns: 180px 1fr; grid-template-rows: auto auto 1fr; column-gap: 24px; align-items: center; }
  .dev h3, .dev .ph-sub { grid-column: 1 / -1; }
  .dev .donut { margin: 14px 0 0; }
}
@media (max-width: 980px) {
  .topbar { margin-left: 0; padding: 0 12px 0 8px; gap: 6px; }
  .topbar .dash-burger { display: block; }
  .tb-brand { display: block; }
  .tb-brand .brand h1 { font-size: 21px; }
  .tb-brand .brand .logo { width: 28px; height: 28px; }
  .tb-col, .tb-crumb { display: none; }
  .tb-pill span { display: none; }
  .tb-pill { width: 38px; padding: 0; justify-content: center; margin: 0; border: 0; background: none; color: #999; }
  .dash-view { padding-top: 22px; }
  html.sb-collapsed .topbar, html.sb-collapsed .dash-view { margin-left: 0; }
}
@media (max-width: 640px) {
  .g4 { gap: 10px; }
  .st { padding: 14px 15px; }
  .st b { font-size: 22px; }
  .st-ic { width: 28px; height: 28px; top: 12px; right: 12px; font-size: 12px; }
  .ov-title { font-size: 23px; }
  .ov-act { width: 100%; }
  .ov-act .btn-d { flex: 1; }
  .dev { grid-template-columns: 1fr; }
  .dev .donut { margin: 14px auto; }
  .sec-add { grid-template-columns: 1fr 1fr; }
  .sec-add small { display: none; }
  .sb-head small { display: none; }
  .pick-grid { grid-template-columns: repeat(3, 1fr); }
}
.sb { overflow-x: hidden; }
html.light-d :is(.sb-share, .btn-d.primary, #bellDot, .sb-count) { filter: invert(1) hue-rotate(180deg); }
.toggle-row { height: auto; min-height: 50px; padding-top: 10px; padding-bottom: 10px; line-height: 1.3; }
@media (max-width: 640px) { .seg button { height: 34px; padding: 0 14px; } .f-input.sm { height: 40px; } .f-input.sm select { height: 100%; } .ov-head .ph-sub a { display: inline-block; padding: 6px 0; } }
.f-input > input, .f-input > select { align-self: stretch; height: auto; min-height: 100%; } .f-input .eye { min-width: 36px; min-height: 36px; }

/* ============ editor v3: category list, groups, one-tap options, reset ============ */
.cz-wrap { grid-template-columns: 206px minmax(0, 1fr) 380px; }
.cz-nav { position: sticky; top: calc(var(--tb-h) + 16px); display: flex; flex-direction: column; gap: 14px; padding: 12px; border-radius: 18px; background: #101010; border: 1px solid #1b1b1b; max-height: calc(100vh - var(--tb-h) - 32px); overflow-y: auto; scrollbar-width: thin; }
.cz-find { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 10px; border-radius: 10px; background: #0b0b0b; border: 1px solid #222; color: #777; cursor: text; transition: border-color .2s; }
.cz-find:focus-within { border-color: #e23744; }
.cz-find input { flex: 1; min-width: 0; background: none; border: 0; outline: none; color: #eee; font: inherit; font-size: 14px; }
.cz-find button { background: none; border: 0; color: #888; cursor: pointer; padding: 4px; }
.cz-ng { display: flex; flex-direction: column; gap: 2px; }
.cz-ng small { font-size: 11px; font-weight: 600; letter-spacing: .8px; text-transform: uppercase; color: #5f5f5f; padding: 0 8px 4px; }
.cz-ng button { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 0 10px; border: 0; border-radius: 9px; background: none; color: #bdbdbd; font: inherit; font-size: 14px; text-align: left; cursor: pointer; transition: background .15s, color .15s; }
.cz-ng button i { width: 16px; text-align: center; color: #777; font-size: 13px; transition: color .15s; }
.cz-ng button:hover { background: #181818; color: #fff; }
.cz-ng button.on { background: rgba(226,55,68,.16); color: #fff; box-shadow: inset 2px 0 0 #e23744; }
.cz-ng button.on i { color: #ff5a66; }
.cz-sec-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.cz-sec-h > span { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 600; color: #f2f2f2; }
.cz-sec-h > span i { font-size: 16px; color: #ff5a66; }
.cz-open { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: 9px; border: 1px solid #262626; background: #141414; color: #bbb; font: inherit; font-size: 13px; cursor: pointer; transition: color .2s, border-color .2s; }
.cz-open:hover { color: #fff; border-color: #383838; }
.cz-sec > .cz-grid { margin-top: 16px; }
.cz-group { padding-top: 18px; margin-top: 18px; border-top: 1px solid #1a1a1a; }
.cz-sec-h + .cz-group { border-top: 0; margin-top: 6px; padding-top: 6px; }
.cz-gt { font-size: 12px; font-weight: 600; letter-spacing: .9px; text-transform: uppercase; color: #7a7a7a; margin-bottom: 12px; }
.cz-sec .cz-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.fld .f-label { display: flex; align-items: center; gap: 8px; }
.fld .f-label > span { flex: 1; min-width: 0; }
.fld-reset { display: none; width: 24px; height: 24px; flex-shrink: 0; border-radius: 7px; border: 0; background: #1d1d1d; color: #aaa; font-size: 11px; cursor: pointer; transition: background .15s, color .15s; }
.fld.mod .fld-reset { display: inline-grid; place-items: center; }
.fld-reset:hover { background: #e23744; color: #fff; }
.fld.mod > .f-label > span::after { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #e23744; margin-left: 7px; vertical-align: 2px; }
.seg-d { display: flex; flex-wrap: wrap; gap: 6px; }
.seg-d button { flex: 1 1 auto; min-height: 40px; padding: 0 12px; border-radius: 11px; border: 1.6px solid #1f1f1f; background: #0d0d0d; color: #bdbdbd; font: inherit; font-size: 14px; cursor: pointer; white-space: nowrap; transition: border-color .15s, background .15s, color .15s; }
.seg-d button:hover { border-color: #333; color: #fff; }
.seg-d button.on { border-color: #e23744; background: rgba(226,55,68,.14); color: #fff; }
.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 6px; max-height: 196px; overflow-y: auto; padding: 2px; margin-top: 4px; }
.icon-grid button { aspect-ratio: 1; min-height: 38px; border-radius: 10px; border: 1.6px solid #1f1f1f; background: #0d0d0d; color: #bbb; font-size: 15px; cursor: pointer; transition: color .15s, border-color .15s, background .15s; }
.icon-grid button:hover { color: #fff; border-color: #333; }
.icon-grid button.on { border-color: #e23744; color: #ff5a66; background: rgba(226,55,68,.12); }
.cz-tip { display: flex; gap: 12px; align-items: baseline; padding: 16px 20px; }
.cz-tip p { margin: 0; color: #aaa; font-size: 14.5px; line-height: 1.5; }
.cz-tip a { color: #ff7f89; }
.cz-tip > i { color: #ff5a66; }
.fld.flash { animation: fldFlash 1.6s ease; border-radius: 14px; }
@keyframes fldFlash { 0%, 45% { box-shadow: 0 0 0 2px #e23744; } 100% { box-shadow: 0 0 0 2px transparent; } }
@media (max-width: 1280px) { .cz-wrap { grid-template-columns: 196px minmax(0, 1fr); } }
@media (max-width: 980px) {
  .cz-wrap { grid-template-columns: 1fr; }
  .cz-nav { position: sticky; top: var(--tb-h); z-index: 6; flex-direction: row; align-items: center; overflow-x: auto; max-height: none; padding: 8px; gap: 6px; scrollbar-width: none; border-radius: 14px; }
  .cz-nav::-webkit-scrollbar { display: none; }
  .cz-find { min-width: 160px; flex-shrink: 0; }
  .cz-ng { flex-direction: row; gap: 4px; }
  .cz-ng small { display: none; }
  .cz-ng button { flex-shrink: 0; white-space: nowrap; }
}
@media (max-width: 640px) { .cz-sec .cz-grid { grid-template-columns: 1fr; } .cz-grid .wide2 { grid-column: auto; } }

/* ============ socials page: icon look + rows ============ */
.ic-preview { margin-top: 16px; min-height: 76px; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: var(--sg); padding: 18px; border-radius: 16px; background: radial-gradient(120% 120% at 50% 0%, #1d0b0e, #070707); border: 1px solid #1d1d1d; }
.ic-preview > span { width: calc(var(--ss) * 1.9); height: calc(var(--ss) * 1.9); display: grid; place-items: center; font-size: var(--ss); transition: all .2s; }
.ic-preview img { width: var(--ss); height: var(--ss); object-fit: contain; }
.ic-preview.sh-circle > span { border-radius: 50%; background: rgba(255,255,255,.08); }
.ic-preview.sh-square > span { border-radius: 28%; background: rgba(255,255,255,.08); }
.ic-preview.st-glow > span { filter: drop-shadow(0 0 6px rgba(255,255,255,.55)); }
.ic-ctrls { margin-top: 16px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.ic-c { display: flex; flex-direction: column; min-width: 0; gap: 8px; font-size: 14px; color: #bbb; }
.ic-c > span { display: flex; justify-content: space-between; }
.ic-c b { color: #fff; font-weight: 500; font-variant-numeric: tabular-nums; }
.ic-c input[type=range] { accent-color: #e23744; width: 100%; height: 30px; }
.ic-c .seg { width: max-content; max-width: 100%; flex-wrap: wrap; }
.soc-row .grip { cursor: grab; color: #555; padding: 6px; touch-action: none; }
.soc-row .ic img { width: 22px; height: 22px; object-fit: contain; }
.soc-row.dragging { opacity: .45; }
#soc { container-type: inline-size; }
.soc-row { display: grid; grid-template-columns: 24px 40px minmax(0, 1fr) auto; }
.soc-row .txt b { overflow-wrap: anywhere; }
.soc-row .act { flex-wrap: wrap; justify-content: flex-end; align-items: center; }
.soc-row .act > * { flex-shrink: 0; }
@container (max-width: 560px) {
  .soc-row { grid-template-columns: 24px 40px minmax(0, 1fr); }
  .soc-row .act { grid-column: 1 / -1; justify-content: flex-start; gap: 6px; width: 100%; margin-left: 0; }
}
@media (max-width: 640px) {
  .soc-row { grid-template-columns: 24px 40px minmax(0, 1fr); }
  .soc-row .act { grid-column: 1 / -1; justify-content: flex-start; gap: 6px; width: 100%; margin-left: 0; }
}
.soc-row .icon-b:disabled { opacity: .25; pointer-events: none; }
.sw { position: relative; width: 30px; height: 30px; border-radius: 50%; border: 2px solid #2a2a2a; background: conic-gradient(#ff4d5b, #f5a524, #4ade80, #38bdf8, #a78bfa, #ff4d5b); cursor: pointer; flex-shrink: 0; }
.sw.set { background: var(--c); }
.sw input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.pick-grid button.none { display: grid; place-items: center; color: #bbb; font-size: 12px; }
.pick-grid button.none span { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.pick-grid button.none i { position: static; opacity: 1; transform: none; width: auto; height: auto; background: none; font-size: 20px; }
@media (max-width: 640px) { .ic-ctrls { grid-template-columns: 1fr; } .soc-row .mv { display: inline-grid; } .soc-row .txt small { display: none; } }
/* section builder: tabs, projects, hidden */
.sec-tabs { margin-top: 18px; width: max-content; max-width: 100%; }
.sec-tabs button { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; }
.sb-h3 { font-size: 17px; font-weight: 600; color: #f2f2f2; display: flex; align-items: baseline; gap: 8px; }
.sb-h3 small { font-size: 13px; color: #777; font-weight: 400; }
#stList > .panel-d .sec-add { margin-top: 14px; }
.sb-card.is-hid { opacity: .6; }
.sb-card.is-hid .sb-body { display: none; }
.st-grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pj-list { display: flex; flex-direction: column; gap: 10px; }
.pj { display: flex; gap: 12px; align-items: flex-start; padding: 10px; border-radius: 14px; background: #0c0c0c; border: 1px solid #1d1d1d; }
.pj-img { width: 74px; height: 74px; flex-shrink: 0; border-radius: 12px; border: 1px dashed #333; background: #141414 center / cover; color: #888; font-size: 18px; cursor: pointer; transition: border-color .2s; }
.pj-img:hover { border-color: #e23744; }
.pj-f { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.pj-f input { width: 100%; height: 34px; padding: 0 10px; border-radius: 9px; background: #121212; border: 1px solid #222; color: #eee; font: inherit; font-size: 14px; outline: none; transition: border-color .2s; }
.pj-f input:first-child { font-weight: 600; }
.pj-f input:focus { border-color: #e23744; }
@media (max-width: 640px) { .st-grid2 { grid-template-columns: 1fr; } .pj-img { width: 56px; height: 56px; } }
.cz-edit .uploads { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); } .cz-edit .uploads .up-col.full { grid-column: 1 / -1; } .cz-edit .up-col h4 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.f-input > input[type=range] { min-height: 0; height: 6px; align-self: center; } .ic-c input[type=range] { height: 6px; margin: 12px 0; } input[type=range] { background: linear-gradient(90deg, #3a1a1f, #262626); } input[type=range]:hover::-webkit-slider-thumb { transform: scale(1.12); } input[type=range]::-webkit-slider-thumb { transition: transform .15s; }
.cz-find input:focus-visible, .pj-f input:focus-visible, .sb-title:focus-visible, .lc-info input:focus-visible, .lb-find input:focus-visible { outline: none; }
.cz-find input { align-self: stretch; }
/* short windows: never let the bottom block sit on top of the menu; the sidebar scrolls instead */
.sb-top, .sb-bottom { flex-shrink: 0; }
.sb-bottom { margin-top: auto; padding-top: 10px; }
@media (max-height: 860px) {
  .sb { gap: 10px; padding-top: 14px; }
  .sb-brand-row { padding-bottom: 10px; }
  .look-wrap { margin-bottom: 10px; }
  .sb-item { height: 36px; }
  .sb-bottom { gap: 8px; }
  .theme-sw button { height: 26px; }
}

/* ============ feature batch: badges, staff panel, inbox, extras ============ */
.muted-d { color: #777; font-size: 13.5px; }
.err-d { min-height: 18px; margin-top: 10px; color: #ff6b75; font-size: 14px; }
.btn-d.sm { height: 34px; padding: 0 12px; font-size: 13.5px; }
.g2b { grid-template-columns: 1fr 1fr; }
.wide-modal { width: 640px; }
/* your own badges */
.ub-list { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.ub { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 14px; background: #0d0d0d; border: 1px solid #1d1d1d; }
.ub-ic { width: 40px; height: 40px; flex-shrink: 0; border-radius: 11px; display: grid; place-items: center; background: #171717; font-size: 18px; }
.ub-ic img { width: 24px; height: 24px; object-fit: contain; }
.ub .txt { flex: 1; min-width: 0; } .ub .txt b { display: block; color: #fff; } .ub .txt small { color: #888; font-size: 13px; }
.ub .act { display: flex; gap: 6px; }
.ub-ideas { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ub-ideas button { height: 30px; padding: 0 11px; border-radius: 99px; border: 1px dashed #333; background: none; color: #aaa; font: inherit; font-size: 13px; cursor: pointer; }
.ub-ideas button:hover { border-color: #e23744; color: #fff; }
/* official badges */
.ob-grid { margin-top: 16px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ob { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: #0d0d0d; border: 1px solid #1d1d1d; }
.ob > i { width: 22px; text-align: center; font-size: 18px; }
.ob:not(.owned) > i { filter: grayscale(.6); opacity: .55; }
.ob .txt { flex: 1; min-width: 0; } .ob .txt b { display: block; font-size: 14.5px; color: #fff; } .ob .txt small { font-size: 12.5px; color: #888; }
.ob .owned { color: #4ade80; font-size: 13px; display: flex; gap: 6px; align-items: center; }
.ob .locked { color: #555; }
/* staff panel */
.adm-tabs .tab { display: inline-flex; align-items: center; gap: 8px; }
.adm-tabs .sb-count { margin-left: 2px; }
.adm-tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.adm-tools .f-input { flex: 1; min-width: 220px; }
.adm-user { padding: 0; overflow: hidden; }
.adm-user + .adm-user { margin-top: 8px; }
.adm-user summary { list-style: none; display: flex; align-items: center; gap: 14px; padding: 14px 18px; cursor: pointer; }
.adm-user summary::-webkit-details-marker { display: none; }
.adm-user summary > i { color: #666; transition: transform .25s; }
.adm-user[open] summary > i { transform: rotate(180deg); }
.adm-user.is-banned { opacity: .7; }
.adm-av { width: 38px; height: 38px; flex-shrink: 0; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: linear-gradient(135deg, #f05561, #6b1c24); font-weight: 700; text-transform: uppercase; }
.adm-av img, .adm-av span { width: 100%; height: 100%; object-fit: cover; display: grid; place-items: center; }
.adm-who { flex: 1; min-width: 0; }
.adm-who b { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; color: #fff; font-size: 15px; }
.adm-who small { display: block; color: #808080; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-stat { width: 84px; text-align: right; }
.adm-stat b { display: block; font-size: 14px; color: #eee; font-variant-numeric: tabular-nums; }
.adm-stat small { font-size: 11.5px; color: #6f6f6f; }
.pill-s { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 99px; font-size: 11px; font-weight: 600; background: #1f1f1f; color: #aaa; }
.pill-s.staff { background: rgba(124,134,255,.15); color: #a5acff; }
.pill-s.prem { background: rgba(226,55,68,.15); color: #ff7f89; }
.pill-s.ban { background: rgba(239,68,68,.18); color: #ff8080; }
.adm-body { padding: 4px 18px 18px; border-top: 1px solid #1a1a1a; }
.adm-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 14px; }
.adm-row .toggle-row { height: 42px; min-height: 42px; padding: 0 14px; }
.adm-h { margin-top: 18px; font-size: 12px; font-weight: 600; letter-spacing: .8px; text-transform: uppercase; color: #8a8a8a; }
.adm-h small { text-transform: none; letter-spacing: 0; font-weight: 400; color: #666; margin-left: 6px; }
.adm-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.adm-badge { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border-radius: 10px; border: 1.6px solid #232323; background: #0d0d0d; color: #888; font: inherit; font-size: 13.5px; cursor: pointer; transition: all .15s; }
.adm-badge i { color: var(--bc); opacity: .5; }
.adm-badge.on { border-color: var(--bc); color: #fff; background: color-mix(in srgb, var(--bc) 14%, #0d0d0d); }
.adm-badge.on i { opacity: 1; }
.adm-cb { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 4px 0 11px; border-radius: 10px; background: #141414; border: 1px solid #262626; font-size: 13.5px; color: #ddd; }
.adm-cb > i { color: var(--bc); }
.adm-cb img { width: 16px; height: 16px; object-fit: contain; }
.adm-cb button { width: 24px; height: 24px; border-radius: 7px; border: 0; background: none; color: #888; cursor: pointer; }
.adm-cb button:hover { background: #e23744; color: #fff; }
.danger-row { padding-top: 14px; border-top: 1px dashed #222; }
.adm-mini { margin-top: 12px; display: flex; flex-direction: column; gap: 4px; }
.adm-mini button { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border: 0; border-radius: 10px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.adm-mini button:hover { background: #171717; }
.adm-mini .grow { flex: 1; min-width: 0; } .adm-mini b { display: block; font-size: 14px; color: #fff; } .adm-mini small { font-size: 12.5px; color: #808080; }
.adm-mini > button > i { color: #555; font-size: 12px; }
.adm-mini .adm-av span i { color: #ff6b75; }
.adm-rep + .adm-rep { margin-top: 10px; }
.adm-rep-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.adm-rep-h b { color: #fff; } .adm-rep-h small { color: #808080; font-size: 13px; } .adm-rep-h a { color: #ff7f89; }
.adm-rep-t { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: #0c0c0c; color: #ccc; font-size: 14px; }
.adm-ups { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.adm-up { border-radius: 14px; overflow: hidden; background: #111; border: 1px solid #1d1d1d; display: flex; flex-direction: column; }
.adm-th { height: 120px; display: grid; place-items: center; background: #0a0a0a center / cover; color: #666; font-size: 26px; }
.adm-up-m { padding: 10px 12px 4px; flex: 1; } .adm-up-m b { display: block; font-size: 13.5px; color: #fff; } .adm-up-m small { font-size: 12px; color: #808080; }
.adm-up .icon-b { margin: 0 10px 10px auto; }
/* questions inbox */
.ama-d + .ama-d { margin-top: 10px; }
.ama-q { display: flex; gap: 10px; align-items: baseline; font-size: 16px; font-weight: 600; color: #fff; }
.ama-q i { color: #ff5a66; }
/* achievements */
.ach-grid { margin-top: 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.ach { padding: 14px; border-radius: 14px; background: #0d0d0d; border: 1px solid #1d1d1d; opacity: .45; filter: grayscale(1); transition: transform .2s; }
.ach.ok { opacity: 1; filter: none; border-color: rgba(245,197,24,.3); background: linear-gradient(180deg, rgba(245,197,24,.06), #0d0d0d); }
.ach:hover { transform: translateY(-2px); }
.ach i { font-size: 18px; color: #f5c518; }
.ach b { display: block; margin-top: 10px; font-size: 14.5px; color: #fff; }
.ach small { display: block; margin-top: 2px; font-size: 12px; color: #888; }
/* analytics bars */
.hbars { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.hbar { display: grid; grid-template-columns: minmax(0, 150px) 1fr 50px; align-items: center; gap: 10px; font-size: 14px; }
.hb-l { display: flex; align-items: center; gap: 8px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: #ddd; }
.hb-l i { color: #ff5a66; width: 16px; text-align: center; }
.hb-t { height: 8px; border-radius: 4px; background: #1a1a1a; overflow: hidden; }
.hb-t i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #e23744, #ff7f89); }
.hbar b { text-align: right; color: #fff; font-variant-numeric: tabular-nums; }
/* section builder: timeline + poll */
.tl-list, .pl-ed { display: flex; flex-direction: column; gap: 8px; }
.tl-row { display: flex; gap: 8px; align-items: center; }
.tl-row input { height: 38px; padding: 0 12px; border-radius: 10px; background: #121212; border: 1px solid #222; color: #eee; font: inherit; font-size: 14px; outline: none; flex: 1; min-width: 0; }
.tl-row input:first-child { flex: 0 0 110px; }
.tl-row input:focus { border-color: #e23744; }
.pl-n { width: 24px; height: 24px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; background: #1d1d1d; color: #aaa; font-size: 12px; }
@media (max-width: 760px) { .ob-grid, .g2b { grid-template-columns: 1fr; } .adm-stat { display: none; } .hbar { grid-template-columns: minmax(0, 110px) 1fr 40px; } .tl-row input:first-child { flex-basis: 76px; } }
.modal { max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain; } .fa-cart::before { content: '\f07a'; }

/* ============ templates v2 ============ */
.tpl-chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 16px; }
.tpl-chips button { height: 34px; padding: 0 14px; border-radius: 99px; border: 1px solid #222; background: #111; color: #aaa; font: inherit; font-size: 13.5px; cursor: pointer; transition: all .15s; }
.tpl-chips button:hover { color: #fff; border-color: #333; }
.tpl-chips button.on { background: #e23744; border-color: #e23744; color: #fff; }
.tpl-prev.v2 { position: relative; display: grid; place-items: center; overflow: hidden; }
.tpl-prev.v2::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 55%, rgba(0,0,0,.45)); pointer-events: none; }
.mini2 { position: relative; z-index: 1; width: 58%; padding: 14px 14px 12px; border-radius: 14px; border: 1px solid rgba(255,255,255,.12); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); display: flex; flex-direction: column; align-items: center; gap: 8px; transition: transform .35s cubic-bezier(.16,1,.3,1); }
.tpl:hover .mini2 { transform: translateY(-4px) scale(1.02); }
.mini2.split { flex-direction: row; flex-wrap: wrap; justify-content: flex-start; }
.a2 { width: 42px; height: 42px; display: grid; place-items: center; font-weight: 700; text-transform: uppercase; color: #fff; border-radius: 50%; flex-shrink: 0; }
.a2.rounded { border-radius: 26%; } .a2.square { border-radius: 6px; } .a2.hexagon { border-radius: 0; clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0 50%); }
.mini2 .mt { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.mini2.split .mt { align-items: flex-start; }
.mini2 .mt b { font-size: 15px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bdots { display: flex; gap: 3px; } .bdots i { width: 7px; height: 7px; border-radius: 50%; background: var(--ac); opacity: .85; }
.mlinks { width: 100%; display: flex; flex-direction: column; gap: 4px; } .mlinks i { display: block; height: 9px; border-radius: 5px; background: rgba(255,255,255,.18); }
.msp { width: 100%; display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: 8px; background: rgba(0,0,0,.35); text-align: left; }
.msp img { width: 28px; height: 28px; border-radius: 4px; }
.msp span { flex: 1; min-width: 0; } .msp b { display: block; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .msp small { font-size: 10px; opacity: .65; }
.msp > i { color: #1ed760; font-size: 13px; }
.tpl-meta span { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.use-opts { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.uo { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: #0d0d0d; border: 1px solid #1f1f1f; cursor: pointer; transition: border-color .15s; }
.uo:hover { border-color: #333; }
.uo input { width: 18px; height: 18px; accent-color: #e23744; flex-shrink: 0; }
.uo span { flex: 1; min-width: 0; } .uo b { display: block; font-size: 14.5px; color: #fff; } .uo small { display: block; font-size: 12.5px; color: #888; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uo em { width: 54px; height: 36px; border-radius: 8px; background: center / cover; flex-shrink: 0; }
.uo.on { opacity: .75; cursor: default; }
.modal.tp-modal { width: min(1100px, calc(100vw - 32px)); height: calc(100dvh - 40px); max-height: none; padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.tp-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 18px; border-bottom: 1px solid #1f1f1f; }
.tp-head b { font-size: 16px; color: #fff; } .tp-head small { color: #777; font-size: 13px; } .tp-head .grow { flex: 1; }
.tp-frame { flex: 1; width: 100%; border: 0; background: #000; }
/* song library + lyric syncing */
.song-lib { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.sl { display: flex; align-items: center; gap: 12px; padding: 8px 10px 8px 8px; border-radius: 12px; background: #0d0d0d; border: 1px solid #1d1d1d; }
.sl img { width: 46px; height: 46px; border-radius: 8px; object-fit: cover; }
.sl .txt { flex: 1; min-width: 0; } .sl .txt b { display: block; color: #fff; font-size: 14.5px; } .sl .txt small { color: #888; font-size: 12.5px; }
.sl .act { display: flex; align-items: center; gap: 6px; }
.ly-sync { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.ly-sync small { color: #999; font-size: 13px; }
@media (max-width: 640px) { .mini2 { width: 72%; } .modal.tp-modal { height: calc(100dvh - 20px); width: calc(100vw - 16px); } .tp-head small { display: none; } }

/* ============ fit & polish pass ============ */
/* focus: rings on buttons/links only; text fields show focus with their own red border */
.dash-body :is(button, a, input, select, textarea, [tabindex]):focus-visible { outline: none; }
.dash-body :where(button, a, [role=button], [tabindex]:not(input):not(select):not(textarea)):focus-visible { outline: 2px solid rgba(226, 55, 68, 0.75); outline-offset: 2px; }
.dash-body :where(.cz-ng button, .seg button, .seg-d button, .tabs-d button, .icon-grid button):focus-visible { outline-offset: -2px; }
.f-input:focus-within { border-color: rgba(226, 55, 68, 0.6); }
/* everything sized to the visible screen, under the top bar */
.cz-preview { top: calc(var(--tb-h) + 16px); height: calc(100vh - var(--tb-h) - 32px); height: calc(100dvh - var(--tb-h) - 32px); }
.cz-nav { max-height: calc(100dvh - var(--tb-h) - 32px); }
.sb { height: 100vh; height: 100dvh; }
/* separate stacked panels that aren't direct siblings */
#stList, #stStyle, #lkGrid, #tks, #aview > *:first-child { margin-top: 18px; }
#stList > .panel-d + .sec-list { margin-top: 18px; }
/* template page header holds the Create button now */
.ph-row.with-act { justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.ph-row.with-act > span { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tabs-d { border-radius: 18px; }
/* sideways scrollers (editor categories, tab rows): wheel scrolls them, arrows appear when there's more */
.hs-btn { position: sticky; z-index: 3; flex: 0 0 34px; width: 34px; height: 34px; padding: 0; align-self: center; border-radius: 50%; border: 1px solid #2a2a2a; background: #1a1a1a; color: #ddd; font-size: 12px; cursor: pointer; display: none; visibility: hidden; place-items: center; box-shadow: 0 4px 16px rgba(0,0,0,.7); transition: background .15s; }
.hs.has-scroll > .hs-btn { display: grid; }
.hs-btn:hover { background: #262626; color: #fff; }
.hs-btn.l { left: 0; } .hs-btn.r { right: 0; margin-left: auto; }
.hs.can-l > .hs-btn.l, .hs.can-r > .hs-btn.r { visibility: visible; }
.cz-nav.hs > .hs-btn { display: none; }
@media (max-width: 980px) { .cz-nav.hs.has-scroll > .hs-btn { display: grid; } }
.hs .hs-btn { -webkit-mask-image: none; }@media (max-width: 980px) { .cz-find { min-width: 190px; } .cz-nav { scroll-behavior: smooth; } }

/* ============ visual pickers ============ */
.pk { position: relative; }
.pk-btn { width: 100%; min-height: 54px; display: flex; align-items: center; gap: 12px; padding: 6px 14px 6px 8px; border-radius: 14px; border: 1.6px solid #1d1d1d; background: #0d0d0d; color: #eee; font: inherit; cursor: pointer; text-align: left; transition: border-color .15s; }
.pk-btn:hover, .pk-btn[aria-expanded=true] { border-color: #e23744; }
.pk-btn > i { color: #777; font-size: 12px; transition: transform .2s; }
.pk-btn[aria-expanded=true] > i { transform: rotate(180deg); }
.pk-cur { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; }
.pk-cur b { font-weight: 500; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk-pop { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px); min-width: min(330px, calc(100vw - 40px)); max-height: 330px; overflow-y: auto; padding: 8px; border-radius: 16px; background: #141414; border: 1px solid #2a2a2a; box-shadow: 0 24px 60px rgba(0,0,0,.65); display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; animation: menuIn .16s ease both; scrollbar-width: thin; }
.pk-pop.up { top: auto; bottom: calc(100% + 6px); }
.pk-pop.fonts { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
.pk-opt { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 84px; padding: 10px 6px; border-radius: 12px; border: 1.6px solid transparent; background: #0c0c0c; color: #bbb; font: inherit; font-size: 12.5px; cursor: pointer; transition: border-color .15s, background .15s, color .15s; }
.pk-opt:hover, .pk-opt:focus-visible { background: #1a1a1a; color: #fff; outline: none; border-color: #333; }
.pk-opt.on { border-color: #e23744; background: rgba(226,55,68,.1); color: #fff; }
.pk-opt > span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* fonts */
.pkp-font { font-size: 24px; line-height: 1; color: #fff; min-width: 38px; text-align: center; }
/* name effects (same looks as on the profile) */
.pkp-name { position: relative; display: inline-block; font-size: 19px; font-weight: 700; color: #fff; line-height: 1.2; }
.pfx-glow { text-shadow: 0 0 10px var(--pa), 0 0 20px color-mix(in srgb, var(--pa) 60%, transparent); }
.pfx-rainbow { background: linear-gradient(90deg, #ff4d5b, #f5a524, #4ade80, #38bdf8, #a78bfa, #ff4d5b); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: rb 4s linear infinite; }
.pfx-sparkle { text-shadow: 0 0 8px rgba(255,255,255,.6); }
.pfx-sparkle::after { content: "✦"; position: absolute; right: -12px; top: -6px; font-size: 11px; color: var(--pa); animation: tw 1.6s ease-in-out infinite; }
.pfx-typewriter::after { content: "|"; margin-left: 1px; color: var(--pa); animation: blink 1s steps(1) infinite; }
.pfx-glitch::before, .pfx-glitch::after { content: attr(data-t); position: absolute; inset: 0; overflow: hidden; }
.pfx-glitch::before { color: #0ff; clip-path: inset(0 0 55% 0); animation: gl1 1.6s infinite steps(2); mix-blend-mode: screen; }
.pfx-glitch::after { color: #f0f; clip-path: inset(55% 0 0 0); animation: gl2 1.3s infinite steps(2); mix-blend-mode: screen; }
.pfx-neon { text-shadow: 0 0 4px #fff, 0 0 10px var(--pa), 0 0 20px var(--pa); animation: neon 3s infinite; }
.pfx-wave span { display: inline-block; animation: wave 1.6s ease-in-out infinite; }
.pfx-fire { color: #ffe9c7; text-shadow: 0 -2px 4px #fff3, 0 -4px 8px #ff0, 0 -7px 14px #ff8000, 0 -10px 20px #f00; }
.pfx-ice { color: #e6fbff; text-shadow: 0 0 6px #9ee8ff, 0 0 14px #38bdf8; }
.pfx-shimmer { background: linear-gradient(100deg, #fff 40%, var(--pa) 50%, #fff 60%); background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shim 2.4s linear infinite; }
.pfx-pixel { font-family: "VT323", ui-monospace, monospace; font-size: 23px; font-weight: 400; letter-spacing: 1px; text-shadow: 2px 2px 0 rgba(0,0,0,.5); }
@keyframes rb { to { background-position: 300% 0; } }
@keyframes tw { 0%, 100% { opacity: .2; transform: scale(.7); } 50% { opacity: 1; transform: scale(1.1) rotate(30deg); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes gl1 { 0%, 88%, 100% { transform: translate(0); } 92% { transform: translate(-3px, 1px); } 96% { transform: translate(2px, -1px); } }
@keyframes gl2 { 0%, 86%, 100% { transform: translate(0); } 90% { transform: translate(3px, -1px); } 95% { transform: translate(-2px, 1px); } }
@keyframes neon { 0%, 18%, 22%, 25%, 53%, 57%, 100% { opacity: 1; } 20%, 24%, 55% { opacity: .35; } }
@keyframes wave { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-5px); } }
@keyframes shim { from { background-position: 150% 0; } to { background-position: -100% 0; } }
/* background effects as tiny animated windows */
.pkp-fx { position: relative; width: 64px; height: 40px; border-radius: 8px; overflow: hidden; background: linear-gradient(#141a2a, #07080d); display: grid; place-items: center; color: #666; flex-shrink: 0; }
.pfx-bg-snow, .pfx-bg-stars, .pfx-bg-embers, .pfx-bg-petals, .pfx-bg-fireflies, .pfx-bg-bubbles, .pfx-bg-leaves, .pfx-bg-rain { background-repeat: repeat; }
.pfx-bg-snow { background-image: radial-gradient(1.6px 1.6px at 10px 6px, #fff 60%, transparent), radial-gradient(1.2px 1.2px at 30px 20px, #fff 60%, transparent), radial-gradient(1.8px 1.8px at 50px 12px, #fff 60%, transparent), linear-gradient(#141a2a, #07080d); background-size: 64px 40px, 64px 40px, 64px 40px, 100% 100%; animation: pFall 3s linear infinite; }
.pfx-bg-rain { background-image: linear-gradient(transparent 60%, rgba(170,200,255,.7) 60% 100%), linear-gradient(#141a2a, #07080d); background-size: 7px 14px, 100% 100%; animation: pFallFast .5s linear infinite; }
.pfx-bg-stars { background-image: radial-gradient(1px 1px at 8px 10px, #fff 70%, transparent), radial-gradient(1.4px 1.4px at 40px 26px, #fff 70%, transparent), radial-gradient(1px 1px at 54px 8px, #fff 70%, transparent), radial-gradient(1px 1px at 22px 32px, #fff 70%, transparent), linear-gradient(#05050a, #000); animation: pTwinkle 2s ease-in-out infinite; }
.pfx-bg-embers { background-image: radial-gradient(2px 2px at 12px 30px, var(--pa) 60%, transparent), radial-gradient(1.6px 1.6px at 38px 14px, #ffb347 60%, transparent), radial-gradient(2px 2px at 54px 34px, #ff6a2d 60%, transparent), linear-gradient(#1a0805, #050101); background-size: 64px 40px, 64px 40px, 64px 40px, 100% 100%; animation: pRise 2.6s linear infinite; }
.pfx-bg-petals { background-image: radial-gradient(3px 2px at 12px 8px, #f9a8d4 60%, transparent), radial-gradient(3px 2px at 44px 22px, #f472b6 60%, transparent), linear-gradient(#1c0a14, #070206); background-size: 64px 40px, 64px 40px, 100% 100%; animation: pFall 4s linear infinite; }
.pfx-bg-leaves { background-image: radial-gradient(3.5px 2px at 14px 10px, #e8913a 60%, transparent), radial-gradient(3.5px 2px at 46px 26px, #c2410c 60%, transparent), linear-gradient(#1a0f05, #050301); background-size: 64px 40px, 64px 40px, 100% 100%; animation: pFall 4.5s linear infinite; }
.pfx-bg-fireflies { background-image: radial-gradient(3px 3px at 14px 14px, #ffe680 40%, transparent), radial-gradient(3px 3px at 46px 28px, #ffe680 40%, transparent), linear-gradient(#08120a, #020402); animation: pTwinkle 1.6s ease-in-out infinite; }
.pfx-bg-bubbles { background-image: radial-gradient(circle at 16px 26px, transparent 3px, rgba(255,255,255,.55) 3.5px, transparent 4.5px), radial-gradient(circle at 44px 14px, transparent 4px, rgba(255,255,255,.45) 4.5px, transparent 5.5px), linear-gradient(#06182a, #020810); background-size: 64px 40px, 64px 40px, 100% 100%; animation: pRise 3s linear infinite; }
.pfx-bg-lightning { background: linear-gradient(#0d0f1c, #050508); animation: pFlash 2.4s infinite; }
.pfx-bg-matrix { background: #000; color: #22c55e; font: 10px ui-monospace, monospace; grid-auto-flow: column; gap: 6px; }
.pfx-bg-matrix i { font-style: normal; animation: pFallChar 1.4s linear infinite; }
.pfx-bg-matrix i:nth-child(2) { animation-delay: .5s; } .pfx-bg-matrix i:nth-child(3) { animation-delay: .9s; }
@keyframes pFall { from { background-position: 0 -40px, 0 -40px, 0 -40px, 0 0; } to { background-position: 0 0, 0 0, 0 0, 0 0; } }
@keyframes pFallFast { from { background-position: 0 -14px, 0 0; } to { background-position: -3px 0, 0 0; } }
@keyframes pRise { from { background-position: 0 40px, 0 40px, 0 40px, 0 0; } to { background-position: 0 0, 0 0, 0 0, 0 0; } }
@keyframes pTwinkle { 50% { filter: brightness(.45); } }
@keyframes pFlash { 0%, 90%, 100% { background: linear-gradient(#0d0f1c, #050508); } 92% { background: linear-gradient(#cdd6ff, #6b7cff); } 94% { background: linear-gradient(#0d0f1c, #050508); } 96% { background: linear-gradient(#9aa8ff, #3b46aa); } }
@keyframes pFallChar { from { transform: translateY(-16px); opacity: 0; } 30% { opacity: 1; } to { transform: translateY(16px); opacity: 0; } }
/* avatar decorations */
.pkp-av { position: relative; width: 42px; height: 42px; flex-shrink: 0; display: grid; place-items: center; }
.pkp-av b { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--pa), #2a0a10); }
.pkp-av i { position: absolute; font-style: normal; font-size: 10px; }
.pdeco-ring::before { content: ""; position: absolute; inset: 1px; border-radius: 50%; background: conic-gradient(var(--pa), transparent 40%, #fff, transparent 80%, var(--pa)); -webkit-mask: radial-gradient(closest-side, transparent 84%, #000 88%); mask: radial-gradient(closest-side, transparent 84%, #000 88%); animation: spin 2.5s linear infinite; }
.pdeco-flames::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(closest-side, transparent 72%, rgba(255,120,30,.95) 82%, rgba(255,40,40,.5) 92%, transparent); animation: pFlick .2s infinite alternate; }
.pdeco-halo::before { content: ""; position: absolute; left: 10px; right: 10px; top: -2px; height: 8px; border-radius: 50%; border: 2.5px solid #ffd76a; box-shadow: 0 0 8px #ffd76a; animation: pBob 2s ease-in-out infinite; }
.pdeco-hearts i { color: #ff4d6d; } .pdeco-stars i { color: #ffd76a; } .pdeco-sparkles i { color: var(--pa); }
.pkp-av i:nth-of-type(1) { top: -2px; right: 2px; animation: tw 1.6s infinite; } .pkp-av i:nth-of-type(2) { bottom: 0; left: 0; animation: tw 1.6s .6s infinite; }
.pdeco-orbit { animation: spin 3s linear infinite; }
.pdeco-orbit i { top: 0; left: 50%; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: var(--pa); box-shadow: 0 0 6px var(--pa); }
.pdeco-orbit b { animation: spin 3s linear infinite reverse; }
@keyframes pFlick { to { transform: scale(1.07) rotate(5deg); } }
@keyframes pBob { 50% { transform: translateY(-3px); } }
/* mouse trails */
.pkp-trail { position: relative; width: 52px; height: 36px; display: grid; place-items: center; font-size: 16px; color: var(--pa); }
.pkp-trail::before, .pkp-trail::after { content: ""; position: absolute; width: 5px; height: 5px; border-radius: 50%; background: var(--pa); opacity: .5; left: 8px; top: 22px; }
.pkp-trail::after { left: 18px; top: 16px; opacity: .3; width: 4px; height: 4px; }
.pt-none::before, .pt-none::after { display: none; }
.pt-none { color: #666; }
.pt-comet::before { width: 22px; height: 2px; border-radius: 2px; left: 4px; top: 22px; transform: rotate(-30deg); background: linear-gradient(90deg, transparent, var(--pa)); opacity: .9; }
.pt-comet::after { display: none; }
.pkf .pk-pop { max-width: calc(100vw - 32px); }
@media (prefers-reduced-motion: reduce) { .pk-pop *, .pk-btn * { animation: none !important; } }

/* ============ guided tour ============ */
.tour { position: fixed; inset: 0; z-index: 400; animation: fadeIn6 .25s ease both; }
.tour.out { opacity: 0; transition: opacity .25s; }
.tour-hole { position: fixed; border-radius: 14px; box-shadow: 0 0 0 200vmax rgba(0,0,0,.66); transition: left .45s cubic-bezier(.16,1,.3,1), top .45s cubic-bezier(.16,1,.3,1), width .45s cubic-bezier(.16,1,.3,1), height .45s cubic-bezier(.16,1,.3,1); pointer-events: none; }
.tour-ring { position: fixed; border-radius: 14px; border: 2px solid #ff5a66; pointer-events: none; transition: left .45s cubic-bezier(.16,1,.3,1), top .45s cubic-bezier(.16,1,.3,1), width .45s cubic-bezier(.16,1,.3,1), height .45s cubic-bezier(.16,1,.3,1); animation: tourPulse 1.8s ease-out infinite; }
@keyframes tourPulse { 0% { box-shadow: 0 0 0 0 rgba(255,90,102,.55); } 70%, 100% { box-shadow: 0 0 0 14px rgba(255,90,102,0); } }
.tour-line { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.tl-path { fill: none; stroke: #ff5a66; stroke-width: 2.4; stroke-linecap: round; filter: drop-shadow(0 0 6px rgba(255,90,102,.6)); }
.tl-dot { fill: #ff5a66; filter: drop-shadow(0 0 6px #ff5a66); animation: tourDot 1.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes tourDot { 50% { transform: scale(1.5); } }
.tour-card { position: fixed; width: 330px; max-width: calc(100vw - 24px); padding: 18px 18px 16px; border-radius: 18px; background: #151515; border: 1px solid #2c2c2c; box-shadow: 0 24px 70px rgba(0,0,0,.7); transition: left .45s cubic-bezier(.16,1,.3,1), top .45s cubic-bezier(.16,1,.3,1); }
.tour-card.in { animation: tourIn .4s cubic-bezier(.16,1,.3,1) both; }
@keyframes tourIn { from { opacity: 0; transform: translateY(8px) scale(.97); } }
.tour-x { position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; border-radius: 8px; border: 0; background: none; color: #888; cursor: pointer; }
.tour-x:hover { background: #222; color: #fff; }
.tour-n { font-size: 12px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase; color: #ff5a66; }
.tour-card h4 { margin-top: 6px; font-size: 18px; color: #fff; padding-right: 26px; }
.tour-card p { margin-top: 6px; font-size: 14.5px; line-height: 1.5; color: #bdbdbd; }
.tour-dots { display: flex; gap: 5px; margin-top: 14px; flex-wrap: wrap; }
.tour-dots button { width: 8px; height: 8px; padding: 0; border-radius: 99px; border: 0; background: #333; cursor: pointer; transition: width .3s, background .3s; }
.tour-dots button.done { background: #6b2a30; }
.tour-dots button.on { width: 22px; background: #ff5a66; }
.tour-act { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.tour-act .btn-d { height: 38px; padding: 0 16px; font-size: 14px; }
.tour-act .btn-d:disabled { opacity: .35; pointer-events: none; }
/* welcome + quick start + help menu */
.wel-modal { width: 470px; }
.wel { text-align: center; }
.wel-art { position: relative; height: 90px; margin: -4px auto 10px; width: 160px; }
.wel-art span { position: absolute; border-radius: 16px; background: linear-gradient(135deg, #e23744, #6b1c24); box-shadow: 0 10px 30px rgba(226,55,68,.3); animation: welFloat 3s ease-in-out infinite; }
.wel-art span:nth-child(1) { width: 70px; height: 70px; left: 45px; top: 8px; border-radius: 50%; }
.wel-art span:nth-child(2) { width: 38px; height: 38px; left: 6px; top: 40px; background: linear-gradient(135deg, #f5a524, #7a3e12); animation-delay: .4s; }
.wel-art span:nth-child(3) { width: 30px; height: 30px; right: 4px; top: 12px; border-radius: 50%; background: linear-gradient(135deg, #7c86ff, #2a2f6b); animation-delay: .8s; }
@keyframes welFloat { 50% { transform: translateY(-8px); } }
.wel-opts { margin-top: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.wel-o { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 16px; border-radius: 16px; border: 1.6px solid #262626; background: #0e0e0e; color: #ddd; font: inherit; text-align: left; cursor: pointer; transition: border-color .2s, transform .2s; }
.wel-o:hover { border-color: #e23744; transform: translateY(-2px); }
.wel-o > i { font-size: 20px; color: #ff5a66; margin-bottom: 6px; }
.wel-o b { font-size: 15px; color: #fff; } .wel-o small { font-size: 12.5px; color: #8a8a8a; }
.wel-o.primary { background: linear-gradient(180deg, rgba(226,55,68,.16), #0e0e0e); border-color: rgba(226,55,68,.5); }
.wel-skip { margin-top: 16px; border: 0; background: none; color: #888; font: inherit; font-size: 14px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.wel-skip:hover { color: #fff; }
.qs-bar { margin-top: 14px; height: 6px; border-radius: 3px; background: #1c1c1c; overflow: hidden; }
.qs-bar i { display: block; height: 100%; background: linear-gradient(90deg, #e23744, #ff7f89); border-radius: 3px; transition: width .6s; }
.qs { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.qs-i { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; border: 1px solid #1f1f1f; background: #0d0d0d; color: #ddd; font: inherit; text-align: left; cursor: pointer; transition: border-color .15s, background .15s; }
.qs-i:hover { border-color: #333; background: #141414; }
.qs-i b { flex: 1; font-weight: 500; font-size: 14.5px; }
.qs-i > i:last-child { color: #555; font-size: 12px; }
.qs-i > i:nth-child(2) { width: 18px; text-align: center; color: #ff5a66; }
.qs-n { width: 24px; height: 24px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; background: #1f1f1f; font-size: 12px; color: #aaa; }
.qs-i.ok { opacity: .6; } .qs-i.ok .qs-n { background: #16a34a; color: #fff; } .qs-i.ok b { text-decoration: line-through; }
.tb-r { position: relative; }
.help-menu { position: absolute; top: calc(100% + 8px); right: 40px; z-index: 50; width: 220px; padding: 6px; border-radius: 14px; background: #151515; border: 1px solid #262626; box-shadow: 0 18px 50px rgba(0,0,0,.6); animation: menuIn .18s ease both; }
.help-menu button, .help-menu a { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px; border: 0; border-radius: 9px; background: none; color: #ddd; font: inherit; font-size: 14px; cursor: pointer; text-align: left; }
.help-menu button:hover, .help-menu a:hover { background: #1f1f1f; }
.help-menu i { width: 16px; text-align: center; color: #ff5a66; }
@media (max-width: 640px) { .wel-opts { grid-template-columns: 1fr; } .tour-card { width: calc(100vw - 24px); } .help-menu { right: 0; } }
@media (prefers-reduced-motion: reduce) { .tour-ring, .tl-dot, .wel-art span { animation: none; } }
/* one field per row whenever the editor column is narrow */
.cz-edit { container-type: inline-size; min-width: 0; }
@container (max-width: 560px) { .cz-sec .cz-grid { grid-template-columns: 1fr; } .cz-grid .wide2 { grid-column: auto; } .uploads { grid-template-columns: 1fr 1fr; } }
/* phones: rows of field + button wrap instead of spilling; comfortable tap sizes */
@media (max-width: 480px) {
  .f-row { flex-wrap: wrap; }
  .f-row > .f-input { flex: 1 1 100%; min-width: 0; }
  .f-row > .btn-d { flex: 1 1 auto; justify-content: center; }
  .sb-close { width: 40px; height: 40px; display: grid; place-items: center; }
  .sb-user > button { width: 38px; height: 38px; }
  .theme-sw button { height: 36px; }
  .tpl-prev .fav { width: 40px; height: 40px; }
  .t-title { min-height: 34px; }
  .f-hint a, .ph-sub a, .empty-d a, .alert-d a { display: inline-block; padding: 6px 0; }
}

/* popups: never taller than the space under the top gap; the full-size template preview is centered */
.modal { max-height: calc(100dvh - 12vh - 16px); }
.modal-wrap:has(.tp-modal) { padding: 20px 16px; place-items: center; }
.modal.tp-modal { height: calc(100dvh - 40px); max-height: calc(100dvh - 40px); }
@media (max-width: 640px) {
  .modal-wrap:has(.tp-modal) { padding: 10px 8px; }
  .modal.tp-modal { height: calc(100dvh - 20px); max-height: calc(100dvh - 20px); }
}
/* picker previews for the third reference pass */
.pfx-bg-meteors::before { content: ""; position: absolute; width: 34px; height: 1.5px; border-radius: 2px; background: linear-gradient(90deg, #fff, transparent); transform: rotate(-35deg); animation: pMeteor 1.6s ease-in infinite; }
@keyframes pMeteor { 0% { left: 70%; top: -20%; opacity: 0; } 15% { opacity: 1; } 70% { left: 0%; top: 90%; opacity: 0; } 100% { left: 0%; top: 90%; opacity: 0; } }
.pdeco-catears::before, .pdeco-catears::after { content: ""; position: absolute; top: 1px; width: 13px; height: 13px; background: #f4d3dc; border-radius: 12% 70% 8% 70%; box-shadow: inset 0 0 0 3px #ef8fb0; z-index: 1; }
.pdeco-catears::before { left: 3px; transform: rotate(-12deg); } .pdeco-catears::after { right: 3px; transform: scaleX(-1) rotate(-12deg); }
.ic-preview.sh-tile > span { border-radius: 10px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.09); }

.tp-head .tp-who { width: auto; flex-shrink: 0; } .tp-head .tp-who button { padding: 6px 12px; font-size: 13px; }
@media (max-width: 640px) { .tp-head .tp-who button { padding: 6px 8px; font-size: 12px; } }

.music-workspace { display: grid; gap: 18px; min-width: 0; margin-bottom: 18px; }
.music-workspace > .panel-d + .panel-d { margin-top: 0; }
.music-discovery h2 { font-size: 20px; }
#musicFinder { margin-top: 16px; }
#musicFinder select {
  max-width: 100%; padding: 8px 12px; border: 1px solid rgb(128 128 128 / .4);
  border-radius: 8px; color: inherit; background: var(--d-panel-2); font: inherit; font-size: 13px;
}
.catalog-search { display: flex; align-items: stretch; gap: 8px; margin: 12px 0 0; }
.catalog-search .f-input { flex: 1; margin: 0; min-width: 0; }
.catalog-search input { min-width: 0; width: 100%; }
.catalog-results:not(:empty) { margin-top: 16px; display: grid; gap: 8px; }
.catalog-record { padding: 14px; border: 1px solid rgb(128 128 128 / .28); border-radius: 12px; display: flow-root; overflow-wrap: anywhere; }
.catalog-record img { float: left; margin-right: 12px; border-radius: 7px; }
.catalog-record p { margin: 4px 0 10px; opacity: .76; font-size: 13px; }
.catalog-record audio { display: block; clear: both; width: 100%; margin: 12px 0 6px; }
.catalog-record a { display: inline-block; margin: 0 12px 8px 0; }
.catalog-record button { display: block; clear: both; }
.music-actions { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-top:12px; }
.music-actions a { font-size:13px; margin:0; }
.music-workspace .catalog-results, .music-workspace #songLib { max-height:36rem; overflow:auto; overscroll-behavior:contain; }
.music-workspace #songLib { display:grid; gap:10px; }
.catalog-record small { color:var(--d-muted); }
.dash-body { isolation:isolate; }
.music-nav { display:flex; flex-wrap:wrap; gap:6px; }
.music-nav [aria-pressed=true] { background:var(--d-active); border-color:var(--d-btn-border); }
.music-workspace [hidden], .cz-edit > .cz-sec[hidden] { display:none!important; }
.music-workspace #trk .my-link { flex-wrap:wrap; }
.music-workspace #trk .act { flex-wrap:wrap; }

.music-source-options { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(210px,100%),1fr)); gap:10px; margin:14px 0; }
.music-source-options .btn-d { display:grid; gap:4px; text-align:left; justify-items:start; white-space:normal; }
.music-source-options small { font-weight:400; }
.music-source-options [aria-pressed=true] { outline:2px solid var(--accent-strong); }
[data-track-import] { margin:16px 0; }

@media (prefers-reduced-motion:no-preference) {
  .dash-body :is(.btn-d,.icon-b,.sb-item,.music-nav button) { transition:transform .15s ease-out,background-color .15s,border-color .15s; }
  .dash-body :is(.btn-d,.icon-b,.sb-item,.music-nav button):active { transform:scale(.97); }
  .dash-body :is(.sb-panes,.cz-nav,.catalog-results,.modal,#songLib) { scroll-behavior:smooth; }
}
@media (prefers-reduced-motion:reduce) {
  html:has(.dash-body),.dash-body * { scroll-behavior:auto!important; }
}

.fangs-social-mark { display:inline-block; width:1em; height:1em; vertical-align:-.12em; background:currentColor; mask:url("/assets/fangs-mark.svg") center/contain no-repeat; }

.social-search { margin-top:14px; max-width:32rem; }
.social-grid { margin-top:12px; grid-template-columns:repeat(auto-fill,minmax(96px,1fr)); gap:8px; max-height:24rem; overflow-y:auto; padding:5px; }
.social-tile { aspect-ratio:auto; min-height:78px; align-content:center; gap:5px; border-radius:12px; color:var(--d-text); background:var(--d-panel-2); }
.social-tile small { font-weight:500; font-family:inherit; font-size:12px; line-height:1.2; }
.social-tile[hidden] { display:none; }
@media (max-width: 400px) {
  .topbar { gap: 6px; padding-inline: 10px; }
  .tb-r { gap: 0; }
  .tb-r .tb-ic { width: 32px; height: 36px; }
  .tb-r .tb-pill { width: 32px; min-width: 32px; padding: 0; margin: 0; justify-content: center; }
  .tb-brand .brand h1 { font-size: 20px; }
}
.dash-view > section, .grid > *, .panel-d, .cz-wrap > *, .f-input { min-width: 0; }
.ph-row { flex-wrap: wrap; }
.ph-row h2, .ph-sub, .f-hint { overflow-wrap: anywhere; }
.sec-list { container-type: inline-size; }
@container (max-width: 560px) {
  .sb-head { display: flex; flex-wrap: wrap; gap: 8px; }
  .sb-head .grip { flex: 0 0 24px; padding: 0; text-align: center; }
  .sb-head .sb-title { flex: 1 1 calc(100% - 70px); width: 0; }
  .sb-head small { display: none; }
  .sb-head > button:first-of-type { margin-left: auto; }
}
@container (max-width: 280px) {
  .soc-row .act { display: grid; grid-template-columns: repeat(3, minmax(36px, 1fr)); justify-items: center; }
}
@media (max-width: 640px) {
  .m-actions, .cz-top { flex-wrap: wrap; }
  .m-actions .btn-d { max-width: 100%; }
}
.social-tile.added::after { top:3px; right:3px; width:14px; height:14px; }
@media (prefers-reduced-motion:reduce) { .social-tile,.social-tile:hover { transform:none; transition:none; } }



/* Grouped navigation uses the existing sidebar palette and spacing. */
.sb-heading { margin: 16px 12px 6px; color: var(--d-muted); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.sb-advanced > summary { list-style: none; cursor: pointer; }
.sb-advanced > summary::-webkit-details-marker { display: none; }
.sb-advanced[open] > summary .sb-chev { transform: rotate(90deg); }
.sb-advanced-links { margin-left: 10px; padding-left: 6px; border-left: 1px solid var(--d-line); }
.sb-advanced > summary:focus-visible { outline: 2px solid var(--d-muted); outline-offset: -2px; }

/* Rounded navigation and lighter typography inspired by the sidebar reference. */
.sb .sb-pane { gap: 7px; }
.sb .sb-item {
  min-height: 46px;
  height: auto;
  padding: 10px 16px;
  border-radius: 999px;
  gap: 13px;
  font-family: "Satoshi", sans-serif;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -.35px;
  color: var(--d-text);
}
.sb .sb-item > i:first-child { flex: 0 0 22px; width: 22px; font-size: 17px; color: currentColor; }
.sb .sb-item span { min-width: 0; overflow-wrap: anywhere; }
.sb .sb-item.on, .sb .sb-advanced[open] > summary {
  background: var(--d-active);
  box-shadow: none;
  color: var(--d-text);
}
.sb .sb-item.on > i:first-child { color: currentColor; }
.sb .sb-item .sb-chev { font-size: 14px; color: currentColor; }
.sb .sb-advanced-links { margin: 3px 0 10px; padding: 0 0 0 38px; border: 0; }
.sb .sb-advanced-links .sb-item {
  min-height: 34px;
  padding: 5px 12px;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: -.15px;
  color: var(--d-muted);
}
.sb .sb-advanced-links .sb-item > i:first-child { display: none; }
.sb .sb-advanced-links .sb-item:hover, .sb .sb-advanced-links .sb-item.on { color: var(--d-text); }
.sb .sb-search { min-height: 46px; border-radius: 23px; padding: 0 14px; font-size: 15px; }
.sb .sb-look, .sb .sb-user { border-radius: 20px; }
.sb .sb-heading { margin: 14px 18px 8px; }
@media (max-width: 360px) {
  .sb .sb-item { padding-inline: 14px; font-size: 17px; }
  .sb .sb-advanced-links { padding-left: 30px; }
}

/* Carry the softer control shapes through dashboard forms. */
.dash-body .f-input { border-radius: 22px; }
.dash-body .f-input.ta { border-radius: 18px; }
.dash-body .f-input.sm { border-radius: 18px; }
.dash-body .btn-d { border-radius: 999px; font-weight: 500; letter-spacing: -.15px; }
.dash-body .f-label { font-size: 15.5px; letter-spacing: -.15px; }

/* Keep template actions accessible on narrow cards. */
.tpl-actions{flex-wrap:wrap}
.tp-frame{min-height:0}
