/* Seishinjuku New York — quiet, editorial, bilingual. Small type, generous space, one accent (shu red). */
:root {
  /* Text size is set on <html> (Standard / Large / Extra large); every font-size is in rem. */
  --paper: #f6f4ef;
  --card: #fbfaf7;
  --ink: #1d1d1b;
  --text: #3a3833;
  --muted: #6b665d; /* 5.2:1 on paper (WCAG AA) */
  --line: #dcd7cc;
  --accent: #b0362e;
  --dark: #1d1d1b;
  --on-dark: #e9e5dc;
  --serif: "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --sans: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", sans-serif;
  --wrap: 1040px;
  --header: 60px;
}
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header) + 16px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--text); font: 400 1.006rem/1.95 var(--sans); letter-spacing: .03em; overflow-wrap: anywhere; }
/* Phrase-aware breaking only for short text; long paragraphs wrap normally (iOS Safari leaves ragged gaps and clips lines otherwise). */
h1, h2, h3, .label, .slogan, .title, .events .name, .events .topic, .news .t, .duo strong, .principles strong, .site-nav a, .footer-nav a { word-break: auto-phrase; text-wrap: balance; }
html[lang="en"] body { letter-spacing: .005em; line-height: 1.8; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { color: var(--ink); font-family: var(--serif); font-weight: 600; margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 720px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }

/* header */
.site-header { position: sticky; top: 0; z-index: 30; background: rgba(246, 244, 239, .94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header); }
.logo { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); line-height: 1.25; padding-left: 12px; border-left: 2px solid var(--accent); }
.logo-ja { font: 600 15px/1.3 var(--serif); letter-spacing: .1em; white-space: nowrap; }
.logo-en { font-size: 9px; white-space: nowrap; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); }
.lang-mobile { margin-right: 14px; display: inline-flex; align-items: center; gap: 5px; text-decoration: none; color: var(--ink); font-size: 11px; white-space: nowrap; letter-spacing: .06em; padding: 6px 2px; }
.lang-mobile svg { color: var(--muted); }
.nav-toggle { background: none; border: 0; padding: 10px 4px; cursor: pointer; }
.nav-toggle .bar { display: block; width: 22px; height: 1.5px; margin: 6px 0; background: var(--ink); transition: transform .2s; }
.nav-toggle[aria-expanded="true"] .bar:nth-of-type(1) { transform: translateY(3.75px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bar:nth-of-type(2) { transform: translateY(-3.75px) rotate(-45deg); }
.site-nav { position: absolute; top: var(--header); left: 0; right: 0; display: none; flex-direction: column; background: var(--paper); border-bottom: 1px solid var(--line); padding: 6px 20px 14px; }
.site-nav.is-open { display: flex; }
.site-nav a { text-decoration: none; color: var(--ink); font-size: 14px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.site-nav a:last-child { border-bottom: 0; }
.site-nav a[aria-current="page"] { color: var(--accent); }


/* hero (photo only) */
.hero { background: var(--dark); }
.hero img { width: 100%; aspect-ratio: 16 / 10; max-height: 520px; object-fit: cover; opacity: .92; }

/* sections */
.section { padding-block: 56px; }
.section + .section { border-top: 1px solid var(--line); }
.label { display: block; margin: 0 0 8px; font-size: 0.719rem; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); text-wrap: balance; }
.title { font-size: 1.366rem; line-height: 1.6; letter-spacing: .08em; padding-left: 12px; border-left: 2px solid var(--accent); margin-bottom: 22px; }
.lead-block { padding-block: 48px 52px; }
.slogan { font: 600 1.438rem/1.7 var(--serif); letter-spacing: .14em; color: var(--ink); margin: 0 0 16px; }
.lead { margin: 0; font-size: 1.006rem; }
.more { margin: 22px 0 0; font-size: 0.862rem; }
.more a { text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--accent); padding-bottom: 2px; letter-spacing: .08em; }
.more a::after { content: " →"; color: var(--accent); }
.note { font-size: 0.862rem; color: var(--muted); }

/* schedule */
.events { list-style: none; margin: 0; padding: 0; }
.events li { display: grid; grid-template-columns: 76px 1fr; gap: 2px 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.events .date { grid-row: span 5; font: 600 0.934rem/1.4 var(--serif); color: var(--ink); }
.events .venue { font-weight: 400; color: var(--muted); }
.events .topic { font-size: 0.898rem; color: var(--text); grid-column: 2; }
.events .meta { grid-column: 2; }
.events .note-line { grid-column: 2; margin-top: 6px; padding-left: 9px; border-left: 2px solid var(--accent); font-size: 0.862rem; line-height: 1.7; color: var(--ink); }
.events .detail { grid-column: 2; font-size: 0.862rem; color: var(--muted); line-height: 1.75; }
.events li.month { display: block; padding: 22px 0 8px; border-bottom: 1px solid var(--ink); font: 600 0.934rem/1.4 var(--serif); letter-spacing: .12em; color: var(--ink); }
.events li.month:first-child { padding-top: 4px; }
.events .date small { display: block; font: 400 0.791rem/1.6 var(--sans); color: var(--muted); }
.events .name { font-size: 0.934rem; font-weight: 500; color: var(--ink); line-height: 1.6; }
.events .meta { font-size: 0.791rem; color: var(--muted); }
.events li[hidden] { display: none; }
.events-empty { font-size: 0.934rem; color: var(--muted); padding: 14px 0; border-bottom: 1px solid var(--line); margin: 0; }
.past-toggle { margin-top: 18px; background: none; border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; font: inherit; font-size: 0.862rem; color: var(--ink); cursor: pointer; }

/* activities */
.cols { display: grid; gap: 22px; }
.col h3 { font-size: 1.006rem; letter-spacing: .08em; margin-bottom: 6px; }
.col p { margin: 0; font-size: 0.934rem; }

/* news */
.news { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.news a { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.news time { font-size: 0.791rem; color: var(--muted); letter-spacing: .06em; }
.news .cat { font-size: 0.719rem; color: var(--accent); letter-spacing: .1em; margin-left: 10px; }
.news .t { display: block; font-size: 0.934rem; font-weight: 500; line-height: 1.7; margin-top: 2px; }
.news a:hover .t { color: var(--accent); }

/* philosophy links */
.duo { display: grid; gap: 12px; }
.duo a { display: block; padding: 18px 18px; border: 1px solid var(--line); background: var(--card); text-decoration: none; color: var(--ink); }
.duo a strong { display: block; font: 600 1.078rem/1.5 var(--serif); letter-spacing: .1em; }
.duo a span { font-size: 0.791rem; color: var(--muted); }
.duo a:hover { border-color: var(--ink); }

/* join */
.join { background: var(--dark); color: var(--on-dark); }
.join .title { color: #fff; }
.join p { font-size: 0.934rem; margin: 0 0 12px; }
.buttons { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 20px; border: 1px solid currentColor; text-decoration: none; font-size: 0.862rem; letter-spacing: .12em; color: inherit; background: none; font-family: inherit; cursor: pointer; }
.btn.solid { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn:hover { opacity: .85; }

/* inner pages */
.page-head { padding-block: 44px 8px; }
.page-head h1 { font-size: 1.509rem; letter-spacing: .1em; padding-left: 12px; border-left: 2px solid var(--accent); }
.prose { font-size: 1.006rem; }
.prose h2 { font-size: 1.15rem; letter-spacing: .08em; margin: 36px 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.prose h3 { font-size: 1.006rem; margin: 24px 0 8px; }
.prose p { margin: 0 0 1em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin: .2em 0; }
.prose a { color: var(--accent); overflow-wrap: anywhere; }
.prose img { margin: 1.2em 0; border: 1px solid var(--line); }
.facts { margin: 0 0 1.2em; border-top: 1px solid var(--line); }
.facts div { display: grid; grid-template-columns: 7em 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 0.934rem; }
html[lang="en"] .facts div { grid-template-columns: 9em 1fr; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; color: var(--ink); }
.principles { list-style: none; counter-reset: p; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.prose .principles { padding-left: 0; border-top: 0; }
.principles li { counter-increment: p; display: grid; grid-template-columns: 2.4em 1fr; padding: 12px 0; border-bottom: 1px solid var(--line); }
.principles li::before { content: counter(p); font: 600 0.934rem/1.7 var(--serif); color: var(--accent); }
.principles strong { display: block; font: 600 1.006rem/1.7 var(--serif); color: var(--ink); letter-spacing: .04em; }
.principles span { display: block; font-size: 0.862rem; color: var(--muted); }
.source { font-size: 0.791rem; color: var(--muted); margin-top: 14px; }
.books { font-size: 0.862rem; padding-left: 1.2em; letter-spacing: 0; }

/* article */
.article { padding-block: 40px 64px; }
.article .crumbs { font-size: 0.791rem; margin: 0 0 14px; letter-spacing: .08em; }
.article .crumbs a { color: var(--muted); text-decoration: none; }
.article time { font-size: 0.791rem; color: var(--muted); letter-spacing: .06em; }
.article h1 { font-size: 1.366rem; line-height: 1.65; margin: 6px 0 26px; letter-spacing: .04em; }
.neighbors { display: grid; gap: 10px; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 0.862rem; }
.neighbors a { text-decoration: none; color: var(--ink); }
.neighbors span { display: block; font-size: 0.719rem; color: var(--muted); letter-spacing: .1em; }
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 26px; font-size: 0.862rem; }
.pager a { text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--accent); }
.pager .count { color: var(--muted); }

/* form */
.form { display: grid; gap: 14px; max-width: 560px; margin-top: 8px; }
.form .row2 { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
.form label { display: grid; gap: 4px; font-size: 0.862rem; color: var(--ink); }
.form input, .form textarea, .form select { font: inherit; font-size: 1.006rem; padding: 10px 12px; border: 1px solid #8f897e; background: #fff; color: var(--ink); border-radius: 0; }
.form textarea { min-height: 140px; resize: vertical; }
.form input:focus, .form textarea:focus, .form select:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.form .req { color: var(--accent); margin-left: 4px; }
.form .btn { justify-self: start; }

/* footer */
.site-footer { background: var(--dark); color: var(--on-dark); padding: 44px 0 30px; font-size: 0.862rem; }
.footer-name { font: 600 1.006rem/1.5 var(--serif); letter-spacing: .14em; margin: 0 0 8px; color: #fff; }
.footer-name span { display: block; font: 400 0.647rem/1.6 var(--sans); letter-spacing: .26em; text-transform: uppercase; color: #a39d92; }
.footer-mail { margin: 0 0 18px; }
.footer-mail a { color: var(--on-dark); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 22px; }
.footer-nav a { color: var(--on-dark); text-decoration: none; }
.copy { margin: 0; color: #8f897e; font-size: 0.719rem; letter-spacing: .1em; }


/* text size button */
.fs-btn { margin-left: auto; margin-right: 10px; display: inline-flex; align-items: baseline; gap: 5px; background: none; border: 1px solid var(--line); border-radius: 999px; padding: 4px 9px; font: inherit; font-size: 11px; color: var(--ink); cursor: pointer; line-height: 1.2; white-space: nowrap; }
.fs-btn:hover { border-color: var(--ink); }
.fs-icon { font-family: var(--serif); font-size: 12px; letter-spacing: 0; }
.fs-icon span { font-size: 15px; }
.fs-text { display: none; }
.fs-level { color: var(--accent); font-weight: 500; }
/* related events sit in the same months, marked with a tag */
.events li.is-related .name, .events li.is-related .date { color: var(--text); }
.events .tag { display: inline-block; font: 500 0.7rem/1.6 var(--sans); letter-spacing: .06em; color: var(--accent); border: 1px solid currentColor; padding: 0 6px; margin-right: 8px; vertical-align: 2px; }

@media (min-width: 820px) {
  .fs-btn { order: 4; margin: 0 0 0 18px; }
  .site-nav { order: 2; margin-left: auto; }
  .fs-text { display: inline; }
  :root { --header: 72px; }
  body { font-size: 1.042rem; }
  .nav-toggle { display: none; }
  .lang-mobile { order: 3; margin: 0 0 0 26px; }
  .site-nav { position: static; display: flex; flex-direction: row; gap: 22px; padding: 0; background: none; border: 0; }
  .site-nav a { padding: 0; border: 0; font-size: 13px; }
  .site-nav a:hover { color: var(--accent); }
  .logo-ja { font-size: 16px; }
  .hero img { aspect-ratio: 21 / 8; }
  .section { padding-block: 72px; }
  .lead-block { padding-block: 64px; }
  .slogan { font-size: 1.581rem; }
  .two { display: grid; grid-template-columns: 220px 1fr; gap: 40px; }
  .two .title { margin-bottom: 0; }
  .cols { grid-template-columns: repeat(3, 1fr); gap: 32px; }
  .duo { grid-template-columns: 1fr 1fr; }
  .books { columns: 2; }
  .neighbors { grid-template-columns: 1fr 1fr; }
  .neighbors .older { grid-column: 2; text-align: right; }
}
html[data-fs="l"] { font-size: 112.5%; }
html[data-fs="xl"] { font-size: 125%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* links inside running text are always underlined (not by color alone) */
.prose a, .section p a, .article a, .note a { text-decoration: underline; text-underline-offset: 3px; }
.form .req-note { font-size: 0.791rem; color: var(--muted); margin: 0; }

/* cookie notice — bottom bar, two equal choices */
.consent { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 50; max-width: 560px; margin: 0 auto; background: var(--card); color: var(--text); border: 1px solid var(--line); box-shadow: 0 6px 24px rgba(29, 29, 27, .12); padding: 16px 18px; font-size: 0.862rem; line-height: 1.75; }
.consent p { margin: 0 0 12px; }
.consent a { text-decoration: underline; text-underline-offset: 3px; }
.consent .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.consent button { min-height: 40px; padding: 0 16px; font: inherit; font-size: 0.791rem; letter-spacing: .06em; cursor: pointer; border: 1px solid var(--ink); background: none; color: var(--ink); }
.consent button[data-consent="all"] { background: var(--ink); color: #fff; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 14px; font-size: 0.791rem; }
.footer-legal a, .footer-legal button { color: #c9c3b8; text-decoration: none; background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.footer-legal a:hover, .footer-legal button:hover { color: #fff; }

/* accessibility button, bottom right */
.a11y-btn { position: fixed; right: 14px; bottom: calc(14px + var(--consent-h, 0px)); z-index: 40; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 2px 10px rgba(29, 29, 27, .25); }
.a11y-btn svg { width: 26px; height: 26px; }
.a11y-panel { position: fixed; right: 14px; bottom: calc(68px + var(--consent-h, 0px)); z-index: 41; width: min(300px, calc(100vw - 28px)); background: var(--card); border: 1px solid var(--line); box-shadow: 0 6px 24px rgba(29, 29, 27, .14); padding: 16px 18px; font-size: 0.862rem; }
.a11y-panel h2 { font: 600 0.934rem/1.4 var(--serif); margin: 0 0 12px; }
.a11y-panel .grp { margin: 0 0 14px; }
.a11y-panel .grp > span { display: block; font-size: 0.791rem; color: var(--muted); margin-bottom: 6px; }
.a11y-panel .seg { display: flex; gap: 6px; }
.a11y-panel .seg button, .a11y-panel .toggle { flex: 1; min-height: 40px; font: inherit; font-size: 0.791rem; background: #fff; color: var(--ink); border: 1px solid #8f897e; cursor: pointer; }
.a11y-panel .seg button[aria-pressed="true"], .a11y-panel .toggle[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.a11y-panel .toggle { width: 100%; margin-bottom: 6px; }
.a11y-panel a { text-decoration: underline; text-underline-offset: 3px; font-size: 0.791rem; }

/* high contrast + underlined links (chosen in the accessibility panel) */
html[data-contrast="high"] { --text: #000; --ink: #000; --muted: #333; --line: #555; --paper: #fff; --card: #fff; --accent: #8a1f19; }
html[data-contrast="high"] .site-header { background: #fff; }
html[data-links="underline"] a { text-decoration: underline !important; text-underline-offset: 3px; }
/* small phones: keep logo, text size and language switch from touching */
@media (max-width: 400px) {
  .logo { padding-left: 10px; }
  .logo-ja { font-size: 14px; letter-spacing: .06em; }
  .logo-en { letter-spacing: .16em; }
  .fs-btn { padding: 4px 7px; margin-right: 8px; }
  .lang-mobile { margin-right: 10px; }
}
