/* Shared responsive system */
:root{--theme-canvas:#f6f2ed;--theme-surface:#fffdf9;--theme-ink:#3f3230;--theme-muted:#7e6d68;--theme-line:#eadbd2;--theme-hero-a:#5e3a45;--theme-hero-b:#c57b61;--theme-glow:#f3cdb7;--theme-radius:22px;--theme-font:ui-rounded,"Avenir Next",system-ui,"Noto Sans TC",sans-serif}
body{font-family:var(--theme-font);background:radial-gradient(900px 500px at 100% -5%,var(--theme-glow),transparent 62%),var(--theme-canvas);color:var(--theme-ink)}
body.theme-warm{--theme-canvas:#fff8f3;--theme-surface:#fffdfa;--theme-ink:#493b3a;--theme-muted:#866e68;--theme-line:#f0dcd2;--theme-hero-a:#5d3a45;--theme-hero-b:#bf745e;--theme-glow:#f9d8c0;--theme-radius:26px;--brand:#9b6359;--brand-dark:#71443e;--accent:#df8d62}
body.theme-design{--theme-canvas:#fbf5ef;--theme-surface:#fffdfa;--theme-ink:#201d24;--theme-muted:#73676a;--theme-line:#ddcfc1;--theme-hero-a:#211b25;--theme-hero-b:#d85531;--theme-glow:#ffd168;--theme-radius:5px;--brand:#2d2730;--brand-dark:#111014;--accent:#df572e;--theme-font:Arial,Helvetica,"Noto Sans TC",sans-serif}
body.theme-tech{--theme-canvas:#061225;--theme-surface:#0b1c35;--theme-ink:#e4f2ff;--theme-muted:#9ab5ce;--theme-line:#1d4264;--theme-hero-a:#071a39;--theme-hero-b:#05788d;--theme-glow:#173e62;--theme-radius:12px;--brand:#158aa4;--brand-dark:#0b5977;--accent:#2ce5e5;--theme-font:"SFMono-Regular",Consolas,"Liberation Mono","Noto Sans TC",monospace}
body.theme-tech{background-image:linear-gradient(rgba(43,160,184,.045) 1px,transparent 1px),linear-gradient(90deg,rgba(43,160,184,.045) 1px,transparent 1px),radial-gradient(900px 500px at 100% -5%,var(--theme-glow),transparent 62%);background-size:32px 32px,32px 32px,auto}
.site-header{background:color-mix(in srgb,var(--theme-surface) 91%,transparent)!important;border-bottom:1px solid var(--theme-line);box-shadow:0 1px 0 rgba(0,0,0,.02)}
body.theme-tech .site-header{background:rgba(6,18,37,.88)!important}.brand{color:var(--theme-ink)!important}.brand .brand-mark{border-radius:calc(var(--theme-radius)/2);background:var(--brand)}nav a,.nav-form button{color:var(--theme-muted)!important}nav a:hover,.nav-form button:hover{color:var(--brand)!important}.nav-cta{background:var(--brand)!important;color:#fff!important;border-radius:999px!important}
.hero{background:linear-gradient(120deg,var(--theme-hero-a),var(--theme-hero-b))!important;padding-block:clamp(58px,8vw,108px);border-bottom:1px solid color-mix(in srgb,var(--accent) 35%,transparent)}
body.theme-design .hero{background:linear-gradient(126deg,#1e1a23 0 58%,#d6522f 58% 100%)!important}body.theme-tech .hero{background:linear-gradient(128deg,#041228,#0b294b 52%,#057e91)!important}.hero h1{font-family:Georgia,"Noto Serif TC",serif;max-width:680px;text-wrap:balance}.hero p{color:rgba(255,255,255,.83)}.hero .eyebrow{color:#ffe0ba}.hero-actions .button{border-radius:999px;padding:12px 20px}.button{border-radius:999px;background:var(--brand)!important}.button.secondary{background:var(--theme-surface)!important;color:var(--brand)!important}.button:active{transform:scale(.97)}
.hero-visual{display:grid!important;place-items:center;min-height:310px}.hero-art{display:block;width:min(100%,390px);height:290px;object-fit:cover;border:8px solid rgba(255,255,255,.18);border-radius:var(--theme-radius);box-shadow:0 34px 75px rgba(0,0,0,.36);transform:rotate(3deg)}.book-stack{right:3%!important;top:10%!important;z-index:2;border-radius:var(--theme-radius)!important;background:linear-gradient(145deg,#f5c893,#d97c43)!important;box-shadow:22px 21px 0 rgba(16,20,36,.28),44px 42px 0 color-mix(in srgb,var(--accent) 38%,transparent)!important}body.theme-design .book-stack{background:linear-gradient(145deg,#ffcd5b,#e4512d)!important;color:#2d1920!important;border-radius:2px!important;transform:rotate(-7deg)!important}body.theme-tech .book-stack{background:linear-gradient(145deg,#2ce5e5,#158aa4)!important;color:#02223b!important;box-shadow:22px 21px 0 #16365b,44px 42px 0 #0a1b36!important}
.section{padding-block:clamp(42px,6vw,76px)}.section-heading h2,.dashboard h1,.page-hero h1{font-family:Georgia,"Noto Serif TC",serif;color:var(--theme-ink)}body.theme-design .section-heading h2,body.theme-design .dashboard h1,body.theme-design .page-hero h1{font-family:Arial,Helvetica,sans-serif;font-weight:900;letter-spacing:-.06em}.section-heading p,.page-hero p,.hint,.author{color:var(--theme-muted)!important}
.pill,.category-pills .category-pill{background:var(--theme-surface)!important;border-color:var(--theme-line)!important;color:var(--theme-ink)!important;border-radius:999px!important}.pill.active,.pill:hover,.category-pills .category-pill.active{background:var(--brand)!important;border-color:var(--brand)!important;color:#fff!important}.book-card,.form-card,.detail-card,.admin-card,.stat,.data-table{background:var(--theme-surface)!important;border-color:var(--theme-line)!important;border-radius:var(--theme-radius)!important;box-shadow:0 14px 35px color-mix(in srgb,var(--theme-ink) 7%,transparent)!important}.book-card{overflow:hidden}.book-card:hover{transform:translateY(-6px)!important}.cover-placeholder,.detail-cover{background:linear-gradient(145deg,color-mix(in srgb,var(--accent) 48%,white),var(--theme-glow))!important}.book-meta,.category-label{color:var(--theme-muted)!important}.book-card h3 a,.summary{color:var(--theme-ink)!important}
input,select,textarea{background:var(--theme-surface)!important;border-color:var(--theme-line)!important;color:var(--theme-ink)!important;border-radius:calc(var(--theme-radius)/2)!important}label{color:var(--theme-ink)!important}input:focus,select:focus,textarea:focus{outline:3px solid color-mix(in srgb,var(--accent) 31%,transparent)!important;border-color:var(--accent)!important}.admin-nav a{color:var(--theme-muted)!important}.admin-nav a.active,.admin-nav a:hover{background:color-mix(in srgb,var(--accent) 16%,transparent)!important;color:var(--brand)!important;border-radius:999px}.data-table th{background:color-mix(in srgb,var(--accent) 8%,var(--theme-surface))!important;color:var(--theme-muted)!important}.site-footer{background:var(--theme-hero-a)!important;color:rgba(255,255,255,.74)!important}
/* Preview-only presentation */
.preview-section{max-width:1180px}.preview-theme-switcher{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:0 0 28px;padding:12px 14px;border:1px solid var(--theme-line);border-radius:var(--theme-radius);background:var(--theme-surface);box-shadow:0 10px 26px color-mix(in srgb,var(--theme-ink) 5%,transparent)}.preview-theme-switcher span{font-size:.78rem;font-weight:900;letter-spacing:.06em;color:var(--theme-muted);margin-right:2px}.preview-theme-switcher a{border:1px solid var(--theme-line);border-radius:999px;padding:7px 12px;color:var(--theme-ink);text-decoration:none;font-size:.82rem;font-weight:800;background:var(--theme-surface)}.preview-theme-switcher a.active{background:var(--brand);border-color:var(--brand);color:#fff}.preview-divider{height:22px;width:1px;background:var(--theme-line);margin-inline:4px}.preview-hero{border-radius:var(--theme-radius)!important;background:linear-gradient(112deg,rgba(21,29,51,.91),rgba(28,78,92,.36)),var(--preview-hero-image) center/cover!important;min-height:430px!important;display:flex;align-items:flex-end!important;padding:clamp(28px,5vw,58px)!important;box-shadow:0 24px 68px rgba(0,0,0,.22)!important;position:relative}.preview-hero:before{content:"";position:absolute;inset:0;background:linear-gradient(90deg,rgba(0,0,0,.26),transparent 68%)}.preview-hero-copy{position:relative;z-index:1;max-width:650px}.preview-hero h1{font-size:clamp(2.6rem,6.6vw,5.3rem)!important;max-width:650px}.preview-book-grid,.admin-preview-grid{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:18px!important}.preview-book,.admin-preview-grid a{border-radius:var(--theme-radius)!important;background:var(--theme-surface)!important;border:1px solid var(--theme-line)!important;color:var(--theme-ink)!important;box-shadow:0 10px 28px color-mix(in srgb,var(--theme-ink) 8%,transparent)!important}.preview-book{min-height:255px!important;padding:22px!important;background:linear-gradient(145deg,#233552,#aa684e)!important;color:#fff!important}.preview-book:nth-child(2){background:linear-gradient(145deg,#f1a24a,#cf5131)!important}.preview-book:nth-child(3){background:linear-gradient(145deg,#163b68,#14979a)!important}.admin-preview-grid a{min-height:135px;padding:19px!important;display:flex!important;flex-direction:column;justify-content:end}.admin-preview-grid a:hover{transform:translateY(-5px)!important;box-shadow:0 19px 38px color-mix(in srgb,var(--theme-ink) 14%,transparent)!important}.admin-preview-grid strong{color:var(--brand)!important}.empty-state,.empty{background:color-mix(in srgb,var(--theme-surface) 86%,var(--theme-glow))!important;border-color:var(--theme-line)!important;border-radius:var(--theme-radius)!important;color:var(--theme-muted)!important}
body.theme-design .preview-hero{background:linear-gradient(112deg,rgba(30,21,28,.91),rgba(209,74,41,.34)),var(--preview-hero-image) center/cover!important}body.theme-tech .preview-hero{background:linear-gradient(112deg,rgba(3,15,35,.94),rgba(0,143,158,.35)),var(--preview-hero-image) center/cover!important}body.theme-tech .preview-book{background:linear-gradient(145deg,#0b2547,#087c96)!important}
@media(max-width:980px){.hero-grid{grid-template-columns:1fr!important;gap:28px}.hero-visual{min-height:250px}.hero-art{width:min(100%,500px);height:250px}.book-stack{right:13%!important}.book-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}}
@media(max-width:720px){.nav-shell{padding:12px 16px!important;align-items:center!important}.nav-shell .brand{flex:0 0 auto!important;white-space:nowrap!important}.nav-shell nav{flex:1 1 0!important;min-width:0!important;justify-content:flex-end!important;gap:8px!important;overflow-x:auto;max-width:100%;padding-bottom:3px}.nav-shell nav a,.nav-form button{white-space:nowrap;font-size:.85rem}.hero{padding-inline:20px!important}.hero h1{font-size:clamp(2.35rem,12vw,3.8rem)!important}.hero-visual{min-height:215px}.hero-art{height:205px;border-width:5px}.book-stack{width:130px!important;height:170px!important;font-size:1.1rem!important;padding:18px!important;right:4%!important;top:9%!important}.section,.dashboard,.catalog-layout,.detail-wrap{padding-inline:16px!important}.book-grid,.preview-book-grid,.admin-preview-grid{grid-template-columns:1fr!important}.section-heading,.dashboard-header{align-items:flex-start!important;flex-direction:column!important}.book-detail,.two-col{grid-template-columns:1fr!important;gap:24px!important}.detail-cover{width:min(100%,260px)!important}.form-card,.admin-card{padding:20px!important}.form-grid{grid-template-columns:1fr!important}.form-grid .full{grid-column:auto!important}.stat-grid{grid-template-columns:1fr 1fr!important}.preview-hero{min-height:390px!important;padding:28px!important}.preview-hero h1{font-size:clamp(2.35rem,13vw,3.8rem)!important}.preview-theme-switcher{gap:6px}.preview-theme-switcher a{padding:6px 10px}.preview-divider{display:none}.data-table{font-size:.82rem}.data-table th,.data-table td{white-space:nowrap;padding:10px!important}}
@media(max-width:440px){.stat-grid{grid-template-columns:1fr!important}.hero-actions,.form-actions{width:100%}.hero-actions .button,.form-actions .button{width:100%;text-align:center}.site-footer{padding:30px 18px!important}.preview-hero{min-height:360px!important}.hero-visual{min-height:185px}.hero-art{height:175px}}
/* Plain-color fallbacks are deliberately last for older shared-host browsers. */
.site-header{background:#fffdfa!important}.hero{border-bottom-color:rgba(255,255,255,.18)!important}.book-card,.form-card,.detail-card,.admin-card,.stat,.data-table{box-shadow:0 14px 35px rgba(57,39,35,.09)!important}.cover-placeholder,.detail-cover{background:linear-gradient(145deg,#efbf9d,var(--theme-glow))!important}input:focus,select:focus,textarea:focus{outline-color:rgba(223,141,98,.30)!important}.admin-nav a.active,.admin-nav a:hover{background:rgba(223,141,98,.15)!important}.data-table th{background:#fbf2e9!important}.preview-theme-switcher{box-shadow:0 10px 26px rgba(57,39,35,.06)!important}.preview-book,.admin-preview-grid a{box-shadow:0 10px 28px rgba(57,39,35,.08)!important}.admin-preview-grid a:hover{box-shadow:0 19px 38px rgba(57,39,35,.15)!important}.empty-state,.empty{background:#fff6ee!important}.preview-hero{background:linear-gradient(112deg,rgba(21,29,51,.91),rgba(28,78,92,.36)),var(--preview-hero-image) center/cover!important}body.theme-design .preview-hero{background:linear-gradient(112deg,rgba(30,21,28,.91),rgba(209,74,41,.34)),var(--preview-hero-image) center/cover!important}body.theme-tech .site-header{background:#061225!important}body.theme-tech .preview-hero{background:linear-gradient(112deg,rgba(3,15,35,.94),rgba(0,143,158,.35)),var(--preview-hero-image) center/cover!important}body.theme-tech .data-table th{background:#102743!important}body.theme-tech .empty,body.theme-tech .empty-state{background:#0d213d!important}
.preview-hero-copy,.preview-hero-copy h1{color:#fff!important}.preview-hero-copy p{color:rgba(255,255,255,.86)!important}.preview-hero-copy .eyebrow{color:#ffe0ba!important}.preview-hero-copy .button.secondary{color:var(--brand)!important}
.theme-fieldset{border:0;margin:0;padding:0;min-inline-size:0}.theme-fieldset legend{font-size:.9rem;font-weight:800;color:var(--theme-ink)}.theme-fieldset>.hint{margin:3px 0 12px}.theme-choice-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.theme-choice{display:block;cursor:pointer}.theme-choice input{position:absolute;opacity:0;pointer-events:none}.theme-choice-card{display:grid;gap:9px;min-height:184px;padding:12px;border:2px solid var(--theme-line);border-radius:var(--theme-radius);background:var(--theme-surface);transition:border-color 160ms cubic-bezier(.23,1,.32,1),transform 160ms cubic-bezier(.23,1,.32,1),box-shadow 160ms cubic-bezier(.23,1,.32,1)}.theme-choice:hover .theme-choice-card{transform:translateY(-3px)}.theme-choice input:focus-visible+.theme-choice-card{outline:3px solid rgba(223,141,98,.32);outline-offset:3px}.theme-choice input:checked+.theme-choice-card{border-color:var(--brand);box-shadow:0 0 0 3px rgba(223,141,98,.16)}.theme-choice-card strong{color:var(--theme-ink);font-size:.95rem}.theme-choice-card small{color:var(--theme-muted);line-height:1.45}.theme-choice-sample{display:grid;grid-template-columns:1.1fr .9fr;grid-template-rows:27px 48px;gap:6px;height:82px;padding:8px;border-radius:calc(var(--theme-radius)/1.5)}.theme-choice-sample i{display:block;border-radius:5px}.theme-choice-sample i:first-child{grid-column:1/-1}.theme-choice-warm .theme-choice-sample{background:#fff1e5}.theme-choice-warm .theme-choice-sample i:first-child{background:#9a6258}.theme-choice-warm .theme-choice-sample i:nth-child(2){background:#e8a97e}.theme-choice-warm .theme-choice-sample i:nth-child(3){background:#fffdfa}.theme-choice-design .theme-choice-sample{background:#f5e9da;border-radius:2px}.theme-choice-design .theme-choice-sample i:first-child{background:#252027}.theme-choice-design .theme-choice-sample i:nth-child(2){background:#df572e}.theme-choice-design .theme-choice-sample i:nth-child(3){background:#ffd26b}.theme-choice-tech .theme-choice-sample{background:#071a39}.theme-choice-tech .theme-choice-sample i:first-child{background:#158aa4}.theme-choice-tech .theme-choice-sample i:nth-child(2){background:#2ce5e5}.theme-choice-tech .theme-choice-sample i:nth-child(3){background:#173e62}
@media(max-width:720px){.theme-choice-grid{grid-template-columns:1fr}.theme-choice-card{min-height:130px;grid-template-columns:150px 1fr}.theme-choice-sample{grid-row:1/3;height:100%}}
.brand-name,.brand-name span{display:inline!important;width:auto!important;height:auto!important;margin:0!important;padding:0!important;border-radius:0!important;background:transparent!important;color:inherit!important;place-items:initial!important}
