/* Public theme: one source of truth. Legacy style.css is reserved for admin. */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; }
button, input { font: inherit; }
button, a, summary { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; }
img { display: block; max-width: 100%; -webkit-user-drag: none; }
.literary-site h1, .literary-site h2, .literary-site h3, .literary-site h4 { font-family: var(--font-display); font-weight: 500; }
.literary-site svg { stroke-width: 1.5; flex-shrink: 0; }
.literary-site ::selection { background: #8a3b65; color: #fff2f8; }
.literary-site * { border-color: var(--line); }
.literary-site ::-webkit-scrollbar { width: 6px; height: 4px; }
.literary-site ::-webkit-scrollbar-track { background: var(--ink); }
.literary-site ::-webkit-scrollbar-thumb { background: #795069; border-radius: 8px; }
.cover-ratio-2-3 { width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: contain; }
.story-tags-container { display: flex; flex-wrap: wrap; gap: 5px; max-height: 58px; overflow: hidden; align-content: start; }
#stories-grid, #story-modal, .no-copy { -webkit-user-select: none; user-select: none; }
.allow-copy { -webkit-user-select: text; user-select: text; }
.pagination-btn:disabled { opacity: .3; pointer-events: none; }
.literary-site {
  --font-display: 'Noto Serif Display', Georgia, serif;
  --font-ui: 'Be Vietnam Pro', sans-serif;
  --surface: #1b1420;
  --surface-deep: #130f19;
  --surface-raised: #281c2a;
  --button: #aa4676;
  --button-hover: #b24b7d;
  --on-button: #fff2f8;
  font-family: var(--font-ui);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  --rose: #e6a2bf;
  --rose-strong: #c7568b;
  --ink: #100c16;
  --paper: #f4e8ee;
  --muted: #b7a1b5;
  --line: #dca3c025;
  --moon: #e8b9ca;
  --focus: #e7adcc;
  --cover-shadow: #0008;
  --hero-cover-shadow: #0009;
  --card-shadow: #06040850;
  background-color: var(--ink);
  background-image: radial-gradient(ellipse at 80% 4%, #76344f26, transparent 34%), radial-gradient(ellipse at 0% 48%, #4e305126, transparent 42%);
  color: var(--paper);
}
.literary-site::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: .35;
  background-image: radial-gradient(circle, #efbdd8 0 1px, transparent 1.3px), radial-gradient(circle, #c69dbb 0 .6px, transparent 1px);
  background-size: 193px 217px, 127px 173px;
  background-position: 28px 39px, 73px 102px;
}
.site-shell { width: min(1140px, calc(100% - 64px)); margin: auto; }
.site-nav { display: flex; align-items: center; gap: 28px; min-height: 100px; border-bottom: 1px solid var(--line); }
.nav-brand { display: inline-flex; gap: 14px; align-items: center; font: 600 22px/1.2 var(--font-display); color: var(--paper); }
.nav-brand small { display: block; margin-top: 6px; color: var(--muted); font: 9px/1.5 var(--font-ui); letter-spacing: .3em; }
.brand-sigil { font-size: 40px; line-height: 1; color: var(--rose); }
.nav-links { display: flex; gap: 28px; margin-left: auto; color: var(--muted); font-size: 12px; }
.nav-links a:hover, .nav-links button:hover { color: var(--rose); }
.theme-switch { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 50%; color: var(--rose); }
.theme-switch svg { width: 16px; height: 16px; }
.literary-site #bio-header { display: grid; grid-template-columns: 1.15fr 1fr; gap: 36px; align-items: center; padding: 56px 12px 64px; overflow: visible; background: none; position: relative; }
.literary-site #bio-header::after { display: none; }
html.dark .literary-site #bio-header { background: none; }
.eyebrow { font-size: 10px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--rose); }
.hero-copy h1 { margin: 24px 0; font: 500 clamp(38px, 4.8vw, 61px)/1.18 var(--font-display); letter-spacing: -.055em; color: var(--paper); }
.hero-copy h1 em { font-weight: 400; color: var(--rose); }
.hero-byline { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.fine-rule { width: 30px; height: 1px; background: var(--rose-strong); }
.literary-site #owner-name { display: flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 500; color: var(--paper); }
.literary-site #owner-name > span:last-child { display: none; }
.literary-site #owner-bio { max-width: 420px; color: var(--muted); font-size: 13px; line-height: 1.95; }
.hero-actions { display: flex; gap: 24px; align-items: center; margin-top: 28px; }
.button-primary, .button-text { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 48px; font-size: 12px; font-weight: 500; }
.button-primary { padding: 12px 21px; background: #b64a7d; border: 1px solid #e5a2c159; border-radius: 6px; color: #fff1f8; box-shadow: 0 8px 24px #a7396e20; }
.button-primary:hover { background: #ca5c8f; }
.button-text { color: var(--paper); }
.hero-actions svg { width: 16px; height: 16px; }
.literary-site #status-badge { display: flex; align-items: center; gap: 8px; color: var(--muted); margin-top: 22px; font-size: 10px; background: none; border: 0; box-shadow: none; }
.sleep-dot { width: 5px; height: 5px; background: #ca91b0; border-radius: 50%; box-shadow: 0 0 8px #d694b65c; }
.hero-sanctuary { position: relative; height: 410px; isolation: isolate; }
.sanctuary-arch { position: absolute; inset: 0 30px 10px; border: 1px solid #e4a5c138; border-radius: 50% 50% 2px 2px; background: radial-gradient(ellipse at 50% 50%, #ac5b852a, #25172555 60%, transparent 80%); }
.sanctuary-arch::after { content: ''; position: absolute; inset: 10px; border: 1px solid #dc9fba17; border-radius: inherit; }
.celestial-orbit { position: absolute; inset: 26px 45px 38px; border: 1px solid #c68fab24; border-radius: 50%; transform: rotate(-25deg); }
.orbit-two { inset: 55px 5px 60px; transform: rotate(28deg); }
.sanctuary-moon { position: absolute; width: 105px; height: 105px; top: 48px; left: calc(50% - 52px); border-radius: 50%; box-shadow: inset 20px -9px 0 -2px var(--moon); transform: rotate(-20deg); filter: drop-shadow(0 0 24px #d780ad40); }
.sanctuary-caption { position: absolute; top: 185px; width: 100%; text-align: center; font-size: 8px; letter-spacing: .22em; color: #d8a9bf; }
.sanctuary-cat { position: absolute; width: 260px; height: auto; left: calc(50% - 130px); bottom: 20px; filter: saturate(.6); z-index: 2; }
.sanctuary-pedestal { position: absolute; height: 34px; bottom: 44px; width: 280px; left: calc(50% - 140px); border: 1px solid #c897b136; border-radius: 50%; background: #39223244; }
.celestial-star { position: absolute; color: #e7b7ce; font-family: Georgia, serif; }
.star-one { top: 70px; left: 29px; font-size: 28px; }
.star-two { top: 140px; right: 5px; font-size: 42px; }
.star-three { bottom: 60px; left: 4px; font-size: 19px; }
.sanctuary-footnote { position: absolute; bottom: -12px; width: 100%; text-align: center; font: italic 11px var(--font-display); color: #ac829c; }
.social-ribbon { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 21px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ribbon-label { display: inline-flex; gap: 12px; align-items: center; font: italic 13px var(--font-display); color: var(--muted); }
.ribbon-label > span { color: var(--rose); font-size: 23px; }
.social-ribbon > div { display: flex; gap: 30px; }
.social-ribbon a, .social-ribbon button { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; color: var(--paper); }
.social-ribbon svg { width: 13px; height: 13px; color: var(--rose); }
.social-ribbon a:hover, .social-ribbon button:hover { color: var(--rose); }
#story-catalog { padding-top: 66px; scroll-margin-top: 28px; }
.catalog-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 26px; }
.section-heading { font-size: 34px; font-weight: 500; margin: 12px 0 8px; color: var(--paper); line-height: 1.3; }
.section-heading em { color: var(--rose); font-weight: 400; }
.catalog-heading p:last-child { color: var(--muted); font-size: 12px; }
.literary-site #category-tabs-container { border: 1px solid var(--line); border-radius: 8px; padding: 4px; background: var(--surface); }
.literary-site #category-tabs-container button { min-height: 40px; border: 0; border-radius: 5px; font-size: 11px; box-shadow: none; background: transparent; color: var(--muted); }
.literary-site #category-tabs-container button[aria-pressed="true"] { background: #573046; color: #f8e2ee; }
.catalog-tools { display: flex; align-items: center; justify-content: space-between; gap: 22px; margin-bottom: 28px !important; }
.catalog-tools > .relative { flex: 1; max-width: 500px; }
.literary-site #story-search-input { background: var(--surface); border-color: var(--line); border-radius: 7px; box-shadow: none; min-height: 46px; font-size: 12px; }
.literary-site #story-search-input:focus { outline: 2px solid var(--focus); outline-offset: 4px; border-color: var(--rose); box-shadow: none; }
.catalog-filters { padding-bottom: 0; }
.catalog-filters > span { font-size: 10px; }
.literary-site .catalog-filters button { background: transparent; color: var(--muted); border: 1px solid transparent; box-shadow: none; border-radius: 6px; min-height: 36px; font-size: 11px; }
.literary-site .catalog-filters button[aria-pressed="true"] { border-color: #b576984d; background: #4c2a3e55; color: #efbcd5; }
.literary-site .catalog-filters svg { color: var(--rose); }
.literary-site #stories-grid { gap: 24px; }
.literary-site .story-card { border: 1px solid var(--line); padding: 16px; border-radius: 10px; background: var(--surface); box-shadow: none; }
.literary-site .story-card:hover { transform: translateY(-4px); border-color: var(--rose-strong); box-shadow: 0 12px 36px var(--card-shadow); }
.literary-site .story-cover-wrap { width: 100%; padding: 24px 44px; margin-bottom: 18px; border-radius: 6px; border: 1px solid #c38cab1c; background: radial-gradient(ellipse at 50% 40%, #6441573d, transparent 75%), var(--surface-deep); overflow: visible; }
.literary-site .story-cover-wrap::before { content: ''; position: absolute; inset: 10px; border: 1px solid #d6a4bf15; border-radius: 46% 46% 3px 3px; pointer-events: none; }
.literary-site .story-cover-wrap img { position: relative; border-radius: 3px; box-shadow: 5px 9px 19px var(--cover-shadow); }
.literary-site .story-card h3 { font-size: 16px; line-height: 1.6; font-weight: 500; letter-spacing: .005em; color: var(--paper); margin-bottom: 7px; min-height: 3.2em; }
.literary-site .story-card-badges { min-height: 22px; gap: 6px; }
.literary-site .story-card .crown-badge, .literary-site .story-card .new-badge { background: #372537; border: 1px solid #b88b9b30; box-shadow: none; color: #d9b7cb !important; text-shadow: none; font-size: 9px; font-weight: 500; }
.literary-site .story-card .crown-badge svg, .literary-site .story-card .new-badge svg { color: currentColor; }
.literary-site .chapter-count-badge { background: transparent; border: 0; padding: 0; color: var(--muted); font-size: 10px; font-weight: 400; }
.literary-site .story-card .story-excerpt { color: var(--muted); font-size: 12px; line-height: 1.85; -webkit-line-clamp: 2; }
.literary-site .story-card .story-refund-bar { border: 0; padding: 4px 0; background: transparent; color: var(--rose); font-size: 10px; }
.literary-site .story-refund-bar svg { width: 13px; color: currentColor; }
.literary-site .card-read-button { background: var(--button); border: 1px solid #d88fab36; min-height: 42px; font-size: 12px; }
.literary-site .card-read-button:hover { background: var(--button-hover); }
.literary-site .btn-synopsis { background: transparent; border-color: #c993b036; border-radius: 6px; color: var(--rose); min-height: 42px; font-size: 11px; font-weight: 500; }
.literary-site .btn-synopsis:hover { background: #bb7aa31a; }
.literary-site .pagination-btn { border-radius: 50%; min-width: 38px; padding: 0 10px; background: transparent; border-color: var(--line); color: var(--muted); font-size: 12px; }
.literary-site .pagination-btn.active { background: #a84676 !important; box-shadow: none; }
.literary-site #stories-pagination { padding-top: 22px; }
.reader-privileges { position: relative; padding: 40px; margin: 70px 0; border: 1px solid #d8a6bf36; border-radius: 10px; background: radial-gradient(ellipse at 0% 0%, #6f34512b, transparent 60%), var(--surface); scroll-margin-top: 35px; }
.reader-privileges::before { content: ''; position: absolute; inset: 8px; border: 1px solid #d8a6bf12; border-radius: 5px; pointer-events: none; }
.privilege-ornament { position: absolute; top: -24px; left: calc(50% - 24px); width: 48px; text-align: center; background: var(--ink); font: 36px Georgia, serif; color: #d9a1bb; }
.privilege-eyebrow { display: flex; gap: 8px; align-items: center; margin-bottom: 18px; }
.privilege-eyebrow svg { display: none; }
.literary-site #refund-title { font: 500 28px/1.4 var(--font-display); color: var(--paper); max-width: 580px; }
.literary-site #refund-summary { color: var(--muted); font-size: 12px; line-height: 1.9; }
.literary-site #refund-steps { gap: 16px; padding: 20px 0; }
.literary-site #refund-steps > div { display: block; padding: 0; background: transparent; border: 0; }
.literary-site #refund-steps > div > div:first-child { display: block; width: auto; height: auto; margin-bottom: 10px; background: none; box-shadow: none; font: italic 27px var(--font-display); color: var(--rose); }
.literary-site #refund-steps h4 { font: 500 12px var(--font-ui); color: var(--paper); margin-bottom: 6px; }
.literary-site #refund-steps p { font-size: 11px; line-height: 1.8; color: var(--muted); }
.literary-site #refund-note { color: var(--muted); font-size: 10px; line-height: 1.85; font-weight: 400; }
.literary-site #refund-note svg { color: var(--rose); }
.literary-site #refund-zalo-box { background: var(--surface-raised); border: 1px solid #d8a6bf29; box-shadow: none; border-radius: 80px 80px 8px 8px; padding: 35px 20px 22px; }
.literary-site #refund-zalo-box > div:first-child { background: transparent; border-color: var(--line); color: var(--rose); }
.literary-site #zalo-phone-display { font: 500 21px var(--font-display); letter-spacing: .06em; }
.literary-site #refund-zalo-box button { background: #a84676; box-shadow: none; border-radius: 6px; }
.literary-site #refund-zalo-box a { background: transparent; color: var(--rose); }
.site-footer { padding: 0 0 38px; }
.footer-ornament { color: #b6809e; font-size: 23px; letter-spacing: .25em; padding-bottom: 14px; }
.site-footer #footer-brand-title { font: 500 18px var(--font-display); color: var(--paper); }
.site-footer p { color: var(--muted); line-height: 1.9; }
.literary-site :is(a, button, summary):focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
.literary-site #story-modal header button { border-radius: 7px; font-size: 11px; font-weight: 500; }
.literary-site #app-toast { width: max-content; max-width: calc(100vw - 32px); overflow-wrap: anywhere; }
.literary-site .story-hero h2 { letter-spacing: -.02em; }

@media (max-width: 1000px) {
  .site-shell { width: calc(100% - 48px); }
  .literary-site #bio-header { gap: 10px; padding-left: 0; padding-right: 0; }
  .hero-copy h1 { font-size: 44px; }
  .hero-sanctuary { height: 365px; }
  .sanctuary-arch { left: 14px; right: 14px; }
  .sanctuary-caption { top: 159px; font-size: 7px; }
  .sanctuary-moon { top: 31px; }
  .hero-actions { gap: 14px; }
  .hero-actions .button-primary { padding: 12px 14px; }
  .hero-actions .button-text { font-size: 11px; }
  .catalog-tools { flex-wrap: wrap; gap: 14px; }
  .catalog-tools > .relative { max-width: none; min-width: 50%; }
  .reader-privileges { padding: 30px; }
}
@media (max-width: 639px) {
  .site-shell { width: calc(100% - 36px); }
  .site-nav { min-height: 80px; gap: 14px; }
  .nav-brand { font-size: 18px; gap: 9px; }
  .brand-sigil { font-size: 32px; }
  .nav-brand small { font-size: 7px; }
  .nav-links { gap: 14px; font-size: 10px; }
  .nav-links button { display: none; }
  .theme-switch { width: 34px; height: 34px; }
  .literary-site #bio-header { grid-template-columns: 1fr; gap: 38px; padding: 40px 0 36px; }
  .hero-copy { text-align: center; }
  .hero-copy h1 { font-size: clamp(35px, 9.5vw, 48px); margin: 20px 0; }
  .eyebrow { font-size: 8px; }
  .hero-byline, .hero-actions, .literary-site #status-badge { justify-content: center; }
  .literary-site #owner-bio { font-size: 12px; max-width: 360px; margin: auto; }
  .hero-actions { gap: 18px; margin-top: 24px; }
  .hero-actions .button-primary { font-size: 11px; }
  .hero-sanctuary { width: min(310px, 100%); height: 295px; margin: 0 auto; }
  .sanctuary-arch { inset: 0 25px 5px; }
  .sanctuary-moon { width: 76px; height: 76px; left: calc(50% - 38px); top: 26px; box-shadow: inset 15px -6px 0 -2px var(--moon); }
  .sanctuary-caption { top: 119px; }
  .sanctuary-cat { width: 210px; left: calc(50% - 105px); bottom: 10px; }
  .sanctuary-pedestal { width: 225px; left: calc(50% - 112px); bottom: 28px; }
  .star-one { top: 42px; left: 15px; }
  .star-two { top: 110px; right: 0; font-size: 29px; }
  .sanctuary-footnote { bottom: -11px; font-size: 9px; }
  .social-ribbon { flex-direction: column; gap: 14px; padding: 20px 0; }
  .ribbon-label { font-size: 11px; }
  .social-ribbon > div { gap: 22px; }
  .social-ribbon a, .social-ribbon button { font-size: 10px; gap: 5px; }
  #story-catalog { padding-top: 40px; }
  .catalog-heading { display: block; margin-bottom: 20px; }
  .section-heading { font-size: 29px; }
  .catalog-heading p:last-child { font-size: 11px; }
  .literary-site #category-tabs-container { display: inline-flex; margin-top: 20px; }
  .catalog-tools { display: block; }
  .catalog-filters { margin-top: 14px; }
  .literary-site .catalog-filters { gap: 6px; }
  .literary-site .catalog-filters button { padding: 6px 8px; }
  .catalog-tools > .relative { width: 100%; }
  .literary-site #stories-grid { gap: 18px; }
  .literary-site .story-card { padding: 14px; }
  .literary-site .story-cover-wrap { width: 115px; padding: 0; margin: 0; border: 0; background: transparent; }
  .literary-site .story-cover-wrap::before { inset: -5px; border-radius: 4px; }
  .literary-site .story-card h3 { font-size: 13px; line-height: 1.6; min-height: 0; -webkit-line-clamp: 3; }
  .literary-site .story-card-badges { gap: 4px; }
  .literary-site .story-card .story-state { font-size: 8px; padding: 2px 6px; }
  .literary-site .story-card .crown-badge { font-size: 8px; padding: 2px 5px; }
  .literary-site .story-card .story-excerpt { font-size: 11px; }
  .reader-privileges { padding: 28px 20px; margin: 50px 0 35px; }
  .literary-site #refund-title { font-size: 24px; }
  .literary-site #refund-steps { grid-template-columns: 1fr; gap: 18px; }
  .literary-site #refund-steps > div { display: flex; gap: 16px; }
  .literary-site #refund-steps > div > div:first-child { min-width: 24px; }
  .literary-site #refund-zalo-box { width: 100%; border-radius: 8px; padding: 24px; }
  .site-footer { padding-bottom: 30px; }
}
/* Shared component vocabulary: etched frames, rose ink, literary typography. */
.literary-site :is(.button-primary, .card-read-button, .story-read-button, .btn-synopsis, .modal-share-btn, #refund-zalo-box button, .catalog-empty button) {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 16px;
  border: 1px solid var(--rose-strong);
  border-radius: 2px 12px 2px 12px;
  color: var(--on-button);
  background: var(--button);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .015em;
  box-shadow: inset 0 0 0 3px #f0c1d611;
  transition: background .2s, border-color .2s;
}
.literary-site :is(.button-primary, .card-read-button, .story-read-button, #refund-zalo-box button, .catalog-empty button):hover { background: var(--button-hover); }
.literary-site :is(#stories-grid .btn-synopsis, #story-modal .modal-share-btn) { background: transparent; color: var(--rose); border-color: var(--line); }
.literary-site :is(#stories-grid .btn-synopsis, #story-modal .modal-share-btn):hover { background: var(--surface-raised); border-color: var(--rose); }
.local-preview-bar { background: var(--surface); color: var(--muted); border-color: var(--line); font-size: 10px; }
.local-preview-bar svg { color: var(--rose); }
.local-preview-bar a, .local-preview-bar button { color: var(--rose); }
.bulletin-tab { color: var(--muted); border-bottom: 1px solid var(--line); }
.bulletin-tab.is-active { color: var(--rose); border-bottom-color: var(--rose); }
.literary-site .button-text { font-family: var(--font-display); font-size: 14px; font-style: italic; }
.literary-site .story-author { font-size: 11px; color: var(--muted); margin: 8px 0 13px; line-height: 1.7; }
.literary-site .story-author span { font-weight: 400; }
.literary-site .story-excerpt { font-family: var(--font-display); }
.literary-site .story-card { background: var(--surface); border-radius: 3px 18px 3px 18px; }
.literary-site .story-card h3 { font-family: var(--font-display); font-weight: 500; }
.literary-site .story-state, .literary-site .crown-badge, .literary-site .new-badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 7px;
  border: 1px solid var(--line); border-radius: 1px; background: transparent;
  color: var(--rose); font: 500 9px/1.65 var(--font-ui); letter-spacing: .05em;
}
.literary-site .story-card :is(.crown-badge, .new-badge) { background: transparent; border-color: var(--line); color: var(--rose) !important; }
.story-state::before { content: '◇'; font-size: 10px; }
.story-state--full::before { content: '✧'; }
.story-state--coming::before { content: '◌'; }
.dammy-tag {
  display: inline-flex; align-items: center; max-width: 100%; padding: 3px 8px;
  border: 1px solid var(--line); border-radius: 2px; background: transparent;
  color: var(--muted); font: 400 10px/1.6 var(--font-ui); overflow-wrap: anywhere;
  transition: color .2s, border-color .2s;
}
.dammy-tag:hover, .dammy-tag:focus-visible { color: var(--rose); border-color: var(--rose); background: var(--surface-raised); }
.literary-site #category-tabs-container { background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; gap: 14px; padding: 0; }
.literary-site #category-tabs-container .category-button { display: inline-flex; gap: 7px; align-items: center; justify-content: center; position: relative; background: none; color: var(--muted); border-radius: 0; padding: 12px 6px; font-family: var(--font-display); font-size: 15px; }
.literary-site #category-tabs-container button[aria-pressed="true"] { color: var(--rose); background: none; }
.category-button[aria-pressed="true"]::after { content: '✧'; position: absolute; bottom: -11px; left: calc(50% - 9px); background: var(--ink); width: 18px; text-align: center; color: var(--rose); }
.literary-site .catalog-filters .filter-button { display: inline-flex; align-items: center; gap: 6px; padding: 7px 9px; border-radius: 2px; font-family: var(--font-display); font-size: 13px; white-space: nowrap; flex-shrink: 0; }
.literary-site .catalog-filters button[aria-pressed="true"] { color: var(--rose); border-color: var(--rose-strong); background: var(--surface-raised); box-shadow: inset 0 0 0 2px var(--ink); }
.literary-site #story-search-input { border-radius: 2px; background: transparent; border-width: 0 0 1px; color: var(--paper); }
.literary-site #story-search-input::placeholder { color: var(--muted); opacity: .8; }
/* The labeled custom clear button replaces the browser's duplicate icon. */
.literary-site #story-search-input::-webkit-search-cancel-button { -webkit-appearance: none; }
.literary-site #story-search-clear { color: var(--rose); }
.pagination-frame { display: flex; align-items: center; gap: 8px; padding: 10px 20px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); position: relative; }
.pagination-frame::before, .pagination-frame::after { content: '✧'; position: absolute; color: var(--rose); top: 18px; }
.pagination-frame::before { left: -12px; }.pagination-frame::after { right: -12px; }
.literary-site .pagination-btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 2px; border: 1px solid transparent; font: 500 16px var(--font-display); }
.literary-site .pagination-btn.active { background: var(--surface-raised) !important; color: var(--rose); border-color: var(--rose-strong); }
.catalog-empty { padding: 40px 24px; border: 1px solid var(--line); background: var(--surface); text-align: center; color: var(--muted); }
.catalog-empty > div:first-child { color: var(--rose); }
.catalog-empty p:first-of-type { font: 500 21px/1.6 var(--font-display); color: var(--paper); overflow-wrap: anywhere; }
.catalog-empty p { margin: 10px 0 20px; font-size: 12px; }
.literary-site #refund-steps h4 { font: 500 16px/1.5 var(--font-display); }
.literary-site #refund-steps p { font-size: 12px; }
.literary-site #refund-zalo-box { background: var(--surface-raised); }
.literary-site #refund-zalo-box > div:first-child { border-radius: 50%; }
.literary-site #refund-zalo-box svg, .site-footer svg { color: var(--rose); }
.literary-site #refund-zalo-box button svg { color: currentColor; }
.literary-site #refund-note { color: var(--muted); }
.site-footer button { color: var(--muted); font-size: 11px; }
.site-footer button:hover { color: var(--rose); }
.literary-site #app-toast { border: 1px solid var(--line); border-radius: 2px 12px; background: var(--surface-raised); color: var(--paper); font-family: var(--font-ui); font-weight: 400; font-size: 12px; box-shadow: 0 8px 30px #0004; }
.literary-site #app-toast svg { color: var(--rose); }

/* Story detail: a chapter page, using the same frames and type as the catalog. */
#story-modal { z-index: 70; background: #08060dd9; backdrop-filter: blur(10px); }
.story-dialog { height: 100dvh; background: var(--ink); border-color: var(--line); }
#story-modal-content { min-height: 0; }
#story-modal .modal-scroll-area { min-height: 0; padding: 24px 20px; background: radial-gradient(ellipse at 50% 0%, #98527318, transparent 48%), var(--ink); overscroll-behavior: contain; }
#story-modal header { background: var(--surface); border-color: var(--line); }
.literary-site #story-modal header button { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; color: var(--muted); border: 0; background: transparent; font-family: var(--font-display); font-size: 13px; }
#story-modal header svg { color: var(--rose); }
.story-hero { display: grid; gap: 28px; text-align: center; padding: 10px 0 28px; border-bottom: 1px solid var(--line); }
.story-hero-art { position: relative; display: grid; place-items: center; isolation: isolate; padding: 20px 0; }
.story-hero-art::before { content: ''; position: absolute; inset: 10% 0; z-index: -1; background: radial-gradient(ellipse, #e09bb727, transparent 68%); }
.story-hero .modal-cover-wrap { width: clamp(170px, 54vw, 236px); overflow: hidden; border: 1px solid var(--line); border-radius: 3px; box-shadow: 0 20px 34px -10px var(--hero-cover-shadow); }
.story-hero .modal-cover-wrap img { aspect-ratio: auto; height: auto; }
.story-hero-orbit { position: absolute; z-index: -1; width: min(100%, 310px); height: 100%; border: 1px solid var(--line); border-radius: 50% 50% 3px 3px; }
.story-hero-orbit::before { content: ''; position: absolute; inset: 8px; border: 1px solid var(--line); opacity: .45; border-radius: inherit; }
.story-hero-orbit span { position: absolute; color: var(--rose); font-size: 20px; }
.story-hero-orbit span:first-child { top: 18%; left: -8px; }.story-hero-orbit span:last-child { bottom: 14%; right: -8px; }
.story-hero-info { min-width: 0; align-self: center; }
.story-hero-eyebrow { color: var(--rose); font-size: 9px; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 16px; }
.story-hero-eyebrow span { margin: 0 6px; }
.story-hero h2 { color: var(--paper); font-size: clamp(22px, 4.6vw, 30px); line-height: 1.5; font-weight: 400; margin: 14px 0; overflow-wrap: anywhere; text-wrap: balance; }
.story-original-title { color: var(--muted); font: italic 13px/1.8 var(--font-display); margin-bottom: 12px; overflow-wrap: anywhere; }
.story-hero-author { color: var(--muted); font-size: 11px; }.story-hero-author span { color: var(--paper); margin-left: 5px; }
.story-hero-stats { display: flex; justify-content: center; margin-top: 24px; }
.story-hero-stats > div { flex: 1; min-width: 0; padding: 0 10px; border-right: 1px solid var(--line); }
.story-hero-stats > div:last-child { border: 0; }
.story-hero-stats dt { color: var(--muted); font-size: 10px; margin-bottom: 5px; }
.story-hero-stats dd { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 5px; color: var(--paper); font: 500 18px/1.6 var(--font-display); overflow-wrap: anywhere; }
.story-hero-stats svg { width: 13px; height: 13px; color: var(--rose); }
.story-genres { padding: 4px 0 14px; }
.story-genre-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; }
.story-genres .dammy-tag { font-size: 11px; padding: 5px 10px; }
.story-more-tags { margin-top: 10px; text-align: center; }
.story-more-tags summary { display: inline-flex; gap: 6px; align-items: center; color: var(--rose); font: italic 13px var(--font-display); padding: 8px; list-style: none; cursor: pointer; }
.story-more-tags summary::-webkit-details-marker { display: none; }
.story-more-tags summary svg { width: 14px; height: 14px; }
.story-more-tags .tags-hide, .story-more-tags[open] .tags-show { display: none; }
.story-more-tags[open] .tags-hide { display: inline; }.story-more-tags[open] summary svg { transform: rotate(180deg); }
.story-more-tags[open] .story-genre-list { margin-top: 8px; }
.story-detail-panel { position: relative; padding: 24px; border: 1px solid var(--line); border-radius: 2px; background: var(--surface); }
.story-detail-panel::before, .story-detail-panel::after { content: ''; position: absolute; width: 12px; height: 12px; pointer-events: none; border-color: var(--rose); opacity: .65; }
.story-detail-panel::before { top: -1px; left: -1px; border-top: 1px solid; border-left: 1px solid; }
.story-detail-panel::after { bottom: -1px; right: -1px; border-bottom: 1px solid; border-right: 1px solid; }
.detail-section-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.detail-index { font: italic 13px var(--font-display); color: var(--rose); }
.detail-flourish { margin-left: auto; color: var(--rose); font-size: 18px; }
.literary-site .modal-section-title { color: var(--paper); font: 500 20px/1.5 var(--font-display); }
.story-detail-panel p { color: var(--muted); font-size: 13px; line-height: 1.9; }
.modal-cp-box p { font-family: var(--font-display); font-size: 16px; color: var(--paper); }
.refund-seals { display: flex; align-items: center; justify-content: center; gap: 24px; padding: 12px 0 24px; }
.refund-seals > div { display: flex; flex-direction: column; text-align: center; }
.refund-seals strong { font: italic 400 38px/1.4 var(--font-display); color: var(--rose); }
.refund-seals strong span { font-size: 19px; }
.refund-seals div > span { font-size: 10px; letter-spacing: .08em; color: var(--muted); }
.seal-divider { color: var(--rose); font-size: 10px; opacity: .65; }
.modal-refund-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; align-items: center; padding-top: 16px; margin-top: 18px; border-top: 1px solid var(--line); }
.modal-refund-label { color: var(--muted); font-size: 11px; }
.modal-refund-zalo { display: inline-flex; align-items: center; gap: 6px; color: var(--rose); font: 500 15px var(--font-display); }
.modal-refund-zalo svg { width: 14px; height: 14px; }
.modal-synopsis-wrap { padding-top: 18px; }
.modal-synopsis-wrap .detail-section-heading { margin-bottom: 0; }
.synopsis-caption { color: var(--muted); font-size: 10px; letter-spacing: .12em; margin: 7px 0 24px; padding-left: 28px; text-transform: uppercase; }
.modal-synopsis-box { white-space: pre-line; color: var(--paper); font: 400 17px/2 var(--font-display); padding: 0 8px; overflow-wrap: anywhere; }
.modal-synopsis-box::first-letter { font-size: 2.4em; color: var(--rose); font-weight: 500; line-height: 1; }
.chapter-end { color: var(--rose); letter-spacing: .35em; text-align: center; margin: 32px 0 12px; }
.modal-bottom-bar { display: flex; align-items: center; gap: 12px; padding: 12px 20px max(12px, env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); }
.modal-bottom-bar .modal-share-btn { min-height: 48px; }
.story-read-action { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: end; gap: 16px; }
.story-read-hint { display: none; color: var(--muted); font-size: 11px; }
.story-read-action .story-read-button { flex: 1; min-height: 48px; }
@media (min-width: 640px) {
  .story-dialog { height: min(90dvh, 980px); border: 1px solid var(--line); border-radius: 3px 22px 3px 22px; }
  #story-modal .modal-scroll-area { padding: 32px; }
  .story-hero { grid-template-columns: minmax(200px, .85fr) minmax(0, 1.15fr); text-align: left; gap: 32px; }
  .story-hero .modal-cover-wrap { width: min(82%, 250px); }
  .story-hero-stats dd { justify-content: start; }
  .story-genre-list { justify-content: start; }.story-more-tags { text-align: left; }
  .story-read-hint { display: inline; }.story-read-action .story-read-button { flex: 0 1 230px; }
  .modal-bottom-bar { padding: 16px 32px; }
}
@media (max-width: 639px) {
  .literary-site .hero-actions .button-primary { font-size: 13px; }
  .literary-site .hero-actions .button-text { font-size: 13px; }
  .literary-site .story-card h3 { font-size: 14px; }
  .literary-site .catalog-filters .filter-button { font-size: 12px; padding: 6px 7px; }
  .literary-site #category-tabs-container .category-button { font-size: 14px; }
  .story-detail-panel { padding: 20px; }
  .literary-site .modal-section-title { font-size: 18px; }
  .modal-synopsis-box { font-size: 16px; }
  .modal-bottom-bar { gap: 10px; padding-left: 16px; padding-right: 16px; }
}
@media (max-width: 380px) {
  .catalog-filters > span { display: none; }
  .orbit-two { inset: 55px 18px 60px; }
}
html.light .literary-site {
  --ink: #fff7fa; --surface: #fff0f5; --surface-deep: #f9e7ef; --surface-raised: #f3dce7;
  --paper: #3e2939; --muted: #79596e; --rose: #8e4c6c; --rose-strong: #ad6287; --line: #a3658533;
  --button: #98416b; --button-hover: #84365c;
  --moon: #b87394; --focus: #985575;
  --cover-shadow: #63354d40; --hero-cover-shadow: #63354d50; --card-shadow: #63354d18;
  background-image: radial-gradient(ellipse at 80% 4%, #e7b0ca38, transparent 34%), radial-gradient(ellipse at 0% 48%, #d9a5c121, transparent 42%);
}
html.light .literary-site::before { background-image: radial-gradient(circle, #985575 0 1px, transparent 1.3px), radial-gradient(circle, #ad6287 0 .6px, transparent 1px); opacity: .14; }
html.light .literary-site .sanctuary-arch { border-color: var(--line); background: radial-gradient(ellipse, #efc5d85c, transparent 75%); }
html.light .literary-site .sanctuary-arch::after, html.light .literary-site .celestial-orbit { border-color: var(--line); }
html.light .literary-site .sanctuary-pedestal { border-color: var(--line); background: #c780a329; }
html.light .literary-site :is(.celestial-star, .privilege-ornament, .footer-ornament) { color: var(--rose); }
html.light .literary-site .story-cover-wrap { border-color: var(--line); background: radial-gradient(ellipse at 50% 40%, #d696b429, transparent 75%), var(--surface-deep); }
html.light .literary-site .story-cover-wrap::before { border-color: var(--line); }
html.light .literary-site .reader-privileges { border-color: var(--line); background: radial-gradient(ellipse at 0% 0%, #e7b0ca26, transparent 60%), var(--surface); }
html.light .literary-site .reader-privileges::before { border-color: var(--line); opacity: .5; }
html.light .literary-site #app-toast { box-shadow: 0 8px 30px var(--card-shadow); }
html.light .literary-site .sanctuary-caption, html.light .literary-site .sanctuary-footnote { color: var(--muted); }
@media (max-width: 639px) {
  html.light .literary-site .story-cover-wrap { background: transparent; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .literary-site *, .literary-site *::before, .literary-site *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
