/* =====================================================================
   ダンジョンの地図（第8弾：地図はダンジョンだけ）：地図のキャンバスと、その上の部品。上のバーのメニュー（ui/menu.js）の窓も、ここ
   上のバー（名前・HP・MP・お金・手帳・メニュー）はダンジョンでも出したまま。地図はその下いっぱい
   左上：階のチップ。右上：話す・エモート・道具。スマホは左下の十字ボタンと右下の A・B
   app.css と同じ色（苔むした石・真鍮）。地図の上の札は、暗い半透明の石の板に真鍮のふち。知らせの札だけは明るい紙
   動きは prefers-reduced-motion で止まる（app.css の最後の決まり）
   文字の大きさは変数（--wf-xs・--wf-s・--wf-m）。app.css の --fs-min（いちばん小さい文字。14px・大きいは 16px）と --fs-k から
   ===================================================================== */
.world, .modal.w-menu-modal, .modal.w-items-modal, .modal.w-journal-modal {
  --wf-xs: var(--fs-min, 14px); --wf-s: max(var(--fs-min, 14px), calc(14px * var(--fs-k, 1))); --wf-m: max(var(--fs-min, 14px), calc(15px * var(--fs-k, 1)));
}
body.world-on { overflow: hidden; overscroll-behavior: none; }
body.world-on .shell { max-width: none; }
body.world-on .credit { display: none; }
.world [hidden] { display: none !important; }
.app-main.is-world { padding: 0; position: relative; }

.world {
  position: relative; height: 100vh; height: 100dvh; min-height: 240px;
  overflow: hidden; background: #05060b; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.w-canvas { position: absolute; left: 0; top: 0; display: block; image-rendering: pixelated; image-rendering: crisp-edges; outline: none; touch-action: none; }
.w-canvas:focus-visible { box-shadow: inset 0 0 0 3px var(--brass); }

.w-x { flex: none; display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 11px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .05); color: var(--text); font-size: var(--fs-min, 14px); line-height: 1; }

/* ---------------------------------------------------------------------
   左上：階のチップ。右上：話す・エモート・道具
   --------------------------------------------------------------------- */
.w-dg {
  position: absolute; z-index: 3; left: calc(10px + env(safe-area-inset-left, 0px)); top: 10px;
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; max-width: calc(100% - 190px); padding: 0 14px 0 10px; border-radius: 14px;
  border: 1.5px solid rgba(214, 200, 160, .8); background: rgba(16, 13, 10, .9); color: #f4ecd8; font-weight: 700; font-size: var(--wf-s); line-height: 1.2;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .4); -webkit-tap-highlight-color: transparent;
}
.w-dg:active { transform: translateY(1px); }
.w-dg-ic { font-size: 18px; line-height: 1; }
.w-dg-t { font-family: var(--font-dot); font-weight: 400; font-size: calc(17px * var(--fs-k, 1)); color: #ffe6a8; white-space: nowrap; }
.w-dg-n { font-size: var(--wf-xs); color: #ece2c8; white-space: nowrap; }
.w-tools { position: absolute; z-index: 3; top: 10px; right: calc(10px + env(safe-area-inset-right, 0px)); display: flex; gap: 6px; }
.w-tool {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 44px; min-height: 44px; padding: 0 8px; border-radius: 14px;
  border: 1.5px solid rgba(227, 179, 65, .6); background: rgba(8, 16, 12, .84); color: var(--text); font-weight: 700; font-size: var(--wf-s);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .35); -webkit-tap-highlight-color: transparent;
}
.w-tool span { font-size: 20px; line-height: 1; }
.w-tool:active { transform: translateY(1px); background: rgba(30, 48, 40, .9); }
@media (max-width: 599px) { .w-tool small { display: none; } .w-tool { padding: 0; } .w-dg { max-width: calc(100% - 180px); } }

/* ---------------------------------------------------------------------
   階の札（1.6秒）・中の戦いに勝った札（2.5秒）
   --------------------------------------------------------------------- */
.w-floor {
  position: absolute; z-index: 5; left: 50%; top: 27%; transform: translateX(-50%);
  display: grid; justify-items: center; gap: 2px; min-width: min(260px, calc(100% - 40px)); max-width: calc(100% - 32px); padding: 12px 26px 14px; border-radius: 16px;
  background: radial-gradient(ellipse at 50% 0%, rgba(82, 68, 42, .97), rgba(12, 10, 8, .97)); border: 2px solid rgba(227, 179, 65, .78);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, .6), 0 14px 36px rgba(0, 0, 0, .6); text-align: center; pointer-events: none;
}
.w-floor b { font-family: var(--font-dot); font-weight: 400; font-size: calc(30px * var(--fs-k, 1)); line-height: 1.2; color: #ffe6a8; letter-spacing: .06em; text-shadow: 0 2px 0 rgba(0, 0, 0, .6), 0 0 18px rgba(255, 200, 100, .4); }
.w-floor small { font-size: var(--wf-xs); color: #efe4ca; }
.w-floor .w-floor-name { font-weight: 700; color: #fbf2da; }
.w-floor.boss { border-color: rgba(255, 120, 100, .85); }
.w-floor.boss b { color: #ffc8b4; }
.w-floor.show { animation: wFloor 1.7s ease both; }
@keyframes wFloor { 0% { opacity: 0; transform: translate(-50%, 8px) scale(.94); } 14% { opacity: 1; transform: translate(-50%, 0) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; } }

.w-result {
  position: absolute; z-index: 5; left: 50%; top: 30%; transform: translateX(-50%);
  display: grid; justify-items: center; gap: 2px; min-width: min(240px, calc(100% - 32px)); max-width: calc(100% - 32px); padding: 10px 20px 12px;
  border-radius: 14px; background: linear-gradient(180deg, rgba(34, 28, 10, .94), rgba(12, 18, 14, .94)); border: 2px solid var(--brass);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, .5), 0 12px 30px rgba(0, 0, 0, .5); text-align: center; pointer-events: none;
}
.w-result.show { animation: wResult 2.5s ease both; }
.wr-head { font-family: var(--font-dot); font-weight: 400; font-size: 24px; line-height: 1.2; color: var(--brass-hi); text-shadow: 0 2px 0 rgba(0, 0, 0, .55), 0 0 16px rgba(241, 204, 108, .45); }
.wr-gain { font-size: var(--wf-m); font-weight: 700; color: var(--text); }
.wr-lv { margin-top: 2px; padding: 1px 10px; border-radius: 999px; background: rgba(92, 200, 168, .2); border: 1px solid rgba(92, 200, 168, .7); color: #b8ffe6; font-size: var(--wf-s); font-weight: 700; }
@keyframes wResult { 0% { opacity: 0; transform: translate(-50%, 10px) scale(.92); } 10% { opacity: 1; transform: translate(-50%, 0) scale(1.04); } 16% { transform: translate(-50%, 0) scale(1); } 86% { opacity: 1; } 100% { opacity: 0; } }

/* ---------------------------------------------------------------------
   スマホ：左下の十字ボタン、右下の A（調べる）と B（押しているあいだ走る）
   --------------------------------------------------------------------- */
.w-ctl { display: none; }
.world.touch .w-ctl { display: block; }
.w-pad {
  position: absolute; z-index: 4; left: calc(14px + env(safe-area-inset-left, 0px)); bottom: calc(20px + var(--safe-b)); width: 138px; height: 138px; border-radius: 50%; touch-action: none;
  background: radial-gradient(circle, rgba(8, 16, 12, .25) 0 24%, rgba(8, 16, 12, .5) 25% 68%, rgba(8, 16, 12, .2) 69%); border: 1.5px solid rgba(226, 238, 228, .22);
}
.w-pad i { position: absolute; width: 46px; height: 46px; border-radius: 12px; background: rgba(226, 238, 228, .14); border: 1px solid rgba(226, 238, 228, .25); }
.w-pad i::after { content: ''; position: absolute; left: 50%; top: 50%; border: 9px solid transparent; transform: translate(-50%, -50%); }
.w-pad .u { left: 46px; top: 4px; } .w-pad .u::after { border-bottom-color: rgba(239, 232, 214, .9); margin-top: -5px; }
.w-pad .d { left: 46px; bottom: 4px; } .w-pad .d::after { border-top-color: rgba(239, 232, 214, .9); margin-top: 5px; }
.w-pad .l { left: 4px; top: 46px; } .w-pad .l::after { border-right-color: rgba(239, 232, 214, .9); margin-left: -5px; }
.w-pad .r { right: 4px; top: 46px; } .w-pad .r::after { border-left-color: rgba(239, 232, 214, .9); margin-left: 5px; }
.w-pad b { position: absolute; left: 57px; top: 57px; width: 24px; height: 24px; border-radius: 50%; background: rgba(226, 238, 228, .12); }
.w-pad[data-dir="u"] .u, .w-pad[data-dir="d"] .d, .w-pad[data-dir="l"] .l, .w-pad[data-dir="r"] .r { background: rgba(227, 179, 65, .55); border-color: var(--brass); }

.w-a, .w-b {
  position: absolute; z-index: 4; display: grid; place-items: center; align-content: center; gap: 0; padding: 0; border-radius: 50%;
  border: 2px solid rgba(226, 238, 228, .42); background: rgba(8, 16, 12, .68); color: var(--muted); font-weight: 700; line-height: 1.15;
  touch-action: none; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none;
}
.w-a b, .w-b b { font-family: var(--font-dot); font-weight: 400; font-size: 22px; line-height: 1; color: rgba(239, 232, 214, .95); }
.w-a span, .w-b span { font-size: var(--wf-xs); white-space: nowrap; color: rgba(239, 232, 214, .95); text-shadow: 0 1px 2px rgba(0, 0, 0, .7); }
.w-a { right: calc(16px + env(safe-area-inset-right, 0px)); bottom: calc(70px + var(--safe-b)); width: 80px; height: 80px; touch-action: manipulation; }
.w-b { right: calc(104px + env(safe-area-inset-right, 0px)); bottom: calc(22px + var(--safe-b)); width: 66px; height: 66px; }
html.big-text .w-a { width: 88px; height: 88px; }
html.big-text .w-b { width: 72px; height: 72px; right: calc(112px + env(safe-area-inset-right, 0px)); }
.w-a.on { border-color: var(--brass); background: radial-gradient(circle at 50% 40%, rgba(241, 204, 108, .45), rgba(156, 115, 27, .5)); color: #fff6dc; box-shadow: 0 0 0 4px rgba(227, 179, 65, .18), 0 6px 18px rgba(0, 0, 0, .4); text-shadow: 0 1px 2px rgba(0, 0, 0, .6); }
.w-a.on b { color: #fff6dc; }
.w-a:active { transform: scale(.96); }
.w-b.on { border-color: #7fd8f0; background: radial-gradient(circle at 50% 40%, rgba(127, 216, 240, .4), rgba(30, 80, 100, .55)); color: #e6fbff; transform: scale(.96); }
.w-b.on b { color: #e6fbff; }
.w-help { position: absolute; z-index: 3; left: 50%; bottom: calc(14px + var(--safe-b)); transform: translateX(-50%); margin: 0; padding: 4px 12px; border-radius: 8px; background: rgba(8, 16, 12, .8); font-size: var(--wf-xs); color: rgba(239, 232, 214, .95); white-space: nowrap; pointer-events: none; }
.world.touch .w-help, .w-help.done { display: none; }
@media (max-width: 899px) { .w-help { display: none; } }

/* ---------------------------------------------------------------------
   知らせの札（階に入った・ワナ）・たしかめる札（おりる？・もどる？）・階の説明
   --------------------------------------------------------------------- */
.w-card {
  position: absolute; z-index: 5; left: 50%; bottom: calc(20px + var(--safe-b)); transform: translateX(-50%); width: min(460px, calc(100% - 20px));
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 12px 10px 12px 14px;
  border-radius: 12px; background: linear-gradient(180deg, #f6ebcf, #ead8b0); color: #2c1e0e; border: 3px solid #7a5432; box-shadow: 0 0 0 2px #2b1a10, 0 10px 26px rgba(0, 0, 0, .45);
  font-size: var(--wf-m); line-height: 1.65; animation: wCardUp .2s ease-out;
}
/* 下から出る（まん中にそろえる translateX(-50%) を消さないように、app.css の sheetUp ではなく自分の動き） */
@keyframes wCardUp { from { transform: translate(-50%, 30px); opacity: .5; } }
.w-card p { margin: 0; font-weight: 700; }
.w-card-ic { font-size: 20px; line-height: 1.3; }
.w-card .w-x { color: #3a2810; border-color: rgba(58, 40, 16, .35); background: rgba(255, 255, 255, .35); }
.world.touch .w-card { bottom: calc(176px + var(--safe-b)); }
.w-card-main { display: grid; gap: 4px; min-width: 0; }
.w-card-h { font-family: var(--font-dot); font-weight: 400; font-size: calc(16px * var(--fs-k, 1)); line-height: 1.3; color: #6a3e00; }
.w-card-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 6px; }
.w-card-acts .btn { min-height: 44px; }
.w-card-acts .btn + .btn { min-width: 84px; }
.w-card-acts .btn:not(.btn-primary) { background: rgba(255, 255, 255, .55); border-color: rgba(58, 40, 16, .45); color: #3a2810; }
.w-card .w-card-note { margin: 2px 0 0; font-size: var(--wf-xs); font-weight: 400; color: #4e3c26; line-height: 1.6; }
.w-card[data-kind="ask"] { background: linear-gradient(180deg, #fff8e2, #f1dfae); border-color: #8a6a2a; box-shadow: 0 0 0 2px #2b1a10, 0 0 0 6px rgba(255, 216, 74, .32), 0 10px 26px rgba(0, 0, 0, .45); }
.w-card[data-kind="dungeon"], .w-card[data-kind="dginfo"] { background: linear-gradient(180deg, #ece6d8, #d8cfba); border-color: #5e5242; }
.w-card[data-kind="trap"] { background: linear-gradient(180deg, #fde8e2, #f2cfc4); border-color: #8a3a2a; }

/* ---------------------------------------------------------------------
   話す・エモートの小窓・読みこみ
   --------------------------------------------------------------------- */
.w-pop { position: absolute; z-index: 6; left: 50%; bottom: calc(20px + var(--safe-b)); transform: translateX(-50%); width: min(470px, calc(100% - 16px)); padding: 8px; border-radius: 14px; background: rgba(14, 24, 20, .97); border: 1.5px solid var(--line-2); box-shadow: 0 10px 30px rgba(0, 0, 0, .5); animation: wCardUp .16s ease-out; }
.world.touch .w-pop { bottom: calc(176px + var(--safe-b)); }
.world.touch .w-pop[data-kind="say"] { top: 62px; bottom: auto; }
.w-emotes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.w-emotes button { display: grid; justify-items: center; align-content: start; gap: 1px; min-width: 0; min-height: 60px; padding: 4px 0; border-radius: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, .04); color: var(--text); }
.w-emotes button:focus-visible { background: rgba(227, 179, 65, .14); border-color: rgba(227, 179, 65, .5); }
@media (hover: hover) { .w-emotes button:hover { background: rgba(227, 179, 65, .14); border-color: rgba(227, 179, 65, .5); } }
.w-emotes img { image-rendering: pixelated; }
/* 名前は折り返してよい（大きい文字の細い画面で「ありがとう」がはみ出さないように。文字は小さくしない） */
.w-emotes small { max-width: 100%; font-size: var(--wf-xs); line-height: 1.2; text-align: center; overflow-wrap: anywhere; word-break: break-all; letter-spacing: -.02em; }
@media (max-width: 420px) { html.big-text .w-emotes { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.w-sayf { display: flex; gap: 6px; align-items: center; margin: 0; }
.w-sayf input { flex: 1; min-width: 0; min-height: 44px; padding: 8px 12px; border-radius: 10px; border: 1.5px solid var(--line-2); background: rgba(5, 12, 9, .6); font-size: 16px; }
.w-sayf input:focus { border-color: var(--brass); outline: none; }

.w-loading { position: absolute; z-index: 2; left: 50%; top: 45%; transform: translate(-50%, -50%); padding: 10px 18px; border-radius: 12px; background: rgba(8, 16, 12, .88); border: 1px solid var(--line-2); color: var(--text); font-size: var(--wf-s); }

/* ---------------------------------------------------------------------
   道具の窓（w.use）
   --------------------------------------------------------------------- */
.w-items { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.w-items li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(5, 12, 9, .3); }
.w-items li.dim { opacity: .7; }
.w-it-art { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: rgba(255, 255, 255, .05); }
.w-it-body { display: grid; min-width: 0; line-height: 1.45; }
.w-it-body b { font-size: var(--wf-m); }
.w-it-body small { color: var(--muted); font-size: var(--wf-xs); }

/* 設定のページの「地図の大きさ」（ui/pages.js） */
.w-zoom { display: flex; gap: 6px; }
.w-zoom button { flex: 1 1 0; min-height: 44px; border-radius: var(--r-btn); border: 1.5px solid var(--line-2); background: rgba(5, 12, 9, .35); color: var(--text); font-weight: 700; font-size: max(var(--fs-min, 14px), calc(14px * var(--fs-k, 1))); }
.w-zoom button[aria-checked="true"] { border-color: var(--brass); background: rgba(227, 179, 65, .14); color: var(--brass-hi); }

/* ---------------------------------------------------------------------
   上のバーのメニュー（ui/menu.js。1枚のシート）：上に自分、下に大きなボタン。お知らせはシートの中で開く
   --------------------------------------------------------------------- */
.modal.w-menu-modal { width: min(600px, 100%); padding-top: 14px; }
.wm-me {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "av id gold" "bars bars bars" "chips chips chips";
  gap: 6px 12px; align-items: center; margin: 0 0 12px; padding: 12px 14px; border-radius: 14px;
  background: linear-gradient(100deg, rgba(227, 179, 65, .13), rgba(5, 12, 9, .3) 60%); border: 1.5px solid rgba(227, 179, 65, .4);
}
.wm-av { grid-area: av; }
.wm-av .avatar { width: 52px; height: 52px; }
.wm-id { grid-area: id; display: grid; min-width: 0; line-height: 1.3; }
.wm-id b { font-size: calc(17px * var(--fs-k, 1)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wm-id small { color: var(--muted); font-size: var(--wf-s); }
.wm-gold { grid-area: gold; display: inline-flex; align-items: baseline; gap: 4px; padding: 4px 10px; border-radius: 999px; background: rgba(227, 179, 65, .14); color: var(--brass-hi); font-size: var(--wf-xs); white-space: nowrap; }
.wm-gold b { font-family: var(--font-dot); font-weight: 400; font-size: calc(17px * var(--fs-k, 1)); }
.wm-bars { grid-area: bars; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.wm-bars .meter { width: auto; }
.wm-chips { grid-area: chips; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.wm-chips .chip { font-size: var(--wf-xs); color: var(--text); padding: 2px 10px; }
.wm-chips .chip.sky { background: rgba(120, 150, 230, .2); border: 1px solid rgba(150, 180, 255, .45); color: #e4ecff; }
.wm-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 520px) { .wm-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.wm-t {
  position: relative; display: grid; justify-items: center; align-content: center; gap: 3px; min-height: 78px; padding: 8px 4px;
  border-radius: 14px; border: 1.5px solid var(--line-2); background: rgba(5, 12, 9, .35); color: var(--text); text-align: center; line-height: 1.25;
}
.wm-t .ic { font-size: 26px; line-height: 1.1; }
.wm-t b { font-size: var(--wf-m); white-space: nowrap; }
.wm-t:focus-visible { outline: 3px solid var(--brass); outline-offset: 1px; border-color: var(--brass); background: rgba(227, 179, 65, .14); }
.wm-t:active { transform: translateY(1px); background: rgba(227, 179, 65, .18); }
.wm-t.k-logout { border-style: dashed; }
.wm-t.k-logout b { color: var(--muted); }
html.big-text .wm-t { min-height: 86px; }
.wm-badge { position: absolute; top: 6px; right: 8px; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 12px; background: var(--ember); color: #2a0d03; font-style: normal; font-size: var(--fs-min, 14px); font-weight: 700; line-height: 24px; text-align: center; }
.wm-keys { margin: 12px 2px 0; color: var(--muted); font-size: var(--wf-xs); line-height: 1.6; }
@media (pointer: coarse) { .wm-keys { display: none; } }
.wm-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 0 0 12px; }
.wm-head h2 { margin: 0; font-family: var(--font-dot); font-weight: 400; font-size: calc(20px * var(--fs-k, 1)); }
.wm-head small { color: var(--muted); font-size: var(--wf-xs); }
.wm-back { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 12px 0 8px; border-radius: 10px; border: 1.5px solid var(--line-2); background: rgba(5, 12, 9, .35); color: var(--text); font-weight: 700; font-size: var(--wf-s); }
.wm-back span { font-size: 20px; line-height: 1; color: var(--brass-hi); }
.wm-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; margin: 0 0 10px; padding: 10px 12px; border-radius: 14px; border: 1.5px solid var(--line-2); background: rgba(5, 12, 9, .3); }
.wm-row .ic { font-size: 22px; }
.wm-row-t { display: grid; min-width: 0; line-height: 1.45; }
.wm-row-t b { font-size: var(--wf-m); }
.wm-row-t small { color: var(--muted); font-size: var(--wf-xs); }
.wm-row.k-wb { border-color: rgba(255, 154, 74, .7); background: linear-gradient(100deg, rgba(120, 50, 16, .45), rgba(30, 18, 10, .4)); }
.wm-row.k-wb b { color: #ffd0a0; }
.wm-row.k-wb.down, .wm-row.k-wb.none { border-color: var(--line-2); background: rgba(5, 12, 9, .3); }
.wm-row.k-wb.down b, .wm-row.k-wb.none b { color: var(--text); }
.wm-row.k-req { border-color: rgba(92, 200, 168, .55); background: rgba(92, 200, 168, .08); }
.w-notice .next-card { margin-bottom: 10px; }
.w-notice .section-title { margin-top: 14px; }
.w-notice .town-motd { margin: 0 0 10px; color: var(--muted); font-size: var(--wf-s); }
.w-notice .town-warn { margin: 0 0 10px; padding: 8px 12px; border-radius: 10px; background: rgba(240, 116, 74, .12); border: 1px solid rgba(240, 116, 74, .45); color: #ffc4ad; font-size: var(--wf-s); }
.w-notice .sleep-panel { margin-bottom: 10px; }
/* 手帳の画面が読めないときの、かんたんな手帳（ui/menu.js） */
.w-jlist { display: grid; gap: 6px; margin: 0 0 12px; padding: 0; list-style: none; }
.w-jlist li { padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line-2); background: rgba(5, 12, 9, .3); font-size: var(--wf-m); }

/* ---------------------------------------------------------------------
   出会いの演出（ui/encfx.js）。#main の外に重ねる（戦いの画面に変わっても消えない）。窓（.modal-back 50）の上。
   会話シーン（.scene-ov 52）とトースト（80）の下
   --------------------------------------------------------------------- */
.encfx { position: fixed; inset: 0; z-index: 51; pointer-events: auto; }
.encfx canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; }

/* ---------------------------------------------------------------------
   背の低い画面（スマホの横向きなど）：十字ボタンと A・B を小さく
   --------------------------------------------------------------------- */
@media (max-height: 560px) {
  .w-pad { width: 112px; height: 112px; bottom: calc(10px + var(--safe-b)); }
  .w-pad i { width: 38px; height: 38px; }
  .w-pad .u { left: 37px; top: 3px; } .w-pad .d { left: 37px; bottom: 3px; }
  .w-pad .l { left: 3px; top: 37px; } .w-pad .r { right: 3px; top: 37px; }
  .w-pad b { left: 47px; top: 47px; width: 18px; height: 18px; }
  .w-a { width: 64px; height: 64px; bottom: calc(52px + var(--safe-b)); }
  .w-b { width: 52px; height: 52px; right: calc(88px + env(safe-area-inset-right, 0px)); bottom: calc(12px + var(--safe-b)); }
  .world.touch .w-card, .world.touch .w-pop { bottom: calc(14px + var(--safe-b)); }
  .world.touch .w-card { width: min(420px, calc(100% - 300px)); min-width: 220px; }
  .w-result { top: 22%; }
}

/* マウスがある画面だけ（スマホでは、さわったあとに色が残らないように） */
@media (hover: hover) {
  .w-x:hover { background: rgba(255, 255, 255, .12); }
  .w-tool:hover, .w-dg:hover { background: rgba(30, 48, 40, .95); border-color: var(--brass); }
  .wm-t:hover { border-color: rgba(227, 179, 65, .55); background: rgba(227, 179, 65, .1); }
  .wm-back:hover { border-color: rgba(227, 179, 65, .55); }
}
