:root { --ink: #332d28; --muted: #716b62; --paper: #f7f4ed; --line: #d9d0c2; --rust: #9e634f; --green: #496054; }
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: #e8e7df; font-family: 'Microsoft YaHei', 'Noto Sans SC', sans-serif; line-height: 1.6; min-height: 100vh; display: flex; flex-direction: column; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.site-header { background: #fbfaf6; border-bottom: 1px solid #e5ded2; }
.site-header .container { max-width: 1560px; min-height: 76px; margin: auto; padding: 12px 28px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.logo h1 { margin: 0; font-size: 19px; font-weight: 500; }
.logo .subtitle { margin: 2px 0 0; color: var(--muted); font: 9px Georgia, serif; letter-spacing: .13em; }
.main-nav ul { display: flex; gap: clamp(14px, 2.2vw, 38px); list-style: none; margin: 0; padding: 0; }
.main-nav a { display: block; text-align: center; white-space: nowrap; text-decoration: none; font-size: 13px; padding: 5px 0; border-bottom: 1px solid transparent; }
.main-nav a.active { color: var(--rust); border-bottom-color: var(--rust); }
.en-text { display: block; margin-top: 2px; color: #9b968d; font: 8px Georgia, serif; letter-spacing: .04em; }
.workbench { display: grid; grid-template-columns: minmax(285px, 27%) minmax(450px, 1fr) minmax(220px, 20%); min-height: min(760px, calc(100vh - 76px)); max-width: 1800px; margin: auto; background: var(--paper); }
.bench-panel { min-width: 0; }
.catalog-panel { display: flex; flex-direction: column; background: #f9f7f1; border-right: 1px solid var(--line); }
.panel-heading, .catalog-tools { padding: 18px 24px 0; }
.section-number { display: block; color: var(--rust); font-size: 13px; }
h2, h3, p { margin-top: 0; }
.panel-heading h2, .stage-heading h2, .summary-heading h2 { margin: 0; font-family: 'SimSun', 'Noto Serif SC', serif; font-size: 23px; font-weight: 500; }
.catalog-tools { padding-top: 15px; }
.grade-list { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 15px; }
.grade-list button { padding: 6px 7px; border: 1px solid transparent; background: transparent; color: #69645d; white-space: nowrap; font-size: 11px; }
.grade-list button:hover, .grade-list button.active { background: var(--rust); color: #fff9f0; }
.search-wrap input { width: 100%; height: 36px; border: 0; border-bottom: 1px solid var(--line); outline: none; background: transparent; color: var(--ink); font-size: 13px; }
.search-wrap input:focus { border-color: var(--rust); }
.flower-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; padding: 20px 24px 30px; overflow-y: auto; align-content: start; max-height: 640px; }
.flower-card { min-width: 0; }
.flower-add { display: block; width: 100%; padding: 0; border: 0; color: var(--ink); background: transparent; text-align: left; }
.flower-thumb { display: grid; place-items: center; width: 100%; aspect-ratio: 1.18; background: #ebe7db; border: 1px solid #e6ddcd; overflow: hidden; }
.flower-thumb img { width: 82%; height: 88%; object-fit: contain; transition: transform .18s ease; }
.flower-add:hover img { transform: scale(1.06); }
.flower-card.is-selected .flower-thumb { outline: 2px solid var(--rust); outline-offset: -2px; }
.flower-name-row { display: flex; justify-content: space-between; align-items: baseline; gap: 5px; margin: 7px 0 3px; font-size: 13px; }
.flower-grade { color: var(--muted); font-size: 10px; }
.flower-card details { font-size: 11px; color: var(--muted); }
.flower-card summary { cursor: pointer; list-style: none; text-decoration: underline; text-underline-offset: 3px; }
.flower-card details p { margin: 7px 0 0; line-height: 1.55; }
.catalog-empty { padding: 24px; color: var(--muted); }
.stage-panel { display: flex; flex-direction: column; background: #f3f0e7; }
.stage-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; padding: 18px 25px 15px; border-bottom: 1px solid var(--line); }
.mode-switch { display: flex; padding: 2px; border: 1px solid var(--line); }
.mode-switch button { border: 0; padding: 7px 16px; background: transparent; color: var(--muted); font-size: 12px; }
.mode-switch button.active { background: var(--green); color: white; }
.stage-surface { position: relative; flex: 1; min-height: 510px; overflow: hidden; background: #e9e5d9; }
.stage-surface::before { content: ""; position: absolute; inset: 0; opacity: .3; background-image: url("图片/厅堂2.jpg"); background-size: cover; background-position: center; filter: grayscale(1) sepia(.35); }
.stage-surface::after { content: ""; position: absolute; inset: 0; background: rgba(246,242,231,.54); pointer-events: none; }
.ink-wash { position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(246,242,231,.8), transparent 35%, rgba(246,242,231,.25)); pointer-events: none; }
.stage-seal { position: absolute; right: 5%; top: 5%; z-index: 3; border: 1px solid #ac8778; padding: 9px 6px; color: var(--rust); line-height: 1.6; font-size: 14px; }
.arrangement { position: absolute; z-index: 3; width: min(75%, 520px); height: auto; aspect-ratio: 1; top: 50%; left: 50%; transform: translate(-50%, -50%); }
.stems { position: absolute; inset: 0; pointer-events: none; }
.flower-item { position: absolute; width: 28%; aspect-ratio: 1; border: 1px solid transparent; touch-action: none; transform-origin: 50% 75%; cursor: grab; pointer-events: auto; }
.flower-item img { display: block; width: 100%; height: 100%; object-fit: contain; pointer-events: none; user-select: none; }
.stage-panel.refining .flower-item { cursor: grab; }
.stage-panel.refining .flower-item:active { cursor: grabbing; }
.stage-panel.refining .flower-item.selected { border: 1px dashed var(--rust); }
.stage-vase { position: absolute; width: 43%; height: 48%; object-fit: contain; object-position: bottom; transform-origin: bottom center; z-index: 30; cursor: grab; touch-action: none; }
.stage-vase.selected, .flower-item.selected { outline: 1px dashed var(--rust); outline-offset: 2px; }
.stage-vase:active, .flower-item:active { cursor: grabbing; }
.stage-placeholder { position: absolute; top: 42%; left: 0; width: 100%; z-index: 31; text-align: center; color: #807569; font-size: 14px; }
.table-edge { position: absolute; z-index: 2; bottom: 0; width: 100%; height: 18%; border-top: 2px solid rgba(117,88,66,.22); background: linear-gradient(#bda98d55, #b4a08399); }
.refine-controls { min-height: 62px; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 9px 16px; border-top: 1px solid var(--line); font-size: 12px; }
.refine-controls[hidden] { display: none; }
.refine-controls label { display: flex; align-items: center; gap: 6px; }
.refine-controls label[hidden] { display: none; }
.refine-controls input { width: 75px; accent-color: var(--rust); }
.refine-controls button { width: 31px; height: 31px; border: 1px solid var(--line); background: #faf8f2; color: var(--ink); }
.refine-controls button:disabled { opacity: .4; cursor: default; }
.summary-panel { display: flex; flex-direction: column; padding: 20px 18px; background: #fbfaf5; border-left: 1px solid var(--line); }
.summary-panel { padding-top: 0; }
.panel-heading, .stage-heading, .summary-heading { display: flex; align-items: center; min-height: 72px; padding-top: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.panel-heading h2, .stage-heading h2, .summary-heading h2 { font-family: 'STSong', 'SimSun', 'Noto Serif SC', serif; font-size: 23px; line-height: 35px; font-weight: 500; color: var(--rust); letter-spacing: 0; }
.selection-heading { margin: 18px 0 0; font-size: 16px; font-weight: 500; }
.selection-heading small { font-size: 12px; color: var(--muted); }
.search-wrap { display: flex; align-items: center; gap: 8px; }
.search-wrap label { flex-shrink: 0; font-size: 13px; }
.search-wrap input { min-width: 0; flex: 1; }
.search-wrap button { flex-shrink: 0; padding: 6px 8px; border: 1px solid var(--line); background: transparent; color: var(--rust); font-size: 12px; }
.search-wrap button:hover { background: #ede5d8; }
.search-result { min-height: 18px; margin: 5px 0 0; font-size: 11px; color: var(--muted); }
.pairing-advice .pairing-verdict { color: var(--green); font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.summary-heading small { color: var(--muted); font: 11px Georgia, serif; }
.selected-list { flex: 1; min-height: 150px; padding: 12px 0; overflow-y: auto; }
.empty-selection { padding-top: 16px; color: var(--muted); font-size: 13px; }
.selected-row { display: flex; align-items: center; gap: 9px; min-height: 58px; border-bottom: 1px solid #e5ded3; }
.selected-row img { width: 48px; height: 48px; object-fit: contain; background: #f0eadf; }
.selected-row-text { flex: 1; min-width: 0; }
.selected-row-text strong { display: block; font-size: 13px; font-weight: 500; }
.selected-row-text span { color: var(--muted); font-size: 10px; }
.selected-row button { border: 0; background: transparent; color: #8e8073; font-size: 19px; }
.pairing-advice { border-top: 1px solid var(--line); padding: 14px 0; font-size: 12px; line-height: 1.65; }
.pairing-advice:empty { display: none; }
.pairing-advice h3 { font-family: 'SimSun', 'Noto Serif SC', serif; font-size: 16px; font-weight: 500; margin-bottom: 8px; }
.pairing-advice p { margin: 0 0 5px; color: var(--muted); }
.vase-summary { padding: 16px 0; border-top: 1px solid var(--line); text-align: center; }
.vase-summary h3 { margin-bottom: 10px; text-align: left; font-size: 14px; font-weight: 500; }
.vase-summary img { width: 90px; height: 95px; object-fit: contain; }
.vase-summary p { margin: 3px 0; font-size: 13px; }
.vase-summary a { color: var(--rust); font-size: 11px; text-underline-offset: 3px; }
.selection-message { min-height: 29px; color: var(--rust); font-size: 12px; }
.finish-button { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 44px; border: 0; border-radius: 2px; color: white; background: var(--rust); font-size: 14px; }
.finish-button:disabled { background: #bcb5aa; cursor: default; }
.finish-button:hover:not(:disabled) { background: #80503f; }
.save-dialog { width: min(420px, calc(100% - 32px)); border: 1px solid var(--line); padding: 30px; background: #fbf8f1; box-shadow: 0 20px 50px #2a241f44; color: var(--ink); }
.save-dialog::backdrop { background: #201d1aba; }
.save-dialog form { position: relative; display: grid; gap: 18px; }
.save-dialog h2 { margin: -12px 0 0; font-size: 23px; font-weight: 500; }
.save-dialog label { display: grid; gap: 8px; font-size: 12px; }
.save-dialog input, .save-dialog textarea { width: 100%; padding: 10px; border: 1px solid var(--line); background: white; color: var(--ink); font-size: 13px; }
.dialog-close { position: absolute; right: -9px; top: -12px; border: 0; background: transparent; font-size: 25px; }
.mobile-sections { display: none; }
.site-footer { background: #fbfaf6; border-top: 1px solid var(--line); }
.site-footer .container { max-width: 1560px; margin: auto; padding: 22px 28px; }
.footer-content { display: flex; justify-content: space-between; gap: 25px; }
.footer-info h3 { margin: 0 0 4px; font-size: 13px; font-weight: 500; }
.footer-info p, .footer-links a, .copyright { color: var(--muted); font-size: 10px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.copyright { margin-top: 14px; }
@media (max-width: 1100px) { .workbench { grid-template-columns: minmax(240px, 29%) minmax(390px, 1fr) minmax(190px, 19%); } .flower-grid { padding-left: 16px; padding-right: 16px; } .panel-heading, .catalog-tools { padding-left: 16px; padding-right: 16px; } .main-nav ul { gap: 12px; } }
@media (max-width: 850px) { .site-header .container { display: block; } .main-nav { margin-top: 12px; overflow-x: auto; } .main-nav ul { width: max-content; } .workbench { display: block; min-height: 0; } .mobile-sections { display: flex; position: sticky; top: 0; z-index: 50; background: #fbfaf6; border-bottom: 1px solid var(--line); } .mobile-tab { flex: 1; padding: 12px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); } .mobile-tab.active { color: var(--rust); border-bottom-color: var(--rust); } .bench-panel { display: none; border: 0; } .bench-panel.mobile-active { display: flex; min-height: 650px; } .flower-grid { max-height: none; grid-template-columns: repeat(3, minmax(0, 1fr)); } .stage-panel.mobile-active { min-height: 690px; } .stage-surface { min-height: 550px; } .summary-panel.mobile-active { min-height: 650px; } .selected-list { min-height: 260px; } }
@media (max-width: 560px) { .site-header .container { padding: 12px 16px; } .flower-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stage-heading { padding: 16px; } .stage-heading h2 { font-size: 19px; } .stage-surface { min-height: 470px; } .stage-panel.mobile-active { min-height: 600px; } .arrangement { width: 94%; height: 88%; } .refine-controls { flex-wrap: wrap; } .summary-panel { padding: 20px; } .footer-content { display: block; } .footer-links { margin-top: 14px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; } }

/* Match the navigation and footer shared by the other chapters. */
.site-header { background: #fff; border-bottom: 1px solid #d7ccc8; padding: 15px 0; position: sticky; top: 0; z-index: 100; }
.site-header .container, .site-footer .container { width: 100%; max-width: 1400px; margin: auto; padding: 0 20px; }
.site-header .container { min-height: 0; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.logo h1 { color: #3e2723; font-family: 'SimSun', 'Noto Serif SC', serif; font-size: 1.5rem; font-weight: 500; }
.logo .subtitle { margin-top: 2px; color: #8d6e63; font-family: 'Microsoft YaHei', sans-serif; font-size: 1.1rem; font-weight: 300; letter-spacing: .03em; }
.main-nav ul { gap: 30px; }
.main-nav li { position: relative; }
.main-nav a { display: flex; flex-direction: column; align-items: center; color: #3e2723; font-size: .9rem; border: 0; text-decoration: none; }
.main-nav a:hover, .main-nav a.active { color: #8d6e63; border: 0; }
.main-nav a::after { content: ''; position: absolute; bottom: -5px; left: 50%; width: 0; height: 2px; background: #8d6e63; transform: translateX(-50%); transition: width .3s ease; }
.main-nav a:hover::after, .main-nav a.active::after { width: 100%; }
.en-text { margin-top: 2px; color: #bcaaa4; font-family: 'Microsoft YaHei', sans-serif; font-size: .7rem; font-weight: 300; letter-spacing: .05em; }
.site-footer { background: #fff; border-top: 1px solid #d7ccc8; padding: 30px 0; margin-top: auto; }
.site-footer .container { padding-top: 0; padding-bottom: 0; }
.footer-content { align-items: center; margin-bottom: 20px; }
.footer-info h3 { margin-bottom: 5px; color: #4e342e; font-family: 'SimSun', serif; font-size: 1.2rem; }
.footer-info p, .footer-links a { color: #8d6e63; font-size: .9rem; }
.copyright { color: #bcaaa4; text-align: center; font-size: .85rem; border-top: 1px solid #d7ccc8; padding-top: 20px; margin: 0; }
.copyright p { margin: 0; }
@media (max-width: 850px) { .site-header .container { display: flex; } .main-nav { margin-top: 0; overflow-x: visible; } .main-nav ul { width: auto; } }
@media (max-width: 768px) { .main-nav { display: none; } .logo { margin: 0 auto; text-align: center; align-items: center; } .footer-content { flex-direction: column; text-align: center; gap: 20px; } .footer-links { justify-content: center; } }
@media (max-width: 560px) { .site-header .container { padding: 0 16px; } .arrangement { width: 94%; height: auto; } }
@media (max-width: 560px) { .panel-heading h2, .stage-heading h2, .summary-heading h2 { font-size: 23px; } .summary-panel { padding-top: 0; } }
