.hub-copy-row { flex-wrap: wrap; max-width: 100%; }
.hub-copy-row a { min-width: 0; overflow-wrap: anywhere; }
/* XARO Nexus dashboard. Studio design language (violet glass, rose diamond markers), our own file. */

/* ------------------------------------------------------------------ tokens */
:root {
  color-scheme: dark;
  --bg: #1d1730; --bg-glow1: #3a23583d; --bg-glow2: #1f2a4a33;
  --panel: #241d38; --panel2: #29213f; --raise: #302646; --raise2: #3a2e54; --sunk: #211a33;
  --line: #3b3050; --line2: #4c3e65; --line3: #69547f;
  --text: #f1ecf8; --muted: #a79dba; --dim: #8a809b;
  --accent: #cba9f3; --accent2: #a57ce0; --accent-ink: #1a1026; --accent-soft: #a57ce026; --accent-line: #a57ce066;
  --rose: #e8a8c8; --green: #8fd6b6; --green-bg: #12211a; --green-line: #2f5442;
  --amber: #e3bd86; --amber-bg: #211a11; --amber-line: #5d4a2f;
  --red: #f08a9b; --red-bg: #2a1319; --red-line: #6a2f3c;
  --link: #d9b9ff; --focus: #dfbaff;
  --shadow: 0 1px 0 #ffffff09 inset, 0 22px 44px -30px #000;
  --pop-shadow: 0 24px 60px -12px #000c, 0 0 0 1px #ffffff08 inset;
  --msg-bg: #313338; --msg-text: #dbdee1; --msg-muted: #949ba4; --embed-bg: #2b2d31; --mention-bg: #5865f23d; --mention-text: #c9cdfb;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 24px; --space-6: 32px;
  --radius: 18px; --radius-sm: 11px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --side-w: 264px;
  --font: 'Segoe UI Variable Text', 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Roboto, sans-serif;
  --serif: Georgia, 'Iowan Old Style', 'Times New Roman', serif;
  --mono: ui-monospace, 'Cascadia Code', 'SF Mono', Consolas, monospace;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #ebe5f2; --bg-glow1: #cfb4f033; --bg-glow2: #b4c6f02b;
  --panel: #f6f2fa; --panel2: #f3eef8; --raise: #ede7f4; --raise2: #e4dcee; --sunk: #e8e1f0;
  --line: #dcd2e8; --line2: #cdc0de; --line3: #b3a2cb;
  --text: #1d1627; --muted: #625a73; --dim: #7a7189;
  --accent: #7b4bc4; --accent2: #9466d6; --accent-ink: #ffffff; --accent-soft: #9466d61f; --accent-line: #9466d666;
  --rose: #c94f7f; --green: #1c7a52; --green-bg: #e7f6ee; --green-line: #a9dcc3;
  --amber: #8f5a0c; --amber-bg: #fdf3e2; --amber-line: #efd3a1;
  --red: #b3263e; --red-bg: #fdecef; --red-line: #f1b8c3;
  --link: #6f3fb8; --focus: #7b4bc4;
  --shadow: 0 1px 2px #2a174a0d, 0 12px 30px -18px #2a174a33;
  --pop-shadow: 0 20px 50px -14px #2a174a55, 0 0 0 1px #2a174a0f;
  --msg-bg: #ffffff; --msg-text: #313338; --msg-muted: #5c5e66; --embed-bg: #f2f3f5; --mention-bg: #5865f226; --mention-text: #4752c4;
}

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--line2) transparent; }
body {
  margin: 0; min-height: 100vh; font: 14px/1.5 var(--font); color: var(--text);
  background: radial-gradient(1000px 520px at 92% -10%, var(--bg-glow1), transparent 70%), radial-gradient(800px 480px at -8% 108%, var(--bg-glow2), transparent 70%), var(--bg);
  background-attachment: fixed; -webkit-font-smoothing: antialiased;
}
::selection { background: #6f4fa0; color: #fff; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line2); border-radius: 10px; border: 2px solid transparent; background-clip: content-box; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-family: var(--serif); font-size: 30px; font-weight: 600; letter-spacing: -.4px; line-height: 1.15; margin-bottom: 4px; }
h2 { font-size: 15.5px; font-weight: 640; letter-spacing: -.1px; margin-bottom: 4px; }
h3 { font-size: 14px; font-weight: 640; margin-bottom: 4px; }
p { color: var(--muted); }
small { font-size: 12px; color: var(--muted); }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
code, kbd, .mono { font-family: var(--mono); font-size: .92em; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.muted { color: var(--muted); }
.pad { padding: 18px 4px; }
.eyebrow { text-transform: uppercase; font-size: 10.5px; letter-spacing: 1.6px; color: var(--accent); font-weight: 650; margin: 0 0 6px; }
.lead { font-size: 15px; color: var(--muted); }
.fine { font-size: 12px; color: var(--dim); }
.hint { display: flex; gap: 7px; align-items: flex-start; font-size: 12.5px; color: var(--muted); margin: 10px 0 0; }
.hint .icon { flex-shrink: 0; margin-top: 2px; }
.warn-hint { color: var(--amber); }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.foot-spacer { flex: 1 1 auto; }
.icon { fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; vertical-align: middle; }
.noscript { max-width: 520px; margin: 80px auto; padding: 20px; text-align: center; color: var(--muted); }

/* ------------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 8px 15px;
  border: 1px solid var(--line2); border-radius: var(--radius-sm); background: var(--raise); color: var(--text);
  font-weight: 560; line-height: 1.2; white-space: nowrap; text-decoration: none; user-select: none;
  transition: background .18s, border-color .18s, box-shadow .18s, transform .12s, color .18s;
}
.btn:hover:not(:disabled) { background: var(--raise2); border-color: var(--line3); text-decoration: none; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.primary { background: linear-gradient(135deg, #d6b8f7, #ad84e6); color: #1a1026; border-color: #c9a5f0; font-weight: 650; box-shadow: 0 8px 22px -12px #a57ce0dd, 0 1px 0 #ffffff55 inset; }
.btn.primary:hover:not(:disabled) { background: linear-gradient(135deg, #e2c9fa, #b98fed); border-color: #dcc0f8; box-shadow: 0 10px 28px -12px #b58af0; }
:root[data-theme="light"] .btn.primary { background: linear-gradient(135deg, #9a6ae0, #7b4bc4); color: #fff; border-color: #8457cc; box-shadow: 0 8px 20px -12px #7b4bc4; }
:root[data-theme="light"] .btn.primary:hover:not(:disabled) { background: linear-gradient(135deg, #a77ae6, #8757cf); }
.btn.subtle { background: transparent; border-color: transparent; color: var(--muted); }
.btn.subtle:hover:not(:disabled) { background: var(--raise); border-color: var(--line2); color: var(--text); }
.btn.danger { background: var(--red-bg); border-color: var(--red-line); color: var(--red); }
.btn.danger:hover:not(:disabled) { background: #3a1822; border-color: var(--red); }
:root[data-theme="light"] .btn.danger:hover:not(:disabled) { background: #fbdce2; }
.btn.danger-hover:hover:not(:disabled) { color: var(--red); border-color: var(--red-line); background: var(--red-bg); }
.btn.sm { min-height: 32px; padding: 5px 11px; font-size: 13px; border-radius: 10px; gap: 6px; }
.btn.xs { min-height: 26px; padding: 3px 8px; font-size: 12px; border-radius: 8px; gap: 5px; }
.btn.big { min-height: 46px; padding: 11px 20px; font-size: 15px; border-radius: 13px; }
.btn.icon { padding: 0; width: 38px; min-width: 38px; }
.btn.icon.sm { width: 32px; min-width: 32px; }
.btn.icon.xs { width: 28px; min-width: 28px; }
.btn.discord { background: #5865f2; border-color: #6d78f5; color: #fff; }
.btn.discord:hover:not(:disabled) { background: #6974f4; border-color: #8a93f7; }
.btn.twitch { background: #9146ff; border-color: #a064ff; color: #fff; }
.btn.twitch:hover:not(:disabled) { background: #9d5aff; border-color: #b584ff; }
.btn.copied { border-color: var(--green-line); color: var(--green); }
.btn.on { color: var(--accent); }
.btn[aria-busy="true"] { position: relative; color: transparent !important; }
.btn[aria-busy="true"] > * { visibility: hidden; }
.btn[aria-busy="true"]::after { content: ''; position: absolute; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--muted); border-top-color: var(--accent); animation: spin .7s linear infinite; }
.btn.primary[aria-busy="true"]::after { border-color: #1a102655; border-top-color: #1a1026; }
.link-button { border: 0; background: none; padding: 0; color: var(--link); font-weight: 600; }
.link-button:hover { text-decoration: underline; }
.spinner { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line3); border-top-color: var(--accent); animation: spin .7s linear infinite; flex-shrink: 0; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------------ inputs */
input:not([type=checkbox]):not([type=range]):not([type=color]):not([type=radio]), select, textarea {
  width: 100%; min-height: 38px; border: 1px solid var(--line2); border-radius: var(--radius-sm); background: var(--raise); color: var(--text);
  padding: 8px 13px; transition: border-color .18s, box-shadow .18s, background .18s;
}
input:not([type=checkbox]):not([type=range]):not([type=color]):not([type=radio]):hover, select:hover, textarea:hover { border-color: var(--line3); }
input:not([type=checkbox]):not([type=range]):not([type=color]):not([type=radio]):focus, select:focus, textarea:focus { border-color: var(--accent2); box-shadow: 0 0 0 3px var(--accent-soft); outline: none; }
input:disabled, select:disabled, textarea:disabled { opacity: .6; cursor: not-allowed; }
input::placeholder, textarea::placeholder { color: var(--dim); opacity: .8; }
[aria-invalid="true"]:not(.picker-trigger):not(.token-add), .looks-wrong { border-color: var(--red) !important; box-shadow: 0 0 0 3px #f08a9b22 !important; }
select { appearance: none; -webkit-appearance: none; padding-right: 36px; cursor: pointer; width: auto; min-width: 160px; max-width: 100%;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
select option { background: var(--panel); color: var(--text); }
textarea { resize: vertical; min-height: 64px; line-height: 1.5; }
input[type=search]::-webkit-search-cancel-button { filter: grayscale(1); }

input[type=checkbox].switch { appearance: none; -webkit-appearance: none; width: 42px; height: 24px; border-radius: 24px; background: var(--raise2); position: relative; cursor: pointer; flex-shrink: 0; margin: 0;
  border: 1px solid var(--line2); transition: background .22s, box-shadow .22s, border-color .22s; }
input[type=checkbox].switch::before { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--dim); transition: transform .22s var(--ease), background .22s; }
input[type=checkbox].switch:hover { border-color: var(--line3); }
input[type=checkbox].switch:checked { background: linear-gradient(135deg, #b58cee, #8b62c8); border-color: transparent; box-shadow: 0 0 18px -3px #a57ce0aa; }
input[type=checkbox].switch:checked::before { transform: translateX(18px); background: #fff; }
input[type=checkbox].switch:disabled { opacity: .45; cursor: default; }

input[type=range].range { -webkit-appearance: none; appearance: none; width: 100%; height: 24px; background: transparent; padding: 0; margin: 0; cursor: pointer; --f: .5; }
input[type=range].range:focus { outline: none; }
input[type=range].range::-webkit-slider-runnable-track { height: 6px; border-radius: 6px; background: linear-gradient(90deg, var(--accent2), var(--accent)) 0 0 / calc(9px + (100% - 18px) * var(--f)) 100% no-repeat, var(--raise2); box-shadow: 0 0 0 1px #00000030 inset; }
input[type=range].range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 18px; height: 18px; margin-top: -6px; border-radius: 50%; background: #fff; border: 4px solid var(--accent2); box-shadow: 0 3px 10px #0008; transition: box-shadow .18s, transform .12s; }
input[type=range].range:hover::-webkit-slider-thumb { box-shadow: 0 0 0 6px #cba9f326, 0 3px 10px #0008; }
input[type=range].range:active::-webkit-slider-thumb { transform: scale(1.08); }
input[type=range].range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--focus); }
input[type=range].range::-moz-range-track { height: 6px; border-radius: 6px; background: var(--raise2); }
input[type=range].range::-moz-range-progress { height: 6px; border-radius: 6px; background: linear-gradient(90deg, var(--accent2), var(--accent)); }
input[type=range].range::-moz-range-thumb { box-sizing: border-box; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 4px solid var(--accent2); }
input[type=range].range:disabled { opacity: .45; cursor: default; }

.stepper { display: inline-flex; align-items: stretch; border: 1px solid var(--line2); border-radius: var(--radius-sm); background: var(--raise); overflow: hidden; flex-shrink: 0; transition: border-color .18s, box-shadow .18s; }
.stepper:hover { border-color: var(--line3); }
.stepper:focus-within { border-color: var(--accent2); box-shadow: 0 0 0 3px var(--accent-soft); }
.stepper input[type=number] { width: 72px !important; min-height: 36px !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; text-align: center; padding: 6px 0 !important; box-shadow: none !important; -moz-appearance: textfield; appearance: textfield; font-variant-numeric: tabular-nums; }
.stepper input::-webkit-inner-spin-button, .stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.stepper .step { border: 0; background: transparent; width: 34px; padding: 0; color: var(--accent); display: grid; place-items: center; }
.stepper .step:hover:not(:disabled) { background: var(--raise2); }
.stepper .step:disabled { opacity: .35; cursor: default; }
.with-unit { display: inline-flex; align-items: center; gap: 8px; }
.unit { color: var(--muted); font-size: 12.5px; }
.value-chip { display: inline-block; min-width: 46px; text-align: center; padding: 2px 9px; border-radius: 20px; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums; }
.color-input { display: inline-flex; align-items: center; gap: 8px; }
.color-input .hex-input { width: 112px !important; font-family: var(--mono); text-transform: lowercase; }
input[type=color].swatch { appearance: none; -webkit-appearance: none; width: 36px; height: 36px; padding: 0; border: 2px solid var(--line3); border-radius: 50%; background: none; overflow: hidden; cursor: pointer; flex-shrink: 0; transition: border-color .18s, box-shadow .18s; }
input[type=color].swatch:hover { border-color: var(--accent2); box-shadow: 0 0 0 4px var(--accent-soft); }
input[type=color].swatch::-webkit-color-swatch-wrapper { padding: 0; }
input[type=color].swatch::-webkit-color-swatch { border: 0; border-radius: 50%; }
input[type=color].swatch::-moz-color-swatch { border: 0; border-radius: 50%; }

/* ------------------------------------------------------------------ boot / solo screens */
.boot { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 12px; color: var(--muted); }
.boot-mark { font-size: 40px; color: var(--accent); text-shadow: 0 0 30px #a57ce0aa; animation: pulse 1.6s ease-in-out infinite; }
.boot p { margin: 0; }
@keyframes pulse { 50% { opacity: .45; transform: scale(.92); } }
.center-screen { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.card-screen { max-width: 460px; width: 100%; }
.solo { min-height: 100vh; display: flex; flex-direction: column; }
.solo-top { display: flex; align-items: center; justify-content: space-between; padding: 18px 28px; gap: 12px; }
.solo-main { flex: 1; display: grid; place-items: start center; padding: 4vh 16px 60px; }
.signin-card { max-width: 480px; width: 100%; text-align: center; padding: 38px 34px 30px; }
.signin-card h1 { font-size: 34px; }
.signin-card .panel-head { display: none; }
.signin-mark img { width: 64px; height: 64px; border-radius: 50%; box-shadow: 0 0 0 2px var(--line2), 0 0 40px #9d4aca55; }
.signin-mark { margin-bottom: 14px; }
.signin-buttons { display: grid; gap: 10px; margin: 24px 0 18px; }
.wizard { max-width: 620px; width: 100%; padding: 26px 30px 28px; }
.steps { list-style: none; margin: 0 0 26px; padding: 0 0 18px; display: flex; gap: 8px; border-bottom: 1px solid var(--line); }
.steps li { display: flex; align-items: center; gap: 8px; color: var(--dim); font-size: 13px; font-weight: 600; flex: 1; }
.steps li + li::before { content: ''; flex: 0 0 18px; height: 1px; background: var(--line2); margin-right: 2px; }
.step-dot { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line2); font-size: 12px; background: var(--raise); }
.steps li.current { color: var(--text); }
.steps li.current .step-dot { border-color: var(--accent2); background: var(--accent-soft); color: var(--accent); box-shadow: 0 0 16px -2px #a57ce088; }
.steps li.done { color: var(--muted); }
.steps li.done .step-dot { background: linear-gradient(135deg, #b58cee, #8b62c8); border-color: transparent; color: #fff; }
.wizard-form { display: grid; gap: 18px; }
.wizard-form h1 { outline: none; }
.wizard-form .lead { margin: -10px 0 4px; }
.wizard-actions { display: flex; justify-content: flex-end; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.wizard-actions.split { justify-content: flex-start; }
.guild-list { display: grid; gap: 8px; max-height: 360px; overflow: auto; padding: 2px; }
.guild-choice { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 10px 12px; border: 1px solid var(--line2); border-radius: 14px; background: var(--raise); transition: border-color .18s, background .18s, box-shadow .18s; }
.guild-choice:hover:not(:disabled) { border-color: var(--line3); background: var(--raise2); }
.guild-choice.selected { border-color: var(--accent2); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent2) inset; }
.guild-choice:disabled { opacity: .5; cursor: not-allowed; }
.guild-name { flex: 1; min-width: 0; display: flex; flex-direction: column; font-weight: 600; }
.guild-name small { font-weight: 400; }
.radio-mark { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line3); display: grid; place-items: center; flex-shrink: 0; }
.guild-choice.selected .radio-mark { background: var(--accent2); border-color: var(--accent2); color: #fff; }
.bot-box:empty { display: none; }
.ok-line { display: flex; gap: 8px; align-items: center; color: var(--green); margin: 0; }
.waiting { display: flex; gap: 8px; align-items: center; margin: 6px 0 0; }
.done { text-align: center; justify-items: center; }
.done-mark { font-size: 44px; color: var(--accent); text-shadow: 0 0 30px #a57ce0aa; line-height: 1; animation: pop .5s var(--ease); }
.next-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; text-align: left; width: 100%; max-width: 420px; }
.next-steps li { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); }
.next-steps .icon { color: var(--accent); margin-top: 2px; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }

/* ------------------------------------------------------------------ shell */
.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }
.skip-link { position: fixed; top: -60px; left: 12px; z-index: 100; background: var(--accent2); color: #fff; padding: 8px 14px; border-radius: 10px; }
.skip-link:focus { top: 12px; }
.sidebar { position: sticky; top: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; gap: 14px; padding: 18px 14px 14px; border-right: 1px solid var(--line); background: linear-gradient(180deg, var(--panel2), var(--sunk)); overflow: hidden; z-index: 40; }
.side-top { display: flex; align-items: center; justify-content: space-between; padding: 2px 6px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--text); text-decoration: none !important; }
.brand img { width: 34px; height: 34px; border-radius: 50%; box-shadow: 0 0 0 2px var(--line2), 0 0 22px #9d4aca40; }
.brand strong { display: block; font-family: var(--serif); font-size: 19px; letter-spacing: 3.4px; line-height: 1.05; }
.brand small { display: block; letter-spacing: 2.4px; font-size: 9.5px; text-transform: uppercase; color: var(--muted); }
.drawer-close, .menu-btn { display: none !important; }
.ws-switch { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 14px; border: 1px solid var(--line2); background: var(--raise); text-align: left; transition: border-color .18s, background .18s; }
.ws-switch:hover { border-color: var(--line3); background: var(--raise2); }
.ws-badge { --hue: 270; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex-shrink: 0; color: #fff;
  background: linear-gradient(135deg, hsl(var(--hue) 60% 58%), hsl(calc(var(--hue) + 40) 55% 42%)); box-shadow: 0 6px 16px -8px hsl(var(--hue) 60% 50%); }
.ws-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.ws-text strong, .ws-text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-text small { font-size: 11.5px; }
.ws-chev { color: var(--muted); }
.nav { flex: 1; overflow-y: auto; margin: 0 -6px; padding: 0 6px 8px; display: flex; flex-direction: column; gap: 14px; scrollbar-width: thin; }
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-heading { font-size: 10.5px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--dim); font-weight: 650; padding: 4px 12px 5px; }
.nav-item { position: relative; display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 11px; color: var(--muted); font-weight: 530; text-decoration: none !important; transition: background .15s, color .15s; }
.nav-item:hover { background: var(--raise); color: var(--text); }
.nav-item[aria-current="page"] { background: linear-gradient(90deg, #2a1f3b, #1c1627); color: #f4e8ff; box-shadow: 0 0 0 1px #3c2f52 inset; }
:root[data-theme="light"] .nav-item[aria-current="page"] { background: linear-gradient(90deg, #efe6fb, #f6f1fc); color: #3b1f68; box-shadow: 0 0 0 1px #dccbf3 inset; }
.nav-item[aria-current="page"]::before { content: ''; position: absolute; left: -8px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: linear-gradient(180deg, var(--accent), var(--accent2)); box-shadow: 0 0 12px #cba9f388; }
.nav-item[aria-current="page"] .nav-icon { color: var(--accent); }
.nav-icon { display: grid; place-items: center; width: 20px; }
.side-foot { display: flex; gap: 4px; flex-wrap: wrap; padding: 10px 4px 0; border-top: 1px solid var(--line); }
.side-link { font-size: 12px; color: var(--dim); padding: 4px 8px; border-radius: 8px; display: inline-flex; align-items: center; gap: 4px; }
.side-link:hover { color: var(--text); background: var(--raise); text-decoration: none; }
.studio-link { flex-basis: 100%; color: var(--text); font-weight: 700; }
.section-tabs { display: flex; gap: 8px; overflow: auto; padding: 0 0 12px; margin: -2px 0 10px; border-bottom: 1px solid var(--line); }
.section-tab { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 7px 10px; border-radius: 8px; color: var(--muted); text-decoration: none; white-space: nowrap; border: 1px solid transparent; }
.section-tab:hover { color: var(--text); background: var(--raise); text-decoration: none; }
.section-tab.active { color: var(--text); border-color: var(--line); background: var(--panel); }
.provider-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.provider-card { border: 1px solid var(--line); border-radius: 8px; padding: 14px; background: var(--panel); }
.provider-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.provider-head p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.copy-row { display: flex; gap: 8px; align-items: center; margin: 10px 0; }
.mono-input { font-family: var(--mono); font-size: 12px; }
.field-label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; }
.scrim { display: none; }
.main-wrap { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; padding: 12px 32px; min-height: 62px; background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.crumbs { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; font-size: 13.5px; overflow: hidden; white-space: nowrap; }
.crumb-group { color: var(--dim); }
.crumb-group::after { content: '/'; margin-left: 8px; color: var(--line3); }
.top-actions { display: flex; align-items: center; gap: 8px; }
.live-pill { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 30px; border: 1px solid var(--line2); background: var(--raise); color: var(--muted); font-size: 12px; font-weight: 600; }
.live-pill.on { color: #fff; border-color: #e2739e; background: linear-gradient(135deg, #d9557f, #a8386b); box-shadow: 0 0 22px -6px #e2739e; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; opacity: .6; }
.live-pill.on .live-dot, .feed-live .live-dot { opacity: 1; animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .3; } }
.user-btn { display: inline-flex; align-items: center; gap: 8px; padding: 3px 10px 3px 3px; border-radius: 30px; border: 1px solid var(--line2); background: var(--raise); max-width: 220px; }
.user-btn:hover { border-color: var(--line3); }
.user-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 560; font-size: 13px; }
.content { width: 100%; max-width: 1240px; margin: 0 auto; padding: 26px 32px 110px; outline: none; flex: 1; }
.page { animation: rise .35s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
html.net-busy .topbar::after { content: ''; position: absolute; left: 0; bottom: -1px; height: 2px; width: 30%; background: linear-gradient(90deg, transparent, var(--accent), transparent); animation: loadbar 1.1s ease-in-out infinite; }
@keyframes loadbar { from { transform: translateX(-100%); } to { transform: translateX(400%); } }

/* ------------------------------------------------------------------ avatars, pills, chips */
.avatar { width: var(--size, 32px); height: var(--size, 32px); border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--raise2); }
.avatar.initials { --hue: 270; display: inline-grid; place-items: center; font-size: calc(var(--size, 32px) * .38); font-weight: 700; color: #fff; background: linear-gradient(135deg, hsl(var(--hue) 55% 55%), hsl(calc(var(--hue) + 40) 50% 40%)); }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 30px; border: 1px solid var(--line2); background: var(--raise); color: var(--muted); font-size: 11.5px; font-weight: 600; white-space: nowrap; line-height: 1.4; }
.pill-ok { color: var(--green); border-color: var(--green-line); background: var(--green-bg); }
.pill-warn { color: var(--amber); border-color: var(--amber-line); background: var(--amber-bg); }
.pill-live { color: #fff; border-color: #e2739e; background: linear-gradient(135deg, #d9557f, #a8386b); }
.pill-accent { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }
.count-badge { display: inline-block; vertical-align: middle; margin-left: 10px; padding: 2px 10px; border-radius: 20px; font: 600 12px/1.6 var(--font); letter-spacing: 0; background: var(--accent-soft); color: var(--accent); }
.tier-chip { --c: #8b8798; display: inline-flex; align-items: center; gap: 6px; padding: 3px 11px 3px 9px; border-radius: 20px; font-size: 12px; font-weight: 650; white-space: nowrap;
  color: color-mix(in srgb, var(--c) 62%, #fff); background: color-mix(in srgb, var(--c) 18%, transparent); border: 1px solid color-mix(in srgb, var(--c) 48%, transparent); }
:root[data-theme="light"] .tier-chip { color: color-mix(in srgb, var(--c) 70%, #000); background: color-mix(in srgb, var(--c) 14%, #fff); }
.tier-chip.sm { font-size: 11px; padding: 2px 9px 2px 7px; }
.tier-chip.plain { --c: #a57ce0; }
.tier-chip.ghost { border-style: dashed; }
.tier-emoji { font-size: 1.05em; line-height: 1; }
.chips { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.chip { padding: 2px 8px; border-radius: 7px; background: var(--raise2); border: 1px solid var(--line2); font-size: 12px; }
.test-tag { margin-left: 8px; font-size: 9.5px; letter-spacing: 1px; font-weight: 700; padding: 1px 6px; border-radius: 5px; background: var(--accent-soft); color: var(--accent); vertical-align: 1px; }
.you-tag { margin-left: 8px; font-size: 10.5px; font-weight: 650; padding: 1px 7px; border-radius: 10px; background: var(--raise2); color: var(--muted); }
.role-dot { --c: #99aab5; width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex-shrink: 0; box-shadow: 0 0 0 2px color-mix(in srgb, var(--c) 25%, transparent); }
.role-dot.plain { --c: #8e8a99; }

/* ------------------------------------------------------------------ page scaffolding */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 22px; flex-wrap: wrap; }
.page-title { display: flex; gap: 14px; align-items: flex-start; min-width: 0; flex: 1 1 380px; }
.page-title p { margin: 4px 0 0; max-width: 720px; }
.page-glyph { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; flex-shrink: 0; color: var(--accent); background: linear-gradient(135deg, var(--accent-soft), transparent); border: 1px solid var(--accent-line); box-shadow: 0 0 24px -10px #a57ce0; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.section-heading { margin: 34px 0 14px; }
.section-heading h2 { font-family: var(--serif); font-size: 21px; font-weight: 600; }
.section-heading p { margin: 0; }
.panel { position: relative; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(180deg, var(--panel2), var(--panel)); padding: 20px 22px; min-width: 0; box-shadow: var(--shadow); }
.panel + .panel, .panel + .form-section, .module-body > * + * { margin-top: 18px; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.panel-head p { margin: 0; font-size: 12.5px; }
.panel-head h2::before { content: ''; display: inline-block; width: 6px; height: 6px; background: var(--rose); transform: rotate(45deg); margin: 0 10px 2px 0; border-radius: 1px; box-shadow: 0 0 8px #e2739e88; }
.panel-actions { display: flex; gap: 8px; flex-shrink: 0; align-items: center; }
.muted-panel { background: transparent; box-shadow: none; border-style: dashed; }
.stack { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.stack > .panel + .panel { margin-top: 0; }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 18px; align-items: start; }
.two-col.wide-left { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
.two-col > .panel + .panel { margin-top: 0; }
.card-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 16px; }
.card-actions.end { justify-content: flex-end; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.center-row { display: flex; justify-content: center; margin-top: 10px; }
.callout { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line2); background: var(--raise); margin-bottom: 18px; }
.callout > .icon { margin-top: 2px; color: var(--accent); }
.callout > div { flex: 1; min-width: 0; }
.callout strong { display: block; margin-bottom: 2px; }
.callout p { margin: 0; font-size: 13px; }
.callout > .btn { flex-shrink: 0; align-self: center; }
.callout.warn { border-color: var(--amber-line); background: var(--amber-bg); }
.callout.warn > .icon { color: var(--amber); }
.callout.ok { border-color: var(--green-line); background: var(--green-bg); }
.callout.ok > .icon { color: var(--green); }
.callout.error { border-color: var(--red-line); background: var(--red-bg); color: var(--red); }
.callout.error > .icon { color: var(--red); }
.callout.slim { padding: 9px 12px; margin: 12px 0 0; font-size: 13px; align-items: center; }
.inline-error { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--red-line); background: var(--red-bg); color: var(--red); }
.inline-error > span { flex: 1; min-width: 160px; }
.empty { text-align: center; padding: 34px 20px; display: grid; justify-items: center; gap: 4px; }
.empty-glyph { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-line); margin-bottom: 8px; box-shadow: 0 0 30px -12px #a57ce0; }
.empty h3 { font-size: 16px; margin: 0; }
.empty p { max-width: 420px; margin: 0 0 10px; font-size: 13.5px; }
.skeleton { display: grid; gap: 10px; }
.skeleton.panel + .skeleton.panel { margin-top: 18px; }
.sk-title, .sk-line { display: block; height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--raise) 20%, var(--raise2) 40%, var(--raise) 60%) 0 0 / 300% 100%; animation: shimmer 1.3s linear infinite; }
.sk-title { width: 34%; height: 16px; margin-bottom: 6px; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -200% 0; } }

/* ------------------------------------------------------------------ toasts */
.toasts { position: fixed; top: 74px; right: 20px; z-index: 200; display: flex; flex-direction: column; gap: 10px; width: min(380px, calc(100vw - 24px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: flex-start; gap: 10px; padding: 12px 12px 12px 14px; border-radius: 14px; border: 1px solid var(--line2); background: color-mix(in srgb, var(--panel2) 94%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: var(--pop-shadow); animation: toast-in .28s var(--ease); }
.toast.leaving { animation: toast-out .2s ease forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px) scale(.98); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(16px); } }
.toast-icon { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; background: var(--accent-soft); color: var(--accent); margin-top: 1px; }
.toast-success .toast-icon { background: var(--green-bg); color: var(--green); }
.toast-error { border-color: var(--red-line); }
.toast-error .toast-icon { background: var(--red-bg); color: var(--red); }
.toast-progress .toast-icon { background: none; }
.toast-text { flex: 1; min-width: 0; font-size: 13.5px; padding-top: 2px; overflow-wrap: anywhere; }
.toast-action { border: 0; background: none; color: var(--accent); font-weight: 650; padding: 2px 6px; border-radius: 6px; }
.toast-action:hover { background: var(--accent-soft); }
.toast-close { border: 0; background: none; color: var(--dim); padding: 3px; border-radius: 6px; display: grid; place-items: center; }
.toast-close:hover { color: var(--text); background: var(--raise2); }

/* ------------------------------------------------------------------ dialogs */
.dialog { color: var(--text); background: linear-gradient(180deg, var(--panel2), var(--panel)); border: 1px solid var(--line2); border-radius: 22px; padding: 0; width: min(560px, calc(100% - 24px)); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); box-shadow: var(--pop-shadow); overflow: hidden; display: flex; flex-direction: column; }
.dialog:not([open]) { display: none; }
:root:not([data-theme="light"]) .dialog { background: linear-gradient(180deg, #1a1424, #140f1c); border-color: #4d3866; }
.dialog::backdrop { background: #080611b8; backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); }
:root[data-theme="light"] .dialog::backdrop { background: #241a3466; }
.dialog[open] { animation: dialog-in .26s var(--ease); }
@keyframes dialog-in { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.dialog.wide { width: min(1080px, calc(100% - 24px)); }
.dialog-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 20px 22px 6px 24px; }
.dialog-head h2 { font-family: var(--serif); font-size: 22px; font-weight: 600; margin: 0; }
.dialog-head .eyebrow { margin-bottom: 4px; }
.dialog-body { padding: 10px 24px 20px; overflow: auto; flex: 1; min-height: 0; }
.dialog-foot { display: flex; gap: 10px; justify-content: flex-end; align-items: center; flex-wrap: wrap; padding: 14px 24px; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--sunk) 60%, transparent); }
.dialog-text { margin: 0; font-size: 14px; color: var(--muted); }
.dialog-grid { display: grid; gap: 24px; }
.dialog-grid.has-aside { grid-template-columns: minmax(0, 1fr) minmax(280px, 380px); }
.dialog-aside { min-width: 0; }
.aside-sticky { position: sticky; top: 0; display: grid; gap: 10px; }
.preview-box { min-width: 0; }
.preview-block + .preview-block { margin-top: 14px; }
.kind-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding-bottom: 6px; }
.kind-card { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 18px 16px; border-radius: 16px; border: 1px solid var(--line2); background: var(--raise); text-align: left; transition: border-color .18s, transform .18s, box-shadow .18s; }
.kind-card:hover { border-color: var(--accent2); transform: translateY(-2px); box-shadow: 0 14px 30px -18px #a57ce0; }
.kind-card small { line-height: 1.45; }
.kind-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 6px; color: #fff; }
.k-twitch_live .kind-icon, .beacon-icon.k-twitch_live { background: linear-gradient(135deg, #a970ff, #772ce8); color: #fff; }
.k-youtube_video .kind-icon, .beacon-icon.k-youtube_video { background: linear-gradient(135deg, #ff4e45, #c4302b); color: #fff; }
.k-rss .kind-icon, .beacon-icon.k-rss { background: linear-gradient(135deg, #f7a54a, #e07b16); color: #fff; }

/* ------------------------------------------------------------------ menus + popovers */
.menu-pop, .picker-pop { position: absolute; inset: auto; margin: 0; z-index: 80; padding: 6px; border: 1px solid var(--line2); border-radius: 14px; background: var(--panel2); color: var(--text); box-shadow: var(--pop-shadow); overflow: auto; }
.menu-pop:popover-open, .picker-pop:popover-open { position: fixed; }
:root:not([data-theme="light"]) .menu-pop, :root:not([data-theme="light"]) .picker-pop { background: #171220; border-color: #3a2f4c; }
.menu-heading { padding: 8px 10px 6px; font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--dim); font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-sep { height: 1px; background: var(--line); margin: 5px 4px; }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 9px; background: none; color: var(--text); text-align: left; text-decoration: none !important; font-size: 13.5px; }
.menu-item:hover, .menu-item:focus-visible { background: var(--raise2); outline: none; }
.menu-item:focus-visible { box-shadow: 0 0 0 2px var(--focus) inset; }
.menu-item.danger { color: var(--red); }
.menu-item.current { color: var(--accent); }
.menu-item > .icon { color: var(--muted); }
.menu-item.danger > .icon { color: var(--red); }
.menu-label { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.menu-label small { font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-icon-space { width: 16px; flex-shrink: 0; }
.menu-check { color: var(--accent); }

/* ------------------------------------------------------------------ pickers */
.picker { position: relative; min-width: 0; }
.picker-trigger { display: flex; align-items: center; gap: 8px; width: 100%; min-width: 220px; min-height: 38px; padding: 7px 12px; border: 1px solid var(--line2); border-radius: var(--radius-sm); background: var(--raise); text-align: left; transition: border-color .18s, box-shadow .18s; }
.picker-trigger:hover:not(:disabled) { border-color: var(--line3); }
.picker-trigger[aria-expanded="true"] { border-color: var(--accent2); box-shadow: 0 0 0 3px var(--accent-soft); }
.picker-trigger[aria-invalid="true"], .token-add[aria-invalid="true"] { border-color: var(--red); }
.picker-trigger:disabled { opacity: .6; cursor: not-allowed; }
.picker-trigger .chev { margin-left: auto; color: var(--muted); }
.placeholder { color: var(--dim); }
.tok-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.tok-name.unknown { color: var(--amber); }
.warn-icon { color: var(--amber); }
.ch-icon { color: var(--muted); }
.token-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tokens { display: contents; }
.token { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 10px; border-radius: 20px; border: 1px solid var(--line2); background: var(--raise); font-size: 13px; max-width: 100%; }
.token-x { border: 0; background: none; color: var(--dim); display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; padding: 0; }
.token-x:hover { color: var(--text); background: var(--raise2); }
.token-add { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 20px; border: 1px dashed var(--line3); background: none; color: var(--accent); font-size: 13px; font-weight: 600; }
.token-add:hover { border-style: solid; background: var(--accent-soft); }
.token-add[aria-expanded="true"] { border-style: solid; border-color: var(--accent2); }
.pop-search { display: flex; align-items: center; gap: 8px; padding: 2px 8px 6px; border-bottom: 1px solid var(--line); margin-bottom: 4px; color: var(--muted); }
.pop-search input.pop-search-input { border: 0 !important; background: none !important; box-shadow: none !important; padding: 6px 0 !important; min-height: 32px !important; }
.pop-list { max-height: 300px; overflow: auto; }
.pop-group-label { padding: 8px 10px 4px; font-size: 10.5px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--dim); font-weight: 650; }
.pop-opt { display: flex; align-items: center; gap: 9px; padding: 7px 10px; border-radius: 9px; cursor: pointer; font-size: 13.5px; }
.pop-opt.active { background: var(--raise2); box-shadow: 0 0 0 1px var(--line3) inset; }
.pop-opt.selected { color: var(--accent); }
.pop-opt.is-disabled { opacity: .45; cursor: not-allowed; }
.opt-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.opt-tag { font-size: 10.5px; padding: 1px 7px; border-radius: 10px; background: var(--amber-bg); color: var(--amber); border: 1px solid var(--amber-line); white-space: nowrap; }
.opt-check { width: 16px; display: grid; place-items: center; color: var(--accent); }
.pop-empty { padding: 16px 10px; color: var(--muted); font-size: 13px; text-align: center; }
.pop-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 6px 2px 10px; margin-top: 4px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--dim); }
.picker.fallback .id-input { font-family: var(--mono); }

/* ------------------------------------------------------------------ generated forms */
.module-layout { display: grid; gap: 22px; align-items: start; }
.module-layout.has-aside { grid-template-columns: minmax(0, 1fr) 340px; }
.form-col { min-width: 0; }
.aside-col { position: sticky; top: 84px; min-width: 0; }
.aside-stack { display: grid; gap: 18px; }
.aside-stack > .panel + .panel { margin-top: 0; }
.form { display: grid; gap: 18px; min-width: 0; }
.form.plain { gap: 22px; }
.form-section.panel { padding-bottom: 22px; }
.form-section.plain + .form-section.plain { border-top: 1px solid var(--line); padding-top: 18px; }
.plain-title { font-size: 12px; text-transform: uppercase; letter-spacing: 1.4px; color: var(--accent); margin: 0 0 12px; font-weight: 700; }
.section-desc { margin: -6px 0 14px; font-size: 13px; }
.fields { display: grid; gap: 20px; min-width: 0; }
.field { min-width: 0; }
.field.l-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 24px; align-items: center; }
.field.l-row > .f-error { grid-column: 1 / -1; }
.field.l-row .f-control { justify-self: end; max-width: 100%; }
.field.l-row .picker { min-width: 240px; }
.field.l-stack { display: flex; flex-direction: column; gap: 8px; }
.field.l-slider { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.field.l-slider .f-label-row { justify-content: space-between; }
.f-copy { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.f-label-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.f-label { font-weight: 600; font-size: 14px; color: var(--text); }
.f-help { font-size: 12.5px; color: var(--muted); line-height: 1.5; max-width: 640px; }
.f-control { min-width: 0; }
.f-count { margin-left: auto; font-size: 11px; color: var(--dim); font-variant-numeric: tabular-nums; }
.f-count.near { color: var(--amber); }
.f-error { margin: 0; color: var(--red); font-size: 12.5px; font-weight: 550; display: flex; gap: 6px; align-items: center; }
.f-error::before { content: '!'; display: inline-grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; background: var(--red); color: var(--bg); font-size: 10px; font-weight: 800; flex-shrink: 0; }
.field.invalid .f-label { color: var(--red); }
.field.invalid { animation: nudge .3s ease; }
@keyframes nudge { 30% { transform: translateX(-3px); } 60% { transform: translateX(3px); } }
.form-alert { display: flex; gap: 12px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--red-line); background: var(--red-bg); color: var(--red); }
.form-alert ul { margin: 6px 0 0; padding-left: 18px; }
.form-alert strong { color: var(--red); }
.note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--accent-soft); border: 1px solid var(--accent-line); }
.note .icon { color: var(--accent); margin-top: 2px; }
.note p { margin: 2px 0 0; font-size: 13px; }
.template { display: grid; gap: 10px; }
.template-input { font-family: var(--font); min-height: 60px !important; }
.var-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.var-chip { padding: 3px 9px; border-radius: 8px; border: 1px solid var(--accent-line); background: var(--accent-soft); color: var(--accent); font: 600 12px/1.4 var(--mono); transition: background .15s, transform .12s; }
.var-chip:hover:not(:disabled) { background: color-mix(in srgb, var(--accent2) 30%, transparent); }
.var-chip:active:not(:disabled) { transform: scale(.96); }
.var-chip:disabled { opacity: .45; cursor: default; }
.preview-label { display: flex; align-items: center; gap: 6px; font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--dim); font-weight: 650; }
.choice-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px 6px 8px; border-radius: 20px; border: 1px solid var(--line2); background: var(--raise); font-size: 13px; font-weight: 550; transition: border-color .15s, background .15s; }
.choice:hover:not(:disabled) { border-color: var(--line3); }
.choice-check { width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--line3); display: grid; place-items: center; color: transparent; transition: background .15s; }
.choice[aria-pressed="true"] { border-color: var(--accent2); background: var(--accent-soft); color: var(--text); }
.choice[aria-pressed="true"] .choice-check { background: var(--accent2); border-color: var(--accent2); color: #fff; }
.choice:disabled { opacity: .55; cursor: default; }
details.more { border: 1px dashed var(--line2); border-radius: 14px; padding: 0 14px; }
details.more[open] { padding-bottom: 16px; }
details.more > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 11px 0; color: var(--muted); font-weight: 600; font-size: 13px; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: ''; width: 7px; height: 7px; border-right: 1.8px solid currentColor; border-bottom: 1.8px solid currentColor; transform: rotate(-45deg); transition: transform .2s; margin: 0 3px; }
details.more[open] > summary::before { transform: rotate(45deg); }
details.more > summary:hover { color: var(--text); }
.more-count { font-size: 11px; padding: 0 7px; border-radius: 10px; background: var(--raise2); color: var(--dim); }
.list-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.list-tools { display: flex; align-items: center; gap: 10px; }
.list-count { font-size: 12px; color: var(--dim); font-variant-numeric: tabular-nums; }
.list-items { display: grid; gap: 10px; }
.list-empty { padding: 18px; border: 1px dashed var(--line2); border-radius: 14px; text-align: center; color: var(--muted); font-size: 13px; }
.list-item { border: 1px solid var(--line2); border-radius: 14px; background: var(--raise); transition: border-color .15s, box-shadow .15s, opacity .15s; position: relative; }
:root:not([data-theme="light"]) .list-item { background: #17131f; }
.list-item:hover { border-color: var(--line3); }
.list-item:focus-within { border-color: var(--accent-line); }
.list-item.dragging { opacity: .45; }
.list-item.drop-before::before, .list-item.drop-after::after { content: ''; position: absolute; left: 10px; right: 10px; height: 3px; border-radius: 3px; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.list-item.drop-before::before { top: -7px; }
.list-item.drop-after::after { bottom: -7px; }
.list-item.invalid, .list-item:has(.field.invalid) { border-color: var(--red-line); }
.li-head { display: flex; align-items: center; gap: 6px; padding: 6px 8px 6px 6px; }
.li-grip { cursor: grab; color: var(--dim); display: grid; place-items: center; width: 26px; height: 30px; border-radius: 7px; touch-action: none; }
.li-grip:hover { color: var(--text); background: var(--raise2); }
.li-grip:active { cursor: grabbing; }
.li-title-btn { flex: 1; min-width: 0; display: flex; align-items: center; gap: 9px; border: 0; background: none; padding: 6px 6px; border-radius: 8px; text-align: left; font-weight: 600; }
.li-title-btn:hover { background: var(--raise2); }
.li-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.li-hint { font-weight: 500; color: var(--dim); font-size: 12px; white-space: nowrap; margin-left: auto; padding-left: 6px; }
.li-swatch { --c: #888; width: 12px; height: 12px; border-radius: 4px; background: var(--c); flex-shrink: 0; transform: rotate(45deg); box-shadow: 0 0 8px color-mix(in srgb, var(--c) 60%, transparent); }
.li-actions { display: flex; gap: 2px; align-items: center; }
.li-toggle .icon { transition: transform .2s var(--ease); }
.list-item.collapsed .li-toggle .icon { transform: rotate(-90deg); }
.li-body { padding: 6px 16px 16px 40px; border-top: 1px solid var(--line); }
.list-item.collapsed .li-body { display: none; }
.li-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px 18px; padding-top: 12px; }
.li-grid > .field.wide { grid-column: 1 / -1; }
.li-grid .field.l-row { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
.li-grid .field.l-row .f-control { justify-self: stretch; }
.li-grid .field.f-toggle { flex-direction: row; align-items: center; justify-content: space-between; }
.li-grid .picker { min-width: 0; }
.li-grid .picker-trigger { min-width: 0; }
.li-grid select { width: 100%; }
.li-body details.more { margin-top: 14px; }

/* message preview (Discord-like) */
.msg-preview { display: flex; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--msg-bg); color: var(--msg-text); border: 1px solid #00000024; min-width: 0; font-size: 14px; line-height: 1.4; }
:root[data-theme="light"] .msg-preview { border-color: var(--line); }
.msg-avatar { width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; font-size: 18px; color: #fff; background: linear-gradient(135deg, #b58cee, #6d3fb4); box-shadow: 0 0 14px -4px #a57ce0; }
.msg-main { min-width: 0; flex: 1; display: grid; gap: 4px; }
.msg-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.msg-meta strong { color: #d7b8ff; font-weight: 600; }
:root[data-theme="light"] .msg-meta strong { color: #6d3fb4; }
.bot-tag { font-size: 10px; font-weight: 700; background: #5865f2; color: #fff; padding: 0 5px; border-radius: 4px; line-height: 16px; }
.msg-time { font-size: 11.5px; color: var(--msg-muted); }
.msg-body { overflow-wrap: anywhere; white-space: pre-wrap; }
.msg-body.muted, .msg-body .muted { color: var(--msg-muted); font-style: italic; }
.md-line { min-height: 1.4em; }
.md-quote { border-left: 4px solid #4e5058; padding-left: 10px; }
.md-b { font-weight: 700; }
.md-i { font-style: italic; }
.md-u { text-decoration: underline; }
.md-s { text-decoration: line-through; }
.md-code { font-family: var(--mono); font-size: 85%; background: #1e1f22; padding: 1px 4px; border-radius: 4px; }
:root[data-theme="light"] .md-code { background: #e3e5e8; }
.md-mention { background: var(--mention-bg); color: var(--mention-text); border-radius: 3px; padding: 0 2px; font-weight: 500; }
.embed { --c: #a57ce0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; max-width: 520px; padding: 10px 14px 12px 12px; border-radius: 4px; border-left: 4px solid var(--c); background: var(--embed-bg); margin-top: 4px; }
.embed-text { min-width: 0; display: grid; gap: 4px; }
.embed-author { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 12.5px; font-weight: 600; }
.embed-author img { width: 18px; height: 18px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.embed-author span { overflow-wrap: anywhere; }
.embed-title { font-weight: 700; color: var(--msg-text); }
a.embed-title { color: #00a8fc; }
.embed-desc { font-size: 13.5px; overflow-wrap: anywhere; white-space: pre-wrap; }
.embed-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.embed-field { grid-column: 1 / -1; }
.embed-field.inline { grid-column: auto; }
.ef-name { font-weight: 700; font-size: 12.5px; }
.ef-value { font-size: 13px; white-space: pre-wrap; }
.embed-thumb { width: 64px; height: 64px; border-radius: 4px; object-fit: cover; grid-column: 2; grid-row: 1; }
.embed-image { grid-column: 1 / -1; max-width: 100%; border-radius: 4px; }
.embed-footer { grid-column: 1 / -1; font-size: 11.5px; color: var(--msg-muted); }
.msg-components { display: grid; gap: 6px; margin-top: 4px; }
.msg-row { display: flex; flex-wrap: wrap; gap: 6px; }
.msg-button { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; min-height: 32px; border-radius: 4px; font-size: 13.5px; font-weight: 500; color: #fff; background: #4e5058; }
.mb-primary { background: #5865f2; }
.mb-success { background: #248046; }
.mb-danger { background: #da373c; }
:root[data-theme="light"] .mb-secondary, :root[data-theme="light"] .mb-link { background: #6d6f78; }
.msg-select { display: flex; align-items: center; justify-content: space-between; gap: 10px; max-width: 400px; padding: 9px 12px; border-radius: 4px; background: #1e1f22; color: var(--msg-muted); border: 1px solid #00000040; font-size: 13.5px; }
:root[data-theme="light"] .msg-select { background: #ebedef; }
.tw-chat { background: #18181b; color: #efeff1; border-radius: 10px; padding: 10px 12px; display: grid; gap: 4px; font-size: 13.5px; border: 1px solid #00000040; }
.tw-msg { overflow-wrap: anywhere; }
.tw-user { font-weight: 700; }
.tw-user.viewer { color: #ff7f50; }
.tw-user.bot { color: #bf94ff; }

/* save bar */
.savebar { position: sticky; bottom: 18px; z-index: 35; margin-top: 24px; display: flex; justify-content: center; pointer-events: none; }
.savebar-inner { pointer-events: auto; display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 18px; border-radius: 18px; border: 1px solid var(--accent-line); background: color-mix(in srgb, var(--panel2) 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: var(--pop-shadow), 0 0 40px -18px #a57ce0; width: min(640px, 100%); }
.savebar.enter .savebar-inner { animation: bar-in .32s var(--ease); }
@keyframes bar-in { from { opacity: 0; transform: translateY(16px); } }
.savebar-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 10px var(--amber); flex-shrink: 0; }
.savebar-text { font-weight: 600; flex: 1; min-width: 0; }
.savebar-kbd { font-size: 11px; padding: 2px 7px; border-radius: 6px; border: 1px solid var(--line2); color: var(--dim); }
.savebar-actions { display: flex; gap: 8px; }

/* ------------------------------------------------------------------ module extras */
.live-thumb-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.live-thumb { width: 100%; aspect-ratio: 16 / 9; border-radius: 6px; object-fit: cover; background: var(--raise); border: 1px solid var(--line); }
.live-samples { display: grid; gap: 10px; }
.live-samples .msg-preview { padding: 10px; }
.live-samples .embed { max-width: 100%; }

.ladder-summary { font-size: 13px; margin: -4px 0 12px; }
.ladder { display: grid; gap: 6px; }
.rung { display: grid; grid-template-columns: 74px minmax(0, 1fr) 22px; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; background: var(--raise); animation: rise .3s var(--ease) both; }
.rung-level { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.rung .tier-chip { justify-self: start; max-width: 100%; overflow: hidden; }
.rung-role { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; }
.rung-role.ok { color: var(--green); background: var(--green-bg); }
.rung-role.missing { color: var(--dim); }
.rung.unranked { opacity: .7; }
.action-list { display: grid; gap: 14px; }
.action-row { display: grid; gap: 8px; }
.action-row strong { display: block; }
.action-row small { display: block; }
.action-row .btn { justify-self: start; }
.plain-list { margin: 0; padding-left: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.plain-list code { padding: 3px 8px; border-radius: 7px; background: var(--raise2); }
.embedded-module .module-body > .module-layout { margin-top: 0; }

/* ------------------------------------------------------------------ overview */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin-bottom: 18px; }
.stat-grid > .skeleton.panel + .skeleton.panel { margin-top: 0; }
.stat { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(180deg, var(--panel2), var(--panel)); box-shadow: var(--shadow); min-width: 0; overflow: hidden; }
.stat::after { content: ''; position: absolute; right: -40px; top: -40px; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle, var(--accent-soft), transparent 70%); pointer-events: none; }
.stat-live { border-color: #e2739e88; box-shadow: var(--shadow), 0 0 40px -20px #e2739e; }
.stat-live::after { background: radial-gradient(circle, #e2739e33, transparent 70%); }
.stat-ok .stat-icon { color: var(--green); background: var(--green-bg); border-color: var(--green-line); }
.stat-warn .stat-icon { color: var(--amber); background: var(--amber-bg); border-color: var(--amber-line); }
.stat-top { display: flex; align-items: center; gap: 9px; }
.stat-icon { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-line); }
.stat-label { font-size: 11px; text-transform: uppercase; letter-spacing: 1.3px; color: var(--dim); font-weight: 650; }
.stat-title { font-size: 18px; font-weight: 650; letter-spacing: -.2px; overflow: hidden; text-overflow: ellipsis; margin-top: 4px; }
.title-with-pill { display: inline-flex; align-items: center; gap: 10px; }
.mono-title { font-family: var(--mono); font-size: 15px; }
.stat-line { margin: 0; font-size: 13px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.stat-action { margin-top: auto; padding-top: 8px; }
.checklist-panel .panel-head { align-items: center; }
.progress-ring { --p: 0; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--accent2) calc(var(--p) * 1%), var(--raise2) 0); position: relative; }
.progress-ring::before { content: ''; position: absolute; inset: 5px; border-radius: 50%; background: var(--panel); }
.progress-ring span { position: relative; font-size: 12px; font-weight: 700; }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 8px; }
.check-row { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--raise); color: var(--text); text-decoration: none !important; transition: border-color .15s, transform .15s; }
.check-row:hover { border-color: var(--accent-line); transform: translateX(2px); }
.check-mark { width: 22px; height: 22px; border-radius: 50%; border: 1.5px dashed var(--line3); display: grid; place-items: center; flex-shrink: 0; }
.checklist li.done .check-mark { border: 0; background: linear-gradient(135deg, #8fd6b6, #4fb28a); color: #0b2a1c; }
.checklist li.done .check-label { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line3); }
.check-label { flex: 1; font-weight: 550; font-size: 13.5px; }
.check-go { color: var(--accent); }
.all-set { margin-bottom: 0; }
.mini-board { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.mini-board li { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; }
.mini-board li:nth-child(odd) { background: var(--raise); }
.mb-rank { width: 30px; font-size: 12px; color: var(--dim); font-variant-numeric: tabular-nums; }
.mb-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 560; }
.mb-level { font-size: 12px; color: var(--muted); width: 44px; text-align: right; }
.event-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.event { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px; border-radius: 10px; }
.event:hover { background: var(--raise); }
.event.fresh { animation: fresh 1.8s ease; }
@keyframes fresh { from { background: var(--accent-soft); } }
.ev-icon { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--raise2); color: var(--accent); }
.ev-follow .ev-icon { color: var(--rose); }
.ev-sub .ev-icon, .ev-gift .ev-icon { color: #bf94ff; }
.ev-donation .ev-icon { color: var(--green); }
.ev-raid .ev-icon { color: var(--amber); }
.ev-cheer .ev-icon { color: #7fd0ff; }
.ev-text { font-weight: 560; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-detail { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-time { font-size: 11.5px; color: var(--dim); white-space: nowrap; }

/* ------------------------------------------------------------------ tables (leaderboard, commands) */
.table-wrap { overflow-x: auto; margin: 0 -6px; }
.board, .data-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.board th, .data-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--dim); font-weight: 650; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.board td, .data-table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.board tbody tr:last-child td, .data-table tbody tr:last-child td { border-bottom: 0; }
.board tbody tr, .data-table tbody tr { transition: background .15s; }
.board tbody tr:hover, .data-table tbody tr:hover { background: var(--raise); }
.c-num { text-align: right !important; font-variant-numeric: tabular-nums; white-space: nowrap; }
.c-rank { width: 48px; }
.rank-num { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 600; }
.board tr.top .rank-num { font-size: 18px; }
.member-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.member-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.rank-label { display: block; margin-top: 3px; font-size: 11.5px; }
.c-progress { min-width: 150px; }
.xp-bar { height: 6px; border-radius: 6px; background: var(--raise2); overflow: hidden; }
.xp-bar > span { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--accent2), var(--accent)); box-shadow: 0 0 10px -2px var(--accent2); }
.xp-text { display: block; margin-top: 4px; font-size: 11.5px; font-variant-numeric: tabular-nums; }
.sk-row td { padding: 14px 10px; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; margin-top: 4px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.pager-range { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.pager-buttons { display: flex; gap: 8px; }
.toolbar { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 12px; }
.search-box { position: relative; flex: 1 1 240px; max-width: 360px; display: flex; align-items: center; }
.search-box > .icon { position: absolute; left: 12px; color: var(--dim); pointer-events: none; }
.search-box input { padding-left: 36px !important; }
.segmented { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--raise); border: 1px solid var(--line2); gap: 2px; }
.seg { border: 0; background: none; padding: 5px 12px; border-radius: 9px; font-size: 13px; font-weight: 600; color: var(--muted); }
.seg:hover { color: var(--text); }
.seg[aria-checked="true"], .seg[aria-selected="true"] { background: var(--panel); color: var(--text); box-shadow: 0 1px 3px #0005, 0 0 0 1px var(--line2) inset; }
:root:not([data-theme="light"]) .seg[aria-checked="true"], :root:not([data-theme="light"]) .seg[aria-selected="true"] { background: #2a2139; }
.cmd-table .c-name { white-space: nowrap; }
.cmd-table .c-reply { max-width: 380px; color: var(--muted); }
.cmd-table .c-actions { white-space: nowrap; text-align: right; }
.cmd-table tr.is-off td:not(.c-actions) { opacity: .55; }
.plat-icons { display: inline-flex; gap: 6px; color: var(--muted); }

/* ------------------------------------------------------------------ role menus, beacons, commands dialogs */
.menu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.menu-grid > .panel + .panel { margin-top: 0; }
.menu-card { display: flex; flex-direction: column; }
.menu-card-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.menu-card h2 { font-size: 16px; }
.meta-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.menu-desc { font-size: 13px; margin: 10px 0 0; }
.role-tokens { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.role-token { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 20px; background: var(--raise); border: 1px solid var(--line2); font-size: 12.5px; }
.role-token.more { color: var(--dim); }
.menu-card .card-actions { margin-top: auto; padding-top: 16px; }
.post-card-tools { display: flex; gap: 6px; }
.post-dialog .dialog-body { max-width: 1180px; }
.post-editor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 420px); gap: 18px; align-items: start; }
.post-editor-main { display: grid; gap: 14px; min-width: 0; }
.post-editor-aside { min-width: 0; }
.post-field { display: grid; gap: 6px; min-width: 0; }
.post-field label { font-size: 12px; font-weight: 700; color: var(--muted); }
.post-field.row { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.post-field.wide { grid-column: 1 / -1; }
.post-block-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.post-block-head h2 { font-size: 16px; margin: 0; }
.post-add { display: flex; gap: 8px; flex-wrap: wrap; }
.post-add select { width: auto; }
.post-block-list { display: grid; gap: 10px; }
.post-block .li-body { padding-top: 10px; }
.post-block-type { flex: 1; min-width: 160px; }
.post-block-type select { width: 100%; }
.post-block-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.post-buttons-editor { display: grid; gap: 8px; margin-bottom: 8px; }
.post-button-row { display: grid; grid-template-columns: minmax(100px, 1fr) minmax(130px, 1.4fr) minmax(64px, .55fr) auto; gap: 8px; align-items: end; }
.post-preview-wrap { min-width: 0; }
.discord-v2 { display: grid; gap: 10px; }
.discord-v2 .msg-preview { background: #313338; color: #dbdee1; border-color: #1e1f22; }
.discord-v2-container { border-left: 4px solid var(--post-accent, #a57ce0); background: #2b2d31; border-radius: 8px; padding: 10px; display: grid; gap: 10px; min-width: 0; width: 100%; }
.post-banner { width: 100%; max-height: 180px; object-fit: cover; border-radius: 6px; background: #1e1f22; display: block; }
.post-markdown { color: #dbdee1; font-size: 14px; line-height: 1.45; min-width: 0; }
.post-markdown .md-line { overflow-wrap: anywhere; }
.post-markdown .md-heading { font-size: 18px; font-weight: 800; color: #f2f3f5; margin: 2px 0 4px; }
.post-markdown .md-list { padding-left: 12px; }
.post-heading-preview { color: #f2f3f5; }
.post-separator { border-top: 1px solid #4a4d55; height: 1px; margin: 2px 0; }
.post-separator.large { margin: 10px 0; }
.post-separator.no-line { border-top: 0; height: 8px; }
.post-section-preview { display: grid; grid-template-columns: minmax(0, 1fr) 80px; gap: 12px; align-items: start; }
.post-section-preview img { width: 80px; aspect-ratio: 1; object-fit: cover; border-radius: 6px; background: #1e1f22; }
.post-buttons-preview { display: flex; flex-wrap: wrap; gap: 8px; }
.discord-link-button { min-height: 32px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 5px 12px; border-radius: 4px; background: #4e5058; color: #fff; font-weight: 650; font-size: 13px; text-decoration: none; }
.discord-link-button:hover { background: #5c5f68; color: #fff; }
.beacon-list { display: grid; gap: 12px; }
.beacon-list > .panel + .panel { margin-top: 0; }
.beacon { padding: 16px 18px; }
.beacon.is-off { opacity: .75; }
.beacon.has-error { border-color: var(--red-line); }
.beacon-main { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 14px; align-items: center; }
.beacon-icon { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; }
.beacon-title { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 15px; }
.beacon-sub { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); min-width: 0; }
.beacon-sub .sep { color: var(--dim); }
.beacon-meta { font-size: 12px; color: var(--dim); }
.beacon .card-actions { margin-top: 12px; }
.source-row { display: flex; gap: 8px; }
.source-row input { flex: 1; }
.resolved:empty { display: none; }
.resolved-card { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--green-line); background: var(--green-bg); animation: rise .25s var(--ease); }
.resolved-card > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.resolved-card small { overflow: hidden; text-overflow: ellipsis; }
.ok-icon { color: var(--green); }

/* ------------------------------------------------------------------ overlays */
.overlay-links { display: grid; gap: 12px; }
.overlay-row { display: grid; grid-template-columns: minmax(180px, 260px) minmax(0, 1fr); gap: 16px; align-items: center; padding: 12px 14px; border-radius: 14px; background: var(--raise); border: 1px solid var(--line); }
.overlay-copy { display: flex; flex-direction: column; min-width: 0; }
.url-box { display: flex; gap: 6px; align-items: center; min-width: 0; }
.url-field { flex: 1; min-width: 0; font-size: 12.5px !important; color: var(--muted) !important; }
.links-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.links-foot small { display: inline-flex; align-items: center; gap: 4px; }
.preview-tools { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.stage { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; border: 1px solid var(--line2);
  background: repeating-conic-gradient(#17131f 0 25%, #1d1827 0 50%) 0 0 / 22px 22px; }
:root[data-theme="light"] .stage { background: repeating-conic-gradient(#ece7f3 0 25%, #f6f3fa 0 50%) 0 0 / 22px 22px; }
.stage > p { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; }
.overlay-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: transparent; }
.test-buttons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.test-btn { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 8px; border-radius: 13px; border: 1px solid var(--line2); background: var(--raise); font-weight: 600; font-size: 13px; transition: border-color .15s, transform .12s, box-shadow .15s; position: relative; }
.test-btn:hover:not(:disabled) { border-color: var(--accent2); box-shadow: 0 10px 24px -16px #a57ce0; transform: translateY(-1px); }
.test-btn:disabled { opacity: .5; cursor: default; }
.test-btn .icon { color: var(--accent); }
.t-follow .icon { color: var(--rose); } .t-donation .icon { color: var(--green); } .t-raid .icon { color: var(--amber); } .t-cheer .icon { color: #7fd0ff; }
.test-btn[aria-busy="true"] .icon, .test-btn[aria-busy="true"] span { visibility: hidden; }
.test-btn[aria-busy="true"]::after { content: ''; position: absolute; width: 18px; height: 18px; top: calc(50% - 9px); border-radius: 50%; border: 2px solid var(--line3); border-top-color: var(--accent); animation: spin .7s linear infinite; }
.test-more { margin-top: 12px; }
.test-inputs { display: grid; gap: 8px; }
.counters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; }
.counters div { padding: 12px; border-radius: 12px; background: var(--raise); text-align: center; }
.counters dt { font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--dim); }
.counters dd { margin: 4px 0 0; font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.feed-live { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--green); font-weight: 600; }
.feed-live.off { color: var(--dim); }
.feed .event-list { max-height: 460px; overflow: auto; }
.kv { display: grid; gap: 12px; margin: 0; }
.kv > div { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 12px; align-items: center; }
.kv dt { font-size: 12px; color: var(--dim); font-weight: 600; }
.kv dd { margin: 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; min-width: 0; }
.kv code.wrap { overflow-wrap: anywhere; }
.secret { padding: 4px 10px; border-radius: 8px; background: var(--raise2); letter-spacing: .5px; overflow-wrap: anywhere; }
.examples { margin-top: 16px; }
.code-block { margin: 0; padding: 14px 16px; border-radius: 12px; background: #0d0b12; color: #e6dcf5; border: 1px solid var(--line2); overflow: auto; max-height: 320px; font-size: 12.5px; line-height: 1.55; }
:root[data-theme="light"] .code-block { background: #221a2e; color: #efe7fb; }
.hook-intro { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.hook-intro p { margin: 0; font-size: 13px; max-width: 540px; }

/* ------------------------------------------------------------------ connections + team */
.conn-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; align-items: start; }
.conn-grid > .panel + .panel { margin-top: 0; }
.conn { display: flex; flex-direction: column; }
.conn-head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.conn-head h2 { margin: 0 0 3px; font-size: 17px; }
.conn-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--raise2); color: var(--accent); flex-shrink: 0; }
.conn-ok .conn-icon { background: var(--green-bg); color: var(--green); }
.conn-warn .conn-icon { background: var(--amber-bg); color: var(--amber); }
.conn-body p { font-size: 13.5px; margin-bottom: 8px; }
.conn-identity { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--raise); margin-bottom: 12px; }
.conn-identity > div { display: flex; flex-direction: column; min-width: 0; }
.feed-counts { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.feed-counts li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--raise); font-size: 13px; }
.feed-counts li span { flex: 1; }
.members { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; }
.member { display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-radius: 12px; }
.member:hover { background: var(--raise); }
.member-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.member-text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-controls { display: flex; align-items: center; gap: 6px; }
.role-select { min-width: 120px !important; }
.invite-row { display: flex; gap: 8px; flex-wrap: wrap; }
.invite-row input { flex: 1 1 220px; width: auto; font-family: var(--mono); }
.role-legend { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.role-legend dt { font-weight: 650; }
.role-legend dd { margin: 2px 0 0; color: var(--muted); font-size: 13px; }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1180px) {
  .module-layout.has-aside { grid-template-columns: minmax(0, 1fr); }
  .aside-col { position: static; }
  .aside-stack { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
}
@media (max-width: 1000px) {
  .two-col, .two-col.wide-left { grid-template-columns: minmax(0, 1fr); }
  .dialog-grid.has-aside { grid-template-columns: minmax(0, 1fr); }
  .aside-sticky { position: static; }
}
@media (max-width: 768px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: min(300px, 86vw); height: 100%; transform: translateX(-102%); transition: transform .28s var(--ease), visibility 0s linear .28s; visibility: hidden; box-shadow: 30px 0 60px -30px #000; }
  .drawer-open .sidebar { transform: none; visibility: visible; transition: transform .28s var(--ease); }
  .drawer-close, .menu-btn { display: inline-flex !important; }
  .scrim { display: block; position: fixed; inset: 0; z-index: 39; background: #05030a99; opacity: 0; pointer-events: none; transition: opacity .25s; backdrop-filter: blur(2px); }
  .drawer-open .scrim { opacity: 1; pointer-events: auto; }
  .topbar { padding: 10px 16px; }
  .content { padding: 20px 16px 110px; }
  .user-name { display: none; }
  .user-btn { padding: 3px; }
  .user-btn > .icon { display: none; }
}
@media (max-width: 720px) {
  h1 { font-size: 25px; }
  .page-glyph { width: 38px; height: 38px; border-radius: 12px; }
  .page-head { margin-bottom: 16px; }
  .panel { padding: 16px; border-radius: 16px; }
  .field.l-row { grid-template-columns: minmax(0, 1fr); }
  .field.l-row .f-control { justify-self: stretch; }
  .field.l-row.f-toggle, .field.l-row.f-number, .field.l-row.f-color { grid-template-columns: minmax(0, 1fr) auto; }
  .field.l-row.f-toggle .f-control, .field.l-row.f-number .f-control, .field.l-row.f-color .f-control { justify-self: end; }
  .field.l-row .picker, .picker-trigger { min-width: 0; }
  .field.l-row select { width: 100%; }
  .li-body { padding: 4px 12px 14px; }
  .li-hint { display: none; }
  .savebar { bottom: 10px; }
  .savebar-inner { padding: 8px 8px 8px 14px; gap: 8px; }
  .savebar-kbd { display: none; }
  .savebar-text { font-size: 13px; }
  .savebar-actions .btn { padding: 6px 12px; min-height: 36px; }
  .toasts { top: auto; bottom: 84px; right: 12px; left: 12px; width: auto; }
  .crumb-group { display: none; }
  .dialog { width: calc(100% - 16px); max-height: calc(100dvh - 16px); border-radius: 18px; }
  .dialog-head { padding: 16px 16px 4px; }
  .dialog-body { padding: 8px 16px 16px; }
  .dialog-foot { padding: 12px 16px; }
  .kind-grid { grid-template-columns: minmax(0, 1fr); }
  .kind-card { flex-direction: row; align-items: center; gap: 12px; padding: 12px; }
  .kind-card .kind-icon { margin: 0; flex-shrink: 0; }
  .kind-card small { display: none; }
  .overlay-row { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .test-buttons { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .menu-grid { grid-template-columns: minmax(0, 1fr); }
  .post-editor { grid-template-columns: minmax(0, 1fr); }
  .post-block-fields, .post-button-row { grid-template-columns: minmax(0, 1fr); }
  .post-section-preview { grid-template-columns: minmax(0, 1fr); }
  .post-section-preview img { width: 100%; max-height: 160px; aspect-ratio: 16 / 9; }
  .beacon-main { grid-template-columns: 40px minmax(0, 1fr); }
  .beacon-toggle { grid-column: 2; }
  .beacon-icon { width: 40px; height: 40px; }
  .kv > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .solo-top { padding: 14px 16px; }
  .signin-card, .wizard { padding: 24px 18px; }
  .steps li > span:not(.step-dot) { display: none; }
  .steps li.current > span:not(.step-dot) { display: inline; }
  .table-wrap { margin: 0; overflow: visible; }
  .board, .board tbody { display: block; }
  .board thead { display: none; }
  .board tr { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; grid-template-areas: "rank member level" ". tier total" ". progress progress"; gap: 6px 10px; padding: 12px 2px; border-bottom: 1px solid var(--line); align-items: center; }
  .board td { padding: 0; border: 0 !important; }
  .board .c-rank { grid-area: rank; width: auto; }
  .board .c-member { grid-area: member; min-width: 0; }
  .board .c-tier { grid-area: tier; }
  .board .c-level { grid-area: level; }
  .board .c-total { grid-area: total; color: var(--muted); font-size: 12px; }
  .board .c-total::after { content: ' XP'; }
  .board .c-level::before { content: attr(data-label) ' '; color: var(--muted); font-size: 12px; }
  .board .c-progress { grid-area: progress; min-width: 0; }
  .board .sk-row { display: block; }
  .board .sk-row td { display: block; padding: 6px 0; }
  .member-name { max-width: none; }
  .cmd-table, .cmd-table tbody { display: block; }
  .cmd-table thead { display: none; }
  .cmd-table tr { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 12px 2px; border-bottom: 1px solid var(--line); }
  .cmd-table td { padding: 0; border: 0 !important; }
  .cmd-table .c-name { flex: 1 1 auto; }
  .cmd-table .c-actions { order: 1; }
  .cmd-table .c-reply { order: 2; flex-basis: 100%; max-width: none; }
  .cmd-table td[data-label] { order: 3; font-size: 12.5px; display: inline-flex; align-items: center; gap: 6px; }
  .cmd-table td[data-label]::before { content: attr(data-label); color: var(--dim); font-size: 11px; text-transform: uppercase; letter-spacing: 1px; }
  .search-box { max-width: none; }
}
@media (max-width: 420px) {
  .content { padding: 16px 12px 110px; }
  .topbar { gap: 6px; }
  .top-actions { gap: 6px; }
  .live-pill { padding: 4px 9px; gap: 5px; }
  /* Narrow phones: the pill keeps the dot and the viewer count; the words stay in its label and title. */
  .live-pill .live-label, .live-pill .live-sep { display: none; }
  .live-pill:not(:has(.live-count)) { padding: 4px 7px; }
  .top-lang .lang-opt { min-width: 28px; padding: 4px 6px; }
  .counters dd { font-size: 17px; }
  .savebar-text { display: none; }
  .savebar-inner { justify-content: space-between; }
  .source-row { flex-direction: column; }
  .member { flex-wrap: wrap; row-gap: 8px; }
  .member-controls { margin-left: 52px; flex-wrap: wrap; }
  .url-box { flex-wrap: wrap; }
  .url-field { flex-basis: 100%; }
}

/* ------------------------------------------------------------------ motion + forced colours */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) {
  .btn, .panel, .picker-trigger, .list-item, .toast, .dialog { border: 1px solid CanvasText; }
  .nav-item[aria-current="page"] { outline: 2px solid Highlight; }
  input[type=checkbox].switch { appearance: auto; -webkit-appearance: auto; width: auto; height: auto; }
  input[type=checkbox].switch::before { display: none; }
}

/* Release 1: shared tree and module skeleton. All colors follow the theme tokens. */
.tree-shell .nav { gap: var(--space-3); }
.tree-group { display: grid; gap: var(--space-1); }
.tree-section { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); width: 100%; padding: var(--space-2); background: transparent; border: 0; border-radius: 8px; text-align: left; color: var(--muted); font-size: 10.5px; font-weight: 650; text-transform: uppercase; letter-spacing: 1.2px; }
.tree-section:hover { color: var(--text); background: var(--raise); }
.tree-section .icon { transition: transform .18s; }
.tree-section[aria-expanded="false"] .icon { transform: rotate(-90deg); }
.tree-leaves { display: grid; gap: 2px; padding-left: var(--space-2); }
.tree-leaf { gap: var(--space-2); padding: var(--space-2); min-height: 36px; font-size: 13px; font-weight: 400; }
.tree-leaf > .icon { color: var(--dim); }
.tree-leaf .nav-label { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.tree-leaf[aria-current="page"] { background: var(--accent-soft); color: var(--text); box-shadow: 0 0 0 1px var(--accent-line) inset; }
.tree-leaf[aria-current="page"] > .icon { color: var(--accent); }
.tree-status { min-width: 10px; flex-shrink: 0; text-align: center; color: var(--muted); font-size: 14px; }
.tree-status[data-status="off"] { color: var(--dim); }
.nav-drawer-open { overflow: hidden; }
.module-enable { max-width: 100%; padding: var(--space-2) var(--space-3); border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--panel); }
.module-enable .field.l-row { grid-template-columns: minmax(0, 1fr) 42px; gap: var(--space-3); }
.module-enable .f-label { font-size: 13px; font-weight: 500; overflow-wrap: anywhere; }
.module-enable .f-help { display: none; }
.module-card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-4); }
.page-title > div { min-width: 0; }
.page-title p, .f-copy, .panel-head > div { overflow-wrap: anywhere; }
.page-actions { max-width: 100%; }
.tree-shell .page-head { gap: var(--space-4); margin-bottom: var(--space-5); }
.tree-shell .fields { gap: var(--space-5); }
.tree-shell .module-layout { gap: var(--space-5); }
.field-target { outline: 2px solid var(--focus); outline-offset: 5px; border-radius: 6px; scroll-margin-top: 90px; }
.role-off { display: block; }
.roles-table { table-layout: fixed; }
.roles-table th, .roles-table td { overflow-wrap: anywhere; white-space: normal; }
.settings-list { display: grid; gap: var(--space-4); }
.rewards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: var(--space-4); }
.rewards-icon-row { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; margin-bottom: var(--space-4); }
.rewards-icon-row img { object-fit: contain; }
.rewards-form .field { display: grid; gap: var(--space-2); }
.rewards-form input:not([type=checkbox]) { width: 100%; min-width: 0; }
.rewards-form details { display: grid; gap: var(--space-3); }
.rewards-request { margin-top: var(--space-3); overflow-wrap: anywhere; }
.rewards-scope { display: grid; justify-items: start; overflow-wrap: anywhere; }
.setting-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 240px); align-items: center; gap: var(--space-3); }
.setting-row > span { min-width: 0; overflow-wrap: anywhere; }
.setting-row:has(> .switch) { grid-template-columns: minmax(0, 1fr) 42px; }
.setting-row > .switch { justify-self: end; }
@media (max-width: 768px) {
  .topbar { gap: var(--space-2); }
  .top-actions { gap: var(--space-1); }
  .crumbs strong { overflow: hidden; text-overflow: ellipsis; }
  .page-actions { width: 100%; }
  .module-enable { width: 100%; }
  .setting-row:not(:has(> .switch)) { grid-template-columns: minmax(0, 1fr); }
  .provider-grid { grid-template-columns: minmax(0, 1fr); }
  .panel-head { flex-wrap: wrap; }
  .panel-actions, .copy-row { min-width: 0; max-width: 100%; flex-wrap: wrap; }
  .copy-row > input { flex: 1 1 160px; min-width: 0; }
  .mini-row { display: flex; flex-wrap: wrap; gap: var(--space-2); }
  .mini-row .picker { flex: 1 1 160px; min-width: 0; }
}
