/* 외딴섬 7일 — 화면 모양 (창은 다른 Leapinity 게임처럼 흰 둥근 카드) */
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #0f3a5c; color: #fff; font-family: "Pretendard Variable", Pretendard, -apple-system, "Malgun Gothic", sans-serif; word-break: keep-all; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; overscroll-behavior: none; }
#cv { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; display: block; touch-action: none; image-rendering: pixelated; }
.hidden { display: none !important; }

.top { position: fixed; top: 0; left: 0; right: 0; z-index: 9060; display: flex; align-items: center; gap: 8px; padding: calc(env(safe-area-inset-top) + 10px) calc(env(safe-area-inset-right) + 14px) 8px calc(env(safe-area-inset-left) + 14px); pointer-events: none; }
.top > * { pointer-events: auto; }
.top h1 { margin: 0; font-size: 16px; font-weight: 900; color: #fff; padding: 7px 14px; border-radius: 99px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .18); letter-spacing: -.3px; }
#accountSlot { margin-left: auto; }
body.playing .top, body.boot .top { display: none; }

#home { position: fixed; inset: 0; z-index: 10; display: flex; flex-direction: column; align-items: center; padding: calc(env(safe-area-inset-top) + 62px) 16px calc(env(safe-area-inset-bottom) + 12px); overflow-y: auto; }
.hero { text-align: center; margin-top: 4vh; }
.title-star { margin: 0; font-size: 34px; color: #ffe27a; text-shadow: 0 0 18px #ffd84a; animation: tw 2.4s ease-in-out infinite; }
@keyframes tw { 50% { opacity: .55; transform: scale(.9); } }
.title-word { margin: 2px 0 6px; font-size: clamp(38px, 11vw, 64px); font-weight: 900; letter-spacing: -2px; background: linear-gradient(180deg, #fff6c4, #ffd84a 55%, #ff9ad1); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 4px 0 #3a1f66) drop-shadow(0 0 18px rgba(255, 200, 100, .5)); }
.title-sub { margin: 0; font-size: 15px; font-weight: 700; color: #d6dcff; }
.best { margin: 10px 0 0; font-size: 14px; color: #c9cfee; }
.best b { color: #ffe27a; }
.spacer { flex: 1; min-height: 16px; }
.panel { width: 100%; max-width: 400px; display: grid; gap: 9px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.big { width: 100%; min-height: 44px; padding: 14px 16px; border-radius: 18px; border: 0; font: inherit; font-size: 18px; font-weight: 900; cursor: pointer; transition: transform .1s; }
.big:active { transform: scale(.97); }
.big small { font-size: 12px; font-weight: 700; opacity: .8; margin-left: 4px; }
.big.primary { background: linear-gradient(135deg, #ffb347, #1f9e8a); color: #fff; box-shadow: 0 6px 0 #136b5e, 0 10px 24px rgba(31, 158, 138, .45); font-size: 22px; padding: 16px; }
.big.ghost { background: rgba(255, 255, 255, .94); color: #1d4a5a; box-shadow: 0 4px 0 rgba(0, 0, 0, .25); }
.howto { background: rgba(16, 20, 50, .82); border: 1px solid rgba(255, 255, 255, .14); border-radius: 16px; padding: 10px 14px; font-size: 14px; color: #dfe3ff; }
.howto summary { cursor: pointer; font-weight: 800; }
.howto ul { margin: 8px 0 0; padding-left: 18px; line-height: 1.6; }
.credit { text-align: center; margin: 4px 0 0; font-size: 12px; }
.credit a { color: rgba(220, 225, 255, .75); text-decoration: none; }

.pause { position: fixed; z-index: 30; top: calc(env(safe-area-inset-top) + 16px); right: calc(env(safe-area-inset-right) + 8px); width: 44px; height: 44px; border-radius: 14px; border: 0; background: rgba(255, 255, 255, .9); color: #1d4a5a; font-size: 18px; font-weight: 900; box-shadow: 0 3px 0 rgba(0, 0, 0, .3); cursor: pointer; }
.banner { position: fixed; left: 50%; top: calc(env(safe-area-inset-top) + 134px); z-index: 25; transform: translate(-50%, -10px); max-width: min(92vw, 560px); padding: 9px 18px; border-radius: 99px; background: rgba(255, 255, 255, .95); color: #1d4a5a; font-weight: 900; font-size: 15px; text-align: center; box-shadow: 0 8px 24px rgba(0, 0, 0, .35); opacity: 0; transition: opacity .25s, transform .25s; pointer-events: none; }
.banner.on { opacity: 1; transform: translate(-50%, 0); }
.banner.big { background: linear-gradient(135deg, #ff4a7a, #8b3fd0); color: #fff; font-size: 18px; }

/* 창 */
#layer { position: fixed; inset: 0; z-index: 40; pointer-events: none; }
.ov { position: fixed; inset: 0; display: grid; place-items: center; padding: calc(env(safe-area-inset-top) + 10px) 12px calc(env(safe-area-inset-bottom) + 10px); background: rgba(10, 10, 35, .55); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); pointer-events: auto; animation: fade .18s; }
@keyframes fade { from { opacity: 0; } }
.card { width: 100%; max-width: 440px; max-height: 100%; overflow-y: auto; background: #fff; color: #2f3550; border-radius: 24px; padding: 18px 16px 16px; box-shadow: 0 22px 60px rgba(0, 0, 0, .45); text-align: center; animation: up .2s ease-out; }
@keyframes up { from { transform: translateY(14px) scale(.98); } }
.ov-pick .card, .ov-up .card { max-width: 520px; }
.ov-kicker { margin: 0; font-size: 13px; font-weight: 900; color: #1f9e8a; }
.card h2 { margin: 2px 0 12px; font-size: 22px; font-weight: 900; letter-spacing: -.5px; }
.muted { color: #7a809a; font-size: 13px; margin: 6px 0; }
.cards { display: grid; gap: 8px; margin-bottom: 10px; }
.cards.grid { grid-template-columns: 1fr 1fr; }
.pick { position: relative; display: flex; gap: 10px; align-items: center; text-align: left; width: 100%; padding: 12px; border-radius: 16px; border: 2px solid #e3f1ee; background: linear-gradient(#fff, #f2f8f6); font: inherit; color: inherit; cursor: pointer; box-shadow: 0 3px 0 #d5e9e4; transition: transform .1s, border-color .1s; }
.pick:hover, .pick:focus-visible { border-color: #1f9e8a; outline: none; }
.pick:active { transform: scale(.98); }
.pick:disabled { cursor: default; }
.pick.sel { border-color: #ffb347; }
.pk-emoji { font-size: 34px; width: 44px; text-align: center; flex: none; }
.pk-body { display: grid; gap: 2px; min-width: 0; }
.pk-body b { font-size: 16px; font-weight: 900; }
.pk-body em { font-style: normal; font-size: 12px; font-weight: 800; color: #e07a2a; }
.pk-body small { font-size: 13px; color: #5a6080; line-height: 1.4; }
.pk-body i { font-style: normal; font-size: 11.5px; color: #1f9e8a; font-weight: 700; }
.pick kbd { position: absolute; right: 10px; top: 8px; font: 800 11px sans-serif; color: #b9b3d6; }
.pick.sm { flex-direction: column; text-align: center; gap: 4px; padding: 10px 8px; }
.pick.sm .pk-emoji { width: auto; font-size: 30px; }
.pick.sm .pk-body small { font-size: 12px; }
.btn { display: block; width: 100%; margin-top: 8px; padding: 12px; border-radius: 14px; border: 0; font: inherit; font-size: 16px; font-weight: 900; cursor: pointer; }
.btn.primary { background: linear-gradient(135deg, #ffb347, #1f9e8a); color: #fff; box-shadow: 0 4px 0 #136b5e; }
.btn.ghost { background: #e7f3f0; color: #1d5a50; }
.btn.danger { background: #fff0f3; color: #d0335a; }
.btn:disabled { opacity: .45; cursor: default; }
.btn.tiny { display: inline-block; width: auto; min-height: 44px; margin: 0; padding: 7px 12px; font-size: 14px; border-radius: 12px; background: #e7f3f0; color: #1d5a50; }
.btn.tiny.primary { background: linear-gradient(135deg, #ffb347, #1f9e8a); color: #fff; box-shadow: 0 3px 0 #136b5e; }
.row2 .btn { margin-top: 8px; }
.gets { list-style: none; margin: 6px 0; padding: 0; display: grid; gap: 4px; text-align: left; }
.gets.two { grid-template-columns: 1fr 1fr; }
.gets li { background: #f2f8f6; border-radius: 10px; padding: 6px 10px; font-size: 14px; }
.gets small { color: #8a8fa8; font-weight: 700; }
.evo { display: flex; justify-content: center; align-items: center; gap: 12px; font-size: 40px; margin: 6px 0; }
.evo .to { font-size: 64px; animation: glow 1s ease-in-out infinite alternate; }
@keyframes glow { to { filter: drop-shadow(0 0 14px #ffd84a); transform: scale(1.08); } }
.coins { font-weight: 900; color: #c48a1a; margin: 8px 0 0; }
.toggles { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; margin: 10px 0 2px; font-size: 14px; font-weight: 700; }
.toggles input { accent-color: #1f9e8a; width: 18px; height: 18px; vertical-align: -3px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 4px 0 8px; }
.facts div { background: #f2f8f6; border-radius: 14px; padding: 10px; }
.facts small { display: block; font-size: 12px; color: #8a8fa8; font-weight: 800; }
.facts b { font-size: 22px; font-weight: 900; color: #1d4a5a; }
.rec { margin: 6px 0; padding: 8px; border-radius: 12px; background: #fff7d6; color: #8a5a00; font-weight: 800; font-size: 14px; }
.rec.guest { background: #eef4ff; color: #2f4a8a; }
.dmg { text-align: left; margin: 8px 0 0; font-size: 14px; }
.dmg summary { cursor: pointer; font-weight: 800; color: #6a6f8a; }
.gold-now { margin: 0 0 10px; font-weight: 800; }
.gold-now b { color: #c48a1a; font-size: 18px; }
.ups { display: grid; gap: 7px; text-align: left; }
.up { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 14px; background: #f2f8f6; }
.up-e { font-size: 26px; width: 34px; text-align: center; flex: none; }
.up-b { flex: 1; display: grid; gap: 1px; min-width: 0; }
.up-b b { font-size: 15px; }
.up-b small { font-size: 12.5px; color: #6a6f8a; }
.dots { display: flex; gap: 3px; margin-top: 2px; }
.dots i { width: 14px; height: 6px; border-radius: 3px; background: #d3e6e1; }
.dots i.on { background: linear-gradient(90deg, #ffb347, #1f9e8a); }
.maxed { font-weight: 900; color: #1f9e8a; font-size: 14px; padding: 0 6px; }
.evo-t { width: 100%; border-collapse: collapse; font-size: 13.5px; text-align: left; }
.evo-t td { padding: 6px 4px; border-bottom: 1px solid #e3f1ee; }
.howto .evo-t td { border-color: rgba(255, 255, 255, .12); }
.howto .muted { color: #b9bfdc; }

@media (max-height: 520px) and (orientation: landscape) {
  #home { padding-top: calc(env(safe-area-inset-top) + 52px); }
  .hero { margin-top: 0; }
  .title-star { display: none; }
  .title-word { font-size: 40px; }
  .cards:not(.grid) { grid-template-columns: repeat(3, 1fr); }
  .cards:not(.grid) .pick { flex-direction: column; text-align: center; }
  .cards.grid { grid-template-columns: repeat(3, 1fr); }
  .card { max-width: 760px; padding: 12px; }
  .card h2 { margin-bottom: 6px; font-size: 19px; }
  .banner { top: calc(env(safe-area-inset-top) + 122px); }
}

/* ---- 2편·3편 (2026-10-30): 무대·수호대·장비·임무·도감·설정·방법 ---- */
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 9px; }
.big.sm { font-size: 15px; padding: 12px 6px; border-radius: 16px; position: relative; }
.big.sm small { display: block; margin: 2px 0 0; }
.big.daily { background: linear-gradient(135deg, #4fc3d8, #3a6ad8); color: #fff; box-shadow: 0 5px 0 #23408a; font-size: 18px; }
.big.daily small { color: #e8fbff; }
.badge { display: inline-block; min-width: 20px; padding: 1px 6px; border-radius: 99px; background: #ff4a7a; color: #fff; font-size: 12px; font-weight: 900; vertical-align: 2px; }
.sub { margin: 12px 0 6px; font-size: 15px; font-weight: 900; text-align: left; color: #1d4a5a; }
.stages { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.stage { display: grid; gap: 2px; justify-items: center; padding: 8px 2px; border-radius: 14px; border: 2px solid #e3f1ee; background: #f2f8f6; font: inherit; color: inherit; cursor: pointer; }
.stage b { font-size: 12.5px; line-height: 1.2; }
.stage small { font-size: 10.5px; color: #7a809a; line-height: 1.2; }
.stage .st-e { font-size: 24px; }
.stage.sel { border-color: #ffb347; background: #fff4e6; }
.stage.lock { opacity: .55; cursor: default; }
.st-desc { min-height: 2.6em; }
.seg { display: flex; gap: 6px; margin: 8px 0; padding: 4px; background: #e7f3f0; border-radius: 14px; }
.seg button { flex: 1; padding: 8px 4px; border: 0; border-radius: 10px; background: transparent; font: inherit; font-weight: 900; font-size: 14px; color: #6b6f88; cursor: pointer; }
.seg button.on { background: #fff; color: #1d4a5a; box-shadow: 0 2px 0 #cfe3de; }
.seg button:disabled { opacity: .5; cursor: default; }
.chars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.ch { display: grid; gap: 1px; justify-items: center; padding: 8px 3px; border-radius: 14px; border: 2px solid #e3f1ee; background: #fff; font: inherit; color: inherit; cursor: pointer; }
.ch span { font-size: 24px; }
.ch b { font-size: 13px; }
.ch small { font-size: 10.5px; color: #7a809a; line-height: 1.25; }
.ch.sel { border-color: #1f9e8a; background: #ecf7f4; }
.ch.lock { opacity: .5; cursor: default; }
.daily-box { text-align: left; background: #eef8ff; border-radius: 16px; padding: 10px 12px; margin: 6px 0; }
.daily-box p { margin: 4px 0; }
.mod small { color: #5a6a8a; }
.lock-t { font-size: 12px; font-weight: 800; color: #8a8fa8; white-space: nowrap; }
.guest-note { margin: 8px 0; padding: 10px; border-radius: 14px; background: #eef4ff; color: #2f4a8a; font-weight: 800; font-size: 13.5px; }
.guest-note p { margin: 0 0 6px; }
.bar { display: block; height: 7px; border-radius: 99px; background: #dcebe7; overflow: hidden; margin: 3px 0 1px; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, #1f9e8a, #ffb347); }
.up.done { opacity: .7; }
.opts { display: grid; gap: 8px; text-align: left; margin-bottom: 6px; }
.slider { display: grid; grid-template-columns: 74px 1fr 34px; align-items: center; gap: 8px; font-weight: 800; }
.slider input { width: 100%; accent-color: #1f9e8a; }
.slider b { text-align: right; color: #1f9e8a; }
.tog { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: #f2f8f6; font-weight: 800; cursor: pointer; }
.tog input { width: 20px; height: 20px; accent-color: #1f9e8a; flex: none; }
.tog small { color: #7a809a; font-weight: 700; }
.slots { display: flex; justify-content: center; gap: 14px; }
.slot { display: grid; justify-items: center; gap: 2px; font-size: 12px; font-weight: 800; color: #7a809a; }
.gchip { position: relative; display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; font-size: 26px; background: #eef0f6; border: 3px solid #c8cbe0; flex: none; }
.gchip i { position: absolute; bottom: -7px; left: 50%; transform: translateX(-50%); font-style: normal; font-size: 9.5px; font-weight: 900; padding: 0 5px; border-radius: 99px; background: #c8cbe0; color: #2f3550; white-space: nowrap; }
.gchip.g1 { border-color: #5ad1ff; background: #eaf8ff; } .gchip.g1 i { background: #5ad1ff; }
.gchip.g2 { border-color: #c47aff; background: #f6edff; } .gchip.g2 i { background: #c47aff; color: #fff; }
.gchip.g3 { border-color: #ffc94a; background: #fff8e0; box-shadow: 0 0 12px rgba(255, 201, 74, .8); } .gchip.g3 i { background: #ffc94a; }
.gchip.empty { color: #b8bcd0; border-style: dashed; }
.chest-row { display: flex; align-items: center; gap: 10px; text-align: left; padding: 10px; margin: 8px 0; border-radius: 16px; background: #fff7d6; }
.chest-row > span:nth-child(2) { flex: 1; display: grid; }
.chest-row small { color: #8a6a20; font-size: 12px; }
.chest-row .btn.tiny { margin-left: 4px; }
.big-e { font-size: 30px; }
.glist { display: grid; gap: 8px; text-align: left; min-height: 60px; }
.gitem { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 14px; background: #f2f8f6; flex-wrap: wrap; }
.gitem.eq { outline: 2px solid #1f9e8a; }
.reveal { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; margin: 6px 0 4px; }
.rv { display: grid; justify-items: center; gap: 4px; padding: 12px 6px 8px; border-radius: 16px; background: #f2f8f6; animation: flip .45s ease-out both; }
.rv b { font-size: 13px; } .rv small { font-size: 11px; color: #6a6f8a; }
.rv.g2 { background: #f6edff; } .rv.g3 { background: #fff8e0; box-shadow: 0 0 18px rgba(255, 201, 74, .7); }
@keyframes flip { from { transform: rotateY(90deg) scale(.8); opacity: 0; } }
.dex { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; text-align: left; }
.dx { padding: 8px 10px; border-radius: 12px; background: #f2f8f6; display: grid; }
.dx b { font-size: 13.5px; } .dx small { font-size: 11.5px; color: #6a6f8a; }
.dx.no { background: #f0f0f4; color: #a0a4b8; }
.dx.boss { background: #fff0f3; } .dx.boss.no { background: #f6eef0; }
.shop { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.si { display: grid; justify-items: center; gap: 3px; padding: 10px 6px; border-radius: 16px; background: #f2f8f6; }
.si.eq { outline: 2px solid #1f9e8a; }
.si b { font-size: 13px; } .si small { font-size: 11px; color: #6a6f8a; min-height: 2.4em; }
.guide { text-align: left; font-size: 14px; line-height: 1.6; }
.guide h3 { margin: 12px 0 2px; font-size: 15px; color: #1d4a5a; }
.guide p { margin: 0; color: #4a5070; }
@media (max-width: 380px) { .stages { grid-template-columns: repeat(3, 1fr); } .chars { grid-template-columns: 1fr 1fr; } .dex { grid-template-columns: 1fr; } }
/* 움직임 줄이기 */
body.calm *, body.calm *::before, body.calm *::after { animation-duration: 0s !important; transition-duration: 0s !important; }

/* ---- 외딴섬 7일 (2026-10-31) ---- */
.title-sun { margin: 0; font-size: 42px; animation: tw 3s ease-in-out infinite; }
.title-word { background: linear-gradient(180deg, #fffbe6, #ffd36a 55%, #ff9a4a); -webkit-background-clip: text; background-clip: text; filter: drop-shadow(0 4px 0 #0f3a5c) drop-shadow(0 0 16px rgba(255, 200, 100, .5)); }
.title-sub { color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, .35); }
.best { color: #fff; text-shadow: 0 1px 0 rgba(0, 0, 0, .4); }
#home::before { content: ''; position: fixed; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(10, 40, 70, .55), rgba(10, 40, 70, .1) 40%, rgba(10, 30, 50, .65)); pointer-events: none; }
.big.primary { background: linear-gradient(135deg, #ffb347, #ff7a4a); box-shadow: 0 6px 0 #a8461f, 0 10px 24px rgba(255, 122, 74, .45); }
.btn.primary, .btn.tiny.primary { background: linear-gradient(135deg, #2bb59e, #1f8ec9); box-shadow: 0 4px 0 #136b5e; }
.big.endless { background: linear-gradient(135deg, #5a6ad8, #3a3f9e); color: #fff; box-shadow: 0 5px 0 #23286a; font-size: 18px; }
.ov-kicker { color: #1f9e8a; }

/* 판 화면 */
.hud { position: fixed; inset: 0; z-index: 20; pointer-events: none; }
.hud > * { pointer-events: auto; }
.hud-top { position: absolute; top: calc(env(safe-area-inset-top) + 8px); left: calc(env(safe-area-inset-left) + 8px); right: calc(env(safe-area-inset-right) + 60px); display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: flex-start; pointer-events: none; }
.clock { display: grid; grid-template-columns: auto auto; align-items: center; column-gap: 6px; padding: 6px 12px 7px; border-radius: 16px; background: rgba(10, 30, 50, .62); color: #fff; font-size: 15px; backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); }
.clock b { font-weight: 900; }
.clock small { grid-column: 1 / 3; font-size: 11.5px; font-weight: 700; color: #cfe6ff; }
.sunbar { grid-column: 1 / 3; display: block; height: 4px; border-radius: 9px; background: linear-gradient(90deg, #ffd36a 0 64%, #ff9a4a 64% 74%, #2a3a7a 74% 95%, #ffb38a 95%); position: relative; margin-top: 3px; }
.sunbar > i { position: absolute; top: -3px; width: 4px; height: 10px; border-radius: 2px; background: #fff; box-shadow: 0 0 4px #000; left: 0; }
.bars { display: grid; gap: 4px; min-width: 150px; flex: 1; max-width: 230px; }
.barx { display: flex; align-items: center; gap: 4px; font-size: 13px; }
.barx > i { flex: 1; height: 10px; border-radius: 9px; background: rgba(0, 0, 0, .45); overflow: hidden; border: 1px solid rgba(255, 255, 255, .3); }
.barx > i > i { display: block; height: 100%; width: 100%; border-radius: 9px; transition: width .2s; }
.barx.hp > i > i { background: linear-gradient(90deg, #ff5a6a, #ff8a8a); }
.barx.food > i > i { background: linear-gradient(90deg, #e08a3a, #ffc06a); }
.barx.water > i > i { background: linear-gradient(90deg, #2a8ad8, #6ad0ff); }
.barx.low > i { animation: lowbar .6s ease-in-out infinite alternate; }
@keyframes lowbar { to { border-color: #ff4a4a; box-shadow: 0 0 6px #ff4a4a; } }
.inv { position: absolute; left: calc(env(safe-area-inset-left) + 8px); bottom: calc(env(safe-area-inset-bottom) + 10px); right: 210px; display: flex; flex-wrap: wrap; gap: 4px; pointer-events: none; }
.inv span { padding: 3px 7px; border-radius: 10px; background: rgba(10, 30, 50, .6); color: #fff; font-size: 13px; font-weight: 800; }
.inv span.tool { background: rgba(31, 158, 138, .75); }
.hud-btns { position: absolute; right: calc(env(safe-area-inset-right) + 10px); bottom: calc(env(safe-area-inset-bottom) + 12px); display: grid; grid-template-columns: 54px 54px 100px; grid-template-rows: 54px 54px; gap: 8px; align-items: end; pointer-events: none; }
.hud-btns > * { pointer-events: auto; }
.hb { width: 54px; height: 54px; border-radius: 18px; border: 0; background: rgba(255, 255, 255, .92); font-size: 22px; line-height: 1; display: grid; place-items: center; padding: 3px 0 2px; box-shadow: 0 3px 0 rgba(0, 0, 0, .3); cursor: pointer; color: #1d4a5a; touch-action: manipulation; }
.hb small { font-size: 11px; font-weight: 900; }
.hb:disabled { opacity: .45; }
.hb.bag { grid-column: 1 / 3; grid-row: 1; width: auto; grid-template-columns: auto auto; gap: 6px; font-size: 22px; }
.hb.bag small { font-size: 14px; }
.hb.eat { grid-column: 1; grid-row: 2; }
.hb.drink { grid-column: 2; grid-row: 2; }
.act { grid-column: 3; grid-row: 1 / 3; width: 100px; height: 100px; border-radius: 50%; border: 4px solid rgba(255, 255, 255, .9); background: radial-gradient(circle at 40% 35%, #ffd36a, #ff9a3a); color: #4a2a10; display: grid; place-items: center; align-content: center; gap: 0; box-shadow: 0 5px 0 rgba(0, 0, 0, .3), 0 0 0 0 rgba(255, 211, 106, .7); cursor: pointer; touch-action: none; padding: 0; }
.act span { font-size: 34px; line-height: 1.05; }
.act small { font-size: 12px; font-weight: 900; max-width: 88px; line-height: 1.15; }
.act.idle { background: radial-gradient(circle at 40% 35%, #f0f0f0, #b8c4c8); color: #4a5a60; }
.act.hot { animation: hot .3s ease-in-out infinite alternate; }
.act.down { transform: scale(.94); }
@keyframes hot { to { box-shadow: 0 5px 0 rgba(0, 0, 0, .3), 0 0 0 10px rgba(255, 90, 60, .5); } }
.pause { top: calc(env(safe-area-inset-top) + 8px); }
.banner { top: calc(env(safe-area-inset-top) + 92px); }
/* 🎵 음악 단추 (2026-10-31): 첫 화면은 위 띠 바로 아래 오른쪽(좁은 휴대폰에서 띠가 넘치지 않게), 판 중에는 멈춤 단추 아래에. 꺼지면 흐리게 */
.mus-top { position: fixed; top: calc(env(safe-area-inset-top) + 62px); right: calc(env(safe-area-inset-right) + 14px); width: 44px; height: 44px; padding: 0; border-radius: 99px; border: 1px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .18); color: #fff; font-size: 16px; line-height: 1; cursor: pointer; }
body:has(#layer .ov) .mus-top { display: none; } /* 창이 열리면 위 🎵 숨김 (창 안 카드와 겹치지 않게, 2026-11-07) */
.pause.mus-run { display: none; top: calc(env(safe-area-inset-top) + 60px); }
body.playing .pause.mus-run { display: block; }
.mus.off { opacity: .55; }
body.playing #hud { display: block; }
@media (max-height: 520px) and (orientation: landscape) {
  .hud-top { flex-wrap: nowrap; }
  .bars { min-width: 130px; }
  .banner { top: calc(env(safe-area-inset-top) + 64px); }
  .inv { right: 230px; }
}
@media (max-width: 380px) { .act { width: 88px; height: 88px; } .hud-btns { grid-template-columns: 48px 48px 88px; grid-template-rows: 48px 48px; } .hb { width: 48px; height: 48px; } .inv { right: 196px; } }

/* 만들기 창 */
.ov-craft .card { max-width: 560px; }
.have { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin: 0 0 8px; }
.have span { padding: 3px 8px; border-radius: 10px; background: #f2f8f6; font-size: 13px; font-weight: 800; }
.recipes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 7px; text-align: left; }
.rc { display: grid; grid-template-columns: 38px 1fr; gap: 2px 8px; align-items: center; padding: 9px; border-radius: 14px; border: 2px solid #e3f1ee; background: #fff; font: inherit; color: inherit; cursor: pointer; text-align: left; }
.rc .e { grid-row: 1 / 3; font-size: 28px; text-align: center; }
.rc b { font-size: 14.5px; }
.rc small { font-size: 12px; color: #6a7a80; }
.rc .cost { grid-column: 1 / 3; display: flex; flex-wrap: wrap; gap: 3px; margin-top: 3px; }
.rc .cost i { font-style: normal; font-size: 12px; font-weight: 800; padding: 1px 6px; border-radius: 8px; background: #e7f3f0; color: #1d5a50; }
.rc .cost i.no { background: #ffe9e6; color: #c8402a; }
.rc.ok { border-color: #2bb59e; box-shadow: 0 3px 0 #bfe6dc; }
.rc.done { opacity: .55; }
.rc.unknown { background: #f3f4f6; color: #9aa0a8; cursor: default; }
.rc:disabled { cursor: default; }
.rc-desc { font-size: 13px; color: #4a5a60; min-height: 2.6em; margin: 8px 0 0; }
.keys { font-size: 12px; color: #7a8a90; margin: 8px 0 0; }
.keys kbd { display: inline-block; padding: 0 5px; border-radius: 5px; background: #e7f3f0; font: 800 11px sans-serif; color: #1d4a5a; }

/* 2편 */
.row4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.row4 .big.sm { font-size: 14px; padding: 12px 2px; }
.card h2 small { font-size: 14px; font-weight: 800; }
.dex .dx small + small { color: #1f9e8a; font-weight: 800; }

/* 3편 */
.biomes { grid-template-columns: repeat(3, 1fr); }
.relic-line { font-size: 13.5px; font-weight: 800; color: #1d4a5a; margin: 4px 0 8px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: center; }
.inv span.cold { background: rgba(120, 180, 255, .85); }
.up.done .up-e { filter: none; }

/* 좁은 휴대폰: 🏠 단추가 생긴 계정 칸 자리가 모자라서 처음 화면 위쪽 작은 이름표는 숨김 (가운데 큰 제목에 이름이 있음, 2026-11-01) */
@media (max-width: 420px) { body:not(.playing) .top > h1 { display: none; } .top #accountSlot { margin-left: auto; } }

/* 🎬 첫 화면 (kit/title.css 위에 이 게임 색·하늘·바다·모래와 떠다니는 섬 그림) */
#title { --lt-a: #1f78b4; --lt-b: #2fa85a; --lt-ink: #2f3550; --lt-muted: #6b7190; --lt-brand: #1f78b4; --lt-sh: #1a6f45; --lt-glow: rgba(20, 70, 110, .38); --lt-bgc: #6ccbee;
  background-image: linear-gradient(180deg, #b8e8ff 0, #d9f3ff 22%, #6ccbee 22.2%, #3fa9dc 70%, #f4dea0 70.2%, #ecd08a 100%); }
html.lt-on #top { visibility: hidden; }          /* 첫 화면 동안 위 띠(이름·🎵)는 숨김 — 칩은 첫 화면 오른쪽 위로 옮겨짐 */
html.lt-on #layer { z-index: 895; }              /* 첫 화면에서 연 상점·방법 창은 첫 화면 위에 */
#title .lt-play { background: linear-gradient(90deg, #33a9e0, #2fa85a); }
#title .lt-o { filter: drop-shadow(0 7px 10px rgba(20, 70, 110, .28)); }
#title .lt-o svg, #title .is-wv svg { width: 100%; height: auto; }
#title .is-e { font-size: 44px; }
#title .is-sun { width: 84px; height: 84px; border-radius: 50%; background: radial-gradient(circle, #fff3b0 0, #ffd36a 60%); top: 4%; left: 7%; box-shadow: 0 0 0 14px rgba(255, 211, 106, .25); }
#title .is-cl { width: 120px; height: 34px; border-radius: 30px; background: #fff; opacity: .95; }
#title .is-cl::before { content: ""; position: absolute; width: 56px; height: 46px; border-radius: 50%; background: #fff; left: 22px; top: -22px; }
#title .cl1 { top: 13%; right: 10%; }   /* 계정 칩 아래로 */
#title .cl2 { top: 16%; left: 30%; width: 84px; height: 24px; }
#title .cl2::before { width: 39px; height: 32px; left: 15px; top: -15px; }
#title .is-wv { position: absolute; width: 70px; opacity: .8; }
#title .w1 { top: 28%; left: 6%; } #title .w2 { top: 44%; right: 4%; } #title .w3 { top: 58%; left: 4%; width: 56px; } #title .w4 { top: 34%; right: 30%; width: 50px; }
#title .is-gull { width: 40px; filter: none; } #title .g1 { top: 7%; left: 36%; } #title .g2 { top: 12%; left: 44%; width: 28px; }
#title .palm1 { width: 150px; bottom: 6%; left: -10px; } #title .palm2 { width: 110px; bottom: 4%; right: 2%; }
#title .is-ship { width: 90px; top: 24%; right: 14%; } #title .is-log { width: 86px; bottom: 3%; left: 30%; } #title .is-rock { width: 66px; bottom: 12%; right: 28%; }
#title .is-crab { bottom: 15%; left: 24%; } #title .is-shell { bottom: 4%; right: 26%; font-size: 36px; } #title .is-fire { bottom: 17%; right: 12%; font-size: 40px; }
@media (max-width: 600px) {
  #title .is-ship { top: 22%; right: 6%; width: 70px; } #title .palm1 { width: 120px; bottom: 3%; } #title .cl1 { top: 13%; right: 3%; } #title .palm2 { width: 90px; } #title .is-log { left: 38%; width: 70px; } #title .cl2 { left: 36%; top: 12%; }
  #title .is-rock { right: 24%; bottom: 13%; width: 54px; } #title .is-crab { left: 30%; bottom: 15%; } #title .is-fire { bottom: 20%; right: 6%; }
  #title .w2 { top: 40%; } #title .w4 { top: 30%; right: 8%; } #title .g1 { top: 17%; left: 6%; } #title .g2 { top: 19%; left: 20%; }
}
@media (orientation: landscape) and (max-height: 500px) {
  #title .is-sun { width: 56px; height: 56px; box-shadow: 0 0 0 9px rgba(255, 211, 106, .25); } #title .palm1 { width: 100px; } #title .palm2 { width: 80px; }
  #title .is-ship { width: 64px; } #title .is-log { width: 60px; left: 26%; bottom: 2%; } #title .cl1 { top: 9%; left: 16%; right: auto; } #title .cl2 { left: 30%; top: 24%; } #title .is-rock { width: 48px; } #title .is-e { font-size: 32px; }
}
/* 낮은 세로 휴대폰(360×640 등): 모래밭 그림을 작게, 맨 아래로 (단추 줄과 안 겹치게) */
@media (orientation: portrait) and (max-height: 700px) {
  #title .palm1 { width: 70px; bottom: 1%; } #title .palm2 { width: 68px; bottom: 1%; } #title .is-e { font-size: 30px; }
  #title .is-crab { bottom: 3%; left: 26%; } #title .is-rock { width: 44px; bottom: 6%; right: 34%; } #title .is-fire { bottom: 9%; right: 4%; font-size: 30px; }
  #title .is-shell { bottom: 1%; right: 20%; font-size: 26px; } #title .is-log { width: 56px; bottom: 1%; left: 42%; }
}
