:root {
  color-scheme: light;
  --paper: #f7fbff;
  --ink: #101d38;
  --muted: #4a556a;
  --accent: #ba4b00;
  --accent-deep: #984000;
  --orange: #e96900;
  --orange-soft: #fff7ef;
  --border: #dce7f3;
  --white: #fff;
  --light: #eef6fd;
  --blue: #116c9e;
  --cyan: #00b4e6;
  --green: #22493c;
  --tab-height: 64px;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  --serif: "New York", Georgia, "Songti SC", "SimSun", serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-bottom: calc(var(--tab-height) + env(safe-area-inset-bottom)); }
body { margin: 0; padding-bottom: calc(var(--tab-height) + env(safe-area-inset-bottom)); background: var(--white); color: var(--ink); font: 16px/1.65 var(--sans); -webkit-tap-highlight-color: transparent; }
body:has(dialog[open]) { overflow: hidden; }
a { color: inherit; }
img { display: block; max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.25; }
h1:focus, h2:focus { outline: none; }
.skip, .visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { width: auto; height: auto; clip-path: none; padding: 12px 18px; background: var(--white); z-index: 9; }
.shell { width: min(100% - 96px, 1160px); margin-inline: auto; }
.header-row { display: flex; min-height: 78px; align-items: center; }
.brand { display: inline-grid; min-height: 44px; align-content: center; text-decoration: none; line-height: 1.3; }
.brand img { width: 184px; height: auto; }
.brand strong { font-weight: 850; font-size: 17px; letter-spacing: .06em; }
nav { display: flex; align-items: center; gap: 15px; font-size: 14px; font-weight: 700; }
nav a { text-decoration: none; }

.bottom-navigation {
  position: fixed;
  z-index: 4;
  inset: auto 0 0;
  display: block;
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 0 max(12px, env(safe-area-inset-left)) env(safe-area-inset-bottom) max(12px, env(safe-area-inset-right));
}
.bottom-tabs { display: grid; grid-template-columns: repeat(2, 1fr); max-width: 580px; margin: auto; }
.bottom-tabs a {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: var(--tab-height);
  padding: 4px 8px 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.2;
}
.bottom-tabs a:hover, .bottom-tabs a.active { color: var(--accent-deep); }
.bottom-tabs img { width: 24px; height: 24px; object-fit: contain; }
.bottom-tabs img:nth-child(2), .bottom-tabs a.active img:first-child { display: none; }
.bottom-tabs a.active img:nth-child(2) { display: block; }
.bottom-tabs a.active::after {
  position: absolute;
  right: 50%;
  bottom: 4px;
  width: 50px;
  height: 3px;
  border-radius: 4px;
  background: var(--orange);
  transform: translateX(50%);
  content: "";
}
.bottom-tabs a:focus-visible { outline-offset: -5px; }

.home-publication { padding-block: 16px 60px; }
.hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px 38px; align-items: start; padding: 16px 0 44px; }
.hero-slogan { grid-column: 1 / -1; max-width: 100%; font-size: clamp(35px, 4.85vw, 64px); font-weight: 850; line-height: 1.15; letter-spacing: -.043em; }
.hero-image { aspect-ratio: 1.53; background: var(--light); overflow: hidden; }
.hero-image img { width: 100%; height: 100%; object-fit: cover; }
.hero-copy { min-width: 0; }
.hero-intro::before { display: block; width: 47px; height: 7px; margin-bottom: 12px; border-radius: 9px; background: var(--orange); content: ""; }
.hero-intro h1 { font-size: clamp(30px, 3.05vw, 50px); font-weight: 850; letter-spacing: -.035em; line-height: 1.14; }
.hero-intro p { margin-top: 5px; color: var(--muted); font-size: clamp(15px, 1.55vw, 19px); line-height: 1.5; }
.title-dot { color: var(--orange); font-family: var(--serif); margin-left: .075em; }
.hero-actions { display: grid; gap: 12px; margin-top: 19px; }
.hero-actions .button.primary {
  justify-content: flex-start;
  min-height: 53px;
  padding-inline: 21px;
  border: 0;
  border-radius: 11px;
  background: #da5b00;
  font-size: 24px;
  font-weight: 850;
}
.hero-actions .button.primary:hover { background: var(--accent); }
.hero-draw-link {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 47px;
  padding: 7px 13px;
  border: 1px solid var(--orange);
  border-radius: 10px;
  background: var(--orange-soft);
  text-decoration: none;
}
.hero-draw-link:hover { background: #ffeddc; }
.hero-draw-link img { width: 29px; height: 29px; object-fit: contain; }
.hero-draw-link strong { font-size: clamp(17px, 1.8vw, 22px); font-weight: 850; line-height: 1.25; }
.hero-draw-dates { border-left: 1px solid #f3c99f; padding-left: 11px; color: var(--accent-deep); font-size: clamp(13px, 1.45vw, 17px); font-weight: 780; white-space: nowrap; }
.hero-guide { margin-top: 23px; }
.hero-guide h2 { margin-bottom: 10px; font-size: clamp(24px, 2.8vw, 33px); font-weight: 850; letter-spacing: -.03em; }
.hero-guide-links { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.hero-guide-links a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 78px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--light);
  font-size: clamp(13px, 1.55vw, 17px);
  font-weight: 800;
  line-height: 1.2;
}
.hero-guide-links a:hover { border-color: var(--cyan); }
.hero-guide-links img { width: 31px; height: 31px; object-fit: contain; }
.hero-catalog { margin-top: 9px; color: var(--muted); font-size: 13px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 14px; min-height: 48px; padding: 10px 18px; border: 1px solid transparent; border-radius: 9px; text-decoration: none; font-weight: 750; line-height: 1.4; white-space: nowrap; transition: background .18s ease, color .18s ease, border-color .18s ease; }
.button:disabled { opacity: .65; cursor: wait; }
.button.primary { color: #fff; background: var(--accent); border-color: var(--accent); }
.button.primary:hover:not(:disabled) { background: var(--accent-deep); border-color: var(--accent-deep); }
.button.secondary { color: var(--ink); background: var(--white); border-color: var(--border); }
.button.secondary:hover:not(:disabled) { border-color: var(--ink); background: var(--light); }
.text-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 700; text-underline-offset: 5px; text-decoration-color: #8396ab; }
.text-link:hover, .back-link:hover { color: var(--accent-deep); }
details > summary { cursor: pointer; font-weight: 750; }
.back-link { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; color: var(--muted); font-size: 14px; font-weight: 650; }
.inner { width: min(100% - 96px, 970px); min-height: 65vh; padding: 26px 0 65px; }
.inner-heading { margin: 15px 0 26px; }
.inner-heading h1 { font-size: clamp(42px, 6vw, 67px); font-weight: 850; letter-spacing: -.07em; }
.inner-heading p { margin-top: 8px; color: var(--muted); }
.panel-intro { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: start; }
.section-art { width: clamp(66px, 17vw, 116px); height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 12px; }
.page-intro { align-items: center; padding: clamp(12px, 2.6vw, 25px); border-radius: 16px; background: var(--light); }
.submit-intro { max-width: 710px; }
.submit-intro .section-art { width: clamp(78px, 22vw, 127px); }
.archive-heading { display: flex; justify-content: space-between; align-items: end; gap: 14px; }
.form-card, .stepper, .form-load { max-width: 710px; }
.form-card { background: var(--white); padding: clamp(22px, 4vw, 38px); border: 1px solid var(--border); border-radius: 13px; }
.stepper { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; padding: 0; list-style: none; margin: 0 0 15px; color: var(--muted); font-size: 13px; font-weight: 700; }
.stepper li { display: flex; align-items: center; gap: 7px; border-bottom: 2px solid var(--border); padding: 0 0 9px; }
.stepper li[aria-current=step] { color: var(--ink); border-color: var(--accent); }
.stepper li.complete { border-color: var(--ink); }
.stepper span { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--light); font-size: 12px; }
.stepper li[aria-current=step] span { background: var(--accent); color: white; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { display: block; font-size: 24px; font-weight: 780; margin-bottom: 17px; padding: 0; line-height: 1.35; }
.field { display: grid; gap: 5px; margin: 0 0 15px; font-size: 14px; font-weight: 750; }
.field input, .field select { width: 100%; min-height: 48px; padding: 10px 11px; border: 1px solid #afc5da; border-radius: 5px; background: var(--paper); color: var(--ink); font-size: 16px; font-weight: 500; }
.field input::placeholder { color: #686675; }
.field select:disabled { opacity: .67; }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-help { color: var(--muted); font-size: 14px; }
.form-actions { display: flex; justify-content: end; gap: 11px; margin-top: 23px; }
.entry-summary { border-left: 3px solid var(--blue); padding: 10px 13px; background: var(--light); margin-bottom: 15px; overflow-wrap: anywhere; }
.entry-summary p { color: var(--muted); font-size: 14px; }
.choices { display: grid; gap: 4px; margin-bottom: 9px; }
.choice { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 9px; padding: 9px 0; cursor: pointer; align-items: start; }
.choice input { width: 19px; height: 19px; margin: 3px 0 0; accent-color: var(--blue); }
.choice strong, .choice small { display: block; }
.choice small { color: var(--muted); font-size: 13px; }
.notice { border: 1px solid var(--border); border-left: 3px solid var(--blue); border-radius: 4px; padding: 10px 13px; background: var(--white); margin: 0 0 14px; overflow-wrap: anywhere; }
.notice.error { background: #fff4ed; color: #861f17; border-left-color: var(--accent); }
.notice.ok { background: #f0f6ea; border-left-color: var(--green); color: var(--green); }
#entry-alert, .progress-panel { margin: 16px 0 0; }
.progress-panel label { display: block; color: var(--muted); font-size: 14px; }
.progress-panel progress { width: 100%; height: 10px; accent-color: var(--blue); border: 0; }
.empty, .child-card { background: var(--white); border: 1px solid var(--border); border-radius: 13px; }
.empty { align-items: center; background: var(--light); padding: clamp(13px, 3.6vw, 29px); }
.empty .section-art { width: clamp(121px, 36vw, 176px); }
.empty > div { max-width: 365px; }
.empty .button { padding-inline: clamp(10px, 3vw, 18px); font-size: clamp(14px, 3.8vw, 16px); }
.empty h2 { font-size: 24px; margin-bottom: 5px; }
.empty p { color: var(--muted); }
.empty .button { margin-top: 14px; }
.child-card { margin-bottom: 16px; padding: clamp(17px, 4vw, 29px); }
.child-card, .empty { scroll-margin-top: 12px; }
.child-top { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.child-top h2 { font-size: clamp(25px, 4vw, 35px); overflow-wrap: anywhere; }
.child-top p { color: var(--muted); font-size: 14px; }
.child-top-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.child-top .button { min-height: 43px; font-size: 14px; padding-inline: 12px; }
.credit-grid { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); background: var(--light); padding: 11px 0; margin: 16px 0; border-radius: 5px; }
.credit { display: flex; flex-direction: column; padding-inline: clamp(8px, 2vw, 16px); border-right: 1px solid var(--border); min-width: 0; }
.credit:last-child { border-right: 0; }
.credit dt { order: 2; color: var(--muted); font-size: clamp(11px, 2vw, 13px); margin: 4px 0 0; }
.credit dd { color: var(--ink); font: 700 clamp(23px, 4vw, 31px)/1.1 var(--serif); margin: 0; }
.credit:first-child dd { color: var(--accent-deep); }
.draw-panel { border: 1px solid #f1dbc5; background: var(--orange-soft); border-radius: 10px; padding: 13px; margin-bottom: 19px; }
.draw-panel h3 { margin-bottom: 4px; }
.draw-panel p { color: var(--muted); font-size: 14px; }
.draw-panel .section-art { width: clamp(67px, 17vw, 102px); }
.draw-panel .draw-result { color: var(--ink); }
.draw-result strong { color: var(--accent-deep); display: block; font: 750 clamp(29px, 5vw, 41px)/1.1 var(--sans); margin-block: 3px; }
.draw-readback { grid-column: 1 / -1; }
.draw-panel .button { margin-top: 9px; }
.draw-panel .notice { margin: 9px 0 0; }
.entry-list { list-style: none; padding: 0; margin: 8px 0 0; }
.entry-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; border-top: 1px solid var(--border); padding: 13px 0 2px; margin-top: 10px; min-width: 0; }
.entry-icon { width: 23px; height: 23px; object-fit: contain; margin-top: 2px; }
.entry-line { display: flex; gap: 8px; justify-content: space-between; align-items: start; }
.entry-line strong { overflow-wrap: anywhere; }
.entry-line small { color: var(--muted); display: block; margin-top: 3px; }
.entry-status { display: inline-block; background: var(--light); color: var(--ink); padding: 3px 8px; border-radius: 4px; font-size: 12px; font-weight: 750; white-space: nowrap; }
.entry-status.approved { background: #e5eddf; color: var(--green); }
.entry-status.returned { background: #f9e5d8; color: #942b1d; }
.entry-actions { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; margin-top: 8px; }
.entry-actions .button { min-height: 41px; font-size: 14px; padding: 7px 12px; }
.entry-actions a { font-size: 14px; text-underline-offset: 4px; }
.review-note { margin-top: 9px; padding: 8px 10px; background: var(--light); color: var(--muted); overflow-wrap: anywhere; }
.consent-edit { margin: 9px 0; padding: 4px 10px; background: var(--paper); border: 1px solid var(--border); border-radius: 8px; }
.consent-edit summary { min-height: 38px; align-content: center; font-size: 14px; }
.consent-edit summary img { display: inline-block; vertical-align: middle; margin-inline: 4px; }
.consent-edit form { border-top: 1px solid var(--border); margin-top: 2px; padding-block: 4px 8px; }
.consent-edit button { min-height: 40px; }
.consent-edit .notice { margin: 6px 0 0; }
.poster-modal { position: fixed; inset: 0; width: min(100% - 24px, 500px); max-height: min(95vh, 840px); padding: clamp(12px, 4vw, 20px); border: 1px solid var(--border); border-radius: 19px; background: var(--white); color: var(--ink); overflow-y: auto; box-shadow: 0 0 0 100vmax #121730aa; }
.poster-modal::backdrop { background: #12173066; }
.modal-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.modal-heading h2 { font-size: 22px; }
.icon-button { border: 1px solid var(--border); width: 44px; height: 44px; border-radius: 5px; background: var(--paper); font-size: 27px; line-height: 1; }
.poster-modal p { font-size: 14px; color: var(--muted); margin: 8px 0 11px; }
.poster-stage { background: var(--light); border-radius: 12px; padding: 9px; text-align: center; }
.poster-stage img { margin-inline: auto; }
#poster-image { width: 100%; max-height: min(56vh, 575px); height: auto; object-fit: contain; user-select: none; -webkit-touch-callout: default; }
.poster-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.poster-actions .button { flex: 1; }

@media (max-width: 900px) {
  .shell, .inner { width: min(100% - 48px, 750px); }
  .hero { column-gap: 25px; }
}
@media (max-width: 670px) {
  .shell, .inner { width: calc(100% - 36px); }
  .header-row { min-height: 66px; }
  .brand img { width: 151px; }
  .brand strong { font-size: 15px; }
  .hero { display: block; padding: 13px 0 11px; }
  .hero-slogan { margin-bottom: 13px; font-size: clamp(22px, 8.25vw, 47px); white-space: nowrap; }
  .hero-image { width: 100vw; margin-left: calc((100% - 100vw) / 2); }
  .hero-copy { margin-top: 13px; }
  .hero-intro h1 { font-size: clamp(25px, 8.4vw, 38px); }
  .hero-actions { margin-top: 14px; gap: 12px; }
  .hero-guide { margin-top: 20px; }
  .hero-guide h2 { margin-bottom: 9px; }
  .hero-guide-links { gap: 6px; }
  .hero-catalog { margin-top: 30px; }
  .inner { padding-block: 17px 40px; }
  .inner-heading { margin-top: 6px; margin-bottom: 20px; }
  .inner-heading h1 { font-size: clamp(32px, 9vw, 47px); letter-spacing: -.04em; }
  .inner-heading p { font-size: 14px; }
  .archive-heading { align-items: start; flex-direction: column; }
  .form-card { padding: 17px; }
}
@media (min-width: 401px) and (max-width: 500px) and (min-height: 810px) {
  .header-row { min-height: 58px; }
  .hero { padding-top: 7px; }
  .hero-slogan { margin-bottom: 8px; }
  .hero-copy { margin-top: 8px; }
  .hero-actions { margin-top: 10px; gap: 9px; }
  .hero-guide { margin-top: 14px; }
  .hero-guide-links a { min-height: 70px; }
}
@media (max-width: 500px) {
  .field-pair { grid-template-columns: 1fr; gap: 0; }
}
@media (max-width: 350px) {
  .shell, .inner { width: calc(100% - 26px); }
  .hero-draw-link { gap: 7px; padding-inline: 9px; }
  .panel-intro { gap: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}

.catalog-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.catalog-card { display: flex; flex-direction: column; justify-content: end; min-width: 0; border: 1px solid var(--border); border-top: 3px solid var(--blue); border-radius: 13px; overflow: hidden; color: var(--ink); text-decoration: none; }
.catalog-card:nth-child(even) { border-top-color: var(--accent); }
.catalog-card img { display: block; width: 100%; aspect-ratio: 2.6; object-fit: cover; }
.catalog-card > div { padding: 15px 16px; }
.catalog-card small, .story-period { color: var(--muted); font-size: 13px; }
.catalog-card h2 { margin: 9px 0; font-size: clamp(22px,3vw,32px); line-height: 1.25; overflow-wrap: anywhere; }
.catalog-card strong { display: block; color: var(--accent-deep); margin-top: 12px; }
.catalog-card p, .reading p { overflow-wrap: anywhere; }
.catalog-feature { border: 1px solid var(--border); border-top: 3px solid var(--blue); border-radius: 13px; overflow: hidden; min-width: 0; }
.catalog-feature .catalog-card { border: 0; }
.catalog-feature .catalog-card > div { padding-bottom: 13px; }
.catalog-feature h3 { margin-inline: 16px; }
.catalog-card:hover strong { text-decoration: underline; text-underline-offset: 4px; }
.reading { max-width: min(760px, 91%); }
.reading .story-period { margin: 0 0 5px; color: var(--blue); }
.story-body { border-top: 1px solid var(--border); padding: 12px 0 32px; }
.story-body p { margin: 14px 0; font-size: 17px; line-height: 1.85; white-space: pre-line; }
@media (max-width: 650px) { .catalog-grid { grid-template-columns: 1fr; } }

.guide-links { display: flex; flex-wrap: wrap; align-items: stretch; gap: 7px; }
.guide-links a { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 44px; padding: 6px 11px; background: var(--white); color: var(--ink); border: 1px solid var(--border); border-radius: 4px; font-size: 13px; line-height: 1.35; }
.guide-links a span { color: var(--accent-deep); }
.guide-links a:hover { border-color: var(--blue); color: var(--blue); }
.guide-label { font-size: 14px; font-weight: 750; margin-bottom: 6px; }
.catalog-guide-links { padding: 0 16px 15px; }
@media (max-width: 480px) {
  .submit-intro h1 { font-size: clamp(27px, 8vw, 38px); }
  .empty h2 { font-size: clamp(20px, 6vw, 24px); }
  .empty p { font-size: 14px; }
}
@media (max-width: 350px) {
  .empty h2 { font-size: 17.5px; }
}
