/* Brandyar — modern workspace: neutral canvas, one raised white work surface, the active brand's colour as the only accent. */
@font-face { font-family: Vazirmatn; font-weight: 100 900; font-display: swap; src: url('/static/fonts/vazirmatn-arabic.woff2') format('woff2'); unicode-range: U+0600-06FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: Vazirmatn; font-weight: 100 900; font-display: swap; src: url('/static/fonts/vazirmatn-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122; }
@font-face { font-family: Lalezar; font-display: swap; src: url('/static/fonts/lalezar-arabic.woff2') format('woff2'); unicode-range: U+0600-06FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFF; }

:root {
  --canvas: #F2F2F4; --surface: #FFFFFF; --surface-2: #F8F8FA; --sunk: #F1F1F4; --line: #E6E6EB; --line-2: #EEEEF2;
  --ink: #16161A; --ink-2: #3D3D45; --muted: #6E6E78; --faint: #A3A3AD;
  --accent: #ED1C24; --accent-ink: #B5121A; --accent-soft: #FDECEC; --accent-glow: rgba(237, 28, 36, .14);
  --ok: #15803D; --ok-soft: #E8F6EE; --warn: #B45309; --warn-soft: #FDF3E4; --info: #1D4ED8; --info-soft: #EBF1FE;
  --violet: #6D28D9; --violet-soft: #F2ECFD; --slate: #475569; --slate-soft: #EEF1F5;
  --font: Vazirmatn, Tahoma, 'Segoe UI', sans-serif;
  --r-sm: 9px; --r: 13px; --r-lg: 18px; --r-xl: 24px;
  --sh-1: 0 1px 2px rgba(20, 20, 30, .05);
  --sh-2: 0 1px 2px rgba(20, 20, 30, .04), 0 6px 20px -6px rgba(20, 20, 30, .10);
  --sh-3: 0 2px 6px rgba(20, 20, 30, .05), 0 22px 50px -14px rgba(20, 20, 30, .22);
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 14.5px/1.8 var(--font); -webkit-font-smoothing: antialiased; font-feature-settings: "ss01"; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent-ink); text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.error { color: var(--accent-ink); font-size: .88rem; background: var(--accent-soft); padding: 6px 12px; border-radius: var(--r-sm); }
h1, h2, h3 { margin: 0; line-height: 1.45; text-wrap: balance; letter-spacing: -.01em; }
.num { font-variant-numeric: tabular-nums; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- buttons & inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 15px; border-radius: 11px;
  border: 1px solid var(--line); background: var(--surface); box-shadow: var(--sh-1); cursor: pointer; font-weight: 600; font-size: .9rem;
  white-space: nowrap; transition: background .15s, border-color .15s, box-shadow .15s, transform .15s var(--ease); color: var(--ink-2); }
.btn:hover { border-color: #D4D4DB; color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: transparent; color: #fff; box-shadow: 0 1px 2px var(--accent-glow), inset 0 1px 0 rgba(255, 255, 255, .18); }
.btn.primary:hover { background: var(--accent-ink); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; }
.btn.ghost:hover { background: var(--sunk); }
.btn.danger { color: var(--accent-ink); }
.btn.danger:hover { background: var(--accent-soft); border-color: transparent; }
.btn.sm { height: 31px; padding: 0 11px; font-size: .82rem; border-radius: 9px; }
.btn.wide { width: 100%; }
.btn[disabled] { opacity: .45; cursor: default; }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; border: 0; background: transparent; color: var(--muted); cursor: pointer; transition: background .15s, color .15s; }
.icon-btn:hover { background: var(--sunk); color: var(--ink); }
.icon-btn.solid { background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-1); }
.link { background: none; border: 0; padding: 0; color: var(--accent-ink); cursor: pointer; font-weight: 600; font-size: .85rem; }
.link:hover { text-decoration: underline; }
input[type=text], input[type=password], input:not([type]), select, textarea {
  width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 11px; padding: 8px 12px; transition: border-color .15s, box-shadow .15s; }
input:not([type=checkbox]), select { height: 40px; }
textarea { resize: vertical; line-height: 1.85; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-glow); }
label { display: block; font-size: .78rem; font-weight: 700; color: var(--muted); margin: 14px 0 6px; }

/* ---------- brand mark */
.mark { display: inline-flex; align-items: center; gap: 10px; font-weight: 900; font-size: 1.25rem; letter-spacing: -.02em; color: var(--ink); }
.mark i { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-ink)); box-shadow: 0 4px 12px -2px var(--accent-glow); }
.mark i svg { width: 17px; height: 17px; stroke: #fff; fill: #fff; stroke-width: 1.2; }

/* ---------- login */
.login { min-height: 100%; display: grid; place-items: center; padding: 24px 16px;
  background: radial-gradient(900px 500px at 85% -10%, var(--accent-glow), transparent 60%), var(--canvas); }
.login-card { width: min(400px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 34px 30px 30px; box-shadow: var(--sh-3); }
.login-card .mark { font-size: 1.5rem; }
.login-card p { margin: 6px 0 10px; }
.login-card .btn { margin-top: 22px; height: 44px; }

/* ---------- shell */
.shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); height: 100%; }
.side { padding: 18px 14px 14px; display: flex; flex-direction: column; gap: 18px; overflow-y: auto; min-width: 0; }
.side > .mark { padding: 2px 8px; }
.brand-card { display: flex; align-items: center; gap: 11px; padding: 10px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-1); }
.brand-card .logo { width: 44px; height: 44px; border-radius: 11px; background: #fff; border: 1px solid var(--line-2); display: grid; place-items: center; overflow: hidden; flex: none; }
.brand-card img { width: 40px; height: auto; }
.brand-card b { display: block; font-size: .92rem; line-height: 1.5; }
.brand-card span { display: block; font-size: .74rem; color: var(--muted); line-height: 1.5; }
.nav { display: grid; gap: 2px; }
.nav-label { font-size: .7rem; font-weight: 700; color: var(--faint); padding: 0 10px; margin-bottom: -10px; letter-spacing: .02em; }
.nav a { display: flex; align-items: center; gap: 11px; height: 38px; padding: 0 10px; border-radius: 10px; color: var(--ink-2); font-weight: 600; font-size: .9rem; transition: background .15s, color .15s; }
.nav a svg { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; color: var(--muted); }
.nav a:hover { background: rgba(20, 20, 30, .045); }
.nav a.on { background: var(--surface); color: var(--ink); box-shadow: var(--sh-1), 0 0 0 1px var(--line); }
.nav a.on svg { color: var(--accent); }
.side-foot { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: var(--r); }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fff; font-weight: 800; font-size: .85rem; flex: none; }
.side-foot .who { flex: 1; min-width: 0; font-size: .85rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.view { overflow-y: auto; min-width: 0; margin: 10px 10px 10px 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--sh-1); position: relative; }
.page { padding: 30px 36px 56px; max-width: 1220px; margin: 0 auto; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 22px; }
.page-head h1 { font-size: 1.65rem; font-weight: 850; letter-spacing: -.02em; }
.page-head .sub { color: var(--muted); font-size: .9rem; margin-top: 2px; }
.page-head .tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ---------- pills */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 23px; padding: 0 9px; border-radius: 999px; font-size: .72rem; font-weight: 700; white-space: nowrap; background: var(--sunk); color: var(--ink-2); }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.pill.plain::before { display: none; }
.st-planned { background: var(--slate-soft); color: var(--slate); }
.st-draft { background: var(--warn-soft); color: var(--warn); }
.st-review { background: var(--violet-soft); color: var(--violet); }
.st-approved { background: var(--info-soft); color: var(--info); }
.st-published { background: var(--ok-soft); color: var(--ok); }
.st-archived { background: var(--sunk); color: var(--muted); }
.st-raw { background: var(--sunk); color: var(--ink-2); }
.st-cooking { background: var(--warn-soft); color: var(--warn); }
.st-ready { background: var(--ok-soft); color: var(--ok); }
.st-used { background: var(--info-soft); color: var(--info); }
.plat { display: inline-flex; align-items: center; gap: 7px; font-size: .78rem; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.plat::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--pc, var(--muted)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pc, #888) 16%, transparent); }

/* ---------- home (bento) */
.hello { font-size: 1.9rem; font-weight: 850; letter-spacing: -.025em; }
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 20px; min-width: 0; box-shadow: var(--sh-1); }
.tile h3 { font-size: .92rem; font-weight: 800; display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.hero-ask { grid-column: span 12; position: relative; overflow: hidden; padding: 26px 26px 22px; border-radius: var(--r-xl);
  background: radial-gradient(700px 260px at 100% 0%, var(--accent-glow), transparent 70%), radial-gradient(500px 220px at 0% 120%, rgba(245, 158, 11, .08), transparent 70%), var(--surface); }
.hero-ask h2 { font-size: 1.35rem; font-weight: 850; letter-spacing: -.02em; }
.hero-ask p { margin: 4px 0 0; color: var(--muted); font-size: .9rem; max-width: 70ch; }
.askbox { margin-top: 18px; display: flex; align-items: flex-end; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 8px 8px 8px 10px; box-shadow: var(--sh-2); transition: border-color .15s, box-shadow .15s; }
.askbox:focus-within { border-color: var(--accent); box-shadow: var(--sh-2), 0 0 0 4px var(--accent-glow); }
.askbox textarea { border: 0; box-shadow: none !important; background: transparent; resize: none; min-height: 46px; max-height: 220px; padding: 9px 8px; }
.send { width: 42px; height: 42px; border-radius: 12px; border: 0; background: var(--accent); color: #fff; display: grid; place-items: center; cursor: pointer; flex: none; transition: background .15s, transform .15s var(--ease); box-shadow: 0 6px 16px -6px var(--accent); }
.send:hover { background: var(--accent-ink); }
.send:active { transform: scale(.96); }
.send[disabled] { opacity: .4; cursor: default; box-shadow: none; }
.send svg { width: 19px; height: 19px; stroke: #fff; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.quick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.quick button { display: flex; gap: 11px; align-items: flex-start; text-align: right; border: 1px solid var(--line); background: rgba(255, 255, 255, .7); border-radius: var(--r); padding: 12px 13px; cursor: pointer; font-size: .84rem; line-height: 1.7; color: var(--ink-2); transition: border-color .15s, transform .2s var(--ease), box-shadow .2s; backdrop-filter: blur(4px); }
.quick button:hover { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); transform: translateY(-2px); box-shadow: var(--sh-2); }
.quick button b { display: block; color: var(--ink); font-size: .86rem; margin-bottom: 1px; }
.quick .qi { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex: none; background: var(--accent-soft); color: var(--accent-ink); }
.quick .qi svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.stat { grid-column: span 3; display: flex; flex-direction: column; gap: 2px; }
.stat .k { font-size: .8rem; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 8px; }
.stat .k svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.stat .v { font-size: 2rem; font-weight: 850; letter-spacing: -.03em; line-height: 1.3; }
.stat .s { font-size: .78rem; color: var(--faint); }
.span7 { grid-column: span 7; } .span5 { grid-column: span 5; }
.timeline { display: grid; }
.trow { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 9px 6px; border-radius: 11px; cursor: pointer; transition: background .15s; }
.trow:hover { background: var(--surface-2); }
.trow + .trow { border-top: 1px solid var(--line-2); }
.dbadge { width: 46px; height: 48px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--line-2); display: grid; place-content: center; text-align: center; line-height: 1.15; }
.dbadge b { font-size: 1.05rem; font-weight: 850; }
.dbadge span { font-size: .64rem; color: var(--muted); font-weight: 700; }
.dbadge.occ { background: var(--warn-soft); border-color: transparent; color: var(--warn); }
.dbadge.occ span { color: var(--warn); }
.trow .t { min-width: 0; }
.trow .t b { display: block; font-size: .88rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trow .t span { font-size: .76rem; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.empty { color: var(--muted); font-size: .86rem; padding: 14px 4px; }

/* ---------- chat */
.chat { display: grid; grid-template-columns: 264px minmax(0, 1fr); height: 100%; }
.threads { border-inline-end: 1px solid var(--line-2); background: var(--surface-2); display: flex; flex-direction: column; min-height: 0; border-radius: 0 var(--r-xl) var(--r-xl) 0; }
.threads-head { padding: 16px 14px 10px; display: flex; align-items: center; justify-content: space-between; }
.threads-head b { font-size: .92rem; font-weight: 800; }
.threads-list { overflow-y: auto; padding: 4px 8px 12px; display: grid; gap: 1px; align-content: start; }
.threads-list a { display: block; padding: 8px 10px; border-radius: 10px; color: var(--ink-2); min-width: 0; transition: background .15s; }
.threads-list a .tt { display: block; font-size: .85rem; font-weight: 600; line-height: 1.6; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.threads-list a .tm { display: block; font-size: .7rem; color: var(--faint); }
.threads-list a:hover { background: rgba(20, 20, 30, .045); }
.threads-list a.on { background: var(--surface); box-shadow: var(--sh-1), 0 0 0 1px var(--line); color: var(--ink); }
.threads-list a .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-inline-end: 6px; animation: pulse 1.2s infinite; }
.convo { display: flex; flex-direction: column; min-height: 0; height: 100%; position: relative; }
.msgs { flex: 1; overflow-y: auto; padding: 28px 32px 12px; scroll-behavior: smooth; }
.msgs-inner { max-width: 780px; margin: 0 auto; display: grid; gap: 22px; }
.m-user { justify-self: end; max-width: 78%; background: var(--sunk); color: var(--ink); padding: 11px 16px; border-radius: 20px 20px 20px 6px; white-space: pre-wrap; line-height: 1.85; font-size: .94rem; }
.m-asst { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; min-width: 0; }
.m-asst .av { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: linear-gradient(135deg, var(--accent), var(--accent-ink)); color: #fff; margin-top: 2px; }
.m-asst .av svg { width: 15px; height: 15px; fill: #fff; stroke: #fff; stroke-width: 1.2; }
.m-asst .body { min-width: 0; }
.prose { line-height: 1.95; font-size: .95rem; }
.prose p { margin: 0 0 10px; }
.prose h2, .prose h3, .prose h4, .prose h5 { font-size: 1rem; font-weight: 800; margin: 18px 0 6px; }
.prose ul, .prose ol { margin: 0 0 10px; padding-inline-start: 22px; }
.prose li { margin: 3px 0; }
.prose li::marker { color: var(--faint); }
.prose blockquote { margin: 0 0 10px; padding: 8px 14px; border-inline-start: 3px solid var(--accent); background: var(--accent-soft); border-radius: 0 10px 10px 0; color: var(--ink-2); }
.prose code { background: var(--sunk); padding: 1px 6px; border-radius: 6px; font-size: .86em; }
.prose pre { background: var(--sunk); padding: 12px; border-radius: 10px; overflow-x: auto; direction: ltr; text-align: left; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
.prose strong { font-weight: 800; }
.tbl { overflow-x: auto; margin: 4px 0 14px; border: 1px solid var(--line); border-radius: 12px; }
.tbl table { border-collapse: collapse; width: 100%; font-size: .85rem; }
.tbl th, .tbl td { padding: 8px 12px; border-bottom: 1px solid var(--line-2); text-align: right; vertical-align: top; }
.tbl th { background: var(--surface-2); font-size: .76rem; color: var(--muted); white-space: nowrap; font-weight: 700; }
.tbl tr:last-child td { border-bottom: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 10px; }
.toolchip { display: inline-flex; align-items: center; gap: 6px; font-size: .75rem; font-weight: 600; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line-2); height: 26px; padding: 0 10px; border-radius: 999px; }
.toolchip .ok { color: var(--ok); font-weight: 900; }
.toolchip.err { color: var(--accent-ink); background: var(--accent-soft); border-color: transparent; }
.spin { width: 11px; height: 11px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
.thinking { display: inline-flex; gap: 5px; padding: 8px 0; }
.thinking i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); opacity: .5; animation: pulse 1.2s infinite; }
.thinking i:nth-child(2) { animation-delay: .2s; } .thinking i:nth-child(3) { animation-delay: .4s; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: .25; transform: scale(.85); } 50% { opacity: 1; transform: scale(1); } }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.composer { padding: 6px 32px 18px; background: linear-gradient(to top, var(--surface) 70%, transparent); }
.composer-inner { max-width: 780px; margin: 0 auto; }
.composer .askbox { margin-top: 0; }
.composer .hint { max-width: 780px; margin: 6px auto 0; font-size: .7rem; color: var(--faint); text-align: center; }
.starter { max-width: 780px; margin: 7vh auto 0; text-align: center; }
.starter .mark i { width: 52px; height: 52px; border-radius: 15px; margin: 0 auto; }
.starter .mark i svg { width: 26px; height: 26px; }
.starter h2 { font-size: 1.6rem; font-weight: 850; letter-spacing: -.025em; margin-top: 16px; }
.starter p { color: var(--muted); margin: 6px auto 0; max-width: 56ch; }
.starter .quick { text-align: right; margin-top: 26px; }

/* ---------- cards inside chat */
.card { border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-lg); overflow: hidden; margin: 6px 0 12px; box-shadow: var(--sh-2); animation: rise .35s var(--ease); }
.card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 12px 16px; border-bottom: 1px solid var(--line-2); }
.card-head .ttl { font-weight: 800; flex: 1; min-width: 160px; font-size: .92rem; }
.card-head .meta { font-size: .75rem; color: var(--muted); }
.card-body { padding: 13px 16px; }
.card-body .hook { font-weight: 800; margin-bottom: 6px; }
.card-body .txt { white-space: pre-wrap; line-height: 1.95; max-height: 14em; overflow: hidden; position: relative; font-size: .92rem; color: var(--ink-2); }
.card-body .txt:not(.open)::after { content: ''; position: absolute; inset: auto 0 0 0; height: 3em; background: linear-gradient(to top, var(--surface), transparent); }
.card-body .txt.open { max-height: none; }
.card-body .txt.open::after { display: none; }
.card-body .tags { color: var(--info); font-size: .82rem; margin-top: 10px; direction: rtl; line-height: 1.9; }
.card-foot { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 16px 14px; }
.shots { display: flex; gap: 10px; overflow-x: auto; padding: 14px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line-2); scrollbar-width: thin; }
.shots img { height: 200px; width: auto; border-radius: 10px; box-shadow: var(--sh-2); cursor: zoom-in; flex: none; transition: transform .2s var(--ease); }
.shots img:hover { transform: translateY(-2px); }
.slides-mini { display: grid; gap: 4px; font-size: .82rem; color: var(--ink-2); margin-top: 10px; padding: 10px 12px; background: var(--surface-2); border-radius: 11px; }
.cal-list { display: grid; }
.cal-list .r { display: grid; grid-template-columns: 92px 104px minmax(0, 1fr) auto; gap: 10px; padding: 8px 16px; border-top: 1px solid var(--line-2); font-size: .84rem; cursor: pointer; align-items: center; }
.cal-list .r:first-child { border-top: 0; }
.cal-list .r:hover { background: var(--surface-2); }
.mem-card { display: inline-flex; gap: 8px; align-items: center; font-size: .82rem; font-weight: 600; color: var(--ok); background: var(--ok-soft); padding: 7px 14px; border-radius: 999px; margin: 4px 0 10px; }

/* ---------- ideas board */
.board { display: grid; grid-template-columns: repeat(4, minmax(230px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.col { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--r-lg); padding: 10px; display: grid; gap: 8px; align-content: start; min-height: 240px; }
.col h3 { font-size: .85rem; font-weight: 800; display: flex; align-items: center; gap: 8px; padding: 4px 6px 2px; }
.col h3 .count { margin-inline-start: auto; font-size: .72rem; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 0 8px; }
.idea { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 11px 13px; cursor: pointer; display: grid; gap: 6px; box-shadow: var(--sh-1); transition: transform .2s var(--ease), box-shadow .2s, border-color .15s; }
.idea:hover { transform: translateY(-2px); box-shadow: var(--sh-2); border-color: #D9D9E0; }
.idea b { font-size: .88rem; line-height: 1.65; }
.idea p { margin: 0; font-size: .78rem; color: var(--muted); line-height: 1.75; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.idea .chips { margin: 0; }
.add-idea { display: flex; gap: 6px; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--r); padding: 4px; }
.add-idea input { border: 0; height: 32px; box-shadow: none !important; background: transparent; }

/* ---------- calendar */
.cal-head { display: flex; align-items: center; gap: 12px; }
.cal-head h1 { min-width: 170px; }
.seg { display: inline-flex; background: var(--sunk); border-radius: 11px; padding: 3px; gap: 2px; }
.seg a, .seg button { height: 30px; min-width: 32px; padding: 0 10px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; color: var(--ink-2); font-weight: 600; font-size: .82rem; border: 0; background: transparent; cursor: pointer; }
.seg a:hover, .seg button:hover { background: var(--surface); box-shadow: var(--sh-1); }
.seg svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--line-2); gap: 1px; }
.cal .wd { background: var(--surface-2); text-align: center; font-size: .74rem; font-weight: 700; color: var(--muted); padding: 9px 0; }
.cal .day { background: var(--surface); min-height: 124px; padding: 8px; display: flex; flex-direction: column; gap: 4px; min-width: 0; cursor: pointer; transition: background .15s; }
.cal .day:hover { background: #FCFCFD; }
.cal .day.out { background: var(--surface-2); cursor: default; }
.cal .dn { font-weight: 800; font-size: .85rem; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-2); }
.cal .day.today .dn { background: var(--accent); color: #fff; box-shadow: 0 4px 10px -3px var(--accent); }
.cal .day.fri .dn { color: var(--accent-ink); }
.cal .day.today.fri .dn { color: #fff; }
.cal .occ { font-size: .66rem; font-weight: 700; color: var(--warn); background: var(--warn-soft); border-radius: 6px; padding: 1px 6px; line-height: 1.6; align-self: flex-start; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal .it { font-size: .72rem; font-weight: 600; line-height: 1.55; padding: 3px 7px; border-radius: 7px; color: var(--ink-2);
  background: color-mix(in srgb, var(--pc, #888) 10%, white); border-inline-start: 3px solid var(--pc, var(--muted)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: transform .15s var(--ease); }
.cal .it:hover { transform: translateX(-2px); }
.cal .it.planned { background: var(--surface); outline: 1px dashed color-mix(in srgb, var(--pc, #888) 45%, white); outline-offset: -1px; }
.legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 12px; font-size: .78rem; color: var(--muted); align-items: center; }

/* ---------- library */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.filters select { width: auto; min-width: 150px; }
.search { position: relative; flex: 1; min-width: 220px; max-width: 360px; }
.search svg { position: absolute; inset-inline-start: 12px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; stroke: var(--faint); fill: none; stroke-width: 2; stroke-linecap: round; }
.search input { padding-inline-start: 38px; }
.lib { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow-x: auto; }
.lib table { width: 100%; border-collapse: collapse; min-width: 760px; }
.lib th, .lib td { text-align: right; padding: 12px 16px; border-bottom: 1px solid var(--line-2); font-size: .86rem; }
.lib th { font-size: .74rem; color: var(--muted); background: var(--surface-2); font-weight: 700; }
.lib tr:last-child td { border-bottom: 0; }
.lib tbody tr { cursor: pointer; transition: background .15s; }
.lib tbody tr:hover td { background: var(--surface-2); }
.lib .t { font-weight: 700; color: var(--ink); }
.lib .thumbs { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: .78rem; }
.lib .thumbs img { width: 30px; height: 36px; object-fit: cover; border-radius: 5px; box-shadow: var(--sh-1); }

/* ---------- drawer */
.drawer-wrap { position: fixed; inset: 0; z-index: 30; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(15, 15, 22, .32); backdrop-filter: blur(2px); animation: fade .2s ease; }
.drawer { position: absolute; top: 10px; bottom: 10px; left: 10px; width: min(780px, calc(100% - 20px)); background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--sh-3); display: flex; flex-direction: column; overflow: hidden; animation: slide .28s var(--ease); }
@keyframes fade { from { opacity: 0; } }
@keyframes slide { from { transform: translateX(-24px); opacity: 0; } }
.drawer-head { display: flex; align-items: center; gap: 10px; padding: 16px 22px; border-bottom: 1px solid var(--line-2); }
.drawer-head h2 { font-size: 1.05rem; font-weight: 800; flex: 1; }
.drawer-body { overflow-y: auto; padding: 6px 22px 28px; flex: 1; }
.drawer-foot { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--line-2); background: var(--surface-2); }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 14px; }
.slide-ed { border: 1px solid var(--line); border-radius: var(--r); padding: 4px 14px 14px; margin-top: 10px; background: var(--surface-2); }
.slide-ed .bar { display: flex; gap: 6px; align-items: center; margin-top: 8px; }
.slide-ed .bar b { flex: 1; font-size: .84rem; }
.section-t { font-weight: 800; margin-top: 24px; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
details.fold { margin-top: 18px; border: 1px solid var(--line); border-radius: var(--r); padding: 4px 16px 14px; background: var(--surface); }
details.fold summary { cursor: pointer; font-weight: 800; padding: 10px 0; list-style: none; display: flex; align-items: center; gap: 8px; }
details.fold summary::-webkit-details-marker { display: none; }
details.fold summary::before { content: '‹'; font-size: 1.1rem; color: var(--muted); transition: transform .2s; display: inline-block; }
details.fold[open] summary::before { transform: rotate(-90deg); }

/* ---------- brand page */
.tabs { display: inline-flex; background: var(--sunk); border-radius: 12px; padding: 3px; gap: 2px; }
.tabs a { height: 34px; padding: 0 14px; border-radius: 9px; display: inline-flex; align-items: center; font-weight: 700; font-size: .85rem; color: var(--muted); }
.tabs a.on { background: var(--surface); color: var(--ink); box-shadow: var(--sh-1); }
.brain { max-width: 860px; }
.brain h1 { font-size: 1.5rem; font-weight: 850; }
.brain h2 { font-size: 1.15rem; font-weight: 850; margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--line-2); }
.brain h3, .brain h4 { font-size: .98rem; margin: 16px 0 6px; }
.prods { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.prod { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; display: grid; transition: transform .2s var(--ease), box-shadow .2s; }
.prod:hover { transform: translateY(-3px); box-shadow: var(--sh-2); }
.prod .ph { aspect-ratio: 1; background: #fff; display: grid; place-items: center; position: relative; }
.prod .ph::after { content: ''; position: absolute; inset: auto 0 0 0; height: 3px; background: var(--pc, var(--line)); }
.prod img { width: 82%; height: 82%; object-fit: contain; }
.prod .pb { padding: 10px 12px 12px; font-size: .78rem; line-height: 1.7; color: var(--muted); }
.prod b { display: block; font-size: .86rem; color: var(--ink); }
.mem-list { display: grid; gap: 8px; }
.mem { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); font-size: .9rem; }
.mem .pill { flex: none; }
.mem p { margin: 0; flex: 1; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px 22px; min-width: 0; }
.panel h3 { font-size: .98rem; font-weight: 800; margin-bottom: 4px; }
.row-form { display: flex; gap: 8px; align-items: center; }

/* ---------- overlays */
.lightbox { position: fixed; inset: 0; z-index: 40; background: rgba(10, 10, 14, .86); display: grid; place-items: center; padding: 24px; animation: fade .2s ease; }
.lightbox img { max-width: 100%; max-height: 90vh; border-radius: 14px; box-shadow: var(--sh-3); }
.lb-close { position: absolute; top: 16px; left: 16px; background: #fff; border: 0; border-radius: 10px; height: 36px; padding: 0 14px; cursor: pointer; font-weight: 700; }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 9px 18px; border-radius: 12px; z-index: 50; font-size: .88rem; font-weight: 600; box-shadow: var(--sh-3); animation: rise .25s var(--ease); }

/* ---------- responsive */
@media (max-width: 1100px) {
  .quick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { grid-column: span 6; }
  .span7, .span5 { grid-column: span 12; }
}
@media (max-width: 980px) {
  .chat { grid-template-columns: 1fr; }
  .threads { display: none; }
  .board { grid-template-columns: repeat(4, 260px); }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .side { flex-direction: row; align-items: center; padding: 8px 12px; overflow-x: auto; gap: 10px; }
  .side > .mark span { display: none; }
  .brand-card, .side-foot, .nav-label { display: none; }
  .nav { display: flex; gap: 2px; }
  .nav a { padding: 0 9px; }
  .nav a span { display: none; }
  .view { margin: 0 8px 8px; border-radius: var(--r-lg); }
  .page { padding: 18px 16px 40px; }
  .msgs, .composer { padding-inline: 14px; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .stat { grid-column: span 6; }
  .quick { grid-template-columns: 1fr; }
  .cal .day { min-height: 70px; padding: 4px; }
  .cal .it { font-size: 0; padding: 0; height: 6px; border-radius: 3px; }
  .cal .occ { display: none; }
  .drawer { inset: 0; width: 100%; border-radius: 0; top: 0; bottom: 0; left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------------------------------------------------------------- studio (dark creative surface, brand accent) */
.studio { --st-bg: #121214; --st-panel: #1B1B1F; --st-panel-2: #232328; --st-line: rgba(255, 255, 255, .08); --st-ink: #F4F4F6; --st-muted: #9A9AA6;
  min-height: 100%; background: radial-gradient(900px 420px at 50% 120px, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
  radial-gradient(rgba(255, 255, 255, .055) 1px, transparent 1px) 0 0 / 22px 22px, var(--st-bg);
  color: var(--st-ink); padding: 34px 32px 64px; border-radius: inherit; }
.studio .empty { color: var(--st-muted); }
.st-hero { display: flex; flex-direction: column; align-items: center; text-align: center; max-width: 1180px; margin: 0 auto; }
.st-pill { font-size: .78rem; font-weight: 800; letter-spacing: .02em; padding: 6px 16px; border-radius: 999px; background: rgba(255, 255, 255, .06);
  border: 1px solid var(--st-line); color: #D9D9E0; }
.st-fan { position: relative; height: 300px; width: min(100%, 860px); margin: 26px 0 10px; }
.st-card { position: absolute; top: 50%; left: 50%; border-radius: 16px; overflow: hidden; background: var(--st-panel); box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .7);
  border: 1px solid var(--st-line); transition: transform .5s var(--ease); }
.st-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.st-card.p0 { width: 230px; height: 290px; transform: translate(-50%, -50%); z-index: 3; }
.st-card.p1 { width: 190px; height: 240px; transform: translate(calc(-50% + 205px), -50%) rotate(3deg); z-index: 2; }
.st-card.p2 { width: 190px; height: 240px; transform: translate(calc(-50% - 205px), -50%) rotate(-3deg); z-index: 2; }
.st-card.p3 { width: 160px; height: 200px; transform: translate(calc(-50% + 375px), -50%) rotate(6deg); z-index: 1; opacity: .85; }
.st-card.p4 { width: 160px; height: 200px; transform: translate(calc(-50% - 375px), -50%) rotate(-6deg); z-index: 1; opacity: .85; }
.st-fan:hover .st-card.p0 { transform: translate(-50%, -54%) scale(1.03); }
.st-prod { display: grid; place-items: center; width: 100%; height: 100%; background: linear-gradient(160deg, color-mix(in srgb, var(--pc) 85%, #fff), color-mix(in srgb, var(--pc) 65%, #000)); }
.st-prod img { width: 66%; height: auto; aspect-ratio: 1; object-fit: contain; background: #fff; border-radius: 22px; padding: 8px; box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .55); }
.st-tag { position: absolute; bottom: 10px; right: 10px; font-size: .7rem; font-weight: 800; padding: 3px 10px; border-radius: 999px;
  background: rgba(0, 0, 0, .55); color: #fff; backdrop-filter: blur(6px); }
.st-hero h1 { font-size: clamp(2rem, 4.4vw, 3.3rem); font-weight: 900; line-height: 1.15; letter-spacing: -.02em; margin-top: 8px; }
.st-hero h1 span { color: color-mix(in srgb, var(--st-ink) 62%, transparent); }
.st-lead { color: var(--st-muted); margin: 10px 0 26px; font-size: .95rem; }

.st-composer { position: relative; width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 12px; align-items: stretch;
  background: rgba(255, 255, 255, .03); border: 1px solid var(--st-line); border-radius: 26px; padding: 12px; text-align: right; }
.st-mode { display: flex; flex-direction: column; gap: 6px; background: var(--st-panel); border: 1px solid var(--st-line); border-radius: 18px; padding: 6px; }
.st-mode button { display: grid; justify-items: center; gap: 2px; border: 0; background: transparent; color: var(--st-muted); padding: 9px 14px; border-radius: 13px;
  cursor: pointer; font-size: .8rem; font-weight: 700; }
.st-mode button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.st-mode button.on { background: var(--st-panel-2); color: #fff; box-shadow: inset 0 0 0 1px var(--st-line); }
.st-box { background: var(--st-panel); border: 1px solid var(--st-line); border-radius: 18px; padding: 14px 16px 10px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.st-box textarea { width: 100%; resize: none; border: 0; outline: 0; background: transparent; color: #fff; font-size: 1rem; line-height: 1.8; min-height: 56px; }
.st-box textarea::placeholder { color: #75757F; }
.st-row { display: flex; flex-wrap: wrap; gap: 7px; }
.st-chip { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 11px; background: var(--st-panel-2);
  border: 1px solid var(--st-line); color: #E6E6EC; font-size: .82rem; font-weight: 600; white-space: nowrap; }
.st-chip svg { width: 15px; height: 15px; fill: none; stroke: color-mix(in srgb, var(--accent) 70%, #fff); stroke-width: 2; }
.st-chip select { appearance: none; -webkit-appearance: none; border: 0; outline: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; padding-left: 14px;
  background-image: linear-gradient(45deg, transparent 50%, #9A9AA6 50%), linear-gradient(135deg, #9A9AA6 50%, transparent 50%);
  background-position: 4px 55%, 8px 55%; background-size: 4px 4px; background-repeat: no-repeat; }
.st-chip select option { background: #1B1B1F; color: #fff; }
.st-step button { border: 0; background: transparent; color: #fff; font-size: 1.05rem; cursor: pointer; width: 20px; }
.st-step b { min-width: 14px; text-align: center; }
.st-toggle { cursor: pointer; }
.st-toggle input { accent-color: var(--accent); width: 15px; height: 15px; margin: 0; }
.st-slot { width: 118px; border-radius: 18px; border: 1px dashed rgba(255, 255, 255, .18); background: var(--st-panel); color: #E6E6EC; cursor: pointer;
  display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; padding: 12px; font-weight: 800; font-size: .8rem; gap: 6px; overflow: hidden; }
.st-slot i { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .25); }
.st-slot i svg { width: 14px; height: 14px; stroke: #fff; stroke-width: 2; fill: none; }
.st-slot.has { border-style: solid; background: #fff; color: var(--ink); }
.st-slot.has img { width: 100%; height: 62px; object-fit: contain; }
.st-slot.has span { font-size: .72rem; line-height: 1.4; text-align: right; }
.st-go { width: 170px; border: 0; border-radius: 18px; cursor: pointer; display: grid; place-content: center; gap: 2px; color: #fff;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 88%, #fff), var(--accent)); box-shadow: 0 12px 30px -8px var(--accent), inset 0 1px 0 rgba(255, 255, 255, .25);
  transition: transform .15s var(--ease), filter .15s; }
.st-go b { font-size: 1.15rem; font-weight: 900; }
.st-go span { font-size: .76rem; opacity: .92; }
.st-go:hover { filter: brightness(1.06); }
.st-go:active { transform: translateY(1px); }
.st-go[disabled] { opacity: .5; cursor: wait; }
.st-picker { position: absolute; z-index: 5; top: calc(100% + 8px); left: 12px; width: min(560px, calc(100% - 24px)); background: #1E1E23; border: 1px solid var(--st-line);
  border-radius: 18px; padding: 12px; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .8); }
.st-picker-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.st-picker-head .btn { color: #D9D9E0; }
.st-picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; max-height: 300px; overflow-y: auto; }
.st-picker-grid button { border: 1px solid var(--st-line); background: #fff; border-radius: 12px; padding: 6px; cursor: pointer; display: grid; gap: 4px; }
.st-picker-grid button.on { outline: 2px solid var(--accent); }
.st-picker-grid img { width: 100%; height: 70px; object-fit: contain; }
.st-picker-grid span { font-size: .68rem; line-height: 1.4; color: var(--ink); }

.st-sec { max-width: 1180px; margin: 48px auto 0; }
.st-sec-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.st-sec-head h2 { font-size: 1.35rem; font-weight: 900; }
.st-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.st-tabs button { height: 34px; padding: 0 14px; border-radius: 11px; border: 1px solid var(--st-line); background: var(--st-panel); color: #CFCFD8; cursor: pointer; font-weight: 700; font-size: .82rem; }
.st-tabs button.on { background: #fff; color: #111; }
.st-tpls { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.st-tpl { position: relative; height: 210px; border-radius: 16px; overflow: hidden; border: 1px solid var(--st-line); cursor: pointer; text-align: right; padding: 0; color: #fff;
  background: linear-gradient(160deg, color-mix(in srgb, var(--pc) 85%, #fff), color-mix(in srgb, var(--pc) 70%, #000));
  transition: transform .2s var(--ease); }
.st-tpl:hover { transform: translateY(-3px); }
.st-tpl img { position: absolute; top: 18%; left: 50%; width: 50%; aspect-ratio: 1; object-fit: contain; transform: translateX(-50%); background: #fff; border-radius: 18px; padding: 6px; box-shadow: 0 14px 30px -10px rgba(0, 0, 0, .5); }
.st-tpl b { position: absolute; bottom: 12px; right: 12px; left: 12px; font-size: .9rem; font-weight: 800; text-shadow: 0 1px 10px rgba(0, 0, 0, .35); }
.st-tpl .st-tag { top: 10px; bottom: auto; }
.st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; align-items: start; }
.st-item { background: var(--st-panel); border: 1px solid var(--st-line); border-radius: 18px; overflow: hidden; }
.st-item .st-open, .st-item .st-busy, .st-item .st-fail { position: relative; display: block; width: 100%; aspect-ratio: 4 / 5; border: 0; padding: 0; background: #0E0E10; cursor: zoom-in; }
.st-item.a9-16 .st-open, .st-item.a9-16 .st-busy, .st-item.a9-16 .st-fail { aspect-ratio: 9 / 16; }
.st-item.a1-1 .st-open, .st-item.a1-1 .st-busy, .st-item.a1-1 .st-fail { aspect-ratio: 1; }
.st-item.a16-9 .st-open, .st-item.a16-9 .st-busy, .st-item.a16-9 .st-fail { aspect-ratio: 16 / 9; }
.st-m { width: 100%; height: 100%; object-fit: cover; display: block; }
.st-m.dim { filter: blur(6px) brightness(.6); }
.st-busy { display: grid !important; place-items: center; cursor: default !important; overflow: hidden;
  background: linear-gradient(110deg, #18181C 30%, #24242A 50%, #18181C 70%) 0 0 / 200% 100% !important; animation: stShine 1.6s linear infinite; }
.st-busy .st-m { position: absolute; inset: 0; }
.st-busy b { position: relative; font-size: .84rem; color: #EDEDF2; margin-top: 54px; padding: 0 14px; text-align: center; }
.st-spin { position: absolute; width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .15); border-top-color: var(--accent); animation: stSpin .9s linear infinite; }
.st-fail { display: grid !important; place-content: center; gap: 6px; text-align: center; padding: 18px !important; cursor: default !important; }
.st-fail b { color: #FF8A8F; }
.st-fail span { color: var(--st-muted); font-size: .78rem; line-height: 1.6; }
.st-play { position: absolute; inset: 0; margin: auto; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: rgba(0, 0, 0, .55);
  color: #fff; font-size: 1.1rem; backdrop-filter: blur(4px); pointer-events: none; }
.st-meta { padding: 12px 14px 4px; display: grid; gap: 2px; }
.st-meta b { font-size: .88rem; line-height: 1.5; }
.st-meta span { font-size: .74rem; color: var(--st-muted); }
.st-acts { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 12px 14px; }
.st-acts .btn { background: var(--st-panel-2); border-color: var(--st-line); color: #E6E6EC; box-shadow: none; }
.st-acts .btn.ghost { background: transparent; }
.st-acts .btn:hover { background: #2C2C33; color: #fff; }
.st-acts .btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }
.st-acts .btn.danger { color: #FF8A8F; }
@keyframes stSpin { to { transform: rotate(360deg); } }
@keyframes stShine { to { background-position: -200% 0; } }
@media (max-width: 1100px) { .st-card.p3, .st-card.p4 { display: none; } }
@media (max-width: 900px) {
  .studio { padding: 22px 16px 48px; }
  .st-composer { grid-template-columns: minmax(0, 1fr) auto; }
  .st-mode { grid-column: 1 / -1; flex-direction: row; }
  .st-mode button { flex: 1; grid-auto-flow: column; justify-content: center; gap: 8px; }
  .st-box { grid-column: 1 / -1; }
  .st-slot { width: auto; min-height: 64px; }
  .st-go { width: auto; min-height: 64px; }
  .st-fan { height: 220px; }
  .st-card.p0 { width: 170px; height: 215px; }
  .st-card.p1, .st-card.p2 { width: 140px; height: 175px; }
  .st-card.p1 { transform: translate(calc(-50% + 120px), -50%) rotate(4deg); }
  .st-card.p2 { transform: translate(calc(-50% - 120px), -50%) rotate(-4deg); }
}
@media (prefers-reduced-motion: reduce) { .st-busy, .st-spin { animation: none; } .st-card, .st-tpl { transition: none; } }
.st-hint { margin: 0; font-size: .76rem; line-height: 1.7; color: #C9C9D2; background: rgba(255, 255, 255, .04); border: 1px solid var(--st-line); border-radius: 10px; padding: 6px 10px; }
.st-meta em { font-style: normal; font-size: .74rem; line-height: 1.6; color: #F3C98B; }
