:root {
  --navy: #1b2a4a;
  --navy-soft: #2a3d66;
  --ink: #172033;
  --coral: #ef5a32;
  --coral-deep: #c73712;
  --teal: #2ec4b6;
  --teal-deep: #0f766e;
  --gold: #e7b15a;
  --cream: #f6f1e8;
  --paper: #fffdfb;
  --muted: #5c6578;
  --line: rgba(27, 42, 74, 0.12);
  --shadow: 0 24px 60px rgba(27, 42, 74, 0.1);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Outfit", "Segoe UI", sans-serif;
  --radius: 22px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.6;
  background:
    radial-gradient(ellipse 70% 40% at 0% -10%, rgba(46, 196, 182, 0.18), transparent 50%),
    radial-gradient(ellipse 50% 30% at 100% 0%, rgba(239, 90, 50, 0.14), transparent 46%),
    var(--cream);
}
img { max-width: 100%; height: auto; }
a { color: var(--navy); }
h1, h2, h3 { font-family: var(--serif); font-weight: 560; letter-spacing: -0.03em; line-height: 1.12; margin: 0 0 0.6rem; }
h1 { font-size: clamp(2.4rem, 6vw, 5rem); }
h2 { font-size: clamp(1.8rem, 3vw, 2.7rem); }
p { margin: 0 0 0.8rem; }
button, input, select, textarea { font: inherit; color: inherit; }
.wrap { width: min(1120px, calc(100% - 2rem)); margin-inline: auto; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); border: 0;
}
.skip {
  position: absolute; left: 1rem; top: -4rem; background: var(--navy); color: white;
  padding: 0.6rem 1rem; border-radius: 999px; z-index: 50;
}
.skip:focus { top: 1rem; }

.announcement {
  background: var(--navy);
  color: #f6f1e8;
  text-align: center;
  padding: 0.55rem 1rem;
  font-size: 0.92rem;
}
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: #f6f1e8;
  border-bottom: 1px solid transparent;
}
.header-bar { display: flex; align-items: center; justify-content: space-between; min-height: 88px; gap: 1rem; }
.brand img { height: 74px; width: auto; display: block; mix-blend-mode: multiply; }
.nav-check { position: absolute; opacity: 0; pointer-events: none; }
.nav-toggle, .nav-close { display: none; }
.site-nav { display: flex; align-items: center; gap: 1.1rem; }
.site-nav a { text-decoration: none; font-weight: 600; color: var(--navy); }
.site-nav a[aria-current="page"] { color: var(--coral-deep); }
.nav-cta { margin-left: 0.4rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  min-height: 48px; padding: 0.7rem 1.3rem; border-radius: 999px; border: 0;
  text-decoration: none; font-weight: 700; cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-coral { background: var(--coral-deep); color: white; }
.btn-coral:hover { background: #a82d0e; color: white; }
.btn-navy { background: var(--navy); color: white; }
.btn-navy:hover { color: white; }
.btn-ghost { background: transparent; color: var(--navy); border: 1.5px solid rgba(27, 42, 74, 0.22); }
.text-link { font-weight: 700; color: var(--teal-deep); text-underline-offset: 0.2em; }
.eyebrow {
  margin: 0 0 0.7rem; color: var(--teal-deep); font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.78rem;
}
.lead { font-size: 1.15rem; color: var(--muted); max-width: 42rem; }
.quiet { color: var(--muted); }
.author-line { color: var(--coral-deep); font-weight: 700; }

.hero { padding: 1.5rem 0 1rem; position: relative; }
.hero-grid { display: grid; gap: 1.5rem; align-items: center; }
.hero-copy h1 { max-width: 16ch; }
.scribble { width: min(240px, 60%); color: var(--coral); display: block; margin: -0.2rem 0 1rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.2rem; }
.hero-art { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.6rem; }
.hero-art > img { width: min(460px, 100%); mix-blend-mode: multiply; position: relative; z-index: 1; }
.orb { position: absolute; border-radius: 50%; filter: blur(2px); }
.orb-teal { width: 220px; height: 220px; background: rgba(46, 196, 182, 0.35); right: 8%; top: 10%; animation: drift 9s ease-in-out infinite; }
.orb-coral { width: 140px; height: 140px; background: rgba(239, 90, 50, 0.22); left: 6%; bottom: 12%; animation: drift 11s ease-in-out infinite reverse; }
.hero-float {
  position: relative; z-index: 2; margin: 0.2rem auto 0; background: var(--paper);
  border-radius: 18px; padding: 0.9rem 1rem; box-shadow: var(--shadow);
  text-decoration: none; display: block; width: min(320px, 100%); border: 1px solid var(--line);
}
.hero-float span { display: block; color: var(--teal-deep); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.hero-float strong { display: block; font-family: var(--serif); font-size: 1.25rem; margin: 0.2rem 0; }
.hero-float em { font-style: normal; color: var(--muted); font-size: 0.92rem; }

.chapters { display: flex; gap: 0.6rem; overflow-x: auto; padding: 0.5rem 0 1.5rem; }
.chapters a {
  flex: 0 0 auto; text-decoration: none; background: var(--paper); border: 1px solid var(--line);
  border-radius: 999px; padding: 0.45rem 0.8rem; font-weight: 600; font-size: 0.92rem;
}
.chapters span { color: var(--coral-deep); margin-right: 0.35rem; }

.section { padding: 3.2rem 0; }
.section-tint { background: rgba(255, 253, 251, 0.55); }
.section-head { display: flex; justify-content: space-between; gap: 1rem; align-items: end; margin-bottom: 1.4rem; }
.book-band {
  display: grid; gap: 1.5rem; align-items: center; background: var(--paper);
  border-radius: 32px; padding: clamp(1.2rem, 3vw, 2.4rem); box-shadow: var(--shadow); border: 1px solid var(--line);
}
.book-visual { display: grid; place-items: center; }
.book-photo { width: min(260px, 70vw); border-radius: 8px 16px 16px 8px; box-shadow: 12px 18px 40px rgba(27, 42, 74, 0.2); }
.css-book { width: 180px; height: 140px; position: relative; }
.css-book span { position: absolute; inset: 18px 20px 10px 30px; background: var(--teal); border-radius: 4px 10px 10px 4px; box-shadow: 8px 10px 0 var(--navy); }
.css-book span:nth-child(2) { inset: 28px 48px 22px 18px; background: #7ee0d6; transform: rotate(-8deg); }
.css-book span:nth-child(3) { inset: auto 24px 0 24px; height: 16px; background: var(--navy); border-radius: 0 0 12px 12px; box-shadow: none; }
.seal {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0.2rem 0.8rem;
  border-radius: 999px; background: rgba(239, 90, 50, 0.12); color: var(--coral-deep); font-weight: 700;
}

.card-grid { display: grid; gap: 1rem; }
.event-card {
  display: flex; flex-direction: column; background: var(--paper); border-radius: var(--radius);
  overflow: hidden; text-decoration: none; border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(27, 42, 74, 0.05);
  min-height: 100%; transition: transform 0.2s ease;
}
.event-card:hover { transform: translateY(-4px); }
.event-cover { position: relative; min-height: 180px; background: linear-gradient(160deg, var(--navy), var(--teal-deep)); display: grid; place-items: center; }
.event-cover img { width: 100%; height: 220px; object-fit: cover; }
.event-date-mark { font-family: var(--serif); font-size: 3rem; color: white; }
.date-pill, .mini-pill {
  position: absolute; left: 0.8rem; bottom: 0.8rem; background: var(--paper); color: var(--navy);
  border-radius: 999px; padding: 0.25rem 0.7rem; font-size: 0.82rem; font-weight: 700;
}
.event-body { padding: 1rem 1rem 1.2rem; }
.event-body h3 { font-size: 1.45rem; }
.meta { color: var(--teal-deep); font-size: 0.85rem; font-weight: 700; margin-bottom: 0.3rem; }
.event-body p { color: var(--muted); }

.slot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0.9rem; }
.slot-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: 0.7rem 0.7rem 1rem;
  box-shadow: 0 12px 30px rgba(27, 42, 74, 0.05);
}
.slot-card h3 { font-size: 1.2rem; margin-top: 0.7rem; }
.slot-card p { color: var(--muted); font-size: 0.95rem; min-height: 2.6em; }
.slot-frame {
  position: relative; aspect-ratio: 3/4; border-radius: 14px; overflow: hidden;
  background: radial-gradient(circle at 50% 40%, #35507f, #1b2a4a 62%);
  display: grid; place-items: center;
}
.slot-frame img { width: 100%; height: 100%; object-fit: cover; }
.slot-index { position: absolute; top: 0.55rem; left: 0.6rem; color: rgba(255,255,255,.8); font-size: 0.75rem; font-weight: 700; z-index: 1; }
.slot-mystery { font-family: var(--serif); font-size: 4.5rem; color: #f6f1e8; animation: glow 3.4s ease-in-out infinite; }
.slot-initial { font-family: var(--serif); font-size: 4rem; color: white; }
.mini-pill { position: static; display: inline-flex; }

.school-list { list-style: none; padding: 0; margin: 1.2rem 0 0; display: grid; gap: 0.7rem; }
.school-list li {
  background: var(--paper); border-radius: 16px; padding: 0.9rem 1rem; border: 1px solid var(--line); font-weight: 600;
}
.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; gap: 1rem; width: max-content; animation: slide 32s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.sponsor-pill {
  min-width: 180px; height: 92px; padding: 0.6rem 1rem; background: var(--paper); border-radius: 18px;
  border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
}
.sponsor-pill img { max-height: 64px; width: auto; object-fit: contain; }
.sponsor-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.sponsor-card { background: var(--paper); border-radius: var(--radius); border: 1px solid var(--line); }
.sponsor-card a, .sponsor-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.6rem; min-height: 180px; padding: 1rem; text-align: center; text-decoration: none; }
.sponsor-card img { max-height: 84px; object-fit: contain; }
.contact-grid { display: grid; gap: 1rem; }
.contact-card { background: var(--paper); border-radius: var(--radius); padding: 1.2rem; border: 1px solid var(--line); }
.contact-card h2 { font-size: 1.35rem; }
.teacher { font-weight: 700; }
.closing { padding: 1rem 0 4rem; }
.closing-inner {
  background: var(--navy); color: #f6f1e8; border-radius: 32px; padding: clamp(1.5rem, 4vw, 3rem);
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem;
}
.closing h2 { max-width: 14ch; margin: 0; }

.site-footer { background: #121b31; color: #d5dbe8; padding: 2.5rem 0 1.2rem; }
.footer-grid { display: grid; gap: 1.5rem; }
.footer-logo { background: var(--paper); display: inline-block; border-radius: 16px; padding: 0.3rem 0.5rem; }
.footer-logo img { height: 78px; width: auto; display: block; }
.footer-line { font-family: var(--serif); font-size: 1.4rem; color: white; margin-top: 0.8rem; max-width: 16ch; }
.site-footer a { color: #f6f1e8; text-decoration: none; }
.site-footer nav { display: flex; flex-direction: column; gap: 0.4rem; }
.footer-domain { font-weight: 700; color: var(--teal); }
.footer-bottom { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2rem; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,.12); font-size: 0.92rem; }

.page-hero { padding: 2.5rem 0 1rem; }
.prose { max-width: 44rem; }
.prose p { font-size: 1.12rem; line-height: 1.75; }
.fact-row { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0; margin: 0 0 1rem; list-style: none; }
.fact-row li { background: var(--paper); border-radius: 999px; padding: 0.35rem 0.75rem; border: 1px solid var(--line); font-weight: 600; }
.detail-cover { width: min(100%, 760px); border-radius: 24px; margin: 0.5rem 0 1rem; max-height: 460px; object-fit: cover; }
.empty-note { color: var(--muted); background: rgba(255,253,251,.7); border-radius: 16px; padding: 1rem; }

.narrow { width: min(640px, calc(100% - 2rem)); margin: 2rem auto 4rem; }
.register-grid { display: grid; gap: 1.2rem; padding: 2rem 0 4rem; align-items: start; }
.register-book, .card-form, .install-card, .ticket {
  background: var(--paper); border: 1px solid var(--line); border-radius: 28px; box-shadow: var(--shadow);
}
.register-book { padding: 1.3rem; }
.stack-form { display: grid; gap: 0.85rem; }
.card-form { padding: 1.2rem; }
label { display: grid; gap: 0.35rem; font-weight: 600; }
input, select, textarea {
  width: 100%; min-height: 48px; border-radius: 14px; border: 1.5px solid rgba(27, 42, 74, 0.16);
  background: #fff; padding: 0.7rem 0.8rem;
}
textarea { min-height: 180px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(15, 118, 110, 0.35); border-color: var(--teal-deep); }
.check { display: flex; gap: 0.6rem; align-items: flex-start; font-weight: 500; }
.check input { width: 1.2rem; height: 1.2rem; min-height: 0; margin-top: 0.2rem; }
.split { display: grid; gap: 0.85rem; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.banner { border-radius: 16px; padding: 0.8rem 1rem; margin: 1rem 0; }
.banner ul { margin: 0; padding-left: 1.1rem; }
.banner-ok { background: rgba(46, 196, 182, 0.16); color: #0b534c; }
.banner-err { background: rgba(199, 55, 18, 0.1); color: #8a2610; }
.ticket-wrap { padding: 2rem 0 4rem; }
.ticket { padding: clamp(1.3rem, 3vw, 2.2rem); position: relative; }
.ticket::before, .ticket::after {
  content: ""; position: absolute; width: 28px; height: 28px; border-radius: 50%; background: var(--cream); top: 58%;
}
.ticket::before { left: -14px; }
.ticket::after { right: -14px; }
.ticket-code {
  font-family: var(--serif); font-size: clamp(2rem, 6vw, 3.4rem); letter-spacing: 0.08em;
  margin: 0.6rem 0 1rem; color: var(--navy);
}
.ticket-compact { margin-bottom: 1rem; }
.found-list { margin: 1rem 0; }

.install-body { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; }
.install-card { width: min(560px, 100%); padding: 1.4rem; }
.install-logo { height: 92px; width: auto; mix-blend-mode: multiply; }

.rise { animation: rise 0.7s ease both; }
:focus-visible { outline: 3px solid var(--teal-deep); outline-offset: 3px; }

@keyframes drift { 50% { transform: translateY(-12px); } }
@keyframes glow { 50% { text-shadow: 0 0 24px rgba(46, 196, 182, 0.9); transform: scale(1.04); } }
@keyframes slide { to { transform: translateX(-50%); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

@media (min-width: 720px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: repeat(2, 1fr); }
  .school-list { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
}
@media (min-width: 960px) {
  .hero { padding-top: 2rem; }
  .hero-grid { grid-template-columns: 1.05fr 0.95fr; min-height: 62vh; }
  .book-band { grid-template-columns: 280px 1fr; }
  .register-grid { grid-template-columns: 0.8fr 1.2fr; }
  .card-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 899px) {
  .nav-toggle {
    display: inline-flex; width: 48px; height: 48px; border-radius: 14px; border: 1px solid var(--line);
    align-items: center; justify-content: center; flex-direction: column; gap: 5px; background: var(--paper); z-index: 40;
  }
  .nav-toggle span { display: block; width: 18px; height: 2px; background: var(--navy); }
  .site-nav {
    position: fixed; inset: 0; background: rgba(18, 27, 49, 0.96); color: white;
    display: flex; flex-direction: column; justify-content: center; padding: 2rem; gap: 0.3rem;
    transform: translateX(100%); transition: transform 0.28s ease; z-index: 35;
  }
  .site-nav a { color: white; font-size: 1.5rem; padding: 0.45rem 0; }
  .nav-close { display: inline-flex; align-self: flex-end; color: white; font-weight: 700; margin-bottom: 1rem; }
  .nav-check:checked ~ .site-nav { transform: none; }
  .nav-cta { width: fit-content; margin-top: 0.6rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rise, .orb, .slot-mystery, .marquee-track { animation: none; }
  .btn:hover, .event-card:hover { transform: none; }
}
@media print {
  .site-header, .site-footer, .announcement, .hero-actions .btn-ghost { display: none !important; }
  body { background: white; }
  .ticket { box-shadow: none; border: 1px solid #222; }
}
