/* ============================================================
   PIXEL PROMO — AI体験レイヤー
   A1 サクラAIチャット / A2 AI恐怖診断v2 / B1+B2 シネマ演出
   既存の配色（黒・深赤・くすんだ白）を踏襲
   ============================================================ */

:root {
  --ai-red: #e00030;
  --ai-red-dim: #8b0000;
  --ai-ink: #0a0a0a;
  --ai-ink-2: #111114;
  --ai-line: rgba(255, 255, 255, 0.1);
  --ai-text: #f2f2f2;
  --ai-text-dim: rgba(242, 242, 242, 0.58);
  --ai-sakura: #ff5c80;
}

/* ============================================================
   B1 — スクロール駆動シネマ演出
   ============================================================ */

/* 進行を示す血赤のスクロールバー（Scroll-driven Animations） */
#cinema-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 100%;
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--ai-red-dim), var(--ai-red));
  box-shadow: 0 0 12px rgba(224, 0, 48, 0.7);
  z-index: 2000;
  scale: 0 1;
  pointer-events: none;
}

@supports (animation-timeline: scroll()) {
  #cinema-progress {
    animation: cinema-scaleX linear;
    animation-timeline: scroll(root block);
  }
  @keyframes cinema-scaleX {
    from { scale: 0 1; }
    to   { scale: 1 1; }
  }

  /* セクションが視界に入るときの被写界深度 */
  .cinema-focus {
    animation: cinema-focus linear both;
    animation-timeline: view(block);
    animation-range: entry 0% entry 90%;
  }
  @keyframes cinema-focus {
    from { opacity: 0; filter: blur(10px) saturate(0.25); transform: translateY(34px) scale(0.985); }
    to   { opacity: 1; filter: blur(0) saturate(1);       transform: none; }
  }
}

/* 暗幕（セクション境界での明滅） */
#cinema-veil {
  position: fixed;
  inset: 0;
  z-index: 1900;
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0) 42%, rgba(0,0,0,0.72) 100%);
  opacity: 0;
  transition: opacity 0.5s ease;
}
body.cinema-deep #cinema-veil { opacity: 1; }

/* 血赤フラッシュ */
#cinema-flash {
  position: fixed;
  inset: 0;
  z-index: 1950;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 45%, rgba(224,0,48,0.34), rgba(0,0,0,0) 72%);
  opacity: 0;
}
#cinema-flash.fire { animation: cinema-flash 620ms ease-out; }
@keyframes cinema-flash {
  0%   { opacity: 0; }
  12%  { opacity: 1; }
  100% { opacity: 0; }
}

/* フィルムグレイン */
#cinema-grain {
  position: fixed;
  inset: -50%;
  z-index: 1880;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
  animation: cinema-grain 700ms steps(3) infinite;
  mix-blend-mode: overlay;
}
@keyframes cinema-grain {
  0%   { transform: translate(0, 0); }
  33%  { transform: translate(-2%, 1.5%); }
  66%  { transform: translate(1.5%, -2%); }
  100% { transform: translate(0, 0); }
}

/* View Transitions — ページ遷移を暗転させる */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: cinema-vt-out 260ms ease-in both; }
::view-transition-new(root) { animation: cinema-vt-in 380ms ease-out both; }
@keyframes cinema-vt-out {
  to { opacity: 0; filter: brightness(0.2) saturate(0.2); }
}
@keyframes cinema-vt-in {
  from { opacity: 0; filter: brightness(0.2) saturate(0.2); }
}

/* ============================================================
   B2 — サウンドトグル
   ============================================================ */
#sound-toggle {
  position: fixed;
  right: 16px;
  bottom: 92px;
  z-index: 1700;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--ai-line);
  background: rgba(10, 10, 10, 0.86);
  backdrop-filter: blur(8px);
  color: var(--ai-text-dim);
  font-size: 14px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: color 0.25s, border-color 0.25s, transform 0.2s;
}
#sound-toggle:hover { color: var(--ai-text); border-color: rgba(224, 0, 48, 0.6); transform: scale(1.06); }
#sound-toggle.on { color: var(--ai-red); border-color: rgba(224, 0, 48, 0.75); }
#sound-toggle .st-pulse {
  position: absolute; inset: -4px; border-radius: 50%;
  border: 1px solid rgba(224,0,48,0.45); opacity: 0;
}
#sound-toggle.on .st-pulse { animation: st-pulse 1.6s ease-out infinite; }
@keyframes st-pulse {
  0%   { opacity: 0.7; transform: scale(0.9); }
  100% { opacity: 0; transform: scale(1.5); }
}

/* ============================================================
   A1 — サクラAIチャット
   ============================================================ */

/* 呼び出しボタン */
#sakura-fab {
  position: fixed;
  right: 16px;
  bottom: 20px;
  z-index: 1750;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 17px 11px 13px;
  border: 1px solid rgba(255, 92, 128, 0.4);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(20, 8, 12, 0.95), rgba(10, 10, 10, 0.95));
  backdrop-filter: blur(10px);
  color: var(--ai-text);
  font-family: inherit;
  font-size: 12.5px;
  letter-spacing: 0.06em;
  cursor: pointer;
  box-shadow: 0 6px 26px rgba(0, 0, 0, 0.6), 0 0 0 0 rgba(255, 92, 128, 0.4);
  transition: transform 0.24s cubic-bezier(.2,.9,.2,1), box-shadow 0.3s, border-color 0.3s;
}
#sakura-fab:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 92, 128, 0.85);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.7), 0 0 24px rgba(255, 92, 128, 0.28);
}
#sakura-fab .sf-face {
  position: relative;
  width: 30px; height: 30px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid rgba(255, 92, 128, 0.5);
  flex: 0 0 auto;
  background: #14080c center/cover no-repeat;
}
#sakura-fab .sf-face img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; filter: saturate(0.75) contrast(1.1); }
#sakura-fab .sf-label { white-space: nowrap; }
#sakura-fab .sf-label b { display: block; font-size: 13px; font-weight: 700; letter-spacing: 0.1em; }
#sakura-fab .sf-label span { display: block; font-size: 10px; color: var(--ai-text-dim); letter-spacing: 0.08em; }
#sakura-fab .sf-dot {
  position: absolute; top: 8px; left: 34px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ai-sakura);
  box-shadow: 0 0 9px var(--ai-sakura);
  animation: sf-breathe 2.4s ease-in-out infinite;
}
@keyframes sf-breathe { 0%,100% { opacity: 0.35; } 50% { opacity: 1; } }
body.sakura-open #sakura-fab { opacity: 0; pointer-events: none; transform: translateY(20px); }

/* パネル */
#sakura-panel {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 1800;
  width: min(390px, calc(100vw - 32px));
  height: min(600px, calc(100vh - 100px));
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(178deg, #0d0a0c 0%, #0a0a0a 60%, #0c0709 100%);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.85);
  opacity: 0;
  transform: translateY(24px) scale(0.97);
  pointer-events: none;
  transition: opacity 0.32s ease, transform 0.32s cubic-bezier(.2,.9,.2,1);
}
body.sakura-open #sakura-panel { opacity: 1; transform: none; pointer-events: auto; }

/* パネル内の呪いモード */
#sakura-panel.is-cursed { border-color: rgba(224, 0, 48, 0.34); }
#sakura-panel.is-cursed::after {
  content: '';
  position: absolute; inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 0%, rgba(139,0,0,0.16), transparent 62%);
}

/* ヘッダー */
.sk-head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 13px;
  border-bottom: 1px solid var(--ai-line);
  background: rgba(0, 0, 0, 0.45);
  flex: 0 0 auto;
}
.sk-avatar {
  position: relative;
  width: 38px; height: 38px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid rgba(255, 92, 128, 0.45);
  flex: 0 0 auto;
}
.sk-avatar img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 20%;
  transition: opacity 0.7s ease, filter 0.7s ease;
}
.sk-avatar img.sk-av-cursed { opacity: 0; }
#sakura-panel.is-cursed .sk-avatar { border-color: rgba(224, 0, 48, 0.6); }
#sakura-panel.is-cursed .sk-avatar img.sk-av-human { opacity: 0; }
#sakura-panel.is-cursed .sk-avatar img.sk-av-cursed { opacity: 1; }
.sk-id { flex: 1 1 auto; min-width: 0; }
.sk-id b {
  display: block;
  font-family: 'Shippori Mincho', serif;
  font-size: 15px;
  letter-spacing: 0.14em;
  color: var(--ai-text);
}
.sk-id span {
  display: block;
  font-size: 10.5px;
  letter-spacing: 0.09em;
  color: var(--ai-text-dim);
}
#sakura-panel.is-cursed .sk-id span { color: rgba(224, 0, 48, 0.8); }
.sk-head-btn {
  width: 32px; height: 32px;
  border: 1px solid var(--ai-line);
  border-radius: 8px;
  background: transparent;
  color: var(--ai-text-dim);
  font-size: 12px;
  cursor: pointer;
  flex: 0 0 auto;
  transition: color 0.2s, border-color 0.2s;
}
.sk-head-btn:hover { color: var(--ai-text); border-color: rgba(255, 255, 255, 0.28); }

/* 本文 */
.sk-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 16px 13px 8px;
  display: flex;
  flex-direction: column;
  gap: 13px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.14) transparent;
}
.sk-body::-webkit-scrollbar { width: 5px; }
.sk-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.14); border-radius: 3px; }

/* 導入（形態選択） */
.sk-intro { text-align: center; padding: 8px 4px 4px; }
.sk-intro p {
  font-size: 12.5px;
  line-height: 1.95;
  color: var(--ai-text-dim);
  margin: 0 0 16px;
}
.sk-form-choice { display: grid; gap: 9px; }
.sk-form-btn {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 13px;
  border: 1px solid var(--ai-line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.022);
  color: var(--ai-text);
  font-family: inherit;
  font-size: 12.5px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.24s, background 0.24s, transform 0.2s;
}
.sk-form-btn:hover { transform: translateX(3px); background: rgba(255, 255, 255, 0.05); }
.sk-form-btn[data-form="human"]:hover  { border-color: rgba(255, 92, 128, 0.7); }
.sk-form-btn[data-form="cursed"]:hover { border-color: rgba(224, 0, 48, 0.7); }
.sk-form-btn i { font-size: 15px; width: 20px; text-align: center; flex: 0 0 auto; }
.sk-form-btn[data-form="human"] i  { color: var(--ai-sakura); }
.sk-form-btn[data-form="cursed"] i { color: var(--ai-red); }
.sk-form-btn b { display: block; font-size: 13px; letter-spacing: 0.06em; margin-bottom: 2px; }
.sk-form-btn em { display: block; font-style: normal; font-size: 10.5px; color: var(--ai-text-dim); line-height: 1.6; }

/* 吹き出し */
.sk-msg { max-width: 88%; font-size: 13px; line-height: 1.94; }
.sk-msg.from-user {
  align-self: flex-end;
  padding: 9px 13px;
  border-radius: 12px 12px 3px 12px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: var(--ai-text);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.sk-msg.from-sakura {
  align-self: flex-start;
  position: relative;
  padding: 10px 14px 10px 15px;
  border-radius: 3px 12px 12px 12px;
  background: linear-gradient(135deg, rgba(255, 92, 128, 0.075), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 92, 128, 0.2);
  color: #f7eef1;
  font-family: 'Shippori Mincho', serif;
  letter-spacing: 0.04em;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.sk-msg.from-sakura::before {
  content: '';
  position: absolute; left: 0; top: 10px; bottom: 10px;
  width: 2px;
  background: linear-gradient(180deg, var(--ai-sakura), transparent);
  opacity: 0.65;
}
/* 呪われた発話 */
.sk-msg.from-sakura.is-cursed {
  background: linear-gradient(135deg, rgba(224, 0, 48, 0.1), rgba(0, 0, 0, 0.3));
  border-color: rgba(224, 0, 48, 0.34);
  color: #e8dcdf;
  text-shadow: 0 0 14px rgba(224, 0, 48, 0.35);
}
.sk-msg.from-sakura.is-cursed::before { background: linear-gradient(180deg, var(--ai-red), transparent); }
/* 憑依した瞬間 */
.sk-msg.from-sakura.did-glitch { animation: sk-glitch 480ms steps(2) 1; }
@keyframes sk-glitch {
  0%   { transform: translateX(0); filter: none; }
  20%  { transform: translateX(-3px) skewX(-1.5deg); filter: hue-rotate(-25deg) contrast(1.5); }
  40%  { transform: translateX(3px)  skewX(1.5deg);  filter: hue-rotate(18deg) invert(0.06); }
  60%  { transform: translateX(-2px); filter: contrast(1.3); }
  100% { transform: translateX(0); filter: none; }
}

/* タイプ中カーソル */
.sk-caret {
  display: inline-block;
  width: 6px; height: 1em;
  margin-left: 2px;
  background: var(--ai-sakura);
  vertical-align: text-bottom;
  animation: sk-caret 900ms steps(2) infinite;
}
#sakura-panel.is-cursed .sk-caret { background: var(--ai-red); }
@keyframes sk-caret { 0%,100% { opacity: 1; } 50% { opacity: 0; } }

/* 「…」考え中 */
.sk-thinking { align-self: flex-start; display: flex; gap: 5px; padding: 12px 15px; }
.sk-thinking span {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--ai-sakura); opacity: 0.35;
  animation: sk-think 1.35s ease-in-out infinite;
}
.sk-thinking span:nth-child(2) { animation-delay: 0.2s; }
.sk-thinking span:nth-child(3) { animation-delay: 0.4s; }
@keyframes sk-think { 0%,100% { opacity: 0.22; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }

/* 島コードのハイライト */
.sk-code {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 3px 2px 0;
  padding: 3px 9px;
  border: 1px solid rgba(224, 0, 48, 0.5);
  border-radius: 5px;
  background: rgba(224, 0, 48, 0.1);
  color: #ffd9e0;
  font-family: 'Courier New', monospace;
  font-size: 12.5px;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.sk-code:hover { background: rgba(224, 0, 48, 0.22); border-color: var(--ai-red); }
.sk-code::after { content: '\f0c5'; font-family: 'Font Awesome 6 Free'; font-weight: 400; font-size: 10px; opacity: 0.65; }
.sk-code.copied::after { content: '\f00c'; font-weight: 900; color: #6ee7a8; opacity: 1; }

/* システム注記 */
.sk-note {
  align-self: center;
  max-width: 92%;
  padding: 7px 11px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 7px;
  font-size: 10.5px;
  line-height: 1.75;
  color: var(--ai-text-dim);
  text-align: center;
}
.sk-note.is-error { border-color: rgba(224, 0, 48, 0.4); color: rgba(255, 160, 175, 0.9); }

/* 入力欄 */
.sk-foot {
  flex: 0 0 auto;
  padding: 10px 11px 11px;
  border-top: 1px solid var(--ai-line);
  background: rgba(0, 0, 0, 0.42);
}
.sk-suggest { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 9px; }
.sk-chip {
  padding: 5px 10px;
  border: 1px solid var(--ai-line);
  border-radius: 999px;
  background: transparent;
  color: var(--ai-text-dim);
  font-family: inherit;
  font-size: 10.5px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.sk-chip:hover { color: var(--ai-text); border-color: rgba(255, 92, 128, 0.6); }
.sk-inputrow { display: flex; gap: 8px; align-items: flex-end; }
.sk-input {
  flex: 1 1 auto;
  min-height: 40px;
  max-height: 112px;
  padding: 10px 12px;
  border: 1px solid var(--ai-line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--ai-text);
  font-family: inherit;
  font-size: 13px;
  line-height: 1.6;
  resize: none;
  outline: none;
  transition: border-color 0.24s, background 0.24s;
}
.sk-input::placeholder { color: rgba(242, 242, 242, 0.3); }
.sk-input:focus { border-color: rgba(255, 92, 128, 0.62); background: rgba(255, 255, 255, 0.055); }
#sakura-panel.is-cursed .sk-input:focus { border-color: rgba(224, 0, 48, 0.62); }
.sk-send {
  width: 40px; height: 40px;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 92, 128, 0.45);
  border-radius: 9px;
  background: rgba(255, 92, 128, 0.14);
  color: #ffd9e0;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.22s, transform 0.18s, opacity 0.22s;
}
.sk-send:hover:not(:disabled) { background: rgba(255, 92, 128, 0.3); transform: scale(1.06); }
.sk-send:disabled { opacity: 0.32; cursor: not-allowed; }
.sk-meta {
  margin-top: 7px;
  font-size: 9.5px;
  letter-spacing: 0.04em;
  color: rgba(242, 242, 242, 0.28);
  text-align: center;
}

/* ============================================================
   A2 — AI恐怖診断 v2
   ============================================================ */
.fear-diag { max-width: 760px; margin: 0 auto; }

.fd-stage { position: relative; min-height: 232px; }

/* 質問カード */
.fd-card {
  border: 1px solid var(--ai-line);
  border-radius: 12px;
  background: linear-gradient(165deg, rgba(255,255,255,0.028), rgba(0,0,0,0.34));
  padding: 26px 22px 22px;
}
.fd-step {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}
.fd-step-no {
  font-family: 'Courier New', monospace;
  font-size: 10.5px;
  letter-spacing: 0.2em;
  color: var(--ai-red);
}
.fd-bar { flex: 1 1 auto; height: 1px; background: var(--ai-line); position: relative; overflow: hidden; }
.fd-bar i {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: linear-gradient(90deg, var(--ai-red-dim), var(--ai-red));
  box-shadow: 0 0 8px rgba(224,0,48,0.6);
  transition: width 0.55s cubic-bezier(.2,.9,.2,1);
}
.fd-q {
  font-family: 'Shippori Mincho', serif;
  font-size: clamp(16px, 3.4vw, 21px);
  line-height: 1.75;
  letter-spacing: 0.03em;
  color: var(--ai-text);
  margin: 0 0 20px;
}
.fd-opts { display: grid; gap: 9px; }
.fd-opt {
  position: relative;
  padding: 13px 44px 13px 16px;
  border: 1px solid var(--ai-line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.022);
  color: var(--ai-text);
  font-family: inherit;
  font-size: 13.5px;
  letter-spacing: 0.03em;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.26s, transform 0.22s, background 0.26s;
}
.fd-opt::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--ai-red);
  transform: scaleY(0);
  transform-origin: 50% 0;
  transition: transform 0.3s ease;
}
.fd-opt::after {
  content: '\f061';
  font-family: 'Font Awesome 6 Free'; font-weight: 900;
  position: absolute; right: 16px; top: 50%;
  transform: translateY(-50%) translateX(-6px);
  font-size: 11px; color: var(--ai-red);
  opacity: 0; transition: opacity 0.26s, transform 0.26s;
}
.fd-opt:hover {
  border-color: rgba(224, 0, 48, 0.55);
  background: rgba(224, 0, 48, 0.055);
  transform: translateX(4px);
}
.fd-opt:hover::before { transform: scaleY(1); }
.fd-opt:hover::after  { opacity: 1; transform: translateY(-50%) translateX(0); }
.fd-opt.picked { border-color: var(--ai-red); background: rgba(224, 0, 48, 0.14); }

.fd-back {
  margin-top: 15px;
  padding: 6px 0;
  border: 0;
  background: transparent;
  color: var(--ai-text-dim);
  font-family: inherit;
  font-size: 11px;
  cursor: pointer;
  transition: color 0.2s;
}
.fd-back:hover { color: var(--ai-text); }
.fd-back[hidden] { display: none; }

/* 解析中 */
.fd-loading { text-align: center; padding: 52px 20px; }
.fd-eye {
  width: 60px; height: 60px;
  margin: 0 auto 22px;
  border: 1px solid rgba(224, 0, 48, 0.4);
  border-top-color: var(--ai-red);
  border-radius: 50%;
  animation: fd-spin 1.05s linear infinite;
}
@keyframes fd-spin { to { transform: rotate(360deg); } }
.fd-loading p {
  font-family: 'Shippori Mincho', serif;
  font-size: 13.5px;
  letter-spacing: 0.14em;
  color: var(--ai-text-dim);
  margin: 0;
  min-height: 1.6em;
}

/* 結果 */
.fd-result { animation: fd-in 0.72s cubic-bezier(.2,.9,.2,1) both; }
@keyframes fd-in {
  from { opacity: 0; transform: translateY(20px); filter: blur(7px); }
  to   { opacity: 1; transform: none; filter: none; }
}
.fd-type-wrap {
  text-align: center;
  padding: 26px 18px 24px;
  border: 1px solid rgba(224, 0, 48, 0.3);
  border-radius: 12px;
  background: radial-gradient(ellipse at 50% 0%, rgba(139, 0, 0, 0.2), rgba(0,0,0,0.4) 72%);
  margin-bottom: 15px;
}
.fd-type-label {
  font-size: 10px;
  letter-spacing: 0.36em;
  color: var(--ai-text-dim);
  margin-bottom: 11px;
}
.fd-type {
  font-family: 'Yuji Mai', 'Shippori Mincho', serif;
  font-size: clamp(27px, 7.4vw, 47px);
  line-height: 1.28;
  letter-spacing: 0.06em;
  color: #fff;
  text-shadow: 0 0 34px rgba(224, 0, 48, 0.62), 0 2px 12px rgba(0,0,0,0.9);
  margin: 0 0 15px;
}
.fd-body-text {
  font-family: 'Shippori Mincho', serif;
  font-size: 13.5px;
  line-height: 2.1;
  letter-spacing: 0.045em;
  color: rgba(242, 242, 242, 0.86);
  max-width: 520px;
  margin: 0 auto;
  text-align: left;
}

/* 推奨作品 */
.fd-rec {
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: 15px;
  border: 1px solid var(--ai-line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.024);
  padding: 14px;
  margin-bottom: 13px;
}
.fd-rec-thumb {
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: #14080c;
}
.fd-rec-thumb img { width: 100%; height: 100%; object-fit: cover; }
.fd-rec-info { min-width: 0; display: flex; flex-direction: column; }
.fd-rec-label {
  font-size: 9.5px; letter-spacing: 0.24em;
  color: var(--ai-red); margin-bottom: 7px;
}
.fd-rec-title {
  font-family: 'Shippori Mincho', serif;
  font-size: clamp(17px, 3.6vw, 22px);
  line-height: 1.4;
  letter-spacing: 0.04em;
  color: #fff;
  margin: 0 0 9px;
}
.fd-rec-reason {
  font-size: 12px; line-height: 1.9;
  color: var(--ai-text-dim);
  margin: 0 0 12px;
  flex: 1 1 auto;
}
.fd-rec-code {
  display: inline-flex; align-items: center; gap: 9px;
  align-self: flex-start;
  padding: 7px 13px;
  border: 1px solid rgba(224, 0, 48, 0.5);
  border-radius: 7px;
  background: rgba(224, 0, 48, 0.1);
  color: #ffd9e0;
  font-family: 'Courier New', monospace;
  font-size: 13.5px;
  letter-spacing: 0.09em;
  cursor: pointer;
  margin-bottom: 11px;
  transition: background 0.22s;
}
.fd-rec-code:hover { background: rgba(224, 0, 48, 0.24); }
.fd-rec-play {
  display: inline-flex; align-items: center; gap: 8px;
  align-self: flex-start;
  padding: 10px 19px;
  border-radius: 7px;
  background: var(--ai-red);
  color: #fff;
  font-size: 12.5px; font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: background 0.22s, transform 0.2s;
}
.fd-rec-play:hover { background: #ff1a45; transform: translateY(-2px); }

/* サクラの一言 */
.fd-sakura {
  display: flex; align-items: center; gap: 13px;
  padding: 14px 16px;
  border: 1px solid rgba(224, 0, 48, 0.26);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(224, 0, 48, 0.075), rgba(0,0,0,0.3));
  margin-bottom: 15px;
}
.fd-sakura-face {
  width: 46px; height: 46px; flex: 0 0 auto;
  border-radius: 50%; overflow: hidden;
  border: 1px solid rgba(224, 0, 48, 0.5);
}
.fd-sakura-face img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.fd-sakura-line {
  font-family: 'Shippori Mincho', serif;
  font-size: 13.5px; line-height: 1.85;
  letter-spacing: 0.05em;
  color: #f2e4e7;
  text-shadow: 0 0 16px rgba(224, 0, 48, 0.3);
}

/* 結果アクション */
.fd-actions { display: flex; gap: 9px; flex-wrap: wrap; justify-content: center; }
.fd-act {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 17px;
  border: 1px solid var(--ai-line);
  border-radius: 7px;
  background: transparent;
  color: var(--ai-text-dim);
  font-family: inherit;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.22s, border-color 0.22s;
}
.fd-act:hover { color: var(--ai-text); border-color: rgba(255,255,255,0.3); }
.fd-act.is-sakura:hover { border-color: rgba(255, 92, 128, 0.7); color: #ffd9e0; }

@media (max-width: 560px) {
  .fd-rec { grid-template-columns: 1fr; }
  .fd-rec-thumb { aspect-ratio: 16 / 9; }
  #sakura-panel { right: 8px; bottom: 8px; width: calc(100vw - 16px); height: calc(100vh - 76px); }
  #sound-toggle { bottom: 82px; right: 12px; }
  #sakura-fab { right: 12px; bottom: 14px; }
}

/* アクセシビリティ: 動きを減らす設定を尊重 */
@media (prefers-reduced-motion: reduce) {
  #cinema-grain, #cinema-flash, #sakura-fab .sf-dot { display: none !important; }
  .cinema-focus { animation: none !important; opacity: 1 !important; filter: none !important; transform: none !important; }
  .fd-result, .sk-msg.from-sakura.did-glitch { animation: none !important; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none !important; }
  .fd-opt:hover, #sakura-fab:hover, .fd-rec-play:hover { transform: none !important; }
}
