/* 名刺サイトの入力フォーム（トヨタカローラ山口） */
:root {
  --bg: #FBF8F5; --surface: #FFFFFF; --panel: #F6EEE7; --ink: #2E2622; --sub: #776A62; --muted: #A2958C; --line: #EEE3DA;
  --tf: #F07A2B; --tf-deep: #C2501A; --tf-soft: #FDEADB; --on-tf: #FFFFFF; --or: #D7262E; --ok: #2E9E6A; --ok-soft: #E3F4EB;
  --shadow: 0 10px 30px rgba(46, 38, 34, .10);
  --r: 18px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1A1512; --surface: #231C18; --panel: #2C231E; --ink: #F1E9E4; --sub: #B9AAA0; --muted: #8C7E75; --line: #3A2F29;
    --tf: #E8762E; --tf-deep: #FFA36A; --tf-soft: #3A2417; --or: #F0444B; --ok: #4CC38A; --ok-soft: #173126;
    --shadow: 0 10px 30px rgba(0, 0, 0, .4);
  }
}
:root[data-theme="dark"] {
  --bg: #1A1512; --surface: #231C18; --panel: #2C231E; --ink: #F1E9E4; --sub: #B9AAA0; --muted: #8C7E75; --line: #3A2F29;
  --tf: #E8762E; --tf-deep: #FFA36A; --tf-soft: #3A2417; --or: #F0444B; --ok: #4CC38A; --ok-soft: #173126;
  --shadow: 0 10px 30px rgba(0, 0, 0, .4);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 500 16px/1.7 "Plus Jakarta Sans", "Zen Kaku Gothic New", system-ui, sans-serif;
  font-feature-settings: "palt";
  min-height: 100dvh;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
img { max-width: 100%; display: block; }
.boot { text-align: center; color: var(--sub); padding: 40vh 0 0; }

/* ---------------------------------------------------------------- 全体の配置 */
.app { max-width: 1120px; margin: 0 auto; }
.shell { display: grid; grid-template-columns: 1fr; min-height: 100dvh; }
.main { display: flex; flex-direction: column; min-height: 100dvh; padding: 0 16px calc(150px + env(safe-area-inset-bottom, 0px)); max-width: 560px; width: 100%; margin: 0 auto; }
@media (min-width: 960px) {
  .shell { grid-template-columns: minmax(0, 1fr) 420px; gap: 32px; padding: 0 24px; }
  .main { padding-bottom: 120px; margin: 0; max-width: 600px; justify-self: end; }
}

/* ---------------------------------------------------------------- 上：進み具合 */
.top { position: sticky; top: 0; z-index: 20; background: linear-gradient(var(--bg) 78%, transparent); padding: calc(10px + env(safe-area-inset-top, 0px)) 0 14px; }
.toprow { display: flex; align-items: center; gap: 10px; }
.brandmark { height: 22px; width: auto; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brandmark { filter: brightness(0) invert(1) opacity(.85); } }
.count { margin-left: auto; font: 700 12px/1 "Plus Jakarta Sans", sans-serif; color: var(--sub); letter-spacing: .06em; }
.count b { color: var(--tf-deep); font-size: 15px; }
.bar { height: 8px; background: var(--panel); border-radius: 99px; margin-top: 10px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--tf), #FFB15C); border-radius: inherit; transition: width .5s cubic-bezier(.3, 1.4, .5, 1); }
.dots { display: flex; gap: 4px; margin-top: 8px; flex-wrap: wrap; }
.dots button { border: 0; background: var(--panel); color: var(--muted); font: 700 10px/1 sans-serif; height: 20px; min-width: 20px; padding: 0 6px; border-radius: 99px; }
.dots button.done { background: var(--tf-soft); color: var(--tf-deep); }
.dots button.now { background: var(--tf); color: #fff; }
.dots button.flag { background: var(--or); color: #fff; }

/* ---------------------------------------------------------------- トヨタカくんの案内 */
.guide { display: flex; align-items: flex-end; gap: 10px; margin: 6px 0 12px; min-height: 92px; }
.tk { position: relative; width: 84px; height: 84px; flex: none; border: 0; background: none; padding: 0; }
.tk img { width: 100%; height: 100%; object-fit: contain; transform-origin: 50% 100%; animation: bob 2.6s ease-in-out infinite; filter: drop-shadow(0 6px 8px rgba(194, 80, 26, .18)); }
.tk.hop img { animation: hop .7s cubic-bezier(.3, 1.6, .5, 1) 1, bob 2.6s ease-in-out .7s infinite; }
.tk.wiggle img { animation: wiggle .6s ease-in-out 1, bob 2.6s ease-in-out .6s infinite; }
.tk::after { content: ""; position: absolute; left: 18%; right: 18%; bottom: -2px; height: 8px; background: radial-gradient(closest-side, rgba(46, 38, 34, .16), transparent); z-index: -1; animation: shadow 2.6s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-5px) rotate(1.5deg); } }
@keyframes shadow { 0%, 100% { transform: scaleX(1); opacity: 1; } 50% { transform: scaleX(.8); opacity: .6; } }
@keyframes hop { 0% { transform: translateY(0) scale(1, 1); } 20% { transform: translateY(0) scale(1.12, .86); } 50% { transform: translateY(-26px) scale(.94, 1.08); } 80% { transform: translateY(0) scale(1.06, .94); } 100% { transform: none; } }
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-9deg); } 75% { transform: rotate(9deg); } }
.say { position: relative; flex: 1; background: var(--surface); border: 2px solid var(--tf-soft); border-radius: 18px 18px 18px 6px; padding: 10px 14px; font-weight: 700; font-size: 15px; line-height: 1.55; box-shadow: var(--shadow); margin-bottom: 18px; }
.say::before { content: ""; position: absolute; left: -10px; bottom: 10px; border: 8px solid transparent; border-right-color: var(--tf-soft); border-left: 0; }
.say.pop { animation: pop .35s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes pop { from { transform: scale(.85); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------------------------------------------------------------- 質問 */
.step { animation: slidein .35s cubic-bezier(.2, .8, .3, 1); }
.step.back { animation-name: slideback; }
@keyframes slidein { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes slideback { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }
.q { font: 800 22px/1.45 "Zen Kaku Gothic New", sans-serif; margin: 4px 0 6px; letter-spacing: .01em; }
.q small { display: inline-block; font-size: 11px; font-weight: 700; vertical-align: 3px; margin-left: 6px; padding: 3px 8px; border-radius: 99px; background: var(--tf); color: #fff; letter-spacing: .06em; }
.q small.opt { background: var(--panel); color: var(--sub); }
.hint { color: var(--sub); font-size: 14px; margin: 0 0 14px; }
.hint b { color: var(--ink); }
.field { margin: 0 0 18px; }
.field > label, .lab { display: block; font-weight: 700; font-size: 14px; margin: 0 0 6px; }
.lab .opt { color: var(--muted); font-weight: 500; font-size: 12px; margin-left: 4px; }
.in { width: 100%; height: 54px; padding: 0 16px; font-size: 17px; border: 2px solid var(--line); border-radius: 14px; background: var(--surface); outline: none; transition: border-color .2s, box-shadow .2s; }
textarea.in { height: auto; min-height: 92px; padding: 12px 16px; line-height: 1.6; resize: vertical; }
.in:focus { border-color: var(--tf); box-shadow: 0 0 0 4px var(--tf-soft); }
.in::placeholder { color: var(--muted); }
select.in { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--sub) 50%), linear-gradient(-45deg, transparent 50%, var(--sub) 50%); background-position: right 22px center, right 16px center; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; }
.sub { font-size: 13px; color: var(--sub); margin-top: 6px; }
.sub .ok { color: var(--ok); font-weight: 700; }
.sub .warn { color: var(--or); font-weight: 700; }
.linkbtn { border: 0; background: none; color: var(--tf-deep); font-weight: 700; font-size: 13px; padding: 4px 0; text-decoration: underline; text-underline-offset: 3px; }
.flagbox { background: #FFF0EE; border: 2px solid var(--or); color: #8A1A1F; border-radius: 14px; padding: 10px 14px; margin: 0 0 16px; font-size: 14px; font-weight: 700; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .flagbox { background: #3A1A1B; color: #FFC9CB; } }

/* 大きい選択カード */
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 16px; }
.cards.one { grid-template-columns: 1fr; }
.pick { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; min-height: 74px; padding: 12px 14px; border: 2px solid var(--line); border-radius: var(--r); background: var(--surface); transition: transform .15s, border-color .2s, background .2s; }
.pick:active { transform: scale(.97); }
.pick .em { font-size: 24px; line-height: 1.1; }
.pick .tt { font-weight: 800; font-size: 15px; line-height: 1.35; }
.pick .ds { font-size: 12px; color: var(--sub); line-height: 1.45; }
.pick.on { border-color: var(--tf); background: var(--tf-soft); }
.pick.on::after { content: "✓"; position: absolute; top: 8px; right: 10px; width: 22px; height: 22px; border-radius: 50%; background: var(--tf); color: #fff; font: 800 13px/22px sans-serif; text-align: center; animation: pop .3s cubic-bezier(.3, 1.6, .5, 1); }
.pick.reco { border-style: dashed; }
.pick .badge { font-size: 10px; font-weight: 800; background: var(--or); color: #fff; padding: 2px 8px; border-radius: 99px; margin-bottom: 4px; letter-spacing: .06em; }
.cards.row .pick { flex-direction: row; align-items: center; gap: 12px; }

/* 札 */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.chip { border: 2px solid var(--line); background: var(--surface); border-radius: 99px; padding: 8px 14px; font-size: 14px; font-weight: 700; line-height: 1.3; transition: transform .15s, background .2s, border-color .2s; }
.chip:active { transform: scale(.94); }
.chip.on { background: var(--tf); border-color: var(--tf); color: #fff; animation: chipon .3s cubic-bezier(.3, 1.6, .5, 1); }
.chip.mine { border-style: dashed; }
.chip .x { margin-left: 6px; opacity: .8; }
@keyframes chipon { 0% { transform: scale(.9); } 60% { transform: scale(1.08); } 100% { transform: none; } }
.chips.small .chip { font-size: 13px; padding: 6px 12px; }
.meter { display: flex; align-items: center; gap: 10px; margin: 2px 0 14px; font-size: 13px; font-weight: 700; color: var(--sub); }
.meter .pips { display: flex; gap: 4px; }
.meter .pips i { width: 18px; height: 8px; border-radius: 99px; background: var(--panel); transition: background .3s; }
.meter .pips i.on { background: var(--tf); }
.meter.good { color: var(--ok); }
.meter.good .pips i.on { background: var(--ok); }
.addrow { display: flex; gap: 8px; }
.addrow .in { flex: 1; height: 48px; font-size: 16px; }
.addrow button { flex: none; height: 48px; padding: 0 16px; border: 0; border-radius: 14px; background: var(--ink); color: var(--bg); font-weight: 800; }

/* 数を足す・引く */
.stepper { display: inline-flex; align-items: center; gap: 0; border: 2px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; }
.stepper button { width: 52px; height: 52px; border: 0; background: none; font-size: 24px; font-weight: 700; color: var(--tf-deep); }
.stepper output { min-width: 96px; text-align: center; font: 800 18px/1 "Plus Jakarta Sans", sans-serif; }
.stepper output small { font-size: 12px; color: var(--sub); margin-left: 2px; }

/* 写真 */
.photo { display: grid; grid-template-columns: 132px 1fr; gap: 14px; align-items: center; margin: 0 0 14px; }
.ph { position: relative; width: 132px; height: 132px; border-radius: 50%; overflow: hidden; background: var(--panel); border: 3px solid var(--surface); box-shadow: 0 0 0 3px var(--tf), var(--shadow); touch-action: none; }
.ph canvas, .ph img { width: 100%; height: 100%; object-fit: cover; }
.ph .empty { position: absolute; inset: 0; display: grid; place-items: center; font-size: 40px; color: var(--muted); }
.ph .drag { position: absolute; left: 0; right: 0; bottom: 6px; text-align: center; font-size: 10px; font-weight: 800; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); pointer-events: none; }
.photo-btns { display: grid; gap: 8px; }
.btn-file { position: relative; display: flex; align-items: center; justify-content: center; gap: 6px; height: 48px; border-radius: 14px; border: 2px solid var(--tf); color: var(--tf-deep); font-weight: 800; background: var(--surface); font-size: 15px; }
.btn-file.primary { background: var(--tf); color: #fff; }
.btn-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.why { background: var(--panel); border-radius: var(--r); padding: 14px 16px; margin: 0 0 16px; font-size: 14px; }
.why h3 { margin: 0 0 6px; font-size: 15px; }
.why ul { margin: 0; padding-left: 1.2em; }
.why li { margin: 2px 0; }
.tips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 0 0 16px; }
.tips div { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px 4px; text-align: center; font-size: 11px; font-weight: 700; line-height: 1.35; }
.tips div span { display: block; font-size: 20px; margin-bottom: 2px; }

/* 開いたり閉じたりの説明 */
details.how { background: var(--surface); border: 2px solid var(--line); border-radius: 14px; padding: 0 14px; margin: 8px 0 16px; }
details.how summary { list-style: none; padding: 12px 0; font-weight: 800; font-size: 14px; color: var(--tf-deep); cursor: pointer; }
details.how summary::-webkit-details-marker { display: none; }
details.how summary::before { content: "＋ "; }
details.how[open] summary::before { content: "－ "; }
details.how ol { margin: 0 0 12px; padding-left: 1.3em; font-size: 14px; }
details.how li { margin: 4px 0; }
details.how li b { background: var(--tf-soft); padding: 0 4px; border-radius: 4px; }

/* スイッチ */
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 2px solid var(--line); border-radius: 14px; background: var(--surface); margin: 0 0 10px; }
.toggle .tt { font-weight: 700; font-size: 15px; }
.toggle .ds { font-size: 12px; color: var(--sub); }
.sw { position: relative; width: 52px; height: 32px; flex: none; border-radius: 99px; border: 0; background: var(--line); transition: background .2s; }
.sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); transition: transform .25s cubic-bezier(.3, 1.5, .5, 1); }
.sw[aria-checked="true"] { background: var(--tf); }
.sw[aria-checked="true"]::after { transform: translateX(20px); }

/* 同意 */
.agree { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 2px solid var(--line); border-radius: var(--r); background: var(--surface); text-align: left; width: 100%; font-size: 14px; font-weight: 700; }
.agree .box { flex: none; width: 28px; height: 28px; border-radius: 8px; border: 2px solid var(--muted); display: grid; place-items: center; color: #fff; font-weight: 900; transition: background .2s, border-color .2s; }
.agree.on { border-color: var(--tf); background: var(--tf-soft); }
.agree.on .box { background: var(--tf); border-color: var(--tf); }

/* まとめ */
.review { display: grid; gap: 8px; margin: 0 0 16px; }
.rv { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; text-align: left; padding: 12px 14px; border: 2px solid var(--line); border-radius: 14px; background: var(--surface); }
.rv .k { font-size: 12px; font-weight: 700; color: var(--sub); }
.rv .v { grid-column: 1; font-weight: 700; font-size: 14px; line-height: 1.5; word-break: break-all; }
.rv .v.none { color: var(--muted); font-weight: 500; }
.rv .go { grid-row: 1 / span 2; grid-column: 2; font-size: 12px; font-weight: 800; color: var(--tf-deep); }
.rv.flag { border-color: var(--or); }
.rv.flag .k::after { content: " ⚠ 直してほしいところ"; color: var(--or); }

/* ---------------------------------------------------------------- 下：もどる・つぎへ */
.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 10px 16px calc(12px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(transparent, var(--bg) 30%); }
.nav-in { max-width: 560px; margin: 0 auto; display: flex; gap: 10px; align-items: center; }
@media (min-width: 960px) { .nav { right: auto; left: max(24px, calc((100vw - 1120px) / 2 + 24px)); width: min(600px, calc(100vw - 500px)); } .nav-in { max-width: none; } }
.btn { height: 56px; border-radius: 16px; border: 0; font-weight: 800; font-size: 17px; padding: 0 20px; transition: transform .12s, opacity .2s; }
.btn:active { transform: scale(.97); }
.btn.go { flex: 1; background: var(--tf); color: #fff; box-shadow: 0 8px 20px rgba(240, 122, 43, .35); }
.btn.go[disabled] { opacity: .45; box-shadow: none; }
.btn.ghost { background: var(--surface); border: 2px solid var(--line); color: var(--sub); padding: 0 16px; }
.btn.skip { background: none; color: var(--sub); font-size: 14px; padding: 0 8px; text-decoration: underline; text-underline-offset: 3px; }
.btn.send { background: linear-gradient(90deg, var(--tf), var(--or)); }
.err { color: var(--or); font-weight: 700; font-size: 14px; margin: 8px 0 0; min-height: 1em; }

/* ---------------------------------------------------------------- 仕上がりイメージ（小さい画面） */
.peek { position: fixed; right: 12px; bottom: calc(86px + env(safe-area-inset-bottom, 0px)); z-index: 25; width: 112px; border: 0; padding: 0; background: none; text-align: center; }
.peek .scr { position: relative; display: block; width: 112px; height: 196px; border-radius: 16px; overflow: hidden; background: var(--bg); border: 3px solid var(--ink); box-shadow: var(--shadow); }
.peek .scr::before { content: ""; position: absolute; top: 4px; left: 50%; width: 30px; height: 4px; margin-left: -15px; border-radius: 9px; background: var(--ink); z-index: 2; opacity: .8; }
.peek iframe { position: absolute; top: 0; left: 0; width: 390px; height: 683px; border: 0; transform: scale(.2718); transform-origin: 0 0; pointer-events: none; background: var(--bg); }
.peek .lbl { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; font-size: 11px; font-weight: 800; background: var(--ink); color: var(--bg); padding: 4px 9px; border-radius: 99px; }
.peek .lbl i { width: 7px; height: 7px; border-radius: 50%; background: #3BD27F; box-shadow: 0 0 0 0 rgba(59, 210, 127, .6); animation: live 1.8s infinite; }
@keyframes live { 70% { box-shadow: 0 0 0 7px rgba(59, 210, 127, 0); } 100% { box-shadow: 0 0 0 0 rgba(59, 210, 127, 0); } }
.peek.bump .scr { animation: bump .5s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes bump { 40% { transform: scale(1.06) rotate(-2deg); } }
.peek iframe.next { visibility: hidden; }
.peek.hide { display: none; }

/* 大きく見る */
.sheet { position: fixed; inset: 0; z-index: 60; background: rgba(20, 14, 10, .55); display: flex; align-items: flex-end; justify-content: center; animation: fade .2s; }
.sheet[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } }
.sheet-in { position: relative; width: 100%; max-width: 440px; height: 92dvh; background: var(--bg); border-radius: 22px 22px 0 0; overflow: hidden; animation: up .35s cubic-bezier(.2, .9, .3, 1); display: flex; flex-direction: column; }
@keyframes up { from { transform: translateY(40%); } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--line); font-weight: 800; font-size: 14px; }
.sheet-head button { border: 0; background: var(--panel); border-radius: 99px; height: 36px; padding: 0 14px; font-weight: 800; }
.sheet iframe { flex: 1; width: 100%; border: 0; background: var(--bg); }

/* パソコンでは横にずっと出す */
.side { display: none; }
@media (min-width: 960px) {
  .peek { display: none; }
  .side { display: block; position: sticky; top: 20px; align-self: start; margin-top: 20px; }
  .side .phone { width: 390px; height: calc(100dvh - 90px); max-height: 800px; border-radius: 36px; border: 10px solid var(--ink); overflow: hidden; background: var(--bg); box-shadow: var(--shadow); position: relative; }
  .side .phone iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
  .side .phone iframe.next { visibility: hidden; }
  .side .cap { text-align: center; font-size: 12px; font-weight: 800; color: var(--sub); margin-top: 10px; }
}

/* ---------------------------------------------------------------- 送ったあと */
.done { text-align: center; padding-top: 10px; }
.done .big { width: 150px; margin: 0 auto 8px; animation: hop .8s cubic-bezier(.3, 1.6, .5, 1) 2; }
.done h2 { font: 800 24px/1.4 "Zen Kaku Gothic New", sans-serif; margin: 0 0 8px; }
.done p { color: var(--sub); font-size: 14px; margin: 0 0 16px; }
.keep { background: var(--surface); border: 2px solid var(--tf); border-radius: var(--r); padding: 16px; text-align: left; margin: 0 0 14px; }
.keep h3 { margin: 0 0 6px; font-size: 16px; }
.keep p { color: var(--sub); text-align: left; margin: 0 0 12px; }
.keep .url { font: 600 12px/1.5 ui-monospace, monospace; background: var(--panel); padding: 8px 10px; border-radius: 10px; word-break: break-all; margin: 0 0 10px; }
.keep .acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.keep .acts a, .keep .acts button { display: flex; align-items: center; justify-content: center; gap: 6px; height: 48px; border-radius: 14px; font-weight: 800; font-size: 14px; text-decoration: none; border: 0; }
.keep .acts .line { background: #06C755; color: #fff; }
.keep .acts .copy { background: var(--ink); color: var(--bg); }
.keep .acts .mail { background: var(--panel); color: var(--ink); grid-column: 1 / -1; }
.nextlist { text-align: left; background: var(--panel); border-radius: var(--r); padding: 14px 16px; font-size: 14px; }
.nextlist ol { margin: 0; padding-left: 1.3em; }
.fx { position: fixed; inset: 0; pointer-events: none; z-index: 80; width: 100vw; height: 100vh; }

/* 状態のお知らせ（直すページ） */
.notice { border-radius: var(--r); padding: 14px 16px; margin: 0 0 14px; font-size: 14px; }
.notice h3 { margin: 0 0 4px; font-size: 15px; }
.notice.returned { background: #FFF0EE; border: 2px solid var(--or); }
.notice.review { background: var(--tf-soft); }
.notice.live { background: var(--ok-soft); }
.notice.stopped { background: var(--panel); }
.notice .memo { white-space: pre-wrap; background: var(--surface); border-radius: 10px; padding: 8px 10px; margin-top: 8px; font-weight: 700; }
.notice .rs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.notice .rs span { font-size: 12px; font-weight: 800; padding: 3px 10px; border-radius: 99px; background: var(--or); color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .notice.returned { background: #3A1A1B; } }

.toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 90; background: var(--ink); color: var(--bg); font-weight: 800; font-size: 14px; padding: 10px 18px; border-radius: 99px; box-shadow: var(--shadow); animation: pop .3s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
#sheetbody { position: relative; }
.sheet iframe.next { position: absolute; inset: 0; visibility: hidden; }

/* 小さい画面は、変わった瞬間だけ飛び出して、少したったら札（ラベル）だけにたたむ */
.peek .scr { transform-origin: 100% 100%; transition: transform .4s cubic-bezier(.3, 1.4, .5, 1), opacity .25s; }
.peek.mini .scr { transform: scale(.25) translateY(40px); opacity: 0; pointer-events: none; }
.peek.mini .lbl { box-shadow: var(--shadow); }
.peek .lbl b { font-weight: 800; }
.peek.mini { width: auto; }
.dots { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.dots::-webkit-scrollbar { display: none; }
.dots button { flex: none; }
.dots:empty { display: none; }

/* ---------------------------------------------------------------- 2026-10 直し */
.main { padding-bottom: calc(200px + env(safe-area-inset-bottom, 0px)); }
.peek { display: none !important; }
.nav-in { flex-direction: column; align-items: stretch; gap: 8px; }
.navrow { display: flex; gap: 10px; align-items: center; }
.btn.back { background: var(--surface); border: 2px solid var(--ink); color: var(--ink); padding: 0 16px; font-size: 15px; flex: none; }
.btn.go { flex: 1; }

/* できあがりを見るボタン */
.viewbtn { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 8px 14px 8px 8px; border-radius: 16px; border: 2px solid var(--tf); background: var(--surface); box-shadow: var(--shadow); transition: transform .15s; }
.viewbtn[hidden] { display: none; }
.viewbtn:active { transform: scale(.98); }
.vthumb { position: relative; flex: none; width: 40px; height: 66px; border-radius: 7px; overflow: hidden; border: 2px solid var(--ink); background: var(--bg); }
.vthumb iframe { position: absolute; top: 0; left: 0; width: 390px; height: 643px; border: 0; transform: scale(.0923); transform-origin: 0 0; pointer-events: none; }
.vthumb iframe.next { visibility: hidden; }
.vt { flex: 1; min-width: 0; }
.vt b { display: block; font-size: 15px; font-weight: 800; color: var(--tf-deep); }
.vt small { display: block; font-size: 12px; color: var(--sub); font-weight: 700; }
.vgo { font-size: 26px; font-weight: 800; color: var(--tf); }
.viewbtn.flash { animation: vflash 1s ease-out; }
.viewbtn.flash .vt small { color: var(--ok); }
@keyframes vflash { 0% { box-shadow: 0 0 0 0 rgba(240, 122, 43, .7); transform: scale(1.03); } 100% { box-shadow: 0 0 0 16px rgba(240, 122, 43, 0); transform: none; } }
@media (min-width: 960px) { .viewbtn { display: none; } .main { padding-bottom: 120px; } }

/* 大きく見る画面：とじるを大きく */
.sheet-foot { padding: 10px 14px calc(12px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); }
.sheet-foot button { width: 100%; height: 52px; border-radius: 14px; border: 0; background: var(--ink); color: var(--bg); font-weight: 800; font-size: 16px; }

/* 名前：姓・名を横にならべる */
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* 最初のページ：目的 */
.purpose { background: var(--surface); border: 2px solid var(--tf-soft); border-radius: var(--r); padding: 14px; margin: 6px 0 12px; box-shadow: var(--shadow); }
.purpose .pt { margin: 0 0 8px; font-size: 12px; font-weight: 800; color: var(--tf-deep); letter-spacing: .08em; }
.pmain, .psub { display: flex; gap: 12px; align-items: flex-start; }
.pmain { margin-bottom: 10px; }
.pe { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; background: var(--tf-soft); }
.psub .pe { width: 34px; height: 34px; font-size: 17px; background: var(--panel); }
.pmain b { display: block; font-size: 17px; line-height: 1.4; }
.psub b { display: block; font-size: 14px; line-height: 1.4; }
.pmain span:not(.pe), .psub span:not(.pe) { display: block; font-size: 13px; color: var(--sub); line-height: 1.6; }
.psub span:not(.pe) { font-size: 12px; }
.easy { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 0 0 12px; }
.easy div { background: var(--panel); border-radius: 14px; padding: 10px 4px; text-align: center; font-size: 11px; font-weight: 800; line-height: 1.45; }
.easy span { display: block; font-size: 20px; margin-bottom: 2px; }

/* 似顔絵の見本（写真 → 似顔絵） */
.ba { display: grid; grid-template-columns: 1fr auto 1fr; gap: 6px; align-items: center; background: var(--surface); border: 2px solid var(--line); border-radius: var(--r); padding: 10px; margin: 0 0 12px; }
.ba figure { margin: 0; text-align: center; }
.ba img { width: 100%; max-width: 120px; height: 120px; object-fit: contain; margin: 0 auto; border-radius: 12px; background: var(--tf-soft); }
.ba img.ph0 { object-fit: cover; }
.ba figcaption { font-size: 11px; font-weight: 800; color: var(--sub); margin-top: 4px; }
.ba .arrow { font-size: 12px; font-weight: 800; color: var(--tf-deep); text-align: center; line-height: 1.3; }
.ba .arrow b { display: block; font-size: 22px; }

/* LINEの出し方（絵で） */
.lsteps { display: grid; grid-auto-flow: column; grid-auto-columns: 74%; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 10px; margin: 0 -2px 6px; scrollbar-width: none; }
.lsteps::-webkit-scrollbar { display: none; }
.ls { scroll-snap-align: start; background: var(--surface); border: 2px solid var(--line); border-radius: 18px; padding: 10px; }
.ls svg { width: 100%; height: auto; display: block; border-radius: 12px; background: #F4F6F5; }
.ls p { margin: 8px 2px 0; font-size: 13px; font-weight: 700; line-height: 1.5; }
.ls p i { font-style: normal; display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #06C755; color: #fff; font-size: 11px; margin-right: 4px; vertical-align: 1px; }
.lhint { font-size: 12px; color: var(--sub); margin: -2px 0 10px; }
.lbtns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 8px; }
.lbtns button, .lbtns label { position: relative; display: flex; align-items: center; justify-content: center; gap: 6px; height: 48px; border-radius: 14px; font-weight: 800; font-size: 14px; border: 2px solid #06C755; color: #05A548; background: var(--surface); text-align: center; line-height: 1.25; }
.lbtns label input { position: absolute; inset: 0; opacity: 0; }
.tapdot { animation: tapdot 1.4s ease-out infinite; transform-origin: center; transform-box: fill-box; }
@keyframes tapdot { 0% { opacity: .9; transform: scale(.6); } 70% { opacity: 0; transform: scale(1.6); } 100% { opacity: 0; } }

/* 最初のページ：見本の上半分をそのまま見せる */
.sc-cap { margin: 4px 0 6px; font-size: 13px; font-weight: 800; color: var(--tf-deep); }
.samplecard { position: relative; display: block; width: 100%; height: 400px; padding: 0; margin: 0 0 16px; border: 3px solid var(--ink); border-radius: 24px; overflow: hidden; background: var(--bg); box-shadow: var(--shadow); }
.sc-scr { position: absolute; inset: 0; }
.sc-scr iframe { position: absolute; top: 0; left: 0; width: 390px; height: 900px; border: 0; transform: scale(var(--k, .87)); transform-origin: 0 0; pointer-events: none; }
.sc-scr iframe.next { visibility: hidden; }
.sc-fade { position: absolute; left: 0; right: 0; bottom: 0; height: 120px; background: linear-gradient(transparent, var(--bg) 75%); pointer-events: none; }
.sc-lbl { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); white-space: nowrap; background: var(--tf); color: #fff; font-weight: 800; font-size: 14px; padding: 10px 18px; border-radius: 99px; box-shadow: 0 6px 16px rgba(240, 122, 43, .35); }
