/* Clippfy Studio: layout and components, using the site tokens from /site.css */
:root { --sbw: 248px; --ease: cubic-bezier(.22, 1, .36, 1); --danger: #ff6b7d; --ok: #c8f31d; }
html.sb-collapsed { --sbw: 76px; }
body.studio { background: var(--bg); min-height: 100vh; }
body.locked .app { filter: blur(6px) brightness(.55); pointer-events: none; }
svg { width: 18px; height: 18px; flex: none; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 9px 16px; border: 1px solid transparent; border-radius: 12px; font-weight: 600; font-size: 14px; color: var(--text); background: var(--raised); transition: filter .16s, transform .16s, background .16s; position: relative; }
.btn:hover { filter: brightness(1.12); transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; filter: none; }
.btn-primary { background: var(--cta); color: var(--cta-ink); box-shadow: inset 0 -2px #2b060340, 0 6px 18px #ff2a1f33; }
.btn-glass { background: #ffffff0f; border-color: var(--line); }
.btn-quiet { background: transparent; color: var(--muted); }
.btn-quiet:hover { color: var(--text); }
.btn-danger { background: #ff6b7d1f; color: var(--danger); border-color: #ff6b7d55; }
.btn-danger.confirm { background: var(--danger); color: #2b0309; }
.btn-lg { min-height: 52px; padding-inline: 24px; font-size: 16px; border-radius: 15px; }
.btn-sm { min-height: 34px; padding: 6px 12px; font-size: 13px; border-radius: 10px; }
.btn-icon { padding-inline: 0; width: 36px; }
.btn.loading { pointer-events: none; opacity: .75; }
.btn.loading::after { content: ""; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; }
.lbl, .field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 7px; }

/* layout */
.app { display: grid; grid-template-columns: var(--sbw) 1fr; grid-template-rows: 64px 1fr; min-height: 100vh; transition: filter .4s; }
.sb { grid-row: 1 / 3; position: sticky; top: 0; height: 100vh; padding: 18px 14px; display: flex; flex-direction: column; gap: 14px; background: #120f19; border-right: 1px solid var(--line); overflow: hidden; transition: width .3s var(--ease); }
.sb-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.logo { display: flex; align-items: center; gap: 10px; font: 700 19px var(--display); letter-spacing: -.03em; white-space: nowrap; }
.logo-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); }
.logo-mark svg { width: 20px; height: 20px; fill: currentColor; }
.sb-collapse { background: none; border: 0; color: var(--muted); width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; }
.sb-collapse:hover { background: #ffffff10; color: var(--text); }
html.sb-collapsed .sb-collapse svg { transform: scaleX(-1); }
.sb-new { width: 100%; }
.sb-nav { display: grid; gap: 4px; }
.sb-nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--muted); font-weight: 500; font-size: 14.5px; white-space: nowrap; transition: background .16s, color .16s; }
.sb-nav a:hover { background: #ffffff0d; color: var(--text); }
.sb-nav a.on { background: var(--accent-soft); color: var(--accent); }
.sb-bottom { margin-top: auto; display: grid; gap: 10px; }
.sb-search { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #ffffff08; color: var(--muted); font-size: 14px; white-space: nowrap; }
.sb-search:hover { color: var(--text); border-color: var(--accent-line); }
kbd { margin-left: auto; font: 500 11px Geist, sans-serif; padding: 2px 6px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); }
.plan-chip { display: grid; padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); border: 1px solid var(--accent-line); font-size: 13px; white-space: nowrap; }
.plan-chip b { color: var(--accent); }
.plan-chip span { color: var(--muted); font-size: 12px; }
.queue-pill { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line); background: #ffffff0a; color: var(--text); font-size: 13px; white-space: nowrap; text-align: left; }
.qring svg { width: 24px; height: 24px; transform: rotate(-90deg); }
.qbg, .qfg { fill: none; stroke-width: 4; }
.qbg { stroke: var(--violet); }
.qfg { stroke: var(--accent); stroke-dasharray: 100; stroke-linecap: round; transition: stroke-dashoffset .5s; }
.acct { position: relative; }
.acct-btn { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; background: none; border: 1px solid transparent; color: var(--text); text-align: left; }
.acct-btn:hover { background: #ffffff0d; }
.av { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--violet); color: var(--violet-text); font-weight: 700; font-size: 13px; flex: none; }
.av-xl { width: 64px; height: 64px; font-size: 22px; }
.acct-id { display: grid; min-width: 0; line-height: 1.25; }
.acct-id b { font-size: 13.5px; } .acct-id small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.acct-menu { position: absolute; bottom: calc(100% + 8px); left: 0; min-width: 220px; padding: 8px; border-radius: 14px; background: var(--raised); border: 1px solid var(--line); box-shadow: 0 16px 40px #0009; opacity: 0; visibility: hidden; transform: translateY(6px); transition: .18s var(--ease); z-index: 30; }
.acct.open .acct-menu { opacity: 1; visibility: visible; transform: none; }
.acct-head { display: grid; padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; } .acct-head small { color: var(--muted); }
.acct-menu a, .acct-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 9px; background: none; color: var(--text); font-size: 14px; text-align: left; }
.acct-menu a:hover, .acct-menu button:hover { background: #ffffff12; }
html.sb-collapsed .wm, html.sb-collapsed .sb-nav span, html.sb-collapsed .sb-new span, html.sb-collapsed .sb-search span, html.sb-collapsed .sb-search kbd, html.sb-collapsed .acct-id, html.sb-collapsed .plan-chip span, html.sb-collapsed #queueText { display: none; }
html.sb-collapsed .sb-top { flex-direction: column; } html.sb-collapsed .plan-chip { display: none; }

.topbar { display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(16px, 3vw, 40px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; background: #0d0c10e6; backdrop-filter: blur(12px); }
.topbar h1 { font: 600 20px var(--display); letter-spacing: -.03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-actions { display: flex; gap: 8px; }
.stage { padding: clamp(18px, 3vw, 36px) clamp(16px, 3vw, 40px) 80px; max-width: 1240px; width: 100%; }
.status-banner { margin: 0 0 22px; padding: 9px 14px; border-radius: 12px; background: var(--accent-soft); border: 1px solid var(--accent-line); font-size: 13px; color: var(--muted); }
.status-banner b { color: var(--accent); }
.view { animation: viewIn .45s var(--ease) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } }
.page-head { margin-bottom: 20px; } .page-head h1 { font-size: clamp(28px, 4vw, 40px); } .page-head p { color: var(--muted); margin-top: 6px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.back-link { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); margin-bottom: 16px; font-size: 14px; } .back-link:hover { color: var(--accent); }

/* segmented control with sliding indicator */
.seg { position: relative; display: inline-flex; padding: 4px; border-radius: 13px; background: #00000040; border: 1px solid var(--line); }
.seg .ind { position: absolute; top: 4px; bottom: 4px; left: 0; width: 0; border-radius: 9px; background: var(--raised); box-shadow: 0 0 0 1px var(--accent-line); transition: transform .3s var(--ease), width .3s var(--ease); }
.seg.no-anim .ind { transition: none; }
.seg button { position: relative; z-index: 1; padding: 7px 14px; border: 0; background: none; color: var(--muted); font-size: 13.5px; font-weight: 600; border-radius: 9px; white-space: nowrap; }
.seg button.on { color: var(--accent); } .seg button:hover:not(.on) { color: var(--text); }
.seg button.locked { opacity: .5; }
.search { display: flex; align-items: center; gap: 10px; padding: 0 14px; min-height: 42px; border-radius: 13px; background: var(--surface); border: 1px solid var(--line); flex: 1; max-width: 420px; }
.search:focus-within { border-color: var(--accent-line); }
.search input { flex: 1; background: none; border: 0; color: var(--text); outline: 0; min-width: 0; }
input, textarea { color: var(--text); }

/* stats + project cards */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 22px; }
.stat { padding: 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); display: grid; gap: 4px; }
.stat.feature { background: linear-gradient(160deg, var(--accent-soft), transparent 70%), var(--surface); border-color: var(--accent-line); }
.stat b { font: 600 clamp(26px, 3vw, 38px) var(--display); letter-spacing: -.04em; color: var(--accent); font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 13px; }
.proj-grid, .clip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.clip-grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.stagger > * { animation: itemIn .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms); }
@keyframes itemIn { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.proj { display: grid; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; transition: transform .25s var(--ease), border-color .2s, box-shadow .25s; }
.proj:hover { transform: translateY(-4px); border-color: var(--accent-line); box-shadow: 0 14px 34px #0007; }
.proj-thumbs { position: relative; display: flex; justify-content: center; align-items: flex-end; height: 168px; padding-top: 18px; background: linear-gradient(180deg, var(--violet), var(--surface)); overflow: hidden; }
.proj-thumbs img, .proj-thumbs .ph { width: 84px; aspect-ratio: 9/16; object-fit: cover; border-radius: 9px 9px 0 0; border: 2px solid #ffffff22; border-bottom: 0; margin-inline: -8px; background: var(--raised); }
.proj-thumbs > :nth-child(3) { z-index: 2; transform: translateY(-10px); } .proj-thumbs > :nth-child(1), .proj-thumbs > :nth-child(2) { transform: translateY(4px) scale(.93); filter: brightness(.8); }
.work { position: absolute; inset: 0; z-index: 3; display: grid; place-content: center; justify-items: center; gap: 8px; background: #0d0c10b3; backdrop-filter: blur(2px); }
.spinner { width: 24px; height: 24px; border: 3px solid var(--violet); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
.proj-body { padding: 14px 16px 16px; display: grid; gap: 10px; }
.proj-body h3 { font-size: 15px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.proj-meta { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 12.5px; }
.mini-bar, .bar, .bill-meter i { display: block; height: 6px; border-radius: 99px; background: var(--violet); overflow: hidden; }
.mini-bar i { display: block; height: 100%; background: var(--accent); transform-origin: left; transition: transform .6s; }
.status-pill { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; background: var(--violet); color: var(--violet-text); }
.status-pill.done { background: var(--accent-soft); color: var(--accent); } .status-pill.running, .status-pill.queued { background: #ffb02e22; color: #ffc766; } .status-pill.failed { background: #ff6b7d22; color: var(--danger); }
.empty { grid-column: 1 / -1; display: grid; justify-items: center; gap: 10px; padding: 48px 20px; text-align: center; border-radius: 20px; background: var(--surface); border: 1px dashed var(--line); }
.empty p { color: var(--muted); max-width: 420px; }
.stack-ph { display: flex; margin-bottom: 6px; } .stack-ph span { width: 36px; aspect-ratio: 9/16; border-radius: 7px; background: var(--raised); border: 1px solid var(--line); margin-inline: -6px; } .stack-ph span:nth-child(2) { transform: translateY(-6px); background: var(--violet); }

/* create */
.create { max-width: 880px; margin-inline: auto; padding: clamp(18px, 3vw, 32px); }
.cstep-ind { display: flex; align-items: center; gap: 12px; list-style: none; padding: 0; margin: 0 0 24px; color: var(--muted); font-size: 14px; }
.cstep-ind li { display: flex; align-items: center; gap: 8px; } .cstep-ind i { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--raised); font-style: normal; font-size: 12px; font-weight: 700; }
.cstep-ind li.on { color: var(--text); } .cstep-ind li.on i { background: var(--accent); color: var(--accent-ink); } .cstep-ind .sep { flex: 1; height: 1px; background: var(--line); max-width: 60px; }
.cstep { display: grid; gap: 18px; } .cstep[hidden] { display: none; }
.url-field { display: flex; align-items: center; gap: 12px; padding: 0 16px; min-height: 56px; border-radius: 15px; background: var(--bg); border: 1px solid var(--line); }
.url-field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.url-field input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; font-size: 15px; }
.hint { color: var(--muted); font-size: 13px; display: block; margin-top: 8px; }
.drop { display: grid; justify-items: center; gap: 6px; padding: 38px 20px; text-align: center; border: 1.5px dashed var(--accent-line); border-radius: 18px; background: var(--bg); cursor: pointer; transition: .2s; }
.drop:hover, .drop.over { background: var(--accent-soft); } .drop svg { width: 34px; height: 34px; color: var(--accent); } .drop span { color: var(--muted); font-size: 13px; }
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.opt { display: grid; gap: 10px; padding: 14px 16px; border-radius: 14px; background: #00000030; border: 1px solid var(--line); }
.opt-title { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--muted); } .opt-title b { color: var(--accent); background: var(--accent-soft); padding: 2px 9px; border-radius: 8px; font-variant-numeric: tabular-nums; }
.srange { appearance: none; width: 100%; height: 8px; border-radius: 99px; background: linear-gradient(90deg, var(--accent) var(--p, 50%), var(--violet) var(--p, 50%)); cursor: pointer; }
.srange::-webkit-slider-thumb { appearance: none; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 4px solid var(--accent); box-shadow: 0 2px 6px #0008; }
.srange::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 4px solid var(--accent); }
.create-foot { display: flex; justify-content: flex-end; gap: 10px; }
.cs-foot { justify-content: space-between; }
.form-error, .error-box { padding: 10px 14px; border-radius: 12px; background: #ff6b7d1f; color: var(--danger); font-size: 14px; margin-top: 14px; }
.form-error[hidden], .error-box[hidden] { display: none; }
.cs-grid { display: grid; grid-template-columns: 240px 1fr; gap: 28px; align-items: start; }
.cs-preview { display: grid; justify-items: center; gap: 10px; }
.cs-phone { position: relative; width: 220px; aspect-ratio: 9/16; border-radius: 22px; overflow: hidden; border: 5px solid #000; background: #000; box-shadow: 0 16px 40px #0008; container-type: inline-size; }
.cs-phone img { width: 100%; height: 100%; object-fit: cover; } .cs-phone video { width: 100%; height: 100%; object-fit: cover; }
.cs-hint { color: var(--muted); font-size: 12.5px; }
.cap { position: absolute; left: 6%; right: 6%; top: var(--y, 70%); transform: translateY(-50%); text-align: center; font-weight: 800; line-height: 1.12; font-size: calc(8.2cqw * var(--size, 1)); pointer-events: none; }
.cap.upper { text-transform: uppercase; } .cap.lower { text-transform: lowercase; }
.cap i { font-style: normal; }
.cap.s-lime { color: #fff; -webkit-text-stroke: 1.2px #000; paint-order: stroke fill; text-shadow: 2px 2px 0 #000; } .cap.s-lime i.hl { color: var(--accent); }
.cap.s-yellow { color: #ffe14a; -webkit-text-stroke: 1.4px #000; paint-order: stroke fill; text-shadow: 3px 3px 0 #000; font-size: calc(10cqw * var(--size, 1)); }
.cap.s-fire { color: #fff; text-shadow: 0 0 8px #ff7a1a, 0 0 18px #ff2a1f, 2px 2px 0 #000; } .cap.s-fire i.hl { color: #ffb02e; }
.cap.s-karaoke { color: #fff; background: #000b; padding: .2em .45em; border-radius: .3em; } .cap.s-karaoke i.hl { color: var(--accent); }
.cap.s-single { font-size: calc(13cqw * var(--size, 1)); color: #fff; -webkit-text-stroke: 1.4px #000; paint-order: stroke fill; text-shadow: 3px 3px 0 #000; }
.cap.s-classic { font-weight: 700; color: #fff; text-shadow: 1px 2px 3px #000, 0 0 7px #000; }
.cap.off { display: none; }
.cs-side { display: grid; gap: 16px; } .cs-side-head { display: flex; justify-content: space-between; align-items: center; }
.cs-h { font-weight: 600; } .cs-h em { font-style: normal; font-size: 11px; margin-left: 8px; padding: 2px 8px; border-radius: 99px; background: var(--violet); color: var(--violet-text); }
.cs-cap-toggle { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--muted); cursor: pointer; }
.toggle { position: relative; width: 40px; height: 22px; } .toggle input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; z-index: 1; }
.toggle span { position: absolute; inset: 0; border-radius: 99px; background: var(--violet); transition: .2s; } .toggle span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: .2s var(--ease); }
.toggle input:checked + span { background: var(--accent); } .toggle input:checked + span::after { transform: translateX(18px); background: var(--accent-ink); }
.cs-presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; }
.cs-tile { display: grid; gap: 8px; padding: 10px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); color: var(--muted); font-size: 12px; transition: .2s; }
.cs-tile:hover { border-color: var(--accent-line); transform: translateY(-2px); } .cs-tile.on { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.cs-tile .pv { display: grid; place-items: center; height: 54px; border-radius: 8px; background: linear-gradient(135deg, #3a2a52, #1a1224); font: 800 16px Montserrat, sans-serif; }
.cs-adjust { display: grid; gap: 12px; }

/* job + clips */
.job-head { display: grid; gap: 10px; justify-items: start; } .job-meta { color: var(--muted); font-size: 14px; display: flex; gap: 14px; flex-wrap: wrap; }
.progress { padding: 22px; margin-bottom: 18px; display: grid; gap: 14px; }
.steps-list { display: flex; gap: 18px; list-style: none; padding: 0; margin: 0; flex-wrap: wrap; }
.step { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; } .step .c { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--raised); } .step em { font-style: normal; font-size: 12px; font-weight: 700; }
.step.active { color: var(--text); } .step.active .c { background: var(--accent-soft); box-shadow: 0 0 0 2px var(--accent); animation: pulse 1.2s infinite; } .step.done { color: var(--accent); } .step.done .c { background: var(--accent); color: var(--accent-ink); }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px #c8f31d22; } }
.bar { height: 8px; } .bar i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 99px; transition: width .6s; }
.progress-line { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); } .progress-line b { color: var(--accent); }
.job-note { padding: 12px 16px; border-radius: 12px; background: var(--accent-soft); color: var(--muted); font-size: 14px; margin-bottom: 18px; }
.clip { display: grid; gap: 10px; padding: 10px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); transition: transform .25s var(--ease), border-color .2s; } .clip:hover { transform: translateY(-3px); border-color: var(--accent-line); }
.clip .vid { position: relative; aspect-ratio: 9/16; border-radius: 12px; overflow: hidden; background: #000; container-type: inline-size; }
.clip .vid img, .clip .vid video { width: 100%; height: 100%; object-fit: cover; }
.clip .vid .cap { font-size: calc(8.5cqw * var(--size, 1)); }
.score { position: absolute; top: 8px; right: 8px; z-index: 2; padding: 3px 8px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: 13px; }
.dur { position: absolute; bottom: 8px; left: 8px; z-index: 2; padding: 2px 7px; border-radius: 6px; background: #000a; font-size: 12px; font-variant-numeric: tabular-nums; }
.pl-big { position: absolute; inset: 0; margin: auto; z-index: 2; width: 52px; height: 52px; border-radius: 50%; border: 0; background: #0d0c10b8; backdrop-filter: blur(6px); color: #fff; display: grid; place-items: center; transition: transform .2s; } .pl-big:hover { transform: scale(1.1); } .pl-big svg { width: 22px; height: 22px; }
.clip h4 { font-size: 13.5px; line-height: 1.3; min-height: 2.6em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clip .row, .edit-side .row { display: flex; gap: 8px; } .grow { flex: 1; }
.skeleton { border-radius: 18px; background: var(--surface); border: 1px solid var(--line); padding: 10px; display: grid; gap: 10px; } .sk-vid { aspect-ratio: 9/16; border-radius: 12px; background: linear-gradient(100deg, var(--raised) 30%, #3a2c52 50%, var(--raised) 70%) 0 0 / 200% 100%; animation: shimmer 1.4s linear infinite; } @keyframes shimmer { to { background-position: -200% 0; } } .sk-row { height: 34px; border-radius: 10px; background: var(--raised); }
.edit-grid { display: grid; grid-template-columns: 260px 1fr; gap: 28px; align-items: start; } .edit-side { padding: 22px; display: grid; gap: 16px; max-width: 640px; }
.field { display: grid; } .field input, .field textarea { width: 100%; padding: 11px 13px; min-height: 44px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); outline: 0; font: inherit; resize: vertical; } .field input:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field.invalid input { border-color: var(--danger); } .err { color: var(--danger); font-size: 12.5px; min-height: 0; margin-top: 5px; } .err:empty { display: none; }

/* plans */
.plans-wrap { display: grid; gap: 18px; max-width: 1040px; margin-inline: auto; } .plans-head { text-align: center; } .plans-head h2 { font-size: clamp(26px, 4vw, 40px); } .plans-head p { color: var(--muted); margin-top: 8px; }
#plansBody { display: grid; gap: 16px; }
.pp-toggle { justify-self: center; display: inline-flex; padding: 4px; border-radius: 13px; background: #00000040; border: 1px solid var(--line); } .pp-toggle button { padding: 8px 18px; border: 0; background: none; color: var(--muted); border-radius: 9px; font-weight: 600; } .pp-toggle button.on { background: var(--accent); color: var(--accent-ink); }
.pp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.pp { display: grid; gap: 14px; align-content: start; padding: 22px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); transition: transform .25s var(--ease), border-color .2s; } .pp:hover { transform: translateY(-4px); }
.pp-hot { border-color: var(--accent-line); background: linear-gradient(175deg, var(--accent-soft), transparent 60%), var(--surface); } .pp-pick { box-shadow: 0 0 0 3px var(--accent); } .pp-mine { border-color: var(--accent); }
.pp-head { display: flex; justify-content: space-between; align-items: center; } .pp-head h3 { font-size: 22px; font-family: var(--display); }
.pp-tag { display: inline-flex; gap: 6px; padding: 3px 10px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.pp-price b { font: 600 42px var(--display); letter-spacing: -.04em; } .pp-price span { color: var(--muted); } .pp-bill { color: var(--muted); font-size: 13px; margin-top: -8px; }
.pp ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; font-size: 14px; } .pp li { display: flex; gap: 10px; align-items: flex-start; } .pp li svg { color: var(--accent); width: 16px; margin-top: 2px; }
.pp-btn { width: 100%; }
.pp-trial, .pp-current { grid-template-columns: 1fr auto; align-items: center; background: linear-gradient(120deg, var(--accent-soft), transparent 70%), var(--surface); border-color: var(--accent-line); } .pp-trial h3, .pp-current h3 { font-size: 22px; margin: 8px 0 6px; } .pp-trial p, .pp-current p { color: var(--muted); font-size: 14px; } .pp-trial .pp-btn { width: auto; }
.pp-current-actions { display: flex; gap: 8px; flex-wrap: wrap; } .pp-note { color: var(--muted); font-size: 13px; text-align: center; } .plans-fine { color: var(--muted); font-size: 12.5px; text-align: center; } .plans-fine a { color: var(--accent); }

/* settings */
.settings { display: grid; gap: 16px; max-width: 760px; } .set-card { padding: 22px; display: grid; gap: 18px; } .set-head h2 { font-size: 20px; } .set-head p { color: var(--muted); font-size: 14px; margin-top: 4px; }
.profile-row { display: flex; gap: 18px; align-items: flex-start; } .fields-2 { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.set-foot { display: flex; justify-content: flex-end; align-items: center; gap: 14px; } .saved { color: var(--accent); font-size: 13px; opacity: 0; transition: opacity .3s; } .saved.show { opacity: 1; }
.bill { display: grid; gap: 16px; } .bill-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; } .bill-row small { display: block; color: var(--muted); margin-top: 3px; }
.bill-badge { padding: 3px 10px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 700; } .bill-badge.off { background: #ff6b7d22; color: var(--danger); }
.bill-meter { display: grid; gap: 8px; } .bill-meter > div { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--muted); } .bill-meter b { color: var(--text); } .bill-meter em { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.bill-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.usage { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; } .usage div { display: grid; padding: 14px; border-radius: 14px; background: #00000030; } .usage b { font: 600 24px var(--display); color: var(--accent); } .usage span { color: var(--muted); font-size: 12.5px; }
.danger { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding-top: 16px; border-top: 1px solid var(--line); } .danger small { display: block; color: var(--muted); margin-top: 3px; max-width: 460px; }

/* palette */
.palette { position: fixed; inset: 0; z-index: 60; display: grid; justify-items: center; align-content: start; padding: 12vh 16px 0; background: #07060acc; backdrop-filter: blur(6px); } .palette[hidden] { display: none; }
.pal-card { width: min(620px, 100%); border-radius: 20px; background: var(--raised); border: 1px solid var(--line); box-shadow: 0 30px 80px #000a; overflow: hidden; animation: viewIn .25s var(--ease); }
.pal-in { display: flex; align-items: center; gap: 12px; padding: 0 18px; min-height: 58px; border-bottom: 1px solid var(--line); } .pal-in input { flex: 1; background: none; border: 0; outline: 0; font-size: 16px; }
.pal-list { max-height: 50vh; overflow: auto; padding: 8px; } .pal-group { padding: 10px 12px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.pal-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 11px; cursor: pointer; } .pal-item.on { background: var(--accent-soft); color: var(--accent); } .pal-item span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .pal-item small { color: var(--muted); } .pal-empty { padding: 28px; text-align: center; color: var(--muted); }

/* auth lock */
.lock { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; overflow: auto; background: #0d0c10cc; backdrop-filter: blur(10px); opacity: 0; transition: opacity .4s; } .lock.show { opacity: 1; } .lock.gone { display: none; }
.auth { width: min(420px, 100%); padding: 30px; display: grid; gap: 14px; justify-items: stretch; transform: translateY(14px); transition: transform .5s var(--ease); } .lock.show .auth { transform: none; }
.auth .logo { justify-self: center; } .auth h1 { text-align: center; font-size: 28px; } .auth > p { text-align: center; color: var(--muted); margin-top: -6px; } .auth-seg { justify-self: center; }
.auth form { display: grid; gap: 14px; } .auth-submit { width: 100%; } .auth-legal { font-size: 12px; color: var(--muted); text-align: center; } .auth-legal a { text-decoration: underline; } .auth-foot { justify-self: center; display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 13.5px; }
.pw { position: relative; } .pw input { padding-right: 46px; } .pw-toggle { position: absolute; right: 6px; top: 6px; width: 34px; height: 34px; border: 0; border-radius: 9px; background: none; color: var(--muted); display: grid; place-items: center; } .pw-toggle.on { color: var(--accent); }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 80; transform: translate(-50%, 20px); padding: 12px 20px; border-radius: 14px; background: var(--raised); border: 1px solid var(--accent-line); box-shadow: 0 14px 40px #000a; opacity: 0; pointer-events: none; transition: .3s var(--ease); max-width: calc(100% - 32px); } .toast.show { opacity: 1; transform: translate(-50%, 0); } .toast.error { border-color: var(--danger); color: var(--danger); }

@media (max-width: 960px) { .stats, .usage { grid-template-columns: repeat(2, 1fr); } .pp-grid { grid-template-columns: 1fr; } .cs-grid, .edit-grid { grid-template-columns: 1fr; justify-items: center; } .cs-side, .edit-side { width: 100%; } }
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; grid-template-rows: 56px 1fr; padding-bottom: 68px; }
  .sb { position: fixed; inset: auto 0 0 0; z-index: 20; height: 64px; width: 100%; flex-direction: row; padding: 6px 10px; align-items: center; border-right: 0; border-top: 1px solid var(--line); gap: 4px; }
  .sb-top, .sb-new, .plan-chip, .queue-pill, .sb-search span, .sb-search kbd, .acct-id { display: none; }
  .sb-nav { display: flex; flex: 1; justify-content: space-around; } .sb-nav a { flex-direction: column; gap: 2px; padding: 6px 8px; font-size: 11px; } .sb-nav a span { display: block !important; }
  html.sb-collapsed .sb-nav span { display: block; }
  .sb-bottom { margin: 0; display: flex; gap: 4px; align-items: center; } .sb-search { padding: 10px; } .acct-menu { bottom: calc(100% + 14px); right: 0; left: auto; }
  .topbar { grid-row: 1; } .opts, .fields-2, .pp-trial, .pp-current { grid-template-columns: 1fr; } .cs-foot, .danger { flex-wrap: wrap; } .profile-row { flex-direction: column; } .stage { padding-bottom: 40px; }
  .proj-grid { grid-template-columns: 1fr; } .clip-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* Google sign-in */
.auth-google { width: 100%; gap: 10px; } .auth-google svg { width: 20px; height: 20px; flex: none; }
.auth-google[aria-disabled="true"] { opacity: .55; pointer-events: none; }
.auth-or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12.5px; margin: -2px 0; } .auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--line, #ffffff1f); }

/* Real-media thumbnails and states */
.proj-thumbs video { width: 84px; aspect-ratio: 9/16; object-fit: cover; border-radius: 9px 9px 0 0; border: 2px solid #ffffff22; border-bottom: 0; margin-inline: -8px; background: var(--raised); pointer-events: none; }
.clip .vid .ph, .cs-phone .ph { display: block; background: var(--raised); }
.exp { position: absolute; inset: auto 8px 8px; padding: 6px 8px; border-radius: 8px; background: #000b; color: var(--muted); font-size: 12px; text-align: center; }
.edit-side .hint { color: var(--muted); font-size: 13.5px; }

/* ClipThisShit logo in the sidebar and sign-in card */
.logo .brand-logo { display: block; height: 34px; width: auto; aspect-ratio: 2172 / 724; object-fit: contain; max-width: 100%; }
.auth .logo .brand-logo { height: 44px; }
html.sb-collapsed .sb .logo .brand-logo { height: auto; width: 56px; }
html.sb-collapsed .sb .logo { justify-content: center; }
@media (max-width: 380px) { .auth .logo .brand-logo { height: 38px; } }

.auth-forgot { justify-self: start; background: none; border: 0; padding: 0; color: var(--muted); font-size: 13px; text-decoration: underline; cursor: pointer; margin-top: -6px; } .auth-forgot:hover { color: var(--accent); }
.auth-forgot[hidden] { display: none; }
