:root {
  --paper: #f4f0e8;
  --paper-2: #ece6dc;
  --ink: #24241f;
  --ink-soft: #66645c;
  --line: rgba(41, 40, 35, .13);
  --line-strong: rgba(41, 40, 35, .24);
  --white: #fffdf8;
  --clay: #bf6d4f;
  --clay-dark: #92503a;
  --sage: #526e5c;
  --sage-soft: #dce6dc;
  --gold: #b18a49;
  --danger: #a74d45;
  --shadow: 0 18px 55px rgba(43, 38, 30, .09);
  --shadow-high: 0 28px 80px rgba(32, 29, 24, .18);
  --radius-xl: 28px;
  --radius-lg: 21px;
  --radius-md: 15px;
  --rail: 244px;
  --content: 1360px;
  color-scheme: light;
  font-family: "Inter", "SF Pro Display", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { overflow-x: hidden; background: var(--paper); scroll-behavior: smooth; }
body { margin: 0; min-width: 0; color: var(--ink); background:
  radial-gradient(circle at 72% -5%, rgba(201, 143, 105, .12), transparent 30rem),
  var(--paper); overflow-x: hidden; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
img { display: block; max-width: 100%; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }

.app { min-height: 100dvh; }
.desktop-rail {
  position: fixed; inset: 0 auto 0 0; z-index: 40; width: var(--rail);
  display: flex; flex-direction: column; padding: 29px 18px 22px;
  border-right: 1px solid var(--line); background: rgba(246, 242, 234, .88);
  backdrop-filter: blur(24px) saturate(1.2);
}
.brand-button, .mobile-brand {
  display: flex; align-items: center; gap: 12px; padding: 0; border: 0; background: transparent; text-align: left; cursor: pointer;
}
.brand-button { margin: 0 8px 38px; }
.brand-symbol { position: relative; width: 36px; height: 36px; flex: none; display: inline-block; }
.brand-symbol i { position: absolute; display: block; border-radius: 99px 99px 10px 99px; transform-origin: 100% 100%; background: var(--clay); }
.brand-symbol i:nth-child(1) { width: 10px; height: 27px; left: 7px; top: 2px; transform: rotate(-26deg); }
.brand-symbol i:nth-child(2) { width: 10px; height: 30px; left: 14px; top: 0; transform: rotate(4deg); background: #d49a78; }
.brand-symbol i:nth-child(3) { width: 9px; height: 23px; left: 22px; top: 7px; transform: rotate(30deg); background: #7e8e78; }
.brand-symbol.compact { width: 29px; height: 29px; transform: scale(.83); transform-origin: left center; }
.brand-copy { display: grid; gap: 3px; }
.brand-copy b, .mobile-brand b { font-family: "Songti SC", "STSong", Georgia, serif; font-size: 22px; letter-spacing: .15em; }
.brand-copy small, .mobile-brand small { font-size: 8px; letter-spacing: .18em; color: #8b877e; }

.rail-nav { display: grid; gap: 7px; }
.rail-item {
  width: 100%; min-height: 50px; display: grid; grid-template-columns: 25px 1fr auto; align-items: center; gap: 10px;
  border: 0; border-radius: 13px; padding: 0 13px; background: transparent; color: #77736b;
  font-size: 14px; text-align: left; cursor: pointer; transition: .22s ease;
}
.rail-item svg { width: 20px; height: 20px; }
.rail-item em { min-width: 23px; padding: 3px 6px; border-radius: 99px; background: #e5dfd5; font-size: 9px; font-style: normal; text-align: center; }
.rail-item:hover { color: var(--ink); background: rgba(255, 255, 255, .54); transform: translateX(2px); }
.rail-item.active { color: #fff; background: var(--ink); box-shadow: 0 12px 26px rgba(36, 36, 31, .17); }
.rail-item.active em { color: var(--ink); background: #fff; }
.rail-foot { margin-top: auto; padding: 18px 9px 0; border-top: 1px solid var(--line); }
.rail-capacity { display: grid; grid-template-columns: 1fr auto; gap: 5px; margin-bottom: 14px; font-size: 10px; color: #807c73; }
.rail-capacity span { display: flex; align-items: center; gap: 6px; }
.rail-capacity i, #mobile-health-dot, #system-health-dot { width: 7px; height: 7px; border-radius: 50%; background: #b7b2a8; box-shadow: 0 0 0 4px rgba(183, 178, 168, .14); }
.rail-capacity i.online, #mobile-health-dot.online, #system-health-dot.online { background: #6e916f; box-shadow: 0 0 0 4px rgba(110, 145, 111, .14); }
.rail-capacity b { color: #555249; font-weight: 600; }
.legacy-link { display: flex; justify-content: space-between; color: #77736a; font-size: 11px; text-decoration: none; }
.legacy-link:hover { color: var(--clay-dark); }

.workspace { min-height: 100dvh; margin-left: var(--rail); }
.mobile-header, .mobile-nav { display: none; }
.view { display: none; max-width: var(--content); margin: auto; padding: 58px 44px 90px; animation: view-in .35s ease both; }
.view.active { display: block; }
@keyframes view-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
.eyebrow { display: block; margin-bottom: 12px; color: var(--clay-dark); font-size: 10px; font-weight: 750; letter-spacing: .21em; text-transform: uppercase; }
.create-head { max-width: 730px; margin-bottom: 36px; }
.create-head h1, .library-head h1, .page-head h1 {
  margin: 0; font-family: "Songti SC", "STSong", Georgia, serif; font-weight: 500; letter-spacing: -.045em; line-height: 1.07;
}
.create-head h1 { font-size: clamp(45px, 5.4vw, 75px); }
.create-head h1 em, .library-head h1 em { color: var(--clay); font-style: normal; }
.create-head p { max-width: 550px; margin: 21px 0 0; color: var(--ink-soft); font-size: 15px; line-height: 1.8; }

.create-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.create-main { min-width: 0; display: grid; gap: 17px; }
.surface { border: 1px solid rgba(45, 42, 35, .1); border-radius: var(--radius-xl); background: rgba(255, 253, 248, .78); box-shadow: 0 1px 0 rgba(255, 255, 255, .7) inset; }
.product-section, .style-section, .output-section { min-width: 0; padding: 25px; }
.section-title { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 19px; }
.section-title > div { display: flex; align-items: center; gap: 10px; }
.section-title > div > span { display: grid; place-items: center; width: 27px; height: 27px; border: 1px solid var(--line-strong); border-radius: 50%; color: #817c72; font: 700 9px/1 system-ui; }
.section-title h2 { margin: 0; font-size: 17px; letter-spacing: -.02em; }
.section-title p { margin: 0; color: #8b877e; font-size: 11px; }
.text-button { padding: 8px 0; border: 0; background: transparent; color: #766e65; font-size: 11px; cursor: pointer; }
.text-button b { margin-left: 5px; color: var(--clay); }

.upload-card { position: relative; min-height: 300px; overflow: hidden; border: 1px dashed #bbb4a8; border-radius: var(--radius-lg); background: linear-gradient(135deg, #f2eee6, #ebe5db); transition: .25s ease; }
.upload-card.dragging { border-color: var(--clay); background: #f7eae2; transform: scale(.997); }
.upload-empty { min-height: 298px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 26px; text-align: center; }
.upload-illustration { position: relative; width: 86px; height: 86px; display: grid; place-items: center; margin-bottom: 15px; border-radius: 28px; background: rgba(255, 255, 255, .72); box-shadow: 0 12px 35px rgba(57, 50, 40, .09); }
.upload-illustration svg { width: 47px; height: 47px; color: #766f64; stroke-width: 1.15; }
.upload-illustration i { position: absolute; right: 9px; top: 9px; width: 18px; height: 18px; border-radius: 50%; background: var(--clay); }
.upload-illustration i:before, .upload-illustration i:after { content: ""; position: absolute; left: 5px; top: 8px; width: 8px; height: 1.5px; background: white; }
.upload-illustration i:after { transform: rotate(90deg); }
.upload-empty strong { font-size: 16px; }
.upload-empty > span { margin-top: 7px; color: #9a958c; font-size: 10px; }
.upload-actions { display: flex; gap: 9px; margin-top: 20px; }
.button {
  min-height: 43px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 17px;
  border: 1px solid transparent; border-radius: 12px; font-size: 12px; font-weight: 650; cursor: pointer; transition: .2s ease;
}
.button svg { width: 17px; height: 17px; }
.button.primary { color: #fff; background: var(--ink); box-shadow: 0 10px 24px rgba(36, 36, 31, .15); }
.button.primary:hover { background: #11110f; transform: translateY(-1px); }
.button.secondary { border-color: var(--line-strong); background: rgba(255, 255, 255, .56); }
.button.secondary:hover { background: #fff; }
.button.full { width: 100%; }
.upload-filled { min-height: 298px; display: grid; grid-template-columns: minmax(0, 1fr) 250px; }
.product-preview { position: relative; min-height: 298px; overflow: hidden; background: #e8e4dc; }
.product-preview img { width: 100%; height: 100%; min-height: 298px; max-height: 420px; object-fit: contain; }
.fact-badge { position: absolute; left: 13px; top: 13px; display: flex; align-items: center; gap: 7px; padding: 7px 10px; border-radius: 99px; background: rgba(255, 255, 255, .88); backdrop-filter: blur(10px); font-size: 9px; font-weight: 650; }
.fact-badge i { width: 6px; height: 6px; border-radius: 50%; background: var(--sage); }
.product-file-meta { display: flex; align-items: center; gap: 8px; padding: 20px; background: #f8f5ef; }
.product-file-meta > div { min-width: 0; display: grid; gap: 6px; margin-right: auto; }
.product-file-meta strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.product-file-meta span { color: #928c82; font-size: 9px; }
.icon-button { width: 38px; height: 38px; display: grid; place-items: center; flex: none; border: 1px solid var(--line); border-radius: 11px; background: #fff; cursor: pointer; }
.icon-button svg { width: 16px; height: 16px; }
.icon-button.danger { color: var(--danger); }
.upload-tip { display: flex; gap: 9px; margin-top: 13px; color: #7b756c; font-size: 10px; line-height: 1.55; }
.upload-tip svg { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.upload-tip p { margin: 0; }
.upload-tip b { color: var(--ink); }

.selected-style-card { min-height: 260px; display: grid; grid-template-columns: 43% 1fr; overflow: hidden; border-radius: var(--radius-lg); background: var(--ink); color: white; }
.selected-style-visual { position: relative; min-height: 260px; overflow: hidden; cursor: pointer; }
.selected-style-visual img { width: 100%; height: 100%; object-fit: cover; transition: .5s ease; }
.selected-style-visual:hover img { transform: scale(1.025); }
.selected-style-visual:after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 60%, rgba(36,36,31,.25)); }
.selected-style-copy { display: flex; flex-direction: column; justify-content: center; padding: 27px; }
.selected-style-copy > span { color: #c99b83; font-size: 9px; font-weight: 750; letter-spacing: .16em; }
.selected-style-copy h3 { margin: 10px 0 3px; font-family: "Songti SC", Georgia, serif; font-size: 31px; font-weight: 500; }
.selected-style-copy .style-subtitle { color: #b7b4ab; font-size: 11px; }
.selected-style-copy p { margin: 18px 0 22px; color: #d0cdc4; font-size: 11px; line-height: 1.75; }
.selected-style-copy button { align-self: flex-start; border: 0; border-bottom: 1px solid #807c72; padding: 0 0 5px; background: transparent; color: #fff; font-size: 10px; cursor: pointer; }
.quick-style-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 9px; margin-top: 10px; }
.quick-style {
  position: relative; aspect-ratio: .82; overflow: hidden; border: 2px solid transparent; border-radius: 14px; padding: 0; background: #ddd; cursor: pointer;
}
.quick-style img { width: 100%; height: 100%; object-fit: cover; transition: .35s ease; }
.quick-style:after { content: ""; position: absolute; inset: auto 0 0; height: 50%; background: linear-gradient(transparent, rgba(20, 20, 18, .7)); }
.quick-style span { position: absolute; z-index: 2; left: 9px; right: 7px; bottom: 8px; color: white; font-size: 9px; text-align: left; }
.quick-style:hover img { transform: scale(1.05); }
.quick-style.active { border-color: var(--clay); box-shadow: 0 0 0 2px rgba(191, 109, 79, .14); }

.segment-control { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.segment-control button { min-height: 67px; display: grid; align-content: center; gap: 4px; border: 1px solid var(--line); border-radius: 14px; background: #f5f1e9; cursor: pointer; transition: .2s ease; }
.segment-control b { font-size: 14px; }
.segment-control span { color: #8e887e; font-size: 9px; }
.segment-control button.active { border-color: var(--ink); background: var(--ink); color: white; box-shadow: 0 10px 25px rgba(34, 34, 29, .12); }
.segment-control button.active span { color: #c4c1b7; }
.delivery-note { display: flex; align-items: center; justify-content: center; gap: 9px; margin-top: 13px; color: #8b877e; font-size: 9px; }
.delivery-note i { width: 15px; height: 1px; background: #c7c0b6; }

.order-panel { overflow: clip; background: #2a2b26; color: #fff; }
.order-sticky { position: sticky; top: 24px; padding: 27px; }
.order-sticky .eyebrow { color: #c89477; }
.order-sticky h2 { margin: -4px 0 21px; font-family: "Songti SC", Georgia, serif; font-size: 28px; font-weight: 500; }
.order-preview { position: relative; aspect-ratio: 1.15; overflow: hidden; margin-bottom: 18px; border-radius: 16px; background: #45463f; }
.order-preview img { width: 100%; height: 100%; object-fit: cover; }
.order-preview:after { content: "目标成片"; position: absolute; left: 10px; bottom: 10px; padding: 5px 8px; border-radius: 99px; background: rgba(29, 29, 26, .62); backdrop-filter: blur(10px); font-size: 8px; letter-spacing: .08em; }
.order-sticky dl { display: grid; gap: 0; margin: 0 0 24px; border-top: 1px solid #45463f; }
.order-sticky dl div { display: grid; grid-template-columns: 60px 1fr; gap: 15px; padding: 12px 0; border-bottom: 1px solid #45463f; font-size: 10px; }
.order-sticky dt { color: #8d8e85; }
.order-sticky dd { margin: 0; text-align: right; }
.produce-button {
  width: 100%; min-height: 68px; display: flex; align-items: center; justify-content: space-between; padding: 0 19px 0 20px;
  border: 0; border-radius: 17px; background: var(--clay); color: white; cursor: pointer; box-shadow: 0 17px 36px rgba(157, 75, 50, .25); transition: .2s ease;
}
.produce-button:hover { background: #ca7655; transform: translateY(-1px); }
.produce-button:disabled { cursor: not-allowed; opacity: .42; transform: none; box-shadow: none; }
.produce-button span { display: grid; gap: 3px; text-align: left; }
.produce-button small { font-size: 8px; letter-spacing: .12em; opacity: .72; }
.produce-button b { font-size: 13px; }
.produce-button svg { width: 22px; height: 22px; }
.privacy-note { display: flex; align-items: center; justify-content: center; gap: 5px; margin: 12px 0 0; color: #898b82; font-size: 8px; }
.privacy-note svg { width: 12px; height: 12px; }

.library-head { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, .6fr); gap: 50px; align-items: end; margin-bottom: 42px; }
.library-head h1 { max-width: 790px; font-size: clamp(42px, 5vw, 68px); }
.library-head > p { margin: 0 0 8px; color: var(--ink-soft); font-size: 13px; line-height: 1.8; }
.library-toolbar { position: sticky; top: 0; z-index: 15; display: flex; align-items: center; gap: 15px; margin: 0 -12px 17px; padding: 14px 12px; background: rgba(244, 240, 232, .92); backdrop-filter: blur(18px); }
.search-box { min-width: 270px; height: 44px; display: flex; align-items: center; gap: 9px; padding: 0 13px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255, 253, 248, .72); }
.search-box svg { width: 17px; height: 17px; color: #8a857c; }
.search-box input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; font-size: 11px; }
.search-box button { border: 0; background: transparent; color: #8a857c; cursor: pointer; }
.family-tabs { display: flex; gap: 7px; overflow-x: auto; scrollbar-width: none; }
.family-tabs::-webkit-scrollbar { display: none; }
.family-tabs button { min-height: 38px; flex: none; padding: 0 14px; border: 1px solid var(--line); border-radius: 99px; background: transparent; color: #6f6b63; font-size: 10px; cursor: pointer; }
.family-tabs button.active { border-color: var(--ink); background: var(--ink); color: white; }
.style-count-line { margin-bottom: 13px; color: #858077; font-size: 10px; }
.style-count-line span { color: var(--ink); font-weight: 700; }
.style-grid-v2 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.style-card-v2 { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); background: rgba(255, 253, 248, .72); transition: .28s ease; }
.style-card-v2:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.style-card-image { position: relative; aspect-ratio: .82; overflow: hidden; cursor: pointer; background: #ddd; }
.style-card-image img { width: 100%; height: 100%; object-fit: cover; transition: .55s ease; }
.style-card-v2:hover .style-card-image img { transform: scale(1.025); }
.style-card-image:after { content: ""; position: absolute; inset: 45% 0 0; background: linear-gradient(transparent, rgba(20, 20, 18, .35)); pointer-events: none; }
.style-status { position: absolute; z-index: 2; left: 12px; top: 12px; display: flex; align-items: center; gap: 6px; padding: 6px 9px; border-radius: 99px; background: rgba(255, 255, 255, .88); color: var(--ink); backdrop-filter: blur(12px); font-size: 8px; font-weight: 700; }
.style-status i { width: 6px; height: 6px; border-radius: 50%; background: var(--sage); }
.style-card-rank { position: absolute; z-index: 2; right: 12px; top: 12px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: rgba(30, 30, 27, .66); color: white; font: 700 9px/1 system-ui; backdrop-filter: blur(8px); }
.style-card-copy { padding: 16px; }
.style-card-copy .family-label { color: var(--clay-dark); font-size: 8px; font-weight: 750; letter-spacing: .12em; }
.style-card-copy h3 { margin: 6px 0 2px; font-family: "Songti SC", Georgia, serif; font-size: 24px; font-weight: 500; }
.style-card-copy > p { margin: 0; color: #77736b; font-size: 10px; }
.style-card-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 15px; padding-top: 12px; border-top: 1px solid var(--line); }
.style-card-meta span { overflow: hidden; color: #8c877f; font-size: 8px; white-space: nowrap; text-overflow: ellipsis; }
.style-card-meta button { flex: none; border: 0; background: transparent; color: var(--clay-dark); font-size: 10px; font-weight: 700; cursor: pointer; }
.empty-state { min-height: 330px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #858077; }
.empty-state svg { width: 32px; height: 32px; margin-bottom: 12px; }
.empty-state strong { color: var(--ink); }
.empty-state span { margin-top: 5px; font-size: 10px; }

.page-head { margin-bottom: 32px; }
.page-head h1 { font-size: clamp(40px, 5vw, 65px); }
.page-head p { margin: 13px 0 0; color: var(--ink-soft); font-size: 13px; }
.job-filter-row { display: flex; gap: 7px; margin-bottom: 17px; }
.job-filter-row button { min-height: 38px; padding: 0 15px; border: 1px solid var(--line); border-radius: 99px; background: transparent; font-size: 10px; cursor: pointer; }
.job-filter-row button.active { color: white; background: var(--ink); }
.job-list-v2 { display: grid; gap: 10px; }
.job-card-v2 { display: grid; grid-template-columns: 88px 1fr auto; gap: 16px; align-items: center; padding: 13px; border: 1px solid var(--line); border-radius: 17px; background: rgba(255, 253, 248, .74); }
.job-card-v2 img { width: 88px; height: 105px; border-radius: 12px; object-fit: cover; background: #ddd; }
.job-card-copy { min-width: 0; }
.job-card-copy span { color: #908a80; font-size: 8px; letter-spacing: .1em; }
.job-card-copy h3 { margin: 6px 0 5px; overflow: hidden; font-size: 14px; white-space: nowrap; text-overflow: ellipsis; }
.job-card-copy p { margin: 0; color: #7b776f; font-size: 10px; }
.job-card-state { display: grid; justify-items: end; gap: 8px; }
.job-card-state span { padding: 6px 9px; border-radius: 99px; background: #e6e2d8; color: #777269; font-size: 8px; }
.job-card-state span.review { color: #8d562f; background: #f2e2d6; }
.job-card-state span.partial { color: #846512; background: #f3e9c9; }
.job-card-state span.done { color: #4f6b56; background: #dfe9df; }
.job-card-state button { border: 0; background: transparent; color: var(--clay-dark); font-size: 10px; cursor: pointer; }
.empty-jobs { min-height: 350px; display: grid; place-items: center; border: 1px dashed var(--line-strong); border-radius: var(--radius-lg); color: #858077; text-align: center; }

.system-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.system-card { min-height: 230px; display: flex; flex-direction: column; align-items: flex-start; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius-xl); background: rgba(255, 253, 248, .75); }
.system-card-head { width: 100%; display: flex; justify-content: space-between; align-items: center; margin-bottom: 34px; }
.system-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; background: var(--ink); color: white; }
.system-icon svg { width: 20px; height: 20px; }
.system-card > strong { font-size: 17px; }
.system-card > p { max-width: 460px; margin: 8px 0 23px; color: #79756c; font-size: 11px; line-height: 1.7; }
.system-number { margin: 5px 0 auto; font-family: "Songti SC", Georgia, serif; font-size: 54px; color: var(--clay); }
.system-card button, .system-card a { margin-top: auto; border: 0; border-bottom: 1px solid var(--line-strong); padding: 0 0 5px; background: transparent; color: var(--ink); font-size: 10px; text-decoration: none; cursor: pointer; }
.channel-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.channel-list span { padding: 6px 8px; border-radius: 99px; background: #e9e4dc; color: #6d6961; font-size: 8px; }
.channel-list span.on { color: #45634d; background: #dfe9df; }

.style-dialog, .auth-dialog {
  padding: 0; border: 0; outline: 0; border-radius: 24px; background: var(--white); color: var(--ink); box-shadow: var(--shadow-high);
}
.style-dialog { width: min(950px, calc(100vw - 30px)); max-height: min(880px, calc(100dvh - 30px)); overflow: auto; }
.style-dialog::backdrop, .auth-dialog::backdrop { background: rgba(28, 27, 24, .66); backdrop-filter: blur(12px); }
.dialog-close { position: fixed; z-index: 3; margin: 15px; right: max(calc((100vw - min(950px, calc(100vw - 30px))) / 2), 15px); width: 38px; height: 38px; border: 0; border-radius: 50%; background: rgba(25, 25, 22, .72); color: white; font-size: 21px; cursor: pointer; }
.dialog-gallery { display: grid; grid-template-columns: 1.3fr .7fr; grid-template-rows: repeat(2, 245px); gap: 3px; background: #ddd; }
.dialog-gallery img { width: 100%; height: 100%; object-fit: cover; }
.dialog-gallery img:first-child { grid-row: 1/3; }
.dialog-content { padding: 31px; }
.dialog-content h2 { margin: 0; font-family: "Songti SC", Georgia, serif; font-size: 39px; font-weight: 500; }
.dialog-subtitle { margin: 5px 0 0; color: #817c73; font-size: 12px; }
.style-score-row { display: flex; gap: 8px; margin: 18px 0; }
.style-score-row span { padding: 7px 10px; border-radius: 99px; background: #eee9e0; color: #716c64; font-size: 9px; }
.dialog-description { max-width: 720px; color: #5f5c55; font-size: 12px; line-height: 1.8; }
.dialog-detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 17px 30px; margin: 24px 0 27px; padding-top: 20px; border-top: 1px solid var(--line); }
.dialog-detail-grid span { color: #9a948a; font-size: 8px; letter-spacing: .1em; }
.dialog-detail-grid p { margin: 6px 0 0; font-size: 10px; line-height: 1.65; }
.auth-dialog { width: min(430px, calc(100vw - 28px)); }
.auth-dialog form { padding: 30px; }
.auth-symbol { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 15px; background: var(--ink); color: white; }
.auth-dialog h2 { margin: 23px 0 7px; font-family: "Songti SC", Georgia, serif; font-size: 28px; font-weight: 500; }
.auth-dialog p { margin: 0 0 22px; color: #7c776f; font-size: 10px; line-height: 1.65; }
.auth-dialog label { display: grid; gap: 7px; font-size: 9px; }
.auth-dialog input { height: 46px; border: 1px solid var(--line-strong); border-radius: 12px; padding: 0 13px; outline: 0; background: #f4f0e8; }
.auth-dialog input:focus { border-color: var(--clay); box-shadow: 0 0 0 3px rgba(191, 109, 79, .12); }
.auth-actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; margin-top: 19px; }

.production-screen {
  position: fixed; inset: 0; z-index: 100; display: grid; grid-template-columns: 56% 44%; background: #20211e; color: white;
  opacity: 0; visibility: hidden; transition: .35s ease;
}
.production-screen.active { opacity: 1; visibility: visible; }
.production-visual { position: relative; overflow: hidden; }
.production-visual:after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 55%, #20211e), linear-gradient(0deg, rgba(17,17,15,.25), transparent 40%); }
.production-visual img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.8) brightness(.82); transform: scale(1.02); }
.scan-line { position: absolute; z-index: 2; top: 0; bottom: 0; left: 18%; width: 1px; background: linear-gradient(transparent, #e8b99e, transparent); box-shadow: 0 0 28px #e8b99e; animation: scan 3.8s ease-in-out infinite alternate; }
@keyframes scan { to { left: 82%; } }
.production-logo { position: absolute; z-index: 3; left: 30px; top: 27px; display: flex; align-items: center; gap: 8px; font-family: "Songti SC", Georgia, serif; font-size: 17px; }
.production-copy { display: flex; flex-direction: column; justify-content: center; padding: clamp(35px, 6vw, 100px); }
.production-index { color: #c3896e; font-size: 9px; letter-spacing: .2em; }
.production-copy h2 { margin: 17px 0 10px; font-family: "Songti SC", Georgia, serif; font-size: clamp(33px, 4vw, 58px); font-weight: 500; line-height: 1.15; }
.production-copy p { max-width: 430px; margin: 0; color: #a6a79f; font-size: 12px; line-height: 1.75; }
.production-progress { height: 2px; margin: 45px 0 16px; background: #42433e; }
.production-progress i { display: block; width: 8%; height: 100%; background: var(--clay); transition: width 1s ease; }
.production-steps { display: flex; justify-content: space-between; color: #5f615c; font-size: 9px; }
.production-steps span.active { color: #d9d8d1; }

.result-screen { position: fixed; inset: 0; z-index: 90; overflow: auto; background: var(--paper); opacity: 0; visibility: hidden; transform: translateY(20px); transition: .35s ease; }
.result-screen.active { opacity: 1; visibility: visible; transform: none; }
.result-screen > header { height: 78px; display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 13px; padding: 0 28px; border-bottom: 1px solid var(--line); background: rgba(244, 240, 232, .91); backdrop-filter: blur(18px); position: sticky; top: 0; z-index: 5; }
.result-screen header button { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: rgba(255,255,255,.55); cursor: pointer; }
.result-screen header .eyebrow { margin: 0; font-size: 7px; }
.result-screen header h2 { margin: 2px 0 0; font-size: 14px; }
.result-more { letter-spacing: 2px; }
.result-layout { min-height: calc(100dvh - 78px); display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(330px, .7fr); gap: 22px; padding: 25px; }
.result-image-wrap { position: relative; min-height: 680px; overflow: hidden; border-radius: var(--radius-xl); background: #ddd; }
.result-image-wrap > img { width: 100%; height: 100%; object-fit: contain; background: #e8e3da; }
.result-set-grid { grid-column: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; align-self: start; }
.result-set-grid figure { position: relative; aspect-ratio: 2/3; overflow: hidden; margin: 0; border-radius: 16px; background: #ddd; cursor: zoom-in; }
.result-set-grid img { width: 100%; height: 100%; object-fit: cover; }
.result-set-grid span { position: absolute; left: 8px; bottom: 8px; padding: 5px 7px; border-radius: 99px; background: rgba(25,25,22,.68); color: white; font-size: 8px; backdrop-filter: blur(8px); }
.result-badge { position: absolute; left: 16px; top: 16px; display: flex; align-items: center; gap: 7px; padding: 8px 11px; border-radius: 99px; background: rgba(255,255,255,.88); backdrop-filter: blur(10px); font-size: 9px; }
.result-badge i { width: 6px; height: 6px; border-radius: 50%; background: var(--sage); }
.result-zoom { position: absolute; right: 16px; bottom: 16px; width: 45px; height: 45px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(30,30,27,.76); color: white; cursor: pointer; }
.result-review { align-self: start; padding: 30px; border: 1px solid var(--line); border-radius: var(--radius-xl); background: rgba(255,253,248,.78); }
.result-review h2 { margin: 0; font-family: "Songti SC", Georgia, serif; font-size: 33px; font-weight: 500; }
.result-review > p { margin: 10px 0 22px; color: #716d65; font-size: 11px; line-height: 1.7; }
.quality-list { display: grid; gap: 8px; margin-bottom: 22px; }
.quality-list label { display: grid; grid-template-columns: 20px 1fr; gap: 10px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 13px; cursor: pointer; }
.quality-list input { width: 17px; height: 17px; accent-color: var(--sage); }
.quality-list span { display: grid; gap: 3px; }
.quality-list b { font-size: 10px; }
.quality-list small { color: #8a857c; font-size: 8px; }
.result-review .button { margin-top: 9px; }
.image-viewer { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 25px; background: rgba(16,16,14,.94); opacity: 0; visibility: hidden; transition: .2s ease; }
.image-viewer.active { opacity: 1; visibility: visible; }
.image-viewer img { max-width: 96vw; max-height: 94dvh; object-fit: contain; }
.image-viewer button { position: absolute; right: 22px; top: 18px; width: 43px; height: 43px; border: 0; border-radius: 50%; background: rgba(255,255,255,.13); color: white; font-size: 25px; cursor: pointer; }
.toast { position: fixed; z-index: 140; left: 50%; bottom: 25px; display: flex; align-items: center; gap: 8px; max-width: calc(100vw - 30px); padding: 12px 16px; border-radius: 13px; background: #24251f; color: white; box-shadow: var(--shadow-high); font-size: 10px; opacity: 0; visibility: hidden; transform: translate(-50%, 15px); transition: .25s ease; }
.toast.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.toast svg { width: 15px; height: 15px; color: #a8c3aa; }

@media (max-width: 1080px) {
  :root { --rail: 88px; }
  .desktop-rail { padding-inline: 13px; }
  .brand-copy, .rail-item span, .rail-item em, .rail-capacity, .legacy-link { display: none; }
  .brand-button { justify-content: center; margin-inline: 0; }
  .rail-item { grid-template-columns: 1fr; justify-items: center; padding: 0; }
  .create-grid { grid-template-columns: minmax(0, 1fr) 290px; }
  .selected-style-card { grid-template-columns: 48% 1fr; }
  .quick-style-row { grid-template-columns: repeat(4, 1fr); }
  .quick-style:nth-child(5) { display: none; }
  .style-grid-v2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  :root { --radius-xl: 21px; --radius-lg: 17px; }
  body { background: var(--paper); }
  .desktop-rail { display: none; }
  .workspace { margin-left: 0; padding-bottom: calc(71px + env(safe-area-inset-bottom)); }
  .mobile-header {
    position: sticky; top: 0; z-index: 30; height: calc(62px + env(safe-area-inset-top)); display: flex; align-items: flex-end; justify-content: space-between;
    padding: env(safe-area-inset-top) 18px 10px; border-bottom: 1px solid var(--line); background: rgba(245, 241, 234, .9); backdrop-filter: blur(20px);
  }
  .mobile-brand { gap: 6px; }
  .mobile-brand > span:last-child { display: grid; gap: 1px; }
  .mobile-brand b { font-size: 17px; }
  .mobile-brand small { font-size: 6px; }
  .avatar-button { position: relative; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--ink); color: white; font-size: 10px; }
  .avatar-button i { position: absolute; right: 0; bottom: 1px; border: 2px solid var(--paper); }
  .mobile-nav {
    position: fixed; z-index: 60; inset: auto 0 0; height: calc(64px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(4, 1fr);
    padding: 6px 8px env(safe-area-inset-bottom); border-top: 1px solid var(--line); background: rgba(250, 247, 241, .94); backdrop-filter: blur(24px);
  }
  .mobile-nav button { min-width: 44px; min-height: 44px; display: grid; justify-items: center; align-content: center; gap: 3px; border: 0; border-radius: 12px; background: transparent; color: #8b867d; font-size: 10px; }
  .mobile-nav svg { width: 20px; height: 20px; }
  .mobile-nav button.active { color: var(--clay-dark); }
  .view { padding: 29px 15px 35px; animation: none; }
  .create-head { margin-bottom: 24px; }
  .create-head .eyebrow { margin-bottom: 8px; }
  .create-head h1 { font-size: clamp(39px, 13vw, 52px); }
  .create-head p { margin-top: 14px; font-size: 12px; line-height: 1.7; }
  .create-grid { display: block; }
  .create-main { gap: 12px; }
  .product-section, .style-section, .output-section { width: 100%; overflow: hidden; padding: 16px; }
  .section-title { align-items: flex-start; margin-bottom: 14px; }
  .section-title h2 { font-size: 15px; }
  .section-title p { max-width: 140px; text-align: right; font-size: 10px; line-height: 1.5; }
  .upload-card, .upload-empty { min-height: 285px; }
  .upload-empty { padding: 20px 14px; }
  .upload-actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  .button { min-height: 46px; }
  .upload-filled { min-height: 0; grid-template-columns: 1fr; }
  .product-preview { min-height: 330px; }
  .product-preview img { min-height: 330px; max-height: 460px; }
  .product-file-meta { padding: 13px; }
  .selected-style-card { min-height: 0; grid-template-columns: 1fr; }
  .selected-style-visual { min-height: 290px; }
  .selected-style-copy { padding: 20px; }
  .selected-style-copy h3 { font-size: 28px; }
  .selected-style-copy p { margin: 12px 0 16px; }
  .quick-style-row { display: flex; gap: 8px; margin-inline: -16px; padding: 0 16px 2px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .quick-style-row::-webkit-scrollbar { display: none; }
  .quick-style { width: 105px; flex: 0 0 105px; scroll-snap-align: start; }
  .quick-style:nth-child(5) { display: block; }
  .segment-control button { min-height: 64px; }
  .order-panel { min-height: 0; overflow: visible; margin: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
  .order-sticky { position: static; height: 0; padding: 0; }
  .order-preview, .order-sticky dl, .order-sticky > .eyebrow, .order-sticky > h2 { display: none; }
  .order-sticky .produce-button { position: fixed; z-index: 50; left: 12px; right: 12px; bottom: calc(70px + env(safe-area-inset-bottom)); width: calc(100% - 24px); box-shadow: 0 17px 35px rgba(60, 42, 33, .28); }
  .privacy-note { display: none; }
  .library-head { display: block; margin-bottom: 25px; }
  .library-head h1 { font-size: 42px; }
  .library-head > p { margin-top: 13px; font-size: 11px; }
  .library-toolbar { top: calc(62px + env(safe-area-inset-top)); display: grid; gap: 9px; margin-inline: -15px; padding: 10px 15px; }
  .search-box { min-width: 0; width: 100%; height: 43px; }
  .family-tabs { margin-inline: -15px; padding-inline: 15px; }
  .family-tabs button { min-height: 44px; padding-inline: 16px; }
  .style-grid-v2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .style-card-v2 { border-radius: 15px; }
  .style-card-image { aspect-ratio: .75; }
  .style-card-copy { padding: 11px; }
  .style-card-copy h3 { font-size: 18px; }
  .style-card-copy > p { font-size: 10px; }
  .style-card-meta { margin-top: 10px; padding-top: 9px; }
  .style-card-meta span { max-width: 82px; font-size: 9px; }
  .style-card-meta button { min-width: 44px; min-height: 44px; margin: -10px -5px -10px 0; padding: 10px 5px; }
  #clear-style-search { min-width: 44px; min-height: 44px; }
  .style-status { left: 8px; top: 8px; padding: 5px 7px; }
  .style-card-rank { right: 8px; top: 8px; width: 25px; height: 25px; }
  .page-head { margin-bottom: 24px; }
  .page-head h1 { font-size: 41px; }
  .job-card-v2 { grid-template-columns: 74px 1fr; gap: 12px; }
  .job-card-v2 img { width: 74px; height: 92px; }
  .job-card-state { grid-column: 2; display: flex; justify-content: space-between; justify-items: initial; width: 100%; margin-top: -5px; }
  .system-grid { grid-template-columns: 1fr; }
  .system-card { min-height: 210px; }
  .style-dialog {
    width: 100%; max-width: none; max-height: calc(100dvh - 20px); margin: auto 0 0; border-radius: 25px 25px 0 0;
  }
  .style-dialog[open] { animation: sheet-in .32s ease both; }
  @keyframes sheet-in { from { transform: translateY(100%); } to { transform: none; } }
  .dialog-close { position: absolute; right: 9px; top: 4px; margin: 0; }
  .dialog-gallery { grid-template-rows: repeat(2, 155px); }
  .dialog-content { padding: 22px 18px calc(20px + env(safe-area-inset-bottom)); }
  .dialog-content h2 { font-size: 32px; }
  .dialog-detail-grid { grid-template-columns: 1fr; gap: 12px; }
  .production-screen { grid-template-columns: 1fr; grid-template-rows: 54% 46%; }
  .production-visual:after { background: linear-gradient(0deg, #20211e, transparent 45%); }
  .production-copy { justify-content: flex-start; padding: 27px 24px calc(20px + env(safe-area-inset-bottom)); }
  .production-copy h2 { margin-top: 12px; font-size: 34px; }
  .production-progress { margin-top: 25px; }
  .result-screen > header { height: calc(64px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 13px 0; }
  .result-layout { min-height: 0; display: block; padding: 12px 12px calc(88px + env(safe-area-inset-bottom)); }
  .result-image-wrap { min-height: 0; aspect-ratio: 2/3; border-radius: 20px; }
  .result-set-grid { grid-template-columns: repeat(2, 1fr); margin-bottom: 12px; }
  .result-set-grid figure { border-radius: 13px; }
  .result-review { margin-top: 12px; padding: 19px; }
  .result-review h2 { font-size: 29px; }
  .image-viewer { padding: 10px; }
  .toast { bottom: calc(80px + env(safe-area-inset-bottom)); }
}

@media (max-width: 390px) {
  .view { padding-inline: 12px; }
  .library-toolbar { margin-inline: -12px; padding-inline: 12px; }
  .family-tabs { margin-inline: -12px; padding-inline: 12px; }
  .create-head h1 { font-size: 40px; }
  .product-section, .style-section, .output-section { padding: 14px; }
  .upload-actions { grid-template-columns: 1fr; }
  .style-grid-v2 { gap: 7px; }
  .style-card-copy h3 { font-size: 17px; }
  .segment-control b { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
