/* Shorts Studio — AI 콘텐츠 운영실 */
:root {
	--bg: #0b0d10;
	--bg-warm: #11100e;
	--surface: #14171c;
	--raised: #1b1f25;
	--overlay: #232831;
	--line: #2a2f37;
	--line-strong: #3b424d;
	--text: #f5f3ed;
	--text-2: #c9c7c0;
	--muted: #918f89;
	--accent: #ff6846;
	--accent-hover: #ff7c60;
	--accent-soft: rgba(255, 104, 70, 0.13);
	--blue: #70a9ff;
	--blue-soft: rgba(112, 169, 255, 0.13);
	--ok: #67d69d;
	--ok-soft: rgba(103, 214, 157, 0.13);
	--warn: #f2c261;
	--warn-soft: rgba(242, 194, 97, 0.13);
	--err: #ff7b7b;
	--err-soft: rgba(255, 123, 123, 0.13);
	--r-sm: 10px;
	--r-md: 14px;
	--r-lg: 20px;
	--shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
	--sidebar: 252px;
	font-size: 16px;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); scroll-behavior: smooth; }
body {
	margin: 0;
	min-height: 100vh;
	background:
		radial-gradient(circle at 76% -20%, rgba(255, 104, 70, 0.07), transparent 34rem),
		var(--bg);
	color: var(--text);
	font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo", sans-serif;
	font-size: 1rem;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
	font-variant-numeric: tabular-nums;
}

a { color: var(--blue); text-decoration: none; }
a:hover { color: #9ec5ff; }
::selection { background: rgba(255, 104, 70, 0.28); color: #fff; }

.skip-link {
	position: fixed;
	top: 12px;
	left: 12px;
	z-index: 200;
	transform: translateY(-80px);
	background: var(--text);
	color: var(--bg);
	padding: 10px 14px;
	border-radius: var(--r-sm);
	font-weight: 800;
}
.skip-link:focus { transform: translateY(0); }

button, input, textarea, select { font: inherit; }
button {
	min-height: 42px;
	padding: 9px 15px;
	border: 1px solid var(--line-strong);
	border-radius: var(--r-sm);
	background: var(--raised);
	color: var(--text);
	font-size: .9375rem !important;
	font-weight: 750;
	line-height: 1.35;
	cursor: pointer;
	white-space: nowrap;
	transition: transform .16s ease, background .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease;
}
button:hover { transform: translateY(-1px); border-color: #59616d; background: var(--overlay); }
button:active { transform: translateY(0); }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, a:focus-visible, [role="link"]:focus-visible {
	outline: 3px solid rgba(112, 169, 255, .45);
	outline-offset: 2px;
}
button.primary {
	border-color: var(--accent);
	background: var(--accent);
	color: #1b0a05;
	box-shadow: 0 8px 22px rgba(255, 104, 70, .16);
}
button.primary:hover { border-color: var(--accent-hover); background: var(--accent-hover); box-shadow: 0 10px 26px rgba(255, 104, 70, .24); }
button.ghost { min-height: 36px; border-color: transparent; background: transparent; color: var(--text-2); }
button.ghost:hover { border-color: var(--line); background: var(--raised); color: var(--text); }
button.subtle { background: transparent; border-color: var(--line-strong); color: var(--text-2); }
button.subtle:hover { background: var(--raised); border-color: #59616d; color: var(--text); }
button.big { min-height: 48px; padding: 12px 20px; border-radius: 12px; font-size: 1rem !important; }
button:disabled { opacity: .42; cursor: not-allowed; transform: none; box-shadow: none; }

input, textarea, select {
	width: 100%;
	min-height: 46px;
	padding: 11px 13px;
	border: 1px solid var(--line-strong);
	border-radius: var(--r-sm);
	background: #0e1115;
	color: var(--text);
	font-size: 1rem;
	line-height: 1.5;
	transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
input::placeholder, textarea::placeholder { color: #6f716f; }
input:hover, textarea:hover, select:hover { border-color: #545c68; }
input:focus, textarea:focus, select:focus { border-color: var(--blue); background: #11151b; box-shadow: 0 0 0 4px var(--blue-soft); outline: none; }
textarea { min-height: 118px; resize: vertical; }
label { display: block; margin: 18px 0 7px; color: var(--text-2); font-size: .9375rem; font-weight: 750; }
input[type="checkbox"] { width: 20px; height: 20px; min-height: 20px; accent-color: var(--accent); }

#app { min-height: 100vh; display: flex; }
.sidebar {
	position: sticky;
	top: 0;
	z-index: 30;
	width: var(--sidebar);
	height: 100vh;
	flex-shrink: 0;
	display: flex;
	flex-direction: column;
	gap: 7px;
	padding: 26px 18px 20px;
	border-right: 1px solid var(--line);
	background: rgba(14, 16, 20, .94);
	backdrop-filter: blur(18px);
}
.sidebar .brand {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 50px;
	margin: 0 6px 30px;
	color: var(--text);
}
.sidebar .brand:hover { color: var(--text); }
.sidebar .mark, .mobile-mark {
	position: relative;
	width: 38px;
	height: 38px;
	flex: 0 0 auto;
	border-radius: 12px;
	background: var(--accent);
	box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 8px 22px rgba(255,104,70,.2);
}
.sidebar .mark::after, .mobile-mark::after {
	content: "";
	position: absolute;
	left: 15px;
	top: 11px;
	width: 0;
	height: 0;
	border-top: 8px solid transparent;
	border-bottom: 8px solid transparent;
	border-left: 11px solid #1b0a05;
}
.brand-copy { display: flex; flex-direction: column; line-height: 1.2; }
.brand-copy strong { font-size: 1.02rem; letter-spacing: -.02em; }
.brand-copy small { margin-top: 5px; color: var(--muted); font-size: .6875rem; font-weight: 800; letter-spacing: .14em; }
.nav-label { margin: 0 12px 5px; color: #727570; font-size: .6875rem; font-weight: 800; letter-spacing: .16em; }
.sidebar a.nav {
	position: relative;
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 58px;
	padding: 9px 10px;
	border: 1px solid transparent;
	border-radius: 13px;
	color: var(--text-2);
	transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}
.sidebar a.nav:hover { transform: translateX(2px); border-color: var(--line); background: rgba(255,255,255,.035); color: var(--text); }
.sidebar a.nav.active { border-color: #343941; background: var(--raised); color: var(--text); box-shadow: inset 3px 0 0 var(--accent); }
.nav-icon {
	width: 34px;
	height: 34px;
	flex: 0 0 auto;
	display: grid;
	place-items: center;
	border-radius: 10px;
	background: #101318;
	color: var(--muted);
	font-size: .68rem;
	font-weight: 900;
	letter-spacing: -.03em;
}
.nav.active .nav-icon { background: var(--accent-soft); color: var(--accent); }
.nav-copy { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.nav-copy strong { font-size: .9375rem; }
.nav-copy small { margin-top: 4px; color: var(--muted); font-size: .8125rem; }
.sidebar .foot {
	margin-top: auto;
	padding: 15px 12px 4px;
	border-top: 1px solid var(--line);
	color: var(--muted);
	font-size: .8125rem;
	line-height: 1.55;
}
.system-state { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-weight: 700; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); }
.model-info { margin-top: 8px; word-break: break-word; }
.sidebar .logout {
	min-height: auto;
	margin-top: 10px;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--muted);
	font-size: .8125rem !important;
	font-weight: 650;
}
.sidebar .logout:hover { transform: none; color: var(--text); }

.main { min-width: 0; flex: 1; padding: 0; outline: none; }
.main-inner { width: min(100%, 1340px); padding: 48px 54px 100px; }
.mobile-head { display: none; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.page-title-wrap { min-width: 0; }
.page-kicker { margin-bottom: 8px; color: var(--accent); font-size: .75rem; font-weight: 850; letter-spacing: .15em; }
h2.page-title { margin: 0; font-size: clamp(1.8rem, 3vw, 2.5rem); line-height: 1.14; font-weight: 850; letter-spacing: -.045em; }
.page-sub { max-width: 720px; margin: 10px 0 0; color: var(--muted); font-size: 1rem; line-height: 1.65; }
.crumb { margin: 0 0 22px; font-size: .9375rem; font-weight: 700; }
.crumb a { color: var(--muted); }
.crumb a:hover { color: var(--text); }

.card {
	position: relative;
	margin-bottom: 18px;
	padding: 23px 24px;
	border: 1px solid var(--line);
	border-radius: var(--r-lg);
	background: rgba(20, 23, 28, .88);
	box-shadow: 0 1px 0 rgba(255,255,255,.025);
}
.card.flat { box-shadow: none; }
.card h3 { display: flex; align-items: center; gap: 9px; margin: 0 0 16px; font-size: 1.0625rem; line-height: 1.35; font-weight: 800; letter-spacing: -.02em; }
.card h3 .hint { color: var(--muted); font-size: .875rem; font-weight: 550; }
.row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.between { justify-content: space-between; }
.grid { display: grid; gap: 16px; }
.cols-2 { grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr)); }
.cols-3 { grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 360px); gap: 22px; align-items: start; }

.overview-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 38px; }
.metric-card {
	position: relative;
	min-height: 150px;
	padding: 21px 22px;
	border: 1px solid var(--line);
	border-radius: var(--r-lg);
	background: linear-gradient(145deg, rgba(28,32,38,.95), rgba(18,21,25,.95));
	overflow: hidden;
}
.metric-card::after { content: ""; position: absolute; right: -26px; bottom: -32px; width: 92px; height: 92px; border: 16px solid rgba(255,255,255,.025); border-radius: 50%; }
.metric-card > span { display: block; color: var(--text-2); font-size: .875rem; font-weight: 750; }
.metric-card strong { display: block; margin: 9px 0 3px; font-size: 2rem; line-height: 1.05; letter-spacing: -.04em; }
.metric-card small { color: var(--muted); font-size: .875rem; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin: 0 2px 14px; }
.section-head h3 { margin: 0; font-size: 1.1rem; }
.section-head > span { color: var(--muted); font-size: .875rem; font-weight: 700; }
.channel-card { display: flex; align-items: center; gap: 15px; min-height: 112px; margin-bottom: 0; cursor: pointer; transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease; }
.channel-card:hover { transform: translateY(-2px); border-color: #474e58; background: var(--raised); box-shadow: var(--shadow); }
.channel-card-body { min-width: 0; flex: 1; }
.channel-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1.0625rem; }
.card-arrow { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--raised); color: var(--muted); font-size: 1.1rem; transition: transform .18s ease, background .18s ease, color .18s ease; }
.channel-card:hover .card-arrow { transform: translateX(3px); background: var(--accent); color: #1b0a05; }

table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .9375rem; }
.main-inner > div > table { padding: 8px; border: 1px solid var(--line); border-radius: var(--r-lg); background: rgba(20, 23, 28, .88); }
th { padding: 11px 13px; border-bottom: 1px solid var(--line-strong); color: var(--muted); text-align: left; font-size: .875rem; font-weight: 750; white-space: nowrap; }
td { padding: 14px 13px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tr.click { cursor: pointer; }
tr.click td { transition: background .14s ease; }
tr.click:hover td { background: var(--raised); }
tr.click:hover td:first-child { border-radius: var(--r-sm) 0 0 var(--r-sm); }
tr.click:hover td:last-child { border-radius: 0 var(--r-sm) var(--r-sm) 0; }

.badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 28px;
	padding: 4px 10px;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--raised);
	color: var(--text-2);
	font-size: .875rem !important;
	font-weight: 800;
	line-height: 1.25;
	white-space: nowrap;
}
.badge.ok { border-color: transparent; background: var(--ok-soft); color: var(--ok); }
.badge.run { border-color: transparent; background: var(--blue-soft); color: var(--blue); }
.badge.err { border-color: transparent; background: var(--err-soft); color: var(--err); }
.badge.warn { border-color: transparent; background: var(--warn-soft); color: var(--warn); }
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.run .dot { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .22; } }

.log {
	max-height: 460px;
	overflow-y: auto;
	padding: 16px 17px;
	border: 1px solid #292f37;
	border-radius: var(--r-md);
	background: #090b0e;
	color: #d4d7d4;
	font-family: "SF Mono", ui-monospace, Menlo, monospace;
	font-size: .875rem;
	line-height: 1.75;
	word-break: break-word;
}
.log .t { margin-right: 10px; color: #626975; font-size: .8125rem; }
.log .tool { color: var(--blue); }
.log .think { color: #b8a3e1; font-style: italic; }
.log .err { color: var(--err); }
.log .notice { color: var(--text-2); }
.log .stage { color: var(--warn); font-weight: 800; }
.log .sub { opacity: .72; }

.kv { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 10px 18px; font-size: .9375rem; }
.kv dt { color: var(--muted); }
.kv dd { min-width: 0; margin: 0; word-break: break-word; }
pre.json {
	max-height: 420px;
	margin: 0;
	overflow: auto;
	padding: 16px 17px;
	border: 1px solid #292f37;
	border-radius: var(--r-md);
	background: #090b0e;
	color: #d7dbdc;
	font-size: .875rem;
	line-height: 1.7;
}
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip { padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--raised); color: var(--text-2); font-size: .875rem !important; font-weight: 650; }

.empty {
	display: flex;
	min-height: 310px;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	padding: 48px 24px;
	border: 1px dashed var(--line-strong);
	border-radius: var(--r-lg);
	background: rgba(20,23,28,.45);
	color: var(--muted);
	text-align: center;
	font-size: 1rem;
}
.empty-mark { position: relative; width: 54px; height: 54px; margin-bottom: 17px; border-radius: 16px; background: var(--accent-soft); }
.empty-mark::after { content: "+"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--accent); font-size: 1.75rem; font-weight: 500; }
.empty h3 { margin: 0; color: var(--text); font-size: 1.15rem; }
.empty p { max-width: 420px; margin: 8px 0 19px; }
.banner { display: flex; align-items: flex-start; gap: 11px; margin-bottom: 18px; padding: 14px 16px; border: 1px solid; border-radius: var(--r-md); font-size: .9375rem; line-height: 1.6; }
.banner.err { border-color: rgba(255,123,123,.32); background: var(--err-soft); color: #ffc2c2; }
.banner.warn { border-color: rgba(242,194,97,.3); background: var(--warn-soft); color: #f9d993; }
.banner.info { border-color: rgba(112,169,255,.28); background: var(--blue-soft); color: #c5ddff; }
.muted { color: var(--muted); }
.small { font-size: .875rem !important; }
.mt { margin-top: 16px; }
.spin { display: inline-block; width: 16px; height: 16px; margin-right: 8px; border: 2px solid var(--line-strong); border-top-color: var(--blue); border-radius: 50%; vertical-align: -3px; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
details > summary { padding: 8px 0; color: var(--text-2); font-size: .9375rem; font-weight: 750; cursor: pointer; user-select: none; }
details > summary:hover { color: var(--text); }
details[open] > summary { margin-bottom: 10px; }

.login-wrap { width: min(440px, calc(100% - 32px)); margin: auto; padding: 54px 0; }
.login-card { position: relative; padding: 42px 38px; border: 1px solid var(--line); border-radius: 26px; background: rgba(20,23,28,.94); box-shadow: var(--shadow); overflow: hidden; }
.login-card::after { content: ""; position: absolute; top: -80px; right: -70px; width: 180px; height: 180px; border: 34px solid rgba(255,104,70,.06); border-radius: 50%; pointer-events: none; }
.login-card h1 { position: relative; margin: 21px 0 5px; font-size: 1.65rem; letter-spacing: -.04em; }
.login-card .mark { position: relative; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 15px; background: var(--accent); color: #1b0a05; font-size: 24px; box-shadow: 0 10px 28px rgba(255,104,70,.22); }
.login-card p { position: relative; margin: 0 0 23px; color: var(--muted); font-size: .9375rem; }

.wizard-layout { display: grid; grid-template-columns: minmax(0, 720px) minmax(290px, 360px); gap: 22px; align-items: start; }
.creator-form { padding: 30px; }
.form-intro { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 25px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.form-intro > span { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 auto; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: .8125rem; font-weight: 850; }
.form-intro h3 { margin: 0 0 4px; font-size: 1.2rem; }
.form-intro p { margin: 0; color: var(--muted); font-size: .9375rem; }
.setup-guide { position: sticky; top: 32px; padding: 27px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.guide-label { color: var(--accent); font-size: .75rem; font-weight: 850; letter-spacing: .14em; }
.setup-guide > h3 { margin: 8px 0 22px; font-size: 1.15rem; }
.setup-guide ol { display: grid; gap: 21px; margin: 0; padding: 0; list-style: none; }
.setup-guide li { display: flex; align-items: flex-start; gap: 12px; }
.setup-guide li > span { display: grid; place-items: center; width: 28px; height: 28px; flex: 0 0 auto; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--text-2); font-size: .8125rem; font-weight: 800; }
.setup-guide li b { font-size: .9375rem; }
.setup-guide li p { margin: 3px 0 0; color: var(--muted); font-size: .875rem; line-height: 1.55; }
.guide-note { margin-top: 24px; padding: 13px 14px; border-radius: 12px; background: var(--raised); color: var(--muted); font-size: .875rem; }

.hero { display: flex; align-items: center; gap: 19px; margin-bottom: 24px; padding: 27px 28px; border: 1px solid var(--line); border-radius: 24px; background: linear-gradient(120deg, rgba(27,31,37,.98), rgba(18,21,25,.92)); overflow: hidden; }
.hero .avatar { width: 70px; height: 70px; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line-strong); border-radius: 20px; background: var(--raised); overflow: hidden; }
.hero .avatar img, .hero .avatar svg { width: 100%; height: 100%; object-fit: cover; }
.hero h2 { margin: 0; font-size: 1.55rem; font-weight: 850; letter-spacing: -.035em; }
.hero .tagline { margin-top: 4px; color: var(--text-2); font-size: .9375rem; }
.hero .pills { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }

.rail { position: relative; padding-left: 4px; }
.rail-item { position: relative; display: flex; gap: 13px; padding-bottom: 2px; }
.rail-item .node { z-index: 1; width: 24px; height: 24px; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; border: 1.5px solid var(--line-strong); border-radius: 50%; background: var(--raised); color: var(--muted); font-size: 11px; font-weight: 850; }
.rail-item.done .node { border-color: var(--ok); background: var(--ok-soft); color: var(--ok); }
.rail-item.now .node { border-color: var(--blue); background: var(--blue-soft); color: var(--blue); }
.rail-item.now .node::after { content: ""; position: absolute; width: 24px; height: 24px; border: 1.5px solid var(--blue); border-radius: 50%; animation: ring 1.6s ease-out infinite; }
@keyframes ring { from { transform: scale(1); opacity: .7; } to { transform: scale(1.7); opacity: 0; } }
.rail-item.failed .node { border-color: var(--err); background: var(--err-soft); color: var(--err); }
.rail-item .stem { position: absolute; left: 15.5px; top: 24px; bottom: -2px; width: 1.5px; background: var(--line-strong); }
.rail-item.done .stem { background: var(--ok); opacity: .38; }
.rail-item:last-child .stem { display: none; }
.rail-item .body { min-width: 0; flex: 1; padding: 1px 0 15px; }
.rail-item .label { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: .9375rem; font-weight: 750; }
.rail-item.done .label, .rail-item.now .label { color: var(--text); }
.rail-item .meta { margin-top: 3px; color: var(--muted); font-size: .875rem; line-height: 1.5; word-break: break-all; }
.rail-item .redo { margin-left: auto; padding: 3px 8px; opacity: 0; transition: opacity .14s ease; }
.rail-item:hover .redo, .rail-item:focus-within .redo { opacity: 1; }

.asset-tile { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); overflow: hidden; }
.asset-tile .preview { height: 145px; display: flex; align-items: center; justify-content: center; padding: 12px; background: #f2f1ed; overflow: hidden; }
.asset-tile .preview svg, .asset-tile .preview img { max-width: 100%; max-height: 121px; }
.asset-tile .info { padding: 14px; }
.asset-tile .info .name { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: .9375rem; font-weight: 800; }
.asset-tile .info .actions { display: flex; gap: 7px; margin-top: 10px; }
.asset-tile .info .actions button { min-height: 36px; }
.cfg-row { display: flex; align-items: center; gap: 11px; padding: 12px 2px; border-bottom: 1px solid var(--line); font-size: .9375rem; }
.cfg-row:last-child { border-bottom: none; }
.cfg-row .name { min-width: 112px; font-weight: 750; }
.cfg-row .desc { min-width: 0; flex: 1; overflow: hidden; color: var(--muted); font-size: .875rem; text-overflow: ellipsis; white-space: nowrap; }
.cfg-row button { min-height: 34px; }

.cand { margin-bottom: 10px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.cand.selected { border-color: rgba(103,214,157,.55); box-shadow: inset 4px 0 0 var(--ok); background: linear-gradient(90deg, var(--ok-soft), var(--surface) 36%); }
.cand .topic { font-size: 1rem; font-weight: 800; line-height: 1.45; }
.cand .hook { margin-top: 5px; color: var(--text-2); font-size: .9375rem; line-height: 1.55; }
.cand .scores { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

.modal-backdrop { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(4,5,7,.78); backdrop-filter: blur(6px); }
.modal { width: min(560px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; padding: 29px 30px; border: 1px solid var(--line-strong); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow); }
.modal h3 { margin: 0 0 7px; font-size: 1.25rem; }
.modal .desc { margin: 0 0 17px; color: var(--muted); font-size: .9375rem; line-height: 1.6; }
.modal .actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 22px; }
#toasts { position: fixed; right: 25px; bottom: 25px; z-index: 99; display: flex; flex-direction: column; gap: 9px; }
.toast { max-width: 410px; padding: 14px 18px; border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--overlay); color: var(--text); box-shadow: var(--shadow); font-size: .9375rem; line-height: 1.55; animation: slidein .18s ease-out; }
.toast.err { border-color: var(--err); }
@keyframes slidein { from { transform: translateY(8px); opacity: 0; } }
.progress { height: 7px; border-radius: 99px; background: #0d1014; overflow: hidden; }
.progress > div { height: 100%; border-radius: inherit; background: var(--blue); transition: width .6s ease; }
.review-grid { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 24px; align-items: start; }
.review-grid video { width: 270px; max-width: 100%; aspect-ratio: 9 / 16; border: 1px solid var(--line-strong); border-radius: 18px; background: #000; }

@media (max-width: 1120px) {
	.main-inner { padding-inline: 34px; }
	.two-col, .wizard-layout { grid-template-columns: 1fr; }
	.setup-guide { position: static; }
}

@media (max-width: 820px) {
	:root { --sidebar: 0px; }
	#app { display: block; }
	.sidebar {
		position: fixed;
		top: auto;
		bottom: 0;
		left: 0;
		right: 0;
		z-index: 80;
		width: 100%;
		height: auto;
		min-height: 76px;
		display: grid;
		grid-template-columns: repeat(4, 1fr);
		gap: 4px;
		padding: 8px max(8px, env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
		border-top: 1px solid var(--line);
		border-right: 0;
		background: rgba(14,16,20,.97);
	}
	.sidebar .brand, .sidebar .foot, .nav-label { display: none; }
	.sidebar a.nav { min-height: 56px; justify-content: center; flex-direction: column; gap: 3px; padding: 5px 2px; border-radius: 10px; }
	.sidebar a.nav:hover { transform: none; }
	.sidebar a.nav.active { box-shadow: inset 0 2px 0 var(--accent); }
	.nav-icon { width: auto; height: auto; background: transparent !important; font-size: .6875rem; }
	.nav-copy strong { font-size: .8125rem; }
	.nav-copy small { display: none; }
	.mobile-head { display: flex; align-items: center; gap: 10px; height: 62px; padding: 0 20px; border-bottom: 1px solid var(--line); background: rgba(11,13,16,.84); backdrop-filter: blur(14px); }
	.mobile-mark { width: 30px; height: 30px; border-radius: 9px; }
	.mobile-mark::after { left: 12px; top: 8px; border-top-width: 7px; border-bottom-width: 7px; border-left-width: 9px; }
	.mobile-head strong { font-size: .9375rem; }
	.main-inner { padding: 30px 20px 120px; }
	.page-head { align-items: flex-start; flex-direction: column; gap: 19px; margin-bottom: 25px; }
	.page-head > button, .page-head > .row { width: 100%; }
	.page-head > button { justify-content: center; }
	h2.page-title { font-size: 1.85rem; }
	.overview-grid { grid-template-columns: 1fr; gap: 10px; margin-bottom: 30px; }
	.metric-card { min-height: 118px; }
	.metric-card strong { font-size: 1.75rem; }
	.hero { align-items: flex-start; flex-wrap: wrap; padding: 22px; }
	.hero > button { width: 100%; }
	.review-grid { grid-template-columns: 1fr; }
	.review-grid video { margin: 0 auto; }
	table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
	.modal { padding: 25px 22px; }
	#toasts { right: 16px; bottom: 96px; left: 16px; }
	.toast { max-width: none; }
}

@media (max-width: 540px) {
	.main-inner { padding-inline: 16px; }
	.card { padding: 19px 18px; border-radius: 17px; }
	.cols-2, .cols-3 { grid-template-columns: 1fr; }
	.channel-card { align-items: flex-start; min-height: 0; }
	.channel-card .card-arrow { display: none; }
	.channel-card .row.between { align-items: flex-start; }
	.creator-form { padding: 21px 18px; }
	.creator-form > .row { display: grid; grid-template-columns: 1fr; gap: 0; }
	.setup-guide { padding: 22px 20px; }
	.kv { grid-template-columns: 1fr; gap: 4px; }
	.kv dd { margin-bottom: 10px; }
	.cfg-row { align-items: flex-start; flex-wrap: wrap; }
	.cfg-row .desc { order: 3; flex-basis: 100%; }
	.login-card { padding: 34px 25px; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
