/* =====================================================================
   金次郎の元素クエスト  スタイル
   ===================================================================== */
:root {
  --gold: #ffd25c; --gold2: #ffb52e; --ink: #120a20; --panel: rgba(16, 11, 38, 0.9); --line: rgba(255, 210, 92, 0.45);
  --txt: #f4efff; --sub: #b8acd8; --good: #5cff9a; --bad: #ff5c7a; --blue: #5cc8ff; --purple: #b07cff;
  --num: "Arial Black", "Arimo", Arial, Roboto, sans-serif;
  --font: "Hiragino Maru Gothic ProN", "Hiragino Sans", "BIZ UDPGothic", "Noto Sans JP", "Noto Sans CJK JP", "Yu Gothic", sans-serif;
}
* { box-sizing: border-box; }
:root { color-scheme: dark; }
:where(#game) img { max-width: none; }
html, body { margin: 0; height: 100%; background: #000; overflow: hidden; color: var(--txt); font-family: var(--font); -webkit-font-smoothing: antialiased; user-select: none; }
#game { position: absolute; left: 50%; top: 50%; width: 1280px; height: 720px; transform-origin: center center; overflow: hidden; background: #05040c; touch-action: none; }
#cv { position: absolute; left: 0; top: 0; }
#ui, #overlay { position: absolute; inset: 0; }
#ui > * { position: absolute; }
#overlay { pointer-events: none; z-index: 50; }
#overlay > * { pointer-events: auto; }
#fade { position: absolute; inset: 0; background: #000; opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 80; }
#fade.on { opacity: 1; }
#toasts { position: absolute; right: 14px; top: 70px; z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; background: rgba(14, 10, 32, .95); border: 2px solid var(--gold); border-radius: 14px; padding: 10px 16px 10px 10px; font-weight: 800; font-size: 16px; transform: translateX(120%); transition: transform .35s cubic-bezier(.2, 1.4, .4, 1); box-shadow: 0 6px 20px rgba(0,0,0,.5); max-width: 520px; }
.toast.in { transform: none; }
.toast small { display: block; font-size: 12px; color: var(--sub); font-weight: 600; }
.toastIcon { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--ink); font-weight: 900; flex: none; }

/* ---------- ボタン ---------- */
.btn { font-family: var(--font); font-weight: 900; font-size: 18px; color: #fff; background: linear-gradient(180deg, #3a2f6e, #221a48); border: 2px solid rgba(255,255,255,.18); border-radius: 14px; padding: 10px 22px; cursor: pointer; transition: transform .08s, filter .15s, box-shadow .15s; box-shadow: 0 4px 0 rgba(0,0,0,.45); position: relative; }
.btn:hover { filter: brightness(1.18); transform: translateY(-1px); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0,0,0,.45); }
.btn.primary { background: linear-gradient(180deg, #ffe27a, #ffb52e 60%, #e8860a); color: #2a1600; border-color: #fff3c0; text-shadow: 0 1px 0 rgba(255,255,255,.4); }
.btn.danger { background: linear-gradient(180deg, #ff7a8a, #c8203a); }
.btn.green { background: linear-gradient(180deg, #6affb0, #19a85a); color: #022a12; border-color: #c8ffe0; }
.btn.small { font-size: 14px; padding: 6px 14px; border-radius: 10px; }
.btn:disabled, .btn.disabled { filter: grayscale(.8) brightness(.6); cursor: default; transform: none; }
.btn .badge, .badge { position: absolute; top: -8px; right: -8px; background: var(--bad); color: #fff; font-size: 12px; min-width: 22px; height: 22px; border-radius: 11px; display: flex; align-items: center; justify-content: center; padding: 0 6px; border: 2px solid #fff; }
.back { left: 18px; top: 16px; z-index: 5; }

/* ---------- パネル ---------- */
.panel { background: var(--panel); border: 2px solid var(--line); border-radius: 18px; box-shadow: 0 10px 30px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.08); }
.ptitle { font-weight: 900; font-size: 26px; letter-spacing: .04em; color: #fff; text-shadow: 0 3px 0 var(--ink), 0 0 18px rgba(255,210,92,.35); }
.screenTitle { left: 0; right: 0; top: 14px; text-align: center; font-size: 30px; font-weight: 900; text-shadow: 0 3px 0 var(--ink), 0 0 20px rgba(255,210,92,.4); pointer-events: none; }
.screenTitle small { display: block; font-size: 14px; color: var(--sub); font-weight: 700; text-shadow: none; }
.currency { right: 18px; top: 16px; display: flex; gap: 10px; z-index: 5; }
.cur { background: rgba(10,6,24,.85); border: 2px solid rgba(255,255,255,.15); border-radius: 20px; padding: 4px 14px 4px 6px; display: flex; align-items: center; gap: 6px; font-weight: 900; font-size: 16px; }
.cur i { font-style: normal; width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; color: var(--ink); }
.cur.g i { background: radial-gradient(circle at 35% 35%, #fff6b0, #ffc53d 60%, #b8780a); }
.cur.s i { background: radial-gradient(circle at 35% 35%, #f0e0ff, #b07cff 60%, #5a2aa8); color: #fff; }
.scroll { overflow-y: auto; overflow-x: hidden; }
.scroll::-webkit-scrollbar { width: 10px; }
.scroll::-webkit-scrollbar-thumb { background: rgba(255,210,92,.35); border-radius: 5px; }
.scroll::-webkit-scrollbar-track { background: rgba(255,255,255,.04); }

/* ---------- モーダル ---------- */
.modalBack { position: absolute; inset: 0; background: rgba(4,2,12,.65); display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .2s; }
.modalBack.in { opacity: 1; }
.modal { min-width: 420px; max-width: 980px; max-height: 660px; background: linear-gradient(180deg, #221a4a, #120c2c); border: 2px solid var(--gold); border-radius: 20px; padding: 24px 28px; box-shadow: 0 20px 60px rgba(0,0,0,.6); transform: scale(.9); transition: transform .25s cubic-bezier(.2,1.4,.4,1); }
.modalBack.in .modal { transform: none; }
.modalTitle { font-size: 26px; font-weight: 900; text-align: center; margin-bottom: 14px; color: var(--gold); }
.modalMsg { font-size: 20px; font-weight: 800; text-align: center; line-height: 1.7; margin: 8px 0 18px; }
.modalMsg small { font-size: 14px; color: var(--sub); }
.modalBtns { display: flex; justify-content: center; gap: 14px; margin-top: 10px; }
.modalBtns.col { flex-direction: column; align-items: stretch; }
.pauseInfo { text-align: center; color: var(--sub); margin-bottom: 14px; font-weight: 700; }

/* ---------- タイトル ---------- */
.titleLogo { left: 0; right: 0; top: 92px; text-align: center; pointer-events: none; }
.titleLogo .sup { font-size: 24px; font-weight: 900; color: #e8dcff; letter-spacing: .3em; text-shadow: 0 2px 0 #000; }
.titleLogo .main { font-size: 92px; font-weight: 900; line-height: 1.1; letter-spacing: .02em; background: linear-gradient(180deg, #fffbe0 0%, #ffe27a 35%, #ffb52e 60%, #ff7a1a 100%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 5px 0 #3a1600) drop-shadow(0 0 26px rgba(255,180,60,.6)); }
.titleLogo .subt { margin-top: 10px; font-size: 26px; font-weight: 900; color: #fff; text-shadow: 0 0 14px #b07cff, 0 3px 0 #2a0a4a; letter-spacing: .12em; }
.titleLogo img { max-width: 900px; max-height: 300px; }
.pressStart { left: 0; right: 0; bottom: 120px; text-align: center; font-size: 28px; font-weight: 900; color: #fff; text-shadow: 0 0 16px #ffd25c, 0 3px 0 #000; animation: blink 1.4s infinite; pointer-events: none; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.titleMenu { left: 50%; bottom: 70px; transform: translateX(-50%); display: flex; gap: 16px; }
.verText { right: 14px; bottom: 10px; font-size: 12px; color: rgba(255,255,255,.4); }

/* ---------- 拠点 ---------- */
.hubLeft { left: 24px; top: 84px; width: 430px; height: 612px; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.hubName { display: flex; align-items: baseline; gap: 12px; }
.hubName b { font-size: 30px; font-weight: 900; }
.hubName span { font-size: 22px; font-weight: 900; color: var(--gold); }
.expBar { height: 14px; background: rgba(0,0,0,.5); border-radius: 7px; overflow: hidden; border: 1px solid rgba(255,255,255,.15); }
.expBar > div { height: 100%; background: linear-gradient(90deg, #5cc8ff, #b8f0ff); }
.statRow { display: flex; gap: 8px; }
.stat { flex: 1; background: rgba(0,0,0,.35); border-radius: 12px; padding: 8px 10px; border: 1px solid rgba(255,255,255,.1); }
.stat .l { font-size: 12px; color: var(--sub); font-weight: 800; }
.stat .v { font-size: 24px; font-weight: 900; }
.masteryRing { display: flex; align-items: center; gap: 16px; background: rgba(0,0,0,.3); border-radius: 14px; padding: 12px; }
.masteryRing svg { flex: none; }
.masteryRing .t1 { font-size: 13px; color: var(--sub); font-weight: 800; }
.masteryRing .t2 { font-size: 28px; font-weight: 900; }
.dailyBox { background: rgba(0,0,0,.3); border-radius: 14px; padding: 10px 12px; flex: 1; overflow: hidden; }
.dailyBox h4 { margin: 0 0 6px; font-size: 15px; color: var(--gold); }
.dm { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; margin: 6px 0; }
.dm .pb { flex: 1; height: 8px; background: rgba(255,255,255,.1); border-radius: 4px; overflow: hidden; }
.dm .pb > div { height: 100%; background: var(--good); }
.dm.done { color: var(--good); }
.dm .txt { width: 230px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hubMenu { left: 480px; top: 84px; width: 776px; height: 612px; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: 1.5fr 1fr 1fr; gap: 14px; }
.hcard { position: relative; border-radius: 20px; overflow: hidden; cursor: pointer; border: 2px solid rgba(255,255,255,.18); background: linear-gradient(160deg, #2c2260, #120c2c); box-shadow: 0 8px 0 rgba(0,0,0,.4); transition: transform .1s, filter .15s, border-color .15s; display: flex; flex-direction: column; justify-content: flex-end; padding: 16px; }
.hcard:hover { transform: translateY(-3px); filter: brightness(1.15); border-color: var(--gold); }
.hcard:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(0,0,0,.4); }
.hcard .hk { position: absolute; left: 12px; top: 10px; font-size: 12px; font-weight: 900; color: rgba(255,255,255,.55); background: rgba(0,0,0,.35); border-radius: 6px; padding: 2px 8px; }
.hcard .hi { position: absolute; right: 14px; top: 10px; font-size: 54px; opacity: .9; filter: drop-shadow(0 4px 0 rgba(0,0,0,.4)); }
.hcard .ht { font-size: 26px; font-weight: 900; text-shadow: 0 3px 0 rgba(0,0,0,.5); }
.hcard .hs { font-size: 13px; color: var(--sub); font-weight: 700; margin-top: 4px; }
.hcard.big { grid-column: span 2; background: linear-gradient(135deg, #ff9a2a 0%, #c8462a 45%, #4a1a6a 100%); }
.hcard.big .ht { font-size: 44px; }
.hcard.big .hs { color: #ffe9c8; font-size: 16px; }
.hcard .badge { top: 10px; right: 10px; }
.hcard img.hbg { position: absolute; right: -10px; bottom: -20px; height: 115%; opacity: .95; pointer-events: none; }

/* ---------- マップ ---------- */
.areaTabs { left: 20px; top: 74px; width: 250px; height: 630px; display: flex; flex-direction: column; gap: 6px; }
.atab { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: rgba(14,10,34,.85); border: 2px solid rgba(255,255,255,.1); cursor: pointer; font-weight: 800; font-size: 15px; transition: transform .1s, border-color .15s; }
.atab:hover { transform: translateX(4px); border-color: rgba(255,210,92,.5); }
.atab.sel { border-color: var(--gold); background: linear-gradient(90deg, rgba(255,210,92,.25), rgba(14,10,34,.9)); }
.atab.lock { opacity: .4; cursor: default; }
.atab .num { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.12); font-weight: 900; flex: none; }
.atab .nm { flex: 1; line-height: 1.15; }
.atab .nm small { display: block; font-size: 11px; color: var(--sub); }
.atab .pr { font-size: 12px; color: var(--gold); }
.mapStage { left: 290px; top: 74px; width: 970px; height: 630px; }
.mapHead { position: absolute; left: 20px; top: 12px; right: 20px; display: flex; align-items: baseline; gap: 14px; }
.mapHead b { font-size: 34px; font-weight: 900; text-shadow: 0 3px 0 #000; }
.mapHead span { color: var(--sub); font-weight: 800; }
.node { position: absolute; width: 96px; height: 96px; margin: -48px 0 0 -48px; border-radius: 50%; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 900; transition: transform .12s; background: radial-gradient(circle at 35% 30%, #4a3a8a, #1a1240); border: 4px solid rgba(255,255,255,.35); box-shadow: 0 6px 0 rgba(0,0,0,.45); }
.node:hover { transform: scale(1.1); }
.node .nk { font-size: 20px; }
.node .ne { font-size: 11px; color: var(--sub); }
.node.cleared { border-color: var(--gold); background: radial-gradient(circle at 35% 30%, #6a5a2a, #2a1e0a); }
.node.next { border-color: #fff; animation: pulseN 1.2s infinite; }
@keyframes pulseN { 0%,100% { box-shadow: 0 0 0 0 rgba(255,255,255,.6), 0 6px 0 rgba(0,0,0,.45); } 50% { box-shadow: 0 0 0 14px rgba(255,255,255,0), 0 6px 0 rgba(0,0,0,.45); } }
.node.locked { opacity: .35; cursor: default; filter: grayscale(1); }
.node.boss { width: 128px; height: 128px; margin: -64px 0 0 -64px; border-color: #b07cff; background: radial-gradient(circle at 35% 30%, #5a2a8a, #1a0630); overflow: visible; }
.node.boss img { width: 112px; height: 112px; border-radius: 50%; object-fit: cover; }
.node.boss.cleared { border-color: var(--gold); }
.node .stars { position: absolute; bottom: -22px; font-size: 16px; color: var(--gold); letter-spacing: -2px; text-shadow: 0 2px 0 #000; white-space: nowrap; }
.node .bossTag { position: absolute; top: -18px; background: #b03dff; color: #fff; font-size: 12px; border-radius: 8px; padding: 1px 8px; white-space: nowrap; }
.node .darkMark { position: absolute; right: -8px; top: -6px; font-size: 20px; }

/* ステージ情報 */
.stageInfo { width: 760px; }
.siHead { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; }
.siHead .k { font-size: 18px; color: var(--sub); font-weight: 900; }
.siHead .n { font-size: 30px; font-weight: 900; }
.siBody { display: flex; gap: 18px; }
.siCol { flex: 1; }
.siCol h5 { margin: 0 0 8px; font-size: 14px; color: var(--gold); }
.elemChips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border-radius: 10px; padding: 4px 8px; font-weight: 900; font-size: 15px; background: rgba(255,255,255,.08); border: 2px solid; display: flex; gap: 6px; align-items: center; }
.chip b { font-family: var(--num); font-weight: 900; }
.chip.new { box-shadow: 0 0 10px rgba(255,210,92,.6); }
.siParty { display: flex; gap: 10px; align-items: center; }
.monIcon { width: 64px; height: 64px; border-radius: 50%; border: 3px solid rgba(255,255,255,.3); background: #1a1240 center/cover; position: relative; flex: none; }
.monIcon.dark { border-color: #b03dff; box-shadow: 0 0 12px #b03dff; }
.monIcon .k { position: absolute; left: -4px; bottom: -4px; width: 22px; height: 22px; border-radius: 50%; background: var(--gold); color: var(--ink); font-weight: 900; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.depthSel { display: flex; gap: 6px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.depthSel .btn { padding: 6px 12px; font-size: 14px; }
.depthSel .btn.sel { background: linear-gradient(180deg, #c87aff, #6a2aa8); border-color: #f0d8ff; }
.pityBar { margin-top: 8px; font-size: 13px; color: #e0c8ff; font-weight: 800; }
.pityBar .pb { height: 10px; border-radius: 5px; background: rgba(255,255,255,.1); overflow: hidden; margin-top: 4px; }
.pityBar .pb > div { height: 100%; background: linear-gradient(90deg, #6a2aa8, #ff5ce1); }

/* ---------- 新元素カード ---------- */
.introWrap { inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.introTitle { font-size: 32px; font-weight: 900; text-shadow: 0 3px 0 #000, 0 0 20px rgba(255,210,92,.6); margin-bottom: 18px; }
.introCards { display: flex; gap: 22px; perspective: 1000px; }
.ecard { width: 270px; height: 380px; position: relative; transform-style: preserve-3d; transition: transform .6s cubic-bezier(.2,1.2,.4,1); cursor: pointer; }
.ecard.flip { transform: rotateY(180deg); }
.ecard .face { position: absolute; inset: 0; backface-visibility: hidden; border-radius: 20px; border: 3px solid; display: flex; flex-direction: column; align-items: center; padding: 18px; background: linear-gradient(180deg, #2a2050, #0e0a22); box-shadow: 0 14px 30px rgba(0,0,0,.5); }
.ecard .back { transform: rotateY(180deg); }
.ecard .front { background: repeating-linear-gradient(45deg, #2a1e5a 0 14px, #221850 14px 28px); justify-content: center; }
.ecard .front .q { font-size: 110px; font-weight: 900; color: var(--gold); text-shadow: 0 6px 0 #000; }
.ecard .num { align-self: flex-start; font-weight: 900; font-size: 22px; }
.ecard .sym { font-family: var(--num); font-weight: 900; font-size: 110px; line-height: 1; margin: 6px 0 4px; text-shadow: 0 6px 0 rgba(0,0,0,.5); }
.ecard .nm { font-size: 30px; font-weight: 900; }
.ecard .nm ruby rt { font-size: 13px; color: var(--sub); }
.ecard .cat { font-size: 13px; font-weight: 900; border-radius: 8px; padding: 2px 10px; color: var(--ink); margin: 6px 0; }
.ecard .fact { font-size: 15px; font-weight: 700; line-height: 1.55; text-align: center; color: #e8e0ff; margin-top: 4px; }
.ecard .art { width: 100%; height: 96px; object-fit: contain; }
.introHint { margin-top: 18px; font-size: 18px; font-weight: 800; color: var(--sub); }
.practiceBox { margin-top: 18px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.practiceQ { font-size: 26px; font-weight: 900; }
.practiceIn { font-family: var(--num); font-weight: 900; font-size: 54px; min-width: 200px; text-align: center; padding: 4px 20px; border-radius: 14px; background: rgba(0,0,0,.5); border: 3px solid var(--gold); min-height: 76px; }
.practiceIn.err { border-color: var(--bad); animation: shake .3s; }
.practiceIn.ok { border-color: var(--good); }
@keyframes shake { 0%,100% { transform: none; } 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }

/* ---------- ADV ---------- */
.advChars { inset: 0; pointer-events: none; }
.advChar.nanashi img { filter: grayscale(1) brightness(1.3) contrast(0.85) opacity(0.9); }
.advChar { position: absolute; bottom: 150px; transition: opacity .3s, transform .3s, filter .3s; }
.advChar.dim { filter: brightness(.55); }
.advChar.L { left: 60px; }
.advChar.R { right: 90px; }
.advChar.R2 { right: 380px; }
.advChar.C { left: 50%; transform: translateX(-50%); }
.advChar img { display: block; }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.advChar.enter { animation: enterChar .35s ease-out; }
@keyframes enterChar { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
.advBox { left: 40px; right: 40px; bottom: 20px; height: 168px; background: linear-gradient(180deg, rgba(20,14,44,.94), rgba(10,6,24,.97)); border: 3px solid var(--gold); border-radius: 20px; padding: 30px 34px 16px; box-shadow: 0 10px 30px rgba(0,0,0,.6); cursor: pointer; }
.advName { position: absolute; left: 30px; top: -22px; background: linear-gradient(180deg, #ffe27a, #ffb52e); color: var(--ink); font-weight: 900; font-size: 22px; padding: 4px 22px; border-radius: 12px; border: 2px solid #fff3c0; }
.advName:empty { display: none; }
.advText { font-size: 25px; font-weight: 800; line-height: 1.6; white-space: pre-wrap; }
.advNext { position: absolute; right: 26px; bottom: 14px; font-size: 22px; color: var(--gold); animation: blink 1s infinite; }
.advTools { right: 46px; top: 16px; display: flex; gap: 8px; z-index: 3; }
.advTools .btn.on { background: linear-gradient(180deg, #6affb0, #19a85a); color: #022a12; }
.advLog { width: 900px; }
.advLog .row { padding: 8px 4px; border-bottom: 1px solid rgba(255,255,255,.08); font-size: 17px; font-weight: 700; }
.advLog .row b { color: var(--gold); margin-right: 10px; }

/* ---------- リザルト ---------- */
.resWrap { inset: 0; }
.resRank { left: 70px; top: 90px; width: 330px; height: 330px; display: flex; align-items: center; justify-content: center; }
.resRank .r { font-family: var(--num); font-weight: 900; font-size: 230px; line-height: 1; transform: scale(3); opacity: 0; transition: transform .45s cubic-bezier(.2,1.6,.4,1), opacity .2s; }
.resRank .r.in { transform: scale(1); opacity: 1; }
.resRank .lbl { position: absolute; top: 0; left: 0; font-size: 22px; font-weight: 900; color: var(--sub); }
.resStars { left: 90px; top: 410px; font-size: 54px; letter-spacing: 6px; }
.resStars span { display: inline-block; color: #3a3460; transform: scale(0); transition: transform .4s cubic-bezier(.2,1.8,.4,1), color .2s; }
.resStars span.on { color: var(--gold); transform: scale(1); text-shadow: 0 0 20px rgba(255,210,92,.7), 0 4px 0 #6a4000; }
.resStars span.shown { transform: scale(1); }
.resPanel { left: 440px; top: 80px; width: 800px; height: 560px; padding: 20px 26px; display: flex; flex-direction: column; gap: 12px; }
.resHead { font-size: 34px; font-weight: 900; }
.resStats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.resStats .stat .v { font-size: 22px; }
.resExp { display: flex; align-items: center; gap: 10px; font-weight: 900; }
.resExp .expBar { flex: 1; height: 18px; border-radius: 9px; }
.resLoot { display: flex; gap: 10px; flex-wrap: wrap; min-height: 120px; }
.loot { width: 112px; height: 132px; border-radius: 14px; background: rgba(0,0,0,.4); border: 3px solid; display: flex; flex-direction: column; align-items: center; padding: 6px; position: relative; transform: scale(0) rotate(-20deg); transition: transform .45s cubic-bezier(.2,1.6,.4,1); }
.loot.in { transform: none; }
.loot img { width: 72px; height: 72px; }
.loot .nm { font-size: 11px; font-weight: 800; text-align: center; line-height: 1.2; }
.loot .rr { position: absolute; top: -10px; left: -6px; font-family: var(--num); font-weight: 900; font-size: 13px; padding: 1px 6px; border-radius: 6px; color: var(--ink); }
.loot .tag { position: absolute; bottom: -10px; font-size: 11px; font-weight: 900; padding: 1px 8px; border-radius: 8px; background: var(--good); color: #022a12; white-space: nowrap; }
.loot .tag.lb { background: #ff9a2a; color: #2a1000; }
.loot .tag.sh { background: #b07cff; color: #fff; }
.loot.ur { animation: urGlow 1.2s infinite; }
@keyframes urGlow { 0%,100% { box-shadow: 0 0 10px #ff5ca8; } 50% { box-shadow: 0 0 34px #ff5ca8, 0 0 60px #ffd25c; } }
.resLearn { margin-top: 8px; font-size: 15px; font-weight: 800; color: var(--sub); }
.resLearn b { color: var(--gold); }
.resBtns { position: absolute; right: 26px; bottom: 20px; display: flex; gap: 12px; }
.weakList { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- 周期表 ---------- */
.ptable { left: 24px; top: 84px; width: 1232px; height: 470px; }
.ptile { position: absolute; width: 64px; height: 50px; border-radius: 7px; border: 2px solid; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; transition: transform .1s; background: rgba(14,10,34,.9); }
.ptile:hover { transform: scale(1.18); z-index: 3; }
.ptile .n { position: absolute; left: 3px; top: 1px; font-size: 9px; font-weight: 800; opacity: .8; }
.ptile .s { font-family: var(--num); font-weight: 900; font-size: 18px; line-height: 1; }
.ptile .j { font-size: 9px; font-weight: 800; opacity: .85; white-space: nowrap; overflow: hidden; max-width: 60px; }
.ptile.m0 { opacity: .35; }
.ptile.m0 .s, .ptile.m0 .j { color: #8a84a8; }
.ptile.locked .s { color: #554d78; }
.ptile.m4 { box-shadow: 0 0 10px rgba(255,212,71,.8); }
.ptile .mb { position: absolute; bottom: 0; left: 0; right: 0; height: 4px; border-radius: 0 0 5px 5px; }
.pLegend { left: 24px; top: 560px; width: 1232px; display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; font-weight: 800; }
.pLegend span { display: flex; align-items: center; gap: 5px; }
.pLegend i { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.pStats { left: 24px; top: 610px; width: 1232px; display: flex; gap: 12px; }
.pStats .stat { flex: 1; }
.pDetail { width: 700px; display: flex; gap: 22px; }
.pDetail .big { width: 220px; height: 260px; border-radius: 18px; border: 4px solid; display: flex; flex-direction: column; align-items: center; justify-content: center; background: linear-gradient(180deg, #2a2050, #0e0a22); flex: none; }
.pDetail .big .s { font-family: var(--num); font-weight: 900; font-size: 100px; line-height: 1; }
.pDetail .info h3 { margin: 0 0 6px; font-size: 32px; }
.pDetail .info .row { margin: 6px 0; font-weight: 700; color: #e0d8ff; }
.pDetail .info .fact { font-size: 18px; line-height: 1.6; margin-top: 10px; font-weight: 800; }
.pDetail img.art { width: 100%; height: 140px; object-fit: contain; margin-top: 8px; border-radius: 12px; }

/* ---------- 理科モン ---------- */
.monGrid { left: 24px; top: 84px; width: 760px; height: 616px; padding: 14px; display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; align-content: start; }
.mcard { aspect-ratio: 1/1.25; border-radius: 14px; border: 2px solid rgba(255,255,255,.15); background: linear-gradient(180deg, #2a2056, #120c2c); position: relative; cursor: pointer; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; transition: transform .1s; }
.mcard:hover { transform: translateY(-3px); border-color: var(--gold); }
.mcard.sel { border-color: var(--gold); box-shadow: 0 0 16px rgba(255,210,92,.6); }
.mcard img { position: absolute; inset: 6px 6px 26px; width: calc(100% - 12px); height: calc(100% - 32px); object-fit: contain; }
.mcard .nm { position: relative; font-size: 11px; font-weight: 900; background: rgba(0,0,0,.6); width: 100%; text-align: center; padding: 3px 0; }
.mcard.lock img { filter: brightness(0) opacity(.5); }
.mcard .inParty { position: absolute; top: 4px; left: 4px; background: var(--gold); color: var(--ink); font-weight: 900; font-size: 11px; border-radius: 6px; padding: 0 6px; }
.mcard .dk { position: absolute; top: 4px; right: 4px; background: #b03dff; color: #fff; font-weight: 900; font-size: 11px; border-radius: 6px; padding: 0 6px; }
.monDetail { left: 800px; top: 84px; width: 456px; height: 616px; padding: 16px; display: flex; flex-direction: column; }
.monDetail .pic { height: 240px; display: flex; align-items: flex-end; justify-content: center; position: relative; background: radial-gradient(circle at 50% 70%, rgba(255,255,255,.12), transparent 60%); border-radius: 14px; }
.monDetail .pic img { max-height: 232px; max-width: 100%; }
.monDetail h3 { margin: 8px 0 2px; font-size: 26px; }
.monDetail .u { color: var(--sub); font-weight: 800; font-size: 14px; }
.monDetail .sk { background: rgba(0,0,0,.35); border-radius: 12px; padding: 10px 12px; margin-top: 8px; }
.monDetail .sk b { color: var(--gold); font-size: 18px; }
.monDetail .sk p { margin: 4px 0 0; font-size: 14px; font-weight: 700; line-height: 1.5; }
.formTabs { display: flex; gap: 6px; position: absolute; top: 8px; left: 8px; }
.partySlots { display: flex; gap: 10px; align-items: center; margin-top: auto; padding-top: 10px; }
.partySlots .slot { width: 64px; height: 64px; border-radius: 50%; border: 3px dashed rgba(255,255,255,.3); background: #1a1240 center/cover; position: relative; cursor: pointer; }
.partySlots .slot.f { border-style: solid; border-color: var(--gold); }
.partySlots .slot.lock { opacity: .3; cursor: default; }
.partySlots .slot .k { position: absolute; left: -4px; bottom: -4px; width: 24px; height: 24px; border-radius: 50%; background: var(--gold); color: var(--ink); font-weight: 900; display: flex; align-items: center; justify-content: center; }

/* ---------- 装備 ---------- */
.eqLeft { left: 24px; top: 84px; width: 420px; height: 616px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.eqSlot { display: flex; gap: 12px; align-items: center; background: rgba(0,0,0,.3); border-radius: 14px; padding: 10px; border: 2px solid rgba(255,255,255,.1); cursor: pointer; }
.eqSlot.sel { border-color: var(--gold); }
.eqSlot img { width: 72px; height: 72px; border-radius: 12px; border: 3px solid; background: rgba(0,0,0,.4); }
.eqSlot .sn { font-size: 13px; color: var(--sub); font-weight: 900; }
.eqSlot .in { font-size: 18px; font-weight: 900; }
.eqSlot .pk { font-size: 12px; color: #c8ffd8; font-weight: 700; }
.eqTotal { margin-top: auto; }
.eqList { left: 460px; top: 84px; width: 380px; height: 616px; padding: 12px; }
.eqTabs { display: flex; gap: 6px; margin-bottom: 8px; }
.eqTabs .btn { flex: 1; padding: 6px; font-size: 14px; }
.eqTabs .btn.sel { background: linear-gradient(180deg, #ffe27a, #ffb52e); color: var(--ink); }
.eqItems { height: 530px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; align-content: start; padding-right: 4px; }
.eqItem { aspect-ratio: 1; border-radius: 12px; border: 3px solid; background: rgba(0,0,0,.4); position: relative; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: transform .1s; }
.eqItem:hover { transform: scale(1.06); }
.eqItem.sel { box-shadow: 0 0 0 3px #fff; }
.eqItem img { width: 80%; height: 80%; }
.eqItem .lv { position: absolute; bottom: 1px; right: 4px; font-size: 11px; font-weight: 900; text-shadow: 0 1px 2px #000; }
.eqItem .lb { position: absolute; top: 1px; left: 4px; font-size: 11px; font-weight: 900; color: #ffb52e; text-shadow: 0 1px 2px #000; }
.eqItem .eq { position: absolute; top: -6px; right: -6px; background: var(--good); color: #022a12; font-size: 10px; font-weight: 900; border-radius: 6px; padding: 0 5px; }
.eqItem.unseen { filter: brightness(0) opacity(.4); cursor: default; }
.eqDetail { left: 856px; top: 84px; width: 400px; height: 616px; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.eqDetail .top { display: flex; gap: 12px; align-items: center; }
.eqDetail .top img { width: 96px; height: 96px; border-radius: 14px; border: 3px solid; background: rgba(0,0,0,.4); }
.eqDetail h3 { margin: 0; font-size: 22px; }
.rbadge { display: inline-block; font-family: var(--num); font-weight: 900; font-size: 13px; padding: 1px 8px; border-radius: 6px; color: var(--ink); }
.eqDetail .main { font-size: 18px; font-weight: 900; background: rgba(0,0,0,.3); border-radius: 12px; padding: 10px; }
.eqDetail .perk { font-size: 15px; font-weight: 800; color: #c8ffd8; background: rgba(40,120,70,.2); border: 1px solid rgba(92,255,154,.3); border-radius: 12px; padding: 10px; line-height: 1.5; }
.eqDetail .perk small { display: block; color: var(--sub); font-size: 12px; margin-top: 4px; }
.lbStars { color: #ffb52e; font-size: 18px; letter-spacing: 2px; }
.eqDetail .flavor { font-size: 13px; color: var(--sub); font-style: italic; }
.eqDetail .acts { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.eqDetail .acts .row { display: flex; gap: 8px; }
.eqDetail .acts .btn { flex: 1; font-size: 15px; padding: 8px; }
.diff.up { color: var(--good); } .diff.down { color: var(--bad); }

/* ---------- 元素ラボ ---------- */
.labMenu { left: 50%; top: 110px; transform: translateX(-50%); display: grid; grid-template-columns: repeat(3, 340px); gap: 18px; }
.labCard { height: 268px; }
.labCard .btn.small { padding: 5px 10px; font-size: 13px; }
.labPlay { inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.labQ { font-size: 64px; font-weight: 900; text-shadow: 0 4px 0 #000; }
.labQ ruby rt { font-size: 22px; color: var(--sub); }
.labTimer { font-family: var(--num); font-weight: 900; font-size: 40px; color: var(--gold); }
.labSeq { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; max-width: 1180px; margin: 20px 0; }
.labSeq .c { width: 54px; height: 60px; border-radius: 10px; background: rgba(255,255,255,.06); border: 2px solid rgba(255,255,255,.15); display: flex; flex-direction: column; align-items: center; justify-content: center; font-family: var(--num); font-weight: 900; font-size: 20px; }
.labSeq .c small { font-family: var(--font); font-size: 9px; color: var(--sub); }
.labSeq .c.done { background: rgba(92,255,154,.2); border-color: var(--good); }
.labSeq .c.cur { border-color: var(--gold); transform: scale(1.15); background: rgba(255,210,92,.15); }

/* ---------- 設定・その他 ---------- */
.setPanel { left: 50%; top: 84px; transform: translateX(-50%); width: 760px; height: 616px; padding: 22px 28px; }
.setRow { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.08); font-size: 18px; font-weight: 800; }
.setRow small { display: block; font-size: 12px; color: var(--sub); }
.setRow input[type=range] { width: 260px; accent-color: var(--gold); }
.seg { display: flex; gap: 4px; }
.seg .btn { padding: 6px 12px; font-size: 14px; }
.seg .btn.sel { background: linear-gradient(180deg, #ffe27a, #ffb52e); color: var(--ink); }
textarea.saveText { width: 100%; height: 120px; font-family: monospace; font-size: 12px; background: #0a0618; color: #fff; border: 2px solid var(--line); border-radius: 10px; padding: 8px; user-select: text; }
.achList { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ach { background: rgba(0,0,0,.3); border-radius: 12px; padding: 8px 12px; border: 2px solid rgba(255,255,255,.08); }
.ach.got { border-color: var(--gold); }
.ach b { font-size: 16px; }
.ach.got b { color: var(--gold); }
.ach div { font-size: 12px; color: var(--sub); font-weight: 700; }

/* ---------- バトル中 ---------- */
.tutBubble { left: 440px; bottom: 92px; display: flex; align-items: center; gap: 10px; background: rgba(255,250,230,.97); color: #2a1a00; border-radius: 18px; padding: 10px 18px 10px 10px; max-width: 560px; font-weight: 900; font-size: 18px; line-height: 1.5; box-shadow: 0 8px 24px rgba(0,0,0,.5); border: 3px solid var(--gold); animation: tutIn .35s cubic-bezier(.2,1.5,.4,1); transition: opacity .5s; pointer-events: none; }
.tutBubble img { width: 70px; height: 70px; }
.tutBubble.out { opacity: 0; }
@keyframes tutIn { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.loadBox { left: 50%; top: 50%; transform: translate(-50%, -50%); width: 520px; text-align: center; }
.loadBar { height: 16px; border-radius: 8px; background: rgba(255,255,255,.1); overflow: hidden; margin-top: 14px; border: 1px solid rgba(255,255,255,.2); }
.loadBar > div { height: 100%; width: 0; background: linear-gradient(90deg, #ffb52e, #ffe27a); transition: width .1s; }
.loadTip { margin-top: 18px; font-size: 16px; color: var(--sub); font-weight: 700; line-height: 1.6; min-height: 52px; }
.dropReveal { width: 760px; text-align: center; }
.darkJoinWrap { inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; }

/* ---------- v1.1 相棒・脈はっくん ---------- */
.advMyaku { position: absolute; pointer-events: none; transition: filter .3s, opacity .3s; filter: drop-shadow(0 10px 18px rgba(0,0,0,.45)); }
.advMyaku img { width: 100%; height: 100%; display: block; object-fit: contain; object-position: 50% 100%; transform-origin: 50% 100%; will-change: transform; }
.advMyaku.dim { filter: brightness(.55) drop-shadow(0 10px 18px rgba(0,0,0,.45)); }
.advMyaku.dark { filter: drop-shadow(0 0 22px rgba(255,40,110,.55)); }
.advMyaku.dark.dim { filter: brightness(.55) drop-shadow(0 0 16px rgba(255,40,110,.4)); }
.advMyaku.enter { animation: myakuIn .45s ease-out; }
.advMyaku.beat { animation: myakuBeat .8s ease-out; }
@keyframes myakuIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes myakuBeat { 0% { filter: drop-shadow(0 0 36px rgba(255,60,120,.95)); } 100% { filter: drop-shadow(0 10px 18px rgba(0,0,0,.45)); } }
.advName.myaku { background: linear-gradient(180deg, #ffd0e0, #ff6f9a); border-color: #fff0f6; color: #3a0018; }
.advName.myakuD { background: linear-gradient(180deg, #ff5c8a, #8a0a3a); border-color: #ffb0c8; color: #fff; }
.advName.mystery { background: linear-gradient(180deg, #8a6ac8, #3a1a6a); border-color: #c8b0ff; color: #fff; letter-spacing: .3em; }
.advBox.big .advText { font-size: 33px; color: #fff6e0; }
.advBox.shout { animation: shake .3s; }
.advBox.whisper { border-color: #9a7ae0; background: linear-gradient(180deg, rgba(30,12,50,.95), rgba(12,4,24,.97)); }
.advBox.whisper .advText { color: #d8c8ff; font-style: italic; letter-spacing: .06em; }
#ui.glitch .advChar, #ui.glitch .advMyaku, #ui.glitch .advBox { animation: glitchJit .12s steps(2) infinite; }
@keyframes glitchJit { 0% { transform: translate(-4px, 1px); filter: hue-rotate(40deg); } 50% { transform: translate(5px, -2px); } 100% { transform: translate(-2px, 2px); filter: none; } }
.tutBubble b { color: #c8306a; font-size: 14px; }
.practiceIn.kpop { animation: kpop .16s ease-out; }
@keyframes kpop { 0% { transform: scale(1.12); box-shadow: 0 0 26px var(--gold); } 100% { transform: none; } }
/* 拠点 */
.hubMenu { grid-template-rows: 1.5fr 1fr 1fr; }
.hcard.myaku { grid-column: 3; grid-row: 1 / span 2; background: radial-gradient(circle at 50% 60%, #ff9ac0 0%, #b03a7a 45%, #2a1040 100%); border-color: rgba(255,180,210,.6); }
.hcard.myaku .ht { font-size: 30px; }
.hcard.myaku .hs { color: #ffe0ec; }
.hubMyaku { position: absolute; left: 50%; bottom: 76px; width: 250px; height: 250px; object-fit: contain; object-position: 50% 100%; margin-left: -125px; transform-origin: 50% 100%; pointer-events: none; filter: drop-shadow(0 8px 10px rgba(0,0,0,.4)); }
.hubSay { position: absolute; left: 12px; right: 12px; top: 40px; background: #fff6fa; color: #5a1a34; border-radius: 14px; padding: 8px 12px; font-size: 14px; font-weight: 900; line-height: 1.45; opacity: 0; transform: translateY(-6px); transition: opacity .25s, transform .25s; border: 2px solid #ff8fb8; z-index: 2; }
.hubSay.in { opacity: 1; transform: none; }
.hubSet { right: 24px; top: 62px; z-index: 5; }
.hubDbg { right: 150px; top: 62px; z-index: 5; }
/* 脈はっくんのお部屋 */
.roomAv { left: 70px; bottom: 30px; width: 560px; height: 560px; cursor: pointer; }
.roomAv img { width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%; transform-origin: 50% 100%; display: block; pointer-events: none; filter: drop-shadow(0 14px 18px rgba(0,0,0,.45)); }
.roomSay { left: 120px; top: 70px; width: 470px; min-height: 64px; background: #fff6fa; color: #5a1a34; border-radius: 18px; padding: 14px 20px; font-size: 21px; font-weight: 900; line-height: 1.55; border: 3px solid #ff8fb8; box-shadow: 0 8px 24px rgba(0,0,0,.4); opacity: 0; transform: translateY(-8px); transition: opacity .25s, transform .25s; cursor: pointer; }
.roomSay.in { opacity: 1; transform: none; }
.roomSay .nx { position: absolute; right: 14px; bottom: 6px; font-size: 14px; color: #ff6f9a; animation: blink 1s infinite; }
.roomPanel { right: 30px; top: 80px; bottom: 18px; width: 520px; padding: 18px 22px; display: flex; flex-direction: column; gap: 11px; overflow: hidden; }
.roomName { display: flex; align-items: baseline; gap: 12px; } .roomName b { font-size: 32px; font-weight: 900; color: #ffd0e0; text-shadow: 0 3px 0 #3a0018; } .roomName span { color: #ffb0d0; font-weight: 900; font-size: 18px; }
.roomHearts { font-size: 26px; color: #ff6f9a; letter-spacing: 2px; text-shadow: 0 0 12px rgba(255,111,154,.6); }
.roomBar { height: 14px; border-radius: 7px; background: rgba(255,255,255,.1); overflow: hidden; border: 1px solid rgba(255,180,210,.4); } .roomBar > div { height: 100%; background: linear-gradient(90deg, #ff6f9a, #ffd0e0); }
.roomBtns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.roomBtns .btn { font-size: 19px; padding: 14px; }
.btn.pink { background: linear-gradient(180deg, #ffb0d0, #e0407a); color: #fff; border-color: #ffe0ec; }
.roomCos { display: flex; gap: 10px; }
.roomCos .cos { flex: 1; border-radius: 14px; border: 2px solid rgba(255,255,255,.2); background: rgba(255,255,255,.06); padding: 6px; text-align: center; cursor: pointer; font-weight: 900; font-size: 14px; position: relative; }
.roomCos .cos img { width: 100%; height: 84px; object-fit: contain; display: block; }
.roomCos .cos.sel { border-color: #ff8fb8; background: rgba(255,111,154,.22); box-shadow: 0 0 16px rgba(255,111,154,.5); }
.roomCos .cos.lock { filter: grayscale(1) brightness(.5); cursor: default; }
.roomCos .cos .lk { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 13px; color: #fff; text-shadow: 0 2px 0 #000; padding: 6px; }
.roomRewards { font-size: 13px; color: var(--sub); line-height: 1.6; flex: 1; min-height: 0; overflow: auto; }
.roomRewards .got { color: #ffd0e0; } .roomRewards .got::before { content: '♥ '; color: #ff6f9a; }
.roomRewards .no::before { content: '♡ '; }
.albumGrid { display: grid; grid-template-columns: repeat(11, 1fr); gap: 6px; width: 980px; max-height: 420px; overflow: auto; padding: 4px; }
.albumTabs { display: flex; gap: 8px; margin-bottom: 8px; }
.albumGrid .al { aspect-ratio: 1; border-radius: 10px; background: rgba(255,255,255,.06); border: 2px solid rgba(255,255,255,.1); display: flex; align-items: center; justify-content: center; font-size: 26px; color: rgba(255,255,255,.25); cursor: default; overflow: hidden; }
.albumGrid .al img { width: 100%; height: 100%; object-fit: contain; }
.albumGrid .al.on { border-color: rgba(255,143,184,.6); background: rgba(255,111,154,.12); cursor: pointer; }
.albumHead { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; font-weight: 900; }
.albumHead b { color: #ffd0e0; font-size: 22px; }
.resMyRow { left: 24px; top: 478px; width: 410px; display: flex; align-items: flex-end; gap: 8px; pointer-events: none; }
.resMyAv { width: 160px; height: 160px; flex: none; margin-top: -20px; }
.resMyAv img { width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%; transform-origin: 50% 100%; display: block; }
.resMyCol { flex: 1; display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.resMySay { background: #fff6fa; color: #5a1a34; border-radius: 14px; padding: 9px 12px; font-weight: 900; font-size: 15px; line-height: 1.5; border: 2px solid #ff8fb8; opacity: 0; transform: translateY(6px); transition: opacity .3s, transform .3s; }
.resMySay.in { opacity: 1; transform: none; }
.resBond { color: #ff8fb8; font-weight: 900; font-size: 15px; opacity: 0; transition: opacity .3s; }
.resBond.in { opacity: 1; }
.mcard.partner { border-color: #ff8fb8 !important; background: radial-gradient(circle at 50% 40%, rgba(255,143,184,.35), rgba(40,10,40,.6)) !important; }
.mcard .ptag { position: absolute; left: 6px; top: 6px; background: linear-gradient(180deg, #ffb0d0, #e0407a); color: #fff; font-size: 11px; font-weight: 900; border-radius: 8px; padding: 1px 7px; }
.roomCos .cos .lk { white-space: pre-line; text-align: center; }

/* =====================================================================
   v1.1 コミック風UI（拠点のデザインをもとに全体を統一）
   太い黒フチ・ずらし影・クリーム色の紙・黒板・黄色のボタン
   ===================================================================== */
:root { --line2: #12141d; --cream: #f6f0e1; --navy: #232838; --navy2: #1a1e2b; --yel: #ffd23d; --yel2: #ffb41f; }
.btn { background: linear-gradient(180deg, #3d4460, #262b3d); border: 3px solid var(--line2); border-radius: 12px; box-shadow: 0 4px 0 var(--line2); text-shadow: 0 2px 0 rgba(0,0,0,.35); }
.btn:active { box-shadow: 0 1px 0 var(--line2); }
.btn.primary { background: linear-gradient(180deg, #ffe46a, var(--yel) 45%, var(--yel2)); color: #1a1405; border-color: var(--line2); text-shadow: none; }
.btn.green { background: linear-gradient(180deg, #8af0a4, #3ec46a); color: #062a12; border-color: var(--line2); text-shadow: none; }
.btn.danger { background: linear-gradient(180deg, #ff8a96, #d8344c); border-color: var(--line2); }
.btn.pink { background: linear-gradient(180deg, #ffc0da, #ec5a92); border-color: var(--line2); }
.btn.small { border-width: 3px; box-shadow: 0 3px 0 var(--line2); }
.btn.sel, .seg .btn.sel { background: linear-gradient(180deg, #ffe46a, var(--yel2)); color: #1a1405; text-shadow: none; }
.btn.back { background: var(--cream); color: #1a1d2a; text-shadow: none; font-size: 17px; }
.panel { background: linear-gradient(180deg, #2a3045, #1c2030); border: 4px solid var(--line2); border-radius: 16px; box-shadow: 6px 7px 0 rgba(0,0,0,.35), inset 0 0 0 2px rgba(255,255,255,.07); }
.screenTitle { left: 50%; right: auto; transform: translateX(-50%); top: 10px; white-space: nowrap; background: linear-gradient(180deg, #34443f, #2a3833); border: 5px solid #7a5130; border-radius: 10px; padding: 4px 30px 6px; box-shadow: 0 5px 0 rgba(0,0,0,.35); color: #fdfcf6; text-shadow: 0 0 6px rgba(255,255,255,.25); font-size: 28px; }
.screenTitle small { color: rgba(255,255,255,.7); font-size: 12px; margin-top: -2px; }
.currency { gap: 10px; }
.cur { background: var(--navy); border: 3px solid var(--line2); border-radius: 24px; padding: 4px 16px 4px 6px; gap: 8px; font-size: 19px; box-shadow: 0 3px 0 rgba(0,0,0,.35); font-family: var(--num); }
.cur i { width: 28px; height: 28px; border: 2.5px solid var(--line2); font-family: var(--num); font-weight: 900; font-size: 15px; }
.cur.g i { background: radial-gradient(circle at 35% 30%, #fff3a0, #ffc928 55%, #d08a0a); color: #3a2400; }
.cur.s i.gem { background: none; border: none; }
.modal { background: linear-gradient(180deg, #2a3045, #1a1e2b); border: 4px solid var(--line2); box-shadow: 10px 12px 0 rgba(0,0,0,.4), inset 0 0 0 2px rgba(255,210,92,.45); }
.modalTitle { color: var(--yel); text-shadow: 0 3px 0 var(--line2); }
.atab { border: 3px solid var(--line2); background: var(--navy); box-shadow: 0 3px 0 rgba(0,0,0,.35); }
.atab.sel { background: linear-gradient(90deg, #ffe46a, var(--yel2)); color: #1a1405; }
.atab.sel .nm small, .atab.sel .pr { color: #3a2a00; }
.toast { border: 3px solid var(--line2); box-shadow: 0 0 0 2px var(--yel) inset, 4px 5px 0 rgba(0,0,0,.35); }

/* ---------- 拠点「理科室」 ---------- */
.hb-title { left: 16px; top: 4px; display: flex; align-items: center; gap: 6px; pointer-events: none; }
.hb-title .ic { display: flex; filter: drop-shadow(0 3px 0 rgba(0,0,0,.35)); }
.hb-title .t { font-size: 66px; font-weight: 900; color: #fdfcf6; letter-spacing: .02em; -webkit-text-stroke: 3px var(--line2); paint-order: stroke fill; text-shadow: 0 5px 0 rgba(0,0,0,.4); line-height: 1; margin-right: 18px; }
.hb-title .tag { font-size: 19px; font-weight: 800; color: rgba(255,255,255,.9); transform: rotate(-5deg); line-height: 1.3; letter-spacing: .04em; text-shadow: 0 0 4px rgba(255,255,255,.25); }
.hb-title .doodle { display: flex; margin-left: 10px; transform: rotate(10deg); }
.hb-chalk { left: 690px; top: 12px; font-size: 19px; font-weight: 800; color: rgba(255,255,255,.82); transform: rotate(-6deg); line-height: 1.3; pointer-events: none; letter-spacing: .05em; }
.currency.hb-cur { right: 168px; top: 14px; }
.hb-set { right: 34px; top: 12px; height: 46px; padding: 0 16px 0 10px; display: flex; align-items: center; gap: 6px; background: var(--cream); color: #1a1d2a; border: 3px solid var(--line2); border-radius: 12px; box-shadow: 0 4px 0 var(--line2); font-family: var(--font); font-weight: 900; font-size: 20px; cursor: pointer; transition: transform .08s; }
.hb-set:hover { transform: translateY(-2px); } .hb-set:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--line2); }
.hb-set span { display: flex; }
.hb-dbg { right: 34px; top: 64px; z-index: 6; }

.hb-prof { left: 22px; top: 96px; width: 372px; height: 318px; background: var(--cream); border: 5px solid var(--line2); border-radius: 12px; box-shadow: 7px 8px 0 rgba(0,0,0,.35); padding: 14px 18px; color: #1a1d2a; z-index: 2; display: flex; flex-direction: column; gap: 8px; background-image: radial-gradient(rgba(0,0,0,.035) 1px, transparent 1.5px); background-size: 7px 7px; animation: hbIn .4s cubic-bezier(.2,1.3,.4,1) both; }
.hb-prof .nm { display: flex; align-items: baseline; gap: 18px; }
.hb-prof .nm b { font-size: 40px; font-weight: 900; letter-spacing: .02em; }
.hb-prof .lv { font-family: var(--num); font-size: 38px; font-weight: 900; color: var(--yel); -webkit-text-stroke: 3px var(--line2); paint-order: stroke fill; transform: skewX(-8deg); display: inline-block; text-shadow: 0 3px 0 rgba(0,0,0,.25); }
.hb-prof .ex { font-size: 15px; font-weight: 900; margin-top: -6px; }
.hb-bar { height: 16px; border-radius: 10px; background: #d9d2bf; border: 3px solid var(--line2); overflow: hidden; position: relative; flex: none; }
.hb-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 8px; }
.hb-bar.blue i { background: linear-gradient(180deg, #8ad4ff, #2f8fe8); box-shadow: inset 0 3px 0 rgba(255,255,255,.4); }
.hb-bar.green i { background: linear-gradient(180deg, #7ef09a, #26b04f); box-shadow: inset 0 3px 0 rgba(255,255,255,.4); }
.hb-stats { display: flex; gap: 8px; margin-top: 2px; }
.hb-stat { flex: 1; background: var(--navy); border: 3px solid var(--line2); border-radius: 12px; padding: 8px 2px 6px; min-width: 0; box-shadow: 0 3px 0 rgba(0,0,0,.3); }
.hb-stat .l { display: flex; align-items: center; justify-content: center; gap: 2px; color: #fff; font-size: 12px; font-weight: 900; white-space: nowrap; letter-spacing: -.03em; }
.hb-stat .l svg { width: 17px; height: 17px; }
.hb-stat .l span { display: flex; }
.hb-stat .v { font-family: var(--num); font-size: 33px; font-weight: 900; text-align: center; line-height: 1.15; -webkit-text-stroke: 2px var(--line2); paint-order: stroke fill; }
.hb-stat.atk .v { color: #ff7a5a; } .hb-stat.hp .v { color: #5ce08a; } .hb-stat.focus .v { color: #62bcff; }
.hb-learn { background: #fffdf6; border: 3px solid var(--line2); border-radius: 12px; padding: 8px 12px 10px; display: flex; flex-direction: column; gap: 6px; margin-top: auto; }
.hb-learn .row { display: flex; align-items: center; gap: 8px; }
.hb-learn .row > span:first-child { display: flex; }
.hb-learn .lb { font-size: 18px; font-weight: 900; flex: 1; }
.hb-learn .num { font-family: var(--num); font-size: 22px; font-weight: 900; }
.hb-learn .num b { font-size: 36px; }

.hb-dest { left: 378px; top: 74px; width: 566px; height: 346px; z-index: 1; animation: hbIn .45s .05s cubic-bezier(.2,1.3,.4,1) both; }
.hb-dest .art { position: absolute; inset: 0; border: 5px solid var(--line2); border-radius: 10px; background-size: cover; background-position: center; box-shadow: 7px 8px 0 rgba(0,0,0,.35); transform: skewX(-3deg); }
.hb-dest .art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 55%, rgba(0,0,0,.35)); border-radius: 6px; }
.hb-dest .tag { position: absolute; left: 40px; top: 18px; background: var(--navy); color: #fff; font-weight: 900; font-size: 15px; padding: 3px 14px; border: 3px solid var(--line2); transform: skewX(-10deg); z-index: 2; }
.hb-dest .plate { position: absolute; left: 48px; top: 40px; max-width: 470px; background: linear-gradient(180deg, #fbf1d6, #ecdcb4); border: 3px solid #4a3418; padding: 10px 22px 8px; transform: rotate(-1.5deg); box-shadow: 4px 5px 0 rgba(0,0,0,.3); color: #1a1d2a; clip-path: polygon(0 4%, 3% 0, 97% 2%, 100% 0, 99% 96%, 96% 100%, 2% 98%, 0 100%); }
.hb-dest .plate .ttl { font-size: 40px; font-weight: 900; line-height: 1.15; white-space: nowrap; }
.hb-dest .plate .sub { font-size: 15px; font-weight: 800; color: #3a3424; }
.hb-go { position: absolute; left: 48px; top: 196px; width: 474px; height: 116px; background: none; border: none; padding: 0; cursor: pointer; filter: drop-shadow(6px 7px 0 rgba(0,0,0,.4)); transition: transform .1s; animation: goPulse 2.2s ease-in-out infinite; }
.hb-go::before { content: ''; position: absolute; inset: 0; background: var(--line2); clip-path: polygon(7% 0, 92% 0, 100% 50%, 92% 100%, 7% 100%, 0 50%); }
.hb-go .in { position: absolute; inset: 6px 9px; background: linear-gradient(180deg, #ffe874 0%, var(--yel) 50%, #ffb21a 100%); clip-path: polygon(7% 0, 92% 0, 100% 50%, 92% 100%, 7% 100%, 0 50%); display: flex; align-items: center; justify-content: center; gap: 14px; overflow: hidden; }
.hb-go .in::after { content: ''; position: absolute; top: 0; bottom: 0; width: 60px; left: -80px; background: linear-gradient(90deg, transparent, rgba(255,255,255,.7), transparent); transform: skewX(-20deg); animation: goShine 2.6s ease-in-out infinite; }
.hb-go b { font-size: 70px; font-weight: 900; color: #15151f; letter-spacing: .04em; line-height: 1; }
.hb-go .chev { font-size: 88px; font-weight: 900; color: #15151f; line-height: .8; margin-top: -10px; }
.hb-go .key { position: absolute; right: -22px; bottom: -26px; background: linear-gradient(180deg, #ffffff, #dfe3ea); color: #1a1d2a; border: 3px solid var(--line2); border-radius: 10px; padding: 6px 12px; font-family: var(--num); font-weight: 900; font-size: 20px; box-shadow: 0 5px 0 var(--line2); transform: rotate(4deg); }
.hb-go:hover { transform: translateY(-3px) scale(1.02); } .hb-go:active { transform: translateY(3px) scale(.99); }
@keyframes goPulse { 0%, 100% { transform: none; } 50% { transform: scale(1.025); } }
@keyframes goShine { 0%, 55% { left: -80px; } 100% { left: 110%; } }
@keyframes hbIn { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }

.hb-partner { left: 948px; top: 66px; width: 308px; height: 352px; border: 5px solid var(--line2); border-radius: 12px; overflow: hidden; cursor: pointer; transform: rotate(1.2deg); box-shadow: 7px 8px 0 rgba(0,0,0,.35); background-color: #fcd6e5; background-image: radial-gradient(circle at 20% 15%, rgba(255,255,255,.9), rgba(255,255,255,0) 45%), radial-gradient(rgba(255,110,160,.35) 1.6px, transparent 2.2px); background-size: auto, 10px 10px; transition: transform .12s; animation: hbIn .45s .1s cubic-bezier(.2,1.3,.4,1) both; }
.hb-partner:hover { transform: rotate(0deg) translateY(-3px); }
.hb-partner .av { position: absolute; right: -46px; bottom: -34px; width: 340px; height: 340px; object-fit: contain; object-position: 50% 100%; transform-origin: 50% 100%; pointer-events: none; filter: drop-shadow(0 6px 6px rgba(120,30,70,.35)); }
.hb-partner .say { position: absolute; left: 12px; top: 14px; width: 168px; font-size: 22px; font-weight: 900; color: #2a1a24; line-height: 1.25; transform: rotate(-8deg); z-index: 2; text-shadow: 0 0 6px #fff, 0 0 10px #fff; opacity: 0; }
.hb-partner .say.in { animation: sayIn .45s cubic-bezier(.2,1.5,.4,1) both; }
@keyframes sayIn { from { opacity: 0; transform: rotate(-8deg) scale(.6); } to { opacity: 1; transform: rotate(-8deg); } }
.hb-partner .ht { position: absolute; color: #ff4f8b; font-size: 34px; line-height: 1; animation: htFloat 2.6s ease-in-out infinite; }
.hb-partner .h1 { right: 20px; top: 18px; } .hb-partner .h2 { left: 14px; top: 160px; font-size: 30px; animation-delay: .8s; } .hb-partner .h3 { right: 110px; top: 40px; font-size: 20px; animation-delay: 1.4s; }
@keyframes htFloat { 0%, 100% { transform: translateY(0) rotate(-8deg); } 50% { transform: translateY(-8px) rotate(8deg); } }
.hb-partner .plate { position: absolute; left: 12px; right: 12px; bottom: 12px; background: #fffaf0; border: 3px solid var(--line2); border-radius: 10px; padding: 6px 12px 7px; color: #1a1d2a; z-index: 3; box-shadow: 0 3px 0 rgba(0,0,0,.25); }
.hb-partner .plate b { font-size: 25px; font-weight: 900; display: block; line-height: 1.2; }
.hb-partner .plate div { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 900; white-space: nowrap; }
.hb-partner .hearts { color: #ff3f7f; font-size: 14px; letter-spacing: -1px; } .hb-partner .hearts i { font-style: normal; color: #2a1a24; opacity: .8; }
.hb-partner .key, .hb-card .key { position: absolute; background: rgba(255,255,255,.92); color: #1a1d2a; border: 2px solid var(--line2); border-radius: 6px; font-family: var(--num); font-weight: 900; font-size: 12px; padding: 0 6px; z-index: 4; box-shadow: 0 2px 0 var(--line2); }
.hb-partner .key { right: 12px; bottom: 88px; }

.hb-cards { left: 46px; top: 432px; width: 1192px; height: 160px; display: flex; gap: 10px; }
.hb-card { position: relative; flex: 1; border: 4px solid var(--line2); border-radius: 10px; transform: skewX(-8deg); overflow: hidden; cursor: pointer; box-shadow: 6px 7px 0 rgba(0,0,0,.35); transition: transform .12s, filter .12s; animation: cardIn .45s cubic-bezier(.2,1.3,.4,1) both; }
.hb-card:nth-child(1) { animation-delay: .12s; } .hb-card:nth-child(2) { animation-delay: .17s; } .hb-card:nth-child(3) { animation-delay: .22s; } .hb-card:nth-child(4) { animation-delay: .27s; } .hb-card:nth-child(5) { animation-delay: .32s; }
@keyframes cardIn { from { opacity: 0; transform: skewX(-8deg) translateY(24px); } to { opacity: 1; transform: skewX(-8deg); } }
.hb-card:hover { transform: skewX(-8deg) translateY(-5px); filter: brightness(1.08); }
.hb-card:active { transform: skewX(-8deg) translateY(2px); }
.hb-card.table { background: linear-gradient(180deg, #7cc6ff, #3b8fe0); } .hb-card.mon { background: linear-gradient(180deg, #a8e688, #5cb84a); } .hb-card.equip { background: linear-gradient(180deg, #ffd56a, #f2a52e); } .hb-card.lab { background: linear-gradient(180deg, #84c8ff, #3a86d8); } .hb-card.mis { background: linear-gradient(180deg, #ffc36a, #f08a2e); }
.hb-card::before { content: ''; position: absolute; inset: 0; background: radial-gradient(rgba(255,255,255,.22) 1.4px, transparent 2px); background-size: 9px 9px; }
.hb-card .art { position: absolute; left: -20px; right: -20px; top: 0; bottom: 46px; transform: skewX(8deg); display: flex; align-items: center; justify-content: center; }
.hb-card .art img { max-width: 100%; max-height: 112%; object-fit: contain; filter: drop-shadow(3px 4px 0 rgba(0,0,0,.25)); }
.hb-card.mon .art img { height: 150%; max-height: none; margin-top: 30px; }
.hb-card .lbl { position: absolute; left: 0; right: 0; bottom: 0; height: 50px; background: #1f2332; border-top: 4px solid var(--line2); display: flex; align-items: center; justify-content: center; transform: skewX(0); }
.hb-card .lbl { color: #fff; font-size: 30px; font-weight: 900; letter-spacing: .03em; text-shadow: 0 3px 0 rgba(0,0,0,.5); }
.hb-card.mis .lbl { font-size: 25px; }
.hb-card .key { left: 14px; top: 8px; transform: skewX(8deg); }
.hb-card .chip { position: absolute; right: 12px; top: 8px; transform: skewX(8deg); background: rgba(18,20,29,.82); color: #fff; font-size: 12px; font-weight: 900; padding: 1px 8px; border-radius: 8px; z-index: 3; font-family: var(--num); }
.hb-card .badge { top: 8px; right: 14px; transform: skewX(8deg); z-index: 4; }

.hb-mis { left: 150px; top: 602px; width: 944px; height: 62px; background: linear-gradient(180deg, #262b3d, #191c28); border: 3px solid #c9a75a; border-radius: 14px; box-shadow: 0 0 0 3px var(--line2), 6px 8px 0 3px rgba(0,0,0,.3); display: flex; align-items: center; gap: 14px; padding: 0 12px 0 20px; color: #fff; cursor: pointer; animation: hbIn .45s .3s cubic-bezier(.2,1.3,.4,1) both; }
.hb-mis .hd { display: flex; align-items: center; gap: 8px; color: var(--yel); font-size: 20px; font-weight: 900; white-space: nowrap; padding-right: 14px; border-right: 2px solid rgba(255,255,255,.2); }
.hb-mis .hd span { display: flex; }
.hb-mis .txt { flex: 1; min-width: 0; font-size: 18px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hb-mis .mbar { width: 160px; height: 16px; background: #3a4058; border-color: #0b0d14; }
.hb-mis .cnt { font-family: var(--num); font-size: 19px; font-weight: 900; width: 66px; text-align: center; }
.hb-mis .get { height: 46px; min-width: 150px; white-space: nowrap; padding: 0 18px; border-radius: 24px; border: 3px solid var(--line2); background: linear-gradient(180deg, #ffe874, var(--yel) 50%, #ffb21a); color: #1a1405; font-family: var(--font); font-size: 22px; font-weight: 900; display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; box-shadow: 0 4px 0 var(--line2); animation: getPulse 1.2s ease-in-out infinite; }
.hb-mis .get span { display: flex; }
.hb-mis .get.off { background: #3a4058; color: rgba(255,255,255,.75); animation: none; font-size: 17px; cursor: default; }
@keyframes getPulse { 0%, 100% { transform: none; } 50% { transform: scale(1.05); } }
.hb-mis .dots { position: absolute; left: 50%; bottom: 3px; display: flex; gap: 5px; transform: translateX(-50%); }
.hb-mis .dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.3); } .hb-mis .dots i.ok { background: #5ce08a; } .hb-mis .dots i.on { background: var(--yel); }
/* 会話ウィンドウもコミック風に */
.advBox { background: linear-gradient(180deg, rgba(38,43,61,.97), rgba(25,28,40,.98)); border: 4px solid var(--line2); box-shadow: inset 0 0 0 3px #c9a75a, 6px 8px 0 rgba(0,0,0,.35); }
.advName { border: 3px solid var(--line2); box-shadow: 0 3px 0 var(--line2); transform: skewX(-6deg); }
.advText { text-shadow: 0 2px 0 rgba(0,0,0,.35); }
.resPanel .stat, .resStats .stat { border: 3px solid var(--line2); background: var(--navy); border-radius: 12px; }
/* 新元素カード：白い元素タイル風 */
.ecard { height: 420px; }
.ecard .face { border: 5px solid var(--line2) !important; box-shadow: 8px 10px 0 rgba(0,0,0,.35); border-radius: 18px; }
.ecard .face.back { background: linear-gradient(180deg, #ffffff, #f1ece0); color: #1a1d2a; padding: 14px 16px; }
.ecard .face.back::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 10px; background: currentColor; opacity: 0; }
.ecard .front { background: repeating-linear-gradient(45deg, #2c3350 0 14px, #252b44 14px 28px); }
.ecard .front .q { -webkit-text-stroke: 4px var(--line2); paint-order: stroke fill; color: var(--yel); }
.ecard .art { height: 92px; border-radius: 10px; }
.ecard .sym { font-size: 96px; -webkit-text-stroke: 4px var(--line2); paint-order: stroke fill; text-shadow: 0 5px 0 rgba(0,0,0,.25); }
.ecard .nm ruby rt { color: #5a5468; }
.ecard .cat { border: 2px solid var(--line2); }
.ecard .fact { color: #3a3448; font-size: 14px; line-height: 1.5; }
.introTitle { color: #fdfcf6; -webkit-text-stroke: 2px var(--line2); paint-order: stroke fill; }
.introHint { color: #fdfcf6; text-shadow: 0 2px 0 var(--line2), 0 0 6px rgba(0,0,0,.6); }
.practiceQ { text-shadow: 0 2px 0 var(--line2), 0 0 8px rgba(0,0,0,.6); }
.practiceIn { background: var(--navy); border: 4px solid var(--line2); box-shadow: 0 0 0 3px var(--yel) inset, 5px 6px 0 rgba(0,0,0,.35); color: #fff; }

/* サウンドテスト */
.sndStat { font-weight: 800; margin-bottom: 8px; font-size: 15px; }
.sndStat small { display: block; font-size: 12px; color: var(--sub); font-weight: 700; }
.sndList { width: 720px; max-height: 430px; overflow-y: auto; padding-right: 6px; }
.sndCat { margin: 10px 0 4px; font-weight: 900; font-size: 14px; color: var(--yel, #ffd25c); }
.sndRow { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 10px; cursor: pointer; background: rgba(255,255,255,.05); margin-bottom: 4px; border: 2px solid transparent; }
.sndRow:hover { background: rgba(255,255,255,.12); }
.sndRow.on { border-color: var(--yel, #ffd25c); background: rgba(255,210,92,.14); }
.sndNo { font-family: monospace; font-weight: 900; opacity: .6; width: 22px; }
.sndName { flex: 1; font-weight: 800; font-size: 15px; }
.sndName small { display: block; font-size: 11px; opacity: .65; font-weight: 700; }
.sndBadge { font-size: 12px; font-weight: 900; padding: 2px 8px; border-radius: 999px; background: rgba(255,255,255,.12); white-space: nowrap; }
.sndBadge.ok { background: #2fbf71; color: #fff; }
.sndBadge.sub { background: #8a7a4a; color: #fff; }
.sndBadge.no { background: #6b4a5a; color: #fff; }
.sndPlay { font-size: 18px; width: 22px; text-align: center; }

/* ストーリーの挿し絵（絵本タッチ） */
.advCG { position: absolute; inset: 0; opacity: 0; pointer-events: none; transition: opacity .8s ease; background: #efe4cf; overflow: hidden; }
.advCG.on { opacity: 1; }
.advCG img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform-origin: 50% 45%; }
.advCG.on img { animation: cgDrift 16s ease-out forwards; }
@keyframes cgDrift { from { transform: scale(1.0); } to { transform: scale(1.05); } }
.advCG .cgPaper { position: absolute; inset: 0; box-shadow: inset 0 0 0 10px rgba(245,236,214,.9), inset 0 0 0 13px rgba(120,90,60,.35), inset 0 0 90px rgba(80,50,20,.35); }
.advCG.flash::after { content: ''; position: absolute; inset: 0; background: #fffbe8; animation: cgFlash .7s ease-out forwards; }
@keyframes cgFlash { from { opacity: .85; } to { opacity: 0; } }
.advChars { transition: opacity .6s; }
.advChars.cgHide { opacity: 0; }
/* 思い出の絵本 */
.bookGrid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; width: 940px; max-height: 440px; overflow: auto; padding: 4px; }
.bookGrid .bk { border-radius: 12px; background: rgba(255,255,255,.06); border: 2px solid rgba(255,255,255,.1); padding: 6px; cursor: default; }
.bookGrid .bk.on { border-color: rgba(255,210,150,.6); background: rgba(255,230,190,.10); cursor: pointer; }
.bookGrid .bk.on:hover { transform: translateY(-2px); }
.bookGrid .bkImg { aspect-ratio: 3 / 2; border-radius: 8px; background: #2a2440 center / cover no-repeat; display: flex; align-items: center; justify-content: center; font-size: 30px; color: rgba(255,255,255,.25); }
.bookGrid .bk.on .bkImg { background-color: #efe4cf; box-shadow: inset 0 0 0 3px rgba(245,236,214,.8); }
.bookGrid .bkImg.noimg { color: #8a6a4a; }
.bookGrid .bkT { font-weight: 900; font-size: 13px; margin-top: 5px; line-height: 1.3; }
.bookGrid .bk small { font-size: 11px; color: #b8acd8; }
.bvPic { position: relative; width: 705px; height: 470px; border-radius: 10px; overflow: hidden; background: #efe4cf; box-shadow: inset 0 0 0 6px rgba(245,236,214,.9); margin: 0 auto; }
.bvPic img { width: 100%; height: 100%; object-fit: contain; display: block; }
.bvPic .bvNone { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; color: #7a5a3a; font-weight: 800; font-size: 15px; }
.bvPic.noimg .bvNone { display: flex; }
.bvCap { margin-top: 10px; text-align: center; }
.bvCap b { display: block; color: #ffe2b8; font-size: 18px; }
.bvCap small { display: block; color: #e8e0ff; font-size: 14px; margin-top: 4px; }
.roomBtns .btn:nth-child(3) { grid-column: span 2; padding: 10px; font-size: 17px; }

/* 拠点：装備カードの絵（<img>を重ねる） */
.hb-card .art .eqArt { position: relative; width: 100%; aspect-ratio: 380 / 210; max-height: 100%; }
.hb-card .art .eqArt img { position: absolute; height: auto; object-fit: contain; filter: drop-shadow(5px 6px 0 rgba(0,0,0,.3)); }

/* マップ：正体不明の最終ボス */
.node .qBoss { width: 112px; height: 112px; display: flex; align-items: center; justify-content: center; font-size: 60px; font-weight: 900; color: #ffb0c8; background: radial-gradient(circle, #3a1030, #12060f); border-radius: 50%; box-shadow: 0 0 18px rgba(255,60,120,.5); }

/* 挿し絵が出ているあいだ：絵の上下の見せ方と、会話ウィンドウを少しすかす */
.advCG img { object-position: 50% 32%; }
.advBox.onCG { background: linear-gradient(180deg, rgba(20,14,44,.76), rgba(10,6,24,.86)); }

/* サウンドテスト：効果音ボタン */
.sndSeGrid{display:flex;flex-wrap:wrap;gap:6px;padding:6px 4px 12px}
.sndSeGrid .btn.small{font-size:14px;padding:5px 10px}

/* ステータスの説明（拠点のタイル・装備画面） */
.hb-stat { position: relative; cursor: pointer; transition: transform .12s; }
.hb-stat:hover { transform: translateY(-2px); }
.hb-stat .d { font-size: 10.5px; font-weight: 900; color: #cfe0ff; text-align: center; white-space: nowrap; letter-spacing: -.04em; margin-top: -2px; }
.hb-stat .q { position: absolute; right: 4px; top: 3px; width: 15px; height: 15px; border-radius: 50%; background: rgba(255,255,255,.18); color: #fff; font: 900 11px/15px sans-serif; text-align: center; font-style: normal; }
.statRow .stat.help { cursor: pointer; position: relative; }
.statRow .stat .d { font-size: 11px; color: #b8acd8; font-weight: 800; margin-top: 2px; }
/* お守り×4 */
.eqCharms { background: rgba(0,0,0,.3); border-radius: 14px; padding: 8px 10px; border: 2px solid rgba(255,255,255,.1); }
.eqCharms .sn { font-size: 13px; color: var(--sub); font-weight: 900; margin-bottom: 6px; }
.eqCharms .pk { font-size: 11.5px; color: #c8ffd8; font-weight: 700; margin-top: 6px; line-height: 1.45; max-height: 50px; overflow: hidden; }
.eqCharmRow { display: flex; gap: 8px; }
.eqCharm { position: relative; flex: 1; aspect-ratio: 1; max-width: 72px; border-radius: 12px; border: 2px solid rgba(255,255,255,.15); background: rgba(0,0,0,.35); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.eqCharm.sel { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(255,210,92,.35); }
.eqCharm img { width: 100%; height: 100%; border-radius: 10px; border: 3px solid; box-sizing: border-box; }
.eqCharm .plus { font-size: 26px; color: rgba(255,255,255,.35); font-weight: 900; }
.eqCharm .no { position: absolute; left: -6px; top: -6px; width: 20px; height: 20px; border-radius: 50%; background: #ffd25c; color: #2a1600; font: 900 12px/20px sans-serif; text-align: center; }
.eqSlot img { width: 60px; height: 60px; }
.eqSlot { padding: 8px 10px; }
/* ステータスのひみつ */
.shWrap { display: flex; flex-direction: column; gap: 10px; max-width: 760px; }
.shCard { border: 3px solid; border-radius: 14px; padding: 10px 14px; background: rgba(0,0,0,.28); }
.shCard.on { box-shadow: 0 0 0 4px rgba(255,210,92,.4); }
.shHead { display: flex; align-items: center; gap: 8px; font-size: 20px; }
.shHead .shIc { font-size: 24px; }
.shHead .shVal { margin-left: auto; font-size: 28px; font-weight: 900; }
.shBig { font-size: 17px; font-weight: 900; margin: 4px 0 2px; }
.shEx { font-size: 14px; color: #ffe9a8; font-weight: 800; margin-bottom: 4px; }
.shRow { font-size: 13px; color: #d8d0f0; font-weight: 700; margin-top: 3px; }
.shTag { display: inline-block; font-size: 11px; font-weight: 900; padding: 1px 7px; border-radius: 8px; background: rgba(255,255,255,.15); margin-right: 6px; }
.shTag.up { background: #2f7a4a; }

/* リザルト：NEW RECORD／レアドロップのため */
.resStats .stat { position: relative; }
.resStats .stat.newRec { border-color: #ffe14a; box-shadow: 0 0 0 3px rgba(255,225,74,.35), 0 0 22px rgba(255,200,60,.55); animation: recPulse 1s ease-in-out infinite alternate; }
.newRecTag { position: absolute; top: -11px; right: -6px; background: linear-gradient(90deg,#ff5ca8,#ffd25c); color: #2a0a10; font: 900 11px/1 sans-serif; padding: 3px 7px; border-radius: 8px; transform: rotate(6deg); animation: recPop .4s cubic-bezier(.2,1.8,.4,1); white-space: nowrap; }
@keyframes recPop { from { transform: scale(0) rotate(-20deg); } to { transform: scale(1) rotate(6deg); } }
@keyframes recPulse { from { filter: brightness(1); } to { filter: brightness(1.25); } }
.loot.mystery { align-items: center; justify-content: center; background: radial-gradient(circle, var(--rc) 0%, rgba(0,0,0,.55) 70%); box-shadow: 0 0 26px var(--rc); transition: transform .05s; }
.loot.mystery .q { font: 900 54px/1 sans-serif; color: #fff; text-shadow: 0 0 14px var(--rc), 0 3px 0 rgba(0,0,0,.5); }
.loot.mystery.ur { background: conic-gradient(from 0deg, #ff5ca8, #ffd25c, #5cffb0, #5cc8ff, #c77dff, #ff5ca8); animation: urSpin 1s linear infinite; }
@keyframes urSpin { to { filter: hue-rotate(360deg); } }

/* 脈はっくんがいない期間（闇堕ち〜最終決戦） */
.hb-partner.away .av { filter: grayscale(1) brightness(.45) contrast(1.1); opacity: .75; }
.hb-partner.away .ht { display: none; }
.hb-partner.away { background: linear-gradient(160deg, #3a2440, #1a1024) !important; }
.hb-partner.away .say { color: #b8a8c8; }
.resMyRow.away .resMyAv img { filter: grayscale(1) brightness(.45); opacity: .7; }
.resMyRow.away .resMySay, .resMyRow.away .resBond { color: #b8a8c8; }
.mcard.partner.away img { filter: grayscale(1) brightness(.5); }
.mcard.partner.away .ptag { background: #5a4868; }
.monDetail.away .pic img { filter: grayscale(1) brightness(.45); opacity: .75; }
.verText .credit { color: rgba(255,255,255,.55); }

/* ---------- 理科モン：レベル・特訓（1.2.0） ---------- */
.mcard .lvTag { position: absolute; right: 4px; top: 4px; background: rgba(10,6,24,.85); color: #fff; font: 900 11px Arial, sans-serif; padding: 1px 6px; border-radius: 8px; border: 1px solid rgba(255,255,255,.25); }
.mcard .lvTag.kai { color: #7fe6ff; border-color: #7fe6ff; }
.mcard .lvTag.shin { color: #ffe14a; border-color: #ffe14a; box-shadow: 0 0 8px rgba(255,225,74,.6); }
.monDetail .pic { height: 178px; }
.monDetail .pic img { max-height: 172px; }
.monDetail h3 { display: flex; align-items: baseline; gap: 10px; font-size: 24px; margin-top: 6px; }
.monLv { font: 900 22px "Arial Black", Arial, sans-serif; color: #ffe14a; text-shadow: 0 2px 0 #3a2400; }
.monLv.pop { animation: monLvPop .6s ease-out; }
@keyframes monLvPop { 0% { transform: scale(2.2); filter: brightness(2); } 60% { transform: scale(.9); } 100% { transform: scale(1); } }
.monExp { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-size: 12px; font-weight: 800; color: var(--sub); }
.monExp .bar { flex: 1; height: 8px; border-radius: 4px; background: rgba(255,255,255,.12); overflow: hidden; }
.monExp .bar div { height: 100%; background: linear-gradient(90deg, #5cc8ff, #7fffd0); transition: width .5s; }
.monStat { display: flex; gap: 12px; margin-top: 6px; font-size: 13px; font-weight: 800; }
.monStat b { color: var(--sub); font-weight: 800; margin-right: 2px; }
.monDetail .sk .skLv { float: right; font-size: 12px; font-weight: 900; color: #b8acd8; }
.monDetail .sk.kai { box-shadow: inset 0 0 0 2px rgba(127,230,255,.5); }
.monDetail .sk.kai b { color: #7fe6ff; }
.monDetail .sk.shin { box-shadow: inset 0 0 0 2px rgba(255,225,74,.7), 0 0 14px rgba(255,225,74,.25); }
.monTrain { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.monTrain span { font-size: 12px; font-weight: 800; color: #ffd447; margin-left: auto; }
.monTrain .btn.dis { opacity: .45; }
.partyHead { display: flex; align-items: baseline; gap: 8px; margin-top: auto; padding-top: 8px; font-size: 13px; }
.partyHead span { font-size: 11px; color: var(--sub); font-weight: 800; }
.partySlots { margin-top: 4px; padding-top: 0; gap: 8px; }
.partySlots .slot { width: 50px; height: 50px; }
.partySlots .slot .k { width: 20px; height: 20px; font-size: 12px; }
.partySlots .slot .lk { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.partySlots .slot .lv { position: absolute; right: -6px; top: -6px; background: rgba(10,6,24,.9); color: #ffe14a; font: 900 10px Arial, sans-serif; padding: 0 4px; border-radius: 6px; }
.siParty { gap: 6px; }
.siParty .monIcon { width: 52px; height: 52px; }

.resMons { display: flex; gap: 8px; flex-wrap: wrap; margin: 2px 0 2px; }
.resMons .rm { display: flex; flex-direction: column; align-items: center; width: 56px; font-size: 11px; font-weight: 900; color: #cfc6ee; }
.resMons .rm .ic { width: 42px; height: 42px; border-radius: 50%; border: 3px solid; background: #1a1240 center/cover; }
.resMons .rm b { font: 900 12px Arial, sans-serif; color: #fff; }
.resMons .rm small { color: #7fe6ff; font-size: 10px; }
.resMons .rm.up b { color: #ffe14a; animation: monLvPop .6s ease-out; }
.resMons .rm.up .ic { box-shadow: 0 0 14px #ffe14a; }
.resPanel { top: 52px; height: 620px; gap: 9px; }
.resLoot { min-height: 104px; }
.resMons { align-items: center; }
.resMons .lb { font-size: 12px; font-weight: 900; color: #ffd25c; margin-right: 2px; }
.resMons .rm { flex-direction: row; width: auto; gap: 4px; }
.resMons .rm .ic { width: 34px; height: 34px; border-width: 2px; }
.resMons .rm small { display: none; }

/* 1.2.0 理科モン詳細を1画面におさめる */
.monDetail .pic { height: 168px; }
.monDetail .pic img { max-height: 162px; }
.monDetail .picAct { position: absolute; top: 8px; right: 8px; }
.monDetail .picAct .btn.small { padding: 4px 10px; font-size: 13px; }
.monTrain .btn.small { white-space: nowrap; padding: 6px 12px; }
.monDetail .pityBar { margin-top: 6px; font-size: 12px; }
.monDetail .pityBar .pb { height: 8px; margin-top: 3px; }

/* ===== デバッグモード（js/engine/debug.js） ===== */
#dbg { position: absolute; inset: 0; pointer-events: none; z-index: 85; font-family: system-ui, "Noto Sans JP", sans-serif; }
#dbg > * { pointer-events: auto; }
.dbgBadge { position: absolute; right: 4px; top: 3px; padding: 2px 8px; border-radius: 8px; background: rgba(20,120,60,.85); color: #eaffef; font: 800 11px/16px system-ui, sans-serif; cursor: pointer; opacity: .8; z-index: 3; box-shadow: 0 1px 4px rgba(0,0,0,.5); }
.dbgBadge:hover { opacity: 1; }
.dbgErrN { color: #ffd0d0; }
.dbgOv { position: absolute; pointer-events: none !important; white-space: pre; font: 11px/14px ui-monospace, Menlo, Consolas, monospace; color: #d8ffe0; background: rgba(0,0,0,.6); padding: 4px 7px; border-radius: 6px; max-width: 620px; overflow: hidden; z-index: 1; }
.dbgOv.br { right: 6px; bottom: 6px; } .dbgOv.bl { left: 6px; bottom: 6px; } .dbgOv.tr { right: 6px; top: 24px; } .dbgOv.tl { left: 6px; top: 24px; }
.dbgPanel { position: absolute; right: 0; top: 0; width: 470px; height: 720px; background: rgba(14,10,30,.96); border-left: 2px solid #3cff8a; color: #eef; display: none; flex-direction: column; z-index: 2; box-shadow: -6px 0 20px rgba(0,0,0,.5); }
.dbgPanel.on { display: flex; }
.dbgHead { display: flex; align-items: center; gap: 8px; padding: 8px 10px 6px; font-size: 13px; }
.dbgHead b { font-size: 16px; color: #7dffb0; }
.dbgSave { font-size: 11px; background: #1f6b3e; padding: 1px 6px; border-radius: 6px; }
.dbgX { margin-left: auto; background: #3a2f60; color: #fff; border: 0; border-radius: 6px; width: 30px; height: 26px; cursor: pointer; font-size: 15px; }
.dbgTabs { display: flex; gap: 3px; padding: 0 8px; border-bottom: 1px solid #3a3360; }
.dbgTabs button { flex: 1; background: #221a44; color: #b9b0de; border: 0; border-radius: 7px 7px 0 0; padding: 6px 2px; font: 800 12px system-ui, sans-serif; cursor: pointer; }
.dbgTabs button.on { background: #3cff8a; color: #062012; }
.dbgBody { flex: 1; overflow-y: auto; padding: 6px 10px 10px; }
.dbgMsg { min-height: 22px; padding: 3px 10px; font-size: 12px; font-weight: 800; border-top: 1px solid #3a3360; }
.dbgMsg.ok { color: #7dffb0; } .dbgMsg.ng { color: #ff9a9a; }
.dbgSec { margin-top: 8px; background: rgba(255,255,255,.04); border-radius: 8px; padding: 6px 8px; }
.dbgSecT { font-size: 12px; font-weight: 900; color: #ffd86b; margin-bottom: 4px; }
.dbgRow { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin: 3px 0; font-size: 12px; }
.dbgB { background: #2d2560; color: #fff; border: 1px solid #5a4fa0; border-radius: 6px; padding: 4px 8px; font: 700 12px system-ui, sans-serif; cursor: pointer; }
.dbgB:hover { background: #3d3480; } .dbgB:disabled { opacity: .35; cursor: default; }
.dbgB.on { background: #3cff8a; color: #062012; border-color: #3cff8a; }
.dbgB.go { background: #1f8a4a; border-color: #3cff8a; } .dbgB.ng { background: #8a2a3a; border-color: #ff6a7a; }
.dbgB.sm { padding: 1px 6px; font-size: 11px; }
.dbgChk { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; cursor: pointer; margin-right: 6px; }
.dbgNum, .dbgTxt, .dbgSel { background: #0c0820; color: #fff; border: 1px solid #5a4fa0; border-radius: 5px; padding: 3px 5px; font: 12px system-ui, sans-serif; }
.dbgSel { max-width: 300px; }
.dbgLive, .dbgInfo { white-space: pre-wrap; font: 11px/15px ui-monospace, Menlo, Consolas, monospace; color: #cfe; }
.dbgInfo { color: #b9b0de; margin: 2px 0; }
.dbgFlags { display: flex; flex-wrap: wrap; gap: 3px; }
.dbgFlag { background: #261d48; color: #8f86b8; border: 1px solid #3f3570; border-radius: 10px; padding: 1px 7px; font: 11px system-ui, sans-serif; cursor: pointer; }
.dbgFlag.on { background: #1f6b3e; color: #dfffe9; border-color: #3cff8a; }
.dbgList { max-height: 210px; overflow-y: auto; }
.dbgLi { display: flex; align-items: center; gap: 4px; font-size: 11px; padding: 2px 0; border-bottom: 1px solid rgba(255,255,255,.05); }
.dbgLi span { flex: 1; } .dbgLi small { color: #8f86b8; }
.dbgTbl { max-height: 190px; overflow-y: auto; margin-top: 4px; }
.dbgTr { display: flex; gap: 8px; font: 11px/16px ui-monospace, Menlo, Consolas, monospace; border-bottom: 1px solid rgba(255,255,255,.05); }
.dbgTr span { flex: 1; } .dbgTr small { color: #8f86b8; }
.dbgTbl.err .dbgTr { flex-direction: column; gap: 0; padding: 2px 0; }
.dbgCode { font: 11px ui-monospace, Menlo, Consolas, monospace; color: #7dffb0; word-break: break-all; user-select: all; margin: 4px 0; }
.dbgCG { position: absolute; inset: 0; background: rgba(0,0,0,.85); display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 5; cursor: pointer; }
.dbgCGt { color: #fff; font: 800 14px system-ui, sans-serif; margin-bottom: 8px; }
.dbgCGimg { color: #ccc; font-size: 14px; } .dbgCGimg img { max-width: 1100px; max-height: 620px; border-radius: 8px; }
.dbgPw { font-size: 22px; padding: 8px 12px; width: 300px; border-radius: 10px; border: 3px solid var(--line2, #5a4fa0); text-align: center; }
.dbgPwMsg { text-align: center; min-height: 22px; margin-top: 6px; font-weight: 800; color: #ff7a8a; }
.dbgTa { width: 520px; height: 140px; font: 12px ui-monospace, monospace; }
#game:has(#overlay .modalBack) #dbg { z-index: 45; }   /* 確認ダイアログはパネルより前に */
.dbgPanel.on ~ .dbgBadge { display: none; }
#dbg:has(.dbgPanel.on) .dbgOv.br, #dbg:has(.dbgPanel.on) .dbgOv.tr { right: 478px; }

/* ===== 修行（screens_train.js） ===== */
.trWrap { position: absolute; left: 330px; top: 92px; width: 930px; display: flex; gap: 14px; }
.trCard { position: relative; flex: 1; background: var(--cream, #fff6dc); color: #1a1d2a; border: 5px solid var(--line2); border-radius: 14px; padding: 12px 14px 14px; box-shadow: 7px 8px 0 rgba(0,0,0,.35); display: flex; flex-direction: column; gap: 6px; min-height: 420px; overflow: hidden; }
.trCard.lock { filter: saturate(.4); opacity: .85; }
.trCard .hd { display: flex; align-items: baseline; gap: 8px; }
.trCard .hd .ic { font-size: 26px; font-weight: 900; }
.trCard .hd .nm { font-size: 22px; font-weight: 900; flex: 1; }
.trCard .hd .lv { font-size: 13px; font-weight: 900; color: #4a4a60; }
.trCard .hd .lv b { font-family: var(--num); font-size: 30px; color: #1a1d2a; margin-left: 3px; }
.trCard .val { display: flex; align-items: baseline; gap: 6px; font-size: 12px; font-weight: 800; color: #4a4a60; }
.trCard .val .bn { font-family: var(--num); font-size: 34px; font-weight: 900; color: #1a1d2a; -webkit-text-stroke: 0; }
.trCard .val .bn.pop { animation: trPop .35s ease-out; }
@keyframes trPop { 0% { transform: scale(1.5); color: #ff9a1a; } 100% { transform: scale(1); } }
.trBar { height: 14px; border-radius: 8px; background: #d9d2bf; border: 3px solid var(--line2); overflow: hidden; }
.trBar i { display: block; height: 100%; transition: width .15s; }
.trCard .nx { font-size: 13px; font-weight: 900; color: #3a3424; }
.trSkills { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.trSkills .sk { font-size: 11px; font-weight: 900; padding: 2px 7px; border-radius: 8px; background: #e6dfca; color: #8a8270; border: 2px solid #cfc6ad; display: inline-flex; gap: 4px; align-items: center; }
.trSkills .sk i { font-style: normal; font-family: var(--num); font-size: 10px; opacity: .8; }
.trSkills .sk.on { background: var(--navy, #1b2140); color: #ffe14a; border-color: var(--line2); }
.trBtn { margin-top: auto; position: relative; border: 4px solid var(--line2); border-radius: 14px; padding: 12px 10px 10px; color: #1a1d2a; cursor: pointer; font-weight: 900; display: flex; flex-direction: column; align-items: center; gap: 2px; box-shadow: 0 6px 0 rgba(0,0,0,.35); user-select: none; -webkit-user-select: none; touch-action: none; transition: transform .06s; }
.trBtn:active { transform: translateY(4px); box-shadow: 0 2px 0 rgba(0,0,0,.35); }
.trBtn .t { font-size: 24px; }
.trBtn .c { font-size: 13px; opacity: .85; }
.trBtn .key { position: absolute; right: 8px; top: 6px; background: var(--line2); color: #fff; font-family: var(--num); font-size: 13px; font-weight: 900; padding: 1px 7px; border-radius: 6px; }
.trCard .popLayer { position: absolute; left: 0; right: 0; top: 150px; height: 0; pointer-events: none; }
.trPop { position: absolute; top: 0; font-family: var(--num); font-size: 30px; font-weight: 900; -webkit-text-stroke: 2px var(--line2); paint-order: stroke fill; animation: trPopUp .9s ease-out forwards; }
@keyframes trPopUp { 0% { transform: translateY(0) scale(1.4); opacity: 1; } 100% { transform: translateY(-90px) scale(1); opacity: 0; } }
.trTotal { position: absolute; left: 330px; top: 600px; width: 930px; background: rgba(10,6,24,.75); border: 3px solid rgba(255,255,255,.15); border-radius: 12px; padding: 8px 14px; display: flex; flex-direction: column; gap: 3px; font-weight: 900; }
.trTotal .row { display: flex; align-items: baseline; gap: 14px; font-size: 14px; }
.trTotal .pw { font-family: var(--num); font-size: 22px; color: #ffd25c; }
.trTotal .diff { font-family: var(--num); font-size: 20px; color: #5cff9a; }
.trTotal .diff.pop { animation: trPop .4s ease-out; }
.trTotal .st b { font-family: var(--num); font-size: 18px; color: #fff; }
.trTotal .tip { font-size: 12px; color: #b8acd8; font-weight: 700; }
.trBanner { position: absolute; left: 50%; top: 250px; transform: translate(-50%, -20px) scale(.8); opacity: 0; background: rgba(10,6,24,.94); border: 5px solid; border-radius: 18px; padding: 18px 46px; text-align: center; z-index: 20; box-shadow: 0 10px 40px rgba(0,0,0,.6); transition: transform .3s cubic-bezier(.2,1.4,.4,1), opacity .25s; pointer-events: none; }
.trBanner.in { transform: translate(-50%, 0) scale(1); opacity: 1; }
.trBanner .t { font-size: 18px; font-weight: 900; color: #ffe14a; letter-spacing: .1em; }
.trBanner .n { font-size: 44px; font-weight: 900; text-shadow: 0 3px 0 rgba(0,0,0,.5); }
.trBanner .d { font-size: 16px; font-weight: 800; margin-top: 4px; }
.trBanner .k { font-size: 12px; color: #b8acd8; margin-top: 6px; }
/* 拠点の修行ボタン */
.hb-train { position: absolute; right: 12px; top: 12px; background: var(--navy, #1b2140); color: #ffe14a; border: 3px solid var(--line2); border-radius: 10px; padding: 4px 10px; font-size: 13px; font-weight: 900; cursor: pointer; box-shadow: 0 3px 0 rgba(0,0,0,.3); display: flex; align-items: center; gap: 6px; }
.hb-train .key { background: #ffe14a; color: #1a1d2a; font-family: var(--num); font-size: 11px; padding: 0 5px; border-radius: 5px; }
.hb-train.lock { color: #b8acd8; }
.hb-train:hover { filter: brightness(1.15); }
.hb-learn .lb small.bingo { font-size: 12px; color: #c9a200; margin-left: 4px; }

/* ===== 装備：節目の枠・大成功・何発で倒せるか ===== */
.eqItem.tier1 { box-shadow: 0 0 0 2px #c77b3a, 0 0 8px rgba(199,123,58,.6); }
.eqItem.tier2 { box-shadow: 0 0 0 2px #cfd6e0, 0 0 10px rgba(207,214,224,.7); }
.eqItem.tier3 { box-shadow: 0 0 0 2px #ffd447, 0 0 12px rgba(255,212,71,.8); }
.eqItem.tier4, .eqItem.tier5 { box-shadow: 0 0 0 2px #ff7ae0, 0 0 14px rgba(127,230,255,.8); animation: eqRainbow 2.4s linear infinite; }
@keyframes eqRainbow { 0% { box-shadow: 0 0 0 2px #ff7ae0, 0 0 14px rgba(255,122,224,.8); } 33% { box-shadow: 0 0 0 2px #7fe6ff, 0 0 14px rgba(127,230,255,.8); } 66% { box-shadow: 0 0 0 2px #ffe14a, 0 0 14px rgba(255,225,74,.8); } 100% { box-shadow: 0 0 0 2px #ff7ae0, 0 0 14px rgba(255,122,224,.8); } }
.eqTier { font-size: 12px; font-weight: 800; color: #b8acd8; margin-top: 4px; display: flex; flex-wrap: wrap; align-items: baseline; }
.eqTier .tb { font-weight: 900; color: #cfc6ee; }
.eqTier .tb.tier1 { color: #e0955a; } .eqTier .tb.tier2 { color: #e8eef6; } .eqTier .tb.tier3 { color: #ffd447; } .eqTier .tb.tier4, .eqTier .tb.tier5 { color: #ff9af0; }
.eqTier small { color: #8f86b8; }
.eqHits { margin-top: 6px; font-size: 13px; font-weight: 900; display: flex; align-items: baseline; gap: 4px; flex-wrap: wrap; }
.eqHits .l { color: #b8acd8; }
.eqHits b { font-family: var(--num); font-size: 22px; }
.eqHits .arrow { font-family: var(--num); font-size: 18px; }
.eqHits .arrow.up { color: #5cff9a; } .eqHits .arrow.down { color: #ff8a8a; }
.eqHits .rt { font-size: 12px; margin-left: 4px; }
.eqPops { position: absolute; left: 0; right: 0; top: 210px; height: 0; pointer-events: none; }
.eqPop { position: absolute; top: 0; font-family: var(--num); font-size: 24px; font-weight: 900; color: #fff; -webkit-text-stroke: 2px #1a1d2a; paint-order: stroke fill; animation: trPopUp 1s ease-out forwards; white-space: nowrap; }
.eqPop.great { color: #ffe14a; font-size: 30px; }
.eqPop.super { color: #ff9af0; font-size: 36px; }

/* ===== 周期表ビンゴ ===== */
.ptile.bingo { box-shadow: 0 0 0 2px #ffd447, 0 0 12px rgba(255,212,71,.75); background: linear-gradient(180deg, rgba(255,225,74,.28), rgba(255,180,30,.18)) !important; }
.ptile.bingo .s { color: #fff3a0 !important; text-shadow: 0 0 6px #ffd447; }
.ptile.almost { animation: ptAlmost 1.1s ease-in-out infinite; }
@keyframes ptAlmost { 0%, 100% { box-shadow: 0 0 0 1px rgba(255,255,255,.2); } 50% { box-shadow: 0 0 0 3px #ffffff, 0 0 14px #ffe14a; } }
.bingoHead { font-size: 16px; color: #ffd447; }
.bingoInfo { font-size: 12px; color: #d8d0f0; font-weight: 700; line-height: 1.5; }
.bingoInfo b { color: #ffe14a; }
/* ===== ステージの戦力目安 ===== */
.node .rate { position: absolute; left: 50%; transform: translateX(-50%); bottom: -42px; font-size: 11px; font-weight: 900; padding: 1px 7px; border-radius: 8px; background: rgba(10,6,24,.85); border: 2px solid; white-space: nowrap; z-index: 2; }
.node:not(.cleared) .rate { bottom: -24px; }
.node .rate.gold { color: #ffd25c; border-color: #ffd25c; } .node .rate.white { color: #fff; border-color: rgba(255,255,255,.6); } .node .rate.red { color: #ff6a7a; border-color: #ff6a7a; }
.siRate { font-weight: 800; }
.trBanner.res { top: 300px; z-index: 30; }
/* 2周目：マップの「1周目／2周目」切りかえ・ナナシのボス・拠点の入口 */
.partSel { left: 50%; top: 16px; transform: translateX(-50%); display: flex; gap: 8px; z-index: 5; }
.partSel .btn { font-size: 15px; padding: 7px 16px; }
.partSel .btn.sel { background: linear-gradient(180deg, #f4f8ff, #a8bde0); color: #0a1a33; border-color: #ffffff; }
.node.boss img.nanashi { filter: grayscale(1) brightness(1.35) contrast(.8); opacity: .9; }
.areaTabs.p2 .atab.sel { border-color: #cfe2ff; background: linear-gradient(90deg, rgba(200,225,255,.22), rgba(14,10,34,.9)); color: #ffffff; }
.areaTabs.p2 .atab.sel .nm small { color: #cfe2ff; } .areaTabs.p2 .atab.sel .pr { color: #ffe9a8; }
.hb-dest.p2gate .plate .ttl, .hb-dest.p2 .plate .ttl { font-size: 30px; }
.hb-dest.p2gate .plate .ttl { color: #7a3a10; }
.hb-dest.p2 .art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(235,240,250,.1), rgba(235,240,250,.45)); pointer-events: none; }

/* 1.6.0：理科道具の枠・発動スキル */
.eqSlot .pk { max-height: 32px; overflow: hidden; line-height: 1.35; }
.eqSlot.mini { padding: 6px 10px; }
.eqSlot.mini img { width: 46px; height: 46px; }
.eqSlot.mini .in { font-size: 15px; }
.eqSlot.mini .pk { max-height: 16px; font-size: 11px; }
.eqSlot.locked { cursor: default; opacity: .65; }
.eqSlot .lockIc { width: 46px; height: 46px; display: flex; align-items: center; justify-content: center; font-size: 24px; background: rgba(0,0,0,.4); border-radius: 10px; }
.resProcs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.procChip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px 2px 2px; }
.procChip img { width: 24px; height: 24px; border-radius: 6px; }
.procChip b { color: #ffd25c; }

/* 1.6.0 装備画面：理科道具の枠ぶん左パネルをつめる */
.eqLeft { gap: 8px; }
.eqSlot .pk { max-height: none; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.eqSlot .in { font-size: 17px; }
.eqCharms .sn { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12.5px; }
.eqCharm { max-width: 60px; }
.eqCharms .pk { max-height: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.eqTotHead { display: flex; align-items: center; justify-content: space-between; font-weight: 900; color: #ffd25c; margin-bottom: 6px; }
.eqHelpBtn { padding: 4px 10px; font-size: 12px; }

/* 1.7.0 リザルト：下の行（発動スキル・おぼえた！・要復習）を小さめにして、ボタンとかさならないように */
.resPanel .resLearn { margin-top: 2px; font-size: 14px; line-height: 1.3; }
.resPanel .resLearn .chip { font-size: 13px; padding: 2px 7px; }
.resPanel .weakList { display: inline-flex; flex-wrap: wrap; gap: 5px; vertical-align: middle; max-width: 690px; }
.resPanel .resOne { display: flex; flex-wrap: nowrap; align-items: center; gap: 5px; overflow: hidden; white-space: nowrap; max-width: 748px; flex-shrink: 0; }
.resPanel .resOne > * { flex-shrink: 0; }
.resPanel .resOne .resLbl { margin-left: 8px; color: var(--sub); font-weight: 800; }

/* 1.8.0 闇の深淵 */
.resHead .resDepth { display: inline-block; margin-right: 12px; padding: 2px 12px; border-radius: 10px; font-size: 20px; vertical-align: middle; background: linear-gradient(180deg, #3a1460, #1a0830); color: #e2c8ff; border: 2px solid #9a5cff; }
/* 闇の深淵：マップの層えらび（下のまんなか） */
.layerBar { left: 450px; top: 652px; width: 780px; height: 48px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border-radius: 14px; background: rgba(20,14,40,.88); border: 2px solid rgba(255,255,255,.18); z-index: 3; }
.layerBar.abyss { background: linear-gradient(90deg, rgba(40,6,50,.94), rgba(70,10,40,.94)); border-color: rgba(200,120,255,.6); box-shadow: 0 0 22px rgba(170,60,255,.35); }
.layerBar .btn.small { padding: 5px 12px; font-size: 14px; }
.layerBar .btn.small.sel { background: linear-gradient(180deg, #c87aff, #6a2aa8); border-color: #f0d8ff; color: #fff; }
.layerBar .lbCur { min-width: 150px; text-align: center; line-height: 1.1; }
.layerBar.locked { gap: 14px; color: #d8c8f0; font-size: 15px; font-weight: 800; }
.layerBar.locked b { color: #c38cff; }
.layerBar .lbCur b { display: block; font-size: 20px; font-weight: 900; color: #f0dcff; text-shadow: 0 0 10px rgba(200,120,255,.8); }
.layerBar .lbCur small { font-size: 12px; color: #c8b0e8; font-weight: 800; }
.layerBar .lbMuts { display: flex; gap: 6px; margin-left: auto; font-size: 12px; font-weight: 900; color: #ffd0f0; white-space: nowrap; overflow: hidden; }
.layerBar .lbMuts span { background: rgba(0,0,0,.35); border: 1px solid rgba(255,140,220,.45); border-radius: 8px; padding: 2px 6px; }
.node .nLv { position: absolute; top: -20px; right: -14px; font-size: 11px; font-weight: 900; background: #3a0a4a; color: #f0c8ff; border: 1px solid #b06cff; border-radius: 8px; padding: 0 5px; white-space: nowrap; }
.mapStage.abyss .node { background: radial-gradient(circle at 35% 30%, #4a1a5a, #12041c); border-color: rgba(200,110,255,.55); box-shadow: 0 6px 0 rgba(0,0,0,.5), 0 0 22px rgba(160,40,255,.45); }
.mapStage.abyss .node.cleared { border-color: #ff9ad8; background: radial-gradient(circle at 35% 30%, #6a2050, #20061a); }
.mapStage.abyss .node.next { border-color: #fff; }
.mapStage.abyss .mapHead b { color: #f0d8ff; text-shadow: 0 3px 0 #000, 0 0 18px rgba(190,80,255,.8); }
.siHead .siDepth { padding: 3px 12px; border-radius: 10px; font-weight: 900; background: linear-gradient(180deg, #3a1460, #1a0830); color: #e2c8ff; border: 2px solid #9a5cff; }
.siAbyss { margin-top: 10px; padding: 8px 10px; border-radius: 12px; background: rgba(40,8,60,.6); border: 1px solid rgba(190,110,255,.5); }
.siAbyss h5 { margin: 0 0 4px; color: #e8ccff; }
.siMut { font-size: 13px; line-height: 1.45; }
.siMut b { color: #ffd0f0; margin-right: 6px; }
.siMut span { color: #e0d0ff; }

/* ===== 1.8.0 闇の深淵：LR・EX・闇の宝珠 ===== */
.loot.lr { animation: lrGlow 1s infinite; background: radial-gradient(circle at 50% 40%, rgba(180,108,255,.45), rgba(10,0,20,.75)); }
.loot.mystery.lr { background: conic-gradient(from 0deg, #1a0030, #b46cff, #ff4ae0, #4ad0ff, #1a0030); animation: urSpin .7s linear infinite; box-shadow: 0 0 34px #ff4ae0; }
@keyframes lrGlow { 0%,100% { box-shadow: 0 0 14px #b46cff, inset 0 0 10px rgba(255,74,224,.4); } 50% { box-shadow: 0 0 30px #ff4ae0, inset 0 0 18px rgba(127,246,255,.5); } }
.rbadge.lr { color: #fff; text-shadow: 0 1px 0 #000; box-shadow: 0 0 10px rgba(255,74,224,.6); }
.lbStars .lbDark { color: #c38cff; text-shadow: 0 0 6px #ff4ae0; margin-left: 4px; letter-spacing: 1px; font-size: 15px; }
.btn.orbBtn { background: linear-gradient(180deg, #5a2aa8, #2a0a50); color: #f0e0ff; border-color: #c38cff; width: 100%; }
.btn.orbBtn:disabled { filter: grayscale(.6) brightness(.7); }
.lbMaxNote { text-align: center; font-weight: 900; color: #c38cff; text-shadow: 0 0 8px #ff4ae0; padding: 4px; }
.cur.o i { background: radial-gradient(circle at 35% 35%, #ffd0ff, #b46cff 55%, #2a0050); font-style: normal; font-size: 13px; }
.resOrbs { margin-left: 10px; color: #e0b8ff; text-shadow: 0 0 6px #b46cff; font-size: 14px; }
/* マップ：闇深度で おどろおどろしく（dk1〜dk4） */
.mapStage.abyss .mapHead { flex-wrap: wrap; row-gap: 0; }
.mapStage.abyss .mapHead b { white-space: nowrap; }
.mapStage.abyss .abyssWhisper { flex-basis: 100%; font-size: 13px; font-weight: 800; color: rgba(230,200,255,.8); margin-top: 2px; text-shadow: 0 2px 0 #000; font-style: italic; }
.mapStage.abyss.dk2 .node { border-color: rgba(230,90,200,.6); box-shadow: 0 6px 0 rgba(0,0,0,.5), 0 0 24px rgba(220,40,160,.5); }
.mapStage.abyss.dk3 .node { background: radial-gradient(circle at 35% 30%, #5a1020, #14020a); border-color: rgba(255,80,110,.65); box-shadow: 0 6px 0 rgba(0,0,0,.55), 0 0 26px rgba(255,30,70,.5); }
.mapStage.abyss.dk4 .node { background: radial-gradient(circle at 35% 30%, #4a0010, #0a0004); border-color: rgba(255,50,70,.8); box-shadow: 0 6px 0 rgba(0,0,0,.6), 0 0 30px rgba(255,0,40,.65); animation: dkPulse 1.5s ease-in-out infinite; }
.mapStage.abyss.dk3 .mapHead b, .mapStage.abyss.dk4 .mapHead b { color: #ffd0d8; text-shadow: 0 3px 0 #000, 0 0 18px rgba(255,40,80,.9); }
.mapStage.abyss .node.cleared { filter: saturate(1.1); }
@keyframes dkPulse { 0%,100% { box-shadow: 0 6px 0 rgba(0,0,0,.6), 0 0 22px rgba(255,0,40,.5); } 50% { box-shadow: 0 6px 0 rgba(0,0,0,.6), 0 0 38px rgba(255,0,40,.9); } }
/* 100F「開発者Nの部屋」 */
.btn.n100Btn { background: linear-gradient(180deg, #e8fbff, #7ff6ff); color: #00262a; border-color: #fff; font-weight: 900; box-shadow: 0 0 14px rgba(127,246,255,.8); animation: n100Glow 1.6s ease-in-out infinite; }
@keyframes n100Glow { 0%,100% { box-shadow: 0 0 10px rgba(127,246,255,.6); } 50% { box-shadow: 0 0 22px rgba(255,255,255,.95); } }
.n100Head { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.n100Head .n100F { font: 900 40px/1 var(--num); color: #7ff6ff; text-shadow: 0 3px 0 #00262a, 0 0 16px rgba(127,246,255,.8); }
.n100Head b { font-size: 26px; }
.n100Desc { font-size: 15px; font-weight: 800; line-height: 1.6; color: #e8e0ff; margin-bottom: 8px; }
.n100Row { display: flex; gap: 16px; flex-wrap: wrap; font-weight: 900; font-size: 14px; color: #ffd25c; margin-bottom: 10px; }
.n100Reward { display: flex; align-items: center; gap: 12px; background: rgba(127,246,255,.08); border: 2px solid rgba(127,246,255,.5); border-radius: 12px; padding: 8px 12px; margin-bottom: 8px; }
.n100Reward img { width: 64px; height: 64px; border-radius: 10px; border: 2px solid #fff; }
.n100Reward div { display: flex; flex-direction: column; gap: 2px; }
.n100Reward small { color: #c8f8ff; font-weight: 800; }
.advName.devn { background: linear-gradient(180deg, #e8fbff, #5ad8e8); color: #00262a; border-color: #fff; }
/* 2周目の会話：名前を呼ぶ（ローマ字で打つ）1.9.0 */
.advType { position: absolute; left: 50%; top: 86px; transform: translateX(-50%); width: 620px; padding: 16px 24px 20px; text-align: center; background: radial-gradient(ellipse at 50% 35%, rgba(255,252,236,.98), rgba(226,236,255,.96)); border: 3px solid #ffd25c; border-radius: 22px; box-shadow: 0 0 44px rgba(255,230,160,.75), 0 10px 30px rgba(0,0,0,.5); z-index: 4; animation: advTypeIn .45s ease-out; }
.advType .tt { font-size: 22px; font-weight: 900; color: #6a4a10; letter-spacing: .12em; }
.advType .nm { font-size: 86px; font-weight: 900; color: #2a2a4a; line-height: 1.12; text-shadow: 0 0 18px #fff, 0 0 32px rgba(255,210,92,.95); }
.advType .rm { display: flex; justify-content: center; gap: 12px; margin-top: 6px; }
.advType .rm span { width: 66px; height: 78px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font: 900 46px "Arial Black", Arimo, Arial, sans-serif; background: rgba(40,48,80,.10); color: rgba(40,48,80,.38); border: 3px solid rgba(40,48,80,.25); }
.advType .rm span.on { background: #ffd25c; color: #2a1600; border-color: #fff; box-shadow: 0 0 20px rgba(255,210,92,.95); animation: kpop .16s ease-out; }
.advType .rm span.cur { border-color: #ff8fb8; color: rgba(40,48,80,.62); animation: advTypeCur 1s infinite; }
.advType .hint { margin-top: 10px; font-size: 16px; font-weight: 800; color: #5a5a7a; }
.advType.miss { animation: advTypeShake .3s; }
.advType.done { animation: advTypeDone .95s ease-out forwards; }
@keyframes advTypeIn { from { opacity: 0; transform: translateX(-50%) scale(.85); } to { opacity: 1; transform: translateX(-50%) scale(1); } }
@keyframes advTypeCur { 50% { box-shadow: 0 0 16px rgba(255,143,184,.95); } }
@keyframes advTypeShake { 0%, 100% { transform: translateX(-50%); } 25% { transform: translateX(calc(-50% - 10px)); } 75% { transform: translateX(calc(-50% + 10px)); } }
@keyframes advTypeDone { 0% { transform: translateX(-50%) scale(1); } 30% { transform: translateX(-50%) scale(1.08); box-shadow: 0 0 90px #fff6c0; } 100% { opacity: 0; transform: translateX(-50%) scale(1.15); } }

/* ===== 1.10.0 お守り7つ・理科道具5つ／スキル付与（スキル複製スポイト） ===== */
.eqMulti .eqCharmRow { gap: 6px; }
.eqMulti .eqCharm { max-width: 46px; flex: 0 0 46px; height: 46px; }
.eqMulti .eqCharm .plus { font-size: 20px; }
.eqMulti .eqCharm .no { width: 17px; height: 17px; font-size: 10.5px; line-height: 17px; left: -5px; top: -5px; }
.eqMulti .sn { margin-bottom: 7px; font-size: 12.5px; }
.eqCharm .imbDot, .eqItem .imbDot { position: absolute; right: -5px; bottom: -5px; min-width: 18px; height: 18px; border-radius: 9px; background: #7ff6ff; color: #002a30; font: 900 11px/18px sans-serif; text-align: center; padding: 0 3px; box-shadow: 0 0 6px rgba(127,246,255,.8); }
.eqItem .imbDot { right: auto; left: 3px; bottom: 3px; }
.imbN { margin-left: 6px; background: rgba(127,246,255,.18); color: #9ff6ff; border-radius: 8px; padding: 0 6px; font-size: 12px; }
.eqDetail .eqImb { background: rgba(20,60,80,.35); border: 1px solid rgba(127,246,255,.4); border-radius: 12px; padding: 7px 10px; cursor: pointer; transition: background .15s; }
.eqDetail .eqImb:hover { background: rgba(40,100,130,.45); }
.eqImbHead { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.eqImbHead img { width: 22px; height: 22px; }
.eqImbHead .n { color: var(--sub); font-weight: 900; }
.eqImbHead .go { margin-left: auto; color: #9ff6ff; font-weight: 900; font-size: 13px; }
.eqImbRow { display: flex; gap: 6px; margin-top: 6px; }
.eqImbS { position: relative; width: 42px; height: 42px; border-radius: 10px; border: 2px solid; background: rgba(0,0,0,.35); box-sizing: border-box; }
.eqImbS img { width: 100%; height: 100%; border-radius: 8px; }
.eqImbS span { position: absolute; right: -4px; bottom: -4px; background: #2a1600; color: #ffd25c; font: 900 10px/14px sans-serif; border-radius: 6px; padding: 0 3px; }
.eqImbS.empty { border: 2px dashed rgba(255,255,255,.25); display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.4); font-weight: 900; }
.lbv { color: #ffd25c; font-weight: 900; }
.modalBack.imbueModal .modal { width: 1200px; max-width: 1200px; height: 680px; max-height: 690px; padding: 14px 20px 16px; position: relative; display: grid; grid-template-columns: 468px 1fr; grid-template-rows: auto minmax(0, 1fr); gap: 10px 16px; box-sizing: border-box; }
.imbHead { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; }
.imbSpIc { width: 50px; height: 50px; filter: drop-shadow(0 0 8px #7ff6ff); }
.imbTt { min-width: 0; }
.imbTt b { font-size: 25px; color: var(--yel); display: block; line-height: 1.1; }
.imbTt small { font-size: 12.5px; color: var(--sub); font-weight: 800; }
.imbHave { margin-left: auto; display: flex; align-items: center; gap: 6px; background: rgba(0,40,50,.6); border: 2px solid #7ff6ff; border-radius: 20px; padding: 3px 14px 3px 6px; flex: none; }
.imbHave img { width: 30px; height: 30px; }
.imbHave span { font-size: 12px; color: var(--sub); font-weight: 800; }
.imbHave b { font-size: 22px; color: #bff8ff; font-family: var(--num); }
.imbHave.none { border-color: rgba(255,255,255,.2); opacity: .75; }
.imbClose { font-size: 15px; padding: 6px 16px; flex: none; }
.imbLeft { display: flex; flex-direction: column; gap: 6px; min-height: 0; }
.imbLeft .lbl { font-size: 12px; color: var(--sub); font-weight: 900; margin-top: 2px; }
.imbTarget { display: flex; gap: 10px; align-items: center; }
.imbTarget img { width: 54px; height: 54px; border-radius: 12px; border: 3px solid; background: rgba(0,0,0,.4); }
.imbTarget .nm { font-size: 20px; font-weight: 900; }
.imbTarget .sub { font-size: 12px; color: var(--sub); font-weight: 800; }
.imbOwn { background: rgba(40,120,70,.2); border: 1px solid rgba(92,255,154,.3); border-radius: 12px; padding: 5px 10px 6px; }
.imbOwn .row { display: flex; gap: 8px; align-items: flex-start; margin-top: 2px; }
.imbOwn img { width: 34px; height: 34px; border-radius: 8px; flex: none; }
.imbOwn b { font-size: 14px; }
.imbOwn p { margin: 1px 0 0; font-size: 11.5px; color: #c8ffd8; line-height: 1.35; max-height: 31px; overflow: hidden; }
.imbSlot { position: relative; display: flex; gap: 8px; align-items: center; background: rgba(0,0,0,.3); border: 2px solid rgba(255,255,255,.12); border-radius: 12px; padding: 5px 8px 5px 14px; min-height: 62px; box-sizing: border-box; cursor: pointer; }
.imbSlot.sel { border-color: var(--gold) !important; box-shadow: 0 0 0 2px rgba(255,210,92,.35); background: rgba(255,210,92,.08); }
.imbSlot .no { position: absolute; left: -6px; top: -6px; width: 20px; height: 20px; border-radius: 50%; background: #7ff6ff; color: #002a30; font: 900 12px/20px sans-serif; text-align: center; }
.imbSlot img { width: 44px; height: 44px; border-radius: 9px; flex: none; }
.imbSlot .tx { flex: 1; min-width: 0; }
.imbSlot .tx b { font-size: 14.5px; }
.imbSlot .tx small { font-size: 11px; color: var(--sub); margin-left: 4px; font-weight: 800; }
.imbSlot .tx p { margin: 2px 0 0; font-size: 11.5px; color: #d8f6ff; line-height: 1.35; max-height: 31px; overflow: hidden; }
.imbSlot .bt { display: flex; flex-direction: column; gap: 4px; flex: none; width: 124px; }
.imbSlot .bt .btn { font-size: 12px; padding: 3px 6px; line-height: 1.25; }
.imbSlot .bt small { display: block; font-size: 10.5px; opacity: .9; }
.imbSlot .max { font-size: 12px; color: #ffd25c; font-weight: 900; text-align: center; }
.imbSlot.empty { justify-content: center; border-style: dashed; }
.imbSlot.empty .plus { font-size: 16px; font-weight: 900; color: rgba(255,255,255,.55); }
.imbRight { display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.imbRhead b { font-size: 18px; }
.imbRhead small { margin-left: 8px; font-size: 12px; color: var(--sub); font-weight: 800; }
.imbList { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; align-content: start; padding-right: 4px; }
.imbCand { display: flex; gap: 8px; align-items: flex-start; background: rgba(0,0,0,.3); border: 2px solid rgba(255,255,255,.12); border-radius: 10px; padding: 6px; cursor: pointer; }
.imbCand:hover { background: rgba(255,255,255,.07); }
.imbCand.on { border-color: var(--gold) !important; background: rgba(255,210,92,.14); }
.imbCand.dup { opacity: .42; cursor: not-allowed; }
.imbCand img { width: 40px; height: 40px; border-radius: 8px; flex: none; }
.imbCand .tx { min-width: 0; flex: 1; }
.imbCand .t1 { font-size: 13.5px; display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.imbCand .rb { font-size: 10px; font-weight: 900; color: #111; border-radius: 6px; padding: 0 5px; }
.imbCand .tag { font-size: 10.5px; background: rgba(255,255,255,.18); border-radius: 6px; padding: 0 5px; }
.imbCand .t2 { font-size: 11px; color: var(--sub); font-weight: 800; }
.imbCand p { margin: 2px 0 0; font-size: 11px; color: #d8f6ff; line-height: 1.35; max-height: 30px; overflow: hidden; }
.imbEmpty { grid-column: 1 / -1; padding: 30px; text-align: center; color: var(--sub); font-weight: 800; }
.imbBar { display: flex; align-items: center; gap: 12px; background: rgba(0,0,0,.35); border-radius: 12px; padding: 8px 12px; min-height: 58px; box-sizing: border-box; }
.imbBar .msg { flex: 1; min-width: 0; }
.imbBar .msg b { font-size: 15px; display: block; }
.imbBar .msg small { font-size: 12px; color: var(--sub); font-weight: 800; }
.imbBar .msg.hint { color: var(--sub); font-weight: 800; font-size: 14px; }
.imbGo { display: flex; align-items: center; gap: 6px; font-size: 17px; padding: 8px 18px; flex: none; }
.imbGo img { width: 28px; height: 28px; }
.imbFx { position: absolute; inset: 0; pointer-events: none; overflow: hidden; border-radius: 16px; }
.imbFly { position: absolute; width: 64px; height: 64px; transform: translate(-50%, -50%); transition: left .5s cubic-bezier(.3,.1,.3,1), top .5s cubic-bezier(.3,1.4,.4,1), transform .4s; filter: drop-shadow(0 0 10px #7ff6ff); }
.imbFly.suck { transform: translate(-50%, -80%) rotate(-20deg) scale(1.15); }
.imbFly.fly { transform: translate(-50%, -80%) rotate(25deg) scale(1.1); }
.imbDrop { position: absolute; width: 16px; height: 22px; margin-left: 10px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: radial-gradient(circle at 40% 35%, #ffffff, #7ff6ff 50%, #2a9aff); box-shadow: 0 0 12px #7ff6ff; animation: imbDrop .38s ease-in forwards; }
@keyframes imbDrop { from { transform: translate(-50%, -20px) scale(.6); opacity: 0; } 30% { opacity: 1; } to { transform: translate(-50%, 18px) scale(1); opacity: 1; } }
.imbRes { position: absolute; transform: translate(-50%, -50%); font-size: 34px; font-weight: 900; white-space: nowrap; animation: imbRes 1s ease-out forwards; text-shadow: 0 3px 0 #000, 0 0 16px currentColor; }
.imbRes.ok { color: #bff8ff; }
.imbRes.ng { color: #c9c0e6; font-size: 28px; }
@keyframes imbRes { from { transform: translate(-50%, -30%) scale(1.8); opacity: 0; } 20% { transform: translate(-50%, -50%) scale(1); opacity: 1; } 80% { opacity: 1; } to { transform: translate(-50%, -110%); opacity: 0; } }
.imbSlot.flashOk { animation: imbOk .9s; }
.imbSlot.flashNg { animation: imbNg .6s; }
@keyframes imbOk { 0%, 100% { box-shadow: none; } 30% { box-shadow: 0 0 0 4px #7ff6ff, 0 0 30px #7ff6ff; background: rgba(127,246,255,.25); } }
@keyframes imbNg { 0%, 100% { transform: none; } 25% { transform: translateX(-6px); } 50% { transform: translateX(6px); } 75% { transform: translateX(-3px); } }
.cur.sp img { width: 28px; height: 28px; }
.resSpoit img { width: 22px; height: 22px; vertical-align: middle; margin-right: 2px; }

/* ===== 1.10.1 スキルの効果（上限つきのバー・くらべる） ===== */
.eqTotBtns { display: flex; gap: 6px; }
.fxBtn { position: relative; background: linear-gradient(180deg, #2a5a70, #183848); border-color: #7ff6ff; color: #dffcff; }
.fxCapN { position: absolute; right: -6px; top: -7px; min-width: 16px; height: 16px; border-radius: 8px; background: #ff7a3a; color: #fff; font: 900 10.5px/16px sans-serif; padding: 0 3px; box-shadow: 0 0 6px #ff7a3a; }
.modalBack.skillFxModal .modal { width: 1200px; max-width: 1200px; height: 680px; max-height: 690px; padding: 14px 20px 16px; display: grid; grid-template-columns: 1fr 470px; grid-template-rows: auto minmax(0, 1fr); gap: 10px 16px; box-sizing: border-box; }
.fxHead { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; }
.fxTt b { display: block; font-size: 24px; color: var(--yel); line-height: 1.15; }
.fxTt small { font-size: 12.5px; color: var(--sub); font-weight: 800; }
.fxLegend { margin-left: auto; display: flex; flex-wrap: wrap; gap: 4px 10px; max-width: 470px; justify-content: flex-end; }
.fxLegend span { font-size: 11.5px; font-weight: 800; color: #d8e0f0; display: inline-flex; align-items: center; gap: 4px; }
.fxLegend i { display: inline-block; width: 16px; height: 10px; border-radius: 3px; }
.fxClose { flex: none; font-size: 15px; padding: 6px 16px; }
.fxBar i.own, .fxLegend i.own { background: linear-gradient(180deg, #8dffb4, #2fbf6a); }
.fxBar i.imb, .fxLegend i.imb { background: linear-gradient(180deg, #a8fbff, #28b8d8); }
.fxBar i.tr, .fxLegend i.tr { background: linear-gradient(180deg, #ffe58a, #e0a820); }
.fxBar i.lost, .fxLegend i.lost { background: repeating-linear-gradient(135deg, rgba(200,200,220,.45) 0 4px, rgba(200,200,220,.12) 4px 8px); }
.fxBar i.over, .fxLegend i.over { background: repeating-linear-gradient(135deg, rgba(255,90,90,.75) 0 4px, rgba(255,90,90,.2) 4px 8px); }
.fxLeft { min-height: 0; overflow-y: auto; padding-right: 6px; display: flex; flex-direction: column; gap: 4px; }
.fxGroup { font-size: 13px; font-weight: 900; color: #ffd25c; margin: 6px 0 2px; border-bottom: 1px solid rgba(255,210,92,.25); padding-bottom: 2px; }
.fxRow { display: grid; grid-template-columns: 178px 1fr 150px; gap: 10px; align-items: center; background: rgba(0,0,0,.25); border-radius: 10px; padding: 5px 8px; }
.fxName { font-size: 13px; font-weight: 900; line-height: 1.25; }
.fxMid { min-width: 0; }
.fxBar { position: relative; height: 16px; border-radius: 8px; background: rgba(255,255,255,.08); display: flex; overflow: visible; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.fxBar i { display: block; height: 100%; flex: none; box-sizing: border-box; border-right: 1px solid rgba(0,0,0,.35); }
.fxBar i:first-child { border-radius: 8px 0 0 8px; }
.fxBar .capLine { position: absolute; top: -4px; bottom: -4px; width: 3px; margin-left: -1.5px; background: #ffd25c; border-radius: 2px; box-shadow: 0 0 6px #ffd25c; }
.fxBar .capLine em { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); font-size: 9.5px; font-style: normal; font-weight: 900; color: #ffd25c; white-space: nowrap; }
.fxBar .cmpLine { position: absolute; top: -3px; bottom: -3px; width: 4px; margin-left: -2px; border-radius: 2px; }
.fxBar .cmpLine.up { background: #7fffb0; box-shadow: 0 0 8px #7fffb0; }
.fxBar .cmpLine.down { background: #ff8a8a; box-shadow: 0 0 8px #ff8a8a; }
.fxSrc { font-size: 10.5px; color: var(--sub); font-weight: 700; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fxVal { text-align: right; line-height: 1.2; }
.fxVal b { font-size: 17px; font-family: var(--num); }
.fxVal b.hit { color: #ffb05c; }
.fxVal b.up { color: #7fffb0; font-size: 14px; }
.fxVal b.down { color: #ff8a8a; font-size: 14px; }
.fxVal small { display: block; font-size: 10.5px; color: var(--sub); font-weight: 800; }
.fxVal .hitTag { display: inline-block; margin-top: 1px; font-size: 10px; font-weight: 900; color: #2a1000; background: #ffb05c; border-radius: 6px; padding: 0 5px; }
.fxRight { display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.fxRhead b { font-size: 17px; }
.fxRhead small { display: block; font-size: 11.5px; color: var(--sub); font-weight: 800; }
.fxGlobal { background: rgba(127,246,255,.12); border: 1px solid rgba(127,246,255,.4); border-radius: 10px; padding: 6px 10px; font-size: 13.5px; font-weight: 900; display: flex; gap: 10px; flex-wrap: wrap; }
.fxGlobal b.up, .fxProc b.up { color: #7fffb0; }
.fxGlobal b.down, .fxProc b.down { color: #ff8a8a; }
.fxProcs { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; padding-right: 4px; }
.fxProc { position: relative; display: flex; gap: 8px; align-items: center; background: rgba(0,0,0,.25); border-radius: 10px; padding: 5px 8px; }
.fxProc.new { box-shadow: inset 0 0 0 2px #7fffb0; }
.fxProc.gone { opacity: .5; box-shadow: inset 0 0 0 2px #ff8a8a; }
.fxProc img { width: 36px; height: 36px; border-radius: 8px; border: 2px solid; flex: none; box-sizing: border-box; }
.fxProc .tx { min-width: 0; flex: 1; }
.fxProc .t1 { font-size: 13.5px; display: flex; gap: 6px; align-items: baseline; }
.fxProc .mul { color: #ffd25c; font-weight: 900; font-family: var(--num); }
.fxProc .t2 { font-size: 10.5px; color: var(--sub); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fxProc .pt + .pt::before { content: ' ＋ '; }
.fxProc .pt.imb { color: #9ff6ff; }
.fxStack { flex: none; font-size: 10.5px; font-weight: 900; background: rgba(127,246,255,.18); color: #bff8ff; border-radius: 6px; padding: 1px 6px; }
.fxTag { font-size: 10.5px; font-weight: 900; border-radius: 6px; padding: 0 5px; }
.fxTag.add { background: #7fffb0; color: #003a1a; }
.fxTag.del { background: #ff8a8a; color: #3a0000; }
.fxNote { font-size: 11px; color: var(--sub); font-weight: 700; line-height: 1.45; background: rgba(0,0,0,.25); border-radius: 10px; padding: 6px 10px; }
.fxEmpty { padding: 20px; text-align: center; color: var(--sub); font-weight: 800; }
.fxDiff { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: 11.5px; font-weight: 800; }
.fxDiff .up { color: #7fffb0; }
.fxDiff .down { color: #ff8a8a; }
.fxDiff .more, .fxDiff.none { color: var(--sub); }
.fxPrev { display: flex; gap: 6px; align-items: baseline; margin-top: 2px; }
.fxPrev .lb { font-size: 11.5px; font-weight: 900; color: #ffd25c; flex: none; }
.eqTotTt { line-height: 1.3; }
.eqTotBtns .eqHelpBtn { white-space: nowrap; padding: 5px 9px; }

/* ===== 1.10.2 リザルトの「つける」・準備 ===== */
.loot .lootEq { position: absolute; top: -12px; right: -10px; font: 900 11.5px/1 var(--num), sans-serif; padding: 5px 8px; border-radius: 10px; border: 2px solid #1a5a2a; background: linear-gradient(180deg, #8dffb4, #2fbf6a); color: #032a10; cursor: pointer; box-shadow: 0 2px 0 rgba(0,0,0,.4), 0 0 10px rgba(92,255,154,.7); animation: lootEqPulse 1s infinite; z-index: 2; }
.loot .lootEq.done { animation: none; background: #3a4a5a; color: #cfe; border-color: #2a3a4a; box-shadow: none; cursor: default; }
.loot .lootEq:disabled:not(.done) { animation: none; opacity: .6; }
@keyframes lootEqPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
.resBtns .resPrep { font-size: 15px; padding: 8px 12px; }
.modalBack.prepModal .modal { width: 640px; }
.prepList { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 14px; }
.prepItem { display: flex; gap: 12px; align-items: center; background: rgba(0,0,0,.3); border-radius: 12px; padding: 8px 12px; border-left: 5px solid #5cc8ff; }
.prepItem.equip { border-left-color: #5cff9a; }
.prepItem.party { border-left-color: #ff9af0; }
.prepItem.boss { border-left-color: #ff7a3a; background: rgba(120,40,10,.35); }
.prepItem img { width: 46px; height: 46px; border-radius: 10px; background: rgba(0,0,0,.35); object-fit: contain; flex: none; }
.prepItem .ic { width: 46px; height: 46px; border-radius: 10px; background: rgba(0,0,0,.35); display: flex; align-items: center; justify-content: center; font-size: 24px; flex: none; }
.prepItem b { display: block; font-size: 16px; }
.prepItem small { font-size: 13px; color: var(--sub); font-weight: 800; }
.prepOff { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 10px; font-size: 13px; color: var(--sub); font-weight: 800; cursor: pointer; }
.prepOff input { width: 16px; height: 16px; }
.prepItem img.nanashi { filter: grayscale(1) brightness(1.35) contrast(.8); opacity: .9; }
.resBtns { gap: 10px; }
.resBtns .btn { white-space: nowrap; font-size: 15px; padding: 10px 12px; }
.resBtns .btn.resNext { font-size: 18px; padding: 10px 16px; }

/* ===== 1.11.0 今日のミッションの報酬（進みぐあいで決まる） ===== */
.hb-mis .txtCol { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.hb-mis .txtCol .txt { flex: none; font-size: 17px; line-height: 1.2; }
.hb-mis .rw { font-size: 12px; font-weight: 900; color: #ffd447; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }

/* ===== 1.12.0 修行 v2（screens_train.js）・試練 ===== */
.trWrap.v2 { top: 86px; }
.trCard.v2 { min-height: 0; height: 500px; gap: 5px; padding: 10px 12px 12px; }
.trCard.v2 .hd { align-items: center; }
.trCard.v2 .hd .nm small { font-size: 12px; color: #6a6450; margin-left: 6px; }
.trCard.v2 .danB { font-size: 14px; font-weight: 900; padding: 2px 10px; border: 3px solid; border-radius: 10px; background: #1b2140; color: #ffe14a; white-space: nowrap; }
.trCard.v2 .lvRow { display: flex; align-items: baseline; justify-content: space-between; }
.trCard.v2 .lvRow .lv { font-size: 13px; font-weight: 900; color: #4a4a60; }
.trCard.v2 .lvRow .lv b { font-family: var(--num); font-size: 32px; color: #1a1d2a; margin-left: 3px; display: inline-block; }
.trCard.v2 .lvRow .lv b.pop { animation: trPop .35s ease-out; }
.trCard.v2 .lvRow .lv small { font-family: var(--num); font-size: 16px; color: #6a6450; }
.trCard.v2 .trMany { padding: 3px 10px; font-size: 12px; }
.trCard.v2 .trMany.disabled { opacity: .4; pointer-events: none; }
.trCard.v2 .val .bn { font-size: 30px; }
.trCard.v2 .nxv { font-size: 11px; font-weight: 800; color: #6a6450; min-height: 15px; }
.trCard.v2 .nx { font-size: 12px; line-height: 1.35; min-height: 32px; }
.trCard.v2 .nx b { color: #b0300a; }
.trCard.v2 .trSkills { max-height: 150px; overflow-y: auto; align-content: flex-start; }
.trCard.v2 .trSkills .sk.next { border-style: dashed; opacity: .75; }
.trCard.v2 .trBtn .t { font-size: 20px; }
.trCard.v2 .trBtn .c { font-size: 12px; }
.trCard.v2.trial { border-color: #ffb020; box-shadow: 7px 8px 0 rgba(0,0,0,.35), 0 0 0 4px rgba(255,212,71,.55); }
.trCard.v2.trial .trBtn { animation: trGlow 1.1s ease-in-out infinite; }
@keyframes trGlow { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.18); box-shadow: 0 6px 0 rgba(0,0,0,.35), 0 0 22px rgba(255,212,71,.9); } }
.trCard.v2.maxed { background: linear-gradient(180deg, #fff6dc, #efe6ff); }
.trCard.v2.pulse { animation: trCardPulse .6s ease-out; }
@keyframes trCardPulse { 0% { transform: scale(1.04); } 100% { transform: scale(1); } }
.trTotal .dan { margin-left: auto; font-size: 13px; color: #ffe14a; }
.trRule { min-width: 560px; max-width: 680px; font-weight: 800; line-height: 1.6; }
.trRule .big { font-size: 20px; font-weight: 900; color: #ffe14a; margin-bottom: 4px; }
.trRule ul { margin: 6px 0 8px 1.2em; padding: 0; }
.trRule li b { color: #7fe6ff; }
.trRule .prize { background: rgba(255,212,71,.12); border: 2px solid rgba(255,212,71,.45); border-radius: 10px; padding: 6px 10px; margin: 6px 0; }
.trRule .prize b { color: #ffd447; }
.trRule small { color: #b8acd8; }
.hb-train .tr { background: #ffd447; color: #1a1d2a; font-size: 11px; padding: 0 6px; border-radius: 6px; animation: trGlow 1.1s ease-in-out infinite; }
.hb-train.trial { border-color: #ffd447; }
/* 試練の画面 */
.trialRun { position: absolute; left: 50%; top: 70px; transform: translateX(-50%); width: 900px; display: flex; flex-direction: column; align-items: center; gap: 12px; font-weight: 900; }
.trialRun .trHead { display: flex; align-items: baseline; gap: 14px; font-size: 18px; background: rgba(10,6,24,.75); border: 3px solid rgba(255,255,255,.18); border-radius: 12px; padding: 6px 18px; }
.trialRun .trHead .ic { font-size: 26px; }
.trialRun .trHead b { font-size: 24px; color: #ffe14a; }
.trialRun .trHead .how { font-size: 13px; color: #b8acd8; }
.trialRun .trCount { font-size: 140px; color: #ffd25c; font-family: var(--num); margin-top: 60px; }
.trialRun .trTime { position: relative; width: 760px; height: 26px; border-radius: 14px; background: rgba(255,255,255,.12); border: 3px solid rgba(255,255,255,.3); overflow: hidden; }
.trialRun .trTime i { position: absolute; left: 0; top: 0; bottom: 0; transition: width .1s linear; }
.trialRun .trTime span { position: absolute; inset: 0; text-align: center; font-size: 14px; line-height: 20px; text-shadow: 0 1px 2px #000; }
.trialRun .trInfo { display: flex; gap: 28px; font-size: 18px; color: #e8e2ff; }
.trialRun .trInfo .miss.max { color: #ff7a7a; }
.trialRun .trQ { display: flex; flex-direction: column; align-items: center; margin-top: 14px; }
.trialRun .trQ small { font-size: 18px; color: #b8acd8; }
.trialRun .trQ .nm { font-size: 64px; color: #fff; text-shadow: 0 4px 0 rgba(0,0,0,.5); }
.trialRun .trQ .nm rt { font-size: 18px; }
.trialRun .trQ .no { font-size: 110px; font-family: var(--num); line-height: 1; text-shadow: 0 4px 0 rgba(0,0,0,.5); }
.trialRun .trQ .sym { font-size: 120px; font-family: var(--num); line-height: 1; text-shadow: 0 4px 0 rgba(0,0,0,.5); }
.trialRun .trIn { margin-top: 6px; }
.trialRun .trIn.kana { font-family: var(--num); letter-spacing: .06em; }
.trialRun .trIn.kana .typed { color: #5cff9a; }
.trialRun .trIn.kana .rest { color: rgba(255,255,255,.45); }
.trialRun .trIn.kana .rest.hide { color: rgba(255,255,255,.3); }
.trialRun .trAns { font-size: 22px; color: #ffd447; }
.trialRun .trChain { display: flex; gap: 6px; }
.trialRun .trChain .c { width: 64px; height: 72px; border-radius: 10px; background: rgba(255,255,255,.08); border: 3px solid rgba(255,255,255,.2); display: flex; flex-direction: column; align-items: center; justify-content: center; font-family: var(--num); font-size: 28px; }
.trialRun .trChain .c small { font-size: 12px; color: #b8acd8; }
.trialRun .trChain .c.done { background: rgba(92,224,138,.25); border-color: #5ce08a; }
.trialRun .trChain .c.cur { background: rgba(255,212,71,.25); border-color: #ffd447; transform: scale(1.12); }
.trialRun .trTip { font-size: 13px; color: #b8acd8; margin-top: 8px; }
/* ===== 1.12.0 闇の深淵の日誌（map_abyss.js の AbyssNotes / abyssNote） ===== */
.anWrap { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -54%); width: 760px; }
.anCard { background: rgba(14,6,30,.92); border: 4px solid #8a6cff; border-radius: 16px; padding: 16px 22px 18px; box-shadow: 0 10px 40px rgba(0,0,0,.6), 0 0 30px rgba(140,100,255,.25); color: #efe8ff; }
.anCard.p2 { border-color: #c9a85a; background: linear-gradient(180deg, rgba(30,22,10,.94), rgba(18,10,26,.94)); box-shadow: 0 10px 40px rgba(0,0,0,.6), 0 0 30px rgba(255,210,120,.18); }
.anCard.letter { background: linear-gradient(180deg, #fffaf0, #fdf0dc); border-color: #ffd9a0; color: #4a3a2a; box-shadow: 0 10px 40px rgba(0,0,0,.6), 0 0 40px rgba(255,240,200,.35); }
.anHead { display: flex; align-items: baseline; gap: 12px; border-bottom: 2px dashed rgba(255,255,255,.2); padding-bottom: 6px; margin-bottom: 10px; }
.anCard.letter .anHead { border-color: rgba(120,90,50,.3); }
.anHead .dp { font-size: 13px; font-weight: 900; color: #b8acd8; }
.anCard.letter .anHead .dp { color: #a08a6a; }
.anHead b { font-size: 22px; font-weight: 900; color: #ffe14a; }
.anCard.p1 .anHead b { color: #d8b8ff; }
.anCard.letter .anHead b { color: #c07a2a; }
.anBody { display: flex; flex-direction: column; gap: 9px; }
.anL { font-size: 19px; font-weight: 800; line-height: 1.55; opacity: 0; animation: anIn .45s ease-out forwards; }
.anCard.all .anL, .anCard.small .anL { animation: none; opacity: 1; }
@keyframes anIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.anL.narr { color: #c8bce8; font-weight: 700; font-style: italic; }
.anL.bubble { display: flex; align-items: center; gap: 10px; background: rgba(60,20,100,.55); border: 2px solid rgba(200,160,255,.5); border-radius: 30px; padding: 6px 16px 6px 8px; color: #f4ecff; }
.anL.bubble .q { flex: none; width: 34px; height: 34px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #6a3aa8, #1a0830); border: 2px solid #c38cff; display: flex; align-items: center; justify-content: center; font-weight: 900; color: #fff; }
.anL.tag { display: flex; align-items: center; gap: 10px; }
.anL.tag .tg { font-size: 12px; background: #3a2a10; color: #f0e0b0; padding: 2px 8px; border-radius: 6px; }
.anL.tag b { font-size: 22px; background: #f3e6c4; color: #3a2a10; padding: 2px 16px; border-radius: 4px 14px 14px 4px; border: 2px solid #b89a5a; box-shadow: 2px 3px 0 rgba(0,0,0,.35); }
.anL.diary { background: repeating-linear-gradient(180deg, transparent 0 29px, rgba(255,230,170,.18) 29px 30px); color: #fff3d0; padding-left: 10px; border-left: 3px solid rgba(255,210,120,.5); }
.anL.say { display: flex; gap: 10px; }
.anL.say .nm { flex: none; min-width: 92px; font-size: 14px; font-weight: 900; padding-top: 3px; }
.anL.letter { font-size: 20px; color: #4a3a2a; letter-spacing: .04em; }
.anSign { text-align: right; font-size: 18px; font-weight: 900; color: #c07a2a; margin-top: 8px; }
.anHint { position: absolute; left: 50%; bottom: 40px; transform: translateX(-50%); text-align: center; font-size: 16px; font-weight: 900; color: #e8e2ff; text-shadow: 0 2px 4px #000; animation: anBlink 1.4s ease-in-out infinite; }
.anHint small { display: block; font-size: 12px; color: #b8acd8; margin-top: 4px; animation: none; }
@keyframes anBlink { 50% { opacity: .55; } }
.anModal .modal { width: 820px; max-width: 94vw; }
.anList { max-height: 470px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding-right: 6px; }
.anCard.small { padding: 10px 14px 12px; }
.anCard.small .anL { font-size: 15px; }
.anCard.small .anHead b { font-size: 16px; }
.anCard.small .anL.tag b { font-size: 16px; }
.anCard.small .anL.bubble .q { width: 26px; height: 26px; }
.anEv { display: flex; align-items: center; gap: 12px; background: rgba(255,212,71,.1); border: 2px solid rgba(255,212,71,.4); border-radius: 12px; padding: 8px 14px; font-weight: 900; }
.anEv .dp { font-size: 13px; color: #b8acd8; }
.anEv b { color: #ffe14a; flex: 1; }
.layerBar .anBtn { background: #2a1a40; color: #f0e0b0; }
.trCard.v2 .hd .nm { white-space: nowrap; overflow: hidden; font-size: 21px; }
.trCard.v2 .hd .nm small { font-size: 11px; }
.trCard.v2 .trSkills { max-height: 178px; gap: 3px; }
.trCard.v2 .trSkills .sk { font-size: 10.5px; padding: 1px 6px; }
.anNew { font-size: 11px; font-weight: 900; color: #1a1d2a; background: #ffd447; border-radius: 6px; padding: 1px 7px; margin-left: 6px; }
/* 1.12.1 闇のボク（会話の立ち絵） */
.advChar.dq img { filter: drop-shadow(0 0 16px rgba(255,40,110,.45)); transform-origin: 50% 100%; }
.advChar.dq.bump img { animation: dqBump .35s ease-out; }
@keyframes dqBump { 0% { transform: translateY(0) scale(1); } 35% { transform: translateY(-10px) scale(1.02, .98); } 100% { transform: none; } }

/* 層えらび（1.12.1）：スライダー＋99マスの一覧 */
.layerBar .lbCur { cursor: pointer; position: relative; padding: 2px 18px 2px 8px; border-radius: 10px; }
.layerBar .lbCur:hover { background: rgba(255,255,255,.08); }
.layerBar .lbCur .lbPick { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-style: normal; font-size: 13px; color: #e0c0ff; }
.lpModal .modal { width: 720px; padding: 18px 24px; }
.lpModal .modalTitle { font-size: 22px; margin-bottom: 8px; }
.lpInfo { display: flex; align-items: baseline; gap: 14px; justify-content: center; margin-bottom: 8px; font-weight: 800; color: #e6d8ff; white-space: nowrap; overflow: hidden; }
.lpInfo b { font-size: 24px; color: #f4e2ff; text-shadow: 0 0 10px rgba(200,120,255,.7); }
.lpInfo .lpMuts { font-size: 12px; color: #ffd0f0; }
.lpSlide { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.lpSlide .btn.small { padding: 4px 10px; font-size: 14px; }
.lpTrack { position: relative; flex: 1; height: 30px; display: flex; align-items: center; }
.lpRange { width: 100%; accent-color: #c87aff; height: 22px; cursor: pointer; }
.lpRest { position: absolute; right: 0; top: 50%; height: 6px; transform: translateY(-50%); background: repeating-linear-gradient(90deg, rgba(0,0,0,.55) 0 6px, rgba(0,0,0,.25) 6px 10px); border-radius: 3px; pointer-events: none; }
.lpGrid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; margin: 6px 0 6px; }
.lpCell { position: relative; height: 30px; border-radius: 7px; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 900; color: #e8dcff; background: rgba(255,255,255,.06); border: 2px solid rgba(200,150,255,.25); cursor: pointer; user-select: none; }
.lpCell:hover { border-color: #f0d8ff; background: rgba(200,120,255,.22); }
.lpCell.done { background: linear-gradient(180deg, #7a3ab8, #45186e); border-color: rgba(230,190,255,.6); color: #fff; }
.lpCell.some { border-color: #c87aff; border-style: dashed; }
.lpCell.lock { opacity: .28; cursor: default; border-color: rgba(255,255,255,.1); }
.lpCell.now { box-shadow: 0 0 0 2px var(--gold) inset; }
.lpCell.sel { border-color: #ffe14a; box-shadow: 0 0 10px rgba(255,225,74,.7); transform: scale(1.06); z-index: 1; }
.lpCell .lpEv { position: absolute; right: 2px; top: -1px; font-size: 10px; font-style: normal; color: #ffd25c; }
.lpLegend { display: flex; align-items: center; gap: 12px; font-size: 12px; font-weight: 800; color: #cbb8e8; margin-bottom: 6px; }
.lpLegend small { margin-left: auto; color: #a898c8; }
.lpK::before { content: ''; display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 4px; vertical-align: -2px; background: rgba(255,255,255,.06); border: 2px solid rgba(200,150,255,.25); }
.lpK.done::before { background: #6a2aa8; border-color: rgba(230,190,255,.6); }
.lpK.some::before { border: 2px dashed #c87aff; }
.lpK.lock::before { opacity: .3; }
.lpK:nth-child(3)::before { display: none; }
.layerBar > .btn { flex-shrink: 0; white-space: nowrap; }
.layerBar .lbCur { flex-shrink: 0; }
.layerBar .lbMuts { min-width: 0; flex-shrink: 1; }

/* 会話（1.12.4）：声を聞きおえるまで待つ・既読スキップ・ログ */
.advNext.wait { animation: advWaitPulse 1.1s ease-in-out infinite; font-size: 20px; color: #9fe0ff; }
.advNext.nudge { animation: advNudge .4s ease-out, advWaitPulse 1.1s ease-in-out .4s infinite; }
@keyframes advWaitPulse { 0%,100% { opacity: .55; transform: scale(.92); } 50% { opacity: 1; transform: scale(1.08); } }
@keyframes advNudge { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.advWait { position: absolute; right: 60px; bottom: 12px; padding: 4px 12px; border-radius: 999px; background: rgba(20,60,90,.9); border: 1px solid rgba(160,220,255,.6); color: #dff4ff; font-size: 14px; font-weight: 800; opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .2s; pointer-events: none; white-space: nowrap; }
.advWait.on { opacity: 1; transform: translateY(0); }
.advTools .btn.dis { opacity: .45; filter: grayscale(.6); }
.advLogModal .modal { width: 940px; padding: 18px 22px; }
.advLogModal .modalTitle { font-size: 22px; margin-bottom: 8px; }
.advLog { width: 100%; max-height: 500px; overflow-y: auto; padding-right: 6px; }
.advLog .row { display: flex; align-items: flex-start; gap: 10px; padding: 8px 6px; }
.advLog .row b { flex: 0 0 150px; text-align: right; margin-right: 0; }
.advLog .row .t { flex: 1; line-height: 1.55; }
.advLog .row.kin b { color: #f2d48a; }
.advLog .row.myaku b { color: #ff9ac8; }
.advLog .row.myakuD b { color: #e06aff; }
.advLog .row.narr .t { color: #c9c2dc; font-style: italic; }
.advLog .row.now { background: rgba(255,210,92,.1); border-radius: 8px; }
.advLog .lgSep { margin: 14px 0 4px; text-align: center; font-size: 13px; font-weight: 900; color: #b9a8e0; letter-spacing: .1em; }
.advLog .lgSep::before, .advLog .lgSep::after { content: '―――'; margin: 0 10px; opacity: .5; }
.advLog .lgVoice { flex: 0 0 auto; border: 1px solid rgba(160,220,255,.5); background: rgba(30,60,90,.7); color: #dff4ff; border-radius: 8px; padding: 2px 8px; font-size: 15px; cursor: pointer; }
.advLog .lgVoice:hover, .advLog .lgVoice.on { background: #3a8ac8; }
.lgFoot { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.lgFoot small { flex: 1; color: #a898c8; font-size: 12px; font-weight: 700; }

/* プレイ時間（1.13.0） */
.cur.pt { cursor: pointer; }
.cur.pt i { background: radial-gradient(circle at 35% 35%, #e8fbff, #7fd8ff 60%, #2a7ab0); font-size: 14px; }
.cur.pt.low span { color: #ffd25c; }
.cur.pt.over span { color: #ff8a7a; }
.cur.pt.cp i { background: radial-gradient(circle at 35% 35%, #fff, #9cf0c8 60%, #1f9a6a); }
.cur.pt.cp span { color: #9cf0c8; }
.cur.pt.free span { font-size: 14px; color: #c8c0e0; }
.cur.pt.cls i { background: radial-gradient(circle at 35% 35%, #fff, #c9b8ff 60%, #6a4fc0); }
.cur.pt.cls span { color: #c9b8ff; font-size: 14px; }
.ptModal .modal { width: 620px; }
.ptModal.ptT .modal { width: 860px; max-height: 700px; overflow-y: auto; padding: 16px 22px; }
.ptLead { text-align: center; font-weight: 800; line-height: 1.6; margin-bottom: 10px; }
.ptLead small { color: #c8c0e0; }
.ptBox { margin: 4px 0 12px; }
.ptBar { height: 14px; border-radius: 7px; background: rgba(255,255,255,.12); overflow: hidden; border: 2px solid rgba(0,0,0,.3); }
.ptBar i { display: block; height: 100%; background: linear-gradient(90deg, #7fd8ff, #ffd25c 70%, #ff8a7a); }
.ptNow { margin-top: 8px; text-align: center; font-weight: 800; }
.ptNow b { font-size: 26px; margin-right: 8px; }
.ptNote { text-align: center; font-size: 13px; color: #c8c0e0; font-weight: 700; margin-top: 2px; }
.ptCp { margin-top: 10px; text-align: center; font-weight: 900; color: #9cf0c8; font-size: 18px; }
.ptCls { margin-top: 10px; text-align: center; font-weight: 900; color: #c9b8ff; font-size: 17px; }
.ptCoupon { display: flex; align-items: center; justify-content: center; gap: 10px; }
.ptCoupon b { font-size: 18px; }
.ptIn { width: 170px; font-size: 26px; text-align: center; letter-spacing: .18em; padding: 6px 10px; border-radius: 10px; border: 2px solid var(--gold); background: #fff; color: #1a1d2a; font-family: var(--num), monospace; font-weight: 900; }
.ptMsg { min-height: 24px; text-align: center; font-weight: 800; margin-top: 8px; font-size: 15px; }
.ptMsg.ok { color: #9cf0c8; } .ptMsg.ng { color: #ff9a8a; }
.ptTeacher { margin-right: auto; opacity: .7; }
.ptSec { background: rgba(0,0,0,.18); border-radius: 12px; padding: 10px 14px; margin-bottom: 10px; }
.ptSec h4 { margin: 0 0 8px; font-size: 17px; color: var(--gold); }
.ptRow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.ptRow > span:first-child { width: 36px; font-weight: 900; color: #c8c0e0; }
.ptSeg { display: flex; gap: 4px; flex-wrap: wrap; }
.ptSeg .btn.small { padding: 4px 10px; font-size: 14px; }
.ptSeg .btn.sel { background: linear-gradient(180deg, #ffe58a, #e0a520); color: #2a1a00; }
.ptCode { text-align: center; margin: 8px 0 4px; }
.ptCode b { display: block; font-size: 52px; letter-spacing: .12em; font-family: var(--num), monospace; color: #fff; text-shadow: 0 3px 0 rgba(0,0,0,.4); }
.ptCode small { color: #c8c0e0; font-weight: 800; }
.ptHelp { font-size: 12px; color: #a898c8; font-weight: 700; line-height: 1.5; margin: 4px 0; }
.ptLh { font-size: 12px; font-weight: 900; color: #c8c0e0; margin-top: 6px; }
.ptLg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px 10px; font-family: var(--num), monospace; font-weight: 900; font-size: 16px; }
.ptLg i { font-style: normal; font-size: 12px; color: #a898c8; margin-right: 6px; }
.ptGrant { width: 64px; font-size: 16px; padding: 3px 6px; border-radius: 8px; }
.ptDev { font-weight: 800; margin-bottom: 6px; }


/* ---- 1.13.7：きょうは ここまで（rest）・お話の つづき・前のセーブ・タブのおやすみ ---- */
.restBox { left: 50%; top: 50%; transform: translate(-50%, -50%); width: 620px; text-align: center; background: rgba(20,16,40,.82); border: 3px solid rgba(255,210,92,.55); border-radius: 22px; padding: 26px 30px 22px; box-shadow: 0 12px 40px rgba(0,0,0,.5); }
.restIcon { font-size: 64px; line-height: 1; }
.restTitle { font-size: 40px; font-weight: 900; color: var(--gold); margin: 10px 0 8px; text-shadow: 0 3px 0 rgba(0,0,0,.4); }
.restMsg { font-size: 19px; font-weight: 800; line-height: 1.7; }
.restMsg b { color: #c9b8ff; font-size: 24px; }
.restHeld { margin-top: 12px; font-size: 15px; font-weight: 800; color: #9cf0c8; }
.restBtns { margin-top: 18px; display: flex; gap: 12px; justify-content: center; align-items: center; }
.rsModal .modal { width: 560px; }
.rsNote { text-align: center; font-size: 14px; font-weight: 700; color: #c8c0e0; margin-top: 6px; }
.titleMenu .bakBtn { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 12px; white-space: nowrap; opacity: .85; }
.tabSleep { position: fixed; inset: 0; z-index: 100000; background: rgba(5,4,14,.88); display: flex; align-items: center; justify-content: center; font-family: inherit; color: #fff; }
.tsBox { width: min(560px, 92vw); text-align: center; background: #1c1836; border: 3px solid #7fd8ff; border-radius: 20px; padding: 26px 24px 20px; box-shadow: 0 12px 40px rgba(0,0,0,.6); }
.tsIcon { font-size: 56px; }
.tsTitle { font-size: 30px; font-weight: 900; color: #7fd8ff; margin: 6px 0 10px; }
.tsMsg { font-size: 16px; font-weight: 700; line-height: 1.7; margin-bottom: 16px; }
.tsMsg b { color: #ffd25c; }
.tsBox .btn { position: static; font-size: 20px; padding: 10px 28px; }
.tsBox small { display: block; margin-top: 10px; color: #a898c8; font-weight: 700; }
/* 1.13.11：時間切れ・授業中の「冒険へ」 */
.hb-go .ptLk { display: none; position: absolute; left: 50%; bottom: -10px; transform: translateX(-50%); z-index: 2; background: rgba(20,16,40,.92); color: #ffd25c; border: 2px solid rgba(255,210,92,.6); font-size: 17px; font-weight: 900; padding: 3px 14px; border-radius: 12px; white-space: nowrap; pointer-events: none; }
.hb-go.ptLock .ptLk { display: block; }
.hb-go.ptLock .in { filter: grayscale(.85) brightness(.75); }
.hb-go.ptLock .in::after { display: none; }
/* 1.14.0：2周目マップの 等級の しるし */
.node .gTags { position: absolute; left: 50%; top: -24px; transform: translateX(-50%); display: flex; gap: 3px; align-items: center; background: rgba(10,6,20,.85); border-radius: 9px; padding: 1px 7px; font-size: 14px; white-space: nowrap; pointer-events: none; }
.node .gTags i { font-style: normal; font-weight: 900; text-shadow: 0 0 6px currentColor; }
.node .gTags b { font-size: 11px; color: #ffd23a; margin-left: 2px; }
.node .gTags b.as { color: #9fe0ff; }

/* 1.14.1：ゲームが 新しく なったよ（index.html の KeqUpd） */
.updModal .modal { min-width: 560px; max-width: 680px; }
.updBox { display: flex; align-items: center; gap: 18px; }
.updImg { width: 150px; height: 150px; object-fit: contain; flex: none; filter: drop-shadow(0 6px 10px rgba(0,0,0,.45)); animation: updHop 1.4s ease-in-out infinite; }
@keyframes updHop { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.updTxt { flex: 1; text-align: center; }
.updTxt .modalTitle { margin-bottom: 6px; }
.updVer { font-size: 17px; font-weight: 800; color: var(--sub); }
.updVer b { color: #5cff8a; font-size: 22px; }
.updTxt .modalMsg { margin: 10px 0 6px; font-size: 19px; }
.updGo { font-size: 22px; padding: 10px 36px; }
.updCnt { text-align: center; font-size: 14px; color: var(--sub); margin-top: 10px; }
/* 1.15.0：闇の深淵の 等級オーラ（層バー） */
.layerBar .lbMuts .lbAura { background: rgba(0,0,0,.45); border: 1px solid rgba(255,255,255,.25); border-radius: 8px; padding: 2px 6px; color: #e8e0ff; }
.layerBar .lbMuts .lbAura b { margin-left: 4px; }

/* 1.17.2：しんだん（設定 →「🩺 しんだん」） */
.dgModal .modal { width: 980px; max-width: 96vw; padding: 16px 20px; }
.dgModal .modalTitle { font-size: 22px; margin-bottom: 4px; }
.dgNote { font-size: 14px; color: #d8ccff; margin-bottom: 8px; }
.dgBox { max-height: 380px; overflow-y: auto; background: rgba(10,6,24,0.6); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
.dgRow { display: flex; gap: 12px; font-size: 14px; line-height: 1.55; padding: 2px 0; border-bottom: 1px dashed rgba(255,255,255,0.08); }
.dgRow b { flex: 0 0 210px; color: #bfb0ff; font-weight: 800; }
.dgRow span { flex: 1; color: #fff; word-break: break-all; }
.dgRow.warn span { color: #ffcf6a; }
.dgSub { margin: 10px 0 4px; font-weight: 800; color: #9fe0ff; font-size: 14px; }
.dgLog { font-family: monospace; font-size: 12.5px; line-height: 1.6; color: #e8e0ff; }
.dgLog .warn { color: #ffb86a; }
textarea.dgCode { height: 64px; }

/* 1.17.7：先生の パスワード欄（type="password" に しない＝Chrome が 保存・自動入力 しない。文字は ●● で かくす） */
.pwMask { -webkit-text-security: disc; text-security: disc; }
/* 1.17.7：バックアップ（書き出し・読み込み） */
.bkModal .modal { width: 680px; }
.bkLead { line-height: 1.75; margin-bottom: 12px; }
.bkLead small { color: #b8acd8; }
.bkBtns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 6px 0 10px; }
.bkBox:empty { display: none; }
.bkMsg { min-height: 22px; margin-top: 8px; text-align: center; line-height: 1.6; font-weight: 700; }
.bkMsg.ok { color: #5cff9a; }
.bkMsg.ng { color: #ff7a8a; }
/* 1.17.8：デバッグ装備（開発者Nの証） */
.eqSlot.eqDbg { border-color: rgba(127,246,255,.35); background: linear-gradient(90deg, rgba(20,60,70,.45), rgba(0,0,0,.3)); }
.eqSlot.eqDbg.sel { border-color: #7ff6ff; box-shadow: 0 0 12px rgba(127,246,255,.4); }
.eqSlot.eqDbg .sn { color: #9ff6ff; }
.eqDbgDetail .dbgCnt { font-size: 18px; font-weight: 900; color: #9ff6ff; }
.eqDbgDetail .dbgBonus { margin: 8px 0; padding: 10px 12px; border-radius: 12px; background: rgba(127,246,255,.08); border: 2px solid rgba(127,246,255,.35); font-size: 13.5px; line-height: 1.6; }
.eqDbgDetail .dbgBonus b { color: #9ff6ff; }
.eqDbgDetail .dbgBonus .now { font-weight: 900; color: #ffffff; }
.eqDbgDetail .dbgBonus small { color: #b8acd8; }
.eqSlot.mini.eqDbg { padding: 4px 10px; gap: 10px; }
.eqSlot.mini.eqDbg img, .eqSlot.mini.eqDbg .lockIc { width: 40px; height: 40px; border-width: 2px; font-size: 20px; }
.eqSlot.mini.eqDbg .sn { font-size: 12px; }
.eqSlot.mini.eqDbg .in { font-size: 14.5px; }
.eqTabs .btn { white-space: nowrap; }
.eqTabs.t5 .btn { font-size: 13px; padding: 6px 2px; }
.eqSlot.mini.eqDbg .dbgSlots { display: flex; gap: 6px; }
.eqSlot.mini.eqDbg .dbgS { position: relative; border-radius: 10px; border: 2px solid transparent; cursor: pointer; }
.eqSlot.mini.eqDbg .dbgS.on { border-color: #7ff6ff; }
.eqSlot.mini.eqDbg .dbgS .cnt { position: absolute; right: -4px; bottom: -4px; font-size: 11px; font-weight: 900; background: rgba(0,0,0,.75); color: #9ff6ff; border-radius: 6px; padding: 0 3px; }
.eqDbgDetail .dbgTbl { width: 100%; border-collapse: collapse; margin: 6px 0 4px; font-size: 13px; }
.eqDbgDetail .dbgTbl th { color: #9ff6ff; font-weight: 900; text-align: left; padding: 2px 4px; border-bottom: 1px solid rgba(127,246,255,.3); }
.eqDbgDetail .dbgTbl td { padding: 2px 4px; }
.eqDbgDetail .dbgTbl td.now { color: #ffffff; font-weight: 900; }
.eqDbgDetail { gap: 6px; }
.eqDbgDetail .top img { width: 78px; height: 78px; }
.eqDbgDetail .perk { font-size: 13.5px; padding: 8px 10px; line-height: 1.45; }
.eqDbgDetail .dbgBonus { margin: 2px 0; padding: 8px 10px; font-size: 12.5px; line-height: 1.5; }
.eqDbgDetail .dbgTbl td + td, .eqDbgDetail .dbgTbl th + th { white-space: nowrap; }
/* 1.18.0：開発者Nの証 ビームの わざ（12こ〜） */
.eqDbgDetail .perk { font-size: 13px; line-height: 1.4; }
.eqDbgDetail .dbgBonus { line-height: 1.45; }
.eqDbgDetail .dbgMs { padding: 6px 10px 8px; border-radius: 12px; background: rgba(255,210,92,.07); border: 2px solid rgba(255,210,92,.3); font-size: 12px; line-height: 1.3; }
.eqDbgDetail .dbgMs b { color: #ffe08a; display: block; margin-bottom: 4px; font-size: 12.5px; }
.eqDbgDetail .dbgMs .msGrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4px 6px; }
.eqDbgDetail .dbgMs .msGrid > div { display: flex; flex-direction: column; color: #8f86a8; background: rgba(0,0,0,.2); border-radius: 8px; padding: 3px 6px; }
.eqDbgDetail .dbgMs .msGrid > div.ok { color: #fff3c0; background: rgba(255,210,92,.12); }
.eqDbgDetail .dbgMs .mn { font-weight: 900; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eqDbgDetail .dbgMs .mt { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 1.18.1：仲間の エカ（理科モン画面） */
.mcard.ekaCard { border-color: #cfe2ff; background: linear-gradient(135deg, rgba(255,255,255,.18), rgba(143,180,255,.2), rgba(255,176,224,.18)); }
.mcard.ekaCard.sel { box-shadow: 0 0 14px rgba(207,226,255,.8); }
.mcard .ptag.eka { background: linear-gradient(90deg, #8fb4ff, #ffb0e0); color: #1a1030; }
.ekaDetail .ekaOdds { width: 100%; border-collapse: collapse; margin: 6px 0; font-size: 12.5px; }
.ekaDetail .ekaOdds td { padding: 2px 4px; border-bottom: 1px solid rgba(207,226,255,.2); vertical-align: top; }
.ekaDetail .ekaOdds td:first-child { font-weight: 900; white-space: nowrap; color: #cfe2ff; }
.ekaDetail .ekaOdds td:last-child { text-align: right; font-weight: 900; white-space: nowrap; }
.ekaDetail .ekaOdds tr.j td:first-child { color: #ffe14a; }
.ekaDetail .ekaOdds tr.m td:first-child { color: #ff9ad0; }
/* 1.19.3：アクト（理科モン画面の カード・くわしく） */
.mcard.akuCard { border-color: #7fd4ff; background: linear-gradient(135deg, rgba(127,212,255,.25), rgba(40,110,170,.25)); }
.mcard.akuCard.sel { box-shadow: 0 0 14px rgba(127,212,255,.85); }
.mcard .ptag.aku { background: linear-gradient(90deg, #7fd4ff, #e6f7ff); color: #06203a; }
.akuDetail .akuPass { margin: 6px 0 0; padding-left: 0; list-style: none; font-size: 12.5px; line-height: 1.45; color: #e6f7ff; }
.akuDetail .akuPass li { margin-bottom: 3px; } .akuDetail .akuPass b { color: #7fe6ff; margin-right: 6px; }

/* =====================================================================
   3周目「アクト外伝」（1.19.0）
   ===================================================================== */
/* ---- 会話（js/screens/adv_p3.js）・★ ステージ（js/p3/battle_core.js）：素材レビューの デモと 同じ 見た目 ---- */
/* =========== 3周目（p3/demo_p3.js） =========== */
/* 立ち絵の場所：左＝金次郎／中左＝脈はっくん／右の2つ＝アクト（右はし）と もうひとり */
.advChars.p3 .advChar.L { left: 30px; }
.advChars.p3 .advMyaku { left: 236px !important; }
.advChars.p3 .advChar.R { right: 40px; }
.advChars.p3 .advChar.R2 { right: 300px; }
.advChars.p3 .advChar.R img, .advChars.p3 .advChar.R2 img { height: 450px !important; }
.advChars.p3 .advChar.p3rk img { height: 405px !important; }
.advChars.p3 .advChar.p3drop { animation: p3drop .75s cubic-bezier(.3,.0,.5,1.25); }
@keyframes p3drop { 0% { transform: translateY(-560px) rotate(-14deg); opacity: .2; } 70% { transform: translateY(18px) rotate(3deg); opacity: 1; } 100% { transform: none; } }
/* 名前の札 */
.advName.p3aku { background: linear-gradient(180deg, #e2f7ff, #74c8ef); color: #072638; }
.advName.p3yoruka { background: linear-gradient(180deg, #f1ecff, #ab9ee6); color: #1c1340; }
.advName.p3saie { background: linear-gradient(180deg, #f6edd8, #c9a96c); color: #2a1d08; }
.advName.p3note { background: linear-gradient(180deg, #fffaf0, #e8dcc0); color: #4a3418; }
/* 観察ノートの行：ノートの紙 */
.advBox.p3note { background: linear-gradient(180deg, rgba(255,251,240,.97), rgba(246,238,218,.98)); border-color: #8a6a3a; box-shadow: inset 0 0 0 3px #d8c49a, 6px 8px 0 rgba(0,0,0,.35); }
.advBox.p3note::before { content: ''; position: absolute; inset: 22px 26px 14px; background: repeating-linear-gradient(180deg, transparent 0 39px, rgba(70,110,170,.22) 39px 41px); pointer-events: none; border-radius: 4px; }
.advBox.p3note .advText { position: relative; color: #2c2416; text-shadow: none; font-family: "Klee One", "Hiragino Maru Gothic ProN", "BIZ UDPGothic", serif; font-weight: 600; }
.advBox.p3note .advNext { color: #8a6a3a; }
/* 線を引いた本音 */
.advBox.p3strike .advText { color: #6b5b46; text-decoration: line-through; text-decoration-thickness: 3px; text-decoration-color: rgba(190,40,40,.75); letter-spacing: .04em; }
/* ================= あそんでいる あいだ ================= */
.b3Pause { right: 14px; top: 10px; z-index: 6; font-size: 20px; padding: 6px 14px; }
.b3kb { left: 0; right: 0; bottom: 0; height: 244px; z-index: 6; padding: 8px 12px 8px; box-sizing: border-box; display: flex; flex-direction: column; gap: 8px; background: linear-gradient(180deg, rgba(8,10,20,.0), rgba(8,10,20,.82) 14%); touch-action: none; -webkit-user-select: none; user-select: none; }
.b3kr { display: flex; gap: 8px; justify-content: center; flex: 1; }
.b3k { flex: 1 1 0; max-width: 118px; display: flex; align-items: center; justify-content: center; font-family: "Arial Black", Arial, sans-serif; font-size: 34px; color: #fff; background: linear-gradient(180deg, rgba(74,84,120,.92), rgba(40,46,70,.94)); border: 3px solid #12141d; border-radius: 12px; box-shadow: 0 4px 0 rgba(0,0,0,.5); touch-action: none; cursor: pointer; }
.b3k.on { background: linear-gradient(180deg, #ffe46a, #ffc93d); color: #1a1405; transform: translateY(3px); box-shadow: 0 1px 0 rgba(0,0,0,.5); }
.b3k.bs { max-width: 150px; font-size: 26px; background: linear-gradient(180deg, rgba(120,70,80,.92), rgba(70,36,46,.94)); }
/* ================= 結果 ================= */
.b3Res { inset: 0; z-index: 8; display: flex; align-items: center; justify-content: center; background: rgba(6,6,16,.5); animation: b3fade .35s ease-out both; }
@keyframes b3fade { from { opacity: 0; } to { opacity: 1; } }
.b3ResIn { width: 1130px; height: 600px; display: flex; gap: 22px; align-items: stretch; }
.b3Pola { width: 430px; flex: none; display: flex; flex-direction: column; gap: 12px; justify-content: center; }
.b3Pola .ph { background: #fdfcf6; border-radius: 6px; padding: 12px 12px 10px; box-shadow: 6px 10px 0 rgba(0,0,0,.35); transform: rotate(-2.5deg); animation: b3pola .6s cubic-bezier(.2,.9,.3,1.3) both .15s; }
@keyframes b3pola { from { opacity: 0; transform: rotate(-14deg) translateY(60px) scale(.8); } to { opacity: 1; transform: rotate(-2.5deg); } }
.b3Pola .ph .im { width: 100%; aspect-ratio: 3 / 2; background: #0b0d18 center / cover no-repeat; border-radius: 3px; }
.b3Pola .ph .cp { font-family: "Klee One", "Hiragino Maru Gothic ProN", "BIZ UDPGothic", serif; font-weight: 600; color: #3a2d1a; font-size: 18px; text-align: center; padding-top: 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.b3Note { background: linear-gradient(180deg, rgba(255,251,240,.97), rgba(246,238,218,.98)); border: 3px solid #8a6a3a; border-radius: 10px; box-shadow: inset 0 0 0 2px #d8c49a, 5px 6px 0 rgba(0,0,0,.35); padding: 9px 14px 10px; transform: rotate(1.2deg); animation: b3pola2 .5s ease-out both .45s; }
@keyframes b3pola2 { from { opacity: 0; transform: rotate(6deg) translateY(40px); } to { opacity: 1; transform: rotate(1.2deg); } }
.b3Note .lb { font-size: 12px; font-weight: 900; color: #8a6a3a; letter-spacing: .08em; }
.b3Note .ln { font-family: "Klee One", "Hiragino Maru Gothic ProN", "BIZ UDPGothic", serif; font-weight: 600; color: #2c2416; font-size: 17px; line-height: 1.55; }
.b3Note .ln.st { color: #6b5b46; text-decoration: line-through; text-decoration-thickness: 3px; text-decoration-color: rgba(190,40,40,.75); }
.b3Note .ms { margin-top: 5px; padding-top: 5px; border-top: 2px dashed rgba(138,106,58,.4); font-size: 14px; font-weight: 800; color: #5a4424; line-height: 1.6; }
.b3Note .ms b { font-family: "Arial Black", Arial, sans-serif; color: #b03030; margin-right: 3px; }
.b3Main { flex: 1; min-width: 0; padding: 16px 24px 16px; display: flex; flex-direction: column; position: relative; }
.b3Main .hd { display: flex; align-items: baseline; gap: 12px; }
.b3Main .hd .st { font-family: "Arial Black", Arial, sans-serif; font-size: 15px; color: #1a1405; background: #ffd23d; border: 2px solid #12141d; border-radius: 8px; padding: 1px 10px; }
.b3Main .hd .df { font-size: 13px; font-weight: 900; color: #b8c6e8; }
.b3Main .ti { font-size: 32px; font-weight: 900; color: #fff; text-shadow: 0 4px 0 #12141d; margin: 4px 0 0; white-space: nowrap; max-width: 440px; overflow: hidden; text-overflow: ellipsis; }
.b3Main .top { min-height: 150px; }
.b3Main .cl { font-family: "Arial Black", Arial, sans-serif; font-size: 46px; line-height: 1.1; color: #ffe46a; text-shadow: 0 4px 0 #12141d, 0 0 22px rgba(255,200,60,.55); letter-spacing: .02em; transform-origin: left center; animation: b3clear .5s cubic-bezier(.2,.9,.3,1.5) both; }
@keyframes b3clear { from { transform: scale(2.2); opacity: 0; } to { transform: none; opacity: 1; } }
.b3Main .wl { font-size: 20px; font-weight: 900; margin-top: 2px; }
.b3Main .wl.win { color: #8af0a4; } .b3Main .wl.lose { color: #9fc4ff; }
.b3Rows { margin-top: 4px; display: grid; grid-template-columns: 1fr 1fr; gap: 5px 22px; }
.b3Row { display: flex; align-items: baseline; justify-content: space-between; border-bottom: 2px solid rgba(255,255,255,.1); padding: 3px 2px; font-size: 17px; font-weight: 900; color: #cfd6ee; opacity: 0; transform: translateX(-14px); transition: opacity .2s, transform .2s; }
.b3Row.in { opacity: 1; transform: none; }
.b3Row b { font-family: "Arial Black", Arial, sans-serif; font-size: 24px; color: #fff; }
.b3Row.big { grid-column: 1 / 3; font-size: 20px; }
.b3Row.big b { font-size: 40px; color: #ffe46a; text-shadow: 0 3px 0 #12141d; }
.b3Row .p { color: #ffe14a; } .b3Row .g { color: #5cffb0; } .b3Row .o { color: #8fd0ff; } .b3Row .hn { color: #c8c8e8; } .b3Row .ms { color: #ff8a96; } .b3Row .gr { color: #ff7ad9; }
.b3Stamp { position: absolute; right: 24px; top: 14px; width: 150px; height: 150px; border-radius: 50%; border: 9px solid; display: flex; flex-direction: column; align-items: center; justify-content: center; font-family: "Arial Black", Arial, sans-serif; transform: rotate(-12deg) scale(3.4); opacity: 0; background: rgba(12,14,26,.6); }
.b3Stamp.in { animation: b3stamp .32s cubic-bezier(.3,0,.2,1) both; }
@keyframes b3stamp { 0% { transform: rotate(-30deg) scale(3.4); opacity: 0; } 70% { transform: rotate(-12deg) scale(.92); opacity: 1; } 100% { transform: rotate(-12deg) scale(1); opacity: 1; } }
.b3Stamp small { font-size: 14px; letter-spacing: .18em; margin-bottom: -10px; }
.b3Stamp b { font-size: 94px; line-height: 1; }
.b3Stamp.b3rkS { background: radial-gradient(circle, rgba(255,210,61,.3), rgba(12,14,26,.6) 70%); }
.b3Best { margin-top: 8px; font-size: 16px; font-weight: 900; color: #e8c977; min-height: 26px; display: flex; gap: 14px; align-items: center; }
.b3Best .nr { color: #1a1405; background: linear-gradient(180deg, #ffe46a, #ffc93d); border: 2px solid #12141d; border-radius: 8px; padding: 1px 10px; animation: b3blink .5s steps(2) infinite; }
@keyframes b3blink { 50% { filter: brightness(1.5); transform: scale(1.06); } }
.b3Btns { margin-top: auto; display: flex; gap: 12px; justify-content: flex-end; flex-wrap: wrap; }
.b3Btns .btn { font-size: 20px; }
.b3Btns .btn small { font-family: "Arial Black", Arial, sans-serif; font-size: 11px; opacity: .65; margin-left: 6px; }
.b3Kari { font-size: 12px; color: #b8c6e8; margin-top: 6px; }
/* せってい・ポーズ */
.b3Set { width: 640px; }
.b3Set .setRow { font-size: 17px; gap: 16px; }
.b3Set .setRow > span { flex: 1; }
.b3Set input[type=range] { width: 220px; }
.b3SetNote { margin-top: 10px; font-size: 12px; color: #b8acd8; line-height: 1.7; }
.b3PauseBtns { display: flex; flex-direction: column; gap: 10px; min-width: 380px; }
.b3PauseBtns .btn { font-size: 20px; }
.b3Rew { margin-top: 6px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 16px; font-weight: 900; color: #e0e8ff; padding: 6px 10px; border-radius: 10px; background: rgba(127,230,255,.08); border: 2px solid rgba(127,230,255,.25); }
.b3Rew .sz { color: #7fe6ff; } .b3Rew .ex { color: #9fe0ff; } .b3Rew .gd { color: #ffd447; } .b3Rew .lv { color: #8af0a4; }
.b3Rew .dr { display: flex; gap: 6px; }
.b3Rew .dr img { width: 34px; height: 34px; border-radius: 8px; border: 2px solid; background: rgba(0,0,0,.35); object-fit: contain; }
/* ---- マップ（js/screens/map_p3.js） ---- */
.areaTabs.p3 { gap: 5px; }
.p3Parts { display: flex; gap: 6px; margin-bottom: 2px; }
.p3Parts .btn { flex: 1; font-size: 15px; padding: 6px 4px; line-height: 1.15; }
.p3Parts .btn small { display: block; font-size: 10px; font-weight: 800; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p3Parts .btn.sel { background: linear-gradient(180deg, #e2f7ff, #74c8ef); color: #072638; border-color: #ffffff; }
.p3Parts .btn.lock { opacity: .45; }
.areaTabs.p3 .atab { padding: 5px 8px; font-size: 14px; }
.areaTabs.p3 .atab .num { width: 26px; height: 26px; font-size: 13px; }
.areaTabs.p3 .atab .nm small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 170px; }
.areaTabs.p3 .atab.sel { border-color: #bff4ff; background: linear-gradient(90deg, #e2f7ff, #74c8ef); color: #072638; }
.areaTabs.p3 .atab.sel .nm small, .areaTabs.p3 .atab.sel .pr { color: #0b3a52; }
.areaTabs.p3 .atab.extra { border-style: dashed; }
.mapStage.p3 .mapHead b { font-size: 30px; }
.p3Tag { position: absolute; left: 22px; top: 58px; font-size: 15px; font-weight: 800; color: #d8f4ff; text-shadow: 0 2px 0 #000; }
.node.p3n { background: radial-gradient(circle at 35% 30%, #2a5a8a, #0d2440); border-color: rgba(191,244,255,.45); }
.node.p3n.cleared { border-color: #7fe6ff; background: radial-gradient(circle at 35% 30%, #2a7a8a, #0a3040); }
.node.p3end { display: flex; align-items: center; justify-content: center; }
.node.p3end .p3ic { font-size: 54px; line-height: 1; filter: drop-shadow(0 3px 0 rgba(0,0,0,.5)); }
.node.p3end.key { background: radial-gradient(circle at 35% 30%, #8a7a2a, #3a2a08); border-color: #ffe46a; }
.node.p3end.key .p3ic { color: #ffe46a; }
.node.p3end.story { background: radial-gradient(circle at 35% 30%, #5a6a9a, #1a2240); border-color: #cfe2ff; }
.node.p3end.boss img { width: 112px; height: 112px; border-radius: 50%; }
.node .bossTag.key { background: #c89a10; } .node .bossTag.story { background: #4a6ab0; }
.node .p3nm { position: absolute; top: 132px; white-space: nowrap; font-size: 15px; font-weight: 900; color: #fff6c0; text-shadow: 0 2px 0 #000, 0 0 8px #000; }
.node.p3end .stars { bottom: -24px; }
.node.p3end.key .stars { bottom: -46px; }
.layerBar.p3Tier { gap: 6px; padding: 0 8px; background: linear-gradient(90deg, rgba(8,26,46,.94), rgba(12,40,66,.94)); border-color: rgba(127,230,255,.5); }
.p3Ticks { flex: 1; display: flex; gap: 4px; height: 36px; }
.p3Tick { flex: 1; position: relative; display: flex; align-items: center; justify-content: center; border-radius: 9px; cursor: pointer; background: rgba(255,255,255,.06); border: 2px solid var(--tc); border-bottom-width: 6px; transition: transform .1s; font-family: "Arial Black", Arial, sans-serif; }
.p3Tick b { font-size: 13px; color: #fff; text-shadow: 0 1px 0 #000; }
.p3Tick i { position: absolute; top: -9px; right: -4px; font-style: normal; font-size: 12px; color: #ffd25c; text-shadow: 0 1px 0 #000; }
.p3Tick:hover { transform: translateY(-2px); }
.p3Tick.lock { opacity: .4; border-style: dashed; }
.p3Tick.lock i { color: #fff; font-size: 10px; }
.p3Tick.done { background: rgba(255,210,92,.14); }
.p3Tick.allS { background: linear-gradient(180deg, rgba(255,226,106,.55), rgba(255,170,30,.4)); }
.p3Tick.sel { transform: translateY(-4px) scale(1.12); background: var(--tc); border-color: #ffffff; box-shadow: 0 0 14px var(--tc); z-index: 2; }
.p3Tick.sel b { color: #0a1220; text-shadow: none; }
.p3Tick.black.sel { background: #14001e; } .p3Tick.black.sel b { color: #ff9ac0; }
.layerBar.p3Tier .btn.small { padding: 5px 9px; font-size: 13px; }
.siDepth.p3, .resHead .resDepth.p3 { background: linear-gradient(180deg, #0d3a52, #061a2a); border: 2px solid #7fe6ff; color: #bff4ff; }
.p3Info .p3Story { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; font-weight: 800; }
.p3Info .p3Story b { color: #bff4ff; } .p3Info .p3Story .ok { color: #8af0a4; font-size: 13px; }
.p3Info .p3Desc { font-size: 14px; font-weight: 800; color: #cfd6ee; line-height: 1.6; margin-top: 4px; }
.p3TblModal .modal { width: 900px; }
.p3Tbl { width: 100%; border-collapse: collapse; font-weight: 800; font-size: 15px; }
.p3Tbl th { text-align: left; font-size: 13px; color: #9fb4d8; padding: 4px 8px; border-bottom: 2px solid rgba(255,255,255,.15); }
.p3Tbl td { padding: 5px 8px; border-bottom: 1px solid rgba(255,255,255,.08); }
.p3Tbl tr { cursor: pointer; } .p3Tbl tr:hover td { background: rgba(127,230,255,.08); }
.p3Tbl tr.sel td { background: rgba(127,230,255,.18); }
.p3Tbl tr.lock { opacity: .5; cursor: default; }
.p3Tbl td.au b { margin-right: 6px; }
.p3Dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 6px; vertical-align: middle; border: 1px solid #fff; }
.p3TblNote { font-size: 13px; color: #b8c6e8; font-weight: 800; margin: 6px 0; }
/* 1.19.3：クリア後の アクトと 勝負 */
.areaTabs.p3 .atab.duel { border-color: #7fd4ff; background: linear-gradient(90deg, rgba(14,50,90,.92), rgba(30,90,140,.88)); }
.areaTabs.p3 .atab.duel .num { background: #7fd4ff; color: #06203a; }
.areaTabs.p3 .atab.duel.sel { background: linear-gradient(90deg, #e6f7ff, #7fd4ff); }
.node .bossTag.duel { background: #2a8ad8; }
.node.p3end.boss .p3nm { top: 136px; color: #bff4ff; }
.node.p3end.boss .p3nm ~ .stars { bottom: -50px; }
.p3Info .akuDuel { margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: rgba(20,60,100,.55); border: 2px solid rgba(127,212,255,.6); font-weight: 800; font-size: 14px; line-height: 1.7; color: #e6f7ff; }
.p3Info .akuDuel b { color: #7fe6ff; margin-right: 4px; } .p3Info .akuDuel small { color: #9fd8ff; }
.p3Info .akuDuel .ok { color: #8af0a4; }
.p3Info .akuDuel .pb { height: 8px; border-radius: 4px; background: rgba(255,255,255,.12); overflow: hidden; margin: 2px 0 4px; }
.p3Info .akuDuel .pb div { height: 100%; background: linear-gradient(90deg, #3aa8ff, #bff4ff); }
.p3Credit { margin-top: auto; font-size: 11px; font-weight: 800; color: rgba(223,240,255,.75); text-shadow: 0 1px 0 #000; padding: 2px 4px; }
.resShizuku { color: #7fe6ff; text-shadow: 0 0 6px #2aa8d8; }
.hb-dest.p3 .plate .ttl { font-size: 28px; }
/* 1.19.2：3周目LR（第2弾）・セット効果「群れ」・水のしずくの 交換 */
.layerBar.p3Tier .btn.small.p3Sz { color: #bff4ff; border-color: rgba(127,230,255,.7); background: linear-gradient(180deg, #0d4a6a, #072a40); white-space: nowrap; }
.p3TradeModal .modal { width: 1060px; max-height: 720px; overflow-y: auto; padding-top: 14px; padding-bottom: 12px; }
.p3TradeModal .modalTitle { display: flex; align-items: baseline; gap: 14px; }
.p3TradeSz { font-size: 18px; color: #7fe6ff; text-shadow: 0 0 6px #2aa8d8; }
.p3TradeNote { font-size: 13px; font-weight: 800; color: #b8c6e8; margin: 2px 0 8px; line-height: 1.5; }
.p3TradeGrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.p3TradeCard { display: flex; flex-direction: column; gap: 4px; padding: 8px; border: 2px solid; border-radius: 12px; background: linear-gradient(180deg, rgba(10,40,64,.92), rgba(6,20,36,.92)); }
.p3TradeCard.own { box-shadow: 0 0 0 2px rgba(127,230,255,.25) inset; }
.p3TradeCard img { width: 48px; height: 48px; align-self: center; object-fit: contain; filter: drop-shadow(0 0 6px rgba(127,230,255,.5)); }
.p3TradeCard .nm { font-size: 14px; font-weight: 900; color: #e8f6ff; text-align: center; line-height: 1.3; }
.p3TradeCard .nm small { display: block; font-size: 11px; color: #9fd8ef; }
.p3TradeCard .tx { font-size: 11px; font-weight: 700; color: #c8d6ee; line-height: 1.4; flex: 1; max-height: 78px; overflow-y: auto; }
.p3TradeCard .btn { font-size: 12px; padding: 5px 6px; }
.p3TradeRows { display: flex; gap: 10px; margin-top: 10px; }
.p3TradeRow { flex: 1; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 2px solid rgba(127,230,255,.3); border-radius: 12px; background: rgba(10,30,50,.7); }
.p3TradeRow img { width: 40px; height: 40px; object-fit: contain; }
.p3TradeRow .nm { flex: 1; font-weight: 900; color: #e8f6ff; font-size: 14px; }
.p3TradeRow .nm small { display: block; font-size: 11px; color: #9fd8ef; }
.p3Set { padding: 6px 8px; border-radius: 10px; border: 1px solid rgba(127,230,255,.4); background: rgba(10,50,80,.35); font-size: 12px; font-weight: 800; color: #cfe6f6; cursor: help; }
.p3SetHead { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.p3SetHead b { color: #bff4ff; font-size: 13px; margin-right: 4px; }
.p3SetChip { padding: 1px 6px; border-radius: 8px; border: 1px solid rgba(127,230,255,.3); color: #8fa8c0; font-size: 11px; }
.p3SetChip.on { color: #e8fbff; border-color: #7fe6ff; background: rgba(127,230,255,.18); }
.p3Note { display: flex; align-items: center; gap: 6px; margin-top: 4px; } .p3Note b { color: #bff4ff; font-size: 12px; white-space: nowrap; } .p3Note small { color: #fff3a0; }
.p3NoteBar { flex: 1; height: 7px; border-radius: 4px; background: rgba(255,255,255,.12); overflow: hidden; }
.p3NoteBar i { display: block; height: 100%; background: linear-gradient(90deg, #4ab0ff, #7fe6ff, #fff3a0); }
.eqDetail .perk.p3 { font-size: 13px; padding: 8px; line-height: 1.45; }
.eqDetail .btn.p3SzBtn { border-color: rgba(127,230,255,.7); color: #bff4ff; }
.resPaw { margin-left: 8px; color: #ffd0e8; font-size: 13px; } .resPaw.bar { color: #d8e4ff; }
.b3Rew .dr img.p3lr { box-shadow: 0 0 10px #7fe6ff; }
.b3Rew .lr { color: #7fe6ff; text-shadow: 0 0 6px #2aa8d8; }
.eqDetail { overflow-y: auto; scrollbar-width: thin; }   /* 1.19.2：3周目LR は 文が 長いので、はみ出たら スクロール */

/* ===== 1.24.0 3周目の 予告ムービー（js/screens/p3_teaser.js） ===== */
#ui > .p3t { left: 0; top: 0; width: 1280px; height: 720px; background: #000; overflow: hidden; z-index: 5; transition: opacity .7s ease; }
.p3t.out { opacity: 0; }
.p3t > * { position: absolute; }
.p3t-img { left: 0; top: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform-origin: 50% 50%; will-change: transform, opacity; }
.p3t-img.on { opacity: 1; }
.p3t.shake .p3t-img.on { animation: p3tShake .55s ease-out 1; }
@keyframes p3tShake { 0%, 100% { translate: 0 0; } 15% { translate: -10px 6px; } 30% { translate: 9px -7px; } 45% { translate: -6px 4px; } 60% { translate: 4px -2px; } 80% { translate: -2px 1px; } }
.p3t-vig { inset: 0; pointer-events: none; background: radial-gradient(ellipse at center, rgba(0,0,0,0) 52%, rgba(0,0,10,.68) 100%); }
.p3t-dark { inset: 0; pointer-events: none; opacity: 0; transition: opacity 1.2s ease; background: radial-gradient(ellipse at 50% 60%, rgba(20,0,40,.15) 0%, rgba(6,0,18,.72) 70%, rgba(0,0,0,.9) 100%); }
.p3t-dark.on { opacity: 1; }
.p3t-bar { left: 0; width: 100%; height: 56px; background: #000; }
.p3t-bar.top { top: 0; } .p3t-bar.bot { bottom: 0; }
.p3t-text { left: 0; top: 318px; width: 100%; text-align: center; color: #fff; font-size: 46px; font-weight: 900; letter-spacing: .14em;
  text-shadow: 0 0 18px rgba(120,200,255,.55), 0 3px 8px #000; opacity: 0; transform: translateY(12px); transition: opacity .9s ease, transform 1.1s ease; }
.p3t-text.on { opacity: 1; transform: none; }
.p3t-text.small { top: 560px; left: 90px; width: auto; text-align: left; font-size: 30px; letter-spacing: .2em; }
.p3t-cap { left: 0; bottom: 76px; width: 100%; text-align: center; opacity: 0; transition: opacity .35s ease; pointer-events: none; }
.p3t-cap.on { opacity: 1; }
.p3t-cap b { display: block; font-size: 18px; margin-bottom: 4px; letter-spacing: .1em; text-shadow: 0 2px 4px #000; }
.p3t-cap span { display: inline-block; max-width: 1060px; font-size: 30px; line-height: 1.35; color: #fff; text-shadow: 0 2px 6px #000, 0 0 3px #000, 0 0 3px #000; }
.p3t-cap.long span { font-size: 26px; }
.p3t-n-aku { color: #8fd4ff; } .p3t-n-myaku_n { color: #ff9ec2; } .p3t-n-k { color: #ffd88a; }
.p3t-title { inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; opacity: 0; transition: opacity 1.2s ease; pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(0,10,30,.35) 0%, rgba(0,0,10,.55) 100%); }
.p3t-title.on { opacity: 1; }
.p3t-title > div { position: static; }
.p3t-t0 { font-size: 26px; color: #dff4ff; letter-spacing: .3em; text-shadow: 0 2px 6px #000; }
.p3t-t1 { margin: 6px 0 10px; display: flex; align-items: baseline; gap: 20px; }
.p3t-title.on .p3t-t1 { animation: p3tLogo 1.6s cubic-bezier(.2,.8,.2,1) both; }
@keyframes p3tLogo { 0% { opacity: 0; transform: scale(1.25); filter: blur(10px); } 60% { opacity: 1; filter: blur(0); } 100% { transform: scale(1); } }
.p3t-no { font-size: 42px; font-weight: 900; color: #ffe08a; text-shadow: 0 0 12px rgba(255,200,80,.6), 0 3px 8px #000; }
.p3t-main { font-size: 100px; font-weight: 900; color: #fff; letter-spacing: .08em; text-shadow: 0 0 26px #5cc8ff, 0 0 8px #9fe0ff, 0 5px 12px #000; }
.p3t-t2 { font-size: 30px; color: #fff; letter-spacing: .2em; text-shadow: 0 2px 8px #000; }
.p3t-t3 { margin-top: 18px; font-size: 22px; color: #ffe08a; letter-spacing: .12em; text-shadow: 0 2px 6px #000; }
.p3t-cr { margin-top: 26px; font-size: 15px; color: #cfe6ff; opacity: .85; text-shadow: 0 1px 4px #000; }
.p3t-load { left: 0; top: 340px; width: 100%; text-align: center; font-size: 22px; color: #9fb8d8; letter-spacing: .2em; }
.p3t-hint { right: 24px; bottom: 18px; font-size: 13px; color: #8a96aa; letter-spacing: .08em; }
.hb-dest .hb-trailer { position: absolute; left: 14px; bottom: 12px; z-index: 3; padding: 5px 14px; font-size: 15px; font-weight: 700; color: #fff; cursor: pointer;
  background: rgba(10,20,50,.72); border: 1px solid rgba(160,210,255,.6); border-radius: 16px; }
.hb-dest .hb-trailer:hover { background: rgba(40,70,130,.85); }

/* ===== 1.24.0 しゅうちゅうの せつめい（js/screens/focus_guide.js） ===== */
.fgModal .modal { width: 1180px; max-width: 1180px; padding: 16px 22px 14px; }
.fgLead { text-align: center; font-size: 17px; font-weight: 700; color: #cfe0ff; margin: -4px 0 10px; }
.fgSvg .fgY2 { fill: #ffe14a; font-size: 16px; font-weight: 900; }
.fgWrap { display: flex; gap: 16px; }
.fgCard { flex: 1; background: linear-gradient(180deg, #14203e, #0b1228); border: 3px solid #3a4c80; border-radius: 12px; padding: 10px 12px 12px; color: #e8f0ff; }
.fgHead { display: flex; align-items: center; gap: 8px; font-size: 20px; margin-bottom: 4px; }
.fgNo { display: inline-flex; width: 30px; height: 30px; align-items: center; justify-content: center; border-radius: 50%; background: #ffd84a; color: #3a2000; font-weight: 900; }
.fgFig { display: flex; justify-content: center; background: rgba(0,0,0,.25); border-radius: 8px; margin: 4px 0 8px; }
.fgSvg { display: block; font-family: inherit; }
.fgSvg .fgL { fill: #cfe0ff; font-size: 15px; font-weight: 700; }
.fgSvg .fgS { fill: #9fdcff; font-size: 14px; font-weight: 700; }
.fgSvg .fgC { fill: #fff; font-size: 13px; font-weight: 900; }
.fgSvg .fgC.dk { fill: #3a1000; } .fgSvg .fgC.sm { font-size: 12px; }
.fgSvg .fgK { fill: #6a4a00; font-size: 13px; font-weight: 900; }
.fgNote { font-size: 15px; line-height: 1.55; margin-top: 4px; }
.fgNote b { color: #ffe08a; }
.fgB { color: #6cc0ff; font-weight: 900; } .fgR { color: #ff7a62; font-weight: 900; } .fgY { color: #ffd24a; font-weight: 900; }
.shCard .fgOpen { margin-left: 8px; padding: 2px 10px; font-size: 13px; }
/* 1.24.1：ステータスの ひみつ（はみ出たら スクロール・しゅうちゅうの せつめいの ボタン） */
.shModal .modal { max-height: 700px; overflow-y: auto; scrollbar-width: thin; padding-top: 16px; padding-bottom: 14px; }
.shModal .modalBtns .fgOpen2 { background: linear-gradient(180deg, #2f6fd8, #1c4aa0); color: #fff; border-color: #9fdcff; }

/* ===== 1.24.1 3周目評価モード（あとで けす。js/game/playtime.js の evalBadge） ===== */
.evalBadge { position: absolute; right: 4px; top: 3px; z-index: 50; padding: 2px 10px; border-radius: 9px; pointer-events: auto; cursor: pointer;
  background: rgba(70,40,140,.88); color: #f2eaff; border: 1px solid rgba(200,170,255,.8); font: 800 12px/17px system-ui, sans-serif; box-shadow: 0 1px 4px rgba(0,0,0,.5); }
.evalBadge:hover { background: rgba(110,70,200,.95); border-color: #fff; }   /* 1.25.1：クリックで ふつうの モードに もどる */

/* ===================================================================== */
/* 1.25.0 物語の本（回想モード）：js/screens/book.js                       */
/* ===================================================================== */
/* 拠点の 右下の 本 */
.hb-book { left: 1104px; top: 600px; width: 166px; height: 114px; cursor: pointer; animation: hbIn .45s .38s cubic-bezier(.2,1.3,.4,1) both; }
.hb-book .gl { position: absolute; left: 14px; top: -14px; width: 140px; height: 110px; background: radial-gradient(ellipse at 50% 55%, rgba(255,214,120,.55), rgba(255,190,80,.18) 45%, rgba(255,190,80,0) 70%); animation: hbBookGl 2.6s ease-in-out infinite; pointer-events: none; }
@keyframes hbBookGl { 50% { opacity: .55; transform: scale(.94); } }
.hb-book .nw { position: absolute; left: 0; top: 6px; background: #ff4a6a; color: #fff; font-family: var(--num); font-weight: 900; font-size: 12px; padding: 1px 6px; border-radius: 6px; border: 2px solid #fff; transform: rotate(-12deg); z-index: 4; box-shadow: 0 2px 0 rgba(0,0,0,.35); animation: hbBookNw 1.2s ease-in-out infinite; }
@keyframes hbBookNw { 50% { transform: rotate(-12deg) scale(1.12); } }
.hb-book.lock .gl { display: none; }
.hb-book img.bk { position: absolute; left: 32px; top: -10px; width: 104px; height: 104px; object-fit: contain; transform: rotate(-8deg); filter: drop-shadow(0 7px 4px rgba(0,0,0,.5)); transition: transform .15s; }
.hb-book:hover img.bk { transform: rotate(-3deg) translateY(-5px) scale(1.06); }
.hb-book .lb { position: absolute; left: 12px; right: 8px; bottom: 6px; height: 30px; background: linear-gradient(180deg, #4a3420, #24170c); border: 2.5px solid #c9a75a; border-radius: 10px; color: #f6e7c4; font-weight: 900; font-size: 17px; text-align: center; line-height: 25px; box-shadow: 0 0 0 2px var(--line2), 4px 5px 0 rgba(0,0,0,.3); letter-spacing: .06em; }
.hb-book .key { position: absolute; right: 2px; top: 10px; background: rgba(255,255,255,.92); color: #1a1d2a; border: 2px solid var(--line2); border-radius: 6px; font-family: var(--num); font-weight: 900; font-size: 12px; padding: 0 6px; z-index: 4; box-shadow: 0 2px 0 var(--line2); }
.hb-book .lk { display: none; }
.hb-book.lock img.bk { filter: grayscale(.85) brightness(.65) drop-shadow(0 7px 4px rgba(0,0,0,.5)); }
.hb-book.lock .lk { display: block; position: absolute; left: 6px; right: 6px; top: 40px; text-align: center; font-size: 13px; font-weight: 800; color: #fff; background: rgba(46,36,96,.9); border: 1.5px solid #b9a8ff; border-radius: 8px; padding: 2px 0; z-index: 3; }

/* 1.25.1 本の 字：手書きふうの Klee One（SIL OFL 1.1・assets/fonts/OFL_KleeOne.txt）。ゲームで つかう 字と JIS 第1水準の 漢字だけに した もの */
@font-face { font-family: 'BookHand'; src: url('../assets/fonts/KleeOne-Regular-book.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'BookHand'; src: url('../assets/fonts/KleeOne-SemiBold-book.woff2') format('woff2'); font-weight: 600 700; font-display: swap; }
/* 画面・机 */
#ui > .bkScr { left: 0; top: 0; width: 1280px; height: 720px; overflow: hidden; z-index: 2; perspective: 2400px; perspective-origin: 50% 50%; }
.bkDesk { position: absolute; inset: 0; background:
  radial-gradient(ellipse 70% 60% at 50% 42%, rgba(255,214,150,.20), rgba(0,0,0,0) 70%),
  repeating-linear-gradient(180deg, rgba(0,0,0,.07) 0 1px, rgba(0,0,0,0) 1px 7px),
  repeating-linear-gradient(180deg, #6a4428 0 118px, #5f3d23 118px 120px, #64402a 120px 238px, #573720 238px 240px); }
.bkDesk::after { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 50%, rgba(0,0,0,0) 48%, rgba(0,0,0,.6) 100%); }
.bkTop { position: absolute; left: 10px; right: 10px; top: 5px; height: 38px; display: flex; align-items: center; gap: 8px; z-index: 10; }
.bkTb { font-family: var(--font); font-weight: 800; font-size: 15px; color: #f6e7c4; background: rgba(34,22,12,.82); border: 1.5px solid rgba(232,199,112,.5); border-radius: 10px; padding: 5px 11px; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.bkTb:hover { background: rgba(70,48,24,.92); border-color: #e8c770; }
.bkTb.on { border-color: #e8c770; box-shadow: inset 0 0 0 1px rgba(232,199,112,.5); }
.bkTb small { font-family: var(--num); font-size: 11px; font-weight: 900; color: #2a1d10; background: #e8c770; border-radius: 5px; padding: 0 5px; }
.bkTtl { flex: 1; min-width: 0; text-align: center; color: #f6e7c4; font-family: 'BookHand', var(--font); font-size: 17px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 2px 3px rgba(0,0,0,.7); }

/* 本（1.25.1 から 右びらき：右が はじめ・左へ すすむ） */
.bkBook { position: absolute; left: 66px; top: 96px; width: 1148px; height: 576px; perspective: 2400px; transition: transform .8s cubic-bezier(.3,.1,.25,1); --bkClothC: linear-gradient(180deg, #2f4d3f, #1c3026); }
.bkBook::before { content: ''; position: absolute; left: -14px; right: -14px; top: -9px; bottom: -11px; background: var(--bkCloth, none) 0 0 / 256px 256px, var(--bkClothC); border-radius: 10px; box-shadow: 0 22px 46px rgba(0,0,0,.65), inset 0 0 0 2px rgba(201,167,90,.35); transition: opacity .5s; }
.bkBook.closed { transform: translateX(287px); perspective: none; transform-style: preserve-3d; }   /* とじて いる ときだけ 3D（背表紙を 見せる） */
.bkBook.closed.tilt { transform: translateX(287px) rotateY(-36deg); }
.bkBook.closed::before, .bkBook.closed .bkPgBox.R, .bkBook.closed .bkEdge.R, .bkBook.closed .bkGutter, .bkBook.closed .bkMarks, .bkBook.closed .bkCorner { opacity: 0; }
.bkBook.closed .bkPgBox.L, .bkBook.closed .bkEdge.L { opacity: 0; }
.bkPgBox, .bkEdge, .bkGutter, .bkMarks { transition: opacity .5s; }
.bkPgBox { position: absolute; top: 0; width: 574px; height: 576px; }
.bkPgBox.L { left: 0; } .bkPgBox.R { left: 574px; }
.bkEdge { position: absolute; top: 4px; bottom: 4px; background: repeating-linear-gradient(90deg, #f1e6cb 0 1px, #c9b68c 1px 2px); }
.bkEdge.L { right: 1148px; border-radius: 4px 0 0 4px; }
.bkEdge.R { left: 1148px; border-radius: 0 4px 4px 0; }
.bkGutter { position: absolute; left: 548px; width: 52px; top: 0; bottom: 0; pointer-events: none; z-index: 3; background: linear-gradient(90deg, rgba(90,60,25,0), rgba(90,60,25,.16) 38%, rgba(60,36,12,.34) 50%, rgba(90,60,25,.16) 62%, rgba(90,60,25,0)); }
/* 背表紙（とじた 本を ななめから 見た とき。右びらきなので 右がわ） */
.bkSpineF { position: absolute; left: 574px; top: -9px; width: 52px; height: 594px; transform-origin: 0 50%; transform: rotateY(90deg); backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 3px;
  background: var(--bkSpine, none) center / auto 100% no-repeat, var(--bkCloth, none) 0 0 / 256px 256px, linear-gradient(90deg, #142219, #2c4a3b 40%, #1d3328); box-shadow: inset 0 0 0 1.5px rgba(201,167,90,.5); transition: opacity .4s; }
.bkBook:not(.closed) .bkSpineF { opacity: 0; pointer-events: none; }
.bkSpineF .sp { position: absolute; inset: 22px 0; display: flex; flex-direction: column; align-items: center; justify-content: space-between; color: #e8c770; font-family: 'BookHand', var(--font); }
.bkSpineF .spT { writing-mode: vertical-rl; font-size: 22px; font-weight: 600; letter-spacing: .3em; }
.bkSpineF .spE { font-size: 16px; }
.bkSpineF .spS { writing-mode: vertical-rl; font-size: 11px; letter-spacing: .12em; opacity: .9; }
.bkBook.skSpine .bkSpineF .sp { display: none; }

/* ページ */
.bkPg { position: absolute; inset: 0; overflow: hidden; color: #3b2a1a; font-family: 'BookHand', var(--font); font-kerning: none; font-feature-settings: normal; letter-spacing: 0; }
.bkPg.L { border-radius: 6px 0 0 6px; background: linear-gradient(90deg, #f6eddb 0%, #f4e9d2 82%, #e6d6b2 100%); }
.bkPg.R { border-radius: 0 6px 6px 0; background: linear-gradient(270deg, #f6eddb 0%, #f4e9d2 82%, #e6d6b2 100%); }
.bkPg::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(rgba(120,90,40,.05) 1px, rgba(0,0,0,0) 1.2px) 0 0 / 7px 7px; }
.bkPg.blank .bkEnd, .bkPg.k-guide { background: var(--bkEnd, none) 0 0 / 220px 220px, radial-gradient(rgba(232,199,112,.16) 1.5px, rgba(0,0,0,0) 1.7px) 0 0 / 22px 22px, radial-gradient(rgba(232,199,112,.1) 1.5px, rgba(0,0,0,0) 1.7px) 11px 11px / 22px 22px, #2c4638; }
.bkPg.blank .bkEnd { position: absolute; inset: 0; }
.bkHead { position: absolute; top: 20px; height: 22px; font-size: 13px; color: #9a8258; letter-spacing: .08em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-bottom: 1px solid rgba(154,130,88,.35); }
.bkPg.L .bkHead { left: 46px; right: 52px; }
.bkPg.R .bkHead { left: 52px; right: 46px; text-align: right; }
.bkNo { position: absolute; bottom: 14px; font-size: 14px; color: #9a8258; font-weight: 600; }
.bkPg.L .bkNo { left: 46px; } .bkPg.R .bkNo { right: 46px; }
/* 本文（たて書き：列は 右から 左へ） */
.bkBody { position: absolute; top: 56px; height: 476px; width: 476px; writing-mode: vertical-rl; }
.bkPg.L .bkBody { left: 46px; } .bkPg.R .bkBody { left: 52px; }
.bkB { position: relative; border-radius: 6px; cursor: pointer; transition: background .2s; }
.bkB:hover { background: rgba(232,199,112,.16); }
.bkB .ln { width: 34px; line-height: 34px; font-size: 20px; font-weight: 400; white-space: pre; }
.bkB .ln.ind, .bkB .ln.first { padding-top: 20px; }
.bkB.big .ln { font-weight: 600; }
.bkB.narr { color: #4d3c29; }
.bkB.wh { color: #6f5f84; }
.bkB.note .ln { color: #2a4a8c; background: linear-gradient(90deg, rgba(0,0,0,0) 2px, rgba(42,74,140,.2) 2px, rgba(42,74,140,.2) 3px, rgba(0,0,0,0) 3px); }
.bkB.strike .ln { text-decoration: line-through; text-decoration-color: rgba(170,40,40,.75); text-decoration-thickness: 2px; }
.bkB .nm { display: inline-block; font-size: 14px; font-weight: 600; color: #fff; padding: 6px 0; margin-bottom: 6px; border-radius: 5px; width: 24px; line-height: 24px; text-align: center; letter-spacing: 0; }
.bkB .tcy, .bkTitleP .tcy, .bkToc .tcy, .bkPart .tcy { text-combine-upright: all; -webkit-text-combine: horizontal; }
.bkB.speak { background: rgba(255,214,90,.26); box-shadow: inset -3px 0 0 #e0a020; }
.bkB.speak::before { content: '🔊'; position: absolute; right: 7px; top: -27px; font-size: 15px; writing-mode: horizontal-tb; animation: bkSpk 1s ease-in-out infinite; }
@keyframes bkSpk { 50% { transform: scale(1.18); } }
.bkH { position: relative; box-sizing: border-box; padding-left: 16px; }
.bkH .o { width: 26px; line-height: 26px; font-size: 18px; color: #b08a4a; }
.bkH .t { width: 38px; line-height: 38px; font-size: 24px; font-weight: 600; color: #4a2e14; white-space: pre; padding-top: 30px; }
.bkH::after { content: ''; position: absolute; left: 6px; top: 0; bottom: 0; width: 1.5px; background: linear-gradient(180deg, rgba(176,138,74,.75), rgba(176,138,74,0)); }
.bkFig { writing-mode: horizontal-tb; height: 476px; display: flex; flex-direction: column; align-items: center; justify-content: center; box-sizing: border-box; margin-left: 8px; overflow: hidden; }
.bkFig .fr { box-sizing: border-box; padding: 6px; background: #fffdf6; box-shadow: 0 2px 7px rgba(60,40,10,.3); transform: rotate(.6deg); }
.bkFig .fr img { width: 400px; height: 267px; display: block; object-fit: cover; }
.bkFig .noImg { width: 400px; height: 267px; display: flex; align-items: center; justify-content: center; font-size: 60px; color: #c8b48a; }
.bkFig .cap { margin-top: 8px; font-size: 15px; color: #7a6038; }
.bkMore { width: 34px; line-height: 34px; margin-left: 10px; color: #9a8258; font-size: 15px; padding-top: 40px; }
/* 部の とびら・本の とびら・読みかた・もくじ（たて書き） */
.bkPart, .bkTitleP { position: absolute; inset: 0; display: flex; flex-direction: row-reverse; align-items: center; justify-content: center; gap: 22px; text-align: start; }
.bkPart > div:not(.pOrn), .bkTitleP > div:not(.tMid) { writing-mode: vertical-rl; white-space: nowrap; }
.bkPart .pN { font-size: 60px; font-weight: 600; color: #4a2e14; letter-spacing: .12em; }
.bkPart .pS { font-size: 22px; color: #7a5a30; font-weight: 600; letter-spacing: .1em; }
.bkPart .pC { font-size: 15px; color: #9a8258; align-self: flex-end; margin-bottom: 120px; }
.bkPart .pOrn { writing-mode: vertical-rl; color: #b08a4a; font-size: 20px; letter-spacing: .3em; align-self: flex-start; margin-top: 110px; }
.bkTitleP .tSm { font-size: 17px; color: #7a5a30; font-weight: 600; letter-spacing: .14em; align-self: flex-start; margin-top: 96px; }
.bkTitleP .tT { font-size: 62px; font-weight: 600; color: #4a2e14; letter-spacing: .2em; }
.bkTitleP .tMid { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.bkTitleP .tOrn { color: #b08a4a; font-size: 22px; }
.bkTitleP .tArt { width: 150px; height: 150px; object-fit: contain; filter: drop-shadow(0 8px 6px rgba(60,40,10,.35)); }
.bkTitleP .tN { font-size: 16px; color: #7a6038; align-self: flex-end; margin-bottom: 70px; }
.bkGuide { position: absolute; left: 50px; right: 50px; top: 74px; background: #f8f0dc; border-radius: 10px; padding: 18px 22px; box-shadow: 0 6px 16px rgba(0,0,0,.45), inset 0 0 0 2px #c9a75a; color: #3b2a1a; font-family: 'BookHand', var(--font); }
.bkGuide .gT { font-size: 23px; font-weight: 600; text-align: center; margin-bottom: 8px; color: #4a2e14; }
.bkGuide ul { margin: 0; padding-left: 20px; }
.bkGuide li { font-size: 15.5px; line-height: 1.7; }
.bkGuide li b { font-weight: 600; color: #8a3a1a; }
.bkGuide .gS { margin-top: 10px; font-size: 13.5px; color: #7a6038; text-align: center; }
.bkToc { position: absolute; top: 52px; height: 480px; width: 476px; writing-mode: vertical-rl; }
.bkPg.L .bkToc { left: 46px; } .bkPg.R .bkToc { left: 52px; }
.bkToc .tocH { width: 70px; line-height: 64px; font-size: 32px; font-weight: 600; letter-spacing: .5em; color: #4a2e14; padding-top: 24px; box-sizing: border-box; }
.bkToc .tocP { width: 50px; box-sizing: border-box; display: flex; align-items: center; gap: 12px; padding-top: 6px; border-left: 1.5px solid rgba(154,120,70,.45); cursor: pointer; }
.bkToc .tocP .b { font-size: 22px; font-weight: 600; color: #4a2e14; }
.bkToc .tocP .s { font-size: 15px; color: #8a6a3a; }
.bkToc .tocS { width: 32px; display: flex; align-items: center; gap: 6px; font-size: 16px; padding: 14px 0 4px; cursor: pointer; border-radius: 5px; box-sizing: border-box; height: 100%; }
.bkToc .tocS:hover, .bkToc .tocP:hover { background: rgba(232,199,112,.22); }
.bkToc .tocS .n { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-height: 380px; }
.bkToc .tocS i { flex: 1; width: 0; border-left: 2px dotted rgba(154,120,70,.5); min-height: 10px; }
.bkToc .tocS .no { font-weight: 600; color: #7a5a30; font-size: 15px; }
.bkToc .tocE { color: #9a8258; padding-top: 40px; }
/* めくる ページ */
.bkLeaf { position: absolute; top: 0; width: 574px; height: 576px; transform-style: preserve-3d; transition: transform .62s cubic-bezier(.35,.05,.25,1); z-index: 5; pointer-events: none; }
.bkLeaf.R { left: 574px; transform-origin: 0 50%; }
.bkLeaf.L { left: 0; transform-origin: 100% 50%; }
.bkLeaf.R.go { transform: rotateY(-180deg); }
.bkLeaf.L.go { transform: rotateY(180deg); }
.bkLeaf .face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.bkLeaf .face.b { transform: rotateY(180deg); }
.bkLeaf .shade { position: absolute; inset: 0; pointer-events: none; opacity: 0; animation: bkShade .62s ease both; }
.bkLeaf.R .face.f .shade, .bkLeaf.L .face.b .shade { background: linear-gradient(90deg, rgba(40,25,5,.45), rgba(40,25,5,0) 70%); }
.bkLeaf.L .face.f .shade, .bkLeaf.R .face.b .shade { background: linear-gradient(270deg, rgba(40,25,5,.45), rgba(40,25,5,0) 70%); }
@keyframes bkShade { 0% { opacity: 0; } 45% { opacity: 1; } 100% { opacity: 0; } }
/* 表紙（右びらき：左に あって 右へ ひらく） */
.bkCover { position: absolute; left: -14px; top: -9px; width: 588px; height: 596px; transform-origin: 100% 50%; transform-style: preserve-3d; transition: transform .9s cubic-bezier(.3,.1,.25,1); z-index: 8; }
.bkCover.open { transform: rotateY(180deg); }
.bkCover.fade .b { opacity: 0; transition: opacity .18s; }
.bkCover .f, .bkCover .b { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 12px 4px 4px 12px; }
.bkCover .f { background: var(--bkCover, none) center / cover no-repeat, var(--bkCloth, none) 0 0 / 256px 256px, linear-gradient(135deg, #3a5e4e, #213a30 70%, #1a2f26); box-shadow: inset 0 0 0 12px rgba(33,58,48,.55), inset 0 0 0 14px #c9a75a, inset 0 0 0 19px rgba(33,58,48,.55), inset 0 0 0 20px #c9a75a, 0 18px 40px rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; }
.bkBook.skCover .bkCover .f { box-shadow: 0 18px 40px rgba(0,0,0,.6); }
.bkCover .f::before { content: ''; position: absolute; right: 0; top: 0; bottom: 0; width: 26px; background: linear-gradient(270deg, rgba(10,20,14,.75), rgba(40,70,56,.25)); border-radius: 0 4px 4px 0; }
.bkCover .b { transform: rotateY(180deg); background: var(--bkEnd, none) 0 0 / 220px 220px, radial-gradient(rgba(232,199,112,.16) 1.5px, rgba(0,0,0,0) 1.7px) 0 0 / 22px 22px, #2c4638; border-radius: 4px 12px 12px 4px; }
.bkCover .cvIn { display: flex; flex-direction: row-reverse; align-items: center; gap: 26px; color: #e8c770; font-family: 'BookHand', var(--font); text-shadow: 0 2px 0 #10201a, 0 0 16px rgba(232,199,112,.25); }
.bkCover .cvT { writing-mode: vertical-rl; font-size: 74px; font-weight: 600; letter-spacing: .2em; }
.bkCover .cvSm { writing-mode: vertical-rl; font-size: 18px; letter-spacing: .2em; align-self: flex-end; margin-bottom: 30px; }
/* めくる ボタン・ページの すみ（右びらき：左が つぎ） */
.bkNav { position: absolute; top: 334px; width: 46px; height: 96px; font-size: 46px; line-height: 80px; color: #f6e7c4; background: rgba(34,22,12,.6); border: 1.5px solid rgba(232,199,112,.45); border-radius: 12px; cursor: pointer; z-index: 9; font-family: var(--num); }
.bkNav:hover { background: rgba(70,48,24,.9); }
.bkNav.L { left: 10px; } .bkNav.R { right: 10px; }
.bkNav.L::after { content: 'つぎ'; position: absolute; left: 0; right: 0; bottom: -24px; font: 700 12px var(--font); color: #f6e7c4; text-align: center; text-shadow: 0 1px 2px #000; }
.bkNav.dis { opacity: .2; pointer-events: none; }
.bkCorner { position: absolute; bottom: 0; width: 56px; height: 56px; cursor: pointer; z-index: 4; transition: background .15s; }
.bkCorner.L { left: 0; border-bottom-left-radius: 6px; background: linear-gradient(45deg, rgba(190,160,100,.4), rgba(190,160,100,0) 50%); }
.bkCorner.R { right: 0; border-bottom-right-radius: 6px; background: linear-gradient(-45deg, rgba(190,160,100,.22), rgba(190,160,100,0) 50%); }
.bkCorner.L:hover { background: linear-gradient(45deg, #d8c49a 0 24%, rgba(120,90,40,.35) 26%, rgba(190,160,100,0) 52%); }
.bkCorner.R:hover { background: linear-gradient(-45deg, #d8c49a 0 24%, rgba(120,90,40,.35) 26%, rgba(190,160,100,0) 52%); }
/* しおり */
.bkMarks { position: absolute; inset: 0; pointer-events: none; z-index: 6; }
.bkMarks > * { pointer-events: auto; cursor: pointer; }
.bkRib { position: absolute; top: 560px; width: 16px; height: 56px; background: linear-gradient(90deg, var(--d), var(--c) 32%, var(--c) 68%, var(--d)); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 80%, 0 100%); transition: transform .15s; }
.bkRib.before, .bkRib.after { width: 13px; height: 36px; filter: brightness(.82); }
.bkRib:hover { transform: translateY(4px); }
.bkCard { position: absolute; top: -50px; width: 56px; height: 64px; box-sizing: border-box; padding-top: 5px; display: flex; justify-content: center; border-radius: 12px 12px 3px 3px; background: var(--c); border: 2.5px solid var(--d); box-shadow: 0 3px 6px rgba(0,0,0,.35); transition: transform .15s; }
.bkCard img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: #fff; border: 2px solid var(--d); box-sizing: border-box; }
.bkCard.before, .bkCard.after { top: -26px; height: 30px; overflow: hidden; filter: brightness(.85); width: 46px; padding-top: 3px; }
.bkCard.before img, .bkCard.after img { width: 34px; height: 34px; }
.bkCard.art { background: none; border: none; box-shadow: none; padding: 0; }
.bkCard.art img { width: 56px; height: auto; border-radius: 0; border: none; background: none; filter: drop-shadow(0 3px 4px rgba(0,0,0,.4)); }
.bkCard:hover { transform: translateY(-5px); }
.bkMarks > .pop { animation: bkMkPop .5s cubic-bezier(.2,1.5,.4,1); }
@keyframes bkMkPop { 0% { transform: translateY(-26px) scale(1.25); opacity: 0; } 100% { transform: none; opacity: 1; } }
.bkPop { position: absolute; top: 48px; right: 10px; width: 540px; background: #f8f0dc; color: #3b2a1a; border-radius: 12px; box-shadow: 0 12px 30px rgba(0,0,0,.6); border: 2px solid #c9a75a; z-index: 20; padding: 10px 12px; }
.bkPop .pH { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.bkPop .pH b { font-size: 18px; }
.bkPop .pH span { font-size: 13px; color: #7a6038; flex: 1; }
.bkPop .x { font-size: 18px; width: 30px; height: 30px; border-radius: 8px; border: 1.5px solid #b08a4a; background: #fff8e6; cursor: pointer; color: #4a2e14; }
.bkPop .pR { display: flex; align-items: center; gap: 8px; padding: 6px 4px; border-top: 1px dashed rgba(154,120,70,.45); }
.bkPop .pR.here { background: rgba(255,214,90,.25); border-radius: 6px; }
.bkPop .pR .k { font-family: var(--num); font-size: 11px; font-weight: 900; color: #2a1d10; background: #e8c770; border-radius: 5px; padding: 0 5px; }
.bkPop .pR .ic { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; background: #fff; border: 1.5px solid #b08a4a; }
.bkPop .pR .rb { display: inline-block; width: 12px; height: 30px; border: 2px solid; border-radius: 2px; margin: 0 9px; box-sizing: border-box; }
.bkPop .pR .nm { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.bkPop .pR .nm b { font-size: 15px; }
.bkPop .pR .nm small { font-size: 12px; color: #7a6038; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bkPop .pb { font-family: var(--font); font-size: 13px; padding: 4px 10px; border-radius: 8px; border: 1.5px solid #b08a4a; background: #fff8e6; color: #4a2e14; cursor: pointer; font-weight: 800; white-space: nowrap; }
.bkPop .pb:hover { filter: brightness(.95); }
.bkPop .pb.go { background: #e8f4ff; border-color: #4a8ad8; }
.bkPop .pb.rm { background: #fdeaea; border-color: #c05050; }
.bkPop .pF { font-size: 12px; color: #8a6a3a; margin-top: 6px; text-align: center; }
.bkBook.skCover .bkCover .cvEm { display: none; }   /* 表紙の 絵（book_cover.webp）が ある ときは ゲームの もようを 出さない */

/* 1.25.3 大文字・小文字の おしらせ（CaseTip：js/engine/util.js） */
.caseTip { position: absolute; transform: translate(-50%, -100%); background: #fff6c0; color: #3a2a00; border: 3px solid #ffb020; border-radius: 12px; padding: 5px 14px; font-weight: 900; font-size: 20px; white-space: nowrap; box-shadow: 0 4px 0 rgba(0,0,0,.35); pointer-events: none; animation: caseTipIn 1.6s ease-out both; }
@keyframes caseTipIn { 0% { opacity: 0; transform: translate(-50%, -80%) scale(.8); } 10% { opacity: 1; transform: translate(-50%, -100%) scale(1.06); } 18% { transform: translate(-50%, -100%) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -125%); } }
