:root {
  --ink: #1d1d1f;
  --muted: #737378;
  --accent: #9b626a;
  --accent-soft: #f2e8ea;
  --paper: #f5f5f7;
  --line: #e8e8ed;
  --white: #fff;
  --radius: 22px;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; color: inherit; border: 0; background: none; }
button:disabled { opacity: .45; cursor: not-allowed; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid #b88b91; outline-offset: 4px; }
img { display: block; max-width: 100%; object-fit: cover; }
svg { display: inline-block; vertical-align: middle; flex-shrink: 0; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
input, textarea, select { width: 100%; border: 1px solid transparent; border-radius: 13px; padding: 14px 16px; background: #f5f5f7; color: var(--ink); font-size: 16px; outline: none; transition: border-color .15s, box-shadow .15s; }
input:focus, textarea:focus, select:focus { border-color: #bc9399; box-shadow: 0 0 0 3px #9b626a12; }
input::placeholder, textarea::placeholder { color: #99999f; }
textarea { resize: vertical; line-height: 1.8; }
label { display: block; font-size: 15px; font-weight: 600; margin-bottom: 10px; }
.optional, .required { font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 6px; }
.skip-link { position: fixed; top: -80px; left: 20px; z-index: 150; padding: 14px; color: white; background: var(--ink); border-radius: 12px; }
.skip-link:focus { top: 12px; }
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 216px; z-index: 30; padding: 28px 18px 24px; overflow-y: auto; display: flex; flex-direction: column; background: #f0f0f3; border-right: 1px solid #e5e5e9; }
.sidebar-brand-row { display: flex; align-items: center; gap: 8px; margin-bottom: 27px; }
.sidebar-brand-row .brand { flex: 1; min-width: 0; }
.nav-group-label { color: #99999f; font-size: 11px; padding: 18px 17px 6px; }
.sidebar-toggle.icon-button { display: none; }
.nav-drawer { margin: 0; padding: 0; border: 0; border-radius: 0 25px 25px 0; width: min(304px, calc(100vw - 48px)); max-width: none; height: 100dvh; max-height: 100dvh; background: #f4f4f7; color: var(--ink); box-shadow: 15px 0 60px #00000016; }
.nav-drawer::backdrop { background: #1d1d1f40; backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); }
.drawer-content { display: flex; flex-direction: column; min-height: 100%; padding: 25px 17px calc(22px + env(safe-area-inset-bottom)); }
.drawer-content nav { display: grid; gap: 5px; }
.drawer-content .sidebar-brand-row { margin-bottom: 15px; }
.drawer-content .sidebar-brand-row .icon-button { flex-shrink: 0; }
.drawer-content .sidebar-bottom { padding-top: 25px; }
body:has(.nav-drawer[open]), body:has(#modal[open]) { overflow: hidden; }
.brand { display: flex; align-items: center; gap: 8px; padding: 0 8px; }
.brand img { width: 43px; height: 34px; object-fit: contain; }
.brand strong { font-size: 17px; font-weight: 650; letter-spacing: -.4px; white-space: nowrap; }
.sidebar nav { display: grid; gap: 7px; }
.nav-button { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 17px; border-radius: 13px; font-size: 15px; color: #77777c; text-align: left; }
.nav-button.active { background: white; color: var(--ink); font-weight: 600; box-shadow: 0 1px 4px #00000005; }
.nav-button.active svg { color: var(--accent); }
.nav-button:hover { background: #ffffffa0; }
.sidebar-bottom { margin-top: auto; display: grid; gap: 4px; }
.sidebar-bottom button { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 8px 17px; text-align: left; color: #86868b; font-size: 13px; }
.sidebar-bottom button:last-child { padding-top: 21px; margin-top: 6px; border-top: 1px solid #e2e2e7; }
.main-shell { margin-left: 216px; min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 20; height: 72px; display: flex; align-items: center; justify-content: space-between; padding: 0 48px; background: #f5f5f7dc; backdrop-filter: blur(22px) saturate(140%); -webkit-backdrop-filter: blur(22px) saturate(140%); border-bottom: 1px solid #e8e8ed80; }
.topbar-left, .top-actions { display: flex; align-items: center; gap: 15px; }
.topbar-title { font-size: 14px; color: #7b7b80; }
.mobile-brand { display: none; }
.header-back { display: flex; align-items: center; gap: 2px; min-height: 44px; font-size: 14px; color: var(--accent); padding: 0; }
.header-back svg { transform: rotate(180deg); }
.demo-chip { font-size: 12px; background: #eaeaed; color: #78787d; border-radius: 30px; min-height: 44px; padding: 6px 11px; }
.icon-button { display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; color: #7e7e84; border-radius: 50%; }
.icon-button:hover { background: #ececef; }
.main { max-width: 1300px; margin: 0 auto; padding: 42px 48px 64px; }
.welcome { display: flex; justify-content: space-between; align-items: center; min-height: 158px; margin-bottom: 29px; gap: 24px; }
.welcome h1 { font-size: 40px; letter-spacing: -1.4px; font-weight: 700; line-height: 1.15; }
.welcome p { font-size: 16px; color: var(--muted); margin-top: 15px; line-height: 1.6; }
.text-link { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; color: var(--accent); font-size: 14px; padding: 6px 0; }
.welcome .text-link { margin-top: 10px; }
.welcome-mascot { position: relative; flex-shrink: 0; width: 178px; height: 158px; overflow: hidden; padding: 0; background: #f0e8e8; border-radius: 25px; }
.welcome-mascot img { position: absolute; width: 121px; height: 237px; object-fit: contain; top: 9px; left: 28px; }
.welcome-mascot .mascot-caption { position: absolute; left: 0; bottom: 0; width: 100%; padding: 12px 6px 10px; background: linear-gradient(transparent, #f0e8e8 45%); color: #8b666b; font-size: 11px; }
.welcome-mascot .mascot-play { position: absolute; top: 10px; right: 10px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #ffffffdc; color: var(--accent); box-shadow: 0 2px 9px #00000008; }
.mascot-play svg { margin-left: 2px; }
.entry-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-bottom: 48px; }
.entry-card { display: flex; flex-direction: column; align-items: flex-start; position: relative; text-align: left; padding: 25px; border-radius: var(--radius); background: white; min-height: 192px; border: 1px solid #eaeaf0; transition: transform .18s, box-shadow .18s; }
.entry-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px #00000005; }
.entry-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; margin-bottom: 24px; color: #9b626a; background: #f4e8eb; }
.entry-card:nth-child(2) .entry-icon { background: #eeeaf8; color: #8a7eac; }
.entry-card:nth-child(3) .entry-icon { background: #e8eff7; color: #6b8aa9; }
.entry-card h2 { font-size: 19px; font-weight: 650; letter-spacing: -.4px; }
.entry-card p { margin-top: 9px; font-size: 14px; color: var(--muted); }
.entry-arrow { position: absolute; top: 31px; right: 21px; color: #b4b4bc; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.section-heading h2 { font-size: 24px; letter-spacing: -.7px; font-weight: 650; }
.search-box { display: flex; align-items: center; gap: 8px; width: 233px; margin: 0; color: #96969c; background: #eaeaec; border-radius: 12px; padding: 0 13px; }
.search-box input { padding: 12px 0; border: 0; background: transparent; font-size: 14px; box-shadow: none; }
.search-box input:focus { box-shadow: none; }
.category-tabs { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 22px; }
.category-tab { min-height: 44px; padding: 10px 15px; border-radius: 12px; color: var(--muted); font-size: 14px; white-space: nowrap; }
.category-tab.active { color: var(--ink); background: white; font-weight: 600; box-shadow: 0 1px 4px #00000006; }
.category-tab:hover { background: #ffffff90; }
.template-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 18px; }
.template-card { position: relative; min-width: 0; background: white; border-radius: 19px; border: 1px solid #eaeaf0; overflow: hidden; transition: transform .18s; }
.template-card:hover { transform: translateY(-2px); }
.template-open { display: block; width: 100%; padding: 0; text-align: left; }
.template-art { position: relative; aspect-ratio: 3 / 2; overflow: hidden; background: #eeedf0; }
.template-art>img { width: 100%; height: 100%; }
.template-text { padding: 17px 18px 18px; }
.template-text h3 { font-size: 15px; font-weight: 600; line-height: 1.5; letter-spacing: -.2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.template-text p { font-size: 12px; color: #85858c; margin-top: 6px; }
.favorite-button { position: absolute; right: 10px; top: 10px; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: #6c6c75; background: #ffffffd9; backdrop-filter: blur(12px); }
.favorite-button.saved { color: var(--accent); }
.favorite-button.saved svg { fill: currentColor; }
.template-toggle { display: flex; justify-content: center; margin-top: 26px; }
.product-scene { position: relative; display: grid; place-items: center; overflow: hidden; isolation: isolate; background: #eee8e4; width: 100%; height: 100%; }
.product-scene:before { content: ''; position: absolute; inset: 56% -15% -25%; transform: rotate(-10deg); background: #e4dbd6; z-index: -1; }
.product-scene:after { content: ''; position: absolute; inset: 0 0 0 64%; background: linear-gradient(100deg, transparent, #ffffff88); transform: rotate(-22deg); z-index: -1; }
.bottle-svg { width: 42%; height: 84%; filter: drop-shadow(8px 11px 7px #55423625); }
.mini-svg { width: 68%; height: 86%; filter: drop-shadow(7px 11px 6px #55423620); }
.portrait-layout { width: 100%; height: 100%; display: flex; overflow: hidden; }
.portrait-layout>img { width: 52%; height: 100%; object-position: 50% 27%; }
.portrait-layout .product-scene { width: 48%; height: 100%; }
.portrait-layout .bottle-svg { width: 71%; }
.copy-art { width: 100%; height: 100%; padding: 25px 28px; background: #ece9f0; position: relative; overflow: hidden; }
.copy-paper { width: 87%; height: 170px; border-radius: 9px; padding: 19px; background: #fff; transform: rotate(-3deg); box-shadow: 0 4px 15px #2723340a; }
.fake-heading { font-size: 18px; line-height: 1.55; font-weight: 600; letter-spacing: -.4px; color: #5d5869; }
.fake-line { height: 4px; width: 87%; margin-top: 12px; border-radius: 3px; background: #ece9ef; }
.fake-line:last-child { width: 62%; }
.copy-stamp { display: none; }
.btn { display: inline-flex; gap: 8px; align-items: center; justify-content: center; min-height: 48px; padding: 12px 20px; font-size: 14px; line-height: 1.4; font-weight: 550; border-radius: 13px; transition: background .15s, transform .15s; white-space: nowrap; }
.btn:active { transform: scale(.98); }
.btn-dark { background: #232325; color: #fff; }
.btn-dark:hover { background: #3c3c40; }
.btn-light { background: #f0f0f3; color: #46464c; }
.btn-light:hover { background: #e7e7ec; }
.btn-danger { color: #c64349; background: #fcebed; }
.btn-ghost { color: var(--accent); }
.icon-only { width: 48px; padding: 12px; }
.full-width { width: 100%; }
.page-title-row { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 24px; }
.page-title-row h1 { font-size: 34px; letter-spacing: -.9px; font-weight: 700; }
.page-title-row p { margin-top: 12px; color: var(--muted); font-size: 15px; line-height: 1.6; }
.workspace { max-width: 1100px; margin: auto; }
.demo-notice { display: flex; align-items: center; gap: 8px; color: #87878d; font-size: 12px; line-height: 1.5; min-height: 44px; padding: 0; text-align: left; margin-bottom: 22px; }
.demo-notice>svg:last-child { margin-left: 4px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 0; list-style: none; max-width: 540px; margin: 0 auto 30px; }
.step { position: relative; display: flex; align-items: center; justify-content: center; gap: 9px; font-size: 14px; color: #a2a2aa; min-height: 44px; }
.step:after { position: absolute; height: 1px; width: 22px; background: #dedee5; right: -12px; top: 50%; content: ''; }
.step:last-child:after { display: none; }
.step-num { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; background: #e9e9ef; color: #97979e; font-size: 12px; }
.step.current { color: var(--ink); font-weight: 600; }
.step.current .step-num { background: var(--ink); color: white; }
.step.done { color: #9b626a; }
.step.done .step-num { background: #eee2e5; color: #9b626a; }
.panel { padding: 29px; border: 1px solid #eaeaf0; background: #fff; border-radius: var(--radius); min-width: 0; }
.product-panel { max-width: 730px; margin: auto; }
.workspace-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 24px; align-items: start; }
.text-workspace, .workspace-layout:has(.settings-panel):not(:has(.side-preview)) { grid-template-columns: 1fr; max-width: 780px; margin: auto; }
.field { margin-top: 27px; }
.first-field { margin-top: 0; }
.field-hint { color: #8b8b93; font-size: 12px; line-height: 1.7; margin-top: 9px; font-weight: 400; }
.fields-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.upload-area { display: flex; width: 100%; height: 164px; padding: 20px; flex-direction: column; gap: 11px; align-items: center; justify-content: center; position: relative; overflow: hidden; border-radius: 16px; border: 1px dashed #d7d7e0; background: #f8f8fa; text-align: center; }
.upload-area:hover, .upload-area.dragging { background: #f3edef; border-color: #bc969c; }
.upload-icon { display: grid; place-items: center; color: #8c8c94; }
.upload-area strong { font-size: 14px; font-weight: 500; }
.upload-area>span:last-child { font-size: 12px; color: #97979f; }
.upload-area img { position: absolute; inset: 0; height: 100%; width: 100%; object-fit: contain; background: #f8f8fa; padding: 8px; }
.upload-area .replace-photo { position: absolute; bottom: 10px; padding: 7px 11px; border-radius: 8px; background: #ffffffdf; color: #57575e; font-size: 12px; }
summary { cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
.sample-picker { margin-top: 10px; }
.sample-picker>summary { display: flex; gap: 6px; align-items: center; min-height: 44px; font-size: 13px; color: var(--accent); }
.sample-picker[open]>summary svg { transform: rotate(90deg); }
.sample-row { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 8px; }
.sample-pill { min-height: 44px; padding: 10px 17px; font-size: 13px; background: #f2f2f5; border-radius: 10px; }
.form-details { margin-top: 27px; border-top: 1px solid var(--line); }
.form-details>summary { display: flex; align-items: center; justify-content: space-between; min-height: 64px; font-size: 14px; font-weight: 550; }
.form-details>summary small { font-size: 12px; color: #96969e; font-weight: 400; margin-left: 8px; }
.form-details>summary>svg { color: #a2a2aa; transition: transform .15s; }
.form-details[open]>summary>svg { transform: rotate(45deg); }
.details-content { padding: 0 0 5px; }
.details-content>.field:first-child, .details-content>.fields-row:first-child .field { margin-top: 5px; }
.form-footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.form-footer>.field-hint { margin: 0; }
.form-error { margin-top: 20px; padding: 13px 15px; border-radius: 11px; color: #bf424a; background: #fff1f2; font-size: 13px; line-height: 1.7; }
.template-selected { display: flex; align-items: center; gap: 7px; font-size: 12px; color: #8d8d94; padding-bottom: 24px; }
.option-list { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: #f1f1f5; border-radius: 13px; }
.option-chip { min-height: 44px; flex: 1; padding: 9px 10px; white-space: nowrap; font-size: 13px; color: #81818a; border-radius: 10px; }
.option-chip.selected { background: white; box-shadow: 0 1px 5px #00000008; color: #303035; font-weight: 550; }
.avatar-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.avatar-option { display: flex; flex-direction: column; align-items: center; padding: 0; min-width: 0; }
.avatar-photo { width: 100%; height: 121px; border-radius: 15px; position: relative; overflow: hidden; border: 2px solid transparent; margin-bottom: 10px; padding: 2px; }
.avatar-photo img { height: 100%; width: 100%; object-position: 50% 26%; border-radius: 11px; }
.avatar-option.selected .avatar-photo { border-color: var(--accent); }
.avatar-option strong { font-size: 14px; font-weight: 600; }
.avatar-option>span { font-size: 11px; color: #92929a; margin-top: 5px; }
.avatar-tick { position: absolute; right: 9px; bottom: 9px; display: grid; place-items: center; width: 21px; height: 21px; background: var(--accent); border-radius: 50%; color: #fff; border: 2px solid white; }
.script-tabs { display: flex; background: #f0f0f4; border-radius: 12px; gap: 3px; padding: 4px; margin: 0 0 14px; }
.script-tab { min-height: 44px; padding: 8px 6px; flex: 1; border-radius: 9px; font-size: 12px; line-height: 1.5; color: #81818a; white-space: nowrap; }
.script-tab.selected { color: #37373e; background: white; box-shadow: 0 1px 4px #00000008; font-weight: 550; }
.script-textarea { min-height: 260px; font-size: 15px; background: #f7f7f9; }
.side-preview { position: sticky; top: 98px; padding: 22px; }
.preview-label { display: flex; justify-content: space-between; align-items: center; font-size: 13px; margin-bottom: 18px; }
.preview-label strong { font-weight: 550; color: #6f6f77; }
.preview-label>span { font-size: 11px; color: #a1a1a8; }
.phone-preview { aspect-ratio: 9/16; max-width: 244px; margin: auto; position: relative; overflow: hidden; border-radius: 18px; background: #f2ecea; isolation: isolate; }
.phone-preview.ratio-square { aspect-ratio: 1; }
.phone-preview.ratio-wide { aspect-ratio: 16/9; max-width: none; }
.phone-preview .product-scene { background: color-mix(in srgb,var(--preview-brand,#915b62) 15%,#f7f6f4); }
.phone-preview .bottle-svg { width: 62%; height: 64%; margin-top: -18%; }
.phone-preview .mini-svg { width: 78%; height: 69%; margin-top: -16%; }
.preview-product-image { height: 100%; width: 100%; object-fit: contain; padding: 12px; background: #fafafa; }
.visual-wash { position: absolute; inset: 48% 0 0; background: linear-gradient(transparent,var(--preview-brand,#915b62)); }
.preview-watermark { position: absolute; top: 12px; left: 11px; font-size: 8px; color: #fff; border-radius: 5px; padding: 4px 6px; background: #00000018; }
.preview-copy { position: absolute; bottom: 22px; left: 18px; right: 18px; color: white; }
.preview-copy small { font-size: 9px; opacity: .8; letter-spacing: 1px; display: block; margin-bottom: 9px; }
.preview-copy h3 { font-size: 23px; font-weight: 600; line-height: 1.45; letter-spacing: -.5px; }
.preview-copy p { font-size: 11px; line-height: 1.8; opacity: .85; margin-top: 10px; }
.preview-person { position: absolute; right: 11px; top: 12px; width: 57px; height: 76px; border-radius: 10px; overflow: hidden; border: 2px solid #fff; }
.preview-person img { width: 100%; height: 100%; object-position: 50% 25%; }
.preview-meta { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; color: #8d8d96; margin-top: 17px; }
.preview-caption { margin-top: 11px; color: #9999a1; font-size: 11px; line-height: 1.8; }
.side-preview>.btn { margin-top: 18px; font-size: 13px; }
.file-type { color: #9999a1; font-size: 10px; }
.ratio-wide .product-scene, .ratio-wide .preview-product-image { width: 46%; height: 100%; }
.phone-preview.ratio-wide .mini-svg, .phone-preview.ratio-wide .bottle-svg { width: 85%; height: 88%; margin-top: 0; }
.ratio-wide .visual-wash { inset: 0; background: linear-gradient(90deg,transparent 28%,var(--preview-brand,#915b62) 85%); }
.ratio-wide .preview-copy { left: 48%; right: 10px; bottom: 12px; }
.ratio-wide .preview-copy small { font-size: 6px; letter-spacing: 0; margin-bottom: 5px; }
.ratio-wide .preview-copy h3 { font-size: 12px; line-height: 1.5; letter-spacing: 0; }
.ratio-wide .preview-copy p { font-size: 7px; line-height: 1.5; margin-top: 5px; }
.ratio-wide .preview-watermark { font-size: 5px; padding: 2px 3px; top: 6px; left: 6px; }
.ratio-wide .preview-person { width: 28px; height: 36px; top: 6px; right: 6px; border-width: 1px; border-radius: 5px; }
.result-heading { display: flex; gap: 13px; align-items: center; margin-bottom: 24px; }
.circle-check { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: #6b927e; background: #eaf4ef; flex-shrink: 0; }
.result-heading h2 { font-size: 19px; font-weight: 650; letter-spacing: -.4px; }
.result-heading p { color: #92929a; font-size: 13px; margin-top: 6px; }
.result-script { font-size: 15px; line-height: 1.95; white-space: pre-wrap; color: #595961; background: #f7f7f9; padding: 20px; border-radius: 15px; overflow-wrap: anywhere; }
.result-actions { display: flex; gap: 9px; margin-top: 26px; flex-wrap: wrap; }
.result-actions .btn-dark { flex: 1; }
.result-footer { padding-top: 18px; }
.storyboard-grid { padding-bottom: 5px; }
.storyboard-card { display: flex; align-items: flex-start; gap: 16px; border-top: 1px solid #f0f0f4; padding: 16px 0; }
.storyboard-card .time { width: 68px; flex-shrink: 0; font-size: 12px; color: #a0a0a8; line-height: 1.8; }
.storyboard-card strong { font-size: 14px; font-weight: 550; }
.storyboard-card p { font-size: 12px; color: #92929a; margin-top: 5px; line-height: 1.7; }
.empty-state { grid-column: 1/-1; padding: 64px 24px; border-radius: var(--radius); background: #fff; text-align: center; border: 1px solid #eaeaf0; }
.empty-state>svg { color: #b7b7c1; margin-bottom: 21px; }
.empty-state h2 { font-size: 20px; font-weight: 600; letter-spacing: -.4px; }
.empty-state p { color: #96969f; font-size: 14px; line-height: 1.8; margin: 12px 0 25px; }
.works-list { border: 1px solid #eaeaf0; border-radius: var(--radius); overflow: hidden; background: white; }
.work-row { display: flex; align-items: center; gap: 12px; padding: 0 23px; }
.work-row+.work-row { border-top: 1px solid #f0f0f4; }
.work-open { flex: 1; min-width: 0; display: flex; align-items: center; text-align: left; gap: 18px; min-height: 101px; padding: 20px 0; }
.work-icon { display: grid; place-items: center; width: 48px; height: 48px; background: #f4edf0; color: #a27882; border-radius: 13px; flex-shrink: 0; }
.work-text { flex: 1; min-width: 0; }
.work-text h2 { font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.work-text>span { display: block; color: #9999a1; margin-top: 8px; font-size: 12px; }
.work-open>svg { color: #b5b5be; }
.delete-work { color: #a8a8b0; }
.page-note { color: #9999a1; font-size: 12px; line-height: 1.8; margin: 22px 2px 0; }
.favorites-section { margin-top: 32px; }
.favorites-section>summary { display: flex; align-items: center; gap: 10px; min-height: 54px; font-size: 17px; font-weight: 550; }
.favorites-section>summary>span { font-size: 13px; color: #aaaab2; font-weight: 400; }
.favorites-section>summary>svg { margin-left: auto; color: #aaaab2; }
.favorites-section[open]>summary>svg { transform: rotate(90deg); }
.favorites-section>.template-grid { margin-top: 16px; }
.brand-layout { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 28px; align-items: start; }
.brand-settings { padding: 30px; }
.color-row { display: flex; gap: 10px; flex-wrap: wrap; }
.color-swatch { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 4px solid white; box-shadow: 0 0 0 1px #eaeaf0; background: var(--swatch); color: white; }
.color-swatch.selected { box-shadow: 0 0 0 2px #9999a1; }
.brand-preview-panel { padding-top: 3px; }
.overline { font-size: 13px; color: #9999a1; display: block; margin: 0 0 16px 4px; }
.brand-preview { position: relative; display: flex; flex-direction: column; align-items: flex-start; min-height: 235px; padding: 30px; background: white; border: 1px solid #eaeaf0; border-radius: var(--radius); overflow: hidden; }
.brand-preview-dot { width: 32px; height: 32px; border-radius: 9px; background: var(--brand-color); display: block; margin-bottom: 33px; }
.brand-preview h2 { font-size: 28px; color: var(--brand-color); letter-spacing: -.6px; overflow-wrap: anywhere; font-weight: 600; }
.brand-preview p { color: #9999a1; font-size: 13px; margin-top: 13px; }
.bottom-nav { display: none; }
dialog { width: calc(100% - 40px); max-width: 555px; max-height: 85vh; overflow-y: auto; padding: 29px; color: var(--ink); background: #fff; border: 0; border-radius: 25px; box-shadow: 0 25px 90px #00000017; }
dialog::backdrop { background: #1d1d1f50; backdrop-filter: blur(7px); }
.modal-heading { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 21px; }
.modal-heading h2 { font-size: 23px; line-height: 1.5; letter-spacing: -.5px; font-weight: 650; }
.modal-heading>.icon-button { flex-shrink: 0; background: #f1f1f5; }
.modal-copy { font-size: 14px; line-height: 1.9; color: #818189; }
.modal-copy p+p { margin-top: 15px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 26px; }
dialog.mascot-modal { max-width: 520px; max-height: calc(100dvh - 32px); padding: 24px; }
.mascot-modal .modal-heading { margin-bottom: 14px; }
.mascot-modal .modal-heading h2 { font-size: 21px; }
.mascot-video { display: block; width: 100%; height: auto; aspect-ratio: 1; max-height: min(480px, calc(100dvh - 240px)); object-fit: contain; background: #f5f5f7; border-radius: 16px; }
.mascot-player-note { margin-top: 13px; text-align: center; color: var(--muted); font-size: 12px; }
.mascot-video-error { margin-top: 12px; font-size: 13px; color: var(--accent); line-height: 1.7; }
.mascot-modal .modal-footer { margin-top: 17px; justify-content: center; }

.help-steps { padding-left: 23px; margin: 0 0 24px; color: #65656d; font-size: 15px; line-height: 2.3; }
.plan-list { margin: 24px 0; }
.plan-list>div { display: flex; align-items: center; justify-content: space-between; padding: 20px 0; border-bottom: 1px solid #eeeeF3; gap: 20px; }
.plan-list strong { font-size: 15px; font-weight: 600; }
.plan-list small { display: block; font-size: 12px; color: #9999a1; margin-top: 7px; }
.status-label { font-size: 12px; color: #9999a1; background: #f2f2f6; border-radius: 7px; padding: 7px 9px; flex-shrink: 0; }
.brand-story-intro { display: flex; align-items: center; gap: 18px; margin: 20px 0; }
.brand-story-intro img { width: 65px; object-fit: contain; }
.brand-story-intro p { font-size: 13px; color: #92929a; line-height: 1.8; }
.mascot-reference { max-height: 53vh; width: 100%; object-fit: contain; background: #fafafa; border-radius: 16px; }
.toast { position: fixed; left: calc(50% + 108px); bottom: 30px; transform: translate(-50%,10px); background: #303033; color: white; font-size: 14px; line-height: 1.6; padding: 13px 20px; border-radius: 14px; z-index: 100; box-shadow: 0 5px 25px #00000010; max-width: calc(100vw - 36px); text-align: center; pointer-events: none; opacity: 0; transition: .2s; }
.toast.show { opacity: 1; transform: translate(-50%,0); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (min-width: 1500px) { .main { padding-top: 48px; } }
@media (max-width: 1150px) {
  .sidebar { width: 185px; padding: 30px 12px 22px; }
  .brand { padding-left: 4px; gap: 5px; }
  .brand img { width: 35px; }
  .brand strong { font-size: 15px; }
  .main-shell { margin-left: 185px; }
  .main { padding: 34px 30px 56px; }
  .topbar { padding: 0 30px; }
  .entry-card { padding: 23px 20px; }
  .entry-card h2 { font-size: 18px; }
  .entry-card p { font-size: 12px; }
  .workspace-layout { grid-template-columns: minmax(0,1fr) 255px; gap: 20px; }
  .panel { padding: 24px; }
  .side-preview { padding: 18px; }
  .brand-layout { grid-template-columns: minmax(0,1fr) 265px; gap: 22px; }
  .color-row { gap: 9px; }
  .toast { left: calc(50% + 92.5px); }
}
@media (max-width: 1000px) and (min-width: 761px) {
  .template-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .welcome h1 { font-size: 36px; }
  .welcome-mascot { width: 140px; height: 145px; }
  .welcome-mascot img { width: 112px; height: 219px; left: 14px; }
  .entry-grid { gap: 12px; }
  .entry-card { padding: 21px 15px; min-height: 179px; }
  .entry-arrow { right: 12px; top: 27px; }
  .entry-icon { width: 42px; height: 42px; margin-bottom: 23px; }
  .entry-card h2 { font-size: 16px; }
  .entry-card p { font-size: 12px; line-height: 1.6; }
  .workspace-layout { grid-template-columns: 1fr; max-width: 730px; margin: auto; }
  .step-2 .side-preview { display: none; }
  .side-preview { position: static; max-width: 320px; width: 100%; margin: auto; padding: 24px; }
  .brand-layout { grid-template-columns: 1fr; }
  .brand-preview-panel { max-width: 420px; }
}
@media (max-width: 760px) {
  .sidebar { display: none; }
  .sidebar-toggle.icon-button { display: inline-grid; margin-left: -8px; flex-shrink: 0; }
  .main-shell { margin-left: 0; }
  .topbar { height: 64px; padding: 0 20px; }
  .topbar-left { gap: 8px; min-width: 0; }
  .topbar-title { display: none; }
  .header-back+.topbar-title { display: block; font-size: 15px; color: #49494f; font-weight: 550; }
  .header-back { font-size: 14px; }
  .mobile-brand { display: flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 600; letter-spacing: -.3px; }
  .mobile-brand img { width: 32px; height: 25px; object-fit: contain; }
  .top-actions { gap: 4px; }
  .demo-chip { min-height: 44px; font-size: 11px; padding: 6px 10px; }
  .main { padding: 24px 20px 115px; }
  .welcome { min-height: 132px; gap: 12px; margin-bottom: 25px; align-items: center; }
  .welcome h1 { font-size: 33px; letter-spacing: -1px; }
  .welcome p { font-size: 13px; line-height: 1.7; margin-top: 12px; max-width: 210px; }
  .welcome .text-link { font-size: 13px; margin-top: 3px; }
  .welcome-mascot { width: 105px; height: 125px; border-radius: 22px; }
  .welcome-mascot img { width: 94px; height: 184px; left: 5px; top: 7px; }
  .welcome-mascot .mascot-caption { display: none; }
  .entry-grid { display: block; background: white; border-radius: 21px; border: 1px solid #eaeaf0; overflow: hidden; margin-bottom: 34px; }
  .entry-card { display: flex; flex-direction: row; align-items: center; width: 100%; min-height: 89px; padding: 17px 20px; border: 0; border-radius: 0; background: transparent; gap: 16px; }
  .entry-card+.entry-card:before { content: ''; position: absolute; top: 0; left: 83px; right: 0; height: 1px; background: #f0f0f4; }
  .entry-card:hover { transform: none; box-shadow: none; }
  .entry-icon { flex-shrink: 0; width: 46px; height: 46px; border-radius: 13px; margin: 0; }
  .entry-icon svg { width: 24px; height: 24px; }
  .entry-copy { flex: 1; }
  .entry-card h2 { font-size: 17px; font-weight: 600; }
  .entry-card p { font-size: 12px; margin-top: 7px; }
  .entry-arrow { position: static; color: #bebec7; }
  .section-heading { align-items: center; gap: 14px; margin-bottom: 17px; }
  .section-heading h2 { font-size: 23px; letter-spacing: -.7px; white-space: nowrap; }
  .search-box { width: 143px; padding: 0 10px; border-radius: 11px; }
  .search-box input { font-size: 13px; padding: 12px 0; }
  .search-box svg { width: 15px; height: 15px; }
  .category-tabs { gap: 3px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: -20px; padding-right: 20px; margin-bottom: 16px; }
  .category-tabs::-webkit-scrollbar { display: none; }
  .category-tab { font-size: 13px; min-height: 44px; padding: 10px 14px; border-radius: 11px; flex-shrink: 0; }
  .template-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px 12px; }
  .template-card { border-radius: 17px; }
  .template-text { padding: 13px 13px 15px; }
  .template-text h3 { font-size: 13px; font-weight: 550; }
  .template-text p { font-size: 11px; margin-top: 6px; }
  .favorite-button { top: 5px; right: 5px; width: 44px; height: 44px; }
  .favorite-button svg { width: 15px; height: 15px; }
  .copy-art { padding: 20px 18px; }
  .copy-paper { padding: 14px; width: 95%; height: 150px; }
  .fake-heading { font-size: 15px; line-height: 1.5; }
  .fake-line { margin-top: 10px; height: 3px; }
  .template-toggle { margin-top: 22px; }
  .template-toggle .btn { font-size: 13px; }
  .bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 25; display: grid; grid-template-columns: repeat(3,1fr); padding: 8px 23px calc(9px + env(safe-area-inset-bottom)); background: #fbfbfce8; border-top: 1px solid #e6e6ec; backdrop-filter: blur(24px) saturate(150%); -webkit-backdrop-filter: blur(24px) saturate(150%); }
  .bottom-nav button { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 44px; gap: 5px; color: #aaaab2; font-size: 10px; }
  .bottom-nav button.active { color: var(--accent); font-weight: 600; }
  .page-title-row { gap: 15px; margin-bottom: 21px; align-items: center; }
  .page-title-row h1 { font-size: 31px; letter-spacing: -.8px; }
  .page-title-row p { font-size: 13px; margin-top: 10px; }
  .page-title-row>.btn { font-size: 13px; min-height: 44px; padding: 11px 15px; }
  .view-workspace { padding-top: 27px; padding-bottom: 110px; }
  .demo-notice { font-size: 11px; min-height: 44px; margin-bottom: 15px; gap: 7px; }
  .demo-notice>svg { width: 14px; height: 14px; }
  .steps { margin-bottom: 22px; }
  .step { font-size: 13px; gap: 7px; }
  .step:after { width: 17px; right: -10px; }
  .step-num { width: 23px; height: 23px; font-size: 11px; }
  .panel { padding: 23px 20px; border-radius: 21px; }
  .field { margin-top: 25px; }
  .first-field { margin-top: 0; }
  label { font-size: 14px; }
  .required,.optional { font-size: 11px; }
  input, textarea, select { font-size: 16px; padding: 13px 14px; }
  .field-hint { font-size: 11px; }
  .upload-area { height: 145px; gap: 10px; }
  .upload-area strong { font-size: 13px; }
  .upload-area>span:last-child { font-size: 11px; }
  .sample-picker>summary { font-size: 12px; }
  .fields-row { grid-template-columns: 1fr; gap: 0; }
  .form-details { margin-top: 23px; }
  .form-details>summary { min-height: 59px; font-size: 13px; }
  .form-details>summary small { font-size: 11px; }
  .form-error { font-size: 12px; }
  .workspace-layout { display: grid; grid-template-columns: 1fr; gap: 20px; }
  .workspace .form-footer:not(.result-footer), .workspace .result-actions { position: fixed; bottom: 0; left: 0; right: 0; z-index: 26; padding: 13px 20px calc(13px + env(safe-area-inset-bottom)); margin: 0; background: #fafafbed; border-top: 1px solid #e4e4eb; backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); }
  .workspace .form-footer>.btn-dark { flex: 1; }
  .workspace .form-footer>.field-hint { display: none; }
  .workspace .form-footer>.btn-light { background: #ececf1; min-width: 92px; }
  .btn { min-height: 48px; font-size: 15px; padding: 12px 18px; }
  .step-2 .side-preview { display: none; }
  .template-selected { font-size: 11px; padding-bottom: 22px; }
  .avatar-grid { gap: 8px; }
  .avatar-photo { height: 100px; border-radius: 14px; padding: 2px; }
  .avatar-photo img { border-radius: 10px; }
  .avatar-option strong { font-size: 13px; }
  .avatar-option>span { font-size: 10px; }
  .script-tab { font-size: 11px; min-height: 44px; padding: 8px 4px; }
  .script-textarea { font-size: 15px; min-height: 265px; }
  .option-chip { font-size: 12px; min-height: 44px; padding: 9px; }
  .side-preview { position: static; width: 100%; padding: 22px; }
  .step-3 .side-preview { grid-row: 1; }
  .phone-preview { max-width: 217px; border-radius: 17px; }
  .phone-preview.ratio-square { max-width: 270px; }
  .phone-preview.ratio-wide { max-width: none; }
  .preview-label { font-size: 13px; }
  .preview-copy h3 { font-size: 22px; }
  .preview-meta { font-size: 11px; }
  .preview-caption { font-size: 11px; }
  .side-preview>.btn { font-size: 14px; }
  .result-heading h2 { font-size: 18px; }
  .result-heading p { font-size: 12px; }
  .result-script { font-size: 14px; padding: 17px; line-height: 1.9; }
  .result-actions { display: flex; flex-wrap: nowrap; gap: 8px; }
  .result-actions .btn { font-size: 14px; padding: 12px 15px; }
  .result-actions .icon-only { width: 48px; padding: 12px; flex-shrink: 0; }
  .result-footer { display: none; }
  .export-hint { font-size: 11px; margin-top: 15px; }
  .storyboard-card .time { width: 63px; font-size: 11px; }
  .storyboard-card strong { font-size: 13px; }
  .storyboard-card p { font-size: 11px; }
  .empty-state { padding: 58px 22px; }
  .empty-state h2 { font-size: 19px; }
  .empty-state p { font-size: 13px; }
  .work-row { padding: 0 16px; gap: 6px; }
  .work-open { gap: 13px; min-height: 96px; }
  .work-icon { width: 43px; height: 43px; border-radius: 12px; }
  .work-text h2 { font-size: 14px; }
  .work-text>span { font-size: 11px; }
  .work-open>svg { display: none; }
  .delete-work { width: 44px; }
  .page-note { font-size: 11px; margin-top: 18px; }
  .brand-layout { grid-template-columns: 1fr; gap: 25px; }
  .brand-settings { padding: 24px 21px; }
  .brand-settings .form-footer { gap: 14px; }
  .brand-settings .form-footer>.field-hint { font-size: 11px; }
  .brand-settings .form-footer>.btn { font-size: 14px; padding-left: 25px; padding-right: 25px; }
  .color-row { gap: 8px; }
  .color-swatch { width: 44px; height: 44px; border-width: 4px; }
  .overline { font-size: 12px; margin-bottom: 12px; }
  .brand-preview { min-height: 205px; padding: 27px; }
  .brand-preview-dot { margin-bottom: 25px; width: 27px; height: 27px; }
  .brand-preview h2 { font-size: 27px; }
  .brand-preview p { font-size: 12px; }
  dialog:not(.nav-drawer) { width: calc(100% - 32px); padding: 25px; border-radius: 24px; max-height: 82vh; }
  dialog.mascot-modal { padding: 20px; max-height: calc(100dvh - 32px); }
  .modal-heading { gap: 12px; margin-bottom: 21px; }
  .modal-heading h2 { font-size: 21px; }
  .modal-heading>.icon-button { width: 44px; height: 44px; }
  .modal-copy { font-size: 13px; }
  .help-steps { font-size: 14px; }
  .modal-footer>.btn { font-size: 14px; }
  .brand-story-intro { gap: 13px; }
  .brand-story-intro p { font-size: 12px; }
  .toast { left: 50%; bottom: 98px; font-size: 13px; width: max-content; max-width: calc(100vw - 32px); padding: 13px 18px; }
}
@media (min-width: 541px) and (max-width: 760px) {
  .welcome { min-height: 151px; }
  .welcome-mascot { width: 138px; height: 145px; }
  .welcome-mascot img { width: 112px; height: 219px; left: 13px; }
  .entry-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; background: transparent; border: 0; }
  .entry-card { flex-direction: column; align-items: flex-start; min-height: 175px; gap: 18px; padding: 22px 18px; border-radius: 20px; background: white; border: 1px solid #eaeaf0; }
  .entry-card+.entry-card:before { display: none; }
  .entry-card h2 { font-size: 17px; }
  .entry-card p { font-size: 12px; }
  .entry-arrow { position: absolute; top: 24px; right: 15px; }
  .template-text h3 { font-size: 15px; }
  .template-text p { font-size: 12px; }
}
@media (max-width: 380px) { .top-actions .demo-chip { display: none; } }
@media (prefers-reduced-motion: reduce) { *, *:before, *:after { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }

#template-heading{scroll-margin-top:96px}.restore-note{font-size:13px;line-height:1.7;color:#8f747a;padding:12px 15px;border-radius:12px;background:#f7f0f2;margin-bottom:24px}
