/*
 * きょうのアートタイプ16 AI v2
 * キャラクターシートに合わせた、紙色 × 太い墨線 × 絵の具色の工作帳。
 * 診断フロー・LINE・共有ページで共通のトークンを使う。
 * サイバー・医療・研究所・スキャン線・レーダー・顔認識風のUIは使わない。
 */

:root {
  --orange: #F48342;
  --pink: #ED8CAE;
  --green: #4FA96B;
  --blue: #328EC4;
  --purple: #9370B6;
  --yellow: #F9CE54;
  --ink: #272721;
  --ink-soft: #635F54;
  --ink-faint: #716B60;
  --paper: #F8F3E8;
  --paper-warm: #EFE8D7;
  --white: #FFFDF7;
  --line: #C7BDA9;
  --focus: #216894;
  --danger-bg: #FBEDEA;
  --danger-line: #E8B4A8;
  --danger-ink: #8C3A28;
  --radius-card: 24px;
  --radius-pill: 999px;
  --shadow-card: 4px 5px 0 rgba(39, 39, 33, 0.14);
  --font-body: "Hiragino Maru Gothic ProN", "Hiragino Sans", "Yu Gothic",
    "BIZ UDPGothic", "Noto Sans JP", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { height: 100%; }

body {
  margin: 0;
  min-height: 100%;
  background: var(--paper);
  background-image: radial-gradient(#DAD2C1 0.7px, transparent 0.7px);
  background-size: 16px 16px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---- 背景ブロブ（装飾。作品より目立たせない） ---- */

.bg-blobs {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.blob {
  position: absolute;
  border: 3px solid var(--ink);
  opacity: 0.72;
}

.blob--orange { background: var(--orange); }
.blob--pink { background: var(--pink); }
.blob--green { background: var(--green); }
.blob--blue { background: var(--blue); }
.blob--purple { background: var(--purple); }

.blob--a { width: 128px; height: 120px; top: -72px; right: -62px; border-radius: 35% 55% 42% 48%; transform: rotate(-18deg); }
.blob--b { width: 110px; height: 145px; top: 35%; left: -100px; border-radius: 46% 42% 50% 38%; }
.blob--c { width: 110px; height: 125px; bottom: 180px; right: -100px; border-radius: 38% 48% 32% 54%; }
.blob--d { width: 135px; height: 125px; bottom: -95px; left: -45px; border-radius: 45% 38% 46% 48%; transform: rotate(20deg); }

body[data-screen='crop'] .blob,
body[data-screen='quality'] .blob,
body[data-screen='analysis'] .blob,
body[data-screen='questions'] .blob,
body[data-screen='result'] .blob {
  opacity: 0.35;
}

/* ---- レイアウト ---- */

.app,
.page {
  position: relative;
  z-index: 1;
  max-width: 430px;
  margin: 0 auto;
  padding: 50px 22px 56px;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

@media (min-width: 700px) {
  .app, .page { max-width: 760px; padding: 52px 40px 72px; }
  .screen, .page-inner { max-width: 560px; margin: 0 auto; width: 100%; }
}

.screen, .page-inner {
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: 1;
}

/* ---- タイポグラフィ ---- */

.brand { font-size: 15px; font-weight: 900; letter-spacing: 0.03em; margin: 0; }
.service-name {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  margin: 0;
}
.lead {
  font-size: clamp(26px, 4.8vw, 34px);
  font-weight: 800;
  line-height: 1.5;
  letter-spacing: 0.02em;
  margin: 6px 0 0;
  text-wrap: balance;
}
.section-lead {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.5;
  margin: 0;
  text-wrap: balance;
}
.description { font-size: 16px; color: var(--ink-soft); margin: 0; text-wrap: pretty; }
.note { font-size: 13px; color: var(--ink-soft); margin: 0; }
.note--faint { color: var(--ink-faint); }
.disclaimer { font-size: 12.5px; color: var(--ink-soft); line-height: 1.7; margin: 0; }
.body-text { font-size: 15px; margin: 0; }

.card-heading {
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  margin: 0 0 10px;
}

/* ---- ボタン ---- */

button { font-family: inherit; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 12px 28px;
  border-radius: var(--radius-pill);
  border: 2.5px solid var(--ink);
  background: var(--yellow);
  color: var(--ink);
  box-shadow: 0 4px 0 var(--ink);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
  text-decoration: none;
}

.btn:hover:not(:disabled) { transform: translateY(-2px); }
.btn:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.btn:disabled { background: #E3DDD0; color: #80796C; border-color: #BEB5A5; box-shadow: none; cursor: not-allowed; }

.btn--ghost { background: var(--white); color: var(--ink); box-shadow: 0 3px 0 var(--ink); }
.btn--ghost:disabled { background: transparent; color: #B5B3BC; border-color: #D9D7DE; }
.btn--line { background: #D6EACA; border-color: var(--ink); color: #234C2E; }

.btn--text {
  min-height: 44px;
  padding: 8px 16px;
  border: none;
  background: transparent;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
  border-radius: 8px;
}
.btn--text:hover { color: var(--ink); }
.btn--text:disabled { color: #B5B3BC; cursor: not-allowed; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---- 汎用 ---- */

.panel {
  border-radius: var(--radius-card);
  background: var(--white);
  border: 2px solid var(--ink);
  padding: 20px;
}
.panel--white {
  background: var(--white);
  border: 2px solid var(--ink);
  box-shadow: var(--shadow-card);
}

.error-box {
  border-radius: 14px;
  background: var(--danger-bg);
  border: 1px solid var(--danger-line);
  color: var(--danger-ink);
  padding: 12px 16px;
  font-size: 14px;
  margin: 0;
}

.privacy-note {
  font-size: 13px;
  color: var(--ink-soft);
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--paper-warm);
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
  text-align: center;
}

.proto-banner {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-soft);
  background: var(--paper-warm);
  border: 1.5px dashed var(--line);
  border-radius: 12px;
  padding: 8px 14px;
  text-align: center;
  margin: 0;
}

/* ---- ランディング ---- */

.intro { justify-content: center; text-align: center; gap: 18px; }
.brand-logo-frame { position: relative; width: min(264px, 80%); aspect-ratio: 5 / 1; }
.brand-logo { position: absolute; display: block; width: 100%; height: auto; top: 50%; transform: translateY(-50%); }
.intro .lead { font-size: clamp(23px, 6.2vw, 34px); margin: 0; }
.intro .lead-chunk { display: block; }
.intro .lead-chunk--eyebrow { font-size: clamp(14px, 3.9vw, 20px); letter-spacing: 0.015em; margin-bottom: 6px; }
.intro-topline { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 6px; }
.intro-time { align-self: center; margin: 0; padding: 2px 16px; border-radius: 999px; background: #F9CE5466; font-size: 13px; font-weight: 800; letter-spacing: .07em; }
.intro-benefit { margin: 0; font-size: clamp(18px, 4.8vw, 23px); font-weight: 700; line-height: 1.8; white-space: pre-line; }
.intro-time-note { margin: 0; font-size: 11px; line-height: 1.6; color: var(--ink-soft); }
.intro .service-name { align-self: center; color: var(--ink); border-bottom: 3px solid var(--orange); padding: 0 8px 3px; }
.intro-studio { position: relative; border: 2.5px solid var(--ink); border-radius: 28px 24px 26px 20px; background: var(--white); box-shadow: 5px 6px 0 #D8D0BF; padding: 14px 12px 12px; margin: 8px 0 4px; }
.studio-label { display: inline-block; background: var(--pink); border: 2px solid var(--ink); border-radius: 7px; font-size: 12px; font-weight: 800; margin: -30px 0 12px; padding: 4px 15px; transform: rotate(-3deg); }
.intro-characters { max-width: 100%; background: #E9E2D5; border: 2px solid var(--ink); border-radius: 16px; overflow: hidden; }
.character-parade-track { display: flex; width: max-content; animation: character-parade 90s linear infinite; will-change: transform; }
.character-parade-group { display: flex; flex: none; gap: 10px; list-style: none; margin: 0; padding: 12px 10px 12px 0; }
.character-tile { width: 176px; flex: none; margin: 0; background: var(--white); border: 1.5px solid var(--ink); border-radius: 13px; overflow: hidden; }
.character-tile-art { display: flex; height: 128px; align-items: center; background: transparent; }
.character-tile-art > span { display: block; width: 100%; }
.character-tile svg { display: block; width: 100%; height: auto; aspect-ratio: 1.42; }
.character-tile-name { display: block; padding: 7px 2px; font-size: 11px; font-weight: 800; white-space: nowrap; }
.character-picker { border: 0; padding: 0; margin: 0; text-align: center; }
.character-picker legend { float: none; width: 100%; margin: 0 0 6px; padding: 0; font-size: 12px; font-weight: 700; }
.character-picker .option-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; max-width: 360px; margin-inline: auto; }
.character-picker .option-pill { min-width: 0; }
.character-picker .option-pill span { width: 100%; justify-content: center; padding-inline: 6px; font-size: 14px; white-space: nowrap; }
.character-picker-note { margin: 8px 0 0; font-size: 12px; line-height: 1.6; color: var(--ink-soft); }
.age-picker { width: 100%; max-width: 360px; margin-inline: auto; text-align: center; }
.age-picker label { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 700; }
.age-picker select { width: 100%; min-height: 46px; padding: 10px 14px; border: 1.5px solid var(--ink); border-radius: 12px; background: var(--white); color: var(--ink); font: inherit; font-size: 16px; }
@keyframes character-parade { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .intro-characters { overflow-x: auto; }
  .character-parade-track { animation: none; transform: none; will-change: auto; }
  .character-parade-group[aria-hidden="true"] { display: none; }
}
.intro .actions { margin-top: 2px; gap: 10px; }
.intro .actions .btn { font-size: clamp(14px, 3.9vw, 18px); padding-inline: 12px; }

/* Keep the start button in the first mobile viewport without shrinking the artwork or type. */
@media (max-width: 699px) {
  body[data-screen='landing'] .app { padding-top: 16px; padding-bottom: 24px; }
  .intro { justify-content: flex-start; gap: 12px; }
  .intro-topline { margin-bottom: 2px; }
  .intro-studio { padding: 10px; margin: 4px 0 2px; }
  .intro .studio-label { margin-bottom: 8px; }
  .intro .character-parade-group { padding-block: 10px; }
  .intro .actions { margin-top: 0; }
}

/* Browser toolbars leave less room on shorter phones; tighten only spacing further. */
@media (max-width: 699px) and (max-height: 640px) {
  body[data-screen='landing'] .app { padding-top: 10px; }
  .intro { gap: 8px; }
  .intro-topline { margin-bottom: 0; }
  .intro-benefit { line-height: 1.65; }
  .intro-studio { padding: 8px; margin: 2px 0 0; }
  .intro .studio-label { margin-bottom: 6px; }
  .intro .character-parade-group { padding-block: 8px; }
}

.intro-sample {
  margin: 6px auto 0;
  width: 200px;
  border-radius: 16px;
  border: 1.5px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow-card);
  padding: 12px 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}
.intro-sample .sample-art {
  width: 100%;
  height: 110px;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  background: var(--paper-warm);
}
.intro-sample .sample-art span {
  position: absolute;
  mix-blend-mode: multiply;
  opacity: 0.85;
  border-radius: 58% 42% 55% 45% / 52% 55% 45% 48%;
}
.intro-sample .sample-name { font-size: 13px; font-weight: 800; margin: 0; }
.intro-sample svg { width: 40px; height: 40px; }
.time-note { font-size: 13px; color: var(--ink-soft); margin: 0; }
.intro .disclaimer { margin-top: 16px; }

/* ---- 同意（Screen 2） ---- */

.consent-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.consent-list li {
  position: relative;
  padding-left: 24px;
  font-size: 14.5px;
}
.consent-list li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.5em;
  width: 12px;
  height: 11px;
  border-radius: 58% 42% 55% 45% / 52% 55% 45% 48%;
  background: var(--blue);
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  cursor: pointer;
}
.check-row input {
  width: 22px;
  height: 22px;
  margin: 2px 0 0;
  accent-color: var(--ink);
  flex: none;
}
.artwork-consent-copy { min-width: 0; }
.artwork-consent-copy > span { display: block; }
.privacy-consent { display: flex; flex-direction: column; gap: 6px; }
.privacy-link { align-self: center; max-width: 100%; padding: 5px 0; color: var(--ink-soft); font-size: 12px; text-align: center; text-underline-offset: 4px; }
.privacy-consent .privacy-link { align-self: flex-start; margin-left: 32px; text-align: left; }
.external-consent-copy { min-width: 0; }
.privacy-consent .external-consent-copy .privacy-link { margin-left: 0; padding: 0; color: var(--focus); font-size: inherit; }

/* ---- 画像の取り扱い・プライバシーポリシー ---- */
.privacy-page .page-inner { gap: 28px; }
.privacy-header { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.privacy-header .brand-logo-frame { display: block; width: 224px; }
.privacy-header h1 { margin: 0; font-size: clamp(23px, 5.5vw, 30px); line-height: 1.5; }
.privacy-date { margin: 0; color: var(--ink-soft); font-size: 12px; }
.privacy-review { margin: 0; padding: 14px 16px; border-left: 3px solid var(--yellow); background: var(--white); font-size: 13px; }
.privacy-summary { padding: 20px; border: 1.5px solid var(--line); border-radius: 20px; background: var(--white); }
.privacy-page h2 { margin: 0 0 10px; font-size: 18px; }
.privacy-page p, .privacy-page li { font-size: 14px; line-height: 1.9; overflow-wrap: anywhere; }
.privacy-page p { margin: 10px 0 0; }
.privacy-page ul { padding-left: 1.3em; margin: 10px 0 0; }
.privacy-page li + li { margin-top: 8px; }
.privacy-page a:not(.brand-logo-frame) { color: var(--focus); text-underline-offset: 4px; }
.privacy-page .privacy-footer { border-top: 1px solid var(--line); padding-top: 20px; font-size: 12px; }

/* ---- 撮影ガイド ---- */

.guide-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.guide-list li {
  position: relative;
  padding-left: 24px;
  font-size: 15px;
}
.guide-list li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.5em;
  width: 12px;
  height: 11px;
  border-radius: 58% 42% 55% 45% / 52% 55% 45% 48%;
  background: var(--green);
}
.guide-list li:nth-child(2)::before { background: var(--orange); }
.guide-list li:nth-child(3)::before { background: var(--blue); }
.guide-list li:nth-child(4)::before { background: var(--pink); }

/* ---- クロップ ---- */

.crop-stage {
  position: relative;
  border-radius: var(--radius-card);
  overflow: hidden;
  background: #EFECE6;
  border: 2px solid var(--ink);
  box-shadow: var(--shadow-card);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.crop-stage canvas { display: block; width: 100%; height: auto; }

.crop-rect {
  position: absolute;
  border: 2.5px solid #fff;
  outline: 2px solid var(--ink);
  box-shadow: 0 0 0 9999px rgba(27, 27, 51, 0.42);
  cursor: move;
  touch-action: none;
}
.crop-handle {
  position: absolute;
  width: 30px;
  height: 30px;
  background: transparent;
  touch-action: none;
}
.crop-handle::after {
  content: '';
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: #fff;
  border: 2.5px solid var(--ink);
}
.crop-handle--nw { top: -15px; left: -15px; cursor: nwse-resize; }
.crop-handle--ne { top: -15px; right: -15px; cursor: nesw-resize; }
.crop-handle--sw { bottom: -15px; left: -15px; cursor: nesw-resize; }
.crop-handle--se { bottom: -15px; right: -15px; cursor: nwse-resize; }

.crop-tools {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.crop-tools .btn--ghost { min-height: 46px; padding: 8px 18px; font-size: 14px; }

/* ---- 分析・品質 ---- */

.analysis-visual {
  position: relative;
  margin: 8px auto 0;
  width: 170px;
  height: 150px;
}
.analysis-visual .a-blob {
  position: absolute;
  border: 3px solid var(--ink);
  opacity: 0.95;
  animation: breathe 1.5s ease-in-out infinite alternate;
}
.analysis-visual .a-blob--1 { width: 96px; height: 88px; top: 10px; left: 8px; background: var(--pink); border-radius: 58% 42% 55% 45% / 52% 55% 45% 48%; }
.analysis-visual .a-blob--2 { width: 84px; height: 76px; top: 34px; left: 66px; background: var(--blue); border-radius: 47% 53% 58% 42% / 55% 46% 54% 45%; animation-delay: 0.35s; }
.analysis-visual .a-blob--3 { width: 62px; height: 58px; top: 0; left: 88px; background: var(--green); border-radius: 52% 48% 44% 56% / 49% 56% 44% 51%; animation-delay: 0.7s; }

@keyframes breathe {
  from { transform: scale(0.92); }
  to { transform: scale(1.06); }
}

.analysis-thumb {
  max-width: min(230px, 70vw);
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.analysis-thumb canvas { display: block; width: auto; height: auto; max-width: min(230px, 70vw); max-height: 230px; }

/* Share the already-rendered card without leaving the result page. */
.share-dialog {
  width: min(440px, calc(100% - 24px));
  max-height: calc(100dvh - 24px);
  padding: 0;
  border: 2px solid var(--ink);
  border-radius: 24px;
  background: var(--white);
  color: var(--ink);
  overflow: auto;
  overscroll-behavior: contain;
  box-shadow: 0 12px 48px #0003;
}
.share-dialog[open] { display: flex; flex-direction: column; }
.share-dialog::backdrop, .share-dialog-backdrop { background: rgb(25 25 23 / 65%); }
.share-dialog-backdrop { position: fixed; inset: 0; z-index: 1000; }
.share-dialog--fallback { position: fixed; inset: 0; margin: auto; z-index: 1001; height: fit-content; }
.share-dialog-header { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px 8px 20px; flex: 0 0 auto; }
.share-dialog-header h2 { margin: 0; font-size: 18px; font-weight: 800; }
.share-dialog-close { border: 0; background: transparent; color: inherit; width: 44px; height: 44px; font-size: 30px; cursor: pointer; border-radius: 50%; }
.share-dialog-body { padding: 0 20px; min-height: 60px; overflow: auto; overscroll-behavior: contain; }
.share-dialog-image { display: block; margin: 0 auto; width: auto; height: min(48dvh, 440px); max-width: 100%; object-fit: contain; -webkit-touch-callout: default; user-select: auto; }
.share-dialog-footer { padding: 16px 20px 18px; flex: 0 0 auto; }
.share-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.share-option { border: 0; background: transparent; color: inherit; padding: 0 2px; min-height: 76px; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; cursor: pointer; border-radius: 12px; }
.share-option-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 16px; background: var(--paper-warm); font-family: system-ui, sans-serif; font-size: 30px; line-height: 1; }
.share-option--story .share-option-icon { background: radial-gradient(circle at 15% 105%, #FFDC80 0%, #FCAF45 18%, #F77737 32%, #E1306C 55%, #C13584 72%, #833AB4 86%, #5851DB 100%); color: #FFF; }
.share-instagram-icon { display: block; width: 28px; height: 28px; filter: brightness(0) invert(1); }
.share-option--x .share-option-icon { background: var(--ink); color: white; }
.share-option--save .share-option-icon { background: var(--yellow); }
.share-dialog-note, .share-dialog-error { margin: 12px 0 0; font-size: 12px; line-height: 1.65; color: var(--ink-soft); }
.share-dialog-note { text-align: center; }
.share-dialog-error { color: var(--danger-ink); }
.share-dialog-x-link { display: block; margin-top: 10px; font-size: 12px; color: var(--focus); text-underline-offset: 3px; }
.share-dialog [hidden] { display: none; }
@media (max-height: 540px) {
  .share-dialog-body { flex: 1 1 auto; }
  .share-dialog-image { height: 28dvh; }
  .share-dialog-footer { padding-top: 8px; padding-bottom: 10px; }
  .share-dialog-note, .share-dialog-error { margin-top: 6px; }
}

.reveal { justify-content: center; align-items: center; text-align: center; gap: 24px; }
.reveal-copy { font-size: 17px; font-weight: 600; color: var(--ink-soft); margin: 0; white-space: pre-line; }
.reveal-emblem { animation: emerge 1.1s ease both; overflow: hidden; border: 2.5px solid var(--ink); border-radius: 24px; background: transparent; }
.reveal-emblem svg { width: 130px; height: 130px; }

@keyframes emerge {
  from { transform: scale(0.7); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.quality-warnings {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ---- 質問 ---- */

.progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.progress-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
}
.progress-dots { display: flex; gap: 7px; }
.progress-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--line);
  transition: background 0.2s ease, transform 0.2s ease;
}
.progress-dot.is-done { background: var(--green); }
.progress-dot.is-current { background: var(--orange); transform: scale(1.25); }

.question-lead {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.5;
  margin: 4px 0 0;
}

.choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.choice-card {
  position: relative;
  min-height: 150px;
  padding: 40px 14px 18px;
  border-radius: var(--radius-card);
  border: 2px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow-card);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.6;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.choice-card:hover { border-color: var(--ink-soft); }
.choice-card::before {
  content: '';
  position: absolute;
  top: 14px;
  left: 14px;
  width: 18px;
  height: 16px;
  border-radius: 58% 42% 55% 45% / 52% 55% 45% 48%;
  opacity: 0.9;
}
.choice-card:nth-child(1)::before { background: var(--pink); }
.choice-card:nth-child(2)::before { background: var(--blue); }
.choice-card.is-selected { border-color: var(--ink); transform: scale(0.98); }
.choice-card.is-selected::after {
  content: '✓ えらんだ';
  position: absolute;
  top: 12px;
  right: 14px;
  font-size: 12px;
  font-weight: 700;
}

.question-footer { margin-top: auto; display: flex; justify-content: flex-start; }

/* ---- 結果 ---- */

.result { gap: 20px; }
body[data-screen='result'] .app { padding-top: 16px; }
.result-card-hero { position: relative; margin: 0 -10px; }
.result-card-image { display: block; width: 100%; height: auto; }
.result-card-image[hidden] { display: none; }
.result-card-fallback { display: grid; gap: 14px; padding: 30px 24px; text-align: center; border: 2px solid var(--ink); border-radius: 24px; background: var(--paper); }
.result-card-fallback .card-heading { margin: 10px 0 0; }
.result-card-fallback p { margin: 0; }
.result-card-status { margin: 10px 0; text-align: center; font-size: 13px; color: var(--ink-soft); }
.panel > .result-artwork { margin: 16px 0; }

.result-artwork {
  position: relative;
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  background: var(--paper-warm);
  border: 2.5px solid var(--ink);
}
.result-artwork canvas {
  display: block;
  width: 100%;
  max-height: 46vh;
  object-fit: contain;
  background: var(--paper-warm);
}

/* AI観察のマーカー（控えめな番号ラベル。物体検出風にしない） */
.anchor-marker {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  border: 2px solid var(--ink);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.evidence-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  font-size: 11.5px;
  font-weight: 800;
  margin-right: 8px;
  flex: none;
}

.result-heading {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  margin: 4px 0 0;
  text-align: center;
}
.result-emblem { text-align: center; align-self: center; background: transparent; border: 2.5px solid var(--ink); border-radius: 24px; overflow: hidden; }
.result-emblem svg { display: block; width: 224px; height: 164px; }
.result-identity { display: grid; gap: 6px; text-align: center; }
.result-type-name {
  font-size: clamp(26px, 6.2vw, 34px);
  font-weight: 800;
  line-height: 1.35;
  margin: 0;
  text-align: center;
}
.result .type-code { margin: 0; text-align: center; font-size: 13px; font-weight: 700; line-height: 1.4; letter-spacing: 0.14em; color: var(--ink-soft); }
.result-type-copy {
  font-size: 16px;
  color: var(--ink-soft);
  margin: 6px 0 0;
  line-height: 1.65;
  text-wrap: balance;
  text-align: center;
}

.line-invitation { display: grid; gap: 20px; margin-top: 12px; padding: 32px 20px 24px; border: 0; border-radius: 24px; background: #E3F4F0; overflow: hidden; }
.line-invitation-title { margin: 0; text-align: center; font-size: clamp(24px, 6vw, 30px); font-weight: 800; line-height: 1.5; }
.analysis-teaser-photo { margin: 0 auto; width: min(100%, 290px); padding: 12px; background: #FFFDF9; border: 1px solid #DDD5C6; box-shadow: 0 5px 14px #35443B18; }
.analysis-teaser-artwork { display: block; width: 100%; height: auto; max-height: 300px; object-fit: contain; }
.analysis-teaser-caption { margin: 2px 0 0; text-align: left; color: #344A45; font-size: 16px; line-height: 1.95; }
.analysis-teaser-opening .reading-emphasis { white-space: nowrap; }
/* Text shadow keeps the blurred continuation inline, including at a line wrap. */
.analysis-teaser-continuation { color: transparent; text-shadow: 0 0 8px #344A45A6; pointer-events: none; user-select: none; }
.analysis-teaser-gate { display: grid; position: relative; isolation: isolate; }
.analysis-teaser-blur { position: absolute; inset: 0; filter: blur(3px); opacity: .7; pointer-events: none; user-select: none; overflow: hidden; padding: 0 2px; color: #344A45; }
.analysis-teaser-paragraph { margin: 0 0 26px; font-size: 17px; line-height: 2; }
.analysis-teaser-paragraph p { margin: 0; }
.analysis-teaser-label { font-weight: 800; margin-bottom: 6px !important; }
.analysis-teaser-balance { display: grid; gap: 14px; margin-bottom: 24px; }
.analysis-teaser-balance > p { margin: 0; font-size: 17px; }
.teaser-balance-row { display: grid; gap: 5px; }
.teaser-balance-label { margin: 0; font-size: 13px; font-weight: 800; text-align: center; }
.teaser-balance-poles { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; line-height: 1.5; }
.teaser-balance-row--motif { --teaser-color: var(--orange); }
.teaser-balance-row--space { --teaser-color: var(--green); }
.teaser-balance-row--touch { --teaser-color: var(--blue); }
.teaser-balance-row--palette { --teaser-color: var(--purple); }
.teaser-balance-track { height: 10px; border: 1px solid var(--teaser-color); border-radius: 999px; background: linear-gradient(90deg, var(--teaser-color), #FFFFFFB3); }
.line-teacher-prompt { grid-area: 1 / 1; z-index: 1; display: flex; align-items: center; flex-direction: column; padding-top: 8px; background: linear-gradient(transparent 20%, #E3F4F066 58%, #E3F4F0 95%); }
.line-teacher-cta { display: flex; align-items: center; flex-direction: column; width: 64%; max-width: 250px; margin: 0; padding: 0; border: 0; background: transparent; color: var(--ink); font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.line-teacher-invite { display: block; color: #C58931; font-size: clamp(25px, 7vw, 34px); font-weight: 900; line-height: 1.4; text-align: center; -webkit-text-stroke: 6px #FFF; paint-order: stroke fill; }
.line-teacher-invite > span { display: block; }
.line-teacher-arrow { font-family: sans-serif; color: #C58931; font-size: 54px; font-weight: 400; line-height: 1.2; margin: 4px 0 8px; -webkit-text-stroke: 4px #FFF; paint-order: stroke fill; }
.line-teacher-badge { color: #00AB41; font-size: clamp(28px, 7.4vw, 38px); font-weight: 900; line-height: 1.2; letter-spacing: -.04em; -webkit-text-stroke: 7px #FFF; paint-order: stroke fill; filter: drop-shadow(1px 3px 0 #008C2A); position: relative; z-index: 2; white-space: nowrap; }
.line-teacher-image { display: block; width: 100%; height: auto; margin: -2px auto 4px; filter: drop-shadow(0 4px 1px #35504514); }
.line-teacher-cta:hover { opacity: .88; }
.line-teacher-cta:focus-visible { outline-offset: 6px; }
.line-benefits { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; font-size: 13px; }
.line-benefits li { position: relative; padding-left: 22px; }
.line-benefits li::before { content: '✓'; position: absolute; left: 0; color: #376644; font-weight: 800; }
.result-line-cta { width: 100%; padding-inline: 10px; font-size: 15px; letter-spacing: 0; white-space: nowrap; background: #176442; border-color: #17422D; color: #fff; box-shadow: 0 4px 0 #17422D; }

.drawing-style-summary { background: var(--white); border-color: #EFC7C4; }
.drawing-style-copy { margin: 0; white-space: pre-line; font-size: 16px; font-weight: 700; line-height: 1.9; overflow-wrap: anywhere; }
.type-story { background: var(--white); }
.type-story .body-text { line-height: 1.95; text-wrap: pretty; }
.type-story .body-text + .body-text { margin-top: 14px; }

.type-guide-section { position: relative; display: grid; gap: 18px; background: var(--white); }
.type-guide-number { margin: 0; color: var(--ink-soft); font-size: 12px; font-weight: 800; letter-spacing: .15em; }
.type-guide-title { margin: -10px 0 0; font-size: clamp(20px, 5.3vw, 25px); line-height: 1.5; text-wrap: balance; }
.type-guide-title--overview { font-size: clamp(16px, 4.8vw, 23px); text-wrap: pretty; }
.type-guide-subtitle { margin: 8px 0 0; font-size: clamp(17px, 4.8vw, 21px); line-height: 1.6; text-wrap: pretty; }
.type-guide-lead { margin: 0; font-size: 18px; font-weight: 800; line-height: 1.8; }
.type-guide-section .body-text { font-size: 15px; line-height: 2; margin: 0; }
.reading-emphasis { font-weight: 800; }
.reading-emphasis mark { color: inherit; background: linear-gradient(transparent 65%, #FFE16C 65%, #FFE16C 94%, transparent 94%); -webkit-box-decoration-break: clone; box-decoration-break: clone; padding: 0 .06em; }
.type-guide-section--growth { background: #FFFBEF; border-color: #C59C32; }
.growth-guide-talent { margin: 0; font-size: clamp(23px, 6.3vw, 30px); font-weight: 800; line-height: 1.6; }
.growth-guide-transition { margin: 2px 0 -8px; font-size: 15px; font-weight: 700; line-height: 1.8; }
.growth-guide-tip { margin: 0; font-size: 19px; font-weight: 800; line-height: 1.8; text-wrap: balance; }
.product-invitation { display: grid; gap: 16px; position: relative; padding: 28px 20px 22px; margin-top: 10px; border: 1px solid #DDD6E5; border-radius: 24px; background: #FFF; color: #111A3B; overflow: hidden; }
.product-invitation-title { font-size: clamp(16px, 4.4vw, 19px); font-weight: 600; color: #596068; line-height: 1.8; margin: 0; text-align: center; }
.product-invitation-title > span { display: block; }
.product-brand-stage { display: grid; place-items: center; height: 174px; position: relative; isolation: isolate; margin: 0 -20px; overflow: hidden; }
.product-brand-logo { position: relative; display: block; width: 144px; aspect-ratio: 576 / 378; overflow: hidden; }
.product-brand-logo img { position: absolute; width: 217.70834%; max-width: none; height: auto; left: -58.85417%; top: -115.87302%; }
.product-brand-blob { position: absolute; z-index: -1; border-radius: 47% 53% 41% 59% / 53% 43% 57% 47%; mix-blend-mode: multiply; }
.product-brand-blob--pink { width: 112px; height: 116px; background: #E6A9AC; left: -38px; top: 14px; transform: rotate(20deg); }
.product-brand-blob--orange { width: 56px; height: 65px; background: #E29560; left: 25px; top: 4px; transform: rotate(-20deg); }
.product-brand-blob--green { width: 80px; height: 75px; background: #7BB69F; right: -8px; top: -8px; transform: rotate(12deg); }
.product-brand-blob--blue { width: 95px; height: 84px; background: #7293BF; right: 20px; bottom: -37px; transform: rotate(30deg); }
.product-brand-blob--purple { width: 91px; height: 80px; background: #856B9E; right: -36px; bottom: -12px; transform: rotate(-20deg); }
.product-link { background: #C7E65B; color: #243017; border-color: #637B28; box-shadow: 0 4px 0 #637B28; font-size: 16px; }
.product-link:hover { background: #B8DA47; }
#result-preview-controls { position: relative; z-index: 1; width: min(100% - 44px, 556px); margin: 12px auto 0; }
.result-preview-toolbar { padding: 10px 14px; border: 1px dashed var(--line); border-radius: 12px; background: var(--white); font-size: 12px; }
.result-preview-toolbar summary { cursor: pointer; font-weight: 700; }
.result-preview-toolbar .note { margin: 12px 0; }
.result-preview-toolbar .select-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.result-preview-toolbar select { flex: 1; min-width: 0; padding: 8px; font-size: 13px; }
.result-preview-toolbar .btn { font-size: 13px; min-height: 40px; padding: 8px 12px; }

.axis-profile .card-heading { margin-bottom: 20px; }
.axis-profile > .note { margin-top: 16px; }
.axis-meter-list { display: flex; flex-direction: column; gap: 22px; margin: 0; padding: 0; list-style: none; }
.axis-meter--motif { --axis-color: var(--orange); }
.axis-meter--space { --axis-color: var(--green); }
.axis-meter--touch { --axis-color: var(--blue); }
.axis-meter--palette { --axis-color: var(--purple); }
.axis-meter-title { margin: 0 0 5px; text-align: center; font-size: 13px; font-weight: 800; letter-spacing: 0.08em; }
.axis-meter-labels { display: flex; justify-content: space-between; align-items: start; gap: 12px; font-size: 12px; line-height: 1.5; color: var(--ink-soft); }
.axis-meter-labels > span { flex: 1; }
.axis-meter-labels > span:last-child { text-align: right; }
.axis-meter-labels .is-leaning { font-weight: 800; color: var(--ink); }
.axis-meter-track { position: relative; height: 10px; margin: 12px 10px 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper-warm); }
.axis-meter-track::before { content: ''; position: absolute; left: 50%; top: -3px; width: 1px; height: 14px; background: var(--line); }
.axis-meter-dot { position: absolute; top: 50%; width: 20px; height: 20px; border: 2px solid var(--ink); border-radius: 50%; background: var(--axis-color); box-shadow: 0 0 0 3px var(--white); transform: translate(-50%, -50%); }

.chip-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 15px;
  border-radius: var(--radius-pill);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  background: var(--white);
  border: 1.5px solid var(--ink);
}
.chip::before {
  content: '';
  width: 11px;
  height: 10px;
  border-radius: 58% 42% 55% 45% / 52% 55% 45% 48%;
  background: var(--chip-color, var(--orange));
  border: 1px solid var(--ink);
  flex: none;
}
.chip--orange { --chip-color: var(--orange); }
.chip--green { --chip-color: var(--green); }
.chip--blue { --chip-color: var(--blue); }
.chip--purple { --chip-color: var(--purple); }
.chip--pink { --chip-color: var(--pink); }

.evidence-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.evidence-list li {
  position: relative;
  padding-left: 22px;
  font-size: 15px;
}
.evidence-list li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.55em;
  width: 11px;
  height: 10px;
  border-radius: 52% 48% 44% 56% / 49% 56% 44% 51%;
  background: var(--green);
}
.evidence-list li:nth-child(2)::before { background: var(--orange); }
.evidence-list li:nth-child(3)::before { background: var(--purple); }

.evidence-list--numbered li { padding-left: 0; display: flex; align-items: flex-start; }
.evidence-list--numbered li::before { content: none; }

.mixed-note {
  font-size: 14px;
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: #EAE1F1;
}

/* ---- LINE系・年齢帯 ---- */

.unlock-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.unlock-list li {
  position: relative;
  padding-left: 24px;
  font-size: 15px;
}
.unlock-list li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.5em;
  width: 12px;
  height: 11px;
  border-radius: 58% 42% 55% 45% / 52% 55% 45% 48%;
  background: var(--green);
}

.option-row { display: flex; flex-wrap: wrap; gap: 10px; }
.option-pill { position: relative; display: inline-flex; }
.option-pill input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.option-pill span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  border: 2px solid var(--line);
  background: #fff;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-soft);
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.option-pill span::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: #fff;
  flex: none;
}
.option-pill input:checked + span {
  border-color: var(--ink);
  color: var(--ink);
  background: var(--paper-warm);
}
.option-pill input:checked + span::before {
  border-color: var(--ink);
  background: var(--ink);
}
.option-pill input:focus-visible + span {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

fieldset { border: none; margin: 0; padding: 0; }
legend {
  font-size: 15px;
  font-weight: 700;
  padding: 0;
  margin-bottom: 10px;
}

.sequence-card {
  border-radius: var(--radius-card);
  border: 2px solid var(--ink);
  background: var(--white);
  box-shadow: var(--shadow-card);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sequence-card .seq-timing {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  margin: 0;
}
.sequence-card .seq-purpose { font-size: 13px; color: var(--ink-soft); margin: 0; }
.sequence-body {
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 14.5px;
  background: var(--paper-warm);
  border-radius: 14px;
  padding: 14px;
  margin: 0;
}
.seq-meta { margin: 0; font-size: 12.5px; color: var(--ink-faint); }
.seq-meta dt { font-weight: 700; display: inline; }
.seq-meta dd { display: inline; margin: 0 0 0 4px; }
.seq-meta div { margin-bottom: 2px; }

.select-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.select-row select {
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  font-family: inherit;
}

.page-inner--cards { gap: 16px; }

/* ---- analysis-lab / catalog（内部ページ） ---- */

.lab {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}
.lab h1 { font-size: 24px; margin: 0 0 4px; }
.lab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  margin-top: 18px;
}
.lab-cell {
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 12px;
}
.lab-cell--wide { grid-column: span 2; }
.lab-cell--full { grid-column: 1 / -1; }
.lab-cell h3 { font-size: 13px; margin: 0 0 8px; letter-spacing: 0.08em; }
.lab-cell canvas { display: block; width: 100%; height: auto; border-radius: 8px; background: var(--paper-warm); }
.lab table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.lab table th, .lab table td {
  text-align: left;
  padding: 4px 8px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.lab table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.lab-bar {
  position: relative;
  height: 10px;
  min-width: 90px;
  border-radius: 5px;
  background: var(--paper-warm);
  overflow: hidden;
}
.lab-bar span { position: absolute; top: 0; bottom: 0; }
.lab-bar--pos span { background: var(--green); }
.lab-bar--neg span { background: var(--orange); }
.lab select, .lab input[type='number'] {
  min-height: 38px;
  padding: 4px 8px;
  border-radius: 8px;
  border: 1.5px solid var(--line);
  font-family: inherit;
  font-size: 13px;
  background: #fff;
}
.lab input[type='number'] { width: 76px; }
.lab .answer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}
.lab .answer-grid label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
}
.lab .file-label { cursor: pointer; }
.lab .final-code { font-size: 18px; font-weight: 800; margin: 10px 0 0; }
.lab .lab-status { margin-left: 12px; }
.lab .live-warning {
  font-size: 13px;
  color: var(--danger-ink);
  background: var(--danger-bg);
  border-radius: 10px;
  padding: 8px 12px;
  margin: 8px 0 0;
}

.catalog-header {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px 8px;
}
.catalog-grid {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 18px;
  list-style: none;
}
.catalog-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-radius: var(--radius-card);
  border: 2px solid var(--ink);
  background: var(--white);
  box-shadow: var(--shadow-card);
  padding: 20px 18px;
}
.catalog-card svg { width: 120px; height: 130px; border-radius: 16px; background: transparent; }
.catalog-card .type-code {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--ink-soft);
}
.catalog-card .type-name { font-size: 19px; font-weight: 800; margin: 0; }
.catalog-card .type-copy { font-size: 14px; color: var(--ink-soft); margin: 0; }
.catalog-card .chip-row { justify-content: flex-start; }
.catalog-card .chip { font-size: 12px; padding: 5px 12px; }
.catalog-card h4 {
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  margin: 8px 0 2px;
}
.catalog-card p.small { font-size: 13px; margin: 0; }
.criteria-list {
  margin: 8px 0 0;
  padding-left: 20px;
  font-size: 13.5px;
  color: var(--ink-soft);
}
.criteria-toggle { cursor: pointer; font-size: 14px; font-weight: 700; }

/* ---- デバッグパネル（?debug=1のときだけDOMに追加） ---- */

.debug-panel {
  position: relative;
  z-index: 2;
  margin: 0 auto;
  max-width: 430px;
  width: 100%;
  padding: 16px 22px 30px;
  border-top: 2px dashed var(--line);
  font-size: 13px;
  color: var(--ink-soft);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.debug-panel h2 { font-size: 13px; letter-spacing: 0.1em; margin: 0; }
.debug-panel select,
.debug-panel button {
  font-size: 13px;
  min-height: 40px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-family: inherit;
}
.debug-panel pre {
  margin: 0;
  padding: 10px;
  background: var(--paper-warm);
  border-radius: 8px;
  font-size: 11.5px;
  overflow-x: auto;
  max-height: 320px;
  overflow-y: auto;
}
.debug-panel .debug-links { display: flex; flex-wrap: wrap; gap: 8px; }
.debug-panel .debug-links a { color: var(--blue); }

/* ---- 紋章SVGのブレンド（CSPに合わせstyle属性を使わない） ---- */

.em-mult { mix-blend-mode: multiply; }
.em-norm { mix-blend-mode: normal; }

/* ---- ユーティリティ ---- */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

[hidden] { display: none !important; }

/* ---- reduced motion ---- */

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
