:root {
  --ink: #1c211e;
  --muted: #747c76;
  --line: #dde1dd;
  --soft: #f4f5f3;
  --paper: #fbfcfa;
  --green: #365f4a;
  --green-soft: #e4ece7;
  --accent: #c9ff65;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: "DM Sans", "Noto Sans SC", sans-serif; letter-spacing: 0; overflow: hidden; }
button, textarea, input { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .72; }

.topbar { height: 64px; border-bottom: 1px solid #e6e9e6; display: flex; align-items: center; padding: 0 22px; background: rgba(255,255,255,.96); box-shadow: 0 1px 10px rgba(28,33,30,.04); }
.brand { width: 280px; display: flex; gap: 11px; align-items: center; color: #313735; text-decoration: none; font-size: 17px; font-weight: 800; }
.brand-logo { width: 210px; height: auto; max-height: 48px; object-fit: contain; display: block; }
.brand-name { display: inline-flex; align-items: baseline; gap: 2px; letter-spacing: .035em; white-space: nowrap; font-weight: 800; }
.brand-name strong { font-weight: 800; }
.brand-name b { color: #313735; font-size: 17px; font-weight: 800; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; background: transparent; border: 0; border-radius: 0; box-shadow: none; }
.brand-mark img { width: 31px; height: 31px; object-fit: contain; display: block; filter: grayscale(1) brightness(.46); }
.main-nav { height: 100%; display: flex; align-items: center; gap: 3px; }
.nav-item { height: 100%; padding: 0 18px; border: 0; background: transparent; color: #737b77; font-weight: 600; position: relative; }
.nav-item.active { color: #252b28; }
.nav-item.active::after { content: ""; position: absolute; height: 2px; background: var(--green); left: 18px; right: 18px; bottom: 0; }
.top-actions { margin-left: auto; display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.account-menu { position: relative; display: flex; align-items: center; }
.icon-btn { width: 34px; height: 34px; border: 1px solid var(--line); background: white; border-radius: 6px; font-weight: 700; }
.topbar .icon-btn { border-color: transparent; background: transparent; color: #6c7470; }
.account-button { min-width: 78px; height: 38px; padding: 0 18px; border: 0; border-radius: 19px; background: #edf1f1; color: #3f4743; font-size: 13px; font-weight: 700; }
.account-button:hover { background: #e3e8e8; }
.top-actions .account-button { min-width: 150px; border-radius: 8px; }
.account-button.wechat-entry { min-width: 104px; background: #07c160; color: white; box-shadow: none; }
.top-actions .account-button.wechat-entry { min-width: 150px; }
.account-button.wechat-entry:hover { background: #06ad56; }
.account-button.account-authenticated { min-width: 136px; height: 46px; display: grid; grid-template-columns: minmax(0, 1fr) 34px; align-items: center; gap: 8px; padding: 0 9px 0 12px; background: linear-gradient(135deg, #f7fbff, #edf5ff); color: #26302b; border: 1px solid #e3edf4; border-radius: 23px; text-align: left; box-shadow: 0 7px 18px rgba(32,60,80,.08); }
.account-button.account-authenticated:hover { background: linear-gradient(135deg, #f2f8ff, #e6f1ff); }
.account-avatar-mini { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; overflow: hidden; border-radius: 50%; background: #365f4a; color: white; font-size: 12px; font-weight: 900; box-shadow: 0 0 0 2px white; }
.account-avatar-mini.large { width: 50px; height: 50px; font-size: 15px; box-shadow: 0 0 0 3px white, 0 10px 20px rgba(17,32,25,.13); }
.account-avatar-mini img { width: 100%; height: 100%; display: block; object-fit: cover; }
.account-button-copy { min-width: 0; display: grid; gap: 2px; line-height: 1.1; }
.account-button-copy b { max-width: 82px; display: inline-flex; align-items: center; gap: 5px; overflow: hidden; white-space: nowrap; font-size: 12px; font-weight: 900; }
.account-button-copy b span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.account-button-copy small { color: #9a9fa0; font-size: 10px; font-weight: 900; }
.account-tier-gem { width: 12px; height: 12px; flex: 0 0 auto; display: inline-block; position: relative; transform: rotate(45deg); border-radius: 2px; background: linear-gradient(135deg, #e5e8e9 0%, #b7bdc0 46%, #7f878b 100%); box-shadow: inset 1px 1px 1px rgba(255,255,255,.75), 0 1px 2px rgba(25,32,30,.14); }
.account-tier-gem::after { content: ""; position: absolute; inset: 3px 1px auto auto; width: 4px; height: 4px; border-radius: 1px; background: rgba(255,255,255,.65); }
.account-tier-gem.member { background: linear-gradient(135deg, #d9f2ff 0%, #52b9ff 48%, #1768d8 100%); box-shadow: inset 1px 1px 1px rgba(255,255,255,.8), 0 2px 7px rgba(23,104,216,.22); }
.account-popover { position: absolute; z-index: 60; top: calc(100% + 10px); right: 0; width: 318px; display: none; gap: 14px; padding: 0 16px 16px; border: 1px solid #e4e8e5; border-radius: 14px; background: white; box-shadow: 0 22px 58px rgba(18,26,22,.18); }
.account-popover::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; }
.account-menu.authenticated:hover .account-popover,
.account-menu.authenticated:focus-within .account-popover { display: grid; }
.account-popover-hero { height: 74px; position: relative; margin: 0 -16px; padding: 16px 18px; overflow: hidden; border-radius: 14px 14px 0 0; background: radial-gradient(circle at 15% 20%, rgba(255,255,255,.92), transparent 32%), linear-gradient(135deg, #f4fbff, #edf4ff 58%, #f9fbfb); }
.account-popover-hero::after { content: "PERSONAL"; position: absolute; right: 52px; top: 15px; color: rgba(44,75,92,.055); font-size: 26px; font-weight: 900; letter-spacing: .04em; }
.account-popover-edition { position: relative; z-index: 1; display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 13px; background: white; color: #6d7372; font-size: 12px; font-weight: 900; box-shadow: 0 7px 18px rgba(25,40,32,.07); }
.account-popover-gem { position: absolute; right: 28px; top: 21px; width: 38px; height: 38px; opacity: .72; }
.account-popover-head { display: flex; align-items: center; gap: 11px; margin-top: -19px; position: relative; z-index: 1; }
.account-popover-copy { min-width: 0; margin-right: auto; display: grid; gap: 4px; }
.account-popover-copy b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 900; }
.account-popover-copy small { color: var(--muted); font-size: 10px; }
.account-tier-badge { min-width: 54px; height: 24px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; background: #eef0f0; color: #737a7c; font-size: 10px; font-weight: 900; }
.account-tier-badge.member { background: #e4f3ff; color: #1768d8; }
.account-popover-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.account-popover-stats div { min-height: 66px; display: grid; align-content: center; gap: 6px; padding: 12px; border-radius: 8px; background: linear-gradient(145deg, #f8faf9, #eff5f1); }
.account-popover-stats span { color: #8b928f; font-size: 10px; font-weight: 800; }
.account-popover-stats b { color: var(--ink); font-size: 20px; line-height: 1; font-weight: 900; }
.account-popover-stats div:nth-child(2) b { font-size: 14px; }
.account-popover-cta { min-height: 54px; border: 0; border-radius: 9px; background: linear-gradient(135deg, #173a2c, #2f6f4e); color: white; font-size: 15px; font-weight: 900; box-shadow: 0 10px 24px rgba(47,111,78,.2); }
.account-popover-cta:hover { filter: brightness(1.04); }
.account-popover-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding-top: 2px; }
.account-popover-actions button { min-height: 34px; border: 1px solid var(--line); border-radius: 6px; background: #fbfcfb; color: #5e6862; font-size: 11px; font-weight: 800; }
.account-popover-actions button:hover { border-color: #cbd8d0; background: var(--green-soft); color: var(--green); }

.workspace { height: calc(100vh - 64px); display: grid; grid-template-columns: 300px minmax(500px, 1fr) 260px; }
.control-panel, .results-panel { min-height: 0; background: white; padding: 20px; overflow-y: auto; scrollbar-width: thin; }
.control-panel { padding: 16px; overflow-y: auto; }
.control-panel { border-right: 1px solid var(--line); }
.results-panel { border-left: 1px solid var(--line); }
.panel-heading, .results-heading, .setting-row, .history-title { display: flex; align-items: center; justify-content: space-between; }
.eyebrow { margin: 0 0 3px; color: var(--muted); text-transform: uppercase; font-size: 10px; font-weight: 700; letter-spacing: .1em; }
h1, h2 { margin: 0; font-size: 20px; line-height: 1.2; }
.subtle { background: var(--soft); }
.panel-upload-button { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 50%; background: white; color: var(--ink); font-size: 15px; font-weight: 700; line-height: 1; cursor: pointer; white-space: nowrap; }
.panel-upload-button:hover { background: var(--soft); }

.control-section { margin-top: 14px; padding-top: 11px; border-top: 1px solid var(--line); }
.control-section.compact { margin-top: 12px; padding-top: 10px; }
.section-title { display: flex; align-items: center; justify-content: flex-start; margin-bottom: 11px; gap: 6px; font-size: 14px; font-weight: 700; line-height: 1.25; }
.side-title, .current-source-block .history-title { display: flex; align-items: center; justify-content: flex-start; margin-bottom: 10px; gap: 6px; font-size: 14px; font-weight: 700; line-height: 1.25; }
.step { color: var(--green); font-size: inherit; }
.text-btn { margin-left: auto; border: 0; background: transparent; color: var(--muted); font-size: 11px; }
.option-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.option { min-height: 29px; background: white; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); font-size: 11px; font-weight: 600; }
.option.active { border-color: var(--green); background: var(--green-soft); color: var(--green); }
.style-list { display: grid; gap: 8px; }
.style-grid { position: relative; display: grid; grid-template-columns: 1fr; gap: 6px; }
.style-card { position: relative; min-width: 0; min-height: 42px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 7px; padding: 5px 6px; border: 1px solid var(--line); border-radius: 7px; background: white; overflow: visible; text-align: left; }
.style-card.active { border-color: var(--green); background: #f8fbf9; box-shadow: inset 0 0 0 1px rgba(54,95,74,.08); }
.style-card.variant-open { z-index: 30; }
.style-main-button { min-width: 0; display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: center; gap: 8px; padding: 0; border: 0; background: transparent; text-align: left; }
.style-card-copy { min-width: 0; display: grid; gap: 1px; }
.style-card b { min-width: 0; display: flex; align-items: baseline; gap: 3px; overflow: hidden; white-space: nowrap; line-height: 1.2; }
.style-card b strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 800; }
.style-card b em { flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 10px; font-style: normal; font-weight: 600; }
.style-card small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 9px; }
.style-variant-button { min-width: 54px; height: 24px; padding: 0 7px; border: 1px solid transparent; border-radius: 12px; background: #f3f5f3; color: #69716d; font-size: 9px; font-weight: 700; line-height: 1; white-space: nowrap; }
.style-variant-button:hover, .style-variant-button.active { border-color: #d2ded7; background: var(--green-soft); color: var(--green); }
.style-variant-popover { position: absolute; z-index: 40; top: calc(100% + 6px); right: 0; width: min(236px, 100%); display: grid; gap: 7px; padding: 9px; border: 1px solid #d2ded7; border-radius: 8px; background: white; box-shadow: 0 16px 42px rgba(23,34,28,.16); }
.style-variant-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-bottom: 2px; }
.style-variant-heading b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.style-variant-close { width: 22px; height: 22px; border: 1px solid var(--line); border-radius: 5px; background: white; color: var(--muted); font-weight: 700; line-height: 1; }
.style-variant-options { display: grid; gap: 5px; }
.style-variant-option { min-height: 36px; display: grid; grid-template-columns: minmax(0, 1fr) 18px; align-items: center; gap: 6px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: white; text-align: left; }
.style-variant-option.active { border-color: var(--green); background: var(--green-soft); }
.style-variant-option span { min-width: 0; display: grid; gap: 1px; }
.style-variant-option b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.style-variant-option small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 9px; }
.style-variant-option i { color: var(--green); font-style: normal; font-weight: 800; text-align: center; }
.style-more-button { min-height: 32px; display: flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid #d8dedb; border-radius: 7px; background: #fbfcfb; color: #69716d; font-size: 10px; font-weight: 800; }
.style-more-button:hover, .style-more-button.active { border-color: #c8d7ce; background: var(--green-soft); color: var(--green); }
.style-more-button i { width: 16px; height: 16px; display: inline-grid; place-items: center; border-radius: 50%; background: white; font-style: normal; line-height: 1; box-shadow: inset 0 0 0 1px rgba(54,95,74,.12); }
.swatch { width: 28px; height: 28px; border-radius: 6px; background-size: 11px 11px; }
.natural { background: linear-gradient(135deg, #b8a581 50%, #66745e 50%); }
.minimal { background: linear-gradient(135deg, #e7e5df 50%, #a5aaa8 50%); }
.cream { background: linear-gradient(135deg, #efe1cb 50%, #d7bfa1 50%); }
.wood { background: linear-gradient(135deg, #c69b66 50%, #efe8da 50%); }
.italian { background: linear-gradient(135deg, #2c302f 50%, #b9ad9c 50%); }
.luxe { background: linear-gradient(135deg, #27302d 50%, #b59b68 50%); }
.wabi { background: linear-gradient(135deg, #c8bdac 50%, #7a7469 50%); }
.vintage { background: linear-gradient(135deg, #6a422c 50%, #c69a62 50%); }
.french { background: linear-gradient(135deg, #e7ded0 50%, #b79b88 50%); }
.chinese { background: linear-gradient(135deg, #4b2d21 50%, #d8d0bd 50%); }
.nordic { background: linear-gradient(135deg, #eef0ec 50%, #b7c5b2 50%); }
.zen { background: linear-gradient(135deg, #d9c7aa 50%, #6f735f 50%); }
.industrial { background: linear-gradient(135deg, #85837e 50%, #493f38 50%); }
.setting-row { margin: 16px 0; font-size: 11px; font-weight: 600; }
.ratio-status { color: var(--muted); font-size: 10px; font-weight: 700; }
.segmented { display: flex; padding: 2px; gap: 2px; background: var(--soft); border: 1px solid var(--line); border-radius: 5px; }
.segmented button { border: 0; background: transparent; padding: 4px 7px; border-radius: 3px; color: var(--muted); font-size: 9px; }
.segmented button.active { background: white; color: var(--ink); box-shadow: 0 1px 2px #0001; }
textarea { width: 100%; resize: none; border: 1px solid var(--line); background: var(--soft); padding: 9px; border-radius: 5px; font-size: 10px; outline: 0; }
textarea:focus { border-color: var(--green); }
.generate-btn { position: relative; width: 100%; min-height: 50px; border: 0; border-radius: 6px; margin-top: 12px; padding: 8px 34px; display: flex; align-items: center; justify-content: center; background: #2f6f4e; color: white; text-align: center; box-shadow: 0 8px 18px rgba(47,111,78,.16); }
.generate-btn:hover { background: #285f43; }
.generate-btn:disabled { background: #4f7d61; box-shadow: none; }
.generate-btn.viewing-result-disabled:disabled { background: #c7cac8; color: #666c68; box-shadow: none; cursor: not-allowed; opacity: 1; }
.generate-btn.viewing-result-disabled:disabled:hover { background: #c7cac8; }
.generate-btn span:nth-child(2) { min-width: 0; display: block; }
.generate-btn b { display: block; overflow: visible; white-space: nowrap; font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif; font-size: 12px; font-weight: 800; letter-spacing: .015em; line-height: 1.2; }
.generate-btn small { color: #dce8df; font-size: 11px; }
.spark, .arrow { position: absolute; top: 50%; transform: translateY(-50%); }
.spark { left: 12px; color: #dce8df; font-size: 16px; }
.arrow { right: 12px; font-size: 16px; }

.stage { min-width: 0; background: #eceeeb; display: grid; grid-template-rows: 72px minmax(0, 1fr); }
.stage-toolbar { min-height: 72px; margin: 0; padding: 0 22px; display: flex; align-items: center; justify-content: space-between; gap: 18px; align-self: stretch; border-bottom: 1px solid var(--line); background: #fff; box-shadow: 0 8px 22px rgba(24,37,28,.035); }
.project-name { display: flex; gap: 9px; align-items: center; }
.project-name div { display: grid; gap: 3px; }.project-name b { font-size: 13px; }.project-name small { color: var(--muted); font-size: 10px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #55a170; }
.toolbar-actions { display: flex; align-items: center; gap: 12px; }
.toolbar-group { display: inline-flex; align-items: center; gap: 8px; }
.operation-actions { padding-left: 0; }
.tool-button { height: 32px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; border-radius: 5px; border: 1px solid var(--line); background: white; font-size: 10px; font-weight: 600; }
.stage-toolbar .tool-button { min-width: 104px; height: 42px; padding: 0 17px; gap: 8px; border-radius: 7px; font-size: 12px; font-weight: 800; }
.stage-toolbar .upload-tool-button, .stage-toolbar .batch-upload-tool-button { min-width: 128px; }
.upload-tool-button { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.stage-toolbar .upload-tool-button { gap: 7px; }
.tool-button.primary { background: var(--ink); color: white; border-color: var(--ink); }
.tool-button.danger-text-button { color: #a0443b; border-color: #ead2cf; background: white; }
.tool-button.danger-text-button:hover { background: #f8eeee; }
.batch-upload-icon { position: relative; width: 19px; height: 15px; display: inline-block; flex: 0 0 19px; color: currentColor; }
.batch-upload-icon i { position: absolute; width: 6px; height: 12px; font-style: normal; }
.batch-upload-icon i:nth-child(1) { left: 0; top: 1px; opacity: .66; }
.batch-upload-icon i:nth-child(2) { left: 6px; top: 1px; }
.batch-upload-icon i:nth-child(3) { left: 12px; top: 1px; opacity: .66; }
.batch-upload-icon i::before { content: ""; position: absolute; left: 50%; top: 0; transform: translateX(-50%); border-left: 3px solid transparent; border-right: 3px solid transparent; border-bottom: 5px solid currentColor; }
.batch-upload-icon i::after { content: ""; position: absolute; left: 50%; top: 5px; width: 2px; height: 7px; transform: translateX(-50%); border-radius: 2px; background: currentColor; }
.canvas-wrap { min-height: 0; display: grid; grid-template-rows: 1fr 34px; padding: 12px 22px 0; }
.canvas { --canvas-inset: 14px; --canvas-inset-total: 28px; min-height: 0; position: relative; align-self: center; width: 100%; aspect-ratio: 16/10; max-height: calc(100vh - 190px); padding: var(--canvas-inset); box-sizing: border-box; overflow: hidden; border: 1px solid rgba(17,23,19,.08); border-radius: 8px; background: #2f3335; box-shadow: 0 14px 34px rgba(23,34,27,.14); }
.canvas > img, .compare-clip img { width: 100%; height: 100%; object-fit: contain; display: block; border-radius: 3px; }
#resultPreviewImage { position: absolute; z-index: 1; inset: var(--canvas-inset); width: calc(100% - var(--canvas-inset-total)); height: calc(100% - var(--canvas-inset-total)); display: none; opacity: 0; transition: opacity .16s ease; }
#resultPreviewImage.ready { opacity: 1; }
#resultImage { display: none; opacity: 1; transition: opacity .16s ease; }
.canvas.record-loading #resultPreviewImage, .canvas.record-load-error #resultPreviewImage { display: block; }
.canvas.record-loading #resultImage, .canvas.record-load-error #resultImage { opacity: 0; }
.canvas.record-loading::after, .canvas.record-load-error::after { position: absolute; z-index: 5; left: 50%; bottom: 24px; transform: translateX(-50%); padding: 6px 10px; border-radius: 5px; background: rgba(21,27,24,.78); color: white; font-size: 10px; pointer-events: none; }
.canvas.record-loading::after { content: "正在加载效果图…"; }
.canvas.record-load-error::after { content: "展示图加载失败，当前保留缩略图"; }
#resultImage.muted { filter: saturate(.75) brightness(1.05); }
#resultImage.warm { filter: sepia(.18) contrast(1.06); }
.compare-clip { display: none; position: absolute; top: var(--canvas-inset); bottom: var(--canvas-inset); left: var(--canvas-inset); width: calc(50% - var(--canvas-inset)); overflow: hidden; z-index: 3; }
.compare-clip img { position: absolute; inset: 0; width: var(--canvas-width, 100%); max-width: none; transition: opacity .16s ease; }
.compare-preview-image { z-index: 1; opacity: 0; }
.compare-source-image { z-index: 2; opacity: 1; }
.canvas.compare-source-loading .compare-preview-image.ready, .canvas.compare-source-load-error .compare-preview-image.ready { opacity: 1; }
.canvas.compare-source-loading .compare-source-image, .canvas.compare-source-load-error .compare-source-image { opacity: 0; }
.canvas.comparing.compare-source-loading .compare-clip::after, .canvas.comparing.compare-source-load-error .compare-clip::after { position: absolute; z-index: 3; left: 50%; bottom: 12px; transform: translateX(-50%); padding: 5px 8px; border-radius: 4px; background: rgba(21,27,24,.78); color: white; font-size: 9px; white-space: nowrap; pointer-events: none; }
.canvas.comparing.compare-source-loading .compare-clip::after { content: "正在加载高清白模…"; }
.canvas.comparing.compare-source-load-error .compare-clip::after { content: "高清白模加载失败，当前显示白模预览"; }
.compare-handle { display: none; position: absolute; z-index: 4; top: var(--canvas-inset); bottom: var(--canvas-inset); left: 50%; width: 2px; background: white; box-shadow: 0 0 0 1px #0002; }
.compare-handle span { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: white; }
.canvas.comparing .compare-clip, .canvas.comparing .compare-handle { display: block; }
.canvas-badge { position: absolute; z-index: 6; top: 12px; left: 12px; display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 4px; background: rgba(21,25,22,.78); color: white; font-size: 9px; backdrop-filter: blur(8px); }
.canvas-badge span { width: 5px; height: 5px; background: var(--accent); border-radius: 50%; }
.upload-button { position: absolute; bottom: 13px; left: 13px; height: 38px; padding: 0 10px; display: flex; align-items: center; gap: 7px; color: var(--ink); background: rgba(255,255,255,.9); border: 1px solid white; border-radius: 5px; cursor: pointer; font-family: inherit; font-size: 9px; backdrop-filter: blur(8px); }
.canvas-upload-batch { left: auto; right: 13px; }
.upload-button span { font-size: 17px; }.upload-button small { color: var(--muted); }
.upload-button .batch-upload-icon { width: 18px; height: 15px; font-size: 10px; }
#imageUpload, #batchImageUpload { display: none; }
.batch-upload-tool-button.has-batch { border-color: #cbdad0; background: var(--green-soft); color: var(--green); }
.canvas-footer { display: flex; align-items: center; gap: 20px; color: var(--muted); font-size: 9px; }
.canvas-footer b { color: var(--ink); }
.tip { margin-left: auto; }
.generation-overlay { display: none; position: absolute; z-index: 8; inset: 0; background: rgba(25,31,27,.84); color: white; backdrop-filter: blur(12px); place-content: center; justify-items: center; gap: 9px; }
.generation-overlay.active { display: grid; }
.generation-overlay b { font-size: 13px; }.generation-overlay span, .generation-overlay small { max-width: 320px; text-align: center; color: #c7cec9; font-size: 10px; line-height: 1.6; }
.generation-stop-button { min-height: 30px; margin-top: 5px; padding: 0 14px; border: 1px solid rgba(255,255,255,.34); border-radius: 15px; background: rgba(255,255,255,.1); color: white; font-size: 10px; font-weight: 800; }
.generation-stop-button:hover { background: rgba(255,255,255,.18); }
.loader-ring { width: 42px; height: 42px; border: 2px solid #ffffff2e; border-top-color: var(--accent); border-radius: 50%; animation: spin 1s linear infinite; }
.progress { width: 240px; max-width: 62vw; height: 3px; background: #ffffff20; overflow: hidden; }.progress i { display: block; width: 0; height: 100%; background: var(--accent); transition: width .3s; }
@keyframes spin { to { transform: rotate(360deg); } }

.results-panel { display: flex; flex-direction: column; gap: 12px; }
.results-heading { order: 2; margin: 2px 0 0; padding-top: 12px; border-top: 1px solid var(--line); }
.results-list { display: none; grid-template-columns: 1fr; gap: 8px; }
.results-list.visible { order: 4; display: grid; }
.result-card { position: relative; padding: 0; border: 2px solid transparent; border-radius: 6px; overflow: hidden; aspect-ratio: 16/10; background: var(--soft); text-align: left; }
.results-list .result-card { aspect-ratio: auto; min-height: 96px; }
.results-list .result-card img { position: absolute; inset: 0; }
.result-card img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.result-card:hover img { transform: scale(1.04); }
.result-card.selected { border-color: var(--green); }
.result-card.muted img { filter: saturate(.75) brightness(1.05); }
.result-card.warm img { filter: sepia(.18) contrast(1.06); }
.result-index { position: absolute; top: 5px; left: 5px; padding: 2px 4px; background: #151a17aa; color: white; border-radius: 3px; font-size: 8px; }
.result-meta { position: absolute; left: 0; right: 0; bottom: 0; display: grid; gap: 2px; padding: 22px 8px 8px; color: white; background: linear-gradient(transparent, rgba(18,24,20,.86)); }
.result-meta b { font-size: 10px; line-height: 1.2; }
.result-meta small { color: #e5ebe7; font-size: 8px; line-height: 1.2; }
.result-selected { position: absolute; right: 5px; top: 5px; padding: 3px 5px; background: var(--green); color: white; border-radius: 3px; font-size: 8px; }
.results-empty { order: 3; margin-top: 0; padding: 25px 12px; text-align: center; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.results-empty.hidden { display: none; }
.empty-mark { width: 44px; height: 44px; margin: 0 auto 14px; display: grid; place-items: center; background: var(--green-soft); color: var(--green); border-radius: 50%; font-size: 18px; }
.results-empty b { font-size: 11px; }.results-empty p { margin: 7px 0 0; color: var(--muted); font-size: 9px; line-height: 1.6; }
.result-actions { order: 5; display: none; grid-template-columns: 1fr; gap: 6px; margin-top: 0; }
.result-actions.visible { display: grid; }
.result-actions button { border: 1px solid var(--line); border-radius: 5px; padding: 7px 3px; background: white; font-size: 9px; font-weight: 600; }
.record-refine-button { min-height: 32px; border-color: #d2ded7 !important; background: var(--green-soft) !important; color: var(--green); font-size: 10px !important; font-weight: 800 !important; }
.record-refine-button:hover { background: #dfece5 !important; }
.history-block { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.current-source-block { order: 1; margin: 0; padding: 0 0 12px; border-top: 0; border-bottom: 1px solid var(--line); }
.history-title { margin-bottom: 10px; font-size: 14px; font-weight: 700; line-height: 1.25; }.history-title span { color: inherit; font-size: inherit; }
.current-source-block .history-title { justify-content: space-between; }
.current-source-block .history-title .step + span { margin-right: auto; }
.side-more-button { min-width: 68px; height: 24px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 0 7px; border: 1px solid transparent; border-radius: 12px; background: #f3f5f3; color: #69716d; font-size: 9px; font-weight: 800; line-height: 1; white-space: nowrap; cursor: pointer; }
.side-more-button:hover { border-color: #d2ded7; background: var(--green-soft); color: var(--green); }
.side-more-button span { font-size: 9px; }
.source-history-button { margin-left: auto; }
.history-item { display: grid; grid-template-columns: 38px 1fr 14px; gap: 8px; align-items: center; font-size: 9px; }
.current-source-card { position: relative; width: 100%; min-height: 96px; padding: 0; display: block; border: 2px solid transparent; border-radius: 6px; overflow: hidden; background: var(--soft); text-align: left; cursor: pointer; }
.current-source-card:hover { border-color: var(--green); background: var(--green-soft); }
.history-thumb { width: 38px; height: 29px; border-radius: 4px; background: url("assets/white-model-demo.png") center/cover; }
.current-source-card .history-thumb { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 0; }
.current-source-card div { position: absolute; left: 0; right: 0; bottom: 0; display: grid; gap: 2px; padding: 22px 8px 8px; color: white; background: linear-gradient(transparent, rgba(18,24,20,.86)); }
.current-source-card div b { font-size: 10px; line-height: 1.2; }
.current-source-card div small { color: #e5ebe7; font-size: 8px; line-height: 1.2; }
.current-source-card i { position: absolute; right: 5px; top: 5px; padding: 3px 5px; border-radius: 3px; background: #151a17aa; color: white; font-size: 8px; }
.history-item div { display: grid; gap: 2px; }.history-item small, .history-item i { color: var(--muted); font-size: 8px; font-style: normal; }
.current-source-card div { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 8px 8px; color: white; background: linear-gradient(transparent, rgba(18,24,20,.86)); }
.current-source-card div small, .current-source-card i { color: white; }
.toast { position: fixed; z-index: 20; left: 50%; bottom: 22px; transform: translate(-50%, 20px); opacity: 0; background: var(--ink); color: white; padding: 9px 13px; border-radius: 5px; font-size: 10px; transition: .25s; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.modal-backdrop { display: none; position: fixed; z-index: 30; inset: 0; padding: 24px; place-items: center; background: rgba(20,25,22,.56); backdrop-filter: blur(6px); }
.modal-backdrop.open { display: grid; }
.batch-modal-backdrop.open { display: flex; align-items: center; justify-content: center; }
.account-modal, .credit-details-modal { width: min(520px, 100%); max-height: min(720px, calc(100vh - 48px)); position: relative; overflow-y: auto; padding: 22px; border-radius: 8px; background: white; box-shadow: 0 24px 70px #0f181344; }
.account-modal.account-modal-login { width: min(780px, calc(100vw - 32px)); max-height: min(560px, calc(100vh - 32px)); overflow: hidden; padding: 0; }
.account-modal.account-modal-login .modal-heading { position: absolute; z-index: 3; top: 18px; right: 18px; padding: 0; border-bottom: 0; }
.account-modal.account-modal-login .modal-heading > div { display: none; }
.account-modal.account-modal-login .modal-heading .icon-btn { width: 34px; height: 34px; background: rgba(255,255,255,.88); box-shadow: 0 8px 24px rgba(15,24,19,.08); }
.batch-modal { width: min(1080px, calc(100vw - 48px)); max-height: min(780px, calc(100vh - 48px)); display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; gap: 14px; padding: 22px; border-radius: 10px; background: #fff; box-shadow: 0 24px 70px #0f181344; overflow: hidden; }
.batch-modal-heading { padding-bottom: 14px; }
.batch-modal-summary { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 12px 14px; border: 1px solid #dce4df; border-radius: 8px; background: #f7faf8; }
.batch-modal-summary div { min-width: 0; display: grid; gap: 4px; }
.batch-modal-summary b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.batch-modal-summary span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 10px; }
.batch-modal-upload-button { min-width: 96px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.batch-grid { min-height: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-content: start; gap: 12px; overflow-y: auto; padding: 2px 3px 3px 0; }
.batch-empty { grid-column: 1 / -1; min-height: 260px; display: grid; place-items: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 8px; font-size: 12px; }
.batch-card { position: relative; min-width: 0; min-height: 150px; display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 8px; padding: 8px; border: 1px solid #dfe4e0; border-radius: 8px; background: #fbfcfb; text-align: left; overflow: hidden; }
.batch-card:hover { border-color: #b8c8bf; background: #f5f8f6; }
.batch-card.selected { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
.batch-card.running { border-color: #91ad9a; background: var(--green-soft); }
.batch-card.done { border-color: #c8d8ce; }
.batch-card.error { border-color: #ead2cf; background: #fff8f7; }
.batch-card.cancelled { border-color: #d8ddd9; background: #f2f4f2; opacity: .9; }
.batch-thumb { width: 100%; aspect-ratio: 16/10; border-radius: 6px; overflow: hidden; background: #dde2df; }
.batch-thumb img { width: 100%; height: 100%; display: block; object-fit: cover; }
.batch-copy { min-width: 0; display: grid; gap: 4px; padding-right: 0; }
.batch-copy b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; line-height: 1.2; }
.batch-copy small { overflow: hidden; color: var(--muted); font-size: 9px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.batch-state { position: absolute; top: 14px; right: 14px; max-width: 82px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 4px 6px; border-radius: 11px; background: rgba(255,255,255,.92); color: #66716b; font-size: 8px; font-weight: 800; box-shadow: 0 4px 12px rgba(20,25,22,.1); }
.batch-card.running .batch-state, .batch-card.done .batch-state { background: var(--green); color: white; }
.batch-card.error .batch-state { background: #f4dfdc; color: #a0443b; }
.batch-card.cancelled .batch-state { background: #e3e7e4; color: #707873; }
.batch-progress { position: absolute; left: 8px; right: 8px; bottom: 0; height: 5px; overflow: hidden; border-radius: 3px 3px 0 0; background: #dfe6e1; }
.batch-progress::after { content: ""; display: block; width: var(--progress, 0%); height: 100%; background: var(--green); transition: width .35s ease; }
.batch-card.error .batch-progress::after { background: #bf5b50; }
.batch-card.cancelled .batch-progress::after { background: #8b948e; }
.batch-modal-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding-top: 2px; }
.folder-modal { width: min(420px, 100%); padding: 22px; border-radius: 8px; background: white; box-shadow: 0 24px 70px #0f181344; }
.folder-form { display: grid; gap: 10px; padding-top: 18px; }
.folder-form label { color: var(--muted); font-size: 11px; font-weight: 700; }
.folder-form input { width: 100%; height: 40px; padding: 0 11px; border: 1px solid var(--line); border-radius: 6px; background: white; font-size: 12px; outline: 0; }
.folder-form input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(54,95,74,.1); }
.folder-modal-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 8px; }
.folder-context-menu { position: fixed; z-index: 40; min-width: 112px; padding: 5px; border: 1px solid var(--line); border-radius: 7px; background: white; box-shadow: 0 12px 34px rgba(15,24,19,.18); }
.folder-context-menu button { width: 100%; height: 30px; padding: 0 9px; border: 0; border-radius: 5px; background: transparent; text-align: left; font-size: 11px; font-weight: 700; }
.folder-context-menu button:hover { background: var(--soft); }
.folder-context-menu button.danger { color: #a0443b; }
.folder-context-menu button.danger:hover { background: #f8eeee; }
.move-folder-list { display: grid; gap: 7px; max-height: 300px; overflow-y: auto; padding: 18px 0 4px; }
.move-folder-option { width: 100%; min-height: 42px; display: grid; grid-template-columns: 18px 1fr 18px; gap: 9px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 7px; background: white; text-align: left; }
.move-folder-option:hover { border-color: var(--green); background: #f8fbf9; }
.move-folder-option.selected { border-color: var(--green); background: var(--green-soft); }
.move-folder-option:disabled { cursor: default; opacity: .62; }
.move-folder-option b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.move-folder-option span, .move-folder-option i { color: var(--muted); font-size: 11px; font-style: normal; }
.move-folder-option.selected i { color: var(--green); font-weight: 800; }
.delete-copy { display: grid; gap: 7px; padding: 18px 0 4px; }
.delete-copy b { font-size: 13px; }
.delete-copy p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.danger-button { border-color: #d8aaa5; background: #a0443b; color: white; }
.danger-button:hover { background: #8e382f; }
.records-modal { width: min(780px, 100%); max-height: min(760px, calc(100vh - 48px)); overflow-y: auto; padding: 22px; border-radius: 8px; background: white; box-shadow: 0 24px 70px #0f181344; }
.records-modal-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding-top: 16px; }
.records-modal-empty { padding: 34px; text-align: center; color: var(--muted); font-size: 11px; border: 1px solid var(--line); border-radius: 6px; }
.white-model-modal { width: min(780px, 100%); max-height: min(760px, calc(100vh - 48px)); overflow-y: auto; padding: 22px; border-radius: 8px; background: white; box-shadow: 0 24px 70px #0f181344; }
.white-model-modal-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding-top: 16px; }
.white-model-card { position: relative; min-height: 132px; padding: 0; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; background: var(--soft); text-align: left; cursor: pointer; }
.white-model-card:hover, .white-model-card.selected { border-color: var(--green); box-shadow: 0 0 0 1px rgba(47,111,78,.14); }
.white-model-card img { width: 100%; height: 132px; display: block; object-fit: cover; background: #2f3335; }
.white-model-card span { position: absolute; left: 0; right: 0; bottom: 0; display: grid; gap: 2px; padding: 26px 9px 9px; color: white; background: linear-gradient(transparent, rgba(18,24,20,.86)); }
.white-model-card b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.white-model-card small { color: #e5ebe7; font-size: 9px; }
.white-model-card i { position: absolute; top: 6px; right: 6px; padding: 4px 6px; border-radius: 4px; background: var(--green); color: white; font-size: 9px; font-style: normal; font-weight: 700; }
.white-model-empty { grid-column: 1 / -1; padding: 34px; text-align: center; color: var(--muted); font-size: 11px; border: 1px solid var(--line); border-radius: 6px; }
.modal-heading, .billing-title, .account-summary { display: flex; align-items: center; justify-content: space-between; }
.modal-heading { padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.style-reference-modal { width: min(1120px, 100%); max-height: min(820px, calc(100vh - 48px)); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 14px; padding: 18px; border-radius: 8px; background: white; box-shadow: 0 24px 70px #0f181344; }
.style-reference-modal-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.style-reference-modal-heading h2 { max-width: min(720px, 70vw); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 18px; }
.style-reference-modal-stage { min-height: 0; position: relative; display: grid; align-items: center; padding: 0 50px; }
.style-reference-modal-image { position: relative; width: 100%; aspect-ratio: 16 / 9; max-height: calc(100vh - 230px); overflow: hidden; border-radius: 8px; background: #2f3335; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.style-reference-modal-image .style-reference-cover { border-radius: 0; }
.style-reference-nav { position: absolute; z-index: 2; top: 50%; width: 38px; height: 56px; transform: translateY(-50%); border: 1px solid var(--line); border-radius: 7px; background: white; color: var(--ink); font-size: 30px; line-height: 1; box-shadow: 0 12px 30px rgba(15,24,19,.12); }
.style-reference-nav:hover { border-color: var(--green); background: var(--green-soft); color: var(--green); }
.style-reference-prev { left: 0; }
.style-reference-next { right: 0; }
.style-reference-modal-footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.style-reference-modal-footer div { min-width: 0; display: grid; gap: 3px; }
.style-reference-modal-footer b, .style-reference-modal-footer span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.style-reference-modal-footer b { font-size: 13px; }
.style-reference-modal-footer span { color: var(--muted); font-size: 10px; }
.wechat-login-view { min-height: 430px; display: grid; grid-template-columns: minmax(245px, 36%) minmax(0, 1fr); text-align: center; }
.wechat-login-brand-panel { position: relative; min-height: 430px; display: grid; align-items: center; padding: 46px 34px; overflow: hidden; background: linear-gradient(145deg, #174533 0%, #2f7b56 54%, #9aa87b 100%); color: white; }
.wechat-login-brand-panel::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(135deg, rgba(255,255,255,.12) 0 1px, transparent 1px 12px), linear-gradient(180deg, rgba(255,255,255,.12), rgba(0,0,0,.12)); opacity: .68; }
.wechat-login-brand-panel::after { content: ""; position: absolute; inset: auto 0 0; height: 42%; background: linear-gradient(180deg, transparent, rgba(10,33,24,.32)); }
.wechat-login-brand-copy { position: relative; z-index: 1; display: grid; justify-items: start; gap: 10px; text-align: left; }
.wechat-login-brand-copy b { font-size: 50px; line-height: .95; letter-spacing: 0; font-weight: 900; }
.wechat-login-brand-copy span { font-size: 25px; line-height: 1.25; font-weight: 800; letter-spacing: 0; }
.wechat-login-main-panel { min-width: 0; display: grid; align-content: center; justify-items: center; padding: 42px 44px 32px; background: white; }
.wechat-login-logo { width: min(204px, 72%); height: auto; margin-bottom: 22px; object-fit: contain; }
.wechat-login-title-row { display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-size: 17px; font-weight: 900; }
.wechat-login-icon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: #07c160; color: white; font-size: 12px; font-weight: 900; box-shadow: 0 6px 16px rgba(7,193,96,.22); }
.wechat-login-view p { max-width: 330px; margin: 10px 0 16px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.wechat-login-view small { margin-top: 12px; color: var(--muted); font-size: 10px; }
.wechat-qr { width: 152px; height: 152px; display: grid; place-items: center; margin-top: 8px; border: 10px solid white; outline: 1px solid var(--line); background: repeating-conic-gradient(#1d2822 0 25%, white 0 50%) 0 0/18px 18px; box-shadow: 0 10px 30px rgba(15,24,19,.09); }
.wechat-login-view.wechat-login-pending .wechat-qr,
.wechat-login-view.wechat-open-mode .wechat-qr { display: none; }
.wechat-qr span { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 50%; background: #07c160; color: white; font-size: 12px; font-weight: 700; }
.wechat-login-frame-wrap { width: 300px; height: 338px; position: relative; display: grid; place-items: center; overflow: hidden; margin-top: 6px; border: 1px solid var(--line); border-radius: 8px; background: white; box-shadow: 0 12px 34px rgba(15,24,19,.08); }
.wechat-login-widget { width: 300px; height: 338px; overflow: hidden; }
.wechat-login-widget iframe { width: 300px !important; height: 338px !important; border: 0; overflow: hidden; }
.wechat-login-frame { width: 420px; height: 490px; margin-left: -60px; border: 0; background: white; transform: scale(.714); transform-origin: top center; }
.wechat-login-frame-loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 11px; }
.wechat-login-button, #mockPayButton, #refreshPaymentStatusButton { min-height: 38px; padding: 0 16px; border: 0; border-radius: 6px; background: #07c160; color: white; font-size: 11px; font-weight: 700; }
.wechat-login-button { margin-top: 14px; }
.real-wechat-login-button { min-width: 150px; }
.account-view { padding-top: 18px; }
.account-summary { gap: 11px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.account-avatar { width: 42px; height: 42px; flex: 0 0 auto; display: grid; place-items: center; overflow: hidden; border-radius: 50%; background: var(--green); color: white; font-weight: 700; }
.account-avatar img { width: 100%; height: 100%; display: block; object-fit: cover; }
.account-summary > div:nth-child(2) { margin-right: auto; display: grid; gap: 3px; }
.account-summary small { color: var(--muted); font-size: 9px; }
.balance-box { display: grid; justify-items: end; }
.balance-detail-button { height: 34px; padding: 0 13px; border: 1px solid var(--line); border-radius: 17px; background: #f7faf8; color: var(--green); font-size: 11px; font-weight: 800; }
.balance-detail-button:hover { border-color: #bdd1c5; background: var(--green-soft); }
.billing-section { padding-top: 18px; }
.billing-title { margin-bottom: 10px; font-size: 11px; }.billing-title span { color: var(--muted); font-size: 9px; }
.package-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.package-grid-status { grid-column: 1 / -1; padding: 14px 10px; border: 1px dashed var(--line); border-radius: 6px; color: var(--muted); font-size: 11px; text-align: center; }
.package-grid-status.error { color: #a33; border-color: #e2b7b7; background: #fff7f7; }
.package-card { min-height: 82px; padding: 14px 16px; display: flex; align-items: center; justify-content: flex-start; border: 1px solid var(--line); border-radius: 7px; background: white; text-align: left; }
.package-card:hover, .package-card.selected { border-color: var(--green); background: var(--green-soft); }
.package-card:disabled { opacity: .7; cursor: wait; }
.package-card-main { display: inline-flex; align-items: baseline; gap: 14px; min-width: 0; }
.package-card b { color: var(--ink); font-size: 23px; line-height: 1; }
.package-card strong { color: var(--green); font-size: 18px; line-height: 1; font-weight: 900; white-space: nowrap; }
.payment-checkout-modal { width: min(430px, 100%); padding: 22px; border-radius: 8px; background: white; box-shadow: 0 24px 70px #0f181344; }
.payment-checkout-body { display: grid; gap: 14px; padding-top: 18px; }
.payment-checkout-summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 14px; align-items: end; padding: 15px 16px; border: 1px solid #dce6e0; border-radius: 8px; background: #f7faf8; }
.payment-checkout-summary span { grid-column: 1 / -1; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .04em; }
.payment-checkout-summary b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); font-size: 14px; }
.payment-checkout-summary strong { color: var(--ink); font-size: 28px; line-height: 1; }
.payment-checkout-summary small { grid-column: 1 / -1; color: var(--green); font-size: 12px; font-weight: 900; }
.payment-checkout-qr-panel { min-height: 210px; display: grid; place-items: center; padding: 18px; border: 1px solid var(--line); border-radius: 8px; background: white; }
.payment-qr-image { width: 188px; height: 188px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: white; box-shadow: 0 12px 30px rgba(15,24,19,.08); }
.payment-qr-placeholder { min-height: 188px; display: grid; place-items: center; color: var(--muted); font-size: 11px; text-align: center; }
.payment-status-text { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; text-align: center; }
.payment-code-link { color: var(--green); font-size: 11px; font-weight: 800; text-align: center; text-decoration: none; }
.payment-checkout-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; padding-top: 16px; }
.payment-checkout-actions .tool-button[hidden] { display: none; }
.payment-checkout-actions .tool-button:not([hidden]):only-child { grid-column: 1 / -1; }
.gift-card-section { margin-top: 2px; padding-bottom: 2px; }
.gift-card-redeem { min-height: 42px; display: grid; grid-template-columns: minmax(0, 1fr) 92px; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: white; }
.gift-card-redeem:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px rgba(47,111,78,.1); }
.gift-card-redeem input { min-width: 0; padding: 0 12px; border: 0; outline: none; color: var(--ink); font-size: 12px; }
.gift-card-redeem button { border: 0; border-left: 1px solid var(--line); background: var(--green); color: white; font-size: 11px; font-weight: 800; }
.gift-card-redeem button:disabled { opacity: .72; cursor: wait; }
.gift-card-hint { display: block; margin-top: 7px; color: var(--muted); font-size: 9px; line-height: 1.5; }
.logout-button { width: 100%; margin-top: 18px; padding: 9px; border: 1px solid var(--line); border-radius: 6px; background: white; color: var(--muted); font-size: 10px; }
.credit-detail-summary { min-height: 76px; margin-top: 18px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px; border: 1px solid #dce6e0; border-radius: 8px; background: #f7faf8; }
.credit-detail-summary span { color: var(--muted); font-size: 11px; font-weight: 700; }
.credit-detail-summary b { color: var(--green); font-size: 32px; line-height: 1; }
.credit-ledger-section { padding-top: 18px; }
.credit-ledger-list { max-height: 330px; overflow-y: auto; border-top: 1px solid var(--line); }
.credit-ledger-item { min-height: 48px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 2px; border-bottom: 1px solid var(--line); }
.credit-ledger-item div { min-width: 0; display: grid; gap: 4px; }
.credit-ledger-item b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.credit-ledger-item small { color: var(--muted); font-size: 9px; }
.credit-ledger-item span { color: var(--green); font-size: 13px; font-weight: 800; }
.credit-ledger-item span.negative { color: #9a4a42; }
.credit-ledger-empty { padding: 22px 0; color: var(--muted); text-align: center; font-size: 11px; }
.payment-success-modal { width: min(420px, 100%); padding: 22px; border-radius: 8px; background: white; box-shadow: 0 24px 70px #0f181344; }
.payment-success-body { display: grid; justify-items: center; gap: 8px; padding: 28px 8px 24px; text-align: center; }
.payment-success-mark { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 50%; background: #07c160; color: white; font-size: 30px; font-weight: 800; line-height: 1; }
.payment-success-body b { color: var(--ink); font-size: 22px; line-height: 1.2; }
.payment-success-body span { color: var(--muted); font-size: 12px; font-weight: 700; }

.project-desk { height: calc(100vh - 64px); display: grid; grid-template-columns: 320px minmax(0, 1fr); background: #f2f4f2; }
.project-sidebar { min-height: 0; padding: 22px; overflow-y: auto; background: white; border-right: 1px solid var(--line); }
.project-desk-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.project-list { display: grid; gap: 9px; padding-top: 16px; }
.project-list-empty, .project-detail-empty { display: grid; place-content: center; justify-items: center; text-align: center; color: var(--muted); }
.project-list-empty { min-height: 180px; padding: 24px; border: 1px dashed var(--line); border-radius: 8px; font-size: 11px; line-height: 1.7; }
.project-item { width: 100%; min-height: 78px; display: grid; grid-template-columns: 42px 1fr; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: white; text-align: left; }
.project-item:hover, .project-item.active { border-color: var(--green); background: #f8fbf9; }
.project-folder-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 8px; background: var(--green-soft); color: var(--green); font-size: 18px; font-weight: 800; }
.project-item div { min-width: 0; display: grid; align-content: center; gap: 4px; }
.project-item b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.project-item span, .project-item small { color: var(--muted); font-size: 9px; }
.project-detail { min-width: 0; min-height: 0; padding: 24px; overflow-y: auto; }
.project-detail-empty { height: 100%; min-height: 360px; gap: 8px; }
.project-detail-empty b { color: var(--ink); font-size: 18px; }
.project-detail-empty p { max-width: 360px; margin: 0; font-size: 11px; line-height: 1.7; }
.project-detail-content { display: grid; gap: 18px; }
.project-detail-hero { min-height: 96px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px; border: 1px solid var(--line); border-radius: 8px; background: white; }
.project-detail-hero h1 { font-size: 24px; }
.project-detail-hero span { display: inline-block; margin-top: 6px; color: var(--muted); font-size: 11px; }
.project-assets { display: grid; grid-template-columns: minmax(240px, 34%) 1fr; gap: 18px; align-items: start; }
.project-source-card, .project-render-panel { border: 1px solid var(--line); border-radius: 8px; background: white; overflow: hidden; }
.project-source-card span { display: block; padding: 12px 14px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; font-weight: 700; }
.project-white-grid { display: grid; gap: 10px; padding: 12px; }
.project-white-card { width: 100%; display: grid; grid-template-columns: 78px 1fr; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 7px; background: white; overflow: hidden; text-align: left; }
.project-white-card img { width: 78px; height: 62px; object-fit: cover; display: block; background: #2f3335; }
.project-white-card div { min-width: 0; display: grid; gap: 3px; padding-right: 8px; }
.project-white-card b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.project-white-card small { color: var(--muted); font-size: 9px; }
.project-white-empty { min-height: 150px; display: grid; place-content: center; text-align: center; color: var(--muted); font-size: 11px; }
.project-render-panel { min-height: 360px; padding: 14px; }
.project-render-heading { display: flex; align-items: center; justify-content: space-between; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.project-render-heading b { font-size: 13px; }.project-render-heading span { color: var(--muted); font-size: 10px; }
.project-render-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding-top: 14px; }
.project-render-card { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: var(--soft); aspect-ratio: 16/10; }
.project-render-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.project-render-card span { position: absolute; left: 0; right: 0; bottom: 0; padding: 24px 8px 8px; color: white; background: linear-gradient(transparent, rgba(18,24,20,.82)); font-size: 9px; }
.project-render-empty { min-height: 220px; display: grid; place-content: center; text-align: center; color: var(--muted); font-size: 11px; }
.project-desk { grid-template-columns: 300px minmax(0, 1fr) 280px; }
.project-folder-block { border: 1px solid #e1e6e2; border-radius: 8px; background: white; overflow: hidden; box-shadow: 0 8px 22px rgba(28,39,32,.04); }
.project-folder-block:hover { border-color: #d2ddd5; }
.project-folder-button { width: 100%; min-height: 42px; display: grid; grid-template-columns: 18px 1fr 20px; gap: 9px; align-items: center; padding: 8px 10px; border: 0; border-radius: 0; background: white; text-align: left; }
.project-folder-button:hover, .project-folder-button.active { background: #f7faf8; }
.project-folder-button b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.project-folder-icon { width: 18px; height: 18px; display: inline-grid; place-items: center; color: var(--muted); }
.project-folder-icon svg { width: 18px; height: 18px; display: block; }
.project-folder-icon .folder-back { fill: #e7eee9; }
.project-folder-icon .folder-front { fill: #f8fbf9; stroke: #8fa394; stroke-width: 1.15; }
.project-folder-icon .folder-line { fill: none; stroke: #365f4a; stroke-width: 1.25; stroke-linecap: round; opacity: .7; }
.project-folder-button.active .project-folder-icon .folder-back { fill: #dcebe2; }
.project-folder-button.active .project-folder-icon .folder-front { fill: var(--green-soft); stroke: var(--green); }
.project-folder-toggle { color: #8a928e; font-size: 15px; font-style: normal; font-weight: 800; text-align: center; line-height: 1; }
.project-folder-button.active .project-folder-toggle { color: var(--green); }
.project-render-list { display: grid; gap: 6px; padding: 8px 9px 10px 36px; border-top: 1px solid #edf1ee; background: #fbfcfb; }
.project-render-list[hidden] { display: none; }
.project-render-more-button { width: 100%; margin-top: 2px; }
.project-render-row { width: 100%; min-height: 58px; display: grid; grid-template-columns: 64px 1fr; gap: 8px; align-items: center; padding: 5px; border: 1px solid transparent; border-radius: 6px; background: transparent; text-align: left; }
.project-render-row:hover, .project-render-row.active { border-color: var(--green); background: white; box-shadow: 0 6px 16px rgba(31,49,38,.06); }
.project-render-row img { width: 64px; height: 46px; object-fit: cover; border-radius: 5px; background: var(--soft); }
.project-render-row div { min-width: 0; display: grid; gap: 2px; }
.project-render-row b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.project-render-row small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 8px; }
.project-folder-empty { padding: 10px; color: var(--muted); font-size: 10px; line-height: 1.6; }
.project-preview { min-width: 0; min-height: 0; padding: 0; display: grid; grid-template-rows: minmax(0, 1fr); overflow: hidden; }
.project-preview-empty { height: 100%; display: grid; place-content: center; justify-items: center; gap: 8px; text-align: center; color: var(--muted); }
.project-preview-empty b { color: var(--ink); font-size: 18px; }.project-preview-empty p { max-width: 380px; margin: 0; font-size: 11px; line-height: 1.7; }
.project-preview-content { min-height: 0; height: 100%; display: grid; grid-template-rows: 72px minmax(0, 1fr); gap: 14px; }
.project-preview-toolbar { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 0 22px; border-bottom: 1px solid var(--line); background: white; box-shadow: 0 8px 22px rgba(24,37,28,.035); }
.project-preview-toolbar h1 { font-size: 18px; }.project-preview-toolbar span { color: var(--muted); font-size: 10px; }
.project-preview-toolbar h1, .project-preview-toolbar span { display: block; max-width: min(52vw, 620px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-preview-actions { display: flex; align-items: center; gap: 28px; flex-wrap: nowrap; justify-content: flex-end; }
.project-compare-actions, .project-management-actions { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; }
.project-preview-actions .tool-button { min-width: 76px; height: 42px; padding: 0 16px; border-radius: 7px; font-size: 12px; font-weight: 800; }
.project-compare-actions .tool-button { min-width: 104px; }
.project-preview-actions .tool-button.primary { min-width: 104px; }
.project-image-stage { --project-image-inset: 18px; position: relative; min-height: 0; height: auto; align-self: stretch; margin: 0 24px 24px; border: 1px solid var(--line); border-radius: 8px; background: #2f3335; overflow: hidden; }
.project-image-stage img { position: absolute; inset: 18px; width: calc(100% - 36px); height: calc(100% - 36px); object-fit: contain; display: block; }
.project-selected-preview { z-index: 1; opacity: 0; transition: opacity .16s ease; }
.project-selected-image { z-index: 1; opacity: 1; transition: opacity .16s ease; }
.project-image-stage.loading .project-selected-preview { opacity: 1; }
.project-image-stage.loading .project-selected-image { opacity: 0; }
.project-image-stage.load-error .project-selected-preview { opacity: 1; }
.project-image-stage.load-error .project-selected-image { opacity: 0; }
.project-image-stage.load-error::after { content: "高清展示图加载失败，当前显示预览图"; position: absolute; left: 50%; bottom: 24px; z-index: 2; transform: translateX(-50%); padding: 6px 10px; border-radius: 5px; background: rgba(21,27,24,.78); color: white; font-size: 10px; }
.project-compare-layer { display: none; position: absolute; z-index: 3; top: var(--project-image-inset); bottom: var(--project-image-inset); left: var(--project-image-inset); width: calc(50% - var(--project-image-inset)); overflow: hidden; pointer-events: none; }
.project-image-stage .project-compare-layer img { position: absolute; inset: 0 auto 0 0; width: var(--project-image-width, calc(100% - 36px)); height: 100%; max-width: none; object-fit: contain; object-position: center; display: block; user-select: none; }
.project-compare-preview { z-index: 1; opacity: 0; transition: opacity .16s ease; }
.project-compare-preview.ready { opacity: 1; }
.project-compare-source { z-index: 2; opacity: 1; transition: opacity .16s ease; }
.project-image-stage.project-compare-source-loading .project-compare-source, .project-image-stage.project-compare-source-load-error .project-compare-source { opacity: 0; }
.project-image-stage.comparing.project-compare-source-loading .project-compare-layer::after, .project-image-stage.comparing.project-compare-source-load-error .project-compare-layer::after { content: ""; position: absolute; z-index: 3; left: 50%; bottom: 12px; transform: translateX(-50%); padding: 5px 8px; border-radius: 4px; background: rgba(21,27,24,.78); color: white; font-size: 9px; white-space: nowrap; }
.project-image-stage.comparing.project-compare-source-loading .project-compare-layer::after { content: "正在加载高清白模…"; }
.project-image-stage.comparing.project-compare-source-load-error .project-compare-layer::after { content: "高清白模加载失败，当前显示白模预览"; }
.project-compare-handle { display: none; position: absolute; z-index: 4; top: var(--project-image-inset); bottom: var(--project-image-inset); left: 50%; width: 2px; border: 0; padding: 0; background: white; box-shadow: 0 0 0 1px rgba(0,0,0,.12); cursor: ew-resize; touch-action: none; user-select: none; }
.project-compare-handle span { position: absolute; left: 50%; top: 50%; width: 34px; height: 34px; display: grid; place-items: center; transform: translate(-50%,-50%); border-radius: 50%; background: white; color: var(--ink); box-shadow: 0 6px 18px rgba(20,28,23,.18); }
.project-compare-handle:hover span, .project-compare-handle:focus-visible span, .project-compare-handle.dragging span { box-shadow: 0 0 0 3px rgba(47,124,85,.28), 0 6px 18px rgba(20,28,23,.22); }
.project-image-stage.comparing { cursor: ew-resize; }
.project-image-stage.comparing .project-compare-layer, .project-image-stage.comparing .project-compare-handle { display: block; }
.project-refine-overlay { display: none; position: absolute; z-index: 5; inset: 0; place-content: center; justify-items: center; gap: 10px; background: rgba(25,31,27,.78); color: white; backdrop-filter: blur(10px); }
.project-refine-overlay.active { display: grid; }
.project-refine-overlay b { font-size: 14px; }
.project-refine-overlay span, .project-refine-overlay small { color: #d3dad6; font-size: 10px; }
.project-refine-stop-button { margin-top: 4px; min-width: 116px; padding: 9px 16px; border: 1px solid rgba(255,255,255,.65); border-radius: 6px; background: rgba(255,255,255,.08); color: white; font-size: 12px; font-weight: 700; }
.project-refine-stop-button:hover { background: rgba(255,255,255,.16); }
.project-refine-stop-button:disabled { cursor: wait; opacity: .65; }
.project-refine-panel { min-height: 0; padding: 22px; overflow-y: auto; border-left: 1px solid var(--line); background: white; }
.project-refine-heading { padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.project-refine-heading h2 { font-size: 18px; }
.project-refine-heading small { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.5; }
#refinePrompt { min-height: 320px; max-height: calc(100vh - 360px); margin-top: 18px; padding: 14px; background: white; font-size: 14px; line-height: 1.75; resize: vertical; }
#refinePrompt::placeholder { color: #9aa29d; font-size: 13px; line-height: 1.7; }
.refine-generate { margin-top: 14px; }
.refine-stop-button { width: 100%; margin-top: 10px; padding: 11px 14px; border: 1px solid #d8a09b; border-radius: 6px; background: #fff8f7; color: #a13932; font-size: 12px; font-weight: 700; }
.refine-stop-button:disabled { cursor: wait; opacity: .65; }
.project-desk.refining .project-sidebar, .project-desk.refining .project-preview-actions { pointer-events: none; opacity: .62; }
.refine-note { margin-top: 12px; padding: 10px; border-radius: 6px; background: var(--soft); color: var(--muted); font-size: 10px; line-height: 1.6; }

.floor-plan-desk { height: calc(100vh - 64px); display: grid; grid-template-columns: 300px minmax(560px, 1fr) 300px; background: #eceeeb; }
.floor-plan-mobile-notice { display: none; }
.floor-plan-sidebar, .floor-plan-refine-panel { min-height: 0; background: white; }
.floor-plan-sidebar { display: flex; flex-direction: column; overflow-x: hidden; overflow-y: auto; scrollbar-width: thin; scrollbar-gutter: stable; border-right: 1px solid var(--line); }
.floor-plan-panel-heading { min-height: 72px; padding: 16px; border-bottom: 1px solid var(--line); }
.floor-plan-panel-heading > div { min-width: 0; }
.floor-plan-panel-heading h1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 18px; }
.floor-plan-panel-heading .panel-upload-button { flex: 0 0 32px; }
.floor-plan-upload-trigger.is-disabled { pointer-events: none; cursor: not-allowed; opacity: .45; }
.floor-plan-panel-heading, .floor-plan-section { flex: 0 0 auto; }
.floor-plan-section { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.floor-plan-template-section { padding-bottom: 16px; }
.floor-plan-template-section > .section-title { margin-bottom: 16px; }
.floor-plan-template-list { display: grid; gap: 6px; }
.floor-plan-template-card { width: 100%; min-height: 42px; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 5px 6px; border: 1px solid var(--line); border-radius: 7px; background: white; text-align: left; }
.floor-plan-template-card:hover, .floor-plan-template-card.active { border-color: var(--green); background: #f8fbf9; box-shadow: inset 0 0 0 1px rgba(54,95,74,.08); }
.floor-plan-template-glyph { position: relative; width: 40px; height: 32px; display: block; overflow: hidden; border: 1px solid #dfe3df; border-radius: 7px; background: #f4f3ef; box-shadow: inset 0 1px 0 rgba(255,255,255,.86); }
.floor-plan-template-card.active .floor-plan-template-glyph { border-color: rgba(54,95,74,.34); }
.floor-plan-template-glyph-surface, .floor-plan-template-glyph-detail { position: absolute; display: block; }
.floor-plan-template-glyph--layered { background: linear-gradient(145deg, #f7f3ed 0%, #e9dfd2 100%); }
.floor-plan-template-glyph--layered .floor-plan-template-glyph-surface { width: 21px; height: 13px; border: 1px solid rgba(104,88,70,.28); border-radius: 3px; transform: rotate(-7deg); }
.floor-plan-template-glyph--layered .floor-plan-template-glyph-surface-a { left: 7px; top: 12px; background: rgba(182,157,130,.42); }
.floor-plan-template-glyph--layered .floor-plan-template-glyph-surface-b { left: 12px; top: 7px; background: linear-gradient(145deg, #fffdfa, #ddd0bf); box-shadow: 0 4px 7px rgba(93,73,54,.18); }
.floor-plan-template-glyph--layered .floor-plan-template-glyph-detail { left: 15px; top: 24px; width: 16px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, #bb7655, #e6b37d); box-shadow: 0 0 5px rgba(205,133,80,.38); }
.floor-plan-template-glyph--volume { background: linear-gradient(145deg, #f5f5f2 0%, #dfe2de 100%); }
.floor-plan-template-glyph--volume .floor-plan-template-glyph-surface-a { left: 10px; top: 4px; width: 20px; height: 12px; clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); background: linear-gradient(145deg, #fafbf8, #c8cec9); }
.floor-plan-template-glyph--volume .floor-plan-template-glyph-surface-b { left: 10px; top: 10px; width: 10px; height: 16px; clip-path: polygon(0 0, 100% 37%, 100% 100%, 0 63%); background: #aeb7b0; }
.floor-plan-template-glyph--volume .floor-plan-template-glyph-detail { left: 20px; top: 10px; width: 10px; height: 16px; clip-path: polygon(0 37%, 100% 0, 100% 63%, 0 100%); background: linear-gradient(145deg, #7d8981, #a3ada6); box-shadow: 3px 4px 6px rgba(44,58,49,.18); }
.floor-plan-template-glyph--maquette { background: linear-gradient(145deg, #f5efe5 0%, #d8c5ab 100%); }
.floor-plan-template-glyph--maquette .floor-plan-template-glyph-surface-a { left: 6px; top: 7px; width: 28px; height: 19px; border: 1px solid rgba(104,78,50,.3); background: #eadbc7; transform: rotate(-4deg); box-shadow: 0 4px 6px rgba(90,63,38,.18); }
.floor-plan-template-glyph--maquette .floor-plan-template-glyph-surface-b { left: 11px; top: 10px; width: 17px; height: 10px; border-width: 2px 2px 0; border-style: solid; border-color: #9b8062; background: rgba(255,251,244,.7); transform: rotate(-4deg); }
.floor-plan-template-glyph--maquette .floor-plan-template-glyph-detail { left: 27px; top: 20px; width: 5px; height: 5px; border-radius: 50%; background: #6f8a70; box-shadow: -4px 2px 0 -1px #b7986f; }
.floor-plan-template-copy { min-width: 0; }
.floor-plan-template-card b { min-width: 0; display: grid; align-content: center; gap: 2px; overflow: hidden; white-space: nowrap; line-height: 1.1; }
.floor-plan-template-card b strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: 12px; font-weight: 800; }
.floor-plan-template-card b em { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 9px; font-style: normal; font-weight: 600; }
.floor-plan-template-card i { min-width: 40px; height: 22px; display: inline-flex; align-items: center; justify-content: center; padding: 0 7px; border-radius: 11px; background: #f1f3f1; color: var(--muted); font-size: 8px; font-style: normal; font-weight: 800; white-space: nowrap; }
.floor-plan-template-card.active i { background: var(--green-soft); color: var(--green); }
.floor-plan-template-card:disabled { cursor: not-allowed; opacity: .55; }
.floor-plan-files-section { min-height: auto; display: block; padding-top: 18px; overflow: visible; border-bottom: 0; }
.floor-plan-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.floor-plan-section-heading .section-title { margin-bottom: 10px; }
.floor-plan-new-folder-button { min-height: 25px; margin-bottom: 10px; padding: 0 8px; border: 1px solid var(--line); border-radius: 5px; background: white; color: var(--green); font-size: 9px; font-weight: 800; }
.floor-plan-new-folder-button:hover { background: var(--green-soft); }
.floor-plan-create-folder { margin-bottom: 8px; padding: 8px; border: 1px solid #d3ded7; border-radius: 7px; background: #f8fbf9; }
.floor-plan-create-folder input { width: 100%; min-height: 32px; padding: 0 8px; border: 1px solid var(--line); border-radius: 5px; background: white; font-size: 10px; outline: 0; }
.floor-plan-create-folder input:focus { border-color: var(--green); }
.floor-plan-create-folder > div { display: flex; justify-content: flex-end; gap: 6px; margin-top: 7px; }
.floor-plan-create-folder button { min-height: 26px; padding: 0 9px; border: 1px solid var(--line); border-radius: 5px; background: white; font-size: 9px; font-weight: 700; }
.floor-plan-create-folder button:first-child { border-color: var(--green); background: var(--green); color: white; }
.floor-plan-folder-list { min-height: 0; display: grid; align-content: start; gap: 9px; overflow: visible; }
.floor-plan-folder { overflow: hidden; border: 1px solid #e1e6e2; border-radius: 8px; background: white; box-shadow: 0 8px 22px rgba(28,39,32,.04); }
.floor-plan-folder:hover { border-color: #d2ddd5; }
.floor-plan-folder-button { width: 100%; min-height: 42px; display: grid; grid-template-columns: 18px minmax(0, 1fr) 20px; align-items: center; gap: 9px; padding: 8px 10px; border: 0; border-radius: 0; background: white; text-align: left; }
.floor-plan-folder-button:hover, .floor-plan-folder-button.active { background: #f7faf8; }
.floor-plan-folder-button > div { min-width: 0; }
.floor-plan-folder-button b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.floor-plan-folder-icon { width: 18px; height: 18px; display: inline-grid; place-items: center; color: var(--muted); }
.floor-plan-folder-icon svg { width: 18px; height: 18px; display: block; }
.floor-plan-folder-icon .folder-back { fill: #e7eee9; }
.floor-plan-folder-icon .folder-front { fill: #f8fbf9; stroke: #8fa394; stroke-width: 1.15; }
.floor-plan-folder-icon .folder-line { fill: none; stroke: #365f4a; stroke-width: 1.25; stroke-linecap: round; opacity: .7; }
.floor-plan-folder-button.active .floor-plan-folder-icon .folder-back { fill: #dcebe2; }
.floor-plan-folder-button.active .floor-plan-folder-icon .folder-front { fill: var(--green-soft); stroke: var(--green); }
.floor-plan-folder-toggle { color: #8a928e; font-size: 15px; font-style: normal; font-weight: 800; text-align: center; line-height: 1; }
.floor-plan-folder-button.active .floor-plan-folder-toggle { color: var(--green); }
.floor-plan-record-list { display: grid; gap: 6px; padding: 8px 9px 10px 36px; border-top: 1px solid #edf1ee; background: #fbfcfb; }
.floor-plan-record-list[hidden] { display: none; }
.floor-plan-record-more-button { width: 100%; margin-top: 2px; }
.floor-plan-record { width: 100%; min-height: 58px; display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: center; gap: 8px; padding: 5px; border: 1px solid transparent; border-radius: 6px; background: transparent; text-align: left; }
.floor-plan-record:hover, .floor-plan-record.active { border-color: var(--green); background: white; box-shadow: 0 6px 16px rgba(31,49,38,.06); }
.floor-plan-record img { width: 64px; height: 46px; object-fit: cover; border-radius: 5px; background: var(--soft); }
.floor-plan-record > span { min-width: 0; display: grid; gap: 2px; }
.floor-plan-record b, .floor-plan-record small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.floor-plan-record b { font-size: 10px; }
.floor-plan-record small { color: var(--muted); font-size: 8px; }
.floor-plan-folder-empty { padding: 10px; color: var(--muted); font-size: 10px; line-height: 1.6; }
.floor-plan-generate-area { padding-top: 18px; }
.floor-plan-generate-button { margin-top: 0; }
.floor-plan-generate-button:disabled { background: #c7cac8; color: #666c68; box-shadow: none; cursor: not-allowed; opacity: 1; }
.floor-plan-generate-button.viewing-result-disabled:disabled { background: #c7cac8; color: #666c68; box-shadow: none; cursor: not-allowed; opacity: 1; }
.floor-plan-generate-button.is-running:disabled { background: #6d8374; color: white; }

.floor-plan-stage { min-width: 0; min-height: 0; display: grid; grid-template-rows: 72px minmax(0, 1fr); background: #eceeeb; }
.floor-plan-toolbar { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 0 22px; border-bottom: 1px solid var(--line); background: white; box-shadow: 0 8px 22px rgba(24,37,28,.035); }
.floor-plan-toolbar-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.floor-plan-toolbar-actions .tool-button { min-width: 88px; height: 42px; padding: 0 14px; border-radius: 7px; font-size: 11px; font-weight: 800; }
.floor-plan-toolbar-actions .floor-plan-tool-icon { width: 13px; height: 13px; flex: 0 0 13px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.floor-plan-toolbar-actions .floor-plan-upload-button { min-width: 128px; cursor: pointer; }
#floorPlanCompareButton { margin-inline: 20px; }
#floorPlanPdfUpload { display: none; }
.floor-plan-toolbar-actions .tool-button:disabled { cursor: not-allowed; opacity: .48; }
.floor-plan-canvas-wrap { min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) 34px; padding: 14px 22px 0; }
.floor-plan-canvas { --floor-plan-canvas-inset: 14px; --floor-plan-canvas-inset-total: 28px; min-height: 0; position: relative; overflow: hidden; border: 1px solid rgba(17,23,19,.1); border-radius: 9px; background: #2f3335; box-shadow: 0 14px 34px rgba(23,34,27,.14); }
.floor-plan-empty-source { position: absolute; z-index: 2; inset: var(--floor-plan-canvas-inset); display: grid; place-content: center; justify-items: center; gap: 8px; border: 1px dashed rgba(255,255,255,.24); border-radius: 5px; color: white; text-align: center; background: radial-gradient(circle at 50% 42%, rgba(255,255,255,.08), transparent 42%); }
.floor-plan-empty-source[hidden] { display: none; }
.floor-plan-empty-source > span { width: 52px; height: 52px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.26); border-radius: 12px; color: #dce7df; background: rgba(255,255,255,.08); font-size: 13px; font-weight: 900; letter-spacing: .08em; }
.floor-plan-empty-source b { margin-top: 4px; font-size: 14px; }
.floor-plan-empty-source small { color: rgba(255,255,255,.62); font-size: 10px; }
.floor-plan-empty-source .tool-button { height: 38px; margin-top: 8px; padding: 0 18px; border-radius: 6px; cursor: pointer; }
.floor-plan-canvas > img { position: absolute; inset: var(--floor-plan-canvas-inset); width: calc(100% - var(--floor-plan-canvas-inset-total)); height: calc(100% - var(--floor-plan-canvas-inset-total)); object-fit: contain; display: block; border-radius: 3px; }
.floor-plan-canvas > img[hidden] { display: none; }
.floor-plan-annotation-canvas { display: none; position: absolute; z-index: 5; inset: var(--floor-plan-canvas-inset); width: calc(100% - var(--floor-plan-canvas-inset-total)); height: calc(100% - var(--floor-plan-canvas-inset-total)); pointer-events: none; touch-action: none; user-select: none; }
.floor-plan-canvas.has-annotations .floor-plan-annotation-canvas, .floor-plan-canvas.annotating .floor-plan-annotation-canvas { display: block; }
.floor-plan-canvas.annotating { cursor: crosshair; }
.floor-plan-canvas.annotating .floor-plan-annotation-canvas { pointer-events: auto; cursor: crosshair; }
.floor-plan-canvas.comparing .floor-plan-annotation-canvas { display: none; }
.floor-plan-compare-layer { display: none; position: absolute; z-index: 3; top: var(--floor-plan-canvas-inset); bottom: var(--floor-plan-canvas-inset); left: var(--floor-plan-canvas-inset); width: calc(50% - var(--floor-plan-canvas-inset)); overflow: hidden; pointer-events: none; }
.floor-plan-compare-layer img { position: absolute; inset: 0 auto 0 0; width: var(--floor-plan-canvas-width, calc(100% - var(--floor-plan-canvas-inset-total))); height: 100%; max-width: none; object-fit: contain; object-position: center; display: block; user-select: none; }
.floor-plan-compare-handle { display: none; position: absolute; z-index: 4; top: var(--floor-plan-canvas-inset); bottom: var(--floor-plan-canvas-inset); left: 50%; width: 2px; border: 0; padding: 0; background: white; box-shadow: 0 0 0 1px rgba(0,0,0,.12); cursor: ew-resize; touch-action: none; user-select: none; }
.floor-plan-compare-handle span { position: absolute; left: 50%; top: 50%; width: 34px; height: 34px; display: grid; place-items: center; transform: translate(-50%,-50%); border-radius: 50%; background: white; color: var(--ink); box-shadow: 0 6px 18px rgba(20,28,23,.18); }
.floor-plan-compare-handle:hover span, .floor-plan-compare-handle:focus-visible span, .floor-plan-compare-handle.dragging span { box-shadow: 0 0 0 3px rgba(47,124,85,.28), 0 6px 18px rgba(20,28,23,.22); }
.floor-plan-canvas.comparing { cursor: ew-resize; }
.floor-plan-canvas.comparing .floor-plan-compare-layer, .floor-plan-canvas.comparing .floor-plan-compare-handle { display: block; }
.floor-plan-canvas-badge { top: 12px; left: 12px; }
.floor-plan-draft-chip { position: absolute; z-index: 6; top: 12px; right: 12px; padding: 6px 9px; border-radius: 4px; background: rgba(255,255,255,.9); color: #5d655f; font-size: 9px; font-weight: 800; backdrop-filter: blur(8px); }
.floor-plan-canvas-upload { position: absolute; z-index: 6; left: 13px; bottom: 13px; height: 38px; display: flex; align-items: center; gap: 7px; padding: 0 10px; border: 1px solid white; border-radius: 5px; background: rgba(255,255,255,.92); color: var(--ink); font-family: inherit; cursor: pointer; backdrop-filter: blur(8px); }
.floor-plan-canvas-upload[hidden] { display: none; }
.floor-plan-canvas-upload:hover { background: white; }
.floor-plan-canvas-upload > span { font-size: 17px; font-weight: 500; line-height: 1; }
.floor-plan-canvas-upload b { font-size: 9px; white-space: nowrap; }
.floor-plan-canvas-upload small { color: var(--muted); font-size: 8px; white-space: nowrap; }
.floor-plan-generation-overlay { border-radius: inherit; }
.floor-plan-generation-overlay #floorPlanGenerationDetail { width: max-content; max-width: none; white-space: nowrap; }
.floor-plan-generation-overlay .progress { width: min(320px, 70%); }
.floor-plan-generation-overlay .generation-stop-button[hidden] { display: none; }
.floor-plan-canvas-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; color: var(--muted); font-size: 9px; }
.floor-plan-canvas-footer small { white-space: nowrap; }
.floor-plan-status-copy { min-width: 0; flex: 1; }
.floor-plan-status-copy > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.floor-plan-refine-panel { padding: 18px 16px; overflow-y: auto; border-left: 1px solid var(--line); }
.floor-plan-current-source { padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.floor-plan-current-source .section-title { min-height: 24px; }
.floor-plan-current-source .source-history-button:disabled { cursor: not-allowed; opacity: .5; }
.floor-plan-current-source-card { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; gap: 9px; padding: 6px; border: 1px solid var(--line); border-radius: 8px; background: white; text-align: left; }
.floor-plan-current-source-card.has-source { grid-template-columns: 76px minmax(0, 1fr); }
.floor-plan-current-source-card:hover, .floor-plan-current-source-card.active { border-color: var(--green); background: #f8fbf9; }
.floor-plan-current-source-card:disabled { cursor: default; opacity: 1; background: #f7f8f7; }
.floor-plan-current-source-card:disabled:hover { border-color: var(--line); background: #f7f8f7; }
.floor-plan-current-source-card img { width: 76px; height: 58px; object-fit: cover; border-radius: 6px; background: var(--soft); }
.floor-plan-current-source-card > span { min-width: 0; display: grid; gap: 4px; }
.floor-plan-current-source-card b, .floor-plan-current-source-card small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.floor-plan-current-source-card b { font-size: 12px; line-height: 1.3; }
.floor-plan-current-source-card small { color: var(--muted); font-size: 8px; }
.floor-plan-refine-section { padding-top: 16px; }
.floor-plan-annotation-tools { display: grid; grid-template-columns: minmax(96px, 1.2fr) minmax(64px, .9fr) minmax(64px, .9fr); align-items: center; gap: 6px; margin-bottom: 8px; }
.floor-plan-annotation-tools button { min-height: 34px; border: 1px solid #d9dedb; border-radius: 6px; padding: 0 10px; background: white; color: #49514c; font-size: 10px; font-weight: 700; cursor: pointer; }
.floor-plan-annotation-tools #floorPlanAnnotationToggleButton { grid-column: 1; }
.floor-plan-annotation-tools #floorPlanAnnotationUndoButton { grid-column: 2; }
.floor-plan-annotation-tools #floorPlanAnnotationClearButton { grid-column: 3; }
.floor-plan-annotation-tools button:hover:not(:disabled) { border-color: #9aae9f; background: #f8fbf9; color: var(--green); }
.floor-plan-annotation-tools button:focus-visible { outline: 2px solid rgba(54,95,74,.18); outline-offset: 2px; }
.floor-plan-annotation-tools button[aria-pressed="true"] { border-color: #6f8f7a; background: var(--green-soft); color: var(--green); box-shadow: inset 0 0 0 1px rgba(54,95,74,.08); }
.floor-plan-annotation-tools button[aria-pressed="true"]:hover { border-color: #5f7f6b; background: #dce8e0; color: #2f5543; }
.floor-plan-annotation-tools button:disabled { cursor: not-allowed; color: #a1a7a3; background: #f3f4f3; }
.floor-plan-annotation-count { grid-column: 1 / -1; grid-row: 2; justify-self: start; display: inline-flex; align-items: center; min-height: 24px; padding: 0 7px; border-radius: 999px; background: #fff4f1; color: #7e4037; font-size: 9px; font-weight: 700; white-space: nowrap; }
.floor-plan-annotation-count[hidden] { display: none; }
.floor-plan-refine-section textarea { min-height: 150px; padding: 12px; background: #fafbfa; font-size: 13px; line-height: 1.7; }
.floor-plan-refine-section textarea::placeholder { color: #8f9792; font-size: 13px; line-height: 1.7; }
.floor-plan-refine-section textarea:disabled { cursor: not-allowed; color: #9ca29e; background: #f3f4f3; }
.floor-plan-refine-button { margin-top: 11px; }
.floor-plan-refine-button:disabled { cursor: not-allowed; background: #c7cac8; color: #666c68; box-shadow: none; opacity: 1; }

.floor-plan-pdf-modal { width: min(1040px, calc(100vw - 48px)); max-height: min(860px, calc(100vh - 48px)); display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; gap: 14px; padding: 20px; border-radius: 10px; background: white; box-shadow: 0 24px 70px #0f181344; }
.floor-plan-pdf-modal .modal-heading h2 { font-size: 18px; }
.floor-plan-pdf-preview { min-height: 360px; position: relative; display: grid; place-items: center; overflow: hidden; border-radius: 8px; background: #2f3335; }
.floor-plan-pdf-preview img { width: 100%; height: 100%; max-height: calc(100vh - 300px); display: block; object-fit: contain; }
.floor-plan-pdf-loading { display: grid; justify-items: center; gap: 8px; color: white; }
.floor-plan-pdf-loading[hidden] { display: none; }
.floor-plan-pdf-loading > span { width: 34px; height: 34px; border: 3px solid rgba(255,255,255,.22); border-top-color: white; border-radius: 50%; animation: floor-plan-spin .9s linear infinite; }
.floor-plan-pdf-loading b { font-size: 12px; }
.floor-plan-pdf-loading small { color: rgba(255,255,255,.58); font-size: 9px; }
.floor-plan-pdf-summary { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 7px; background: #f8faf8; }
.floor-plan-pdf-summary > div { min-width: 0; display: grid; gap: 4px; }
.floor-plan-pdf-summary b, .floor-plan-pdf-summary small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.floor-plan-pdf-summary b { font-size: 11px; }
.floor-plan-pdf-summary small { color: var(--muted); font-size: 9px; }
.floor-plan-pdf-summary p { margin: 0; color: #a23f36; font-size: 10px; font-weight: 700; }
.floor-plan-pdf-actions { display: flex; justify-content: flex-end; gap: 8px; }
.floor-plan-pdf-actions .tool-button { min-width: 110px; height: 38px; }
.floor-plan-pdf-actions .tool-button:disabled { cursor: not-allowed; opacity: .55; }
.floor-plan-history-modal { width: min(780px, calc(100vw - 48px)); max-height: min(760px, calc(100vh - 48px)); overflow-y: auto; padding: 22px; border-radius: 8px; background: white; box-shadow: 0 24px 70px #0f181344; }
.floor-plan-history-heading-actions { display: flex; align-items: center; gap: 10px; }
.floor-plan-history-heading-actions > span { min-width: 72px; color: var(--muted); font-size: 10px; font-weight: 800; text-align: right; }
.floor-plan-history-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding-top: 16px; }
.floor-plan-history-card { position: relative; min-height: 154px; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: #2f3335; text-align: left; cursor: pointer; }
.floor-plan-history-card:hover, .floor-plan-history-card.selected { border-color: var(--green); box-shadow: 0 0 0 1px rgba(47,111,78,.14); }
.floor-plan-history-card img { width: 100%; height: 154px; display: block; padding: 8px; object-fit: contain; background: #2f3335; }
.floor-plan-history-card > span { position: absolute; left: 0; right: 0; bottom: 0; display: grid; gap: 2px; padding: 34px 10px 9px; color: white; background: linear-gradient(transparent, rgba(18,24,20,.9)); }
.floor-plan-history-card b, .floor-plan-history-card small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.floor-plan-history-card b { font-size: 11px; }
.floor-plan-history-card small { color: #e5ebe7; font-size: 9px; }
.floor-plan-history-card i { position: absolute; top: 7px; right: 7px; padding: 4px 6px; border-radius: 4px; background: var(--green); color: white; font-size: 9px; font-style: normal; font-weight: 800; }
.floor-plan-history-empty { grid-column: 1 / -1; padding: 34px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); font-size: 11px; text-align: center; }
@keyframes floor-plan-spin { to { transform: rotate(360deg); } }

.style-library { height: calc(100vh - 64px); display: grid; grid-template-columns: 260px minmax(0, 1fr) 310px; background: #f2f4f2; }
.style-library-sidebar, .style-detail-panel { min-height: 0; overflow-y: auto; background: white; }
.style-library-sidebar { padding: 22px; border-right: 1px solid var(--line); }
.style-library-heading { padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.style-library-heading span { display: block; margin-top: 6px; color: var(--muted); font-size: 11px; }
.style-category-list { display: grid; gap: 7px; padding-top: 16px; }
.style-category-button { width: 100%; min-height: 48px; display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: center; gap: 8px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: #fbfcfb; text-align: left; box-shadow: 0 1px 0 rgba(23,34,28,.03); }
.style-category-button .swatch { width: 28px; height: 28px; }
.style-category-copy { min-width: 0; display: grid; gap: 2px; }
.style-category-copy b, .style-category-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.style-category-copy b { color: var(--ink); font-size: 12px; font-weight: 800; }
.style-category-copy small { color: var(--muted); font-size: 9px; font-weight: 600; }
.style-category-button:hover, .style-category-button.active { border-color: var(--green); background: #f8fbf9; box-shadow: inset 0 0 0 1px rgba(54,95,74,.08), 0 6px 16px rgba(23,34,28,.05); }
.style-category-button.active .style-category-copy b { color: var(--green); }
.style-library-main { min-width: 0; min-height: 0; padding: 24px; overflow-y: auto; }
.style-library-toolbar { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 0 18px; border-bottom: 1px solid var(--line); }
.style-library-toolbar span { color: var(--muted); font-size: 11px; font-weight: 700; }
.style-library-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding-top: 18px; }
.style-library-grid.is-preparing { pointer-events: none; }
.library-style-card { min-width: 0; display: grid; grid-template-rows: 132px auto auto; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: white; text-align: left; }
.library-style-card:hover, .library-style-card.active { border-color: var(--green); box-shadow: 0 0 0 1px rgba(54,95,74,.12); }
.library-style-cover, .style-detail-cover, .style-reference-cover { display: block; position: relative; overflow: hidden; border-radius: 6px; background-size: cover; background-position: center; }
.library-style-cover { height: 132px; }
.library-style-cover::before, .style-detail-cover::before, .style-reference-cover::before { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, color-mix(in srgb, var(--tone-a, #b8a581) 76%, #f4f6f3), color-mix(in srgb, var(--tone-b, #66745e) 62%, #eef1ee)), linear-gradient(120deg, rgba(255,255,255,.34), rgba(255,255,255,0) 46%, rgba(15,24,19,.12)); filter: saturate(.86); }
.library-style-cover::after, .style-detail-cover::after, .style-reference-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent, rgba(18,24,20,.18)); }
.library-style-image, .style-detail-image { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity .18s ease; }
.library-style-image.ready, .style-detail-image.ready { opacity: 1; }
.library-style-image[hidden], .style-detail-image[hidden] { display: none; }
.library-style-meta { min-width: 0; display: grid; gap: 5px; }
.library-style-meta b { font-size: 14px; }
.library-style-meta small { min-height: 34px; color: var(--muted); font-size: 10px; line-height: 1.65; }
.style-keywords { display: flex; flex-wrap: wrap; gap: 5px; }
.style-keywords i { padding: 4px 6px; border-radius: 4px; background: var(--soft); color: var(--muted); font-size: 9px; font-style: normal; font-weight: 700; }
.style-detail-panel { border-left: 1px solid var(--line); }
.style-detail-cover { height: 184px; margin: 12px 12px 0; border-radius: 10px; }
.style-detail-body { padding: 22px; }
.style-detail-body h2 { font-size: 22px; }
.style-detail-body > p { margin: 10px 0 18px; color: var(--muted); font-size: 12px; line-height: 1.8; }
.style-detail-section { display: grid; gap: 8px; padding: 14px 0; border-top: 1px solid var(--line); }
.style-detail-section b { font-size: 12px; }
.style-detail-section span { color: var(--muted); font-size: 11px; line-height: 1.7; }
.style-use-button { margin-top: 18px; }
.style-reference-section { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.style-reference-heading { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.style-reference-heading h1 { margin: 0; font-size: 20px; line-height: 1.2; }
.style-reference-heading span { color: var(--muted); font-size: 10px; }
.style-reference-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.style-reference-grid.is-preparing { pointer-events: none; }
.style-reference-card { min-width: 0; position: relative; aspect-ratio: 16 / 9; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: white; overflow: hidden; text-align: left; }
.style-reference-card:hover { border-color: var(--green); box-shadow: 0 10px 24px rgba(23,34,28,.12); }
.style-reference-card:hover .style-reference-cover::before { transform: scale(1.06); }
.style-reference-cover { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 0; }
.style-reference-image { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity .18s ease; }
.style-reference-image.ready { opacity: 1; }
.style-reference-image[hidden] { display: none; }
.style-reference-cover.ref-1::before { background-position: center; transform: scale(1.01); }
.style-reference-cover.ref-2::before { background-position: left center; transform: scale(1.08); }
.style-reference-cover.ref-3::before { background-position: right center; transform: scale(1.08); }
.style-reference-label { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; display: grid; gap: 2px; padding: 28px 10px 9px; color: white; background: linear-gradient(transparent, rgba(18,24,20,.82)); }
.style-reference-card b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.style-reference-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #e5ebe7; font-size: 9px; }
.library-style-cover.natural, .style-detail-cover.natural, .style-reference-cover.natural { --tone-a: #b8a581; --tone-b: #66745e; }
.library-style-cover.minimal, .style-detail-cover.minimal, .style-reference-cover.minimal { --tone-a: #e7e5df; --tone-b: #a5aaa8; }
.library-style-cover.cream, .style-detail-cover.cream, .style-reference-cover.cream { --tone-a: #efe1cb; --tone-b: #d7bfa1; }
.library-style-cover.wood, .style-detail-cover.wood, .style-reference-cover.wood { --tone-a: #c69b66; --tone-b: #efe8da; }
.library-style-cover.italian, .style-detail-cover.italian, .style-reference-cover.italian { --tone-a: #2c302f; --tone-b: #b9ad9c; }
.library-style-cover.luxe, .style-detail-cover.luxe, .style-reference-cover.luxe { --tone-a: #27302d; --tone-b: #b59b68; }
.library-style-cover.wabi, .style-detail-cover.wabi, .style-reference-cover.wabi { --tone-a: #c8bdac; --tone-b: #7a7469; }
.library-style-cover.vintage, .style-detail-cover.vintage, .style-reference-cover.vintage { --tone-a: #6a422c; --tone-b: #c69a62; }
.library-style-cover.french, .style-detail-cover.french, .style-reference-cover.french { --tone-a: #e7ded0; --tone-b: #b79b88; }
.library-style-cover.chinese, .style-detail-cover.chinese, .style-reference-cover.chinese { --tone-a: #4b2d21; --tone-b: #d8d0bd; }
.library-style-cover.nordic, .style-detail-cover.nordic, .style-reference-cover.nordic { --tone-a: #eef0ec; --tone-b: #b7c5b2; }
.library-style-cover.zen, .style-detail-cover.zen, .style-reference-cover.zen { --tone-a: #d9c7aa; --tone-b: #6f735f; }

@media (max-width: 1280px) {
  .floor-plan-desk { grid-template-columns: 270px minmax(480px, 1fr) 280px; }
  .floor-plan-toolbar { padding: 0 14px; }
  .floor-plan-toolbar-actions { gap: 4px; }
  .floor-plan-toolbar-actions .tool-button { min-width: 62px; padding: 0 7px; }
  .floor-plan-toolbar-actions .floor-plan-upload-button { min-width: 100px; }
  #floorPlanCompareButton { margin-inline: 12px; }
}

@media (max-width: 1100px) {
  .workspace { grid-template-columns: 265px minmax(420px, 1fr); }
  .results-panel { display: none; }
  .brand { width: 245px; }
  .project-render-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-desk { grid-template-columns: 280px minmax(0, 1fr); }
  .project-refine-panel { display: none; }
  .style-library { grid-template-columns: 220px minmax(0, 1fr); }
  .style-detail-panel { display: none; }
  .style-library-grid, .style-reference-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .batch-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
  .floor-plan-desk { display: block; padding: 24px; background: #f2f4f2; }
  .floor-plan-desk > :not(.floor-plan-mobile-notice) { display: none; }
  .floor-plan-mobile-notice { min-height: calc(100vh - 112px); display: grid; place-content: center; justify-items: center; gap: 10px; padding: 28px; border: 1px solid var(--line); border-radius: 12px; background: white; text-align: center; }
  .floor-plan-mobile-mark { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 12px; background: var(--green-soft); color: var(--green); font-size: 26px; }
  .floor-plan-mobile-notice h1 { font-size: 21px; }
  .floor-plan-mobile-notice p { max-width: 420px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.8; }
}
@media (max-width: 760px) {
  body { overflow: auto; }
  .topbar { height: 54px; }.brand { width: auto; }.brand > span:last-child, .main-nav { display: none; }
  .workspace { height: auto; display: flex; flex-direction: column-reverse; }
  .project-desk { height: auto; display: block; }
  .style-library { height: auto; display: block; }
  .style-library-sidebar, .style-library-main { padding: 16px; overflow: visible; }
  .style-detail-panel { display: none; }
  .style-library-grid, .style-reference-grid { grid-template-columns: 1fr; }
  .project-sidebar, .project-detail { padding: 16px; overflow: visible; }
  .project-preview, .project-refine-panel { padding: 16px; overflow: visible; }
  .project-preview-content { grid-template-rows: auto minmax(360px, 1fr); gap: 10px; }
  .project-preview-toolbar { min-height: auto; padding: 10px; align-items: flex-start; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 8px; }
  .project-preview-actions { width: 100%; gap: 12px; justify-content: flex-start; flex-wrap: wrap; }
  .project-management-actions { flex-wrap: wrap; }
  .project-preview-actions .tool-button { min-width: auto; height: 36px; padding: 0 12px; font-size: 11px; }
  .project-image-stage { min-height: 360px; margin: 0; }
  .project-refine-panel { display: block; border-left: 0; border-top: 1px solid var(--line); }
  .project-assets { grid-template-columns: 1fr; }
  .project-render-grid { grid-template-columns: 1fr 1fr; }
  .stage { min-height: 390px; order: 2; grid-template-rows: auto 1fr; }
  .stage-toolbar { min-height: auto; margin: 0; padding: 10px; align-items: flex-start; flex-wrap: wrap; }
  .control-panel { order: 1; border: 0; overflow: visible; padding: 16px; }
  .canvas-wrap { padding: 10px 10px 0; }.canvas { aspect-ratio: 4/3; }.canvas-footer .tip { display: none; }
  .toolbar-actions { gap: 6px; }
  .operation-actions { padding-left: 0; }
  .toolbar-actions .tool-button > span:not(.batch-upload-icon) { display: none; }
  .project-name small { display: none; }
  .upload-button { height: 34px; padding: 0 9px; }
  .upload-button small { display: none; }
  .option-grid { grid-template-columns: repeat(2, 1fr); }
  .style-grid { grid-template-columns: 1fr; }
  .style-card { grid-template-columns: minmax(0, 1fr) auto; }
  .swatch { width: 24px; }
  .batch-modal { max-height: calc(100vh - 20px); padding: 14px; }
  .batch-modal-summary, .batch-modal-actions { align-items: stretch; flex-direction: column; }
  .batch-modal-actions .tool-button { width: 100%; }
  .batch-grid { grid-template-columns: 1fr; }
  .modal-backdrop { padding: 10px; }.account-modal, .credit-details-modal, .payment-checkout-modal { max-height: calc(100vh - 20px); padding: 16px; }.package-grid { grid-template-columns: 1fr; }.package-card { min-height: 64px; }.package-card-main { gap: 14px; }
  .payment-checkout-actions { grid-template-columns: 1fr; }
  .account-modal.account-modal-login { width: min(520px, calc(100vw - 20px)); padding: 0; }
  .wechat-login-view { min-height: 0; grid-template-columns: 1fr; }
  .wechat-login-brand-panel { min-height: 158px; padding: 34px 28px; }
  .wechat-login-brand-copy b { font-size: 44px; }
  .wechat-login-brand-copy span { font-size: 22px; }
  .wechat-login-main-panel { padding: 34px 22px 28px; }
  .wechat-login-logo { width: min(200px, 76%); margin-bottom: 20px; }
  .wechat-login-frame-wrap { width: min(300px, calc(100vw - 70px)); height: 340px; }
  .wechat-login-widget { width: 100%; }
  .wechat-login-widget iframe { width: 100% !important; }
  .style-reference-modal { max-height: calc(100vh - 20px); padding: 14px; }
  .style-reference-modal-stage { padding: 0; }
  .style-reference-nav { top: auto; bottom: 10px; transform: none; width: 34px; height: 42px; font-size: 24px; }
  .style-reference-prev { left: 10px; }
  .style-reference-next { right: 10px; }
  .style-reference-modal-footer { align-items: stretch; flex-direction: column; }
  .style-reference-modal-footer .tool-button { width: 100%; }
}
