* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #bfe3ef; font-family: Pretendard, -apple-system, sans-serif; color: #2c2a26; user-select: none; -webkit-user-select: none; }
#app canvas { display: block; touch-action: none; }

.pill { background: rgba(255, 252, 244, 0.86); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-radius: 999px; padding: 7px 14px; font-size: 14px; font-weight: 600; box-shadow: 0 3px 12px rgba(60, 40, 10, 0.12); }
#hud { position: fixed; left: 14px; top: 14px; display: flex; flex-direction: column; gap: 7px; align-items: flex-start; z-index: 5; }
#hud .row { display: flex; gap: 6px; }
.title { font-size: 15px; font-weight: 800; }
.title .sub { font-weight: 500; color: #9a8f7c; font-size: 12px; margin-left: 2px; }
#topRight { position: fixed; right: 14px; top: 14px; display: flex; gap: 8px; z-index: 5; }
.round { width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255, 252, 244, 0.88); font-size: 19px; cursor: pointer; box-shadow: 0 3px 12px rgba(60, 40, 10, 0.12); }

#hint { position: fixed; left: 50%; top: 84px; transform: translateX(-50%); background: rgba(44, 42, 38, 0.55); color: #fff; padding: 7px 14px; border-radius: 999px; font-size: 13px; white-space: nowrap; transition: opacity 0.8s; z-index: 4; pointer-events: none; }
#toast { position: fixed; left: 50%; top: 30%; transform: translate(-50%, -50%) scale(0.96); background: rgba(255, 252, 244, 0.95); padding: 12px 20px; border-radius: 18px; font-size: 16px; font-weight: 700; text-align: center; opacity: 0; transition: opacity 0.25s, transform 0.25s; pointer-events: none; z-index: 6; box-shadow: 0 6px 24px rgba(60, 40, 10, 0.18); max-width: 86vw; }
#toast.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
#toast small { display: block; font-weight: 500; font-size: 13px; color: #7a7266; margin-top: 3px; }

#dock { position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; gap: 6px; background: rgba(255, 252, 244, 0.9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); padding: 7px; border-radius: 26px; box-shadow: 0 6px 22px rgba(60, 40, 10, 0.16); z-index: 5; }
#dock button { border: 0; background: transparent; min-width: 64px; padding: 6px 10px; border-radius: 19px; font-family: inherit; font-size: 12px; font-weight: 600; color: #4a4439; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; }
#dock button .ic { font-size: 22px; line-height: 1.1; }
#dock button:active { transform: scale(0.95); }
#dock button.hot { background: #e2703a; color: #fff; }
#dock button.pulse { animation: pulse 0.5s infinite alternate; }
@keyframes pulse { from { transform: scale(1); } to { transform: scale(1.1); } }

.modal { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 8; background: rgba(30, 25, 15, 0.18); }
.modal.hide, .hide { display: none !important; }
.cardBox { background: #fffdf8; border-radius: 24px; padding: 22px 22px 18px; width: min(340px, 88vw); text-align: center; box-shadow: 0 12px 40px rgba(60, 40, 10, 0.25); }
.cardBox.wide { width: min(520px, 92vw); max-height: 80vh; display: flex; flex-direction: column; }
.cardTitle { font-size: 22px; font-weight: 800; }
.cardSize { font-size: 34px; font-weight: 800; color: #e2703a; margin: 4px 0; }
.cardLine { color: #6b6357; font-size: 15px; line-height: 1.5; }
.cardNote { color: #2f8f86; font-size: 14px; font-weight: 700; margin-top: 8px; min-height: 1px; }
.cardBtns { display: flex; gap: 8px; margin-top: 16px; justify-content: center; }
.btn { border: 0; border-radius: 16px; padding: 11px 16px; font-family: inherit; font-size: 15px; font-weight: 700; background: #efe7d6; color: #4a4439; cursor: pointer; }
.btn.hot { background: #e2703a; color: #fff; }
.btn:disabled { opacity: 0.4; }
.dexList { overflow: auto; margin-top: 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; text-align: left; }
.dexItem { background: #f6f0e3; border-radius: 14px; padding: 10px 12px; font-size: 13px; }
.dexItem b { display: block; font-size: 15px; }
.dexItem .sw { display: inline-block; width: 12px; height: 12px; border-radius: 50%; vertical-align: -1px; margin-right: 5px; }
.dexItem.unknown { opacity: 0.45; }
.dexSpot { grid-column: 1 / -1; font-weight: 800; font-size: 14px; color: #7a7266; margin-top: 4px; }

#mungHint { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); color: rgba(255, 255, 255, 0.85); font-size: 13px; z-index: 5; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4); pointer-events: none; }
body.mung #hud, body.mung #topRight, body.mung #dock, body.mung #hint, body.mung #toast { opacity: 0; pointer-events: none; transition: opacity 0.8s; }

#loading { position: fixed; inset: 0; background: #f6efe0; display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 20; transition: opacity 0.6s; }
#loading div { font-size: 54px; animation: bob 1s infinite alternate ease-in-out; }
#loading p { color: #7a7266; font-weight: 600; }
@keyframes bob { from { transform: translateY(0); } to { transform: translateY(-10px); } }

button.pill { border: 0; font-family: inherit; color: inherit; cursor: pointer; }
.mapList { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.mapItem { text-align: left; display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; }
.mapItem b { font-size: 16px; }
.mapItem span { font-size: 13px; font-weight: 500; opacity: 0.8; }
.mapItem.hot span { opacity: 0.95; }

.gearPill { font-size: 13px; }
#fightUI { position: fixed; left: 50%; bottom: 104px; transform: translateX(-50%); width: min(320px, 80vw); background: rgba(255, 252, 244, 0.92); border-radius: 16px; padding: 9px 12px 8px; z-index: 6; box-shadow: 0 6px 20px rgba(60, 40, 10, 0.16); text-align: center; pointer-events: none; }
.fightTrack { height: 12px; border-radius: 8px; background: #ece3d1; overflow: hidden; position: relative; }
.fightTrack::after { content: ''; position: absolute; left: 75%; top: 0; bottom: 0; width: 2px; background: rgba(0,0,0,0.15); }
#fightBar { height: 100%; width: 30%; background: #58b37a; border-radius: 8px; transition: background 0.2s; }
#fightTxt { font-size: 13px; font-weight: 700; margin-top: 5px; color: #4a4439; }
.genreTabs { display: flex; gap: 6px; margin-top: 12px; }
.genreTabs .btn { flex: 1; padding: 10px 6px; font-size: 14px; }
.gearRows { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; text-align: left; }
.gearRow { display: flex; gap: 10px; font-size: 14px; line-height: 1.45; }
.gearRow b { flex: 0 0 70px; color: #7a7266; font-size: 13px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 0; border-radius: 99px; padding: 6px 11px; font-family: inherit; font-size: 13px; font-weight: 700; background: #efe7d6; color: #4a4439; cursor: pointer; }
.chip.hot { background: #2f8f86; color: #fff; }
.gearTip { margin-top: 12px; background: #f6f0e3; border-radius: 12px; padding: 9px 12px; font-size: 13px; color: #6b6357; text-align: left; }
#dock button { touch-action: none; -webkit-touch-callout: none; }
.chip small { font-weight: 500; opacity: 0.75; margin-left: 3px; }

.mapGroup { font-size: 12px; font-weight: 800; color: #9a8f7c; margin: 6px 2px 0; text-align: left; }
.mapItem em { font-style: normal; font-size: 11px; background: #2c2a26; color: #ffd76a; padding: 2px 7px; border-radius: 99px; margin-left: 6px; vertical-align: 2px; }
.mapItem.soon { opacity: 0.5; cursor: default; }
.mapItem.soon em { background: #9a8f7c; color: #fff; }

/* ---------- 인벤토리 ---------- */
.invBox { width: min(1040px, 96vw); height: min(640px, 90vh); background: #2b2f3a; border-radius: 22px; box-shadow: 0 18px 50px rgba(0,0,0,0.35); display: flex; flex-direction: column; overflow: hidden; color: #f4efe4; }
.invHead { display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: #232631; border-bottom: 1px solid #3a3f4d; }
.invHead b { font-size: 18px; }
.invGenre { font-size: 13px; color: #c9c1b0; background: #353a48; padding: 4px 10px; border-radius: 99px; }
.invX { margin-left: auto; border: 0; background: #3a3f4d; color: #f4efe4; width: 34px; height: 34px; border-radius: 10px; font-size: 16px; cursor: pointer; }
.invBody { flex: 1; display: grid; grid-template-columns: 150px 1fr 280px; min-height: 0; }
.equipPanel { padding: 14px; border-right: 1px solid #3a3f4d; background: #262a35; }
.ptitle { font-size: 12px; font-weight: 800; color: #9aa2b4; margin-bottom: 10px; letter-spacing: 0.05em; }
.slots { display: grid; gap: 10px; }
.slot { position: relative; border: 2px solid #4a5163; background: #1f222c; border-radius: 14px; aspect-ratio: 1; padding: 0; cursor: pointer; overflow: hidden; }
.slot img, .cell img { width: 100%; height: 100%; object-fit: contain; display: block; }
.slot span { position: absolute; left: 0; right: 0; bottom: 0; font-size: 11px; font-weight: 800; background: rgba(0,0,0,0.45); color: #fff; padding: 2px 0; font-family: inherit; }
.gridPanel { display: flex; flex-direction: column; min-height: 0; padding: 12px 14px; }
.invTabs { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.invTab { border: 0; border-radius: 99px; padding: 7px 13px; font-family: inherit; font-size: 13px; font-weight: 700; background: #353a48; color: #c9c1b0; cursor: pointer; }
.invTab.on { background: #f2b544; color: #2b2f3a; }
.invGrid { flex: 1; overflow: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; align-content: start; padding-right: 4px; }
.cell { position: relative; border: 2px solid #4a5163; background: #1f222c; border-radius: 14px; padding: 4px 4px 22px; aspect-ratio: 0.82; cursor: pointer; font-family: inherit; }
.cell .nm { position: absolute; left: 3px; right: 3px; bottom: 4px; font-size: 10.5px; font-weight: 700; color: #e9e3d6; line-height: 1.15; max-height: 2.3em; overflow: hidden; }
.cell .cnt { position: absolute; right: 6px; top: 4px; font-size: 11px; font-weight: 800; color: #f2b544; }
.cell .eqm { position: absolute; left: 6px; top: 4px; font-size: 10px; font-weight: 900; background: #58b37a; color: #fff; border-radius: 6px; padding: 1px 5px; }
.cell.sel { outline: 3px solid #f2b544; outline-offset: 1px; }
.cell:active, .slot:active { transform: scale(0.97); }
/* 등급 테두리: 일반 회색 / 고급 파랑 / 희귀 보라 */
.t0 { border-color: #5a6173 !important; }
.t1 { border-color: #4f8fd0 !important; background: linear-gradient(160deg, #1f2a3d, #1f222c) !important; }
.t2 { border-color: #a46fe0 !important; background: linear-gradient(160deg, #2e2340, #1f222c) !important; box-shadow: 0 0 12px rgba(164,111,224,0.35); }
.detailPanel { border-left: 1px solid #3a3f4d; padding: 16px; overflow: auto; background: #262a35; display: flex; flex-direction: column; gap: 10px; }
.dicon { border: 2px solid #4a5163; border-radius: 18px; aspect-ratio: 1.4; background: #1f222c; overflow: hidden; }
.dicon img { width: 100%; height: 100%; object-fit: contain; }
.dname { font-size: 18px; font-weight: 800; line-height: 1.3; }
.dtags { display: flex; flex-wrap: wrap; gap: 6px; }
.dtags span { font-size: 12px; font-weight: 700; background: #353a48; color: #c9c1b0; padding: 3px 9px; border-radius: 99px; }
.dtags .tier.t0 { background: #5a6173; color: #fff; } .dtags .tier.t1 { background: #4f8fd0; color: #fff; } .dtags .tier.t2 { background: #a46fe0; color: #fff; }
.stat { display: grid; grid-template-columns: 82px 1fr 40px; align-items: center; gap: 8px; font-size: 12.5px; }
.stat b { color: #c9c1b0; font-weight: 700; }
.stat em { font-style: normal; font-weight: 800; color: #f2b544; text-align: right; }
.sbar { height: 9px; background: #1f222c; border-radius: 6px; overflow: hidden; }
.sbar i { display: block; height: 100%; background: linear-gradient(90deg, #58b37a, #f2b544); border-radius: 6px; }
.dtxt { font-size: 13px; color: #d8d1c2; line-height: 1.55; }
.fishChips { display: flex; flex-wrap: wrap; gap: 6px; }
.fishChips span { font-size: 12px; background: #2f8f86; color: #fff; padding: 4px 9px; border-radius: 99px; font-weight: 700; }
.dbtn { margin-top: auto; width: 100%; padding: 12px; font-size: 15px; }
.dbtn:disabled { background: #3a3f4d; color: #9aa2b4; opacity: 1; }
.dnote { margin-top: auto; font-size: 12.5px; color: #9aa2b4; text-align: center; }
/* 좁은 화면(휴대폰·세로 태블릿): 위아래로 쌓기 */
@media (max-width: 900px) {
  .invBox { height: 92vh; }
  .invBody { grid-template-columns: 1fr; grid-template-rows: auto 1fr auto; overflow: auto; }
  .equipPanel { border-right: 0; border-bottom: 1px solid #3a3f4d; }
  .slots { grid-template-columns: repeat(4, 1fr); }
  .detailPanel { border-left: 0; border-top: 1px solid #3a3f4d; }
  .dicon { aspect-ratio: 3.2; }
  .gridPanel { min-height: 0; }
  .invGrid { flex: none; max-height: none; overflow: visible; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
  .slot { max-height: 110px; }
  .equipPanel { padding: 10px 14px; }
}

/* ---------- 생활 요소: 상단 표시·가게 ---------- */
.staPill { display: flex; align-items: center; gap: 6px; }
.staTrack { width: 70px; height: 9px; background: #ece3d1; border-radius: 6px; overflow: hidden; }
#staBar { display: block; height: 100%; width: 100%; background: #58b37a; border-radius: 6px; transition: width 0.4s; }
#staTxt { font-size: 12px; min-width: 20px; }
.cardBtns { flex-wrap: wrap; }
.shopBox { width: min(760px, 96vw); height: min(620px, 90vh); }
.shopLine { padding: 10px 18px; font-size: 14px; color: #f2e6c8; background: #2f3443; border-bottom: 1px solid #3a3f4d; min-height: 20px; }
.shopTabs { padding: 10px 14px 0; }
.shopBody { flex: 1; overflow: auto; padding: 10px 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.srow { display: grid; grid-template-columns: 16px 1fr auto auto auto; align-items: center; gap: 10px; background: #1f222c; border: 1px solid #3a3f4d; border-radius: 12px; padding: 9px 12px; font-size: 14px; }
.srow b { font-weight: 800; } .srow em { font-style: normal; color: #c9c1b0; font-size: 13px; }
.srow .pr { color: #f2b544; font-weight: 800; }
.srow .btn { padding: 7px 12px; font-size: 13px; }
.srow .sw { width: 14px; height: 14px; border-radius: 50%; }
.srow.done { opacity: 0.6; }
#shopBody .srow:has(.qbar) { grid-template-columns: 1fr auto 120px auto; }
.qbar { height: 9px; }
.sall { margin-top: 6px; padding: 12px; font-size: 15px; }
.empty { color: #c9c1b0; font-size: 14px; padding: 6px 2px; } .empty small { color: #9aa2b4; }
.shopGrid { flex: none; overflow: visible; }
.cell .price { position: absolute; left: 4px; right: 4px; top: 4px; font-size: 11px; font-weight: 800; color: #f2b544; text-align: left; }
.cell.poor { opacity: 0.45; }
.cell.locked img { filter: grayscale(1) brightness(0.55); }
.cell .lock { position: absolute; left: 4px; top: 4px; font-size: 10.5px; font-weight: 800; color: #f2b544; background: rgba(0,0,0,0.5); border-radius: 6px; padding: 1px 5px; }
.cell.empty0 .cnt { color: #e2503a; }

/* 이웃 대화 */
.talkBox{background:#fffaf0;border-radius:22px;padding:18px 20px;width:min(360px,88vw);box-shadow:0 12px 40px rgba(0,0,0,.25);color:#3b2f22}
.talkName{font-weight:800;font-size:18px;display:flex;justify-content:space-between;align-items:center}
.hearts{color:#e8607a;font-size:13px;letter-spacing:1px}.hearts i{color:#e6d8c8;font-style:normal}
.talkLine{margin:10px 0;font-size:15px;line-height:1.5}
.talkReq{background:#f3e6cf;border-radius:12px;padding:10px 12px;font-size:14px;line-height:1.6}
.talkBtns{display:flex;gap:8px;margin-top:12px}.talkBtns .btn{flex:1}
.talkBtns .btn:disabled{opacity:.45}
.srow.meRow{background:rgba(255,214,102,.25)}

/* v19: 코치·수족관·대물·HUD 정리 */
#coach { position: fixed; left: 50%; bottom: calc(max(16px, env(safe-area-inset-bottom)) + 100px); transform: translateX(-50%); display: flex; align-items: center; gap: 10px; background: rgba(255, 250, 238, 0.96); border: 2px solid #f2c46b; padding: 9px 12px 9px 10px; border-radius: 18px; box-shadow: 0 6px 22px rgba(60, 40, 10, 0.2); z-index: 5; width: max-content; max-width: 92vw; animation: coachIn 0.4s ease; }
#coach .coachIc { font-size: 26px; }
#coach .coachTx b { display: block; font-size: 15px; color: #3b2f22; }
#coach .coachTx small { display: block; font-size: 12px; color: #8a7d68; margin-top: 2px; }
#coach .coachN { font-size: 11px; color: #b09a74; font-weight: 700; }
#coach button { border: 0; background: none; font-size: 15px; color: #b09a74; cursor: pointer; padding: 4px; }
@keyframes coachIn { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }
body.mung #coach { opacity: 0; pointer-events: none; }
.aquaList { display: flex; flex-direction: column; gap: 6px; max-height: 46vh; overflow: auto; margin-top: 8px; }
.aquaList .empty { font-size: 12px; color: #8a7d68; padding: 6px 2px; }
.aquaCnt { font-size: 12px; color: #8a7d68; font-weight: 600; }
.cardBox.big { box-shadow: 0 0 0 3px #f2c46b, 0 0 40px rgba(242, 196, 107, 0.7), 0 12px 40px rgba(60, 40, 10, 0.25); animation: bigPop 0.5s ease; }
@keyframes bigPop { 0% { transform: scale(0.85); } 60% { transform: scale(1.05); } 100% { transform: scale(1); } }
#season { cursor: default; }
@media (max-width: 640px) {
  #hud { left: 10px; top: 10px; gap: 5px; }
  .pill { font-size: 12px; padding: 5px 10px; }
  .title { font-size: 13px; }
  #topRight { right: 10px; top: 10px; gap: 6px; }
  .round { width: 36px; height: 36px; font-size: 16px; }
  #coach .coachTx b { font-size: 14px; }
}

/* v20: 설정 창 · 로딩 막대 */
.setRow { display: flex; align-items: center; justify-content: space-between; margin: 8px 0; font-weight: 700; font-size: 14px; }
.setRow .btn { min-width: 130px; }
.setSec { margin-top: 12px; }
.setSec b { display: block; font-size: 15px; }
.setSec small { display: block; color: #8a7d68; font-size: 12px; line-height: 1.5; margin-top: 3px; }
.saveCode { width: 100%; box-sizing: border-box; margin-top: 10px; border: 1px solid #e6d8c0; border-radius: 10px; padding: 8px; font-size: 11px; font-family: ui-monospace, monospace; background: #fffdf8; resize: none; }
.loadTrack { display: block; width: 180px; height: 8px; border-radius: 99px; background: #e8dcc4; overflow: hidden; margin-top: 6px; }
.loadTrack i { display: block; height: 100%; width: 4%; background: #e8a24a; border-radius: 99px; transition: width 0.3s; }
#settings .talkBox { max-height: 88vh; overflow: auto; }
#settings .btn { padding: 9px 10px; font-size: 13px; }
@media (max-width: 640px) {
  #hint { top: auto; bottom: calc(max(16px, env(safe-area-inset-bottom)) + 100px); white-space: normal; width: 84vw; text-align: center; font-size: 12px; border-radius: 14px; }
  #dock button { font-size: 11px; }
}

/* v22: 말랑 클레이 톤 — 따로 떠 있는 파스텔 말랑 버튼 · 둥근 말랑 태그 · 부드러운 그림자(진한 테두리·나무결 없음) */
#dock { background: none; border: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; padding: 0; gap: 10px; align-items: flex-end; }
#dock button { min-width: 60px; padding: 0; gap: 4px; color: #6b5444; font-weight: 800; font-size: 12px; text-shadow: 0 1px 0 rgba(255,255,255,0.9), 0 0 6px rgba(255,255,255,0.8); border-radius: 0; background: none; }
#dock button .ic { width: 52px; height: 52px; border-radius: 42% 42% 46% 46% / 46% 46% 42% 42%; display: grid; place-items: center; font-size: 22px;
  background: radial-gradient(circle at 35% 28%, rgba(255,255,255,0.95) 0 12%, rgba(255,255,255,0) 34%), linear-gradient(180deg, var(--c1, #fff6ea), var(--c2, #f3dfc8));
  box-shadow: inset 0 -5px 0 rgba(120, 80, 50, 0.12), inset 0 3px 2px rgba(255,255,255,0.7), 0 6px 0 var(--c3, #e2c6a8), 0 10px 16px rgba(110, 70, 40, 0.22); transition: transform 0.12s; }
#dock button .ic svg { width: 28px; height: 28px; }
#dock button:nth-child(5n+1) .ic { --c1: #fff3d6; --c2: #ffe2a8; --c3: #f0c77a; }
#dock button:nth-child(5n+2) .ic { --c1: #e6f6ec; --c2: #c6ebd3; --c3: #9fd2b2; }
#dock button:nth-child(5n+3) .ic { --c1: #ffeae4; --c2: #ffd1c4; --c3: #f2ab98; }
#dock button:nth-child(5n+4) .ic { --c1: #e8f1fb; --c2: #cde0f6; --c3: #a6c3e6; }
#dock button:nth-child(5n+5) .ic { --c1: #f3ecfb; --c2: #e1d3f5; --c3: #c2acea; }
#dock button.hot { background: none; color: #d4602c; }
#dock button.hot .ic { --c1: #ffe9cf; --c2: #ffb98a; --c3: #ee8f5a; }
#dock button:active .ic { transform: translateY(4px); box-shadow: inset 0 -3px 0 rgba(120,80,50,0.12), inset 0 3px 2px rgba(255,255,255,0.7), 0 2px 0 var(--c3, #e2c6a8), 0 4px 8px rgba(110,70,40,0.2); }
#dock button.pulse { animation: none; }
#dock button.pulse .ic { animation: squish 0.55s infinite alternate ease-in-out; }
@keyframes squish { from { transform: scale(1, 1); } to { transform: scale(1.1, 0.92) translateY(2px); } }
#dock button .lb { white-space: nowrap; background: rgba(255, 251, 244, 0.85); padding: 1px 7px; border-radius: 99px; text-shadow: none; }

#mapBtn.sign { border: 0; background: none; padding: 0; font-family: inherit; cursor: pointer; filter: none; }
#mapBtn .signBoard { display: block; padding: 8px 16px 9px 12px; color: #6b4a36; font-size: 15px; font-weight: 800; border-radius: 22px 22px 22px 8px;
  background: radial-gradient(circle at 18% 20%, rgba(255,255,255,0.9) 0 8%, rgba(255,255,255,0) 26%), linear-gradient(180deg, #fff1e2, #ffd9bd);
  box-shadow: inset 0 -4px 0 rgba(200, 120, 70, 0.14), 0 5px 0 #f0b896, 0 9px 14px rgba(110, 70, 40, 0.2); }
#mapBtn .signBoard .sub { color: #b0866a; font-weight: 600; }

#hud .pill { background: linear-gradient(180deg, #fffdf8, #fbf0e2); border: 0; border-radius: 16px; color: #5e4a3c; box-shadow: inset 0 -3px 0 rgba(150, 110, 70, 0.1), 0 4px 0 #ecdcc6, 0 7px 12px rgba(110, 70, 40, 0.14); backdrop-filter: none; -webkit-backdrop-filter: none; }
#hud .gearPill { background: linear-gradient(180deg, #f2fbf4, #dcf1e3); box-shadow: inset 0 -3px 0 rgba(80, 140, 100, 0.1), 0 4px 0 #bfe0c9, 0 7px 12px rgba(110, 70, 40, 0.14); }
#hud { gap: 9px; }

#topRight { flex-direction: column; align-items: flex-end; }
.woodRound { width: 48px !important; height: 48px !important; border: 0 !important; display: grid; place-items: center; padding: 0;
  background: radial-gradient(circle at 34% 28%, rgba(255,255,255,0.95) 0 12%, rgba(255,255,255,0) 34%), linear-gradient(180deg, #fff3d6, #ffe0a3) !important;
  box-shadow: inset 0 -4px 0 rgba(160, 110, 40, 0.14), 0 5px 0 #f0c77a, 0 9px 14px rgba(110, 70, 40, 0.2) !important; border-radius: 44% !important; }
.woodRound svg { width: 28px; height: 28px; }
.menu { margin-top: 10px; background: #fffaf2; border: 0; border-radius: 20px; padding: 7px; display: flex; flex-direction: column; gap: 2px; box-shadow: 0 5px 0 #ecdcc6, 0 10px 20px rgba(110, 70, 40, 0.2); }
.menu button { display: flex; align-items: center; gap: 9px; border: 0; background: none; font-family: inherit; font-size: 14px; font-weight: 700; color: #5e4a3c; padding: 8px 14px 8px 8px; border-radius: 14px; cursor: pointer; text-align: left; }
.menu button:active, .menu button:hover { background: #fdeedd; }
.menu button svg { width: 22px; height: 22px; flex: none; }
body.mung #menu { display: none; }
@media (max-width: 640px) {
  #dock { gap: 6px; }
  #dock button { min-width: 50px; }
  #dock button .ic { width: 44px; height: 44px; }
  #dock button .ic svg { width: 24px; height: 24px; }
  #mapBtn .signBoard { font-size: 13px; padding: 6px 12px 7px 10px; }
  .woodRound { width: 42px !important; height: 42px !important; }
}
#toast { background: linear-gradient(180deg, #fffdf8, #fbf0e2); color: #5e4a3c; border-radius: 22px; box-shadow: inset 0 -4px 0 rgba(150,110,70,0.1), 0 5px 0 #ecdcc6, 0 10px 18px rgba(110,70,40,0.18); }
/* v23: 한 톤 더 가볍게 — 높이(두께)·그림자 줄이고 색은 더 하얗게, 살짝 비치게 */
#dock { gap: 12px; }
#dock button .ic { width: 46px; height: 46px; border-radius: 50%;
  background: radial-gradient(circle at 34% 26%, rgba(255,255,255,0.95) 0 10%, rgba(255,255,255,0) 30%), linear-gradient(180deg, var(--c1, #fffaf2), var(--c2, #f6ebdc));
  box-shadow: inset 0 -2px 0 rgba(120,80,50,0.07), 0 3px 0 var(--c3, #eedfcc), 0 6px 12px rgba(110,70,40,0.13); }
#dock button .ic svg { width: 25px; height: 25px; }
#dock button:nth-child(5n+1) .ic { --c1: #fffaeb; --c2: #fff0cc; --c3: #f6dca2; }
#dock button:nth-child(5n+2) .ic { --c1: #f3fbf6; --c2: #ddf3e5; --c3: #bfe3cc; }
#dock button:nth-child(5n+3) .ic { --c1: #fff5f2; --c2: #ffe4dc; --c3: #f6c7b9; }
#dock button:nth-child(5n+4) .ic { --c1: #f4f8fd; --c2: #e1ecf9; --c3: #c3d6ee; }
#dock button:nth-child(5n+5) .ic { --c1: #f8f4fd; --c2: #ece3f9; --c3: #d4c5ef; }
#dock button.hot .ic { --c1: #fff2e2; --c2: #ffcfa8; --c3: #f2ac7e; }
#dock button:active .ic { transform: translateY(2px); box-shadow: 0 1px 0 var(--c3, #eedfcc), 0 3px 6px rgba(110,70,40,0.12); }
#dock button .lb { background: rgba(255,255,255,0.72); font-size: 11px; font-weight: 700; color: #7a6352; }
#dock button.hot .lb { color: #d4602c; }
#mapBtn .signBoard { background: radial-gradient(circle at 16% 20%, rgba(255,255,255,0.9) 0 8%, rgba(255,255,255,0) 26%), linear-gradient(180deg, #fffaf4, #ffeadb); box-shadow: 0 3px 0 #f6d3bd, 0 6px 12px rgba(110,70,40,0.12); color: #6b4a36; }
#hud .pill { background: rgba(255,253,249,0.9); box-shadow: 0 2px 0 #efe3d3, 0 5px 10px rgba(110,70,40,0.1); font-weight: 600; }
#hud .gearPill { background: rgba(244,251,246,0.92); box-shadow: 0 2px 0 #d3eadb, 0 5px 10px rgba(110,70,40,0.1); }
.woodRound { width: 44px !important; height: 44px !important; border-radius: 50% !important;
  background: radial-gradient(circle at 34% 26%, rgba(255,255,255,0.95) 0 10%, rgba(255,255,255,0) 30%), linear-gradient(180deg, #fffaeb, #fff0cc) !important;
  box-shadow: 0 3px 0 #f6dca2, 0 6px 12px rgba(110,70,40,0.13) !important; }
.menu { box-shadow: 0 3px 0 #efe3d3, 0 8px 16px rgba(110,70,40,0.14); }
#toast { background: rgba(255,253,249,0.95); box-shadow: 0 3px 0 #efe3d3, 0 8px 16px rgba(110,70,40,0.14); }
@media (max-width: 640px) { #dock { gap: 7px; } #dock button .ic { width: 40px; height: 40px; } #dock button .ic svg { width: 22px; height: 22px; } }

/* v24: 창 디자인 통일(밝은 크림 클레이) · 작은 알림 · 아이콘 */
.ico { display: inline-block; width: 1.2em; height: 1.2em; vertical-align: -0.24em; font-style: normal; }
.ico svg { width: 100%; height: 100%; display: block; }
#hud .pill { display: inline-flex; align-items: center; gap: 4px; }
#coach .coachIc { width: 30px; height: 30px; display: block; } #coach .coachIc svg { width: 100%; height: 100%; }
#coach { border: 0; background: rgba(255,253,249,0.96); box-shadow: 0 3px 0 #efe3d3, 0 8px 16px rgba(110,70,40,0.14); border-radius: 20px; }
#toast.mini { top: auto; bottom: calc(max(16px, env(safe-area-inset-bottom)) + 172px); transform: translate(-50%, 8px) scale(0.96); padding: 8px 15px; font-size: 14px; border-radius: 18px; max-width: 78vw; }
#toast.mini.show { transform: translate(-50%, 0) scale(1); }
#toast.mini small { display: inline; margin: 0 0 0 6px; font-size: 12px; }
#toast small .ico, #toast .ico { vertical-align: -0.22em; }

/* 공통 창: 크림색 둥근 창 + 부드러운 그림자 */
.modal { background: rgba(70, 50, 30, 0.14); }
.cardBox, .talkBox { background: #fffaf3; color: #5e4a3c; border-radius: 26px; box-shadow: 0 4px 0 #efe3d3, 0 16px 36px rgba(110, 70, 40, 0.2); }
.cardTitle { color: #5e4a3c; } .cardSize { color: #f08a4b; } .cardLine { color: #8a7464; } .cardNote { color: #3f9a7c; }
.btn { background: #f7ede0; color: #5e4a3c; border-radius: 16px; box-shadow: 0 3px 0 #e8d8c3; transition: transform 0.1s; }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #e8d8c3; }
.btn.hot { background: linear-gradient(180deg, #ffad78, #f48a4e); color: #fff; box-shadow: 0 3px 0 #dc7440; }
.btn.hot:active { box-shadow: 0 1px 0 #dc7440; }
.dexItem { background: #fdf3e6; } .dexSpot { color: #a08a76; }
.mapItem em { background: #ffe3cf; color: #c0602a; }
.chip { background: #f7ede0; color: #5e4a3c; } .chip.hot { background: #6cc49a; color: #fff; }
.gearTip { background: #fdf3e6; color: #8a7464; }
.talkReq { background: #fdf0de; }

/* 인벤토리·가게: 어두운 창 → 밝은 크림 창 */
.invBox { background: #fffaf3; color: #5e4a3c; box-shadow: 0 4px 0 #efe3d3, 0 18px 44px rgba(110, 70, 40, 0.22); border-radius: 26px; }
.invHead { background: #fff1e2; border-bottom: 1px solid #f3e3cf; }
.invGenre { background: #ffffff; color: #8a7464; box-shadow: 0 2px 0 #efe3d3; }
.invX { background: #f7ede0; color: #8a7464; box-shadow: 0 2px 0 #e8d8c3; border-radius: 12px; }
.equipPanel, .detailPanel { background: #fdf6ec; border-color: #f3e3cf !important; }
.ptitle { color: #b09a86; }
.slot, .cell, .dicon { background: #ffffff; border-color: #eadccb; box-shadow: 0 3px 0 #efe3d3; }
.slot span { background: rgba(255, 241, 226, 0.92); color: #7a6352; }
.invTab { background: #f7ede0; color: #8a7464; } .invTab.on { background: #ffd88a; color: #6b4a2a; box-shadow: 0 2px 0 #f0c368; }
.cell .nm { color: #6b5444; } .cell .cnt, .cell .price, .srow .pr, .stat em { color: #e0873e; }
.cell .eqm { background: #6cc49a; }
.cell.sel { outline-color: #ffb36b; }
.t0 { border-color: #eadccb !important; }
.t1 { border-color: #9cc4ec !important; background: linear-gradient(160deg, #eef6fe, #ffffff) !important; }
.t2 { border-color: #c9a8ef !important; background: linear-gradient(160deg, #f6effd, #ffffff) !important; box-shadow: 0 3px 0 #e4d4f7, 0 0 12px rgba(180, 140, 230, 0.3) !important; }
.dtags span { background: #f7ede0; color: #8a7464; }
.dtags .tier.t0 { background: #d9cbb8; } .dtags .tier.t1 { background: #7fb0e3; } .dtags .tier.t2 { background: #b48be6; }
.stat b { color: #8a7464; } .sbar { background: #f3e8da; } .sbar i { background: linear-gradient(90deg, #8fd6b0, #ffc978); }
.dtxt { color: #7a6352; } .fishChips span { background: #6cc49a; }
.dbtn:disabled { background: #efe5d8; color: #b09a86; box-shadow: none; }
.dnote { color: #a08a76; }
.shopLine { background: #fff7ec; color: #8a6a52; border-bottom: 1px solid #f3e3cf; }
.srow { background: #ffffff; border: 0; box-shadow: 0 2px 0 #efe3d3; color: #5e4a3c; }
.srow em { color: #a08a76; }
.empty { color: #8a7464; } .empty small { color: #b09a86; }
.cell.locked img { filter: grayscale(1) brightness(1.05) opacity(0.55); }
.cell .lock { background: #fff1e2; color: #c0602a; }
.cell.empty0 .cnt { color: #e0603a; }
.srow.meRow { background: #fff4d6; }
#fightUI { background: rgba(255,253,249,0.95); box-shadow: 0 3px 0 #efe3d3, 0 8px 16px rgba(110,70,40,0.14); border-radius: 18px; }
#fightTxt { color: #5e4a3c; }
.staTrack, .fightTrack { background: #f1e6d6; }
#loading { background: #fff7ec; }

/* v25: 기록판 */
#hud .recPill { font-size: 12px; gap: 6px; max-width: min(520px, 76vw); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; background: rgba(255, 248, 228, 0.92); box-shadow: 0 2px 0 #f2dfae, 0 5px 10px rgba(110,70,40,0.1); }
#hud .recPill b { color: #b07a2a; font-weight: 800; }
#hud .recPill span { color: #5e4a3c; font-weight: 700; } #hud .recPill span.none { color: #b8a690; font-weight: 600; }
.recBox { text-align: left; }
.recTabs { margin: 10px 0 4px; }
.recList { overflow: auto; display: flex; flex-direction: column; gap: 6px; padding: 2px; }
.recRow { display: grid; grid-template-columns: 14px 1fr auto 64px 70px; align-items: center; gap: 8px; background: #fff; border-radius: 12px; padding: 8px 12px; box-shadow: 0 2px 0 #efe3d3; font-size: 14px; }
.recRow .sw { width: 12px; height: 12px; border-radius: 50%; }
.recRow .gs { display: flex; gap: 2px; align-items: center; } .recRow .gs em { font-style: normal; font-size: 10.5px; background: #3e4a78; color: #fff; border-radius: 6px; padding: 0 5px; margin-left: 3px; }
.recRow .best { font-weight: 800; color: #e0873e; text-align: right; } .recRow .max { font-size: 11.5px; color: #b09a86; text-align: right; }
.recRow.none b { color: #b8a690; } .recRow.none .best { color: #cbbba6; }
.recTour { background: #fff4d6; border-radius: 12px; padding: 8px 12px; font-size: 13.5px; color: #7a5a2a; margin-bottom: 4px; }
@media (max-width: 640px) { .recRow { grid-template-columns: 12px 1fr auto 52px; } .recRow .max { display: none; } #hud .recPill { max-width: 92vw; } }

/* v26: 좁은 화면 인벤토리 — 한 줄로 흐르게 쌓고, 고른 장비 설명·장착 버튼은 아래에 붙여 둔다(겹침 방지) */
@media (max-width: 900px) {
  .invBox { height: 92vh; }
  .invBody { display: block; overflow: auto; position: relative; }
  .equipPanel { padding: 10px 14px; }
  .slots { grid-template-columns: repeat(4, minmax(0, 84px)); gap: 8px; }
  .slot { max-height: none; }
  .gridPanel { display: block; padding: 10px 14px 12px; }
  .invGrid { display: grid; overflow: visible; max-height: none; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
  .detailPanel { position: sticky; bottom: 0; z-index: 2; max-height: 40vh; overflow: auto; border-top: 1px solid #f3e3cf; box-shadow: 0 -8px 16px rgba(110, 70, 40, 0.1); padding: 12px 14px; gap: 8px; }
  .detailPanel .dicon { display: none; }
  .detailPanel .dbtn { position: sticky; bottom: 0; margin-top: 4px; }
}
.invHint { font-size: 11.5px; color: #b09a86; margin: -4px 0 8px 2px; }
.dtags .tier.t0 { background: #cdbca6 !important; color: #fff; border: 0; } .dtags .tier.t1 { background: #7fb0e3 !important; color: #fff; border: 0; box-shadow: none !important; } .dtags .tier.t2 { background: #b48be6 !important; color: #fff; border: 0; box-shadow: none !important; }
#toast.mini { bottom: calc(max(16px, env(safe-area-inset-bottom)) + clamp(96px, 22vh, 172px)); }

.recRow .gs em.day { background: #f2b544; } .recRow .gs em.mig { background: #3f9a7c; }
.recTide { background: #e8f4f6; color: #2f6b7a; }

/* v35: 대물 수면 카메라 창 */
#pip { position: fixed; right: 14px; top: 72px; width: min(300px, 36vw); aspect-ratio: 4 / 3; border-radius: 18px; z-index: 4; pointer-events: none;
  box-shadow: 0 0 0 3px rgba(255,255,255,0.95), 0 8px 20px rgba(60,40,10,0.25); }
#pip span { position: absolute; left: 10px; top: 8px; font-size: 11px; font-weight: 800; color: #fff; background: rgba(0,0,0,0.35); padding: 2px 8px; border-radius: 99px; }
@media (max-width: 640px) { #pip { top: 60px; right: 10px; width: 46vw; } }

.mpPill { margin-top: 8px; background: rgba(255,253,249,0.92); border-radius: 14px; padding: 4px 10px; font-size: 13px; font-weight: 800; color: #5e4a3c; box-shadow: 0 2px 0 #efe3d3, 0 5px 10px rgba(110,70,40,0.1); }

.mapItem .mapCnt { float: right; font-size: 12px; font-weight: 800; color: #3f9a7c; background: #e6f6ec; border-radius: 99px; padding: 2px 8px; margin-left: 6px; }
.mapItem.hot .mapCnt { background: rgba(255,255,255,0.85); }
.mapItem .mapCnt.zero { display: none; }

/* v47: 채팅 */
.chatBtn { position: fixed; left: 14px; bottom: calc(max(16px, env(safe-area-inset-bottom)) + 4px); width: 46px; height: 46px; border-radius: 50%; border: 0; font-size: 21px; cursor: pointer; z-index: 6;
  background: radial-gradient(circle at 34% 26%, rgba(255,255,255,0.95) 0 10%, rgba(255,255,255,0) 30%), linear-gradient(180deg, #f3fbf6, #ddf3e5); box-shadow: 0 3px 0 #bfe3cc, 0 6px 12px rgba(110,70,40,0.13); }
.chatLog { position: fixed; left: 14px; bottom: calc(max(16px, env(safe-area-inset-bottom)) + 60px); width: min(320px, 70vw); display: flex; flex-direction: column; gap: 3px; z-index: 5; pointer-events: none; opacity: 0.35; transition: opacity 0.6s; }
.chatLog.fresh { opacity: 1; }
.chatRow { background: rgba(255,253,249,0.9); border-radius: 12px; padding: 4px 10px; font-size: 13px; color: #5e4a3c; box-shadow: 0 2px 6px rgba(110,70,40,0.1); width: fit-content; max-width: 100%; word-break: break-all; }
.chatRow b { color: #3f9a7c; margin-right: 4px; } .chatRow.me b { color: #e0873e; } .chatRow.sys { background: rgba(255,244,214,0.92); font-size: 12px; }
.chatBar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(max(16px, env(safe-area-inset-bottom)) + 96px); width: min(460px, 94vw); background: #fffaf3; border-radius: 20px; padding: 10px; z-index: 9;
  box-shadow: 0 4px 0 #efe3d3, 0 12px 26px rgba(110,70,40,0.2); }
.chatQuick { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.chatRowIn { display: flex; gap: 6px; } .chatRowIn input { flex: 1; min-width: 0; border: 2px solid #efe3d3; border-radius: 14px; padding: 9px 12px; font-family: inherit; font-size: 15px; background: #fff; color: #5e4a3c; outline: none; }
.chatRowIn input:focus { border-color: #f6c7a0; } .chatRowIn .btn { padding: 9px 12px; }
body.mung .chatBtn, body.mung .chatLog { opacity: 0; pointer-events: none; }

/* 채팅 버튼은 오른쪽 위(접속 인원 밑)로 — 아래 낚시 버튼을 가리지 않게. 대화 기록도 낚시 버튼 위쪽으로 */
.chatBtn { left: auto; right: 14px; bottom: auto; top: 128px; width: 42px; height: 42px; font-size: 19px; }
.chatLog { bottom: calc(max(16px, env(safe-area-inset-bottom)) + 150px); width: min(300px, 58vw); }
.chatRow { font-size: 12px; padding: 3px 9px; }
@media (max-width: 640px) { .chatBtn { right: 10px; top: 112px; width: 38px; height: 38px; } .chatLog { bottom: calc(max(16px, env(safe-area-inset-bottom)) + 170px); width: 62vw; } }

/* 화면이 낮으면(가로 휴대폰·작은 창) 채팅 기록이 위쪽 표시를 덮지 않게 줄이고 아래로 */
@media (max-height: 560px) { .chatLog { bottom: calc(max(16px, env(safe-area-inset-bottom)) + 96px); max-height: 30vh; overflow: hidden; justify-content: flex-end; } .chatLog .chatRow:nth-last-child(n+4) { display: none; } }
/* 채팅 기록: 평소에도 잘 보이게(흐려도 70%), 낮은 화면에선 오른쪽 💬 옆으로 옮겨 감기 게이지·위쪽 표시와 안 겹치게 */
.chatLog { opacity: 0.72; }
@media (max-height: 560px) {
  .chatLog { left: auto; right: 58px; top: 108px; bottom: auto; width: min(300px, 46vw); align-items: flex-end; max-height: none; justify-content: flex-start; }
  .chatLog .chatRow:nth-last-child(n+4) { display: none; }
}

/* v54: 서버 최대어 */
#hud .bestPill { font-size: 12px; gap: 5px; background: linear-gradient(180deg, #fff6d8, #ffe9a8) !important; box-shadow: 0 2px 0 #f0cf78, 0 5px 10px rgba(110,70,40,0.12) !important; color: #7a5520; max-width: min(420px, 70vw); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
#hud .bestPill b { color: #c0602a; }
#hud .row:has(#recPill) { flex-wrap: wrap; }
.recRow small.srv { display: block; font-size: 10.5px; font-weight: 700; color: #b07a2a; }

/* v55: 꾸미기 */
.decoBar { position: fixed; left: 50%; transform: translateX(-50%); bottom: max(14px, env(safe-area-inset-bottom)); width: min(620px, 96vw); background: #fffaf3; border-radius: 22px; padding: 10px 12px; z-index: 7; box-shadow: 0 4px 0 #efe3d3, 0 12px 26px rgba(110,70,40,0.2); }
.decoHint { font-size: 13px; font-weight: 700; color: #8a6a52; margin-bottom: 8px; }
.decoItems { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.decoItems .chip { white-space: nowrap; flex: none; } .decoItems .chip small { opacity: 0.7; }
.decoEmpty { font-size: 13px; color: #a08a76; }
.decoBtns { display: flex; justify-content: flex-end; gap: 6px; margin-top: 8px; } .decoBtns span { display: flex; gap: 6px; margin-right: auto; }
.dexItem small.law { display: block; margin-top: 3px; font-size: 11px; color: #5f8a5a; }
#dock button.locked { opacity: 0.5; filter: grayscale(1); }
#coach button.coachGo { background: #ffb547; color: #fff; font-weight: 700; font-size: 13px; border-radius: 14px; padding: 7px 11px; white-space: nowrap; box-shadow: 0 2px 0 #e69a2a; }
body.biting #coach { opacity: 0; pointer-events: none; transition: opacity 0.2s; }
#askBox { z-index: 60; }
.askBox p { margin: 8px 0 14px; font-size: 14px; color: #6b5d48; line-height: 1.5; }
.askBtns { display: flex; gap: 10px; justify-content: flex-end; }
.staPill { cursor: pointer; }
.moneyFly { position: fixed; z-index: 30; background: #fff7e2; color: #8a5a1a; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 12px; box-shadow: 0 2px 0 #f0d9a8; pointer-events: none; animation: moneyUp 2.6s ease forwards; white-space: nowrap; }
.moneyFly.big { font-size: 15px; background: #ffe7a8; animation-duration: 4.2s; }
@keyframes moneyUp { 0% { opacity: 0; transform: translateY(6px); } 10% { opacity: 1; transform: none; } 80% { opacity: 1; } 100% { opacity: 0; transform: translateY(-4px); } }
#money { cursor: pointer; }
/* v63: 가상 테스트 반영 — 메뉴가 채팅 버튼 위로, 좁은 폰에서 아래 버튼 줄바꿈, 기록·로그 줄이기 */
#topRight { z-index: 7; }
@media (max-width: 640px) { .chatLog .chatRow:nth-last-child(n+4) { display: none; } }
@media (max-width: 420px) {
  #dock { width: max-content; max-width: 98vw; flex-wrap: wrap; justify-content: center; gap: 4px 6px; }
  #dock button { min-width: 50px; padding: 3px 3px; }
  #dock button .lb { font-size: 10.5px; }
  #bestPill { display: none !important; }
}
.dexHead { grid-column: 1 / -1; background: #fff7e2; border-radius: 14px; padding: 10px 12px; font-size: 13px; }
.dexHead b { font-size: 16px; display: block; margin-bottom: 6px; }
.dexHead .sbar { height: 8px; background: #efe3cc; border-radius: 6px; overflow: hidden; margin-bottom: 6px; }
.dexHead .sbar i { display: block; height: 100%; background: #58b37a; }
.dexHead small { color: #8a7d68; }
/* 갯바람 상회·옷장: 화면 아래쪽 판넬(위로 내 캐릭터가 보이게) */
.closetModal { align-items: flex-end; background: rgba(70, 50, 30, 0.06); }
.closetBox { width: min(560px, 96vw); max-height: 52vh; display: flex; flex-direction: column; margin-bottom: max(10px, env(safe-area-inset-bottom)); }
.closetBox .talkName { display: flex; justify-content: space-between; align-items: center; }
.clLine { font-size: 13px; color: #8a7d68; margin: 4px 0 8px; }
.clList { overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.clRow { display: flex; align-items: center; gap: 8px; background: #fbf4e6; border-radius: 12px; padding: 8px 10px; cursor: pointer; border: 2px solid transparent; }
.clRow.on { border-color: #f2c46b; background: #fff7e2; }
.clRow b { flex: 1; font-size: 14px; }
.clRow em { font-style: normal; font-size: 12px; color: #8a7d68; white-space: nowrap; }
.clCols { display: flex; gap: 4px; }
.clSw { width: 18px; height: 18px; border-radius: 50%; display: inline-block; border: 2px solid #fff; box-shadow: 0 0 0 1px #d8cbb3; }
.clSw.on { box-shadow: 0 0 0 2px #e2703a; }
.clBuy { padding: 5px 10px !important; font-size: 12px !important; }
/* 솔방울 잡화점 */
.sbBox { max-height: 70vh; }
.sbGrid { overflow-y: auto; flex: 1; display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; margin: 8px 0; }
.sbCell .sbIc { font-size: 34px; display: block; height: 64px; line-height: 64px; }
.sbCell .price { font-size: 11px; }
.sbBox { max-height: 88vh; } .sbGrid { min-height: 38vh; } .clList { min-height: 20vh; }
/* v68: 작은 버그 정리 — 아래 버튼 글씨, 튜토리얼 카드 위치, 작은 화면 창 스크롤 */
#dock button .lb { font-size: 12px; }
@media (max-width: 420px) { #dock button .lb { font-size: 11.5px; } }
#coach { bottom: calc(max(16px, env(safe-area-inset-bottom)) + 128px); }
.modal .talkBox { max-height: 92vh; overflow-y: auto; }
.nickIn { flex: 1; min-width: 0; margin-left: 10px; padding: 8px 10px; border-radius: 10px; border: 2px solid #eadfca; font-family: inherit; font-size: 14px; background: #fffaf0; }
.nickMsg { display: block; margin: 4px 0 8px; color: #8a6a3a; font-size: 12px; min-height: 1em; }
#mpPill { cursor: pointer; }
.bdLv { background: #fff7e2; border-radius: 14px; padding: 10px 12px; margin: 6px 0; font-size: 13px; }
.bdLv b { font-size: 16px; display: block; margin-bottom: 6px; }
.bdLv .sbar { height: 8px; background: #efe3cc; border-radius: 6px; overflow: hidden; margin-bottom: 6px; }
.bdLv .sbar i { display: block; height: 100%; background: #f2b544; }
.bdLv small { color: #8a7d68; }
.bdItem { background: #fbf4e6; border-radius: 12px; padding: 8px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.bdItem.off { opacity: 0.55; }
.bdItem .bdIc { width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 22px; box-shadow: 0 0 0 3px #f2c84a inset; }
.bdItem.off .bdIc { background: #d8cbb3 !important; box-shadow: none; }
.bdItem b { font-size: 13px; } .bdItem small { font-size: 11px; color: #8a7d68; }

/* 반려견 이름 짓기 */
.petCols { display: flex; gap: 8px; justify-content: center; margin: 6px 0 10px; }
.petCol { display: flex; align-items: center; gap: 6px; padding: 6px 12px; }
.petCol i { width: 16px; height: 16px; border-radius: 50%; display: inline-block; box-shadow: inset 0 0 0 2px rgba(0,0,0,0.12); }
.petCol.on { outline: 3px solid #2f8f86; }
.petBox .nickIn { margin-left: 0; width: 100%; box-sizing: border-box; font-size: 17px; padding: 10px 12px; border-radius: 12px; border: 2px solid #e2d6c0; }

/* 장비창: 낚시 종류별 설명 + 칸 묶음 제목 */
.invHelp { grid-column: 1 / -1; background: #fff7e6; border-radius: 12px; padding: 9px 12px; font-size: 13px; line-height: 1.45; color: #5a4a3a; }
.invHelp b { font-size: 14px; color: #3b2f25; } .invHelp em { font-style: normal; font-size: 11px; background: #2f8f86; color: #fff; border-radius: 8px; padding: 1px 7px; margin-left: 4px; }
.invSec { grid-column: 1 / -1; font-weight: 800; font-size: 13px; color: #6b5a48; margin: 6px 2px -2px; }

/* 🏪 가게 고르기 */
.shopMenuBox .shopGo { display: flex; flex-direction: column; align-items: flex-start; width: 100%; margin: 6px 0; padding: 12px 14px; text-align: left; }
.shopMenuBox .shopGo b { font-size: 16px; } .shopMenuBox .shopGo span { font-size: 12.5px; opacity: 0.8; margin-top: 2px; }

.shopGrid .cell.owned { opacity: 0.55; }

/* 새 낚싯대 선물: 장비 알약이 반짝 */
#gearPill.newGift { animation: giftPulse 0.8s ease-in-out infinite alternate; box-shadow: 0 0 0 3px #f2b544; }
@keyframes giftPulse { from { transform: scale(1); } to { transform: scale(1.07); } }

/* 찌 채비 고르기 */
.rigRow { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 10px; } .rigRow .rigOpt { padding: 6px 10px; font-size: 13px; }

/* 사진 모드 */
body.photo #chatLog, body.photo #chatBtn, body.photo #chatBar, body.photo #hud, body.photo #topRight, body.photo #dock, body.photo #hint, body.photo #toast, body.photo #coach, body.photo .chatBtn, body.photo .chatLog, body.photo #fightUI { opacity: 0; pointer-events: none; }
#photoBar { position: fixed; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: center; z-index: 9; background: rgba(255,252,244,0.9); padding: 8px 10px; border-radius: 22px; box-shadow: 0 4px 14px rgba(110,70,40,0.18); }
#photoBar small { width: 100%; text-align: center; font-size: 12px; color: #7a6656; }
#photoShot { font-size: 17px; padding: 10px 18px; }
.shotBox { max-width: min(560px, 94vw); } .shotBox img { width: 100%; border-radius: 14px; display: block; margin-bottom: 10px; }
.bragBtn { display: block; margin: 8px auto 0; font-size: 14px; padding: 7px 14px; }
