/* ---------- Auth ---------- */
.auth { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
.auth-form-side { display: grid; grid-template-rows: auto 1fr auto; padding: 28px clamp(24px, 6vw, 80px); }
.auth-logo img { height: 22px; width: auto; }
.auth-card { width: 100%; max-width: 380px; margin: auto; display: grid; gap: 22px; padding: 40px 0; animation: authIn 600ms var(--ease-out) both; }
@keyframes authIn { from { opacity: 0; transform: translateY(10px); } }
.auth-card h1 { font-size: 26px; letter-spacing: -0.03em; }
.auth-card .sub { color: var(--muted); margin-top: 6px; font-size: 14px; }
.auth-card form { display: grid; gap: 16px; }
.auth-alt { font-size: 13px; color: var(--muted); text-align: center; }
.auth-alt a { color: var(--text); font-weight: 500; } .auth-alt a:hover { text-decoration: underline; text-underline-offset: 3px; }
.auth-foot { font: 400 11px var(--mono); color: var(--faint); letter-spacing: .06em; }
.auth-art { position: relative; overflow: hidden; border-left: 1px solid var(--line); background: var(--obsidian); display: grid; place-items: center; }
.auth-art::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(236,230,216,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(236,230,216,.045) 1px, transparent 1px); background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 60% 60% at 50% 50%, #000, transparent 75%); mask-image: radial-gradient(ellipse 60% 60% at 50% 50%, #000, transparent 75%); }
.auth-art::after { content: ''; position: absolute; width: 600px; height: 600px; border-radius: 50%; background: radial-gradient(circle, rgba(255,77,46,.14), transparent 60%); filter: blur(10px); }
.art-stack { position: relative; z-index: 1; display: grid; justify-items: center; gap: 36px; text-align: center; padding: 40px; }
.art-mark { width: 120px; height: auto; animation: float 7s ease-in-out infinite; filter: drop-shadow(0 30px 40px rgba(0,0,0,.6)); }
@keyframes float { 50% { transform: translateY(-10px); } }
.art-quote { font: 600 22px/1.3 var(--font-display); letter-spacing: -0.02em; max-width: 340px; }
.art-quote span { color: var(--faint); }
.art-orbit { display: flex; gap: 10px; }
.art-orbit img { width: 34px; height: 34px; opacity: .9; animation: orbit 5s ease-in-out infinite; }
.art-orbit img:nth-child(2n) { animation-delay: -1.2s; } .art-orbit img:nth-child(3n) { animation-delay: -2.6s; }
@keyframes orbit { 50% { transform: translateY(-6px) rotate(-3deg); } }
@media (max-width: 900px) { .auth { grid-template-columns: 1fr; } .auth-art { display: none; } }
.pw-meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 2px; }
.pw-meter i { height: 3px; border-radius: 3px; background: var(--iron); transition: background var(--t); }
.pw-meter[data-s="1"] i:nth-child(-n+1) { background: var(--danger); }
.pw-meter[data-s="2"] i:nth-child(-n+2) { background: var(--warn); }
.pw-meter[data-s="3"] i:nth-child(-n+3) { background: #B6D65A; }
.pw-meter[data-s="4"] i { background: var(--success); }
.avail { font: 400 11.5px var(--mono); display: inline-flex; align-items: center; gap: 5px; }
.avail.ok { color: var(--success); } .avail.bad { color: #FF8A8D; } .avail.wait { color: var(--faint); }
.pw-toggle { color: var(--faint); padding: 4px; border-radius: 6px; } .pw-toggle:hover { color: var(--text); }
.form-error { display: none; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 9px; font-size: 13px; color: #FFB0B2; background: rgba(242,85,90,.08); box-shadow: 0 0 0 1px rgba(242,85,90,.2) inset; }
.form-error.show { display: flex; animation: errIn var(--t) var(--ease-out); }

/* ---------- Dashboard shell ---------- */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.side { position: sticky; top: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; gap: 6px; padding: 16px 12px; border-right: 1px solid var(--line); background: var(--obsidian); z-index: 30; }
.side-top { display: flex; align-items: center; justify-content: space-between; padding: 4px 8px 12px; }
.side-top img { height: 19px; width: auto; }
.me-card { display: flex; align-items: center; gap: 10px; padding: 9px; border-radius: 11px; background: var(--graphite); box-shadow: 0 0 0 1px var(--line) inset; margin-bottom: 6px; text-align: left; width: 100%; transition: box-shadow var(--t-fast); }
.me-card:hover { box-shadow: 0 0 0 1px var(--line-2) inset; }
.me-av { width: 32px; height: 32px; border-radius: 9px; object-fit: cover; flex: none; background: var(--iron); display: grid; place-items: center; font-weight: 600; font-size: 13px; }
.me-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-url { font: 400 11px var(--mono); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-card .ic:last-child { margin-left: auto; color: var(--faint); }
.nav-group { display: grid; gap: 1px; padding: 6px 0; }
.nav-label { padding: 8px 10px 6px; font: 500 10.5px var(--mono); color: var(--faint); letter-spacing: .12em; text-transform: uppercase; }
.nav-item { position: relative; display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; border-radius: 8px; font-size: 13px; font-weight: 500; color: var(--muted); transition: color var(--t-fast), background var(--t-fast); }
.nav-item:hover { color: var(--text); background: rgba(236,230,216,.04); }
.nav-item.active { color: var(--text); background: rgba(236,230,216,.07); }
.nav-item.active::before { content: ''; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 2px; border-radius: 2px; background: var(--signal); }
.nav-item .count { margin-left: auto; font: 400 11px var(--mono); color: var(--faint); }
.side-foot { margin-top: auto; display: grid; gap: 2px; padding-top: 10px; border-top: 1px solid var(--line); }
.cmdk-hint { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; border-radius: 8px; color: var(--muted); font-size: 13px; width: 100%; box-shadow: 0 0 0 1px var(--line) inset; margin-bottom: 4px; }
.cmdk-hint:hover { color: var(--text); box-shadow: 0 0 0 1px var(--line-2) inset; }
.cmdk-hint .kbd { margin-left: auto; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: none; position: sticky; top: 0; z-index: 25; height: 56px; align-items: center; gap: 10px; padding: 0 12px; border-bottom: 1px solid var(--line); background: rgba(10,10,11,.85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.topbar img { height: 18px; width: auto; }
.page { width: 100%; max-width: 1240px; margin: 0 auto; padding: 32px 36px 120px; animation: pageIn 420ms var(--ease-out) both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(6px); } }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; flex-wrap: wrap; }
.page-head h1 { font-size: 24px; letter-spacing: -0.03em; }
.page-head p { color: var(--muted); margin-top: 5px; font-size: 13.5px; }
.page-actions { display: flex; gap: 8px; align-items: center; }
.stack { display: grid; gap: 16px; }
.scrim { display: none; }
@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 272px; transform: translateX(-100%); transition: transform var(--t-slow) var(--ease-out); box-shadow: 20px 0 60px rgba(0,0,0,.6); }
  .shell.nav-open .side { transform: none; }
  .shell.nav-open .scrim { display: block; position: fixed; inset: 0; z-index: 29; background: rgba(0,0,0,.55); animation: fadeIn var(--t); }
  .topbar { display: flex; }
  .page { padding: 22px 16px 120px; }
}

/* ---------- Editor split ---------- */
.editor { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 28px; align-items: start; }
.editor-form { display: grid; gap: 16px; min-width: 0; }
.preview-col { position: sticky; top: 24px; display: grid; gap: 10px; }
.preview-head { display: flex; align-items: center; justify-content: space-between; }
.preview-head .label { font: 500 10.5px var(--mono); color: var(--faint); letter-spacing: .12em; text-transform: uppercase; display: flex; align-items: center; gap: 8px; }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px rgba(61,214,140,.15); }
.preview-frame { position: relative; height: min(720px, calc(100vh - 110px)); border-radius: 26px; overflow: hidden; background: #000; box-shadow: 0 0 0 1px var(--line-2), 0 0 0 7px var(--obsidian), 0 0 0 8px var(--line-2), 0 40px 80px -30px rgba(0,0,0,.9); transition: border-radius var(--t-slow) var(--ease-out); }
.preview-frame.desktop { border-radius: 12px; box-shadow: 0 0 0 1px var(--line-2), 0 40px 80px -30px rgba(0,0,0,.9); }
/* Desktop mode: render a real 1280×800 viewport, scaled to fit (see desktopFrame in ui.js). */
.preview-frame.desktop > div:not(.pv-bar) { position: absolute; left: 0; top: calc(var(--pv-bar-h, 30px)); width: 1280px; height: 800px; transform: scale(var(--pv-scale, .3)); transform-origin: 0 0; }
.preview-frame .pv-bar { display: none; }
.preview-frame.desktop .pv-bar { display: flex; position: absolute; inset: 0 0 auto; height: 30px; z-index: 3; align-items: center; gap: 6px; padding: 0 12px; background: var(--obsidian); border-bottom: 1px solid var(--line); }
.pv-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--iron); }
.pv-url { margin-left: 10px; flex: 1; max-width: 280px; height: 18px; display: flex; align-items: center; padding: 0 10px; border-radius: 6px; background: var(--void); font-size: 10.5px; color: var(--muted); overflow: hidden; white-space: nowrap; }
.editor.pv-desktop { grid-template-columns: minmax(0, 1fr) minmax(400px, 46%); }
.preview-frame .pf { position: absolute; inset: 0; overflow-y: auto; padding: 36px 14px; place-items: start center; }
.preview-frame .pf > .pf-wrap { margin: auto 0; }
.preview-frame.desktop .pf { padding: 56px 32px; }
@media (max-width: 1180px) { .editor { grid-template-columns: 1fr; } .preview-col { position: relative; top: 0; order: -1; } .preview-frame { height: 520px; } }
@media (max-width: 640px) { .preview-frame { height: 400px; border-radius: 20px; } .preview-head .seg { display: none; } }

.savebar { position: fixed; left: 50%; bottom: 22px; z-index: 45; display: flex; align-items: center; gap: 14px; padding: 8px 8px 8px 16px; border-radius: 14px;
  background: rgba(24,24,28,.96); box-shadow: var(--shadow-pop); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  transform: translate(-50%, 140%); opacity: 0; transition: transform 460ms var(--ease-out), opacity 300ms; font-size: 13px; }
.savebar.show { transform: translate(-50%, 0); opacity: 1; }
.savebar .sb-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 0 3px rgba(245,184,61,.15); }
@media (min-width: 961px) { .savebar { margin-left: 124px; } }
.savebar.shake { animation: shake 400ms var(--ease); }
@keyframes shake { 20%, 60% { transform: translate(calc(-50% - 6px), 0); } 40%, 80% { transform: translate(calc(-50% + 6px), 0); } }

/* Upload zones */
.uploads { display: grid; grid-template-columns: 132px 1fr; gap: 14px; }
@media (max-width: 560px) { .uploads { grid-template-columns: 1fr; } }
.drop { position: relative; display: grid; place-items: center; text-align: center; gap: 6px; padding: 14px; border-radius: 12px; background: var(--obsidian); border: 1px dashed var(--line-3); color: var(--muted); font-size: 12px; cursor: pointer; overflow: hidden; transition: border-color var(--t-fast), background var(--t-fast), color var(--t-fast); min-height: 132px; }
.drop:hover, .drop.over { border-color: rgba(236,230,216,.5); color: var(--text); background: var(--graphite); }
.drop.over { border-style: solid; }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop .drop-img { position: absolute; inset: 0; background: center/cover no-repeat; }
.drop.has-img { border-style: solid; border-color: var(--line-2); }
.drop.has-img .drop-txt { opacity: 0; position: relative; z-index: 1; padding: 6px 10px; border-radius: 8px; background: rgba(0,0,0,.7); color: #fff; transition: opacity var(--t-fast); }
.drop.has-img:hover .drop-txt { opacity: 1; }
.drop.avatar { aspect-ratio: 1; min-height: 0; border-radius: 50%; }
.drop .drop-bar { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--ivory); width: 0; transition: width 120ms linear; z-index: 2; }
.drop-actions { display: flex; gap: 6px; margin-top: 8px; }
.file-row { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 11px; background: var(--obsidian); box-shadow: 0 0 0 1px var(--line) inset; }
.file-row .fr-ic { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; background: var(--slate); color: var(--ivory); flex: none; }
.file-row .fr-name { font-size: 13px; font-weight: 500; } .file-row .fr-sub { font-size: 12px; color: var(--muted); }
.file-row .btn:first-of-type { margin-left: auto; }

/* Links list */
.links { display: grid; gap: 6px; }
.link-row { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto auto auto; align-items: center; gap: 12px; padding: 10px 10px 10px 6px; border-radius: 12px; background: var(--obsidian); box-shadow: 0 0 0 1px var(--line) inset; transition: box-shadow var(--t-fast), background var(--t-fast), transform 180ms var(--ease-out), opacity var(--t-fast); }
.link-row:hover { box-shadow: 0 0 0 1px var(--line-2) inset; }
.link-row.dragging { opacity: .9; background: var(--graphite); box-shadow: 0 0 0 1px var(--line-3) inset, 0 20px 40px -10px rgba(0,0,0,.7); z-index: 5; position: relative; }
.link-row.disabled .lr-main { opacity: .45; }
.lr-grip { color: var(--faint); cursor: grab; padding: 6px 2px; border-radius: 6px; touch-action: none; }
.lr-grip:hover { color: var(--text); } .lr-grip:active { cursor: grabbing; }
.lr-ic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--slate); color: var(--ivory); }
.lr-main { min-width: 0; }
.lr-label { font-weight: 500; font-size: 13.5px; display: flex; align-items: center; gap: 8px; }
.lr-url { font: 400 12px var(--mono); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 560px) { .link-row { grid-template-columns: auto auto minmax(0, 1fr) auto auto; } .link-row .lr-clicks { display: none; } }
.lr-clicks { font: 400 11.5px var(--mono); color: var(--faint); }

/* Overview */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border-radius: 14px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
.kpi { background: var(--obsidian); padding: 18px 20px; display: grid; gap: 6px; }
.kpi .k-label { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.kpi .k-val { font: 600 26px var(--font-display); letter-spacing: -0.03em; }
.kpi .k-delta { font: 400 11.5px var(--mono); color: var(--faint); }
.kpi .k-delta.up { color: var(--success); } .kpi .k-delta.down { color: #FF8A8D; }
@media (max-width: 860px) { .kpis { grid-template-columns: 1fr 1fr; } }
.hero-link { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: 14px; background: linear-gradient(120deg, rgba(255,77,46,.08), transparent 50%), var(--obsidian); box-shadow: 0 0 0 1px var(--line) inset; flex-wrap: wrap; }
.hero-link .hl-url { font: 400 17px var(--mono); letter-spacing: -0.01em; }
.hero-link .hl-url b { font-weight: 400; color: var(--muted); }
.hero-link .hl-actions { margin-left: auto; display: flex; gap: 6px; }
.split-2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 960px) { .split-2 { grid-template-columns: 1fr; } }
.checklist { display: grid; }
.check-item { display: flex; align-items: center; gap: 12px; padding: 11px 18px; font-size: 13px; transition: background var(--t-fast); }
.check-item + .check-item { border-top: 1px solid var(--line); }
.check-item:hover { background: rgba(236,230,216,.02); }
.check-item .ci-box { width: 18px; height: 18px; border-radius: 6px; box-shadow: 0 0 0 1.5px var(--line-3) inset; display: grid; place-items: center; flex: none; color: #0A0A0B; }
.check-item.done .ci-box { background: var(--ivory); box-shadow: none; }
.check-item.done .ci-text { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--faint); }
.check-item .ic:last-child { margin-left: auto; color: var(--faint); }
.progress { height: 4px; border-radius: 4px; background: var(--iron); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--ivory); border-radius: 4px; transition: width 800ms var(--ease-out); }

/* Charts */
.chart { position: relative; width: 100%; height: 240px; }
.chart svg { width: 100%; height: 100%; overflow: visible; }
.chart .grid-line { stroke: var(--line); stroke-width: 1; }
.chart .axis { font: 400 10.5px var(--mono); fill: var(--faint); }
.chart .area-v { fill: url(#gv); } .chart .line-v { fill: none; stroke: var(--ivory); stroke-width: 1.6; }
.chart .line-c { fill: none; stroke: var(--signal); stroke-width: 1.6; stroke-dasharray: 3 3; }
.chart .hover-line { stroke: var(--line-3); stroke-width: 1; }
.chart .hover-dot { fill: var(--void); stroke-width: 2; }
.chart-tip { position: absolute; pointer-events: none; padding: 8px 10px; border-radius: 9px; background: rgba(24,24,28,.97); box-shadow: var(--shadow-pop); font-size: 12px; white-space: nowrap; transform: translate(-50%, -110%); transition: left 60ms linear; }
.chart-tip .ct-day { font: 400 10.5px var(--mono); color: var(--muted); margin-bottom: 4px; }
.chart-tip .ct-row { display: flex; align-items: center; gap: 7px; } .chart-tip .ct-row b { margin-left: auto; padding-left: 14px; font-weight: 600; }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 2px; border-radius: 2px; background: var(--ivory); } .legend i.c { background: var(--signal); }
.bar-list { display: grid; }
.bar-item { position: relative; display: flex; align-items: center; gap: 10px; padding: 10px 18px; font-size: 13px; }
.bar-item + .bar-item { border-top: 1px solid var(--line); }
.bar-item .bi-fill { position: absolute; left: 0; top: 4px; bottom: 4px; border-radius: 0 6px 6px 0; background: rgba(236,230,216,.05); transition: width 900ms var(--ease-out); }
.bar-item > *:not(.bi-fill) { position: relative; }
.bar-item .bi-val { margin-left: auto; font: 400 12.5px var(--mono); color: var(--text-2); }
.spark { height: 44px; width: 100%; }

/* Badges page */
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.badge-grid.owned { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.bcard { position: relative; display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: 13px; background: var(--obsidian); box-shadow: 0 0 0 1px var(--line) inset; transition: box-shadow var(--t), transform var(--t) var(--ease-out); }
.bcard:hover { box-shadow: 0 0 0 1px color-mix(in srgb, var(--bc) 35%, transparent) inset, 0 12px 30px -16px color-mix(in srgb, var(--bc) 50%, transparent); }
.bcard img { width: 46px; height: 46px; flex: none; transition: transform 500ms var(--spring); }
.bcard:hover img { transform: rotate(-6deg) scale(1.08); }
.bcard .bc-name { font-weight: 600; font-size: 13.5px; }
.bcard .bc-desc { font-size: 12px; color: var(--muted); margin-top: 2px; }
.bcard.locked img { filter: grayscale(1) brightness(.45); }
.bcard.locked .bc-name { color: var(--muted); }
.bcard .bc-actions { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.bcard.hidden-b img { opacity: .4; }

/* Tables */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; font: 500 10.5px var(--mono); color: var(--faint); letter-spacing: .1em; text-transform: uppercase; padding: 10px 18px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 11px 18px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background var(--t-fast); cursor: pointer; }
.table tbody tr:hover { background: rgba(236,230,216,.025); }
.u-cell { display: flex; align-items: center; gap: 10px; }
.u-cell .me-av { width: 28px; height: 28px; border-radius: 8px; font-size: 12px; }
.mini-badges { display: flex; gap: 3px; } .mini-badges img { width: 16px; height: 16px; }
.pager { display: flex; justify-content: space-between; align-items: center; padding: 12px 18px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.grant-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.grant { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 10px; background: var(--obsidian); box-shadow: 0 0 0 1px var(--line) inset; font-size: 12.5px; text-align: left; transition: box-shadow var(--t-fast), background var(--t-fast); }
.grant img { width: 22px; height: 22px; } .grant:hover { box-shadow: 0 0 0 1px var(--line-3) inset; }
.grant[aria-pressed=true] { background: var(--slate); box-shadow: 0 0 0 1px var(--ivory) inset; }
.grant[aria-pressed=false] img { filter: grayscale(1) brightness(.6); }

/* Security */
.sess { display: flex; align-items: center; gap: 14px; }
.sess .s-ic { width: 36px; height: 36px; border-radius: 10px; background: var(--slate); display: grid; place-items: center; color: var(--text-2); flex: none; }
.qr-wrap { display: grid; place-items: center; padding: 14px; background: var(--ivory); border-radius: 14px; width: fit-content; margin: 0 auto; }
.secret { font: 500 12.5px var(--mono); letter-spacing: .05em; padding: 10px 12px; border-radius: 9px; background: var(--obsidian); box-shadow: 0 0 0 1px var(--line) inset; display: flex; align-items: center; justify-content: space-between; gap: 10px; word-break: break-all; }
.steps { display: grid; gap: 4px; font-size: 13px; color: var(--text-2); padding-left: 18px; margin: 0; }
.vis-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (max-width: 640px) { .vis-tiles { grid-template-columns: 1fr; } }
.vis-tile { display: grid; gap: 6px; padding: 14px; border-radius: 12px; text-align: left; background: var(--obsidian); box-shadow: 0 0 0 1px var(--line-2) inset; transition: box-shadow var(--t-fast); }
.vis-tile:hover { box-shadow: 0 0 0 1px var(--line-3) inset; }
.vis-tile[aria-pressed=true] { box-shadow: 0 0 0 1.5px var(--ivory) inset; background: var(--graphite); }
.vis-tile .vt-head { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13.5px; }
.vis-tile p { font-size: 12.5px; color: var(--muted); }
.danger-zone { box-shadow: 0 0 0 1px rgba(242,85,90,.2) inset; border: 0; }

/* Command palette */
.cmdk { padding: 0 !important; max-width: 560px !important; }
.cmdk-input { display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--line); color: var(--muted); }
.cmdk-input input { flex: 1; height: 52px; border: 0; background: transparent; outline: none; font-size: 15px; color: var(--text); }
.cmdk-list { max-height: 340px; overflow: auto; padding: 6px; }
.cmdk-list .menu-item { height: 38px; }
.cmdk-list .menu-item.active { background: rgba(236,230,216,.08); color: var(--text); }
.cmdk-empty { padding: 26px; text-align: center; color: var(--muted); font-size: 13px; }
.cmdk-foot { display: flex; gap: 14px; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--faint); }
.cmdk-foot span { display: inline-flex; gap: 6px; align-items: center; }

.boot { min-height: 100vh; display: grid; place-items: center; }
.boot img { width: 34px; animation: bootPulse 1.2s ease-in-out infinite; }
@keyframes bootPulse { 50% { opacity: .35; transform: scale(.94); } }
.font-sample { font-size: 22px; line-height: 1; color: var(--text); }
.preset-art { width: 100%; height: 100%; display: grid; place-items: center; }
.preset-art i { width: 46%; height: 52%; border-radius: 6px; display: block; }

/* ---------- Premium ---------- */
.pro-tag { display: inline-flex; align-items: center; gap: 4px; height: 18px; padding: 0 6px; border-radius: 5px; font: 600 9.5px var(--mono); letter-spacing: .08em; color: #F8CB6E; background: rgba(245,184,61,.1); box-shadow: 0 0 0 1px rgba(245,184,61,.28) inset; vertical-align: middle; }
.pro-tag.owned { color: var(--success); background: rgba(61,214,140,.08); box-shadow: 0 0 0 1px rgba(61,214,140,.22) inset; }
.locked-ctl { position: relative; }
.locked-ctl > :not(.lock-veil) { opacity: .45; pointer-events: none; filter: grayscale(.4); }
.lock-veil { position: absolute; inset: 0; z-index: 2; cursor: pointer; border-radius: 10px; }
.lock-veil:hover { background: rgba(245,184,61,.04); box-shadow: 0 0 0 1px rgba(245,184,61,.25) inset; }
.upsell-perks { display: grid; gap: 8px; font-size: 13px; color: var(--text-2); }
.upsell-perks div { display: flex; gap: 9px; align-items: center; } .upsell-perks .ic { color: var(--success); }
.btn-signal .ic { color: #fff; }
.rows.flush { margin: 0 -18px -18px; border-top: 1px solid var(--line); }
.rows.boxed { margin: 0; border: 0; border-radius: 11px; box-shadow: 0 0 0 1px var(--line) inset; }
.rows.boxed > .row { padding: 12px 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 36px; padding: 5px 8px; border-radius: 9px; background: var(--obsidian); border: 1px solid var(--line-2); cursor: text; }
.chips:focus-within { border-color: rgba(236,230,216,.4); }
.chips input { flex: 1; min-width: 120px; border: 0; background: transparent; outline: none; height: 24px; color: var(--text); }
.chip { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 4px 0 9px; border-radius: 6px; background: var(--iron); font-size: 12.5px; }
.chip button { color: var(--muted); padding: 2px; border-radius: 4px; display: grid; } .chip button:hover { color: var(--text); background: rgba(255,255,255,.06); }
.bio-row { display: flex; gap: 6px; align-items: center; }
.preview-tab { display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px; border-radius: 9px 9px 0 0; background: var(--graphite); box-shadow: 0 0 0 1px var(--line) inset; font-size: 12px; color: var(--text-2); max-width: 260px; margin-bottom: -10px; position: relative; z-index: 1; justify-self: start; margin-left: 18px; }
.preview-tab img { width: 14px; height: 14px; border-radius: 3px; object-fit: cover; }
.preview-tab span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-lock { color: #F8CB6E; margin-left: 4px; vertical-align: -1px; display: inline; }
.adv { border-radius: 11px; box-shadow: 0 0 0 1px var(--line) inset; padding: 10px 14px; }
.adv summary { cursor: pointer; display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--text-2); list-style: none; }
.adv summary::-webkit-details-marker { display: none; }
.adv[open] summary { color: var(--text); }
.link-row { grid-template-columns: auto auto auto minmax(0, 1fr) auto auto auto; }
.lr-check { width: 15px; height: 15px; accent-color: var(--ivory); margin-left: 6px; cursor: pointer; }
.heading-row { background: transparent; box-shadow: 0 0 0 1px var(--line) inset; border-style: dashed; }
.heading-row .lr-label { font: 500 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--text-2); }
.sec-mark { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--slate); color: var(--muted); }
.lr-label .tag { font-family: var(--font); letter-spacing: 0; text-transform: none; }
.bulk-bar { display: none; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 10px; background: var(--graphite); box-shadow: 0 0 0 1px var(--line-2) inset; font-size: 12.5px; color: var(--text-2); }
.bulk-bar.show { display: flex; animation: errIn var(--t) var(--ease-out); }
.bulk-bar > span { margin-right: auto; }
.input-sm { height: 30px; font-size: 12.5px; }
@media (max-width: 560px) { .link-row { grid-template-columns: auto auto auto minmax(0, 1fr) auto auto; } }
.sec-ic { background: transparent !important; box-shadow: 0 0 0 1px var(--line-2) inset; color: var(--muted) !important; }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 1000px) { .plans { grid-template-columns: 1fr; } }
.plan { position: relative; display: grid; grid-template-rows: auto auto 1fr auto; gap: 16px; padding: 22px; border-radius: 16px; background: var(--obsidian); box-shadow: 0 0 0 1px var(--line) inset; }
.plan.featured { background: linear-gradient(170deg, rgba(255,77,46,.09), transparent 45%), var(--obsidian); box-shadow: 0 0 0 1px rgba(255,77,46,.35) inset, 0 20px 50px -30px rgba(255,77,46,.6); }
.plan.current { box-shadow: 0 0 0 1px rgba(61,214,140,.35) inset; }
.plan-flag { position: absolute; top: -10px; right: 18px; padding: 3px 9px; border-radius: 6px; font: 600 10px var(--mono); letter-spacing: .1em; text-transform: uppercase; background: var(--signal); color: #fff; }
.plan-name { font-weight: 600; font-size: 15px; display: flex; gap: 8px; align-items: center; }
.plan-price b { font: 600 34px var(--font-display); letter-spacing: -0.03em; }
.plan-price span { color: var(--muted); font-size: 13px; margin-left: 6px; }
.plan-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; font-size: 13px; color: var(--text-2); align-content: start; }
.plan-list li { display: flex; gap: 9px; align-items: flex-start; } .plan-list .ic { color: var(--success); margin-top: 2px; }
.addons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 760px) { .addons { grid-template-columns: 1fr; } }
.addon { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: 12px; box-shadow: 0 0 0 1px var(--line) inset; }
.addon-ic { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--slate); color: var(--ivory); flex: none; }
.addon-name { font-weight: 600; font-size: 13.5px; } .addon-desc { font-size: 12.5px; color: var(--muted); } .addon-own { font: 400 11px var(--mono); color: var(--faint); margin-top: 3px; }
.addon-buy { display: grid; gap: 6px; justify-items: end; } .addon-buy b { font: 600 16px var(--font-display); }
.kpis.flat { border-radius: 0 0 14px 14px; box-shadow: none; }
.pay-list { display: grid; gap: 8px; }
.pay-opt { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; text-align: left; background: var(--obsidian); box-shadow: 0 0 0 1px var(--line-2) inset; transition: box-shadow var(--t-fast), background var(--t-fast); }
.pay-opt:hover { box-shadow: 0 0 0 1px var(--line-3) inset; background: var(--slate); }
.pay-opt > span:nth-child(2) { flex: 1; display: grid; } .pay-opt b { font-weight: 600; font-size: 13.5px; } .pay-opt small { color: var(--muted); font-size: 12px; }
.pay-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--iron); color: var(--ivory); }
.pay-opt.is-loading::after { content: ''; position: absolute; right: 14px; width: 16px; height: 16px; border-radius: 50%; border: 1.6px solid rgba(236,230,216,.2); border-top-color: var(--ivory); animation: spin .7s linear infinite; }
.pay-opt.is-loading > .ic:last-child { opacity: 0; }
.celebrate { position: fixed; left: 50%; top: 55%; z-index: 1400; pointer-events: none; }
.celebrate i { position: absolute; width: 8px; height: 12px; border-radius: 2px; animation: conf 1.8s var(--ease-out) var(--d) both; }
@keyframes conf { 0% { transform: translate(0,0) rotate(0); opacity: 1; } 100% { transform: translate(var(--x), calc(var(--y) + 420px)) rotate(var(--r)); opacity: 0; } }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 160px; }
.bar-col { flex: 1; height: 100%; display: flex; align-items: flex-end; border-radius: 3px; cursor: default; }
.bar-col i { display: block; width: 100%; border-radius: 3px 3px 1px 1px; transition: height 700ms var(--ease-out); }
.bar-col:hover i { filter: brightness(1.2); }
.shortcuts { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.shortcut { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 11px; box-shadow: 0 0 0 1px var(--line) inset; font-size: 13px; font-weight: 500; transition: box-shadow var(--t-fast), background var(--t-fast); }
.shortcut:hover { box-shadow: 0 0 0 1px var(--line-3) inset; background: var(--graphite); }
.shortcut .ic:last-child { margin-left: auto; color: var(--faint); }
.o-sec { display: grid; gap: 10px; }
.o-sec-title { font: 500 10.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.row-inline { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; }
.row-inline .select-trigger { width: 200px; }
.stepper { display: flex; align-items: center; justify-content: space-between; font-size: 13px; }
.stepper > div { display: flex; align-items: center; gap: 8px; }
.stepper b { min-width: 20px; text-align: center; }
.action-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.studio { display: grid; grid-template-columns: 220px 1fr; gap: 24px; align-items: start; }
@media (max-width: 760px) { .studio { grid-template-columns: 1fr; } }
.studio-stage { display: grid; justify-items: center; gap: 14px; padding: 22px; border-radius: 14px; background: radial-gradient(circle at 50% 40%, rgba(255,255,255,.04), transparent 70%), var(--void); box-shadow: 0 0 0 1px var(--line) inset; }
.studio-sizes { display: flex; gap: 12px; align-items: center; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 900px) { .grid-4 { grid-template-columns: 1fr 1fr; } }
.banner { display: flex; align-items: center; gap: 10px; padding: 10px 16px; font-size: 13px; border-bottom: 1px solid var(--line); background: rgba(236,230,216,.04); }
.banner.success { background: rgba(61,214,140,.08); color: #9BEFC6; } .banner.warn { background: rgba(245,184,61,.08); color: #F8CB6E; }
.banner .ic { flex: none; }
.plan-card { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 14px; box-shadow: 0 0 0 1px var(--line) inset; background: linear-gradient(120deg, rgba(245,184,61,.06), transparent 55%), var(--obsidian); }
.plan-card img { width: 44px; height: 44px; }
.plan-card .pc-name { font-weight: 600; } .plan-card .pc-sub { font-size: 12.5px; color: var(--muted); }
.plan-card .btn { margin-left: auto; }
.heat { display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; }
.heat i { aspect-ratio: 1; border-radius: 3px; background: var(--ivory); }
.heat-labels { display: flex; justify-content: space-between; font: 400 10px var(--mono); color: var(--faint); margin-top: 6px; }
.kbd-list { display: grid; gap: 8px; font-size: 13px; }
.kbd-list div { display: flex; justify-content: space-between; align-items: center; }
.nav-pro { margin-left: auto; font: 600 9.5px var(--mono); letter-spacing: .06em; text-transform: uppercase; padding: 2px 6px; border-radius: 5px; color: #F8CB6E; background: rgba(245,184,61,.1); }
.split-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: start; }
@media (max-width: 960px) { .split-3 { grid-template-columns: 1fr; } }
.teaser-blur { filter: blur(3px); opacity: .6; pointer-events: none; }
.page-actions .btn .pro-tag { margin-left: 2px; }
html.pref-compact .page { padding-top: 22px; }
html.pref-compact .panel-head { padding: 12px 16px; } html.pref-compact .panel-body { padding: 14px 16px; gap: 12px; }
html.pref-compact .rows > .row { padding: 10px 16px; } html.pref-compact .stack { gap: 12px; }
html.pref-calm *, html.pref-calm *::before, html.pref-calm *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; }
html.pref-calm .preview-frame * { animation-duration: revert !important; transition-duration: revert !important; }
.side > nav { flex: 1; min-height: 0; overflow-y: auto; margin: 0 -12px; padding: 0 12px; scrollbar-width: thin; }
.side > nav .nav-item.active::before { left: 0; }
.side-foot { margin-top: 0; flex: none; }

/* ===== Decorations ===== */
.dc-av { position: relative; width: var(--dc-size, 96px); height: var(--dc-size, 96px); flex: none; }
.dc-av-img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: var(--slate); display: block; }
.dc-av-fb { display: grid; place-items: center; font: 600 calc(var(--dc-size, 96px) * .38) var(--font-display); color: var(--text-2); background: linear-gradient(150deg, var(--iron), var(--graphite)); }
.dc-av-deco { position: absolute; left: -10%; top: -10%; width: 120%; height: 120%; max-width: none; pointer-events: none; user-select: none; }
.dc-av.img-failed .dc-av-deco { display: none; }
.dc-current-body { display: flex; align-items: center; gap: 22px; padding: 22px 24px; }
.dc-current .dc-av { margin: 6px; }
.dc-current-text { min-width: 0; flex: 1; display: grid; gap: 2px; }
.dc-current-name { font: 600 var(--fs-lg)/1.25 var(--font-display); letter-spacing: -.015em; }
.dc-current-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.dc-browser { display: grid; gap: 14px; }
.dc-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dc-toolbar > .muted { margin-left: auto; }
.dc-search-wrap { position: relative; flex: 1 1 260px; max-width: 420px; display: flex; align-items: center; color: var(--muted); }
.dc-search-wrap > svg { position: absolute; left: 11px; pointer-events: none; }
.dc-search-wrap .input { padding-left: 32px; padding-right: 34px; height: 34px; width: 100%; }
.dc-search-wrap kbd { position: absolute; right: 8px; font: 500 10.5px var(--mono); color: var(--faint); border: 1px solid var(--line-2); border-radius: 5px; padding: 1px 5px; }
.dc-toolbar .btn[aria-pressed=true] { color: var(--text); background: var(--slate); box-shadow: 0 0 0 1px var(--line-3) inset; }
.dc-chips { display: flex; gap: 6px; overflow-x: auto; padding: 2px 1px 6px; scrollbar-width: thin; mask-image: linear-gradient(90deg, #000 92%, transparent); }
.dc-chip { flex: none; display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 11px; border-radius: 999px; border: 0; background: var(--obsidian); color: var(--text-2); font: 500 var(--fs-sm) var(--font); box-shadow: 0 0 0 1px var(--line) inset; cursor: pointer; transition: background var(--t-fast), color var(--t-fast), box-shadow var(--t-fast); white-space: nowrap; }
.dc-chip span { font: 500 10.5px var(--mono); color: var(--faint); }
.dc-chip:hover { color: var(--text); box-shadow: 0 0 0 1px var(--line-3) inset; }
.dc-chip[aria-selected=true] { background: var(--ivory); color: var(--void); box-shadow: none; }
.dc-chip[aria-selected=true] span { color: rgba(10,10,11,.55); }
.dc-chip:focus-visible { outline: none; box-shadow: var(--focus); }
.dc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; }
.dc-grid > .empty { grid-column: 1 / -1; }
.dc-skel { aspect-ratio: 1 / 1.22; border-radius: var(--r-lg); }
.dc-tile { position: relative; display: grid; justify-items: center; align-content: start; gap: 2px; padding: 14px 10px 12px; border: 0; border-radius: var(--r-lg); background: var(--obsidian); box-shadow: 0 0 0 1px var(--line) inset; color: var(--text); cursor: pointer; text-align: center; transition: background var(--t-fast), box-shadow var(--t-fast), transform var(--t) var(--ease-out); }
.dc-tile:hover { background: var(--graphite); box-shadow: 0 0 0 1px var(--line-3) inset; transform: translateY(-1px); }
.dc-tile:focus-visible { outline: none; box-shadow: var(--focus); }
.dc-tile-art { position: relative; width: 84px; aspect-ratio: 1; margin-bottom: 8px; display: grid; place-items: center; }
.dc-tile-ring { position: absolute; inset: 10%; border-radius: 50%; background: radial-gradient(circle at 50% 40%, var(--iron), var(--slate) 70%) center / cover no-repeat; box-shadow: 0 0 0 1px var(--line) inset; }
.dc-tile-ring[style] { opacity: .9; }
.dc-tile-img { position: relative; width: 100%; height: 100%; object-fit: contain; }
.dc-tile.img-failed .dc-tile-img { visibility: hidden; }
.dc-tile.img-failed .dc-tile-ring::after { content: 'Image unavailable'; position: absolute; inset: 0; display: grid; place-items: center; font-size: 10px; color: var(--faint); text-align: center; }
.dc-tile-name { font-size: var(--fs-sm); font-weight: 500; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dc-tile-coll { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.dc-eq { position: absolute; top: 8px; right: 8px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: var(--ivory); color: var(--void); }
.dc-more[hidden] { display: none; }
.dc-modal { width: min(460px, calc(100vw - 24px)); }
.dc-stage { display: flex; align-items: center; justify-content: center; gap: 30px; padding: 30px 10px 18px; border-radius: var(--r-lg); background: radial-gradient(120% 90% at 50% 0%, var(--graphite), var(--obsidian)); box-shadow: 0 0 0 1px var(--line) inset; }
.dc-stage-small { display: grid; gap: 18px; justify-items: center; }
.dc-p-meta { display: grid; gap: 2px; text-align: center; margin-top: 14px; }
.dc-p-name { font: 600 var(--fs-md) var(--font-display); }
.dc-p-nav { display: flex; align-items: center; gap: 2px; margin-right: auto; }
@media (max-width: 640px) {
  .dc-current-body { flex-wrap: wrap; gap: 14px; padding: 18px; }
  .dc-current-actions { width: 100%; }
  .dc-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
  .dc-tile-art { width: 68px; }
  .dc-toolbar > .muted { margin-left: 0; width: 100%; }
  .dc-stage { gap: 18px; }
  .dc-stage .dc-av:first-child { --dc-size: 120px !important; }
}
@media (prefers-reduced-motion: reduce) { .dc-tile:hover { transform: none; } }

/* Appearance: decoration summary + custom cursor */
.deco-now { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 12px; background: var(--obsidian); box-shadow: 0 0 0 1px var(--line) inset; }
.deco-now > div:nth-child(2) { flex: 1; min-width: 0; }
.deco-now-av { position: relative; width: 44px; height: 44px; flex: none; margin: 4px; }
.deco-now-av > img:first-child, .deco-now-av > i { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; background: var(--slate); }
.deco-now-img { position: absolute; left: -10%; top: -10%; width: 120%; height: 120%; }
.cursor-box { display: grid; gap: 12px; padding: 14px; border-radius: 12px; background: var(--void); box-shadow: 0 0 0 1px var(--line) inset; }
.cursor-box[hidden] { display: none; }
.drop.drop-cursor { min-height: 104px; }
.drop.drop-cursor .drop-img { background-size: auto; background-repeat: no-repeat; background-position: center; image-rendering: auto; }
@media (max-width: 640px) { .deco-now { flex-wrap: wrap; } .deco-now .btn { width: 100%; justify-content: center; } }
.small { font-size: var(--fs-sm); }
.kpis.kpis-3 { grid-template-columns: repeat(3, 1fr); } @media (max-width: 640px) { .kpis.kpis-3 { grid-template-columns: 1fr; } }

/* ===== Plan chip (icon + plan name) ===== */
.tier-chip { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 999px; font: 600 10.5px var(--font); letter-spacing: .02em; white-space: nowrap;
  background: rgba(10,10,11,.72); color: var(--text-2); box-shadow: 0 0 0 1px var(--line-3) inset; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.tier-chip.t1 { color: #F5C66A; box-shadow: 0 0 0 1px rgba(245,184,61,.35) inset; }
.tier-chip.t2 { color: #D3B8FF; box-shadow: 0 0 0 1px rgba(201,166,255,.38) inset; }
.tier-chip.owned::after { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--success); margin-left: 1px; }
.tier-chip.feat { color: var(--ivory); }
.tier-chip.hid { color: var(--danger); }

/* ===== Mini preview (template thumbnails) ===== */
.mp { position: absolute; inset: 0; overflow: hidden; isolation: isolate; font-family: var(--mp-font), var(--font); container-type: size; }
.mp-bg { position: absolute; inset: -6%; background: #0A0A0B center / cover no-repeat; z-index: -3; }
.mp-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.mp-dim { position: absolute; inset: 0; background: #000; z-index: -1; }
.mp-card { position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: 58%; padding: 7cqh 6cqw 6cqh; display: grid; justify-items: center; gap: 2.6cqh; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.mp-card.l-minimal, .mp-card.l-stack { background: none !important; box-shadow: none !important; backdrop-filter: none; }
.mp-card.l-split { width: 78%; grid-template-columns: auto 1fr; align-items: center; justify-items: start; gap: 5cqw; }
.mp-card.l-split .mp-side { display: grid; justify-items: center; gap: 2cqh; } .mp-card.l-split .mp-main { display: grid; gap: 3cqh; width: 100%; }
.mp-card.free { inset: 0; translate: none; width: auto; padding: 0; background: none !important; box-shadow: none !important; backdrop-filter: none; display: block; }
.mp-fb { position: absolute; translate: -50% -50%; }
.mp-av { position: relative; width: 18cqh; aspect-ratio: 1; border-radius: 50%; background: linear-gradient(150deg, color-mix(in srgb, var(--mp-accent) 50%, #111), #111); display: grid; place-items: center; color: var(--mp-text); font-weight: 600; font-size: 7cqh; }
.mp-av > img:first-child { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.mp-av.s-squircle { border-radius: 30%; } .mp-av.s-square { border-radius: 14%; }
.mp-av.ring { box-shadow: 0 0 0 1.5px var(--mp-accent), 0 0 0 3px rgba(0,0,0,.4); }
.mp-deco { position: absolute; left: -10%; top: -10%; width: 120%; height: 120%; }
.mp-name { color: var(--mp-text); font-weight: 600; font-size: 6.4cqh; letter-spacing: -.02em; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.mp-name.grad { -webkit-background-clip: text; background-clip: text; color: transparent; }
.mp-bio { display: grid; gap: 1.4cqh; justify-items: center; width: 100%; }
.mp-bio i { display: block; height: 1.6cqh; border-radius: 9px; background: var(--mp-muted); opacity: .45; width: 80%; } .mp-bio i + i { width: 56%; }
.mp-links { display: flex; gap: 2.4cqw; justify-content: center; width: 100%; flex-wrap: wrap; }
.mp-links i { display: block; }
.mp-links.ls-icons i { width: 5.6cqh; height: 5.6cqh; border-radius: 50%; background: var(--mp-text); opacity: .75; }
.mp-links.ls-pills { flex-direction: column; align-items: center; gap: 1.8cqh; } .mp-links.ls-pills i { width: 86%; height: 5.4cqh; border-radius: 99px; background: color-mix(in srgb, var(--mp-text) 14%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--mp-text) 16%, transparent) inset; }
.mp-links.ls-buttons { flex-direction: column; align-items: center; gap: 1.8cqh; } .mp-links.ls-buttons i { width: 92%; height: 6.4cqh; border-radius: 1.6cqh; background: var(--mp-accent); } .mp-links.ls-buttons i + i { background: color-mix(in srgb, var(--mp-text) 14%, transparent); }

/* ===== Templates ===== */
.tp-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.tp-toolbar .dc-search-wrap { flex: 1 1 220px; }
.tp-toolbar .select-trigger { min-width: 140px; height: 34px; }
.tp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.tp-grid > .empty { grid-column: 1 / -1; }
.tp-skel { aspect-ratio: 4 / 4.2; border-radius: var(--r-lg); }
.tp-card { position: relative; border-radius: var(--r-lg); background: var(--obsidian); box-shadow: 0 0 0 1px var(--line) inset; overflow: hidden; cursor: pointer; transition: box-shadow var(--t-fast), transform var(--t) var(--ease-out); }
.tp-card:hover { box-shadow: 0 0 0 1px var(--line-3) inset, 0 20px 40px -24px rgba(0,0,0,.9); transform: translateY(-2px); }
.tp-card:focus-visible { outline: none; box-shadow: var(--focus); }
.tp-card.is-hidden { opacity: .6; }
.tp-thumb { position: relative; aspect-ratio: 16 / 11; border-bottom: 1px solid var(--line); }
.tp-badges { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; z-index: 2; }
.tp-body { padding: 12px 14px 14px; display: grid; gap: 6px; }
.tp-title-row { display: flex; align-items: center; gap: 10px; }
.tp-name { flex: 1; min-width: 0; font: 600 var(--fs-md)/1.25 var(--font-display); letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-locked { color: var(--text-2); gap: 5px; }
.tp-meta { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); min-width: 0; }
.tp-meta img, .tp-meta > i { width: 16px; height: 16px; border-radius: 50%; object-fit: cover; background: var(--iron); flex: none; }
.dotsep { width: 2px; height: 2px; border-radius: 50%; background: var(--faint); flex: none; }
.tp-modal { width: min(1040px, calc(100vw - 24px)); }
.tp-preview { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.tp-preview-stage { display: grid; gap: 10px; }
.tp-preview-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tp-frame { height: min(560px, calc(100vh - 260px)); }
.tp-preview-info { display: grid; gap: 14px; align-content: start; }
.tp-desc { margin: 0; color: var(--text-2); line-height: 1.6; white-space: pre-line; }
.tp-info-row { display: grid; gap: 6px; justify-items: start; }
.tp-includes { font-size: var(--fs-sm); color: var(--text-2); }
.tp-req ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; font-size: var(--fs-sm); color: var(--text-2); }
.tp-req li { display: flex; align-items: center; gap: 6px; }
.tp-pub { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 18px; align-items: start; }
.tp-pub-thumb { position: relative; aspect-ratio: 4 / 5; border-radius: var(--r-md); overflow: hidden; box-shadow: 0 0 0 1px var(--line-2); }
label.check { display: flex; gap: 10px; align-items: flex-start; font-size: var(--fs-sm); cursor: pointer; }
label.check input { margin-top: 3px; accent-color: var(--ivory); }
label.check small { display: block; color: var(--muted); font-size: 11.5px; }
.btn-danger-text { color: #FF8A8D; } .btn-danger-text:hover { color: var(--danger); }
@media (max-width: 760px) {
  .tp-preview { grid-template-columns: minmax(0, 1fr); }
  .tp-frame { height: 440px; }
  .tp-pub { grid-template-columns: minmax(0, 1fr); } .tp-pub-thumb { max-width: 200px; }
  .tp-grid { grid-template-columns: minmax(0, 1fr); }
  .tp-toolbar .select-trigger { min-width: 0; flex: 1; }
}

/* ===== Library ===== */
.lb-kinds .seg { max-width: 520px; }
.lb-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.lb-grid.k-background { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.lb-grid.k-song { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.lb-grid > .empty { grid-column: 1 / -1; }
.lb-skel { height: 190px; border-radius: var(--r-lg); }
.lb-grid.k-song .lb-skel { height: 104px; }
.lb-card { position: relative; border-radius: var(--r-lg); background: var(--obsidian); box-shadow: 0 0 0 1px var(--line) inset; overflow: hidden; transition: box-shadow var(--t-fast); }
.lb-card:hover { box-shadow: 0 0 0 1px var(--line-3) inset; }
.lb-card.is-hidden { opacity: .6; }
.lb-cur-stage { position: relative; height: 128px; display: grid; place-items: center; border-bottom: 1px solid var(--line);
  background-color: var(--graphite); background-image: linear-gradient(45deg, rgba(236,230,216,.04) 25%, transparent 25%, transparent 75%, rgba(236,230,216,.04) 75%), linear-gradient(45deg, rgba(236,230,216,.04) 25%, transparent 25%, transparent 75%, rgba(236,230,216,.04) 75%);
  background-size: 16px 16px; background-position: 0 0, 8px 8px; }
.lb-cur-stage img { max-width: 64px; max-height: 64px; image-rendering: auto; }
.lb-cur-try { position: absolute; right: 8px; bottom: 8px; font: 500 10.5px var(--mono); color: var(--muted); padding: 3px 7px; border-radius: 6px; background: rgba(10,10,11,.7); box-shadow: 0 0 0 1px var(--line-2) inset; }
.lb-bg { position: relative; aspect-ratio: 16 / 10; border-bottom: 1px solid var(--line); background: var(--graphite); }
.lb-bg-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lb-vid { position: absolute; top: 10px; left: 10px; }
.lb-manage { position: absolute; top: 8px; right: 8px; display: flex; gap: 2px; padding: 2px; border-radius: 9px; background: rgba(10,10,11,.75); box-shadow: 0 0 0 1px var(--line-2) inset; opacity: 0; transition: opacity var(--t-fast); }
.lb-card:hover .lb-manage, .lb-card:focus-within .lb-manage { opacity: 1; }
@media (hover: none) { .lb-manage { opacity: 1; } }
.lb-song { padding: 14px; display: grid; gap: 10px; }
.lb-song .lb-manage { top: auto; bottom: 8px; }
.lb-song-row { display: flex; align-items: center; gap: 12px; }
.lb-song-text { flex: 1; min-width: 0; }
.lb-play { width: 40px; height: 40px; flex: none; border: 0; border-radius: 50%; display: grid; place-items: center; background: var(--ivory); color: var(--void); cursor: pointer; transition: transform var(--t) var(--spring); }
.lb-play:hover { transform: scale(1.06); } .lb-play.on { background: var(--signal); color: #fff; }
.lb-play:focus-visible { outline: none; box-shadow: var(--focus); }
.lb-progress { height: 3px; border-radius: 3px; background: var(--line-2); overflow: hidden; }
.lb-progress i { display: block; height: 100%; width: 0; background: var(--ivory); transition: width 250ms linear; }
.lb-upbar { height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; } .lb-upbar i { display: block; height: 100%; width: 0; background: var(--ivory); transition: width 120ms linear; }
.hs { display: grid; gap: 10px; }
.hs-box { position: relative; width: 160px; height: 160px; border-radius: 12px; overflow: hidden; cursor: crosshair; background-color: var(--graphite);
  background-image: linear-gradient(45deg, rgba(236,230,216,.05) 25%, transparent 25%, transparent 75%, rgba(236,230,216,.05) 75%), linear-gradient(45deg, rgba(236,230,216,.05) 25%, transparent 25%, transparent 75%, rgba(236,230,216,.05) 75%); background-size: 16px 16px; background-position: 0 0, 8px 8px; box-shadow: 0 0 0 1px var(--line-2) inset; }
.hs-box img { width: 100%; height: 100%; object-fit: contain; object-position: top left; image-rendering: pixelated; }
.hs-dot { position: absolute; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; border: 2px solid var(--signal); box-shadow: 0 0 0 2px rgba(0,0,0,.6); pointer-events: none; }
@media (max-width: 640px) { .lb-grid, .lb-grid.k-background, .lb-grid.k-song { grid-template-columns: minmax(0, 1fr); } }

/* ===== Free layout: arrange editor ===== */
.arrange-cta { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 12px; background: var(--obsidian); box-shadow: 0 0 0 1px var(--line) inset; }
.arrange-cta > div { flex: 1; min-width: 0; }
.arrange-cta[hidden] { display: none; }
.arr-root { position: fixed; inset: 0; z-index: 1100; display: grid; grid-template-rows: auto minmax(0, 1fr); background: var(--void); animation: arr-in 180ms var(--ease-out); }
.arr-root.closing { animation: arr-out 160ms ease forwards; }
@keyframes arr-in { from { opacity: 0; transform: scale(.99); } } @keyframes arr-out { to { opacity: 0; } }
.arr-bar { display: flex; align-items: center; gap: 14px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--obsidian); }
.arr-title { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0; }
.arr-title b { font-weight: 600; }
.arr-hint { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.arr-actions { display: flex; gap: 6px; }
.arr-body { display: grid; grid-template-columns: minmax(0, 1fr) 280px; min-height: 0; }
.arr-stage { position: relative; margin: 16px; border-radius: 14px; overflow: hidden; box-shadow: 0 0 0 1px var(--line-2); background: #000; }
.arr-stage > div { position: absolute; inset: 0; }
.arr-stage .pf { position: absolute; inset: 0; overflow-y: auto; }
.arr-stage .pf-fb { cursor: grab; outline: 1px dashed rgba(236,230,216,.28); outline-offset: 4px; border-radius: 6px; touch-action: none; user-select: none; transition: outline-color var(--t-fast); }
.arr-stage .pf-fb:hover { outline-color: rgba(236,230,216,.6); }
.arr-stage .pf-fb.arr-sel, .arr-stage .pf-fb:focus-visible { outline: 1.5px solid var(--signal); outline-offset: 4px; }
.arr-stage .pf-fb.arr-drag { cursor: grabbing; z-index: 5; }
.arr-stage .pf-fb a, .arr-stage .pf-fb button { pointer-events: none; }
.arr-tag { position: absolute; left: -4px; top: -26px; padding: 2px 7px; border-radius: 6px; font: 500 10.5px var(--mono); color: var(--void); background: var(--ivory); white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity var(--t-fast); }
.pf-fb:hover > .arr-tag, .pf-fb.arr-sel > .arr-tag, .pf-fb:focus-visible > .arr-tag { opacity: 1; }
.pf-fb.arr-sel > .arr-tag { background: var(--signal); color: #fff; }
.arr-resize { position: absolute; right: -9px; bottom: -9px; width: 14px; height: 14px; border-radius: 4px; background: var(--ivory); box-shadow: 0 0 0 2px rgba(0,0,0,.5); cursor: ew-resize; opacity: 0; transition: opacity var(--t-fast); }
.pf-fb:hover > .arr-resize, .pf-fb.arr-sel > .arr-resize { opacity: 1; }
.arr-guide { position: absolute; z-index: 20; pointer-events: none; background: var(--signal); }
.arr-guide.v { top: 0; bottom: 0; width: 1px; } .arr-guide.h { left: 0; right: 0; height: 1px; }
.arr-guide[hidden] { display: none; }
.arr-side { border-left: 1px solid var(--line); background: var(--obsidian); padding: 16px; overflow-y: auto; display: grid; gap: 12px; align-content: start; }
.arr-list { display: grid; gap: 4px; }
.arr-item { display: flex; align-items: center; gap: 4px; border-radius: 9px; transition: background var(--t-fast); }
.arr-item:hover { background: var(--graphite); } .arr-item.on { background: var(--slate); box-shadow: 0 0 0 1px var(--line-3) inset; }
.arr-item.off .arr-item-main span { color: var(--faint); text-decoration: line-through; }
.arr-item-main { flex: 1; min-width: 0; display: grid; text-align: left; gap: 1px; padding: 7px 10px; border: 0; background: none; color: var(--text); cursor: pointer; font: inherit; font-size: var(--fs-sm); }
.arr-item-main small { color: var(--faint); font-size: 10.5px; }
.arr-opts { display: grid; gap: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.arr-opts .row { padding: 0; }
@media (max-width: 900px) {
  .arr-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
  .arr-side { border-left: 0; border-top: 1px solid var(--line); max-height: 40vh; }
  .arr-hint { display: none; }
  .arr-stage { margin: 10px; }
}
@media (min-width: 761px) { .tp-toolbar > .select-trigger { width: auto; flex: 0 0 auto; min-width: 150px; } }
.tp-sec { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.tp-sec b { font-size: var(--fs-md); font-weight: 600; }
.tp-sec img { opacity: .9; }
.tp-sec[hidden], .tp-grid[hidden] { display: none; }
.tp-meta img.tp-fated { border-radius: 0; background: none; width: 12px; height: 14px; object-fit: contain; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; } @media (max-width: 760px) { .grid-3 { grid-template-columns: minmax(0, 1fr); } }

/* ===== Simpler navigation ===== */
.jump-bar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 6px; margin: -6px 0 12px; padding: 10px 0 8px; background: linear-gradient(var(--void) 80%, transparent); }
.jump-main { flex: 1; min-width: 0; display: grid; gap: 7px; }
.jump-scroller { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; scroll-behavior: auto; padding: 1px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 18px, #000 calc(100% - 18px), transparent); mask-image: linear-gradient(90deg, transparent, #000 18px, #000 calc(100% - 18px), transparent); }
.jump-scroller::-webkit-scrollbar { display: none; }
.jump-track { position: relative; height: 6px; border-radius: 6px; background: var(--slate); box-shadow: 0 0 0 1px var(--line) inset; cursor: pointer; margin: 0 18px; }
.jump-thumb { position: absolute; top: 0; bottom: 0; min-width: 28px; border-radius: 6px; background: var(--iron); box-shadow: 0 0 0 1px var(--line-3) inset; cursor: grab; transition: background var(--t-fast); touch-action: none; }
.jump-thumb:hover, .jump-thumb.drag { background: var(--ivory); } .jump-thumb.drag { cursor: grabbing; }
.jump-thumb:focus-visible { outline: none; box-shadow: var(--focus); }
.jump-arrow { flex: none; width: 28px; height: 28px; border: 0; border-radius: 50%; display: grid; place-items: center; background: var(--obsidian); color: var(--text-2); box-shadow: 0 0 0 1px var(--line) inset; cursor: pointer; align-self: flex-start; }
.jump-arrow:hover:not(:disabled) { color: var(--text); box-shadow: 0 0 0 1px var(--line-3) inset; }
.jump-arrow:disabled { opacity: .35; cursor: default; }
.jump-bar.fits .jump-track, .jump-bar.fits .jump-arrow { display: none; }
.jump-label { align-self: flex-start; line-height: 28px; }
.jump-label { flex: none; font: 500 10.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); margin-right: 4px; }
.jump-chip { flex: none; height: 28px; padding: 0 11px; border: 0; border-radius: 999px; background: var(--obsidian); color: var(--text-2); font: 500 var(--fs-sm) var(--font); box-shadow: 0 0 0 1px var(--line) inset; cursor: pointer; transition: background var(--t-fast), color var(--t-fast); }
.jump-chip:hover { color: var(--text); box-shadow: 0 0 0 1px var(--line-3) inset; }
.jump-chip.on { background: var(--ivory); color: var(--void); box-shadow: none; }
.jump-chip:focus-visible { outline: none; box-shadow: var(--focus); }
section.panel { scroll-margin-top: 64px; }
.hub-tabs { margin-bottom: 18px; max-width: 420px; }
.task-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.task { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 14px; background: var(--obsidian); box-shadow: 0 0 0 1px var(--line) inset; color: var(--text); transition: box-shadow var(--t-fast), transform var(--t) var(--ease-out); }
.task:hover { box-shadow: 0 0 0 1px var(--line-3) inset; transform: translateY(-1px); }
.task:focus-visible { outline: none; box-shadow: var(--focus); }
.task-ic { width: 34px; height: 34px; flex: none; border-radius: 9px; display: grid; place-items: center; color: var(--signal); background: var(--signal-soft); }
.task b { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 2px; }
.task span { font-size: 12px; color: var(--muted); line-height: 1.45; }
/* With a jump bar, the sticky preview sits below it; the bar only spans the form column. */
.page:has(.jump-bar) .preview-col { top: 64px; }
@media (min-width: 1181px) { .jump-bar { margin-right: 428px; } }

/* ===== Codes ===== */
.code-row { gap: 14px; }
.code-text { font-size: 13px; letter-spacing: .04em; margin-right: 8px; }
.code-status { display: inline-flex; height: 18px; align-items: center; padding: 0 7px; border-radius: 999px; font: 600 10px var(--font); letter-spacing: .03em; vertical-align: 1px; background: var(--slate); color: var(--muted); }
.code-status.s-active { color: var(--success); background: color-mix(in srgb, var(--success) 14%, transparent); }
.code-status.s-expired, .code-status.s-used-up { color: #F5C66A; background: rgba(245,184,61,.12); }
.code-meta { font-size: 11px; color: var(--muted); white-space: nowrap; }
.code-actions { display: flex; align-items: center; gap: 4px; }
.rw-list { display: grid; gap: 8px; justify-items: start; }
.rw-row { display: grid; grid-template-columns: 190px minmax(0, 1fr) auto; gap: 8px; align-items: center; width: 100%; }
.rw-value .input { max-width: 120px; }
.redeem-box { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 16px; border-radius: 14px; background: var(--void); box-shadow: 0 0 0 1px var(--line-2) inset; color: var(--muted); max-width: 560px; }
.redeem-box:focus-within { box-shadow: var(--focus); }
.redeem-input { flex: 1; min-width: 0; border: 0 !important; background: none !important; box-shadow: none !important; font-size: 16px; letter-spacing: .08em; height: 42px; padding: 0 !important; }
.redeem-ok { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; background: color-mix(in srgb, var(--success) 9%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--success) 28%, transparent) inset; max-width: 560px; }
.redeem-ok-ic { width: 32px; height: 32px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--success); color: #04110A; }
.redeem-ok ul { margin: 6px 0 0; padding-left: 16px; color: var(--text-2); font-size: var(--fs-sm); }
@media (max-width: 760px) { .code-row { flex-wrap: wrap; } .rw-row { grid-template-columns: minmax(0, 1fr) auto; } .rw-row .rw-value { grid-column: 1 / -1; grid-row: 2; } }

/* ===== Permissions matrix ===== */
.pm-table { display: grid; }
.pm-row { display: grid; grid-template-columns: minmax(0, 1fr) repeat(3, 96px); align-items: center; padding: 10px 20px; border-top: 1px solid var(--line); }
.pm-head { font: 500 10.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); border-top: 0; padding-top: 4px; }
.pm-role { text-align: center; }
.pm-group { padding: 16px 20px 6px; font-weight: 600; font-size: var(--fs-sm); border-top: 1px solid var(--line); background: rgba(236,230,216,.015); }
.pm-label { display: grid; gap: 2px; font-size: var(--fs-sm); }
.pm-label .mono { font-size: 10.5px; color: var(--faint); }
.pm-cell { display: grid; place-items: center; cursor: pointer; }
.pm-cell input { position: absolute; opacity: 0; pointer-events: none; }
.pm-box { width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; color: transparent; box-shadow: 0 0 0 1.5px var(--line-3) inset; transition: background var(--t-fast), color var(--t-fast); }
.pm-cell input:checked + .pm-box { background: var(--ivory); color: var(--void); box-shadow: none; }
.pm-cell input:focus-visible + .pm-box { box-shadow: var(--focus); }
.pm-row:hover:not(.pm-head) { background: rgba(236,230,216,.02); }
@media (max-width: 760px) { .pm-row { grid-template-columns: minmax(0, 1fr) repeat(3, 52px); padding: 10px 14px; } .pm-head .pm-role { font-size: 9px; letter-spacing: .04em; } }
.redeem-main { margin-bottom: 16px; }

/* ===== Manage user (v3.7) ===== */
.mu { display: grid; gap: 16px; }
.mu-head { position: relative; border-radius: 16px; overflow: hidden; background: var(--obsidian); box-shadow: 0 0 0 1px var(--line) inset; padding: 0 18px 16px; }
.mu-banner { height: 78px; margin: 0 -18px; background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--signal) 38%, transparent), transparent 60%), linear-gradient(120deg, var(--slate), var(--graphite)); background-size: cover; background-position: center; }
.mu-id { display: flex; align-items: flex-end; gap: 14px; margin-top: -30px; }
.mu-av { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex: none; box-shadow: 0 0 0 4px var(--obsidian), 0 6px 18px rgba(0,0,0,.4); background: var(--slate); position: relative; }
.mu-av-letter { display: grid; place-items: center; font: 600 28px var(--font-display); color: var(--ivory); }
.mu-names { min-width: 0; flex: 1; padding-bottom: 4px; }
.mu-name { display: flex; align-items: center; gap: 8px; font: 600 19px var(--font-display); letter-spacing: -.01em; flex-wrap: wrap; }
.mu-badges { display: inline-flex; gap: 3px; }
.mu-badges img { width: 18px; height: 18px; }
.mu-handle { font-size: 12px; color: var(--muted); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mu-handle span { color: var(--faint); }
.mu-head-actions { display: flex; gap: 6px; padding-bottom: 6px; }
.mu-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.mu-chip { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px; border-radius: 999px; font: 500 11.5px var(--font); color: var(--text-2); background: var(--slate); box-shadow: 0 0 0 1px var(--line-2) inset; text-transform: capitalize; }
.mu-chip .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.mu-chip.ok { color: var(--success); } .mu-chip.bad { color: var(--danger); }
.mu-chip.role-owner { color: #F5C66A; box-shadow: 0 0 0 1px rgba(245,198,106,.35) inset; }
.mu-chip.role-coowner { color: #FF9F7A; } .mu-chip.role-admin { color: #FF7A7A; } .mu-chip.role-moderator { color: #6EE7A8; }
.mu-chip.tier-1 { color: #F5C66A; } .mu-chip.tier-2 { color: #C9A6FF; }
.mu-stats { display: grid; grid-template-columns: repeat(5, 1fr); border-radius: 14px; box-shadow: 0 0 0 1px var(--line) inset; overflow: hidden; }
.mu-stat { display: grid; gap: 2px; padding: 12px 14px; }
.mu-stat + .mu-stat { box-shadow: -1px 0 0 var(--line); }
.mu-stat b { font: 600 15px var(--font-display); }
.mu-stat span { font: 500 10px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.mu-tabs .seg button { gap: 6px; }
.mu-rows { display: grid; gap: 10px; }
.mu-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 16px; border-radius: 14px; background: var(--obsidian); box-shadow: 0 0 0 1px var(--line) inset; }
.mu-row-title { font-weight: 600; font-size: var(--fs-sm); }
.mu-row-sub { font-size: 12px; color: var(--muted); margin-top: 2px; max-width: 380px; }
.mu-more { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 12px; color: var(--muted); font-size: 12.5px; text-decoration: none; box-shadow: 0 0 0 1px var(--line) inset; }
.mu-more:hover { color: var(--text); background: var(--obsidian); }
.mu-more svg:last-child { margin-left: auto; }
.mu-badges-tab { display: grid; gap: 12px; }
.mu-btools { display: flex; align-items: center; gap: 10px; }
.mu-search { flex: 1; }
.mu-cats { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.mu-cats::-webkit-scrollbar { display: none; }
.mu-cat { display: inline-flex; align-items: center; gap: 6px; flex: none; height: 28px; padding: 0 11px; border-radius: 999px; font: 500 12px var(--font); color: var(--muted); box-shadow: 0 0 0 1px var(--line-2) inset; }
.mu-cat span { font: 500 10.5px var(--mono); color: var(--faint); }
.mu-cat:hover { color: var(--text); }
.mu-cat[aria-pressed=true] { background: var(--ivory); color: var(--void); box-shadow: none; }
.mu-cat[aria-pressed=true] span { color: color-mix(in srgb, var(--void) 60%, transparent); }
.mu-bgrid { display: grid; gap: 16px; max-height: min(52vh, 520px); overflow-y: auto; padding-right: 4px; margin-right: -4px; }
.mu-bgroup { display: grid; gap: 8px; }
.mu-bgroup-title { display: flex; justify-content: space-between; font: 500 10.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); position: sticky; top: 0; background: var(--graphite, #111); padding: 4px 0; z-index: 1; }
.mu-btiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 6px; }
.mu-btile { position: relative; display: flex; align-items: center; gap: 10px; padding: 8px 30px 8px 8px; border-radius: 12px; text-align: left; background: var(--obsidian); box-shadow: 0 0 0 1px var(--line) inset; transition: box-shadow var(--t-fast), background var(--t-fast), transform var(--t-fast); }
.mu-btile:hover:not(:disabled) { box-shadow: 0 0 0 1px var(--line-3) inset; transform: translateY(-1px); }
.mu-btile:disabled { cursor: default; }
.mu-bicon { width: 34px; height: 34px; flex: none; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--bc) 10%, transparent); }
.mu-bicon img { width: 24px; height: 24px; }
.mu-btile[aria-pressed=false] .mu-bicon img { filter: grayscale(1) brightness(.55); }
.mu-btile[aria-pressed=false] .mu-bicon { background: rgba(236,230,216,.03); }
.mu-btext { display: grid; gap: 1px; min-width: 0; }
.mu-btext b { font-weight: 500; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mu-btile[aria-pressed=false] .mu-btext b { color: var(--text-2); }
.mu-rar { font: 500 9.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.mu-rar.r-rare { color: #7AA7FF; } .mu-rar.r-epic { color: #B98AFF; } .mu-rar.r-legendary { color: #F5C66A; } .mu-rar.r-mythic { color: #FF7A5C; }
.mu-bcheck { position: absolute; right: 9px; top: 50%; translate: 0 -50%; width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; color: transparent; box-shadow: 0 0 0 1.5px var(--line-3) inset; }
.mu-btile[aria-pressed=true] { background: color-mix(in srgb, var(--bc) 7%, var(--obsidian)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--bc) 45%, transparent) inset; }
.mu-btile[aria-pressed=true] .mu-bcheck { background: var(--bc); color: #0B0B0D; box-shadow: none; }
.mu-btile:disabled[aria-pressed=false] .mu-bcheck { color: var(--faint); box-shadow: none; }
@media (max-width: 700px) {
  .mu-stats { grid-template-columns: repeat(3, 1fr); }
  .mu-stat:nth-child(4) { box-shadow: 0 -1px 0 var(--line); } .mu-stat:nth-child(5) { box-shadow: -1px 0 0 var(--line), 0 -1px 0 var(--line); }
  .mu-id { flex-wrap: wrap; } .mu-head-actions { width: 100%; }
  .mu-row { flex-direction: column; align-items: flex-start; }
  .mu-btiles { grid-template-columns: 1fr 1fr; }
}
.modal.wide:has(.mu) { max-width: 780px; }
.mu-id { margin-top: -36px; }
.mu-names { padding-top: 44px; padding-bottom: 0; }
.mu-head-actions { padding-top: 44px; padding-bottom: 0; align-self: flex-start; }

/* ===== Sections editor (v3.8) ===== */
.sec-count { font-size: 11px; color: var(--muted); margin-right: 10px; }
.panel-tools { display: flex; align-items: center; }
.sec-list { display: grid; gap: 10px; }
.sec-empty { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 26px 16px; border-radius: 14px; box-shadow: 0 0 0 1px var(--line) inset; color: var(--muted); }
.sec-empty b { color: var(--text); } .sec-empty p { margin: 0 0 8px; max-width: 420px; font-size: var(--fs-sm); }
.sec-item { border-radius: 14px; background: var(--obsidian); box-shadow: 0 0 0 1px var(--line) inset; overflow: hidden; }
.sec-head { display: flex; align-items: center; gap: 8px; padding: 10px 10px 10px 12px; border-bottom: 1px solid var(--line); }
.sec-ic { width: 30px; height: 30px; flex: none; border-radius: 9px; display: grid; place-items: center; background: var(--slate); color: var(--ivory); }
.sec-name { flex: 1; min-width: 0; display: grid; }
.sec-name b { font-size: 13px; font-weight: 600; }
.sec-name span { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sec-head .seg button { height: 26px; padding: 0 9px; font-size: 11.5px; }
.sec-body { padding: 14px; display: grid; gap: 12px; }
.sec-rows { display: grid; gap: 8px; justify-items: start; }
.sec-row { display: grid; gap: 8px; align-items: center; width: 100%; }
.sec-row.c2 { grid-template-columns: minmax(0, 1fr) 150px auto; }
.sec-row.c3 { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr) minmax(0, 1fr) auto; }
.sec-types { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.sec-type { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; row-gap: 2px; align-items: center; padding: 12px; border-radius: 12px; text-align: left; background: var(--obsidian); box-shadow: 0 0 0 1px var(--line) inset; transition: box-shadow var(--t-fast), transform var(--t-fast); }
.sec-type:hover { box-shadow: 0 0 0 1px var(--line-3) inset; transform: translateY(-1px); }
.sec-type .sec-ic { grid-row: 1 / 3; }
.sec-type b { font-size: 13px; } .sec-type span { font-size: 11.5px; color: var(--muted); line-height: 1.4; }
@media (max-width: 760px) { .sec-types { grid-template-columns: 1fr; } .sec-row.c3 { grid-template-columns: minmax(0, 1fr) auto; } .sec-row.c3 > input:nth-child(n+2) { grid-column: 1; } .sec-head { flex-wrap: wrap; } }

/* ===== Avatar crop (v3.9) ===== */
.crop-wrap { display: grid; place-items: center; padding: 8px 0 4px; }
.crop-frame { position: relative; width: 240px; height: 240px; border-radius: 50%; overflow: hidden; background: #111; cursor: grab; touch-action: none; box-shadow: 0 0 0 1px var(--line-3), 0 20px 50px -20px rgba(0,0,0,.8); outline: none; }
.crop-frame:focus-visible { box-shadow: var(--focus); }
.crop-frame.dragging { cursor: grabbing; }
.crop-frame.shape-squircle { border-radius: 30%; } .crop-frame.shape-square { border-radius: 18px; }
.crop-frame img { width: 100%; height: 100%; object-fit: cover; display: block; user-select: none; pointer-events: none; transition: transform 60ms linear; }
.crop-grid { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .2s; background-image: linear-gradient(rgba(255,255,255,.25) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.25) 1px, transparent 1px); background-size: 33.33% 33.33%; background-position: -1px -1px; }
.crop-frame.dragging .crop-grid, .crop-frame:hover .crop-grid { opacity: 1; }
.crop-controls { display: flex; align-items: center; gap: 10px; max-width: 320px; margin: 4px auto 0; color: var(--muted); }
.crop-zoom { flex: 1; accent-color: var(--ivory); }

/* Connect Discord */
.dc-link { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: rgba(88,101,242,.08); box-shadow: 0 0 0 1px rgba(88,101,242,.3) inset; }
.dc-link.on { background: rgba(35,165,90,.08); box-shadow: 0 0 0 1px rgba(35,165,90,.3) inset; }
.dc-link-ic { width: 36px; height: 36px; flex: none; border-radius: 10px; display: grid; place-items: center; background: #5865F2; color: #fff; }
.dc-link.on .dc-link-ic { background: #23A55A; }
.dc-link-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.dc-link-text b { font-size: 13.5px; } .dc-link-text span { font-size: 12px; color: var(--muted); }
.btn.dc-link-btn { background: #5865F2; color: #fff; } .btn.dc-link-btn:hover { background: #4752C4; }
@media (max-width: 600px) { .dc-link { flex-wrap: wrap; } .dc-link-btn { width: 100%; justify-content: center; } }

/* Discord presence (Design page) */
.dc-acct { display: flex; align-items: center; gap: 12px; padding: 4px 0 14px; }
.dc-mark { width: 40px; height: 40px; flex: none; border-radius: 10px; display: grid; place-items: center; color: #fff; background: #5865F2; }
.dc-av { position: relative; width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; color: #fff; background: #5865F2; }
.dc-av img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.dc-av i { position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px; border-radius: 50%; box-shadow: 0 0 0 3px var(--panel, #0e0e0f); background: #80848e; }
.dc-av i.st-online { background: #23a55a; } .dc-av i.st-idle { background: #f0b232; } .dc-av i.st-dnd { background: #f23f43; }
.dc-who { flex: 1; min-width: 0; display: grid; gap: 1px; }
.dc-who b { font-size: 14px; } .dc-who span { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn.dc-connect { background: #5865F2; color: #fff; } .btn.dc-connect:hover { background: #4752C4; }
.dc-note { margin: 0; font-size: 12.5px; color: var(--muted); }
.dc-more { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; font-size: 12.5px; color: var(--muted); text-decoration: none; }
.dc-more:hover { color: var(--text); }

/* Browser tab title */
.tt-field { display: flex; align-items: center; border-radius: 10px; background: var(--input-bg, rgba(255,255,255,.04)); box-shadow: 0 0 0 1px var(--line, rgba(255,255,255,.1)) inset; overflow: hidden; }
.tt-prefix { padding: 0 4px 0 12px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.tt-field .input { flex: 1; border: 0; box-shadow: none; background: transparent; padding-left: 2px; }
.tt-field .input:disabled { opacity: .55; cursor: not-allowed; }
.tt-lock { display: flex; align-items: center; gap: 6px; margin-top: 8px; padding: 0; border: 0; background: none; font: inherit; font-size: 12.5px; color: var(--muted); cursor: pointer; }
.tt-lock:hover { color: var(--text); }
.tt-count { display: flex; justify-content: flex-end; margin-top: 6px; }
.tt-fonts { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.tt-font { display: grid; gap: 4px; justify-items: center; padding: 12px 6px 10px; border-radius: 12px; border: 0; cursor: pointer; color: var(--text); background: rgba(255,255,255,.03); box-shadow: 0 0 0 1px var(--line, rgba(255,255,255,.08)) inset; transition: background 150ms, box-shadow 150ms; }
.tt-font:hover { background: rgba(255,255,255,.06); }
.tt-font.on { box-shadow: 0 0 0 2px var(--accent) inset; background: color-mix(in srgb, var(--accent) 10%, transparent); }
.tt-font b { font-size: 17px; font-weight: 500; white-space: nowrap; }
.tt-font span { font-size: 11px; color: var(--muted); }

/* Sign-in: forgot password, email codes */
.auth-forgot { display: flex; justify-content: flex-end; margin: -6px 0 4px; }
.auth-forgot a { font-size: 12.5px; color: var(--muted); text-decoration: none; }
.auth-forgot a:hover { color: var(--text); text-decoration: underline; }
.auth-ic { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--slate); margin-bottom: 16px; }
.auth-card .sub b { color: var(--text); font-weight: 600; word-break: break-all; }
.auth-tip { margin-top: 10px; font-size: 12.5px; }
