:root { --line:#999; --ink:#222; --muted:#777; --accent:#3b6; }
* { box-sizing:border-box; }
body { font-family:system-ui,-apple-system,'Hiragino Sans','Noto Sans JP',sans-serif; color:var(--ink); max-width:430px; margin:0 auto; padding:12px; background:#eee; }
.phone { background:#fff; border:1px solid var(--line); border-radius:16px; padding:14px; min-height:600px; position:relative; }
.course { font-size:.82rem; color:var(--muted); border-bottom:1px dashed var(--line); padding-bottom:6px; margin-bottom:10px; }
.hidden { display:none !important; }
.muted { color:var(--muted); font-size:.85rem; }
.note { font-size:.7rem; color:var(--muted); margin-top:10px; line-height:1.55; }
.errmsg { color:#b3261e; font-size:.95rem; line-height:1.6; }
.btnrow { display:flex; gap:8px; margin-top:10px; }
button.primary { flex:1; padding:13px; font-size:1rem; border:0; border-radius:10px; background:var(--accent); color:#fff; cursor:pointer; }
button.sub { padding:13px 16px; border:1px solid var(--line); background:#fff; border-radius:10px; cursor:pointer; }

/* deck */
.stack { position:relative; height:210px; margin:16px 0 6px; }
.card-bg { position:absolute; left:50%; transform:translateX(-50%); width:78%; height:184px; border:1px solid var(--line); border-radius:14px; background:#fafafa; }
.card-bg.b1{ top:16px; } .card-bg.b2{ top:9px; } .card-bg.b3{ top:2px; background:#fff; }
.cover { display:flex; flex-direction:column; justify-content:center; align-items:center; text-align:center; padding:16px; cursor:pointer; }
.cover-title { font-weight:700; font-size:1.08rem; line-height:1.55; }
.cover-desc { font-size:.82rem; color:#555; margin-top:8px; line-height:1.5; }
.cover-sub { color:var(--muted); font-size:.72rem; margin-top:10px; }
/* 利用方法（カードを引くボタンの下・カード表示中も継続表示） */
.instruction { white-space:pre-line; font-size:.82rem; line-height:1.7; color:#555; background:#faf8f3; border:1px solid #ece6da; border-radius:10px; padding:12px 14px; margin-top:14px; }
.cover-count { position:absolute; left:0; right:0; bottom:10px; text-align:center; color:var(--muted); font-size:.72rem; }
.deckwrap { position:relative; }
.deckarrow { position:absolute; top:50%; transform:translateY(-50%); width:26px; height:118px; border:1px solid var(--line); background:rgba(255,255,255,.85); border-radius:8px; font-size:1.3rem; color:var(--muted); cursor:pointer; z-index:3; display:flex; align-items:center; justify-content:center; padding:0; }
.deckarrow.l { left:0; } .deckarrow.r { right:0; }
.count { text-align:center; color:var(--muted); font-size:.8rem; margin:6px 0; }
.scene { perspective:1000px; height:210px; margin:6px 0; }
.card { position:relative; width:84%; height:194px; margin:0 auto; transform-style:preserve-3d; transition:transform .45s; cursor:pointer; }
.card.flipped { transform:rotateY(180deg); }
.face { position:absolute; inset:0; backface-visibility:hidden; border:1.5px solid var(--ink); border-radius:16px; padding:18px; display:flex; flex-direction:column; justify-content:center; align-items:center; text-align:center; background:#fff; }
.face.back { transform:rotateY(180deg); background:#fbfbf3; }
.q { font-size:1.05rem; line-height:1.65; }
.tag { position:absolute; top:10px; left:10px; font-size:.64rem; padding:2px 9px; border-radius:10px; background:#e8e8e8; color:#555; }
.fliphint { position:absolute; bottom:9px; right:11px; font-size:.64rem; color:var(--muted); }
