:root {
  --bg: #F5F6F8;
  --surface: #FFFFFF;
  --surface-2: #FAFBFC;
  --line: #EDEFF3;
  --line-2: #E3E7ED;
  --text: #15171B;
  --text-2: #565C67;
  --text-3: #8B919C;
  --text-4: #AEB4BE;
  --accent: #3D6DF5;
  --accent-2: #2F5BE0;
  --accent-soft: #EEF3FF;
  --dark: #17181C;
  --ok: #1F9D68;
  --warn: #D97706;
  --radius-lg: 16px;
  --radius: 12px;
  --radius-sm: 9px;
  --shadow-1: 0 1px 2px rgba(16, 24, 40, .035);
  --shadow-2: 0 10px 28px rgba(16, 24, 40, .07);
  --shadow-3: 0 24px 60px rgba(16, 24, 40, .18);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; font-size: inherit; color: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }
figure { margin: 0; }
h1, h2, h3, h4, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img { display: block; max-width: 100%; }
::selection { background: #D9E4FF; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #DCE0E6; border-radius: 8px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #C7CDD6; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

.icon { width: 18px; height: 18px; flex: none; }
.hidden-input { display: none; }
:focus-visible { outline: 2px solid #AFC4FF; outline-offset: 2px; }

.app { display: flex; height: 100vh; overflow: hidden; }

/* ---------------- rail ---------------- */
.rail {
  width: 76px;
  flex: none;
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 0 12px;
  z-index: 5;
}
.rail-logo { display: grid; place-items: center; margin-bottom: 16px; }
.logo-mark {
  width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(150deg, #26282E, #0E0F12);
  color: #fff; display: grid; place-items: center;
  font-size: 17px; font-weight: 600; letter-spacing: 1px;
  box-shadow: 0 6px 14px rgba(16, 24, 40, .18);
}
.rail-nav { display: flex; flex-direction: column; gap: 2px; width: 100%; align-items: center; }
.rail-item {
  width: 62px; padding: 9px 0 7px; border-radius: 11px;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: #6E7480; transition: background .16s, color .16s;
}
.rail-ico { display: grid; place-items: center; height: 22px; }
.rail-ico .icon { width: 21px; height: 21px; }
.rail-label { font-size: 10.5px; letter-spacing: .2px; }
.rail-item:hover { background: #F5F6F9; color: #2E333B; }
.rail-item.is-active { background: #F2F3F6; color: #15171B; }
.rail-item.is-active .icon { stroke-width: 1.8; }
.rail-foot { margin-top: auto; display: flex; flex-direction: column; align-items: center; gap: 10px; padding-top: 14px; }
.rail-credits {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  color: #6E7480; font-size: 10.5px; padding: 4px 0;
}
.rail-credits .icon { width: 13px; height: 13px; color: var(--accent); }
.rail-credits b { font-size: 10.5px; color: #3A3F48; font-weight: 600; }
.rail-credits span { margin-top: 1px; }
.rail-bot {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid #E3E6EC; background: #fff; color: #6E7480;
  display: grid; place-items: center;
}
.rail-bot:hover { border-color: #C9D0DB; color: #15171B; }
.rail-bot .icon { width: 19px; height: 19px; }
.rail-burger { border: 0; background: none; color: #6E7480; padding: 4px; }
.rail-burger .icon { width: 20px; height: 20px; }

/* ---------------- stage ---------------- */
.stage {
  flex: 1; min-width: 0; height: 100vh;
  padding: 12px; display: flex; gap: 12px; overflow: hidden;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
  display: flex; flex-direction: column;
  min-width: 0; min-height: 0;
  overflow: hidden;
}

/* ---------------- common buttons ---------------- */
.new-btn {
  display: inline-flex; align-items: center; gap: 5px;
  height: 30px; padding: 0 10px; border-radius: 8px;
  border: 1px solid transparent; background: transparent;
  font-size: 12px; color: #4B5160; white-space: nowrap;
}
.new-btn:hover { background: #F4F6F9; border-color: #EDF0F4; }
.new-btn .icon { width: 14px; height: 14px; }
.icon-btn {
  width: 30px; height: 30px; border: 0; background: transparent;
  border-radius: 8px; display: inline-grid; place-items: center;
  color: #7A808B; flex: none;
}
.icon-btn:hover { background: #F4F6F9; color: #2E333B; }
.icon-btn .icon { width: 17px; height: 17px; }
.ghost-btn {
  height: 34px; padding: 0 12px; border-radius: 9px;
  border: 1px solid #E5E8EE; background: #fff; color: #3F4550;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 12px; transition: background .16s, border-color .16s;
}
.ghost-btn:hover { background: #F7F8FA; border-color: #D8DDE5; }
.ghost-btn .icon { width: 15px; height: 15px; }
.ghost-btn--sm { height: 32px; font-size: 11.5px; }
.ghost-btn--danger { color: #C24A4A; }
.primary-btn {
  height: 40px; padding: 0 16px; border-radius: 10px; border: 0;
  background: var(--dark); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font-size: 12.5px; font-weight: 500;
}
.primary-btn:hover { background: #2B2D33; }
.primary-btn .icon { width: 16px; height: 16px; }
.link { color: var(--accent); }

/* ---------------- hub ---------------- */
.hub-wrap, .ws-wrap { display: flex; gap: 12px; flex: 1; min-width: 0; min-height: 0; }
.hub-panel, .ws-editor { width: clamp(430px, 34vw, 560px); flex: none; }
.hub-preview, .ws-preview { flex: 1; min-width: 0; }
.queue { width: 232px; flex: none; padding: 14px 12px; }

.hub-head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px 10px; flex: none;
}
.hub-id {
  display: flex; align-items: center; gap: 10px; flex: 1;
  border: 0; background: none; padding: 4px 6px; margin-left: -6px;
  border-radius: 10px; text-align: left; min-width: 0;
}
.hub-id:hover { background: #F7F8FA; }
.hub-thumb { width: 40px; height: 40px; border-radius: 10px; overflow: hidden; flex: none; background: #F2F4F7; }
.hub-thumb img { width: 100%; height: 100%; object-fit: cover; }
.hub-name { min-width: 0; }
.hub-name h1 { font-size: 15px; font-weight: 600; letter-spacing: .1px; }
.hub-name p { font-size: 11px; color: var(--text-3); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hub-chev { color: #A9AEB8; display: grid; place-items: center; }
.hub-chev .icon { width: 15px; height: 15px; }
.hub-body {
  flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden;
  padding: 2px 16px 12px; display: flex; flex-direction: column;
}

.ask {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 16px 2px;
  background: #fff;
}
.ask-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.ask-head h2 { font-size: 20px; font-weight: 600; letter-spacing: -.3px; }
.ask-head p { font-size: 11.5px; color: var(--text-3); }
.clear-link { margin-left: auto; border: 0; background: none; color: var(--accent); font-size: 11.5px; padding: 0; }
.tabs-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; }
.tabs { display: flex; align-items: center; gap: 22px; }
.tab {
  border: 0; background: none; padding: 8px 0 10px;
  font-size: 13px; color: #6E7480; position: relative;
  white-space: nowrap;
}
.tab::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: transparent; border-radius: 2px;
}
.tab:hover { color: #2E333B; }
.tabs--blue .tab.is-active { color: var(--accent); font-weight: 500; }
.tabs--blue .tab.is-active::after { background: var(--accent); }
.search-link {
  border: 0; background: none; color: var(--text-3); font-size: 11.5px;
  display: inline-flex; align-items: center; gap: 4px; padding: 4px;
}
.search-link .icon { width: 14px; height: 14px; }

.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 12px; }
.skill-card {
  display: flex; align-items: center; gap: 9px;
  border: 1px solid #EEF0F4; border-radius: 11px;
  background: #fff; padding: 7px; text-align: left;
  transition: border-color .16s, background .16s, transform .16s;
  position: relative;
}
.skill-card:hover { border-color: #D8DDE5; background: #FCFCFD; transform: translateY(-1px); }
.sc-thumb { width: 52px; height: 52px; border-radius: 8px; overflow: hidden; flex: none; background: #F2F4F7; }
.sc-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sc-copy { min-width: 0; display: block; }
.sc-copy b { display: block; font-size: 12.5px; font-weight: 600; color: #1B1F26; }
.sc-copy small { display: block; font-size: 10.5px; color: var(--text-3); margin-top: 3px; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sc-add {
  position: absolute; top: 7px; right: 7px; width: 18px; height: 18px;
  border-radius: 50%; background: #F2F4F7; color: #7A808B;
  display: grid; place-items: center; opacity: 0; transition: opacity .16s;
}
.sc-add .icon { width: 11px; height: 11px; }
.skill-card:hover .sc-add { opacity: 1; }
.cards-empty { grid-column: 1 / -1; text-align: center; padding: 28px 0; font-size: 11.5px; color: var(--text-4); }
.ask-note { text-align: center; font-size: 11px; color: #A9AEB8; padding: 18px 0 14px; }

.hub-create { margin-top: 12px; }
.image-composer {
  border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px 6px;
  display: flex; flex-direction: column; min-height: 260px; background: #fff;
}
.ic-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ic-head > span { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--text-3); }
.ic-head .icon { width: 13px; height: 13px; }
.ic-add {
  border: 1px solid #E9ECF1; background: #fff; border-radius: 7px;
  padding: 5px 8px; font-size: 10.5px; color: #555C68;
  display: inline-flex; align-items: center; gap: 3px;
}
.ic-add .icon { width: 12px; height: 12px; }
.ic-add:hover { background: #F7F8FA; }
.ic-area {
  flex: 1; width: 100%; border: 0; outline: 0; resize: none;
  font-size: 13px; line-height: 1.8; padding: 12px 0; background: transparent;
}
.ic-area::placeholder { color: #B4B9C2; }
.ic-foot { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid #F3F4F7; padding: 4px 0 2px; }
.ic-foot .counter { font-size: 10.5px; color: #B4B9C2; }
.hub-foundation { padding: 0 16px 16px; flex: none; }

.script-edit {
  border: 1px solid var(--line); border-radius: 14px; padding: 26px 22px 20px;
  position: relative; text-align: center; min-height: 360px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.se-orb {
  width: 54px; height: 54px; border-radius: 16px;
  background: linear-gradient(135deg, #EEF3FF, #E3ECFF);
  color: var(--accent); display: grid; place-items: center;
  margin-bottom: 16px;
}
.se-orb .icon { width: 24px; height: 24px; }
.script-edit h2 { font-size: 20px; font-weight: 600; letter-spacing: -.3px; }
.script-edit > p { font-size: 11.5px; color: var(--text-3); margin-top: 6px; }
.se-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 20px; max-width: 400px; }
.se-chip {
  border: 1px solid #E9ECF1; background: #fff; border-radius: 8px;
  padding: 8px 12px; font-size: 11.5px; color: #454B56;
  transition: all .16s;
}
.se-chip:hover { border-color: #B9C6E6; color: var(--accent); background: #F8FAFF; }
.se-scene { margin-top: 18px; font-size: 10.5px; color: var(--text-3); }
.se-scene b { color: #23272E; font-weight: 500; }
.exit-float {
  position: absolute; right: 0; bottom: -44px;
  height: 34px; padding: 0 14px; border-radius: 9px;
  background: var(--dark); color: #fff; border: 0; font-size: 11.5px;
  box-shadow: 0 8px 20px rgba(16, 24, 40, .18);
}

.composer {
  margin: 0 16px 14px; flex: none;
  border: 1px solid var(--line); border-radius: 14px;
  padding: 10px 12px 8px; background: #fff;
  box-shadow: 0 10px 28px rgba(16, 24, 40, .05);
}
.composer-tools { display: flex; align-items: center; gap: 12px; }
.tool { border: 0; background: none; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 10px; color: #7A808B; }
.tool-box {
  width: 46px; height: 46px; border-radius: 10px;
  border: 1px dashed #DDE2E9; background: #FAFBFC;
  display: grid; place-items: center; color: #98A0AC; position: relative;
}
.tool-box .icon { width: 20px; height: 20px; }
.tool-box img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }
.tool:hover .tool-box { border-color: #BFC8D6; color: #5C6370; }
.tool-plus {
  position: absolute; right: -5px; bottom: -5px;
  width: 17px; height: 17px; border-radius: 50%;
  background: #2B2D33; color: #fff; border: 2px solid #fff;
  display: grid; place-items: center;
}
.tool-plus .icon { width: 9px; height: 9px; }
.tool small { display: flex; gap: 2px; }
.tool small span { color: #B0B5BE; }
.tool-divider { width: 1px; height: 38px; background: #EEF0F4; margin: 0 2px; }
.composer-tip { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; color: #A9AEB8; }
.composer-tip .icon { width: 13px; height: 13px; }
.composer-area {
  width: 100%; border: 0; outline: 0; resize: none; background: transparent;
  min-height: 84px; max-height: 150px; font-size: 13px; line-height: 1.75;
  padding: 12px 2px 8px;
}
.composer-area::placeholder { color: #B4B9C2; }
.composer-foot { display: flex; align-items: center; gap: 6px; border-top: 1px solid #F3F4F7; padding-top: 8px; }
.mini-select {
  display: inline-flex; align-items: center; gap: 4px;
  height: 26px; border: 0; background: #F4F5F8; border-radius: 7px;
  padding: 0 8px; font-size: 10.5px; color: #4B5160;
}
.mini-select .icon { width: 12px; height: 12px; }
.composer-cost { margin-left: auto; display: inline-flex; align-items: center; gap: 3px; font-size: 10.5px; color: #A9AEB8; }
.composer-cost .icon { width: 12px; height: 12px; color: #C3A46A; }
.send-btn {
  width: 32px; height: 32px; border-radius: 50%; border: 0;
  background: var(--dark); color: #fff; display: grid; place-items: center;
  margin-left: 2px;
}
.send-btn:hover { background: #2B2D33; }
.send-btn .icon { width: 16px; height: 16px; }

/* ---------------- preview ---------------- */
.preview-tabs { display: flex; align-items: center; gap: 22px; padding: 14px 20px 0; flex: none; }
.preview-tabs button {
  border: 0; background: none; padding: 7px 0 9px; font-size: 13px;
  color: #6E7480; position: relative;
}
.preview-tabs button::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: transparent; border-radius: 2px;
}
.preview-tabs button.is-active { color: #15171B; font-weight: 500; }
.preview-tabs button.is-active::after { background: #15171B; }
.preview-body {
  flex: 1; min-height: 0; overflow-y: auto;
  padding: 22px 28px 26px;
  display: flex; flex-direction: column; align-items: center;
}
.preview-body > h2 { font-size: 20px; font-weight: 600; letter-spacing: -.2px; text-align: center; }
.preview-body > p { font-size: 11.5px; color: var(--text-3); margin-top: 6px; text-align: center; line-height: 1.7; max-width: 420px; }
.preview-foot {
  margin-top: 18px; display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; color: #B0B5BE;
}
.preview-foot .icon { width: 12px; height: 12px; }
.feature-row { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.feature-row span {
  display: inline-flex; align-items: center; gap: 4px;
  border: 1px solid #EDEFF3; border-radius: 999px; padding: 5px 10px;
  font-size: 10.5px; color: #7A808B; background: #fff;
}
.feature-row .icon { width: 12px; height: 12px; }

/* ---------------- galleries ---------------- */
.gallery { width: 100%; max-width: 560px; margin-top: 14px; }
.gallery figure { position: relative; overflow: hidden; border-radius: 12px; background: #F4F5F7; }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.gallery figcaption {
  position: absolute; left: 8px; bottom: 8px;
  background: rgba(255, 255, 255, .92); color: #3F4550;
  font-size: 9.5px; padding: 3px 7px; border-radius: 5px;
  backdrop-filter: blur(4px);
}
.gallery-clone { display: grid; grid-template-columns: 148px 1fr; gap: 12px; height: 392px; }
.gc-side { display: grid; grid-template-rows: 1fr 1fr; gap: 12px; }
.gc-main { border-radius: 14px !important; }
.play-badge {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(255, 255, 255, .92); color: #15171B;
  display: grid; place-items: center; box-shadow: 0 6px 16px rgba(0, 0, 0, .18);
  backdrop-filter: blur(4px);
}
.play-badge .icon { width: 18px; height: 18px; margin-left: 2px; }
.play-badge.lg { width: 58px; height: 58px; }
.play-badge.lg .icon { width: 22px; height: 22px; }
.gallery-faces { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; height: 342px; }
.gallery-use { display: grid; grid-template-columns: .9fr 1.55fr; gap: 10px; height: 358px; }
.gu-hero { border-radius: 12px; }
.gu-hero img { object-fit: contain; background: #F6F4F0; padding: 18px; }
.gu-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.gallery-three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; height: 330px; }
.gallery-scene { display: grid; grid-template-columns: 1.55fr 1fr; gap: 10px; height: 380px; }
.gs-pair { display: grid; grid-template-rows: 1fr 1fr; gap: 10px; }
.gallery-retouch { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; height: 372px; }
.is-before { filter: saturate(.6) brightness(.92) contrast(.96); }
.gallery-white { display: grid; grid-template-rows: 1.55fr .8fr; gap: 10px; height: 386px; }
.gw-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.gallery-outfit { display: grid; grid-template-columns: 1.45fr 1fr; gap: 10px; height: 386px; }
.go-side { display: grid; grid-template-rows: 1fr 1fr; gap: 10px; }
.gallery-detail { max-width: 372px; margin-left: auto; margin-right: auto; }
.gd-frame { aspect-ratio: 3 / 4; border-radius: 14px; overflow: hidden; position: relative; background: #F4F5F7; box-shadow: var(--shadow-2); }
.gd-frame img { width: 100%; height: 100%; object-fit: cover; }
.gd-tag {
  position: absolute; top: 10px; left: 10px;
  background: rgba(255, 255, 255, .92); color: #2E333B;
  font-size: 9.5px; padding: 4px 8px; border-radius: 6px;
}
.gd-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; border-radius: 50%; border: 0;
  background: rgba(255, 255, 255, .9); color: #2E333B;
  display: grid; place-items: center; opacity: 0; transition: opacity .16s;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
}
.gd-nav.prev { left: 10px; }
.gd-nav.next { right: 10px; }
.gd-nav .icon { width: 15px; height: 15px; }
.gd-frame:hover .gd-nav { opacity: 1; }
.gd-dots { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 14px; }
.gd-dot { width: 6px; height: 6px; border-radius: 999px; border: 0; background: #D9DEE6; padding: 0; transition: all .2s; }
.gd-dot.is-active { width: 18px; background: #17181C; }

/* video stack */
.video-stack { position: relative; width: 100%; max-width: 470px; height: 380px; margin-top: 12px; }
.vs-main {
  position: absolute; left: 50%; top: 0; transform: translateX(-50%);
  width: 296px; height: 372px; border-radius: 16px; overflow: hidden;
  box-shadow: 0 24px 50px rgba(16, 24, 40, .18); z-index: 2;
}
.vs-main img { width: 100%; height: 100%; object-fit: cover; }
.vs-side {
  position: absolute; top: 74px; width: 132px; height: 160px;
  border-radius: 12px; overflow: hidden; opacity: .72; z-index: 1;
  filter: saturate(.8);
}
.vs-side img { width: 100%; height: 100%; object-fit: cover; }
.vs-l { left: 0; }
.vs-r { right: 0; }
.vs-badge {
  position: absolute; top: 12px; left: 12px;
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(255, 255, 255, .92); color: #2E333B;
  font-size: 9.5px; padding: 5px 8px; border-radius: 6px;
  backdrop-filter: blur(4px);
}
.vs-badge .icon { width: 11px; height: 11px; }
.vs-chip {
  position: absolute; z-index: 3;
  background: #fff; color: #2E333B; font-size: 10px;
  padding: 6px 10px; border-radius: 999px; box-shadow: 0 8px 20px rgba(16, 24, 40, .14);
}
.chip-a { top: 26px; right: 18px; }
.chip-b { bottom: 30px; left: 10px; }

.hub-gallery { position: relative; width: 100%; max-width: 520px; height: 372px; margin-top: 12px; }
.hub-gallery figure { position: absolute; border-radius: 14px; overflow: hidden; background: #F4F5F7; box-shadow: 0 14px 34px rgba(16, 24, 40, .1); }
.hg-1 { right: 0; top: 0; width: 60%; height: 100%; }
.hg-2 { left: 0; top: 0; width: 36%; height: 48.5%; }
.hg-3 { left: 0; bottom: 0; width: 36%; height: 48.5%; }
.hg-chip {
  position: absolute; left: 10px; bottom: 12px;
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(255, 255, 255, .94); font-size: 9.5px; color: #3F4550;
  padding: 5px 9px; border-radius: 6px;
}
.hg-chip .icon { width: 11px; height: 11px; }

/* ---------------- workspace ---------------- */
.ws-head { display: flex; align-items: center; gap: 8px; padding: 12px 16px 10px; flex: none; }
.back-btn {
  width: 30px; height: 30px; border-radius: 8px;
  display: grid; place-items: center; color: #5C6370; flex: none;
}
.back-btn:hover { background: #F4F6F9; }
.back-btn .icon { width: 17px; height: 17px; }
.ws-title { flex: 1; min-width: 0; }
.ws-title h1 { font-size: 15px; font-weight: 600; }
.ws-title p { font-size: 11px; color: var(--text-3); margin-top: 1px; }
.ws-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 6px 20px 12px; }
.media-head { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 14px; }
.media-head > span { font-size: 11px; color: #A9AEB8; letter-spacing: .3px; }
.slots { display: flex; align-items: flex-start; gap: 18px; flex-wrap: wrap; }
.slot { width: 80px; position: relative; text-align: center; flex: none; }
.slot-thumb {
  width: 100%; aspect-ratio: 1; border-radius: 12px;
  border: 1px dashed #DDE2E9; background: #FAFBFC;
  display: grid; place-items: center; overflow: hidden; position: relative;
  padding: 0; color: #C3C8D1; transition: border-color .16s, background .16s;
}
.slot-thumb:hover { border-color: #B9C2CF; background: #F5F7FA; }
.slot-ghost .icon { width: 24px; height: 24px; }
.slot-thumb img { width: 100%; height: 100%; object-fit: cover; }
.slot.has-file .slot-thumb { border-style: solid; border-color: #E5E8EE; }
.slot-plus {
  position: absolute; right: -4px; bottom: -4px;
  width: 20px; height: 20px; border-radius: 50%;
  background: #2B2D33; color: #fff; border: 2px solid #fff;
  display: grid; place-items: center; pointer-events: none;
}
.slot-plus .icon { width: 10px; height: 10px; }
.slot-badge {
  position: absolute; left: 5px; top: 5px;
  min-width: 16px; height: 16px; border-radius: 8px;
  background: rgba(23, 24, 28, .72); color: #fff;
  font-size: 9px; display: grid; place-items: center; padding: 0 4px;
}
.slot-label { margin-top: 8px; font-size: 11px; color: #4B5160; line-height: 1.4; }
.slot-label span { color: #A9AEB8; font-size: 10px; margin-left: 1px; }
.slot-clear {
  position: absolute; right: -8px; top: -8px;
  width: 19px; height: 19px; border-radius: 50%;
  border: 1px solid #E5E8EE; background: #fff; color: #7A808B;
  display: grid; place-items: center; opacity: 0; transition: opacity .16s;
}
.slot:hover .slot-clear { opacity: 1; }
.slot-clear .icon { width: 10px; height: 10px; }

.dropzone {
  width: 100%; height: 208px; margin-top: 16px;
  border: 1px dashed #DDE2E9; border-radius: 14px;
  background: #FBFCFD; color: #7A808B;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 7px; position: relative; overflow: hidden; padding: 0;
  transition: border-color .16s, background .16s;
}
.dropzone:hover { border-color: #B9C2CF; background: #F7F9FB; }
.dropzone b { font-size: 13px; color: #2E333B; font-weight: 600; }
.dropzone small { font-size: 10.5px; color: #A9AEB8; }
.dz-icon { color: #98A0AC; display: grid; place-items: center; }
.dz-icon .icon { width: 26px; height: 26px; }
.dropzone.has-file { border-style: solid; border-color: #E5E8EE; }
.dz-preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dz-file {
  position: absolute; left: 12px; bottom: 12px;
  background: rgba(23, 24, 28, .72); color: #fff; font-size: 10px;
  padding: 5px 9px; border-radius: 6px; max-width: 80%;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ws-hint {
  display: flex; align-items: flex-start; gap: 5px;
  font-size: 11px; line-height: 1.8; color: #7A808B; margin: 14px 0 0;
}
.hint-tag {
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--accent); font-weight: 500; white-space: nowrap; flex: none;
  background: #F4F7FF; border-radius: 5px; padding: 2px 6px; margin-top: -1px;
}
.hint-tag .icon { width: 12px; height: 12px; }

.prompt {
  margin-top: 14px; border: 1px solid #EDEFF3; border-radius: 12px;
  padding: 0 12px 4px; transition: border-color .16s;
  background: #fff;
}
.prompt:focus-within { border-color: #C7D2E6; }
.prompt-area {
  width: 100%; min-height: 104px; border: 0; outline: 0; resize: vertical;
  font-size: 12.5px; line-height: 1.8; padding: 12px 0 6px;
  background: transparent; color: #2E333B;
}
.prompt-area::placeholder { color: #B4B9C2; }
.prompt-foot { display: flex; align-items: center; justify-content: space-between; }
.prompt-foot .counter { font-size: 10px; color: #B4B9C2; }
.prompt-foot .icon-btn { width: 26px; height: 26px; }

.ws-foot { flex: none; padding: 10px 20px 16px; background: #fff; }
.select-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.select {
  height: 50px; border: 1px solid #EDEFF3; border-radius: 10px;
  background: #fff; padding: 0 10px; display: flex; align-items: center;
  gap: 8px; text-align: left; min-width: 0;
  transition: border-color .16s, background .16s;
}
.select:hover { border-color: #D8DDE5; background: #FCFCFD; }
.select-icon { color: #7A808B; display: grid; place-items: center; flex: none; }
.select-icon .icon { width: 16px; height: 16px; }
.select-copy { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.select-copy small { font-size: 9.5px; color: #A9AEB8; line-height: 1.2; }
.select-copy b {
  font-size: 11px; color: #23272E; font-weight: 600; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; line-height: 1.4;
}
.select-chevron { margin-left: auto; color: #A9AEB8; display: grid; place-items: center; flex: none; }
.select-chevron .icon { width: 14px; height: 14px; }
.select--sm { height: 42px; }
.select--xs { height: 34px; padding: 0 10px; gap: 6px; font-size: 11.5px; color: #4B5160; border-radius: 8px; }
.select--xs .icon { width: 14px; height: 14px; }

.generate {
  width: 100%; height: 46px; margin-top: 10px; border: 0; border-radius: 11px;
  background: var(--dark); color: #fff;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 13px; font-weight: 600; letter-spacing: .2px;
  transition: background .16s, transform .16s;
}
.generate:hover { background: #2B2D33; }
.generate:active { transform: translateY(1px); }
.generate em { font-style: normal; font-weight: 400; font-size: 11px; color: rgba(255, 255, 255, .62); }
.generate.is-disabled { background: #B9BEC7; cursor: not-allowed; color: #fff; }
.generate.is-disabled em { color: rgba(255, 255, 255, .8); }

/* modules */
.modules-block { margin-top: 16px; }
.modules-head { display: flex; align-items: baseline; justify-content: space-between; }
.modules-head b { font-size: 12.5px; font-weight: 600; }
.modules-head span { font-size: 10.5px; color: #A9AEB8; }
.modules { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 10px; }
.module {
  display: flex; align-items: center; gap: 7px; padding: 6px;
  border: 1px solid #EEF0F4; border-radius: 9px; background: #fff;
  text-align: left; position: relative; min-width: 0;
}
.module:hover { border-color: #D8DDE5; }
.module.is-on { border-color: #DCE3F2; background: #FAFBFE; }
.module-thumb {
  width: 32px; height: 38px; border-radius: 6px; overflow: hidden;
  background: #F4F5F7; display: grid; place-items: center; color: #A9AEB8; flex: none;
}
.module-thumb .icon { width: 15px; height: 15px; }
.module-copy { min-width: 0; display: block; }
.module-copy b { display: block; font-size: 10.5px; font-weight: 600; color: #2E333B; white-space: nowrap; }
.module-copy small { display: block; font-size: 9px; color: #A9AEB8; margin-top: 2px; white-space: nowrap; }
.module-dot {
  position: absolute; top: 4px; right: 4px; min-width: 15px; height: 15px;
  border-radius: 999px; background: var(--dark); color: #fff;
  font-size: 8.5px; display: grid; place-items: center; padding: 0 3px;
}
.detail-selects { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }

/* queue */
.queue-head { display: flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 2px 4px 12px; }
.queue-head .icon { width: 13px; height: 13px; color: #B0B5BE; }
.queue-clear { margin-left: auto; border: 0; background: none; font-size: 10.5px; color: #A9AEB8; font-weight: 400; }
.queue-clear:hover { color: #6E7480; }
.queue-list { display: flex; flex-direction: column; gap: 8px; overflow-y: auto; }
.queue-item {
  width: 100%; display: flex; align-items: center; gap: 9px;
  border: 1px solid #EEF0F4; border-radius: 11px; background: #fff;
  padding: 8px; text-align: left;
}
.queue-item:hover { border-color: #DCE1E8; }
.queue-thumb {
  width: 40px; height: 48px; border-radius: 7px; background: #F4F5F7;
  display: grid; place-items: center; color: #A9AEB8; overflow: hidden; flex: none;
}
.queue-thumb img { width: 100%; height: 100%; object-fit: cover; }
.queue-thumb .icon { width: 17px; height: 17px; }
.queue-meta { min-width: 0; flex: 1; display: block; }
.queue-meta b { display: block; font-size: 10.5px; font-weight: 600; color: #2E333B; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.queue-meta small { display: block; font-size: 9.5px; color: #A9AEB8; margin-top: 2px; }
.queue-meta small.ok { color: var(--ok); }
.queue-bar { height: 3px; border-radius: 3px; background: #EEF0F4; margin-top: 5px; overflow: hidden; }
.queue-bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; transition: width .3s; }
.queue-empty { text-align: center; padding: 42px 8px; color: #C3C8D1; }
.queue-empty .icon { width: 22px; height: 22px; margin-bottom: 8px; }
.queue-empty p { font-size: 11px; color: #8A909B; }
.queue-empty small { font-size: 9.5px; color: #B0B5BE; }

/* ---------------- popovers / menus ---------------- */
.layer { position: fixed; inset: 0; z-index: 50; pointer-events: none; }
.layer.is-open { pointer-events: auto; }
.pop-mask { position: absolute; inset: 0; background: rgba(17, 24, 39, .1); }
.popover {
  position: absolute; background: #fff; border: 1px solid #ECEFF4;
  border-radius: 14px; box-shadow: var(--shadow-3); padding: 10px;
  max-height: 76vh; overflow-y: auto; z-index: 2;
  animation: pop-in .16s ease-out;
}
@keyframes pop-in { from { opacity: 0; transform: translateY(6px) scale(.99); } to { opacity: 1; transform: none; } }
.menu-title { font-size: 10.5px; color: #A9AEB8; padding: 6px 8px 8px; letter-spacing: .3px; }
.menu-opt {
  width: 100%; display: flex; align-items: center; gap: 10px;
  border: 0; background: none; padding: 9px 8px; border-radius: 9px; text-align: left;
}
.menu-opt:hover { background: #F7F8FA; }
.menu-opt.is-active { background: #F5F7FB; }
.opt-icon {
  width: 30px; height: 30px; border-radius: 8px; background: #F3F5F8;
  color: #6E7480; display: grid; place-items: center; flex: none;
}
.opt-icon .icon { width: 15px; height: 15px; }
.opt-copy { min-width: 0; flex: 1; display: block; }
.opt-copy b { display: flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; color: #23272E; }
.opt-copy small { display: block; font-size: 10px; color: #9AA0AA; margin-top: 2px; line-height: 1.4; }
.tag { font-style: normal; font-size: 8px; font-weight: 500; padding: 1px 4px; border-radius: 3px; letter-spacing: .2px; }
.tag-new { background: #E9F0FF; color: #3D6DF5; }
.tag-sale { background: #FFF1E6; color: #D97706; }
.opt-check { margin-left: auto; color: var(--accent); display: grid; place-items: center; }
.opt-check .icon { width: 15px; height: 15px; }
.opt-arrow { margin-left: auto; color: #C3C8D1; }
.opt-arrow .icon { width: 14px; height: 14px; }

.set-group { margin-top: 12px; }
.set-label { font-size: 10.5px; color: #8A909B; margin-bottom: 7px; }
.ratio-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; }
.ratio-opt {
  border: 1px solid #EEF0F4; border-radius: 8px; background: #fff;
  padding: 8px 2px 6px; display: flex; flex-direction: column; align-items: center; gap: 6px;
  font-size: 9.5px; color: #7A808B;
}
.ratio-opt:hover { border-color: #D8DDE5; }
.ratio-shape { display: block; border: 1.5px solid #A9B0BB; border-radius: 3px; }
.ratio-opt.is-active { border-color: #17181C; background: #F8F9FB; color: #15171B; }
.ratio-opt.is-active .ratio-shape { border-color: #17181C; }
.seg { display: flex; gap: 4px; background: #F4F5F7; padding: 3px; border-radius: 9px; }
.seg-opt {
  flex: 1; height: 31px; border: 0; background: transparent; border-radius: 7px;
  font-size: 10.5px; color: #7A808B; white-space: nowrap;
}
.seg-opt:hover { color: #2E333B; }
.seg-opt.is-active { background: #fff; color: #15171B; box-shadow: 0 1px 2px rgba(16, 24, 40, .08); font-weight: 500; }
.range-row { display: flex; align-items: center; gap: 10px; padding: 2px 2px 0; }
.range-row input { flex: 1; accent-color: #17181C; height: 2px; }
.range-value { font-size: 10.5px; color: #4B5160; min-width: 26px; text-align: right; }
.range-scale { display: flex; justify-content: space-between; padding: 3px 30px 0 2px; font-size: 9px; color: #B0B5BE; }
.menu-list { display: flex; flex-direction: column; gap: 1px; }
.menu-line { border: 0; background: none; text-align: left; padding: 9px 10px; border-radius: 7px; font-size: 11.5px; color: #3F4550; }
.menu-line:hover { background: #F7F8FA; }
.menu-line.is-active { background: #F5F7FB; color: #15171B; font-weight: 500; }

/* ---------------- modal ---------------- */
.layer:has(.modal)::before {
  content: ""; position: absolute; inset: 0;
  background: rgba(17, 24, 39, .42); backdrop-filter: blur(3px);
}
.modal {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%);
  background: #fff; border-radius: 18px; box-shadow: 0 40px 100px rgba(16, 24, 40, .3);
  z-index: 3; max-height: 88vh; overflow-y: auto;
  animation: modal-in .18s ease-out;
}
@keyframes modal-in { from { opacity: 0; transform: translate(-50%, -48%) scale(.99); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
.modal-x {
  position: absolute; top: 12px; right: 12px; width: 30px; height: 30px;
  border-radius: 50%; border: 0; background: #F3F5F8; color: #6E7480;
  display: grid; place-items: center; z-index: 2;
}
.modal-x .icon { width: 14px; height: 14px; }
.asset-modal { width: min(880px, 92vw); display: grid; grid-template-columns: 1.15fr 1fr; gap: 6px; padding: 16px; }
.am-art { border-radius: 12px; overflow: hidden; background: #F4F5F7; max-height: 66vh; }
.am-art img { width: 100%; height: 100%; object-fit: cover; }
.am-side { padding: 26px 22px 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.am-kind {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 4px;
  background: #F3F5F8; border-radius: 5px; padding: 4px 7px; font-size: 9.5px; color: #6E7480;
}
.am-kind .icon { width: 11px; height: 11px; }
.am-side h3 { font-size: 19px; font-weight: 600; letter-spacing: -.2px; line-height: 1.4; }
.am-side p { font-size: 11.5px; color: #9AA0AA; }
.am-specs { display: flex; gap: 6px; }
.am-specs span { font-size: 9.5px; color: #7A808B; border: 1px solid #EDEFF3; padding: 3px 7px; border-radius: 5px; }
.am-actions { margin-top: auto; display: flex; flex-wrap: wrap; gap: 8px; padding-top: 18px; }
.script-modal { width: min(720px, 92vw); padding: 28px 30px 24px; }
.sm-head .eyebrow {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10px; color: var(--accent); letter-spacing: .6px;
}
.sm-head .eyebrow .icon { width: 13px; height: 13px; }
.sm-head h2 { font-size: 22px; font-weight: 600; margin-top: 10px; letter-spacing: -.3px; }
.sm-head p { font-size: 11.5px; color: #9AA0AA; margin-top: 5px; }
.script-lines { margin: 20px 0 22px; display: flex; flex-direction: column; gap: 9px; }
.script-lines li { display: flex; gap: 12px; border: 1px solid #F0F2F5; border-radius: 10px; padding: 11px 13px; }
.sl-time { flex: none; width: 54px; height: 22px; border-radius: 5px; background: #F2F6FF; color: var(--accent); font-size: 9.5px; display: grid; place-items: center; margin-top: 1px; }
.script-lines b { font-size: 12px; font-weight: 600; color: #23272E; }
.script-lines p { font-size: 11.5px; color: #7A808B; line-height: 1.75; margin-top: 3px; }
.sm-foot { display: flex; justify-content: flex-end; gap: 9px; }

/* ---------------- tour ---------------- */
.tour-mask { position: fixed; inset: 0; background: rgba(17, 24, 39, .18); }
.tour-card {
  position: fixed; left: 340px; top: 92px; width: 366px;
  background: #fff; border-radius: 16px; padding: 22px 24px 20px;
  box-shadow: 0 32px 80px rgba(16, 24, 40, .26); z-index: 4;
  animation: pop-in .2s ease-out;
}
.tour-skip { position: absolute; top: 14px; right: 16px; border: 0; background: none; font-size: 11px; color: #A9AEB8; }
.tour-orb { width: 36px; height: 36px; border-radius: 10px; background: #EEF3FF; color: var(--accent); display: grid; place-items: center; }
.tour-orb .icon { width: 18px; height: 18px; }
.tour-card h3 { font-size: 16px; font-weight: 600; margin-top: 14px; }
.tour-card p { font-size: 11.5px; color: #7A808B; line-height: 1.8; margin-top: 6px; }
.tour-pill { display: inline-flex; align-items: center; gap: 5px; background: #F5F7FA; border-radius: 7px; padding: 7px 10px; font-size: 10.5px; color: #4B5160; margin-top: 14px; }
.tour-pill .icon { width: 13px; height: 13px; }
.tour-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 20px; }
.tour-foot > span { font-size: 10.5px; color: #A9AEB8; letter-spacing: .5px; }
.tour-foot .primary-btn { height: 34px; font-size: 11.5px; padding: 0 16px; }

/* ---------------- toast ---------------- */
.toast-root {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  z-index: 100; pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 7px;
  background: rgba(23, 24, 28, .94); color: #fff;
  padding: 9px 15px; border-radius: 9px; font-size: 11.5px;
  box-shadow: 0 12px 30px rgba(16, 24, 40, .24);
  animation: toast-in .2s ease-out;
}
.toast .icon { width: 14px; height: 14px; color: #9FD3B5; }
.toast.warn .icon { color: #FFC98A; }
.toast.is-out { opacity: 0; transform: translateY(6px); transition: all .3s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------------- subscription ---------------- */
.sub-page { flex: 1; overflow-y: auto; padding: 40px 44px; display: block; }
.sub-head { max-width: 620px; }
.eyebrow { display: inline-flex; align-items: center; gap: 7px; font-size: 10px; letter-spacing: 1.8px; color: #8A909B; text-transform: uppercase; }
.eyebrow i { width: 18px; height: 1px; background: var(--accent); display: inline-block; }
.sub-head h1 { font-size: 30px; font-weight: 600; letter-spacing: -.5px; margin-top: 14px; }
.sub-head p { font-size: 12.5px; color: #7A808B; margin-top: 10px; line-height: 1.8; }
.sub-head p b { color: #23272E; }
.plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 28px; max-width: 1040px; }
.plan { border: 1px solid #EDEFF3; border-radius: 16px; padding: 22px; position: relative; background: #fff; display: flex; flex-direction: column; }
.plan.is-featured { border-color: #17181C; box-shadow: 0 18px 40px rgba(16, 24, 40, .09); }
.plan-tag { position: absolute; top: 18px; right: 18px; font-size: 9.5px; background: #F3F5F8; color: #6E7480; border-radius: 5px; padding: 3px 7px; }
.plan.is-featured .plan-tag { background: #17181C; color: #fff; }
.plan h3 { font-size: 15px; font-weight: 600; }
.plan-price { display: flex; align-items: baseline; gap: 4px; margin-top: 14px; }
.plan-price b { font-size: 30px; font-weight: 600; letter-spacing: -.5px; }
.plan-price small { font-size: 11px; color: #9AA0AA; }
.plan > p { font-size: 11px; color: #8A909B; margin-top: 6px; }
.plan ul { margin: 18px 0 22px; display: flex; flex-direction: column; gap: 9px; }
.plan li { font-size: 11.5px; color: #555C67; padding-left: 16px; position: relative; }
.plan li::before { content: ""; position: absolute; left: 0; top: 6px; width: 6px; height: 6px; border-radius: 50%; background: #C9D2E3; }
.plan .ghost-btn, .plan .primary-btn { margin-top: auto; width: 100%; }
.sub-note { display: flex; gap: 12px; align-items: flex-start; margin-top: 26px; max-width: 700px; border: 1px solid #EDEFF3; background: #FAFBFC; border-radius: 12px; padding: 16px; }
.sub-note .icon { color: var(--accent); width: 18px; height: 18px; flex: none; }
.sub-note b { font-size: 12px; }
.sub-note p { font-size: 11px; color: #8A909B; line-height: 1.8; margin-top: 4px; }
