/* Kasane 文書ページ(プライバシーポリシー・サポート)の共通の見た目。
   紹介ページと同じ一枚の和紙に、読むための版面をのせる(2026-10-28 広報の試作から)。
   本文は privacy.md・support.md を Markdown のまま書き出したもの。目次などは assets/doc.js が組み立てる */
:root {
  --canvas: #f2ede4; --surface: #f7f3ec;
  --ink: #1f1c19; --ink-soft: #4b463f;
  --mute: #7a6c55; --rule: #d6ccba;
  --sumi: #2a2a30; --ai: #2f4f9a; --chitose: #1f6e52; --kokiake: #9b2335; --edo: #6b3fa0; --kin: #b08a3e;
  --mincho: "Shippori Mincho", "Hiragino Mincho ProN", serif;
  --latin: "Cormorant Garamond", serif;
  --gut: clamp(20px, 6vw, 96px);
  --page: var(--ai);
  --sc-ink: var(--ink);  /* SNS のアイコン(紹介ページと共通の _includes/sns.html)で使う */
}
html { background: var(--canvas); scroll-padding-top: 96px; overflow-x: clip; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-family: var(--mincho); font-weight: 500; -webkit-font-smoothing: antialiased; overflow-x: clip; }
a { color: inherit; }
.nb { display: inline-block; }
::selection { background: color-mix(in oklab, var(--kokiake) 24%, transparent); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }

/* ---------- 紙の繊維と、もう染まっている紙 ---------- */
/* 繊維・にじむ縁は、前もって画像にしたもの(assets/washi/)。iPhone の Safari で SVG のフィルターをその場で描くと重いため(2026-10-30) */
.fiber { position: fixed; inset: 0; z-index: 2; pointer-events: none; opacity: .28; background: url(washi/fiber.png) 0 0 / 512px 512px repeat; }
.someiro { position: fixed; inset: 0; z-index: 0; pointer-events: none; isolation: isolate; }
.dye { position: absolute; width: 40vw; height: 56vh; mix-blend-mode: multiply; opacity: .1; background: var(--c);
  -webkit-mask-image: url(washi/edge.png), radial-gradient(circle at var(--ox) var(--oy), #000 0, #000 30%, transparent 72%);
          mask-image: url(washi/edge.png), radial-gradient(circle at var(--ox) var(--oy), #000 0, #000 30%, transparent 72%);
  -webkit-mask-size: 100% 100%, auto; mask-size: 100% 100%, auto;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-composite: source-in; mask-composite: intersect; }
.dye:nth-child(1) { left: 74vw; top: -10vh; --c: var(--sumi); --ox: 60%; --oy: 30%; rotate: -4deg; }
.dye:nth-child(2) { left: 80vw; top: 8vh;   --c: var(--page); --ox: 40%; --oy: 50%; rotate: 3deg; opacity: .14; }
.dye:nth-child(3) { left: 70vw; top: 60vh;  --c: var(--kin);  --ox: 50%; --oy: 60%; rotate: -2deg; opacity: .08; }
@media (max-width: 760px) {
  .dye { width: 70vw; height: 30vh; }
  .dye:nth-child(1) { left: 56vw; top: -8vh; } .dye:nth-child(2) { left: 62vw; top: 2vh; } .dye:nth-child(3) { display: none; }
}

/* ---------- 上のバー ---------- */
.bar { position: fixed; z-index: 20; inset: 0 0 auto 0; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 18px var(--gut); }
.bar::before { content: ""; position: absolute; inset: 0; background: var(--canvas); opacity: .94; border-bottom: 1px solid var(--rule); }
.word { position: relative; display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-family: var(--latin); font-size: 19px; letter-spacing: .48em; }
.word img { width: 28px; height: 28px; border-radius: 7px; }
.bar nav { position: relative; display: flex; gap: clamp(16px, 3vw, 36px); font-size: 13px; letter-spacing: .12em; }
.bar nav a { white-space: nowrap; text-decoration: none; padding: 10px 0; border-bottom: 1px solid transparent; }
.bar nav a[aria-current="page"] { border-bottom-color: currentColor; }
@media (max-width: 520px) { .word { font-size: 15px; letter-spacing: .3em; } .bar nav { gap: 16px; font-size: 12px; letter-spacing: .04em; } }
@media (max-width: 400px) { .word span { display: none; } }

/* ---------- 版面:左に縦書きの題、右に本文 ---------- */
.doc { position: relative; z-index: 5; display: grid; grid-template-columns: auto minmax(0, 42em); gap: clamp(40px, 7vw, 120px); justify-content: center; padding: clamp(120px, 18vh, 180px) var(--gut) clamp(80px, 12vh, 140px); }
.doc__side { position: sticky; top: 112px; align-self: start; display: flex; gap: 28px; }
.doc__title { margin: 0; writing-mode: vertical-rl; font-weight: 500; font-size: clamp(1.9rem, 1.3rem + 1.6vw, 2.8rem); line-height: 1.5; letter-spacing: .16em; white-space: nowrap; }
.doc__title .latin { font-family: var(--latin); letter-spacing: .3em; font-size: .78em; color: var(--mute); }
.layers { display: flex; flex-direction: column; gap: 3px; width: 56px; }
.layers i { height: 2px; }
.toc { list-style: none; margin: 0; padding: 4px 0 0; font-size: 13px; letter-spacing: .06em; line-height: 1.5; }
.toc li + li { margin-top: 2px; }
.toc a { display: grid; grid-template-columns: 2.2em 1fr; padding: 6px 0 6px 12px; text-decoration: none; color: var(--mute); border-left: 2px solid var(--rule); transition: color 200ms, border-color 200ms; }
.toc a span { font-family: var(--latin); font-size: 14px; font-variant-numeric: lining-nums; }
.toc a:hover, .toc a[aria-current="true"] { color: var(--ink); border-left-color: var(--page); }
.doc__side .stack { display: flex; flex-direction: column; gap: 26px; }

.doc__body { font-size: clamp(15px, 14px + .2vw, 16.5px); line-height: 2.05; letter-spacing: .04em; color: var(--ink-soft); }
.doc__body p { margin: 0 0 1.1em; }
.doc__body strong { color: var(--ink); font-weight: 600; background: linear-gradient(transparent 62%, color-mix(in oklab, var(--page) 16%, transparent) 62%); }
.doc__body a { text-decoration-color: var(--rule); text-underline-offset: 4px; }
.doc__body a:hover { text-decoration-color: currentColor; }
.meta { font-size: 13px; letter-spacing: .08em; color: var(--mute); line-height: 1.9; }
.lede { font-size: 1.06em; color: var(--ink); }

.doc__body section { padding-top: clamp(40px, 6vh, 64px); }
.doc__body h2 { display: flex; align-items: baseline; gap: 16px; margin: 0 0 18px; padding-bottom: 14px; border-bottom: 1px solid var(--rule); font-weight: 500; font-size: clamp(1.25rem, 1.1rem + .6vw, 1.6rem); line-height: 1.6; letter-spacing: .1em; color: var(--ink); }
.doc__body h2 .no { font-variant-numeric: lining-nums; font-family: var(--latin); font-size: 1.05em; letter-spacing: .04em; color: var(--mute); min-width: 1.6em; }
.doc__body h3 { margin: 30px 0 10px; font-weight: 600; font-size: 1.04em; letter-spacing: .08em; color: var(--ink); }
.doc__body ul { margin: 0 0 1.1em; padding: 0; list-style: none; }
.doc__body li { position: relative; padding-left: 1.4em; }
.doc__body li + li { margin-top: .5em; }
.doc__body li::before { content: ""; position: absolute; left: .2em; top: 1.02em; width: .55em; height: 1px; background: var(--mute); }
.doc__body li ul { margin: .5em 0 0; }

/* 1 だけは約束として紙を一枚重ねる */
.promise { margin-top: clamp(36px, 5vh, 56px); padding: clamp(22px, 3vw, 34px) clamp(22px, 3vw, 38px); background: color-mix(in oklab, var(--surface) 88%, transparent); border-top: 3px solid var(--page); box-shadow: 0 18px 40px rgb(60 45 25 / .07); }
.promise h2 { border-bottom: 0; padding-bottom: 0; }
.promise p:last-child { margin-bottom: 0; }

/* 表:紙の罫線。狭い画面では1行ずつのカードに */
.table { width: 100%; border-collapse: collapse; margin: 6px 0 22px; font-size: .93em; line-height: 1.8; }
.table th, .table td { text-align: left; vertical-align: top; padding: 12px 14px 12px 0; border-bottom: 1px solid var(--rule); }
.table thead th { font-weight: 500; font-size: 12.5px; letter-spacing: .14em; color: var(--mute); border-bottom-color: var(--ink-soft); }
.table tbody th, .table tbody td:first-child { font-weight: 600; color: var(--ink); white-space: nowrap; }
.table td:last-child { white-space: nowrap; color: var(--page); font-size: 13px; letter-spacing: .06em; }
@media (max-width: 640px) {
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table th, .table td { display: block; }
  .table tr { padding: 14px 0; border-bottom: 1px solid var(--rule); }
  .table th, .table td { border: 0; padding: 0; }
  .table td:last-child { margin-top: 4px; }
}

/* サポート:問い合わせの紙と、開いて読む質問 */
.contact { margin: clamp(32px, 5vh, 48px) 0 0; padding: clamp(22px, 3vw, 34px) clamp(22px, 3vw, 38px); background: color-mix(in oklab, var(--surface) 88%, transparent); border-top: 3px solid var(--page); box-shadow: 0 18px 40px rgb(60 45 25 / .07); }
.contact__label { margin: 0 0 8px !important; font-size: 13px; letter-spacing: .16em; color: var(--mute); }
.mail { display: inline-flex; align-items: center; gap: 14px; margin-bottom: 18px; font-family: var(--latin); font-size: clamp(1.2rem, 1rem + 1vw, 1.6rem); letter-spacing: .06em; color: var(--ink); text-decoration: none !important; border-bottom: 1px solid var(--ink); padding-bottom: 4px; word-break: break-all; }
.mail svg { width: .8em; height: .8em; flex-shrink: 0; }
.contact p:last-child { margin-bottom: 0; }

.faq { margin-top: 8px; }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { display: grid; grid-template-columns: 2.2em 1fr 20px; align-items: baseline; gap: 6px; padding: 20px 0; cursor: pointer; list-style: none; font-size: 1.04em; line-height: 1.7; letter-spacing: .06em; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .q, .faq .a { font-family: var(--latin); font-size: 1.25em; line-height: 1; color: var(--page); }
.faq summary::after { content: ""; width: 9px; height: 9px; justify-self: end; border-right: 1px solid var(--mute); border-bottom: 1px solid var(--mute); rotate: 45deg; translate: 0 -3px; transition: rotate 220ms; }
.faq details[open] summary::after { rotate: 225deg; translate: 0 3px; }
.faq summary:hover { color: var(--page); }
.faq__a { display: grid; grid-template-columns: 2.2em 1fr; gap: 6px; padding: 0 0 22px; }
.faq__a .a { color: var(--mute); padding-top: .35em; }
.faq__a > div > :last-child { margin-bottom: 0; }

/* doc.js が動かないとき:題は本文の上に、お問い合わせは紙のまま */
.doc__side[hidden] { display: none; }
.doc:has(> .doc__side[hidden]) { grid-template-columns: minmax(0, 42em); }
.doc__body > h1 { margin: 0 0 24px; font-weight: 500; font-size: clamp(1.7rem, 1.2rem + 2vw, 2.4rem); letter-spacing: .1em; color: var(--ink); }
.doc__body > .card { margin: 32px 0; padding: 22px 26px; background: color-mix(in oklab, var(--surface) 88%, transparent); border-top: 3px solid var(--page); }
.doc__body > h2 { margin-top: 48px; }

/* ---------- 下の帯(紹介ページと同じ) ---------- */
.foot { position: relative; z-index: 5; padding: 30px var(--gut) clamp(22px, 4vh, 40px); border-top: 1px solid var(--rule); background: color-mix(in oklab, var(--canvas) 86%, transparent); }
.sns { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 32px; font-family: var(--latin); font-size: 15px; letter-spacing: .18em; }
.sns a { display: inline-flex; align-items: center; gap: 9px; padding: 6px 0; text-decoration: none; }
.sns svg { width: 18px; height: 18px; flex-shrink: 0; }
.links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 28px; margin-top: 14px; font-size: 13px; }
.links a { padding: 6px 0; }
.fine { max-width: 52em; margin: 12px auto 0; text-align: center; font-size: 11.5px; line-height: 1.9; color: var(--mute); }

/* ---------- 狭い画面:題を横書きにして上へ ---------- */
@media (max-width: 1023px) {
  .doc { grid-template-columns: minmax(0, 42em); gap: 0; padding-top: 112px; }
  .doc__side { position: static; flex-direction: column; gap: 18px; margin-bottom: 30px; }
  .doc__title .latin { display: block; margin-bottom: 2px; font-size: .62em; }
  .doc__title { writing-mode: horizontal-tb; white-space: normal; font-size: clamp(1.7rem, 1.2rem + 2vw, 2.2rem); letter-spacing: .1em; }
  .doc__side .stack { flex-direction: column-reverse; gap: 18px; }
  .toc { display: none; }
}
@media (prefers-reduced-motion: reduce) { .toc a, .faq summary::after { transition: none; } }
