/* ============ v2: scale + new surfaces ============ */
.rail { width: 92px; padding-top: 16px; }
.logo-mark { width: 40px; height: 40px; border-radius: 12px; font-size: 18px; }
.rail-item { width: 72px; padding: 9px 0 7px; gap: 4px; }
.rail-ico .icon { width: 22px; height: 22px; }
.rail-label { font-size: 11.5px; }
.rail-item.is-active { background: #F2F3F6; }
.rail-bot { width: 38px; height: 38px; }
.rail-credits b { font-size: 11px; }
.rail-credits span { font-size: 10px; }

.stage { padding: 14px; gap: 12px; }
.hub-panel, .ws-editor { width: clamp(460px, 32.4vw, 560px); }
.queue { width: 224px; }

.hub-name h1 { font-size: 17px; }
.hub-name p { font-size: 11.5px; }
.hub-thumb { width: 42px; height: 42px; border-radius: 11px; }
.ask { padding: 18px 18px 2px; border-radius: 15px; }
.ask-head h2 { font-size: 21px; }
.ask-head p { font-size: 12px; }
.tab { font-size: 13.5px; }
.cards { gap: 10px; }
.skill-card { padding: 8px; gap: 10px; border-radius: 12px; }
.sc-thumb { width: 56px; height: 56px; border-radius: 9px; }
.sc-copy b { font-size: 13.5px; }
.sc-copy small { font-size: 11px; }
.ask-note { font-size: 11.5px; padding: 20px 0 16px; }

.ws-title h1 { font-size: 17px; }
.ws-head { padding: 14px 18px 10px; }
.ws-scroll { padding: 8px 22px 14px; }
.slot { width: 84px; }
.slot-label { font-size: 12px; }
.slot-label span { font-size: 10.5px; }
.ws-hint { font-size: 12px; }
.prompt-area { font-size: 13px; }
.select { height: 52px; }
.select-copy b { font-size: 12px; }
.select-copy small { font-size: 10px; }
.generate { height: 48px; font-size: 13.5px; }
.queue-head { font-size: 12.5px; }
.queue-meta b { font-size: 11.5px; }
.queue-meta small { font-size: 10px; }
.queue-thumb { width: 42px; height: 50px; }

/* corner play */
.corner-play {
  position: absolute; right: 10px; bottom: 10px; width: 34px; height: 34px;
  border-radius: 50%; background: rgba(255, 255, 255, .9); color: #15171B;
  display: grid; place-items: center; box-shadow: 0 4px 12px rgba(0, 0, 0, .16);
}
.corner-play .icon { width: 13px; height: 13px; margin-left: 2px; }
.corner-play.lg { width: 42px; height: 42px; }
.corner-play.lg .icon { width: 16px; height: 16px; }

/* new galleries */
.gallery-four { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; height: 334px; border-radius: 12px; overflow: hidden; }
.gallery-four figure { border-radius: 0; }
.gallery-merge { display: grid; grid-template-columns: 1fr 42px 1.35fr; gap: 10px; height: 348px; align-items: center; }
.gm-src { display: grid; grid-template-rows: 1fr 1fr; gap: 10px; height: 100%; }
.gm-arrow { width: 34px; height: 34px; border-radius: 50%; border: 1px solid #E9ECF1; background: #fff; color: #8A909B; display: grid; place-items: center; justify-self: center; }
.gm-arrow .icon { width: 14px; height: 14px; }
.gm-result { height: 100%; }
.is-soft { filter: blur(1.1px) saturate(.68) brightness(.97); }

/* create video */
.create-prompt { position: relative; margin-top: 14px; }
.create-prompt .prompt-area { min-height: 268px; }
.writer-link {
  position: absolute; right: 14px; bottom: 42px; border: 0; background: none;
  color: var(--accent); font-size: 11.5px; display: inline-flex; align-items: center; gap: 4px;
}
.writer-link .icon { width: 13px; height: 13px; }
.sub-drop--lg { height: 350px; }

/* ============ home ============ */
.home-page {
  position: relative; flex: 1; overflow: hidden; background: #fff; display: block;
}
.home-glow {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(1000px 520px at 50% -12%, #E9F0FF 0%, rgba(255, 255, 255, 0) 68%),
    radial-gradient(760px 420px at 86% 8%, #FFF6EA 0%, rgba(255, 255, 255, 0) 70%),
    radial-gradient(640px 420px at 12% 18%, #F6F1FF 0%, rgba(255, 255, 255, 0) 70%);
}
.home-stage {
  position: relative; height: 100%; overflow-y: auto;
  padding: 78px 44px 52px; display: flex; flex-direction: column; align-items: center;
}
.home-title {
  font-size: 34px; font-weight: 600; letter-spacing: -1px; line-height: 1.35;
  text-align: center; color: #15171B; max-width: 1100px;
}
.home-title span { color: #3D6DF5; }
.home-composer {
  width: min(1000px, 100%); margin-top: 40px;
  background: #fff; border: 1px solid #ECEFF4; border-radius: 18px;
  box-shadow: 0 20px 54px rgba(16, 24, 40, .08);
  display: flex; gap: 14px; padding: 16px 16px 12px;
}
.hc-plus {
  width: 92px; height: 92px; border-radius: 15px; border: 0; flex: none;
  background: linear-gradient(140deg, #ECF4FF, #DEEBFF);
  color: #3D6DF5; display: grid; place-items: center;
}
.hc-plus .icon { width: 24px; height: 24px; }
.hc-plus:hover { background: linear-gradient(140deg, #E3EEFF, #D2E3FF); }
.hc-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.hc-body textarea {
  width: 100%; border: 0; outline: 0; resize: none; background: transparent;
  font-size: 13.5px; line-height: 1.75; padding: 6px 2px; min-height: 48px; max-height: 110px;
}
.hc-body textarea::placeholder { color: #AEB4BE; }
.hc-foot { display: flex; align-items: center; margin-top: auto; padding-top: 6px; }
.hc-mode {
  display: inline-flex; align-items: center; gap: 5px; border: 0; background: none;
  font-size: 11.5px; color: #3F4550; padding: 6px 2px;
}
.hc-mode .icon { width: 14px; height: 14px; }
.hc-mode .icon:last-child { width: 12px; height: 12px; color: #A9AEB8; }
.hc-right { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.hc-cost { display: inline-flex; align-items: center; gap: 3px; font-size: 10.5px; color: #A9AEB8; margin-right: 4px; }
.hc-cost .icon { width: 12px; height: 12px; color: #B8935A; }
.hc-send {
  width: 36px; height: 36px; border-radius: 50%; border: 0;
  background: #17181C; color: #fff; display: grid; place-items: center;
}
.hc-send .icon { width: 16px; height: 16px; }

.tool-row { margin-top: 34px; display: flex; align-items: flex-start; justify-content: center; gap: 40px; width: 100%; max-width: 900px; }
.tool-item { display: flex; flex-direction: column; align-items: center; gap: 9px; color: #3F4550; }
.tool-ico {
  width: 54px; height: 54px; border-radius: 15px; background: #F5F6F9;
  border: 1px solid #EEF0F4; display: grid; place-items: center; color: #2E333B;
  transition: transform .16s, background .16s;
}
.tool-ico .icon { width: 22px; height: 22px; }
.tool-item:hover .tool-ico { transform: translateY(-2px); background: #fff; box-shadow: 0 8px 20px rgba(16, 24, 40, .07); }
.tool-label { font-size: 11.5px; color: #4B5160; }

.goal-section { width: 100%; max-width: 1480px; margin-top: 52px; }
.goal-head { display: flex; align-items: baseline; gap: 12px; }
.goal-head h2 { font-size: 19px; font-weight: 600; letter-spacing: -.3px; }
.goal-head span { font-size: 11.5px; color: #9AA0AA; }
.goal-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-top: 16px; }
.goal-card {
  border: 1px solid #EDEFF3; border-radius: 14px; overflow: hidden; background: #fff;
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.goal-card:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(16, 24, 40, .09); border-color: #E1E5EB; }
.goal-art { display: block; height: 172px; background: #F4F5F7; position: relative; overflow: hidden; }
.goal-art img { width: 100%; height: 100%; object-fit: cover; }
.ga-split { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; height: 100%; }
.ga-single { display: block; height: 100%; }
.ga-dark img { filter: brightness(.72) saturate(.85) contrast(1.05); }
.ga-vignette { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(12, 20, 34, .1), rgba(12, 20, 34, .35)); }
.ga-mosaic { display: grid; grid-template-columns: 1.4fr 1fr; grid-template-rows: 1fr 1fr; gap: 2px; height: 100%; }
.ga-mosaic .gm-a { grid-row: 1 / 3; }
.ga-mosaic img { width: 100%; height: 100%; object-fit: cover; }
.goal-meta { display: flex; flex-direction: column; gap: 3px; padding: 11px 13px 13px; border-top: 1px solid #F3F4F7; }
.goal-title { display: flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; color: #1B1F26; }
.goal-title .icon { width: 14px; height: 14px; color: #6E7480; }
.goal-desc { font-size: 10.5px; color: #9AA0AA; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.home-resume {
  margin-top: 26px; display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid #EDEFF3; background: #fff; border-radius: 999px;
  padding: 8px 14px; font-size: 11px; color: #6E7480;
}
.home-resume em { font-style: normal; color: #A9AEB8; }
.home-resume .icon { width: 13px; height: 13px; }
.home-resume:hover { border-color: #D8DDE5; color: #2E333B; }

/* ============ canvas ============ */
.canvas-page {
  position: relative; flex: 1; display: block; overflow: hidden;
  background-color: #FAFBFC;
  background-image: radial-gradient(#DFE4EB 1px, transparent 1px);
  background-size: 22px 22px;
}
.canvas-top { position: absolute; top: 14px; left: 14px; right: 14px; display: flex; align-items: center; justify-content: space-between; z-index: 5; }
.canvas-name {
  height: 48px; border-radius: 12px; background: #fff; border: 1px solid #ECEEF2;
  padding: 0 12px 0 8px; display: flex; align-items: center; gap: 9px;
  font-size: 12.5px; font-weight: 500; box-shadow: 0 6px 16px rgba(16, 24, 40, .05);
}
.canvas-name .icon { width: 14px; height: 14px; color: #A9AEB8; }
.cn-avatar { width: 32px; height: 32px; border-radius: 8px; overflow: hidden; }
.cn-avatar img { width: 100%; height: 100%; object-fit: cover; }
.canvas-status {
  display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 12px;
  background: #fff; border: 1px solid #ECEEF2; border-radius: 12px;
  box-shadow: 0 6px 16px rgba(16, 24, 40, .05); font-size: 11px; color: #555C67;
}
.cs-pill { display: inline-flex; align-items: center; gap: 5px; }
.cs-pill b { font-weight: 500; color: #2E333B; }
.cs-pill em { font-style: normal; color: #C9CED6; }
.cs-btn { border: 0; background: none; display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: #555C67; padding: 4px; }
.cs-btn .icon { width: 14px; height: 14px; }
.cs-btn:hover { color: #15171B; }
.canvas-status .cs-btn:first-of-type { border-left: 1px solid #F0F2F5; padding-left: 10px; margin-left: 2px; }

.canvas-toolbar {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  width: 64px; padding: 8px 6px; background: #fff; border: 1px solid #ECEEF2;
  border-radius: 14px; box-shadow: 0 10px 26px rgba(16, 24, 40, .06);
  display: flex; flex-direction: column; align-items: center; gap: 3px; z-index: 4;
}
.ct-btn { width: 40px; height: 40px; border: 0; border-radius: 9px; background: none; color: #4B5160; display: grid; place-items: center; }
.ct-btn .icon { width: 19px; height: 19px; }
.ct-btn:hover, .ct-btn.is-active { background: #F2F4F7; }
.ct-line { width: 30px; height: 1px; background: #EEF0F4; margin: 5px 0; }
.ct-item { width: 46px; border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0; color: #6E7480; font-size: 9px; border-radius: 8px; }
.ct-item .icon { width: 17px; height: 17px; }
.ct-item:hover { background: #F7F8FA; color: #2E333B; }

.canvas-area {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding-bottom: 70px;
}
.node-actions {
  position: absolute; top: 108px; display: flex; gap: 4px; background: #fff;
  border: 1px solid #ECEEF2; border-radius: 10px; padding: 5px;
  box-shadow: 0 10px 24px rgba(16, 24, 40, .07);
}
.node-actions button { border: 0; background: none; height: 30px; padding: 0 10px; border-radius: 7px; font-size: 10.5px; color: #3F4550; display: inline-flex; align-items: center; gap: 4px; }
.node-actions button:hover { background: #F5F6F8; }
.node-actions .icon { width: 14px; height: 14px; }
.node-label { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; color: #8A909B; margin-bottom: 8px; }
.node-label .icon { width: 13px; height: 13px; }
.canvas-node {
  width: 404px; height: 262px; background: #FDFDFE; border: 1.5px solid #D9DEE6;
  border-radius: 10px; display: grid; place-items: center; position: relative;
  box-shadow: 0 12px 32px rgba(16, 24, 40, .05);
}
.canvas-node img { width: 100%; height: 100%; object-fit: cover; border-radius: 9px; }
.node-empty { color: #C3C8D1; }
.node-empty .icon { width: 38px; height: 38px; }
.node-plus {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; border-radius: 50%; border: 1px solid #E5E8EE;
  background: #fff; color: #6E7480; display: grid; place-items: center;
  box-shadow: 0 4px 10px rgba(16, 24, 40, .08);
}
.node-plus .icon { width: 13px; height: 13px; }
.node-plus.left { left: -42px; }
.node-plus.right { right: -42px; }

.canvas-prompt {
  position: absolute; left: 50%; bottom: 34px; transform: translateX(-50%);
  width: min(840px, calc(100% - 260px)); background: #fff;
  border: 1px solid #E9ECF1; border-radius: 14px; padding: 14px 16px 8px;
  box-shadow: 0 20px 50px rgba(16, 24, 40, .1); z-index: 4;
}
.canvas-prompt textarea {
  width: 100%; border: 0; outline: 0; resize: none; min-height: 68px;
  font-size: 12.5px; line-height: 1.75; background: transparent;
}
.canvas-prompt textarea::placeholder { color: #AEB4BE; }
.cp-bar { display: flex; align-items: center; gap: 6px; border-top: 1px solid #F3F4F7; padding-top: 8px; flex-wrap: wrap; }
.cp-pill { height: 26px; border: 0; background: #F5F6F8; border-radius: 7px; padding: 0 8px; font-size: 10px; color: #4B5160; display: inline-flex; align-items: center; gap: 3px; }
.cp-pill .icon { width: 12px; height: 12px; }
.cp-sep { width: 1px; height: 14px; background: #EEF0F4; }
.cp-cost { margin-left: auto; display: inline-flex; align-items: center; gap: 3px; font-size: 10px; color: #A9AEB8; }
.cp-cost .icon { width: 11px; height: 11px; color: #B8935A; }
.cp-send { width: 34px; height: 34px; border-radius: 50%; border: 0; background: #17181C; color: #fff; display: grid; place-items: center; }
.cp-send .icon { width: 15px; height: 15px; }
.canvas-zoom {
  position: absolute; left: 18px; bottom: 18px; display: flex; align-items: center; gap: 2px;
  background: #fff; border: 1px solid #ECEEF2; border-radius: 10px; padding: 3px 8px;
  font-size: 10.5px; color: #4B5160; box-shadow: 0 6px 16px rgba(16, 24, 40, .05);
}
.canvas-zoom .icon-btn { width: 26px; height: 26px; }
.cz-sep { width: 1px; height: 14px; background: #EEF0F4; margin: 0 4px; }
.cz-reset { border: 0; background: none; font-size: 10.5px; color: #6E7480; }

/* ============ tour ============ */
.layer:has(.tour-card) { pointer-events: none; }
.tour-card {
  position: fixed; z-index: 60; width: 340px; background: #fff;
  border-radius: 14px; padding: 20px 22px 18px;
  box-shadow: 0 30px 70px rgba(16, 24, 40, .22);
  pointer-events: auto; transition: opacity .15s;
}
.tour-card.is-hidden { opacity: 0; }
.tour-card::before {
  content: ""; position: absolute; width: 12px; height: 12px; background: #fff;
  transform: rotate(45deg); box-shadow: -3px 3px 8px rgba(16, 24, 40, .05);
}
.tour-card.arrow-left::before { left: -5px; top: 54px; }
.tour-card.arrow-right::before { right: -5px; top: 54px; }
.tour-card.arrow-top::before { top: -5px; left: 50%; margin-left: -6px; }
.tour-card h3 { font-size: 17px; font-weight: 600; letter-spacing: -.2px; }
.tour-card p { font-size: 12px; color: #6E7480; line-height: 1.8; margin-top: 8px; }
.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: 18px; }
.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; }
.tour-skip { position: absolute; top: 14px; right: 16px; border: 0; background: none; font-size: 11px; color: #A9AEB8; }
.slot.is-tour .slot-thumb, .dropzone.is-tour {
  border-color: #6E9BFF !important; border-style: solid !important;
  box-shadow: 0 0 0 4px rgba(110, 155, 255, .16);
}
.slot.is-tour .slot-thumb { background: #F8FAFF; }

/* ============ responsive v2 ============ */
@media (max-width: 1500px) {
  .goal-row { grid-template-columns: repeat(4, 1fr); }
  .goal-card:last-child { display: none; }
}
@media (max-width: 1280px) {
  .home-stage { padding: 56px 28px 40px; }
  .home-title { font-size: 28px; }
  .tool-row { gap: 26px; }
  .goal-row { grid-template-columns: repeat(3, 1fr); }
  .goal-card:nth-child(4), .goal-card:nth-child(5) { display: none; }
  .canvas-prompt { width: min(760px, calc(100% - 200px)); }
}
@media (max-width: 900px) {
  .rail { width: 100%; height: 62px; }
  .rail-nav { flex-direction: row; }
  .home-stage { padding: 30px 16px; }
  .home-title { font-size: 24px; }
  .home-composer { margin-top: 24px; padding: 12px; gap: 10px; }
  .hc-plus { width: 64px; height: 64px; }
  .tool-row { gap: 14px; flex-wrap: wrap; margin-top: 24px; }
  .tool-ico { width: 46px; height: 46px; }
  .goal-row { grid-template-columns: 1fr 1fr; }
  .goal-card:nth-child(3) { display: none; }
  .canvas-toolbar { display: none; }
  .canvas-prompt { width: calc(100% - 24px); bottom: 12px; }
  .canvas-node { width: 300px; height: 200px; }
  .canvas-status { display: none; }
}
