/* Mobile reading and navigation for the official site.
   The supplied words, seasonal palette and MIT-licensed hero motion are retained.
   Menu keyframes below are original; timing is inspired by yui540.com's staged motion. */
@media screen and (max-width: 820px) {
  html { scroll-padding-top: 88px; }
  body { font-size: 16px; line-height: 1.95; }
  :root { --season-break: 48px; }
  .wrap { width: calc(100% - 40px); max-width: 640px; }
  .section-pad { padding-block: 52px; }
  h2 { font-size: 28px; line-height: 1.65; }
  h3 { font-size: 25px; }
  .kicker { font-size: 13px; margin-bottom: 12px; letter-spacing: .04em; }
  .button, .quiet-link { min-height: 52px; font-size: 15px; }
  .button { padding: 13px 20px; }
  .split, .thought-layout, .mission-layout, .greeting-layout,
  .contact-layout, .greeting-teaser, .office-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  /* One readable menu row per destination; a short screen can scroll inside it. */
  .header-inner { width: calc(100% - 32px); min-height: 68px; gap: 12px; }
  html:not(.js) .site-header { position: static; }
  .brand { min-height: 48px; font-size: 22px; gap: 9px; letter-spacing: .04em; }
  .brand img { width: 32px; height: 32px; }
  .js .menu-toggle {
    min-width: 104px; min-height: 48px; padding: 8px 12px;
    font-size: 13px; gap: 10px; border-color: #cbd1d8;
  }
  .menu-mark { position: relative; width: 18px; height: 16px; border: 0; }
  .menu-mark::before, .menu-mark::after {
    content: ""; position: absolute; left: 0; width: 18px; height: 2px;
    background: currentColor; transition: transform .35s ease;
  }
  .menu-mark::before { top: 4px; }
  .menu-mark::after { bottom: 3px; }
  .menu-toggle[aria-expanded="true"] .menu-mark { height: 16px; transform: none; }
  .menu-toggle[aria-expanded="true"] .menu-mark::before { transform: translateY(3.5px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] .menu-mark::after { transform: translateY(-3.5px) rotate(-45deg); }
  .site-nav { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; padding: 8px 0 18px; }
  .js .site-nav {
    position: absolute; inset: calc(100% + 1px) 0 auto; width: 100%;
    padding: 8px max(20px, env(safe-area-inset-right)) 20px max(20px, env(safe-area-inset-left));
    max-height: calc(100vh - 70px); max-height: calc(100dvh - 70px);
    overflow-y: auto; overscroll-behavior: contain;
    background: #fff; border-top: 0; border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 28px #24314314;
  }
  .site-nav[hidden] { display: none; }
  .site-nav a, .site-nav a:last-child {
    min-height: 56px; padding: 14px 8px; border: 0;
    border-bottom: 1px solid var(--line); font-size: 16px;
  }
  .site-nav a::after { display: none; }
  .site-nav a[aria-current="page"] { background: var(--spring-soft); }

  /* The emblem and name form one compact introduction, on white. */
  .hero-layout {
    grid-template-columns: minmax(0, 1fr); gap: 0;
    max-width: 560px; min-height: 0; padding-block: 26px 32px;
  }
  .hero-copy { display: contents; }
  .hero-art {
    grid-row: 1; width: clamp(144px, 42vw, 180px); max-width: 100%;
    justify-self: center; padding: 0; margin: 0 0 12px;
  }
  .art-frame { aspect-ratio: 1; padding: 0; box-shadow: none; }
  .art-guide { display: none; }
  .art-seal { width: 26px; height: 29px; right: 1px; bottom: 2px; font-size: 18px; }
  .official-hero h1 { font-size: clamp(40px, 11.5vw, 62px); line-height: 1.45; letter-spacing: .035em; }
  .title-mask { justify-content: center; }
  .hero-motto { margin-top: 4px; text-align: center; font-size: 30px; line-height: 1.7; }
  .hero-statement { margin-top: 20px; max-width: 34em; font-size: 16px; line-height: 1.95; }
  .hero-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 24px; }
  .hero-actions .button, .hero-actions .quiet-link {
    width: 100%; min-width: 0; min-height: 52px; margin: 0; padding: 12px 8px;
    border: 1px solid var(--red); font-size: 14px; justify-content: center; text-align: center;
  }
  .hero-foot { display: none; }
  .event-notice { display: grid; gap: 10px; padding-block: 24px; }
  .notice-label { justify-self: start; font-size: 13px; padding: 3px 10px; }
  .event-notice a { width: 100%; min-height: 48px; font-size: 16px; line-height: 1.8; }
  .notice-tail { display: none; }

  /* Body copy stays at reading size, rather than shrinking to fit columns. */
  .thought-layout h2 { font-size: 30px; line-height: 1.65; }
  .thought-rule { width: 48px; margin-top: 20px; }
  .thought-copy .lead, .mission-copy .lead { font-size: 23px; line-height: 1.9; }
  .thought-copy > p:not(.lead), .mission-copy p:not(.lead),
  .section-heading > p:last-child:not(.kicker),
  .activity-journal > p:not(.kicker), .greeting-teaser p:not(.lead):not(.kicker),
  .office-layout > div > p:not(.kicker), .journal-section .split > div > p:not(.lead),
  .contact-layout > div > p:not(.kicker), .contact-guidance p,
  .credits-content p, .credits-content li {
    font-size: 16px; line-height: 1.95;
  }
  .heading-row { display: block; margin-bottom: 28px; }
  .heading-row .quiet-link { margin-top: 12px; }
  .activities-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .activity-event { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .activity-visual { display: block; width: 100%; max-width: 340px; margin: 0; justify-self: center; }
  .activity-visual img { width: 100%; height: auto; }
  .activity-copy .kicker { font-size: 15px; margin-bottom: 5px; }
  .activity-copy h3 { font-size: 32px; }
  .activity-copy .event-detail-link {
    display: flex; justify-content: center; width: 100%; min-height: 54px;
    margin-top: 18px; padding: 13px 18px; font-size: 16px; text-align: center;
    color: #fff; background: var(--red); border: 1px solid var(--red);
  }
  .activity-copy .event-detail-link::after { display: none; }
  .activity-copy .event-detail-link:active { background: var(--ink); border-color: var(--ink); }
  .activity-journal { padding: 32px 0 0; border-left: 0; border-top: 1px solid #dec887; min-height: 0; }
  .activity-journal h3 { font-size: 28px; line-height: 1.7; }
  .journal-letter { top: 25px; right: 0; font-size: 112px; opacity: .7; }
  .greeting-teaser { gap: 16px; }
  .greeting-teaser p:not(.lead):not(.kicker) { margin-top: 0; }
  .home-office { padding-top: 32px; }
  .office-layout { padding-top: 32px; }
  .office-address { padding: 24px 20px; }
  .office-address address { font-size: 16px; }
  .office-address p { font-size: 14px !important; }
  .address-label { font-size: 14px; }
  .contact-band { padding-block: 40px; }
  .contact-band > .wrap { display: block; }
  .contact-band h2 { font-size: 26px; }
  .contact-band .button { display: flex; width: 100%; max-width: 360px; margin-top: 24px; }

  /* Inner pages use the same rhythm and touch sizes. */
  .page-intro { padding-top: 18px; padding-bottom: 44px; }
  .page-intro h1 { font-size: clamp(30px, 7.5vw, 38px); line-height: 1.6; }
  .page-intro > p { font-size: 16px; margin-top: 12px; }
  .page-intro::after { bottom: 20px; }
  .breadcrumb { font-size: 13px; gap: 12px; margin-bottom: 20px; }
  .breadcrumb a { min-height: 44px; }
  .mission-title { position: relative; display: block; padding-right: 76px; }
  .mission-title h2 { font-size: 42px; }
  .mission-title img { position: absolute; right: 0; bottom: 0; width: 64px; margin: 0; }
  .profile-table > div { grid-template-columns: minmax(0, 1fr); gap: 8px; padding-block: 22px; }
  .profile-table dt { font-size: 14px; color: var(--muted); }
  .profile-table dd, .profile-table address { font-size: 16px; line-height: 1.95; }
  .profile-table dd > a { display: inline-flex; align-items: center; min-height: 44px; }
  .address-note { font-size: 14px; padding-left: 13px; }
  .page-greeting .full-greeting { padding-top: 16px; }
  .greeting-letter { padding: 24px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .greeting-letter h2 { font-size: 24px; line-height: 1.9; }
  .greeting-letter p { font-size: 16px; line-height: 1.95; }
  .status-label { font-size: 13px; }
  .greeting-return { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 32px; }
  .greeting-return .quiet-link { justify-content: center; padding: 10px 8px; border: 1px solid var(--red); font-size: 14px; text-align: center; }
  .event-layout { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .event-layout figure { width: 100%; max-width: 340px; justify-self: center; }
  .event-info h2 { font-size: 42px; }
  .event-info h2 > .event-subtitle { font-size: 16px; }
  .event-info .button { width: 100%; margin-top: 22px; font-size: 16px; }
  .archive-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; margin-top: 28px; }
  .archive-card { display: block; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
  .archive-card > div { position: relative; width: 100%; aspect-ratio: 1.6; padding: 0; overflow: hidden; }
  .archive-card img { position: absolute; inset: 12px; width: calc(100% - 24px); height: calc(100% - 24px); object-fit: contain; }
  .archive-card p { font-size: 15px; margin-top: 18px; }
  .archive-card h3 { font-size: 26px; margin-top: 4px; }
  .archive-card > span { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; margin-top: 8px; }
  .support-section summary { font-size: 16px; min-height: 56px; }
  .support-section ul { display: grid; gap: 0; }
  .support-section li a { display: flex; min-height: 52px; font-size: 16px; padding-block: 10px; }
  .contact-content, .credits-content { padding-top: 16px; }
  .contact-layout { gap: 36px; }
  .contact-layout h2 { font-size: 30px; }
  .email-display { font-size: 18px; min-height: 48px; margin-top: 24px; display: flex; align-items: center; }
  .contact-layout .button { width: 100%; margin-top: 18px; font-size: 16px; }
  .contact-layout > div .small-note { font-size: 14px; }
  .contact-guidance { padding: 26px 20px; }
  .contact-guidance h3 { font-size: 18px; }
  .contact-address address { font-size: 16px; }
  .contact-address p { font-size: 14px; }
  .social-list > a { flex-direction: column; align-items: start; gap: 5px; padding-block: 20px; }
  .social-list > a span { font-size: 15px; }
  .credits-content h2 { font-size: 25px; overflow-wrap: anywhere; }
  .credits-content p, .credits-content li { overflow-wrap: anywhere; }
  .copyright-notice { padding: 14px; }
  .footer-main { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .footer-identity p { font-size: 15px; }
  .footer-nav { max-width: none; gap: 0 18px; }
  .footer-nav a, .footer-social a { font-size: 14px; min-height: 48px; }
  .footer-social { justify-content: start; gap: 30px; }
  .footer-bottom > p { font-size: 12px; line-height: 1.9; }
  .footer-bottom > div { gap: 4px 20px; }
  .footer-bottom small { font-size: 12px; }
  .footer-bottom a { min-height: 44px; font-size: 13px; }
}

@media screen and (min-width: 621px) and (max-width: 820px) {
  .archive-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
}
@media screen and (max-width: 380px) {
  .wrap { width: calc(100% - 32px); }
  .header-inner { width: calc(100% - 24px); gap: 8px; }
  .brand { font-size: 20px; gap: 7px; }
  .js .menu-toggle { min-width: 96px; padding-inline: 10px; }
  .greeting-return { grid-template-columns: minmax(0, 1fr); }
}

/* A deliberate, single sequence when the visitor opens the menu. */
@media screen and (max-width: 820px) and (prefers-reduced-motion: no-preference) {
  .js .site-nav:not([hidden]) { animation: daienkai-menu-open .6s ease-out both; }
  .js .site-nav:not([hidden]) > a { animation: daienkai-menu-item .45s ease-out both; }
  .js .site-nav:not([hidden]) > a:nth-child(2) { animation-delay: .06s; }
  .js .site-nav:not([hidden]) > a:nth-child(3) { animation-delay: .12s; }
  .js .site-nav:not([hidden]) > a:nth-child(4) { animation-delay: .18s; }
  .js .site-nav:not([hidden]) > a:nth-child(5) { animation-delay: .24s; }
}
@keyframes daienkai-menu-open {
  from { opacity: 0; transform: translateY(-8px); clip-path: inset(0 0 16%); }
  to { opacity: 1; transform: translateY(0); clip-path: inset(0); }
}
@keyframes daienkai-menu-item {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
