@charset "utf-8";

:root {
  --ink: #333;
  --muted: #555;
  --line: #e5dbcd;
  --paper: #fff;
  --card-border: #f0ede6;
  --confetti-pattern: url("../images/confetti-background.svg");
  --warm-tint: #fffcf7;
  --field-border: var(--line);
  --section-gap: 4.8rem;
  /* Bright red for headings/decorations; deeper reds for readable controls and small text. */
  --accent: var(--heading-red);
  --accent-strong: #ad3935;
  --accent-hover: #8e302c;
  --required: var(--heading-red);
  --timeline: #e5d6bf;
  --font-sans: "M PLUS 1p", -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Yu Gothic", YuGothic, sans-serif;
  --heading-red: #d9534f;
  --heading-yellow: #f0ad4e;
  --heading-ink: #2c3e50;
  --heading-tint: #fff8f8;
  --header-height: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: auto; font-size: 62.5%; }
body, h1, h2, h3, h4, p, ol, ul, dl, dd, figure { margin: 0; }
ol, ul { padding: 0; }
button, input, textarea { font: inherit; }
button { color: inherit; }
img { display: block; width: 100%; height: auto; }

body {
  isolation: isolate;
  min-width: 320px;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-sans);
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1.8;
  letter-spacing: .05em;
  -webkit-font-smoothing: antialiased;
}

body.menu-open { overflow: hidden; }
a { color: inherit; }
#main-content {
  background-image: var(--confetti-pattern);
  background-position: center top;
  background-repeat: repeat;
}
#main-content.has-animated-confetti { background-image: none; }
.confetti-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}
#main-content:focus { outline: none; }
.skip-link {
  position: fixed;
  top: .8rem;
  left: 1.6rem;
  padding: .8rem 1.2rem;
  color: #fff;
  background: #050505;
  text-decoration: none;
  transform: translateY(calc(-100% - 1rem));
  transition: transform .2s ease;
  z-index: 100;
}
.skip-link:focus { transform: translateY(0); }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  border: 0;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
:where(a, button, input, textarea):focus-visible { outline: .3rem solid var(--accent); outline-offset: .3rem; }
.inner { width: 100%; margin-inline: auto; padding-inline: 1.6rem; }
.narrow { max-width: 84rem; }
.wide { max-width: 92rem; }
.section-space {
  margin-top: var(--section-gap);
  scroll-margin-top: calc(var(--header-height) + 2.4rem);
}
.section-card {
  position: relative;
  width: calc(100% - 4.8rem);
  max-width: 100rem;
  margin-inline: auto;
  padding-block: 6.4rem;
  border: 1px solid var(--card-border);
  border-radius: 1.2rem;
  background: var(--paper);
}

h2 {
  position: relative;
  margin-bottom: 5.6rem;
  padding-bottom: 1.3rem;
  color: var(--heading-red);
  font-size: clamp(3.2rem, 5vw, 4.48rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: .08em;
  text-align: center;
}

h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 6rem;
  height: .4rem;
  border-radius: .2rem;
  background: var(--heading-yellow);
  transform: translateX(-50%);
}

/* Shared text styles */
.inline-link, .contact-link, .attention a { text-decoration: underline; text-underline-offset: .2em; }
.program-notice, .program-attention, .attention li, .registration-form .help-text { color: var(--muted); font-size: 1.4rem; line-height: 1.7; }
.outline-list > dt, .registration-form .field-heading { color: var(--heading-ink); font-weight: 600; }

/* Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.6rem;
  position: fixed;
  inset: 0 0 auto;
  height: var(--header-height);
  padding-left: 1.6rem;
  border-bottom: 1px solid var(--card-border);
  background: var(--paper);
  transform: translateY(-102%);
  transition: transform .35s cubic-bezier(.25, 1, .5, 1);
  z-index: 50;
}

.site-header.is-visible { transform: translateY(0); }
.site-header:focus-within { transform: translateY(0); }
.header-logo {
  display: block;
  flex: 0 0 auto;
  padding: 1rem 0;
  border: 0;
  color: var(--ink);
  background: none;
  font-family: var(--font-sans);
  font-size: clamp(1.6rem, 4.6vw, 2rem);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: .035em;
  white-space: nowrap;
  text-decoration: none;
}
.header-logo-accent { color: var(--heading-red); }

.menu-button {
  position: relative;
  flex: 0 0 var(--header-height);
  width: var(--header-height);
  height: var(--header-height);
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.menu-button span {
  position: absolute;
  left: 1.6rem;
  width: 3.2rem;
  height: 1px;
  background: var(--ink);
  transition: top .2s ease .2s, transform .2s ease, opacity .2s ease .2s;
}

.menu-button span:nth-child(1) { top: 23px; }
.menu-button span:nth-child(2) { top: 32px; }
.menu-button span:nth-child(3) { top: 41px; }
.menu-button.is-active span { top: 32px; transition: top .2s ease, transform .2s ease .2s, opacity .2s ease .2s; }
.menu-button.is-active span:nth-child(1) { transform: rotate(45deg); }
.menu-button.is-active span:nth-child(2) { opacity: 0; }
.menu-button.is-active span:nth-child(3) { transform: rotate(-45deg); }

.header-nav {
  position: absolute;
  top: var(--header-height);
  left: 0;
  width: 100%;
  height: calc(100vh - var(--header-height));
  height: calc(100dvh - var(--header-height));
  overflow-y: auto;
  background: var(--paper);
  visibility: hidden;
  opacity: 0;
  transition: opacity .3s ease, visibility 0s linear .3s;
}

.header-nav.is-active { visibility: visible; opacity: 1; transition-delay: 0s; }
.header-nav ul { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2rem; min-height: 100%; padding: 4rem 2rem 8rem; list-style: none; }
.header-nav .link { display: block; padding: .4rem .8rem; border: 0; border-radius: .6rem; color: var(--ink); background: none; font-size: 1.7rem; font-weight: 800; white-space: nowrap; text-decoration: none; cursor: pointer; transition: color .2s ease, background-color .2s ease; }
.header-nav .registration-link { padding: .6rem 1.8rem; border-radius: 2rem; color: #fff; background: var(--accent-strong); font-weight: 700; }

/* Hero */
.hero { position: relative; width: 100%; height: 100vh; height: 100svh; overflow: hidden; background: #fff3d6; }
.hero-picture { display: block; position: absolute; inset: 0; }
.hero-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; z-index: 1; }

/* Keep the castle and event details in view on portrait tablets. */
@media (min-width: 768px) and (max-width: 1199px) and (max-aspect-ratio: 4 / 5) {
  .hero-image { object-position: center 25%; }
}

/* Preserve the desktop layout for wide, portrait-shaped windows. */
@media (min-width: 1200px) and (max-aspect-ratio: 1 / 1) {
  .hero-image { object-fit: contain; }
}

/* About */
.about-copy, .message-copy { line-height: 1.9; }
.about-copy p + p, .message-copy p + p { margin-top: 2.4rem; }
.about-copy .copy-heading {
  margin: 4rem 0 1.6rem;
  padding: 1rem 1.6rem;
  border-left: .5rem solid var(--heading-red);
  border-radius: 0 .4rem .4rem 0;
  color: var(--heading-ink);
  background: var(--heading-tint);
  font-size: clamp(1.8rem, 3vw, 2.2rem);
  font-weight: 700;
  line-height: 1.6;
}
.about-copy .copy-subheading, .timeline-content h4 {
  position: relative;
  margin: 2.8rem 0 .8rem;
  padding-left: 2rem;
  color: var(--heading-red);
  font-size: clamp(1.7rem, 2.6vw, 1.9rem);
  font-weight: 700;
  line-height: 1.6;
}
.about-copy .copy-subheading::before, .timeline-content h4::before {
  content: "";
  position: absolute;
  top: .55em;
  left: .2rem;
  width: .8rem;
  height: .8rem;
  background: var(--heading-yellow);
  transform: rotate(45deg);
}
.about .event-info { display: table; margin: 2.4rem 0 0 auto; color: var(--muted); text-align: right; }
.about-gallery { margin-top: 6.4rem; }
.about-gallery img { border-radius: .8rem; }

/* Message */
.company-info { display: table; margin: 6.4rem 0 0 auto; color: var(--muted); text-align: right; }

/* Program */
.program-notice { margin-bottom: 3.2rem; }
.timeline { list-style: none; }
.timeline-item { display: grid; grid-template-columns: 6.4rem minmax(0, 1fr); }
.timeline-time { position: relative; padding-right: 1rem; border-right: .6rem solid var(--timeline); font-size: 1.35rem; font-weight: 700; line-height: 1.45; letter-spacing: -.02em; white-space: nowrap; }
.timeline-time::after { content: ""; position: absolute; top: 0; right: -1.4rem; width: 2.2rem; height: 2.2rem; border: .4rem solid var(--paper); border-radius: 50%; background: var(--heading-red); }
.timeline-item:nth-child(even) .timeline-time::after { background: var(--heading-yellow); }
.timeline-content { padding: 0 0 5.6rem 2rem; }
.timeline-content h3 { margin-top: -.7rem; color: var(--heading-ink); font-size: clamp(2rem, 4vw, 2.5rem); font-weight: 700; line-height: 1.5; }
.timeline-title-part { display: inline-block; }
.timeline-content h4 { margin-top: 3.2rem; }
.timeline-session-title { margin-top: 1.2rem; color: var(--heading-ink); font-size: clamp(1.7rem, 2.2vw, 2rem); font-weight: 700; line-height: 1.7; overflow-wrap: anywhere; text-wrap: pretty; }
.timeline-session-subtitle { margin-top: .8rem; color: var(--muted); font-size: 1.4rem; line-height: 1.8; overflow-wrap: anywhere; text-wrap: pretty; }
.timeline-session-topics { margin-top: 1.6rem; padding-left: 1.4em; color: var(--muted); font-size: 1.4rem; line-height: 1.8; overflow-wrap: anywhere; text-wrap: pretty; }
.timeline-session-topics li + li { margin-top: .6rem; }
.speaker { display: flex; flex-direction: column; gap: 1.8rem; margin-top: 3.2rem; }
.speaker > img { width: min(100%, 20rem); aspect-ratio: 1 / 1; margin-inline: auto; padding: .6rem; border: 1px solid var(--line); border-radius: 1rem; background: var(--paper); object-fit: cover; }
.speaker .name { font-size: 2.1rem; line-height: 1.35; }
.speaker .role { margin-top: .6rem; font-size: 1.65rem; line-height: 1.55; }
.speaker .profile { margin-top: .8rem; font-size: 1.45rem; line-height: 1.65; }
.speaker-text-only { display: block; }
.break .timeline-content { padding-bottom: 4.6rem; }
.timeline-end .timeline-time { min-height: 29rem; padding-bottom: 0; border-right-color: transparent; }
.timeline-end .timeline-time::before {
  content: "";
  position: absolute;
  top: 0;
  right: -.6rem;
  width: .6rem;
  height: 100%;
  /* Keep the broken-line ending in the space reserved below the final speaker. */
  background: linear-gradient(
    to bottom,
    var(--timeline) 0 calc(100% - 14rem),
    transparent calc(100% - 14rem) calc(100% - 13rem),
    var(--timeline) calc(100% - 13rem) calc(100% - 9rem),
    transparent calc(100% - 9rem) calc(100% - 8rem),
    var(--timeline) calc(100% - 8rem) calc(100% - 5rem),
    transparent calc(100% - 5rem) calc(100% - 4rem),
    var(--timeline) calc(100% - 4rem) calc(100% - 2rem),
    transparent calc(100% - 2rem) calc(100% - 1rem),
    var(--timeline) calc(100% - 1rem) 100%
  );
}
/* Reserve the usual 5.6rem item gap, followed by the 14rem broken-line ending. */
.timeline-end .timeline-content { padding-bottom: 19.6rem; }
.program-attention { margin-top: 3rem; padding-left: 1em; text-indent: -1em; text-align: left; text-wrap: pretty; }
.program-attention + .program-attention { margin-top: 1.2rem; }
.program-attention::before { content: "※"; }

/* Outline — the same definition-list layout as the 2025 About section */
.outline-list { width: 100%; }
.outline-list > dt { padding: 2.4rem .8rem 0; border-top: 1px solid var(--line); }
.outline-list > dt:first-of-type { border-top: 0; }
.outline-list > dd { margin: .8rem 0 0; padding: 0 .8rem 2.4rem; }
.outline-list .datetime { display: flex; flex-direction: column; }
.outline-list .datetime .date { color: var(--heading-red); font-weight: 700; }
.outline-list .datetime .time { padding-left: 1.6rem; }
.outline-list .place.party { margin: 0; padding-top: 1.6rem; border-top: 1px solid var(--line); }
.outline-list .place .place-title { color: var(--heading-ink); font-weight: 700; }
.outline-list .place .venue { margin-top: 1.6rem; }
.outline-list .place iframe { display: block; width: 100%; height: 45rem; margin-top: 1.6rem; border: 0; border-radius: .8rem; }
.outline-list .place .address { margin-top: 0; }
.outline-list .due-date { font-weight: 600; }
.inline-link { padding: 0; border: 0; background: none; cursor: pointer; }
.fee-list { font-weight: 600; }
.fee-list dt { position: relative; margin-top: 1.6rem; padding-left: 1.6rem; }
.fee-list dt::before { content: "・"; position: absolute; left: 0; }
.fee-list dd { text-align: right; }
.attention { margin-top: 1.6rem; padding-left: 1.8rem; list-style-type: "※"; }
.attention li { padding-left: .3rem; }

/* Archive */
.archive-grid { display: grid; grid-template-columns: 1fr; gap: 4rem 2.8rem; list-style: none; }
.archive-grid a { display: flex; flex-direction: column; gap: 1.2rem; height: 100%; padding: 1.2rem 1.2rem 1.6rem; border: 1px solid var(--line); border-radius: .8rem; background: var(--paper); text-decoration: none; transition: background-color .25s ease, box-shadow .25s ease, transform .25s ease; }
.archive-grid span { color: var(--heading-ink); font-size: 1.45rem; font-weight: 600; text-align: center; transition: color .25s ease; }
.archive-grid img { order: -1; aspect-ratio: 16 / 9; border-radius: .3rem; object-fit: cover; background: var(--warm-tint); }
.archive-grid a:focus-visible { background: var(--warm-tint); box-shadow: 0 .8rem 2rem rgba(96, 72, 42, .1); }
.archive-grid a:focus-visible span { color: var(--accent-strong); }

/* Registration */
.event-registration { padding-bottom: var(--section-gap); }
.registration-inner > h2 { padding-inline: 1.6rem; }
.registration-notice[hidden] { display: none; }
.registration-notice-card { padding: clamp(2.4rem, 4vw, 4rem); border: 1px solid var(--field-border); border-radius: .8rem; background: var(--warm-tint); text-align: center; overflow-wrap: anywhere; }
.registration-notice-title { color: var(--heading-ink); font-size: 1.8rem; font-weight: 700; }
.registration-notice-card p + p { margin-top: 1.2rem; color: var(--muted); }
.registration-form .form-field { margin: 4rem auto 0; }
.registration-form .form-field:first-child { margin-top: 0; }
.registration-form fieldset.form-field { min-width: 0; padding: 0; border: 0; }
.registration-form legend { padding: 0; }
.registration-form .field-heading { display: inline; font-size: 1.7rem; }
.registration-form .field-heading::before { content: "■"; color: var(--heading-red); }
.registration-form .required-badge { margin-left: .6rem; padding: .2rem .7rem; border-radius: .4rem; color: var(--accent-strong); background: var(--heading-tint); font-size: 1.4rem; font-weight: 600; white-space: nowrap; }
.registration-form .help-text { margin-top: .8rem; }
.registration-form .errorlist { margin-top: .8rem; padding: 0; color: var(--accent-strong); font-size: 1.4rem; line-height: 1.7; }
.registration-form .errorlist li { margin: 0; }
.registration-form input:not([type="radio"]),
.registration-form textarea { width: 100%; margin-top: .8rem; padding: 1.6rem; border: 1px solid var(--field-border); border-radius: .8rem; color: var(--ink); background: var(--warm-tint); font-size: max(1.6rem, 1em); transition: border-color .18s ease, background-color .18s ease; }
.registration-form input:not([type="radio"]) { height: 5.6rem; }
.registration-form textarea { display: block; min-height: 14rem; resize: vertical; line-height: 1.7; }
.registration-form input:focus-visible,
.registration-form textarea:focus-visible { border-color: var(--accent); background: var(--paper); outline: .3rem solid rgba(217,83,79,.2); }
.registration-form input:not([type="radio"]):focus-visible,
.registration-form textarea:focus-visible { outline: none; }
.registration-form ul { display: flex; flex-direction: column; list-style: none; }
.registration-form li { margin-top: .8rem; }
.registration-form li label { display: grid; grid-template-columns: 4rem 1fr; align-items: center; min-height: 5.2rem; padding: 1.2rem; border: 1px solid var(--field-border); border-radius: .8rem; background: var(--warm-tint); cursor: pointer; }
.registration-form li label:has(input:checked) { border-color: var(--heading-red); background: var(--heading-tint); }
.registration-form input[type="radio"] { width: 2.4rem; height: 2.4rem; margin: 0; accent-color: var(--required); cursor: pointer; }
.participants-list { display: grid; gap: 1.6rem; }
.participants-list:not(:empty) { margin-top: 1.6rem; }
.participant-card { min-width: 0; padding: clamp(1.6rem, 3vw, 2.4rem); border: 1px solid var(--field-border); border-radius: .8rem; background: var(--paper); scroll-margin-block: calc(var(--header-height) + 1.6rem) 1.6rem; }
.participant-header { display: flex; align-items: center; justify-content: space-between; gap: 1.2rem; margin-bottom: 1.6rem; }
.participant-title { color: var(--heading-ink); font-size: 1.6rem; font-weight: 700; }
.participant-fields { display: grid; gap: 1.6rem; }
.participant-field { min-width: 0; }
.participant-label { color: var(--heading-ink); font-weight: 600; }
.participant-button { min-height: 4.4rem; padding: .8rem 1.2rem; border: 1px solid var(--field-border); border-radius: .8rem; color: var(--accent-strong); background: var(--warm-tint); font-weight: 600; cursor: pointer; transition: background-color .2s ease; }
.participant-add { width: 100%; margin-top: 1.6rem; padding: 1.2rem; font-size: 1.6rem; scroll-margin-block: calc(var(--header-height) + 1.6rem) 1.6rem; }
.participant-remove { flex-shrink: 0; font-size: 1.4rem; }
.participant-button:disabled { color: var(--muted); cursor: default; }
.registration-form #submit-button { display: block; width: 100%; margin: 4rem auto 0; padding: 1.6rem; border: 0; border-radius: .8rem; color: #fff; background: var(--accent-strong); font-weight: 600; cursor: pointer; transition: background-color .2s ease; }
.registration-form #submit-button:disabled { color: var(--muted); background: #eee9e2; cursor: default; }
footer { padding: 2.2rem 1.6rem; border-top: 1px solid var(--card-border); color: var(--muted); background: var(--warm-tint); font-size: 1.2rem; text-align: center; }

/* Hover effects are reserved for desktop-sized, mouse-capable layouts. */
@media (min-width: 1200px) and (hover: hover) and (pointer: fine) {
  .header-nav .link:hover { color: var(--accent-strong); background: var(--heading-tint); }
  .header-nav .registration-link:hover { color: #fff; background: var(--accent-hover); }
  .inline-link:hover, .contact-link:hover, .attention a:hover { color: var(--accent-strong); }
  .archive-grid a:hover { background: var(--warm-tint); box-shadow: 0 .8rem 2rem rgba(96, 72, 42, .1); transform: translateY(-3px); }
  .archive-grid a:hover span { color: var(--accent-strong); }
  .participant-button:not(:disabled):hover { background: var(--heading-tint); }
  .registration-form #submit-button:not(:disabled):hover { background: var(--accent-hover); }
}

@media (min-width: 480px) {
  .inner { padding-inline: 2.4rem; }
  .archive-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .timeline-item { grid-template-columns: 10rem minmax(0, 1fr); }
  .timeline-time { font-size: 1.5rem; }
  .timeline-content { padding-left: 2.6rem; }
}

@media (min-width: 640px) {
  .timeline-item { grid-template-columns: 13rem minmax(0, 1fr); }
}

@media (min-width: 720px) {
  .participant-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .outline-list { display: flex; flex-wrap: wrap; }
  .outline-list > dt { width: 20%; padding: 1.6rem 0 1.6rem .8rem; }
  .outline-list > dd { width: 80%; margin: 0; padding: 1.6rem .8rem 1.6rem 0; border-top: 1px solid var(--line); }
  .outline-list > dd:first-of-type { border-top: 0; }
  .outline-list .place.party { width: 100%; margin-left: calc(20% - 1.6rem); padding-left: 1.6rem; }
  .fee-list { display: grid; grid-template-columns: 1fr 16rem; }
  .fee-list dt { margin: 0; padding: 0; }
  .fee-list dt::before { content: none; }
}

@media (min-width: 800px) {
  .speaker { flex-direction: row; gap: 2.6rem; }
  .speaker > img { flex: 0 0 20rem; width: 20rem; margin: 0; }
  .speaker > div { min-width: 0; padding-top: .8rem; }
  .speaker-text-only > div { padding-top: 0; }
}

@media (min-width: 880px) {
  html.is-scroll-ready { scroll-behavior: smooth; }
  .site-header { padding-right: 1.6rem; }
  .header-logo { font-size: clamp(1.8rem, calc(2.5vw - .4rem), 2rem); }
  .menu-button { display: none; }
  .header-nav { position: static; width: auto; height: auto; overflow: visible; background: none; visibility: visible; opacity: 1; }
  .header-nav ul { flex-direction: row; gap: 1.2rem; min-height: 0; padding: 0; }
  .header-nav .link { font-size: 1.4rem; letter-spacing: 0; }
}

@media (max-width: 767px) {
  :root { --confetti-pattern: none; }
  .confetti-canvas { display: none; }
}

@media (max-width: 639px) {
  :root { --section-gap: 3.2rem; }
  /* WebKit does not reliably wrap a time range at the hyphen between time elements. */
  .timeline-time time:last-child { display: block; }
  .section-space { scroll-margin-top: calc(var(--header-height) + 1.6rem); }
  .section-card { width: calc(100% - 2.4rem); padding-block: 3.2rem; border-radius: 1rem; }
  .section-card .inner { padding-inline: 1.2rem; }
  h2 { margin-bottom: 3.2rem; }
  .about-gallery { margin-top: 4rem; }
  .outline-list .place iframe { height: 32rem; }
  .registration-form .field-heading { font-size: 1.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .archive-grid a:hover { transform: none; }
  #main-content.has-animated-confetti { background-image: var(--confetti-pattern); }
  .confetti-canvas { display: none; }
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
}
