:root {
  --gold: #e8c878;
  --gold2: #b8943e;
  --ink: #0c0818;
  --panel: rgba(16, 12, 30, 0.92);
  --text: #efe8d8;
  --dim: #9a93a8;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #000; overflow: hidden; overscroll-behavior: none; touch-action: manipulation; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; font-family: 'Zen Kaku Gothic New', 'Hiragino Kaku Gothic ProN', sans-serif; font-weight: 500; color: var(--text); }
#wrap { position: absolute; left: 50%; top: 50%; transform-origin: center center; }
#gl, #game { position: absolute; inset: 0; width: 1280px; height: 720px; image-rendering: pixelated; }
#ui { position: absolute; inset: 0; pointer-events: none; }
#ui > * { pointer-events: auto; }
.dim { color: var(--dim); }
.small { font-size: 12px; }
b { color: var(--gold); font-weight: normal; }

/* ---------- ボタン ---------- */
.btn {
  font-family: inherit; font-size: 16px; color: var(--text); cursor: pointer;
  background: linear-gradient(180deg, #3a2e52, #221a36); border: 2px solid var(--gold2); border-radius: 6px;
  padding: 10px 22px; margin: 6px; box-shadow: 0 0 0 1px #000, inset 0 1px 0 rgba(255,255,255,0.15);
  transition: transform .08s, box-shadow .15s, border-color .15s;
}
.btn:hover:not(:disabled) { border-color: var(--gold); box-shadow: 0 0 14px rgba(232,200,120,0.5), 0 0 0 1px #000; transform: translateY(-1px); }
.btn:disabled { opacity: 0.4; cursor: default; }
.btn.big { font-size: 20px; padding: 14px 40px; }
.btn.small { font-size: 14px; padding: 6px 14px; margin: 0; }
.btn.wide { display: block; width: 100%; text-align: left; margin: 8px 0; }

/* ---------- タイトル ---------- */
.title-screen { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
.title-screen > * { pointer-events: auto; }
.title-logo { text-align: center; margin-top: -120px; }
.title-logo h1 {
  font-family: 'Cinzel', serif; font-size: 92px; line-height: 0.95; margin: 8px 0; letter-spacing: 6px;
  background: linear-gradient(180deg, #fff8dc 10%, #e8c070 55%, #9a6a20); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 18px rgba(255,190,90,0.55)) drop-shadow(0 4px 0 #1a0a00);
}
.title-logo h1 span { font-size: 120px; letter-spacing: 22px; }
.title-sub { font-family: 'Cinzel', serif; letter-spacing: 4px; color: #d8c8a0; text-shadow: 0 2px 4px #000; }
.title-jp { letter-spacing: 10px; color: #fff; text-shadow: 0 0 10px #000, 0 2px 2px #000; }
.title-menu { margin-top: 30px; display: flex; flex-direction: column; align-items: center; }
.title-foot { position: absolute; bottom: 14px; right: 20px; color: #aaa; font-size: 12px; text-shadow: 0 1px 2px #000; }

/* ---------- パネル ---------- */
.panel {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  background: var(--panel); border: 2px solid var(--gold2); border-radius: 10px; padding: 24px 32px;
  box-shadow: 0 0 0 2px #000, 0 20px 60px rgba(0,0,0,0.7), inset 0 0 40px rgba(120,90,200,0.12);
  text-align: center; max-width: 1180px; width: max-content;
}
.panel h2 { font-size: 28px; margin: 0 0 12px; color: var(--gold); text-shadow: 0 0 12px rgba(232,200,120,0.4); }
.panel h3 { color: #d8c8ff; margin: 16px 0 8px; }
.center-panel { min-width: 560px; top: 46%; }
.howto { width: 1060px; text-align: left; }
.howto h2 { text-align: center; }
.howto-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; font-size: 15px; line-height: 1.6; }
.howto h3 { font-size: 17px; margin: 10px 0 2px; }
.howto p { margin: 0 0 6px; }
.howto .btn { display: block; margin: 14px auto 0; }
.k { padding: 1px 6px; border-radius: 4px; color: #10081a !important; }
.k.g { background: #f2c230; color: #222; } .k.p { background: #3f8cf0; } .k.r { background: #e8473f; } .k.b { background: #4cc85a; }

/* ---------- トップバー ---------- */
.topbar {
  position: absolute; top: 0; left: 0; right: 0; height: 52px; display: flex; align-items: center; gap: 22px; padding: 0 20px;
  background: linear-gradient(180deg, rgba(10,6,22,0.95), rgba(10,6,22,0.75)); border-bottom: 2px solid var(--gold2); z-index: 5;
}
.tb-act { font-family: 'Cinzel', serif; font-size: 20px; color: var(--gold); }
.tb-act span { font-family: 'Shippori Mincho B1', serif; color: var(--text); font-size: 16px; margin-left: 6px; }
.tb-item { font-size: 17px; }
.tb-relics { flex: 1; display: flex; gap: 4px; font-size: 22px; }
.relic { cursor: help; filter: drop-shadow(0 0 4px rgba(255,220,120,0.5)); }

/* ---------- マップ ---------- */
.map-wrap {
  position: absolute; top: 62px; left: 50%; transform: translateX(-50%); width: 700px; height: 540px; overflow-y: auto; overflow-x: hidden;
  background: radial-gradient(ellipse at center, rgba(40,30,20,0.85), rgba(15,10,8,0.92)); border: 2px solid var(--gold2); border-radius: 10px;
  box-shadow: 0 0 0 2px #000, inset 0 0 60px rgba(0,0,0,0.8);
}
.map-wrap::-webkit-scrollbar { width: 8px; } .map-wrap::-webkit-scrollbar-thumb { background: var(--gold2); border-radius: 4px; }
.map { position: relative; margin: 0 auto; }
.map svg { position: absolute; inset: 0; }
.map line { stroke: rgba(200,170,120,0.25); stroke-width: 3; stroke-dasharray: 6 6; }
.map line.walked { stroke: rgba(232,200,120,0.9); stroke-dasharray: none; }
.map line.next { stroke: rgba(255,240,200,0.8); stroke-dasharray: 6 4; animation: dash 0.8s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -20; } }
.node {
  position: absolute; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 24px;
  background: #2a2230; border: 2px solid #5a4e60; opacity: 0.55; transition: transform .15s;
}
.node.boss { width: 80px; height: 80px; margin: -40px 0 0 -40px; font-size: 44px; border-color: #c04040; background: #401a22; opacity: 0.85; }
.node.visited { opacity: 0.9; border-color: var(--gold); background: #3a3020; filter: grayscale(0.6); }
.node.current { filter: none; box-shadow: 0 0 16px var(--gold); }
.node.avail { opacity: 1; cursor: pointer; border-color: #fff4d0; background: #4a3a58; animation: pulse 1.1s ease-in-out infinite; }
.node.avail:hover { transform: scale(1.2); }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 6px rgba(255,230,160,0.5); } 50% { box-shadow: 0 0 22px rgba(255,230,160,1); } }
.map-legend { position: absolute; top: 70px; right: 14px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; background: rgba(10,6,22,0.8); padding: 12px 14px; border-radius: 8px; border: 1px solid var(--gold2); }

/* ---------- パーティー表示(マップ下) ---------- */
.party-strip { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; }
.ps-card { display: flex; gap: 10px; align-items: center; width: 250px; padding: 8px 10px; background: rgba(20,14,36,0.92); border: 1px solid var(--gold2); border-radius: 8px; text-align: left; }
.ps-card.empty { opacity: 0.5; }
.ps-card.ko { filter: grayscale(1); opacity: 0.6; }
.ps-glyph { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #10081a; font-size: 16px; flex: none; }
.ps-info { flex: 1; font-size: 14px; }
.hpbar { height: 7px; background: #301818; margin: 4px 0; border-radius: 2px; overflow: hidden; }
.hpbar i { display: block; height: 100%; }

/* ---------- カード ---------- */
.cards { display: flex; gap: 18px; justify-content: center; margin: 14px 0; flex-wrap: wrap; }
.card {
  width: 220px; min-height: 250px; padding: 14px; cursor: pointer; border-radius: 10px; position: relative;
  background: linear-gradient(180deg, #2e2446, #181226); border: 2px solid #6a5a80; transition: transform .15s, box-shadow .15s, border-color .15s;
}
.card:hover { transform: translateY(-6px); border-color: var(--gold); box-shadow: 0 10px 30px rgba(232,200,120,0.35); }
.card.relic { cursor: pointer; filter: none;  border-color: #b08a3a; background: linear-gradient(180deg, #3a2e20, #1c150e); }
.card.recruit { border-color: #6ab0e0; background: linear-gradient(180deg, #1e3048, #10182a); }
.card-type { font-family: 'Cinzel', serif; font-size: 12px; letter-spacing: 3px; color: var(--dim); }
.card-icon { font-size: 54px; margin: 12px 0; filter: drop-shadow(0 0 10px rgba(255,255,255,0.3)); }
.card-name { font-size: 20px; color: var(--gold); margin-bottom: 8px; }
.card-desc { font-size: 13px; line-height: 1.55; color: #d8d0e0; }
.fin { color: #ffd24a; }
canvas.portrait { image-rendering: pixelated; display: block; margin: 4px auto; }
.reward-line { font-size: 17px; margin: 6px 0; }
.lvup { color: #7dff9a; margin-left: 10px; text-shadow: 0 0 8px rgba(125,255,154,0.6); }

/* ---------- ショップ ---------- */
.shop-panel { width: 1180px; top: 52%; }
.shop-cards { gap: 10px; }
.shop-cards .card { width: 142px; min-height: 230px; padding: 10px; }
.shop-cards .card-icon { font-size: 40px; margin: 6px 0; }
.shop-cards .card-name { font-size: 16px; }
.shop-cards .card-desc { font-size: 11.5px; }
.shop-cards canvas.portrait { width: 90px; height: 90px; }
.shop-item .price { margin-top: 6px; font-size: 16px; color: var(--gold); }
.shop-item.sold, .shop-item.poor { opacity: 0.45; }
.shop-item.sold .card, .shop-item.poor .card { cursor: default; transform: none; }

/* ---------- イベント ---------- */
.event-panel { width: 640px; }
.event-text { font-size: 17px; line-height: 1.8; margin: 16px 0 20px; }
.event-choices { text-align: left; }

/* ---------- パーティー画面 ---------- */
.party { width: 1120px; top: 53%; padding: 18px 26px; }
.msg { background: rgba(232,200,120,0.15); border: 1px solid var(--gold2); padding: 8px; border-radius: 6px; margin-bottom: 10px; color: #ffe8b0; }
.party-layout { display: grid; grid-template-columns: 400px 1fr; gap: 20px; text-align: left; }
.diamond { position: relative; width: 380px; height: 330px; margin: 6px auto; }
.slot {
  position: absolute; width: 150px; height: 110px; border-radius: 10px; cursor: pointer; padding: 6px;
  background: rgba(40,30,60,0.9); border: 2px solid #5a4e70; display: flex; align-items: center; gap: 4px; transition: border-color .15s, box-shadow .15s;
}
.slot:hover { border-color: #fff4d0; }
.slot.sel { border-color: var(--gold); box-shadow: 0 0 16px rgba(232,200,120,0.6); }
.slot0 { left: 115px; top: 0; } .slot1 { left: 0; top: 110px; } .slot2 { left: 230px; top: 110px; } .slot3 { left: 115px; top: 220px; }
.slot-glyph { position: absolute; top: -8px; left: -8px; width: 28px; height: 28px; border-radius: 50%; color: #10081a; display: flex; align-items: center; justify-content: center; font-size: 14px; border: 2px solid #000; }
.slot-name { font-size: 14px; white-space: nowrap; }
.bench { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.bench > .dim { width: 100%; }
.bench-ch { display: flex; align-items: center; gap: 4px; padding: 2px 10px 2px 2px; border: 2px solid #5a4e70; border-radius: 8px; cursor: pointer; background: rgba(40,30,60,0.9); font-size: 14px; }
.bench-ch.sel { border-color: var(--gold); }
.detail { background: rgba(0,0,0,0.25); border-radius: 10px; padding: 12px 16px; }
.detail-head { display: flex; gap: 14px; align-items: center; }
.detail-head h3 { margin: 0 0 4px; }
.detail-head > div { font-size: 14px; line-height: 1.6; }
.detail h4 { margin: 12px 0 6px; color: #d8c8ff; }
.skill-slots, .skill-inv { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.skill-inv { max-height: 150px; overflow-y: auto; }
.sk { padding: 6px 10px; border: 1px solid #6a5a80; border-radius: 6px; background: rgba(50,40,70,0.8); cursor: pointer; font-size: 14px; }
.sk:hover { border-color: var(--gold); }
.sk.eq { border-color: var(--gold2); background: rgba(80,60,30,0.6); }
.sk.empty { opacity: 0.4; cursor: default; text-align: center; }
.party > .btn { margin-top: 12px; }

/* ---------- ACT / 終了 ---------- */
.act-title { font-family: 'Cinzel', 'Shippori Mincho B1', serif; font-size: 60px; margin: 6px 0 14px; color: var(--gold); text-shadow: 0 0 20px rgba(232,200,120,0.6); }
.act-title.red { color: #ff5050; text-shadow: 0 0 20px rgba(255,60,60,0.6); }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 30px; margin: 16px auto 20px; width: 420px; text-align: left; font-size: 16px; }

.ps-face { width: 46px; height: 46px; border: 1px solid var(--gold2); border-radius: 6px; margin: 0; flex: none; }
canvas.portrait { border-radius: 6px; }
.slot canvas.portrait { border: 1px solid #6a5a80; }
.links { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; max-height: 110px; overflow-y: auto; }
.link { padding: 5px 8px; border: 1px solid #3a6a8a; border-radius: 6px; background: rgba(20,40,60,0.6); font-size: 13px; }
.link b { color: #8fe8ff; }
.tag { display: inline-block; padding: 1px 8px; border: 1px solid; border-radius: 10px; font-size: 12px; margin: 2px; }

/* ---------- 塔の階層 ---------- */
.tower-wrap { position: absolute; top: 62px; left: 36px; width: 660px; height: 540px; overflow-y: auto; padding: 10px 16px;
  background: linear-gradient(180deg, rgba(20,14,30,0.9), rgba(8,6,14,0.94)); border: 2px solid var(--gold2); border-radius: 10px; }
.tower-title { text-align: center; color: var(--gold); font-size: 18px; margin: 4px 0 10px; }
.floor { display: flex; align-items: center; gap: 12px; padding: 6px 0; border-left: 3px solid #3a3040; margin-left: 30px; padding-left: 14px; position: relative; }
.floor.done { border-left-color: var(--gold2); opacity: 0.55; }
.floor.next { border-left-color: #fff4d0; }
.floor-no { position: absolute; left: -46px; width: 36px; text-align: right; color: var(--dim); font-size: 13px; }
.floor.next .floor-no { color: #fff4d0; }
.floor-doors { display: flex; align-items: center; gap: 10px; flex: 1; }
.door { flex: 1; display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid #4a4058; border-radius: 8px; background: rgba(40,30,55,0.7); opacity: 0.6; }
.door.avail { opacity: 1; cursor: pointer; border-color: #fff4d0; animation: pulse 1.1s ease-in-out infinite; }
.door.avail:hover { transform: translateX(4px); background: rgba(70,55,90,0.9); }
.door.visited { border-color: var(--gold2); background: rgba(60,48,24,0.6); opacity: 1; }
.door.boss { border-color: #c04040; background: rgba(70,20,30,0.7); }
.door-icon { font-size: 24px; }
.door-name { font-size: 16px; color: #fff; }
.door-hint { margin-left: auto; font-size: 12px; color: var(--dim); }
.door-or { color: var(--gold); font-family: 'Cinzel', serif; font-style: italic; }
.growth { position: absolute; top: 62px; right: 20px; width: 520px; height: 540px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px;
  background: rgba(10,6,22,0.85); border: 1px solid var(--gold2); border-radius: 10px; padding: 12px; }
.gr-ch { display: flex; gap: 10px; align-items: flex-start; padding: 8px; border-bottom: 1px solid #2a2436; }
.upchip { display: inline-block; margin: 2px 4px 2px 0; padding: 1px 8px; border: 1px solid var(--gold2); border-radius: 10px; color: #ffe8b0; background: rgba(80,60,20,0.35); }
.card.upgrade { border-color: #d0a040; background: linear-gradient(180deg, #3a2c18, #16100a); }
.uplv { color: #ffe08a; font-size: 14px; margin-bottom: 6px; }
.gr-ch { text-align: left; }
.gr-ch canvas.portrait { margin: 0; flex: none; }

/* 強化の数値表示(今 → 習得後) */
.updiff { width: 100%; margin-top: 8px; border-collapse: collapse; font-size: 12.5px; }
.updiff td { padding: 3px 4px; border-top: 1px solid rgba(232,200,120,0.18); text-align: left; }
.updiff td:nth-child(2), .updiff td:nth-child(4) { text-align: right; white-space: nowrap; }
.updiff td:nth-child(3) { color: #a89868; width: 12px; }
.upnew { color: #9fffb0; font-weight: bold; }
.upline { margin: 2px 0; line-height: 1.35; }
.upval { font-size: 11px; color: #cfc6b0; margin-left: 2px; }
.upval b { color: #ffe8b0; font-weight: normal; }
.cmdseq { font-size: 15px; letter-spacing: 1px; margin-left: 6px; }
/* 見出し・名前は明朝(Shippori Mincho B1)、本文はゴシック(Zen Kaku Gothic New) */
h1, h2, h3, .card-name, .tower-title, .door-name, .btn { font-family: 'Shippori Mincho B1', 'Hiragino Mincho ProN', serif; font-weight: 800; }
/* 分岐マップ(3列) */
.tower-sub { font-family: 'Zen Kaku Gothic New', sans-serif; font-weight: 500; font-size: 11px; color: var(--dim); margin-top: 2px; }
.tower-inner { position: relative; }
.map-lines { position: absolute; left: 0; top: 0; pointer-events: none; z-index: 0; }
.map-lines line { stroke: rgba(160,140,180,0.35); stroke-width: 2; stroke-dasharray: 4 5; }
.map-lines line.walked { stroke: var(--gold2); stroke-dasharray: none; stroke-width: 3; }
.map-lines line.next { stroke: #fff4d0; stroke-dasharray: none; stroke-width: 2.5; filter: drop-shadow(0 0 4px #ffd070); }
.floor.lanes { padding: 9px 0 9px 14px; }
.floor.lanes .floor-doors { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; position: relative; z-index: 1; }
.door-slot { min-height: 10px; display: flex; justify-content: center; }
.floor.lanes .door { flex: none; width: 100%; box-sizing: border-box; padding: 6px 8px; gap: 8px; }
.floor.lanes .door-icon { font-size: 22px; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; flex: none; }
.node-img { width: 30px; height: 30px; object-fit: contain; }
.door-text { display: flex; flex-direction: column; min-width: 0; }
.floor.lanes .door-name { font-size: 14px; }
.floor.lanes .door-hint { margin-left: 0; font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.floor.done { opacity: 0.8; }
.floor.done .door:not(.visited) { opacity: 0.3; }
.door.elite { border-color: #a06040; }
.door.mid { border-color: #c04040; background: rgba(70,20,30,0.7); }

/* 顔画像が切れないように / パーティー画面が画面からはみ出さないように */
.party { top: calc(50% + 28px); max-height: 652px; overflow-y: auto; }

/* =====================================================================
   2026-09 冒険パート リニューアル(参考: assets/src/ui3/adv_ref.webp)
   パーツ画像は CSS変数 --ui-<名前>(js/ui.js が UI_ART から登録)
   ===================================================================== */
.tb3 { position: absolute; left: 6px; top: 4px; width: 1092px; height: 62px; }
.tb3 > i { position: absolute; display: block; background-repeat: no-repeat; background-size: 100% 100%; }
.tb3-mid { left: 50px; right: 8px; top: 0; bottom: 0; background-image: var(--ui-tb_mid); background-repeat: repeat-x !important; background-size: auto 100% !important; }
.tb3-l { left: 0; top: -1px; width: 82px; height: 64px; background-image: var(--ui-tb_left); }
.tb3-r { right: 0; top: 0; width: 9px; height: 62px; background-image: var(--ui-tb_right); }
.tb3 b, .tb3 small { display: block; white-space: nowrap; }
.tb3-castle { position: absolute; left: 92px; top: 7px; }
.tb3-castle b { font-family: 'Shippori Mincho B1', serif; font-weight: 800; font-size: 25px; color: #f4ecd8; letter-spacing: 3px; line-height: 1.1; text-shadow: 0 2px 4px #000; }
.tb3-castle small, .tb3-act small, .tb3-tag small { font-family: 'Cinzel', 'Shippori Mincho B1', serif; font-style: italic; font-size: 10.5px; color: #c8b890; letter-spacing: 0.5px; }
.tb3-sep { left: 222px; top: 12px; width: 1px; height: 38px; background: linear-gradient(transparent, #c8a050, transparent) !important; }
.tb3-act { position: absolute; left: 238px; top: 11px; }
.tb3-act b { font-family: 'Shippori Mincho B1', serif; font-weight: 800; font-size: 18px; color: #f4ecd8; line-height: 1.2; }
.tb3-tag { position: absolute; left: 470px; width: 340px; top: 5px; display: flex; align-items: center; justify-content: center; gap: 10px; text-align: center; }
.tb3-tag b { font-family: 'Shippori Mincho B1', serif; font-weight: 800; font-size: 16px; color: #e8c878; letter-spacing: 3px; line-height: 1.5; text-shadow: 0 0 10px rgba(232,180,80,0.4); }
.tb3-orn { display: block; width: 26px; height: 40px; background: var(--ui-tb_orn) center / contain no-repeat; opacity: 0.8; }
.tb3-res { position: absolute; right: 22px; top: 16px; display: flex; gap: 18px; font-family: 'Cinzel', 'Shippori Mincho B1', serif; font-size: 18px; color: #f4ecd8; }
.tb3-res span { display: flex; align-items: center; gap: 6px; }
.ic { display: inline-block; width: 26px; height: 26px; background: center / contain no-repeat; vertical-align: middle; }
.ic.ic_gold { background-image: var(--ui-ic_gold); } .ic.ic_potion { background-image: var(--ui-ic_potion); }
.ic.ic_feather { background-image: var(--ui-ic_feather); } .ic.ic_flame { background-image: var(--ui-ic_flame); }
.tb3-party { position: absolute; right: 8px; top: 8px; width: 170px; height: 52px; background: var(--ui-btn_party) center / contain no-repeat; border: 0; cursor: pointer; transition: filter .15s, transform .1s; }
.tb3-party:hover, .rp3-go:hover:not(:disabled), .mn:hover { filter: brightness(1.25) drop-shadow(0 0 8px rgba(255,200,100,0.6)); transform: translateY(-1px); }

/* 左+中央: 階のタブと塔のマップ(一緒にスクロール) */
.mp3 { position: absolute; left: 10px; top: 72px; width: 672px; height: 550px; }
.mp3-bg { position: absolute; left: 124px; top: 0; right: 0; bottom: 0; background: center 40% / cover no-repeat; border: 1px solid rgba(184,148,62,0.7); border-radius: 4px; filter: brightness(0.5) saturate(0.85); }
.mp3::after { content: ''; position: absolute; left: 124px; top: 0; right: 0; bottom: 0; pointer-events: none; border-radius: 4px;
  background: radial-gradient(ellipse at 50% 45%, transparent 45%, rgba(0,0,0,0.65) 100%), linear-gradient(180deg, rgba(0,0,0,0.45), transparent 12%, transparent 85%, rgba(0,0,0,0.7));
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.8), 0 0 0 1px rgba(232,200,120,0.25); }
.mp3-scroll { position: absolute; left: 0; top: 0; right: 0; bottom: 40px; overflow-y: auto; scrollbar-width: none; z-index: 1; }
.mp3-scroll::-webkit-scrollbar { display: none; }
.mp3-inner { position: relative; width: 672px; }
.fl3 { position: absolute; left: 0; width: 128px; height: 58px; background: var(--ui-tab) left center / 100% 100% no-repeat; }
.fl3 b { position: absolute; left: 46px; top: 5px; font-family: 'Cinzel', 'Shippori Mincho B1', serif; font-size: 20px; color: #efe6d2; }
.fl3 small { position: absolute; left: 46px; top: 32px; font-size: 11.5px; color: #c8bba0; white-space: nowrap; font-family: 'Shippori Mincho B1', serif; }
.fl3.on { width: 142px; height: 66px; margin-top: -4px; background-image: var(--ui-tab_on); z-index: 2; }
.fl3.on b { font-size: 24px; color: #ffe8a8; top: 5px; left: 50px; text-shadow: 0 0 10px rgba(255,190,80,0.7); }
.fl3.on small { color: #fff4d8; top: 37px; left: 50px; }
.fl3.past { opacity: 0.45; }
.mp3-lines { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; }
.mp3-lines line { stroke: rgba(235,220,195,0.42); stroke-width: 2; stroke-dasharray: 5 6; }
.mp3-lines line.past { stroke: rgba(235,220,195,0.14); }
.mp3-lines line.walked { stroke: #e8c878; stroke-width: 3; stroke-dasharray: none; filter: drop-shadow(0 0 3px #ffb040); }
.mp3-lines line.next { stroke: #ffd070; stroke-width: 3; stroke-dasharray: 9 6; animation: road3 0.9s linear infinite; filter: drop-shadow(0 0 4px #ffb040); }
.mp3-lines line.sel { stroke: #fff2c8; stroke-width: 4; stroke-dasharray: 10 6; animation: road3 0.6s linear infinite; filter: drop-shadow(0 0 6px #ffd070); }
@keyframes road3 { to { stroke-dashoffset: -15; } }
.nd3 { position: absolute; width: 54px; height: 54px; transform: translate(-50%, -50%); z-index: 2; transition: transform .12s; }
.nd3.big { width: 76px; height: 76px; }
.nd3 > i { position: absolute; display: block; background: center / contain no-repeat; }
.nd3-med { inset: 0; }
.nd3-med.ring { background-image: var(--ui-ring_lock); }
.nd3-ico { inset: 22%; }
.nd3-ring { inset: -10px; }
.nd3.s-on .nd3-ring { background-image: var(--ui-ring_on); animation: ring3 1.2s ease-in-out infinite; }
.nd3.s-sel .nd3-ring { background-image: var(--ui-ring_sel); inset: -12px; animation: ring3 0.9s ease-in-out infinite; }
.nd3.s-done .nd3-ring, .nd3.s-here .nd3-ring { background-image: var(--ui-ring_done); opacity: 0.8; }
@keyframes ring3 { 50% { filter: brightness(1.5) drop-shadow(0 0 8px rgba(255,210,120,0.8)); } }
.nd3.s-on, .nd3.s-sel { cursor: pointer; }
.nd3.s-on:hover { transform: translate(-50%, -50%) scale(1.12); }
.nd3.s-sel { transform: translate(-50%, -50%) scale(1.14); z-index: 3; }
.nd3.s-lock .nd3-med, .nd3.s-lock .nd3-ico { filter: brightness(0.62) saturate(0.55); }
.nd3.s-skip { opacity: 0.3; filter: grayscale(0.8); }
.nd3.s-done .nd3-med, .nd3.s-done .nd3-ico { filter: saturate(0.5) brightness(0.8); }
.nd3-here { position: absolute; left: calc(100% + 8px); top: 50%; transform: translateY(-50%); padding: 1px 9px; font-size: 11px; white-space: nowrap; color: #ffe8b0;
  background: rgba(24,16,8,0.92); border: 1px solid #c8a050; border-radius: 3px; font-family: 'Shippori Mincho B1', serif; font-weight: 800; }
.mp3-legend { position: absolute; left: 124px; right: 0; bottom: 0; height: 40px; display: flex; align-items: center; justify-content: space-evenly; z-index: 2;
  background: linear-gradient(180deg, rgba(8,6,12,0.2), rgba(8,6,12,0.85)); border-top: 1px solid rgba(232,200,120,0.3); }
.lg3 { display: block; width: 78px; height: 34px; background: center / contain no-repeat; }

/* 右: ACT見出し + 選んだマスの情報 */
.rp3 { position: absolute; left: 692px; top: 72px; width: 580px; height: 550px; }
.rp3-head { position: relative; height: 198px; background: center 55% / cover no-repeat; border-radius: 6px; padding: 14px 26px; box-sizing: border-box; }
.rp3-head::before { content: ''; position: absolute; inset: 4px; border-radius: 4px; background: linear-gradient(90deg, rgba(6,4,10,0.88) 0%, rgba(6,4,10,0.55) 55%, rgba(6,4,10,0.2)), linear-gradient(0deg, rgba(6,4,10,0.9), transparent 55%); }
.rp3-frame { position: absolute; inset: 0; background: var(--ui-act_frame) center / 100% 100% no-repeat; pointer-events: none; }
.rp3-head > div { position: relative; }
.rp3-act { font-family: 'Cinzel', serif; font-style: italic; color: #e8c878; font-size: 14px; letter-spacing: 3px; }
.rp3-title { font-family: 'Shippori Mincho B1', serif; font-weight: 800; font-size: 36px; color: #fff; line-height: 1.1; text-shadow: 0 2px 8px #000; }
.rp3-en { font-family: 'Cinzel', 'Shippori Mincho B1', serif; font-style: italic; font-size: 12.5px; color: #d8ccb0; }
.rp3-prog { display: flex; align-items: center; gap: 12px; margin: 6px 0 4px; }
.rp3-bar { flex: 1; height: 5px; background: rgba(0,0,0,0.6); border: 1px solid rgba(232,200,120,0.45); border-radius: 3px; overflow: hidden; }
.rp3-bar i { display: block; height: 100%; background: linear-gradient(90deg, #8a6a2a, #ffe08a); box-shadow: 0 0 6px #ffc060; }
.rp3-prog span { font-family: 'Shippori Mincho B1', serif; color: #f4ecd8; font-size: 14px; white-space: nowrap; }
.rp3-prog span b { font-size: 24px; color: #fff; font-weight: 800; }
.rp3-boss { font-family: 'Shippori Mincho B1', serif; font-weight: 800; color: #e8c878; font-size: 15px; }
.rp3-desc { font-size: 12px; color: #ddd4c4; line-height: 1.55; margin-top: 2px; text-shadow: 0 1px 2px #000; }
.rp3-grid { display: grid; grid-template-columns: 342px 1fr; grid-template-rows: 112px 150px 70px; grid-template-areas: "enc drop" "party relics" "party go"; gap: 7px 8px; margin-top: 7px; }
.box3 { border: 12px solid transparent; border-image: var(--ui-box) 18 fill / 12px stretch; padding: 0 4px; box-sizing: border-box; min-width: 0; overflow: hidden; }
.box3 h4 { margin: -3px 0 6px; padding-bottom: 3px; font-family: 'Shippori Mincho B1', serif; font-weight: 800; font-size: 14.5px; color: #e8c878; border-bottom: 1px solid rgba(232,200,120,0.28); display: flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.box3 h4 em { font-style: normal; font-size: 12px; color: #d8ccb0; }
.box3.b-enc { grid-area: enc; } .box3.b-drop { grid-area: drop; } .box3.b-party { grid-area: party; } .box3.b-relics { grid-area: relics; }
.rp3-node { margin-left: auto; font-size: 11.5px; color: #cdbfa0; font-weight: 500; }
.tiles { display: flex; gap: 6px; flex-wrap: wrap; }
.tile3 { position: relative; width: 62px; height: 60px; border: 5px solid transparent; border-image: var(--ui-tile) 7 fill / 5px stretch; box-sizing: border-box; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.tile3 img { max-width: 48px; max-height: 38px; image-rendering: pixelated; transform: scaleX(-1); margin-top: -10px; }
.tile3 small { position: absolute; left: -4px; right: -4px; bottom: -4px; font-size: 9.5px; text-align: center; color: #efe6d2; background: rgba(0,0,0,0.6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile3.drop { border: 0; border-image: none; }
.tile3.drop i { position: absolute; inset: 0 0 10px; background: center / contain no-repeat; }
.tile3.drop.framed { border: 5px solid transparent; border-image: var(--ui-tile) 7 fill / 5px stretch; }
.tile3.drop.framed i { inset: 2px 8px 14px; }
.tile3.relic span { font-size: 24px; margin-top: -10px; }
.rp3-what { margin: 2px 0; font-size: 12.5px; line-height: 1.55; color: #ddd4c4; }
.rp3-party { display: flex; justify-content: space-around; align-items: flex-end; height: 132px; }
.rp3-mem { width: 76px; text-align: center; }
.rp3-mem canvas.portrait { width: 76px; height: 86px; margin: 0 auto; background: radial-gradient(ellipse at 50% 90%, rgba(255,210,120,0.22), transparent 62%); border-radius: 0; }
.rp3-mem small { display: block; font-size: 11px; color: #efe6d2; white-space: nowrap; font-family: 'Shippori Mincho B1', serif; }
.rp3-mem small em { font-style: normal; color: #c8b890; font-size: 10px; }
.rp3-mem.ko { filter: grayscale(1); opacity: 0.55; }
.rp3-go { grid-area: go; width: 100%; height: 100%; background: var(--ui-btn_proceed) center / 100% 100% no-repeat; border: 0; cursor: pointer; transition: filter .15s, transform .1s; }
.rp3-go:disabled { opacity: 0.4; cursor: default; }

/* 下: パーティー + メニュー */
.bb3 { position: absolute; left: 4px; right: 4px; top: 630px; height: 88px; }
.bb3 > i { position: absolute; top: 0; height: 88px; display: block; background: center / 100% 100% no-repeat; }
.bb3-mid { left: 18px; right: 26px; background-image: var(--ui-bb_mid); background-repeat: repeat-x !important; background-size: auto 100% !important; }
.bb3-l { left: 0; width: 20px; background-image: var(--ui-bb_left); }
.bb3-r { right: 0; width: 30px; background-image: var(--ui-bb_right); }
.pc3 { position: absolute; top: 6px; width: 244px; height: 76px; background: var(--ui-pcard) center / 100% 100% no-repeat; }
.pc3:nth-child(4) { left: 16px; } .pc3:nth-child(5) { left: 266px; } .pc3:nth-child(6) { left: 516px; } .pc3:nth-child(7) { left: 766px; }
.pc3-face { position: absolute; left: 20px; top: 17px; width: 51px; height: 50px; margin: 0; border-radius: 3px; }
.pc3-key { position: absolute; left: 10px; top: 8px; width: 18px; height: 18px; border-radius: 50%; background: var(--c); color: #fff; font-size: 9px; line-height: 18px; text-align: center; box-shadow: 0 0 0 1.5px #1a1208, 0 0 0 2.5px #c8a050, 0 0 6px var(--c); z-index: 1; }
.pc3-name { position: absolute; left: 84px; top: 13px; font-size: 12px; color: #d8ccb0; white-space: nowrap; font-family: 'Shippori Mincho B1', serif; }
.pc3-name b { font-size: 15px; color: #fff; font-weight: 800; margin-right: 4px; }
.pc3-name small { font-size: 11px; color: #c8b890; margin-left: 4px; }
.pc3-hp { position: absolute; left: 84px; right: 20px; top: 34px; display: flex; justify-content: space-between; font-family: 'Cinzel', serif; font-size: 12.5px; color: #fff; }
.pc3-hp span:first-child { color: #d8ccb0; font-style: italic; }
.pc3-bar { position: relative; height: 7px; background: rgba(0,0,0,0.65); border: 1px solid rgba(232,200,120,0.35); border-radius: 2px; overflow: hidden; }
.pc3 .pc3-bar { position: absolute; left: 84px; right: 20px; top: 53px; }
.pc3-bar i { display: block; height: 100%; background: linear-gradient(180deg, color-mix(in srgb, var(--c) 70%, #fff), var(--c) 60%); box-shadow: 0 0 6px var(--c); }
.pc3.ko { filter: grayscale(1) brightness(0.7); }
.bb3-menu { position: absolute; right: 30px; top: 5px; display: flex; gap: 2px; }
.mn { width: 52px; height: 76px; border: 0; background: center / contain no-repeat; cursor: pointer; transition: filter .15s, transform .1s; }
.mn.mn_menu { background-image: var(--ui-mn_menu); } .mn.mn_item { background-image: var(--ui-mn_item); } .mn.mn_book { background-image: var(--ui-mn_book); } .mn.mn_config { background-image: var(--ui-mn_config); }

/* 小窓(メニュー・持ち物・設定) */
.pop3 { position: absolute; inset: 0; background: rgba(0,0,0,0.55); display: flex; align-items: center; justify-content: center; z-index: 60; }
.pop3-in { min-width: 440px; max-width: 640px; border: 22px solid transparent; border-image: var(--ui-panel_w) 34 fill / 22px stretch; padding: 4px 18px; text-align: center; }
.pop3-in h3 { margin: 0 0 10px; font-family: 'Shippori Mincho B1', serif; font-weight: 800; color: #e8c878; font-size: 20px; }
.items3 { text-align: left; display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; font-size: 14px; }
.items3 small { color: #b8ac98; margin-left: 6px; }
.items3 .relic-ic { display: inline-block; width: 26px; text-align: center; }

/* 冒険パートの他の画面(休憩所・商人・イベント・宝箱・報酬・編成)も新パーツの枠・ボタン・カードに */
.panel { background: none; border: 26px solid transparent; border-image: var(--ui-panel_w) 36 fill / 26px stretch; box-shadow: none; padding: 8px 22px; border-radius: 0; }
.panel h2 { font-family: 'Shippori Mincho B1', serif; font-weight: 800; color: #e8c878; text-shadow: 0 0 14px rgba(232,180,80,0.35); }
.panel h3 { color: #e8dcc0; font-family: 'Shippori Mincho B1', serif; }
.btn { background: none; border: 10px solid transparent; border-image: var(--ui-panel_s) 16 fill / 10px stretch; box-shadow: none; padding: 4px 22px; border-radius: 0;
  font-family: 'Shippori Mincho B1', serif; font-weight: 800; color: #f4ecd8; letter-spacing: 1px; }
.btn:hover:not(:disabled) { border-color: transparent; box-shadow: none; filter: brightness(1.3) drop-shadow(0 0 8px rgba(255,200,100,0.55)); }
.btn.big { padding: 8px 44px; }
.btn.small { padding: 2px 12px; }
.card { background: none !important; border: 14px solid transparent !important; border-image: var(--ui-box) 18 fill / 14px stretch !important; box-shadow: none; border-radius: 0; }
.card:hover { filter: brightness(1.15) drop-shadow(0 0 12px rgba(255,200,100,0.45)); }
.reward-line { font-family: 'Shippori Mincho B1', serif; }
.center-panel, .shop-panel, .reward { top: calc(50% - 10px); }
.shop-panel { top: calc(50% + 4px); max-height: 560px; overflow-y: auto; scrollbar-width: thin; padding: 2px 16px; }
.shop-panel h2 { margin: 0 0 2px; font-size: 24px; }
.shop-cards { gap: 8px; margin: 6px 0; }
.shop-cards .card { width: 186px !important; min-height: 0 !important; padding: 2px 4px !important; border-width: 10px !important; border-image-width: 10px !important; }
.shop-cards .card-desc { font-size: 11px; }
.shop-cards .updiff { font-size: 10.5px; }
.shop-cards .updiff td { padding: 2px; }
.shop-cards canvas.portrait { width: 70px; height: 70px; }
.card .updiff td:first-child { word-break: keep-all; }

/* =====================================================================
   2026-09 第4弾: 冒険パートのレイアウト再設計
   グリッド: 外側の余白12px・パネル間8px。上のバー 6〜66 / 本体 76〜708。左=マップ(12〜700)右=情報(708〜1268)
   ===================================================================== */
.tb3 { left: 12px; width: 1068px; top: 6px; }
.tb3-party { right: 12px; top: 10px; }
.mp3 { left: 12px; top: 76px; width: 688px; height: 632px; }
.mp3-bg, .mp3::after { left: 128px; }
.mp3-legend { left: 128px; }
.mp3-scroll { bottom: 44px; }
.rp3 { left: 708px; top: 76px; width: 560px; height: 632px; display: flex; flex-direction: column; gap: 8px; }
.rp3-head { height: 180px; flex: none; padding: 12px 24px; }
.rp3-title { font-size: 32px; }
.rp3-desc { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.box3 { flex: none; }
.box3 h4 { overflow: hidden; }
.box3 h4 em { margin-left: auto; font-size: 11px; color: #b8ac90; }
.rp3-node { margin-left: 10px; margin-right: 0; font-size: 12px; color: #efe6d2; }
.rp3-tip { font-style: normal; color: #e8c878 !important; }
.b-node { height: 128px; }
.ni3 { display: flex; gap: 12px; align-items: flex-start; }
.ni3-l { flex: 1; min-width: 0; }
.ni3-r { flex: none; width: 196px; padding-left: 12px; border-left: 1px solid rgba(232,200,120,0.25); }
.ni3-r small { display: block; font-family: 'Shippori Mincho B1', serif; font-weight: 800; color: #e8c878; font-size: 12px; margin: -2px 0 4px; }
.b-party { height: 188px; }
.rp3-party { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; height: auto; align-items: end; }
.pm3 { text-align: left; min-width: 0; }
.pm3 canvas.portrait { width: 88px; height: 96px; margin: 0 auto; display: block; background: radial-gradient(ellipse at 50% 92%, rgba(255,210,120,0.2), transparent 62%); border-radius: 0; }
.pm3-name { display: flex; align-items: center; gap: 4px; white-space: nowrap; font-family: 'Shippori Mincho B1', serif; }
.pm3-name b { font-size: 13px; color: #fff; font-weight: 800; overflow: hidden; text-overflow: ellipsis; }
.pm3-name em { font-style: normal; font-size: 10px; color: #c8b890; margin-left: auto; }
.pm3-hp { display: flex; justify-content: space-between; font-family: 'Cinzel', serif; font-size: 10.5px; color: #efe6d2; margin: 2px 0 2px; }
.pm3-hp span:first-child { color: #b8ac90; font-style: italic; }
.pm3.ko { filter: grayscale(1); opacity: 0.55; }
.rp3-foot { display: flex; gap: 8px; height: 104px; flex: none; }
.rp3-foot .b-relics { flex: 1; min-width: 0; height: 104px; }
.rp3-foot .tiles { flex-wrap: nowrap; overflow: hidden; }
.more3 { align-self: center; color: #e8c878; font-family: 'Cinzel', serif; }
.rp3-menu { flex: none; width: 232px; display: grid; grid-template-columns: repeat(4, 1fr); align-items: center; justify-items: center;
  border: 12px solid transparent; border-image: var(--ui-box) 18 fill / 12px stretch; box-sizing: border-box; }
.rp3-menu .mn { width: 48px; height: 70px; }
/* ボタンの宝石(戦闘と同じ見た目) */
.gem3 { position: relative; display: inline-block; flex: none; width: var(--s); height: var(--s); background: center / contain no-repeat; }
.gem3 b { position: absolute; left: 50%; top: 50%; width: 0; height: 0; border: calc(var(--s) * 0.2) solid transparent; filter: drop-shadow(0 0 1.5px #000) drop-shadow(0 0 1px #000); }
.gem3 b.a-up { border-bottom: calc(var(--s) * 0.3) solid #fff; border-top-width: 0; transform: translate(-50%, -60%); }
.gem3 b.a-down { border-top: calc(var(--s) * 0.3) solid #fff; border-bottom-width: 0; transform: translate(-50%, -40%); }
.gem3 b.a-left { border-right: calc(var(--s) * 0.3) solid #fff; border-left-width: 0; transform: translate(-60%, -50%); }
.gem3 b.a-right { border-left: calc(var(--s) * 0.3) solid #fff; border-right-width: 0; transform: translate(-40%, -50%); }
.b-party { height: 178px; }
.rp3-foot, .rp3-foot .b-relics { height: 114px; }
.rp3-foot .tile3 { width: 58px; height: 56px; }
.rp3-foot .tile3.relic span { font-size: 22px; margin-top: -12px; }
.pm3 canvas.portrait { width: 80px; height: 84px; }
.b-party h4 { margin-bottom: 2px; }

/* =====================================================================
   2026-09 第4弾: 勝利・強化選択 / 旅の商人(理想例 assets/src/ui4/*_ref.png の配置)
   ===================================================================== */
.scr4 { position: absolute; inset: 0; background: #07050b center / cover no-repeat; font-family: 'Shippori Mincho B1', serif; }
.scr4 b, .scr4 small { display: block; }
.scr4 small { font-family: 'Cinzel', 'Shippori Mincho B1', serif; font-style: italic; font-weight: 500; letter-spacing: 1px; }
.loc4 { position: absolute; left: 14px; top: 12px; width: 330px; height: 62px; padding: 12px 0 0 92px; box-sizing: border-box;
  background: var(--ui-f_location) left center / 100% 100% no-repeat; }
.loc4 b { font-size: 17px; font-weight: 800; color: #f4ecd8; line-height: 1.2; white-space: nowrap; }
.loc4 small { font-size: 10px; color: #c8b890; }
.tag4 { position: absolute; right: 26px; top: 26px; font-family: 'Cinzel', serif; font-style: italic; font-size: 12px; color: #c8b890; text-align: right; }
.title4 { position: absolute; left: 50%; top: 4px; width: 520px; height: 170px; transform: translateX(-50%); background: var(--ui-f_title) center / contain no-repeat; text-align: center; padding-top: 58px; box-sizing: border-box; }
.title4 b { font-size: 40px; font-weight: 800; letter-spacing: 10px; line-height: 1; color: #ffe8b0;
  background: linear-gradient(180deg, #fffbe8 20%, #f0c060 70%, #a8741c); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 2px 3px #000); }
.title4 small { font-size: 11px; color: #e8c878; letter-spacing: 6px; margin-top: 6px; }
.pill4 { position: absolute; left: 50%; top: 160px; transform: translateX(-50%); width: 400px; height: 46px; display: flex; justify-content: space-around; align-items: center;
  background: var(--ui-f_reward) center / 100% 100% no-repeat; }
.pill4 span { display: grid; grid-template-columns: auto auto; column-gap: 8px; align-items: center; }
.pill4 .ic, .pill4 .spark4 { grid-row: span 2; width: 24px; height: 24px; }
.spark4 { font-style: normal; color: #ffe8a0; font-size: 20px; text-shadow: 0 0 8px #ffb040; }
.pill4 b { font-size: 16px; color: #f4ecd8; font-family: 'Cinzel', 'Shippori Mincho B1', serif; }
.pill4 small { font-size: 8px; color: #b8a888; letter-spacing: 3px; }
.head4 { position: absolute; left: 50%; top: 212px; transform: translateX(-50%); width: 470px; height: 52px; text-align: center; padding-top: 6px; box-sizing: border-box;
  background: var(--ui-f_choice) center / 100% 100% no-repeat; }
.head4 b { font-size: 18px; font-weight: 800; color: #f4ecd8; letter-spacing: 3px; }
.head4 small { font-size: 8.5px; color: #a89878; letter-spacing: 4px; }
.notes4 { position: absolute; right: 18px; top: 58px; display: flex; flex-direction: column; gap: 6px; }
.toast4 { width: 300px; height: 44px; padding: 5px 20px 0 56px; box-sizing: border-box; background: var(--ui-f_success) center / 100% 100% no-repeat; font-size: 13px; color: #f4ecd8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toast4 b { font-size: 11px; color: #9fd0ff; letter-spacing: 2px; }
.toast4.gold b { color: #ffd070; }
.cards4 { position: absolute; left: 0; right: 0; top: 272px; display: flex; justify-content: center; gap: 44px; }
.card4 { position: relative; width: 280px; height: 404px; cursor: pointer; transition: transform .15s, filter .15s; filter: brightness(0.82) saturate(0.9); }
.card4:hover { filter: brightness(0.95); transform: translateY(-3px); }
.card4.sel { filter: drop-shadow(0 0 14px rgba(255,200,100,0.75)) brightness(1.05); transform: translateY(-8px); }
.card4 > * { position: absolute; }
.c4-frame { inset: 0; background: var(--frame) center / 100% 100% no-repeat; }
.c4-art { left: 58px; right: 10px; top: 14px; height: 196px; background: center 18% / cover no-repeat; z-index: 1;
  -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent 100%), linear-gradient(90deg, transparent 0%, #000 22%); -webkit-mask-composite: source-in; mask-image: linear-gradient(180deg, #000 55%, transparent 100%); }
.c4-frame { z-index: 2; pointer-events: none; }
.card4 > div:not(.c4-art) { z-index: 3; }
.c4-frame { background-blend-mode: normal; }
.c4-en { left: 19px; top: 112px; writing-mode: vertical-rl; font-family: 'Cinzel', serif; font-size: 12px; letter-spacing: 4px; color: #e8d8b0; }
.c4-lv { left: 16px; top: 206px; font-family: 'Cinzel', serif; font-style: italic; font-size: 12px; color: #e8d8b0; }
.c4-who { left: 0; right: 0; top: 198px; text-align: center; font-size: 12px; color: #efe6d2; }
.c4-name { left: 0; right: 0; top: 213px; text-align: center; font-size: 25px; font-weight: 800; color: #ffe8b0; text-shadow: 0 2px 4px #000, 0 0 12px rgba(255,190,80,0.4); }
.c4-state { left: 0; right: 0; top: 250px; text-align: center; font-family: 'Cinzel', 'Shippori Mincho B1', serif; font-size: 12px; color: #e8c878; letter-spacing: 1px; }
.c4-state em { font-style: normal; color: #a89878; }
.c4-desc { left: 22px; right: 22px; top: 268px; text-align: center; font-size: 11.5px; line-height: 1.35; color: #efe6d2; font-family: 'Zen Kaku Gothic New', sans-serif; height: 22px; overflow: hidden; }
.c4-eff { left: 28px; top: 285px; font-size: 11px; color: #e8c878; }
.c4-tab { left: 22px; right: 18px; top: 302px; width: calc(100% - 40px); border-collapse: collapse; font-family: 'Zen Kaku Gothic New', sans-serif; font-size: 11px; color: #efe6d2; }
.c4-tab td { padding: 1px 2px; white-space: nowrap; }
.c4-tab td:first-child { white-space: normal; }
.c4-tab td:nth-child(2) { color: #a89c8a; text-align: right; }
.c4-tab td:nth-child(3) { color: #e8c878; width: 14px; text-align: center; }
.c4-tab td:nth-child(4) { color: #7dff9a; font-weight: 700; font-size: 12.5px; }
.c4-quote { left: 14px; right: 14px; top: 350px; text-align: center; font-size: 11px; color: #d8ccb0; }
.c4-quote small { font-size: 9.5px; color: #a89878; margin-top: 2px; }
.card4.relic .c4-icon { left: 0; right: 0; top: 60px; text-align: center; font-size: 84px; filter: drop-shadow(0 0 16px rgba(255,200,120,0.5)); }
.card4.relic .c4-desc { height: 44px; }
.confirm4, .skip4, .sv4 { position: absolute; border: 0; cursor: pointer; background: center / 100% 100% no-repeat; font-family: 'Shippori Mincho B1', serif; transition: filter .15s, transform .1s; }
.confirm4 { left: 50%; top: 668px; transform: translateX(-50%); width: 300px; height: 50px; background-image: var(--ui-f_success); }
.confirm4 b { font-size: 16px; font-weight: 800; color: #f4ecd8; letter-spacing: 3px; }
.confirm4 small, .skip4 small, .sv4 small { font-size: 9px; color: #b8a888; }
.skip4 { right: 26px; top: 672px; width: 150px; height: 42px; background-image: var(--ui-f_secondary); }
.skip4 b { font-size: 14px; font-weight: 800; color: #f4ecd8; }
.confirm4:hover, .skip4:hover, .sv4:hover:not(:disabled) { filter: brightness(1.3) drop-shadow(0 0 8px rgba(255,200,100,0.6)); }
.help4 { position: absolute; left: 26px; bottom: 16px; padding-left: 14px; border-left: 1px solid rgba(232,200,120,0.5); font-size: 12.5px; line-height: 1.55; color: #d8ccb0; }
.help4 small { font-size: 10px; color: #a89878; }

/* 旅の商人 */
.shop4 { background-size: cover; background-position: left center; }
.title4.shop { left: 740px; top: 60px; width: 460px; height: 150px; padding-top: 50px; }
.title4.shop b { font-size: 36px; letter-spacing: 8px; }
.tag4.shop { top: 106px; right: 24px; font-family: 'Shippori Mincho B1', serif; font-style: normal; font-size: 13px; color: #efe6d2; display: none; }
.talk4 { position: absolute; left: 34px; top: 418px; width: 318px; height: 124px; padding: 18px 20px 0; box-sizing: border-box; font-size: 13.5px; line-height: 1.65; color: #f4ecd8;
  border: 20px solid transparent; border-image: var(--ui-f_dialog) 22 fill / 20px stretch; }
.talk4 b { position: absolute; left: -6px; top: -16px; font-size: 13px; color: #e8c878; }
.shelf4 { position: absolute; left: 400px; right: 16px; top: 206px; display: flex; gap: 10px; justify-content: center; }
.sh4 { width: 164px; cursor: pointer; transition: transform .12s, filter .12s; }
.sh4:hover:not(.sold):not(.poor) { transform: translateY(-5px); filter: drop-shadow(0 0 10px rgba(255,200,100,0.5)); }
.sh4-card { height: 344px; border: 14px solid transparent; border-image: var(--ui-box) 18 fill / 14px stretch; box-sizing: border-box; padding: 0 2px; text-align: center; }
.sh4-head { font-size: 13px; font-weight: 800; color: #efe6d2; margin: -4px 0 6px; letter-spacing: 1px; }
.sh4-head.en { font-family: 'Cinzel', serif; color: #c8b890; letter-spacing: 3px; font-weight: 500; }
.sh4-win { height: 104px; margin: 0 2px 8px; border: 5px solid transparent; border-image: var(--ui-tile) 7 fill / 5px stretch; background: center 20% / cover no-repeat; box-sizing: border-box; }
.sh4-win.relic { display: flex; align-items: center; justify-content: center; font-size: 56px; background: radial-gradient(circle, rgba(255,160,80,0.25), transparent 70%); }
.sh4-name { font-size: 16px; font-weight: 800; color: #ffe8b0; }
.sh4-lv { font-family: 'Cinzel', serif; font-size: 11px; color: #e8c878; margin: 2px 0 4px; }
.sh4-desc { font-family: 'Zen Kaku Gothic New', sans-serif; font-size: 11px; line-height: 1.45; color: #efe6d2; padding: 4px 0; border-top: 1px solid rgba(232,200,120,0.25); }
.sh4-diff { font-family: 'Zen Kaku Gothic New', sans-serif; font-size: 10.5px; color: #d8ccb0; border-top: 1px solid rgba(232,200,120,0.25); padding-top: 4px; }
.sh4-diff span { display: block; }
.sh4-diff em { font-style: normal; color: #7dff9a; font-weight: 700; }
.sh4-price { margin-top: 6px; text-align: center; font-family: 'Cinzel', serif; font-size: 18px; color: #f4ecd8; display: flex; align-items: center; justify-content: center; gap: 6px; }
.sh4-price .ic { width: 22px; height: 22px; }
.sh4.sold { filter: grayscale(1) brightness(0.55); cursor: default; }
.sh4.poor { cursor: default; } .sh4.poor .sh4-price { color: #c06060; }
.svc4 { position: absolute; left: 400px; right: 16px; top: 598px; display: flex; gap: 10px; justify-content: center; }
.sv4 { position: static; height: 54px; padding: 0 26px; background-image: var(--ui-f_notice); }
.sv4 b { font-size: 14px; font-weight: 800; color: #f4ecd8; white-space: nowrap; display: flex; align-items: center; gap: 6px; justify-content: center; }
.sv4 .ic { width: 20px; height: 20px; }
.sv4:disabled { background-image: var(--ui-f_disabled); cursor: default; } .sv4:disabled b { color: #8a8a8a; }
.shop4 .help4 { display: none; }
.c4-frame { z-index: 1; }
.c4-art { z-index: 2; left: 64px; }
.card4 > :not(.c4-frame):not(.c4-art) { z-index: 4; }
.c4-art { top: 30px; right: 14px; height: 180px; }
.c4-desc { top: 265px; height: 28px; font-size: 11px; line-height: 1.25; }
.c4-eff { top: 294px; }
.c4-tab { top: 310px; }
.sh4-win { border-image: var(--ui-tile) 7 / 5px stretch; background-color: #0e0a12; }
.sh4-win.relic { border-image: var(--ui-tile) 7 fill / 5px stretch; }

/* =====================================================================
   2026-09 第5弾: ユーザーの感想への対応(冒険パートの視認性・文字のずれ・選択中のマス)
   ===================================================================== */
/* 選択中の階タブ: 画像の文字消し跡(縞模様)を落ち着いた板で隠し、文字を板の中央にそろえる */
.fl3.on::before { content: ''; position: absolute; left: 44px; right: 22px; top: 9px; bottom: 9px; border-radius: 2px;
  background: linear-gradient(180deg, rgba(74,50,16,0.95), rgba(44,28,8,0.95)); box-shadow: inset 0 0 0 1px rgba(255,220,140,0.25), inset 0 0 8px rgba(0,0,0,0.5); }
.fl3.on b { left: 52px; top: 8px; font-size: 22px; line-height: 1; }
.fl3.on small { left: 52px; top: 35px; line-height: 1; }
.fl3 b { line-height: 1; top: 9px; }
.fl3 small { line-height: 1; top: 34px; }
/* 選択中のマス(青いメダル)の意味を表示 */
.nd3-go { display: none; position: absolute; left: 50%; top: calc(100% + 10px); transform: translateX(-50%); padding: 2px 9px; font-size: 11px; white-space: nowrap; color: #d8ecff;
  background: rgba(8,16,32,0.92); border: 1px solid #6aa8ff; border-radius: 3px; font-family: 'Shippori Mincho B1', serif; font-weight: 800; box-shadow: 0 0 8px rgba(80,150,255,0.45); pointer-events: none; z-index: 5; }
.nd3.s-sel .nd3-go { display: block; }
.nd3.big .nd3-go { top: calc(100% + 12px); }
/* 右パネル: 次のマス */
.b-node { height: 138px; }
.ni3 { gap: 14px; }
.ni3-l small, .ni3-r small { display: block; font-family: 'Shippori Mincho B1', serif; font-weight: 800; color: #e8c878; font-size: 11.5px; margin: -2px 0 5px; letter-spacing: 1px; }
.ni3-r { width: 176px; }
.ni3 .tiles { gap: 10px; flex-wrap: nowrap; }
.en3, .dr3 { width: 64px; flex: none; text-align: center; }
.en3-pic, .dr3-pic { position: relative; width: 64px; height: 56px; box-sizing: border-box; border: 4px solid transparent; border-image: var(--ui-tile) 7 fill / 4px stretch; overflow: hidden;
  display: flex; align-items: center; justify-content: center; }
.en3-pic.face { background: center / cover no-repeat; border-image: var(--ui-tile) 7 / 4px stretch; }
.en3-pic img { max-width: 50px; max-height: 44px; image-rendering: pixelated; transform: scaleX(-1); }
.en3-pic em { position: absolute; right: 1px; bottom: 0; font-style: normal; font-family: 'Cinzel', serif; font-weight: 700; font-size: 12px; color: #fff; text-shadow: 0 0 3px #000, 0 0 3px #000; }
.en3-tag { position: absolute; left: 0; top: 0; padding: 0 3px; font-style: normal; font-family: 'Cinzel', serif; font-size: 8px; letter-spacing: 1px; color: #ffe8b0; background: rgba(120,70,10,0.9); }
.en3-tag.boss { background: rgba(150,20,20,0.92); }
.en3 small, .dr3 small { display: block; margin-top: 3px; font-size: 10.5px; line-height: 1.2; color: #efe6d2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: 'Shippori Mincho B1', serif; }
.dr3-pic i { position: absolute; inset: 5px; background: center / contain no-repeat; }
.rp3-what { font-size: 12px; line-height: 1.5; }
/* パーティー欄: キャンバスと同じ縦横比で表示(以前は縦につぶれてキャラの大きさがばらついて見えた) */
.pm3 canvas.portrait { width: 78px; height: 84.5px; }
.box3 h4 em { letter-spacing: 0; }
/* 上のバー: 英語の一言が切れないよう少し小さく */
.tb3-tag small { font-size: 10px; letter-spacing: 0.2px; }
/* 右パネルの高さ配分(合計632): 見出し164 / 次のマス160 / パーティー176 / 遺物・メニュー108 */
.rp3-head { height: 164px; padding: 10px 24px; }
.rp3-title { font-size: 30px; }
.rp3-prog { margin: 4px 0 3px; }
/* 進み具合はタイトルの右へ(以前は1行使っていて、説明文が下の枠線に乗ってはみ出していた) */
.rp3-head > .rp3-prog { position: absolute; right: 24px; top: 44px; width: 220px; margin: 0; }
.rp3-boss { margin-top: 14px; }
.b-node { height: 160px; }
.b-party { height: 176px; }
.rp3-foot, .rp3-foot .b-relics { height: 108px; }
.rp3-menu .mn { height: 64px; }
/* 「選択中」の札はマスの右横(下の「現在地」の札と重ならない) */
.nd3-go { left: calc(100% + 6px); top: 50%; transform: translateY(-50%); }
.nd3.big .nd3-go { top: 50%; }
.howto .k { white-space: nowrap; }
/* 遊び方: 「(全3ACT)」「Q:回復薬」などを途中で改行しない */
.howto p { word-break: auto-phrase; }
.howto .nb { white-space: nowrap; }
/* 強化・遺物カードの文字は上から順に並べる(以前は位置を固定していたので「Lv 0 → 1」と説明文が重なっていた) */
.c4-body { left: 20px; right: 20px; top: 194px; bottom: 60px; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.c4-body > * { position: static !important; }
.c4-body .c4-who { font-size: 12px; line-height: 1.2; }
.c4-body .c4-name { font-size: 24px; line-height: 1.15; }
.c4-body .c4-state { font-size: 12px; line-height: 1.2; margin-bottom: 2px; }
.c4-body .c4-desc { height: auto; max-height: 30px; line-height: 1.3; font-size: 11.5px; }
.c4-body .c4-eff { align-self: flex-start; margin: 3px 0 0 6px; line-height: 1.2; }
.c4-body .c4-tab { width: 100%; }
.card4.relic .c4-body .c4-desc { max-height: 46px; }
.c4-quote { top: auto; bottom: 20px; }
/* パーティー編成: 右の説明だけをスクロール、「完了」ボタンは常に見える位置に */
.party { box-sizing: border-box; height: 640px; max-height: 640px; overflow: hidden; display: flex; flex-direction: column; top: calc(50% + 36px); }
.party h2 { margin: 0 0 4px; flex: none; }
.party .msg { flex: none; }
.party-layout { flex: 1; min-height: 0; }
.party .formation { overflow: hidden; }
.party .detail { height: 100%; box-sizing: border-box; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #8a6a2a transparent; }
.party > .btn { flex: none; align-self: center; margin-top: 8px; }
/* 持ち物の小窓: 遺物が多くても枠内に収めてスクロール */
.items3 { max-height: 430px; overflow-y: auto; scrollbar-width: thin; }
.items3 > div { line-height: 1.45; }
.c4-body > * { flex: none; }
/* 胸像の端をぼかして枠になじませる(顔の大きさをそろえて拡大したので、四角い端が見えないように) */
.card4 .c4-art { -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 14%, #000 62%, transparent 100%), linear-gradient(90deg, transparent 0%, #000 20%, #000 90%, transparent 100%);
  -webkit-mask-composite: source-in; mask-image: linear-gradient(180deg, transparent 0%, #000 14%, #000 62%, transparent 100%), linear-gradient(90deg, transparent 0%, #000 20%, #000 90%, transparent 100%); mask-composite: intersect; }
/* 文字の配置: 本文 186〜346px / セリフは下に2行まで(英文は折り返す) */
.c4-body { top: 186px; bottom: 58px; gap: 2px; }
.c4-body .c4-name { font-size: 22px; }
.c4-body .c4-state { margin-bottom: 1px; }
.c4-body .c4-eff { margin-top: 2px; }
.c4-body .c4-tab td { padding: 0 2px; line-height: 1.35; }
.c4-quote { left: 30px; right: 30px; bottom: 16px; font-size: 10.5px; line-height: 1.3; }
.c4-quote small { font-size: 8px; line-height: 1.25; white-space: normal; overflow: visible; letter-spacing: 0.2px; }
.c4-quote { bottom: 28px; }
/* 日本語は文節で折り返す(「アップ」だけ次の行、のような切れ方を防ぐ。Chrome 119+) */
#ui { word-break: auto-phrase; }

/* =====================================================================
   2026-09-26(4回目) 勝利・強化選択: 枠画像を縦横比のまま使う(9スライス)・カードを上へ・見出しは理想例どおり枠なし
   ===================================================================== */
/* 左上の現在地: 紋章(左端)と尖った右端は元の比率、真ん中だけ伸ばす */
.loc4 { top: 14px; width: auto; height: 54px; padding: 9px 22px 0 6px; box-sizing: border-box; background: none;
  border-style: solid; border-color: transparent; border-width: 0 15px 0 47px; border-image: var(--ui-f_location) 0 34 0 110 fill / 0 15px 0 47px stretch; }
.loc4 b { font-size: 16px; line-height: 1.25; }
.loc4 small { font-size: 9.5px; white-space: nowrap; }
.tag4 { top: 24px; right: 22px; font-size: 11.5px; padding-bottom: 6px; border-bottom: 1px solid; border-image: linear-gradient(90deg, transparent, rgba(232,200,120,0.6)) 1; }
/* 勝利の見出し: 枠を小さくして文字を枠の中に */
.title4 { top: 0; width: 400px; height: 116px; padding-top: 55px; background: var(--ui-f_title) center top / 400px auto no-repeat; }
.title4 b { font-size: 29px; letter-spacing: 8px; text-indent: 8px; }
.title4.long b { font-size: 22px; letter-spacing: 3px; text-indent: 3px; margin-top: 2px; }
.title4 small { font-size: 8.5px; letter-spacing: 5px; margin-top: 3px; }
/* ゴールド・経験値: 理想例は枠なし */
.pill4 { top: 106px; width: 400px; height: 34px; background: radial-gradient(ellipse at center, rgba(6,4,10,0.7), transparent 72%); }
/* 「誰を育てる?」: 左右に金の線 */
.head4 { top: 138px; width: 660px; height: 40px; padding-top: 2px;
  background: var(--ui-div_goldline) left center / 150px auto no-repeat, var(--ui-div_goldline) right center / 150px auto no-repeat; }
/* カード: 上へ。枠は上下の飾りを潰さない9スライス。
   高さ440pxのとき枠の金線は 上から278px(名前の下)/320px(✦ 効果)/372px(セリフの上)→ 文字はその間に置く */
.cards4 { top: 180px; gap: 40px; }
.card4 { width: 282px; height: 440px; }
.c4-frame { box-sizing: border-box; background: none; border-style: solid; border-color: transparent; border-width: 137px 17px 76px 17px;
  border-image: var(--frame) 145 18 80 18 fill / 137px 17px 76px 17px stretch; }
.card4 .c4-art { top: 32px; height: 196px; }
.c4-en { top: 118px; }
.c4-lv { top: 236px; }
.card4 .c4-body { top: 0; bottom: 0; left: 18px; right: 18px; display: block; }
.card4 .c4-body > * { position: absolute !important; left: 0; right: 0; margin: 0; text-align: center; }
.card4 .c4-body .c4-who { top: 212px; }
.card4 .c4-body .c4-name { top: 228px; line-height: 1.1; }
.card4 .c4-body .c4-state { top: 256px; }
.card4 .c4-body .c4-desc { top: 283px; left: 4px; right: 4px; max-height: 30px; }
.card4.relic .c4-body .c4-desc { max-height: 80px; }
.card4 .c4-body .c4-eff { top: 312px; left: 16px; right: auto; padding: 0 10px 0 4px; line-height: 16px;
  background: linear-gradient(90deg, rgba(10,8,14,0.85) 70%, transparent); }
.card4 .c4-body .c4-tab { top: 332px; left: 4px; right: 0; width: calc(100% - 4px); }
.c4-quote { bottom: 30px; }
/* ボタン・お知らせ: 両端の飾りは元の比率 */
.confirm4 { top: 642px; width: 300px; height: 52px; background: none; border-style: solid; border-color: transparent; border-width: 0 30px;
  border-image: var(--ui-f_success) 0 50 fill / 0 30px stretch; }
.skip4 { top: 647px; height: 42px; background: none; border-style: solid; border-color: transparent; border-width: 0 27px;
  border-image: var(--ui-f_secondary) 0 45 fill / 0 27px stretch; }
.help4 { bottom: 16px; }
.notes4 { top: 62px; }
.toast4 { width: 320px; padding: 5px 12px 0 30px; background: none; border-style: solid; border-color: transparent; border-width: 0 24px;
  border-image: var(--ui-f_success) 0 46 fill / 0 24px stretch; }
/* 勝利画面の登場アニメ(最初の1回だけ): 見出しが光って降りる → 報酬 → カードが左から順に浮かぶ → ボタン */
@keyframes r4Drop { from { opacity: 0; transform: translateX(-50%) translateY(-24px) scale(1.15); filter: brightness(2.2); } to { opacity: 1; transform: translateX(-50%); filter: none; } }
@keyframes r4Fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes r4Up { from { opacity: 0; transform: translateY(40px) scale(0.94); } to { opacity: 1; } }
@keyframes r4Shine { 0% { background-position: -150% 0; } 100% { background-position: 250% 0; } }
.intro4 .title4 { animation: r4Drop .55s cubic-bezier(.2,1.4,.4,1) both; }
.intro4 .pill4, .intro4 .head4 { animation: r4Fade .4s .35s both; }
.intro4 .loc4, .intro4 .tag4, .intro4 .notes4 { animation: r4Fade .5s .2s both; }
.intro4 .card4 { animation: r4Up .5s cubic-bezier(.2,1.2,.4,1) both; }
.intro4 .card4:nth-child(1) { animation-delay: .5s; } .intro4 .card4:nth-child(2) { animation-delay: .62s; } .intro4 .card4:nth-child(3) { animation-delay: .74s; }
.intro4 .confirm4, .intro4 .skip4, .intro4 .help4 { animation: r4Fade .4s 1s both; }
.intro4 .confirm4 { animation-name: r4Fade; }
/* 見出しの文字に光が走る */
.title4 b { background-size: 100% 100%; }
.title4::after { content: ''; position: absolute; left: 32%; right: 32%; top: 52px; height: 52px; pointer-events: none;
  background: linear-gradient(105deg, transparent 40%, rgba(255,250,220,0.55) 50%, transparent 60%) no-repeat; background-size: 60% 100%; mix-blend-mode: overlay; animation: r4Shine 3.2s 1s infinite; }

/* =====================================================================
   2026-09-26(5回目) パーティー編成: 勝利画面と同じ部品で作り直し(左=ボタン配置 / 右=詳細 / 下=完了)
   ===================================================================== */
.party4 .title4 b { font-size: 24px; }
.pf4, .pd4 { position: absolute; top: 128px; bottom: 90px; box-sizing: border-box; border: 16px solid transparent; border-image: var(--ui-box) 18 fill / 16px stretch; }
.pf4 { left: 24px; width: 470px; padding: 2px 6px; }
.pd4 { left: 508px; right: 24px; padding: 0 6px; display: flex; flex-direction: column; }
.pd4-h { display: flex; align-items: baseline; gap: 10px; margin: 10px 0 6px; padding-bottom: 4px; border-bottom: 1px solid; border-image: linear-gradient(90deg, rgba(232,200,120,0.7), transparent) 1; }
.pd4-h b { display: inline; font-size: 15px; color: #f0d890; letter-spacing: 2px; }
.pd4-h b::before { content: '✦ '; color: #e8c878; font-size: 12px; }
.pd4-h small { display: inline; font-size: 9.5px; color: #a89878; letter-spacing: 1px; font-style: italic; }
.pf4 > .pd4-h:first-child { margin-top: 4px; }
.pf4-hint { font-size: 11.5px; color: #b8ab90; font-family: 'Zen Kaku Gothic New', sans-serif; margin-bottom: 8px; }
.pf4-diamond { position: relative; height: 290px; }
.pf4-slot { position: absolute; width: 214px; height: 76px; cursor: pointer; background: var(--ui-pcard) center / 100% 100% no-repeat; transition: filter .15s, transform .12s; }
.pf4-slot:hover { filter: brightness(1.2); }
.pf4-slot.sel { filter: brightness(1.15) drop-shadow(0 0 10px rgba(255,200,100,0.8)); transform: translateY(-2px); }
.pf4-slot.s0 { left: 64px; top: 0; } .pf4-slot.s1 { left: 0; top: 100px; } .pf4-slot.s2 { right: 0; top: 100px; } .pf4-slot.s3 { left: 116px; top: 200px; }
.pf4-slot .pc3-face { position: absolute; left: 18px; top: 14px; width: 48px; height: 48px; border-radius: 3px; }
.pf4-slot .pc3-key { position: absolute; left: 8px; top: 6px; font-style: normal; }
.pf4-slot .pc3-name { left: 78px; top: 12px; }
.pf4-slot .pc3-hp { left: 78px; right: 18px; top: 33px; font-size: 11.5px; }
.pf4-slot .pc3-bar { position: absolute; left: 78px; right: 18px; top: 52px; }
.pf4-slot.empty span { position: absolute; left: 0; right: 0; top: 26px; text-align: center; color: #8a7f6a; }
.pf4-msg { margin-top: 4px; padding: 6px 10px; font-size: 12px; color: #ffe8b0; background: rgba(40,28,10,0.7); border-left: 2px solid #e8c878; }
.pf4-bench { margin-top: 2px; }
.pf4-b { display: inline-flex; align-items: center; gap: 6px; margin: 0 8px 6px 0; padding: 3px 10px 3px 3px; cursor: pointer; font-size: 12.5px; color: #efe6d2; border: 1px solid rgba(232,200,120,0.4); background: rgba(10,8,14,0.7); }
.pf4-b.sel { border-color: #ffd070; box-shadow: 0 0 8px rgba(255,200,100,0.5); }
.pf4-b canvas { width: 36px; height: 36px; }
.pd4-top { position: relative; flex: none; height: 170px; display: flex; gap: 10px; border-bottom: 1px solid rgba(232,200,120,0.35); }
.pd4-bust { flex: none; width: 190px; height: 170px; background-repeat: no-repeat;
  -webkit-mask-image: linear-gradient(90deg, #000 70%, transparent), linear-gradient(180deg, #000 75%, transparent); -webkit-mask-composite: source-in; mask-image: linear-gradient(90deg, #000 70%, transparent), linear-gradient(180deg, #000 75%, transparent); mask-composite: intersect; }
.pd4-full { flex: none; width: 88px; height: 112px; align-self: flex-end; margin: 0 -6px 6px -40px; }
.pd4-info { flex: 1; min-width: 0; padding-top: 8px; font-family: 'Zen Kaku Gothic New', sans-serif; }
.pd4-name { display: flex; align-items: baseline; gap: 10px; font-family: 'Shippori Mincho B1', serif; }
.pd4-name b { display: inline; font-size: 26px; font-weight: 800; color: #ffe8b0; text-shadow: 0 2px 4px #000, 0 0 10px color-mix(in srgb, var(--c) 50%, transparent); }
.pd4-name span { font-size: 13px; color: #c8b890; }
.pd4-stats { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 6px 0; font-family: 'Cinzel', 'Zen Kaku Gothic New', serif; font-size: 15px; color: #fff; }
.pd4-stats em { font-style: italic; font-size: 11px; color: #c8b890; margin-right: 5px; }
.pd4-stats small { display: inline; font-size: 10px; color: #a89878; margin-left: 6px; font-style: normal; }
.pd4-desc { font-size: 12px; line-height: 1.5; color: #d8ccb0; }
.pd4-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; align-items: center; }
.pd4-el { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; color: #efe6d2; padding: 1px 8px 1px 2px; border: 1px solid rgba(232,200,120,0.45); border-radius: 12px; background: rgba(0,0,0,0.4); }
.pd4-el i { width: 20px; height: 20px; background: center / contain no-repeat; }
.pd4-scroll { flex: 1; min-height: 0; overflow-y: auto; padding-right: 6px; scrollbar-width: thin; scrollbar-color: #8a6a2a transparent; font-family: 'Zen Kaku Gothic New', sans-serif; }
.pd4-grid3, .pd4-grid2 { display: grid; gap: 6px; }
.pd4-grid3 { grid-template-columns: repeat(3, 1fr); } .pd4-grid2 { grid-template-columns: repeat(2, 1fr); }
.pd4-row { padding: 6px 10px; background: linear-gradient(180deg, rgba(30,24,16,0.85), rgba(12,10,12,0.85)); border: 1px solid rgba(232,200,120,0.28); border-left: 2px solid color-mix(in srgb, var(--c) 70%, #e8c878); }
.pd4-row b { display: block; font-size: 13px; color: #f4ecd8; font-family: 'Shippori Mincho B1', serif; font-weight: 800; }
.pd4-row b em { font-style: normal; display: inline-block; width: 18px; height: 18px; line-height: 18px; margin-right: 6px; text-align: center; font-size: 11px; color: #1a1208; background: #e8c878; border-radius: 50%; }
.pd4-row b small { font-size: 10.5px; color: #c8b890; font-weight: 500; }
.pd4-row > span { display: block; font-size: 11.5px; line-height: 1.45; color: #b8ab90; margin-top: 2px; }
.pd4-row.fin b { color: #ffd070; }
.pd4-row.up b .lv { float: right; font-style: normal; font-size: 11px; color: #a89878; }
.pd4-row.up.on { border-color: rgba(255,210,120,0.55); } .pd4-row.up.on b .lv { color: #7dff9a; }
.pd4-row .val { color: #d8ccb0 !important; } .pd4-row .val i { font-style: normal; color: #7dff9a; font-weight: 700; } .pd4-row .val small { color: #8a7f6a; }
.party4 .confirm4 { top: 648px; }
.pf4-slot .pc3-name small { display: inline; }
.pf4-keys { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; font-family: 'Zen Kaku Gothic New', sans-serif; font-size: 12px; color: #d8ccb0; }
.pf4-keys b { display: inline; color: #f0d890; font-family: 'Cinzel', serif; font-size: 12px; }
/* 旅の商人: 商人の頭が上のバーにかからないよう、背景を下へずらす(2026-09-26 ユーザー要望)。台詞の枠も胸元へ */
.shop4 { background-size: 100% 100%, 1320px auto; background-position: 0 0, left -20px top 34px; background-repeat: no-repeat; }
.shop4 .talk4 { top: 492px; }
.pf4-slot .pc3-name b { display: inline; }

/* =====================================================================
   2026-09-26 タイトル画面(SOUL CHAIN): キービジュアル+ロゴ+火の粉+光の筋、GAME START
   ===================================================================== */
.ttl5 { position: absolute; inset: 0; overflow: hidden; background: #050308; font-family: 'Shippori Mincho B1', serif; }
.ttl5-kv { position: absolute; inset: -2%; background: center / cover no-repeat; animation: ttlZoom 26s ease-in-out infinite alternate; }
@keyframes ttlZoom { from { transform: scale(1) translate(0, 0); } to { transform: scale(1.07) translate(-1%, 1%); } }
.ttl5-shade { position: absolute; inset: 0; background:
  radial-gradient(ellipse 60% 30% at 50% 24%, rgba(4,2,8,0.62), transparent 70%),
  linear-gradient(180deg, rgba(4,2,8,0.35) 0%, transparent 25%, transparent 60%, rgba(4,2,8,0.85) 100%),
  radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,0.6) 100%); }
.ttl5-rays { position: absolute; left: 50%; top: 22%; width: 1400px; height: 1400px; margin: -700px 0 0 -700px; opacity: 0.18; mix-blend-mode: screen;
  background: repeating-conic-gradient(from 0deg, rgba(255,210,140,0.5) 0deg 3deg, transparent 3deg 14deg); -webkit-mask-image: radial-gradient(circle, #000 0%, transparent 60%); mask-image: radial-gradient(circle, #000 0%, transparent 60%);
  animation: ttlSpin 80s linear infinite; }
@keyframes ttlSpin { to { transform: rotate(360deg); } }
.ttl5-embers i { position: absolute; bottom: -10px; border-radius: 50%; background: #ffc070; box-shadow: 0 0 6px #ff8030, 0 0 12px #ff5010; animation: ttlEmber linear infinite; opacity: 0; }
.ttl5-embers i:nth-child(4n) { background: #bfe6ff; box-shadow: 0 0 6px #6ac0ff, 0 0 14px #3080ff; }
@keyframes ttlEmber { 0% { transform: translate(0, 0); opacity: 0; } 10% { opacity: 1; } 80% { opacity: 0.8; } 100% { transform: translate(var(--dx), -760px); opacity: 0; } }
.ttl5-logo { position: absolute; left: 50%; top: 58px; width: 700px; transform: translateX(-50%); text-align: center; animation: ttlLogoIn 1.4s cubic-bezier(.2,1,.3,1) both; }
@keyframes ttlLogoIn { from { opacity: 0; transform: translateX(-50%) scale(1.25); filter: brightness(3) blur(6px); } to { opacity: 1; transform: translateX(-50%); filter: none; } }
.ttl5-logo-img { position: relative; width: 100%; background: center / contain no-repeat; filter: drop-shadow(0 6px 12px rgba(0,0,0,0.9)) drop-shadow(0 0 24px rgba(120,190,255,0.35)); animation: ttlGlow 4s ease-in-out infinite; }
@keyframes ttlGlow { 50% { filter: drop-shadow(0 6px 12px rgba(0,0,0,0.9)) drop-shadow(0 0 40px rgba(140,210,255,0.6)); } }
.ttl5-shine { position: absolute; inset: 0; -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center;
  background: linear-gradient(105deg, transparent 40%, rgba(255,250,225,0.85) 50%, transparent 60%) no-repeat; background-size: 250% 100%; animation: ttlShine 5s 1.6s infinite; }
@keyframes ttlShine { 0% { background-position: 130% 0; } 40%, 100% { background-position: -130% 0; } }
.ttl5-logo-txt { margin: 0; font-family: 'Cinzel', serif; font-weight: 700; font-size: 104px; letter-spacing: 10px; line-height: 1.1;
  background: linear-gradient(180deg, #fffbe8 15%, #f0c060 60%, #9a6a1c); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 4px 6px #000); }
.ttl5-logo-txt em { font-style: normal; font-size: 60px; vertical-align: middle; color: #bfe6ff; -webkit-text-fill-color: #bfe6ff; text-shadow: 0 0 20px #6ac0ff; }
.ttl5-jp { margin-top: -4px; font-size: 16px; letter-spacing: 6px; color: #f0e2c0; text-shadow: 0 0 8px #000, 0 2px 3px #000; }
.ttl5-tag { margin-top: 6px; font-size: 13px; letter-spacing: 3px; color: #d8c8a0; text-shadow: 0 0 8px #000, 0 2px 3px #000; opacity: 0; animation: r4Fade 1s 1s both; }
.ttl5-menu { position: absolute; left: 50%; bottom: 62px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 12px; animation: r4Fade .8s 1.2s both; }
.ttl5-start { position: relative; width: 360px; height: 76px; cursor: pointer; background: none; color: #fff; border-style: solid; border-color: transparent; border-width: 0 40px;
  border-image: var(--ui-f_success) 0 50 fill / 0 40px stretch; filter: drop-shadow(0 0 14px rgba(255,190,90,0.55)); animation: ttlPulse 2.2s ease-in-out infinite; transition: transform .12s; }
.ttl5-start span { display: block; font-family: 'Cinzel', serif; font-weight: 700; font-size: 28px; letter-spacing: 8px; text-indent: 8px;
  background: linear-gradient(180deg, #fffdf0 20%, #ffd880 70%, #d89830); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ttl5-start small { display: block; font-size: 11px; letter-spacing: 4px; color: #e8d8b0; margin-top: 1px; }
.ttl5-start:hover { transform: scale(1.05); filter: drop-shadow(0 0 22px rgba(255,210,120,0.9)) brightness(1.15); }
@keyframes ttlPulse { 50% { filter: drop-shadow(0 0 26px rgba(255,200,110,0.85)); } }
.ttl5-sub { display: flex; gap: 14px; }
.ttl5-btn { width: 200px; height: 46px; cursor: pointer; background: none; color: #f4ecd8; font-family: 'Shippori Mincho B1', serif; border-style: solid; border-color: transparent; border-width: 0 26px;
  border-image: var(--ui-f_secondary) 0 45 fill / 0 26px stretch; transition: filter .15s, transform .12s; }
.ttl5-btn b { display: block; font-size: 14px; font-weight: 800; letter-spacing: 2px; }
.ttl5-btn small { display: block; font-family: 'Cinzel', serif; font-size: 9px; color: #b8a888; letter-spacing: 1px; }
.ttl5-btn:hover { filter: brightness(1.3) drop-shadow(0 0 8px rgba(255,200,100,0.6)); transform: translateY(-2px); }
.ttl5-foot { position: absolute; left: 0; right: 0; bottom: 14px; text-align: center; font-family: 'Cinzel', 'Zen Kaku Gothic New', serif; font-size: 10.5px; letter-spacing: 1px; color: rgba(232,216,176,0.7); text-shadow: 0 1px 3px #000; }
.ttl5-flash { position: absolute; inset: 0; background: radial-gradient(circle at var(--fx, 50%) var(--fy, 80%), #fff8e0, #ffc060 30%, transparent 70%); opacity: 0; pointer-events: none; z-index: 5; }
.ttl5.go .ttl5-flash { animation: ttlFlash 1.15s ease-in forwards; }
@keyframes ttlFlash { 0%, 30% { opacity: 0; } 60% { opacity: 0.9; } 100% { opacity: 1; background: #050308; } }
/* 2026-09-27: 押したボタンが分かるように — 押したボタンだけ光って大きく、他のボタンは消える。押した位置から光のエフェクト(ChatGPT生成 fx_start)が弾ける */
.ttl5.go .ttl5-menu button:not(.hit) { transition: opacity .25s, transform .25s; opacity: 0; transform: scale(0.92); pointer-events: none; }
.ttl5.go .ttl5-menu { z-index: 4; }
.ttl5.go .ttl5-menu button.hit { animation: ttlHit .5s cubic-bezier(.2,.9,.3,1.4) forwards; }
@keyframes ttlHit { 0% { transform: scale(1); } 35% { transform: scale(1.18); filter: brightness(2.4) drop-shadow(0 0 34px #ffd080); } 100% { transform: scale(1.1); filter: brightness(1.8) drop-shadow(0 0 26px #ffd080); } }
.ttl5-burst { position: absolute; width: 0; height: 0; z-index: 3; pointer-events: none; }
.ttl5-burst i { position: absolute; left: -200px; top: -200px; width: 400px; height: 400px; background: var(--ui-fx_start) center / contain no-repeat; opacity: 0; }
.ttl5-burst .b1 { animation: ttlBurst1 1s cubic-bezier(.1,.8,.3,1) forwards; }
.ttl5-burst .b2 { animation: ttlBurst2 1.1s .12s cubic-bezier(.1,.8,.3,1) forwards; }
.ttl5-burst .b3 { left: -80px; top: -80px; width: 160px; height: 160px; animation: ttlBurst3 .45s ease-out forwards; }
@keyframes ttlBurst1 { 0% { opacity: 0; transform: scale(0.15) rotate(0); } 15% { opacity: 0.95; } 100% { opacity: 0; transform: scale(1.35) rotate(40deg); } }
@keyframes ttlBurst2 { 0% { opacity: 0; transform: scale(0.1) rotate(0); } 20% { opacity: 0.5; } 100% { opacity: 0; transform: scale(2.2) rotate(-60deg); } }
@keyframes ttlBurst3 { 0% { opacity: 1; transform: scale(0.4); filter: brightness(3); } 100% { opacity: 0; transform: scale(2.2); filter: brightness(1.5); } }
/* 魂の欠片のアイコン */
.shard4 { display: inline-block; width: 10px; height: 14px; margin: 0 4px 0 2px; vertical-align: -1px; background: linear-gradient(135deg, #e8f6ff, #6ac0ff 55%, #2a60c0); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); filter: drop-shadow(0 0 4px #6ac0ff); }
/* 魂の祭壇(恒久強化) */
.altar4 .title4 b { font-size: 26px; }
.alt4-head { position: absolute; left: 0; right: 0; top: 116px; display: flex; justify-content: center; align-items: baseline; gap: 28px; }
.alt4-have { display: flex; align-items: baseline; gap: 4px; font-family: 'Cinzel', serif; }
.alt4-have b { font-size: 30px; color: #cfeaff; text-shadow: 0 0 12px #3a90ff; } .alt4-have small { font-size: 12px; color: #b8c8d8; margin-left: 6px; font-family: 'Shippori Mincho B1', serif; }
.alt4-have .shard4 { width: 14px; height: 20px; }
.alt4-rec { font-size: 12px; color: #b8ab90; font-family: 'Zen Kaku Gothic New', sans-serif; }
.alt4-help { position: absolute; left: 0; right: 0; top: 160px; text-align: center; font-size: 12.5px; color: #d8ccb0; font-family: 'Zen Kaku Gothic New', sans-serif; }
.alt4-help b { color: #cfeaff; }
.alt4-grid { position: absolute; left: 60px; right: 60px; top: 192px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 16px; }
.alt4-card { position: relative; height: 128px; box-sizing: border-box; padding: 10px 14px 0 70px; border: 14px solid transparent; border-image: var(--ui-box) 18 fill / 14px stretch; font-family: 'Zen Kaku Gothic New', sans-serif; }
.alt4-card.on { filter: drop-shadow(0 0 8px rgba(110,190,255,0.45)); }
.alt4-ic { position: absolute; left: 6px; top: 14px; width: 50px; height: 50px; display: grid; place-items: center; font-size: 28px; border-radius: 50%; background: radial-gradient(circle, rgba(110,190,255,0.25), rgba(0,0,0,0.5)); box-shadow: 0 0 0 1px rgba(232,200,120,0.55); }
.alt4-name { display: flex; justify-content: space-between; align-items: baseline; font-family: 'Shippori Mincho B1', serif; }
.alt4-name b { font-size: 15px; color: #f4ecd8; font-weight: 800; } .alt4-name em { font-style: normal; font-size: 11px; color: #6ac0ff; letter-spacing: 1px; }
.alt4-desc, .alt4-next { font-size: 11.5px; line-height: 1.45; color: #d8ccb0; } .alt4-next { color: #b8ab90; } .alt4-card .gold { color: #ffd070; }
.alt4-buy { position: absolute; right: 0; bottom: -2px; height: 26px; padding: 0 12px; cursor: pointer; font-family: 'Shippori Mincho B1', serif; font-size: 12px; font-weight: 800; color: #eaf6ff;
  background: linear-gradient(180deg, #2a4a78, #142640); border: 1px solid #6ac0ff; border-radius: 3px; box-shadow: 0 0 8px rgba(106,192,255,0.4); }
.alt4-buy:hover:not(:disabled) { filter: brightness(1.3); }
.alt4-buy:disabled { cursor: default; color: #7a7a7a; background: #1a1a1e; border-color: #444; box-shadow: none; }
.alt4-card.max .alt4-buy:disabled { color: #ffd070; border-color: #a88a40; }
.alt4-reset { position: absolute; left: 30px; bottom: 26px; cursor: pointer; background: none; border: 0; color: #8a8070; font-size: 11px; text-decoration: underline; font-family: 'Zen Kaku Gothic New', sans-serif; }
.altar4 .confirm4 { top: 646px; } .altar4 .skip4 { top: 651px; }
/* ゲームオーバー / クリア */
.end4-logo { position: absolute; left: 0; right: 0; top: 90px; text-align: center; font-family: 'Cinzel', serif; font-weight: 700; font-size: 64px; letter-spacing: 10px;
  background: linear-gradient(180deg, #fffbe8 15%, #f0c060 60%, #9a6a1c); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 4px 8px #000); animation: ttlLogoIn 1.2s both; }
.end4.dead .end4-logo { background-image: linear-gradient(180deg, #ffe0d8 10%, #e04030 60%, #6a1010); }
.end4-msg { position: absolute; left: 0; right: 0; top: 184px; text-align: center; font-size: 15px; color: #efe2cc; text-shadow: 0 2px 4px #000; animation: r4Fade 1s .6s both; }
.end4-box { position: absolute; left: 50%; top: 240px; width: 760px; transform: translateX(-50%); display: grid; grid-template-columns: 1fr 1fr; gap: 20px; animation: r4Fade 1s .9s both; }
.end4-col { box-sizing: border-box; min-height: 250px; padding: 4px 10px; border: 16px solid transparent; border-image: var(--ui-box) 18 fill / 16px stretch; }
.end4-tab { width: 100%; border-collapse: collapse; font-family: 'Zen Kaku Gothic New', sans-serif; font-size: 14px; color: #efe6d2; }
.end4-tab td { padding: 6px 4px; border-bottom: 1px solid rgba(232,200,120,0.18); } .end4-tab td:last-child { text-align: right; font-family: 'Cinzel', 'Zen Kaku Gothic New', serif; }
.end4-tab tr.sum td { color: #cfeaff; font-size: 17px; font-weight: 700; border-bottom: 0; }
.end4-have { margin-top: 8px; text-align: right; font-size: 13px; color: #b8c8d8; } .end4-have b { font-size: 18px; color: #cfeaff; }
.end4-btns { position: absolute; left: 0; right: 0; top: 560px; animation: r4Fade 1s 1.2s both; }
.end4 .confirm4.end { top: 0; } .end4 .skip4.end { top: 72px; right: auto; left: calc(50% + 10px); } .end4 .skip4.end.l { left: calc(50% - 160px); }
.ttl5-start span { white-space: nowrap; font-size: 25px; letter-spacing: 6px; text-indent: 6px; }
.end4-logo { animation: endLogoIn 1.2s both; }
@keyframes endLogoIn { from { opacity: 0; transform: scale(1.2); filter: brightness(3) blur(6px); } to { opacity: 1; transform: none; } }
.end4-have b, .alt4-help b, .alt4-name b, .alt4-have b { display: inline; }
.alt4-have small { display: inline; }
.alt4-help { top: 158px; }
.ttl5-logo { top: 34px; width: 660px; }
.ttl5-jp { margin-top: -6px; }
/* ACTの切り替わり(シネマ風) */
.actin5 { background-size: cover; background-position: center; animation: actZoom 8s ease-out both; }
@keyframes actZoom { from { background-size: 115%; } to { background-size: 100%; } }
.actin5-no { position: absolute; left: 0; right: 0; top: 200px; text-align: center; font-family: 'Cinzel', serif; font-size: 22px; letter-spacing: 16px; color: #e8c878; text-shadow: 0 0 12px #000; animation: r4Fade .8s .2s both; }
.actin5-name { position: absolute; left: 0; right: 0; top: 236px; text-align: center; font-size: 76px; font-weight: 800; letter-spacing: 18px; text-indent: 18px;
  background: linear-gradient(180deg, #fffbe8 15%, #f0c060 60%, #9a6a1c); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 4px 8px #000); animation: endLogoIn 1.2s .3s both; }
.actin5-en { position: absolute; left: 0; right: 0; top: 340px; text-align: center; font-family: 'Cinzel', serif; font-style: italic; font-size: 16px; letter-spacing: 6px; color: #d8c8a0; animation: r4Fade .8s .8s both; }
.actin5-tag { position: absolute; left: 0; right: 0; top: 392px; text-align: center; font-size: 18px; letter-spacing: 4px; color: #f4ecd8; text-shadow: 0 2px 6px #000; animation: r4Fade .8s 1.1s both; }
.actin5-tag::before, .actin5-tag::after { content: ''; display: inline-block; width: 120px; height: 1px; margin: 0 18px; vertical-align: middle; background: linear-gradient(90deg, transparent, #e8c878); }
.actin5-tag::after { background: linear-gradient(90deg, #e8c878, transparent); }
.actin5-msg { position: absolute; left: 0; right: 0; top: 450px; text-align: center; font-size: 14px; color: #c8b890; animation: r4Fade .8s 1.3s both; }
.actin5 .confirm4 { top: 560px; animation: r4Fade .6s 1.6s both; }

/* ---- スマホ: 縦持ちのときは js/game.js の fit() でゲーム画面ごと90度回す(回転ロック中でも遊べるように) ---- */
.ttl5-fs { position: absolute; top: 18px; right: 20px; z-index: 5; padding: 8px 14px; font: 600 15px 'Zen Kaku Gothic New', sans-serif; color: #f3e6c8; background: rgba(10, 6, 16, .55); border: 1px solid rgba(243, 230, 200, .45); border-radius: 6px; cursor: pointer; }
.ttl5-fs:hover { background: rgba(40, 24, 50, .75); }
/* 読み込み待ち(js/loader.js のデータがそろうまで) */
#wait4 { position: absolute; inset: 0; z-index: 50; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: rgba(6, 4, 10, .78); color: #f3e6c8; font-family: 'Shippori Mincho B1', serif; pointer-events: all; }
#wait4 b { font-size: 34px; letter-spacing: .08em; }
#wait4 small { font: 500 16px 'Zen Kaku Gothic New', sans-serif; color: #b8a8c8; }
.ttl5-ios { cursor: default; font-size: 14px; }

/* 2026-09-27: 強化を2回選べる(2回目の表示) */
.pill4.more4 b { color: #ffd870; }
.head4 .step4 { font-style: normal; margin-left: 10px; padding: 0 8px; border: 1px solid rgba(255,216,112,0.6); border-radius: 10px; font-size: 14px; color: #ffd870; letter-spacing: 1px; }

/* 2026-09-27: チュートリアル(タイトルの「はじめての方はこちら」・マップの説明) */
.ttl5-tut { width: 360px; height: 50px; cursor: pointer; color: #fff; font-family: 'Shippori Mincho B1', serif; border: 1px solid rgba(255,216,112,0.75); border-radius: 6px;
  background: linear-gradient(180deg, rgba(90,60,20,0.85), rgba(40,24,8,0.9)); box-shadow: 0 0 14px rgba(255,180,60,0.35), inset 0 0 12px rgba(255,210,120,0.15); transition: transform .15s, filter .15s; }
.ttl5-tut b { display: block; font-size: 17px; font-weight: 800; letter-spacing: 3px; color: #ffe8a8; }
.ttl5-tut small { display: block; font-size: 10px; color: #e8d8b0; letter-spacing: 1px; margin-top: 1px; }
.ttl5-tut:hover { transform: scale(1.04); filter: brightness(1.2) drop-shadow(0 0 12px rgba(255,200,100,0.7)); }
.ttl5-tut.first { animation: tutGlow 1.6s ease-in-out infinite; }
@keyframes tutGlow { 50% { box-shadow: 0 0 26px rgba(255,190,70,0.8), inset 0 0 14px rgba(255,210,120,0.3); } }
.tut3 { text-align: left; max-width: 520px; font-size: 14px; line-height: 1.7; }
.tut3 p { margin: 6px 0; }
.tut3 b { color: #ffe08a; }
.tut3-ic { display: inline-block; width: 26px; height: 26px; margin-right: 6px; vertical-align: middle; background: center / contain no-repeat; }

/* 2026-09-27: ACTの始まりのボス登場カットイン+会話(game.js playIntro) */
.bi5 { position: absolute; inset: 0; z-index: 60; background: rgba(4,2,8,0.62); cursor: pointer; animation: bi5Fade .3s both; }
@keyframes bi5Fade { from { opacity: 0; } }
.bi5-band { position: absolute; left: -60px; right: -60px; top: 150px; height: 250px; transform: skewY(-5deg); overflow: hidden;
  background: linear-gradient(180deg, #0a0508, color-mix(in srgb, var(--c) 28%, #0a0508) 50%, #0a0508);
  border-top: 3px solid rgba(255,214,140,0.9); border-bottom: 3px solid rgba(255,214,140,0.9);
  box-shadow: 0 0 24px color-mix(in srgb, var(--c) 70%, transparent), inset 0 0 60px rgba(0,0,0,0.6); animation: bi5Band .35s cubic-bezier(.2,.9,.3,1.2) both; }
@keyframes bi5Band { from { transform: skewY(-5deg) scaleY(0); } }
.bi5-band::after { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .35;
  background: repeating-linear-gradient(90deg, transparent 0 140px, rgba(255,240,230,0.25) 140px 141px, transparent 141px 260px); animation: bi5Speed .5s linear infinite; }
@keyframes bi5Speed { to { background-position: -260px 0; } }
.bi5-pic { position: absolute; left: 150px; top: -19px; width: 520px; height: 575px; transform: skewY(5deg); background: center top / auto 100% no-repeat;   /* 戦闘のボスカットイン(drawBossCut)と同じ: 絵の高さ=帯×2.3、顔は絵の上1/3 */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 22%, #000 70%, transparent); mask-image: linear-gradient(90deg, transparent, #000 22%, #000 70%, transparent);
  animation: bi5Pic .5s .1s cubic-bezier(.2,.9,.3,1) both; }
.bi5-band.ally .bi5-pic { left: 190px; top: -20px; width: 480px; height: 290px; }
@keyframes bi5Pic { from { transform: skewY(5deg) translateX(-160px); opacity: 0; } }
.bi5-name { position: absolute; left: 700px; top: 60px; transform: skewY(5deg); color: #fff; animation: bi5Name .4s .25s both; }
@keyframes bi5Name { from { opacity: 0; transform: skewY(5deg) scale(1.5); } }
.bi5-name small { display: block; font-family: 'Cinzel', serif; font-style: italic; font-weight: 700; font-size: 16px; color: var(--c); text-shadow: 0 0 10px var(--c); }
.bi5-name b { display: block; font-family: 'Shippori Mincho B1', serif; font-weight: 800; font-size: 50px; line-height: 1.2; letter-spacing: 2px;
  background: linear-gradient(180deg, #fffaf0, #ffd9a0 60%, var(--c)); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 rgba(12,2,4,0.9)) drop-shadow(0 0 14px color-mix(in srgb, var(--c) 70%, transparent)); }
.bi5-name em { display: block; font-style: normal; font-size: 17px; font-weight: 700; color: #efe2cc; margin-top: 4px; }
.bi5-talk { position: absolute; left: 190px; right: 190px; top: 470px; min-height: 130px; padding: 16px 30px 34px; box-sizing: border-box; border-radius: 6px;
  background: linear-gradient(180deg, rgba(20,12,24,0.95), rgba(8,4,12,0.95)); border: 1px solid rgba(255,214,140,0.7);
  box-shadow: 0 0 18px color-mix(in srgb, var(--c) 45%, transparent); animation: bi5Talk .35s .3s both; }
@keyframes bi5Talk { from { opacity: 0; transform: translateY(20px); } }
.bi5-talk b { display: block; font-family: 'Shippori Mincho B1', serif; font-size: 18px; color: var(--c); margin-bottom: 6px; }
.bi5-talk p { margin: 0; font-size: 21px; line-height: 1.6; color: #f6ecd8; min-height: 34px; word-break: auto-phrase; }
.bi5-talk i { position: absolute; right: 20px; bottom: 10px; font-style: normal; font-size: 12px; color: #ffd870; animation: bi5Blink 1.2s infinite; }
@keyframes bi5Blink { 50% { opacity: .4; } }
/* 「AREA BOSS」のテロップ(魔人の登場カットインの直前) */
.bi5-telop { position: absolute; left: 0; right: 0; top: 200px; height: 300px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: linear-gradient(180deg, transparent, rgba(40,0,6,0.85) 22%, rgba(20,0,4,0.9) 78%, transparent); animation: bi5Tel .45s cubic-bezier(.2,.9,.3,1) both; }
.bi5-telop::before, .bi5-telop::after { content: ''; position: absolute; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, transparent, #ff4050 20%, #ffd8a0 50%, #ff4050 80%, transparent);
  box-shadow: 0 0 14px #ff2030; animation: bi5TelLine .6s both; }
.bi5-telop::before { top: 52px; } .bi5-telop::after { bottom: 52px; }
@keyframes bi5Tel { from { opacity: 0; transform: scaleY(0.2); } }
@keyframes bi5TelLine { from { transform: scaleX(0); } }
.bi5-telop-logo { display: block; width: 760px; height: 170px; background: center / contain no-repeat; animation: bi5TelLogo 1.6s .1s both; filter: drop-shadow(0 0 18px rgba(255,30,40,0.55)); }
@keyframes bi5TelLogo { 0% { opacity: 0; transform: scale(1.5); filter: brightness(3); } 18% { opacity: 1; transform: scale(1); filter: brightness(1.6) drop-shadow(0 0 18px rgba(255,30,40,0.55)); } 100% { transform: scale(1.04); } }
.bi5-telop-sub { margin-top: 6px; font-family: 'Shippori Mincho B1', serif; font-size: 22px; font-weight: 800; letter-spacing: 4px; color: #f4e6cc; text-shadow: 0 0 10px var(--c), 0 2px 0 #000; animation: bi5Name .4s .45s both; }
/* 押したボタンの下に「何を始めたか」の一言 */
.ttl5-say { position: absolute; z-index: 4; transform: translateX(-50%); white-space: nowrap; pointer-events: none; font-family: 'Shippori Mincho B1', serif; font-size: 18px; font-weight: 800;
  letter-spacing: 3px; color: #fff4d0; text-shadow: 0 0 12px #ffb040, 0 2px 0 #000; animation: ttlSay .35s .12s both; }
@keyframes ttlSay { from { opacity: 0; transform: translate(-50%, -8px); } }

/* 2026-09-27: パーティー編成の入れ替え(⇄ ボタン / 光る枠 / ドラッグ) */
.pf4-hint.on { color: #ffe08a; font-weight: 700; animation: bi5Blink 1.2s infinite; }
.pf4-swap { position: absolute; right: 10px; bottom: -13px; z-index: 3; padding: 3px 10px; cursor: pointer; font-size: 12px; font-weight: 700; color: #fff4d0; font-family: 'Zen Kaku Gothic New', sans-serif;
  background: linear-gradient(180deg, #7a5420, #3a2408); border: 1px solid #ffd070; border-radius: 12px; box-shadow: 0 0 10px rgba(255,190,80,0.6); }
.pf4-swap:hover { filter: brightness(1.3); }
.pf4-swap.in { position: static; margin-left: 8px; }
.pf4-b { position: relative; }
.pf4-slot.moving, .pf4-b.moving { outline: 2px dashed #ffd070; outline-offset: 2px; filter: brightness(1.2); }
.pf4-moving { position: absolute; right: 12px; top: -11px; z-index: 3; font-style: normal; font-size: 11.5px; font-weight: 700; color: #ffd070; background: rgba(10,6,14,0.9); padding: 1px 8px; border-radius: 10px; }
.pf4-slot.target { animation: pfTarget 1s ease-in-out infinite; }
@keyframes pfTarget { 50% { filter: brightness(1.35) drop-shadow(0 0 12px rgba(255,210,110,0.95)); } }
.pf4-here { position: absolute; left: 50%; top: -11px; transform: translateX(-50%); z-index: 3; white-space: nowrap; font-style: normal; font-size: 12px; font-weight: 800; color: #1a1006;
  background: linear-gradient(180deg, #ffe8a0, #ffc050); padding: 1px 10px; border-radius: 10px; box-shadow: 0 0 10px rgba(255,200,90,0.8); pointer-events: none; }
.pf4-slot.over { filter: brightness(1.5) drop-shadow(0 0 14px #ffd070); transform: scale(1.04); }
.pf4-slot.swapped { animation: pfSwapped .6s ease-out; }
@keyframes pfSwapped { 0% { filter: brightness(2.2) drop-shadow(0 0 18px #fff0b0); transform: scale(1.08); } 100% { filter: none; transform: none; } }
.pf4-slot[draggable="true"] { cursor: grab; }

/* 2026-09-27: 操作が止まっていたときの案内(game.js setIdle) */
.idle5 { position: absolute; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 55; pointer-events: none; white-space: nowrap;
  padding: 9px 22px; border-radius: 22px; font-size: 16px; font-weight: 700; color: #fff4d0; background: rgba(12,8,20,0.92);
  border: 1.5px solid #ffd870; box-shadow: 0 0 16px rgba(255,180,64,0.55); animation: idle5In .3s both, idle5Pulse 1.6s .3s ease-in-out infinite; }
.idle5 i { font-style: normal; color: #ffd870; margin-right: 8px; }
@keyframes idle5In { from { opacity: 0; transform: translate(-50%, 10px); } }
@keyframes idle5Pulse { 50% { box-shadow: 0 0 28px rgba(255,190,80,0.9); } }
.idle5.map { left: 346px; bottom: auto; top: 584px; font-size: 14px; padding: 6px 18px; }   /* マップ: 下の凡例の上に重ねる(マスや右のパネルに重ねない) */

/* 2026-09-28: クレジット */
.ttl5-cr { color: #e8d8b0; text-decoration: underline; cursor: pointer; pointer-events: auto; }
.ttl5-foot { pointer-events: auto; }
.cr3 { text-align: left; max-width: 600px; max-height: 420px; overflow-y: auto; font-size: 12.5px; line-height: 1.7; color: #e8dcc4; }
.cr3 h4 { margin: 10px 0 2px; font-size: 14px; color: #ffd870; font-family: 'Shippori Mincho B1', serif; }
.cr3 p { margin: 0; }

/* =====================================================================
   2026-09-28 リリース前の点検: 小さな見切れ・はみ出しの修正
   ===================================================================== */
/* 旅の商人: 英字「TRAVELLING MERCHANT」が飾り枠の外まで広がっていた */
.title4.shop small { letter-spacing: 2px; }
/* 強化・遺物カード: 下のひと言(英語)がカード下中央の飾りと重なっていた → 少し上へ */
.c4-quote { bottom: 40px; }
/* マップ「出現する敵」: 長い名前(継ぎ接ぎのフランツ など)が「…」で切れていた → 2行まで折り返す */
.en3 small { white-space: nowrap; overflow: visible; text-overflow: clip; width: 76px; margin-left: -6px; font-size: 10px; line-height: 1.15; }
/* マップ「主なドロップ」: 中ボス・小ボスの3つ目(強化×2)が枠の右からはみ出していた → 中身に合わせて幅を広げる */
.ni3-r { width: auto; min-width: 176px; }

/* =====================================================================
   2026-09-28 はみ出し対策(tools/dev/frame_audit.js で検出 → 拡大して目視で確認)
   はみ出し = 文字が飾り枠の内側(縁の飾りを除いた範囲)に収まっていない / 入りきらず「…」で切れている
   ===================================================================== */
/* 上部バー: 右の一言(英語)が幅不足で「…」になっていた → 飾りを小さくして幅を確保、英語は小さめに */
.tb3-tag { left: 458px; width: 372px; gap: 4px; }
.tb3-orn { width: 16px; }
.tb3-tag small { font-size: 9px; letter-spacing: 0; white-space: nowrap; overflow: visible; text-overflow: clip; }
/* マップ右上: 「ACT 1」が角の飾りに近い・説明文が下の枠線に乗っていた → 内側の余白を広げ、行間を詰める */
.rp3-head { padding: 20px 30px 14px; }
.rp3-title { font-size: 30px; }
.rp3-boss { margin-top: 8px; }
.rp3-desc { margin-top: 1px; }
/* 左上の現在地の札: 文字が札の上下の線ぎりぎりだった → 札を少し高く */
.loc4 { height: 60px; padding-top: 11px; }
/* 強化・遺物カード: 下のひと言の英語が、カード下の飾りに重なっていた → 英語はやめて日本語だけを金線の間に */
.c4-quote small { display: none; }
.c4-quote { bottom: 48px; }
/* 操作の案内: 報酬・鍛錬ではカードに重なっていた → カードと決定ボタンの間に小さく */
.idle5.low { bottom: 74px; font-size: 13px; padding: 4px 16px; }

/* 2026-09-28 スマホ: 全画面ボタン・手順の案内・縦持ちのときの「横向きにしてください」 */
.ttl5-fs.big { top: 14px; right: 14px; padding: 10px 18px; font-size: 16px; font-weight: 800; color: #fff4d0; border: 1.5px solid #ffd870; border-radius: 22px;
  background: rgba(40,24,8,0.88); box-shadow: 0 0 16px rgba(255,180,64,0.55); animation: tutGlow 1.8s ease-in-out infinite; cursor: pointer; }
.mg3 { text-align: left; max-width: 560px; margin: 4px 0 8px; padding: 0; list-style: none; font-size: 14.5px; line-height: 1.6; color: #efe6d2; }
.mg3 li { display: flex; gap: 10px; margin: 8px 0; }
.mg3 li b { flex: none; width: 24px; height: 24px; border-radius: 50%; background: #ffd870; color: #1a1006; text-align: center; line-height: 24px; font-size: 13px; }
.mg3 em { font-style: normal; color: #ffd870; font-weight: 700; }
.mg3-note { font-size: 11.5px; color: #a89c88; margin: 4px 0 10px; }
#rothint { display: none; }
@media (orientation: portrait) and (pointer: coarse) {
  #rothint { display: flex; position: fixed; left: 12px; right: 12px; top: calc(12px + env(safe-area-inset-top)); z-index: 1000; flex-direction: column; align-items: center; gap: 2px;
    padding: 12px 14px; border-radius: 14px; background: rgba(10,6,16,0.94); border: 1.5px solid #ffd870; box-shadow: 0 0 18px rgba(255,180,64,0.5); color: #fff4d0; text-align: center; font-family: 'Zen Kaku Gothic New', sans-serif; }
  #rothint i { font-style: normal; font-size: 30px; display: inline-block; animation: rotHint 1.6s ease-in-out infinite; }
  #rothint b { font-size: 17px; }
  #rothint small { font-size: 12px; color: #c8b890; }
  #rothint.off { display: none; }
}
@keyframes rotHint { 0%, 30% { transform: rotate(0); } 60%, 100% { transform: rotate(-90deg); } }

/* 2026-09-28 タイトルの「クリックしてはじめる」(ブラウザは1回クリックするまで音を出せないので、ここで主題歌を流し始める) */
.ttl5.wait .ttl5-menu, .ttl5.wait .ttl5-fs { visibility: hidden; animation: none; }
.ttl5.pressed .ttl5-menu { animation: r4Fade .6s .1s both; }
.ttl5-press { position: absolute; inset: 0; z-index: 6; background: none; border: 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding-bottom: 150px; gap: 10px; font-family: 'Cinzel', 'Shippori Mincho B1', serif; color: #f4e6c4; animation: r4Fade 1s 1.2s both; }
.ttl5-press span { font-size: 34px; letter-spacing: 8px; text-shadow: 0 0 18px rgba(255,190,110,0.8), 0 3px 6px #000; animation: ttlPress 1.6s ease-in-out infinite; }
.ttl5-press small { font-family: 'Shippori Mincho B1', serif; font-size: 17px; letter-spacing: 2px; color: #d9cdb2; text-shadow: 0 2px 4px #000, 0 0 10px #000; }
.ttl5-press.out { animation: ttlPressOut .5s forwards; pointer-events: none; }
@keyframes ttlPress { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@keyframes ttlPressOut { to { opacity: 0; transform: scale(1.08); filter: blur(4px); } }

/* 2026-09-28(2回目) はみ出し対策: 上の帯。帯の画像は高さ62pxのうち、線で囲まれた「見えている帯」は上から10〜52px。
   文字が上の線にくっついていたので、少し小さくして帯の上下のまん中にそろえる(tools/dev/frame_audit.js の __frameAudit2 で確認) */
.tb3-castle { top: 13px; }
.tb3-castle b { font-size: 21px; letter-spacing: 2px; line-height: 1.05; }
.tb3-act { top: 13px; }
.tb3-act b { font-size: 17px; line-height: 1.15; }
.tb3-tag { top: 12px; height: 36px; }
.tb3-tag b { font-size: 15px; line-height: 1.3; }
.tb3-sep { top: 16px; height: 30px; }
/* 旅の商人の見出し: 板の画像(400px幅)に対して文字が大きく、上にはみ出していた → 板を文字に合わせて大きくする(460px) */
.title4.shop { width: 460px; height: 134px; padding-top: 64px; background-size: 460px auto; }
.title4.shop b { font-size: 32px; letter-spacing: 8px; }
.title4.shop small { margin-top: 4px; }
.title4.shop::after { top: 60px; height: 60px; }
/* パーティー編成の「⇄ 入れ替え」: 枠の下の線にまたがって はみ出していた → 枠のすぐ下(次の段とのすき間)に出す */
.pf4-swap:not(.in) { top: calc(100% + 2px); bottom: auto; right: 14px; padding: 2px 10px; font-size: 11.5px; }
.pf4-slot.s3 .pf4-swap:not(.in) { top: auto; bottom: 100%; }   /* 一番下の段は、下に余白がないので上に出す */
/* 2026-09-28(5回目) AREA BOSS テロップ: 下の文字(ACT 1・〜を支配する魔人)が帯の下の赤い線に重なっていた
   → 帯を広げ(300→370px)、線をロゴ+文字の外側に。文字とロゴの間も少しあける */
.bi5-telop { top: 175px; height: 370px; }
.bi5-telop::before { top: 44px; } .bi5-telop::after { bottom: 44px; }
.bi5-telop-sub { margin-top: 16px; }
/* 2026-09-28(5回目) 上の帯: 字の見た目(インク)で測って、どのかたまりも帯の金の線との上下の余白が同じになる位置に(tools/dev/frame_audit.js __balanceAudit) */
.tb3-castle { top: 14px; }
.tb3-act { top: 14.5px; }
.tb3-tag { top: 13px; }
.tb3-res { top: 18px; }
/* 選択中の階のタブ: 内側の暗い板(::before 上下9px)に対して文字が上にくっついていた → 5px下げて上下の余白をそろえる */
.fl3.on b { top: 13px; }
.fl3.on small { top: 40px; }
/* 左上の場所の札(魔王城 1F・〜): 上の余白が狭かった */
.loc4 { padding-top: 13.5px; }
/* 商人の遺物の窓: 絵文字が少し下寄り */
.sh4-win.relic { padding-bottom: 5px; }
/* 遺物がまだ無いとき: 「まだ無い」の一文が枠の上に寄っていた → 見出しの下の空きの上下まん中に */
.b-relics .tiles:has(> .rp3-what) { position: absolute; left: 0; right: 0; top: 34px; bottom: 8px; display: flex; align-items: center; justify-content: center; }
.b-relics { position: relative; }
.b-relics .rp3-what { margin: 0; }

