:root {
  color-scheme: light;
  --paper: #f8f7f3;
  --surface: #fff;
  --ink: #1b2630;
  --muted: #57616a;
  --line: #deded6;
  --accent: #d6ec98;
  --green: #364d21;
  --night: #17242d;
  --font: "DM Sans", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --display: "Instrument Serif", "Songti SC", "Noto Serif CJK SC", "SimSun", serif;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.6 var(--font);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .58; }
:focus-visible { outline: 3px solid #567b2b; outline-offset: 4px; }

.site-width { width: min(100% - 64px, 1232px); margin-inline: auto; }

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 20;
  transform: translateY(-160%);
  padding: 8px 16px;
  background: var(--surface);
}
.skip-link:focus { transform: none; }

.site-header {
  position: relative;
  z-index: 3;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; min-height: 75px; gap: 46px; }
.site-brand { flex: none; display: block; }
.site-brand img { display: block; width: 141px; }
.site-nav, .nav-primary, .nav-account { display: flex; align-items: center; }
.site-nav { flex: 1; justify-content: space-between; gap: 20px; }
.nav-primary { gap: 26px; }
.nav-account { gap: 18px; }
.site-nav a, .policy-menu summary { font-size: 14px; white-space: nowrap; }
.site-nav a:hover, .site-nav [aria-current], .policy-menu .is-current { color: var(--green); }
.site-nav a[aria-current], .policy-menu .is-current { font-weight: 750; }

.policy-menu { position: relative; }
.policy-menu summary { display: flex; align-items: center; gap: 8px; list-style: none; cursor: pointer; }
.policy-menu summary::-webkit-details-marker { display: none; }
.chevron {
  width: 7px;
  height: 7px;
  border: solid currentColor;
  border-width: 0 1px 1px 0;
  transform: translateY(-2px) rotate(45deg);
}
.policy-menu[open] .chevron { transform: translateY(2px) rotate(225deg); }
.policy-menu-links {
  position: absolute;
  inset: calc(100% + 14px) auto auto -15px;
  display: grid;
  min-width: 166px;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 30px #17242d16;
}
.policy-menu-links a { padding: 8px 10px; border-radius: 6px; }
.policy-menu-links a:hover { background: var(--paper); }
.nav-toggle { display: none; }

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 9px 21px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: var(--accent);
  color: #233219;
  font-weight: 750;
  line-height: 1.4;
}
.button:hover { background: #e5f5bd; color: #233219; text-decoration: none; }
.button-small { min-height: 38px; padding-inline: 16px; font-size: 14px; }

.home-main { padding-block: 28px 74px; }
.home-hero {
  display: grid;
  grid-template-columns: 44% 56%;
  min-height: 448px;
  overflow: hidden;
  border-radius: 16px;
  background: var(--night);
  color: #fff;
}
.hero-copy {
  position: relative;
  z-index: 1;
  align-self: center;
  padding: clamp(28px, 5vw, 74px);
  padding-right: 0;
}
.hero-company {
  margin: 0 0 18px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .24em;
}
.hero-copy h1 {
  margin: 0;
  color: #fff;
  font: 700 clamp(44px, 5.35vw, 78px)/1.04 var(--display);
  letter-spacing: -.06em;
}
.hero-copy h1 span { display: block; margin-top: 8px; color: #e2edca; }
.hero-description { margin: 25px 0 29px; color: #e0e6e8; font-size: 15px; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 13px 23px; }
.text-link { display: inline-flex; align-items: center; gap: 9px; color: var(--green); font-weight: 700; font-size: 14px; }
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.hero-actions .text-link { color: #fff; }
.hero-art {
  min-width: 0;
  background:
    linear-gradient(90deg, var(--night), #17242d00 30%),
    linear-gradient(0deg, #17242d53, transparent 50%),
    url("../1/1.jpg") center 25% / 131% auto no-repeat;
}
.hero-art:focus-visible { outline-offset: -5px; outline-color: var(--accent); }

.home-section { margin-top: clamp(48px, 6vw, 85px); }
.section-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 20px; }
.section-heading h2, .home-about h2 {
  margin: 0;
  color: var(--ink);
  font: 700 clamp(28px, 3.1vw, 41px)/1.2 var(--display);
  letter-spacing: -.035em;
}
.section-heading .text-link { flex: none; }
.comic-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.comic-card {
  display: grid;
  grid-template-columns: minmax(0, 44%) minmax(0, 1fr);
  overflow: hidden;
  min-height: 210px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  transition: box-shadow .18s ease, border-color .18s ease;
}
.comic-card:hover { border-color: #9cae7a; box-shadow: 0 8px 22px #17242d12; }
.comic-cover { display: block; min-height: 100%; background-repeat: no-repeat; background-size: 131% auto; }
.cover-1 { background-color: #293944; background-image: url("../1/1.jpg"); background-position: center 18%; }
.cover-2 { background-color: #c9b6ac; background-image: url("../2/1.jpg"); background-position: center 35%; }
.comic-info { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 9px; padding: clamp(16px, 2.4vw, 32px); }
.comic-info strong { font-size: clamp(19px, 1.8vw, 26px); line-height: 1.35; }
.comic-genre { color: var(--muted); font-size: 13px; }
.comic-action { margin-top: 8px; color: var(--green); font-size: 14px; font-weight: 750; }
.comic-action span { margin-left: 5px; }

.policy-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); column-gap: 25px; }
.policy-grid a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 55px;
  padding: 9px 1px;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}
.policy-grid a span { color: var(--green); }
.policy-grid a:hover { color: var(--green); text-decoration: underline; text-underline-offset: 4px; }
.home-about { display: grid; grid-template-columns: minmax(0, .8fr) 1fr; align-items: center; gap: clamp(24px, 5vw, 72px); overflow: hidden; border-radius: 12px; background: #e9ecde; }
.home-about img { display: block; width: 100%; height: clamp(180px, 23vw, 280px); object-fit: cover; object-position: center 58%; }
.home-about div { padding: 24px 32px 24px 0; }
.home-about p { margin: 15px 0; color: var(--muted); }

.site-footer { padding: 38px 0 20px; background: var(--night); color: #d7dfe2; }
.site-footer a:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.footer-main { display: flex; justify-content: space-between; gap: 24px; padding-bottom: 24px; }
.footer-brand { color: #fff; font: 700 28px/1.3 var(--display); }
.footer-main p { margin: 6px 0; font-size: 13px; }
.footer-main nav { display: grid; grid-template-columns: repeat(3, auto); align-content: center; gap: 10px 22px; font-size: 14px; }
.footer-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 20px; padding-top: 17px; border-top: 1px solid #ffffff30; font-size: 12px; }
.footer-meta p { margin: 0; }
.footer-meta p:last-child { display: flex; gap: 8px 15px; flex-wrap: wrap; }

.content-main { min-height: 65vh; padding-block: clamp(30px, 5vw, 64px) clamp(48px, 7vw, 86px); }
.page-heading { margin-bottom: 26px; }
.page-heading h1, .form-card h1 {
  margin: 9px 0 0;
  color: var(--ink);
  font: 700 clamp(32px, 4.2vw, 57px)/1.2 var(--display);
  letter-spacing: -.045em;
  overflow-wrap: anywhere;
}
.back-link { color: var(--muted); font-size: 14px; }
.back-link:hover { color: var(--green); text-decoration: underline; }
.about-panel, .document-panel, .form-card, .member-frame {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.about-panel { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 5fr); align-items: stretch; overflow: hidden; }
.about-panel img { width: 100%; height: 100%; object-fit: cover; }
.about-panel div { padding: clamp(22px, 4vw, 54px); }
.about-panel h2 { margin: 0 0 15px; font: 700 26px/1.3 var(--display); }
.about-panel p { margin: 0; color: var(--muted); line-height: 1.85; }

.document-main { max-width: 1000px; }
.document-panel { padding: clamp(18px, 4vw, 48px); line-height: 1.85; overflow-wrap: anywhere; overflow-x: auto; }
.document-panel p { line-height: inherit !important; }
.document-panel pre {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
}
.document-panel table { max-width: 100%; }
.document-panel a { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
.guardian-panel [class^="parent_box"] { padding-block: 20px; border-bottom: 1px solid var(--line); }
.guardian-panel .title, .guardian-panel .tit { margin-bottom: 10px; font-weight: 750; font-size: 21px; }
.guardian-panel .tree, .guardian-panel .parent_info [class^="icon"] { display: none; }
.guardian-panel .parent_info { margin-top: 16px; }
.guardian-panel .guardian-qr { width: 120px; }
.guardian-panel h6 { font-size: 15px; margin-block: 10px; }
.guardian-panel .parent_box8 li { margin-bottom: 15px; }
.guardian-panel .parent_box8 li span { font-weight: 700; }
.guardian-panel .parent_box8 li p { margin: 5px 0; }
.guardian-panel p > span { margin-right: 8px; }

.reader { max-width: 830px; }
.reader-pages { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.reader-pages img { display: block; width: 100%; }
.reader-actions { display: flex; margin-block: 20px; }

.form-main { display: grid; justify-items: center; align-items: start; }
.form-card { width: min(100%, 470px); padding: clamp(22px, 4.7vw, 44px); }
.form-card h1 { margin: 0 0 24px; font-size: clamp(29px, 4vw, 40px); }
.fields { display: grid; gap: 16px; }
.fields label, .fields legend, .payment-channel p { display: block; font-size: 14px; font-weight: 700; }
.fields input:not([type="checkbox"]):not([type="radio"]),
.member-panel input:not([type="button"]):not([type="submit"]),
.member-panel select, .member-panel textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 42px;
  margin-top: 6px;
  padding: 8px 11px;
  border: 1px solid #b9c1b3;
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
}
.fields input[type="checkbox"], .fields input[type="radio"] { accent-color: var(--green); }
.fields .check-field { display: flex; align-items: center; flex-wrap: wrap; gap: 0 3px; font-size: 14px; }
.check-field label { font-weight: 400; }
.check-field input { vertical-align: -1px; }
.form-switch { margin: 17px 0 0; color: var(--muted); font-size: 14px; }
.form-switch a, .check-field a { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
.field-message { margin-top: 4px; font-size: 13px; }
.field-message:empty { display: none; }
.payment-card { width: min(100%, 530px); }
.fields fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.fields legend { margin-bottom: 7px; }
.payment-amounts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.payment-amounts label { position: relative; cursor: pointer; }
.payment-amounts input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.payment-amounts span { display: grid; min-height: 44px; place-items: center; border: 1px solid var(--line); border-radius: 6px; }
.payment-amounts input:checked + span { background: #ecf4dc; border-color: #788d54; }
.payment-amounts input:focus-visible + span { outline: 3px solid #567b2b; outline-offset: 2px; }
.other-amount { margin-top: 12px; }
.payment-channel p { margin: 0 0 5px; }
.payment-channel img { display: block; border: 1px solid var(--line); border-radius: 5px; }
.payment-status { margin: 0; color: #8b3825; font-size: 14px; }
.payment-dialog {
  width: min(100% - 36px, 400px);
  max-height: 85vh;
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  text-align: center;
}
.payment-dialog::backdrop { background: #17242dc0; }
.payment-dialog h2 { margin: 0 25px 14px; font-size: 19px; }
.payment-dialog img { display: block; max-height: 58vh; margin-inline: auto; }
.dialog-close { position: absolute; top: 8px; right: 10px; border: 0; background: transparent; font-size: 25px; color: var(--ink); }

.member-layout { display: grid; grid-template-columns: 180px minmax(0, 1fr); align-items: start; gap: 16px; }
.member-nav { display: grid; gap: 4px; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.member-nav a { padding: 9px 12px; border-radius: 6px; font-size: 14px; }
.member-nav a:hover, .member-nav [aria-current] { color: var(--green); background: #edf3df; }
.member-nav [aria-current] { font-weight: 750; }
.member-frame { display: block; width: 100%; min-height: 420px; }
.member-panel { background: var(--surface); }
.member-panel main { padding: clamp(16px, 3vw, 30px); }
.member-panel h1 { margin: 0 0 18px; font-size: 23px; }
.member-panel .member-fields { max-width: 480px; }
.member-panel .member-fields .button { justify-self: start; }
.member-panel .payment-status a { color: var(--green); text-decoration: underline; }
.member-profile { display: flex; align-items: center; gap: 12px; }
.member-profile img:not([src]), .member-profile img[src=""] { display: none; }
.member-profile img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; }
.member-panel .order-filters { grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); }
.order-table { overflow-x: auto; border: 1px solid var(--line); border-radius: 6px; }
.order-table table { width: 100%; min-width: 745px; border-collapse: collapse; font-size: 13px; }
.order-table th { padding: 9px; background: var(--paper); text-align: left; }
.empty-table { padding: 18px; text-align: center; color: var(--muted); }

.video-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 15px; }
.video-grid a { display: grid; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.video-grid img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--night); }
.video-grid strong { padding: 14px; }
.video-player { position: relative; display: block; width: min(100%, 920px); aspect-ratio: 16 / 9; overflow: hidden; border-radius: 12px; background: var(--night); }
#player-con { width: min(100%, 920px) !important; height: auto !important; }

@media (max-width: 850px) {
  .header-inner { justify-content: space-between; min-height: 63px; gap: 12px; }
  .site-nav { flex: 0 1 auto; }
  .nav-primary, .nav-account { gap: 14px; }
  .site-brand img { width: 120px; }
  .home-hero { min-height: 375px; }
  .policy-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .comic-card { min-height: 174px; }
}

@media (max-width: 690px) {
  .site-width { width: calc(100% - 32px); }
  .header-inner { flex-wrap: wrap; padding-block: 10px; }
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 38px;
    padding: 5px 9px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
    color: var(--ink);
    font-size: 14px;
  }
  .nav-toggle span { width: 13px; height: 10px; border-block: 1px solid; background: linear-gradient(currentColor, currentColor) center / 100% 1px no-repeat; }
  .site-nav { order: 1; flex: 0 0 100%; flex-wrap: wrap; align-items: flex-start; padding-block: 8px; }
  .nav-ready .site-nav:not(.is-open), body:not(.nav-ready) .nav-toggle { display: none; }
  .nav-primary, .nav-account { width: 100%; flex-wrap: wrap; }
  .policy-menu { width: 100%; }
  .policy-menu-links { position: static; margin-top: 8px; box-shadow: none; }
  .home-main { padding-block: 16px 48px; }
  .home-hero { grid-template-columns: minmax(0, 1fr); min-height: auto; }
  .hero-copy { grid-row: 2; padding: 10px 23px 26px; }
  .hero-company { margin-bottom: 12px; }
  .hero-description { margin: 15px 0 17px; }
  .hero-art {
    min-height: clamp(178px, 52vw, 320px);
    background:
      linear-gradient(0deg, var(--night), #17242d00 40%),
      url("../1/1.jpg") center 25% / 126% auto no-repeat;
  }
  .comic-grid { grid-template-columns: 1fr; gap: 12px; }
  .comic-card { min-height: 150px; grid-template-columns: minmax(0, 38%) minmax(0, 1fr); }
  .comic-cover { background-position: center 20%; }
  .policy-grid { column-gap: 12px; }
  .policy-grid a { font-size: 13px; }
  .home-about, .about-panel { grid-template-columns: 1fr; gap: 0; }
  .home-about div { padding: 21px; }
  .about-panel img { height: min(54vw, 260px); }
  .footer-main { flex-direction: column; }
  .footer-main nav { justify-content: start; }
  .member-layout { grid-template-columns: minmax(0, 1fr); }
  .member-nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .member-nav a { padding-inline: 4px; text-align: center; }
  .member-frame { min-height: 390px; }
}

@media (prefers-reduced-motion: reduce) {
  .comic-card { transition: none; }
}
