/* =========================================================
   脳内メーカー風 診断サイト — INK / SPLAT スタイル
   インク・スプラッタ × 蛍光カラー × 極太スラント書体
   （スプラトゥーン的エネルギーをオリジナルで再構成）
   ========================================================= */

:root {
  --ink: #19112e;
  --ink-2: #2a1d4d;
  --ink-soft: #6a5f86;
  --paper: #fffdf6;
  --paper-2: #f4eefe;
  --line: #19112e;

  --pink: #ff2e88;
  --pink-deep: #e10e6c;
  --lime: #aaff00;
  --lime-deep: #8ad400;
  --cyan: #00e0d0;
  --purple: #8b3fff;
  --orange: #ff7a1a;
  --yellow: #ffd200;

  --accent: var(--pink);
  --accent2: var(--lime);

  --shadow-hard: 4px 4px 0 var(--ink);
  --shadow-hard-lg: 7px 7px 0 var(--ink);
  --radius: 22px;
  --radius-sm: 16px;
  --radius-xs: 12px;
  --maxw: 1080px;
  --sans: "M PLUS Rounded 1c", system-ui, sans-serif;
  --display: "Dela Gothic One", "M PLUS Rounded 1c", sans-serif;
  --serif: "Dela Gothic One", "M PLUS Rounded 1c", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: var(--sans);
  font-weight: 500;
  color: var(--paper);
  background-color: #140d26;
  background-image:
    radial-gradient(closest-side at 12% 18%, rgba(255,46,136,0.30), transparent),
    radial-gradient(closest-side at 88% 12%, rgba(170,255,0,0.22), transparent),
    radial-gradient(closest-side at 78% 82%, rgba(0,224,208,0.22), transparent),
    radial-gradient(closest-side at 18% 88%, rgba(139,63,255,0.30), transparent);
  background-attachment: fixed;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ばらまいたインク粒 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-repeat: no-repeat;
  background-image:
    url("../assets/nounai-ink-splat-pink.png"),
    url("../assets/nounai-ink-splat-lime.png");
  background-position: -130px 90px, calc(100% + 150px) 52%;
  background-size: 430px, 390px;
  opacity: 0.54;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: url("../assets/nounai-neon-splash.webp") center top / min(1350px, 120vw) auto no-repeat;
  opacity: 0.18;
  mix-blend-mode: screen;
}

.app {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px 80px;
}

::selection { background: var(--pink); color: #fff; }

/* スラント極太ヘッドライン共通 */
.start-title, .q-prompt, .type-name, .result-title, .rules-title, .logo-jp {
  font-weight: 900;
  letter-spacing: -0.01em;
}
/* インク看板系：ポスター極太書体 */
.start-title, .type-name, .result-title, .rules-title, .logo-jp, .q-current {
  font-family: var(--display);
  letter-spacing: 0;
}
.start-title, .type-name, .result-title { line-height: 1.3; }

/* ============ ヘッダー ============ */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 26px 4px 22px;
  flex-wrap: wrap;
}
.logo { display: flex; align-items: center; gap: 13px; background: none; border: none; cursor: pointer; padding: 0; text-align: left; }
.logo-mark {
  display: grid;
  place-items: center;
  width: 50px; height: 50px;
  background: var(--pink);
  color: #fff;
  font-family: var(--serif);
  font-weight: 900;
  font-size: 27px;
  border: 3px solid var(--paper);
  border-radius: 16px 13px 18px 12px;
  box-shadow: var(--shadow-hard);
  transform: rotate(-6deg);
}
.logo-text { display: flex; flex-direction: column; line-height: 1.18; }
.logo-jp { font-size: 21px; color: var(--paper); transform: skewX(-7deg); }
.logo-en { font-size: 9.5px; letter-spacing: 0.16em; color: var(--lime); text-transform: uppercase; font-weight: 700; }

.header-stamp {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--ink);
  background: var(--lime);
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  padding: 7px 16px;
  box-shadow: var(--shadow-hard);
  transform: rotate(2deg);
}

/* ============ 画面共通 ============ */
.screen { animation: pop-in 0.4s cubic-bezier(.2,.9,.3,1.2) both; }
@keyframes pop-in {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

/* 白パネル共通の質感 */
.start-card, .q-card, .result-vis, .breakdown, .parameter-card, .prompt-box, .rule {
  background: var(--paper);
  color: var(--ink);
  border: 3px solid var(--ink);
  box-shadow: var(--shadow-hard-lg);
}

/* ============ スタート画面 ============ */
.start { position: relative; padding-top: 10px; }
.start-card {
  position: relative;
  border-radius: var(--radius);
  padding: 52px 52px 44px;
  overflow: hidden;
}
.start-card::before {
  content: "";
  position: absolute;
  top: -94px; right: -86px;
  width: 340px; height: 340px;
  background: url("../assets/nounai-ink-splat-lime-paper.png") center/cover no-repeat;
  opacity: 0.82;
  pointer-events: none;
}

.start-eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #fff;
  background: var(--purple);
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  padding: 6px 16px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-hard);
  transform: rotate(-1.5deg);
}

.start-title {
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1.18;
  margin: 0 0 20px;
  position: relative;
}
.start-title { transform: skewX(-4deg); }
.title-accent {
  color: var(--pink);
  white-space: nowrap;
  -webkit-text-stroke: 2px var(--ink);
  paint-order: stroke fill;
}

.start-lead { font-size: 16px; font-weight: 600; color: var(--ink-soft); margin: 0 0 34px; max-width: 46ch; position: relative; }

.start-form {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  padding: 24px;
  background: var(--paper-2);
  border: 3px dashed var(--ink);
  border-radius: var(--radius-sm);
  position: relative;
}
.field { display: flex; flex-direction: column; gap: 8px; flex: 1 1 280px; min-width: 0; }
.field-label { font-size: 13px; font-weight: 800; }
.field-label em { margin-left: 6px; font-size: 10px; font-style: normal; color: #fff; background: var(--pink); border: 2px solid var(--ink); border-radius: 999px; padding: 2px 7px; }
.field-input {
  width: 100%;
  min-width: 0;
  font-family: var(--sans);
  font-size: 17px; font-weight: 700;
  padding: 14px 18px;
  border: 3px solid var(--ink);
  border-radius: var(--radius-xs);
  background: #fff; color: var(--ink);
  outline: none;
  transition: box-shadow 0.14s, transform 0.14s;
}
.field-input:focus { box-shadow: var(--shadow-hard); transform: translate(-2px,-2px); }
.field-input[aria-invalid="true"] { border-color: var(--pink); box-shadow: 4px 4px 0 var(--pink); }
.field-input::placeholder { color: var(--ink-soft); font-weight: 600; opacity: 0.6; }
.field-hint { font-size: 12px; font-weight: 600; color: var(--ink-soft); }
.field-error { font-size: 12px; font-weight: 900; color: var(--pink); }

.diagnosis-select {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 16px;
  margin-top: 18px;
  position: relative;
}
.diagnosis-card {
  width: 100%;
  min-width: 0;
  text-align: left;
  font-family: var(--sans);
  color: var(--ink);
  background:
    linear-gradient(rgba(255,253,246,0.86), rgba(255,253,246,0.86)),
    url("../assets/nounai-button-texture-lime.webp") center / cover no-repeat,
    #fff;
  border: 3px solid var(--ink);
  border-radius: var(--radius-sm);
  padding: 18px 18px 16px;
  box-shadow: var(--shadow-hard);
  cursor: pointer;
  transition: transform 0.13s cubic-bezier(.2,.9,.3,1.2), box-shadow 0.13s, filter 0.15s;
}
.diagnosis-card:hover { transform: translate(-2px,-3px) rotate(-0.6deg); box-shadow: 6px 8px 0 var(--ink); filter: saturate(1.16) contrast(1.04); }
.diagnosis-card-primary {
  color: #fff;
  background:
    linear-gradient(120deg, rgba(255,46,136,0.58), rgba(125,18,90,0.80)),
    url("../assets/nounai-button-texture-pink.webp") center / cover no-repeat,
    var(--pink);
  text-shadow: 0 2px 0 rgba(25,17,46,0.38);
}
.diagnosis-card-primary:hover { filter: saturate(1.22) contrast(1.08); }
.diagnosis-card-deep {
  color: #fff;
  background:
    linear-gradient(135deg, rgba(102,38,205,0.54), rgba(20,13,38,0.76)),
    url("../assets/nounai-button-texture-purple-cyan.webp") center / cover no-repeat,
    linear-gradient(135deg, #9a54ff 0%, #6f36db 54%, #3b2390 118%);
  text-shadow: 0 2px 0 rgba(25,17,46,0.45);
}
.diagnosis-card-deep:hover { filter: saturate(1.22) contrast(1.08); }
.diagnosis-card-primary .mode-badge,
.diagnosis-card-deep .mode-badge { background: var(--lime); color: var(--ink); }
.diagnosis-card strong { display: block; font-size: 19px; font-weight: 900; line-height: 1.35; margin: 9px 0 6px; }
.diagnosis-card span:not(.mode-badge) { display: block; font-size: 13px; font-weight: 700; line-height: 1.6; opacity: 0.86; }
.diagnosis-card em { display: inline-block; margin-top: 12px; font-size: 12px; font-style: normal; font-weight: 900; color: inherit; opacity: 0.96; }
.mode-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  padding: 3px 10px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--lime);
  color: var(--ink);
  font-size: 11px;
  font-weight: 900;
}

/* ============ ボタン ============ */
.btn-primary {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--sans);
  font-size: 17px; font-weight: 900;
  letter-spacing: 0.02em;
  color: #fff;
  background:
    linear-gradient(120deg, rgba(255,46,136,0.56), rgba(126,12,86,0.78)),
    url("../assets/nounai-button-texture-pink.webp") center / cover no-repeat,
    var(--pink);
  text-shadow: 0 2px 0 rgba(25,17,46,0.42);
  border: 3px solid var(--ink);
  border-radius: 999px;
  padding: 14px 30px;
  cursor: pointer;
  box-shadow: var(--shadow-hard);
  transition: transform 0.13s cubic-bezier(.2,.9,.3,1.2), box-shadow 0.13s, filter 0.15s;
  white-space: nowrap;
}
.btn-primary:hover { transform: translate(-2px,-3px) rotate(-1deg); box-shadow: 6px 8px 0 var(--ink); filter: saturate(1.2) contrast(1.08); }
.btn-primary:active { transform: translate(1px,1px); box-shadow: 2px 2px 0 var(--ink); }
.btn-arrow { font-size: 19px; transition: transform 0.15s; }
.btn-primary:hover .btn-arrow { transform: translateX(4px); }

.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--sans);
  font-size: 14px; font-weight: 800;
  color: var(--ink);
  background:
    linear-gradient(rgba(255,255,255,0.90), rgba(255,255,255,0.90)),
    url("../assets/nounai-button-texture-lime.webp") center / cover no-repeat,
    #fff;
  border: 3px solid var(--ink);
  border-radius: 999px;
  padding: 11px 20px;
  cursor: pointer;
  transition: transform 0.13s, box-shadow 0.13s, filter 0.15s;
}
.btn-ghost:hover:not(:disabled) { transform: translate(-2px,-2px); box-shadow: var(--shadow-hard); filter: saturate(1.18) contrast(1.04); }
.btn-ghost:disabled { opacity: 0.4; cursor: not-allowed; }

/* メタ情報 */
.start-meta { display: flex; flex-wrap: wrap; gap: 9px 14px; list-style: none; padding: 0; margin: 28px 0 0; position: relative; }
.start-meta li {
  font-size: 12.5px; font-weight: 800;
  color: var(--ink);
  background: var(--paper-2);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 5px 14px;
}

/* ルール説明 */
.start-rules { margin-top: 46px; }
.rules-title { font-size: 24px; margin: 0 0 20px; color: var(--paper); transform: skewX(-5deg); display: inline-block; }
.rules-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.rule {
  border-radius: var(--radius-sm);
  padding: 24px 22px;
  transition: transform 0.18s;
}
.rule:nth-child(1) { transform: rotate(-1.2deg); }
.rule:nth-child(2) { transform: rotate(0.8deg); }
.rule:nth-child(3) { transform: rotate(-0.6deg); }
.rule:hover { transform: translateY(-4px) rotate(0deg); }
.rule-num {
  display: inline-grid; place-items: center;
  width: 42px; height: 42px;
  font-weight: 900; font-size: 18px;
  color: var(--ink);
  border: 2.5px solid var(--ink);
  border-radius: 13px 10px 14px 9px;
  margin-bottom: 14px;
  transform: rotate(-4deg);
}
.rule:nth-child(1) .rule-num { background: var(--pink); color: #fff; }
.rule:nth-child(2) .rule-num { background: var(--lime); }
.rule:nth-child(3) .rule-num { background: var(--cyan); }
.rule-body h3 { margin: 0 0 7px; font-size: 16px; font-weight: 900; }
.rule-body p { margin: 0; font-size: 13.5px; font-weight: 600; color: var(--ink-soft); line-height: 1.7; }

/* ============ 質問画面 ============ */
.question { max-width: 720px; margin: 0 auto; }
.q-progress { margin: 6px 0 24px; }
.q-progress-track {
  height: 14px;
  background: rgba(255,255,255,0.12);
  border: 2.5px solid var(--paper);
  border-radius: 999px;
  overflow: hidden;
}
.q-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--pink), var(--orange), var(--yellow));
  border-radius: 999px;
  transition: width 0.45s cubic-bezier(.3,.1,.2,1);
}
.q-progress-label { display: flex; align-items: baseline; justify-content: flex-end; gap: 5px; margin-top: 10px; font-weight: 900; }
.q-current { font-size: 26px; color: var(--lime); transform: skewX(-6deg); display: inline-block; }
.q-slash { color: rgba(255,255,255,0.4); }
.q-total { font-size: 17px; color: rgba(255,255,255,0.6); }

.q-card { border-radius: var(--radius); padding: 40px 38px 32px; }
.q-tag {
  display: inline-block;
  font-size: 12px; font-weight: 900;
  letter-spacing: 0.04em;
  color: #fff; background: var(--ink);
  border-radius: 8px;
  padding: 5px 14px;
  margin-bottom: 18px;
  transform: rotate(-1.5deg);
}
.q-prompt {
  font-size: clamp(21px, 3.3vw, 28px);
  line-height: 1.5;
  margin: 0 0 28px;
  text-wrap: pretty;
}

.q-choices { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 13px; }
.choice {
  width: 100%;
  display: flex; align-items: center; gap: 16px;
  text-align: left;
  font-family: var(--sans);
  font-size: 16px; font-weight: 700;
  color: var(--ink);
  background:
    linear-gradient(rgba(255,255,255,0.90), rgba(255,255,255,0.90)),
    url("../assets/nounai-button-texture-lime.webp") center / cover no-repeat,
    #fff;
  border: 3px solid var(--ink);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  cursor: pointer;
  transition: transform 0.13s, box-shadow 0.13s, filter 0.15s;
}
.choice:hover { transform: translate(-2px,-2px); box-shadow: var(--shadow-hard); filter: saturate(1.16) contrast(1.04); }
.choice.is-selected {
  color: #fff;
  background:
    linear-gradient(120deg, rgba(255,46,136,0.58), rgba(126,12,86,0.80)),
    url("../assets/nounai-button-texture-pink.webp") center / cover no-repeat,
    var(--pink);
  text-shadow: 0 2px 0 rgba(25,17,46,0.34);
  box-shadow: var(--shadow-hard);
  transform: translate(-1px,-1px);
}
.choice-key {
  display: grid; place-items: center;
  width: 34px; height: 34px; flex-shrink: 0;
  font-weight: 900; font-size: 17px;
  background: var(--paper-2); color: var(--ink);
  border: 2.5px solid var(--ink);
  border-radius: 11px 8px 12px 9px;
  transform: rotate(-3deg);
}
.choice:hover .choice-key { background: #fff; color: var(--lime-deep); }
.choice.is-selected .choice-key { background: #fff; color: var(--pink); }
.choice-text { flex: 1; line-height: 1.5; }
.choice-arrow { font-size: 18px; opacity: 0; transition: opacity 0.14s, transform 0.14s; flex-shrink: 0; }
.choice:hover .choice-arrow { opacity: 1; transform: translateX(3px); }
.choice.is-selected .choice-arrow { opacity: 1; }

.q-nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 24px; flex-wrap: wrap; }
.q-hint { font-size: 12.5px; font-weight: 600; color: var(--ink-soft); }

/* ============ 結果画面 ============ */
.result-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); gap: 26px; align-items: start; }

.result-vis { border-radius: var(--radius); padding: 28px 26px 26px; position: sticky; top: 20px; }
.result-detail { order: -1; }
.result-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 900; letter-spacing: 0.06em;
  color: #fff; background: var(--purple);
  border: 2.5px solid var(--ink);
  border-radius: 999px; padding: 5px 14px;
  text-transform: uppercase;
}
.result-eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); animation: blink 1.2s ease-in-out infinite; }
@keyframes blink { 0%,100%{opacity:1;} 50%{opacity:0.2;} }

.result-title {
  font-family: var(--sans);
  font-size: clamp(22px, 3.3vw, 29px);
  font-weight: 800;
  letter-spacing: 0.01em;
  margin: 12px 0 18px;
  line-height: 1.35;
  transform: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

.brain-stage {
  background:
    radial-gradient(closest-side at 25% 20%, rgba(255,46,136,0.20), transparent),
    radial-gradient(closest-side at 80% 80%, rgba(0,224,208,0.20), transparent),
    var(--paper-2);
  border: 3px solid var(--ink);
  border-radius: var(--radius-sm);
  padding: 14px;
  aspect-ratio: 1 / 1;
  max-width: 420px;
  margin: 0 auto;
}
.howto-stage { display: grid; place-items: center; }
.howto-card {
  width: 100%;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  padding: 18px;
  background:
    radial-gradient(circle at 80% 12%, rgba(170,255,0,0.30), transparent 26%),
    radial-gradient(circle at 18% 82%, rgba(255,46,136,0.16), transparent 28%),
    #fffdf6;
  border: 3px solid var(--ink);
  border-radius: 18px;
  box-shadow: 4px 4px 0 rgba(25,17,46,0.20);
  position: relative;
  overflow: hidden;
}
.howto-badge {
  align-self: flex-start;
  color: #fff;
  background: var(--pink);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 4px 11px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  box-shadow: 3px 3px 0 var(--ink);
}
.howto-lead {
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(20px, 5vw, 28px);
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.32;
}
.howto-art {
  position: absolute;
  right: -18px;
  top: -18px;
  width: 124px;
  aspect-ratio: 1;
  background: url("../assets/nounai-howto-brain-blob.webp") center / cover no-repeat;
  border: 2px solid rgba(25,17,46,0.85);
  border-radius: 22px 16px 24px 18px;
  transform: rotate(5deg);
  opacity: 0.58;
  box-shadow: 3px 3px 0 rgba(25,17,46,0.45);
}
.howto-badge, .howto-lead, .howto-steps, .howto-note { position: relative; z-index: 1; }
.howto-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.howto-steps li {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  background: rgba(255,255,255,0.88);
  border: 2px solid rgba(25,17,46,0.88);
  border-radius: 14px;
}
.howto-steps li > span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: var(--ink);
  background: var(--lime);
  border: 2px solid var(--ink);
  border-radius: 50%;
  font-weight: 900;
}
.howto-steps p { margin: 0; display: grid; gap: 2px; }
.howto-steps strong { font-size: 13px; font-weight: 900; color: var(--ink); line-height: 1.25; }
.howto-steps small { font-size: 10.5px; font-weight: 700; color: var(--ink-soft); line-height: 1.35; }
.howto-note { margin: 0; color: var(--ink-soft); font-size: 11px; font-weight: 900; text-align: center; }

.result-actions { display: flex; flex-direction: column; gap: 11px; margin-top: 22px; }
.result-actions .btn-primary { justify-content: center; }
.result-actions .btn-ghost { text-align: center; }
.copy-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.copy-actions .btn-ghost { width: 100%; justify-content: center; padding-left: 12px; padding-right: 12px; }

/* 詳細カラム */
.result-detail { display: flex; flex-direction: column; gap: 20px; }

.type-card {
  background: linear-gradient(135deg, var(--pink) 0%, var(--purple) 55%, var(--cyan) 130%);
  color: #fff;
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  padding: 30px 28px;
  box-shadow: var(--shadow-hard-lg);
  position: relative;
  overflow: hidden;
}
.type-card::after {
  content: "脳";
  position: absolute; right: -12px; bottom: -46px;
  font-family: var(--serif); font-weight: 900;
  font-size: 156px; color: rgba(255,255,255,0.16); line-height: 1;
}
.type-eyebrow {
  display: inline-block;
  font-size: 11px; font-weight: 900; letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink); background: var(--lime);
  border: 2px solid var(--ink);
  border-radius: 999px; padding: 3px 12px;
  margin-bottom: 12px;
}
.type-name { font-family: var(--sans); font-size: clamp(25px, 4.2vw, 34px); margin: 0 0 16px; line-height: 1.35; position: relative; text-shadow: none; font-weight: 900; }
.type-comment { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.85; color: rgba(255,255,255,0.95); position: relative; }
.word-meanings {
  position: relative;
  margin-top: 18px;
  padding: 15px;
  background: rgba(255,255,255,0.14);
  border: 1.5px dashed rgba(255,255,255,0.42);
  border-radius: var(--radius-xs);
}
.word-meanings h3 {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 900;
  color: rgba(255,255,255,0.96);
}
.word-meanings ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.word-meanings li { display: grid; grid-template-columns: 30px 1fr; gap: 9px; align-items: start; }
.word-meaning-char {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: var(--ink);
  background: var(--lime);
  border: 2px solid var(--ink);
  border-radius: 9px 7px 10px 6px;
  font-family: var(--sans);
  font-weight: 900;
  font-size: 16px;
  line-height: 1;
}
.word-meaning-text { font-size: 12px; font-weight: 700; line-height: 1.55; color: rgba(255,255,255,0.92); }
.type-signals { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; position: relative; }
.type-signals span {
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 900;
}

/* 共通セクション見出し */
.section-h { font-weight: 900; font-size: 18px; margin: 0 0 16px; display: flex; align-items: center; gap: 9px; }
.section-h::before {
  content: ""; width: 16px; height: 16px;
  background: var(--pink);
  border: 2px solid var(--ink);
  border-radius: 8px 5px 9px 4px;
  transform: rotate(-8deg);
  flex-shrink: 0;
}

.breakdown, .parameter-card { border-radius: var(--radius); padding: 26px 24px; }

.breakdown-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; }
.bd-row { display: grid; grid-template-columns: 40px 1fr 48px; align-items: center; gap: 12px; }
.bd-word { font-family: var(--sans); font-weight: 900; font-size: 25px; text-align: center; color: var(--ink); }
.bd-row.role-main .bd-word { color: var(--pink); font-size: 30px; }
.bd-bar { height: 14px; background: var(--paper-2); border: 2px solid var(--ink); border-radius: 999px; overflow: hidden; }
.bd-bar-fill { height: 100%; border-radius: 999px; transition: width 0.7s cubic-bezier(.3,.1,.2,1); }
.role-main .bd-bar-fill { background: var(--pink); }
.role-sub .bd-bar-fill { background: var(--cyan); }
.role-rare .bd-bar-fill { background: var(--yellow); }
.bd-ratio { font-weight: 900; font-size: 16px; text-align: right; }
.breakdown-note { font-size: 12px; font-weight: 600; color: var(--ink-soft); margin-top: 16px; line-height: 1.6; }

.parameter-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.parameter-list li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5px 10px;
  align-items: center;
  padding: 12px 13px;
  background: var(--paper-2);
  border: 2px dashed rgba(25,17,46,0.35);
  border-radius: var(--radius-xs);
}
.parameter-list strong { font-size: 12px; font-weight: 800; color: var(--ink); }
.parameter-list li > span:last-child { grid-column: 1 / -1; font-size: 12.5px; font-weight: 700; color: var(--ink-soft); line-height: 1.6; }
.parameter-value {
  font-family: var(--sans);
  display: inline-flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 5px;
  color: var(--pink);
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}
.parameter-word {
  font-size: 48px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0.02em;
}

/* プロンプト */
.prompt-box { padding: 0; overflow: hidden; border-radius: var(--radius); }
.prompt-feature { border-color: var(--pink); box-shadow: 7px 7px 0 var(--ink); }
.prompt-toggle {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  font-family: var(--sans); font-size: 15px; font-weight: 900;
  color: var(--ink); background: var(--paper);
  border: none; padding: 22px 24px; cursor: pointer;
  transition: background 0.15s;
}
.prompt-toggle:hover { background: var(--lime); }
.prompt-toggle span:last-child { font-size: 24px; color: var(--pink); }
.prompt-body { padding: 0 24px 24px; display: grid; gap: 12px; }
.prompt-pre {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 12px; line-height: 1.75;
  white-space: pre-wrap; word-break: break-word;
  background: var(--ink); color: #f0ecff;
  border-radius: var(--radius-xs);
  padding: 18px; margin: 0 0 12px;
  max-height: min(34vh, 310px); overflow: auto;
}
.prompt-copy {
  width: 100%;
  min-height: 56px;
  justify-content: center;
  box-sizing: border-box;
  text-align: center;
  text-decoration: none;
  font-size: 17px;
  font-weight: 900;
  padding: 14px 30px;
}
.prompt-copy-gpt {
  color: #fff;
  background:
    linear-gradient(120deg, rgba(0,224,208,0.42), rgba(90,44,214,0.64), rgba(255,46,136,0.46)),
    url("../assets/nounai-button-texture-chatgpt.svg") center / cover no-repeat,
    linear-gradient(135deg, #10d8c8 0%, #664bff 55%, #ff2e88 112%);
  text-shadow: 0 2px 0 rgba(25,17,46,0.42);
}
.prompt-copy-gpt:hover { transform: translate(-2px,-3px) rotate(1deg); }
.ad-slot {
  display: grid;
  place-items: center;
  gap: 6px;
  min-height: 96px;
  padding: 18px;
  color: var(--ink-soft);
  background:
    linear-gradient(rgba(255,253,246,0.88), rgba(255,253,246,0.88)),
    url("../assets/nounai-ink-splat-lime-paper.png") center / cover no-repeat,
    var(--paper-2);
  border: 2px dashed rgba(25,17,46,0.34);
  border-radius: var(--radius-xs);
  text-align: center;
}
.ad-slot p { margin: 0; font-size: 12px; font-weight: 800; }
.ad-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  padding: 3px 9px;
  color: rgba(25,17,46,0.72);
  background: rgba(255,255,255,0.74);
  border: 1px solid rgba(25,17,46,0.22);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.result-edit {
  align-self: flex-start;
  font-family: var(--sans); font-size: 13px; font-weight: 800;
  color: var(--paper);
  background: none; border: none;
  border-bottom: 3px solid var(--lime);
  padding: 2px 0; cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.result-edit:hover { color: var(--lime); }

.result-foot { margin-top: 30px; font-size: 12.5px; font-weight: 600; color: rgba(255,255,255,0.6); text-align: center; line-height: 1.7; }

/* ============ サイトフッター ============ */
.site-foot {
  display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;
  margin-top: 54px; padding-top: 26px;
  border-top: 2px dashed rgba(255,255,255,0.25);
  font-size: 12px; font-weight: 600; color: rgba(255,255,255,0.55);
}
.foot-dot { opacity: 0.5; }

/* ============ レスポンシブ ============ */
@media (max-width: 860px) {
  .result-grid { grid-template-columns: 1fr; }
  .result-vis { position: static; }
  .rules-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .app { padding: 0 16px 56px; }
  .site-header { padding: 18px 0 18px; }
  .logo-mark { width: 44px; height: 44px; font-size: 23px; border-radius: 14px 11px 15px 10px; }
  .logo-jp { font-size: 18px; }
  .logo-en { font-size: 8.5px; }
  .start { padding-top: 4px; }
  .start-card { padding: 32px 20px 28px; box-shadow: 5px 5px 0 var(--ink); }
  .start-card::before { width: 170px; height: 170px; top: -34px; right: -48px; opacity: 0.72; }
  .start-eyebrow { font-size: 12px; padding: 5px 13px; margin-bottom: 18px; }
  .start-title { font-size: clamp(31px, 9.3vw, 38px); line-height: 1.16; margin-bottom: 18px; }
  .start-title { font-size: clamp(29px, 8.6vw, 36px); }
  .title-accent { white-space: normal; -webkit-text-stroke: 1.4px var(--ink); }
  .start-lead { font-size: 14.5px; line-height: 1.75; margin-bottom: 26px; }
  .start-form { padding: 16px; flex-direction: column; align-items: stretch; gap: 14px; }
  .field { flex: 1 1 auto; width: 100%; }
  .field-input { font-size: 16px; padding: 13px 15px; }
  .diagnosis-select { grid-template-columns: 1fr; gap: 12px; margin-top: 14px; }
  .diagnosis-card { padding: 16px; }
  .diagnosis-card strong { font-size: 18px; margin: 7px 0 4px; }
  .btn-primary { width: 100%; justify-content: center; padding: 13px 20px; font-size: 16px; }
  .start-meta { justify-content: center; gap: 8px; margin-top: 22px; }
  .start-meta li { font-size: 11.5px; padding: 4px 11px; }
  .start-rules { margin-top: 38px; }
  .rules-title { font-size: 22px; }
  .q-card { padding: 30px 20px 24px; }
  .choice { font-size: 15px; padding: 15px; gap: 12px; }
  .result-title { font-family: var(--sans); font-size: 22px; line-height: 1.35; letter-spacing: -0.02em; transform: none; }
  .type-name { font-size: 26px; line-height: 1.45; letter-spacing: -0.02em; }
  .type-card::after { opacity: 0.11; right: -28px; bottom: -58px; }
  .type-card, .breakdown, .parameter-card { padding: 24px 20px; }
  .prompt-pre { max-height: min(34vh, 280px); }
  .copy-actions { grid-template-columns: 1fr; }
  .howto-card { padding: 18px; gap: 12px; }
  .bd-row { grid-template-columns: 34px 1fr 48px; }
  .bd-word { font-size: 23px; }
  .header-stamp { display: none; }
  body::before { background-size: 180px, 150px; opacity: 0.4; }
}

@media (max-width: 360px) {
  .app { padding-left: 12px; padding-right: 12px; }
  .result-vis { padding: 20px 14px 18px; }
  .brain-stage { padding: 10px; }
  .howto-card { padding: 14px; gap: 8px; }
  .howto-lead { font-family: var(--sans); font-size: 18px; }
  .howto-steps { gap: 7px; }
  .howto-steps li { grid-template-columns: 26px 1fr; padding: 7px 8px; gap: 8px; }
  .howto-steps li > span { width: 24px; height: 24px; font-size: 12px; }
  .howto-steps strong { font-size: 12px; }
  .btn-primary, .btn-ghost { font-size: 13px; padding: 11px 12px; }
}

@media (max-width: 280px) {
  .app { padding-left: 8px; padding-right: 8px; }
  .site-header { gap: 8px; }
  .logo-mark { width: 36px; height: 36px; font-size: 19px; box-shadow: 2px 2px 0 var(--ink); }
  .logo-jp { font-size: 15px; }
  .logo-en { display: none; }
  .result-vis { padding: 16px 10px 14px; box-shadow: 4px 4px 0 var(--ink); }
  .result-title { display: none; }
  .brain-stage { padding: 8px; border-width: 2px; }
  .howto-card { padding: 10px; border-width: 2px; border-radius: 14px; }
  .howto-badge { font-size: 10px; padding: 3px 9px; box-shadow: 2px 2px 0 var(--ink); }
  .howto-lead { font-size: 16px; line-height: 1.2; }
  .howto-steps li { grid-template-columns: 22px 1fr; padding: 6px; gap: 6px; border-width: 1.5px; }
  .howto-steps li > span { width: 21px; height: 21px; font-size: 11px; border-width: 1.5px; }
  .howto-steps strong { font-size: 10.5px; line-height: 1.2; }
  .howto-note { font-size: 10px; }
  .bd-row { grid-template-columns: 28px 1fr 42px; gap: 7px; }
  .bd-word { font-size: 18px; }
  .bd-ratio { font-size: 12px; }
  .bd-bar { height: 12px; }
  .result-actions { gap: 8px; margin-top: 14px; }
  .copy-actions { gap: 8px; }
  .btn-primary, .btn-ghost { font-size: 12px; padding: 10px 8px; box-shadow: 3px 3px 0 var(--ink); }
}
