:root { --bg: #16223a; --panel: #fffaf2; --ink: #2b2b2b; --accent: #ff8c42; --accent2: #4dabf7; --gold: #ffd23f; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #000; font-family: "Hiragino Maru Gothic ProN", "Yu Gothic UI", "Yu Gothic", "Meiryo", system-ui, sans-serif; color: var(--ink); -webkit-user-select: none; user-select: none; touch-action: none; }
#game { position: fixed; inset: 0; }
#game canvas { display: block; }
.hidden { display: none !important; }
button { font: inherit; cursor: pointer; border: 0; border-radius: 12px; padding: 8px 12px; background: #fff; color: var(--ink); box-shadow: 0 3px 0 rgba(0,0,0,.25); }
button:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0,0,0,.25); }
button:disabled { opacity: .4; cursor: default; }
input { font: inherit; width: 100%; padding: 8px 10px; border-radius: 10px; border: 2px solid #e5d6c3; margin-top: 4px; background: #fff; }
.screen { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; padding: 14px; background: radial-gradient(circle at 30% 20%, #4c8db5, #16223a 70%); overflow: auto; z-index: 20; }
.card { background: var(--panel); border-radius: 22px; padding: 20px; width: min(820px, 100%); box-shadow: 0 10px 0 rgba(0,0,0,.25); }
.card.center { text-align: center; width: min(420px, 100%); }
.logo { font-size: 54px; font-weight: 900; color: #ff8c42; letter-spacing: 6px; text-shadow: 3px 3px 0 #ffd8a8, 6px 6px 0 rgba(0,0,0,.12); }
.logo.small { font-size: 36px; }
.sub { margin: 0 0 12px; color: #6b5b4b; font-weight: bold; }
.titleGrid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .titleGrid { grid-template-columns: 1fr; } .logo { font-size: 40px; } }
.box { background: #fff; border-radius: 16px; padding: 14px; border: 3px dashed #f1d3b3; }
.box h3 { margin: 0 0 8px; font-size: 16px; color: #8a5a2b; }
#lookPrev { display: block; margin: 0 auto 6px; background: linear-gradient(#bfe6ff, #e9f7ff); border-radius: 14px; }
.pick { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 13px; }
.pick > span { width: 64px; color: #6b5b4b; }
.pick > div { display: flex; gap: 6px; flex-wrap: wrap; }
.sw { width: 28px; height: 28px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 2px #ddd; cursor: pointer; }
.sw.on { box-shadow: 0 0 0 3px #ff8c42; }
.hs { padding: 4px 8px; font-size: 12px; }
.hs.on { background: #ff8c42; color: #fff; }
.big { width: 100%; margin-top: 10px; padding: 12px; font-size: 18px; font-weight: bold; background: var(--accent); color: #fff; }
.big.alt { background: var(--accent2); }
.msg { color: #d6336c; min-height: 1.2em; font-weight: bold; }
.how { margin-top: 10px; font-size: 14px; color: #555; }
.how li { margin: 3px 0; }
#recent button { margin: 6px 6px 0 0; font-size: 12px; padding: 5px 9px; background: #fff4e6; }
.bar { height: 12px; background: #e9e2d8; border-radius: 6px; overflow: hidden; margin-top: 10px; }
.bar > div { height: 100%; width: 0; background: linear-gradient(90deg, #ffb347, #ff8c42); transition: width .2s; }

#hud { position: fixed; inset: 0; pointer-events: none; z-index: 5; }
#hud button, #hud .panel, #hotbar, #touchUI * { pointer-events: auto; }
#hudTL { position: absolute; left: 10px; top: 10px; color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.6); }
#hearts { font-size: 22px; letter-spacing: -3px; filter: drop-shadow(0 2px 0 rgba(0,0,0,.4)); }
#lvRow { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-weight: 900; }
.xp { width: 150px; height: 10px; background: rgba(0,0,0,.45); border-radius: 5px; overflow: hidden; border: 2px solid rgba(255,255,255,.7); }
#xpBar { height: 100%; width: 0; background: linear-gradient(90deg, #8ce99a, #20c997); }
#eqRow { display: flex; gap: 4px; margin-top: 6px; }
#eqRow img { width: 30px; height: 30px; background: rgba(0,0,0,.35); border-radius: 8px; padding: 2px; image-rendering: pixelated; }
#hudTR { position: absolute; right: 10px; top: 10px; text-align: right; color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.6); font-weight: bold; display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
#clock { font-size: 18px; } #depth { font-size: 14px; } #worldInfo { font-size: 12px; opacity: .9; }
.mini { font-size: 12px; padding: 4px 8px; }
#bossBar { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); width: min(520px, 70vw); text-align: center; color: #fff; text-shadow: 0 2px 0 #000; font-weight: 900; }
.bb { height: 16px; background: rgba(0,0,0,.6); border-radius: 8px; border: 2px solid #fff; overflow: hidden; margin-top: 4px; }
#bossHp { height: 100%; width: 100%; background: linear-gradient(90deg, #ff6b6b, #ffa94d); transition: width .2s; }
#selName { position: absolute; left: 50%; bottom: 86px; transform: translateX(-50%); color: #fff; font-weight: bold; text-shadow: 0 2px 0 #000; font-size: 15px; transition: opacity .4s; }
#hotbar { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); display: flex; gap: 4px; padding: 5px; background: rgba(20,20,30,.55); border-radius: 14px; border: 2px solid rgba(255,255,255,.35); }
.slot { position: relative; width: 58px; height: 58px; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.14); border-radius: 10px; border: 3px solid transparent; cursor: pointer; }
.slot img { width: 40px; height: 40px; image-rendering: pixelated; }
.slot b { position: absolute; right: 4px; bottom: 1px; color: #fff; font-size: 13px; text-shadow: 0 1px 0 #000, 0 0 3px #000; }
.slot i { position: absolute; left: 4px; top: 1px; color: rgba(255,255,255,.7); font-size: 10px; font-style: normal; }
.slot.sel { border-color: #ffd23f; background: rgba(255,210,63,.25); }
#sideBtns { position: absolute; right: 10px; bottom: 12px; display: flex; flex-direction: column; gap: 8px; }
#sideBtns small { opacity: .5; }
#pickups { position: absolute; right: 14px; bottom: 150px; display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
#pickups div { display: flex; align-items: center; gap: 6px; background: rgba(0,0,0,.55); color: #fff; padding: 3px 10px 3px 4px; border-radius: 10px; font-weight: bold; animation: pin .25s; }
#pickups img { width: 26px; height: 26px; image-rendering: pixelated; }
@keyframes pin { from { transform: translateX(30px); opacity: 0; } }
#toast { position: absolute; left: 50%; top: 70px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 5px; align-items: center; }
#toast div { background: rgba(0,0,0,.72); color: #fff; padding: 7px 14px; border-radius: 12px; font-size: 15px; font-weight: bold; display: flex; gap: 6px; align-items: center; }
#toast div.warn { background: rgba(200,60,40,.85); } #toast div.boss { background: rgba(120,40,160,.9); font-size: 17px; }
#toast img { width: 24px; height: 24px; image-rendering: pixelated; }
#fx { position: absolute; inset: 0; overflow: hidden; }
.dmg { position: absolute; font-weight: 900; font-size: 22px; color: #fff; text-shadow: 0 2px 0 #000, 0 0 4px #000; transform: translate(-50%, -50%); white-space: nowrap; }
.dmg.crit { color: #ffd23f; font-size: 30px; } .dmg.me { color: #ff6b6b; } .dmg.heal { color: #8ce99a; } .dmg.pet { color: #ffd8a8; font-size: 18px; } .dmg.coin { color: #ffd23f; font-size: 17px; }
.hpw { position: absolute; transform: translate(-50%, -12px); display: flex; flex-direction: column; align-items: center; pointer-events: none; }
.mlv { font-size: 11px; font-weight: 900; color: #fff; text-shadow: 0 1px 0 #000, 0 0 3px #000; line-height: 1; margin-bottom: 2px; white-space: nowrap; }
.mlv.weak { color: #8ce99a; } .mlv.strong { color: #ffa94d; } .mlv.danger { color: #ff6b6b; font-size: 12px; }
.hpb { width: 46px; height: 6px; background: rgba(0,0,0,.6); border-radius: 3px; overflow: hidden; }
.hpb div { height: 100%; background: #ff6b6b; }
.mark { position: absolute; transform: translate(-50%, -100%); font-size: 30px; font-weight: 900; color: #ff3b3b; text-shadow: 0 2px 0 #fff, 0 0 6px #fff; }
#hurtFx { position: absolute; inset: 0; box-shadow: inset 0 0 120px 40px rgba(255,0,0,.6); opacity: 0; transition: opacity .35s; }
#crosshair { position: absolute; left: 50%; top: 50%; width: 0; height: 0; }
.panel { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: var(--panel); border-radius: 18px; padding: 14px; width: min(520px, calc(100vw - 24px)); max-height: 80vh; overflow: auto; box-shadow: 0 10px 0 rgba(0,0,0,.3); z-index: 8; }
.panel.wide { width: min(780px, calc(100vw - 24px)); }
.panel h3 { margin: 0 0 8px; display: flex; justify-content: space-between; align-items: center; color: #8a5a2b; }
.close { padding: 2px 12px; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 8px; }
.tabs button { font-size: 13px; padding: 5px 10px; background: #f3e8da; }
.tabs button.on { background: #ff8c42; color: #fff; }
#invGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 6px; }
#invGrid .slot { background: #f3e8da; width: auto; }
#invGrid .slot b { color: #222; text-shadow: none; }
#invGrid .slot.sel { border-color: #ff8c42; }
.info { margin-top: 10px; background: #fff; border-radius: 12px; padding: 10px; min-height: 60px; font-size: 14px; border: 2px solid #f1d3b3; }
.info .row { display: flex; gap: 10px; align-items: center; }
.info img { width: 48px; height: 48px; image-rendering: pixelated; }
.info .nm { font-size: 18px; font-weight: 900; }
.info .tag { display: inline-block; font-size: 11px; background: #ffe8cc; border-radius: 8px; padding: 1px 7px; margin-left: 4px; }
.craftBody { display: grid; grid-template-columns: 1.2fr 1fr; gap: 10px; }
@media (max-width: 640px), (max-height: 500px) { .craftBody { grid-template-columns: 1fr; } }
#craftList { display: flex; flex-direction: column; gap: 4px; max-height: 52vh; overflow: auto; }
.rc { display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: 10px; background: #fff; border: 2px solid #f1e3d1; cursor: pointer; }
.rc.can { border-color: #8ce99a; background: #f1fff3; }
.rc.on { border-color: #ff8c42; }
.rc img { width: 34px; height: 34px; image-rendering: pixelated; }
.rc .st { margin-left: auto; font-size: 16px; }
.need { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.need span { display: flex; align-items: center; gap: 3px; background: #f8f1e7; border-radius: 8px; padding: 2px 6px; font-size: 13px; }
.need span.ng { color: #d6336c; } .need img { width: 22px; height: 22px; image-rendering: pixelated; }
.note { font-size: 12px; color: #8a7a6a; }
#chatList button, #stampList button { margin: 4px; } #stampList button { font-size: 22px; }
#puzzle { position: fixed; inset: 0; background: rgba(20,12,40,.82); display: flex; align-items: center; justify-content: center; z-index: 12; }
.pz { background: #2d2350; border-radius: 20px; padding: 14px; color: #fff; width: min(420px, 96vw); border: 4px solid #ffd23f; }
.pzHead { display: flex; justify-content: space-between; font-size: 16px; }
#pzBoard { width: 100%; height: auto; margin-top: 10px; border-radius: 12px; background: #1d1640; touch-action: none; }
.pzFoot { font-size: 12px; margin-top: 8px; display: flex; justify-content: space-between; gap: 8px; align-items: center; }
#pzTime { background: linear-gradient(90deg, #8ce99a, #ffd23f); transition: none; }
#lootView { position: fixed; left: 50%; top: 45%; transform: translate(-50%, -50%); background: #2d2350; border: 4px solid #ffd23f; color: #fff; border-radius: 20px; padding: 18px 26px; text-align: center; z-index: 13; animation: pop .35s; }
#lootView .items { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }
#lootView .items div { display: flex; flex-direction: column; align-items: center; font-size: 13px; animation: pop .4s backwards; }
#lootView img { width: 48px; height: 48px; image-rendering: pixelated; filter: drop-shadow(0 0 8px #ffd23f); }
@keyframes pop { from { transform: translate(-50%, -50%) scale(.5); opacity: 0; } }
#lootView .items div { animation-name: pop2; } @keyframes pop2 { from { transform: scale(0); } }
#deadView { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(60,0,0,.55); z-index: 14; }
#bigMsg { position: fixed; left: 50%; top: 32%; transform: translate(-50%, -50%); font-size: 46px; font-weight: 900; color: #ffd23f; text-shadow: 0 4px 0 #8a5a2b, 0 0 20px rgba(255,210,63,.8); pointer-events: none; opacity: 0; transition: opacity .3s; z-index: 9; white-space: nowrap; }
.touchOnly { display: none; }
body.touch .touchOnly { display: block; }
#touchUI #stick { position: absolute; left: 22px; bottom: 100px; width: 130px; height: 130px; border-radius: 50%; background: rgba(255,255,255,.18); border: 3px solid rgba(255,255,255,.4); }
#touchUI #knob { position: absolute; left: 40px; top: 40px; width: 50px; height: 50px; border-radius: 50%; background: rgba(255,255,255,.75); }
#touchUI button { position: absolute; width: 70px; height: 70px; border-radius: 50%; font-size: 22px; opacity: .9; }
#tJump { right: 110px; bottom: 100px; font-size: 13px !important; } #tAtk { right: 30px; bottom: 170px; } #tMine { right: 110px; bottom: 190px; } #tUse { right: 30px; bottom: 90px; }

/* ---- スマホ（2026-10-30 こうじ様の指摘：見切れる） ---- */
.screen { align-items: flex-start; }
.screen > .card { margin: auto; }
#lookPrev { width: 160px; height: 180px; }
@media (max-width: 640px), (max-height: 500px) {
  .screen { padding: 10px; }
  .card { padding: 14px; border-radius: 18px; }
  .logo { font-size: 34px; letter-spacing: 3px; }
  .sub { font-size: 13px; margin-bottom: 8px; }
  .box { padding: 10px; }
  .charRow { display: flex; gap: 10px; align-items: center; }
  #lookPrev { width: 110px; height: 124px; flex: none; margin: 0; }
  .pick { margin-top: 6px; }
  .pick > span { width: 54px; font-size: 12px; }
  .sw { width: 26px; height: 26px; }
  .big { font-size: 16px; padding: 10px; }
  .how { font-size: 12px; }
  #hearts { font-size: 15px; }
  .xp { width: 90px; }
  #eqRow img { width: 24px; height: 24px; }
  #hudTR { font-size: 12px; }
  #clock { font-size: 14px; } #depth { font-size: 12px; } #worldInfo { display: none; }
  .mini { font-size: 11px; padding: 3px 6px; }
  #hotbar { bottom: 6px; gap: 2px; padding: 3px; border-radius: 10px; max-width: calc(100vw - 12px); }
  .slot { width: 38px; height: 38px; border-width: 2px; border-radius: 8px; }
  .slot img { width: 26px; height: 26px; }
  .slot b { font-size: 10px; } .slot i { display: none; }
  #selName { bottom: 52px; font-size: 12px; }
  #sideBtns { top: 92px; bottom: auto; right: 6px; gap: 5px; }
  #sideBtns button { font-size: 12px; padding: 5px 8px; }
  #sideBtns small { display: none; }
  #pickups { bottom: auto; top: 200px; right: 6px; }
  #pickups div { font-size: 12px; }
  #toast { top: 54px; width: 92vw; } #toast div { font-size: 13px; }
  #bossBar { top: 52px; width: 80vw; }
  .panel { max-height: 78vh; padding: 10px; }
  .craftBody { grid-template-columns: 1fr; }
  #craftList { max-height: 30vh; }
  .dmg { font-size: 17px; } .dmg.crit { font-size: 22px; }
  #bigMsg { font-size: 28px; }
  #touchUI #stick { left: 14px; bottom: 64px; width: 116px; height: 116px; }
  #touchUI #knob { left: 33px; top: 33px; }
  #touchUI button { width: 60px; height: 60px; font-size: 20px; }
  #tJump { right: 84px; bottom: 64px; } #tAtk { right: 14px; bottom: 132px; } #tMine { right: 84px; bottom: 136px; } #tUse { right: 14px; bottom: 60px; }
}

#camBtns { position: absolute; right: 10px; top: 118px; display: flex; gap: 6px; }
#camBtns button { width: 46px; height: 46px; font-size: 22px; padding: 0; border-radius: 50%; }
@media (max-width: 640px), (max-height: 500px) { #camBtns { top: auto; bottom: 214px; left: 14px; right: auto; } #camBtns button { width: 42px; height: 42px; font-size: 19px; } }

/* やること（はじめての人の案内） */
#quest { margin-top: 6px; background: rgba(20,20,40,.55); border: 2px solid rgba(255,210,63,.7); border-radius: 12px; padding: 6px 10px; max-width: 280px; pointer-events: auto; cursor: pointer; color: #fff; font-size: 14px; text-shadow: 0 1px 0 #000; }
#quest .qh { font-size: 11px; color: #ffd23f; font-weight: 900; }
#qText { font-weight: 900; line-height: 1.35; }
#qHint { font-size: 12px; opacity: .85; margin-top: 2px; }
#qNav { margin-top: 3px; font-weight: 900; color: #8ce99a; }
#qArrow { display: inline-block; font-size: 18px; transition: transform .2s; }
#quest.done { animation: qdone .8s; }
@keyframes qdone { 0% { transform: scale(1.12); background: rgba(255,210,63,.8); } 100% { transform: scale(1); } }
#questList { padding-left: 22px; margin: 0; } #questList li { margin: 5px 0; } #questList li.ok { color: #2b8a3e; text-decoration: line-through; } #questList li.now { font-weight: 900; color: #e8590c; }
@media (max-width: 640px), (max-height: 500px) { #quest { max-width: 58vw; font-size: 12px; padding: 4px 8px; } #qHint { font-size: 11px; } }

#vignette { position: fixed; inset: 0; pointer-events: none; z-index: 1; background: radial-gradient(ellipse at center, rgba(0,0,0,0) 58%, rgba(0,0,0,.38) 100%); }

/* ---- 見た目の作り込み（2026-10-30）：タイトルの背景は 3D の世界・ゆる生きもの・ロゴ ---- */
#title.screen { background: linear-gradient(180deg, rgba(10,16,40,.15), rgba(10,16,40,.45)); }
#loading.screen { background: radial-gradient(circle at 50% 40%, rgba(40,60,110,.75), rgba(10,14,30,.92)); }
#title .card { position: relative; background: rgba(255,250,242,.9); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); border: 3px solid rgba(255,255,255,.7); box-shadow: 0 14px 40px rgba(0,0,0,.35), 0 8px 0 rgba(0,0,0,.18); margin-top: 70px; }
.logo { background: linear-gradient(180deg, #ffd23f 0%, #ff8c42 55%, #e8590c 100%); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-stroke: 2px #7a2e0a; text-shadow: none; filter: drop-shadow(0 4px 0 #7a2e0a) drop-shadow(0 8px 10px rgba(0,0,0,.25)); font-size: 60px; letter-spacing: 8px; }
.mascots { position: absolute; left: 0; right: 0; top: -78px; height: 96px; pointer-events: none; }
.mascots img { position: absolute; width: 92px; filter: drop-shadow(0 6px 6px rgba(0,0,0,.3)); animation: bob 2.4s ease-in-out infinite; }
.mascots .m1 { left: 4%; } .mascots .m2 { left: 24%; width: 80px; animation-delay: .4s; } .mascots .m3 { right: 22%; width: 84px; animation-delay: .8s; } .mascots .m4 { right: 4%; width: 80px; animation-delay: 1.2s; }
@keyframes bob { 50% { transform: translateY(-8px) rotate(-3deg); } }
.loadMascot { width: 90px; animation: bob 1.6s ease-in-out infinite; }
.npcBubble { position: absolute; transform: translate(-50%, -100%); background: #fffaf0; color: #3b2a1a; border: 3px solid #ffb347; border-radius: 14px; padding: 6px 10px; font-size: 13px; width: max-content; max-width: min(240px, 62vw); box-shadow: 0 4px 0 rgba(0,0,0,.2); pointer-events: none; }
.npcBubble b { display: block; color: #e8590c; font-size: 11px; } .npcBubble small { display: block; color: #7a6a5a; margin-top: 2px; }
.npcBubble::after { content: ''; position: absolute; left: 50%; bottom: -10px; transform: translateX(-50%); border: 8px solid transparent; border-top-color: #ffb347; }
@media (max-width: 640px), (max-height: 500px) { #title .card { margin-top: 64px; } .logo { font-size: 42px; letter-spacing: 5px; } .mascots { top: -66px; } .mascots img { width: 70px; } .mascots .m2, .mascots .m3 { width: 62px; } .npcBubble { font-size: 12px; max-width: 200px; } }
.logo { background: none; -webkit-background-clip: border-box; background-clip: border-box; -webkit-text-stroke: 0; filter: none; color: #ffd23f;
  text-shadow: 3px 0 0 #7a2e0a, -3px 0 0 #7a2e0a, 0 3px 0 #7a2e0a, 0 -3px 0 #7a2e0a, 2px 2px 0 #7a2e0a, -2px -2px 0 #7a2e0a, 2px -2px 0 #7a2e0a, -2px 2px 0 #7a2e0a, 0 6px 0 #e8590c, 0 8px 0 #7a2e0a, 0 14px 14px rgba(0,0,0,.35); }
/* ---------------- v3：コイン・依頼・お店・鍛冶台・手帳・マップ・実績 */
#coinRow { margin-top: 5px; display: inline-block; background: rgba(20,20,40,.55); color: #ffd23f; font-weight: 900; border-radius: 10px; padding: 2px 10px; text-shadow: 0 1px 0 #000; font-size: 15px; }
#coinRow.pop { animation: cpop .5s; }
@keyframes cpop { 30% { transform: scale(1.25); } }
#dailyMini { margin-top: 5px; background: rgba(20,20,40,.5); border-radius: 10px; padding: 4px 9px; color: #fff; font-size: 12px; max-width: 280px; pointer-events: auto; cursor: pointer; text-shadow: 0 1px 0 #000; }
#dailyMini b { color: #8ce99a; }
#dailyMini .dq { display: flex; justify-content: space-between; gap: 8px; } #dailyMini .dq.ok { color: #8ce99a; text-decoration: line-through; opacity: .8; }
#petHint { margin-top: 5px; background: rgba(20,60,30,.55); border-radius: 10px; padding: 3px 9px; color: #fff; font-size: 12px; display: inline-block; text-shadow: 0 1px 0 #000; }
#petArrow, #qArrow { display: inline-block; }
#btnShop { position: absolute; left: 50%; bottom: 120px; transform: translateX(-50%); font-size: 18px; padding: 10px 18px; background: #ffd23f; color: #5a3a00; border-radius: 16px; box-shadow: 0 4px 0 rgba(0,0,0,.3); animation: bob 1.6s infinite; }
@keyframes bob { 50% { transform: translate(-50%, -4px); } }
@keyframes bob2 { 50% { transform: translateY(-4px); } }
.coinTag { margin-left: auto; margin-right: 10px; color: #b07800; font-size: 15px; }
.list { display: flex; flex-direction: column; gap: 6px; }
.row3 { display: flex; align-items: center; gap: 10px; background: #f6eee2; border-radius: 12px; padding: 6px 10px; }
.row3 img { width: 34px; height: 34px; image-rendering: pixelated; flex: none; }
.row3 .nm { flex: 1; font-weight: 800; color: #5a3a1a; } .row3 .nm small { display: block; font-weight: 500; color: #8a7a6a; font-size: 12px; }
.row3 .pr { font-weight: 900; color: #b07800; white-space: nowrap; }
.row3 button { padding: 6px 12px; font-size: 13px; }
.row3 button:disabled { opacity: .45; }
.row3.ok { background: #e3f6e3; } .row3.lock { opacity: .55; }
.pbar { height: 8px; background: #e2d6c6; border-radius: 6px; overflow: hidden; margin-top: 3px; } .pbar i { display: block; height: 100%; background: linear-gradient(90deg, #51cf66, #a9e34b); }
.dexGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; }
.dexGrid .slot { width: auto; height: 64px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #f6eee2; border-radius: 10px; font-size: 10px; color: #6a5a4a; text-align: center; line-height: 1.1; padding: 2px; }
.dexGrid .slot img { width: 32px; height: 32px; image-rendering: pixelated; }
.dexGrid .slot.no img { filter: brightness(0); opacity: .25; } .dexGrid .slot.no { color: #b0a090; }
.mobGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.mobCard { background: #f6eee2; border-radius: 12px; padding: 8px; display: flex; gap: 8px; align-items: center; font-size: 12px; color: #6a5a4a; }
.mobCard canvas { flex: none; } .mobCard b { display: block; color: #5a3a1a; font-size: 13px; } .mobCard.no { opacity: .6; }
.mobCard.boss { background: #fff0d6; border: 2px solid #ffd23f; }
.dexHead { font-weight: 800; color: #8a5a2b; margin: 4px 0 8px; }
.titleBtns { display: flex; flex-wrap: wrap; gap: 6px; } .titleBtns button.on { background: #ff8c42; color: #fff; }
.mapWrap { display: flex; justify-content: center; } #mapCv { width: min(384px, 80vw, 62vh); height: auto; aspect-ratio: 1; border-radius: 12px; image-rendering: pixelated; background: #1b2030; }
#achView { position: fixed; left: 50%; top: 18%; transform: translateX(-50%); background: linear-gradient(180deg, #fff6d6, #ffe08a); border: 3px solid #ffb020; border-radius: 18px; padding: 12px 22px; text-align: center; z-index: 30; box-shadow: 0 8px 0 rgba(0,0,0,.25); animation: achIn .5s; pointer-events: none; }
#achView .a1 { font-size: 13px; color: #b06a00; font-weight: 900; } #achView .a2 { font-size: 22px; font-weight: 900; color: #5a3a00; } #achView .a3 { font-size: 13px; color: #7a5a1a; }
@keyframes achIn { from { transform: translate(-50%, -30px) scale(.8); opacity: 0; } }
#eqRow .eq { position: relative; display: inline-block; } #eqRow .eq b { position: absolute; right: -2px; bottom: -3px; background: #ff8c42; color: #fff; font-size: 10px; border-radius: 6px; padding: 0 3px; }
#tRoll { right: 190px; bottom: 120px; }
@media (max-width: 640px), (max-height: 500px) {
  #dailyMini { max-width: 58vw; font-size: 11px; }
  #btnShop { left: auto; right: 6px; transform: none; bottom: auto; top: 44%; font-size: 13px; padding: 7px 10px; animation: bob2 1.6s infinite; }
  #achView { top: 26%; padding: 8px 14px; } #achView .a2 { font-size: 17px; }
  #tRoll { right: 154px; bottom: 96px; }
  #coinRow { font-size: 13px; }
}

/* ミニマップ（パソコンは右上・スマホは左の列の下） */
#miniMap { position: fixed; right: 10px; top: 172px; width: 150px; height: 150px; border-radius: 50%; border: 3px solid rgba(255,255,255,.9); box-shadow: 0 3px 0 rgba(0,0,0,.3); background: #1b2030; pointer-events: auto; cursor: pointer; }
#camBtns { flex-wrap: wrap; justify-content: flex-end; max-width: 330px; }
@media (max-width: 640px), (max-height: 500px) { #miniMap { position: static; display: block; width: 104px; height: 104px; margin-top: 6px; } }
@media (max-width: 640px), (max-height: 500px) { .npcBubble { font-size: 11px; max-width: 46vw; padding: 4px 8px; } .npcBubble small { display: none; } } /* スマホでは小さく・右のボタンにかぶせない */
/* 1人称（じぶんの目）：まん中の照準・右下の手・ズームボタンはかくす */
body.fpv #crosshair { width: 26px; height: 26px; margin: -13px 0 0 -13px; pointer-events: none; z-index: 3; }
body.fpv #crosshair::before, body.fpv #crosshair::after { content: ''; position: absolute; background: #fff; box-shadow: 0 0 0 1.5px rgba(0,0,0,.55); border-radius: 2px; }
body.fpv #crosshair::before { left: 12px; top: 2px; width: 3px; height: 22px; } body.fpv #crosshair::after { top: 12px; left: 2px; height: 3px; width: 22px; }
body.fpv #btnZoomIn, body.fpv #btnZoomOut { display: none; }
#fpHand { position: absolute; right: 16%; bottom: 130px; /* 2026-11-01 傾けた絵の角がホットバーにかからない高さ */ width: 150px; height: 150px; image-rendering: pixelated; transform: rotate(-18deg); transform-origin: 80% 90%; pointer-events: none; filter: drop-shadow(0 4px 0 rgba(0,0,0,.35)); z-index: 2; }
#fpHand.fpsw { animation: fpsw .28s ease-out; }
@keyframes fpsw { 40% { transform: rotate(-58deg) translate(-30px, 10px); } }
#btnView { font-size: 20px; }
@media (max-width: 640px), (max-height: 500px) { #fpHand { right: 100px; bottom: 212px; width: 56px; height: 56px; } } /* スマホはボタンにかぶらない所に小さく */
/* v4：MP・じゅもん・釣り・チェスト・わたす */
#mpRow { display: flex; align-items: center; gap: 6px; margin-top: 3px; color: #8fd3ff; font-weight: 900; font-size: 12px; text-shadow: 0 1px 0 #000; }
#mpRow .mp { width: 110px; height: 8px; background: rgba(0,0,0,.45); border-radius: 6px; overflow: hidden; } #mpBar { height: 100%; width: 100%; background: linear-gradient(90deg, #4dabf7, #9be7ff); }
#mpRow b { font-size: 11px; color: #cfeeff; }
#spellBar { position: absolute; left: 12px; bottom: 14px; display: flex; gap: 6px; pointer-events: auto; }
#spellBar button { position: relative; width: 50px; height: 50px; border-radius: 14px; font-size: 22px; padding: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; background: rgba(255,255,255,.92); }
#spellBar button small { font-size: 10px; color: #1c6fb0; font-weight: 900; margin-top: 2px; }
#spellBar button.lock { opacity: .45; font-size: 14px; } #spellBar button.low { filter: grayscale(.8); opacity: .7; }
#fishView { position: fixed; left: 50%; top: 22%; transform: translateX(-50%); background: rgba(20,40,70,.85); color: #fff; border-radius: 18px; padding: 12px 18px; text-align: center; z-index: 25; min-width: 260px; box-shadow: 0 6px 0 rgba(0,0,0,.3); }
#fishView #fishMsg { font-size: 18px; font-weight: 900; margin-bottom: 8px; display: flex; align-items: center; justify-content: center; gap: 6px; } #fishView #fishMsg img { width: 36px; height: 36px; image-rendering: pixelated; }
#fishView #fishPull { width: 100%; font-size: 22px; } #fishView.bite { background: rgba(200,60,40,.92); animation: fbite .25s infinite alternate; } #fishView.bite #fishPull { background: #ffd23f; color: #5a3a00; }
@keyframes fbite { to { transform: translateX(-50%) scale(1.05); } }
#fishView #fishQuit { margin-top: 6px; font-size: 12px; }
.chestGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(54px, 1fr)); gap: 6px; margin-bottom: 8px; min-height: 40px; }
.chestGrid .slot { width: auto; height: 54px; cursor: pointer; }
.giftRow { display: flex; align-items: center; gap: 6px; margin-top: 6px; flex-wrap: wrap; } .giftRow span { font-weight: 800; color: #b04a6a; }
@media (max-width: 640px), (max-height: 500px) {
  #spellBar { left: auto; right: 10px; bottom: 204px; display: grid; grid-template-columns: repeat(2, 40px); gap: 4px; } #spellBar button { width: 40px; height: 40px; font-size: 17px; border-radius: 12px; }
  #camBtns { gap: 4px; }
  #mpRow .mp { width: 80px; } #fishView { top: 30%; min-width: 220px; }
}
.chestGrid .slot { background: #f3e8da; } .chestGrid .slot b { color: #222; text-shadow: none; } .chestGrid .slot:hover { border-color: #ff8c42; }
#chestPanel h3 label { white-space: nowrap; display: flex; align-items: center; gap: 4px; color: #6a5a4a; font-weight: 700; }

/* v5：やさしいモード・せってい・なかまの Lv */
label.peace { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0 4px; font-weight: 700; color: #b05a7a; cursor: pointer; }
#title label.peace input, label.peace input { width: 22px; min-width: 22px; height: 22px; margin: 0; padding: 0; flex: 0 0 22px; accent-color: #ff6b9d; }
label.peace span { flex: 1; min-width: 0; }
label.peace small { flex-basis: 100%; font-weight: 400; color: #8a7a6a; font-size: 12px; }
.setRow { display: flex; align-items: center; gap: 12px; background: #fff7ef; border-radius: 12px; padding: 10px 12px; }
.setRow > div { flex: 1; } .setRow small { color: #8a7a6a; }
button.toggle { min-width: 76px; padding: 10px 14px; border-radius: 999px; border: 0; font-weight: 900; font-size: 16px; background: #ced4da; color: #495057; cursor: pointer; }
button.toggle.on { background: #ff6b9d; color: #fff; box-shadow: 0 2px 0 #c2456f; }
.petLv { display: inline-block; background: #ffd23f; color: #6b4a00; border-radius: 8px; padding: 0 6px; font-size: 12px; margin-left: 4px; }
.petBar { height: 7px; background: #eee3d6; border-radius: 4px; overflow: hidden; margin: 3px 0 2px; max-width: 220px; }
.petBar i { display: block; height: 100%; background: linear-gradient(90deg, #ffd23f, #ff922b); }
ul.tips { margin: 0; padding-left: 18px; line-height: 1.7; font-size: 14px; }

/* v5.1：スマホの画面をすっきり（2026-11-01 指摘「表示が多くて見づらい」）：よく使う物だけ出し、ほかは ☰ メニューへ */
#btnMenu { display: none; }
.menuGrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.menuGrid button { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 24px; padding: 10px 4px; border-radius: 14px; background: #fff3e6; }
.menuGrid button span { font-size: 11px; font-weight: 800; color: #6a4a2a; }
@media (max-width: 640px), (max-height: 500px) {
  #btnMenu { display: block; position: absolute; right: 6px; top: 64px; width: 46px; height: 46px; border-radius: 50%; font-size: 22px; padding: 0; z-index: 4; pointer-events: auto; }
  #sideBtns, #btnCopy, #eqRow, #qHint { display: none !important; }
  #camBtns button:not(#btnView) { display: none; }
  #spellBar button.lock { display: none; }
  #hearts { font-size: 13px; }
  #dailyMini .dq { display: none; }
  #dailyMini { padding: 2px 8px; }
  #pickups { top: 120px; }
  #btnShop { top: 40%; }
}
@media (max-width: 640px), (max-height: 500px) { .npcBubble { display: none !important; } } /* スマホ：しばまるの吹き出しは「やること」と同じ内容なので出さない（お店ボタンにかぶらない） */

/* v6：案内人の吹き出し（スマホでも出す・小さめ） */
.guideBubble { position: absolute; transform: translate(-50%, -100%); background: #f6f0ff; color: #2e1f4a; border: 3px solid #a37bff; border-radius: 14px; padding: 6px 10px; font-size: 13px; width: max-content; max-width: min(260px, 66vw); box-shadow: 0 3px 0 rgba(0,0,0,.25); pointer-events: none; line-height: 1.45; z-index: 3; }
.guideBubble b { display: block; color: #7a4cd6; font-size: 12px; }
@media (max-width: 640px), (max-height: 500px) { .guideBubble { font-size: 11px; max-width: 62vw; padding: 4px 8px; } }

/* v7：ギルド・土地・お店・パーティ */
#btnGuild { position: absolute; left: 50%; transform: translateX(-50%); bottom: 150px; font-size: 18px; padding: 10px 18px; background: #7a4cd6; color: #fff; border-radius: 999px; box-shadow: 0 4px 0 #4b2a96; pointer-events: auto; z-index: 4; }
.gcard { display: flex; align-items: center; gap: 12px; background: linear-gradient(135deg, #fff6d6, #ffe7b0); border: 2px solid #e0a800; border-radius: 14px; padding: 8px 12px; margin-bottom: 8px; }
.gcard .rk { font-size: 34px; font-weight: 900; color: #b06a00; min-width: 44px; text-align: center; }
.gcard .bar { height: 8px; background: #f0dcae; border-radius: 4px; overflow: hidden; margin-top: 4px; } .gcard .bar i { display: block; height: 100%; background: linear-gradient(90deg, #ffd23f, #ff922b); }
.qrow { background: #fff; border: 2px solid #eadfcf; border-radius: 12px; padding: 7px 10px; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.qrow.lock { opacity: .55; } .qrow.on { border-color: #51cf66; background: #f1fff3; }
.qrow .qt { flex: 1; font-weight: 800; color: #3b2a1a; } .qrow .qt small { display: block; font-weight: 600; color: #8a6a4a; margin-top: 2px; }
.qrow .rk { display: inline-block; min-width: 22px; text-align: center; background: #7a4cd6; color: #fff; border-radius: 6px; font-size: 12px; padding: 1px 4px; margin-right: 4px; }
.qrow .pg { font-size: 12px; color: #2b8a3e; font-weight: 900; }
#partyBox { margin-top: 5px; background: rgba(40,20,80,.55); border-radius: 10px; padding: 4px 9px; color: #fff; font-size: 12px; max-width: 260px; pointer-events: auto; cursor: pointer; text-shadow: 0 1px 0 #000; }
#partyBox .pm { display: flex; align-items: center; gap: 6px; } #partyBox .pm b { flex: 1; font-weight: 800; } #partyBox .hp { width: 60px; height: 6px; background: rgba(0,0,0,.5); border-radius: 3px; overflow: hidden; } #partyBox .hp i { display: block; height: 100%; background: #51cf66; }
#inviteBox { position: fixed; left: 50%; top: 24%; transform: translateX(-50%); background: #fffaf0; border: 3px solid #7a4cd6; border-radius: 16px; padding: 12px 16px; z-index: 30; text-align: center; box-shadow: 0 6px 0 rgba(0,0,0,.25); }
#inviteBox .row { display: flex; gap: 8px; justify-content: center; margin-top: 8px; } #inviteMsg { font-weight: 900; color: #4b2a96; }
.stock { display: grid; grid-template-columns: repeat(auto-fill, minmax(54px, 1fr)); gap: 6px; margin: 6px 0; } .stock .slot { width: auto; height: 54px; cursor: pointer; background: #f3e8da; } .stock .slot.sel { outline: 3px solid #ff8c42; }
.stockForm { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 6px 0; } .stockForm input { width: 80px; margin: 0; }
@media (max-width: 640px), (max-height: 500px) { #btnGuild { bottom: auto; top: 50%; left: auto; right: 6px; transform: none; font-size: 13px; padding: 7px 10px; } #partyBox { max-width: 58vw; font-size: 11px; } #partyBox .hp { width: 40px; } }
/* v9 終わらない物語 */
.story { background: #fff8e8; border: 2px solid #f0d9a8; border-radius: 12px; padding: 8px 12px; margin: 0 0 10px; line-height: 1.6; }
.story .sby { font-size: 12px; color: #a0753c; font-weight: 700; }
.story p { margin: 4px 0 0; }
/* v10 ゆめの塔 */
#trialBar { position: absolute; left: 50%; top: 58px; transform: translateX(-50%); background: rgba(60, 30, 110, .82); color: #fff; font-weight: 900; padding: 5px 14px; border-radius: 999px; font-size: 14px; white-space: nowrap; pointer-events: none; box-shadow: 0 2px 0 rgba(0,0,0,.25); }
@media (max-width: 760px) { #trialBar { top: 118px; left: auto; right: 8px; transform: none; font-size: 12px; padding: 4px 10px; } }
#hearts .hpNum { font-size: 13px; letter-spacing: 0; margin-left: 8px; color: #fff; font-weight: 900; text-shadow: 0 1px 0 #000; vertical-align: middle; }
.dmg.heart { color: #ff5a8a; font-size: 26px; }

/* v12.1 タブレット（さわる画面で、スマホより広い）：2026-11-01 こうじ様のタブレットの写真で、右下の丸いボタン（⛏⚔✋⬆🌀）と文字のボタン（持ち物 E・つくる C・M など）が重なっていた。
   さわる画面では文字のボタンを ☰ メニューにまとめる（キーの E・C・M はタブレットでは使わない）。☰ は丸いボタンの上に置く */
body.touch #sideBtns { display: none !important; }
body.touch #btnMenu { display: block; position: absolute; right: 30px; bottom: 278px; top: auto; width: 56px; height: 56px; border-radius: 50%; font-size: 24px; padding: 0; z-index: 4; pointer-events: auto; }
@media (max-width: 640px), (max-height: 500px) { body.touch #btnMenu { right: 6px; top: 64px; bottom: auto; width: 46px; height: 46px; font-size: 22px; } }
.dmg.miss { color: #d0ebff; font-size: 16px; } /* 2026-11-01 攻撃がとどかない時 */
/* 2026-11-01 タブレット・スマホ：画面ごとの拡大（ピンチ・ダブルタップ）・長押しの虫めがね／メニュー・引っぱって再読み込み を出さない */
html, body { overscroll-behavior: none; -webkit-touch-callout: none; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
* { -webkit-tap-highlight-color: transparent; }
.screen, .panel, #craftList { touch-action: pan-x pan-y; overscroll-behavior: contain; } /* 中は 1 本指でスクロールできる。拡大はしない */
#craftList { overscroll-behavior: auto; } /* 2026-11-01 一覧のはしまで来たら パネルごとスクロールする（下の「つくる」まで行ける） */
input, textarea { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }

/* ================= 2026-11-01 画面の点検（ui2）================= */
/* じゅもんの待ち時間：暗くして、のこりを時計の針のように見せる（かみなり 3 秒・ほかは 0.9 秒） */
#spellBar button.cd { filter: grayscale(.7) brightness(.62); cursor: not-allowed; }
#spellBar button.cd::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: conic-gradient(rgba(0,0,0,.5) calc(var(--cd, 1) * 360deg), transparent 0); pointer-events: none; }
/* パネルの見出し（× ボタン）はスクロールしても上に残る */
.panel > h3 { position: sticky; top: 0; z-index: 3; background: var(--panel); padding-top: 4px; margin-top: -4px; }
/* つくる：ボタンは下に貼りつく（スマホ・低い画面でもスクロールなしで見える）・同じ物の作り方が 2 つある時は材料を添える */
.rc small.from { display: block; font-size: 11px; color: #8a6a4a; font-weight: 700; }
.craftAct { position: sticky; bottom: 0; z-index: 2; display: flex; gap: 6px; align-items: stretch; background: #fff; padding: 8px 0 2px; margin-top: 6px; box-shadow: 0 -8px 8px -8px rgba(0,0,0,.25); }
.craftAct .big { margin-top: 0; flex: 1; min-width: 0; font-size: 16px; line-height: 1.25; }
.craftAct .x5 { flex: none; font-size: 12px; padding: 6px 8px; }
/* 1人称の時は ☰ の「近くを見る／遠くを見る」を出さない（1人称ではズームしない） */
body.fpv #menuPanel [data-go="btnZoomIn"], body.fpv #menuPanel [data-go="btnZoomOut"] { display: none; }
/* 狭い画面・低い画面：タブは 1 段の横スクロール・つくるの下の説明はかくす */
@media (max-width: 640px), (max-height: 500px) {
  .tabs { flex-wrap: nowrap; overflow-x: auto; touch-action: pan-x pan-y; padding-bottom: 3px; scrollbar-width: thin; }
  .tabs button { flex: none; }
  #craftPanel > .note { display: none; }
}
/* 幅 641〜1040（iPad 縦など）：じゅもんがホットバーの 1・2 番に重なっていた → さわる画面はスティック（左 22・下 100・130 角）の上に縦にならべる。パソコンはホットバーの上へ */
@media (min-width: 641px) and (max-width: 1040px) and (min-height: 501px) {
  #spellBar { bottom: 100px; }
  body.touch #spellBar { left: 22px; bottom: 244px; flex-direction: column; }
}
/* タブレット：1人称の手は 右下の丸いボタン・☰ にかぶらない所へ */
@media (min-width: 641px) and (min-height: 501px) { body.touch #fpHand { right: 270px; bottom: 232px; width: 100px; height: 100px; } }
/* 幅 340 以下のスマホ（iPhone SE など）：🌀 がスティックにかぶらないよう、スティックを少し小さく */
@media (max-width: 340px) { #touchUI #stick { left: 8px; width: 104px; height: 104px; } #touchUI #knob { left: 27px; top: 27px; } #tRoll { right: 148px; } }
/* スマホ：ギルドのボタンは じゅもんの上に（画面が低いと 50% の所が じゅもんにかぶった） */
@media (max-width: 640px) { #btnGuild { top: auto; bottom: 296px; } }
/* スマホ横向き・高さ 500 以下：スマホの配置（上の @media）を使い、横に広い分を置き直す。
   左上＝やること などの列／左下＝スティック・👁️／右上＝ミニマップ・☰・時計／右下＝丸いボタン・じゅもん／まん中の下＝ホットバー・お店 */
@media (max-height: 500px) {
  #miniMap { position: fixed; top: 6px; right: 6px; width: 76px; height: 76px; margin: 0; }
  #hudTR { right: 144px; top: 8px; }
  #btnMenu, body.touch #btnMenu { top: 6px; right: 90px; bottom: auto; width: 46px; height: 46px; font-size: 22px; }
  #quest, #dailyMini, #partyBox { max-width: 270px; }
  #touchUI #stick { left: 14px; bottom: 14px; }
  #camBtns { top: auto; right: auto; left: 140px; bottom: 62px; }
  #tUse { right: 14px; bottom: 14px; } #tJump { right: 84px; bottom: 14px; } #tAtk { right: 14px; bottom: 84px; } #tMine { right: 84px; bottom: 84px; } #tRoll { right: 154px; bottom: 62px; }
  #spellBar { right: 10px; bottom: 154px; }
  #selName { bottom: 58px; }
  #btnShop { left: 50%; right: auto; top: auto; bottom: 74px; transform: translateX(-50%); animation: bob 1.6s infinite; }
  #btnGuild { left: 50%; right: auto; top: auto; bottom: 118px; transform: translateX(-50%); }
  #pickups { top: auto; bottom: 64px; right: 230px; }
  #trialBar { top: 44px; left: 50%; right: auto; transform: translateX(-50%); }
  #bossBar { top: 6px; width: min(240px, 30vw); }
  .panel { max-height: 90vh; }
  .craftBody { grid-template-columns: 1.2fr 1fr; } #craftList { max-height: 48vh; }
  .guideBubble { max-width: min(300px, 40vw); } /* 横に広すぎて右下のボタンにかぶっていた */
}
/* とても低い画面（高さ 330 以下・Pixel 5 の横向きなど）：じゅもんは右下のボタンの左に 1 列・きょうの依頼の札はかくす（☰ の図鑑・依頼で見られる） */
@media (max-height: 330px) {
  #spellBar { grid-template-columns: repeat(4, 40px); right: 154px; bottom: 126px; }
  #dailyMini { display: none; }
  #fpHand { right: 20px; bottom: 158px; width: 46px; height: 46px; } /* ミニマップの下・⚔️ の上 */
}
/* 横向きで幅も狭い（iPhone SE の横向き 568x320 など）：ホットバー・スティック・丸いボタンを少し小さくして、ホットバーにかぶらないように */
@media (max-height: 500px) and (max-width: 700px) {
  #hotbar .slot { width: 32px; height: 32px; } #hotbar .slot img { width: 22px; height: 22px; }
  #touchUI #stick { left: 10px; bottom: 14px; width: 96px; height: 96px; } #touchUI #knob { left: 23px; top: 23px; }
  #touchUI button { width: 52px; height: 52px; font-size: 18px; }
  #tUse { right: 10px; bottom: 10px; } #tJump { right: 68px; bottom: 10px; } #tAtk { right: 10px; bottom: 70px; } #tMine { right: 68px; bottom: 70px; } #tRoll { right: 126px; bottom: 56px; }
  #spellBar { grid-template-columns: repeat(2, 40px); right: 10px; bottom: 130px; }
  #fpHand { right: 100px; bottom: 142px; } /* ⛏️ の上・じゅもんの左 */
  #camBtns { left: 120px; bottom: 54px; }
}
