/* KANJI de NAME — name generator
   2026-10-14: generator page = night ink (body.gen-night). Cream paper card, sumi kanji, one vermilion accent.
   share.html keeps the light washi styles (body.share-page) — see "shared result page" below. */

:root {
  /* light (share page) */
  --washi: #f5efe3;
  --paper: #fbf8f1;
  --ink: #231816;
  --ink-soft: #5e574d;
  --ink-faint: #8a8173;
  --rule: #ddd3c1;
  --rule-strong: #c9bca4;
  /* ロゴの赤 #D80C18 に合わせる */
  --shu: #d80c18;
  --shu-deep: #a80a13;
  --shu-tint: #f8e0dc;
  --mincho: "Shippori Mincho", "Noto Serif CJK JP", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --gothic: "Zen Kaku Gothic New", "Noto Sans CJK JP", "Hiragino Sans", system-ui, sans-serif;
  --brush: "Yuji Syuku", "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --radius: 6px;
  --focus: 0 0 0 3px var(--paper), 0 0 0 5px var(--shu);

  /* night (generator) */
  --night: #0e131b;
  --night-raise: #161c26;
  --cream: #f3eee4;
  --paper-warm: #f1ebdf;
  --sumi: #15130f;
  --text: #e9e3d7;
  --text-soft: #b9bec5;
  --text-faint: #9aa1aa;
  --gold: #c2a26a;
  --gold-rule: rgba(194, 162, 106, 0.4);
  --gold-rule-soft: rgba(194, 162, 106, 0.25);
  --line: rgba(233, 227, 215, 0.25);
  --line-strong: rgba(233, 227, 215, 0.45);
  --veil: rgba(243, 238, 228, 0.05);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--washi);
  /* faint paper fibre */
  background-image:
    radial-gradient(rgba(94, 87, 77, 0.05) 1px, transparent 1px),
    radial-gradient(rgba(94, 87, 77, 0.035) 1px, transparent 1px);
  background-size: 23px 23px, 37px 37px;
  background-position: 0 0, 11px 17px;
  color: var(--ink);
  font-family: var(--gothic);
  font-size: 16px;
  line-height: 1.7;
}

a { color: inherit; }
button, input { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }

:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--radius); }

/* ---------- top bar (shared) ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background: rgba(245, 239, 227, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--rule);
}
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand-logo { display: block; height: 24px; width: auto; }
@media (min-width: 900px) { .brand-logo { height: 28px; } }
.topbar-link {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  font-size: 15px;
  text-decoration: none;
  display: inline-grid;
  place-items: center;
}
.topbar-link:hover { border-color: var(--ink); }

/* ---------- shared result page (share.html, light) ---------- */
.share-preview-shell { max-width: 640px; margin: 0 auto; padding: 32px 16px 56px; }
.share-preview-card {
  display: grid;
  gap: 16px;
  padding: 32px 22px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 4px;
  text-align: center;
}
.share-eyebrow { font-size: 13px; letter-spacing: 0.08em; color: var(--shu-deep); font-weight: 700; }
.share-preview-card h1 { font-family: var(--mincho); font-weight: 800; font-size: clamp(56px, 16vw, 84px); letter-spacing: 0.08em; line-height: 1.15; }
.share-reading { color: var(--ink-soft); }
.share-theme { font-size: 14px; color: var(--ink-faint); }
.share-draft-note { font-size: 13px; color: var(--ink-faint); }
.share-meaning-section { display: grid; gap: 6px; text-align: left; }
.share-meaning-section h2 { font-size: 14px; font-weight: 700; color: var(--ink-soft); }
.share-meaning-section p { font-family: var(--mincho); }
.share-characters { display: grid; gap: 6px; }
.share-actions { display: grid; gap: 8px; margin-top: 8px; }
.share-primary-link,
.share-secondary-link {
  display: grid;
  place-items: center;
  min-height: 50px;
  border-radius: var(--radius);
  font-weight: 700;
  text-decoration: none;
}
.share-primary-link { background: var(--ink); color: var(--paper); }
.share-secondary-link { border: 1px solid var(--ink); }

/* =====================================================================
   Generator — night ink
   ===================================================================== */

body.gen-night {
  position: relative;
  overflow-x: hidden;
  background-color: var(--night);
  /* 霞：最初の画面にだけ淡い光 */
  background-image:
    radial-gradient(38% 30% at 22% 62%, rgba(196, 202, 212, 0.10), rgba(196, 202, 212, 0) 100%),
    radial-gradient(30% 20% at 48% 22%, rgba(196, 202, 212, 0.07), rgba(196, 202, 212, 0) 100%);
  background-size: 100% 1100px;
  background-position: 0 0;
  background-repeat: no-repeat;
  color: var(--text);
}
.gen-night :focus-visible { box-shadow: none; outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px; }

/* 背景の大きな「名」。外枠で切り取り、横スクロールを出さない */
.bg-glyph {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 0;
  height: 620px;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
}
.bg-glyph span {
  position: absolute;
  top: 24px;
  right: -90px;
  font-family: var(--brush);
  font-size: 470px;
  line-height: 1;
  color: rgba(243, 238, 228, 0.04);
}
@media (min-width: 900px) {
  .bg-glyph { height: 1000px; }
  .bg-glyph span { top: -150px; right: -150px; font-size: 1040px; color: rgba(243, 238, 228, 0.035); }
}

.gen-night .app-shell { position: relative; z-index: 1; max-width: 1280px; margin: 0 auto; }

/* ---------- top bar ---------- */
.gen-night .topbar {
  position: relative;
  padding: 16px 20px;
  background: none;
  backdrop-filter: none;
  border-bottom: 0;
}
.gen-night .brand-logo { height: 22px; }
.help-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text-soft);
  font-size: 14px;
  cursor: pointer;
}
.help-text { display: none; }
.help-mark {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(233, 227, 215, 0.35);
  border-radius: 50%;
  color: var(--text);
  font-size: 16px;
}
.help-button:hover { color: var(--cream); }
.help-button:hover .help-mark { border-color: var(--text); }
@media (min-width: 600px) { .help-text { display: inline; } }
@media (min-width: 900px) {
  .gen-night .topbar { padding: 34px 48px 0; }
  .gen-night .brand-logo { height: 30px; }
  .help-mark { width: 36px; height: 36px; }
}
@media (min-width: 1200px) { .gen-night .topbar { padding: 34px 64px 0; } }

/* ---------- layout ----------
   スマホ：見出し → 名前カード → 読み → 入力欄 → 候補 → 意味 → 読みの変更・共有（CSS の order で並べる）
   PC   ：左＝名前カードと意味、右＝見出し・入力欄・候補 */
.workspace { padding: 12px 20px 64px; }
.stage { display: flex; flex-direction: column; gap: 18px; }
.stage-side,
.stage-art,
.input-panel,
.matches,
.scroll-card,
.scroll-info { display: contents; }

.intro { order: 1; }
.scroll-paper,
.scroll-empty { order: 2; }
.scroll-reading { order: 3; }
.plan-notice { order: 4; }
.generator-form { order: 5; }
.results-head { order: 6; margin-top: 18px; }
.warning-list { order: 7; }
.candidate-tabs { order: 8; }
.char-list { order: 9; margin-top: 30px; }
.whole-meaning { order: 10; }
.draft-note { order: 11; }
.kana-area { order: 12; margin-top: 12px; }
.share-row { order: 13; }
.tagline { order: 0; display: none; }

@media (min-width: 600px) and (max-width: 899px) {
  .stage,
  .product-strip { max-width: 640px; margin-inline: auto; }
}

@media (min-width: 900px) {
  .workspace { padding: 56px 48px 120px; }
  .stage {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(340px, 1fr);
    column-gap: clamp(48px, 6vw, 100px);
    align-items: start;
  }
  .stage-side { grid-column: 2; grid-row: 1; display: grid; gap: 40px; align-content: start; }
  .stage-art { grid-column: 1; grid-row: 1; display: grid; gap: 28px; align-content: start; min-width: 0; }
  .input-panel { display: grid; gap: 28px; }
  .matches { display: grid; gap: 10px; }
  .scroll-card { display: grid; gap: 22px; min-width: 0; }
  .scroll-info { display: grid; gap: 22px; }
  /* カードの中は 紙 → 読み・意味 の順（スマホ用の order を打ち消す） */
  .scroll-paper,
  .scroll-empty { order: -1; }
  .results-head,
  .char-list,
  .kana-area { margin-top: 0; }
  .char-list { margin-top: 26px; }
  .tagline { display: flex; }
}
@media (min-width: 1200px) { .workspace { padding: 56px 64px 140px; } }

/* ---------- tagline ---------- */
.tagline {
  align-items: center;
  gap: 18px;
  font-family: var(--mincho);
  font-weight: 500;
  font-size: 20px;
  letter-spacing: 0.14em;
  color: var(--text);
}
.tagline-rule {
  flex: 0 0 56px;
  height: 1px;
  background: linear-gradient(90deg, rgba(194, 162, 106, 0), var(--gold));
}

/* ---------- intro ---------- */
.intro { display: grid; gap: 10px; }
.intro h1 {
  font-family: var(--mincho);
  font-weight: 800;
  font-size: clamp(26px, 7vw, 34px);
  line-height: 1.2;
  letter-spacing: 0.01em;
  color: var(--cream);
}
.intro-lead { font-size: 14px; line-height: 1.7; color: var(--text-soft); max-width: 32em; }
@media (min-width: 900px) {
  .intro { gap: 16px; }
  .intro h1 { font-size: clamp(44px, 4.1vw, 58px); line-height: 1.12; }
  .intro-lead { font-size: 16px; line-height: 1.75; }
}

.plan-notice {
  padding: 10px 14px;
  border: 1px solid var(--gold-rule);
  border-radius: 2px;
  background: rgba(194, 162, 106, 0.1);
  color: var(--cream);
  font-weight: 500;
  font-size: 14px;
  line-height: 1.5;
}

/* ---------- form ---------- */
.generator-form { display: grid; gap: 4px; }
.field-label {
  padding: 0;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--gold);
}
.generator-form > .field-label { margin-top: 16px; }
.generator-form > .field-label:first-child { margin-top: 0; }
.optional { font-weight: 400; color: var(--text-faint); }
.text-input {
  width: 100%;
  min-height: 46px;
  padding: 6px 2px;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  background: transparent;
  color: var(--cream);
  font-size: 17px;
}
.text-input::placeholder { color: #7f8792; }
.gen-night .text-input:focus-visible {
  outline: none;
  border-bottom-color: var(--gold);
  box-shadow: 0 1px 0 var(--gold);
}
.name-input {
  min-height: 52px;
  font-family: var(--mincho);
  font-weight: 700;
  font-size: 26px;
}
.field-hint { margin-top: 4px; font-size: 12px; line-height: 1.6; color: var(--text-faint); }
@media (min-width: 900px) {
  .name-input { min-height: 60px; font-size: 32px; }
  .field-label { font-size: 13px; }
}

.more-field { margin-top: 12px; }
.more-field summary {
  cursor: pointer;
  padding: 6px 0;
  font-size: 13px;
  color: var(--text-soft);
  list-style: none;
}
.more-field summary::-webkit-details-marker { display: none; }
.more-field summary::before { content: "+ "; color: var(--gold); font-weight: 700; }
.more-field[open] summary::before { content: "− "; }
.more-field[open] { display: grid; gap: 4px; }
.more-field summary:hover { color: var(--cream); }

.theme-fieldset { min-width: 0; margin: 18px 0 0; padding: 0; border: 0; }
.theme-fieldset legend { margin-bottom: 6px; }
.theme-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 2px 4px;
}
@media (min-width: 1200px) { .theme-grid { grid-template-columns: repeat(10, minmax(0, 1fr)); } }
.theme-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-height: 66px;
  padding: 9px 0 6px;
  border: 0;
  border-radius: 2px;
  background: none;
  color: #c9ccd1;
  cursor: pointer;
  transition: color 0.15s, background-color 0.15s;
}
.theme-button::after {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: transparent;
}
.theme-kanji { font-family: var(--mincho); font-weight: 700; font-size: 24px; line-height: 1; }
.theme-label { font-size: 11px; line-height: 1.2; color: var(--text-faint); }
.theme-button:hover { color: var(--cream); background: rgba(243, 238, 228, 0.04); }
.theme-button.is-active { color: var(--cream); background: var(--veil); }
.theme-button.is-active .theme-label { color: var(--text); }
.theme-button.is-active::after { background: var(--shu); }
@media (min-width: 900px) { .theme-kanji { font-size: 27px; } }

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 54px;
  margin-top: 20px;
  padding: 12px 20px;
  border: 0;
  border-radius: 2px;
  background: var(--cream);
  color: var(--sumi);
  font-family: var(--gothic);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.04em;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s;
}
.primary-button:hover { background: #ffffff; }
.primary-button[aria-disabled="true"] {
  background: rgba(243, 238, 228, 0.12);
  color: var(--text-soft);
  cursor: default;
}
.privacy-note { margin-top: 8px; font-size: 12px; color: var(--text-faint); text-align: center; }
@media (min-width: 900px) {
  .primary-button { min-height: 58px; font-size: 17px; }
  .privacy-note { font-size: 13px; }
}

/* ---------- matches (candidates) ---------- */
.results-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 12px;
}
.results-head h2 {
  font-family: var(--gothic);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--gold);
}
#statusText { font-size: 12px; color: var(--text-faint); }
@media (min-width: 900px) {
  .results-head h2,
  #statusText { font-size: 13px; }
}

.warning-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.notice-item {
  padding: 8px 12px;
  border-left: 3px solid var(--gold);
  background: var(--veil);
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-soft);
}
.notice-item.is-caution { border-left-color: var(--shu); }

.candidate-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.candidate-tab {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 52px;
  padding: 8px 4px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: none;
  color: var(--text-soft);
  cursor: pointer;
  transition: color 0.15s, background-color 0.15s;
}
.candidate-tab:hover { color: var(--cream); background: rgba(243, 238, 228, 0.04); }
.candidate-tab.is-selected {
  color: var(--cream);
  background: var(--veil);
  border-bottom: 2px solid var(--shu);
}
.candidate-no { position: absolute; top: 3px; left: 6px; font-size: 10px; line-height: 1.2; color: var(--text-faint); }
.candidate-kanji {
  font-family: var(--mincho);
  font-weight: 700;
  font-size: clamp(17px, 5.2vw, 21px);
  letter-spacing: 0.04em;
  line-height: 1.2;
  white-space: nowrap;
}
@media (min-width: 900px) { .candidate-kanji { font-size: 21px; } }

/* ---------- the name card: cream paper, sumi kanji (horizontal so 4+ characters still fit) ---------- */
.scroll-paper {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 220px;
  padding: 36px 20px 40px;
  background:
    radial-gradient(circle at 87% 15%, rgba(21, 19, 15, 0.78) 0 3.6px, rgba(21, 19, 15, 0) 4.4px),
    radial-gradient(circle at 91% 21%, rgba(21, 19, 15, 0.7) 0 1.6px, rgba(21, 19, 15, 0) 2.3px),
    radial-gradient(circle at 84% 24%, rgba(21, 19, 15, 0.6) 0 1.1px, rgba(21, 19, 15, 0) 1.8px),
    radial-gradient(circle at 10% 82%, rgba(21, 19, 15, 0.45) 0 1.3px, rgba(21, 19, 15, 0) 2px),
    linear-gradient(176deg, #f7f3ea 0%, #f1ebdf 55%, #e9e1d1 100%);
  box-shadow: 0 34px 60px -24px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.04);
  color: var(--sumi);
}
.scroll-kanji {
  font-family: var(--mincho);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0.06em;
  white-space: nowrap;
  color: var(--sumi);
  font-size: clamp(56px, 21vw, 120px);
  animation: ink-in 0.7s ease-out both;
}
/* 文字数で大きさを変える。vw でスマホでも1行に収める（幅 ≒ 文字数 × 1.06em） */
.scroll-kanji[data-len="1"] { font-size: clamp(88px, 32vw, 180px); }
.scroll-kanji[data-len="2"] { font-size: clamp(72px, 25vw, 150px); }
.scroll-kanji[data-len="3"] { font-size: clamp(56px, 21vw, 120px); }
.scroll-kanji[data-len="4"] { font-size: clamp(44px, 15.5vw, 100px); }
.scroll-kanji[data-len="5"] { font-size: clamp(36px, 12.5vw, 84px); }
.scroll-seal {
  position: absolute;
  right: 16px;
  bottom: 14px;
  width: 40px;
  height: 40px;
  transform: rotate(-4deg);
  mix-blend-mode: multiply;
}
@media (min-width: 900px) {
  .scroll-paper {
    min-height: 0;
    aspect-ratio: 62 / 42;
    padding: 48px 40px 56px;
    box-shadow: 0 50px 90px -30px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.04);
  }
  .scroll-kanji[data-len="1"] { font-size: min(220px, 22vw); }
  .scroll-kanji[data-len="2"] { font-size: min(172px, 16.5vw); }
  .scroll-kanji[data-len="3"] { font-size: min(132px, 11vw); }
  .scroll-kanji[data-len="4"] { font-size: min(106px, 8.2vw); }
  .scroll-kanji[data-len="5"] { font-size: min(86px, 6.6vw); }
  .scroll-seal { right: 32px; bottom: 28px; width: 60px; height: 60px; }
}
@keyframes ink-in {
  from { opacity: 0; filter: blur(3px); }
  to { opacity: 1; filter: blur(0); }
}
.scroll-empty { padding: 40px 20px; text-align: center; color: var(--text-soft); }

.scroll-reading {
  font-size: 13px;
  color: var(--text-soft);
  text-align: center;
}
.scroll-reading span {
  margin-right: 2px;
  font-family: var(--mincho);
  font-size: 16px;
  color: var(--text);
}
@media (min-width: 900px) {
  .scroll-reading { font-size: 14px; text-align: left; }
  .scroll-reading span { font-size: 19px; }
}

/* meanings */
.char-list { list-style: none; margin: 0; padding: 0; display: grid; }
.char-list::before {
  content: "What each kanji means";
  padding-bottom: 10px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--gold);
}
.char-list li {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  padding: 16px 0;
  border-top: 1px solid var(--gold-rule-soft);
}
.char-list li:last-child { border-bottom: 1px solid var(--gold-rule-soft); }
.char-kanji {
  font-family: var(--brush);
  font-size: 72px;
  line-height: 1;
  text-align: center;
  color: var(--cream);
}
.char-meaning { font-family: var(--mincho); font-size: 18px; line-height: 1.5; color: var(--text); }
.whole-meaning { font-family: var(--mincho); font-size: 16px; line-height: 1.9; color: #d9d4ca; }
.draft-note { font-size: 12px; line-height: 1.6; color: var(--text-faint); }
@media (min-width: 900px) {
  .char-list {
    display: flex;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--gold-rule);
  }
  .char-list::before {
    flex: 0 0 100%;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--gold-rule);
    font-size: 13px;
  }
  .char-list li {
    flex: 1 1 0;
    min-width: 100px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 28px 20px 26px;
    border-top: 0;
    border-left: 1px solid var(--gold-rule);
  }
  .char-list li:first-of-type { border-left: 0; padding-left: 0; }
  .char-list li:last-child { border-bottom: 0; }
  .char-list li::after { content: ""; order: 1; width: 32px; height: 1px; background: var(--gold); }
  .char-list .char-meaning { order: 2; font-size: 18px; }
  .char-kanji { font-size: min(104px, 7.4vw); text-align: left; }
  /* 4文字以上は小さく */
  .char-list li:first-of-type:nth-last-of-type(n + 4) .char-kanji,
  .char-list li:first-of-type:nth-last-of-type(n + 4) ~ li .char-kanji { font-size: min(72px, 5vw); }
  .char-list li:first-of-type:nth-last-of-type(n + 4) ~ li,
  .char-list li:first-of-type:nth-last-of-type(n + 4) { padding-inline: 14px; }
  .char-list li:first-of-type:nth-last-of-type(n + 4) { padding-left: 0; }
  .whole-meaning { font-size: 18px; line-height: 1.95; max-width: 40em; }
  .draft-note { font-size: 13px; margin-top: -10px; }
}

/* ---------- reading ---------- */
.kana-area {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.kana-current { font-size: 13px; color: var(--text-soft); }
.kana-current span { margin-left: 4px; font-family: var(--mincho); font-size: 17px; color: var(--cream); }
.kana-options { display: flex; flex-wrap: wrap; gap: 6px; }
.kana-options:empty { display: none; }
.kana-options button {
  display: grid;
  min-height: 40px;
  padding: 4px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: transparent;
  color: var(--text);
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
}
.kana-options button:hover { border-color: var(--text); }
.kana-options button.is-active { border-color: var(--gold); background: rgba(194, 162, 106, 0.12); }
.kana-options small { font-size: 11px; color: var(--text-faint); }
.text-button {
  margin-left: auto;
  padding: 10px 0;
  border: 0;
  background: none;
  color: var(--gold);
  font-size: 13px;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.text-button:hover { color: var(--cream); }

/* ---------- share ---------- */
.share-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.share-button,
.platform-share-button {
  min-height: 44px;
  padding: 6px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
}
.share-button { font-weight: 700; border-color: var(--line-strong); }
.share-button:hover,
.platform-share-button:hover { background: rgba(243, 238, 228, 0.06); border-color: var(--text); }
.platform-share-row { display: flex; gap: 6px; }
#shareStatus { flex-basis: 100%; min-height: 1em; font-size: 13px; color: var(--text-soft); }

/* ---------- order ---------- */
.product-strip { display: grid; gap: 22px; margin-top: 72px; }
.product-head { display: grid; gap: 8px; }
.product-strip h2 { font-family: var(--mincho); font-weight: 800; font-size: 30px; line-height: 1.2; color: var(--cream); }
.product-lead { font-size: 14px; line-height: 1.7; color: var(--text-soft); }
.product-options {
  display: grid;
  border-top: 1px solid var(--gold-rule);
  border-bottom: 1px solid var(--gold-rule);
}
.product-option {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  padding: 22px 14px 24px;
  border: 0;
  border-bottom: 1px solid var(--gold-rule-soft);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font-family: var(--gothic);
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s;
}
.product-option:last-child { border-bottom: 0; }
.product-option:hover { background: rgba(243, 238, 228, 0.03); }
.product-option.is-selected { background: var(--veil); box-shadow: inset 3px 0 0 var(--shu); }
.product-mark {
  position: absolute;
  top: -24px;
  right: -8px;
  font-family: var(--brush);
  font-size: 200px;
  line-height: 1;
  color: rgba(243, 238, 228, 0.05);
  pointer-events: none;
}
.product-name {
  position: relative;
  font-family: var(--mincho);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.08em;
  color: var(--gold);
}
.product-price {
  position: relative;
  font-family: var(--mincho);
  font-weight: 800;
  font-size: 32px;
  line-height: 1.05;
  color: var(--cream);
}
.product-sample {
  position: relative;
  order: -1;
  display: grid;
  place-items: center;
  height: 96px;
  margin-bottom: 10px;
  background: var(--paper-warm);
  color: var(--sumi);
  font-family: var(--mincho);
  font-weight: 800;
  font-size: 54px;
  line-height: 1;
}
.product-option[data-product="artisan"] .product-sample,
.product-option[data-product="master"] .product-sample { font-family: var(--brush); font-weight: 400; }
.product-desc { position: relative; margin-top: 4px; font-size: 13.5px; line-height: 1.65; color: var(--text-soft); }
.order-button { margin-top: 4px; background: var(--shu); color: #f7f3ea; }
.order-button:hover { background: var(--shu-deep); }
.product-note { font-size: 12px; line-height: 1.7; color: var(--text-faint); text-align: center; }
.product-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; margin-top: 6px; }
.product-note a { color: var(--text); font-weight: 500; text-underline-offset: 3px; }
.product-note a:hover { color: var(--cream); }
@media (min-width: 900px) {
  .product-strip { gap: 36px; margin-top: 120px; }
  .product-head { gap: 10px; }
  .product-strip h2 { font-size: 44px; }
  .product-lead { font-size: 16px; }
  .product-options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .product-option {
    gap: 14px;
    padding: 40px 36px 44px;
    border-bottom: 0;
    border-left: 1px solid var(--gold-rule);
  }
  .product-option:first-child { border-left: 0; }
  .product-option.is-selected { box-shadow: inset 0 3px 0 var(--shu); }
  .product-mark { top: -30px; right: -10px; font-size: 260px; }
  .product-name { font-size: 17px; }
  .product-price { font-size: 46px; line-height: 1; }
  .product-sample { order: 0; height: 132px; margin: 4px 0 0; font-size: 60px; }
  .product-desc { font-size: 15px; line-height: 1.7; }
  .order-button { justify-self: center; max-width: 560px; min-height: 60px; }
  .product-note { justify-self: center; max-width: 46em; font-size: 13px; margin-top: -18px; }
}

/* lead form (off unless an endpoint is set) */
.lead-form { display: grid; gap: 8px; }
.lead-row { display: flex; gap: 8px; }
.secondary-button {
  min-height: 48px;
  padding: 8px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: transparent;
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.consent-row { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--text-soft); }
.lead-disabled-note { font-size: 13px; color: var(--text-faint); }
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- footer ---------- */
.site-footer {
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 28px 20px 40px;
  font-size: 13px;
  text-align: center;
}
.gen-night .site-footer { border-top: 1px solid var(--line); color: var(--text-faint); }
.gen-night .footer-brand a { font-family: var(--mincho); font-weight: 700; color: var(--text); }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; }
.gen-night .footer-links a { color: var(--text-soft); }
.gen-night .footer-links a:hover { color: var(--cream); }

/* ---------- help dialog ---------- */
dialog {
  width: min(520px, calc(100vw - 32px));
  padding: 28px 24px 24px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--night-raise);
  color: var(--text);
}
dialog::backdrop { background: rgba(0, 0, 0, 0.6); }
dialog h2 { margin-bottom: 12px; font-family: var(--mincho); font-size: 22px; color: var(--cream); }
dialog p { color: var(--text-soft); }
dialog p strong { color: var(--text); }
dialog p + p { margin-top: 10px; }
.dialog-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 24px;
  cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
