/* 画面の作り（全デザイン共通の骨組み）＋ デザイン案ごとの見た目。
   <body data-design="a|b|c" data-skin="..."> で切り替える。
   画面サイズ対策:
     - 高さは 100dvh（スマホのアドレスバーの出入りでずれない）
     - 横幅はすべて minmax / clamp / min() で決め、固定幅を使わない
     - 1100px 以上: 物語＋キャラクター表を横並び
     - それ未満: キャラクター表は引き出し（スマホは下から、タブレットは右から）
     - 入力欄は16px以上（iPhone で勝手に拡大されない）、ボタンは高さ44px以上（指で押しやすい） */

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh; overflow-x: hidden;
  background: var(--bg); color: var(--ink); font-family: var(--font-ui); line-height: 1.7;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.hidden { display: none !important; }

/* ---------------------------------------------------------------- 背景（世界観ごと） */
.scene { position: fixed; inset: 0; z-index: -1; background: var(--scene); overflow: hidden; pointer-events: none; }
.scene .fog, .scene .rain, .scene .stars, .scene .embers, .scene .dots { position: absolute; inset: -20%; display: none; }
.scene .fog {
  display: block; opacity: .35;
  background: radial-gradient(ellipse 40% 25% at 30% 60%, rgba(255,255,255,.10), transparent 70%),
              radial-gradient(ellipse 35% 20% at 70% 40%, rgba(255,255,255,.08), transparent 70%);
  animation: drift 70s linear infinite alternate;
}
[data-skin="neon"] .scene .rain {
  display: block; opacity: .25;
  background: repeating-linear-gradient(100deg, transparent 0 14px, rgba(160, 200, 255, .35) 14px 15px, transparent 15px 40px);
  background-size: 200px 200px; animation: rain .5s linear infinite;
}
[data-skin="scifi"] .scene .stars {
  display: block; opacity: .6;
  background-image: radial-gradient(1px 1px at 20% 30%, #fff, transparent), radial-gradient(1px 1px at 70% 80%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 40% 70%, #bfefff, transparent), radial-gradient(1px 1px at 85% 15%, #fff, transparent);
  background-size: 260px 260px; animation: drift 200s linear infinite;
}
[data-skin="fantasy"] .scene .embers, [data-skin="gothic"] .scene .embers {
  display: block; opacity: .5;
  background-image: radial-gradient(2px 2px at 10% 90%, #ffb347, transparent), radial-gradient(1.5px 1.5px at 60% 95%, #ff8c42, transparent),
    radial-gradient(2px 2px at 85% 85%, #ffd27a, transparent);
  background-size: 300px 300px; animation: rise 18s linear infinite;
}
[data-skin="showa"] .scene .dots {
  display: block; opacity: .07; inset: 0;
  background-image: radial-gradient(circle, var(--ink) 1px, transparent 1.6px); background-size: 9px 9px;
}
@keyframes drift { from { transform: translate(0, 0); } to { transform: translate(-8%, 4%); } }
@keyframes rain { from { background-position: 0 0; } to { background-position: -40px 200px; } }
@keyframes rise { from { background-position: 0 0; } to { background-position: 30px -300px; } }
@media (prefers-reduced-motion: reduce) { .scene * { animation: none !important; } }

/* ---------------------------------------------------------------- ゲーム画面の骨組み */
.app { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
.topbar {
  flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px;
  padding: max(10px, env(safe-area-inset-top)) clamp(12px, 3vw, 28px) 10px;
}
.iconbtn {
  min-width: 44px; height: 44px; padding: 0 10px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); font-size: 15px; white-space: nowrap;
}
.iconbtn[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
.iconbtn .lbl { font-size: 13px; }
.ttl { flex: 1 1 160px; min-width: 0; }
.ttl small { display: block; color: var(--muted); font-size: 12px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ttl b { display: block; font-family: var(--font-title); font-weight: 400; font-size: clamp(17px, 1.6vw + 10px, 24px); line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tools { display: flex; gap: 6px; flex-wrap: nowrap; }
/* 体力などの小さな表示（キャラクター表が隠れているときに、いつでも見える） */
.hud { order: 3; flex: 1 1 100%; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.hud::-webkit-scrollbar { display: none; }
.chipstat {
  flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 13px;
  background: rgba(0,0,0,.25); border: 1px solid rgba(255,255,255,.1);
}
.chipstat .mini { width: 38px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.15); overflow: hidden; }
.chipstat .mini i { display: block; height: 100%; background: var(--accent); }
.chipstat.low { border-color: #e05d5d; color: #ff9b9b; } .chipstat.low .mini i { background: #e05d5d; }

.body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr); }
.stage { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.log { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 8px clamp(14px, 4vw, 40px) 24px; scroll-behavior: smooth; }
.log-inner { max-width: 44em; margin: 0 auto; }
.story-text { font-family: var(--font-body); font-size: clamp(16px, .55vw + 13px, 20px); line-height: 2; }
.story-text p { margin: 0 0 .9em; }
.entry { margin: 0 0 22px; animation: entry-in .5s ease both; }
@keyframes entry-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.entry.player { color: var(--accent); font-size: 15px; padding-left: 14px; border-left: 2px solid var(--accent); }
/* サイコロの判定: 足し算の内訳 ＋ 「6以下 失敗／7〜9 部分成功／10以上 成功」の物差し */
.rollbox { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.rollline { display: flex; flex-direction: column; gap: 8px; min-width: 0; flex: 1 1 260px; font-family: var(--font-ui); font-size: 14px; }
.calc { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.calc span { padding: 1px 9px; border-radius: 999px; background: rgba(127,127,127,.16); font-size: 13px; white-space: nowrap; }
.calc .sum { background: none; padding: 0 2px; font-size: 14px; }
.calc .sum b { font-size: 20px; }
.scale { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid rgba(127,127,127,.4); border-radius: 8px; overflow: hidden; text-align: center; font-size: 13px; }
.scale span { padding: 3px 4px; line-height: 1.35; opacity: .5; }
.scale span + span { border-left: 1px solid rgba(127,127,127,.4); }
.scale small { display: block; font-size: 11px; }
.scale .on { opacity: 1; font-weight: 700; color: #111; }
.scale .fail.on { background: #ff7b7b; } .scale .partial.on { background: #f0c27a; } .scale .success.on { background: #7ee38f; }
[data-design="b"] .scale .on { color: #fff; }
[data-design="b"] .scale .fail.on { background: #a11d1d; } [data-design="b"] .scale .partial.on { background: #8a5a00; } [data-design="b"] .scale .success.on { background: #1f6b33; }
.rollline .why { color: var(--muted); font-size: 12.5px; }

/* 目的・クリア・ゲームオーバー（キャラ作成、ゲームの最初、キャラクター表） */
.goalbox { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 12px; font-family: var(--font-ui); font-size: 13.5px; line-height: 1.6; }
.goalbox div { display: contents; }
.goalbox b { font-weight: 700; white-space: nowrap; }
/* 狭い場所（スマホ・キャラクター表）では、見出しの下に説明を置く */
.sheet .goalbox { grid-template-columns: minmax(0, 1fr); gap: 0; }
.sheet .goalbox span { margin-bottom: 6px; }
.goal-card { margin: 0 0 22px; padding: 10px 14px; border-radius: 10px; border: 1px dashed color-mix(in srgb, currentColor 35%, transparent); }
.reshint { display: block; font-size: 11.5px; opacity: .65; margin-top: 1px; }
#cGoal { margin-top: 10px; padding: 10px 12px; border-radius: 6px; background: rgba(255,255,255,.35); border: 1px solid rgba(0,0,0,.12); }
.nowrap { white-space: nowrap; }
@media (max-width: 520px) { .goalbox { grid-template-columns: minmax(0, 1fr); gap: 0; } .goalbox span { margin-bottom: 6px; } }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; font-family: var(--font-ui); }
.chip { font-size: 13px; padding: 1px 10px; border-radius: 999px; border: 1px solid rgba(255,255,255,.15); }
.chip.up { color: #7ee38f; } .chip.down { color: #ff8f8f; } .chip.auto { color: var(--muted); }

.actions { flex: none; padding: 10px clamp(14px, 4vw, 40px) max(12px, env(safe-area-inset-bottom)); }
.actions-inner { max-width: 44em; margin: 0 auto; }
.choices { display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 760px) { .choices { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.choices button { min-height: 48px; text-align: left; padding: 10px 14px; line-height: 1.5; }
@media (max-width: 759px) {
  /* スマホ: 選択肢を横に並べて指でずらす（物語を読む場所を広く残す） */
  .choices { grid-auto-flow: column; grid-auto-columns: minmax(64%, 1fr); grid-template-columns: none; overflow-x: auto;
    scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 2px; }
  .choices::-webkit-scrollbar { display: none; }
  .choices button { scroll-snap-align: start; }
}
.sendrow { display: flex; gap: 8px; margin-top: 8px; }
.sendrow input { flex: 1; min-width: 0; min-height: 46px; font-size: 16px; padding: 10px 14px; }
.sendrow button { min-height: 46px; padding: 0 18px; }

/* キャラクター表（狭い画面では引き出し） */
.sheet {
  position: fixed; z-index: 30; top: 0; right: 0; height: 100vh; height: 100dvh; width: min(380px, 90vw);
  overflow-y: auto; overscroll-behavior: contain; padding: 18px 18px max(18px, env(safe-area-inset-bottom));
  transform: translateX(105%); transition: transform .3s ease; background: var(--bg2);
}
body.sheet-open .sheet { transform: none; }
.backdrop { display: none; }
body.sheet-open .backdrop { display: block; position: fixed; inset: 0; z-index: 29; background: rgba(0,0,0,.55); }
.sheet .close { float: right; }
@media (max-width: 640px) {
  .sheet { top: auto; bottom: 0; width: 100%; height: auto; max-height: 82dvh; border-radius: 18px 18px 0 0; transform: translateY(105%); }
}
@media (max-width: 640px) {
  /* スマホ: 戻る・タイトル・ボタンを1段にまとめ、体力などは2段目に（物語を読む場所を広く残す） */
  .topbar { gap: 6px; padding-left: 12px; padding-right: 12px; }
  .topbar .iconbtn { min-width: 38px; height: 38px; padding: 0 8px; }
  .ttl { flex: 1 1 0; }
  .tools { gap: 4px; }
  [data-design="b"] .topbar .ttl { text-align: left; }
  body[data-design="b"] .topbar .ttl b::before, body[data-design="b"] .topbar .ttl b::after { content: none; }
}
@media (min-width: 1100px) {
  .body { grid-template-columns: minmax(0, 1fr) minmax(300px, 360px); }
  .sheet { position: static; transform: none; height: auto; width: auto; max-height: none; min-height: 0; border-radius: 0; z-index: auto; }
  .sheet .close, .tools .sheet-btn, .hud { display: none; }
}
.sheet h3 { font: 400 13px var(--font-ui); letter-spacing: .15em; color: var(--muted); margin: 18px 0 8px; }
.sheet .who { font-family: var(--font-title); font-size: 22px; line-height: 1.3; }
.sheet .who small { display: block; font-family: var(--font-ui); font-size: 12px; color: var(--muted); margin-top: 4px; }
.attrs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.attrs div { text-align: center; padding: 6px 2px; border-radius: 8px; background: rgba(255,255,255,.05); font-size: 12px; }
.attrs b { display: block; font-size: 18px; }
.resrow { margin-bottom: 10px; }
.resrow .top { display: flex; justify-content: space-between; font-size: 14px; }
.bar { height: 7px; border-radius: 4px; background: rgba(255,255,255,.1); overflow: hidden; margin-top: 3px; }
.bar i { display: block; height: 100%; background: var(--accent); transition: width .6s ease; }
.bar.low i { background: #e05d5d; }
.list { margin: 0; padding-left: 18px; font-size: 14px; }
.people { display: grid; gap: 8px; }
.person { padding: 8px 10px; border-radius: 8px; background: rgba(255,255,255,.05); font-size: 13px; line-height: 1.6; }
.person b { display: block; font-size: 14px; }
.notes { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.empty-note { font-size: 13px; opacity: .6; }

/* 縦書き（和風の物語向け）: 物語の部分だけを縦書きにして、横にめくって読む */
body.vertical .log { overflow-x: auto; overflow-y: hidden; padding: 20px clamp(14px, 4vw, 40px); }
body.vertical .log-inner {
  writing-mode: vertical-rl; height: 100%; max-width: none; margin: 0;
}
body.vertical .entry { margin: 0 0 0 28px; }
body.vertical .entry.player { border-left: 0; border-top: 2px solid var(--accent); padding: 12px 0 0; }
body.vertical .story-text p { margin: 0 0 0 .9em; }
body.vertical .rollline, body.vertical .chips, body.vertical .rollbox, body.vertical .goal-card { writing-mode: horizontal-tb; }
body.vertical .rollbox, body.vertical .goal-card { width: min(24em, 70vw); }
body.vertical .goal-card { margin: 0 0 0 28px; align-self: flex-start; }
body.vertical .entry-roll { display: flex; align-items: flex-start; }
.tcy { text-combine-upright: all; }

/* ---------------------------------------------------------------- タイトル画面 */
.home { max-width: 1240px; margin: 0 auto; padding: max(18px, env(safe-area-inset-top)) clamp(14px, 4vw, 40px) 60px; }
.home-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.status { font-size: 13px; padding: 6px 12px; border-radius: 999px; background: rgba(0,0,0,.3); border: 1px solid rgba(255,255,255,.12); }
.hero { text-align: center; padding: clamp(28px, 8vw, 90px) 0 clamp(18px, 4vw, 40px); }
.hero h1 { margin: 0; font-family: var(--font-title); font-weight: 400; font-size: clamp(38px, 7vw, 84px); line-height: 1.15; letter-spacing: .08em; }
.hero p { margin: 12px auto 0; color: var(--muted); font-size: clamp(14px, 1.2vw + 8px, 18px); max-width: 32em; }
.quality { font-size: 13px; color: var(--muted); text-align: center; margin: 8px 0 0; }

/* はじめての方へ（このゲームの説明）。初めて来た人には開いた状態、遊んだことがある人には閉じた状態で出す */
.intro {
  max-width: 900px; margin: 0 auto 14px; background: var(--paper); color: var(--paper-ink); border-radius: 4px;
  box-shadow: 0 14px 40px rgba(0,0,0,.55), inset 0 0 70px rgba(120, 90, 40, .18);
}
.intro summary {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 52px;
  padding: 10px clamp(14px, 3vw, 24px); cursor: pointer; list-style: none;
}
.intro summary::-webkit-details-marker { display: none; }
.intro summary .ttl { font-family: var(--font-title); font-size: clamp(17px, 1vw + 13px, 21px); line-height: 1.4; }
.intro summary small { display: block; font-family: var(--font-ui); font-size: 12.5px; color: color-mix(in srgb, var(--paper-ink) 62%, transparent); }
.intro .chev { flex: none; width: 10px; height: 10px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-3px); transition: transform .2s; opacity: .6; }
.intro[open] .chev { transform: rotate(-135deg) translateY(-3px); }
.intro-body { padding: 0 clamp(14px, 3vw, 24px) clamp(16px, 3vw, 24px); border-top: 1px solid rgba(0,0,0,.15); }
.intro-body p { font-size: 15px; line-height: 1.9; margin: 12px 0 0; }
.intro-lead { font-family: var(--font-title); font-size: clamp(16px, .8vw + 13px, 19px) !important; }
.intro-points { display: grid; gap: 10px; margin-top: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.intro-points div { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; align-items: start; padding: 12px; border-radius: 6px; background: rgba(255,255,255,.4); border: 1px solid rgba(0,0,0,.12); }
.intro-points i { grid-row: span 2; font-style: normal; font-size: 26px; line-height: 1.2; }
.intro-points span, .intro-steps span { font-size: 13.5px; line-height: 1.75; color: color-mix(in srgb, var(--paper-ink) 78%, transparent); }
.intro-body h3 { margin: 20px 0 8px; font-family: var(--font-title); font-weight: 400; font-size: 18px; }
.intro-steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 10px; }
.intro-steps li { counter-increment: step; position: relative; padding-left: 40px; min-height: 30px; }
.intro-steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; background: var(--paper-ink); color: var(--paper); font: 700 14px var(--font-ui);
}
.intro-steps b { display: block; line-height: 1.5; }
.intro-steps .btn { margin-top: 6px; min-height: 40px; }
.intro-steps li.done b::after { content: "　✓ 設定ずみ"; font-weight: 400; font-size: 13px; color: #1f6b33; }
.group { display: flex; align-items: baseline; gap: 10px; margin: 36px 0 14px; font-family: var(--font-title); font-weight: 400; font-size: clamp(18px, 1vw + 14px, 24px); }
.group small { font-family: var(--font-ui); font-size: 12px; color: var(--muted); }
.cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.wcard { position: relative; text-align: left; border: 0; padding: 0; background: none; color: var(--ink); border-radius: 14px; overflow: hidden; min-height: 150px; }
.wcard .art { position: absolute; inset: 0; background: var(--scene); }
.wcard .art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 20%, rgba(0,0,0,.65)); }
.wcard .icon { position: absolute; right: 12px; top: 8px; font-size: 44px; opacity: .85; filter: drop-shadow(0 4px 10px rgba(0,0,0,.5)); }
.wcard .txt { position: relative; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; min-height: 150px; padding: 16px; }
.wcard .g { font-size: 12px; color: var(--accent); letter-spacing: .1em; }
.wcard .t { font-family: var(--font-title); font-size: 21px; line-height: 1.35; margin: 2px 0 4px; }
.wcard .d { font-size: 12.5px; color: var(--muted); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wcard.big { grid-column: 1 / -1; min-height: 200px; }
.wcard.big .t { font-size: clamp(24px, 2vw + 14px, 36px); }
.wcard.big .txt { min-height: 200px; }

/* ---------------------------------------------------------------- 長編（新聞） */
.paper-news {
  max-width: 1100px; margin: 0 auto; padding: clamp(16px, 4vw, 40px); background: #efe6d2; color: #231a12;
  font-family: "Shippori Mincho", serif; box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.masthead { text-align: center; border-bottom: 4px double #231a12; padding-bottom: 10px; }
.masthead h1 { margin: 0; font-family: "Dela Gothic One", var(--font-title); font-weight: 400; font-size: clamp(36px, 8vw, 80px); letter-spacing: .15em; line-height: 1.1; }
.masthead .meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; border-top: 1px solid #231a12; margin-top: 8px; padding-top: 6px; }
.headline { margin: 18px 0 6px; font-family: "Dela Gothic One", serif; font-weight: 400; font-size: clamp(22px, 3vw + 10px, 40px); line-height: 1.25; }
.news-cols { column-width: 17em; column-gap: 28px; column-rule: 1px solid rgba(0,0,0,.25); }
.article { break-inside: avoid; margin: 0 0 18px; }
.article h3 { margin: 0 0 4px; font-family: "Dela Gothic One", serif; font-weight: 400; font-size: 19px; line-height: 1.3; }
.article .kicker { font-size: 12px; letter-spacing: .1em; }
.article .kicker.good { color: #1f6b33; } .article .kicker.bad { color: #a11d1d; }
.article p { margin: 4px 0 0; font-size: 14.5px; line-height: 1.85; text-align: justify; }
.article.todo { opacity: .45; }
.news-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 18px; }

/* ---------------------------------------------------------------- エンディング・シェア */
.ending-wrap { max-width: 860px; margin: 0 auto; padding: clamp(18px, 5vw, 50px) clamp(14px, 4vw, 40px) 60px; text-align: center; }
.ending-title { font-family: var(--font-title); font-weight: 400; font-size: clamp(34px, 7vw, 72px); letter-spacing: .3em; margin: 0; color: var(--accent); text-shadow: var(--glow); }
.share-img { width: 100%; height: auto; border-radius: 10px; margin: 18px 0; box-shadow: 0 16px 50px rgba(0,0,0,.5); }
.share-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.reveal { text-align: left; margin-top: 22px; padding: 18px 20px; border-radius: 12px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); }
.reveal h4 { margin: 0 0 6px; color: var(--accent); }

.btn {
  min-height: 44px; padding: 8px 18px; border-radius: 10px; border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.06); display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: #111; font-weight: 700; }

/* ---------------------------------------------------------------- スマホ: 選択肢を横にスライドできることの案内 */
.swipe-hint { display: none; align-items: center; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--muted); margin: 0 2px 6px; }
.swipe-hint b { font-weight: 400; animation: nudge 1.6s ease-in-out infinite; }
@keyframes nudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(5px); } }
.choices-wrap { position: relative; }
.choices-wrap::after {
  content: ""; position: absolute; top: 0; right: 0; bottom: 2px; width: 36px; pointer-events: none; opacity: 0; transition: opacity .2s;
  background: linear-gradient(90deg, transparent, var(--fade, var(--bg)));
}
.choices-wrap.more-right::after { opacity: 1; }
.choice-dots { display: none; justify-content: center; gap: 6px; margin-top: 6px; }
.choice-dots i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .25; transition: opacity .2s, transform .2s; }
.choice-dots i.on { opacity: .9; transform: scale(1.2); }
.actions.swipe .swipe-hint { display: flex; }
.actions.swipe .choice-dots { display: flex; }
[data-design="b"] .actions { --fade: var(--paper); }
[data-design="b"] .swipe-hint, [data-design="b"] .choice-dots { color: color-mix(in srgb, var(--paper-ink) 65%, transparent); }
[data-design="c"] .actions { --fade: var(--table); }
@media (prefers-reduced-motion: reduce) { .swipe-hint b { animation: none; } }

/* ---------------------------------------------------------------- 縦書きの細かいところ */
body.vertical[data-design="c"] .log-inner::before { text-orientation: upright; letter-spacing: 0; padding: 10px 3px; margin: 0 0 0 14px; }
body.vertical[data-design="c"] .log-inner { height: calc(100% - 4px); }
body.vertical .entry.thinking { writing-mode: vertical-rl; }
body.vertical .ending-card { writing-mode: horizontal-tb; }

/* ---------------------------------------------------------------- 考え中・エラー */
.entry.thinking { color: var(--muted); font-size: 14px; }
.entry.thinking::after { content: ""; animation: dots 1.2s steps(4) infinite; }
@keyframes dots { 0% { content: ""; } 25% { content: "・"; } 50% { content: "・・"; } 75% { content: "・・・"; } }
.err { color: #ff7b7b; font-size: 14px; margin-top: 6px; }
[data-design="b"] .err { color: #a11d1d; }
.thinking-line { color: var(--muted); font-size: 14px; margin-top: 10px; }
.thinking-line::after { content: ""; animation: dots 1.2s steps(4) infinite; }

/* ---------------------------------------------------------------- 決着 */
.ending-card { text-align: center; padding: 18px 12px; margin: 10px 0 22px; border-top: 2px solid var(--accent); border-bottom: 2px solid var(--accent); }
.ending-card h2 { margin: 0 0 8px; font-family: var(--font-title); font-weight: 400; letter-spacing: .35em; font-size: clamp(26px, 5vw, 44px); color: var(--accent); }
.ending-card.bad h2 { color: #c0392b; }
.reveal-in-log { text-align: left; margin: 0 0 22px; padding: 16px 18px; border-radius: 10px; background: rgba(127,127,127,.1); border: 1px solid rgba(127,127,127,.25); }
.reveal-in-log h4 { margin: 0 0 6px; color: var(--accent); }
.reveal-in-log p { margin: 0 0 .6em; font-size: 15px; line-height: 1.9; }
.end-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
[data-design="b"] .btn { border-color: rgba(0,0,0,.25); background: rgba(0,0,0,.04); }
[data-design="b"] .stage .btn.primary, [data-design="b"] .paper-card .btn.primary, .intro .btn.primary { background: var(--paper-ink); color: var(--paper); border-color: var(--paper-ink); }
[data-design="c"] .end-actions .btn:not(.primary) { background: rgba(0,0,0,.35); }

/* ---------------------------------------------------------------- 紙のカード（キャラ作成など、案Bの画面） */
.paper-card {
  max-width: 760px; margin: 0 auto; padding: clamp(18px, 4vw, 36px); background: var(--paper); color: var(--paper-ink);
  border-radius: 4px; box-shadow: 0 18px 50px rgba(0,0,0,.6), inset 0 0 80px rgba(120, 90, 40, .18);
}
.paper-card h2 { margin: 0; font-family: var(--font-title); font-weight: 400; font-size: clamp(24px, 3vw + 12px, 36px); line-height: 1.3; }
.paper-card .lead { color: color-mix(in srgb, var(--paper-ink) 70%, transparent); font-size: 14px; margin: 6px 0 4px; }
.paper-card label.f { display: block; font-size: 13px; letter-spacing: .1em; color: color-mix(in srgb, var(--paper-ink) 65%, transparent); margin: 20px 0 8px; }
.paper-card input[type=text], .paper-card textarea {
  width: 100%; font-size: 16px; padding: 10px 12px; border-radius: 6px; border: 1px solid rgba(0,0,0,.25); background: rgba(255,255,255,.5); color: var(--paper-ink);
}
.paper-card .err { color: #a11d1d; }
.pickgrid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); }
.pickgrid button {
  text-align: left; min-height: 44px; padding: 10px 12px; border-radius: 8px; border: 1px solid rgba(0,0,0,.2); background: rgba(255,255,255,.35); color: var(--paper-ink);
}
.pickgrid button b { display: block; }
.pickgrid button small { display: block; font-size: 12px; line-height: 1.5; color: color-mix(in srgb, var(--paper-ink) 65%, transparent); }
.pickgrid button.on { border-color: var(--accent2); box-shadow: inset 0 0 0 2px var(--accent2); background: rgba(255,255,255,.65); }
.attrpick { display: grid; gap: 8px; }
.attrrow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 12px; border-radius: 8px; background: rgba(255,255,255,.35); border: 1px solid rgba(0,0,0,.15); }
.attrrow .n { flex: 1 1 160px; min-width: 0; }
.attrrow .n small { display: block; font-size: 12px; line-height: 1.4; color: color-mix(in srgb, var(--paper-ink) 65%, transparent); }
.attrrow .v { width: 2.4em; text-align: center; font-weight: 700; }
.seg { display: inline-flex; }
.seg button { min-height: 40px; padding: 0 14px; border: 1px solid rgba(0,0,0,.25); background: rgba(255,255,255,.4); color: var(--paper-ink); font-size: 14px; }
.seg button:first-child { border-radius: 6px 0 0 6px; } .seg button:last-child { border-radius: 0 6px 6px 0; border-left: 0; }
.seg button.on.s { background: #2f7d45; border-color: #2f7d45; color: #fff; }
.seg button.on.w { background: #a33a2c; border-color: #a33a2c; color: #fff; }
.form-actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-top: 26px; }

/* ---------------------------------------------------------------- 続きから */
.saves { display: grid; gap: 8px; }
.save { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 14px; border-radius: 10px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1); }
.save .ic { font-size: 24px; }
.save .info { flex: 1 1 200px; min-width: 0; }
.save .info small { display: block; color: var(--muted); font-size: 12px; }
.save .btns { display: flex; gap: 6px; }
.btn.danger { color: #ff8f8f; }
.empty { color: var(--muted); font-size: 14px; }
.saveio { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.saveio small { flex-basis: 100%; color: var(--muted); font-size: 12px; }
.topright { display: flex; gap: 6px; margin-left: auto; }  /* 狭い画面で2行になっても、ボタンは右に寄せる */
a.iconbtn { color: var(--ink); text-decoration: none; }
.tipbtn { border-color: color-mix(in srgb, var(--accent) 60%, transparent); }
/* タイトル画面のいちばん下（ご利用にあたって・応援） */
.home-foot { margin-top: 44px; padding-top: 6px; border-top: 1px solid rgba(255,255,255,.1); color: var(--muted); }
.home-foot .group { margin-top: 18px; font-size: 16px; color: var(--ink); }
.home-foot ul { margin: 0; padding-left: 1.2em; font-size: 12.5px; line-height: 1.85; }
.home-foot li { margin-bottom: 4px; }
.home-foot .tip { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 18px 0 0; font-size: 13px; }
.home-foot .tip .btn { color: var(--ink); }
.home-foot .links { margin: 14px 0 0; font-size: 12.5px; }
.home-foot .links a { color: var(--ink); text-underline-offset: 3px; }

/* 広告の枠（公開ページで、広告の審査に通ったあとだけ出る。手元で遊ぶときは出ない） */
.ad-box { max-width: 728px; margin: 40px auto 0; text-align: center; }
.ad-box .ad-label { display: block; margin-bottom: 4px; font-size: 11px; letter-spacing: .2em; opacity: .6; }
#adEnd { max-width: 44em; margin-top: 36px; padding-bottom: 140px; }  /* 下のボタンを押しまちがえないよう、すき間をあける */
body.vertical #adEnd { display: none; }

/* プライバシーポリシーのページ */
.legal-back { margin: 0 0 16px; }
.legal-back .btn { color: var(--ink); border-color: rgba(255,255,255,.25); background: rgba(255,255,255,.06); }
.legal h1 { margin: 0; font-family: var(--font-title); font-weight: 400; font-size: clamp(22px, 2.4vw + 12px, 32px); line-height: 1.35; }
.legal h2 { margin: 28px 0 6px; font-family: var(--font-title); font-weight: 400; font-size: 19px; line-height: 1.4; }
.legal p, .legal li { font-size: 14.5px; line-height: 1.9; }
.legal p { margin: 8px 0 0; }
.legal ul { margin: 6px 0 0; padding-left: 1.3em; }
.legal li { margin-bottom: 6px; }
.legal a { color: inherit; text-underline-offset: 3px; }
.legal .legal-date { margin-top: 28px; font-size: 13px; color: color-mix(in srgb, var(--paper-ink) 70%, transparent); }
.legal-back { display: flex; flex-wrap: wrap; gap: 8px; max-width: 760px; margin-left: auto !important; margin-right: auto !important; }

/* 物語の紹介ページ（公開用にだけ作る: site_pages.py） */
.legal .story-genre { margin: 0 0 4px; font-size: 13px; letter-spacing: .1em; color: color-mix(in srgb, var(--paper-ink) 65%, transparent); }
.legal .story-play { margin: 18px 0 4px; }
.legal .story-play .btn { text-decoration: none; }
.story-list { list-style: none; padding: 0 !important; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.story-list li { margin: 0 !important; }
.story-list a { display: block; height: 100%; padding: 10px 14px; border-radius: 8px; border: 1px solid rgba(0,0,0,.18); background: rgba(255,255,255,.35); text-decoration: none; }
.story-list a:hover { background: rgba(255,255,255,.6); }
.story-list b { display: block; font-family: var(--font-title); font-weight: 400; font-size: 17px; line-height: 1.4; }
.story-list span { display: block; font-size: 12.5px; line-height: 1.6; color: color-mix(in srgb, var(--paper-ink) 70%, transparent); }

/* ---------------------------------------------------------------- 長編（新聞）の細かいところ */
.paper-news .carry { margin-top: 10px; font-size: 14px; }
.paper-news .chip { border-color: rgba(0,0,0,.3); }
.paper-news .reveal-in-log { background: rgba(0,0,0,.05); border-color: rgba(0,0,0,.2); }
.paper-news .reveal-in-log h4 { color: #a11d1d; }
.paper-news .btn { border-color: rgba(0,0,0,.3); background: rgba(0,0,0,.04); color: #231a12; }
.paper-news .btn.primary { background: #a11d1d; border-color: #a11d1d; color: #fff; }
.paper-news .thinking-line, .paper-news .err { text-align: center; }
.complete-banner { text-align: center; margin: 14px 0; padding: 12px; border: 3px double #231a12; }
.complete-banner b { font-family: "Dela Gothic One", serif; font-weight: 400; font-size: clamp(22px, 4vw, 34px); letter-spacing: .2em; }

/* ---------------------------------------------------------------- ダイアログ（AI設定・シェア） */
dialog.panel {
  width: min(640px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border-radius: 14px;
  background: #1b1d25; color: #ece8df; border: 1px solid rgba(255,255,255,.12); font-family: var(--font-ui);
}
dialog.panel::backdrop { background: rgba(0,0,0,.65); }
dialog.panel form, dialog.panel .inner { padding: clamp(16px, 4vw, 26px); }
dialog.panel h2 { margin: 0 0 6px; font-size: 20px; }
dialog.panel .qual { font-size: 13px; color: #a8a6b3; margin: 0 0 12px; }
dialog.panel label.f { display: block; font-size: 13px; color: #a8a6b3; margin: 14px 0 6px; }
dialog.panel input[type=text], dialog.panel input[type=password], dialog.panel select {
  width: 100%; font-size: 16px; padding: 10px 12px; border-radius: 8px; border: 1px solid rgba(255,255,255,.18); background: #0f1015; color: #ece8df;
}
.opt { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid rgba(255,255,255,.14); border-radius: 10px; margin-top: 10px; cursor: pointer; }
.opt small { display: block; color: #a8a6b3; font-size: 13px; line-height: 1.6; }
.opt input { margin-top: 6px; width: 18px; height: 18px; }
.optbody { padding: 4px 2px 4px 30px; }
.steps { font-size: 13px; color: #a8a6b3; padding-left: 18px; margin: 8px 0; }
.steps a { color: #e6c27a; }
.hint { display: block; color: #a8a6b3; font-size: 12px; margin-top: 8px; line-height: 1.7; }
.radios { display: flex; flex-wrap: wrap; gap: 6px; }
.radios label { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border: 1px solid rgba(255,255,255,.15); border-radius: 999px; font-size: 14px; cursor: pointer; }
.dlg-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 18px; }
.dlg-actions .sp { flex: 1; }
.testmsg { font-size: 13px; } .testmsg.ok { color: #7ee38f; } .testmsg.ng { color: #ff8f8f; }
dialog.panel .btn { color: #ece8df; }
dialog.panel .btn.primary { background: #d4a64a; border-color: #d4a64a; color: #111; }
.share-note { font-size: 12.5px; color: #a8a6b3; margin: 10px 0 0; line-height: 1.7; }
/* ご意見・不具合の報告 */
dialog.panel textarea { width: 100%; font: 15px/1.7 var(--font-ui); padding: 10px 12px; border-radius: 8px; border: 1px solid rgba(255,255,255,.18); background: #0f1015; color: #ece8df; resize: vertical; }
.fbinfo { margin-top: 10px; font-size: 12.5px; color: #a8a6b3; }
.fbinfo summary { cursor: pointer; }
.fbinfo pre { white-space: pre-wrap; word-break: break-all; margin: 6px 0 0; padding: 8px 10px; border-radius: 8px; background: #0f1015; font-size: 12px; }
#fbOut { margin: 10px 0 0; min-height: 1em; }
.fb-direct { font-size: 12px; color: #a8a6b3; text-decoration: underline; }
/* タイトルの下のリンク（物語の一覧・ご意見） */
.hero-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; }
.hero-link { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 16px; border-radius: 999px; font-size: 14px; color: var(--ink); text-decoration: none;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.18); }
.hero-link:hover { border-color: var(--accent); }

/* =================================================================== 案A「シネマ」 */
[data-design="a"] .topbar { background: linear-gradient(180deg, rgba(0,0,0,.55), transparent); }
[data-design="a"] .ttl b, [data-design="a"] .hero h1 { text-shadow: var(--glow); }
[data-design="a"] .log { mask-image: linear-gradient(180deg, transparent 0, #000 28px, #000 calc(100% - 20px), transparent); }
[data-design="a"] .entry.gm .story-text { text-shadow: 0 1px 12px rgba(0,0,0,.6); }
[data-design="a"] .choices button {
  border-radius: 12px; border: 1px solid rgba(255,255,255,.14); border-left: 3px solid var(--accent);
  background: rgba(10,10,16,.45); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: box-shadow .2s, transform .2s;
}
[data-design="a"] .choices button:hover { box-shadow: var(--glow); transform: translateY(-1px); }
[data-design="a"] .sendrow input { border-radius: 12px; border: 1px solid rgba(255,255,255,.14); background: rgba(10,10,16,.5); }
[data-design="a"] .sendrow button { border-radius: 12px; border: 0; background: var(--accent); color: #111; font-weight: 700; }
[data-design="a"] .sheet { background: color-mix(in srgb, var(--bg2) 82%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-left: 1px solid rgba(255,255,255,.08); }
[data-design="a"] .rollbox { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 12px 16px; border-radius: 14px; background: rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.1); }
[data-design="a"] .wcard { box-shadow: 0 10px 30px rgba(0,0,0,.45); transition: transform .25s, box-shadow .25s; }
[data-design="a"] .wcard:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(0,0,0,.6), var(--glow); }
[data-skin="neon"][data-design="a"] .ttl b { color: #fff; text-shadow: 0 0 6px var(--accent), 0 0 18px var(--accent); }

/* =================================================================== 案B「古書」 */
[data-design="b"] { background: radial-gradient(ellipse at 50% 30%, color-mix(in srgb, var(--bg2) 70%, #000), #050403); }
[data-design="b"] .scene { opacity: .35; }
[data-design="b"] .app { max-width: 1280px; margin: 0 auto; }
[data-design="b"] .topbar { justify-content: center; }
[data-design="b"] .topbar .ttl { text-align: center; }
[data-design="b"] .topbar .ttl b::before, [data-design="b"] .topbar .ttl b::after { content: " ❦ "; color: var(--accent); font-size: .7em; vertical-align: middle; }
[data-design="b"] .stage {
  background: var(--paper); color: var(--paper-ink); margin: 0 clamp(0px, 2vw, 24px) clamp(0px, 2vw, 24px);
  border-radius: 4px; box-shadow: 0 18px 50px rgba(0,0,0,.6), inset 0 0 80px rgba(120, 90, 40, .18);
}
[data-design="b"] .log { padding-top: clamp(18px, 4vw, 40px); }
[data-design="b"] .entry.player { color: color-mix(in srgb, var(--accent) 70%, var(--paper-ink)); border-color: currentColor; font-style: italic; }
[data-design="b"] .goal-card + .entry.gm .story-text p:first-child::first-letter {
  float: left; font-family: var(--font-title); font-size: 3.1em; line-height: 1; margin: .05em .12em 0 0; color: var(--accent2);
}
[data-design="b"] .actions { border-top: 1px solid rgba(0,0,0,.15); }
[data-design="b"] .choices button { background: none; border: 0; border-bottom: 1px dashed rgba(0,0,0,.3); border-radius: 0; color: var(--paper-ink); font-family: var(--font-body); }
[data-design="b"] .choices button::before { content: "→ "; color: var(--accent2); }
[data-design="b"] .choices button:hover { color: var(--accent2); border-bottom-style: solid; }
@media (max-width: 759px) { [data-design="b"] .choices button { border: 1px dashed rgba(0,0,0,.3); border-radius: 6px; } }
[data-design="b"] .sendrow input { background: transparent; border: 0; border-bottom: 2px solid rgba(0,0,0,.35); color: var(--paper-ink); font-family: var(--font-body); }
[data-design="b"] .sendrow button { background: var(--paper-ink); color: var(--paper); border: 0; border-radius: 4px; }
[data-design="b"] .chip { border-color: rgba(0,0,0,.25); }
[data-design="b"] .chip.up { color: #1f6b33; } [data-design="b"] .chip.down { color: #a11d1d; } [data-design="b"] .chip.auto { color: rgba(0,0,0,.5); }
[data-design="b"] .res.success { color: #1f6b33; } [data-design="b"] .res.partial { color: #8a5a00; } [data-design="b"] .res.fail { color: #a11d1d; }
[data-design="b"] .rollline small { color: rgba(0,0,0,.55); }
[data-design="b"] .sheet { background: var(--paper); color: var(--paper-ink); box-shadow: -10px 0 40px rgba(0,0,0,.5); }
[data-design="b"] .sheet h3 { color: rgba(0,0,0,.5); border-bottom: 1px solid rgba(0,0,0,.15); padding-bottom: 4px; }
[data-design="b"] .attrs div, [data-design="b"] .person { background: rgba(0,0,0,.05); }
[data-design="b"] .bar { background: rgba(0,0,0,.12); }
[data-design="b"] .notes { color: rgba(0,0,0,.6); }
@media (min-width: 1100px) {
  /* 見開き: 左ページにキャラクター表、右ページに物語 */
  [data-design="b"] .body {
    grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); margin: 0 24px 24px;
    background: var(--paper); border-radius: 4px; box-shadow: 0 18px 50px rgba(0,0,0,.6), inset 0 0 80px rgba(120, 90, 40, .18);
  }
  [data-design="b"] .sheet { order: -1; box-shadow: inset -24px 0 30px -20px rgba(0,0,0,.35); border-right: 1px solid rgba(0,0,0,.15); }
  [data-design="b"] .stage { margin: 0; box-shadow: inset 24px 0 30px -20px rgba(0,0,0,.3); background: transparent; }
}
/* 表紙: どの世界観でも文字が読めるよう、暗い布地に金の文字で統一し、世界観の色は差し色だけに使う */
[data-design="b"] .wcard { border-radius: 4px 10px 10px 4px; min-height: 230px; box-shadow: 6px 8px 20px rgba(0,0,0,.5); }
[data-design="b"] .wcard .art {
  background: linear-gradient(90deg, rgba(0,0,0,.45) 0 10px, transparent 10px 14px, rgba(255,255,255,.08) 14px 15px, transparent 15px),
    radial-gradient(ellipse at 50% 0%, color-mix(in srgb, var(--accent) 35%, transparent), transparent 70%),
    color-mix(in srgb, var(--accent) 22%, #17120c);
}
[data-design="b"] .wcard .art::after { background: none; border: 1px solid rgba(232, 200, 130, .55); inset: 12px 12px 12px 26px; border-radius: 3px; }
[data-design="b"] .wcard .txt { padding: 64px 24px 24px 38px; justify-content: center; text-align: center; min-height: 230px; }
[data-design="b"] .wcard .g { color: rgba(232, 200, 130, .85); }
[data-design="b"] .wcard .t { color: #f1dfae; }
[data-design="b"] .wcard .d { color: rgba(255, 245, 225, .72); }
[data-design="b"] .wcard .icon { left: calc(50% + 7px); right: auto; top: 20px; transform: translateX(-50%); font-size: 34px; }
[data-design="b"] .wcard.big .txt { min-height: 230px; }

/* =================================================================== 案C「卓上TRPG」 */
[data-design="c"] {
  background:
    radial-gradient(ellipse at 50% 40%, transparent 30%, rgba(0,0,0,.55)),
    radial-gradient(rgba(255,255,255,.035) 1px, transparent 1.2px) 0 0 / 5px 5px,
    var(--table);
}
[data-design="c"] .scene { display: none; }
[data-design="c"] .log-inner {
  background: var(--bg2); border: 2px solid color-mix(in srgb, var(--accent) 45%, transparent); border-radius: 16px;
  padding: clamp(16px, 3vw, 28px); box-shadow: 0 12px 30px rgba(0,0,0,.45);
}
[data-design="c"] .log-inner::before {
  content: "GM"; display: inline-block; font: 700 11px var(--font-ui); letter-spacing: .2em; color: #111;
  background: var(--accent); padding: 2px 10px; border-radius: 999px; margin-bottom: 12px;
}
[data-design="c"] .rollbox { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 14px 18px; border-radius: 18px;
  background: radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--table) 70%, #fff 8%), var(--table)); box-shadow: inset 0 4px 14px rgba(0,0,0,.6); }
[data-design="c"] .choices { gap: 12px; }
[data-design="c"] .choices button {
  min-height: 84px; border: 0; border-radius: 10px; background: var(--paper); color: var(--paper-ink);
  font-family: var(--font-body); font-size: 15px; box-shadow: 0 6px 16px rgba(0,0,0,.45);
  transition: transform .2s; position: relative; padding-top: 22px;
}
[data-design="c"] .choices button::before { content: "ACTION"; position: absolute; top: 6px; left: 12px; font: 700 9px var(--font-ui); letter-spacing: .25em; color: var(--accent2); }
[data-design="c"] .choices button:nth-child(1) { transform: rotate(-1.2deg); }
[data-design="c"] .choices button:nth-child(3) { transform: rotate(1deg); }
[data-design="c"] .choices button:hover { transform: translateY(-6px) rotate(0); }
@media (max-width: 759px) {
  /* スマホでは、カードを横に並べて指でめくる */
  [data-design="c"] .choices { grid-auto-flow: column; grid-auto-columns: 72%; grid-template-columns: none; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px 2px 10px; }
  [data-design="c"] .choices button { scroll-snap-align: start; }
}
[data-design="c"] .sendrow input { border-radius: 10px; border: 0; background: rgba(0,0,0,.35); }
[data-design="c"] .sendrow button { border-radius: 10px; border: 0; background: var(--accent); color: #111; font-weight: 700; }
[data-design="c"] .sheet { background: var(--paper); color: var(--paper-ink); }
@media (min-width: 1100px) {
  [data-design="c"] .sheet { margin: 14px 18px 18px 0; border-radius: 6px; transform: rotate(.6deg); box-shadow: 0 14px 30px rgba(0,0,0,.5); }
}
[data-design="c"] .sheet h3 { color: var(--accent2); font-weight: 700; }
[data-design="c"] .attrs div, [data-design="c"] .person { background: rgba(0,0,0,.06); }
[data-design="c"] .bar { background: rgba(0,0,0,.12); }
[data-design="c"] .notes { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); color: #3b2f00; }
[data-design="c"] .notes div { background: #fde68a; padding: 8px 10px; box-shadow: 0 4px 8px rgba(0,0,0,.25); font-size: 12.5px; }
[data-design="c"] .notes div:nth-child(odd) { transform: rotate(-1.5deg); } [data-design="c"] .notes div:nth-child(even) { transform: rotate(1.2deg); background: #fbcfe8; }
[data-design="c"] .wcard { background: var(--paper); color: var(--paper-ink); border-radius: 12px; box-shadow: 0 8px 20px rgba(0,0,0,.45); transition: transform .2s; }
[data-design="c"] .wcard:hover { transform: translateY(-4px) rotate(-.5deg); }
[data-design="c"] .wcard .art { inset: 0 0 auto; height: 70px; }
[data-design="c"] .wcard .art::after { display: none; }
[data-design="c"] .wcard .icon { top: 26px; font-size: 40px; }
[data-design="c"] .wcard .txt { justify-content: flex-start; padding-top: 84px; }
[data-design="c"] .wcard .d { color: color-mix(in srgb, var(--paper-ink) 65%, transparent); }
[data-design="c"] .wcard .g { color: color-mix(in srgb, var(--accent) 55%, #000); }
