@font-face { font-family: "Book Serif"; src: local("Iowan Old Style"), local("Palatino Linotype"); font-display: swap; }
:root {
  --paper: #f3efe6;
  --paper-deep: #e8e0d2;
  --ink: #17221d;
  --muted: #59635d;
  --rule: #c9c0b2;
  --wine: #7d3040;
  --wine-dark: #5e2030;
  --white: #fffdf8;
  --sans: "Avenir Next", Avenir, "Segoe UI", sans-serif;
  --serif: "Book Serif", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--sans); }
button, input, textarea { font: inherit; }
button { min-height: 46px; }
.site-header { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 0 clamp(20px, 5vw, 72px); border-bottom: 1px solid var(--rule); }
.wordmark { color: var(--ink); font-size: 13px; font-weight: 750; letter-spacing: .16em; text-decoration: none; }
.header-tools { display: flex; align-items: center; gap: 22px; }
.header-note { color: var(--muted); font-size: 13px; }
.language-picker { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; font-weight: 700; }
.language-picker select { min-height: 38px; padding: 0 30px 0 10px; color: var(--ink); background: var(--white); border: 1px solid var(--rule); border-radius: 0; }
.intro { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr); min-height: 690px; border-bottom: 1px solid var(--rule); }
.intro-copy { padding: clamp(72px, 10vw, 144px) clamp(24px, 7vw, 104px); border-right: 1px solid var(--rule); }
.eyebrow, .step-label { margin: 0 0 22px; color: var(--wine); font-size: 12px; font-weight: 800; letter-spacing: .17em; }
h1 { max-width: 820px; margin: 0; font-family: var(--serif); font-size: clamp(54px, 7vw, 104px); font-weight: 500; letter-spacing: -.055em; line-height: .93; text-wrap: balance; }
.lede { max-width: 680px; margin: 34px 0 30px; color: #39453e; font-family: var(--serif); font-size: clamp(20px, 2vw, 27px); line-height: 1.45; }
.intro-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.file-button, .secondary { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; padding: 0 25px; border-radius: 2px; font-weight: 750; cursor: pointer; }
.file-button { color: var(--white); background: var(--wine); border: 1px solid var(--wine); }
.file-button:hover { background: var(--wine-dark); }
.secondary { color: var(--ink); background: transparent; border: 1px solid #7f877f; }
.secondary:hover { background: var(--white); }
.file-button:focus-within, .secondary:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid #d49aaa; outline-offset: 3px; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.import-status { min-height: 20px; margin: 14px 0 0; color: var(--wine); font-size: 13px; font-weight: 750; }
.price-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 14px; margin: 22px 0 0; color: var(--muted); font-size: 13px; }
.price-line strong { color: var(--ink); font-family: var(--serif); font-size: 26px; font-weight: 500; }
.privacy-promise { display: flex; gap: 10px; align-items: center; margin: 22px 0 0; color: var(--muted); font-size: 14px; }
.privacy-promise span { color: #357257; font-size: 10px; }
.intro-specimen { display: grid; align-content: center; justify-items: center; gap: 30px; padding: 70px 34px; background: var(--paper-deep); }
.specimen-book { width: min(72%, 330px); aspect-ratio: 148 / 210; display: flex; flex-direction: column; padding: 40px 34px; color: #f8ede5; background: var(--wine-dark); box-shadow: 18px 22px 0 rgba(23,34,29,.1); }
.specimen-kicker, .specimen-names { font-size: 10px; letter-spacing: .18em; }
.specimen-book strong { margin: auto 0; font-family: var(--serif); font-size: clamp(38px, 4vw, 60px); font-weight: 500; line-height: .95; }
.intro-specimen > p { max-width: 330px; color: var(--muted); font-family: var(--serif); font-style: italic; text-align: center; }
.workspace { display: grid; grid-template-columns: minmax(280px, 370px) minmax(0, 1fr); min-height: 840px; scroll-margin-top: 20px; border-bottom: 1px solid var(--rule); }
.configurator { padding: 52px clamp(24px, 4vw, 52px); border-right: 1px solid var(--rule); background: var(--white); }
.configurator h2 { margin: 0 0 42px; font-family: var(--serif); font-size: 42px; font-weight: 500; }
.configurator label { display: block; margin: 24px 0 8px; color: #39453e; font-size: 13px; font-weight: 750; }
.configurator input, .configurator textarea { width: 100%; padding: 12px 0; color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid #8b918d; border-radius: 0; }
.configurator textarea { resize: vertical; line-height: 1.5; }
.participants { margin: 26px 0 0; padding: 0; border: 0; }
.participants legend { margin-bottom: 10px; color: #39453e; font-size: 13px; font-weight: 750; }
.participants-list { display: flex; flex-wrap: wrap; gap: 8px; }
.configurator .participants-list label { min-height: 36px; display: inline-flex; align-items: center; gap: 7px; margin: 0; padding: 0 11px; background: var(--paper); border: 1px solid var(--rule); font-weight: 650; cursor: pointer; }
.configurator .participants-list input { width: 15px; height: 15px; margin: 0; accent-color: var(--wine); }
.themes { display: flex; flex-wrap: wrap; gap: 8px; margin: 25px 0 0; padding: 0; border: 0; }
.themes legend { width: 100%; margin-bottom: 2px; color: #39453e; font-size: 13px; font-weight: 750; }
.configurator .themes label { min-height: 36px; display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 0 10px; border: 1px solid var(--rule); font-size: 12px; cursor: pointer; }
.configurator .themes input { position: static; width: 15px; height: 15px; margin: 0; padding: 0; opacity: 1; pointer-events: auto; accent-color: var(--wine); }
.configurator .themes label:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.swatch { width: 12px; height: 12px; border-radius: 50%; }
.swatch-wine { background: #5e2030; }.swatch-forest { background: #234438; }.swatch-ink { background: #202832; }
.swatch-ocean { background: #17556b; }.swatch-terracotta { background: #a24f38; }.swatch-plum { background: #673552; }
.swatch-sand { background: #c8aa78; }.swatch-midnight { background: #101c35; }
.cover-image-controls { margin: 25px 0 0; padding: 0; border: 0; }
.cover-image-controls legend { margin-bottom: 10px; color: #39453e; font-size: 13px; font-weight: 750; }
.configurator .rights-confirm { display: flex; align-items: flex-start; gap: 9px; margin: 0 0 12px; font-weight: 600; line-height: 1.45; }
.configurator .rights-confirm input { flex: 0 0 auto; width: 17px; height: 17px; margin: 2px 0 0; padding: 0; accent-color: var(--wine); }
.configurator .cover-image-button, .remove-cover-image { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; margin: 0; padding: 0 12px; color: var(--ink); background: var(--paper); border: 1px solid var(--rule); font-size: 12px; font-weight: 750; cursor: pointer; }
.cover-image-controls:has(#cover-image:disabled) .cover-image-button { color: #99928a; cursor: not-allowed; opacity: .65; }
.remove-cover-image { margin-left: 6px; }
.date-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.date-grid label { margin-top: 22px; }
.config-rule { margin: 34px 0 24px; border-top: 1px solid var(--rule); }
.book-stats { color: var(--wine); font-size: 13px; font-weight: 800; }
.export-button { width: 100%; min-height: 48px; margin-top: 20px; color: var(--white); background: var(--wine); border: 1px solid var(--wine); border-radius: 2px; font-weight: 800; cursor: pointer; }
.export-button:hover { background: var(--wine-dark); }
.export-note { margin: 10px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.archive-button { width: 100%; min-height: 48px; margin-top: 10px; color: var(--ink); background: transparent; border: 1px solid #7f877f; border-radius: 2px; font-weight: 800; cursor: pointer; }
.archive-button:hover { background: var(--paper); }
.purchase-button { width: 100%; min-height: 48px; margin-top: 10px; color: var(--white); background: var(--ink); border: 1px solid var(--ink); border-radius: 2px; font-weight: 800; cursor: pointer; }
.purchase-button:hover { background: #2d3932; }
.export-button:disabled, .archive-button:disabled { color: #8b918d; background: #ebe7df; border-color: #cbc5bb; cursor: not-allowed; }
.local-note { margin-top: 20px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.digital-only-note { max-width: 640px; margin: 18px 0 0; padding: 14px 16px; color: #4e2b25; background: #f4e6df; border-left: 3px solid var(--wine); font-size: 13px; font-weight: 700; line-height: 1.55; }
.large-chat-warning { margin: 0 0 18px; padding: 14px 16px; color: #4e2b25; background: #f4e6df; border-left: 3px solid var(--wine); font-size: 12px; font-weight: 700; line-height: 1.55; }
.draft-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--rule); }
.draft-controls p { margin: 0; color: #357257; font-size: 11px; font-weight: 750; }
.draft-controls button { min-height: 36px; padding: 0; color: var(--muted); background: transparent; border: 0; border-bottom: 1px solid currentColor; font-size: 11px; cursor: pointer; }
.preview-stage { padding: 34px clamp(16px, 5vw, 72px) 80px; background: #d9d5cd; overflow: auto; }
.stage-label { display: flex; justify-content: space-between; max-width: 610px; margin: 0 auto 20px; color: #5d645f; font-size: 10px; font-weight: 800; letter-spacing: .14em; }
.book-preview { --cover-base: #5e2030; --cover-text: #fff5ed; --cover-rule: #d9a9a4; --cover-pattern: none; --cover-image: var(--cover-pattern); width: min(100%, 610px); margin: auto; background: var(--white); box-shadow: 0 18px 50px rgba(28,31,29,.18); }
.book-preview[data-theme="forest"] { --cover-base: #234438; --cover-rule: #92b7a5; }
.book-preview[data-theme="ink"] { --cover-base: #202832; --cover-rule: #9aa9bd; }
.book-preview[data-theme="ocean"] { --cover-base: #17556b; --cover-rule: #9bc7d2; }
.book-preview[data-theme="terracotta"] { --cover-base: #a24f38; --cover-rule: #efb7a5; }
.book-preview[data-theme="plum"] { --cover-base: #673552; --cover-rule: #d6a8c2; }
.book-preview[data-theme="sand"] { --cover-base: #c8aa78; --cover-text: #292116; --cover-rule: #66502f; }
.book-preview[data-theme="midnight"] { --cover-base: #101c35; --cover-rule: #8396bd; }
.book-preview[data-pattern="linen"] { --cover-pattern: repeating-linear-gradient(0deg, rgba(255,255,255,.045) 0 1px, transparent 1px 4px), repeating-linear-gradient(90deg, rgba(0,0,0,.04) 0 1px, transparent 1px 5px); }
.book-preview[data-pattern="lines"] { --cover-pattern: repeating-linear-gradient(0deg, transparent 0 12px, rgba(255,255,255,.09) 12px 13px); }
.book-preview[data-pattern="dots"] { --cover-pattern: radial-gradient(circle at 2px 2px, rgba(255,255,255,.16) 1.2px, transparent 1.3px); }
.book-preview[data-pattern="dots"] .book-cover { background-size: 14px 14px; }
.book-preview[data-pattern="gradient"] { --cover-pattern: linear-gradient(145deg, rgba(255,255,255,.28), transparent 46%, rgba(0,0,0,.22)); }
.book-preview[data-font="classic"] { --book-font: Georgia, "Times New Roman", serif; }
.book-preview[data-font="book"] { --book-font: Charter, "Bitstream Charter", Cambria, Georgia, serif; }
.book-preview[data-font="modern"] { --book-font: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif; }
.book-preview[data-font="humanist"] { --book-font: "Trebuchet MS", "Segoe UI", sans-serif; }
.book-preview[data-font="typewriter"] { --book-font: ui-monospace, "SFMono-Regular", Consolas, monospace; }
.book-cover { position: relative; isolation: isolate; min-height: 660px; display: flex; flex-direction: column; justify-content: center; padding: 74px 66px; color: var(--cover-text); background-color: var(--cover-base); background-image: var(--cover-image); print-color-adjust: exact; -webkit-print-color-adjust: exact; }
.book-preview[data-cover-image="true"] .book-cover { background-position: center; background-size: cover; }
.book-preview[data-cover-image="true"] .book-cover::before { content: ""; position: absolute; inset: 0; z-index: 0; background: linear-gradient(180deg, rgba(8,13,11,.25), rgba(8,13,11,.62)); }
.book-cover > * { position: relative; z-index: 1; }
.cover-rule { width: 46px; border-top: 2px solid var(--cover-rule); }
.book-cover > p:first-of-type { margin-top: 24px; font-size: 10px; letter-spacing: .18em; }
.book-cover h2 { margin: auto 0 20px; font-family: var(--book-font, var(--serif)); font-size: clamp(54px, 7vw, 86px); font-weight: 500; letter-spacing: -.045em; line-height: .96; overflow-wrap: anywhere; }
.book-cover p:last-child { max-width: 330px; margin: 0; font-family: var(--book-font, var(--serif)); font-size: 18px; font-style: italic; line-height: 1.5; }
.book-page { min-height: 760px; padding: 76px 66px; }
.message { padding: 0 0 22px; margin: 0 0 24px; border-bottom: 1px solid #e4ded4; }
.message:last-child { border-bottom: 0; }
.preview-limit-note { margin: 30px 0 0; padding: 18px 20px; color: #465149; background: var(--paper); border-left: 3px solid var(--wine); font-size: 13px; line-height: 1.55; }
.message p { margin: 0; font-family: var(--book-font, var(--serif)); font-size: 17px; line-height: 1.55; }
.message .message-meta { margin-bottom: 8px; color: var(--wine); font-family: var(--sans); font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.hide-message { min-height: 34px; margin-top: 10px; padding: 0; color: var(--muted); background: transparent; border: 0; border-bottom: 1px solid transparent; font-size: 11px; cursor: pointer; }
.hide-message:hover, .hide-message:focus-visible { color: var(--wine); border-bottom-color: var(--wine); }
.export-guide { padding: 72px clamp(24px, 6vw, 88px) 82px; border-bottom: 1px solid var(--rule); background: #ece7de; }
.export-guide h2 { max-width: 760px; margin: 0; font-family: var(--serif); font-size: clamp(38px, 5vw, 64px); font-weight: 500; letter-spacing: -.035em; line-height: 1; }
.guide-intro { max-width: 720px; margin: 24px 0 40px; color: #465149; font-size: 17px; line-height: 1.65; }
.guide-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.guide-grid article { min-height: 310px; padding: 30px 28px; border: 1px solid #d4cdc1; background: #fffdf9; }
.guide-grid h3 { margin: 0 0 22px; font-family: var(--serif); font-size: 24px; font-weight: 550; }
.guide-grid ol { margin: 0; padding-left: 20px; color: #465149; }
.guide-grid li { padding-left: 5px; margin-bottom: 16px; line-height: 1.55; }
.guide-note { max-width: 760px; margin: 24px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.legal { padding: 76px clamp(24px, 6vw, 88px) 88px; border-bottom: 1px solid var(--rule); background: #f8f5ee; }
.legal h2 { margin: 0; font-family: var(--serif); font-size: clamp(38px, 5vw, 64px); font-weight: 500; letter-spacing: -.035em; line-height: 1; }
.legal-intro { max-width: 720px; margin: 22px 0 28px; color: var(--muted); line-height: 1.6; }
.operator-card { display: grid; gap: 5px; max-width: 720px; margin: 0 0 36px; padding: 22px 24px; border-left: 3px solid var(--wine); background: var(--white); font-style: normal; font-size: 14px; line-height: 1.45; }
.operator-card a { width: fit-content; color: var(--wine); }
.legal-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.legal-grid article { padding: 30px 28px; border: 1px solid #ded7ca; background: var(--white); }
.legal-grid h3 { margin: 0 0 18px; font-family: var(--serif); font-size: 26px; font-weight: 550; }
.legal-grid p { margin: 0 0 15px; color: #465149; font-size: 14px; line-height: 1.65; }
.legal-grid p:last-child { margin-bottom: 0; }
footer { display: flex; justify-content: space-between; gap: 20px; padding: 32px clamp(20px, 5vw, 72px); color: var(--muted); font-size: 12px; }
[hidden] { display: none !important; }
@media (max-width: 850px) {
  .intro, .workspace { grid-template-columns: 1fr; }
  .intro-copy, .configurator { border-right: 0; border-bottom: 1px solid var(--rule); }
  .intro { min-height: auto; }
  .intro-copy { padding-top: 72px; padding-bottom: 64px; }
  .intro-specimen { padding: 58px 20px 72px; }
  .configurator { padding: 42px 24px; }
  .preview-stage { order: -1; padding: 24px 12px 50px; }
  .guide-grid { grid-template-columns: 1fr; }
  .guide-grid article { min-height: 0; }
  .legal-grid { grid-template-columns: 1fr; }
  .book-cover, .book-page { padding-left: clamp(28px, 10vw, 66px); padding-right: clamp(28px, 10vw, 66px); }
  footer { flex-direction: column; }
}
@media (max-width: 520px) {
  .site-header { flex-direction: column; align-items: stretch; gap: 14px; padding-top: 18px; padding-bottom: 18px; }
  .header-tools { width: 100%; min-width: 0; }
  .header-note { display: none; }
  .language-picker { width: 100%; min-width: 0; justify-content: space-between; }
  .language-picker select { min-width: 0; max-width: 70%; }
  h1 { font-size: 52px; }
  .book-cover { min-height: 540px; }
  .book-page { min-height: 620px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print {
  @page { size: A5; margin: 0; }
  body { background: white; }
  .site-header, .intro, .export-guide, .legal, .configurator, .stage-label, footer, .hide-message { display: none !important; }
  .workspace, .preview-stage { display: block !important; padding: 0; background: white; }
  .book-preview { width: 148mm; margin: 0; box-shadow: none; }
  .book-cover, .book-page { min-height: 210mm; break-after: page; }
}
