/* スマホ前提。マッチングアプリのような、丸くてやわらかい見た目。
   色はコーラルからオレンジのグラデーション（男女どちらにも寄りすぎない暖色）。 */
:root {
  --grad: linear-gradient(135deg, #ff6f91 0%, #ff9671 55%, #ffc75f 100%);
  --pink: #ff6f91;
  --coral: #ff9671;
  --sky: #4fb3ff;
  --amber: #f0a93b;
  --green: #2fa37a;
  --bg: #fff8f4;
  --ink: #2d2a32;
  --muted: #8a8394;
  --line: #f3e5df;
  --danger: #e0445a;
  --shadow: 0 12px 30px rgba(255, 111, 145, 0.18);
  --shadow-soft: 0 6px 18px rgba(45, 42, 50, 0.08);
  --radius: 22px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  color: var(--ink);
  font-family: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", "Hiragino Sans", "Yu Gothic UI", Meiryo, sans-serif;
  font-size: 16px;          /* 16px 未満の入力欄は、iPhone がタップ時に拡大してしまう */
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 0% 0%, #ffe3ea 0, transparent 40%),
    radial-gradient(circle at 100% 30%, #fff0d9 0, transparent 38%),
    var(--bg);
}

/* 画面は「上（見出し）・中身・下（ボタン）」の3段。下のボタンは、いつも指の届くところに出しておく */
main {
  max-width: 480px;
  margin: 0 auto;
  padding: 16px 18px 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
main > .body { flex: 1 0 auto; padding-bottom: 12px; }

h1 { font-size: 26px; font-weight: 800; margin: 2px 0 8px; }
h2 { font-size: 22px; font-weight: 800; margin: 20px 0 4px; }
h3 { font-size: 16px; font-weight: 700; margin: 18px 0 6px; }
p { margin: 8px 0; }
.center { text-align: center; }
.hidden { display: none; }

/* 画面の切り替え：進むときは右から、戻るときは左からすべり込む */
@keyframes in-next { from { opacity: 0; transform: translateX(34px); } }
@keyframes in-back { from { opacity: 0; transform: translateX(-34px); } }
@keyframes in-fade { from { opacity: 0; transform: translateY(8px); } }
main.enter-next > .body { animation: in-next 0.32s var(--ease); }
main.enter-back > .body { animation: in-back 0.32s var(--ease); }
main.enter-fade > .body { animation: in-fade 0.25s ease-out; }

/* ボタン */
button {
  font: inherit;
  font-weight: 700;
  line-height: 1.35;
  border: 0;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 0.12s ease, box-shadow 0.2s ease, opacity 0.2s ease, background-color 0.2s ease;
}
button:active { transform: scale(0.96); }
button:disabled { opacity: 0.35; cursor: default; transform: none; }
button:focus-visible { outline: 3px solid rgba(255, 111, 145, 0.5); outline-offset: 2px; }
.btn { border-radius: 999px; padding: 14px 22px; min-height: 52px; font-size: 16px; }
.btn.small { min-height: 46px; padding: 10px 18px; }
.btn.grad { background: var(--grad); color: #fff; box-shadow: var(--shadow); }
.btn.outline { background: #fff; color: var(--pink); border: 2px solid #ffd0db; }
.btn.outline.strong { border-color: var(--pink); }
.btn.ghost { background: #fff; color: var(--muted); border: 2px solid var(--line); }
.btn.danger { background: #fff; color: var(--danger); border: 2px solid #f7c5cc; }
.link { background: none; color: var(--muted); padding: 8px; text-decoration: underline; font-weight: 500; }
.link-btn {
  display: block; margin: 8px auto 0; padding: 10px 18px; border-radius: 999px;
  background: none; color: var(--pink); font-weight: 700;
}
.link-btn:hover { background: #fff; }
.danger-text { color: var(--danger); }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%;
  background: #fff; color: var(--muted); box-shadow: var(--shadow-soft); font-size: 16px;
}

/* 下のボタン（画面の下に貼りつく） */
.bar, .step-foot {
  position: sticky; bottom: 0; z-index: 5;
  margin: 0 -18px;
  padding: 18px 18px calc(14px + env(safe-area-inset-bottom));
  /* 上の余白の中だけで透かし、ボタンと文字の後ろは塗る（後ろの中身と文字が重ならないように） */
  background: linear-gradient(180deg, rgba(255, 248, 244, 0) 0, var(--bg) 16px);
}
.bar { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; }
.bar.solo { grid-template-columns: 1fr; }
.step-nav { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; }
.step-nav.solo { grid-template-columns: 1fr; }

/* はじめての説明 */
.intro { text-align: center; padding-top: 12vh; }
.intro-emoji { font-size: 88px; line-height: 1.15; animation: float 2.6s ease-in-out infinite; }
.intro h2 { font-size: 24px; margin-top: 18px; }
.intro p { color: var(--muted); max-width: 21em; margin: 12px auto; }
.dots { display: flex; justify-content: center; gap: 8px; margin-top: 28px; }
.dot { width: 8px; height: 8px; border-radius: 999px; background: #f0d9d2; transition: width 0.25s var(--ease); }
.dot.on { width: 26px; background: var(--grad); }
@keyframes float { 50% { transform: translateY(-10px) rotate(-4deg); } }

/* 一覧 */
.hero {
  background: var(--grad); color: #fff;
  margin: -16px -18px 14px; padding: 22px 22px 22px;
  border-radius: 0 0 28px 28px; box-shadow: var(--shadow);
}
.hero-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.logo { font-size: 13px; letter-spacing: 0.12em; opacity: 0.9; }
.help-btn {
  background: rgba(255, 255, 255, 0.24); color: #fff; font-size: 13px;
  padding: 5px 12px; border-radius: 999px;
}
.count-pill {
  display: inline-block; background: rgba(255, 255, 255, 0.25);
  padding: 4px 14px; border-radius: 999px; font-weight: 700; font-size: 14px;
}
/* はじめの案内（開く場所の注意） */
.banner {
  display: grid; gap: 6px; margin-bottom: 12px; padding: 14px 16px;
  background: #fff; border: 2px solid #ffd0db; border-radius: var(--radius); box-shadow: var(--shadow-soft);
}
.banner p { margin: 0; font-size: 14px; }
.banner .hint { font-size: 12px; }
.banner .link { justify-self: start; padding: 4px 0; }
.warn-banner { background: #fff4f5; border-color: var(--danger); }
a.btn { display: block; text-align: center; text-decoration: none; line-height: 24px; }
.progress-card {
  background: #fff; border-radius: var(--radius); padding: 14px 16px 12px;
  box-shadow: var(--shadow-soft); margin-bottom: 12px; border: 2px solid transparent;
}
.progress-card.all { background: linear-gradient(#fff, #fff) padding-box, var(--grad) border-box; }
.progress-card .hint { margin: 8px 0 0; }
.progress-head { display: flex; justify-content: space-between; align-items: baseline; font-weight: 700; margin-bottom: 8px; }
.progress-head strong { font-size: 20px; font-weight: 800; color: var(--pink); }
.btn.resume {
  width: 100%; margin-bottom: 12px;
  background: #fff; color: var(--pink); border: 2px solid var(--pink); box-shadow: var(--shadow-soft);
}
.note {
  font-size: 13px; color: var(--muted); background: #fff; border-radius: 16px;
  padding: 10px 14px; box-shadow: var(--shadow-soft);
}
.people { list-style: none; padding: 0; margin: 14px 0; display: grid; gap: 12px; }
.person {
  display: flex; align-items: center; gap: 14px;
  background: #fff; border-radius: var(--radius); padding: 12px 14px;
  box-shadow: var(--shadow-soft); cursor: pointer; transition: transform 0.12s ease;
}
.person:active { transform: scale(0.98); }
.avatar {
  width: 58px; height: 58px; border-radius: 50%; object-fit: cover; flex: none;
  border: 3px solid transparent;
  background: linear-gradient(#fff, #fff) padding-box, var(--grad) border-box;
}
.avatar.empty {
  display: grid; place-items: center; font-weight: 800; font-size: 22px; color: #fff;
  background: var(--grad); border: 0;
}
/* 顔のまわりの輪：入力の進み具合（--p ＝ 0〜100） */
.ring {
  flex: none; width: 66px; height: 66px; border-radius: 50%; padding: 4px;
  display: grid; place-items: center;
  background: conic-gradient(var(--pink) calc(var(--p, 0) * 1%), #f1e2dc 0);
}
.ring .avatar { width: 58px; height: 58px; border: 3px solid #fff; background: #fff; }
.ring .avatar.empty { background: var(--grad); }
.who { flex: 1; min-width: 0; }
.name { font-weight: 800; font-size: 17px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.tag { font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: #ffe6ee; color: #d8456f; }
.tag.soft { background: #f4f0f8; color: #6b6478; }
.lack { font-size: 12px; color: var(--danger); margin-top: 4px; }
.ok { font-size: 12px; color: var(--green); margin-top: 4px; }
.chev { color: #d6cbd0; font-size: 26px; }
.actions { display: grid; gap: 12px; margin: 18px 0; }
.empty-state { text-align: center; color: var(--muted); padding: 24px 0 8px; }
.big-emoji { font-size: 52px; line-height: 1.2; }
.bounce { animation: pop-in 0.7s var(--ease); }
@keyframes pop-in { 0% { transform: scale(0.2); } 60% { transform: scale(1.18); } 100% { transform: scale(1); } }
.danger-zone { margin-top: 24px; color: var(--muted); font-size: 14px; }
.danger-zone summary { cursor: pointer; }

/* 1人ずつの入力。文字を入れる欄（.dock）は画面の下に寄せる（片手で持ったときに親指が届くように） */
.step-body { display: flex; flex-direction: column; }
.step-body > .dock { margin-top: auto; padding-top: 18px; }
.pill {
  display: inline-block; margin-right: 8px; padding: 2px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 800; vertical-align: 3px;
}
.pill.req { background: var(--pink); color: #fff; }
.pill.opt { background: #eef3f8; color: #5b7288; border: 1px solid #d6e2ee; }
.skip-rest {
  display: block; margin: 0 auto 6px; padding: 4px 14px; border-radius: 999px;
  background: none; color: var(--muted); font-size: 13px; font-weight: 700;
}
.skip-rest:hover { background: #fff; }
.step-top { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; }
.progress { height: 8px; border-radius: 999px; background: #f6e7e2; overflow: hidden; }
.progress.big { height: 12px; }
.progress span { display: block; height: 100%; background: var(--grad); border-radius: 999px; transition: width 0.4s var(--ease); }
.who-small { color: var(--muted); font-size: 13px; max-width: 7em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.help { color: var(--muted); font-size: 14px; margin-top: 0; }
.hint { color: var(--muted); font-size: 13px; }
.hint.ok { color: var(--green); margin-top: 0; }
.warn { color: var(--danger); font-size: 14px; }
.warn:empty { display: none; }
.caption { color: var(--muted); font-size: 12px; text-align: center; margin: 0; }
.field { display: grid; gap: 12px; margin-top: 14px; }
.field.center { justify-items: center; text-align: center; }
.field > .ok.center { font-size: 15px; font-weight: 700; margin: 0; }
.text {
  width: 100%; font: inherit; padding: 14px 16px; border-radius: 16px;
  border: 2px solid var(--line); background: #fff; color: var(--ink);
}
.text:focus { outline: none; border-color: var(--coral); box-shadow: 0 0 0 4px rgba(255, 150, 113, 0.18); }
.area { resize: vertical; min-height: 130px; }
.area.tall { min-height: 230px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.two .btn { padding: 12px 10px; font-size: 15px; }

/* 選ぶボタン */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  background: #fff; color: var(--ink); border: 2px solid var(--line);
  padding: 9px 16px; min-height: 44px; border-radius: 999px; font-weight: 700;
}
.chip.on { background: var(--grad); color: #fff; border-color: transparent; box-shadow: var(--shadow); }
.chip.custom { border-style: dashed; border-color: #ffb3c3; color: var(--pink); background: #fff; }
.chip.custom.on { border-style: solid; background: #fff; color: var(--pink); border-color: var(--pink); box-shadow: none; }
.center-self { justify-self: center; }
.choice-block { display: grid; gap: 10px; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile {
  background: #fff; color: var(--ink); border-radius: var(--radius); padding: 16px 8px; min-height: 92px;
  display: grid; place-items: center; gap: 2px; font-size: 18px; box-shadow: var(--shadow-soft); border: 2px solid transparent;
}
.tile.on { border-color: var(--pink); color: var(--pink); }
.tile-icon { font-size: 28px; }
.more summary { color: var(--pink); cursor: pointer; padding: 6px 0; font-weight: 700; }
.add-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }

/* 写真 */
.photo-frame {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius);
  background: #fff; box-shadow: var(--shadow-soft); cursor: pointer; display: block;
}
.photo-frame.empty {
  display: grid; place-items: center; align-content: center; color: var(--muted);
  border: 2px dashed #ffc2cf; box-shadow: none;
}
/* 写真の位置合わせ（枠はカードの写真枠と同じ比率。見えている範囲がそのまま刷られる） */
.cropper { display: grid; gap: 10px; }
.crop-frame {
  position: relative; width: 100%; border-radius: 18px; overflow: hidden;
  background: #2d2a32; box-shadow: 0 0 0 3px #fff, 0 12px 28px rgba(45, 42, 50, 0.2);
}
.crop-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
.crop-frame.moving .crop-canvas { cursor: grabbing; }
/* 動かしている間だけ、三分割の線を出す */
.crop-frame::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.2s;
  background:
    linear-gradient(to right, transparent calc(100% / 3 - 1px), rgba(255, 255, 255, 0.55) 0, rgba(255, 255, 255, 0.55) calc(100% / 3),
      transparent 0, transparent calc(200% / 3 - 1px), rgba(255, 255, 255, 0.55) 0, rgba(255, 255, 255, 0.55) calc(200% / 3), transparent 0),
    linear-gradient(to bottom, transparent calc(100% / 3 - 1px), rgba(255, 255, 255, 0.55) 0, rgba(255, 255, 255, 0.55) calc(100% / 3),
      transparent 0, transparent calc(200% / 3 - 1px), rgba(255, 255, 255, 0.55) 0, rgba(255, 255, 255, 0.55) calc(200% / 3), transparent 0);
}
.crop-frame.moving::after { opacity: 1; }
.crop-hint {
  position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%);
  background: rgba(45, 42, 50, 0.62); color: #fff; font-size: 12px; font-weight: 700; white-space: nowrap;
  padding: 4px 12px; border-radius: 999px; pointer-events: none; transition: opacity 0.3s;
}
.crop-frame.moving .crop-hint { opacity: 0; }
.zoom-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; }
.zoom-row span { font-size: 14px; opacity: 0.7; }
.zoom-row .zoom-big { font-size: 22px; }
.zoom { width: 100%; height: 32px; accent-color: var(--pink); }

/* スワイプのカード（写真を大きく出す）。高さは画面に合わせ、丸いボタンと下のボタンまで1画面に収める */
.deck { position: relative; height: 360px; height: clamp(250px, calc(100dvh - 385px), 440px); margin-top: 6px; }
.deck.short { height: 320px; height: clamp(230px, calc(100dvh - 435px), 400px); }
.step-body.optional .deck { height: 330px; height: clamp(230px, calc(100dvh - 420px), 420px); }
.step-body.optional .deck.short { height: 300px; height: clamp(210px, calc(100dvh - 470px), 380px); }
.tcard {
  position: absolute; inset: 0; border-radius: 26px; overflow: hidden; background: #fff;
  box-shadow: 0 16px 36px rgba(45, 42, 50, 0.18);
  touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab;
}
.tcard.top { animation: pop 0.28s var(--ease); }
.tcard.behind { transform: scale(0.94) translateY(14px); opacity: 0.6; pointer-events: none; }
.tcard.dragging { cursor: grabbing; }
@keyframes pop { from { transform: scale(0.94) translateY(12px); opacity: 0.6; } }
/* はじめてのときだけ、左右に小さく揺れて「動かせる」ことを見せる */
.tcard.top.nudge { animation: pop 0.28s var(--ease), nudge 1.3s 0.7s ease-in-out 2; }
@keyframes nudge {
  0%, 100% { transform: none; }
  25% { transform: translateX(-22px) rotate(-3deg); }
  75% { transform: translateX(22px) rotate(3deg); }
}
.tcard-photo { width: 100%; height: 100%; object-fit: cover; pointer-events: none; -webkit-user-drag: none; }
.tcard-photo.empty {
  display: grid; place-items: center; background: var(--grad); color: rgba(255, 255, 255, 0.9);
  font-size: 120px; font-weight: 800;
}
.tcard-shade {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20, 16, 24, 0.3) 0, transparent 16%, transparent 45%, rgba(20, 16, 24, 0.72) 100%);
}
.tcard-bars { position: absolute; top: 10px; left: 12px; right: 12px; display: flex; gap: 4px; }
.tcard-bars span { flex: 1; height: 4px; border-radius: 999px; background: rgba(255, 255, 255, 0.35); }
.tcard-bars span.on { background: rgba(255, 255, 255, 0.95); }
.tcard-bars span.now { background: rgba(255, 255, 255, 0.95); box-shadow: 0 0 0 1px rgba(255, 111, 145, 0.9); }
.tcard-text { position: absolute; left: 22px; right: 22px; bottom: 22px; color: #fff; }
.tcard-sub { font-size: 15px; opacity: 0.9; }
.tcard-main { font-size: 36px; font-weight: 800; line-height: 1.25; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.25); }
.tcard-main.small { font-size: 26px; }
.stamp {
  position: absolute; top: 26px; padding: 4px 14px; border-radius: 12px; border: 4px solid;
  font-size: 28px; font-weight: 800; opacity: 0; pointer-events: none; background: rgba(255, 255, 255, 0.85);
}
.stamp.yes { left: 20px; color: var(--pink); border-color: var(--pink); transform: rotate(-14deg); }
.stamp.no { right: 20px; color: #6d7890; border-color: #6d7890; transform: rotate(14deg); }
.stamp.up { left: 50%; top: auto; bottom: 110px; color: var(--sky); border-color: var(--sky); transform: translateX(-50%); }
/* 丸いボタンの列。ボタンは縦の真ん中、説明は1行にそろえる */
.round-row {
  display: grid; grid-template-rows: auto auto; grid-auto-flow: column;
  justify-content: center; justify-items: center; align-items: center; column-gap: 18px; row-gap: 6px;
}
.round-cell { display: contents; }
.round-cell > span { color: var(--muted); font-size: 12px; font-weight: 700; white-space: nowrap; }
.round {
  width: 66px; height: 66px; border-radius: 50%; background: #fff; font-size: 28px;
  box-shadow: 0 10px 24px rgba(45, 42, 50, 0.14); display: grid; place-items: center;
}
.round.yes { width: 76px; height: 76px; color: var(--pink); font-size: 34px; }
.round.no { color: #6d7890; }
.round.up { color: var(--sky); }
.round.mini { width: 50px; height: 50px; font-size: 20px; }
.round.undo { color: var(--amber); }
.round.write { color: var(--sky); }
.round.picked { outline: 4px solid rgba(255, 111, 145, 0.35); }
.done-note { color: var(--ink); font-weight: 700; }

/* 2択のスワイプ（どんな人）。ポジティブな印象のほう（右）はピンク、左は空色 */
.pair-labels { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-top: 4px; }
.pair-labels span {
  max-width: 48%; font-size: 24px; font-weight: 800; line-height: 1.25;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}
.pair-right { text-align: right; }
.stamp.left-pick { right: 20px; color: var(--sky); border-color: var(--sky); transform: rotate(14deg); }
.stamp.right-pick { left: 20px; color: var(--pink); border-color: var(--pink); transform: rotate(-14deg); }
.stamp.neither {
  left: 50%; top: auto; bottom: 120px; font-size: 22px;
  color: var(--muted); border-color: var(--muted); transform: translateX(-50%); white-space: nowrap;
}
.pick-row { display: grid; grid-template-columns: auto 1fr 1fr; align-items: center; gap: 10px; }
.btn.pick-left, .btn.pick-right { padding: 10px 12px; background: #fff; box-shadow: var(--shadow-soft); }
.btn.pick-left { color: #2b8ad8; border: 2px solid #bfe0fb; }
.btn.pick-right { color: var(--pink); border: 2px solid #ffc2cf; }
.pick-links { display: flex; justify-content: center; gap: 20px; margin-top: -6px; }
.pick-links .link { text-decoration: none; font-weight: 700; }
.tcard.static { cursor: default; }

/* タイプを選ぶ */
.type-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.type-tile {
  display: grid; justify-items: center; gap: 2px; padding: 14px 8px; min-height: 104px;
  background: #fff; color: var(--ink); border: 2px solid transparent; border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}
.type-tile:last-child:nth-child(odd) { grid-column: 1 / -1; }
.type-tile.on { border-color: var(--pink); }
.type-tile.hint { border-color: #ffc9b5; border-style: dashed; }
.type-emoji { font-size: 30px; line-height: 1.2; }
.type-tile small { color: var(--muted); font-size: 12px; font-weight: 500; }

/* 好きなこと・得意なこと */
.like-group { display: grid; gap: 8px; }
.like-head { color: var(--muted); font-size: 13px; font-weight: 700; }

/* 確認：制作中のカード。本物のカードと同じ並び（レベル・カード名・写真・グループの帯・能力・メッセージ・攻守）で、
   色はまだ付けない（白とグレーだけ）。文字の大きさはカードの幅に合わせる（cqw。使えない端末は px のまま） */
.draft-card {
  position: relative; width: min(80%, 290px); aspect-ratio: 63 / 88; margin: 12px auto 6px; padding: 3.4% 3.4% 1.6%;
  display: flex; flex-direction: column;
  container-type: inline-size;
  background: #d9dae0; border-radius: 14px;             /* 本物は黒い縁。ここは明るいグレー */
  box-shadow: 0 18px 36px rgba(45, 42, 50, 0.16);
  transform: rotate(-2deg);
  animation: deal 0.5s var(--ease);
  color: #55565f;
}
@keyframes deal { from { transform: translateY(24px) rotate(6deg) scale(0.9); opacity: 0; } }
.dc-body {
  position: relative; flex: 1; min-height: 0; display: grid; gap: 6px; gap: 1.8cqw;
  grid-template-rows: auto auto auto auto 1fr auto auto;
  padding: 3.2cqw 3.4cqw 2cqw; background: #fbfbfc; border-radius: 9px;
}
.dc-level {
  position: absolute; top: 1.6cqw; left: 1.6cqw; z-index: 1;
  width: 40px; width: 14cqw; aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center; align-content: center; line-height: 1;
  background: #fff; border: 2px solid #b8b9c3; border-width: 0.8cqw;
}
.dc-level small { font-size: 7px; font-size: 2.3cqw; font-weight: 800; letter-spacing: 0.08em; color: #9a9ba6; }
.dc-level b { font-size: 18px; font-size: 6.6cqw; font-weight: 800; color: #9a9ba6; }
.dc-title {
  margin-left: 11cqw; padding: 1.4cqw 2cqw; text-align: center;
  font-size: 13px; font-size: 4.6cqw; font-weight: 800; color: #3c3d45;
  background: #fff; border: 1.5px solid #c9cad2; border-radius: 1.6cqw;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dc-kind {
  justify-self: center; margin: -0.8cqw 0 -0.4cqw; padding: 0.2cqw 3.4cqw;
  font-size: 8px; font-size: 2.8cqw; font-weight: 700; color: #8a8b96; background: #e8e9ee; border-radius: 999px;
}
.dc-photo {
  aspect-ratio: 1.3325; overflow: hidden; border: 3px solid #d3d4db; border-width: 0.9cqw; border-radius: 1.2cqw;
  background: #eeeff3;
}
.dc-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dc-band {
  padding: 0.6cqw 2.6cqw; font-size: 10px; font-size: 3.5cqw; font-weight: 800; color: #fff;
  background: #a6a7b1; border-radius: 1cqw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dc-ability {
  display: grid; align-content: start; gap: 0.6cqw; padding: 1.6cqw 2.4cqw;
  font-size: 9px; font-size: 3cqw; color: #9a9ba6;
  background: #fff; border: 1.5px dashed #c6c7cf; border-radius: 1.4cqw; overflow: hidden;
}
.dc-ability b { color: #7c7d88; font-size: 10px; font-size: 3.3cqw; }
.dc-msg {
  padding: 1.4cqw 2.6cqw; text-align: center; font-size: 9px; font-size: 3cqw; line-height: 1.4;
  background: #f1f1f4; border-radius: 1.4cqw;
}
.dc-msg-text {
  white-space: pre-wrap; word-break: break-word; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.dc-msg-head { margin-top: 0.4cqw; font-weight: 800; color: #7c7d88; }
.dc-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6cqw; }
.dc-stats span {
  padding: 0.8cqw 2cqw; font-size: 9px; font-size: 3.3cqw; font-weight: 800; color: #fff;
  background: #9d9ea8; border-radius: 1cqw;
}
.dc-stats span + span { background: #85868f; }
.dc-foot {
  display: flex; justify-content: space-between; padding: 3px 4px 0; padding: 1cqw 1.4cqw 0;
  font-size: 7px; font-size: 2.3cqw; color: #8d8e98;
}
/* 主役がまだ入れていない所は、点線の枠で「ここに入る」と見せる */
.dc-photo.todo, .dc-band.todo, .dc-msg.todo {
  display: grid; place-items: center; color: #a3a4ae; background: #fff; border: 1.5px dashed #c6c7cf;
}
.dc-photo.todo { font-size: 12px; font-size: 4cqw; font-weight: 700; }
.dc-band.todo { place-items: start; font-weight: 700; }
.dc-stamp {
  position: absolute; top: 8%; right: -4%; padding: 3px 10px; padding: 0.8cqw 3cqw;
  font-size: 13px; font-size: 4.4cqw; font-weight: 800; letter-spacing: 0.12em; color: #8a8b96;
  background: rgba(255, 255, 255, 0.92); border: 2px solid #8a8b96; border-width: 0.7cqw; border-radius: 1.8cqw;
  transform: rotate(12deg); box-shadow: var(--shadow-soft);
}
/* 確認の一覧。押すと、その項目を直す画面へ */
.review { display: grid; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-soft); overflow: hidden; }
.review-row {
  display: grid; grid-template-columns: 5.8em 1fr auto; gap: 10px; align-items: start; width: 100%;
  padding: 12px 14px; background: #fff; color: var(--ink); text-align: left; font-weight: 400;
  border-bottom: 1px solid var(--line); border-radius: 0;
}
.review-row:last-child { border-bottom: 0; }
.review-row:active { transform: none; background: #fff3ee; }
.review-row.need { background: #fff4f5; }
.review-label { color: var(--muted); font-size: 12px; font-weight: 700; padding-top: 2px; }
.review-value {
  font-size: 14px; white-space: pre-wrap; word-break: break-word; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
}
.review-value.empty { color: #c3b8bd; }
.review-row.need .review-value { color: var(--danger); font-weight: 700; }
.review-edit { font-size: 13px; opacity: 0.55; }

/* 書き出し */
.celebrate { text-align: center; margin-top: 18px; }
.loading { color: var(--muted); }

/* 下に出て消えるお知らせ */
.toast {
  position: fixed; left: 50%; bottom: calc(110px + env(safe-area-inset-bottom)); z-index: 20;
  transform: translateX(-50%); max-width: calc(100vw - 40px);
  background: rgba(45, 42, 50, 0.92); color: #fff; font-size: 14px; font-weight: 700;
  padding: 10px 18px; border-radius: 999px; box-shadow: var(--shadow-soft);
  animation: toast-in 0.25s var(--ease); transition: opacity 0.4s, transform 0.4s;
}
.toast.out { opacity: 0; transform: translate(-50%, 10px); }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 12px); } }

/* 紙吹雪 */
.confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 30; }
.confetti span { position: absolute; top: -48px; animation-name: fall; animation-timing-function: linear; animation-fill-mode: forwards; }
@keyframes fall { to { transform: translateY(115vh) rotate(600deg); } }

/* 動きを減らす設定の人には、アニメーションを出さない */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
}

/* 制作中のカード（wd）：ウェディングデュエルのカードに似せた形。黒い縁、黒い線の枠、赤と紺の攻守（攻守の色はどのカードも同じ）。
   属性の色は付けず、中は色の無い銀にする（その色でできあがると思われないように）。
   設定 card_preview を draft にすると、白とグレーだけの形に戻る */
.draft-card.wd { background: #16161a; border-radius: 12px; color: #2a2a30; }
.draft-card.wd .dc-body { background: #e4e5ea; border-radius: 6px; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.55); }
.draft-card.wd .dc-level { background: #fff; border-color: #16161a; }
.draft-card.wd .dc-level small, .draft-card.wd .dc-level b { color: #16161a; }
.draft-card.wd .dc-title { color: #16161a; background: #fff; border: 2px solid #16161a; border-width: 0.8cqw; border-radius: 1cqw; }
.draft-card.wd .dc-kind { margin-top: -1.8cqw; color: #fff; background: #16161a; border-radius: 0 0 1.4cqw 1.4cqw; }
.draft-card.wd .dc-photo { border-color: #fff; box-shadow: 0 0 0 2px #16161a; box-shadow: 0 0 0 0.6cqw #16161a; border-radius: 0.6cqw; }
.draft-card.wd .dc-band { background: #45464f; border-radius: 0.6cqw; }
.draft-card.wd .dc-ability { color: #6c6d78; background: #fff; border: 1.5px solid #16161a; border-width: 0.5cqw; border-radius: 0.8cqw; }
.draft-card.wd .dc-ability b { color: #16161a; }
.draft-card.wd .dc-msg { color: #3a3b43; background: #fff; border: 1.5px solid #b7b8c2; border-width: 0.5cqw; border-radius: 1.8cqw; }
.draft-card.wd .dc-msg-head { color: #16161a; }
.draft-card.wd .dc-stats span { background: #c62828; border-radius: 0.6cqw; }
.draft-card.wd .dc-stats span + span { background: #1f3a8a; }
.draft-card.wd .dc-foot { color: #e6e6ea; }
.draft-card.wd .dc-photo.todo, .draft-card.wd .dc-band.todo, .draft-card.wd .dc-msg.todo {
  color: #9a9ba6; background: #fff; border: 1.5px dashed #9a9ba6; box-shadow: none;
}
.draft-card.wd .dc-stamp { color: #d23c3c; border-color: #d23c3c; }
