﻿@import url('./fonts/noto-sans-sc.css');
:root {
  font-family: "Noto Sans SC", sans-serif;
  color: #182044;
  background: #fff9f2;
  font-synthesis: none;
  --ink: #182044;
  --red: #e44c37;
  --line: #e7cdbc;
  --cream: #fffaf5;
}

* { box-sizing: border-box; }
body { margin: 0; background: radial-gradient(circle at 85% 2%, #ffefe0, transparent 38%), #fff9f2; }
button, input, select { font: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:focus:not(:focus-visible) { outline: none; }
[hidden] { display: none !important; }
.shell { width: min(100%, 1180px); margin: auto; padding: 28px 20px 48px; }
.top-tabs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin: 0 14px 24px; }
.top-tabs button {
  height: 58px;
  border: 1px solid #e8baa3;
  border-radius: 32px;
  background: #fff9f2e6;
  color: var(--ink);
  font: 500 clamp(16px, 2vw, 25px) "Noto Sans SC", sans-serif;
  box-shadow: inset 0 0 0 1px #ffffffa1;
}
.top-tabs button.active { background: linear-gradient(125deg, #ed6b45, #db4936); color: #fff; border-color: #e45a3b; box-shadow: 0 9px 16px #e06b4930; }
main { min-width: 0; }

.hero-card {
  display: flex;
  align-items: center;
  min-height: 162px;
  gap: 30px;
  padding: 18px 26px;
  border-radius: 24px;
  border: 1px solid #ef895c;
  background: linear-gradient(135deg, #c83e32 0%, #e7563c 55%, #ef7e4f 100%);
  box-shadow: 0 12px 22px #b84d2b24, inset 0 1px #ffffff88;
  color: #fff8e8;
  overflow: hidden;
  position: relative;
}
.hero-card::after { content: ""; position: absolute; right: -40px; bottom: -65px; width: 340px; height: 140px; border: 3px solid #ffc39e55; border-radius: 50%; transform: rotate(-9deg); box-shadow: 0 -14px 0 -11px #ffcfaa77, 0 -26px 0 -22px #ffcfaa88; }
.hero-copy { flex: 1; min-width: 0; z-index: 1; }
.hero-copy h2 { font: 500 clamp(25px, 3vw, 38px) "Noto Sans SC", sans-serif; margin: 0 0 10px; }
.hero-copy p { margin: 5px 0; font-size: clamp(14px, 2vw, 22px); letter-spacing: .025em; }
.hero-actions { display: flex; align-self: flex-start; gap: 10px; z-index: 1; }
.hero-actions button { width: 46px; height: 46px; border: none; border-radius: 50%; background: #fff4dd; color: #de5a3b; font-size: 24px; }

.pillar-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 26px 4px 22px; }
.pillar-card { position: relative; min-width: 0; min-height: 410px; padding-bottom: 34px; border: 1px solid #e0c5b6; border-radius: 21px; overflow: hidden; background: linear-gradient(#f9ece2 0 49px, #fffdfa 50px); box-shadow: inset 0 0 0 2px #fff9f1, 0 5px 10px #aa7e5b12; }
.pillar-card::after { content: ""; position: absolute; left: 5%; right: 5%; bottom: 0; height: 30px; border-radius: 50% 50% 0 0; opacity: .35; pointer-events: none; background: repeating-radial-gradient(ellipse at 50% 100%, transparent 0 12px, currentColor 13px 14px, transparent 15px 22px); }
.pillar-card.wood::after { color: #69b288; }
.pillar-card.fire::after { color: #e8a065; }
.pillar-card.water::after { color: #58c9c5; }
.pillar-card.earth::after { color: #e1aa63; }
.pillar-card.metal::after { color: #8a969c; }
.pillar-card h3 { margin: 0; height: 50px; display: grid; place-items: center; font: 500 25px "Noto Sans SC", sans-serif; }
.pillar-big { display: grid; grid-template-columns: 1fr auto; align-items: center; margin: 14px 15px 5px; gap: 3px; }
.pillar-big strong { font: 500 clamp(42px, 5.5vw, 63px) "Noto Sans SC", sans-serif; line-height: 1.02; text-align: center; }
.element-icon { font: 500 32px "Noto Sans SC", sans-serif; line-height: 1; opacity: .9; }
.pillar-line { display: flex; align-items: flex-start; gap: 13px; margin: 12px 17px; font-size: clamp(13px, 1.7vw, 19px); }
.pillar-big + .pillar-line { border-top: 1px solid #ead9cd; padding-top: 15px; }
.pillar-tag { flex: none; padding: 1px 10px; border-radius: 10px; background: #f6e9db; color: #433b37; font-size: .8em; }
.pillar-line.hidden-stems { margin-bottom: 0; }
.pillar-values { display: flex; flex-wrap: wrap; gap: 3px 7px; min-width: 0; line-height: 1.5; }
.stem-wood, .wood .element-icon { color: #328b37; }
.stem-fire, .fire .element-icon { color: #e04431; }
.stem-earth, .earth .element-icon { color: #b37a17; }
.stem-metal, .metal .element-icon { color: #737b82; }
.stem-water, .water .element-icon { color: #00a1a6; }

.data-card, .panel { background: #fffdf9e8; border: 1px solid #ead2c2; border-radius: 21px; box-shadow: 0 5px 14px #a5815b12; }
.data-card { margin: 20px 0; padding: 18px 18px 20px; }
.section-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 16px; }
.section-heading h2 { margin: 0; font: 500 26px "Noto Sans SC", sans-serif; white-space: nowrap; }
.section-heading h2::before { content: ""; display: inline-block; width: 7px; height: 27px; border-radius: 4px; margin-right: 13px; vertical-align: -4px; background: linear-gradient(#f1794e, #d93d32); }
.section-heading span { font-size: 15px; text-align: right; }
.chart-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; min-width: 620px; }
th { padding: 10px 8px; background: #f5eee8; color: #8f7667; font-weight: 500; white-space: nowrap; }
#professional-table { min-width: 860px; }
#professional-table td { font-size: 15px; vertical-align: top; }
#professional-table tr:nth-child(10) td { min-width: 115px; line-height: 1.7; }
td { border-bottom: 1px solid #dfd1c6; padding: 11px 8px; text-align: center; font-size: 18px; }
tr:last-child td { border: none; }
td:first-child { width: 90px; padding: 3px 8px; border: none; text-align: left; }
td:first-child span { display: inline-block; background: #f3e5e0; border-radius: 9px; padding: 3px 12px; font-size: 18px; white-space: nowrap; }
.strength-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.strength-card .section-heading { margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 13px; justify-content: flex-end; }
.chip { padding: 8px 17px; border-radius: 24px; font-size: 19px; font-weight: 500; white-space: nowrap; }
.chip.wood { color: #43833a; background: #e6f0d4; }
.chip.fire { color: #d84833; background: #ffe0d7; }
.chip.earth { color: #a56d17; background: #fff0d2; }
.chip.metal { color: #687078; background: #eff0eb; }
.chip.water { color: #0c9199; background: #d9f3f1; }
.four-columns { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.shensha-section { overflow-x: auto; }
.column { min-height: 125px; padding: 12px 14px; border: 1px solid #eed4b8; border-radius: 17px; background: linear-gradient(135deg, #fff5e6, #fffbf5); font-size: 15px; line-height: 1.8; }
.column:nth-child(2) { border-color: #d7dfc6; background: linear-gradient(135deg, #f3f7e8, #fffdf7); }
.column:nth-child(3) { border-color: #efd0c8; background: linear-gradient(135deg, #fff0ea, #fffaf7); }
.column:nth-child(4) { border-color: #cfdfe2; background: linear-gradient(135deg, #eaf6f7, #fffdf9); }
.column strong { display: block; margin-bottom: 6px; color: #a76d12; font: 500 22px "Noto Sans SC", sans-serif; }
.column:nth-child(2) strong { color: #5c7d32; }
.column:nth-child(3) strong { color: #b34c30; }
.column:nth-child(4) strong { color: #247c91; }
.shensha-token { display: inline-block; margin: 3px 5px 3px 0; padding: 4px 8px; border: 1px solid #e8d2bd; border-radius: 9px; background: #fffaf1; color: #825a32; font-size: 13px; line-height: 1.3; text-align: left; }
.shensha-token:hover, .shensha-token:focus-visible { border-color: #dc734d; color: #a33f2e; }
.shensha-dialog { max-width: min(90vw, 560px); border: 1px solid #e4bfa7; border-radius: 18px; padding: 24px; color: var(--ink); background: #fffaf4; box-shadow: 0 18px 44px #392c3060; }
.shensha-dialog::backdrop { background: #2a292b75; }
.shensha-dialog h2 { margin-top: 0; }
.shensha-dialog button:last-child { padding: 8px 18px; border: 0; border-radius: 9px; background: var(--red); color: white; }
.luck { display: flex; gap: 9px; overflow-x: auto; padding-bottom: 6px; }
.luck-period { min-width: 125px; flex: 1 0 125px; padding: 13px 7px; border: 1px solid #e8d1c0; border-radius: 17px; text-align: center; background: linear-gradient(#fff9f1, #fffaf6); }
.luck-title { display: flex; align-items: center; justify-content: center; gap: 4px; }
.luck-select { border: 0; padding: 0; background: none; color: #1d8c47; font: 500 28px "Noto Sans SC", sans-serif; }
.luck-period:nth-child(4n+1) .luck-select { color: #ad6f0f; }
.luck-period:nth-child(4n) .luck-select { color: #16989d; }
.luck-period span { display: block; margin-top: 7px; font-size: 14px; }
.luck-period .luck-god { margin-top: 0; color: #a64732; font-size: 12px; font-weight: 500; white-space: nowrap; }
.flow-years { margin-top: 12px; border-top: 1px solid #ecd8c9; padding-top: 8px; }
.flow-years summary { cursor: pointer; color: #a65c40; font-size: 13px; }
.flow-year-select { display: flex; justify-content: space-between; gap: 4px; width: 100%; margin-top: 5px; padding: 6px 3px; border: 0; border-bottom: 1px solid #efdfd2; background: none; color: #5e544e; font-size: 12px; text-align: left; }
.flow-year-select span { margin-top: 0; }
.luck-period .flow-year-god { margin: 0; color: #a64732; font-size: 12px; font-weight: 500; white-space: nowrap; }
.flow-year-select:hover, .flow-year-select:focus-visible { color: #a33f2e; }
.detail-panel .data-card { margin-top: 0; }
.relation-diagram { overflow-x: auto; }
.relation-diagram svg { display: block; min-width: 660px; width: 100%; height: auto; border-radius: 12px; background: #fff6eb; }
.relations { display: grid; gap: 8px; }
.relation-group { padding: 10px; border-radius: 10px; background: #fff8ef; font-size: 15px; }
.relation-group strong { color: #b85637; }
.note { line-height: 1.7; }

.panel { max-width: 760px; margin: 12px auto; padding: 26px; }
.basic-summary { margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid #ead2c2; }
.basic-summary h2 { margin: 0 0 15px; font: 500 27px "Noto Sans SC", sans-serif; }
.basic-summary h3 { margin: 20px 0 10px; color: #b14a33; }
.wuxing-figure { margin: 0 auto 24px; max-width: 470px; text-align: center; }
.wuxing-figure img { display: block; width: 100%; height: auto; border-radius: 14px; border: 1px solid #e7cdbc; }
.wuxing-figure figcaption { margin-top: 8px; color: #876c59; font-size: 13px; }
.basic-flow { margin-bottom: 24px; padding-bottom: 22px; border-bottom: 1px solid #ead2c2; }
.basic-flow h2 { font: 500 27px "Noto Sans SC", sans-serif; }
.basic-flow label { max-width: 340px; }
.flow-info-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.info-grid, .count-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.info-grid .info-item:nth-child(-n+2) { grid-column: 1 / -1; }
.info-item { display: flex; flex-direction: column; gap: 5px; min-width: 0; padding: 10px; border: 1px solid #edddce; border-radius: 10px; background: #fffaf4; }
.info-item span { color: #987b69; font-size: 13px; }
.info-item strong { font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
.count-grid { grid-template-columns: 1fr; }
.count-row { display: grid; grid-template-columns: 24px 1fr auto; align-items: center; gap: 10px; padding: 3px 0; font-size: 13px; }
.count-track { height: 12px; border-radius: 10px; background: #eee9e3; overflow: hidden; }
.count-fill { display: block; height: 100%; border-radius: inherit; }
.count-fill.wood { background: #4aab53; }
.count-fill.fire { background: #e15139; }
.count-fill.earth { background: #b88d19; }
.count-fill.metal { background: #e5a136; }
.count-fill.water { background: #4c8ff0; }
.detail-controls { display: flex; gap: 16px; margin-bottom: 15px; }
.detail-controls label { flex: 1; }
.transit-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.transit-card { padding: 15px; border: 1px solid #ead2c2; border-radius: 13px; background: #fff9f2; }
.transit-card h3 { margin: 0 0 10px; color: #b14a33; }
.transit-card .info-item { margin-top: 8px; }
.shensha-list { display: grid; gap: 4px; max-height: 430px; overflow-y: auto; }
.shensha-row { display: grid; grid-template-columns: 115px 1fr; gap: 10px; padding: 8px 10px; border-bottom: 1px solid #eee1d4; line-height: 1.6; }
.shensha-row strong { color: #65554c; }
.shensha-row span { color: #b38b53; }
.shensha-items { display: block; }
.transit-shensha { margin-top: 8px; line-height: 1.7; }
.transit-shensha strong { display: block; color: #987b69; font-size: 13px; }
form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
label { display: flex; flex-direction: column; gap: 7px; color: #62544e; font-size: 15px; }
label:first-child, label:nth-child(10), .form-actions { grid-column: 1 / -1; }
input, select { width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid #e3c8b5; border-radius: 9px; background: #fffbf7; color: var(--ink); }
input:focus, select:focus { outline: 2px solid #e9a186; }
.check { flex-direction: row; align-items: center; }
.check input { width: 20px; min-height: auto; accent-color: #e45139; }
.form-actions { display: flex; gap: 10px; }
.form-actions button { border-radius: 10px; padding: 11px 20px; font-weight: 500; }
button[type="submit"] { border: 0; background: #e45139; color: #fff; }
.secondary { border: 1px solid #e0a28a; background: #fffaf5; color: #bc593d; }
#error { color: #ba3425; }
#notice { margin: 0 0 14px; padding: 10px 14px; border: 1px solid #dc9a82; border-radius: 9px; background: #fff1e9; color: #a63828; }
.record { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid #ead6ca; }
.record button { border: 0; background: none; color: #ae593d; text-align: left; }
.record button:first-child { flex: 1; }
.muted { color: #8b8079; }
.membership-plans { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin-top: 14px; }
.membership-plans div { padding: 16px; border: 1px solid #eab69b; border-radius: 13px; background: #fff4e9; }
.membership-plans strong { display: block; color: #bb4931; font-size: 23px; }
.membership-plans span { display: block; margin-top: 5px; color: #735c52; }
.ai-report-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 15px; }
.ai-report-actions button { padding: 10px 15px; border-radius: 10px; }
.sample-report-dialog { box-sizing: border-box; width: min(780px, calc(100% - 28px)); max-width: none; max-height: 88dvh; overflow: auto; }
.sample-report-dialog section { margin: 26px 0; }
.sample-report-dialog p { line-height: 1.8; overflow-wrap: anywhere; }
.sample-report-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.sample-report-heading button { flex-shrink: 0; }
.ai-preview-result { margin-top: 12px; }
.ai-report-open { display: inline-block; margin: 0 0 12px; color: #a94832; font-weight: 500; }
.ai-report-frame { display: block; width: 100%; height: min(72vh, 780px); border: 1px solid #ead7c6; border-radius: 14px; background: #fffaf4; }
.admin-shell { max-width: 720px; }
.traffic-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(155px,1fr)); gap:10px; margin:16px 0; }
.traffic-card { display:grid; gap:5px; padding:14px; border:1px solid #e7cdbc; border-radius:14px; background:#fffaf4; }
.traffic-card span { font-size:13px; color:#775d51; }
.traffic-card strong { font-size:clamp(25px,4vw,34px); line-height:1.2; color:#b43e28; font-variant-numeric:tabular-nums; }
.traffic-card small { color:#7d7773; }
.admin-form { display: grid; gap: 12px; }
.admin-form label { display: grid; gap: 6px; }
.admin-form input, .admin-form select { width: 100%; padding: 10px; border: 1px solid #e7cdbc; border-radius: 8px; background: #fff; }
.book-layout { display: grid; grid-template-columns: minmax(240px,310px) minmax(0,1fr); align-items: start; gap: 14px; }
.book-layout .data-card { margin-top: 0; }
.book-list { display: grid; gap: 7px; max-height: 690px; overflow-y: auto; }
.book-option { width: 100%; padding: 10px 12px; border: 1px solid #ead7c6; border-radius: 10px; background: #fffaf4; text-align: left; }
.book-option.active { border-color: #db6d4e; background: #fff0e5; }
.book-option strong, .book-option small { display: block; }
.book-option small { margin-top: 3px; color: #8a7468; }
.book-result { margin: 13px 0; padding: 15px; border: 1px solid #edd7c8; border-radius: 13px; background: #fffaf4; }
.book-result h3 { margin: 0 0 8px; color: #a94832; }
.book-result blockquote { margin: 12px 0; padding-left: 12px; border-left: 3px solid #dd8d68; line-height: 1.8; }
.book-result .match-terms { color: #80604e; font-size: 14px; }
.book-full summary { cursor: pointer; color: #ad5138; }
.book-full p { white-space: pre-wrap; line-height: 1.8; }
.book-reader { margin-top: 26px; border-top: 1px solid #ead7c6; padding-top: 10px; }
.book-reader h3 { color: #a94832; }
.book-reader-item { padding: 10px 0; border-bottom: 1px solid #ecded2; }
.book-reader-item summary { cursor: pointer; color: #554741; }
.book-reader-item p { white-space: pre-wrap; line-height: 1.8; }
.book-reader-modes { display:flex; flex-wrap:wrap; gap:8px; margin:12px 0; }
.book-reader-modes [aria-pressed="true"] { border-color:#bd583b; color:#963b27; opacity:1; }
.book-reader-item { scroll-margin-top:18px; }
.book-reader-pages { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 16px; }
.book-reader-pages button { padding: 7px 12px; border: 1px solid #ead7c6; border-radius: 8px; background: #fffaf4; }
.book-reader-pages button:disabled { opacity: .45; }
.book-reference { margin: 8px 0 15px; padding: 10px; border: 1px solid #ead7c6; border-radius: 9px; background: #fff; }
.book-reference p { margin-bottom: 0; line-height: 1.7; }

@media (max-width: 760px) {
  .shell { padding: 14px 10px 32px; }
  .top-tabs { gap: 7px; margin: 0 0 15px; }
  .top-tabs button { height: 43px; font-size: 14px; }
  .hero-card { min-height: 130px; padding: 15px; gap: 12px; border-radius: 18px; }
  .hero-copy h2 { font-size: 21px; }
  .hero-copy p { font-size: 12px; }
  .hero-actions { flex-direction: column; }
  .hero-actions button { width: 30px; height: 30px; font-size: 16px; }
  .pillar-cards { gap: 10px; margin: 16px 0; }
  .pillar-card { min-height: 400px; }
  .pillar-card h3 { font-size: 21px; }
  .pillar-big strong { font-size: 47px; }
  .pillar-line { font-size: 14px; }
  .data-card { margin: 13px 0; padding: 13px; }
  .section-heading h2 { font-size: 20px; }
  .section-heading span { font-size: 11px; }
  .strength-card { display: block; }
  .strength-card .section-heading { margin-bottom: 11px; }
  .chips { justify-content: flex-start; gap: 7px; }
  .chip { padding: 5px 9px; font-size: 14px; }
  .four-columns { grid-template-columns: repeat(4, minmax(170px, 1fr)); gap: 10px; }
  .column { font-size: 12px; padding: 8px; }
  .column strong { font-size: 17px; }
  .panel { padding: 17px; }
  .info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .transit-grid { grid-template-columns: 1fr; }
  .book-layout { grid-template-columns: 1fr; }
  .book-list { grid-template-columns: repeat(2,minmax(0,1fr)); max-height: 360px; }
  .membership-plans { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .top-tabs { gap: 3px; }
  .top-tabs button { height: 41px; padding: 0 2px; font-size: 11px; }
  .pillar-cards { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 4px; overflow: visible; }
  .pillar-card { min-height: 295px; padding-bottom: 15px; border-radius: 11px; }
  .pillar-card::after { height: 15px; }
  .pillar-card h3 { height: 37px; font-size: 14px; }
  .pillar-big { margin: 7px 3px 4px; gap: 0; }
  .pillar-big strong { font-size: clamp(27px,7.2vw,38px); }
  .element-icon { font-size: 15px; }
  .pillar-line { display: block; margin: 7px 4px; font-size: 10px; line-height: 1.35; }
  .pillar-big + .pillar-line { padding-top: 7px; }
  .pillar-tag { display: inline-block; margin-right: 4px; padding: 0 3px; font-size: 10px; }
  .pillar-values { display: flex; flex-wrap: wrap; gap: 2px 4px; margin-top: 3px; }
  .flow-info-grid { grid-template-columns: 1fr; }
  .book-list { grid-template-columns: 1fr; }
}

@media print {
  body { background: #fff; }
  .shell { width: 100%; }
  .top-tabs, .hero-actions, .records-panel, .detail-panel, .input-panel form, .input-panel .section-heading { display: none !important; }
  .input-panel { display: block !important; max-width: none; border: 0; box-shadow: none; }
  .result-panel { display: block !important; }
  .pillar-cards, .luck { overflow: visible; }
}
.membership-plans { grid-template-columns: repeat(4,minmax(0,1fr)); }
.membership-plans button { text-align:left; padding:16px; border:1px solid #eab69b; border-radius:13px; background:#fff4e9; cursor:pointer; font:inherit; }
.membership-plans button:hover { background:#ffe9d7; border-color:#db6d4e; }
#purchase-qr { display:block; max-width:100%; margin:18px auto; }
#purchase-qr[hidden] { display:none; }
.book-list { grid-template-columns:1fr; gap:14px; padding:8px; }
.book-option { position:relative; min-height:205px; padding:22px 15px 18px 24px; border:1px solid #af875b; border-left:9px solid #574b3c; border-radius:3px 10px 10px 3px; background:linear-gradient(105deg,#d9c2a0,#fcf0d3 18%,#ead6af); box-shadow:3px 5px 0 #d4c1a3,5px 7px 10px #6d594529; color:#393b37; }
.book-option:before { content:''; position:absolute; inset:10px 8px 10px 9px; border:1px solid #bda077; pointer-events:none; }
.book-option strong { position:relative; writing-mode:vertical-rl; min-height:112px; max-height:190px; font-size:18px; line-height:1.5; letter-spacing:2px; padding:7px; border:1px solid #c8b084; background:#fff8e1; }
.book-option small { position:relative; font-size:10px; margin-top:12px; color:#655a47; }
.book-option.active { background:linear-gradient(105deg,#b88561,#fff0cf 18%,#e6c797); outline:2px solid #c66b46; outline-offset:3px; }
.book-seal { position:absolute; right:15px; top:28px; width:23px; font-size:12px; line-height:1.3; color:#a53f30; border:1px solid #a53f30; padding:3px; }
.book-result { position:relative; }
.book-full-link { margin:8px 0; padding:7px 14px; border:1px solid #e4b99a; border-radius:8px; background:#fff3e6; color:#a2442d; float:right; }
.book-translation { margin:12px 0; border-top:1px dashed #dec6ac; padding-top:8px; }
.book-translation summary { cursor:pointer; color:#a2442d; }
.book-translation p { white-space:pre-wrap; line-height:1.9; }
#shensha-brief { line-height:1.9; padding:14px; background:#fff0df; border-radius:10px; }
.admin-order { padding:15px; border:1px solid #e7cdbc; border-radius:12px; margin:12px 0; }
.admin-order input { display:block; margin:8px 0; padding:9px; max-width:100%; }
@media(max-width:760px){.membership-plans{grid-template-columns:repeat(2,minmax(0,1fr));}.membership-plans strong{font-size:19px;}.book-list{grid-template-columns:repeat(2,minmax(0,1fr));}.book-option{padding:18px 9px 14px 15px;}.book-seal{right:10px;}.book-option strong{font-size:16px;}}
@media(max-width:430px){.book-list{grid-template-columns:repeat(2,minmax(0,1fr));}.membership-plans{grid-template-columns:1fr;}}
.book-reading-controls { position:relative; margin:10px 0; } .book-reading-controls > .book-full > summary { padding:8px 105px 8px 0; min-height:40px; } .book-reading-controls > .book-full-link { position:absolute; top:0; right:0; margin:0; float:none; }

b, strong, h1, h2, h3, h4 { font-weight: 500; }
.detail-report-panel{margin-top:18px;padding:18px;border:1px solid #e9c9b3;border-radius:16px;background:linear-gradient(145deg,#fff8ef,#fffdf9)}.detail-report-panel h3{margin:0 0 8px;color:#a94934}.detail-report-panel>button{padding:11px 17px;border:0;border-radius:10px;color:#fff;background:#d85b3e;font:inherit;cursor:pointer}.detail-report-panel>button:disabled{opacity:.48;cursor:not-allowed}#detail-report-result{margin-top:14px}

.offer-group { margin-block: 22px; }
.offer-group + .offer-group { border-top: 1px solid #e6d4ba; padding-top: 18px; }
.offer-group h3 { margin: 0 0 12px; }
.offer-group > header, .offer-card header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 12px;
}
.offer-group > header { margin-bottom: 12px; }
.offer-group > header h3 { margin: 0; }
.offer-grid { display: grid; gap: 12px; }
.member-offers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.single-offers { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.offer-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  border: 1px solid #dec6a3;
  border-radius: 13px;
  background: #fffaf1;
}
.member-offers .offer-card { background: linear-gradient(150deg, #faecd4, #fffaf1 70%); }
.offer-card h4, .offer-card p { margin: 0; }
.offer-card ul, .offer-notes { margin: 0; padding-inline-start: 20px; }
.offer-card li + li { margin-top: 4px; }
.offer-card .offer-price { color: #a1342a; font-size: 22px; font-weight: 700; }
.offer-badge { border-radius: 999px; padding: 3px 9px; color: #8b332a; background: #f2dfc0; font-size: .8rem; }
.offer-card button {
  align-self: flex-start;
  margin-top: auto;
  padding: 8px 12px;
  border: 1px solid #b97f53;
  border-radius: 8px;
  background: #fff8eb;
  color: #8b332a;
  font: inherit;
  cursor: pointer;
}
.offer-card button:hover { background: #f6e4cb; }
.offer-card button:focus-visible { outline: 2px solid #a1342a; outline-offset: 2px; }
.member-offers button { color: #fffdf7; background: #9e302c; border-color: #9e302c; }
.member-offers button:hover { background: #7e2623; }
.offer-notes { margin-top: 10px; }
p.offer-notes { padding: 0; }

.consent-line {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 9px;
  width: fit-content;
  max-width: 100%;
  margin: 12px 0;
  padding: 8px 11px;
  border: 1px solid #ead7bb;
  border-radius: 8px;
  background: #faf1e2;
  color: #56463b;
  cursor: pointer;
}
.consent-line input[type="checkbox"] {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 2px 0 0;
  padding: 0;
  accent-color: #9e302c;
  cursor: inherit;
}
.consent-line:focus-within { border-color: #a1342a; }
@media (max-width: 650px) {
  .offer-grid { grid-template-columns: minmax(0, 1fr); }
}
.account-strip{display:flex;justify-content:flex-end;margin:4px 14px 8px}.account-strip a{color:#a54c31;font-weight:700;font-size:13px;text-decoration:none}.account-strip a:hover{text-decoration:underline}
