/* Fantasia Online：画面の見た目。紺の地・金の縁・深紅の帯・羊皮紙の文字（竜城戦記と同じ作り）。見出しの書体は Zen Antique（SIL OFL。legion-war のものを相対パスで使う） */
@font-face { font-family: "ZenAntiqueFO"; src: url("../legion-war/assets/fonts/ZenAntique-subset.woff2") format("woff2"); font-display: swap; }
:root {
  --ink: #0a0f1f; --gold: #d9b45a; --gold2: #f4d98a; --gold3: #8a6a2a; --crim: #8e1d2c; --crim2: #5c1019; --ok: #7be0a0; --bad: #ff7a7a;
  --txt: #f3ecdc; --dim: #a9b4d0; --hp: #d8404a; --mp: #4a8cf0; --xp: #e0c050;
  --disp: "ZenAntiqueFO", "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif; --body: "Hiragino Sans", "Yu Gothic UI", "Meiryo", system-ui, sans-serif;
  --frame: linear-gradient(180deg, #1d2b50 0%, #121c39 55%, #0d1530 100%);
  --r0: #c9d0e0; --r1: #6fe08a; --r2: #5fa8ff; --r3: #c084ff; --r4: #ffa63d; --r5: #ff5a5a;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #05070d; color: var(--txt); font-family: var(--body); user-select: none; -webkit-user-select: none; touch-action: none; }
#c { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
#ui { position: fixed; inset: 0; pointer-events: none; }
#ui > * { pointer-events: auto; }
#errlog { position: fixed; left: 0; bottom: 0; right: 0; max-height: 30%; overflow: auto; margin: 0; padding: 6px 10px; background: rgba(120, 0, 0, .85); color: #fff; font-size: 12px; z-index: 99; white-space: pre-wrap; }
.ic { width: 1.15em; height: 1.15em; vertical-align: -0.2em; flex: none; }
.dim { color: var(--dim); } .gold { color: var(--gold2); }
::-webkit-scrollbar { width: 6px; height: 6px; } ::-webkit-scrollbar-thumb { background: rgba(217, 160, 53, .45); border-radius: 4px; } * { scrollbar-width: thin; scrollbar-color: rgba(217, 160, 53, .45) transparent; }

/* ---- 枠（金の縁・四隅の飾り） ---- */
.panel, .frame { position: relative; background: var(--frame); border: 2px solid var(--gold); border-radius: 14px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 235, 170, .25), 0 0 0 3px rgba(8, 12, 26, .9), 0 0 0 4px rgba(217, 180, 90, .45), 0 12px 36px rgba(0, 0, 0, .6); }
.panel.sm { border-radius: 10px; border-width: 1.5px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 235, 170, .2), 0 6px 18px rgba(0, 0, 0, .5); }
.frame::before, .frame::after { content: ""; position: absolute; width: 26px; height: 26px; pointer-events: none; background: no-repeat center/contain url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 26'><path d='M2 24V8Q2 2 8 2h16' fill='none' stroke='%23f4d98a' stroke-width='2.4'/><path d='M7 24V11Q7 7 11 7h13' fill='none' stroke='%23d9b45a' stroke-width='1.2' opacity='.7'/><circle cx='4' cy='4' r='2.4' fill='%23f4d98a'/></svg>"); }
.frame::before { top: 3px; left: 3px; } .frame::after { right: 3px; bottom: 3px; transform: rotate(180deg); }
/* ---- 見出しの帯 ---- */
.ribbon { position: relative; margin: 0 auto 12px; width: max-content; max-width: 100%; padding: 7px 46px 8px; font: 400 clamp(18px, 3vw, 26px)/1.2 var(--disp); letter-spacing: .14em; color: var(--gold2); text-align: center; text-shadow: 0 2px 0 rgba(0, 0, 0, .6);
  background: linear-gradient(180deg, #b02a3a 0%, var(--crim) 45%, var(--crim2) 100%); clip-path: polygon(0 0, 100% 0, 96% 50%, 100% 100%, 0 100%, 4% 50%); filter: drop-shadow(0 3px 0 rgba(0, 0, 0, .5)); }
.ribbon::before { content: ""; position: absolute; inset: 3px 12px; border-top: 1px solid rgba(244, 217, 138, .6); border-bottom: 1px solid rgba(244, 217, 138, .6); pointer-events: none; }
.sub { font: 400 15px var(--disp); letter-spacing: .12em; color: var(--gold2); margin: 10px 0 6px; padding-left: 12px; border-left: 4px solid var(--crim); }
/* ---- ボタン ---- */
button { font: inherit; color: var(--txt); cursor: pointer; }
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .5em; padding: 8px 18px; min-height: 40px; font: 400 16px var(--disp); letter-spacing: .1em; color: var(--gold2); text-shadow: 0 1px 0 #000;
  background: linear-gradient(180deg, #2a3b6c 0%, #17234a 50%, #101a38 100%); border: 1.5px solid var(--gold); border-radius: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 235, 170, .35), inset 0 -3px 0 rgba(0, 0, 0, .35), 0 3px 0 #05080f, 0 6px 14px rgba(0, 0, 0, .45); transition: transform .08s, filter .12s; }
.btn:hover:not(:disabled) { filter: brightness(1.2); } .btn:active:not(:disabled) { transform: translateY(3px); } .btn:disabled { filter: grayscale(.85) brightness(.65); cursor: default; }
.btn.primary { background: linear-gradient(180deg, #c8402f 0%, #9a2420 50%, #6a1218 100%); border-color: var(--gold2); color: #fff3d0; font-size: clamp(18px, 2.4vw, 24px); padding: 12px 44px; letter-spacing: .16em; box-shadow: inset 0 1px 0 rgba(255, 235, 170, .45), inset 0 -3px 0 rgba(0, 0, 0, .35), 0 3px 0 #05080f, 0 0 24px rgba(255, 120, 60, .45); animation: glow 2.4s ease-in-out infinite; }
.btn.good { background: linear-gradient(180deg, #2f8a5a 0%, #1e5e3c 55%, #123d27 100%); }
.btn.sm { min-height: 32px; padding: 4px 12px; font-size: 14px; }
@keyframes glow { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.18); } }
select { font: 400 16px var(--disp); letter-spacing: .08em; color: var(--gold2); background: linear-gradient(180deg, #16204a, #0b1230); border: 1.5px solid var(--gold3); border-radius: 8px; padding: 7px 10px; }
/* ---- ピル・バー ---- */
.pill { display: inline-flex; align-items: center; gap: 7px; padding: 3px 12px 3px 6px; border-radius: 999px; background: linear-gradient(180deg, #0a1020, #1a2548); border: 1.5px solid var(--gold3); font: 700 14px var(--body); color: var(--gold2); }
.pill .ic { width: 20px; height: 20px; }
.bar { position: relative; height: 13px; border-radius: 7px; background: #070b18; border: 1px solid #000; box-shadow: inset 0 1px 3px #000, 0 0 0 1px rgba(217, 180, 90, .35); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 6px; box-shadow: inset 0 2px 0 rgba(255, 255, 255, .35), inset 0 -2px 0 rgba(0, 0, 0, .25); transition: width .25s; }
.bar span { position: absolute; right: 6px; top: -1px; font: 700 10px/15px var(--body); color: #fff; text-shadow: 0 1px 2px #000; }
.bar.hp i { background: linear-gradient(180deg, #ff6a70, #c02a36 60%, #8a1a24); } .bar.mp i { background: linear-gradient(180deg, #7ab6ff, #3a78d8 60%, #2a56a8); } .bar.xp { height: 7px; } .bar.xp i { background: linear-gradient(180deg, #ffe58a, #d0a030); }
/* ---- HUD ---- */
#hud { position: fixed; left: 10px; top: 10px; width: 268px; padding: 10px 12px 9px 78px; display: none; }
#hud .badge { position: absolute; left: 8px; top: 8px; width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 35% 28%, #46598f, #141d3c 75%); border: 2px solid var(--gold2); box-shadow: 0 0 0 2px #000, 0 0 12px rgba(244, 217, 138, .4); color: var(--gold2); }
#hud .badge .ic { width: 32px; height: 32px; } #hud .badge b { position: absolute; bottom: -7px; left: 50%; transform: translateX(-50%); padding: 0 8px; border-radius: 999px; background: var(--crim); border: 1px solid var(--gold2); font: 700 11px var(--body); color: #fff; white-space: nowrap; }
#hud .nm { font: 400 17px var(--disp); letter-spacing: .08em; color: var(--gold2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 1px; } #hud .cl { font-size: 11px; color: var(--dim); margin-bottom: 4px; }
#hud .bar { margin-top: 4px; } #hud .row { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; font-size: 12px; color: var(--dim); } #hud .row b { color: var(--txt); }
#floorname { position: fixed; top: 6px; left: 50%; transform: translateX(-50%); display: none; margin: 0; padding: 6px 54px 7px; font-size: clamp(15px, 2.2vw, 20px); white-space: nowrap; }
#mini { position: fixed; right: 14px; top: 14px; width: 168px; height: 168px; border-radius: 50%; border: 3px solid var(--gold); background: rgba(8, 12, 26, .82); box-shadow: 0 0 0 3px #05080f, 0 0 0 5px rgba(217, 180, 90, .5), 0 8px 24px rgba(0, 0, 0, .6), inset 0 0 18px #000; display: none; }
#minin { position: fixed; right: 14px; top: 14px; width: 168px; height: 168px; border-radius: 50%; pointer-events: none !important; display: none; }
#minin::before { content: "北"; position: absolute; left: 50%; top: -2px; transform: translateX(-50%); font: 400 13px var(--disp); color: var(--gold2); text-shadow: 0 1px 2px #000; background: var(--crim); border-radius: 0 0 8px 8px; padding: 0 7px; border: 1px solid var(--gold2); border-top: 0; }
#bigmap { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(90vw, 760px); height: min(80vh, 570px); display: none; z-index: 12; background: rgba(8, 12, 26, .93); border: 2px solid var(--gold); border-radius: 14px; box-shadow: 0 0 0 3px #05080f, 0 0 0 4px rgba(217, 180, 90, .45), 0 12px 36px #000; }
#musicBtn { position: fixed; right: 14px; top: 192px; display: none; padding: 3px 12px; font: 400 13px var(--disp); letter-spacing: .1em; color: var(--gold2); background: linear-gradient(180deg, #16204a, #0b1230); border: 1.5px solid var(--gold3); border-radius: 999px; z-index: 6; }
#musicBtn.off { opacity: .6; } #title #musicBtn { position: static; }
.ingame #musicBtn, .ingame #minin, .ingame #mini, .ingame #hud, .ingame #floorname { display: block; }
#log { position: fixed; left: 10px; bottom: 84px; width: min(380px, 60vw); max-height: 30vh; overflow: hidden; font-size: 13px; text-shadow: 0 1px 2px #000; pointer-events: none !important; display: flex; flex-direction: column; justify-content: flex-end; }
#log div { padding: 2px 8px; margin-top: 2px; border-left: 3px solid var(--gold); background: linear-gradient(90deg, rgba(10, 15, 31, .75), rgba(10, 15, 31, 0)); border-radius: 2px; animation: fadeout 14s forwards; }
@keyframes fadeout { 0%, 80% { opacity: 1; } 100% { opacity: 0; } }
#bar { position: fixed; left: 50%; bottom: 12px; transform: translateX(-50%); display: none; gap: 8px; padding: 8px 12px; background: linear-gradient(180deg, rgba(26, 38, 72, .92), rgba(10, 15, 31, .94)); border: 2px solid var(--gold); border-radius: 14px; box-shadow: inset 0 1px 0 rgba(255, 235, 170, .25), 0 0 0 3px rgba(8, 12, 26, .9), 0 8px 24px rgba(0, 0, 0, .6); }
.ingame #bar { display: flex; }
#bar button { position: relative; width: 64px; height: 64px; padding: 0; border-radius: 10px; border: 1.5px solid var(--gold3); background: radial-gradient(circle at 50% 35%, #2c3d72, #0e1631 78%); color: var(--gold2); overflow: hidden; display: grid; place-items: center; transition: transform .08s, filter .1s; }
#bar button:hover { filter: brightness(1.25); } #bar button:active { transform: translateY(2px); }
#bar button .ic { width: 28px; height: 28px; } #bar button .tx { position: absolute; bottom: 3px; left: 0; right: 0; text-align: center; font: 400 11px var(--disp); letter-spacing: .04em; color: #fff; text-shadow: 0 1px 2px #000; }
#bar button .k { position: absolute; left: 4px; top: 2px; font: 700 10px var(--body); color: var(--gold2); } #bar button .cd { position: absolute; left: 0; bottom: 0; width: 100%; background: rgba(0, 0, 0, .65); }
#bar button.dis, #tbtn button.dis { opacity: .35; filter: grayscale(1); }
#hint { position: fixed; left: 50%; bottom: 100px; transform: translateX(-50%); padding: 6px 20px; font: 400 15px var(--disp); letter-spacing: .08em; color: var(--gold2); display: none; text-align: center; }
#cross { position: fixed; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px; border-radius: 50%; background: rgba(255, 255, 255, .6); pointer-events: none !important; display: none; }
#vig { position: fixed; inset: 0; pointer-events: none !important; z-index: 3; background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, .55) 100%); }
#vig.hurt { animation: hurt .5s; } @keyframes hurt { 0% { box-shadow: inset 0 0 120px 30px rgba(220, 20, 30, .75); } 100% { box-shadow: inset 0 0 120px 30px rgba(220, 20, 30, 0); } }
#vig.low { box-shadow: inset 0 0 90px 10px rgba(200, 20, 30, .45); animation: lowhp 1.2s infinite; } @keyframes lowhp { 50% { box-shadow: inset 0 0 130px 20px rgba(200, 20, 30, .65); } }
/* ボスの帯と登場 */
#boss { position: fixed; top: 52px; left: 50%; transform: translateX(-50%); width: min(560px, 80vw); display: none; text-align: center; pointer-events: none !important; }
#boss b { font: 400 20px var(--disp); letter-spacing: .2em; color: #ffd0b8; text-shadow: 0 2px 0 #000, 0 0 12px rgba(255, 60, 30, .8); } #boss .bar { height: 14px; margin-top: 3px; border-color: var(--gold); } #boss .bar i { background: linear-gradient(180deg, #ff9a5a, #c8401f 60%, #7a1a10); }
#intro { position: fixed; left: 0; right: 0; top: 34%; text-align: center; pointer-events: none !important; display: none; z-index: 8; }
#intro .band { padding: 14px 0 16px; background: linear-gradient(90deg, rgba(0, 0, 0, 0), rgba(60, 5, 10, .85) 20%, rgba(60, 5, 10, .85) 80%, rgba(0, 0, 0, 0)); }
#intro h2 { margin: 0; font: 400 clamp(32px, 6vw, 64px) var(--disp); letter-spacing: .2em; color: transparent; background: linear-gradient(180deg, #fff7d8 0%, #f4d98a 45%, #c8402f 100%); -webkit-background-clip: text; background-clip: text; filter: drop-shadow(0 4px 12px rgba(0, 0, 0, .9)); } #intro p { margin: 4px 0 0; font: 400 16px var(--disp); letter-spacing: .5em; color: var(--gold2); }
#intro.show { display: block; animation: introIn 3.2s forwards; } @keyframes introIn { 0% { opacity: 0; transform: scale(1.25); } 12% { opacity: 1; transform: scale(1); } 80% { opacity: 1; } 100% { opacity: 0; } }
/* ---- 窓 ---- */
.win { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(94vw, 760px); max-height: 88vh; overflow: auto; padding: 20px 20px 16px; display: none; z-index: 15; }
.win h3 { margin: 0 0 12px; display: flex; justify-content: center; position: relative; }
.win h3 .x { position: absolute; right: 0; top: 0; width: 34px; height: 34px; padding: 0; border-radius: 50%; display: grid; place-items: center; font-size: 16px; } .win h3 .x .ic { width: 16px; height: 16px; }
.cols { display: flex; gap: 14px; flex-wrap: wrap; } .cols > div { flex: 1 1 280px; min-width: 0; }
.list { max-height: 44vh; overflow: auto; border: 1.5px solid var(--gold3); border-radius: 10px; background: rgba(5, 8, 20, .55); }
.item { position: relative; display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-bottom: 1px solid rgba(217, 180, 90, .15); border-left: 4px solid var(--rc, #4a5470); background: linear-gradient(90deg, color-mix(in srgb, var(--rc, #4a5470) 14%, transparent), transparent 55%); font-size: 13px; }
.item:last-child { border-bottom: 0; } .item.no { opacity: .5; }
.item .ico { flex: none; width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; color: var(--rc, #c9d0e0); background: radial-gradient(circle at 50% 30%, #2a3a6a, #0c1330 80%); border: 1.5px solid var(--rc, #4a5470); box-shadow: 0 0 10px color-mix(in srgb, var(--rc, #000) 35%, transparent); } .item .ico svg { width: 24px; height: 24px; }
.item .nm { font: 400 15px var(--disp); letter-spacing: .05em; color: var(--rc, var(--txt)); } .item .st { color: var(--dim); font-size: 11.5px; } .item .rar { font: 700 10px var(--body); padding: 0 6px; border-radius: 999px; border: 1px solid var(--rc); color: var(--rc); margin-left: 6px; vertical-align: 2px; }
.item > span:nth-child(2) { flex: 1; min-width: 0; }
.tabs { display: flex; gap: 8px; margin-bottom: 8px; } .tabs button { flex: 1; padding: 6px; font: 400 16px var(--disp); letter-spacing: .14em; border-radius: 8px; border: 1.5px solid var(--gold3); background: linear-gradient(180deg, #16204a, #0b1230); color: var(--dim); } .tabs button.on { color: #2a1a00; background: linear-gradient(180deg, #f4d98a, #c79a3e); border-color: #fff0b8; }
.shophead { position: relative; height: 130px; margin: -4px -4px 10px; border-radius: 10px; overflow: hidden; border: 1.5px solid var(--gold); background: #000 center/cover; } .shophead::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(5, 8, 20, .85), rgba(5, 8, 20, .1) 60%, rgba(5, 8, 20, .5)); }
.shophead .who { position: absolute; left: 12px; top: 12px; bottom: 12px; z-index: 2; display: flex; align-items: center; gap: 12px; } .shophead .face { width: 84px; height: 84px; border-radius: 50%; border: 3px solid var(--gold2); object-fit: cover; box-shadow: 0 0 0 2px #000, 0 0 18px rgba(244, 217, 138, .5); }
.shophead .say { max-width: 300px; padding: 8px 12px; font: 400 14px/1.5 var(--disp); letter-spacing: .04em; color: #fff3d0; background: rgba(10, 15, 31, .8); border: 1px solid var(--gold); border-radius: 10px 10px 10px 2px; } .shophead .gold { position: absolute; right: 12px; bottom: 10px; z-index: 2; }
.phr { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; } .phr button { padding: 8px 6px; font: 400 14px var(--disp); letter-spacing: .04em; border-radius: 8px; border: 1.5px solid var(--gold3); background: linear-gradient(180deg, #1e2d58, #0f1838); color: var(--txt); } .phr button:hover { filter: brightness(1.3); border-color: var(--gold2); }
.paper { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; } .slot { position: relative; padding: 6px 4px 5px; text-align: center; border-radius: 10px; border: 1.5px solid var(--rc, var(--gold3)); background: radial-gradient(circle at 50% 25%, #26376a, #0b1230 85%); min-height: 78px; } .slot .sl { font: 400 11px var(--disp); color: var(--dim); letter-spacing: .1em; } .slot .nm { font: 400 12px/1.2 var(--disp); color: var(--rc, var(--dim)); margin-top: 2px; } .slot .ico { display: grid; place-items: center; color: var(--rc, #5a6590); } .slot .ico svg { width: 26px; height: 26px; } .slot button { position: absolute; right: 2px; top: 2px; padding: 0 6px; font-size: 10px; border-radius: 6px; border: 1px solid var(--gold3); background: #1a2548; }
.credits { font-size: 12px; line-height: 1.7; max-height: 50vh; overflow: auto; color: var(--dim); } .credits a { color: #8fc8ff; }
/* ---- 題名・作成・読み込み ---- */
#title { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 14px; z-index: 20; text-align: center; padding: 14px; overflow: auto; background: radial-gradient(ellipse at 50% 40%, rgba(6, 10, 24, .15), rgba(2, 4, 12, .78)); }
#title.solid { background: radial-gradient(ellipse at 50% 40%, rgba(14, 20, 44, .9), #03050c); }
.logo { display: flex; flex-direction: column; align-items: center; gap: 2px; filter: drop-shadow(0 6px 20px rgba(0, 0, 0, .75)); }
.logo .emblem { width: clamp(64px, 10vw, 108px); color: var(--gold2); filter: drop-shadow(0 0 16px rgba(255, 190, 90, .6)); }
.logo h1 { margin: 0; font: 400 clamp(40px, 8vw, 92px)/1.05 var(--disp); letter-spacing: .1em; color: transparent; background: linear-gradient(180deg, #fff7d8 0%, #f4d98a 40%, #c8872a 100%); -webkit-background-clip: text; background-clip: text; }
.logo p { margin: 0; font: 400 clamp(12px, 2vw, 18px) var(--disp); letter-spacing: .5em; color: var(--gold2); text-indent: .5em; }
.logo .rule { width: min(420px, 70vw); height: 12px; margin: 4px 0; background: no-repeat center/contain url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 420 12'><path d='M0 6h170M250 6h170' stroke='%23d9b45a' stroke-width='1.5'/><path d='M178 6l8-5 8 5-8 5zM226 6l8-5 8 5-8 5z' fill='%23f4d98a'/><circle cx='210' cy='6' r='4' fill='%238e1d2c' stroke='%23f4d98a' stroke-width='1.5'/></svg>"); }
.note { margin: 0; max-width: 560px; padding: 8px 18px; font-size: 13px; line-height: 1.7; letter-spacing: .04em; color: var(--txt); background: rgba(6, 10, 26, .72); border: 1px solid rgba(217, 180, 90, .4); border-radius: 10px; }
.links { font-size: 12px; color: var(--dim); } .links a { color: var(--gold2); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.createbox { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; align-items: stretch; width: min(860px, 96vw); padding: 16px; }
.createbox .pv { flex: 0 0 300px; display: flex; flex-direction: column; align-items: center; gap: 6px; } .createbox canvas { width: 280px; height: 340px; border-radius: 12px; border: 1.5px solid var(--gold3); background: radial-gradient(ellipse at 50% 70%, #2a3b6c 0%, #0c1330 70%); }
.createbox .ctl { flex: 1 1 360px; display: flex; flex-direction: column; gap: 10px; text-align: left; }
.clsrow { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; } .cls { padding: 8px 10px; cursor: pointer; border: 1.5px solid var(--gold3); border-radius: 10px; background: linear-gradient(180deg, #1c2a4d, #0e1631); display: flex; gap: 10px; align-items: center; } .cls .ic { width: 34px; height: 34px; color: var(--gold2); } .cls b { display: block; font: 400 17px var(--disp); letter-spacing: .1em; color: var(--gold2); } .cls small { color: var(--dim); font-size: 11.5px; } .cls.sel { border-color: #fff0b8; background: linear-gradient(180deg, #3a4f8c, #1c2a55); box-shadow: 0 0 18px rgba(244, 217, 138, .45); }
.stats { display: grid; grid-template-columns: 54px 1fr; gap: 4px 8px; align-items: center; font-size: 12px; color: var(--dim); } .stats .bar { height: 9px; } .stats .bar i { background: linear-gradient(180deg, #ffe58a, #c79a3e); }
.namebox { text-align: center; font: 400 24px var(--disp); letter-spacing: .14em; color: var(--gold2); text-shadow: 0 2px 0 #000; padding: 6px; border-top: 1px solid var(--gold3); border-bottom: 1px solid var(--gold3); }
.loadbar { width: min(460px, 72vw); height: 14px; border-radius: 8px; background: #070b18; border: 1.5px solid var(--gold); box-shadow: 0 0 0 3px rgba(8, 12, 26, .9), inset 0 1px 3px #000; overflow: hidden; } .loadbar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #8a6a2a, #f4d98a, #ffffff); box-shadow: 0 0 14px rgba(244, 217, 138, .8); transition: width .15s; }
.loadtxt { font: 400 15px var(--disp); letter-spacing: .2em; color: var(--gold2); min-height: 22px; margin: 0; } .tips { max-width: 520px; font-size: 13px; color: var(--dim); line-height: 1.7; min-height: 44px; }
/* ---- 飾り・タッチ ---- */
.fl { position: fixed; pointer-events: none !important; font-weight: bold; text-shadow: 0 0 3px #000, 0 0 3px #000; z-index: 5; white-space: nowrap; }
#touch { display: none; } .touch #touch { display: block; }
#stick { position: fixed; left: 24px; bottom: 90px; width: 120px; height: 120px; border-radius: 50%; background: rgba(255, 255, 255, .1); border: 2px solid rgba(244, 217, 138, .45); z-index: 8; } #knob { position: absolute; left: 40px; top: 40px; width: 40px; height: 40px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff4c8, #c79a3e 70%); }
#tbtn { position: fixed; right: 12px; bottom: 80px; display: grid; grid-template-columns: repeat(2, 58px); gap: 8px; z-index: 8; } #tbtn button { width: 58px; height: 58px; border-radius: 50%; padding: 0; font: 400 12px var(--disp); background: radial-gradient(circle at 50% 30%, #3a4f8c, #141d3c 80%); border: 2px solid var(--gold); color: var(--gold2); }
.touch #bar, .touch.ingame #bar, .touch .ingame #bar { display: none !important; } .touch #hud { width: 200px; font-size: 11px; } .touch #log { bottom: 230px; }
.dis { opacity: .35; filter: grayscale(1); }
@media (max-width: 720px) {
  #bar { left: 6px; right: 6px; transform: none; flex-wrap: wrap; justify-content: center; gap: 4px; bottom: 6px; padding: 5px; } #bar button { flex: 1 1 21%; width: auto; min-width: 0; height: 40px; } #bar button .k, #bar button .tx { display: none; } #bar button .ic { width: 22px; height: 22px; }
  #hud, .touch #hud { width: 190px; padding: 6px 8px 6px 62px; } #hud .badge { width: 48px; height: 48px; left: 6px; top: 6px; } #hud .badge .ic { width: 26px; height: 26px; } #hud .nm { font-size: 14px; } #hud .row { font-size: 10.5px; }
  #mini, #minin, .touch #mini, .touch #minin { width: 100px; height: 100px; right: 8px; top: 8px; } #musicBtn { top: 114px; right: 8px; font-size: 11px; padding: 2px 8px; }
  #floorname { top: 112px; left: 8px; transform: none; font-size: 11px; max-width: 190px; white-space: normal; padding: 3px 24px 4px; }
  #log { bottom: 100px; width: 60vw; font-size: 12px; } #hint { bottom: 106px; max-width: 94vw; font-size: 12px; } .createbox .pv { flex: 1 1 100%; } .createbox canvas { width: 220px; height: 260px; }
}

/* 体力の欄：所持金が多くても折り返さない・小さい画面では階の名前の帯を欄の下へ */
#hud, .touch #hud { width: auto; min-width: 268px; max-width: calc(100vw - 150px); } #hud .row { white-space: nowrap; gap: 6px; } #hud .row > span { white-space: nowrap; } #hud .row .pill { flex: 0 0 auto; }
@media (max-width: 720px) { #hud, .touch #hud { min-width: 190px; } #floorname { top: 134px; max-width: 200px; } }

/* 幅の狭い画面：記録の文字をタッチのボタンにかけない */
@media (max-width: 480px) { #log, .touch #log { width: calc(100vw - 172px); max-width: none; font-size: 11px; } #log div { padding: 1px 6px; } }

/* 倒れたときの画面（BladeAction のゲームオーバーと同じ流れ） */
#over { position: fixed; inset: 0; z-index: 30; display: none; flex-direction: column; align-items: center; justify-content: center; text-align: center; background: radial-gradient(ellipse at center, rgba(20, 0, 0, .55), rgba(0, 0, 0, .94)); animation: fadein 1.4s; }
#over.on { display: flex; pointer-events: auto; }
#over h1 { font: 700 clamp(40px, 9vw, 74px)/1.2 var(--disp); letter-spacing: .3em; margin: 0 0 8px; color: #a02018; text-shadow: 0 0 28px #e0301899, 0 3px 0 #000; }
#over p { font-size: 17px; letter-spacing: .12em; color: #c8bca0; margin: 0 0 26px; line-height: 1.8; white-space: pre-line; }
#over .btn { width: 260px; }

#w-menu .list { display: block; } #w-menu .list .btn { display: block; width: 100%; margin: 6px 0; text-align: left; }

/* 幅の狭い画面：操作ボタンを小さく 3 列にして、所持金・音ボタン・地図に重ならないようにする */
@media (max-width: 480px) { #tbtn { grid-template-columns: repeat(3, 44px); gap: 5px; right: 8px; bottom: 70px; } #tbtn button { width: 44px; height: 44px; font-size: 10px; } #stick { width: 100px; height: 100px; left: 12px; bottom: 80px; } }
@media (max-height: 600px) { #tbtn { grid-template-columns: repeat(4, 42px); } #tbtn button { width: 42px; height: 42px; font-size: 10px; } }
