/* 雲上拝 日本語サイト（/ja/）— Japan country team. Theme: /home/claude/design/ja/spec.md
   sutra-copying paper (写経用紙): white paper, faint vertical rules, sumi ink, one purple, one flame.
   No web font (Japanese fonts are MB-sized); Mincho = voice, Gothic = information. No red/vermilion. */
:root {
  --bg: #F6F6F3; --sheet: #FFFFFF;
  --fg: #2A2731; --fg-2: #5E5A66; --fg-3: #6E6A76;
  --rule: #D9D6DF; --edge: #8E899A;
  --accent: #4B3762; --accent-press: #3A2C49; --wash: #ECE8F1;
  --flame: #E7A740; --urushi: #1F1C22; --kindei: #CFAE6E;
  --display: "Hiragino Mincho ProN", "Hiragino Mincho Pro", "YuMincho", "Yu Mincho", "BIZ UDPMincho", "Noto Serif JP", "Noto Serif CJK JP", "Source Han Serif JP", serif;
  --body: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "BIZ UDPGothic", "Noto Sans JP", "Noto Sans CJK JP", "Source Han Sans JP", "Yu Gothic Medium", "Meiryo", sans-serif;
  --gutter: 19px; --col: 44px;
  --r-paper: 2px; --r-control: 8px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--body); font-size: 16px; line-height: 1.85; letter-spacing: 0.03em; line-break: strict; overflow-wrap: anywhere; }
[lang="zh-CN"] { font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif; }
a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
p { margin: 0 0 1em; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; font-feature-settings: "palt"; color: var(--fg); }
@supports (word-break: auto-phrase) { h1, h2, h3, summary, .tz-text { word-break: auto-phrase; } } /* headings and short labels only; body text keeps strict breaking */
.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 8px; top: 8px; z-index: 9; padding: 8px 12px; background: var(--sheet); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nw { white-space: nowrap; }
.w { max-width: 720px; margin: 0 auto; padding: 0 var(--gutter); }

/* header.top */
header.top { position: sticky; top: 0; z-index: 3; background: var(--bg); border-bottom: 1px solid var(--rule); }
.top-in { max-width: 720px; margin: 0 auto; min-height: 60px; padding: 8px var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.brand { display: flex; align-items: center; gap: 10px; min-height: 44px; color: var(--fg); text-decoration: none; }
.seal { flex: none; width: 28px; height: 28px; border-radius: 3px; background: var(--accent); color: #FFF; display: grid; place-items: center; font: 600 16px/1 var(--display); }
.brand b { font: 600 18px/1 var(--display); letter-spacing: 0.14em; }
.brand small { margin-left: 8px; font-size: 12px; letter-spacing: 0.02em; color: var(--fg-3); }
.langs { display: flex; gap: 6px; }
.langs a { min-height: 36px; padding: 0 10px; display: inline-flex; align-items: center; border-radius: var(--r-control); box-shadow: inset 0 0 0 1px var(--rule); color: var(--fg); font-size: 13px; text-decoration: none; }

/* nav.pages */
nav.pages { border-bottom: 1px solid var(--rule); background: var(--bg); }
nav.pages ul { max-width: 720px; margin: 0 auto; padding: 0 var(--gutter); list-style: none; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
nav.pages ul::-webkit-scrollbar { display: none; }
nav.pages a { display: flex; align-items: center; min-height: 44px; padding: 0 10px; white-space: nowrap; font-size: 14px; color: var(--fg-2); text-decoration: none; border-bottom: 2px solid transparent; }
nav.pages a[aria-current="page"] { color: var(--accent); font-weight: 600; border-bottom-color: var(--accent); }

main { padding: 20px 0 8px; }

/* hero (sub pages): ruled paper sheet, vertical label on the right */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; margin: 0 0 20px; padding: 22px 18px 20px; background-color: var(--sheet); background-image: repeating-linear-gradient(to left, var(--rule) 0 1px, transparent 1px var(--col)); border-top: 1px solid var(--fg-3); border-bottom: 1px solid var(--fg-3); }
.hero .v { grid-column: 2; grid-row: 1; margin: 0; writing-mode: vertical-rl; text-orientation: mixed; font: 600 26px/var(--col) var(--display); letter-spacing: 0.2em; color: var(--fg); }
.hero-t { grid-column: 1; grid-row: 1; min-width: 0; background: rgba(255, 255, 255, 0.86); }
.crumb { margin: 0 0 6px; font-size: 13px; color: var(--fg-3); }
.crumb a { color: var(--fg-3); }
.hero h1 { margin: 0 0 12px; font-size: 26px; line-height: 1.5; letter-spacing: 0.06em; }
.lead { font-size: 17px; line-height: 1.9; color: var(--fg); }
.hero .lead { margin: 0; }
.hero .cta-box { grid-column: 1 / -1; grid-row: 2; }

/* landing hero: sutra paper with vertical lines and one incense stick (from the mockup) */
.shakyo { position: relative; width: calc(var(--col) * 8); max-width: 100%; height: 356px; margin: 0 auto 18px; background-color: var(--sheet); background-image: repeating-linear-gradient(to left, var(--rule) 0 1px, transparent 1px var(--col)); border-top: 1px solid var(--fg-3); border-bottom: 1px solid var(--fg-3); overflow: hidden; }
.shakyo h1 { position: absolute; top: 20px; right: 0; margin: 0; writing-mode: vertical-rl; text-orientation: mixed; font-size: 30px; line-height: var(--col); letter-spacing: 0.14em; }
.shakyo h1 span { display: block; }
.shakyo h1 span + span { padding-top: 68px; }
.shakyo .date { position: absolute; right: calc(var(--col) * 2); bottom: 16px; margin: 0; writing-mode: vertical-rl; font: 400 14px/var(--col) var(--display); letter-spacing: 0.24em; color: var(--fg-2); }
.shakyo svg { position: absolute; left: 0; bottom: 0; width: calc(var(--col) * 5); height: 100%; }
.smoke { stroke-dasharray: 100; stroke-dashoffset: 100; animation: smoke 9s cubic-bezier(.2, .7, .2, 1) infinite; }
@keyframes smoke { 0% { stroke-dashoffset: 100; opacity: 0; } 10% { opacity: 1; } 62% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
.ember { animation: ember 4.5s ease-in-out infinite; }
@keyframes ember { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }

/* buttons */
.cta-box { display: flex; flex-direction: column; gap: 6px; margin: 18px 0 4px; }
.btn { width: 100%; min-height: 56px; padding: 8px 16px; border: 0; border-radius: var(--r-control); background: var(--accent); color: #FFF; display: flex; align-items: center; justify-content: center; text-align: center; font: 600 17px/1.4 var(--display); letter-spacing: 0.1em; font-feature-settings: "palt"; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--accent-press); }
.btn:active { background: var(--accent-press); }
.btn.ghost { min-height: 48px; background: var(--sheet); color: var(--accent); box-shadow: inset 0 0 0 1px var(--edge); font-size: 16px; }
.btn.ghost:hover, .btn.ghost:active { background: var(--wash); }
.cta-n { margin: 0; text-align: center; font-size: 14px; line-height: 1.7; color: var(--fg-2); }
@media (min-width: 560px) { .cta-box .btn { max-width: 420px; margin: 0 auto; } }

/* tanzaku (strips) */
.tanzaku-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0 0 24px; padding: 0; list-style: none; }
@media (min-width: 640px) { .tanzaku-row { grid-template-columns: repeat(8, minmax(0, 1fr)); } }
.tanzaku { height: 178px; padding: 14px 0 12px; display: flex; flex-direction: column; align-items: center; gap: 10px; background: var(--sheet); border: 1px solid #C9C5D1; border-radius: var(--r-paper); color: var(--fg); text-decoration: none; }
.tanzaku:hover, .tanzaku:active { background: var(--wash); }
.tanzaku .ico { color: var(--accent); }
.tz-text { writing-mode: vertical-rl; text-orientation: mixed; }
.tz-main { display: block; font: 600 17px/28px var(--display); letter-spacing: 0.1em; }
.tz-sub { display: block; font-size: 13px; line-height: 20px; letter-spacing: 0.06em; color: var(--fg-2); }
.ico { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* sections */
section.s { padding: 6px 0 4px; border-top: 1px solid var(--rule); margin-top: 22px; }
section.s > h2 { margin: 16px 0 10px; font-size: 21px; line-height: 1.5; letter-spacing: 0.08em; }
section.s h3 { margin: 18px 0 6px; font-size: 17px; line-height: 1.6; letter-spacing: 0.06em; }
ul.dots, ol.steps { margin: 0 0 1em; padding-left: 1.4em; }
ul.dots li, ol.steps li { margin: 0 0 0.5em; }
ol.steps li::marker { font-family: var(--display); color: var(--accent); }
.muted { color: var(--fg-2); }
.small { font-size: 14px; line-height: 1.75; }

/* definition list (features, calendar) */
dl.rows { margin: 0 0 1em; border-top: 1px solid var(--rule); }
dl.rows > div { display: grid; grid-template-columns: 8.5em minmax(0, 1fr); gap: 4px 14px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
dl.rows dt { font: 600 15px/1.7 var(--display); letter-spacing: 0.04em; }
dl.rows dd { margin: 0; font-size: 15px; line-height: 1.8; }
dl.rows dd small { display: block; color: var(--fg-3); font-size: 13px; }
@media (max-width: 420px) { dl.rows > div { grid-template-columns: 1fr; } }

/* tables */
.tbl { width: 100%; border-collapse: collapse; margin: 0 0 1em; font-size: 15px; line-height: 1.7; font-variant-numeric: tabular-nums; }
.tbl th, .tbl td { padding: 8px 6px; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.tbl thead th { font-weight: 400; font-size: 13px; color: var(--fg-3); border-bottom-color: var(--edge); }
.tbl th[scope="row"] { font: 600 15px/1.7 var(--display); white-space: nowrap; }
.tbl-wrap { overflow-x: auto; }

/* omikuji slip, kanshi */
.slip { margin: 6px 0 18px; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r-paper); }
.slip-v-wrap { display: flex; justify-content: center; padding: 18px 0 16px; }
.slip-v { writing-mode: vertical-rl; text-orientation: mixed; height: 194px; border-left: 1px solid var(--rule); border-right: 1px solid var(--rule); }
.slip-v > * { display: block; margin: 0; padding-top: 10px; border-left: 1px solid var(--rule); }
.slip-v > *:last-child { border-left: 0; }
.slip-no { font: 400 15px/38px var(--display); letter-spacing: 0.24em; color: var(--fg-2); }
.kikkyo { font: 600 42px/66px var(--display); letter-spacing: 0.08em; color: var(--accent); }
.poem span { display: block; padding-top: 10px; font: 400 21px/50px var(--display); letter-spacing: 0.24em; color: var(--fg); border-left: 1px solid var(--rule); }
.poem span:last-child { border-left: 0; }
.poem { display: contents !important; }
.slip-body { padding: 14px 18px 6px; border-top: 1px solid var(--rule); }
.yomi { font-family: var(--display); line-height: 2; }

/* quotes */
blockquote { margin: 0 0 1em; padding: 10px 16px; border-left: 2px solid var(--accent); background: var(--sheet); font-family: var(--display); }
blockquote p { margin: 0 0 0.4em; }
blockquote cite { font-style: normal; font-family: var(--body); font-size: 13px; color: var(--fg-3); }

/* notes, boxes */
.note { margin: 0 0 1em; padding: 12px 14px; background: var(--wash); border-radius: var(--r-paper); font-size: 15px; line-height: 1.8; }
.note p:last-child { margin: 0; }
.zh-box { margin: 18px 0; padding: 12px 14px; border: 1px solid var(--rule); background: var(--sheet); border-radius: var(--r-paper); font-size: 15px; line-height: 1.8; }
.zh-box p { margin: 0 0 0.4em; }

/* ema wishes */
.cards { display: grid; grid-template-columns: 1fr; gap: 12px; margin: 0 0 1em; }
@media (min-width: 600px) { .cards { grid-template-columns: 1fr 1fr; } }
.card { padding: 14px 16px 6px; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r-paper); }
.card h3 { margin: 0 0 6px !important; display: flex; align-items: center; gap: 8px; }
.card h3 .ico { color: var(--accent); }
.card p { font-size: 15px; line-height: 1.8; }
.card .eg { font-family: var(--display); color: var(--fg-2); }

/* faq */
.faq details { border-bottom: 1px solid var(--rule); }
.faq details:first-of-type { border-top: 1px solid var(--rule); }
.faq summary { min-height: 48px; padding: 12px 28px 12px 0; position: relative; list-style: none; cursor: pointer; font: 600 16px/1.6 var(--display); letter-spacing: 0.04em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "＋"; position: absolute; right: 4px; top: 12px; color: var(--accent); font-family: var(--body); }
.faq details[open] summary::after { content: "－"; }
.faq details p { margin: 0 0 14px; font-size: 15px; line-height: 1.85; color: var(--fg-2); }

/* related */
.rel { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: 1fr; gap: 8px; }
@media (min-width: 560px) { .rel { grid-template-columns: 1fr 1fr; } }
.rel a { display: block; min-height: 48px; padding: 10px 14px; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r-paper); color: var(--fg); text-decoration: none; }
.rel a:hover { background: var(--wash); }
.rel b { display: block; font: 600 16px/1.6 var(--display); color: var(--accent); }
.rel span { font-size: 13px; color: var(--fg-2); }

/* footer */
footer.foot { margin-top: 32px; padding: 20px 0 36px; border-top: 1px solid var(--rule); font-size: 13px; line-height: 1.8; color: var(--fg-3); }
footer.foot p { margin: 0 0 0.6em; }
footer.foot .disc { color: var(--fg-2); }
.foot-links { display: flex; flex-wrap: wrap; gap: 0 18px; margin: 4px 0 10px; padding: 0; list-style: none; }
.foot-links a { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; }

@media (min-width: 720px) {
  .hero h1 { font-size: 30px; }
  .hero { padding: 28px 24px 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .smoke { animation: none; stroke-dashoffset: 0; opacity: 0.8; }
  .ember { animation: none; opacity: 1; }
}
@media print { header.top, nav.pages, .cta-box { display: none; } body { background: #FFF; } }
/* 11-28 Japan panel: drawn samples of the app's screens (scripts/sites/jp.py samples()) */
.sample-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; margin: 10px 0 8px; }
.sample { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.sample svg { width: 100%; max-width: 200px; height: auto; display: block; margin: 0 auto; }
.sample figcaption { font-size: 15px; line-height: 1.7; color: var(--fg-2); }
.sample figcaption b { display: block; color: var(--fg); font-family: var(--display); font-weight: 600; font-size: 16px; }
/* three language links (简体中文 · 繁體中文 · English): never broken inside a word; on a narrow phone the brand drops its Latin name */
.langs a { white-space: nowrap; padding: 0 8px; }
@media (max-width: 430px) { .brand small { display: none; } .langs { gap: 4px; } .langs a { padding: 0 7px; font-size: 12px; } }
