:root {
  --ink: #28231f;
  --muted: #6d655d;
  --paper: #f7f2e9;
  --card: #fffdfa;
  --line: #d9cfc1;
  --wine: #742538;
  --wine-dark: #531625;
  --gold: #b28a46;
  --success: #236344;
  --danger: #9b2c2c;
  --warning: #8a5a08;
  --radius: 12px;
  --shadow: 0 18px 45px rgb(56 41 29 / 9%);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}
a { color: var(--wine); text-underline-offset: 3px; }
a:hover { color: var(--wine-dark); }
button, input, select { font: inherit; }
.shell { width: min(1160px, calc(100% - 40px)); margin-inline: auto; }
.narrow { width: min(760px, calc(100% - 40px)); }
.skip-link { position: fixed; left: 12px; top: -60px; z-index: 100; background: #fff; padding: 10px 14px; }
.skip-link:focus { top: 12px; }

.site-header { background: #fffdfa; border-bottom: 1px solid var(--line); }
.header-inner { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; flex-direction: column; color: var(--ink); text-decoration: none; font-family: Georgia, serif; font-size: 20px; line-height: 1.1; }
.brand-kicker { color: var(--wine); font-family: Arial, sans-serif; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 7px; }
.withdraw-link { border: 1px solid var(--wine); border-radius: 999px; padding: 9px 15px; font-weight: 700; text-decoration: none; }

.hero { color: #fff; background: linear-gradient(125deg, #341821 0%, #742538 58%, #8f4652 100%); padding: 72px 0; position: relative; overflow: hidden; }
.hero::after { content: "1850"; position: absolute; right: -20px; bottom: -95px; font-family: Georgia, serif; font-size: 220px; color: rgb(255 255 255 / 5%); pointer-events: none; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 70px; align-items: center; }
.eyebrow { margin: 0 0 10px; color: var(--wine); font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.hero .eyebrow { color: #e5cda5; }
h1, h2, h3 { font-family: Georgia, 'Times New Roman', serif; line-height: 1.16; }
h1 { margin: 0 0 22px; font-size: clamp(40px, 7vw, 78px); font-weight: 500; letter-spacing: -.035em; }
h1 span { color: #eed7ae; }
h2 { font-size: clamp(28px, 4vw, 40px); margin: 0 0 16px; }
h3 { font-size: 22px; }
.lead { max-width: 760px; font-size: 20px; line-height: 1.55; }
.book-meta { display: flex; flex-wrap: wrap; gap: 10px 24px; font-size: 14px; color: #f2e6e0; }
.price-card { position: relative; z-index: 1; background: #fffdfa; color: var(--ink); border-radius: var(--radius); padding: 30px; box-shadow: 0 24px 70px rgb(25 5 10 / 28%); }
.price-card p { margin-top: 0; color: var(--muted); }
.price-card > strong { display: block; color: var(--wine); font-family: Georgia, serif; font-size: 56px; line-height: 1; }
.price-card > span { display: block; margin: 8px 0 18px; color: var(--muted); text-decoration: line-through; }
.price-card > small { display: block; border-top: 1px solid var(--line); padding-top: 18px; }
.availability-meter { display: grid; grid-template-columns: auto 1fr; align-items: baseline; column-gap: 9px; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.availability-meter strong { color: var(--success); font-family: Georgia, serif; font-size: 34px; line-height: 1; }
.availability-meter span { color: var(--ink); font-size: 14px; font-weight: 800; text-decoration: none; }
.stock-alert { padding: 13px 0; color: #fff; font-weight: 800; text-align: center; }
.stock-alert-low { background: #9b5d09; }
.stock-alert-sold-out { background: var(--danger); }
.global-form-error { padding: 18px 0; scroll-margin-top: 16px; color: #fff; background: #8f1f27; box-shadow: inset 0 -1px rgb(0 0 0 / 18%); }
.global-form-error:focus { outline: 4px solid #f3c66d; outline-offset: -4px; }
.global-form-error strong { display: block; font-size: 18px; }
.global-form-error ul { margin: 8px 0 0; padding-left: 22px; }
.global-form-error li + li { margin-top: 4px; }

.content-section, .page-section { padding-block: 64px 88px; }
.intro-copy { max-width: 780px; margin-bottom: 30px; }
.order-form { display: grid; gap: 28px; }
.order-form fieldset { margin: 0; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: 0 8px 28px rgb(51 38 28 / 4%); }
.order-form legend { padding: 0 10px; color: var(--wine); font-family: Georgia, serif; font-size: 24px; font-weight: 700; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.address-grid { grid-template-columns: minmax(0, 3fr) minmax(130px, 1fr); }
.address-grid .zip-field { grid-column: span 1; }
.field { display: flex; flex-direction: column; gap: 7px; font-weight: 700; }
.field input, .field select { width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid #aa9f91; border-radius: 7px; color: var(--ink); background: #fff; }
.field input:focus, .field select:focus { outline: 3px solid rgb(116 37 56 / 18%); border-color: var(--wine); }
.field input[aria-invalid="true"], .field select[aria-invalid="true"] { border-color: var(--danger); }
.span-2 { grid-column: span 2; }
.optional, .field-hint { color: var(--muted); font-size: 13px; font-weight: 400; }
.field-error { color: var(--danger); font-size: 13px; font-weight: 700; }
.block-error { margin-top: -22px; }
.quantity-row { display: grid; grid-template-columns: minmax(180px, 260px) 1fr; gap: 28px; align-items: start; }
.quantity-field input { font-size: 22px; }
.order-summary { background: #f1e9de; border-radius: 9px; padding: 18px 20px; }
.order-summary div { display: flex; justify-content: space-between; gap: 20px; padding: 7px 0; }
.order-summary .summary-total { margin-top: 8px; padding-top: 14px; border-top: 1px solid #cbbca8; font-size: 20px; }
.order-summary p { margin: 9px 0 0; color: var(--success); font-size: 13px; font-weight: 700; }
.precontract { background: #fff; border-left: 5px solid var(--gold); padding: 18px 22px; }
.precontract h3, .precontract p { margin: 0; }
.precontract h3 { margin-bottom: 8px; }
.check-row { display: grid; grid-template-columns: 22px 1fr; align-items: start; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 9px; padding: 18px; }
.check-row input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--wine); }
.check-row.has-error { border-color: var(--danger); }
.submit-panel { padding: 24px; border-radius: var(--radius); color: #fff; background: #342a25; }
.submit-panel p { margin: 0 0 20px; color: #ece3d9; }
.turnstile-panel { min-height: 1px; margin: 0 0 20px; }
.final-summary { display: grid; gap: 6px; margin-bottom: 20px; padding: 16px; border: 1px solid rgb(255 255 255 / 28%); border-radius: 7px; background: rgb(255 255 255 / 7%); }
.final-summary > strong { font-family: Georgia, serif; font-size: 20px; }
.final-summary span { color: #f7eee5; }
.primary-button, .secondary-button, .danger-button, .text-button { display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 7px; cursor: pointer; font-weight: 800; text-decoration: none; }
.primary-button { min-height: 50px; padding: 12px 22px; background: var(--wine); color: #fff; }
.primary-button:hover { background: var(--wine-dark); color: #fff; }
.primary-button.compact { min-height: 42px; font-size: 14px; }
.secondary-button { padding: 10px 16px; border: 1px solid var(--wine); background: transparent; color: var(--wine); }
.text-button { padding: 4px 0; background: transparent; color: var(--wine); text-align: left; }
.danger-button { padding: 7px 10px; background: #f8e5e5; color: var(--danger); font-size: 12px; }
.honeypot { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.notice { margin-block: 18px; padding: 15px 18px; border: 1px solid #b6a996; border-left-width: 5px; border-radius: 7px; background: #fff; }
.notice-error { border-color: #d8a3a3; border-left-color: var(--danger); background: #fff5f5; }
.notice-success { border-color: #a7c9b8; border-left-color: var(--success); background: #f1fbf5; }
.notice-warning { border-color: #dec48e; border-left-color: var(--warning); background: #fff9ec; }
.confirmation-page h1, .legal-page h1, .admin-section h1 { color: var(--ink); font-size: clamp(38px, 6vw, 58px); }
.confirmation-page .lead { font-size: 19px; }
.success-mark { display: grid; place-items: center; width: 62px; height: 62px; margin-bottom: 20px; border-radius: 50%; background: var(--success); color: #fff; font-size: 34px; }
.confirmation-details { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 30px 0; }
.confirmation-details div { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 15px; }
.confirmation-details dt { color: var(--muted); font-size: 13px; }
.confirmation-details dd { margin: 4px 0 0; font-weight: 800; }
.share-panel { margin: 34px 0; padding: 24px 26px; border-left: 5px solid var(--gold); border-radius: 7px; background: var(--card); }
.share-panel h2 { margin: 0 0 10px; font-size: 24px; }
.share-panel p { margin: 0 0 16px; }
.share-links { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 0 !important; }

.compact-form { margin-top: 28px; }
.compact-form fieldset { display: grid; gap: 18px; }
.legal-page { max-width: 860px; }
.legal-page h2 { margin-top: 36px; font-size: 26px; }
.legal-page h1 + h2 { margin-top: 20px; }
.legal-box { margin-top: 16px; padding: 22px; border: 1px solid var(--line); background: #fff; }

.admin-section { padding-block: 42px 80px; }
.admin-heading, .admin-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.admin-heading h1 { margin-bottom: 0; }
.admin-actions { display: flex; align-items: center; gap: 16px; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 34px 0; }
.stats-grid article { padding: 20px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.stats-grid span { display: block; color: var(--muted); font-size: 14px; }
.stats-grid strong { display: block; margin-top: 8px; color: var(--wine); font-family: Georgia, serif; font-size: 34px; }
.admin-toolbar { margin: 24px 0 14px; }
.admin-toolbar h2, .admin-toolbar p { margin: 0; }
.admin-toolbar h2 { font-size: 28px; }
.admin-toolbar p { color: var(--muted); font-size: 14px; }
.second-toolbar { margin-top: 44px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 9px; background: #fff; box-shadow: var(--shadow); }
table { width: 100%; min-width: 1040px; border-collapse: collapse; font-size: 14px; }
th, td { padding: 14px; border-bottom: 1px solid #ebe4db; text-align: left; vertical-align: top; }
th { background: #eee6dc; color: #584d44; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
td span, td small { color: var(--muted); }
.row-muted { opacity: .68; background: #f5f3f0; }
.status { display: inline-block; border-radius: 999px; padding: 3px 8px; font-size: 12px; font-weight: 800; }
.status-active { background: #dff3e7; color: var(--success); }
.status-withdrawn { background: #f4dddd; color: var(--danger); }
.action-cell form { margin-bottom: 7px; }
.empty-cell { padding: 36px; text-align: center; color: var(--muted); }
.admin-login { margin-top: 40px; padding: 32px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.admin-login h1 { font-size: 45px; }
.login-form { display: grid; gap: 18px; margin-top: 24px; }
.import-panel { margin-top: 30px; }
.import-panel h2 { font-size: 30px; }
.import-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 24px; }
.import-actions form { margin: 0; }
.import-table { min-width: 820px; }

.site-footer { padding: 30px 0; border-top: 1px solid var(--line); background: #2d2521; color: #eee5dc; }
.footer-inner { display: flex; justify-content: space-between; gap: 30px; }
.footer-inner p { margin: 0; }
.footer-inner nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px 18px; }
.footer-inner a { color: #fff; }

@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .price-card { max-width: 380px; }
  .field-grid, .address-grid, .quantity-row { grid-template-columns: 1fr; }
  .span-2, .address-grid .zip-field { grid-column: span 1; }
  .confirmation-details, .stats-grid { grid-template-columns: 1fr; }
  .admin-heading, .admin-toolbar, .footer-inner { align-items: flex-start; flex-direction: column; }
  .footer-inner nav { justify-content: flex-start; }
}

@media (max-width: 560px) {
  .shell, .narrow { width: min(100% - 24px, 1160px); }
  .header-inner { min-height: 92px; align-items: flex-start; flex-direction: column; justify-content: center; gap: 10px; }
  .withdraw-link { padding: 6px 11px; font-size: 13px; }
  .hero { padding: 48px 0; }
  .hero::after { display: none; }
  .content-section, .page-section { padding-block: 42px 60px; }
  .order-form fieldset { padding: 20px 16px; }
  .order-summary div { flex-direction: column; gap: 0; }
  .primary-button { width: 100%; }
  .admin-actions { width: 100%; flex-wrap: wrap; }
}

@media print {
  .site-header, .site-footer, .primary-button, .secondary-button, .withdraw-link { display: none !important; }
  body { background: #fff; }
  .page-section { padding: 0; }
}

.book-promo {
    display: grid;
    grid-template-columns: 210px minmax(250px, 360px);
    align-items: end;
    gap: 18px 28px;
    margin-top: 30px;
}

/* Cover und Textlink führen beide zur Presseseite. */
.cover-link {
    display: block;
    grid-row: 1 / span 2;
    align-self: end;
    border-radius: 6px;
}

.cover-link .book-cover-thumb {
    display: block;
    transition: transform .15s, box-shadow .15s;
}

.cover-link:hover .book-cover-thumb {
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgb(20 10 5 / 38%);
}

.press-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    align-self: end;
    padding: 15px 22px;
    border-radius: 10px;
    background: #eed7ae;
    color: #531625;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 21px;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 12px 28px rgb(20 10 5 / 25%);
    transition: background .15s, transform .15s;
}

.press-link:hover {
    background: #fffdfa;
    color: var(--wine-dark);
    transform: translateY(-2px);
}

.press-link span {
    transition: transform .15s;
}

.press-link:hover span {
    transform: translateX(3px);
}

.book-cover-thumb {
    width: 210px;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 12px 28px rgb(20 10 5 / 30%);
    flex-shrink: 0;
}

.partner-badge {
    display: grid;
    grid-template-columns: 132px 1fr;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border: 1px solid #dbc9ae;
    border-radius: 10px;
    background: #fffdfa;
    color: var(--ink);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    text-decoration: none;
    box-shadow: 0 12px 28px rgb(20 10 5 / 20%);
    transition: border-color .15s, transform .15s;
}

.partner-badge img {
    width: 132px;
    height: auto;
    display: block;
    border-radius: 5px;
}

.partner-badge small {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.partner-badge:hover {
    border-color: #eed7ae;
    color: var(--wine);
    transform: translateY(-2px);
}

/* --- Inhaltsverzeichnis-Seite --- */
.toc-intro {
    max-width: 780px;
}

.toc-chapters {
    display: grid;
    gap: 14px;
    margin-top: 30px;
}

.toc-chapters details {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--card);
    padding: 4px 22px;
    box-shadow: 0 8px 22px rgb(51 38 28 / 4%);
}

.toc-chapters summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    padding: 16px 0;
    font-family: Georgia, serif;
    font-size: 19px;
    font-weight: 700;
    color: var(--wine);
}

.toc-chapters summary::-webkit-details-marker { display: none; }

.toc-chapters summary::after {
    content: "+";
    color: var(--gold);
    font-size: 20px;
    font-weight: 800;
}

.toc-chapters details[open] summary::after { content: "\2212"; }

.toc-chapters summary .chapter-page {
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}

.toc-sublist {
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
    display: grid;
    gap: 3px;
}

.toc-sublist li {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 5px 0;
    border-bottom: 1px dashed #ece3d6;
    font-size: 14.5px;
}

.toc-sublist li .entry-num {
    color: var(--muted);
    font-variant-numeric: tabular-nums;
    min-width: 42px;
}

.toc-sublist li .entry-page {
    color: var(--muted);
    font-weight: 700;
    white-space: nowrap;
}

.toc-back-link {
    margin-top: 44px;
}

@media (max-width: 960px) {
    .hero-grid { grid-template-columns: 1fr; gap: 36px; }
    .price-card { max-width: 380px; }
}

@media (max-width: 820px) {
    .book-promo { grid-template-columns: 190px minmax(240px, 1fr); }
    .book-cover-thumb { width: 190px; }
}

@media (max-width: 560px) {
    .book-promo { grid-template-columns: 1fr; align-items: start; }
    .cover-link { grid-row: auto; }
    .press-link { font-size: 19px; }
    .book-cover-thumb { width: min(210px, 62vw); }
    .partner-badge { grid-template-columns: 108px 1fr; width: 100%; }
    .partner-badge img { width: 108px; }
}

.sort-bar { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin: 12px 0; }
.sort-bar [aria-current] { font-weight: bold; text-decoration: underline; }
.qty-input { width: 4.5em; }
.sum-row td { font-weight: 700; background: #f5efe6; border-top: 2px solid var(--line); }
