:root {
  --bg: #f6f8fb;
  --panel: #ffffff;
  --panel-2: #f8fafc;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --brand: #0fd3c8;
  --brand-2: #13b7ff;
  --primary: #2563eb;
  --soft: #f1f5f9;
  --nav: #0f172a;
  --nav-border: #243044;
  --shadow: 0 18px 60px rgba(15, 23, 42, .08);
}

html.dark {
  --bg: #020617;
  --panel: #0f172a;
  --panel-2: #111827;
  --text: #f8fafc;
  --muted: #94a3b8;
  --border: #1e293b;
  --brand: #00e0d1;
  --brand-2: #38bdf8;
  --primary: #38bdf8;
  --soft: #111827;
  --nav: #0b1220;
  --nav-border: #1f2a3d;
  --shadow: 0 24px 70px rgba(0, 0, 0, .28);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Arial, "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
}

a { color: inherit; text-decoration: none; }

.app {
  min-height: 100vh;
}

/* Top global navigation like kjtool */
.top-global {
  height: 70px;
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  background: var(--nav);
  border-bottom: 1px solid var(--nav-border);
  color: #e5edf8;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 210px;
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: white;
  font-weight: 900;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 0 25px rgba(15, 211, 200, .32);
}

.brand-title {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: .2px;
}

.top-nav {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: 20px;
}

.nav-dropdown {
  position: relative;
}

.nav-trigger {
  border: 1px solid transparent;
  background: transparent;
  color: #dbeafe;
  padding: 13px 18px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-dropdown:hover .nav-trigger,
.nav-trigger.active {
  background: rgba(255, 255, 255, .08);
  border-color: rgba(255,255,255,.08);
}

.nav-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 240px;
  background: #111827;
  border: 1px solid #253044;
  border-radius: 14px;
  box-shadow: 0 24px 80px rgba(0,0,0,.35);
  padding: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: .18s ease;
}

.nav-dropdown:hover .nav-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.nav-menu a {
  display: block;
  padding: 13px 14px;
  border-radius: 10px;
  color: #e5edf8;
  font-weight: 700;
  font-size: 14px;
}

.nav-menu a:hover {
  background: rgba(15, 211, 200, .12);
  color: #67fff5;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pill-btn {
  border: 1px solid rgba(255,255,255,.14);
  color: #f8fafc;
  background: rgba(255,255,255,.08);
  padding: 11px 16px;
  border-radius: 14px;
  font-weight: 800;
  cursor: pointer;
}

.pill-btn:hover {
  background: rgba(255,255,255,.14);
}

.points-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 116px;
  justify-content: center;
}

.mobile-menu-btn { display: none; }

/* Collapsed hover sidebar */
.side-rail {
  position: fixed;
  top: 70px;
  left: 0;
  bottom: 0;
  width: 58px;
  z-index: 45;
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  border-right: 1px solid var(--border);
  backdrop-filter: blur(14px);
  transition: width .22s ease, box-shadow .22s ease;
  overflow: hidden;
}

.side-rail:hover {
  width: 306px;
  box-shadow: 10px 0 40px rgba(15,23,42,.12);
}

.rail-inner {
  width: 306px;
  padding: 14px 12px;
}

.rail-tip {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: white;
  font-weight: 900;
  margin: 6px 0 14px 0;
}

.side-rail:hover .rail-tip {
  width: auto;
  justify-content: start;
  padding-left: 10px;
}

.rail-tip span {
  opacity: 0;
  margin-left: 8px;
  white-space: nowrap;
  transition: opacity .15s ease;
}

.side-rail:hover .rail-tip span { opacity: 1; }

.rail-menu-group {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--panel);
  margin-bottom: 12px;
  overflow: hidden;
}

.rail-title {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 13px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}

.rail-title:hover { background: var(--soft); }

.rail-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height .22s ease;
}

.rail-panel.open { max-height: 620px; }

.rail-list { padding: 8px; }

.rail-link {
  display: block;
  padding: 11px 12px;
  border-radius: 13px;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.rail-link:hover, .rail-link.active {
  background: color-mix(in srgb, var(--brand) 11%, transparent);
  color: var(--brand);
  font-weight: 900;
}

/* Main layout */
.main {
  min-width: 0;
  margin-left: 58px;
}

.page-shell {
  min-height: calc(100vh - 70px);
}

.content {
  padding: 34px;
}

.page-header {
  margin-bottom: 24px;
}

.page-kicker {
  margin: 0 0 6px;
  font-size: 13px;
  color: var(--muted);
}

.page-title {
  margin: 0;
  font-size: 24px;
  font-weight: 900;
}

.btn {
  border: 0;
  border-radius: 14px;
  padding: 11px 18px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #051118;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 14px 34px rgba(15, 211, 200, .15);
}

.btn:hover { filter: brightness(1.04); }

.btn.ghost {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  box-shadow: none;
}

.btn.ghost:hover { background: var(--soft); }

.btn.blue {
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  color: white;
}

.btn-group {
  display: inline-flex;
  padding: 5px;
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: 16px;
  gap: 4px;
}

.switch-btn {
  border: 0;
  border-radius: 12px;
  padding: 10px 18px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
  cursor: pointer;
}

.switch-btn.active {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #051118;
}

/* Home */
.hero-dark {
  min-height: calc(100vh - 70px);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 76px 24px;
  background:
    radial-gradient(circle at 30% 45%, rgba(0, 224, 209, .16), transparent 30%),
    radial-gradient(circle at 70% 40%, rgba(56, 189, 248, .13), transparent 32%),
    linear-gradient(180deg, #060b1a, #020617);
  color: white;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  color: #c8fff8;
  background: rgba(255,255,255,.06);
  margin-bottom: 32px;
}

.hero-dark h1 {
  margin: 0;
  font-size: clamp(46px, 7vw, 86px);
  line-height: 1.05;
  font-weight: 1000;
  letter-spacing: -2px;
}

.hero-dark h1 span {
  display: block;
  background: linear-gradient(90deg, #00ded0, #38bdf8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-dark p {
  max-width: 720px;
  margin: 28px auto 0;
  color: #a7b6c9;
  font-size: 20px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 36px;
}

.home-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  padding: 34px;
}

.card {
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.card h3 { margin: 0 0 8px; font-size: 20px; }
.card p { color: var(--muted); }
.card a {
  display: block;
  color: var(--muted);
  padding: 9px 0;
  font-size: 14px;
}
.card a:hover { color: var(--brand); }

/* Tool pages */
.tool-wrap {
  max-width: 1240px;
  margin: 0 auto;
}

.tool-head {
  margin-bottom: 22px;
}

.tool-head .category {
  color: var(--brand);
  font-weight: 900;
  margin-bottom: 8px;
}

.tool-head h1 {
  margin: 0;
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 1000;
}

.tool-head p {
  max-width: 860px;
  color: var(--muted);
  line-height: 1.75;
  font-size: 16px;
}

.tool-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 22px;
}

.form-box, .result-box, .setting-card, .copy-card {
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: 26px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.form-box h3, .result-box h3, .setting-card h3, .copy-card h3 {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 900;
}

.form-stack {
  display: grid;
  gap: 16px;
}

label span {
  display: block;
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 8px;
}

input, select, textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 13px 14px;
  background: var(--panel-2);
  color: var(--text);
  outline: none;
  font-size: 14px;
}

textarea { min-height: 130px; resize: vertical; }

input:focus, select:focus, textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent);
}

.file-box {
  border: 2px dashed var(--border);
  border-radius: 22px;
  padding: 28px;
  text-align: center;
  background: var(--panel-2);
}

.file-box strong {
  display: block;
  margin-top: 12px;
}

.file-hint {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.result-content {
  min-height: 220px;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  background: var(--panel-2);
  line-height: 1.8;
}

.result-content table {
  width: 100%;
  border-collapse: collapse;
}

.result-content th,
.result-content td {
  padding: 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.generator-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  align-items: start;
}

.upload-grid {
  display: grid;
  gap: 16px;
}

.notice {
  border: 1px solid color-mix(in srgb, var(--brand) 35%, var(--border));
  background: color-mix(in srgb, var(--brand) 8%, transparent);
  color: var(--text);
  border-radius: 18px;
  padding: 14px 16px;
  font-size: 14px;
  line-height: 1.7;
}

.prompt-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
}

.mini-muted {
  color: var(--muted);
  font-size: 13px;
}

.drawer { display: none; }

@media (max-width: 1100px) {
  .top-nav { display: none; }
  .mobile-menu-btn { display: inline-flex; }
  .side-rail { display: none; }
  .main { margin-left: 0; }
  .home-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tool-grid, .generator-layout { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .top-global { padding: 0 14px; }
  .brand-title { display: none; }
  .top-actions .points-pill, .top-actions .login-btn { display: none; }
  .content { padding: 18px; }
  .hero-dark h1 { font-size: 42px; }
  .home-cards { grid-template-columns: 1fr; padding: 18px; }
  .tool-head h1 { font-size: 28px; }
  .drawer.open { display: block; }
  .drawer-mask {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 79;
  }
  .drawer-panel {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(86vw, 330px);
    background: var(--panel);
    border-right: 1px solid var(--border);
    z-index: 80;
    overflow-y: auto;
  }
}

/* ---- Polished collapsed hover sidebar override ----
   Default: only a thin hover hotspot + turquoise button.
   Hover: full floating menu slides out. No cropped text shown.
*/
.side-rail {
  position: fixed;
  top: 70px;
  left: 0;
  bottom: 0;
  width: 18px;
  z-index: 45;
  background: transparent;
  border-right: 0;
  backdrop-filter: none;
  overflow: visible;
  transition: width .22s ease;
}

.side-rail::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 18px;
  background: rgba(15, 23, 42, .04);
  border-right: 1px solid rgba(148, 163, 184, .16);
}

html.dark .side-rail::before {
  background: rgba(255, 255, 255, .025);
  border-right-color: rgba(255, 255, 255, .08);
}

.side-rail:hover {
  width: 306px;
  box-shadow: none;
}

.rail-inner {
  position: absolute;
  left: 12px;
  top: 14px;
  width: 292px;
  max-height: calc(100vh - 98px);
  overflow-y: auto;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 0 22px 22px 0;
  background: color-mix(in srgb, var(--panel) 96%, transparent);
  backdrop-filter: blur(18px);
  box-shadow: 18px 0 60px rgba(15, 23, 42, .12);
  opacity: 0;
  transform: translateX(-286px);
  pointer-events: none;
  transition: opacity .2s ease, transform .22s ease;
}

html.dark .rail-inner {
  box-shadow: 18px 0 70px rgba(0, 0, 0, .36);
}

.side-rail:hover .rail-inner {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.rail-tip {
  position: fixed;
  left: 14px;
  top: 92px;
  width: 42px;
  height: 42px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: white;
  font-weight: 900;
  margin: 0;
  z-index: 46;
  box-shadow: 0 12px 32px rgba(15, 211, 200, .24);
  transform: translateX(0);
  transition: opacity .16s ease, transform .18s ease;
}

.rail-tip span {
  display: none;
}

.side-rail:hover .rail-tip {
  opacity: 0;
  transform: translateX(-12px);
  pointer-events: none;
}

.side-rail:hover .rail-tip span {
  opacity: 0;
}

.main {
  margin-left: 0;
}

.rail-menu-group {
  background: transparent;
  border-color: var(--border);
}

.rail-title {
  border-radius: 14px;
}

.rail-link {
  font-size: 14px;
  padding: 10px 12px;
}

@media (max-width: 1100px) {
  .side-rail {
    display: none;
  }
}

/* ---- v3: homepage closer to kjtool.top screenshot ---- */

/* PC: remove visible side button; keep only invisible 10px hover area */
.side-rail {
  position: fixed !important;
  top: 70px !important;
  left: 0 !important;
  bottom: 0 !important;
  width: 10px !important;
  z-index: 45 !important;
  background: transparent !important;
  border: 0 !important;
  overflow: visible !important;
}

.side-rail::before {
  display: none !important;
}

.rail-tip {
  display: none !important;
}

.rail-inner {
  position: absolute !important;
  left: 0 !important;
  top: 18px !important;
  width: 292px !important;
  max-height: calc(100vh - 106px) !important;
  overflow-y: auto !important;
  padding: 14px !important;
  border: 1px solid var(--nav-border) !important;
  border-radius: 0 18px 18px 0 !important;
  background: #111827 !important;
  color: #e5edf8 !important;
  box-shadow: 18px 0 70px rgba(0,0,0,.34) !important;
  opacity: 0 !important;
  transform: translateX(-100%) !important;
  pointer-events: none !important;
  transition: opacity .18s ease, transform .22s ease !important;
}

.side-rail:hover .rail-inner {
  opacity: 1 !important;
  transform: translateX(0) !important;
  pointer-events: auto !important;
}

.rail-menu-group {
  border-color: rgba(255,255,255,.10) !important;
  background: rgba(255,255,255,.02) !important;
}

.rail-title {
  color: #f8fafc !important;
}

.rail-title:hover {
  background: rgba(255,255,255,.08) !important;
}

.rail-link {
  color: #cbd5e1 !important;
}

.rail-link:hover,
.rail-link.active {
  background: rgba(15, 211, 200, .12) !important;
  color: #67fff5 !important;
}

/* Top nav spacing more like original */
.top-global {
  height: 70px !important;
  padding: 0 106px !important;
}

.brand-link {
  min-width: 150px !important;
}

.top-nav {
  margin-left: 44px !important;
  gap: 30px !important;
}

.nav-trigger {
  padding: 12px 0 !important;
  font-size: 16px !important;
  font-weight: 900 !important;
}

.nav-dropdown:hover .nav-trigger,
.nav-trigger.active {
  background: transparent !important;
  border-color: transparent !important;
  color: #ffffff !important;
}

.nav-menu {
  top: calc(100% + 12px) !important;
  width: 232px !important;
  border-radius: 14px !important;
  padding: 12px !important;
}

.top-actions {
  gap: 14px !important;
}

.pill-btn {
  padding: 12px 18px !important;
  border-radius: 14px !important;
}

/* Homepage: exactly hero-first layout, no cards visible above the fold */
.hero-dark {
  min-height: calc(100vh - 70px) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 24px 26px !important;
  overflow: hidden !important;
  background:
    radial-gradient(circle at 33% 45%, rgba(0, 224, 209, .18), transparent 31%),
    radial-gradient(circle at 69% 43%, rgba(56, 189, 248, .14), transparent 32%),
    linear-gradient(180deg, #060b1a 0%, #071425 48%, #020617 100%) !important;
}

.hero-dark > div {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  transform: translateY(-4px);
}

.hero-badge {
  margin-bottom: 28px !important;
  padding: 10px 20px !important;
  font-size: 15px !important;
}

.hero-dark h1 {
  font-size: clamp(56px, 5.6vw, 82px) !important;
  line-height: 1.12 !important;
  letter-spacing: -1.6px !important;
  margin: 0 !important;
  font-weight: 1000 !important;
}

.hero-dark p {
  margin-top: 24px !important;
  max-width: 770px !important;
  font-size: 20px !important;
  line-height: 1.75 !important;
  color: #a9b7ca !important;
}

.hero-actions {
  margin-top: 34px !important;
}

.hero-actions .btn {
  min-width: 130px;
  padding: 14px 22px !important;
}

.home-cards {
  padding: 34px 106px !important;
  background: var(--bg);
}

/* Do not reserve side space */
.main {
  margin-left: 0 !important;
}

@media (max-width: 1200px) {
  .top-global { padding: 0 26px !important; }
  .top-nav { gap: 18px !important; margin-left: 24px !important; }
  .home-cards { padding: 28px !important; }
}

@media (max-width: 1100px) {
  .side-rail { display: none !important; }
  .top-global { padding: 0 16px !important; }
  .hero-dark h1 { font-size: clamp(42px, 8vw, 62px) !important; }
}

/* ---- v4: restore original-style homepage sections ---- */
html { background: #020617; }
body { overflow-x: hidden; }

.top-global {
  height: 70px !important;
  padding: 0 clamp(24px, 9vw, 178px) !important;
  background: rgba(15, 23, 42, .94) !important;
  border-bottom: 1px solid rgba(148, 163, 184, .16) !important;
  backdrop-filter: blur(18px) !important;
}

.brand-link { min-width: 160px !important; }
.brand-icon { box-shadow: 0 0 28px rgba(15, 211, 200, .42); }

.top-nav {
  gap: 28px !important;
  margin-left: 36px !important;
}

.nav-trigger {
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px !important;
  color: #eaf2ff !important;
  font-weight: 900 !important;
  letter-spacing: .1px !important;
}

.nav-trigger .arrow {
  font-size: 12px;
  transition: transform .16s ease;
}

.nav-dropdown:hover .nav-trigger .arrow { transform: rotate(180deg); }
.nav-dropdown:hover .nav-trigger { color: #ffffff !important; }

.nav-menu {
  top: calc(100% + 12px) !important;
  left: 50% !important;
  transform: translate(-50%, -6px) !important;
  width: 232px !important;
  background: rgba(17, 24, 39, .98) !important;
  border: 1px solid rgba(148, 163, 184, .18) !important;
  border-radius: 14px !important;
  padding: 12px !important;
  box-shadow: 0 24px 80px rgba(0,0,0,.38) !important;
}

.nav-dropdown:hover .nav-menu { transform: translate(-50%, 0) !important; }

.nav-menu::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 50%;
  width: 12px;
  height: 12px;
  transform: translateX(-50%) rotate(45deg);
  background: rgba(17, 24, 39, .98);
  border-left: 1px solid rgba(148, 163, 184, .18);
  border-top: 1px solid rgba(148, 163, 184, .18);
}

.nav-menu a {
  position: relative;
  z-index: 1;
  padding: 12px 13px !important;
}

.home-page {
  background:
    radial-gradient(circle at 18% 30%, rgba(0, 224, 209, .13), transparent 34%),
    radial-gradient(circle at 80% 20%, rgba(56, 189, 248, .10), transparent 34%),
    linear-gradient(180deg, #020617 0%, #07111f 44%, #020617 100%);
  color: #f8fafc;
}

.home-section {
  position: relative;
  min-height: calc(100vh - 70px);
  padding: clamp(70px, 9vh, 120px) clamp(24px, 10vw, 178px);
  display: flex;
  align-items: center;
}

.home-section + .home-section { border-top: 1px solid rgba(148,163,184,.08); }

.home-grid-2 {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(420px, .95fr) minmax(420px, 1fr);
  gap: clamp(46px, 7vw, 88px);
  align-items: center;
}

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #00e0d1;
  background: rgba(0, 224, 209, .08);
  border: 1px solid rgba(0, 224, 209, .20);
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 13px;
  margin-bottom: 18px;
}

.home-section h1,
.home-section h2 {
  margin: 0;
  color: white;
  font-weight: 1000;
  letter-spacing: -1px;
  line-height: 1.16;
}

.home-section h1 { font-size: clamp(42px, 4.9vw, 62px); }
.home-section h2 { font-size: clamp(34px, 3.4vw, 46px); }

.home-section .subline {
  display: block;
  color: rgba(255,255,255,.55);
  font-weight: 900;
}

.home-section p.desc {
  margin: 24px 0 0;
  color: #a8b5c7;
  font-size: 17px;
  line-height: 1.8;
  max-width: 650px;
}

.feature-list {
  margin: 28px 0 0;
  display: grid;
  gap: 18px;
}

.feature-item {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 16px;
  align-items: start;
}

.feature-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #00e0d1;
  background: rgba(0, 179, 255, .12);
  border: 1px solid rgba(0, 224, 209, .12);
  font-weight: 900;
  font-size: 18px;
}

.feature-item b {
  display: block;
  color: #f8fafc;
  font-size: 16px;
  margin-bottom: 6px;
}

.feature-item span {
  color: #7f8ea3;
  font-size: 14px;
  line-height: 1.55;
}

.section-actions {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.home-primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 136px;
  padding: 14px 22px;
  border-radius: 12px;
  border: 0;
  background: linear-gradient(135deg, #0fd3c8, #18a8ff);
  color: #031019;
  font-weight: 1000;
  box-shadow: 0 18px 44px rgba(0, 224, 209, .22);
}

.home-ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 126px;
  padding: 13px 21px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, .28);
  background: rgba(255,255,255,.03);
  color: #f8fafc;
  font-weight: 900;
}

.home-ghost-btn:hover { background: rgba(255,255,255,.08); }

.dashboard-card {
  position: relative;
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 18px;
  background: rgba(15, 23, 42, .75);
  box-shadow: 0 30px 90px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.04);
  overflow: hidden;
  backdrop-filter: blur(18px);
}

.dashboard-top {
  height: 44px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 18px;
  border-bottom: 1px solid rgba(148, 163, 184, .14);
  color: #66758a;
  font-size: 12px;
}

.dot { width: 11px; height: 11px; border-radius: 999px; }
.dot.red { background: #ef4444; }
.dot.yellow { background: #f59e0b; }
.dot.green { background: #22c55e; }

.chart-area { padding: 28px 24px 24px; }

.bar-chart {
  height: 120px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  align-items: end;
  gap: 12px;
  border-bottom: 1px solid rgba(148, 163, 184, .14);
  padding-bottom: 10px;
}

.bar {
  border-radius: 5px 5px 0 0;
  background: linear-gradient(180deg, rgba(16,185,206,.72), rgba(16,185,206,.30));
  min-height: 32px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 18px;
}

.metric {
  border: 1px solid rgba(148, 163, 184, .12);
  background: rgba(255,255,255,.03);
  border-radius: 10px;
  padding: 14px;
}

.metric span {
  display: block;
  color: #69788d;
  font-size: 12px;
  margin-bottom: 6px;
}

.metric b {
  display: block;
  color: #ffffff;
  font-size: 15px;
}

.progress-lines {
  margin-top: 20px;
  display: grid;
  gap: 10px;
}

.progress {
  height: 9px;
  border-radius: 999px;
  background: rgba(255,255,255,.05);
  overflow: hidden;
}

.progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(0,224,209,.46), rgba(24,168,255,.30));
}

.image-tool-preview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.preview-card {
  min-height: 210px;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 18px;
  background: rgba(15, 23, 42, .62);
  box-shadow: 0 24px 70px rgba(0,0,0,.22);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  backdrop-filter: blur(18px);
}

.preview-card .fake-image {
  height: 112px;
  border-radius: 14px;
  background:
    radial-gradient(circle at 40% 42%, rgba(255,255,255,.95), rgba(255,255,255,.25) 18%, transparent 20%),
    linear-gradient(135deg, rgba(0,224,209,.20), rgba(56,189,248,.10));
  border: 1px solid rgba(255,255,255,.08);
}

.preview-card b { color: #f8fafc; }
.preview-card span { color: #7f8ea3; font-size: 13px; }

.video-preview {
  position: relative;
  min-height: 430px;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 26px;
  background:
    radial-gradient(circle at 50% 40%, rgba(15,211,200,.18), transparent 32%),
    linear-gradient(135deg, rgba(15,23,42,.82), rgba(2,6,23,.88));
  overflow: hidden;
  box-shadow: 0 30px 90px rgba(0,0,0,.30);
}

.video-frame {
  position: absolute;
  inset: 32px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,.11);
  background:
    linear-gradient(135deg, rgba(255,255,255,.10), transparent),
    radial-gradient(circle at 70% 35%, rgba(56,189,248,.22), transparent 27%);
}

.play-btn {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 78px;
  height: 78px;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #0fd3c8, #18a8ff);
  color: #031019;
  font-size: 30px;
  font-weight: 900;
  box-shadow: 0 18px 50px rgba(0,224,209,.26);
}

.glass-tool-section {
  padding: 70px clamp(24px, 10vw, 178px) 96px;
  background:
    radial-gradient(circle at 50% 0%, rgba(0,224,209,.08), transparent 36%),
    #020617;
}

.glass-title {
  text-align: center;
  margin-bottom: 34px;
}

.glass-title h2 {
  color: #fff;
  font-size: clamp(30px, 3vw, 44px);
  margin: 0 0 12px;
}

.glass-title p {
  color: #8c9ab0;
  margin: 0;
}

.home-cards {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 18px !important;
  padding: 0 !important;
  background: transparent !important;
}

.card {
  border: 1px solid rgba(148,163,184,.18) !important;
  background: rgba(15,23,42,.62) !important;
  color: #f8fafc !important;
  backdrop-filter: blur(18px) !important;
  box-shadow: 0 24px 70px rgba(0,0,0,.22) !important;
}

.card p,
.card a { color: #93a4ba !important; }

.card a:hover { color: #00e0d1 !important; }

@media (max-width: 1100px) {
  .home-grid-2 { grid-template-columns: 1fr; }
  .home-section { padding: 56px 28px; }
  .home-cards { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

@media (max-width: 720px) {
  .home-section h1 { font-size: 38px !important; }
  .home-section h2 { font-size: 32px !important; }
  .home-cards { grid-template-columns: 1fr !important; }
  .metrics { grid-template-columns: 1fr; }
  .image-tool-preview { grid-template-columns: 1fr; }
}

/* ---- v5: kjtool exact homepage module layout ---- */
:root {
  --home-bg: #050917;
  --home-panel: #111827;
  --home-panel-2: #151f31;
  --home-border: rgba(148, 163, 184, .18);
  --cyan: #07d7cf;
  --cyan-2: #24b7ff;
  --purple: #8b5cf6;
  --orange: #f59e0b;
}

html, body { background: var(--home-bg); }

.top-global {
  height: 70px !important;
  padding: 0 clamp(34px, 9vw, 176px) !important;
  background: rgba(15, 23, 42, .96) !important;
  border-bottom: 1px solid rgba(148, 163, 184, .18) !important;
}

.brand-link { min-width: 170px !important; }
.brand-icon {
  width: 34px !important;
  height: 34px !important;
  border-radius: 10px !important;
}
.brand-title { font-size: 20px !important; }

.top-nav {
  margin-left: 34px !important;
  gap: 28px !important;
}

.nav-trigger {
  font-size: 15px !important;
  padding: 11px 0 !important;
}

.nav-trigger .arrow {
  font-size: 12px;
  transition: transform .18s ease;
}

.nav-dropdown:hover .nav-trigger .arrow { transform: rotate(180deg); }

.nav-menu {
  top: calc(100% + 10px) !important;
  width: 228px !important;
  background: rgba(17, 24, 39, .98) !important;
  border: 1px solid rgba(148, 163, 184, .22) !important;
  border-radius: 13px !important;
  padding: 12px !important;
}

.pill-btn {
  height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 0 16px !important;
  border-radius: 13px !important;
  background: rgba(255,255,255,.08) !important;
  border: 1px solid rgba(255,255,255,.15) !important;
}

.home-page {
  background:
    radial-gradient(circle at 48% 18%, rgba(0, 224, 209, .13), transparent 28%),
    radial-gradient(circle at 38% 21%, rgba(56,189,248,.08), transparent 30%),
    linear-gradient(180deg, #050917 0%, #020617 42%, #020617 100%) !important;
  color: #f8fafc;
}

.kj-section {
  padding-left: clamp(42px, 10vw, 176px);
  padding-right: clamp(42px, 10vw, 176px);
}

.kj-hero {
  min-height: calc(100vh - 70px);
  display: grid;
  place-items: center;
  text-align: center;
  padding-top: 72px;
  padding-bottom: 90px;
}

.kj-hero-inner {
  max-width: 980px;
  margin: 0 auto;
}

.kj-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  color: #d8fff9;
  background: rgba(255,255,255,.055);
  border: 1px solid rgba(148, 163, 184, .25);
  font-size: 14px;
  font-weight: 800;
}

.kj-pill.green {
  color: #00f0d8;
  background: rgba(0, 224, 209, .10);
  border-color: rgba(0, 224, 209, .28);
}

.kj-pill.purple {
  color: #c4a5ff;
  background: rgba(139, 92, 246, .13);
  border-color: rgba(139, 92, 246, .33);
}

.kj-pill.orange {
  color: #fbbf24;
  background: rgba(245, 158, 11, .13);
  border-color: rgba(245, 158, 11, .35);
}

.kj-hero h1 {
  margin: 32px 0 0;
  font-size: clamp(58px, 7.2vw, 88px);
  line-height: 1.06;
  font-weight: 1000;
  letter-spacing: -2px;
}

.kj-gradient-text {
  display: block;
  background: linear-gradient(90deg, #00ded0, #38bdf8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.kj-hero-desc {
  margin: 28px auto 0;
  max-width: 760px;
  color: #9aa8bb;
  font-size: 20px;
  line-height: 1.75;
}

.kj-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 36px;
}

.kj-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 130px;
  height: 52px;
  padding: 0 24px;
  border-radius: 13px;
  border: 1px solid rgba(148, 163, 184, .24);
  color: white;
  font-weight: 900;
  background: rgba(255,255,255,.035);
}

.kj-btn.primary {
  color: #031019;
  background: linear-gradient(135deg, #00e0d1, #22c8ff);
  box-shadow: 0 18px 48px rgba(0, 224, 209, .24);
  border: 0;
}

.kj-btn.purple {
  color: white;
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  box-shadow: 0 18px 48px rgba(124, 58, 237, .25);
  border: 0;
}

.kj-btn.orange {
  color: white;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  box-shadow: 0 18px 48px rgba(245, 158, 11, .22);
  border: 0;
}

.kj-title-block {
  text-align: center;
  margin-bottom: 58px;
}

.kj-title-block h2 {
  margin: 22px 0 0;
  color: white;
  font-size: clamp(38px, 4vw, 56px);
  line-height: 1.12;
  font-weight: 1000;
}

.kj-title-block p {
  color: #98a6b8;
  font-size: 19px;
  margin: 22px 0 0;
}

.core-section {
  padding-top: 64px;
  padding-bottom: 96px;
}

.core-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 26px;
}

.core-card {
  min-height: 270px;
  border: 1px solid var(--home-border);
  background: rgba(15, 23, 42, .62);
  border-radius: 16px;
  padding: 34px 32px;
  backdrop-filter: blur(18px);
  box-shadow: 0 22px 70px rgba(0,0,0,.18);
}

.core-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  margin-bottom: 24px;
  font-size: 26px;
  font-weight: 900;
}

.core-icon.green { color: #00e0d1; background: rgba(0,224,209,.12); }
.core-icon.blue { color: #17c9ff; background: rgba(23,201,255,.12); }
.core-icon.purple { color: #a78bfa; background: rgba(139,92,246,.18); }
.core-icon.orange { color: #fbbf24; background: rgba(245,158,11,.15); }

.core-card h3 {
  color: white;
  margin: 0 0 16px;
  font-size: 23px;
}

.core-card p {
  margin: 0;
  color: #98a6b8;
  line-height: 1.65;
  font-size: 15px;
}

.feature-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 72px;
  padding-bottom: 72px;
}

.feature-grid {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(470px, 1fr) minmax(470px, 1fr);
  gap: clamp(48px, 7vw, 82px);
  align-items: center;
}

.browser-window {
  border: 1px solid rgba(148, 163, 184, .23);
  border-radius: 16px;
  background: rgba(21, 31, 49, .88);
  box-shadow: 0 28px 90px rgba(0,0,0,.32);
  overflow: hidden;
}

.window-bar {
  height: 42px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 18px;
  border-bottom: 1px solid rgba(148, 163, 184, .13);
  color: #6f7d91;
  font-size: 13px;
}

.window-body {
  padding: 18px;
}

.ai-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.ai-img {
  height: 330px;
  border-radius: 12px;
  border: 1px solid rgba(148,163,184,.14);
  background:
    linear-gradient(135deg, rgba(255,255,255,.04), rgba(255,255,255,.01)),
    radial-gradient(circle at 45% 35%, rgba(0,224,209,.12), transparent 26%);
  position: relative;
  overflow: hidden;
}

.ai-img::before {
  content: "AI生成电商产品图";
  position: absolute;
  left: 0;
  top: 0;
  color: #ffffff;
  font-weight: 800;
  padding: 8px;
}

.ai-prompt {
  margin: 14px 0;
  height: 38px;
  border-radius: 8px;
  border: 1px solid rgba(148,163,184,.12);
  background: rgba(255,255,255,.04);
  display: flex;
  align-items: center;
  padding: 0 16px;
  color: #7f8ea3;
  font-size: 13px;
}

.ai-small-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.ai-small {
  height: 270px;
  border-radius: 10px;
  border: 1px solid rgba(148,163,184,.12);
  background:
    linear-gradient(135deg, rgba(255,255,255,.035), rgba(255,255,255,.01)),
    radial-gradient(circle at 40% 38%, rgba(139,92,246,.12), transparent 26%);
  position: relative;
}

.ai-small::before {
  content: "AI生成电商产品图";
  position: absolute;
  left: 0;
  top: 0;
  color: #ffffff;
  font-weight: 800;
  padding: 6px;
  font-size: 14px;
}

.section-copy h2 {
  margin: 18px 0 0;
  color: #fff;
  font-size: clamp(38px, 4vw, 52px);
  line-height: 1.14;
  font-weight: 1000;
}

.section-copy .sub {
  display: block;
  color: rgba(255,255,255,.58);
  font-weight: 900;
  margin-top: 4px;
}

.section-copy p.main-desc {
  color: #9aa8bb;
  font-size: 16px;
  line-height: 1.85;
  margin: 24px 0 0;
}

.copy-list {
  display: grid;
  gap: 24px;
  margin: 34px 0 0;
}

.copy-item {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 16px;
  align-items: start;
}

.copy-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-weight: 900;
}

.copy-icon.cyan { color: #00e0d1; background: rgba(0,224,209,.10); }
.copy-icon.purple { color: #a78bfa; background: rgba(139,92,246,.16); }
.copy-icon.orange { color: #fbbf24; background: rgba(245,158,11,.13); }

.copy-item b {
  color: white;
  font-size: 18px;
  display: block;
  margin-bottom: 8px;
}

.copy-item span {
  color: #7f8ea3;
  line-height: 1.55;
}

.video-window .video-screen {
  height: 380px;
  border-radius: 10px;
  background: #000;
}

.video-prompt {
  margin: 16px 0;
  min-height: 40px;
  border-radius: 8px;
  border: 1px solid rgba(148,163,184,.13);
  background: rgba(255,255,255,.04);
  color: #7f8ea3;
  display: flex;
  align-items: center;
  padding: 0 14px;
  font-size: 13px;
}

.video-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.video-tag {
  height: 28px;
  padding: 0 12px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 800;
  background: rgba(0,224,209,.11);
  color: #00e0d1;
}

.video-tag.orange {
  background: rgba(245,158,11,.12);
  color: #fbbf24;
}

.shots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 16px;
}

.shot {
  height: 160px;
  border: 1px solid rgba(148,163,184,.12);
  border-radius: 10px;
  background: rgba(255,255,255,.04);
  display: grid;
  place-items: center;
  color: #64748b;
}

.data-window .bar-chart {
  height: 128px;
}

.why-section {
  padding-top: 70px;
  padding-bottom: 96px;
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.why-card {
  min-height: 200px;
  border-radius: 16px;
  border: 1px solid rgba(148,163,184,.16);
  background: rgba(15,23,42,.50);
  padding: 34px 32px;
  text-align: center;
}

.why-icon {
  width: 58px;
  height: 58px;
  margin: 0 auto 24px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #00e0d1;
  background: rgba(0,224,209,.10);
  font-size: 26px;
}

.why-card h3 {
  color: white;
  margin: 0 0 18px;
  font-size: 22px;
}

.why-card p {
  color: #9aa8bb;
  margin: 0;
}

.cta-section {
  padding-top: 42px;
  padding-bottom: 112px;
}

.cta-box {
  min-height: 340px;
  border-radius: 24px;
  border: 1px solid rgba(148,163,184,.18);
  background:
    radial-gradient(circle at 12% 10%, rgba(0,224,209,.12), transparent 38%),
    radial-gradient(circle at 86% 80%, rgba(139,92,246,.18), transparent 36%),
    linear-gradient(135deg, rgba(0,224,209,.09), rgba(139,92,246,.10));
  display: grid;
  place-items: center;
  text-align: center;
  padding: 42px 24px;
}

.cta-box h2 {
  color: white;
  font-size: 38px;
  margin: 0 0 18px;
}

.cta-box p {
  color: #c4cedc;
  font-size: 18px;
  margin: 0 0 34px;
}

.footer {
  min-height: 126px;
  border-top: 1px solid rgba(148,163,184,.10);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  color: #5f6d82;
  padding: 0 clamp(42px, 10vw, 176px);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #f8fafc;
  font-weight: 900;
}

.footer-logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #00e0d1, #22c8ff);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.footer-links a {
  color: #65758c;
}

.footer-copy {
  text-align: right;
  color: #46566d;
}

.chat-float {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #a7fff6;
  background: rgba(0,224,209,.12);
  border: 1px solid rgba(0,224,209,.38);
  z-index: 70;
}

.side-rail { display: none !important; }
.main { margin-left: 0 !important; }

@media (max-width: 1180px) {
  .top-global { padding: 0 26px !important; }
  .top-nav { gap: 18px !important; margin-left: 24px !important; }
  .core-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .kj-section { padding-left: 22px; padding-right: 22px; }
  .kj-hero h1 { font-size: 42px; }
  .core-grid, .why-grid { grid-template-columns: 1fr; }
  .ai-grid, .ai-small-grid, .shots { grid-template-columns: 1fr; }
  .footer { grid-template-columns: 1fr; padding: 28px 22px; text-align: left; }
  .footer-copy { text-align: left; }
  .footer-links { flex-wrap: wrap; gap: 14px; }
}

/* ---- interaction fix: dropdown and sidebar delayed close ---- */

/* Keep dropdown open when JS adds .open; keep same visual style as :hover */
.nav-dropdown {
  position: relative;
}

/* Invisible bridge between the menu button and the dropdown panel, preventing hover gaps */
.nav-dropdown::after {
  content: "";
  position: absolute;
  left: -12px;
  right: -12px;
  top: 100%;
  height: 18px;
  display: block;
}

.nav-dropdown.open .nav-menu {
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: translate(-50%, 0) !important;
}

.nav-dropdown.open .nav-trigger {
  color: #ffffff !important;
}

.nav-dropdown.open .nav-trigger .arrow {
  transform: rotate(180deg);
}

/* Sidebar delayed close support. Same visual state as hover, controlled by JS class. */
.side-rail.open {
  width: 306px !important;
}

.side-rail.open .rail-inner {
  opacity: 1 !important;
  transform: translateX(0) !important;
  pointer-events: auto !important;
}

.side-rail.open .rail-tip {
  opacity: 0 !important;
  transform: translateX(-12px) !important;
  pointer-events: none !important;
}

/* Make the hover area easier to keep without changing the visible layout */
.side-rail::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 28px;
  bottom: 0;
  display: block;
}

/* ---- v6: sales-data and financial pages exact layout ---- */

/* sales-data original-like light page */
.sales-page-light {
  min-height: calc(100vh - 70px);
  background:
    radial-gradient(circle at 50% 18%, rgba(16,185,129,.20), transparent 34%),
    linear-gradient(180deg, #ecfdf5 0%, #f8fafc 58%, #f8fafc 100%);
  color: #0f172a;
  padding: 76px clamp(24px, 8vw, 160px) 90px;
}

.sales-hero {
  text-align: center;
  margin-bottom: 42px;
}

.sales-icon {
  width: 66px;
  height: 66px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  color: white;
  font-size: 30px;
  background: linear-gradient(135deg, #10b981, #06b6d4);
  box-shadow: 0 18px 45px rgba(16,185,129,.25);
}

.sales-hero h1 {
  margin: 0;
  font-size: 38px;
  font-weight: 1000;
  color: #1f2937;
  letter-spacing: -1px;
}

.sales-hero p {
  margin: 12px 0 0;
  color: #64748b;
  font-size: 17px;
}

.sales-upload-card {
  max-width: 1050px;
  margin: 0 auto;
  border-radius: 22px;
  background: rgba(255,255,255,.88);
  border: 1px solid rgba(148,163,184,.22);
  box-shadow: 0 28px 80px rgba(15,23,42,.10);
  padding: 34px;
  backdrop-filter: blur(18px);
}

.sales-upload-card h2 {
  margin: 0 0 10px;
  font-size: 24px;
  color: #1f2937;
}

.sales-upload-card .sales-sub {
  margin: 0 0 24px;
  color: #64748b;
  line-height: 1.7;
}

.region-upload-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.region-title {
  display: block;
  margin: 0 0 10px;
  font-weight: 900;
  color: #334155;
}

.region-drop {
  height: 150px;
  border: 2px dashed #cbd5e1;
  border-radius: 16px;
  background: rgba(248,250,252,.82);
  display: grid;
  place-items: center;
  text-align: center;
  cursor: pointer;
  transition: .18s ease;
}

.region-drop:hover {
  border-color: #10b981;
  background: rgba(236,253,245,.95);
}

.region-drop input { display: none; }

.upload-arrow {
  font-size: 42px;
  color: #475569;
  line-height: 1;
  margin-bottom: 10px;
}

.region-main {
  color: #334155;
  font-weight: 800;
  margin-bottom: 5px;
}

.region-hint {
  color: #64748b;
  font-size: 13px;
}

.region-file-name {
  margin-top: 8px;
  color: #059669;
  font-size: 12px;
  word-break: break-all;
}

.sales-instruction {
  margin-top: 26px;
  border-radius: 14px;
  background: rgba(224,242,254,.78);
  border: 1px solid rgba(14,165,233,.18);
  padding: 18px 20px;
  color: #334155;
  line-height: 1.75;
  font-size: 14px;
}

.sales-instruction b {
  color: #1f2937;
}

.sales-actions {
  display: flex;
  justify-content: center;
  margin-top: 22px;
}

.sales-analysis-result {
  display: none;
  max-width: 1050px;
  margin: 24px auto 0;
  border-radius: 18px;
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(148,163,184,.22);
  box-shadow: 0 18px 50px rgba(15,23,42,.08);
  padding: 22px;
  color: #334155;
}

.sales-analysis-result.show {
  display: block;
}

/* financial home original-like layout */
.fin-page {
  min-height: calc(100vh - 70px);
  background: #f6f8fb;
  color: #0f172a;
  display: grid;
  grid-template-columns: 250px 1fr;
}

.fin-side {
  min-height: calc(100vh - 70px);
  border-right: 1px solid #e2e8f0;
  background: rgba(255,255,255,.80);
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
}

.fin-brand {
  height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #64748b;
  margin-bottom: 12px;
}

.fin-brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: white;
  background: #0f766e;
  font-weight: 900;
}

.fin-menu {
  display: grid;
  gap: 6px;
}

.fin-menu a {
  height: 42px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 10px;
  padding: 0 12px;
  color: #475569;
  font-weight: 700;
  font-size: 14px;
}

.fin-menu a.active,
.fin-menu a:hover {
  background: #d1fae5;
  color: #059669;
}

.fin-setting {
  margin-top: auto;
}

.fin-main {
  padding: 34px clamp(26px, 6vw, 82px) 70px;
}

.fin-hero-card {
  max-width: 980px;
  margin: 0 auto 34px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 26% 40%, rgba(16,185,129,.18), transparent 36%),
    linear-gradient(135deg, rgba(236,253,245,.95), rgba(240,253,250,.78));
  border: 1px solid rgba(16,185,129,.16);
  padding: 56px 62px;
  box-shadow: 0 24px 80px rgba(15,23,42,.08);
}

.fin-hero-card h1 {
  margin: 0;
  font-size: 44px;
  line-height: 1.12;
  color: #1f2937;
  font-weight: 1000;
}

.fin-hero-card h1 span {
  display: block;
  color: #10b981;
}

.fin-hero-card p {
  max-width: 720px;
  margin: 18px 0 0;
  color: #64748b;
  line-height: 1.8;
  font-size: 16px;
}

.fin-hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.fin-btn {
  height: 42px;
  padding: 0 18px;
  border-radius: 9px;
  border: 0;
  background: #10b981;
  color: white;
  font-weight: 900;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.fin-btn:hover { filter: brightness(.98); }

.fin-btn.ghost {
  background: transparent;
  color: #334155;
  border: 1px solid transparent;
}

.fin-feature-grid {
  max-width: 980px;
  margin: 0 auto 28px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.fin-feature-card {
  border-radius: 16px;
  background: rgba(255,255,255,.86);
  border: 1px solid #e2e8f0;
  box-shadow: 0 16px 45px rgba(15,23,42,.06);
  padding: 26px;
  min-height: 166px;
}

.fin-feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 22px;
  margin-bottom: 18px;
}

.fin-feature-icon.blue { color: #2563eb; background: #dbeafe; }
.fin-feature-icon.green { color: #10b981; background: #d1fae5; }
.fin-feature-icon.purple { color: #8b5cf6; background: #ede9fe; }

.fin-feature-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
  color: #334155;
}

.fin-feature-card p {
  margin: 0;
  color: #64748b;
  line-height: 1.65;
  font-size: 14px;
}

.fin-upload-panel {
  max-width: 980px;
  margin: 0 auto;
  border-radius: 18px;
  background: rgba(255,255,255,.88);
  border: 1px solid #e2e8f0;
  box-shadow: 0 16px 45px rgba(15,23,42,.06);
  padding: 26px;
  display: none;
}

.fin-upload-panel.show {
  display: block;
}

.fin-upload-panel h2 {
  margin: 0 0 16px;
  color: #1f2937;
}

.fin-upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.fin-result-box {
  min-height: 230px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  padding: 18px;
  color: #334155;
  line-height: 1.8;
}

.fin-file-box {
  border: 2px dashed #cbd5e1;
  border-radius: 16px;
  background: #f8fafc;
  padding: 28px;
  text-align: center;
}

.fin-file-box input {
  display: none;
}

.fin-textarea {
  min-height: 132px;
  margin-top: 14px;
}

@media (max-width: 1024px) {
  .region-upload-grid,
  .fin-feature-grid,
  .fin-upload-grid {
    grid-template-columns: 1fr;
  }

  .fin-page {
    grid-template-columns: 1fr;
  }

  .fin-side {
    min-height: auto;
  }
}

@media (max-width: 720px) {
  .sales-page-light {
    padding: 46px 18px;
  }

  .sales-upload-card {
    padding: 22px;
  }

  .fin-main {
    padding: 22px 18px 46px;
  }

  .fin-hero-card {
    padding: 34px 24px;
  }

  .fin-hero-card h1 {
    font-size: 34px;
  }
}

/* ---- v7: ecom-generator original-like page ---- */
.ecom-page {
  min-height: calc(100vh - 70px);
  background:
    radial-gradient(circle at 16% 8%, rgba(16,185,129,.16), transparent 26%),
    radial-gradient(circle at 88% 16%, rgba(59,130,246,.12), transparent 28%),
    linear-gradient(135deg, #e8fbf5 0%, #eff7ff 56%, #eef4ff 100%);
  color: #0f172a;
  padding: 34px clamp(24px, 10vw, 168px) 90px;
}

html.dark .ecom-page {
  background:
    radial-gradient(circle at 16% 8%, rgba(16,185,129,.16), transparent 26%),
    radial-gradient(circle at 88% 16%, rgba(59,130,246,.16), transparent 28%),
    linear-gradient(135deg, #071a1a 0%, #071424 56%, #0b1220 100%);
  color: #e5edf8;
}

.ecom-top-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 34px;
}

.ecom-kicker {
  color: #00b894;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 9px;
  margin-bottom: 4px;
}

.ecom-title {
  margin: 0;
  color: #0f172a;
  font-size: 38px;
  font-weight: 1000;
  letter-spacing: -1px;
}

html.dark .ecom-title {
  color: #f8fafc;
}

.ecom-hero-copy {
  margin-top: 54px;
}

.ecom-sub-kicker {
  color: #00b894;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 9px;
  margin-bottom: 18px;
}

.ecom-headline {
  margin: 0;
  color: #0f172a;
  font-size: 34px;
  line-height: 1.25;
  font-weight: 1000;
}

html.dark .ecom-headline {
  color: #f8fafc;
}

.ecom-desc {
  max-width: 980px;
  margin: 22px 0 0;
  color: #40516a;
  font-size: 18px;
  line-height: 1.9;
}

html.dark .ecom-desc {
  color: #a8b5c7;
}

.ecom-platform {
  margin-top: 22px;
  color: #334155;
  font-size: 14px;
}

html.dark .ecom-platform {
  color: #94a3b8;
}

.ecom-reset-btn {
  height: 42px;
  border: 1px solid #dbe5ef;
  background: rgba(255,255,255,.82);
  color: #334155;
  border-radius: 12px;
  padding: 0 18px;
  cursor: pointer;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(15,23,42,.08);
}

html.dark .ecom-reset-btn {
  background: rgba(15,23,42,.72);
  color: #e5edf8;
  border-color: rgba(148,163,184,.25);
}

.ecom-workspace {
  margin-top: 42px;
  border-radius: 18px;
  background: rgba(255,255,255,.86);
  border: 1px solid rgba(203,213,225,.78);
  box-shadow: 0 24px 70px rgba(15,23,42,.10);
  padding: 32px;
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 34px;
}

html.dark .ecom-workspace {
  background: rgba(15,23,42,.82);
  border-color: rgba(148,163,184,.20);
}

.ecom-panel h2,
.ecom-card h2 {
  margin: 0 0 12px;
  font-size: 20px;
  color: #0f172a;
  font-weight: 1000;
}

html.dark .ecom-panel h2,
html.dark .ecom-card h2 {
  color: #f8fafc;
}

.ecom-panel h2 span {
  color: #00b894;
  margin-right: 8px;
}

.ecom-small-note {
  color: #475569;
  font-size: 13px;
  line-height: 1.55;
  margin-bottom: 26px;
}

html.dark .ecom-small-note {
  color: #94a3b8;
}

.ecom-upload-box {
  height: 104px;
  border: 1.5px dashed #cbd5e1;
  border-radius: 14px;
  background: rgba(248,250,252,.9);
  display: grid;
  place-items: center;
  text-align: center;
  cursor: pointer;
  margin-bottom: 26px;
}

html.dark .ecom-upload-box {
  background: rgba(2,6,23,.32);
  border-color: rgba(148,163,184,.24);
}

.ecom-upload-box:hover {
  border-color: #00b894;
  background: rgba(236,253,245,.88);
}

html.dark .ecom-upload-box:hover {
  background: rgba(0,184,148,.08);
}

.ecom-upload-icon {
  font-size: 30px;
  color: #00b894;
  line-height: 1;
}

.ecom-upload-title {
  margin-top: 9px;
  color: #334155;
  font-size: 14px;
}

html.dark .ecom-upload-title {
  color: #e5edf8;
}

.ecom-upload-hint {
  color: #64748b;
  font-size: 12px;
  margin-top: 3px;
}

.ecom-file-name {
  color: #00a982;
  font-size: 12px;
  margin-top: 6px;
  max-width: 320px;
  word-break: break-all;
}

.ecom-form-block {
  margin-bottom: 20px;
}

.ecom-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 9px;
}

.ecom-label {
  color: #334155;
  font-size: 14px;
  font-weight: 800;
}

html.dark .ecom-label {
  color: #dbeafe;
}

.ecom-sensitive {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #334155;
  font-size: 13px;
}

.ecom-switch {
  width: 36px;
  height: 20px;
  border-radius: 999px;
  background: #10b981;
  position: relative;
}

.ecom-switch::after {
  content: "";
  position: absolute;
  right: 2px;
  top: 2px;
  width: 16px;
  height: 16px;
  background: white;
  border-radius: 999px;
}

.ecom-input,
.ecom-select,
.ecom-textarea {
  width: 100%;
  border: 1px solid #dbe5ef;
  background: rgba(255,255,255,.92);
  border-radius: 13px;
  padding: 12px 14px;
  font-size: 14px;
  color: #0f172a;
  outline: none;
}

html.dark .ecom-input,
html.dark .ecom-select,
html.dark .ecom-textarea {
  background: rgba(2,6,23,.32);
  border-color: rgba(148,163,184,.23);
  color: #f8fafc;
}

.ecom-textarea {
  min-height: 84px;
  resize: vertical;
}

.ecom-help {
  color: #64748b;
  font-size: 12px;
  line-height: 1.6;
  margin-top: 8px;
}

.ecom-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.ecom-type-switch {
  display: inline-flex;
  padding: 4px;
  background: rgba(241,245,249,.9);
  border: 1px solid #dbe5ef;
  border-radius: 14px;
  gap: 4px;
}

html.dark .ecom-type-switch {
  background: rgba(2,6,23,.30);
  border-color: rgba(148,163,184,.22);
}

.ecom-type-btn {
  border: 0;
  min-width: 62px;
  height: 34px;
  border-radius: 10px;
  background: transparent;
  color: #334155;
  font-weight: 900;
  cursor: pointer;
}

html.dark .ecom-type-btn {
  color: #cbd5e1;
}

.ecom-type-btn.active {
  color: white;
  background: linear-gradient(135deg, #00c2aa, #3b82f6);
}

.ecom-cost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 178px;
  height: 42px;
  border-radius: 12px;
  background: rgba(209,250,229,.72);
  border: 1px solid rgba(16,185,129,.24);
  color: #047857;
  font-size: 14px;
  margin-bottom: 14px;
}

.ecom-limit {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  color: #047857;
  font-size: 13px;
  margin: 12px 0 24px;
  line-height: 1.65;
}

.ecom-generate-btn {
  width: 100%;
  height: 46px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #0fbea8, #4b8deb);
  color: white;
  font-weight: 1000;
  cursor: pointer;
  box-shadow: 0 18px 48px rgba(15,190,168,.22);
}

.ecom-right {
  display: grid;
  gap: 26px;
}

.ecom-card {
  background: rgba(255,255,255,.76);
  border: 1px solid rgba(203,213,225,.78);
  border-radius: 18px;
  padding: 26px;
}

html.dark .ecom-card {
  background: rgba(2,6,23,.22);
  border-color: rgba(148,163,184,.20);
}

.ecom-copy-box {
  height: 198px;
  border: 1px solid #dbe5ef;
  background: rgba(255,255,255,.88);
  border-radius: 16px;
  padding: 16px;
  color: #334155;
  font-size: 14px;
  line-height: 1.7;
}

html.dark .ecom-copy-box {
  background: rgba(2,6,23,.30);
  border-color: rgba(148,163,184,.22);
  color: #cbd5e1;
}

.ecom-action-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 16px;
}

.ecom-confirm-btn {
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(16,185,129,.25);
  background: rgba(209,250,229,.50);
  color: #10b981;
  font-weight: 900;
  cursor: pointer;
}

.ecom-create-btn {
  height: 42px;
  border-radius: 12px;
  border: 0;
  background: linear-gradient(135deg, #10b981, #3b82f6);
  color: white;
  font-weight: 900;
  cursor: pointer;
}

.ecom-result-box {
  min-height: 166px;
  border: 1px solid #dbe5ef;
  border-radius: 16px;
  background: rgba(255,255,255,.62);
  display: grid;
  place-items: center;
  color: #334155;
  text-align: center;
  padding: 20px;
}

html.dark .ecom-result-box {
  background: rgba(2,6,23,.24);
  border-color: rgba(148,163,184,.20);
  color: #cbd5e1;
}

.ecom-download-btn {
  float: right;
  height: 34px;
  border: 1px solid #e2e8f0;
  background: rgba(255,255,255,.75);
  color: #cbd5e1;
  border-radius: 11px;
  padding: 0 14px;
}

.ecom-info-section {
  padding: 72px clamp(24px, 10vw, 168px) 10px;
}

.ecom-info-section h2 {
  margin: 0 0 22px;
  font-size: 26px;
  color: #0f172a;
}

html.dark .ecom-info-section h2 {
  color: #f8fafc;
}

.ecom-info-section p {
  max-width: 1120px;
  color: #334155;
  font-size: 17px;
  line-height: 1.9;
}

html.dark .ecom-info-section p {
  color: #a8b5c7;
}

.ecom-pro-section {
  padding: 62px clamp(24px, 10vw, 168px) 72px;
}

.ecom-pro-section h2 {
  margin: 0 0 30px;
  font-size: 28px;
}

.ecom-pro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px 64px;
}

.ecom-pro-item h3 {
  margin: 0 0 10px;
  font-size: 18px;
  color: #0f172a;
}

html.dark .ecom-pro-item h3 {
  color: #f8fafc;
}

.ecom-pro-item p {
  margin: 0;
  color: #334155;
  line-height: 1.7;
}

html.dark .ecom-pro-item p {
  color: #a8b5c7;
}

.ecom-final-section {
  padding: 12px clamp(24px, 10vw, 168px) 90px;
}

.ecom-final-section h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.ecom-final-section p {
  color: #334155;
}

html.dark .ecom-final-section p {
  color: #a8b5c7;
}

.ecom-chat-float {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: white;
  background: rgba(45,212,191,.50);
  box-shadow: 0 16px 40px rgba(20,184,166,.25);
  z-index: 70;
}

@media (max-width: 1180px) {
  .ecom-workspace {
    grid-template-columns: 1fr;
  }

  .ecom-page {
    padding-left: 28px;
    padding-right: 28px;
  }
}

@media (max-width: 720px) {
  .ecom-page,
  .ecom-info-section,
  .ecom-pro-section,
  .ecom-final-section {
    padding-left: 18px;
    padding-right: 18px;
  }

  .ecom-title {
    font-size: 30px;
  }

  .ecom-headline {
    font-size: 26px;
  }

  .ecom-workspace {
    padding: 20px;
  }

  .ecom-two-col,
  .ecom-action-row,
  .ecom-pro-grid {
    grid-template-columns: 1fr;
  }
}

/* ---- v9: image-translator original-like page ---- */
.translator-page {
  min-height: calc(100vh - 70px);
  background:
    radial-gradient(circle at 12% 10%, rgba(16,185,129,.10), transparent 28%),
    radial-gradient(circle at 86% 18%, rgba(59,130,246,.08), transparent 28%),
    linear-gradient(135deg, #eef7f4 0%, #edf7fb 55%, #eff4ff 100%);
  padding: 32px clamp(20px, 6vw, 136px) 72px;
  color: #0f172a;
}

html.dark .translator-page {
  background:
    radial-gradient(circle at 12% 10%, rgba(16,185,129,.12), transparent 28%),
    radial-gradient(circle at 86% 18%, rgba(59,130,246,.10), transparent 28%),
    linear-gradient(135deg, #08191b 0%, #0a1824 55%, #10182a 100%);
  color: #e2e8f0;
}

.translator-top-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 10px;
}

.translator-kicker {
  color: #0fb99a;
  font-size: 15px;
  letter-spacing: 6px;
  margin-bottom: 2px;
}

.translator-main-title {
  margin: 0;
  font-size: 54px;
  line-height: 1.08;
  font-weight: 1000;
  color: #111827;
}

html.dark .translator-main-title {
  color: #f8fafc;
}

.translator-reset-btn {
  flex: 0 0 auto;
  margin-top: 2px;
  height: 44px;
  padding: 0 18px;
  border-radius: 14px;
  border: 1px solid rgba(203,213,225,.92);
  background: rgba(255,255,255,.9);
  color: #475569;
  box-shadow: 0 8px 28px rgba(15,23,42,.06);
}

html.dark .translator-reset-btn {
  background: rgba(15,23,42,.84);
  border-color: rgba(148,163,184,.18);
  color: #cbd5e1;
}

.translator-hero-copy {
  margin-top: 48px;
  margin-bottom: 34px;
  max-width: 1060px;
}

.translator-sub-kicker {
  color: #10b981;
  font-size: 16px;
  letter-spacing: 10px;
  font-weight: 800;
  margin-bottom: 14px;
}

.translator-headline {
  margin: 0 0 18px;
  font-size: clamp(38px, 4.2vw, 64px);
  line-height: 1.18;
  font-weight: 1000;
  color: #111827;
}

html.dark .translator-headline {
  color: #f8fafc;
}

.translator-desc {
  margin: 0;
  font-size: 18px;
  line-height: 1.8;
  color: #475569;
}

html.dark .translator-desc {
  color: #94a3b8;
}

.translator-platform {
  margin-top: 18px;
  color: #64748b;
  font-size: 16px;
}

html.dark .translator-platform {
  color: #94a3b8;
}

.translator-workspace {
  display: grid;
  grid-template-columns: minmax(360px, 420px) 1fr;
  gap: 28px;
  border-radius: 24px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(226,232,240,.96);
  box-shadow: 0 16px 46px rgba(15,23,42,.06);
  padding: 32px;
}

html.dark .translator-workspace {
  background: rgba(255,255,255,.56);
  border-color: rgba(226,232,240,.82);
}

.translator-panel,
.translator-result-card {
  border-radius: 22px;
  background: rgba(255,255,255,.58);
  border: 1px solid rgba(226,232,240,.88);
  padding: 22px 22px 20px;
}

html.dark .translator-panel,
html.dark .translator-result-card {
  background: rgba(2,6,23,.18);
  border-color: rgba(148,163,184,.14);
}

.translator-panel h2,
.translator-result-card h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 1000;
  color: #0f172a;
}

html.dark .translator-panel h2,
html.dark .translator-result-card h2 {
  color: #f8fafc;
}

.translator-panel-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.translator-panel-title .icon {
  color: #10b981;
  font-size: 24px;
}

.translator-mini-note {
  margin-bottom: 18px;
  color: #475569;
  font-size: 14px;
  line-height: 1.7;
}

html.dark .translator-mini-note {
  color: #94a3b8;
}

.translator-upload-box {
  border: 1.5px dashed rgba(203,213,225,.92);
  border-radius: 18px;
  background: rgba(255,255,255,.58);
  padding: 18px;
  text-align: center;
  cursor: pointer;
  margin-bottom: 26px;
}

html.dark .translator-upload-box {
  background: rgba(2,6,23,.18);
  border-color: rgba(148,163,184,.20);
}

.translator-upload-box:hover {
  border-color: rgba(16,185,129,.65);
  background: rgba(240,253,250,.75);
}

html.dark .translator-upload-box:hover {
  background: rgba(16,185,129,.08);
}

.translator-upload-icon {
  font-size: 32px;
  color: #10b981;
  margin-bottom: 10px;
}

.translator-upload-main {
  font-size: 15px;
  color: #0f172a;
  font-weight: 700;
}

html.dark .translator-upload-main {
  color: #f8fafc;
}

.translator-upload-hint {
  margin-top: 6px;
  color: #64748b;
  line-height: 1.65;
  font-size: 14px;
}

.translator-field {
  margin-bottom: 18px;
}

.translator-field.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.translator-label {
  display: block;
  margin-bottom: 8px;
  color: #334155;
  font-size: 15px;
  font-weight: 800;
}

html.dark .translator-label {
  color: #cbd5e1;
}

.translator-label .required {
  color: #ef4444;
}

.translator-input,
.translator-select,
.translator-textarea {
  width: 100%;
  height: 48px;
  border: 1px solid #d7e0eb;
  border-radius: 14px;
  background: rgba(255,255,255,.82);
  color: #0f172a;
  padding: 0 14px;
  font-size: 15px;
  outline: none;
}

html.dark .translator-input,
html.dark .translator-select,
html.dark .translator-textarea {
  background: rgba(2,6,23,.24);
  border-color: rgba(148,163,184,.18);
  color: #f8fafc;
}

.translator-textarea {
  min-height: 110px;
  resize: vertical;
  padding: 14px;
}

.translator-points {
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(16,185,129,.18);
  background: rgba(220,252,231,.44);
  color: #047857;
  display: flex;
  align-items: center;
  padding: 0 14px;
  margin: 12px 0 26px;
  font-size: 15px;
}

.translator-btn {
  width: 100%;
  height: 52px;
  border: 0;
  border-radius: 16px;
  color: white;
  font-size: 18px;
  font-weight: 900;
  background: linear-gradient(90deg, #12c7a2 0%, #3b82f6 100%);
  box-shadow: 0 20px 36px rgba(34,197,94,.18);
  cursor: pointer;
}

.translator-result-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.translator-result-sub {
  color: #64748b;
  margin-top: 4px;
  font-size: 14px;
}

html.dark .translator-result-sub {
  color: #94a3b8;
}

.translator-download-btn {
  flex: 0 0 auto;
  height: 38px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid rgba(226,232,240,.9);
  background: rgba(255,255,255,.75);
  color: #c0c8d2;
}

html.dark .translator-download-btn {
  background: rgba(2,6,23,.20);
  border-color: rgba(148,163,184,.14);
  color: #64748b;
}

.translator-result-box {
  min-height: 520px;
  border-radius: 20px;
  border: 1px solid rgba(226,232,240,.86);
  background: rgba(255,255,255,.54);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-size: 28px;
  text-align: center;
  padding: 20px;
}

html.dark .translator-result-box {
  background: rgba(2,6,23,.16);
  border-color: rgba(148,163,184,.14);
  color: #94a3b8;
}

.translator-chat-float {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(180, 244, 235, .92);
  color: white;
  box-shadow: 0 14px 36px rgba(20,184,166,.18);
  z-index: 50;
}

@media (max-width: 1200px) {
  .translator-workspace {
    grid-template-columns: 1fr;
  }
  .translator-result-box {
    min-height: 360px;
  }
}

@media (max-width: 720px) {
  .translator-page {
    padding: 22px 16px 60px;
  }
  .translator-top-row {
    flex-direction: column;
    align-items: stretch;
  }
  .translator-main-title {
    font-size: 38px;
  }
  .translator-headline {
    font-size: 30px;
  }
  .translator-workspace {
    padding: 18px;
  }
  .translator-field.two-col {
    grid-template-columns: 1fr;
  }
}



/* ---- v10: image-cutout original-like page ---- */
.cutout-page {
  min-height: calc(100vh - 70px);
  background:
    radial-gradient(circle at 12% 10%, rgba(16,185,129,.10), transparent 28%),
    radial-gradient(circle at 88% 12%, rgba(59,130,246,.08), transparent 30%),
    linear-gradient(135deg, #eef8f4 0%, #eef7fb 58%, #eef3ff 100%);
  padding: 42px clamp(18px, 4vw, 56px) 80px;
}
html.dark .cutout-page {
  background:
    radial-gradient(circle at 12% 10%, rgba(16,185,129,.13), transparent 28%),
    radial-gradient(circle at 88% 12%, rgba(59,130,246,.12), transparent 30%),
    linear-gradient(135deg, #08191b 0%, #0a1824 58%, #10182a 100%);
}
.cutout-hero {
  max-width: 980px;
  margin: 0 auto 30px;
  text-align: center;
}
.cutout-title {
  margin: 0 0 16px;
  font-size: clamp(44px, 5vw, 64px);
  line-height: 1.12;
  font-weight: 1000;
  color: #111827;
}
html.dark .cutout-title { color:#f8fafc; }
.cutout-hero p {
  margin: 0 auto 8px;
  max-width: 980px;
  font-size: 17px;
  line-height: 1.8;
  color: #475569;
}
html.dark .cutout-hero p { color:#cbd5e1; }
.cutout-brand-highlight {
  color: #10b981;
  font-weight: 900;
}
.cutout-shell {
  max-width: 900px;
  margin: 0 auto;
  padding: 46px 46px 30px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(226,232,240,.96);
  border-radius: 24px;
  box-shadow: 0 18px 40px rgba(15,23,42,.06);
}
html.dark .cutout-shell {
  background: rgba(255,255,255,.58);
  border-color: rgba(226,232,240,.84);
}
.cutout-upload-zone {
  border: 2px dashed #d5dde8;
  border-radius: 24px;
  background: rgba(255,255,255,.46);
  min-height: 320px;
  padding: 42px 26px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
}
html.dark .cutout-upload-zone {
  background: rgba(255,255,255,.26);
  border-color: rgba(203,213,225,.65);
}
.cutout-upload-btn {
  min-width: 148px;
  height: 92px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(180deg, #11b47b 0%, #0aa96f 100%);
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  box-shadow: 0 12px 28px rgba(16,185,129,.18);
  cursor: pointer;
}
.cutout-upload-btn .icon { display:block; font-size:24px; margin-bottom:6px; }
.cutout-upload-help {
  margin-top: 26px;
  font-size: 17px;
  line-height: 1.8;
  color: #64748b;
}
.cutout-upload-meta {
  margin-top: 18px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap: 10px;
  color:#64748b;
  font-size: 16px;
}
.cutout-upload-meta .dot { opacity:.6; }
.cutout-file-name {
  margin-top: 14px;
  font-size: 14px;
  color: #64748b;
  word-break: break-all;
}
.cutout-section-title {
  margin: 34px 0 18px;
  display:flex;
  justify-content:center;
  align-items:center;
  gap: 12px;
  font-size: 18px;
  font-weight: 800;
  color: #334155;
}
html.dark .cutout-section-title { color:#e2e8f0; }
.cutout-points-btn {
  height: 32px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(16,185,129,.24);
  background: rgba(220,252,231,.5);
  color: #10b981;
  font-size: 14px;
  font-weight: 700;
}
.cutout-model-grid {
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.cutout-model-card {
  position: relative;
  display:flex;
  gap: 14px;
  align-items:flex-start;
  border-radius: 16px;
  border: 2px solid #d7e1ea;
  background: rgba(255,255,255,.55);
  padding: 18px 18px 14px;
  cursor: pointer;
  transition: all .2s ease;
}
.cutout-model-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(15,23,42,.06);
}
.cutout-model-card.active {
  border-color: #12b981;
  box-shadow: 0 10px 24px rgba(16,185,129,.09);
  background: rgba(236,253,245,.72);
}
.cutout-model-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display:grid;
  place-items:center;
  background: rgba(16,185,129,.10);
  color:#10b981;
  font-size: 20px;
  flex: 0 0 auto;
}
.cutout-model-name {
  font-size: 18px;
  font-weight: 900;
  color:#111827;
  margin-bottom: 6px;
}
html.dark .cutout-model-name { color:#f8fafc; }
.cutout-model-desc {
  font-size: 15px;
  line-height: 1.6;
  color:#475569;
}
html.dark .cutout-model-desc { color:#cbd5e1; }
.cutout-format-tag {
  display:inline-flex;
  margin-top: 10px;
  height: 26px;
  align-items:center;
  padding: 0 10px;
  border-radius: 8px;
  background: rgba(16,185,129,.10);
  color:#10b981;
  font-size: 13px;
  font-weight: 800;
}
.cutout-resolution-wrap {
  margin-top: 22px;
  text-align:center;
}
.cutout-resolution-label {
  margin-bottom: 12px;
  color:#334155;
  font-size: 18px;
  font-weight: 800;
}
html.dark .cutout-resolution-label { color:#e2e8f0; }
.cutout-resolution-group { display:flex; justify-content:center; gap:12px; }
.cutout-res-btn {
  width: 72px;
  height: 48px;
  border-radius: 12px;
  border: 2px solid #d7e1ea;
  background: rgba(255,255,255,.6);
  color:#475569;
  font-size: 22px;
  font-weight: 900;
  cursor: pointer;
}
.cutout-res-btn.active {
  border-color:#10b981;
  color:#10b981;
  background: rgba(236,253,245,.78);
}
.cutout-action-row {
  margin-top: 30px;
  display:flex;
  justify-content:center;
  gap: 14px;
}
.cutout-start-btn {
  min-width: 200px;
  height: 52px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(90deg, #12c7a2 0%, #3b82f6 100%);
  color: white;
  font-size: 18px;
  font-weight: 900;
  box-shadow: 0 20px 36px rgba(34,197,94,.18);
  cursor: pointer;
}
.cutout-reset-btn {
  min-width: 118px;
  height: 52px;
  border-radius: 16px;
  border:1px solid rgba(203,213,225,.92);
  background: rgba(255,255,255,.76);
  color:#475569;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
}
.cutout-result-card {
  max-width: 900px;
  margin: 20px auto 0;
  padding: 22px;
  border-radius: 22px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(226,232,240,.96);
  box-shadow: 0 16px 36px rgba(15,23,42,.05);
}
.cutout-result-card h3 {
  margin:0 0 12px;
  font-size: 24px;
  font-weight: 900;
  color:#111827;
}
html.dark .cutout-result-card h3 { color:#f8fafc; }
.cutout-result-content {
  min-height: 150px;
  border: 1px solid rgba(226,232,240,.92);
  border-radius: 18px;
  background: rgba(255,255,255,.55);
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding: 22px;
  color:#64748b;
  line-height:1.8;
}
html.dark .cutout-result-content {
  background: rgba(2,6,23,.15);
  border-color: rgba(148,163,184,.16);
  color:#cbd5e1;
}
.cutout-chat-float {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(180,244,235,.92);
  color: white;
  box-shadow: 0 14px 36px rgba(20,184,166,.18);
  z-index: 50;
}
@media (max-width: 860px) {
  .cutout-shell { padding: 24px 18px; }
  .cutout-model-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .cutout-page { padding: 24px 14px 70px; }
  .cutout-title { font-size: 36px; }
  .cutout-upload-zone { min-height: 260px; padding: 28px 16px; }
  .cutout-action-row { flex-direction: column; }
  .cutout-start-btn, .cutout-reset-btn { width: 100%; }
}


/* ---- v11: size-editor original-like page ---- */
.size-editor-page {
  min-height: calc(100vh - 70px);
  background:
    radial-gradient(circle at 12% 8%, rgba(16,185,129,.08), transparent 26%),
    linear-gradient(180deg, #edf8f3 0%, #edf6fb 46%, #eef3fb 100%);
}
html.dark .size-editor-page {
  background:
    radial-gradient(circle at 12% 8%, rgba(16,185,129,.09), transparent 26%),
    linear-gradient(180deg, #0c151c 0%, #0f1727 48%, #101827 100%);
}
.size-editor-hero {
  padding: 22px 20px 44px;
  text-align: center;
}
.size-editor-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(16,185,129,.12);
  color: #10b981;
  font-size: 16px;
  font-weight: 800;
}
.size-editor-title {
  margin: 18px 0 12px;
  font-size: clamp(42px, 5vw, 62px);
  line-height: 1.1;
  font-weight: 1000;
  color: #111827;
}
.size-editor-title .accent { color: #10b981; }
html.dark .size-editor-title { color:#f8fafc; }
.size-editor-subtitle {
  margin: 0 auto;
  max-width: 900px;
  font-size: 18px;
  color: #64748b;
}
html.dark .size-editor-subtitle { color:#cbd5e1; }
.size-editor-workspace {
  border-top: 1px solid rgba(148,163,184,.24);
  background: rgba(255,255,255,.22);
}
html.dark .size-editor-workspace { background: rgba(255,255,255,.02); }
.size-toolbar {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  min-height: 46px;
  padding: 6px 14px;
  background: rgba(255,255,255,.78);
  border-bottom: 1px solid rgba(148,163,184,.22);
  box-shadow: inset 0 -1px 0 rgba(255,255,255,.5);
}
html.dark .size-toolbar {
  background: rgba(15,23,42,.72);
  border-bottom-color: rgba(148,163,184,.16);
}
.size-toolbar-left, .size-toolbar-right {
  display:flex;
  align-items:center;
  gap: 8px;
  flex-wrap: wrap;
}
.sizeeditor-logo {
  font-size: 18px;
  font-weight: 1000;
  color: #10b981;
  margin-right: 6px;
}
.size-tool-icon {
  width: 28px;
  height: 28px;
  display:grid;
  place-items:center;
  border-radius: 6px;
  color: #334155;
  font-size: 16px;
  cursor: pointer;
}
.size-tool-icon:hover { background: rgba(148,163,184,.15); }
html.dark .size-tool-icon { color:#e2e8f0; }
.size-toolbar-divider {
  width: 1px;
  height: 24px;
  background: rgba(148,163,184,.24);
  margin: 0 4px;
}
.size-color-swatch {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: 1px solid rgba(0,0,0,.08);
  background: #222;
}
.size-editor-btn {
  height: 32px;
  border-radius: 8px;
  padding: 0 14px;
  border: 1px solid rgba(203,213,225,.9);
  background: rgba(255,255,255,.82);
  color: #475569;
  font-size: 14px;
  font-weight: 800;
  cursor:pointer;
}
.size-editor-btn.primary {
  background: linear-gradient(180deg, #7edcc0 0%, #60cfae 100%);
  color:#fff;
  border-color: transparent;
}
.size-editor-btn:hover { filter: brightness(.98); }
.size-board-wrap {
  position: relative;
  min-height: calc(100vh - 70px - 290px);
  background: rgba(207,216,226,.42);
  padding: 38px 18px 80px;
}
html.dark .size-board-wrap { background: rgba(148,163,184,.08); }
.size-board-center {
  max-width: 560px;
  margin: 92px auto 0;
  border-radius: 16px;
  background: rgba(255,255,255,.9);
  box-shadow: 0 10px 24px rgba(15,23,42,.12);
  padding: 30px 30px;
  text-align:center;
}
.size-board-plus {
  width: 58px;
  height: 58px;
  margin: 0 auto 18px;
  border-radius: 999px;
  display:grid;
  place-items:center;
  background: rgba(16,185,129,.10);
  color: #10b981;
  font-size: 42px;
  line-height: 1;
}
.size-board-center h3 {
  margin: 0 0 10px;
  font-size: 18px;
  color:#111827;
  font-weight:900;
}
.size-board-center p {
  margin: 0 0 18px;
  color:#64748b;
  line-height: 1.8;
}
html.dark .size-board-center h3 { color:#111827; }
.size-board-preview {
  max-width: 760px;
  margin: 28px auto 0;
  border-radius: 16px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 10px 24px rgba(15,23,42,.1);
  padding: 28px;
  display:none;
}
.size-board-preview.active { display:block; }
.size-preview-header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.size-preview-canvas {
  min-height: 360px;
  border-radius: 14px;
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
  border: 1px dashed rgba(148,163,184,.35);
  display:flex;
  align-items:center;
  justify-content:center;
  position: relative;
  overflow:hidden;
}
.size-preview-imgname {
  position:absolute;
  top:16px;
  left:16px;
  font-size:14px;
  color:#64748b;
}
.size-preview-box {
  width: min(360px, 72%);
  height: min(240px, 54vw);
  max-height: 240px;
  border: 2px solid #111827;
  background: rgba(240,253,250,.68);
  display:flex;
  align-items:center;
  justify-content:center;
  color:#334155;
  font-weight:800;
  position:relative;
}
.size-preview-label {
  position:absolute;
  background:#fff;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 6px 16px rgba(15,23,42,.1);
}
.size-preview-label.top { top: 14px; left: 50%; transform: translateX(-50%); }
.size-preview-label.right { right: 12px; top: 50%; transform: translateY(-50%) rotate(90deg); }
.size-preview-label.bottom { bottom: 14px; left: 50%; transform: translateX(-50%); }
.size-preview-summary {
  margin-top: 18px;
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 12px;
}
.size-summary-item {
  border-radius: 12px;
  background: rgba(15,23,42,.03);
  border: 1px solid rgba(203,213,225,.9);
  padding: 14px;
}
.size-summary-item .k { color:#64748b;font-size:13px;margin-bottom:6px; }
.size-summary-item .v { color:#111827;font-size:17px;font-weight:900; }
.size-editor-modal {
  position: fixed;
  inset: 0;
  background: rgba(2,6,23,.42);
  display:none;
  align-items:center;
  justify-content:center;
  z-index: 90;
  padding: 18px;
}
.size-editor-modal.open { display:flex; }
.size-editor-modal-card {
  width: min(620px, 100%);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 28px 60px rgba(15,23,42,.24);
  overflow:hidden;
}
.size-editor-modal-head {
  padding: 18px 22px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  border-bottom: 1px solid rgba(226,232,240,.96);
}
.size-editor-modal-title { font-size: 20px; font-weight:900; color:#111827; }
.size-editor-modal-body {
  padding: 22px;
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.size-editor-field { display:flex; flex-direction:column; gap:8px; }
.size-editor-field.full { grid-column: 1 / -1; }
.size-editor-field label { font-size:14px; color:#475569; font-weight:700; }
.size-editor-field input {
  height: 46px;
  border-radius: 12px;
  border: 1px solid rgba(203,213,225,.92);
  background: #fff;
  padding: 0 14px;
  font-size:15px;
}
.size-editor-filebox {
  min-height: 120px;
  border-radius: 16px;
  border: 1px dashed rgba(148,163,184,.45);
  background: rgba(248,250,252,.88);
  display:flex;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  text-align:center;
  gap:10px;
  padding: 18px;
}
.size-editor-filebox button {
  min-width: 120px;
  height: 40px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(90deg, #12c7a2 0%, #3b82f6 100%);
  color:#fff;
  font-weight:800;
}
.size-editor-modal-actions {
  padding: 0 22px 22px;
  display:flex;
  justify-content:flex-end;
  gap: 12px;
}
.size-chat-float {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 42px;
  height: 42px;
  display:grid;
  place-items:center;
  border-radius:999px;
  background: rgba(180,244,235,.92);
  color: #fff;
  box-shadow: 0 12px 30px rgba(20,184,166,.18);
  z-index: 40;
}
@media (max-width: 860px) {
  .size-editor-modal-body { grid-template-columns: 1fr; }
  .size-preview-summary { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .size-editor-hero { padding-left: 14px; padding-right: 14px; }
  .size-toolbar { padding: 8px 10px; }
  .sizeeditor-logo { width: 100%; margin-right: 0; }
  .size-toolbar-left, .size-toolbar-right { gap: 6px; }
  .size-board-center { margin-top: 42px; padding: 24px 18px; }
  .size-preview-header { flex-direction: column; align-items: flex-start; }
}


/* ---- v12: image-merge original-like page ---- */
.image-merge-page {
  min-height: calc(100vh - 70px);
  background:
    radial-gradient(circle at 16% 6%, rgba(16,185,129,.06), transparent 24%),
    linear-gradient(180deg, #edf7f4 0%, #edf6fb 100%);
  padding: 28px 22px 44px;
}
html.dark .image-merge-page {
  background:
    radial-gradient(circle at 16% 6%, rgba(16,185,129,.09), transparent 24%),
    linear-gradient(180deg, #10191f 0%, #101926 100%);
}
.merge-hero {
  max-width: 1280px;
  margin: 0 auto 24px;
  text-align: center;
}
.merge-hero-badge {
  display:inline-flex;
  align-items:center;
  gap:10px;
  color:#10b981;
  font-size: 18px;
  font-weight: 1000;
}
.merge-hero-badge-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display:grid;
  place-items:center;
  background: linear-gradient(180deg, #14cfa3 0%, #10b981 100%);
  color:#fff;
  font-size:22px;
}
.merge-hero p {
  margin: 14px 0 0;
  font-size: 16px;
  color:#64748b;
}
html.dark .merge-hero p { color:#cbd5e1; }
.merge-layout {
  max-width: 1280px;
  margin: 0 auto;
  display:grid;
  grid-template-columns: 460px minmax(0,1fr);
  gap: 22px;
  align-items:start;
}
.merge-panel {
  border-radius: 18px;
  background: rgba(255,255,255,.88);
  border: 1px solid rgba(203,213,225,.85);
  box-shadow: 0 10px 26px rgba(15,23,42,.07);
  padding: 20px 24px;
}
html.dark .merge-panel {
  background: rgba(15,23,42,.82);
  border-color: rgba(148,163,184,.14);
}
.merge-step-title {
  display:flex;
  align-items:center;
  gap: 10px;
  margin: 0 0 22px;
  font-size: 18px;
  font-weight: 1000;
  color:#111827;
}
html.dark .merge-step-title, html.dark .merge-preview-title { color:#f8fafc; }
.merge-step-num {
  color:#10b981;
}
.merge-options {
  display:grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 14px;
}
.merge-option {
  height: 88px;
  border-radius: 12px;
  border: 1px solid rgba(203,213,225,.96);
  background: rgba(255,255,255,.62);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:10px;
  color:#475569;
  cursor:pointer;
  transition: all .18s ease;
}
.merge-option:hover { border-color: rgba(16,185,129,.6); transform: translateY(-1px); }
.merge-option.active {
  background: rgba(16,185,129,.08);
  border-color: #10b981;
  box-shadow: inset 0 0 0 1px rgba(16,185,129,.12);
}
.merge-grid-icon {
  width: 28px;
  height: 28px;
  display:grid;
  gap: 2px;
}
.merge-grid-icon span { background:#7c8799; border-radius:1px; }
.merge-grid-2x2 { grid-template-columns: repeat(2,1fr); }
.merge-grid-1x2 { grid-template-columns: 1fr; grid-template-rows: repeat(2,1fr); }
.merge-grid-2x1 { grid-template-columns: repeat(2,1fr); grid-template-rows: 1fr; }
.merge-grid-3x2 { grid-template-columns: repeat(2,1fr); grid-template-rows: repeat(3,1fr); }
.merge-grid-2x3 { grid-template-columns: repeat(3,1fr); grid-template-rows: repeat(2,1fr); }
.merge-grid-3x3 { grid-template-columns: repeat(3,1fr); grid-template-rows: repeat(3,1fr); }
.merge-option small {
  display:block;
  font-size:14px;
  color:#4b5563;
}
.merge-size-note {
  margin-top: 36px;
  font-size: 16px;
  color:#64748b;
}
html.dark .merge-size-note { color:#cbd5e1; }
.merge-upload-box {
  min-height: 190px;
  border-radius: 14px;
  border: 2px dashed rgba(203,213,225,.96);
  background: rgba(255,255,255,.55);
  display:flex;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  text-align:center;
  gap: 12px;
  cursor:pointer;
}
.merge-upload-icon {
  font-size: 56px;
  line-height: 1;
  color: #94a3b8;
}
.merge-upload-main {
  font-size: 16px;
  color:#475569;
}
.merge-upload-sub {
  font-size: 14px;
  color:#64748b;
}
.merge-upload-count {
  margin-top: 16px;
  font-size: 14px;
  color:#10b981;
  font-weight: 800;
}
.merge-action-btn {
  width: 100%;
  height: 40px;
  border-radius: 8px;
  border: 1px solid rgba(203,213,225,.9);
  font-size: 16px;
  font-weight: 800;
  cursor:pointer;
  margin-top: 14px;
  background: rgba(255,255,255,.7);
  color:#94a3b8;
}
.merge-action-btn.primary {
  background: linear-gradient(90deg, #85dec6 0%, #6ed1b8 100%);
  color:#fff;
  border-color: transparent;
}
.merge-action-btn:disabled { opacity: 1; cursor: not-allowed; }
.merge-action-btn.primary.enabled {
  background: linear-gradient(90deg, #16c79f 0%, #36baf1 100%);
  box-shadow: 0 10px 24px rgba(16,185,129,.16);
}
.merge-action-btn.secondary.enabled {
  background: rgba(255,255,255,.88);
  color:#475569;
}
.merge-preview-title {
  margin: 0 0 26px;
  font-size: 18px;
  font-weight: 1000;
  color:#111827;
}
.merge-preview-stage {
  min-height: 620px;
  border-radius: 10px;
  background: rgba(241,245,249,.62);
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 24px;
}
html.dark .merge-preview-stage {
  background: rgba(148,163,184,.08);
}
.merge-preview-grid {
  display:grid;
  gap: 9px;
  width: min(340px, 72%);
}
.merge-preview-grid.mode-4 { grid-template-columns: repeat(2,1fr); }
.merge-preview-grid.mode-2v { grid-template-columns: 1fr; width:min(160px,40%); }
.merge-preview-grid.mode-2h { grid-template-columns: repeat(2,1fr); width:min(230px,55%); }
.merge-preview-grid.mode-6a { grid-template-columns: repeat(2,1fr); width:min(240px,60%); }
.merge-preview-grid.mode-6b { grid-template-columns: repeat(3,1fr); width:min(320px,70%); }
.merge-preview-grid.mode-9 { grid-template-columns: repeat(3,1fr); }
.merge-preview-cell {
  aspect-ratio: 1/1;
  border-radius: 4px;
  background: rgba(226,232,240,.96);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size: 24px;
  font-weight: 900;
  color:#94a3b8;
  overflow:hidden;
}
.merge-preview-cell img {
  width:100%;height:100%;object-fit:cover;display:block;
}
.merge-preview-note {
  margin-top: 16px;
  text-align:center;
  color:#64748b;
  font-size: 18px;
}
html.dark .merge-preview-note { color:#cbd5e1; }
.merge-preview-inner {
  width:100%;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
}
.merge-chat-float {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 16px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display:grid;
  place-items:center;
  background: rgba(184,243,235,.95);
  color:#fff;
  box-shadow: 0 12px 30px rgba(20,184,166,.18);
}
@media (max-width: 1100px) {
  .merge-layout { grid-template-columns: 1fr; }
  .merge-preview-stage { min-height: 480px; }
}
@media (max-width: 640px) {
  .image-merge-page { padding: 20px 14px 36px; }
  .merge-options { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .merge-panel { padding: 18px; }
  .merge-preview-stage { min-height: 420px; padding: 18px; }
}


/* ---- v13: ai-hub original-like page ---- */
.aihub-page {
  min-height: calc(100vh - 70px);
  background: linear-gradient(180deg, #ffffff 0 210px, #edf7fb 210px 100%);
}
html.dark .aihub-page {
  background: linear-gradient(180deg, #0f172a 0 210px, #101b2f 210px 100%);
}
.aihub-top {
  max-width: 980px;
  margin: 0 auto;
  padding: 18px 22px 18px;
}
.aihub-title {
  margin: 0;
  font-size: 22px;
  line-height: 1.25;
  color: #10b981;
  font-weight: 900;
}
.aihub-subtitle {
  margin: 8px 0 0;
  color: #475569;
  font-size: 15px;
}
html.dark .aihub-subtitle { color: #cbd5e1; }
.aihub-tabs {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border-radius: 14px;
  background: rgba(241,245,249,.95);
  border: 1px solid rgba(203,213,225,.9);
  box-shadow: 0 4px 10px rgba(15,23,42,.05);
}
html.dark .aihub-tabs {
  background: rgba(15,23,42,.85);
  border-color: rgba(148,163,184,.16);
}
.aihub-tab {
  border: 0;
  background: transparent;
  height: 40px;
  padding: 0 20px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #475569;
  font-size: 15px;
  cursor: pointer;
}
.aihub-tab.active {
  background: #fff;
  color: #10b981;
  box-shadow: 0 1px 3px rgba(15,23,42,.08);
}
html.dark .aihub-tab { color: #cbd5e1; }
html.dark .aihub-tab.active { background: rgba(30,41,59,.95); color: #22c55e; }
.aihub-work {
  max-width: 980px;
  margin: 0 auto;
  padding: 22px 22px 34px;
  position: relative;
}
.aihub-layout {
  display: grid;
  grid-template-columns: 256px minmax(0,1fr);
  gap: 24px;
  align-items: start;
}
.aihub-card {
  border-radius: 18px;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(203,213,225,.9);
  box-shadow: 0 10px 26px rgba(15,23,42,.08);
}
html.dark .aihub-card {
  background: rgba(15,23,42,.84);
  border-color: rgba(148,163,184,.18);
}
.aihub-settings {
  padding: 20px;
}
.aihub-label {
  display: block;
  font-size: 14px;
  color: #64748b;
  margin-bottom: 8px;
}
html.dark .aihub-label { color: #cbd5e1; }
.aihub-select, .aihub-input {
  width: 100%;
  height: 40px;
  border-radius: 14px;
  border: 1px solid rgba(203,213,225,.95);
  background: rgba(255,255,255,.96);
  padding: 0 16px;
  font-size: 15px;
  color: #0f172a;
  outline: none;
}
html.dark .aihub-select, html.dark .aihub-input {
  background: rgba(15,23,42,.82);
  border-color: rgba(148,163,184,.22);
  color: #f8fafc;
}
.aihub-setting-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  color: #475569;
  font-size: 14px;
}
html.dark .aihub-setting-row { color: #cbd5e1; }
.aihub-switch {
  position: relative;
  width: 36px;
  height: 22px;
  border-radius: 999px;
  background: #e2e8f0;
  flex: 0 0 auto;
  cursor: pointer;
  transition: .2s ease;
}
.aihub-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.12);
  transition: .2s ease;
}
.aihub-switch.active { background: #14b8a6; }
.aihub-switch.active::after { left: 17px; }
.aihub-search-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #475569;
}
.aihub-note {
  margin-top: 14px;
  font-size: 14px;
  line-height: 1.5;
  color: #94a3b8;
}
.aihub-note strong { color: #10b981; font-weight: 800; }
html.dark .aihub-note { color: #94a3b8; }
.aihub-clear {
  margin-top: 18px;
  width: 100%;
  height: 36px;
  border-radius: 12px;
  border: 1px solid rgba(203,213,225,.92);
  background: #f1f5f9;
  color: #64748b;
  cursor: pointer;
}
html.dark .aihub-clear {
  background: rgba(148,163,184,.08);
  border-color: rgba(148,163,184,.18);
  color: #cbd5e1;
}
.aihub-chat {
  min-height: 640px;
  display: grid;
  grid-template-rows: 1fr 74px;
  overflow: hidden;
}
.aihub-messages {
  min-height: 0;
  padding: 24px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.aihub-empty {
  min-height: 520px;
  display: grid;
  place-items: center;
  text-align: center;
  color: #94a3b8;
}
.aihub-empty-icon {
  font-size: 56px;
  line-height: 1;
  opacity: .45;
  margin-bottom: 10px;
}
.aihub-empty-title {
  font-size: 17px;
  color: #94a3b8;
}
.aihub-empty-desc {
  margin-top: 6px;
  font-size: 14px;
}
.aihub-msg {
  max-width: 72%;
  padding: 12px 14px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}
.aihub-msg.user {
  align-self: flex-end;
  background: linear-gradient(90deg, #e6f8f1 0%, #d9f3ff 100%);
  color: #0f172a;
  border-bottom-right-radius: 6px;
}
.aihub-msg.assistant {
  align-self: flex-start;
  background: #f8fafc;
  border: 1px solid rgba(226,232,240,.95);
  color: #334155;
  border-bottom-left-radius: 6px;
}
html.dark .aihub-msg.user { color: #0f172a; }
html.dark .aihub-msg.assistant {
  background: rgba(15,23,42,.72);
  border-color: rgba(148,163,184,.16);
  color: #e2e8f0;
}
.aihub-inputbar {
  border-top: 1px solid rgba(226,232,240,.9);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}
html.dark .aihub-inputbar { border-top-color: rgba(148,163,184,.14); }
.aihub-upload-btn {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(203,213,225,.95);
  background: #fff;
  color: #94a3b8;
  font-size: 20px;
  cursor: pointer;
  flex: 0 0 auto;
}
html.dark .aihub-upload-btn {
  background: rgba(15,23,42,.82);
  border-color: rgba(148,163,184,.2);
  color: #cbd5e1;
}
.aihub-send {
  width: 58px;
  height: 42px;
  border-radius: 14px;
  border: 0;
  background: linear-gradient(90deg, #91dbc5 0%, #8ebcf7 100%);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  flex: 0 0 auto;
}
.aihub-send.enabled {
  background: linear-gradient(90deg, #16c79f 0%, #60a5fa 100%);
  box-shadow: 0 12px 24px rgba(52,211,153,.18);
}
.aihub-float {
  position: fixed;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: rgba(195,247,239,.95);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 14px 30px rgba(34,197,94,.16);
}
.aihub-muted-file {
  margin-top: 10px;
  font-size: 13px;
  color: #94a3b8;
  min-height: 20px;
}
@media (max-width: 1024px) {
  .aihub-layout { grid-template-columns: 1fr; }
  .aihub-chat { min-height: 560px; }
}
@media (max-width: 640px) {
  .aihub-top, .aihub-work { padding-left: 14px; padding-right: 14px; }
  .aihub-tabs { width: 100%; overflow: auto; }
  .aihub-tab { white-space: nowrap; }
  .aihub-inputbar { gap: 8px; padding: 12px; }
  .aihub-chat { min-height: 500px; }
}


/* ---- v14: sora2 original-like page ---- */
.sora-page {
  min-height: calc(100vh - 70px);
  background: #f3f8fb;
  padding: 26px 22px 54px;
  color: #0f172a;
}
html.dark .sora-page { background: #0e1822; color: #e2e8f0; }
.sora-shell {
  max-width: 1080px;
  margin: 0 auto;
}
.sora-top-tabs {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(203,213,225,.9);
  box-shadow: 0 3px 10px rgba(15,23,42,.06);
  margin-bottom: 24px;
}
html.dark .sora-top-tabs { background: rgba(15,23,42,.85); border-color: rgba(148,163,184,.18); }
.sora-main-tab {
  min-width: 110px;
  height: 40px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #475569;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
}
.sora-main-tab.active {
  color: #fff;
  background: linear-gradient(90deg,#12bea0,#3b82f6);
  box-shadow: 0 8px 20px rgba(59,130,246,.16);
}
.sora-layout {
  display: grid;
  grid-template-columns: minmax(0,1fr) 310px;
  gap: 22px;
  align-items: start;
}
.sora-card {
  border-radius: 12px;
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(203,213,225,.96);
  box-shadow: 0 2px 8px rgba(15,23,42,.07);
}
html.dark .sora-card { background: rgba(15,23,42,.86); border-color: rgba(148,163,184,.16); }
.sora-section { padding: 24px; margin-bottom: 16px; }
.sora-mode-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.sora-choice {
  height: 38px;
  border-radius: 6px;
  border: 1px solid rgba(203,213,225,.96);
  background: #fff;
  color: #334155;
  font-weight: 800;
  cursor: pointer;
}
html.dark .sora-choice { background: rgba(2,6,23,.24); color: #cbd5e1; border-color: rgba(148,163,184,.18); }
.sora-choice.active { color:#fff; background: linear-gradient(90deg,#12bea0,#3b82f6); border-color: transparent; }
.sora-options-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.sora-opt-label { color:#64748b; font-size:14px; display:inline-flex; align-items:center; gap:6px; margin-right:2px; }
html.dark .sora-opt-label { color:#cbd5e1; }
.sora-pill-option {
  height: 32px;
  padding: 0 14px;
  border-radius: 7px;
  border: 1px solid rgba(203,213,225,.96);
  background: #fff;
  color: #0f172a;
  font-weight: 800;
  cursor: pointer;
}
html.dark .sora-pill-option { background: rgba(2,6,23,.24); color: #e2e8f0; border-color: rgba(148,163,184,.18); }
.sora-pill-option.active { background:#3b82f6; color:#fff; border-color:#3b82f6; }
.sora-current { margin-top: 10px; color:#94a3b8; font-size:13px; }
.sora-current strong { color:#10b981; }
.sora-prompt-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:14px; }
.sora-label { font-size:15px; font-weight:800; color:#334155; }
html.dark .sora-label { color:#e2e8f0; }
.sora-required { color:#ef4444; }
.sora-mini-actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.sora-small-btn {
  height: 32px;
  padding: 0 14px;
  border-radius: 7px;
  border: 1px solid rgba(203,213,225,.9);
  background: #fff;
  color:#334155;
  font-weight:800;
  cursor:pointer;
}
.sora-small-btn.primary { color:#10b981; border-color: rgba(16,185,129,.25); background: rgba(240,253,250,.7); }
html.dark .sora-small-btn { background: rgba(2,6,23,.24); color:#cbd5e1; border-color: rgba(148,163,184,.18); }
.sora-textarea {
  width:100%;
  height: 146px;
  resize: vertical;
  border-radius: 8px;
  border: 1px solid rgba(226,232,240,.96);
  background:#fff;
  color:#0f172a;
  padding:14px;
  font-size:14px;
  outline:none;
}
html.dark .sora-textarea { background: rgba(2,6,23,.24); color:#f8fafc; border-color: rgba(148,163,184,.18); }
.sora-textarea-foot { display:flex; justify-content:space-between; align-items:center; color:#94a3b8; margin-top:10px; font-size:14px; }
.sora-action-card { padding:24px; display:flex; justify-content:center; gap:12px; margin-bottom:0; }
.sora-generate-btn {
  height: 38px;
  min-width: 300px;
  border:0;
  border-radius:7px;
  background: linear-gradient(90deg,#12bea0,#3b82f6);
  color:#fff;
  font-weight:900;
  cursor:pointer;
}
.sora-batch-btn {
  height:38px;
  padding:0 18px;
  border:0;
  border-radius:7px;
  background:#2585f7;
  color:#fff;
  font-weight:900;
  cursor:pointer;
}
.sora-side-card { padding:24px; min-height:200px; margin-bottom:16px; }
.sora-side-head { display:flex; align-items:center; justify-content:space-between; gap:10px; font-size:18px; font-weight:900; color:#111827; }
html.dark .sora-side-head { color:#f8fafc; }
.sora-side-icons { color:#475569; display:flex; gap:12px; font-size:16px; }
.sora-empty-side { min-height:130px; display:grid; place-items:center; text-align:center; color:#94a3b8; font-size:14px; }
.sora-history-list { display:grid; gap:10px; margin-top:16px; }
.sora-history-item { border:1px solid rgba(226,232,240,.9); background:#f8fafc; border-radius:10px; padding:10px; font-size:13px; color:#64748b; }
html.dark .sora-history-item { background: rgba(2,6,23,.22); border-color: rgba(148,163,184,.14); }
.sora-result-card { display:none; padding:20px; margin-top:16px; }
.sora-result-card.show { display:block; }
.sora-result-box { min-height:170px; border-radius:10px; background:#f8fafc; border:1px solid rgba(226,232,240,.9); display:grid; place-items:center; text-align:center; color:#64748b; padding:20px; line-height:1.8; }
html.dark .sora-result-box { background: rgba(2,6,23,.22); border-color: rgba(148,163,184,.14); color:#cbd5e1; }
.sora-float { position:fixed; left:50%; bottom:14px; transform:translateX(-50%); width:42px; height:42px; border-radius:999px; background:rgba(180,244,235,.95); color:#fff; display:grid; place-items:center; box-shadow:0 14px 30px rgba(34,197,94,.16); z-index:40; }
@media (max-width: 1000px) { .sora-layout { grid-template-columns:1fr; } .sora-side { display:grid; grid-template-columns:1fr 1fr; gap:16px;} .sora-side-card { margin-bottom:0;} }
@media (max-width: 680px) { .sora-page { padding:18px 14px 44px;} .sora-top-tabs { width:100%; overflow:auto;} .sora-main-tab{white-space:nowrap;} .sora-mode-row{grid-template-columns:1fr;} .sora-action-card{flex-direction:column;} .sora-generate-btn,.sora-batch-btn{width:100%;min-width:0;} .sora-side{grid-template-columns:1fr;} }

/* ---- v15: scene generator original-like page ---- */
.scene-page {
  min-height: calc(100vh - 70px);
  background: linear-gradient(180deg, #f1fbf8 0%, #eff7fb 58%, #eef4ff 100%);
  padding: 34px 0 70px;
}
.scene-container { width: min(1380px, calc(100% - 64px)); margin: 0 auto; }
.scene-hero { text-align: center; padding: 24px 0 44px; }
.scene-badge {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 18px;
  border-radius: 999px; border: 1px solid rgba(16,185,129,.22);
  background: rgba(226,249,242,.9); color: #10b981; font-size: 18px; font-weight: 800;
}
.scene-title {
  margin: 22px 0 16px; font-size: clamp(46px, 4vw, 70px); line-height: 1.06;
  font-weight: 1000; color: #111827; letter-spacing: -.02em;
}
.scene-title .accent { color: #14b8a6; }
.scene-subtitle { margin: 0 auto; max-width: 880px; color: #64748b; font-size: 20px; line-height: 1.8; }

.scene-workspace {
  display: grid; grid-template-columns: minmax(520px, 1fr) minmax(520px, 660px);
  gap: 30px; align-items: start;
}
.scene-panel {
  background: rgba(255,255,255,.94); border: 1px solid rgba(203,213,225,.72);
  box-shadow: 0 10px 28px rgba(15,23,42,.06); border-radius: 24px; padding: 28px 28px 26px;
}
.scene-panel-left, .scene-panel-right { min-height: 1030px; }

.scene-section-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 18px; }
.scene-step {
  width: 42px; height: 42px; border-radius: 999px; display: grid; place-items: center;
  background: #e6f7ef; color: #10b981; font-size: 26px; font-weight: 900;
}
.scene-step.blue { background: #eaf3ff; color: #60a5fa; }
.scene-section-title { margin: 0; color: #111827; font-size: 22px; font-weight: 1000; }
.scene-section-desc { margin-top: 6px; color: #64748b; font-size: 15px; line-height: 1.6; }

.scene-upload-box {
  position: relative; border: 2px dashed rgba(52,211,153,.55); border-radius: 22px;
  min-height: 238px; background: linear-gradient(180deg, #f6fffb 0%, #f9fffd 100%);
  display: flex; align-items: center; justify-content: center; padding: 24px; cursor: pointer; transition: .18s ease;
}
.scene-upload-box:hover { border-color: rgba(16,185,129,.9); background: #f4fffb; }
.scene-upload-inner { text-align: center; }
.scene-upload-icon {
  width: 74px; height: 74px; margin: 0 auto 18px; border-radius: 999px;
  display: grid; place-items: center; background: #dff5ee; color: #10b981; font-size: 38px;
}
.scene-upload-title { color: #111827; font-size: 20px; font-weight: 1000; margin-bottom: 10px; }
.scene-upload-hint { color: #64748b; font-size: 16px; line-height: 1.8; }
.scene-upload-count { margin-top: 18px; color: #475569; font-size: 16px; font-weight: 700; }
.scene-upload-count b { color: #10b981; }

.scene-preview-stage {
  margin-top: 24px; min-height: 610px; border-radius: 20px; background: #fff;
  border: 1px solid rgba(226,232,240,.96); overflow: hidden; display: flex; flex-direction: column;
}
.scene-preview-toolbar {
  height: 54px; border-bottom: 1px solid rgba(226,232,240,.96); display: flex;
  align-items: center; padding: 0 18px; justify-content: space-between; color: #64748b; font-size: 15px;
}
.scene-preview-body {
  flex: 1; display: grid; place-items: center; padding: 24px; color: #94a3b8;
  text-align: center; font-size: 16px; line-height: 1.8; background: linear-gradient(180deg, rgba(248,250,252,.5), rgba(255,255,255,.8));
}
.scene-preview-body img {
  max-width: 100%; max-height: 520px; object-fit: contain; border-radius: 16px;
  box-shadow: 0 16px 40px rgba(15,23,42,.12);
}

.scene-form-row { margin-bottom: 18px; }
.scene-label { display: block; color: #111827; font-size: 16px; font-weight: 800; margin-bottom: 10px; }
.scene-label .required { color: #ef4444; }
.scene-select, .scene-input, .scene-textarea {
  width: 100%; height: 52px; border-radius: 10px; border: 1px solid rgba(203,213,225,.92);
  background: #f8fafc; color: #334155; font-size: 15px; padding: 0 16px; outline: none;
}
.scene-textarea { height: 118px; padding: 14px 16px; resize: vertical; }
.scene-select:focus, .scene-input:focus, .scene-textarea:focus {
  border-color: rgba(16,185,129,.75); box-shadow: 0 0 0 3px rgba(16,185,129,.10); background: #fff;
}
.scene-inline-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

.scene-collapsible {
  margin-bottom: 18px; border: 1px solid rgba(226,232,240,.9); border-radius: 12px;
  background: #fff; overflow: hidden;
}
.scene-collapsible summary {
  list-style: none; cursor: pointer; padding: 15px 16px; display: flex;
  align-items: center; justify-content: space-between; gap: 12px; color: #111827; font-size: 16px; font-weight: 800;
}
.scene-collapsible summary::-webkit-details-marker { display: none; }
.scene-collapsible-body { padding: 0 16px 16px; color: #64748b; line-height: 1.75; font-size: 14px; }
.scene-collapsible-icon { color: #10b981; font-weight: 900; }

.scene-points-box {
  margin: 10px 0 8px; min-height: 42px; border-radius: 12px; background: #eaf8f4;
  border: 1px solid rgba(16,185,129,.18); display: flex; align-items: center; padding: 0 14px; color: #64748b; font-size: 16px;
}
.scene-points-box b { color: #10b981; margin-left: 6px; }
.scene-note { color: #64748b; font-size: 14px; line-height: 1.7; margin: 10px 0 16px; }

.scene-polish-btn {
  width: 100%; height: 44px; border-radius: 10px; border: 1px solid rgba(16,185,129,.22);
  background: rgba(255,255,255,.8); color: #94a3b8; font-size: 16px; font-weight: 800; cursor: pointer;
}
.scene-polish-tip { margin-top: 10px; color: #64748b; font-size: 14px; line-height: 1.7; }
.scene-polish-tip b { color: #10b981; font-weight: 800; }

.scene-submit-wrap { text-align: center; margin: 28px 0 20px; }
.scene-generate-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-width: 188px; height: 64px;
  border: 0; border-radius: 14px; padding: 0 36px; background: linear-gradient(90deg, #71dcbf 0%, #9fe7db 100%);
  color: #fff; font-size: 18px; font-weight: 1000; box-shadow: 0 12px 24px rgba(56,189,156,.22); cursor: pointer;
}
.scene-generate-btn:hover { transform: translateY(-1px); }

.scene-tips {
  width: min(720px, calc(100% - 40px)); margin: 0 auto; border-radius: 16px;
  background: rgba(215,233,252,.55); border-left: 4px solid #16a34a; padding: 18px 20px;
  color: #475569; box-shadow: 0 8px 18px rgba(15,23,42,.05);
}
.scene-tips h3 { margin: 0 0 10px; color: #111827; font-size: 18px; }
.scene-tips ul { margin: 0; padding-left: 18px; line-height: 2; font-size: 15px; }

.scene-float {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%);
  width: 44px; height: 44px; border-radius: 999px; display: grid; place-items: center;
  background: #d2f8ef; color: #fff; box-shadow: 0 12px 22px rgba(20,184,166,.18); z-index: 40;
}

html.dark .scene-page { background: linear-gradient(180deg, #0f172a 0%, #111827 100%); }
html.dark .scene-title, html.dark .scene-section-title, html.dark .scene-label,
html.dark .scene-upload-title, html.dark .scene-collapsible summary, html.dark .scene-tips h3 { color: #f8fafc; }
html.dark .scene-subtitle, html.dark .scene-section-desc, html.dark .scene-upload-hint,
html.dark .scene-upload-count, html.dark .scene-note, html.dark .scene-polish-tip,
html.dark .scene-points-box, html.dark .scene-preview-toolbar, html.dark .scene-preview-body,
html.dark .scene-collapsible-body, html.dark .scene-tips, html.dark .scene-select,
html.dark .scene-input, html.dark .scene-textarea { color: #cbd5e1; }
html.dark .scene-panel, html.dark .scene-preview-stage, html.dark .scene-collapsible,
html.dark .scene-select, html.dark .scene-input, html.dark .scene-textarea {
  background: rgba(15,23,42,.78); border-color: rgba(148,163,184,.16);
}
html.dark .scene-upload-box { background: rgba(15,23,42,.58); border-color: rgba(52,211,153,.35); }
html.dark .scene-points-box { background: rgba(16,185,129,.12); }
html.dark .scene-tips { background: rgba(30,41,59,.92); }

@media (max-width: 1180px) {
  .scene-container { width: min(100%, calc(100% - 28px)); }
  .scene-workspace { grid-template-columns: 1fr; }
  .scene-panel-left, .scene-panel-right { min-height: auto; }
}
@media (max-width: 720px) {
  .scene-title { font-size: 38px; }
  .scene-subtitle { font-size: 16px; }
  .scene-inline-grid { grid-template-columns: 1fr; }
  .scene-generate-btn { width: 100%; }
}

/* ---- v16: corrected Sora2 Seedance HappyHorse pages ---- */
.video2-page {
  min-height: calc(100vh - 70px);
  background: #f3f8fb;
  padding: 28px 0 72px;
  color: #0f172a;
}
html.dark .video2-page {
  background: #0f172a;
  color: #e2e8f0;
}
.video2-wrap {
  width: min(1040px, calc(100% - 36px));
  margin: 0 auto;
}
.video2-head {
  margin-bottom: 20px;
}
.video2-head h1 {
  margin: 0 0 8px;
  color: #111827;
  font-size: 28px;
  line-height: 1.2;
  font-weight: 1000;
}
html.dark .video2-head h1 { color: #f8fafc; }
.video2-head p {
  margin: 0;
  color: #475569;
  font-size: 15px;
  line-height: 1.7;
}
html.dark .video2-head p { color: #cbd5e1; }
.video2-tabs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  padding: 5px;
  border-radius: 14px;
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(203,213,225,.9);
  box-shadow: 0 8px 18px rgba(15,23,42,.06);
}
html.dark .video2-tabs {
  background: rgba(15,23,42,.88);
  border-color: rgba(148,163,184,.18);
}
.video2-tab {
  height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #475569;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
}
.video2-tab.active {
  color: #fff;
  background: linear-gradient(90deg, #12c7a2 0%, #3b82f6 100%);
  box-shadow: 0 8px 18px rgba(20,184,166,.14);
}
html.dark .video2-tab { color: #cbd5e1; }

.video2-two-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
}
.video2-main, .video2-side {
  min-width: 0;
}
.video2-card {
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(203,213,225,.86);
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(15,23,42,.06);
  padding: 24px;
  margin-bottom: 18px;
}
html.dark .video2-card {
  background: rgba(15,23,42,.86);
  border-color: rgba(148,163,184,.18);
}
.video2-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.video2-mode-tab {
  height: 40px;
  border-radius: 8px;
  border: 1px solid rgba(203,213,225,.95);
  background: #fff;
  color: #111827;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
}
.video2-mode-tab.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(90deg, #10b981 0%, #3b82f6 100%);
}
html.dark .video2-mode-tab {
  background: rgba(15,23,42,.70);
  border-color: rgba(148,163,184,.22);
  color: #e2e8f0;
}
.video2-config-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.video2-config-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.video2-label-inline {
  color: #64748b;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.video2-chip {
  min-width: 46px;
  height: 34px;
  padding: 0 12px;
  border-radius: 9px;
  border: 1px solid rgba(203,213,225,.95);
  background: #fff;
  color: #111827;
  font-weight: 900;
  cursor: pointer;
}
.video2-chip.active {
  color: #fff;
  border-color: transparent;
  background: #3b82f6;
}
.video2-chip.green.active {
  color: #10b981;
  border-color: #10b981;
  background: rgba(236,253,245,.72);
}
.video2-chip.disabled {
  color: #94a3b8;
  background: #f8fafc;
  cursor: not-allowed;
}
html.dark .video2-chip {
  background: rgba(15,23,42,.70);
  border-color: rgba(148,163,184,.22);
  color: #e2e8f0;
}
.video2-current {
  margin-top: 12px;
  color: #64748b;
  font-size: 14px;
}
.video2-current b { color: #10b981; }
.video2-modes-grid {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 14px;
  margin-bottom: 18px;
}
.video2-mode-card {
  position: relative;
  min-height: 124px;
  border-radius: 14px;
  border: 1px solid rgba(203,213,225,.88);
  background: rgba(255,255,255,.96);
  padding: 16px;
  text-align: left;
  cursor: pointer;
}
.video2-mode-card.active {
  border: 2px solid #10b981;
  background: rgba(236,253,245,.65);
}
.video2-mode-card.active::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 10px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
}
html.dark .video2-mode-card {
  background: rgba(15,23,42,.86);
  border-color: rgba(148,163,184,.18);
}
.video2-icon {
  color: #475569;
  font-size: 22px;
  margin-bottom: 10px;
}
.video2-mode-card.active .video2-icon { color: #10b981; }
.video2-mode-name {
  color: #111827;
  font-size: 16px;
  font-weight: 1000;
  margin-bottom: 8px;
}
html.dark .video2-mode-name { color: #f8fafc; }
.video2-mode-desc {
  color: #475569;
  font-size: 13px;
  line-height: 1.55;
}
html.dark .video2-mode-desc { color: #cbd5e1; }
.video2-model-strip {
  height: 52px;
  border-radius: 14px;
  background: rgba(224,253,246,.86);
  border: 1px solid rgba(20,184,166,.34);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  margin-bottom: 18px;
  box-shadow: 0 8px 18px rgba(20,184,166,.08);
}
.video2-model-left {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #111827;
  font-size: 18px;
  font-weight: 900;
}
.video2-model-badge {
  height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 9px;
  background: #fff;
  border: 1px solid rgba(203,213,225,.85);
  color: #0f172a;
  font-size: 13px;
  font-weight: 800;
}
.video2-prompt-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.video2-prompt-title {
  color: #111827;
  font-size: 16px;
  font-weight: 1000;
}
html.dark .video2-prompt-title { color: #f8fafc; }
.video2-outline-btn {
  height: 34px;
  border-radius: 9px;
  border: 1px solid rgba(20,184,166,.42);
  background: rgba(255,255,255,.82);
  color: #10b981;
  font-weight: 900;
  padding: 0 14px;
  cursor: pointer;
}
.video2-textarea {
  width: 100%;
  min-height: 150px;
  border: 1px solid rgba(226,232,240,.92);
  border-radius: 10px;
  background: #fff;
  padding: 16px;
  resize: vertical;
  outline: none;
  font-size: 15px;
  line-height: 1.7;
  color: #0f172a;
}
html.dark .video2-textarea {
  background: rgba(2,6,23,.24);
  border-color: rgba(148,163,184,.18);
  color: #f8fafc;
}
.video2-guide {
  margin-top: 12px;
  color: #64748b;
  font-size: 14px;
}
.video2-settings-row {
  display: grid;
  grid-template-columns: 220px 220px 180px;
  gap: 34px;
  align-items: start;
  margin-bottom: 24px;
}
.video2-setting label,
.video2-ratio label,
.video2-duration label {
  display: block;
  color: #475569;
  font-size: 14px;
  margin-bottom: 10px;
}
.video2-chip-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.video2-switch {
  width: 36px;
  height: 20px;
  border-radius: 999px;
  background: #10b981;
  position: relative;
  display: inline-flex;
  vertical-align: middle;
  margin-right: 8px;
}
.video2-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  right: 2px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 999px;
}
.video2-range-row {
  display: grid;
  grid-template-columns: 34px 1fr 34px 42px;
  gap: 14px;
  align-items: center;
}
.video2-minus, .video2-plus {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(203,213,225,.94);
  border-radius: 8px;
  background: #fff;
  color: #64748b;
  font-size: 20px;
}
.video2-range {
  appearance: none;
  width: 100%;
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, #10b981 0%, #10b981 15%, #333 15%, #333 100%);
}
.video2-range::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #10b981;
}
.video2-duration-value {
  font-weight: 900;
  color: #111827;
}
.video2-submit {
  border-radius: 16px;
  background: rgba(236,253,245,.66);
  border: 1px solid rgba(20,184,166,.26);
  padding: 28px 24px;
  margin-top: 20px;
}
.video2-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.video2-summary-text {
  color: #475569;
  font-size: 14px;
}
.video2-points {
  font-size: 28px;
  font-weight: 1000;
  color: #14b8a6;
}
.video2-generate {
  width: 100%;
  height: 48px;
  border-radius: 9px;
  border: 0;
  background: linear-gradient(90deg, #10b981 0%, #3b82f6 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 1000;
  cursor: pointer;
}
.video2-wait {
  margin-top: 16px;
  text-align: center;
  color: #64748b;
  font-size: 13px;
}
.video2-result {
  display: none;
  margin-top: 14px;
  min-height: 70px;
  border-radius: 12px;
  border: 1px solid rgba(203,213,225,.6);
  background: rgba(255,255,255,.55);
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 14px;
  color: #475569;
  line-height: 1.7;
}
.video2-result.show { display: flex; }
.video2-side-card {
  min-height: 200px;
  margin-bottom: 18px;
}
.video2-side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #111827;
  font-size: 18px;
  font-weight: 1000;
  margin-bottom: 54px;
}
.video2-empty {
  color: #94a3b8;
  text-align: center;
}
.video2-float {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(188,245,238,.95);
  color: #fff;
  box-shadow: 0 14px 30px rgba(34,197,94,.16);
  z-index: 40;
}
@media (max-width: 1180px) {
  .video2-two-col { grid-template-columns: 1fr; }
  .video2-modes-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 760px) {
  .video2-settings-row { grid-template-columns: 1fr; }
  .video2-mode-tabs { grid-template-columns: 1fr; }
  .video2-modes-grid { grid-template-columns: 1fr; }
  .video2-prompt-head, .video2-summary { align-items: flex-start; flex-direction: column; }
}

/* ---- v17: logged-out auth state fix ---- */
.top-actions .login-open-btn {
  min-width: 92px;
}

.auth-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9999;
}

.auth-modal.open {
  display: block;
}

.auth-mask {
  position: absolute;
  inset: 0;
  background: rgba(2,6,23,.70);
  backdrop-filter: blur(2px);
}

.auth-dialog {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(448px, calc(100% - 32px));
  transform: translate(-50%, -50%);
  background: #111827;
  border: 1px solid rgba(148,163,184,.22);
  border-radius: 10px;
  box-shadow: 0 28px 80px rgba(0,0,0,.45);
  padding: 24px 26px 26px;
  color: #f8fafc;
}

.auth-close {
  position: absolute;
  right: 16px;
  top: 14px;
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  color: #94a3b8;
  font-size: 24px;
  cursor: pointer;
}

.auth-dialog h2 {
  margin: 0;
  text-align: center;
  font-size: 26px;
  line-height: 1.25;
  font-weight: 1000;
  color: #fff;
}

.auth-subtitle {
  margin: 10px 0 20px;
  text-align: center;
  color: #cbd5e1;
  font-size: 14px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  height: 36px;
  padding: 3px;
  border-radius: 8px;
  background: rgba(30,41,59,.78);
  margin-bottom: 26px;
}

.auth-tab {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #e2e8f0;
  font-size: 15px;
  cursor: pointer;
}

.auth-tab.active {
  background: #059669;
  color: #fff;
}

.auth-form label,
.auth-row label {
  display: block;
  color: #e2e8f0;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
}

.auth-row {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.auth-row a {
  color: #10b981;
  text-decoration: none;
  font-size: 14px;
}

.auth-input-wrap {
  height: 38px;
  border: 1px solid rgba(148,163,184,.34);
  border-radius: 6px;
  background: rgba(30,41,59,.70);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
}

.auth-input-wrap span {
  color: #94a3b8;
}

.auth-input-wrap input {
  flex: 1;
  border: 0;
  outline: none;
  background: transparent;
  color: #f8fafc;
  font-size: 15px;
}

.auth-input-wrap input::placeholder {
  color: #64748b;
}

.auth-submit {
  width: 100%;
  height: 40px;
  border: 0;
  border-radius: 6px;
  margin-top: 16px;
  background: #059669;
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
}

.auth-submit:hover,
.auth-tab.active:hover {
  background: #047857;
}
