/* 2026-11-22 実機（iPhone）の確認から直したところ。いちばん後に読むので、前のファイルの指定を上書きする */

/* ---- スクロール：画面全体・下のタブは動かない。ホームはスクロールしない（中身を画面に収める） ---- */
html, body { overflow: hidden; overscroll-behavior: none; position: fixed; inset: 0; width: 100%; height: 100%; }
#tabs { touch-action: none; overscroll-behavior: none; }
#main { overscroll-behavior: contain; }
#main:has(> .home) { overflow: hidden; padding-bottom: 0; }
#main > .home { height: 100%; min-height: 0; overflow: hidden; }

/* ---- 背景を動かす・画面の傾き（motion.js が #app に --tx・--ty を付ける。-1〜1） ---- */
#bgfx .bf-glow1 { translate: calc(var(--tx, 0) * 34px) calc(var(--ty, 0) * 34px); opacity: .7 !important; }
#bgfx .bf-glow2 { translate: calc(var(--tx, 0) * -28px) calc(var(--ty, 0) * -28px); opacity: .6 !important; }
#bgfx .bf-lines { display: block !important; translate: calc(var(--tx, 0) * 16px) calc(var(--ty, 0) * 16px); background: repeating-linear-gradient(115deg, rgba(255,255,255,.04) 0 2px, transparent 2px 44px) !important; animation: bflines 7s linear infinite !important; }
#bgfx .bf-word, #bgfx .bf-word2 { translate: calc(var(--tx, 0) * 22px) calc(var(--ty, 0) * 10px); }
#bgfx .bf-light { left: calc(50% + var(--tx, 0) * 40%); top: calc(32% + var(--ty, 0) * 30%); width: 140%; height: 80%; translate: -50% -50%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255,255,255,.10), rgba(212,255,30,.04) 55%, transparent); mix-blend-mode: screen; transition: left .25s linear, top .25s linear; }

/* ホームの背景（.hbg）：帯・縦の英字・点がゆっくり動き、光の筋が時々横切る */
.home .hbg .band, .home.mv-in .hbg .band { translate: calc(var(--tx, 0) * -12px) calc(var(--ty, 0) * -14px); animation: mvBand .4s var(--ez, ease-out) both, hbBand 6s .4s ease-in-out infinite alternate; }
.home .hbg .vtx { translate: calc(var(--tx, 0) * 18px) 0; animation: hbVtx 16s ease-in-out infinite alternate; }
.home .hbg .dots { translate: calc(var(--tx, 0) * -26px) calc(var(--ty, 0) * -26px); animation: hbDots 24s linear infinite; }
.home .hbg::after { content: ''; position: absolute; inset: -20% -60%; background: linear-gradient(105deg, transparent 42%, rgba(255,255,255,.09) 49%, rgba(212,255,30,.10) 51%, transparent 58%);
  translate: calc(var(--tx, 0) * 60px) 0; animation: hbSheen 5.5s ease-in-out infinite; pointer-events: none; }
@keyframes hbBand { from { transform: translateY(-10px) skewY(-1.5deg); } to { transform: translateY(14px) skewY(1.5deg); } }
@keyframes hbVtx { from { transform: translateY(-30px); } to { transform: translateY(40px); } }
@keyframes hbDots { to { transform: rotate(360deg); } }
@keyframes hbSheen { 0%, 55% { transform: translateX(-60%); } 100% { transform: translateX(60%); } }
html.calm .home .hbg *, html.calm .home .hbg::after, html.calm #bgfx .bf-light { animation: none !important; translate: none !important; }

/* ---- 管理者コマンド（設定のいちばん下） ---- */
.adm { display: flex; gap: 8px; }
.adm input { flex: 1; min-width: 0; background: #000; color: var(--wh); border: 2px solid var(--line); padding: 10px 12px; font: 700 1.1rem var(--en); letter-spacing: 6px; }
.adm input:focus { outline: none; border-color: var(--lime); }

/* ---- 単語のステージ一覧：50語なので点の代わりに進み具合の棒 ---- */
.lx-prog { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.lx-prog i { display: block; height: 4px; background: var(--lime); max-width: 100%; flex: none; }
.lx-prog::before { content: ''; order: 0; }
.lx-prog { position: relative; }
.lx-prog small { margin-left: auto; font-size: .62rem; color: var(--gr); font-weight: 700; }

/* ---- 単語の問題の画面（2026-11-22：どぱたん＋の形）。画面は動かさない ---- */
#main > .vq, #main > .vq.mv-in, .vq * { animation: none !important; }
.vq { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.vq .phead { flex: none; }
.vq-auto { margin-left: auto; border: 2px solid var(--line); padding: 6px 9px; font-size: .72rem; font-weight: 900; color: var(--gr); white-space: nowrap; }
.vq-auto.on { border-color: var(--lime); color: var(--lime); }
.vq-top { flex: none; display: flex; align-items: center; gap: 10px; padding: 0 16px 8px; }
.vq-top .vq-n { font: 1rem var(--en); color: var(--wh); min-width: 4.2em; }
.vq-top .pbar { flex: 1; margin: 0; }
.vq-top .pbar i { transition: none; }
.vq-card { flex: 1 1 auto; min-height: 0; margin: 4px 16px 12px; border: 2px solid var(--line); background: rgba(10,11,13,.85);
  display: grid; grid-template-rows: auto 1fr auto auto; align-items: center; justify-items: center; padding: 14px 14px 12px; text-align: center; }
.vq-dir { margin: 0; font-size: .78rem; color: var(--gr); font-weight: 700; letter-spacing: 1px; }
.vq-q { display: flex; align-items: center; justify-content: center; min-height: 3.2em; }
.vq-q .qw { font-family: var(--en); font-size: 3rem; line-height: 1.05; letter-spacing: .5px; color: var(--wh); font-weight: 400; word-break: break-word; }
.vq-q .qw.lg { font-size: 2.4rem; } .vq-q .qw.xl { font-size: 1.9rem; }
.vq-q .qw.ja { font-family: 'Noto Sans JP', sans-serif; font-weight: 900; font-size: 1.9rem; line-height: 1.3; }
.vq-listen { width: 96px; height: 96px; border-radius: 50%; border: 3px solid var(--lime); color: var(--lime); display: grid; place-items: center; }
.vq-sub { margin: 6px 0 0; min-height: 2.8em; font-size: .86rem; color: var(--gr); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vq-res { margin: 8px 0 0; min-height: 1.6em; font-size: .92rem; font-weight: 900; line-height: 1.4; }
.vq-res.ok { color: var(--lime); } .vq-res.ng { color: var(--or); }
.vq-opts { flex: none; display: flex; flex-direction: column; gap: 10px; padding: 0 16px; }
.vq-opt { min-height: 58px; background: #f4f4f0; color: #111; border: 0; text-align: left; padding: 10px 18px; font-size: 1.02rem; font-weight: 700; line-height: 1.35; }
.vq-opt.en { font-family: var(--en); font-size: 1.35rem; font-weight: 400; letter-spacing: .5px; }
.vq-opt.ok { background: var(--lime); color: #000; }
.vq-opt.ng { background: var(--or); color: #fff; }
.vq-opt.dim { opacity: .45; }
.vq-spell { display: flex; gap: 8px; }
.vq-spell input { flex: 1; min-width: 0; min-height: 58px; background: #f4f4f0; color: #111; border: 0; padding: 0 14px; font: 1.4rem var(--en); letter-spacing: 1px; }
.vq-spell input.ok { background: var(--lime); } .vq-spell input.ng { background: var(--or); color: #fff; font-size: 1.05rem; }
.vq-go { min-width: 84px; background: var(--lime); color: #000; font-weight: 900; }
.vq-hear { align-self: center; color: var(--gr); font-size: .82rem; padding: 6px 10px; display: inline-flex; align-items: center; gap: 4px; }
.vq-foot { flex: none; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
.vq-skip, .vq-next { width: 100%; min-height: 52px; font-weight: 900; font-size: 1rem; position: relative; overflow: hidden; }
.vq-skip { border: 2px solid var(--line); color: var(--gr); }
.vq-next { background: var(--lime); color: #000; }
.vq-next.auto::after { content: ''; position: absolute; left: 0; bottom: 0; height: 4px; background: rgba(0,0,0,.45); animation: anx var(--anx, 1.5s) linear forwards !important; }

/* ===== ガチャ（2026-11-22 どぱたん＋をまねて作り直し） ===== */
.gx{display:flex;flex-direction:column;gap:12px;padding:0 12px 16px;box-sizing:border-box;width:100%;overflow-x:hidden}
.gx .ttl{display:flex;align-items:baseline;gap:8px}
.gx .ga-q{margin-left:auto}
.gx-kv{position:relative;height:230px;border-radius:14px;overflow:hidden;background:#101216;border:2px solid #2a2d33}
.gx-kv>i{position:absolute;inset:0;pointer-events:none}
.gx-bg{background:radial-gradient(circle at 70% 40%,color-mix(in srgb,var(--c1) 45%,transparent),transparent 60%)}
.gx-st1{background:repeating-linear-gradient(-28deg,transparent 0 26px,rgba(212,255,30,.16) 26px 40px);animation:gxSt 14s linear infinite}
.gx-st2{background:linear-gradient(-28deg,transparent 58%,#ff5a1f 58% 63%,transparent 63% 66%,var(--lime) 66% 68%,transparent 68%)}
.gx-dots{background:radial-gradient(rgba(255,255,255,.18) 1.2px,transparent 1.6px) 0 0/9px 9px;mask:linear-gradient(90deg,#000,transparent 70%);-webkit-mask:linear-gradient(90deg,#000,transparent 70%)}
@keyframes gxSt{to{background-position:200px 0}}
.gx-c{position:absolute;bottom:-40%;height:150%;object-fit:contain;filter:drop-shadow(0 4px 10px rgba(0,0,0,.6));pointer-events:none}
.gx-c0{right:-6%;z-index:3}.gx-c1{right:26%;z-index:2;height:130%;bottom:-36%;filter:brightness(.8) drop-shadow(0 4px 10px rgba(0,0,0,.6))}.gx-c2{right:50%;z-index:1;height:120%;bottom:-34%;filter:brightness(.6)}
.gx-t{position:absolute;left:14px;top:14px;z-index:5;transform:skewX(-8deg)}
.gx-t b{display:block;font-family:Anton,sans-serif;font-size:40px;line-height:.92;color:#fff;text-shadow:3px 3px 0 #ff5a1f,0 0 18px rgba(0,0,0,.7);letter-spacing:.02em}
.gx-t span{display:inline-block;margin-top:6px;background:var(--lime);color:#0a0b0d;font-weight:900;font-size:12px;padding:2px 8px}
.gx-tag{position:absolute;left:14px;bottom:40px;z-index:5;margin:0;background:#0a0b0d;color:var(--lime);border:1px solid var(--lime);font-size:12px;font-weight:800;padding:2px 8px}
.gx-info{position:absolute;left:0;right:0;bottom:0;z-index:6;margin:0;background:rgba(10,11,13,.85);color:#ddd;font-size:11.5px;padding:6px 12px;border-top:1px solid #2a2d33}
.gx-row{display:flex;gap:10px;align-items:center;min-width:0}
.gx-pity{min-width:0}
.gx-stone{display:flex;align-items:center;gap:6px;background:#15171b;border:1px solid #2a2d33;border-radius:10px;padding:8px 12px}
.gx-stone>i{width:16px;height:16px;background:linear-gradient(135deg,#9ef,#58f 60%,#c8f);transform:rotate(45deg);border-radius:3px;box-shadow:0 0 8px #6af}
.gx-stone b{font-family:Anton,sans-serif;font-size:22px;color:#fff}.gx-stone small{color:#aaa;font-size:11px}
.gx-pity{flex:1;display:flex;flex-direction:column;gap:4px}
.gx-pity small{font-size:11px;color:#bbb}.gx-pity b{color:var(--lime)}
.gx-pity>i{display:block;height:7px;background:#22252a;border-radius:4px;overflow:hidden}.gx-pity>i>i{display:block;height:100%;background:linear-gradient(90deg,#ff5a1f,var(--lime))}
.gx-btns{display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px;padding:0 6px}
.gx-b{position:relative;height:64px;border:0;border-radius:10px;transform:skewX(-8deg);font:inherit;cursor:pointer;box-shadow:0 4px 0 rgba(0,0,0,.45)}
.gx-b>span{display:flex;flex-direction:column;align-items:center;transform:skewX(8deg)}
.gx-b b{font-size:19px;font-weight:900}.gx-b small{font-size:11px;font-weight:700;opacity:.8}
.gx-b1{background:#f4f4f4;color:#0a0b0d}.gx-b10{background:var(--lime);color:#0a0b0d}
.gx-b100{background:linear-gradient(110deg,#ff5a1f,#ffd21e,#5fe08a,#4fb4ff,#c06bff);background-size:200% 100%;color:#fff;text-shadow:0 1px 3px rgba(0,0,0,.6);animation:gxRb 4s linear infinite}
@keyframes gxRb{to{background-position:200% 0}}
.gx-b.off{filter:grayscale(1) brightness(.5)}
.gx-b:active{transform:skewX(-8deg) translateY(3px);box-shadow:0 1px 0 rgba(0,0,0,.45)}
.gx-own{margin:0;text-align:center;color:#999;font-size:12px}
/* 演出 */
.gx-fx{position:absolute;inset:0;z-index:60;background:#060708;display:flex;align-items:center;justify-content:center;overflow:hidden;color:#fff}
.gx-gate{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center}
.gx-band{position:absolute;left:0;right:0;top:0;height:36px;background:repeating-linear-gradient(-45deg,var(--lime) 0 14px,#0a0b0d 14px 28px)}
.gx-rec{position:absolute;top:50px;left:16px;font-family:Anton,sans-serif;font-size:14px;color:#ff5a1f;letter-spacing:.08em;animation:gxBl 1s steps(2) infinite}
@keyframes gxBl{50%{opacity:.25}}
.gx-glow{position:absolute;width:300px;height:300px;border-radius:50%;background:radial-gradient(circle,var(--gc) 0,color-mix(in srgb,var(--gc) 40%,transparent) 35%,transparent 70%);animation:gxGl 1.6s ease-in forwards}
.gx-ring{position:absolute;width:170px;height:170px;border-radius:50%;border:3px solid var(--gc);box-shadow:0 0 30px var(--gc),inset 0 0 30px var(--gc);animation:gxRg 1.6s ease-in forwards}
.gx-line{position:absolute;left:-10%;right:-10%;top:50%;height:3px;background:var(--gc);box-shadow:0 0 18px var(--gc);transform:rotate(-12deg) scaleX(0);animation:gxLn 1.6s .2s ease-out forwards}
@keyframes gxGl{0%{transform:scale(.2);opacity:.2}80%{transform:scale(1.1);opacity:1}100%{transform:scale(1.4);opacity:1}}
@keyframes gxRg{0%{transform:scale(.4) rotate(0)}100%{transform:scale(1.6) rotate(180deg);opacity:.2}}
@keyframes gxLn{to{transform:rotate(-12deg) scaleX(1)}}
.gx-fx.hit .gx-glow{animation-duration:2s}.gx-fx.hit .gx-gate::after{content:"";position:absolute;inset:0;background:#fff;opacity:0;animation:gxFl 2s forwards}
@keyframes gxFl{85%{opacity:0}100%{opacity:.9}}
.gx-gate b{position:relative;z-index:2;font-family:Anton,sans-serif;font-size:30px;letter-spacing:.1em;text-shadow:0 0 12px #000}
.gx-gate small,.gx-tap{position:absolute;bottom:28px;left:0;right:0;text-align:center;color:#aaa;font-size:12px}
.gx-rv{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;animation:gxIn .35s ease-out}
@keyframes gxIn{from{opacity:0;transform:scale(1.08)}}
.gx-burst{position:absolute;inset:-50%;background:repeating-conic-gradient(from 0deg,color-mix(in srgb,var(--cc) 55%,transparent) 0 8deg,transparent 8deg 20deg);animation:gxSp 18s linear infinite}
@keyframes gxSp{to{transform:rotate(360deg)}}
.gx-slash{position:absolute;left:-10%;right:-10%;top:34%;height:110px;background:linear-gradient(90deg,transparent,var(--cc),transparent);transform:rotate(-10deg);opacity:.5}
.gx-fig{position:absolute;inset:6% 0 26% 0;display:flex;justify-content:center}
.gx-fig .pt{flex:none;width:100%;height:100%}
.gx-fig .pt .pt-img{width:100%;height:100%;object-fit:contain;object-position:50% 100%}
.gx-fig .pt .pt-name{display:none}
.gx-new{position:absolute;top:8%;right:8%;margin:0;font-family:Anton,sans-serif;font-size:34px;color:#ff5a1f;background:#fff;padding:0 10px;transform:rotate(8deg);box-shadow:4px 4px 0 #0a0b0d;animation:gxPop .5s .3s both cubic-bezier(.3,1.6,.5,1)}
@keyframes gxPop{from{transform:rotate(8deg) scale(0)}}
.gx-name{position:relative;z-index:3;width:100%;background:linear-gradient(transparent,rgba(0,0,0,.9) 30%);padding:40px 18px 56px}
.gx-name small{font-family:Anton,sans-serif;color:var(--cc)}.gx-name b{display:block;font-size:26px;font-weight:900}
.gx-name p{margin:6px 0 0;font-size:14px;line-height:1.5}
.gx-sum{position:relative;width:min(92%,380px);max-height:92%;overflow:auto;background:#101216;border:2px solid var(--lime);border-radius:14px;padding:16px;display:flex;flex-direction:column;gap:12px;animation:gxIn .3s}
.gx-sh small{font-family:Anton,sans-serif;color:#ff5a1f;letter-spacing:.1em}.gx-sh b{display:block;font-family:Anton,sans-serif;font-size:34px;line-height:1}
.gx-cnt{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.gx-cnt>div{background:#181b20;border-radius:10px;padding:8px 12px}.gx-cnt small{color:#aaa;font-size:11px}
.gx-cnt b{display:block;font-family:Anton,sans-serif;font-size:28px;color:var(--lime)}.gx-cnt b i{font-style:normal;font-size:13px;margin-left:2px}
.gx-cnt>div+div b{color:#ccc}
.gx-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.gx-card{position:relative;background:#181b20;border:2px solid var(--cc);border-radius:10px;padding:6px;color:#fff;font:inherit;display:flex;flex-direction:column;align-items:center;gap:4px}
.gx-cf{width:56px;height:56px}.gx-card b{font-size:12px}
.gx-card em{position:absolute;top:-8px;right:-6px;background:#ff5a1f;color:#fff;font-style:normal;font-size:10px;font-weight:900;padding:1px 5px;transform:rotate(8deg)}
.gx-ok{margin-top:4px}
.calm .gx-st1,.calm .gx-b100,.gx-fx.calm *{animation:none!important}

/* ===== 2026-11-22 実機確認2 ===== */
/* ホームの胸から上：大きく、セリフの吹き出しと重なりすぎないよう右下へ（吹き出しは左上） */
.home .pa-home.pa-bust .pa-fig { top: 168px !important; bottom: 92px !important; height: auto !important; left: 0 !important; right: 0 !important; width: 100% !important; }
.home .pa-home.pa-bust .pa-fig .pt { --fr: .27; }
.home .pa-home.pa-bust .pa-fig .pt-img { left: 64% !important; top: calc(36% - var(--cy, .094) * 370%) !important; transform: translateX(calc(var(--cx, .5) * -100%)) !important; }
/* 下のタブと「単語・文法・読解」の間を詰める */
#main > .home { padding-bottom: 8px; }
#tabs { padding-bottom: calc(10px + env(safe-area-inset-bottom)) !important; }
/* 見出し（LEARN・CHARA・GACHA・RECORD）の始まる位置と大きさをそろえる：左14px・上16px・2.6rem。もどるボタンは右へ */
.gx > .ttl { margin-left: 2px !important; margin-right: 2px !important; }
.ch-head { padding: 16px 14px 8px; }
.ch-head h2 { order: 1; font-size: 2.6rem; line-height: 1; gap: 10px; }
.ch-head h2 small { font-size: .9rem; }
.ch-head .ch-back { order: 2; margin-left: auto; }
/* キャラの1人の画面の「全身」：絵が下に寄りすぎていたので、少し上寄りの真ん中に */
.ch-stage.ch-whole .ch-fig { top: 2%; bottom: 2%; }
.ch-stage.ch-whole .ch-fig .pt .pt-img { object-position: 50% 38%; }
/* キャラ一覧の枠：キャラの色の斜めの帯・角の飾り・番号・光る縁 */
.ch-card { overflow: visible; background: linear-gradient(160deg, color-mix(in srgb, var(--cc) 22%, var(--bk2)) 0%, var(--bk2) 55%); box-shadow: 3px 3px 0 #000; }
.ch-card::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(-55deg, transparent 0 10px, color-mix(in srgb, var(--cc) 10%, transparent) 10px 12px); }
.ch-card::after { content: ''; position: absolute; right: -2px; bottom: -2px; width: 14px; height: 14px; background: linear-gradient(135deg, transparent 50%, var(--cc) 50%); pointer-events: none; }
.ch-card .ch-face { position: relative; }
.ch-card .ch-face::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 2px dashed color-mix(in srgb, var(--cc) 70%, transparent); pointer-events: none; }
.ch-card.own .ch-face::after { border-style: solid; box-shadow: 0 0 10px color-mix(in srgb, var(--cc) 60%, transparent); }
.ch-card[data-n]::marker { content: none; }
.ch-card .ch-no { position: absolute; left: 6px; top: 4px; font-family: var(--en); font-size: .7rem; color: color-mix(in srgb, var(--cc) 80%, #fff); opacity: .9; z-index: 1; }
.ch-card.none::before { opacity: .4; }
/* 画面が勝手に拡大されない：入力欄は16px以上（iPhone は16px未満の入力欄で拡大する）、ダブルタップの拡大なし */
html, body, button, a, input, select, textarea { touch-action: manipulation; }
input, select, textarea { font-size: max(16px, 1em) !important; }
/* 起動の帯（index.html に最初から置く。CSS だけで動く） */
#bnd.boot.go .bnb { animation: bnIn .34s .1s cubic-bezier(.2,.9,.2,1) forwards; }
#bnd.boot.go .bnl span { animation: bnSp .2s cubic-bezier(.2,1.4,.4,1) forwards; }
#bnd.boot.go .bnl span:nth-child(1) { animation-delay: .4s } #bnd.boot.go .bnl span:nth-child(2) { animation-delay: .46s }
#bnd.boot.go .bnl span:nth-child(3) { animation-delay: .52s } #bnd.boot.go .bnl span:nth-child(4) { animation-delay: .58s }
#bnd.boot.go .bnl .bnp { animation-name: bnSpP; animation-delay: .68s }
@keyframes bnIn { to { transform: rotate(-14deg) translateX(0); } }
@keyframes bnSp { to { opacity: 1; transform: none; } }
@keyframes bnSpP { to { opacity: 1; transform: skewX(-10deg); } }
#bnd.up { opacity: 0; transition: background .3s ease, opacity .45s ease .1s; }
/* 画面の切り替え：瞬時に変わりすぎる（実機）→ 帯と中身の入りを長く・はっきり */
#main > .mv-in { animation-duration: .45s !important; }
@keyframes mvPageR { 0% { opacity: 0; translate: 70px 0; } 35% { opacity: 0; translate: 70px 0; } }
@keyframes mvPageL { 0% { opacity: 0; translate: -70px 0; } 35% { opacity: 0; translate: -70px 0; } }
@keyframes mvPageUp { 0% { opacity: 0; translate: 0 24px; } 35% { opacity: 0; translate: 0 24px; } }
.mv-wipe i { animation-duration: .5s !important; }
.mv-wipe.iris i, .mv-wipe.shutter i, .mv-wipe.blind i { animation-duration: .5s !important; }
/* 相棒をタップしたときの光 */
.tapfx { position: absolute; z-index: 40; width: 0; height: 0; pointer-events: none; }
.tapfx i { position: absolute; left: -20px; top: -20px; width: 40px; height: 40px; border-radius: 50%; border: 3px solid var(--tc); animation: tfR .55s ease-out forwards; }
.tapfx i.r2 { border-color: #fff; border-width: 2px; animation-delay: .08s; opacity: 0; }
.tapfx b { position: absolute; left: -6px; top: -6px; width: 12px; height: 12px; background: var(--tc); clip-path: polygon(50% 0,62% 38%,100% 50%,62% 62%,50% 100%,38% 62%,0 50%,38% 38%); animation: tfP .7s cubic-bezier(.2,.8,.3,1) forwards; }
.tapfx.heart b { clip-path: path('M6 11 C-2 5 1 0 6 3.5 C11 0 14 5 6 11Z'); background: #ff7aa8; }
@keyframes tfR { 0% { transform: scale(.2); opacity: 1; } 100% { transform: scale(2.4); opacity: 0; } }
@keyframes tfP { 0% { transform: rotate(var(--a)) translateY(0) scale(.4); opacity: 1; } 100% { transform: rotate(var(--a)) translateY(calc(var(--d) * -1)) scale(1); opacity: 0; } }
.dg.fu small { opacity: .35; }
.dg-note { margin: 4px 16px 0; font-size: .7rem; color: var(--gr); }
/* アクセントカラーの選択 */
.acc { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.acc button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 2px; background: var(--bk2); border: 2px solid var(--line); color: var(--wh); font: inherit; }
.acc button i { width: 28px; height: 28px; background: var(--ac); transform: skewX(-10deg); box-shadow: 2px 2px 0 #000; }
.acc button small { font-size: .7rem; font-weight: 700; }
.acc button.on { border-color: var(--ac); box-shadow: 0 0 0 2px var(--ac) inset; }
/* 目標（ホームの札と画面） */
.home .date { position: relative; z-index: 3; }
.hgoal { margin-left: auto; align-self: center; display: flex; align-items: center; gap: 6px; padding: 4px 10px 6px; background: rgba(10,11,13,.82); border: 2px solid var(--lime); color: var(--wh); font: inherit; transform: skewX(-8deg); position: relative; overflow: hidden; max-width: 58%; }
.hgoal > * { transform: skewX(8deg); }
.hgoal i { font-style: normal; color: var(--lime); font-weight: 900; }
.hgoal span { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.hgoal small { font-size: .58rem; color: var(--lime); font-weight: 900; letter-spacing: .05em; }
.hgoal b { font-size: .72rem; font-weight: 900; white-space: nowrap; }
.hgoal em { position: absolute; left: 0; bottom: 0; height: 3px; width: calc(var(--r) * 100%); background: var(--lime); transform: none; }
.hgoal.ok { background: var(--lime); color: var(--bk); } .hgoal.ok i, .hgoal.ok small { color: var(--bk); }
.hgoal.none b { font-size: .8rem; }
.gl-h { display: flex; align-items: baseline; gap: 10px; } .gl-h b { font-family: var(--en); font-size: 2rem; color: var(--lime); } .gl-h span { font-size: .85rem; color: var(--gr); }
.gl-bar { position: relative; height: 10px; background: #22252a; margin: 8px 0 4px; } .gl-bar i { display: block; height: 100%; background: var(--lime); } .gl-bar em { position: absolute; top: -4px; bottom: -4px; width: 2px; background: #fff; }
.gl-pace { font-size: .85rem; font-weight: 700; margin: 4px 0 8px; } .gl-pace.up { color: var(--lime); } .gl-pace.dn { color: var(--or); }
.gl-task p { margin: 4px 0; padding: 8px 10px; background: var(--bk2); border-left: 3px solid var(--gr); font-weight: 700; font-size: .9rem; }
.gl-task p.ok { border-color: var(--lime); color: var(--lime); }
.gl-task p.gl-rw { border: 0; background: none; padding: 2px 0; font-size: .78rem; color: var(--gr); }
.gl-q { display: block; margin: 10px 0 6px; font-size: .9rem; }
.gl-op { display: flex; flex-wrap: wrap; gap: 6px; } .gl-op button { padding: 6px 10px; background: var(--bk2); border: 2px solid var(--line); color: var(--wh); font: inherit; font-weight: 700; font-size: .85rem; }
.gl-op button.on { border-color: var(--lime); color: var(--lime); }
.gl-prop { margin-top: 12px; padding: 10px; background: var(--bk2); border: 1px solid var(--line); }
.gl-big { margin: 0 0 6px; font-weight: 900; } .gl-big b { font-family: var(--en); font-size: 1.6rem; color: var(--lime); }
.gl-big span { font-size: .72rem; padding: 2px 6px; margin-left: 6px; background: var(--lime); color: var(--bk); } .gl-big span.hard { background: var(--or); } .gl-big span.vhard { background: #ff3b3b; color: #fff; }
.gl-ms { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 8px; } .gl-ms div { display: flex; flex-direction: column; align-items: center; padding: 6px 2px; background: #0f1114; font-size: .7rem; }
.gl-ms b { font-size: .85rem; color: var(--lime); } .gl-ms small { color: var(--gr); }
.home .date .hgoal span { font: inherit; color: inherit; letter-spacing: 0; margin: 0; display: flex; flex-direction: column; }
.home .date .hgoal b { font-family: 'Noto Sans JP', sans-serif; font-size: .72rem; line-height: 1.2; letter-spacing: 0; color: inherit; }
.home .date .hgoal.none b { font-size: .8rem; }
.home .date .hgoal small { font-family: 'Noto Sans JP', sans-serif; font-size: .58rem; }
/* 文法の解説（問題と分けた画面）：真ん中に、読みやすく */
.gl-les { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 14px; padding: 12px 16px calc(18px + env(safe-area-inset-bottom)); min-height: calc(100% - 60px); }
.les-card { background: var(--bk2); border: 2px solid var(--line); border-left: 5px solid var(--lime); padding: 16px 16px 14px; box-shadow: 5px 5px 0 #000; }
.les-k { margin: 14px 0 6px; font-family: var(--en); font-size: .78rem; letter-spacing: .12em; color: var(--lime); }
.les-k:first-child { margin-top: 0; }
.les-pt { margin: 0; font-size: 1.08rem; font-weight: 900; line-height: 1.6; }
.les-form { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.les-form li { padding: 7px 10px; background: #0f1114; border: 1px solid var(--line); font-weight: 700; font-size: .92rem; }
.les-ex { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.les-ex li { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: center; }
.les-ex li .say { grid-row: span 2; }
.les-ex b { font-size: .98rem; } .les-ex small { color: var(--gr); font-size: .82rem; }
.les-note { margin: 0; font-size: .9rem; line-height: 1.6; color: #ddd; }
.gchk .ql { color: var(--lime); }
.gchk-skip { margin-top: 10px; }
/* チュートリアル：指す所だけ明るく、ほかは暗く */
.tut { position: absolute; inset: 0; z-index: 90; }
.tut-dim { position: absolute; inset: 0; background: rgba(0,0,0,.6); }
.tut-hole { position: absolute; border: 3px solid var(--lime); box-shadow: 0 0 0 200vmax rgba(0,0,0,.62), 0 0 18px var(--lime); transition: all .35s cubic-bezier(.2,.85,.2,1); animation: tutPulse 1.4s ease-in-out infinite; pointer-events: none; }
@keyframes tutPulse { 50% { box-shadow: 0 0 0 200vmax rgba(0,0,0,.62), 0 0 32px var(--lime); } }
.tut-box { position: absolute; left: 12px; right: 12px; display: grid; grid-template-columns: 56px 1fr; gap: 8px 10px; padding: 12px; background: #f4f4ef; color: #111; border: 3px solid #000; box-shadow: 5px 5px 0 var(--cc); animation: tutIn .25s ease-out; }
.tut-box.bot { bottom: calc(96px + env(safe-area-inset-bottom)); } .tut-box.top { top: 70px; }
@keyframes tutIn { from { opacity: 0; translate: 0 10px; } }
.tut-face .pt-face { width: 56px; height: 56px; }
.tut-say small { display: flex; justify-content: space-between; font-weight: 900; font-size: .78rem; color: #444; } .tut-say small em { font-style: normal; color: #888; }
.tut-say p { margin: 4px 0 0; font-weight: 700; font-size: .95rem; line-height: 1.55; }
.tut-btns { grid-column: 1 / -1; display: flex; justify-content: flex-end; align-items: center; gap: 10px; }
.tut-skip { background: none; border: 0; color: #666; font: inherit; font-size: .85rem; text-decoration: underline; }
.tut-next { min-width: 120px; }

/* ===== 2026-11-22 実機確認3 ===== */
/* 下のタブを下げる（iPhone のホームバーの分の余白を減らす） */
#tabs { padding-bottom: max(6px, calc(env(safe-area-inset-bottom) - 18px)) !important; padding-top: 4px !important; }
/* ホームの右の丸いボタン（メール・相棒・自主） */
.home .hside { position: absolute !important; right: 10px; top: 128px; z-index: 4; display: flex; flex-direction: column; gap: 10px; }
.hs-b { position: relative; width: 54px; height: 54px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; background: rgba(10,11,13,.84); border: 2px solid var(--lime); color: var(--wh); transform: skewX(-8deg); box-shadow: 3px 3px 0 #000; }
.hs-b > * { transform: skewX(8deg); }
.hs-b small { font-size: .6rem; font-weight: 900; color: var(--lime); }
.hs-b em { position: absolute; top: -8px; right: -8px; min-width: 20px; height: 20px; padding: 0 4px; border-radius: 10px; background: var(--or); color: #fff; font: 900 .7rem/20px var(--en); font-style: normal; transform: none; }
.home > .rec { margin-bottom: 4px; }
/* メール */
.ibx { position: absolute; inset: 0; z-index: 80; background: rgba(0,0,0,.6); display: flex; align-items: flex-end; }
.ibx-w { width: 100%; max-height: 88%; display: flex; flex-direction: column; background: #101216; border-top: 3px solid var(--lime); animation: ibxUp .25s cubic-bezier(.2,.85,.2,1); }
@keyframes ibxUp { from { translate: 0 40px; opacity: 0; } }
.ibx-h { display: flex; align-items: center; gap: 10px; padding: 12px 14px 8px; }
.ibx-h small { display: block; font-family: var(--en); color: var(--lime); letter-spacing: .12em; font-size: .75rem; } .ibx-h b { font-size: 1.1rem; }
.ibx-h span { margin-left: auto; font-size: .8rem; color: var(--gr); } .ibx-x { width: 34px; height: 34px; background: none; border: 2px solid var(--line); color: var(--wh); font-size: 1.2rem; }
.ibx-g { display: flex; gap: 10px; align-items: center; margin: 0 14px 8px; padding: 8px 10px; background: var(--bk2); border-left: 3px solid var(--lime); }
.ibx-g .pt-face { width: 44px; height: 44px; } .ibx-g p { margin: 0; font-size: .84rem; line-height: 1.5; } .ibx-g b { display: block; font-size: .78rem; color: var(--lime); }
.ibx-l { overflow: auto; padding: 0 14px 8px; display: flex; flex-direction: column; gap: 8px; }
.ibx-m { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; padding: 10px; background: var(--bk2); border: 1px solid var(--line); }
.ibx-m.done { opacity: .55; } .ibx-ic { color: var(--lime); display: flex; justify-content: center; }
.ibx-b b { display: block; font-size: .9rem; } .ibx-b b small { margin-left: 6px; font-size: .7rem; color: var(--gr); font-weight: 400; }
.ibx-b p { margin: 3px 0 0; font-size: .78rem; color: #ccc; line-height: 1.5; }
.ibx-m em { font-style: normal; font-size: .75rem; color: var(--gr); }
.ibx-grp { margin: 6px 0 0; font-size: .75rem; color: var(--gr); }
.ibx-f { display: flex; gap: 8px; padding: 10px 14px calc(12px + env(safe-area-inset-bottom)); } .ibx-f .btn { flex: 1; }
/* 相棒を選ぶ */
.pp-g { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; max-height: 52vh; overflow: auto; }
.pp-c { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 2px; background: var(--bk2); border: 2px solid var(--line); color: var(--wh); font: inherit; }
.pp-c .pt-face { width: 52px; height: 52px; } .pp-c b { font-size: .7rem; } .pp-c.on { border-color: var(--lime); box-shadow: 0 0 0 2px var(--lime) inset; }
/* 自主モード */
.jishu { position: relative; height: 100%; display: flex; flex-direction: column; overflow: hidden; }
.js-h { position: relative; z-index: 3; display: flex; align-items: baseline; gap: 10px; padding: 12px 14px 0; }
.js-h b { font-size: 1.3rem; font-weight: 900; } .js-h small { font-family: var(--en); color: var(--lime); letter-spacing: .12em; }
.js-h .back { align-self: center; }
.js-fig { position: absolute; left: 0; right: 0; top: 40px; bottom: 210px; z-index: 1; }
.js-fig .pt { position: absolute; inset: 0; width: 100%; height: 100%; -webkit-mask-image: linear-gradient(to bottom, #000 80%, transparent); mask-image: linear-gradient(to bottom, #000 80%, transparent); }
.js-bub { position: absolute; z-index: 3; left: 12px; right: 30%; top: 74px; padding: 10px 12px; background: #f4f4ef; color: #111; border: 3px solid #000; box-shadow: 4px 4px 0 var(--lime); font-weight: 700; font-size: .92rem; line-height: 1.55; }
.js-bub p { margin: 0; } .js-bub.in { animation: tutIn .25s ease-out; }
.js-timer { position: relative; z-index: 3; margin-top: auto; padding: 12px 14px 12px; background: linear-gradient(transparent, rgba(10,11,13,.95) 22%); display: flex; flex-direction: column; gap: 10px; }
.js-time { text-align: center; font: 400 4rem/1 var(--en); letter-spacing: .04em; color: var(--wh); text-shadow: 3px 3px 0 #000; }
.jishu.running .js-time { color: var(--lime); }
.js-mins { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.js-mins button { padding: 5px 9px; background: var(--bk2); border: 2px solid var(--line); color: var(--wh); font: inherit; font-weight: 700; font-size: .8rem; }
.js-mins button.on { border-color: var(--lime); color: var(--lime); }
.jishu.running .js-mins { opacity: .35; pointer-events: none; }
.js-btns { display: grid; grid-template-columns: 1fr 2fr; gap: 8px; }
.js-note { margin: 0; text-align: center; font-size: .72rem; color: var(--gr); }
/* キャラの1人の画面：iPhone では舞台が下のタブの裏まで伸び、セリフの欄が隠れていた → 画面の高さから計算する */
.ch-stage { height: calc(100dvh - env(safe-area-inset-top) - max(6px, calc(env(safe-area-inset-bottom) - 18px)) - 176px) !important; }
.ch-chosen .ch-stage { height: 400px !important; }
/* 読解：全画面で読む */
.rd-tools { display: flex; gap: 8px; flex-wrap: wrap; }
#main { position: relative; }
.rd-full { position: absolute; inset: 0; z-index: 30; display: flex; flex-direction: column; background: var(--bk); animation: mvFade .2s; }
.rd-fh { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 2px solid var(--lime); }
.rd-fh b { flex: 1; font-size: .85rem; }
.rd-fp { flex: 1; overflow: auto; margin: 0 !important; padding: 18px 18px 28px !important; }
.rd-fp p { font-size: 1.2rem !important; line-height: 2 !important; }
