/* ░░░ ToolWizHub — MediaKit · glass / gradient theme ░░░ */

/* ── Splash (house standard) ──────────────────────── */
.splash { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; overflow: hidden; cursor: pointer;
  background: radial-gradient(56% 46% at 50% 42%, rgba(255,184,72,0.16), transparent 70%), radial-gradient(120% 90% at 100% 0%, #123a44 0%, transparent 55%), radial-gradient(120% 90% at 0% 100%, #2a1840 0%, transparent 55%), #07070d;
  transition: opacity 0.55s ease, visibility 0.55s ease; animation: splash-failsafe 0s linear 5s forwards; }
html.no-splash .splash { display: none; }
.splash.is-hiding { opacity: 0; visibility: hidden; pointer-events: none; }
.splash.is-hiding .splash__stage { transform: scale(1.08); }
.splash__stage { position: relative; display: flex; flex-direction: column; align-items: center; gap: 22px; transition: transform 0.55s cubic-bezier(0.22,1,0.36,1); }
.splash__glow { position: absolute; top: 42%; left: 50%; width: 320px; height: 320px; transform: translate(-50%,-50%); pointer-events: none; background: radial-gradient(circle, rgba(255,184,72,0.34), rgba(34,211,238,0.16) 45%, transparent 70%); filter: blur(10px); animation: splash-glow 2.4s ease-in-out infinite; }
@keyframes splash-glow { 0%,100% { opacity: 0.55; transform: translate(-50%,-50%) scale(0.9); } 50% { opacity: 1; transform: translate(-50%,-50%) scale(1.1); } }
.splash__logo { position: relative; width: clamp(150px,42vw,200px); height: auto; filter: drop-shadow(0 14px 34px rgba(0,0,0,0.55)); animation: splash-in 0.8s cubic-bezier(0.34,1.56,0.64,1) both, splash-float 3.2s ease-in-out 0.8s infinite; }
@keyframes splash-in { from { opacity: 0; transform: scale(0.6) rotate(-8deg); } to { opacity: 1; transform: scale(1) rotate(0); } }
@keyframes splash-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.splash__tagline { font-family: "Space Grotesk",sans-serif; font-weight: 700; font-size: 14px; letter-spacing: 7px; text-transform: uppercase; padding-left: 7px; color: #ffd486; text-shadow: 0 2px 12px rgba(255,184,72,0.4); opacity: 0; animation: splash-fade 0.6s ease 0.55s forwards; }
@keyframes splash-fade { to { opacity: 0.95; } }
.splash__bar { width: 168px; height: 5px; border-radius: 999px; background: rgba(255,255,255,0.12); overflow: hidden; }
.splash__bar > span { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg,#ffb648,#22d3ee,#e879f9); animation: splash-bar 1.5s ease 0.3s forwards; }
@keyframes splash-bar { from { width: 0; } to { width: 100%; } }
.splash__sparkles { position: absolute; inset: -10% -20%; pointer-events: none; }
.splash__sparkles span { position: absolute; width: 9px; height: 9px; border-radius: 50%; background: #fff; box-shadow: 0 0 10px 2px rgba(255,212,134,0.9); opacity: 0; animation: splash-sparkle 1.9s ease-in-out infinite; }
.splash__sparkles span:nth-child(1){top:26%;left:28%;animation-delay:0s}.splash__sparkles span:nth-child(2){top:20%;left:70%;animation-delay:.45s}.splash__sparkles span:nth-child(3){top:58%;left:20%;animation-delay:.9s}.splash__sparkles span:nth-child(4){top:62%;left:78%;animation-delay:.25s}.splash__sparkles span:nth-child(5){top:36%;left:86%;animation-delay:.65s}.splash__sparkles span:nth-child(6){top:78%;left:48%;animation-delay:1.1s}
@keyframes splash-sparkle { 0%,100% { opacity: 0; transform: scale(0); } 40% { opacity: 1; transform: scale(1.25); } 70% { opacity: 0.6; transform: scale(0.9); } }
@keyframes splash-failsafe { to { opacity: 0; visibility: hidden; pointer-events: none; } }

:root {
  --bg:#07070d; --text:#f4f5fb; --soft:#c2c6da; --muted:#8087a0; --faint:#5a6080;
  --glass:rgba(255,255,255,0.045); --glass-2:rgba(255,255,255,0.07); --line:rgba(255,255,255,0.09); --line-strong:rgba(255,255,255,0.16);
  --c1:#22d3ee; --c2:#818cf8; --c3:#e879f9; --grad:linear-gradient(110deg,var(--c1),var(--c2) 55%,var(--c3)); --gold:#ffb648;
  --ok:#34d399; --warn:#fbbf24; --fail:#fb7185;
  --r:22px; --r-sm:14px; --r-pill:999px;
  --mono:"JetBrains Mono",ui-monospace,Menlo,monospace; --sans:"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif; --display:"Space Grotesk",var(--sans); --ease:cubic-bezier(0.22,1,0.36,1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body { font-family: var(--sans); color: var(--text); background: var(--bg); min-height: 100vh; line-height: 1.55; -webkit-font-smoothing: antialiased; position: relative; overflow-x: hidden; }
body::before, body::after { content:""; position: fixed; z-index: -1; border-radius: 50%; filter: blur(90px); opacity: 0.5; pointer-events: none; }
body::before { width: 50vw; height: 50vw; top: -14vw; right: -10vw; background: radial-gradient(circle, rgba(34,211,238,0.5), transparent 70%); animation: drift1 18s var(--ease) infinite alternate; }
body::after { width: 46vw; height: 46vw; bottom: -16vw; left: -10vw; background: radial-gradient(circle, rgba(232,121,249,0.42), transparent 70%); animation: drift2 22s var(--ease) infinite alternate; }
@keyframes drift1 { to { transform: translate(-8vw,10vw) scale(1.15); } }
@keyframes drift2 { to { transform: translate(8vw,-8vw) scale(1.1); } }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select { font-family: inherit; }
a { color: var(--c1); }

.app { max-width: 1280px; margin: 0 auto; padding: 22px clamp(16px,4vw,48px) 64px; }

/* App bar */
.appbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 26px; }
.brand { display: inline-flex; align-items: center; gap: 13px; padding: 10px 16px 10px 12px; border-radius: var(--r-pill); text-decoration: none; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(14px); transition: border-color 0.25s, transform 0.25s var(--ease); }
.brand:hover { transform: translateY(-1px); border-color: var(--line-strong); }
.brand__mark { width: 38px; height: 38px; border-radius: 12px; object-fit: cover; box-shadow: 0 6px 18px rgba(0,0,0,0.5); }
.brand__text { display: flex; flex-direction: column; gap: 2px; line-height: 1.1; }
.brand__text strong { font-family: var(--display); font-size: 16px; font-weight: 700; color: #fff; }
.brand__text span { font-size: 9px; letter-spacing: 0.2em; color: var(--muted); font-weight: 600; }
.local-badge { font-size: 12px; font-weight: 600; color: var(--ok); background: rgba(52,211,153,0.1); border: 1px solid rgba(52,211,153,0.25); border-radius: var(--r-pill); padding: 7px 14px; }

/* Workbench layout */
.workbench { display: grid; grid-template-columns: 248px 1fr; gap: 22px; align-items: start; }
.sidebar { position: sticky; top: 18px; background: var(--glass); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; backdrop-filter: blur(14px); }
.tool-nav { display: flex; flex-direction: column; gap: 2px; }
.nav-group__title { display: flex; align-items: center; gap: 8px; font-family: var(--display); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); padding: 14px 12px 6px; }
.nav-group__icon { font-size: 14px; }
.nav-item { display: block; text-decoration: none; color: var(--soft); font-size: 14px; font-weight: 500; padding: 9px 12px; border-radius: 10px; transition: background 0.18s, color 0.18s; }
.nav-item:hover { background: var(--glass-2); color: #fff; }
.nav-item.is-active { background: var(--grad); color: #04141a; font-weight: 600; }

.work { min-width: 0; }
.work__head { margin-bottom: 20px; }
.work__cat { font-size: 12px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.work__title { font-family: var(--display); font-size: clamp(24px,4vw,34px); font-weight: 700; color: #fff; letter-spacing: -0.5px; margin: 4px 0; }
.work__desc { color: var(--soft); font-size: 15px; }
.work__note { margin-top: 10px; font-size: 13px; color: var(--warn); background: rgba(251,191,36,0.08); border: 1px solid rgba(251,191,36,0.2); border-radius: var(--r-sm); padding: 10px 14px; }

/* Tool surface */
.tool { background: var(--glass); border: 1px solid var(--line); border-radius: var(--r); padding: clamp(16px,3vw,28px); backdrop-filter: blur(14px); }

/* Dropzone */
.dz { border: 2px dashed var(--line-strong); border-radius: var(--r-sm); padding: 34px 20px; text-align: center; cursor: pointer; transition: border-color 0.2s, background 0.2s, transform 0.2s var(--ease); outline: none; }
.dz:hover, .dz:focus-visible, .dz.is-over { border-color: var(--c1); background: rgba(34,211,238,0.05); transform: translateY(-1px); }
.dz__icon { font-size: 26px; color: var(--c1); margin-bottom: 8px; }
.dz__label { font-weight: 600; color: var(--text); }
.dz__hint { font-size: 12px; color: var(--faint); margin-top: 4px; font-family: var(--mono); }

/* File list */
.file-list { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.file-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 9px 14px; background: var(--glass-2); border: 1px solid var(--line); border-radius: 10px; }
.file-row__name { font-size: 14px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-row__meta { font-size: 12px; color: var(--muted); font-family: var(--mono); flex-shrink: 0; }

/* Controls */
.controls { display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: 14px; margin: 20px 0; }
.ctl { display: flex; flex-direction: column; gap: 6px; }
.ctl__label { font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.ctl__hint { font-size: 11.5px; color: var(--faint); font-family: var(--mono); }
.inp { width: 100%; background: rgba(0,0,0,0.25); border: 1px solid var(--line-strong); border-radius: 10px; padding: 10px 12px; color: var(--text); font-size: 14px; outline: none; transition: border-color 0.2s, box-shadow 0.25s var(--ease); }
.inp:focus { border-color: transparent; box-shadow: 0 0 0 1.5px var(--c1); }
select.inp { cursor: pointer; }
select.inp option { background: #0d0e18; }

/* ── Custom glass dropdown ─────────────────────────── */
.csel { position: relative; width: 100%; }
.csel__btn { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; background: rgba(0,0,0,0.25); border: 1px solid var(--line-strong); border-radius: 10px; padding: 10px 12px; color: var(--text); font-size: 14px; font-weight: 500; cursor: pointer; transition: border-color .2s, box-shadow .25s var(--ease), background .2s; }
.csel__btn:hover { background: rgba(255,255,255,0.05); }
.csel.is-open .csel__btn, .csel__btn:focus-visible { border-color: transparent; box-shadow: 0 0 0 1.5px var(--c1), 0 0 22px rgba(34,211,238,0.22); outline: none; }
.csel__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.csel__chev { flex-shrink: 0; width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 6px solid var(--muted); transition: transform .25s var(--ease); }
.csel.is-open .csel__chev { transform: rotate(180deg); }
.csel__menu { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 60; list-style: none; margin: 0; padding: 6px; max-height: 280px; overflow-y: auto; background: rgba(13,14,24,0.86); backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%); border: 1px solid var(--line-strong); border-radius: 14px; box-shadow: 0 24px 60px rgba(0,0,0,0.6), inset 0 0 0 1px rgba(255,255,255,0.03); animation: csel-in .16s var(--ease); }
@keyframes csel-in { from { opacity: 0; transform: translateY(-6px) scale(0.98); } to { opacity: 1; transform: none; } }
.csel__opt { display: flex; align-items: center; padding: 9px 12px 9px 30px; border-radius: 9px; font-size: 14px; color: var(--soft); cursor: pointer; position: relative; transition: background .15s, color .15s; }
.csel__opt.is-active { background: var(--glass-2); color: #fff; }
.csel__opt.is-sel { color: #fff; font-weight: 600; background: linear-gradient(90deg, rgba(34,211,238,0.14), transparent 80%); }
.csel__opt.is-sel::before { content: ""; position: absolute; left: 12px; top: 48%; width: 5px; height: 9px; border: solid var(--c1); border-width: 0 2px 2px 0; transform: translateY(-60%) rotate(45deg); }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--c1); cursor: pointer; }
.range { width: 100%; accent-color: var(--c1); }
.range-wrap { display: flex; align-items: center; gap: 10px; }
input[type=number]::-webkit-inner-spin-button { opacity: 0.5; }
input::-webkit-calendar-picker-indicator { filter: invert(0.7); }

/* Buttons / actions */
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.btn { padding: 12px 24px; border-radius: var(--r-pill); font-weight: 600; font-size: 14px; color: var(--soft); background: var(--glass-2); border: 1px solid var(--line-strong); transition: transform 0.18s var(--ease), border-color 0.2s, color 0.2s; }
.btn:hover { transform: translateY(-1px); color: #fff; border-color: var(--c1); }
.btn--primary { color: #1a1205; background: linear-gradient(110deg,var(--gold),#ffd486); border: none; box-shadow: 0 10px 28px rgba(255,182,72,0.3); }
.btn--primary:hover { box-shadow: 0 14px 36px rgba(255,182,72,0.42); }

/* Status / progress */
.status { margin-top: 16px; font-size: 13px; color: var(--soft); display: flex; align-items: center; gap: 12px; min-height: 20px; }
.status.is-err { color: var(--fail); font-weight: 600; }
.status__track { display: inline-block; width: 200px; max-width: 50%; height: 8px; background: rgba(255,255,255,0.08); border-radius: var(--r-pill); overflow: hidden; }
.status__bar { display: block; height: 100%; width: 0; background: var(--grad); border-radius: var(--r-pill); transition: width 0.2s; }

/* Audio preview */
.audio-prev { width: 100%; margin-top: 14px; border-radius: var(--r-pill); }

/* Crop stage */
.crop-stage { position: relative; display: inline-block; margin-top: 14px; max-width: 100%; touch-action: none; }
.crop-canvas { display: block; max-width: 100%; border-radius: var(--r-sm); border: 1px solid var(--line); }
.crop-sel { position: absolute; border: 2px solid var(--c1); background: rgba(34,211,238,0.14); box-shadow: 0 0 0 9999px rgba(0,0,0,0.45); pointer-events: none; }

/* Footer */
.app-footer { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 50px; padding-top: 22px; border-top: 1px solid var(--line); }
.app-footer__brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; opacity: 0.5; transition: opacity 0.2s; }
.app-footer__brand:hover { opacity: 1; }
.app-footer__label { font-size: 12px; font-weight: 600; color: var(--muted); }
.app-footer__brand img { height: 20px; width: auto; display: block; }
.app-footer__credit { font-size: 12px; color: var(--faint); text-align: center; }
.app-footer__credit a { color: var(--muted); }

/* Sidebar sub-groups */
.nav-sub { font-size: 10px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); padding: 10px 12px 4px; }

/* Result area */
.result { margin-top: 18px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--glass); display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.result__head { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ok); }
.result__img { max-width: 100%; max-height: 360px; border-radius: 10px; border: 1px solid var(--line); background: repeating-conic-gradient(#1a1c28 0% 25%, #11131c 0% 50%) 50% / 20px 20px; }
.result__media { width: 100%; max-width: 520px; border-radius: 10px; }
.result__file { font-size: 15px; color: var(--text); }
.result__meta { font-size: 12.5px; color: var(--muted); font-family: var(--mono); }

/* Extra control widgets */
.inp--color { width: 48px; height: 38px; padding: 2px; cursor: pointer; }
.ta { width: 100%; resize: vertical; font-family: var(--mono); font-size: 12.5px; line-height: 1.5; }
.pair { display: flex; gap: 8px; }
.pair .inp { width: 100%; }
.btn-row { display: flex; gap: 6px; flex-wrap: wrap; }
.btn--sm { padding: 7px 12px; font-size: 12.5px; }
.adjust-canvas { display: block; max-width: 100%; max-height: 460px; margin-top: 14px; border-radius: var(--r-sm); border: 1px solid var(--line); }
.gen-out { margin-top: 16px; display: flex; flex-direction: column; gap: 12px; }
.ascii-out { margin-top: 14px; padding: 12px; background: #05060a; border: 1px solid var(--line); border-radius: var(--r-sm); font-family: var(--mono); font-size: 4px; line-height: 4px; white-space: pre; overflow: auto; max-height: 460px; color: var(--soft); }

@media (max-width: 760px) {
  .workbench { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .tool-nav { flex-direction: row; flex-wrap: wrap; }
  .nav-group__title { width: 100%; }
  .local-badge { display: none; }
}

/* ════════════════ Trendy refresh (2026) ════════════════ */
:root {
  --bg: #06060c;
  --grad: linear-gradient(115deg, #22d3ee, #818cf8 45%, #e879f9 85%);
  --grad-warm: linear-gradient(120deg, #ffb648, #ff7eb3 55%, #a78bfa);
  --card: rgba(15, 16, 28, 0.64);
}

/* layered aurora + a faint masked grid for depth */
body {
  background:
    radial-gradient(1100px 560px at 10% -12%, rgba(34, 211, 238, 0.12), transparent 60%),
    radial-gradient(1000px 680px at 102% -4%, rgba(232, 121, 249, 0.12), transparent 55%),
    radial-gradient(900px 700px at 50% 120%, rgba(129, 140, 248, 0.10), transparent 60%),
    var(--bg);
}
.app::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(circle at 50% 24%, #000, transparent 72%);
  mask-image: radial-gradient(circle at 50% 24%, #000, transparent 72%);
}

/* sticky glass app bar with a gradient hairline */
.appbar {
  position: sticky; top: 0; z-index: 80;
  padding: 14px clamp(16px, 4vw, 48px);
  margin: -22px calc(-1 * clamp(16px, 4vw, 48px)) 26px;
  background: linear-gradient(180deg, rgba(6, 6, 12, 0.82), rgba(6, 6, 12, 0.4));
  backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.appbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--grad); opacity: 0.55; }
.brand__mark { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 8px 24px rgba(34, 211, 238, 0.28); }
.local-badge { background: linear-gradient(120deg, rgba(52, 211, 153, 0.16), rgba(34, 211, 238, 0.1)); }

/* gradient-bordered glass surfaces */
.sidebar, .tool {
  border: 1px solid transparent; border-radius: var(--r);
  background:
    linear-gradient(var(--card), var(--card)) padding-box,
    linear-gradient(150deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.03) 45%, rgba(34, 211, 238, 0.2)) border-box;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
}
.tool { position: relative; overflow: hidden; }
.tool::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(130% 80% at 0% 0%, rgba(34, 211, 238, 0.07), transparent 48%); }

/* animated gradient title */
.work__title {
  background: linear-gradient(110deg, #fff 8%, #a5f3fc 28%, #c4b5fd 52%, #f5d0fe 74%, #fff 96%);
  background-size: 220% auto; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: titleShift 9s ease infinite;
}
@keyframes titleShift { 0%, 100% { background-position: 0% center; } 50% { background-position: 100% center; } }
.work__cat { color: var(--c1); letter-spacing: 0.08em; }

/* sidebar polish: gradient sub-labels, active accent + glow */
.nav-sub { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; opacity: 0.85; }
.nav-item { position: relative; }
.nav-item.is-active { box-shadow: 0 10px 26px rgba(34, 211, 238, 0.28); }
.nav-item.is-active::before { content: ""; position: absolute; left: -12px; top: 22%; bottom: 22%; width: 3px; border-radius: 0 3px 3px 0; background: var(--grad); }

/* buttons: warm gradient primary with sheen, gradient-outline secondary */
.btn--primary { color: #1a1205; background: var(--grad-warm); background-size: 170% auto; border: none; box-shadow: 0 12px 32px rgba(255, 126, 179, 0.3); transition: background-position .45s var(--ease), transform .18s var(--ease), box-shadow .25s; }
.btn--primary:hover { background-position: right center; transform: translateY(-2px); box-shadow: 0 18px 44px rgba(167, 139, 250, 0.42); }
.btn:not(.btn--primary):hover { border-color: transparent; color: #fff; background: linear-gradient(var(--glass-2), var(--glass-2)) padding-box, var(--grad) border-box; }

/* dropzone: neon focus */
.dz:hover, .dz:focus-visible, .dz.is-over { box-shadow: 0 0 0 1px var(--c1), inset 0 0 44px rgba(34, 211, 238, 0.16); }
.dz__icon { filter: drop-shadow(0 0 14px rgba(34, 211, 238, 0.6)); }

/* micro-interactions */
.sum-card, .file-row, .pa-cell, .yoga { transition: transform .18s var(--ease), border-color .2s; }
.file-row:hover { transform: translateY(-1px); border-color: var(--line-strong); }
.result__img { box-shadow: 0 16px 50px rgba(0, 0, 0, 0.55); }

/* ════════════════ Horizontal tool nav ════════════════ */
.toolbar { margin-bottom: 26px; }
.cat-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-tab { display: inline-flex; align-items: center; gap: 8px; padding: 11px 22px; border-radius: var(--r-pill); font-family: var(--display); font-weight: 700; font-size: 15px; color: var(--soft); background: var(--card); border: 1px solid var(--line); cursor: pointer; transition: color .2s, background .25s var(--ease), border-color .2s, transform .18s var(--ease), box-shadow .25s; }
.cat-tab:hover { color: #fff; border-color: var(--line-strong); transform: translateY(-1px); }
.cat-tab.is-active { color: #04141a; background: var(--grad); border-color: transparent; box-shadow: 0 10px 28px rgba(34, 211, 238, 0.3); }
.cat-tab__icon { font-size: 16px; }

.tool-pills {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; padding: 14px;
  border: 1px solid transparent; border-radius: var(--r);
  background:
    linear-gradient(var(--card), var(--card)) padding-box,
    linear-gradient(150deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.03) 50%, rgba(34, 211, 238, 0.16)) border-box;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.pill-group { font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; padding-left: 10px; }
.pill-group:not(:first-child) { border-left: 1px solid var(--line); padding-left: 12px; margin-left: 4px; }
.pill { font-size: 13px; font-weight: 500; color: var(--soft); background: var(--glass-2); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 7px 14px; text-decoration: none; white-space: nowrap; transition: color .16s, background .2s, border-color .2s, transform .16s var(--ease), box-shadow .2s; }
.pill:hover { color: #fff; border-color: var(--line-strong); transform: translateY(-1px); }
.pill.is-active { color: #04141a; background: var(--grad); border-color: transparent; font-weight: 600; box-shadow: 0 8px 22px rgba(34, 211, 238, 0.28); }

/* ════════════════ Pipeline ════════════════ */
.toolbar__row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

/* prominent launcher */
.pipeline-launch { display: inline-flex; align-items: center; gap: 12px; padding: 12px 22px; border: none; border-radius: var(--r-pill); cursor: pointer; color: #0a0a12; background: linear-gradient(120deg, #22d3ee, #818cf8 45%, #e879f9 90%); background-size: 180% auto; box-shadow: 0 12px 34px rgba(129, 140, 248, 0.45); position: relative; overflow: hidden; transition: transform .18s var(--ease), box-shadow .25s, background-position .5s; }
.pipeline-launch:hover { transform: translateY(-2px); background-position: right center; box-shadow: 0 18px 46px rgba(232, 121, 249, 0.5); }
.pipeline-launch.is-active { box-shadow: inset 0 0 0 2px #fff, 0 14px 40px rgba(129, 140, 248, 0.55); }
.pipeline-launch__spark { font-size: 20px; filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.85)); animation: pl-spark 2.4s ease-in-out infinite; }
@keyframes pl-spark { 0%, 100% { transform: scale(1) rotate(0); } 50% { transform: scale(1.18) rotate(8deg); } }
.pipeline-launch__txt { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.05; }
.pipeline-launch__txt strong { font-family: var(--display); font-size: 16px; font-weight: 700; }
.pipeline-launch__txt small { font-size: 10.5px; opacity: 0.82; font-weight: 600; }
.pipeline-launch::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 32%, rgba(255, 255, 255, 0.45) 50%, transparent 68%); transform: translateX(-120%); animation: pl-sheen 3.4s ease-in-out infinite; }
@keyframes pl-sheen { 0%, 58% { transform: translateX(-120%); } 80%, 100% { transform: translateX(120%); } }

/* presets */
.pl-presets { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 18px; }
.pl-presets__label { font-size: 12px; color: var(--muted); font-weight: 600; }
.pl-presets .btn { padding: 7px 14px; font-size: 12.5px; }

/* chain */
.pl-chain { display: flex; flex-direction: column; align-items: center; }
.pl-arrow { color: var(--faint); font-size: 18px; line-height: 1; padding: 5px 0; }
.pl-node { width: 100%; max-width: 580px; border-radius: var(--r-sm); padding: 14px 18px; display: flex; align-items: center; gap: 12px; }
.pl-node--io { background: var(--glass); border: 1px dashed var(--line-strong); color: var(--soft); font-weight: 600; justify-content: center; }
.pl-node--out { background: linear-gradient(var(--card), var(--card)) padding-box, var(--grad) border-box; border: 1px solid transparent; flex-wrap: wrap; }
.pl-node__type, .pl-step__type { font-size: 10px; font-weight: 700; letter-spacing: 0.06em; padding: 3px 8px; border-radius: 999px; }
.t-image { background: rgba(34, 211, 238, 0.16); color: #67e8f9; }
.t-video { background: rgba(232, 121, 249, 0.16); color: #f0abfc; }
.t-audio { background: rgba(129, 140, 248, 0.16); color: #c4b5fd; }
.pl-node__hint { color: var(--muted); font-size: 13px; }
.pl-out-ctls { display: flex; gap: 18px; flex-wrap: wrap; flex: 1; }

/* step cards */
.pl-step { width: 100%; max-width: 580px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px; cursor: grab; transition: border-color .2s, box-shadow .2s, opacity .2s; }
.pl-step.is-drag { opacity: 0.45; }
.pl-step.is-over { border-color: var(--c1); box-shadow: 0 0 0 1px var(--c1); }
.pl-step.is-invalid { border-color: var(--fail); }
.pl-step__head { display: flex; align-items: center; gap: 10px; }
.pl-step__grip { color: var(--faint); letter-spacing: -3px; }
.pl-step__ic { font-size: 16px; }
.pl-step__name { font-weight: 600; color: #fff; flex: 1; }
.pl-step__btns { display: flex; gap: 4px; }
.pl-mini { width: 26px; height: 26px; border-radius: 8px; background: var(--glass-2); border: 1px solid var(--line); color: var(--soft); font-size: 11px; display: inline-flex; align-items: center; justify-content: center; }
.pl-mini:hover { color: #fff; border-color: var(--line-strong); }
.pl-mini--x:hover { color: var(--fail); border-color: var(--fail); }
.pl-step__params { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.pl-param { display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: var(--muted); }
.pl-param > span { text-transform: uppercase; letter-spacing: 0.04em; }
.pl-param .inp, .pl-param .csel { min-width: 130px; }
.pl-param .inp--color { min-width: 48px; }
.pl-step__warn { margin-top: 8px; font-size: 12px; color: var(--fail); }
.pl-step__preview { margin-top: 10px; display: flex; align-items: center; gap: 10px; }
.pl-step__preview img { height: 48px; border-radius: 6px; border: 1px solid var(--line); }
.pl-step__meta { font-size: 12px; color: var(--muted); font-family: var(--mono); }

/* add-step */
.pl-add { width: 100%; max-width: 580px; position: relative; display: flex; justify-content: center; }
.pl-add .btn { border-style: dashed; }
.pl-add-host { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 40; display: flex; justify-content: center; }
.pl-add-menu { width: 260px; background: #0d0e18; border: 1px solid var(--line-strong); border-radius: var(--r-sm); padding: 6px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6); display: flex; flex-direction: column; gap: 2px; max-height: 300px; overflow: auto; }
.pl-add-opt { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px; color: var(--soft); font-size: 14px; text-align: left; }
.pl-add-opt:hover { background: var(--glass-2); color: #fff; }
.pl-add-opt__ic { font-size: 15px; }
.pl-add-empty { padding: 10px; color: var(--muted); font-size: 13px; text-align: center; }

/* ════════════════ DevKit tools ════════════════ */
.mono { font-family: var(--mono); }
textarea.inp { width: 100%; resize: vertical; line-height: 1.5; }
.dk-field { display: flex; flex-direction: column; gap: 6px; }
.dk-field__label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.dk-section { font-family: var(--display); font-size: 15px; color: #fff; margin: 22px 0 10px; }
.dk-note { font-size: 12.5px; color: var(--muted); margin-top: 12px; line-height: 1.5; }
.dk-note.is-err { color: var(--fail); font-weight: 600; }

.dk-outs { margin-top: 10px; }
.dk-row { display: flex; align-items: center; gap: 10px; margin: 8px 0; }
.dk-row__label { width: 122px; flex-shrink: 0; font-size: 11.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.03em; }
.dk-row__val { flex: 1; display: flex; gap: 8px; align-items: flex-start; min-width: 0; }
.dk-out { flex: 1; min-width: 0; }
.dk-copy { flex-shrink: 0; }

/* strength bar */
.dk-bar-row { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.dk-bar { flex: 1; height: 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.dk-bar > span { display: block; height: 100%; width: 0; border-radius: 999px; transition: width .25s; background: var(--c2); }
.dk-bar > span.lvl-weak { background: var(--fail); }
.dk-bar > span.lvl-fair { background: var(--warn); }
.dk-bar > span.lvl-strong { background: var(--ok); }
.dk-bar > span.lvl-excellent { background: linear-gradient(90deg, var(--c1), var(--c3)); }
.dk-bar__txt { font-size: 12px; color: var(--soft); font-family: var(--mono); white-space: nowrap; }

/* jwt */
.dk-summary { margin: 12px 0; }
.dk-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.dk-chip { font-size: 12px; padding: 5px 11px; border-radius: 999px; background: var(--glass-2); border: 1px solid var(--line); color: var(--soft); font-family: var(--mono); }
.dk-chip.is-ok { border-color: rgba(52, 211, 153, 0.4); color: #6ee7b7; }
.dk-chip.is-bad { border-color: rgba(251, 113, 133, 0.5); color: #fda4af; }

/* cron */
.dk-cron-desc { margin: 12px 0; }
.dk-cron-en { font-family: var(--display); font-size: 18px; color: #fff; background: var(--glass); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 14px 16px; }

/* regex */
.dk-hl { margin-top: 12px; padding: 14px; background: #05060a; border: 1px solid var(--line); border-radius: var(--r-sm); font-family: var(--mono); font-size: 13px; white-space: pre-wrap; word-break: break-word; max-height: 320px; overflow: auto; color: var(--soft); }
.dk-hl mark { background: rgba(34, 211, 238, 0.32); color: #fff; border-radius: 3px; padding: 0 1px; }
.dk-groups { margin-top: 10px; display: flex; flex-direction: column; gap: 4px; }
.dk-grp { font-family: var(--mono); font-size: 12px; color: var(--muted); }

/* diff */
.dk-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dk-diff { margin-top: 12px; padding: 12px; background: #05060a; border: 1px solid var(--line); border-radius: var(--r-sm); font-family: var(--mono); font-size: 12.5px; max-height: 380px; overflow: auto; }
.dk-dl { white-space: pre-wrap; word-break: break-word; padding: 1px 6px; border-radius: 3px; }
.dk-dl--add { background: rgba(52, 211, 153, 0.14); color: #6ee7b7; }
.dk-dl--del { background: rgba(251, 113, 133, 0.14); color: #fda4af; }
.dk-dl--eq { color: var(--muted); }

/* color */
.dk-color-top { display: flex; gap: 12px; align-items: flex-end; }
.dk-color-top .dk-field { flex: 1; }
.dk-swatch { width: 64px; height: 46px; border-radius: 10px; border: 1px solid var(--line-strong); flex-shrink: 0; }

@media (max-width: 680px) { .dk-row { flex-direction: column; align-items: stretch; gap: 4px; } .dk-row__label { width: auto; } .dk-two { grid-template-columns: 1fr; } }

/* markdown preview */
.dk-md { padding: 14px; background: var(--glass); border: 1px solid var(--line); border-radius: var(--r-sm); max-height: 460px; overflow: auto; color: var(--soft); line-height: 1.65; }
.dk-md h1, .dk-md h2, .dk-md h3, .dk-md h4, .dk-md h5, .dk-md h6 { color: #fff; font-family: var(--display); margin: 0.7em 0 0.3em; line-height: 1.2; }
.dk-md a { color: var(--c1); }
.dk-md code { background: rgba(255, 255, 255, 0.08); padding: 1px 5px; border-radius: 5px; font-family: var(--mono); font-size: 0.9em; }
.dk-md-pre { background: #05060a; border: 1px solid var(--line); border-radius: 8px; padding: 10px; overflow: auto; font-family: var(--mono); font-size: 12.5px; }
.dk-md blockquote { border-left: 3px solid var(--line-strong); margin: 0.5em 0; padding-left: 12px; color: var(--muted); }
.dk-md ul, .dk-md ol { padding-left: 22px; }
.dk-md img { max-width: 100%; border-radius: 8px; }
.dk-md hr { border: none; border-top: 1px solid var(--line); margin: 1em 0; }

/* focus polish */
.pill:focus-visible, .btn:focus-visible, .cat-tab:focus-visible { outline: 2px solid var(--c1); outline-offset: 2px; }
