@import url("kling.css?v=20260907-credit");

/* ============================================================
   佛度AI · 深色科技风设计系统
   所有页面共用:index / create / template / assets / profile / login / register
   ============================================================ */

:root {
  /* 背景层次 */
  --bg-0: #06070c;          /* 页面最底 */
  --bg-1: #0b0d15;          /* 主背景 */
  --bg-2: #12141f;          /* 卡片背景 */
  --bg-3: #1a1d2e;          /* 悬浮/输入 */
  --bg-4: #232741;          /* hover */

  /* 文字 */
  --text-1: #f1f3fa;
  --text-2: #b6bdd0;
  --text-3: #7a8299;
  --text-4: #4d5468;

  /* 品牌色 */
  --accent: #6d5cff;        /* 主紫 */
  --accent-2: #38bdf8;      /* 辅蓝 */
  --accent-grad: linear-gradient(135deg, #6d5cff 0%, #4f46e5 45%, #38bdf8 100%);
  --accent-glow: rgba(109, 92, 255, 0.35);

  /* 功能色 */
  --success: #34d399;
  --warning: #fbbf24;
  --danger: #f87171;

  /* 边框 */
  --border: rgba(148, 163, 184, 0.14);
  --border-hover: rgba(148, 163, 184, 0.3);
  --border-subtle: rgba(148, 163, 184, 0.08);

  /* 圆角 */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-full: 9999px;

  /* 阴影 */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);

  --font: -apple-system, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg-0);
  color: var(--text-1);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ---------- 背景光晕 ---------- */
.glows { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.glow-a, .glow-b, .glow-c {
  position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.5;
}
.glow-a { width: 520px; height: 520px; top: -180px; left: 10%; background: rgba(109, 92, 255, 0.18); }
.glow-b { width: 460px; height: 460px; top: 30%; right: -120px; background: rgba(56, 189, 248, 0.12); }
.glow-c { width: 380px; height: 380px; bottom: -140px; left: 35%; background: rgba(139, 92, 246, 0.12); }

.page-shell { position: relative; z-index: 1; }

/* ---------- 顶部导航 ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  background: rgba(6, 7, 12, 0.72);
  border-bottom: 1px solid var(--border-subtle);
  transition: all 0.3s;
}
.nav.scrolled { background: rgba(6, 7, 12, 0.9); box-shadow: var(--shadow-sm); }
.nav-inner {
  max-width: 1240px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; height: 64px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-icon-hex {
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--accent-grad);
  display: grid; place-items: center;
  font-weight: 800; color: #fff; font-size: 15px;
  box-shadow: 0 4px 14px var(--accent-glow);
}
.brand-text { display: flex; flex-direction: column; }
.brand-name { font-weight: 800; font-size: 16px; color: var(--text-1); letter-spacing: -0.01em; }
.brand-slogan { font-size: 10px; color: var(--text-3); }

.nav-links { display: flex; gap: 8px; }
.nav-link { color: var(--text-2); text-decoration: none; font-size: 13px; padding: 7px 14px; border-radius: var(--r-full); transition: all 0.2s; }
.nav-link:hover { color: var(--text-1); background: var(--bg-2); }

.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-login { color: var(--text-2); text-decoration: none; font-size: 13px; padding: 8px 16px; border-radius: var(--r-full); transition: all 0.2s; }
.nav-login:hover { color: var(--text-1); }

.nav-toggle { display: none; background: none; border: 1px solid var(--border); color: var(--text-1); width: 38px; height: 38px; border-radius: 10px; font-size: 17px; cursor: pointer; }
.nav-mobile { display: none; flex-direction: column; padding: 12px 24px 20px; gap: 6px; border-top: 1px solid var(--border-subtle); }
.nav-mobile.open { display: flex; }

@media (max-width: 760px) {
  .nav-links, .nav-actions { display: none; }
  .nav-toggle { display: block; }
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border-radius: var(--r-md);
  font-size: 14px; font-weight: 600; font-family: var(--font);
  border: none; cursor: pointer; text-decoration: none;
  transition: all 0.22s ease;
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none !important; }
.btn-primary {
  background: var(--accent-grad); color: #fff;
  box-shadow: 0 4px 18px var(--accent-glow);
}
.btn-primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 8px 28px var(--accent-glow); }
.btn-ghost {
  background: var(--bg-2); color: var(--text-1);
  border: 1px solid var(--border);
}
.btn-ghost:hover:not(:disabled) { border-color: var(--border-hover); background: var(--bg-3); }
.btn-danger { background: rgba(248, 113, 113, 0.12); color: var(--danger); border: 1px solid rgba(248, 113, 113, 0.3); }
.btn-danger:hover:not(:disabled) { background: rgba(248, 113, 113, 0.2); }
.btn-sm { padding: 7px 14px; font-size: 12.5px; border-radius: var(--r-sm); }
.btn-lg { padding: 14px 30px; font-size: 15px; border-radius: var(--r-lg); }
.btn-block { width: 100%; }
.btn-loading { opacity: 0.75; pointer-events: none; }

/* ---------- 表单 ---------- */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 8px; }
.form-label .req { color: var(--accent-2); }
.form-input {
  width: 100%; padding: 11px 14px;
  background: var(--bg-2); color: var(--text-1);
  border: 1px solid var(--border); border-radius: var(--r-md);
  font-size: 13.5px; font-family: var(--font);
  outline: none; transition: all 0.2s;
}
.form-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); background: var(--bg-3); }
.form-input::placeholder { color: var(--text-4); }
textarea.form-input { resize: vertical; min-height: 90px; }
select.form-input { cursor: pointer; appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237a8299' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-hint { font-size: 11.5px; color: var(--text-3); margin-top: 6px; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }

/* ---------- 卡片 ---------- */
.card {
  background: var(--bg-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  transition: all 0.25s ease;
}
.card-hover:hover { border-color: var(--border-hover); transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; top: 24px; left: 50%; z-index: 1000;
  transform: translateX(-50%) translateY(-16px);
  padding: 11px 22px; border-radius: var(--r-md);
  font-size: 13.5px; font-weight: 600; color: #fff;
  opacity: 0; pointer-events: none; transition: all 0.3s;
  box-shadow: var(--shadow-md); backdrop-filter: blur(8px);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { background: rgba(16, 185, 129, 0.92); }
.toast.error { background: rgba(239, 68, 68, 0.92); }
.toast.info { background: rgba(79, 70, 229, 0.92); }

/* ---------- 空状态 ---------- */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-3); }
.empty-state svg { width: 48px; height: 48px; opacity: 0.35; margin-bottom: 14px; }
.empty-state p { font-size: 14px; }

/* ---------- 骨架屏 ---------- */
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.skeleton { background: linear-gradient(90deg, var(--bg-3) 25%, var(--bg-4) 50%, var(--bg-3) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg-4); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-4); }

/* ---------- 通用工具 ---------- */
.mono { font-family: ui-monospace, "SF Mono", Consolas, monospace; }
.text-muted { color: var(--text-3); }
.text-accent { color: var(--accent-2); }
.hidden { display: none !important; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }

/* ---------- 首页 ---------- */
.hero {
  max-width: 1240px; margin: 0 auto;
  padding: 150px 24px 80px; text-align: center;
}
.hero-tag {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px; border-radius: var(--r-full);
  background: rgba(109, 92, 255, 0.1); border: 1px solid rgba(109, 92, 255, 0.25);
  font-size: 12px; color: #a5b4fc; margin-bottom: 26px;
}
.hero-tag .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); box-shadow: 0 0 8px var(--success); }
.hero h1 {
  font-size: clamp(38px, 6vw, 64px); font-weight: 800;
  letter-spacing: -0.03em; line-height: 1.15; margin-bottom: 20px;
}
.hero h1 .grad {
  background: var(--accent-grad);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-desc { font-size: clamp(15px, 2vw, 17px); color: var(--text-2); max-width: 600px; margin: 0 auto 28px; }
.hero-features { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; margin-bottom: 34px; }
.hero-feat { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); }
.hero-feat svg { color: var(--success); }
.hero-actions { display: flex; gap: 14px; justify-content: center; }

/* 功能网格 */
.features-section { max-width: 1240px; margin: 0 auto; padding: 60px 24px 90px; }
.section-head { text-align: center; margin-bottom: 44px; }
.section-tag { display: inline-block; font-size: 12px; font-weight: 700; color: var(--accent-2); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 10px; }
.section-title { font-size: clamp(26px, 4vw, 38px); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 12px; }
.section-desc { color: var(--text-3); max-width: 520px; margin: 0 auto; }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
@media (max-width: 700px) { .feature-grid { grid-template-columns: 1fr; } }

.feature-card {
  background: var(--bg-2); border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg); padding: 26px;
  text-decoration: none; color: inherit; position: relative; overflow: hidden;
  transition: all 0.25s ease;
}
.feature-card:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: var(--shadow-md); }
.feature-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--accent-grad); opacity: 0; transition: opacity 0.25s;
}
.feature-card:hover::before { opacity: 1; }
.feature-icon {
  width: 46px; height: 46px; border-radius: 13px;
  background: var(--bg-3); display: grid; place-items: center;
  margin-bottom: 16px; color: var(--accent-2);
}
.feature-card:hover .feature-icon { background: var(--accent-grad); color: #fff; box-shadow: 0 6px 18px var(--accent-glow); }
.feature-icon svg { width: 22px; height: 22px; }
.feature-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.feature-desc { font-size: 13px; color: var(--text-3); line-height: 1.7; }
.feature-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; }
.feature-cost { font-size: 12px; color: var(--accent-2); font-weight: 700; }
.feature-cta { font-size: 12.5px; color: var(--text-2); display: flex; align-items: center; gap: 4px; }
.feature-card:hover .feature-cta { color: var(--accent-2); }

/* 页脚 */
.footer { border-top: 1px solid var(--border-subtle); padding: 40px 24px; position: relative; z-index: 1; }
.footer-inner { max-width: 1240px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.footer-links { display: flex; gap: 20px; }
.footer-link { color: var(--text-3); text-decoration: none; font-size: 13px; }
.footer-link:hover { color: var(--text-1); }
.footer-copy { color: var(--text-4); font-size: 12px; }

/* ---------- 模板库(create) ---------- */
.create-layout { max-width: 1240px; margin: 0 auto; padding: 90px 24px 60px; }
.page-head { margin-bottom: 28px; }
.page-head h2 { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.page-head p { color: var(--text-3); font-size: 13.5px; margin-top: 4px; }

.cat-tabs { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 26px; }
.cat-tab {
  padding: 8px 18px; border-radius: var(--r-full);
  background: var(--bg-2); border: 1px solid var(--border);
  color: var(--text-2); font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
}
.cat-tab:hover { border-color: var(--border-hover); color: var(--text-1); }
.cat-tab.active { background: var(--accent-grad); color: #fff; border-color: transparent; box-shadow: 0 4px 14px var(--accent-glow); }

.template-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
@media (max-width: 600px) { .template-grid { grid-template-columns: 1fr; } }

.template-card {
  background: var(--bg-2); border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg); overflow: hidden; cursor: pointer;
  transition: all 0.25s ease;
}
.template-card:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: var(--shadow-md); }
.template-cover { position: relative; aspect-ratio: 3/4; overflow: hidden; background: var(--bg-3); }
.template-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.template-card:hover .template-cover img { transform: scale(1.05); }
.template-cover .cover-fallback {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: var(--bg-3); color: var(--text-4);
}
.template-badge {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  padding: 4px 12px; border-radius: var(--r-full);
  background: rgba(6, 7, 12, 0.75); backdrop-filter: blur(8px);
  font-size: 11px; font-weight: 700; color: var(--text-1);
  border: 1px solid var(--border);
}
.template-badge.hot { background: linear-gradient(135deg, #f43f5e, #fb7185); border-color: transparent; color: #fff; }
.template-badge.new { background: linear-gradient(135deg, #f59e0b, #fbbf24); border-color: transparent; color: #000; }
.template-body { padding: 16px 18px; }
.template-title { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.template-desc { font-size: 12.5px; color: var(--text-3); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.template-action { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.open-btn { font-size: 12.5px; font-weight: 700; color: var(--accent-2); display: inline-flex; align-items: center; gap: 4px; }
.open-btn svg { width: 13px; height: 13px; }
.template-cost-tag { font-size: 12px; color: var(--text-3); font-weight: 700; }
.template-cost-tag b { color: var(--accent-2); }

.skeleton-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.skeleton-card { border-radius: var(--r-lg); overflow: hidden; background: var(--bg-2); border: 1px solid var(--border-subtle); }
.skeleton-cover { aspect-ratio: 3/4; }
.skeleton-body { padding: 16px 18px; }
.skeleton-line { height: 13px; border-radius: 6px; margin-bottom: 10px; width: 70%; }
.skeleton-line.short { width: 40%; margin-bottom: 0; }

/* ---------- 模板详情(template) ---------- */
.tpl-page { padding-top: 72px; min-height: 100vh; position: relative; z-index: 1; }
.tpl-topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 0 clamp(20px, 5vw, 48px);
  background: rgba(6, 7, 12, 0.85); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
}
.tpl-topbar-inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; height: 64px; }
.tpl-back { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-3); text-decoration: none; transition: color 0.25s; }
.tpl-back:hover { color: var(--accent-2); }
.tpl-est { font-size: 13px; color: var(--text-3); display: flex; align-items: center; gap: 6px; }
.tpl-est strong { color: var(--accent-2); }

.tpl-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; padding: 40px clamp(20px, 5vw, 48px); max-width: 1200px; margin: 0 auto; width: 100%; align-items: start; }
@media (max-width: 900px) { .tpl-layout { grid-template-columns: 1fr; gap: 32px; } }

/* ---------- 移动端案例发现 ---------- */
.mobile-app { position:relative; z-index:1; max-width:640px; min-height:100vh; margin:0 auto; padding:22px 16px 96px; }
.mobile-header { display:flex; align-items:center; justify-content:space-between; min-height:44px; margin-bottom:20px; }
.mobile-brand { display:flex; align-items:center; gap:9px; color:var(--text-1); text-decoration:none; font-weight:800; font-size:17px; }
.mobile-brand .brand-icon-hex { width:32px; height:32px; font-size:14px; }
.mobile-header-action { display:inline-flex; align-items:center; justify-content:center; min-height:44px; padding:0 12px; color:var(--text-2); text-decoration:none; font-size:13px; font-weight:600; }
.discovery-kicker { color:var(--accent-2); font-size:12px; font-weight:800; letter-spacing:.1em; margin-bottom:5px; }
.discovery-title { font-size:28px; letter-spacing:-.04em; line-height:1.2; margin-bottom:7px; }
.discovery-desc { color:var(--text-3); font-size:13px; margin-bottom:18px; }
.case-tabs { display:flex; gap:8px; overflow-x:auto; margin:0 -16px 18px; padding:0 16px 2px; scrollbar-width:none; }
.case-tabs::-webkit-scrollbar { display:none; }
.case-tab { flex:0 0 auto; min-height:44px; padding:0 15px; border:1px solid var(--border); border-radius:var(--r-full); background:var(--bg-2); color:var(--text-2); font:600 13px var(--font); cursor:pointer; }
.case-tab.active { background:var(--accent-grad); color:white; border-color:transparent; }
.case-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.case-card { min-width:0; display:block; color:inherit; text-decoration:none; overflow:hidden; background:var(--bg-2); border:1px solid var(--border-subtle); border-radius:14px; }
.case-card:active { border-color:var(--accent); transform:scale(.99); }
.case-cover { position:relative; aspect-ratio:3/4; background:var(--bg-3); overflow:hidden; }
.case-cover img { display:block; width:100%; height:100%; object-fit:cover; }
.case-cover .case-video-badge { position:absolute; right:8px; bottom:8px; display:grid; place-items:center; width:30px; height:30px; border-radius:50%; background:rgba(5,6,12,.75); border:1px solid rgba(255,255,255,.25); color:#fff; }
.case-card-body { min-height:72px; padding:10px 10px 11px; }
.case-card-title { overflow:hidden; font-size:13px; font-weight:700; line-height:1.4; text-overflow:ellipsis; white-space:nowrap; }
.case-card-meta { margin-top:4px; color:var(--text-3); font-size:11px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.case-state { grid-column:1/-1; padding:42px 12px; color:var(--text-3); text-align:center; font-size:13px; }
.case-bottom-nav { position:fixed; z-index:20; bottom:0; left:0; right:0; display:flex; justify-content:center; padding:7px 16px calc(7px + env(safe-area-inset-bottom)); background:rgba(6,7,12,.94); border-top:1px solid var(--border-subtle); backdrop-filter:blur(18px); }
.case-bottom-nav-inner { width:min(100%,608px); display:grid; grid-template-columns:repeat(4,1fr); }
.case-bottom-tab { min-height:50px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; color:var(--text-3); text-decoration:none; font-size:10px; }
.case-bottom-tab svg { width:19px; height:19px; }
.case-bottom-tab.active { color:var(--accent-2); }
.case-detail { padding-bottom:120px; }
.case-back { display:inline-flex; align-items:center; gap:5px; min-height:44px; margin:0 0 12px -8px; padding:0 8px; color:var(--text-2); font-size:13px; text-decoration:none; }
.case-media { overflow:hidden; aspect-ratio:9/16; border:1px solid var(--border); border-radius:16px; background:#000; }
.case-media video,.case-media img { display:block; width:100%; height:100%; object-fit:contain; }
.case-media img { object-fit:cover; }
.case-detail-category { margin-top:18px; color:var(--accent-2); font-size:12px; font-weight:700; }
.case-detail-title { margin:5px 0 8px; font-size:25px; letter-spacing:-.035em; line-height:1.3; }
.case-detail-desc { color:var(--text-3); font-size:13px; white-space:pre-wrap; }
.case-cta { position:fixed; z-index:21; bottom:calc(70px + env(safe-area-inset-bottom)); left:16px; right:16px; max-width:608px; margin:auto; min-height:48px; border-radius:13px; }
.case-context { display:flex; align-items:center; gap:8px; margin:14px 0 2px; padding:9px 11px; background:rgba(56,189,248,.09); border:1px solid rgba(56,189,248,.2); border-radius:10px; color:var(--text-2); font-size:12px; }
.case-context b { color:var(--text-1); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.case-context button { margin-left:auto; min-height:32px; padding:0 7px; background:transparent; border:0; color:var(--accent-2); font:600 12px var(--font); cursor:pointer; }
@media (min-width:701px) { .mobile-app { padding-top:34px; } .case-grid { grid-template-columns:repeat(3,minmax(0,1fr)); } .case-bottom-nav { display:none; } .case-cta { bottom:24px; } }
@media (max-width:375px) { .discovery-title { font-size:26px; } .case-card-body { padding:9px; } }
@media (prefers-reduced-motion:reduce) { *,*::before,*::after { scroll-behavior:auto!important; animation-duration:.01ms!important; transition-duration:.01ms!important; } }

.tpl-panel { background: var(--bg-2); border: 1px solid var(--border-subtle); border-radius: var(--r-xl); padding: 36px 32px; position: sticky; top: 88px; }
@media (max-width: 900px) { .tpl-panel { position: static; } }
.tpl-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 14px; border-radius: var(--r-full); background: rgba(56, 189, 248, 0.1); border: 1px solid rgba(56, 189, 248, 0.25); font-size: 12px; font-weight: 600; color: var(--accent-2); margin-bottom: 20px; }
.tpl-panel h1 { font-size: clamp(22px, 3vw, 28px); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 10px; line-height: 1.2; }
.tpl-panel-desc { font-size: 14px; color: var(--text-2); line-height: 1.7; margin-bottom: 24px; }
.tpl-steps { display: flex; gap: 8px; margin-bottom: 28px; flex-wrap: wrap; }
.tpl-step { display: flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: var(--r-full); background: var(--bg-3); border: 1px solid var(--border-subtle); font-size: 12px; font-weight: 500; color: var(--text-2); }
.tpl-step-num { width: 20px; height: 20px; border-radius: 50%; background: var(--accent-grad); color: #fff; display: grid; place-items: center; font-size: 11px; font-weight: 700; }

.upload-zone {
  border: 2px dashed var(--border); border-radius: var(--r-lg);
  padding: 32px 20px; text-align: center; cursor: pointer;
  transition: all 0.3s; margin-bottom: 16px;
  position: relative; overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
.upload-zone:hover { border-color: var(--accent-2); background: rgba(56, 189, 248, 0.05); }
.upload-zone svg { margin-bottom: 10px; opacity: 0.4; color: var(--text-3); }
.upload-zone-label { font-size: 13px; font-weight: 600; color: var(--text-1); margin-bottom: 4px; }
.upload-zone-label .req { color: var(--accent-2); }
.upload-zone-hint { font-size: 12px; color: var(--text-3); }
.upload-zone input[type="file"] { position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.upload-zone.has-image { border-style: solid; border-color: var(--accent-2); }
.upload-zone.has-image img, .upload-zone.has-image video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: var(--r-lg); background:#111; }
.upload-zone.has-image .upload-placeholder { display: none; }
.upload-zone .upload-status { position: absolute; bottom: 8px; right: 8px; background: rgba(12,13,18,.86); color: #fff; font-size: 11px; padding: 4px 10px; border-radius: 999px; z-index: 4; text-shadow: 0 1px 2px rgba(0,0,0,.35); }

.param-group { margin-bottom: 16px; }
.param-label { font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.param-label .optional { font-size: 11px; color: var(--text-3); font-weight: 400; }
.param-slider { width: 100%; accent-color: var(--accent); background: transparent; }

.tpl-submit {
  width: 100%; padding: 15px; border-radius: var(--r-md);
  background: var(--accent-grad); color: #fff; font-size: 15px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: all 0.3s; box-shadow: 0 4px 24px var(--accent-glow);
  margin-top: 24px; cursor: pointer; border: none; font-family: var(--font);
}
.tpl-submit:hover { box-shadow: 0 8px 40px var(--accent-glow); transform: translateY(-1px); }
.tpl-submit:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.tpl-cost { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 12px; font-size: 13px; color: var(--text-3); }
.tpl-cost .current { color: var(--accent-2); font-weight: 700; font-size: 14px; }

.tpl-preview { display: flex; flex-direction: column; gap: 20px; }
.tpl-preview-header { display: flex; align-items: center; justify-content: space-between; }
.tpl-preview-title { font-size: 14px; font-weight: 600; color: var(--text-2); }
.tpl-preview-tag { padding: 4px 10px; border-radius: var(--r-full); background: var(--bg-2); border: 1px solid var(--border-subtle); font-size: 11px; color: var(--text-3); }
.tpl-preview-card { position: relative; border-radius: var(--r-xl); overflow: hidden; border: 1px solid var(--border-subtle); aspect-ratio: 3/4; max-width: 420px; box-shadow: var(--shadow-lg); }
.tpl-preview-card img { width: 100%; height: 100%; object-fit: cover; }
.tpl-preview-card video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.tpl-preview-card .preview-overlay { position: absolute; bottom: 0; left: 0; right: 0; padding: 20px; background: linear-gradient(transparent, rgba(6, 7, 12, 0.9)); }
.tpl-preview-hint { font-size: 13px; color: #fff; line-height: 1.6; text-shadow: 0 1px 3px rgba(0,0,0,.8); }
.tpl-preview-card .preview-placeholder { position: absolute; inset: 0; display: grid; place-items: center; background: var(--bg-3); color: var(--text-4); font-size: 13px; }

.tpl-stats { display: flex; gap: 16px; flex-wrap: wrap; }
.tpl-stat { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); }
.tpl-stat svg { color: var(--text-3); width: 14px; height: 14px; }
.tpl-stat strong { font-weight: 700; }

.tpl-progress { margin-top: 20px; display: none; }
.tpl-progress.show { display: block; }
.progress-bar { width: 100%; height: 6px; border-radius: 3px; background: var(--bg-3); overflow: hidden; margin-bottom: 8px; }
.progress-fill { height: 100%; border-radius: 3px; background: var(--accent-grad); transition: width 0.5s; width: 0; }
.progress-text { font-size: 13px; color: var(--text-2); text-align: center; }

.tpl-result { margin-top: 20px; display: none; text-align: center; }
.tpl-result.show { display: block; }
.tpl-result img, .tpl-result video { max-width: 100%; border-radius: var(--r-lg); margin-bottom: 16px; }
.tpl-result-actions { display: flex; gap: 12px; justify-content: center; }

@media (max-width: 600px) {
  .tpl-topbar { padding:0 16px; }
  .tpl-layout { gap:20px; padding:20px 16px 88px; }
  .tpl-panel { padding:24px 16px; border-radius:16px; }
  .tpl-preview { padding:0; }
}

.btn-spinner { display: none; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.3); border-top-color: #fff; border-radius: 50%; animation: spin .6s linear infinite; }
.btn-loading .btn-spinner { display: inline-block; }
.btn-loading .btn-text { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 作品(assets) ---------- */
.assets-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
@media (max-width: 600px) { .assets-grid { grid-template-columns: 1fr 1fr; gap: 12px; } }
.asset-card { background: var(--bg-2); border: 1px solid var(--border-subtle); border-radius: var(--r-lg); overflow: hidden; transition: all 0.25s; }
.asset-card:hover { border-color: var(--border-hover); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.asset-thumb { position: relative; aspect-ratio: 3/4; background: var(--bg-3); overflow: hidden; }
.asset-thumb img, .asset-thumb video { width: 100%; height: 100%; object-fit: cover; }
.asset-type-badge { position: absolute; top: 10px; right: 10px; padding: 3px 10px; border-radius: var(--r-full); background: rgba(6,7,12,.75); font-size: 10.5px; font-weight: 700; color: var(--text-1); backdrop-filter: blur(6px); }
.asset-body { padding: 13px 15px; }
.asset-name { font-size: 13px; font-weight: 700; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.asset-meta { font-size: 11.5px; color: var(--text-3); margin-bottom: 10px; }
.asset-actions { display: flex; gap: 8px; }
.asset-btn { flex: 1; text-align: center; padding: 7px 0; border-radius: var(--r-sm); font-size: 12px; font-weight: 600; text-decoration: none; background: var(--bg-3); color: var(--text-1); border: 1px solid var(--border); transition: all 0.2s; }
.asset-btn:hover { border-color: var(--accent); color: var(--accent-2); }

.filter-chips { display: flex; gap: 10px; margin-bottom: 24px; flex-wrap: wrap; }
.filter-chip { padding: 8px 18px; border-radius: var(--r-full); background: var(--bg-2); border: 1px solid var(--border); color: var(--text-2); font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.filter-chip.active { background: var(--accent-grad); color: #fff; border-color: transparent; }

.load-more-wrap { text-align: center; margin-top: 30px; }

/* ---------- 个人中心 / 通用容器 ---------- */
.page-container { max-width: 1240px; margin: 0 auto; padding: 90px 24px 60px; }
.page-container.narrow { max-width: 640px; }

.profile-card { background: var(--bg-2); border: 1px solid var(--border-subtle); border-radius: var(--r-xl); padding: 34px; text-align: center; margin-bottom: 20px; }
.profile-avatar { width: 72px; height: 72px; margin: 0 auto 14px; border-radius: 50%; background: var(--accent-grad); display: grid; place-items: center; font-size: 28px; font-weight: 800; color: #fff; box-shadow: 0 8px 24px var(--accent-glow); }
.profile-name { font-size: 19px; font-weight: 800; margin-bottom: 4px; }
.profile-email { font-size: 13px; color: var(--text-3); margin-bottom: 16px; }

.credits-display { display: flex; align-items: center; justify-content: center; gap: 20px; background: var(--bg-3); border: 1px solid var(--border-subtle); border-radius: var(--r-lg); padding: 18px; margin-top: 16px; }
.credits-num { font-size: 30px; font-weight: 800; background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.credits-label { font-size: 12px; color: var(--text-3); }

.panel { background: var(--bg-2); border: 1px solid var(--border-subtle); border-radius: var(--r-lg); padding: 24px; margin-bottom: 20px; }
.panel-title { font-size: 15px; font-weight: 700; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.panel-title svg { width: 17px; height: 17px; color: var(--accent-2); }

.history-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.history-table th { text-align: left; padding: 10px 12px; font-size: 11.5px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.04em; border-bottom: 1px solid var(--border-subtle); }
.history-table td { padding: 12px; border-bottom: 1px solid var(--border-subtle); color: var(--text-2); }
.history-table tr:last-child td { border-bottom: none; }
.history-table .amount { font-weight: 700; }
.history-table .amount.positive { color: var(--success); }
.history-table .amount.negative { color: var(--danger); }
.history-table .empty { text-align: center; padding: 30px; color: var(--text-3); }

/* ---------- 登录/注册 ---------- */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; position: relative; z-index: 1; }
.auth-card { width: 100%; max-width: 400px; background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--r-xl); padding: 40px 34px; box-shadow: var(--shadow-lg); }
.auth-logo { display: flex; flex-direction: column; align-items: center; margin-bottom: 28px; }
.auth-logo .brand-icon-hex { width: 52px; height: 52px; font-size: 22px; border-radius: 14px; margin-bottom: 12px; }
.auth-title { font-size: 21px; font-weight: 800; letter-spacing: -0.02em; }
.auth-sub { font-size: 12.5px; color: var(--text-3); margin-top: 4px; }
.auth-error { background: rgba(248, 113, 113, 0.1); border: 1px solid rgba(248, 113, 113, 0.25); color: var(--danger); font-size: 12.5px; padding: 10px 14px; border-radius: var(--r-md); margin-bottom: 16px; display: none; }
.auth-error.show { display: block; }
.auth-switch { text-align: center; margin-top: 20px; font-size: 13px; color: var(--text-3); }
.auth-switch a { color: var(--accent-2); text-decoration: none; font-weight: 600; }
.auth-switch a:hover { text-decoration: underline; }

/* ---------- 条款页 ---------- */
.terms-page { max-width: 760px; margin: 0 auto; padding: 110px 24px 80px; position: relative; z-index: 1; }
.terms-page h1 { font-size: 28px; font-weight: 800; margin-bottom: 24px; }
.terms-page h2 { font-size: 18px; font-weight: 700; margin: 28px 0 12px; }
.terms-page p { font-size: 14px; color: var(--text-2); line-height: 1.8; margin-bottom: 12px; }
.terms-page .terms-meta { font-size: 12.5px; color: var(--text-3); margin-bottom: 32px; }

/* ---------- 任务卡片(我的作品/进行中) ---------- */
.task-status-row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; }
.status-dot.pending { background: var(--warning); box-shadow: 0 0 8px var(--warning); }
.status-dot.processing { background: var(--accent-2); box-shadow: 0 0 8px var(--accent-2); animation: pulse 1.2s infinite; }
.status-dot.completed { background: var(--success); box-shadow: 0 0 8px var(--success); }
.status-dot.failed { background: var(--danger); box-shadow: 0 0 8px var(--danger); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

/* Shared light shell: keep legacy inner-page markup visually aligned with the home page. */
:root {
  --bg-0:#f6f6f8; --bg-1:#f6f6f8; --bg-2:#ffffff; --bg-3:#f1f1f4; --bg-4:#ebebef;
  --text-1:#1c1c22; --text-2:#555660; --text-3:#8d8d96; --text-4:#b1b1b8;
  --accent:#1b1b21; --accent-2:#555660; --accent-grad:#1b1b21; --accent-glow:rgba(28,28,35,.12);
  --border:#dedee5; --border-hover:#c8c8d0; --border-subtle:#e9e9ee;
  --success:#16845d; --warning:#a66a00; --danger:#c43b4b;
}
body:not(.kling-page) { background:#f6f6f8; color:#1c1c22; }
body:not(.kling-page) .glow-a, body:not(.kling-page) .glow-b, body:not(.kling-page) .glow-c { display:none; }
body:not(.kling-page) .nav { background:rgba(255,255,255,.94); border-bottom:1px solid #ececf0; backdrop-filter:blur(14px); }
body:not(.kling-page) .nav-link, body:not(.kling-page) .nav-login { color:#777782; }
body:not(.kling-page) .nav-link:hover, body:not(.kling-page) .nav-login:hover { color:#1c1c22; background:#f1f1f4; }
body:not(.kling-page) .brand-name, body:not(.kling-page) .brand-slogan { color:#1c1c22; }
body:not(.kling-page) .brand-slogan { color:#8d8d96; }
body:not(.kling-page) .brand-icon-hex { background:#17171c; border-color:#17171c; color:#fff; box-shadow:none; }
body:not(.kling-page) .nav-toggle { color:#1c1c22; border-color:#dedee5; }
body:not(.kling-page) .main-content { padding-top:34px; }
body:not(.kling-page) .page-head h1, body:not(.kling-page) .page-title h1 { color:#1c1c22; }
body:not(.kling-page) .page-head p, body:not(.kling-page) .page-title p { color:#777782; }
body:not(.kling-page) .panel, body:not(.kling-page) .profile-card, body:not(.kling-page) .tpl-panel, body:not(.kling-page) .tpl-preview-card, body:not(.kling-page) .asset-card { background:#fff; border-color:#e9e9ee; box-shadow:0 2px 10px rgba(28,28,35,.05); }
body:not(.kling-page) .form-input, body:not(.kling-page) .param-input, body:not(.kling-page) select, body:not(.kling-page) textarea { background:#fff; color:#1c1c22; border-color:#dedee5; }
body:not(.kling-page) .form-input:focus, body:not(.kling-page) .param-input:focus { border-color:#1c1c22; box-shadow:0 0 0 3px rgba(28,28,35,.08); }
body:not(.kling-page) .btn-primary, body:not(.kling-page) .tpl-submit { background:#1b1b21; border-color:#1b1b21; color:#fff; }
body:not(.kling-page) .btn-primary:hover, body:not(.kling-page) .tpl-submit:hover { background:#34343c; }
body:not(.kling-page) .btn-ghost, body:not(.kling-page) .asset-btn { background:#fff; color:#1c1c22; border-color:#dedee5; }
body:not(.kling-page) .btn-ghost:hover, body:not(.kling-page) .asset-btn:hover { background:#f1f1f4; border-color:#1c1c22; }
body:not(.kling-page) .tpl-topbar { background:rgba(255,255,255,.94); border-bottom-color:#ececf0; }
body:not(.kling-page) .tpl-back, body:not(.kling-page) .tpl-est { color:#777782; }
body:not(.kling-page) .tpl-badge, body:not(.kling-page) .tpl-step { background:#f1f1f4; border-color:#e9e9ee; color:#555660; }
body:not(.kling-page) .tpl-step-num { background:#1b1b21; }
body:not(.kling-page) .mobile-app { color:#1c1c22; }
body:not(.kling-page) .mobile-header { border-bottom:1px solid #ececf0; }
body:not(.kling-page) .mobile-brand { color:#1c1c22; }
body:not(.kling-page) .case-state, body:not(.kling-page) .case-context { background:#fff; border-color:#e9e9ee; color:#777782; }
body:not(.kling-page) .case-media { border-color:#e9e9ee; }
body:not(.kling-page) .case-detail-category { color:#555660; }
body:not(.kling-page) .case-detail-desc { color:#777782; }
body:not(.kling-page) .case-bottom-nav { background:rgba(255,255,255,.96); border-top-color:#e9e9ee; }
body:not(.kling-page) .case-bottom-tab { color:#92929a; }
body:not(.kling-page) .case-bottom-tab.active { color:#1b1b21; }
body:not(.kling-page) .auth-page { background:#f6f6f8; }
body:not(.kling-page) .auth-card { background:#fff; border-color:#e9e9ee; box-shadow:0 12px 32px rgba(28,28,35,.06); }
body:not(.kling-page) .auth-tabs { border-color:#e9e9ee; }
body:not(.kling-page) .auth-tabs button { color:#8d8d96; }
body:not(.kling-page) .auth-tabs button.active { color:#1c1c22; border-color:#1c1c22; }
body:not(.kling-page) .auth-card .form-input { background:#fff; color:#1c1c22; border-color:#dedee5; }
body:not(.kling-page) .auth-card .form-label { color:#555660; }
/* Match the discovery header rhythm on legacy inner pages. */
body:not(.kling-page) .nav-inner { height:56px; max-width:1180px; }
body:not(.kling-page) .nav { height:56px; }
body:not(.kling-page) .nav-link,
body:not(.kling-page) .nav-login { border-radius:8px; }
body:not(.kling-page) .main-content,
body:not(.kling-page) .page-container,
body:not(.kling-page) .tpl-layout,
body:not(.kling-page) .terms-page { width:min(100% - 32px,1180px); margin-left:auto; margin-right:auto; }
@media (min-width:761px) {
  body:not(.kling-page) .nav { height:66px; }
  body:not(.kling-page) .nav-inner { height:66px; }
}

/* Login / SMS login: polished segmented auth form, scoped to auth pages. */
body:not(.kling-page) .auth-page {
  min-height:100vh;
  padding:32px 16px;
  background:#f6f6f8;
}
body:not(.kling-page) .auth-card {
  width:min(100%,430px);
  padding:40px 34px 30px;
  border:1px solid #e5e5eb;
  border-radius:24px;
  background:#fff;
  box-shadow:0 18px 48px rgba(28,28,35,.08);
}
body:not(.kling-page) .auth-logo { margin-bottom:25px; }
body:not(.kling-page) .auth-logo .brand-icon-hex {
  width:52px; height:52px; margin-bottom:14px;
  border-radius:15px; background:#1b1b21; color:#fff;
  font-size:22px; box-shadow:0 8px 18px rgba(28,28,35,.14);
}
body:not(.kling-page) .auth-title { color:#1c1c22; font-size:22px; line-height:1.25; }
body:not(.kling-page) .auth-sub { color:#92929b; font-size:13px; margin-top:7px; }
body:not(.kling-page) .auth-tabs {
  display:grid; grid-template-columns:1fr 1fr; gap:4px;
  width:100%; padding:4px; margin:0 0 24px;
  border:1px solid #e7e7ed; border-radius:11px; background:#f5f5f7;
}
body:not(.kling-page) .auth-tabs button {
  appearance:none; border:0; border-radius:8px; padding:10px 8px;
  background:transparent; color:#898993; font-size:13px; font-weight:600;
  line-height:1.2; cursor:pointer; transition:all .2s ease;
}
body:not(.kling-page) .auth-tabs button:hover { color:#1c1c22; }
body:not(.kling-page) .auth-tabs button.active {
  color:#1c1c22; background:#fff; border:0;
  box-shadow:0 2px 8px rgba(28,28,35,.08);
}
body:not(.kling-page) .auth-card .form-group { margin-bottom:18px; }
body:not(.kling-page) .auth-card .form-label {
  margin-bottom:8px; color:#45464f; font-size:12.5px; font-weight:650;
}
body:not(.kling-page) .auth-card .form-input {
  width:100%; min-height:46px; padding:11px 14px;
  border:1px solid #dedee6; border-radius:12px; background:#fff;
  color:#1c1c22; font-size:14px; outline:none; transition:all .2s ease;
}
body:not(.kling-page) .auth-card .form-input::placeholder { color:#b4b4bd; }
body:not(.kling-page) .auth-card .form-input:focus {
  border-color:#1c1c22; box-shadow:0 0 0 3px rgba(28,28,35,.08);
}
body:not(.kling-page) #codeGroup > div { display:flex; gap:9px !important; }
body:not(.kling-page) #codeGroup .form-input { min-width:0; flex:1; }
body:not(.kling-page) #sendCodeBtn {
  flex:0 0 106px; min-height:46px; padding:0 10px;
  border:1px solid #dedee6; border-radius:12px; background:#fff;
  color:#1c1c22; font-size:12px; white-space:nowrap;
}
body:not(.kling-page) #sendCodeBtn:hover { background:#f5f5f7; border-color:#1c1c22; }
body:not(.kling-page) .auth-card .btn-primary {
  min-height:50px; border-radius:13px; margin-top:5px;
  background:#1b1b21; border-color:#1b1b21; box-shadow:0 8px 18px rgba(28,28,35,.14);
  font-size:15px; font-weight:700;
}
body:not(.kling-page) .auth-card .btn-primary:hover { background:#34343c; transform:translateY(-1px); }
body:not(.kling-page) .auth-switch { margin-top:22px; color:#92929b; font-size:13px; }
body:not(.kling-page) .auth-switch a { color:#33343b; font-weight:700; }
@media (max-width:480px) {
  body:not(.kling-page) .auth-page { padding:20px 14px; }
  body:not(.kling-page) .auth-card { padding:32px 20px 26px; border-radius:20px; }
}

/* ============================================================
   Studio refresh · 2026.09
   A warmer, editorial surface for the creator-facing product.
   The data contracts and existing page markup stay untouched.
   ============================================================ */
:root {
  --studio-paper: #f4f2ed;
  --studio-surface: #fbfaf7;
  --studio-white: #ffffff;
  --studio-ink: #17181b;
  --studio-copy: #45484d;
  --studio-muted: #7c8187;
  --studio-line: #e2e0da;
  --studio-line-strong: #cecbc3;
  --studio-coral: #ef6a54;
  --studio-coral-dark: #c94d3b;
  --studio-blue: #4864c8;
  --studio-mint: #178a72;
  --studio-yellow: #d69b25;
  --studio-shadow: 0 18px 48px rgba(38, 35, 28, .09);
  --studio-shadow-soft: 0 5px 20px rgba(38, 35, 28, .07);
}

html { background: var(--studio-paper); }
body:not(.kling-page), body.kling-page {
  background: var(--studio-paper);
  color: var(--studio-ink);
}
body:not(.kling-page)::before, body.kling-page::before {
  display: block;
  opacity: .22;
  background-image: linear-gradient(rgba(24, 25, 27, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(24, 25, 27, .045) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 74%);
}
::selection { background: rgba(239, 106, 84, .22); color: var(--studio-ink); }

/* Shared navigation */
body:not(.kling-page) .nav {
  position: sticky;
  top: 0;
  background: rgba(251, 250, 247, .9);
  border-bottom-color: rgba(206, 203, 195, .78);
  box-shadow: 0 1px 0 rgba(255,255,255,.8);
}
body:not(.kling-page) .nav-inner { height: 68px; }
body:not(.kling-page) .brand-icon-hex {
  background: var(--studio-ink);
  border: 1px solid var(--studio-ink);
  color: #fff;
  border-radius: 11px;
  box-shadow: 4px 4px 0 rgba(239, 106, 84, .35);
}
body:not(.kling-page) .brand-name { color: var(--studio-ink); letter-spacing: -.03em; }
body:not(.kling-page) .brand-slogan { color: var(--studio-muted); }
body:not(.kling-page) .nav-link, body:not(.kling-page) .nav-login { color: var(--studio-muted); }
body:not(.kling-page) .nav-link:hover, body:not(.kling-page) .nav-login:hover { color: var(--studio-ink); background: #ebe9e3; }
body:not(.kling-page) .nav-actions .btn-primary { background: var(--studio-coral); border-color: var(--studio-coral); color: #fff; box-shadow: 0 7px 18px rgba(239,106,84,.2); }
body:not(.kling-page) .nav-actions .btn-primary:hover { background: var(--studio-coral-dark); }

/* Home discovery */
.kling-page { padding-bottom: 84px; }
.kling-header {
  height: 68px;
  padding: 0 max(18px, calc((100vw - 1240px) / 2));
  background: rgba(251, 250, 247, .92);
  border-bottom-color: var(--studio-line);
  box-shadow: 0 1px 0 rgba(255,255,255,.8);
}
.kling-logo { background: var(--studio-ink); border-radius: 10px; box-shadow: 4px 4px 0 rgba(239,106,84,.28); }
.kling-brand { display: inline-flex; align-items: center; gap: 9px; color: var(--studio-ink); text-decoration: none; flex: none; }
.kling-brand strong { font-size: 15px; letter-spacing: -.035em; }
.kling-topnav { gap: 25px; }
.kling-topnav a { height: 68px; color: var(--studio-muted); font-weight: 600; }
.kling-topnav a.active { color: var(--studio-ink); }
.kling-topnav a.active:after { height: 3px; background: var(--studio-coral); }
.kling-credit-link { background: var(--studio-ink); color: #fff; border-radius: 18px; padding: 0 12px; box-shadow: 0 5px 14px rgba(23,24,27,.16); }
.kling-credit-link:hover { background: #2e3035; color: #fff; }
.kling-credit-link .credit-icon { background: var(--studio-coral); }
.kling-shell { width: min(100% - 36px, 1240px); padding-top: 24px; }
.kling-carousel { height: 344px; border-radius: 22px; background: #dfddd7; box-shadow: var(--studio-shadow); }
.kling-feature-copy { left: 34px; right: 34px; bottom: 32px; }
.kling-feature-copy small { color: #ffd2c8; font: 600 11px var(--mono); letter-spacing: .09em; text-transform: uppercase; }
.kling-feature-copy h1 { max-width: 610px; font-size: clamp(30px, 4vw, 48px); letter-spacing: -.055em; }
.kling-feature-copy p { max-width: 530px; color: rgba(255,255,255,.84); }
.kling-feature-copy a { min-height: 42px; border-radius: 12px; background: var(--studio-coral); color: #fff; padding: 0 17px; box-shadow: 0 8px 20px rgba(0,0,0,.18); }
.kling-feature-copy a:hover { background: #ff7d68; }
.kling-feature-shade { background: linear-gradient(90deg, rgba(16,18,21,.8), rgba(16,18,21,.28) 62%, rgba(16,18,21,.02)); }
.kling-dots i { background: rgba(255,255,255,.58); }
.kling-dots i.active { background: var(--studio-coral); }
.kling-tools-section { padding: 30px 0 18px; }
.kling-section-row { margin-bottom: 16px; }
.kling-section-row h2 { color: var(--studio-ink); font-size: 20px; letter-spacing: -.04em; }
.kling-section-row a { color: var(--studio-muted); }
.kling-tool { width: 106px; min-width: 106px; }
.kling-tool b { width: 72px; height: 72px; border-radius: 18px; color: var(--studio-ink); border-color: var(--studio-line); box-shadow: var(--studio-shadow-soft); font-size: 20px; }
.kling-tool:nth-child(1) b, .kling-tool:nth-child(4) b { background: #fff1eb; color: var(--studio-coral-dark); }
.kling-tool:nth-child(2) b, .kling-tool:nth-child(5) b { background: #edf0ff; color: var(--studio-blue); }
.kling-tool:nth-child(3) b, .kling-tool:nth-child(6) b { background: #e7f4f0; color: var(--studio-mint); }
.kling-tool:nth-child(7) b { background: #fff5dc; color: var(--studio-yellow); }
.kling-tool span { color: var(--studio-ink); font-size: 12px; }
.kling-tool small { color: var(--studio-muted); }
.kling-feed { padding-top: 21px; }
.kling-feed-head { margin-bottom: 14px; }
.kling-feed-tabs button { color: var(--studio-muted); }
.kling-feed-tabs button.active { color: var(--studio-ink); }
.kling-publish { color: var(--studio-copy); }
.kling-publish span { color: var(--studio-coral); }
.kling-tags { gap: 9px; }
.kling-tags button { background: #ebe9e3; color: var(--studio-copy); }
.kling-tags button:hover { background: #dfddd6; }
.kling-tags button.active { background: var(--studio-ink); color: #fff; }
.kling-case { border: 1px solid var(--studio-line); border-radius: 14px; box-shadow: var(--studio-shadow-soft); transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease; }
.kling-case:hover { transform: translateY(-4px); border-color: rgba(239,106,84,.5); box-shadow: 0 14px 30px rgba(38,35,28,.13); }
.kling-case-media { background: #e5e3dd; }
.kling-case-info { padding: 11px 12px 13px; }
.kling-case-info b { color: var(--studio-ink); }
.kling-case-info span { color: var(--studio-muted); }
.kling-video-dot{position:absolute!important;z-index:2;left:50%!important;right:auto!important;top:50%!important;bottom:auto!important;display:grid!important;place-items:center;width:48px!important;height:48px!important;padding-left:3px;border:1px solid #ffffff80;border-radius:50%;background:#173d2dd9!important;color:#fff!important;font-size:17px!important;line-height:1;box-shadow:0 9px 24px #0d241a59;transform:translate(-50%,-50%);backdrop-filter:blur(5px);transition:transform .2s ease,background .2s ease,box-shadow .2s ease}.kling-case:hover .kling-video-dot{background:#287a58ed!important;box-shadow:0 11px 28px #0d241a70;transform:translate(-50%,-50%) scale(1.07)}
.kling-empty { background: var(--studio-surface); color: var(--studio-muted); border: 1px dashed var(--studio-line-strong); }
.app-bottom-nav, .kling-bottom-nav { background: rgba(251,250,247,.95); border-top-color: var(--studio-line); }
.app-bottom-nav a { color: var(--studio-muted); }
.app-bottom-nav a.is-active { color: var(--studio-coral); }
.app-bottom-nav .nav-icon { color: inherit; }

/* Catalog, workbench and account pages */
body:not(.kling-page) .main-content { padding-top: 42px; padding-bottom: 84px; }
body:not(.kling-page) .page-head { padding: 17px 0 25px; }
body:not(.kling-page) .page-head h2, body:not(.kling-page) .page-head h1 { color: var(--studio-ink); font-size: clamp(28px, 4vw, 40px); letter-spacing: -.055em; }
body:not(.kling-page) .page-head p { color: var(--studio-muted); font-size: 14px; }
.cat-tabs, .filter-chips { gap: 8px; margin-bottom: 22px; }
.cat-tab, .filter-chip { min-height: 38px; padding: 0 14px; border-radius: 10px; background: var(--studio-surface); border-color: var(--studio-line); color: var(--studio-copy); }
.cat-tab:hover, .filter-chip:hover { border-color: var(--studio-coral); color: var(--studio-coral-dark); }
.cat-tab.active, .filter-chip.active { background: var(--studio-ink); border-color: var(--studio-ink); color: #fff; box-shadow: 3px 3px 0 rgba(239,106,84,.28); }
.template-grid { gap: 17px; }
.template-card { border: 1px solid var(--studio-line); border-radius: 16px; background: var(--studio-surface); box-shadow: var(--studio-shadow-soft); }
.template-card:hover { border-color: rgba(239,106,84,.55); box-shadow: 0 16px 30px rgba(38,35,28,.12); }
.template-cover { background: #e7e4de; }
.template-cover:after { content: ''; position: absolute; inset: 0; pointer-events: none; border: 1px solid rgba(255,255,255,.34); }
.template-badge { background: rgba(23,24,27,.82); border-color: transparent; color: #fff; }
.template-body { padding: 16px 17px 17px; }
.template-title { color: var(--studio-ink); font-size: 16px; }
.template-desc { color: var(--studio-muted); }
.open-btn { color: var(--studio-coral-dark); }
.open-btn svg { color: var(--studio-coral); }
.template-cost-tag { color: var(--studio-muted); }
.template-cost-tag b { color: var(--studio-blue); }
.skeleton-card { background: var(--studio-surface); border-color: var(--studio-line); }
.skeleton-cover, .skeleton-line {
  background: linear-gradient(100deg, #ece9e2 20%, #f8f6f1 42%, #ece9e2 64%);
  background-size: 240% 100%;
  animation: studioShimmer 1.7s ease-in-out infinite;
}
@keyframes studioShimmer { 0% { background-position: 120% 0; } 100% { background-position: -80% 0; } }

body:not(.kling-page) .tpl-topbar { background: rgba(251,250,247,.94); border-bottom-color: var(--studio-line); }
body:not(.kling-page) .tpl-topbar-inner { height: 68px; }
body:not(.kling-page) .tpl-back:hover { color: var(--studio-coral); }
body:not(.kling-page) .tpl-est strong { color: var(--studio-coral-dark); }
body:not(.kling-page) .tpl-layout { gap: 24px; padding-top: 30px; }
body:not(.kling-page) .tpl-panel { border-radius: 18px; padding: 30px; box-shadow: var(--studio-shadow); }
body:not(.kling-page) .tpl-badge { background: #fff1eb; border-color: #ffd2c8; color: var(--studio-coral-dark); border-radius: 9px; }
body:not(.kling-page) .tpl-panel h1 { font-size: clamp(27px, 4vw, 38px); letter-spacing: -.055em; }
body:not(.kling-page) .tpl-panel-desc { color: var(--studio-copy); }
body:not(.kling-page) .tpl-step { background: #f2f0eb; border-color: var(--studio-line); color: var(--studio-copy); border-radius: 9px; }
body:not(.kling-page) .tpl-step-num { background: var(--studio-coral); }
body:not(.kling-page) .upload-zone { border-color: #cfcac0; background: #f8f6f1; border-radius: 13px; transition: border-color .2s, background .2s, transform .2s; }
body:not(.kling-page) .upload-zone:hover { border-color: var(--studio-coral); background: #fff9f5; transform: translateY(-1px); }
body:not(.kling-page) .upload-zone-label { color: var(--studio-ink); }
body:not(.kling-page) .upload-zone-hint { color: var(--studio-muted); }
body:not(.kling-page) .param-group { border-color: var(--studio-line); }
body:not(.kling-page) .param-label { color: var(--studio-copy); }
body:not(.kling-page) .param-input { background: #fff; border-color: var(--studio-line-strong); }
body:not(.kling-page) .param-input:focus { border-color: var(--studio-coral); box-shadow: 0 0 0 3px rgba(239,106,84,.14); }
body:not(.kling-page) .tpl-submit { background: var(--studio-coral); border-color: var(--studio-coral); box-shadow: 0 9px 20px rgba(239,106,84,.22); }
body:not(.kling-page) .tpl-submit:hover { background: var(--studio-coral-dark); box-shadow: 0 12px 26px rgba(239,106,84,.27); }
body:not(.kling-page) .tpl-cost .current { color: var(--studio-blue); }
body:not(.kling-page) .tpl-preview-header { color: var(--studio-copy); }
body:not(.kling-page) .tpl-preview-tag { background: #f2f0eb; border-color: var(--studio-line); color: var(--studio-muted); }
body:not(.kling-page) .tpl-preview-card { border-radius: 18px; border-color: var(--studio-line); box-shadow: var(--studio-shadow); background: #e5e3dd; }
body:not(.kling-page) .tpl-preview-card .preview-placeholder { background: #e9e6df; color: var(--studio-muted); }
body:not(.kling-page) .tpl-stat { color: var(--studio-copy); }
body:not(.kling-page) .tpl-stat svg { color: var(--studio-coral); }

body:not(.kling-page) .profile-card { border-radius: 20px; padding: 34px; box-shadow: var(--studio-shadow); }
body:not(.kling-page) .profile-avatar { background: var(--studio-ink); border-radius: 20px; box-shadow: 5px 5px 0 rgba(239,106,84,.3); }
body:not(.kling-page) .profile-name { font-size: 23px; letter-spacing: -.04em; }
body:not(.kling-page) .credits-num { color: var(--studio-coral-dark); }
body:not(.kling-page) .panel { border-radius: 16px; padding: 22px; box-shadow: var(--studio-shadow-soft); }
body:not(.kling-page) .panel-title { color: var(--studio-ink); }
body:not(.kling-page) .panel-title svg { color: var(--studio-coral); }
body:not(.kling-page) .history-table th { color: var(--studio-muted); background: #f6f4ef; border-bottom-color: var(--studio-line); }
body:not(.kling-page) .history-table td { border-bottom-color: #efede8; color: var(--studio-copy); }
body:not(.kling-page) .history-table tr:hover td { background: #fffaf6; }
body:not(.kling-page) .amount.positive { color: var(--studio-mint); }
body:not(.kling-page) .amount.negative { color: var(--studio-coral-dark); }
.assets-grid { gap: 17px; }
body:not(.kling-page) #referralPanel { grid-template-columns: minmax(0, 1fr) 160px !important; }
body:not(.kling-page) .asset-card { border-radius: 15px; border-color: var(--studio-line); box-shadow: var(--studio-shadow-soft); }
body:not(.kling-page) .asset-card:hover { border-color: rgba(239,106,84,.5); box-shadow: 0 14px 28px rgba(38,35,28,.12); }
body:not(.kling-page) .asset-thumb { background: #e7e4de; }
body:not(.kling-page) .asset-type-badge { background: var(--studio-ink); color: #fff; }
body:not(.kling-page) .asset-btn { background: #f5f3ee; border-color: var(--studio-line); }
body:not(.kling-page) .asset-btn:hover { border-color: var(--studio-coral); color: var(--studio-coral-dark); background: #fff6f2; }

/* Authentication and legal pages */
body:not(.kling-page) .auth-page { background: var(--studio-paper); }
body:not(.kling-page) .auth-card { border-radius: 20px; border-color: var(--studio-line); box-shadow: var(--studio-shadow); }
body:not(.kling-page) .auth-logo .brand-icon-hex { background: var(--studio-ink); border-radius: 16px; box-shadow: 5px 5px 0 rgba(239,106,84,.3); }
body:not(.kling-page) .auth-title { letter-spacing: -.045em; }
body:not(.kling-page) .auth-card .form-input:focus { border-color: var(--studio-coral); box-shadow: 0 0 0 3px rgba(239,106,84,.13); }
body:not(.kling-page) .auth-tabs button.active { border-bottom: 2px solid var(--studio-coral); color: var(--studio-ink); }
body:not(.kling-page) .auth-card .btn-primary { background: var(--studio-coral); border-color: var(--studio-coral); box-shadow: 0 9px 20px rgba(239,106,84,.2); }
body:not(.kling-page) .auth-card .btn-primary:hover { background: var(--studio-coral-dark); }
body:not(.kling-page) .auth-switch a { color: var(--studio-coral-dark); }
body:not(.kling-page) .terms-card { border-radius: 18px; border-color: var(--studio-line); box-shadow: var(--studio-shadow-soft); }
body:not(.kling-page) .terms-back { color: var(--studio-coral-dark); }

/* Case detail has its own compact shell. */
body:not(.kling-page) .mobile-app { max-width: 720px; padding-top: 28px; }
body:not(.kling-page) .mobile-header { min-height: 52px; margin-bottom: 22px; }
body:not(.kling-page) .mobile-brand { color: var(--studio-ink); }
body:not(.kling-page) .case-back { color: var(--studio-muted); }
body:not(.kling-page) .case-back:hover { color: var(--studio-coral-dark); }
body:not(.kling-page) .case-media { border-radius: 18px; border-color: var(--studio-line); box-shadow: var(--studio-shadow); background: #d9d6cf; }
body:not(.kling-page) .case-detail-category { color: var(--studio-coral-dark); text-transform: uppercase; letter-spacing: .08em; }
body:not(.kling-page) .case-detail-title { letter-spacing: -.05em; }
body:not(.kling-page) .case-detail-desc { color: var(--studio-copy); }
body:not(.kling-page) .case-cta { background: var(--studio-coral); border-color: var(--studio-coral); box-shadow: 0 10px 24px rgba(239,106,84,.25); }

@media (max-width: 760px) {
  .kling-header { height: 60px; padding: 0 16px; }
  .kling-logo { width: 30px; height: 30px; }
  .kling-brand strong { font-size: 14px; }
  .kling-shell { width: min(100% - 28px, 600px); padding-top: 15px; }
  .kling-carousel { height: 280px; border-radius: 18px; }
  .kling-feature-copy { left: 20px; right: 20px; bottom: 22px; }
  .kling-feature-copy h1 { font-size: 30px; }
  .kling-tools-section { padding-top: 25px; }
  .kling-tools { margin-right: -14px; padding-right: 14px; }
  .kling-tool { width: 88px; min-width: 88px; }
  .kling-tool b { width: 60px; height: 60px; border-radius: 16px; }
  .kling-case-grid { gap: 10px; }
  .kling-case-info { padding: 9px 10px 11px; }
  body:not(.kling-page) .main-content { padding-top: 27px; }
  body:not(.kling-page) .page-head { padding-top: 6px; }
  body:not(.kling-page) .page-head h2 { font-size: 30px; }
  body:not(.kling-page) .tpl-panel { padding: 22px 18px; border-radius: 16px; }
  body:not(.kling-page) .tpl-layout { padding-left: 14px; padding-right: 14px; }
  body:not(.kling-page) .tpl-preview-card { border-radius: 16px; }
  body:not(.kling-page) .profile-card { padding: 27px 20px; }
  body:not(.kling-page) .panel { padding: 18px 15px; }
  body:not(.kling-page) .mobile-app { padding-top: 19px; }
  body:not(.kling-page) #referralPanel { grid-template-columns: 1fr !important; gap: 14px !important; }
  body:not(.kling-page) #referralPanel > div:last-child { justify-self: start; }
}

@media (prefers-reduced-motion: reduce) {
  .kling-case, .template-card, .asset-card, .upload-zone { transition: none; }
}

/* Recharge page is intentionally inline-scoped in the original document; use
   a more specific scope here so the studio palette wins without changing its JS. */
body.kling-page.recharge-page .recharge-shell { color: var(--studio-ink); }
body.kling-page.recharge-page .recharge-head h1 { font-size: clamp(30px, 4vw, 42px); letter-spacing: -.055em; }
body.kling-page.recharge-page .recharge-head p { color: var(--studio-muted) !important; }
body.kling-page.recharge-page .balance-card { background: var(--studio-ink) !important; border-radius: 18px !important; box-shadow: var(--studio-shadow) !important; }
body.kling-page.recharge-page .balance-icon { background: var(--studio-coral) !important; color: #fff !important; }
body.kling-page.recharge-page .product-card { border-color: var(--studio-line) !important; border-radius: 15px !important; box-shadow: var(--studio-shadow-soft) !important; }
body.kling-page.recharge-page .product-card:hover, body.kling-page.recharge-page .product-card.selected { border-color: var(--studio-coral) !important; box-shadow: 0 12px 26px rgba(38,35,28,.12) !important; }
body.kling-page.recharge-page .product-card.selected { outline-color: rgba(239,106,84,.18) !important; }
body.kling-page.recharge-page .product-credits { color: var(--studio-ink); }
body.kling-page.recharge-page .product-price { color: var(--studio-copy); }
body.kling-page.recharge-page .product-action { background: var(--studio-coral) !important; }
body.kling-page.recharge-page .product-action:hover { background: var(--studio-coral-dark) !important; }
body.kling-page.recharge-page .recharge-note { background: #ebe9e3 !important; color: var(--studio-copy) !important; }
body.kling-page.recharge-page .pay-mask { background: rgba(23,24,27,.46) !important; }
body.kling-page.recharge-page .pay-sheet { border: 1px solid var(--studio-line); border-radius: 17px !important; box-shadow: var(--studio-shadow) !important; }
body.kling-page.recharge-page .pay-option { border-color: var(--studio-line) !important; }
body.kling-page.recharge-page .pay-option:hover { border-color: var(--studio-coral) !important; color: var(--studio-coral-dark); }
body.kling-page.recharge-page .recharge-back { color: var(--studio-coral-dark) !important; }

/* ============================================================
   Case + asset archive refresh
   ============================================================ */
.studio-header {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 30px;
  padding: 0 max(18px, calc((100vw - 1180px) / 2));
  background: rgba(251, 250, 247, .92);
  border-bottom: 1px solid var(--studio-line);
  box-shadow: 0 1px 0 rgba(255,255,255,.8);
  backdrop-filter: blur(16px);
}
.studio-header .brand { flex: none; }
.studio-header .brand-name { font-size: 15px; }
.studio-nav { display: flex; align-items: center; gap: 8px; }
.studio-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 13px;
  color: var(--studio-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 650;
  border-radius: 9px;
}
.studio-nav a:hover { color: var(--studio-ink); background: #efede8; }
.studio-nav a.active { color: var(--studio-ink); }
.studio-nav a.active:after { content: ''; position: absolute; left: 13px; right: 13px; bottom: 0; height: 3px; border-radius: 3px; background: var(--studio-coral); }
.studio-header .nav-actions { margin-left: auto; }
.studio-header .nav-actions .nav-login { padding: 7px 10px; }
.case-header-back { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; color: var(--studio-muted); text-decoration: none; font-size: 12px; }
.case-header-back:hover { color: var(--studio-coral-dark); }
.case-header-back svg, .assets-new-btn svg, .case-cta svg, .assets-empty .btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Asset archive */
.assets-shell { width: min(100% - 36px, 1120px); margin: 0 auto; padding: 46px 0 84px; }
.assets-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; }
.studio-eyebrow, .case-section-kicker { color: var(--studio-coral-dark); font: 700 11px var(--mono); letter-spacing: .13em; }
.assets-intro h1 { margin: 9px 0 8px; color: var(--studio-ink); font-size: clamp(34px, 5vw, 52px); line-height: 1.03; letter-spacing: -.065em; }
.assets-intro p { margin: 0; color: var(--studio-muted); font-size: 14px; }
.assets-new-btn { display: inline-flex; align-items: center; gap: 9px; min-height: 45px; padding: 0 16px; border-radius: 11px; background: var(--studio-ink); color: #fff; font-size: 13px; font-weight: 700; text-decoration: none; box-shadow: 4px 4px 0 rgba(239,106,84,.26); transition: transform .2s, background .2s; }
.assets-new-btn:hover { background: #303238; transform: translateY(-2px); }
.assets-overview { display: flex; align-items: center; gap: 22px; margin-top: 32px; padding: 19px 22px; border-radius: 15px; background: var(--studio-ink); color: #fff; box-shadow: var(--studio-shadow); }
.overview-main { display: flex; align-items: baseline; gap: 12px; }
.overview-label { color: #bfc2c7; font-size: 12px; white-space: nowrap; }
.overview-main strong { color: #fff; font-size: 31px; line-height: 1; letter-spacing: -.055em; }
.overview-divider { width: 1px; height: 28px; background: rgba(255,255,255,.2); }
.overview-note { display: flex; align-items: center; gap: 8px; color: #c0c3c7; font-size: 12px; }
.overview-pulse { width: 7px; height: 7px; border-radius: 50%; background: #7ad7bd; box-shadow: 0 0 0 4px rgba(122,215,189,.12); }
.assets-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 32px 0 16px; }
.assets-toolbar .filter-chips { margin: 0; }
.assets-toolbar .filter-chip { min-height: 36px; padding: 0 15px; }
.assets-sort-label { color: var(--studio-muted); font: 11px var(--mono); letter-spacing: .04em; }
.assets-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; align-items: start; }
.asset-card { min-width: 0; overflow: hidden; border: 1px solid var(--studio-line); border-radius: 15px; background: var(--studio-surface); box-shadow: var(--studio-shadow-soft); animation: assetRise .42s both; animation-delay: calc(var(--asset-delay, 0) * 45ms); }
@keyframes assetRise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.asset-card:hover { border-color: rgba(239,106,84,.58); box-shadow: 0 16px 32px rgba(38,35,28,.13); transform: translateY(-3px); }
.asset-thumb { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: #e4e1da; }
.asset-thumb > img, .asset-thumb > video { display: block; width: 100%; height: 100%; object-fit: cover; }
.asset-thumb-top { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; justify-content: space-between; align-items: center; pointer-events: none; }
.asset-type-badge { display: inline-flex; align-items: center; min-height: 24px; padding: 0 8px; border-radius: 7px; background: rgba(23,24,27,.84); color: #fff; font-size: 10px; font-weight: 700; }
.asset-index { color: rgba(255,255,255,.78); font: 11px var(--mono); text-shadow: 0 1px 4px rgba(0,0,0,.35); }
.asset-media-placeholder { display: grid; place-items: center; width: 100%; height: 100%; color: var(--studio-muted); background: #e8e5de; font-size: 12px; }
.asset-hover-actions { position: absolute; inset: auto 9px 9px; display: flex; gap: 7px; opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .2s; }
.asset-card:hover .asset-hover-actions, .asset-card:focus-within .asset-hover-actions { opacity: 1; transform: translateY(0); }
.asset-hover-actions a { flex: 1; display: inline-flex; align-items: center; justify-content: center; min-height: 34px; border-radius: 8px; background: rgba(251,250,247,.94); color: var(--studio-ink); text-decoration: none; font-size: 11px; font-weight: 700; box-shadow: 0 3px 10px rgba(0,0,0,.14); }
.asset-hover-actions a:hover { color: var(--studio-coral-dark); background: #fff; }
.asset-body { padding: 13px 14px 14px; }
.asset-name { overflow: hidden; color: var(--studio-ink); font-size: 13px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.asset-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 7px; color: var(--studio-muted); font-size: 11px; }
.asset-meta time { color: #a1a4a8; }
.asset-skeleton { overflow: hidden; border: 1px solid var(--studio-line); border-radius: 15px; background: var(--studio-surface); }
.asset-skeleton > div { aspect-ratio: 4 / 5; background: linear-gradient(100deg, #e9e6df 20%, #f8f6f1 43%, #e9e6df 66%); background-size: 230% 100%; animation: studioShimmer 1.7s ease-in-out infinite; }
.asset-skeleton span, .asset-skeleton i { display: block; width: 60%; height: 11px; margin: 13px 14px 9px; border-radius: 6px; background: #e9e6df; }
.asset-skeleton i { width: 38%; margin-top: 0; margin-bottom: 15px; }
.assets-empty { display: grid; justify-items: center; padding: 76px 20px; text-align: center; border: 1px dashed var(--studio-line-strong); border-radius: 16px; background: rgba(251,250,247,.72); }
.assets-empty[hidden] { display: none; }
.empty-mark { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 15px; background: #fff1eb; color: var(--studio-coral); }
.empty-mark svg { width: 27px; height: 27px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.assets-empty h2 { margin: 18px 0 6px; color: var(--studio-ink); font-size: 20px; letter-spacing: -.035em; }
.assets-empty p { max-width: 320px; margin: 0 0 20px; color: var(--studio-muted); font-size: 13px; }
.assets-empty .btn { min-height: 42px; background: var(--studio-coral); border-color: var(--studio-coral); }
.assets-empty .btn:hover { background: var(--studio-coral-dark); }
.assets-empty .btn svg { margin-left: 2px; }
.assets-stage .load-more-wrap { display: flex; justify-content: center; margin-top: 24px; }
.assets-stage .load-more-wrap[hidden] { display: none; }
.assets-footer { margin-top: 0; }
.assets-footer .footer-inner { width: min(100% - 36px, 1120px); }
.footer-brand { display: inline-flex; align-items: center; gap: 9px; color: var(--studio-ink); font-weight: 750; }
.footer-brand .brand-icon-hex { width: 28px; height: 28px; border-radius: 8px; font-size: 13px; }
.footer-brand strong { font-size: 13px; }
.assets-footer .footer-links { display: inline-flex; gap: 16px; margin-left: 20px; }
.assets-footer .footer-links a { color: var(--studio-muted); text-decoration: none; font-size: 12px; }
.assets-footer .footer-links a:hover { color: var(--studio-coral-dark); }
.studio-bottom-nav { display: none; }

/* Case detail */
.case-shell { width: min(100% - 36px, 1120px); margin: 0 auto; padding: 28px 0 90px; }
.case-shell > .case-back { margin: 0 0 20px; padding: 0; min-height: 36px; }
.case-back { display: inline-flex; align-items: center; gap: 7px; color: var(--studio-muted); text-decoration: none; font-size: 12px; }
.case-back:hover { color: var(--studio-coral-dark); }
.case-back svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.case-hero { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(340px, .92fr); gap: 24px; align-items: stretch; }
.case-media-frame { position: relative; overflow: hidden; min-height: 420px; aspect-ratio: 4 / 5; border-radius: 19px; background: #dedbd3; box-shadow: var(--studio-shadow); }
.case-media-frame:has(video) { min-height: 0; aspect-ratio: 16 / 10; }
.case-media-frame > img, .case-media-frame > video { display: block; width: 100%; height: 100%; object-fit: cover; }
.case-media-frame > video { background: #202125; }
.case-media-type { position: absolute; top: 14px; left: 14px; padding: 6px 9px; border-radius: 8px; background: rgba(23,24,27,.78); color: #fff; font: 11px var(--mono); }
.case-copy { display: flex; flex-direction: column; justify-content: center; padding: 38px 38px 34px; border: 1px solid var(--studio-line); border-radius: 19px; background: var(--studio-surface); box-shadow: var(--studio-shadow-soft); }
.case-detail-category { margin: 0 0 13px; color: var(--studio-coral-dark); font: 700 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.case-detail-title { margin: 0 0 15px; color: var(--studio-ink); font-size: clamp(30px, 4vw, 48px); line-height: 1.06; letter-spacing: -.065em; }
.case-detail-desc { margin: 0; color: var(--studio-copy); font-size: 14px; line-height: 1.8; }
.case-meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 29px; padding-top: 20px; border-top: 1px solid var(--studio-line); }
.case-meta-grid div { display: grid; gap: 5px; min-width: 0; }
.case-meta-grid span { color: var(--studio-muted); font-size: 11px; }
.case-meta-grid b { overflow: hidden; color: var(--studio-ink); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.case-cta { position: static; inset: auto; z-index: auto; display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; max-width: none; min-height: 49px; margin: 27px 0 0; border-radius: 11px; background: var(--studio-coral); border-color: var(--studio-coral); box-shadow: 0 9px 20px rgba(239,106,84,.2); }
.case-cta:hover { background: var(--studio-coral-dark); }
.case-process { margin-top: 24px; padding: 29px 32px 31px; border: 1px solid var(--studio-line); border-radius: 17px; background: var(--studio-surface); }
.case-process h2 { margin: 9px 0 21px; color: var(--studio-ink); font-size: 23px; letter-spacing: -.05em; }
.case-process-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.case-process-grid > div { position: relative; padding-top: 29px; }
.case-process-grid > div:before { content: ''; position: absolute; top: 8px; left: 0; width: 100%; height: 1px; background: var(--studio-line); }
.case-process-grid span { position: absolute; top: 0; left: 0; color: var(--studio-coral-dark); font: 700 11px var(--mono); }
.case-process-grid b { display: block; color: var(--studio-ink); font-size: 14px; }
.case-process-grid p { margin: 6px 0 0; color: var(--studio-muted); font-size: 12px; line-height: 1.6; }
.case-loading { display: grid; justify-items: center; padding: 130px 20px; border: 1px dashed var(--studio-line-strong); border-radius: 18px; color: var(--studio-muted); }
.case-loading span { width: 32px; height: 32px; border: 2px solid #e4c2b9; border-top-color: var(--studio-coral); border-radius: 50%; animation: spin .7s linear infinite; }
.case-loading p { margin: 13px 0 0; font-size: 13px; }
.case-error { display: grid; justify-items: center; padding: 80px 20px; border: 1px dashed var(--studio-line-strong); border-radius: 18px; text-align: center; }
.case-error h2 { margin: 17px 0 5px; color: var(--studio-ink); font-size: 21px; }
.case-error p { margin: 0 0 19px; color: var(--studio-muted); font-size: 13px; }
.case-error .btn { min-height: 42px; background: var(--studio-coral); border-color: var(--studio-coral); }

@media (max-width: 820px) {
  .studio-header { min-height: 60px; gap: 14px; padding: 0 16px; }
  .studio-header .brand-slogan { display: none; }
  .studio-nav { display: none; }
  .studio-header .nav-actions { display: flex; }
  .studio-header .nav-actions .nav-login { display: none; }
  .case-header-back { margin-left: auto; }
  .case-header-back span { display: none; }
  .case-header-back svg { width: 19px; height: 19px; }
  .assets-shell, .case-shell { width: min(100% - 28px, 600px); }
  .assets-shell { padding-top: 28px; padding-bottom: 102px; }
  .assets-intro { align-items: flex-start; flex-direction: column; gap: 20px; }
  .assets-intro h1 { font-size: 38px; }
  .assets-new-btn { min-height: 42px; }
  .assets-overview { margin-top: 24px; padding: 16px; gap: 14px; }
  .overview-note { line-height: 1.45; }
  .assets-toolbar { margin-top: 25px; }
  .assets-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
  .asset-body { padding: 11px 11px 12px; }
  .asset-hover-actions { opacity: 1; transform: none; inset: auto 7px 7px; }
  .asset-hover-actions a { min-height: 30px; font-size: 10px; }
  .assets-footer { display: none; }
  .case-shell { padding-top: 18px; padding-bottom: 102px; }
  .case-shell > .case-back { margin-bottom: 14px; }
  .case-hero { display: flex; flex-direction: column; gap: 15px; }
  .case-media-frame { min-height: 0; aspect-ratio: 4 / 5; border-radius: 17px; }
  .case-media-frame:has(video) { aspect-ratio: 16 / 10; }
  .case-copy { padding: 24px 20px 22px; border-radius: 16px; }
  .case-detail-title { font-size: 32px; }
  .case-process { margin-top: 15px; padding: 23px 19px 24px; }
  .case-process-grid { grid-template-columns: 1fr; gap: 16px; }
  .case-process-grid > div { padding: 24px 0 0; }
  .case-process-grid > div:before { top: 7px; }
  .studio-bottom-nav { display: grid; position: fixed; z-index: 60; left: 0; right: 0; bottom: 0; grid-template-columns: repeat(5, 1fr); height: 64px; padding-bottom: max(5px, env(safe-area-inset-bottom)); background: rgba(251,250,247,.96); border-top: 1px solid var(--studio-line); box-shadow: 0 -8px 24px rgba(38,35,28,.07); backdrop-filter: blur(15px); }
  .studio-bottom-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--studio-muted); text-decoration: none; font-size: 10px; }
  .studio-bottom-nav a.is-active { color: var(--studio-coral-dark); font-weight: 700; }
  .studio-bottom-nav i { font-style: normal; font-size: 19px; line-height: 18px; }
}

@media (max-width: 380px) {
  .assets-overview { align-items: flex-start; flex-direction: column; }
  .overview-divider { width: 100%; height: 1px; }
  .assets-toolbar { align-items: flex-start; flex-direction: column; gap: 9px; }
  .case-detail-title { font-size: 29px; }
}

@media (prefers-reduced-motion: reduce) {
  .asset-card, .asset-skeleton > div, .case-loading span { animation: none; }
  .asset-card, .assets-new-btn { transition: none; }
}
