/* 화면 구역 고정 (설계서 9절 & 지시서 2.8):
 * 노치 안전영역 / 상단 줄 56 / 놀이판(남는 전부) / 완충띠 20 / 광고 320x50 / 홈 안전영역
 * 하단(광고 근처 300px 안)에 버튼을 두지 않는다. 모든 화면 부품은 Codex 그림 자산 사용.
 */
:root {
  --dark-bg: #08060c;
  --leather-dark: #160f0a;
  --brass: #d8ae64;
  --amber: #ffd27a;
  --ink: #f4ecd8;
  --ink-dark: #241408;
  --app-w: 430px;
  --safe-bottom-h: max(env(safe-area-inset-bottom), 12px);
  --below-stage-h: calc(20px + 50px + var(--safe-bottom-h));
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

html, body {
  margin: 0;
  height: 100%;
  background: #040307;
  color: var(--ink);
  font-family: -apple-system, "Apple SD Gothic Neo", "Noto Sans KR", "PingFang SC", "Noto Sans SC", "Malgun Gothic", sans-serif;
  overscroll-behavior: none;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

.hidden { display: none !important; }

#app {
  position: relative;
  width: min(100vw, 430px);
  height: 100vh;
  height: 100dvh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  background: var(--dark-bg);
  overflow: hidden;
}

#safeTop {
  flex: none;
  height: max(env(safe-area-inset-top), 12px);
  background: #07060a;
  z-index: 25;
}

/* ---- 상단 바 (topbar-bg + 그림 단추) ---- */
#topbar {
  position: relative;
  z-index: 25;
  flex: none;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 7px 0 8px;
  background: url("assets/ui/topbar-bg.webp") center / 100% 100% no-repeat;
}

#statusPlates {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: none;
}

#count {
  min-width: 52px;
  height: 35px;
  padding: 0 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: url("assets/ui/count-plate.webp") center / 100% 100% no-repeat;
}

#count b {
  color: var(--amber);
  font-size: 16px;
  font-weight: 900;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.85);
  letter-spacing: 0.3px;
}

.coinPlateBtn {
  min-width: 72px;
  height: 35px;
  padding: 0 9px;
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: url("assets/ui/count-plate.webp") center / 100% 100% no-repeat;
  font: inherit;
  user-select: none;
}

.coinDisc {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff4b8 0%, #f1b944 54%, #9c6010 100%);
  box-shadow: inset 0 0 0 1.5px #5e3506, 0 1px 3px rgba(0, 0, 0, 0.8);
  color: #3a1d04;
  font-size: 9.5px;
  font-weight: 900;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.coinPlateBtn b {
  color: #ffe28c;
  font-size: 15px;
  font-weight: 900;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.88);
}

#switches {
  display: flex;
  align-items: center;
  gap: 5px;
}

.iconBtn {
  width: 42px;
  height: 34px;
  padding: 0;
  border: 0;
  background-color: transparent;
  background-position: center;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  cursor: pointer;
}
.iconBtn:active { transform: scale(0.95); }

.shopBtn {
  width: auto;
  min-width: 48px;
  height: 34px;
  padding: 0 10px;
  background-image: url("assets/ui/count-plate.webp");
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.shopBtnLabel {
  color: #ffe394;
  font-size: 12.5px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.2px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.92);
  white-space: nowrap;
}
.shopBtn.active {
  filter: brightness(1.22) drop-shadow(0 0 6px rgba(255, 205, 96, 0.68));
}

@media (max-width: 395px) {
  .iconBtn {
    width: 38px;
    height: 32px;
  }
  .shopBtn {
    width: auto;
    min-width: 44px;
    height: 32px;
    padding: 0 8px;
  }
  .shopBtnLabel {
    font-size: 11.5px;
  }
  #switches {
    gap: 4px;
  }
  .coinPlateBtn {
    min-width: 64px;
    padding: 0 7px;
  }
}

.arBtn { background-image: url("assets/ui/btn-ar-off.webp"); }
.arBtn.on { background-image: url("assets/ui/btn-ar-on.webp"); }

.soundBtn { background-image: url("assets/ui/btn-sound-off.webp"); }
.soundBtn.on { background-image: url("assets/ui/btn-sound-on.webp"); }

.retryBtn { background-image: url("assets/ui/btn-retry.webp"); }
.retryBtn:active { background-image: url("assets/ui/btn-retry-pressed.webp"); }

.dexBtn { background-image: url("assets/ui/btn-collection.webp"); }
.dexBtn:active, .dexBtn.active { background-image: url("assets/ui/btn-collection-pressed.webp"); }

.trophyBtn {
  background-image: url("assets/ui/count-plate.webp");
  display: flex;
  align-items: center;
  justify-content: center;
}
.trophyBtn img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.8));
}
.trophyBtn.active {
  filter: brightness(1.22) drop-shadow(0 0 6px rgba(255, 202, 100, 0.65));
}

.friendsBtn { background-image: url("assets/ui/btn-friends-locked.webp"); }

.settingsBtn { background-image: url("assets/ui/btn-settings.webp"); }
.settingsBtn:active, .settingsBtn.active { background-image: url("assets/ui/btn-settings-pressed.webp"); }

/* ---- 놀이판 ---- */
#stage {
  position: relative;
  z-index: 10;
  flex: 1 1 auto;
  min-height: 0;
  background: #120e14;
  overflow: hidden;
}

#cam {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
  background: #000;
}
#cam.on { display: block; }

#board {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

/* ---- 공용 Codex 명판·단추 ---- */
.wideBtn {
  min-width: 210px;
  height: 54px;
  padding: 0 24px;
  border: 0;
  background: url("assets/ui/btn-wide.webp") center / 100% 100% no-repeat;
  color: var(--ink);
  font: inherit;
  font-size: 20px;
  font-weight: 900;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9);
  cursor: pointer;
}
.wideBtn:active {
  background-image: url("assets/ui/btn-wide-pressed.webp");
  transform: translateY(1px);
}
.wideBtn.compactWide {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  height: auto;
  padding: 8px 16px;
  font-size: 14.5px;
  line-height: 1.2;
  white-space: normal;
  text-align: center;
}

.wideBtn.rewardWideBtn {
  color: #fff6dc;
  filter: drop-shadow(0 0 8px rgba(96, 224, 255, 0.42));
}

.chipBtn {
  min-height: 34px;
  height: auto;
  padding: 5px 12px;
  border: 0;
  background: url("assets/ui/count-plate.webp") center / 100% 100% no-repeat;
  color: var(--ink);
  font: inherit;
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.15;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
  cursor: pointer;
}
.chipBtn:active { transform: scale(0.96); }

/* ---- 타이틀 · 오프닝 (광고 위 구역 전체, 광고 자리 비움) ---- */
.aboveAdLayer {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: var(--below-stage-h);
  overflow: hidden;
}

#titleLayer {
  z-index: 15;
  background: #060508;
}

#titleBg {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(var(--app-w) * 0.19);
  height: calc(var(--app-w) * 2.1674);
  background: url("assets/ui/title-bg.jpg") top center / 100% auto no-repeat;
}

/* 오프닝 마지막 프레임(720x1280 중 x=360, y=533, 폭=683)과 픽셀 단위 일치하는 로고 좌표 */
.alignedLogo {
  position: absolute;
  left: 50%;
  top: calc(var(--app-w) * 0.7403);
  width: 95.74%;
  height: auto;
  transform: translate(-50%, -51%);
  pointer-events: none;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.75));
}

.titleTopActions {
  position: absolute;
  right: 12px;
  top: calc(max(env(safe-area-inset-top), 12px) + 64px);
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* 타이틀 시작 단추: y≈1800~2040 부근(하단 광고와 300px 이상 여유) */
.titleStartBtn {
  position: absolute;
  left: 50%;
  top: calc(var(--app-w) * 1.46);
  transform: translate(-50%, -50%);
  width: 246px;
  height: 82px;
  border: 0;
  padding: 0;
  background-color: transparent;
  background-position: center;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  color: var(--ink);
  font: inherit;
  font-size: 24px;
  font-weight: 900;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.92);
  cursor: pointer;
}
.titleStartBtn.koImg {
  background-image: url("assets/ui/title-start-ko.webp");
}
.titleStartBtn.koImg:active {
  background-image: url("assets/ui/title-start-ko-pressed.webp");
}
.titleStartBtn.koImg span {
  display: none;
}
.titleStartBtn.genericImg {
  width: 242px;
  height: 60px;
  background-image: url("assets/ui/btn-wide.webp");
}
.titleStartBtn.genericImg:active {
  background-image: url("assets/ui/btn-wide-pressed.webp");
}

/* 오프닝 화면 */
#openingLayer {
  z-index: 35;
  background: #000;
  cursor: pointer;
  transition: opacity 0.4s ease;
}
#openingLayer.fadingOut {
  opacity: 0;
  pointer-events: none;
}

#openingVideo {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: auto;
  display: block;
  background: #000;
}

#openingDim {
  position: absolute;
  inset: 0;
  background: #000;
  opacity: 0;
  pointer-events: none;
}

#openingLangLogo {
  opacity: 0;
}

.skipPlaque {
  position: absolute;
  top: calc(max(env(safe-area-inset-top), 12px) + 10px);
  right: 12px;
  padding: 6px 16px;
  background: url("assets/ui/plaque-hint.webp") center / 100% 100% no-repeat;
  color: #e6dac2;
  font-size: 12px;
  font-weight: 800;
  pointer-events: none;
}

/* ---- 장소 고르기 화면 (모든 카드·단추를 상·중단에 배치, 하단 여백 확보) ---- */
.screenLayer {
  position: absolute;
  inset: 0;
  z-index: 14;
  padding: 8px 12px 92px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background:
    radial-gradient(circle at 50% 35%, rgba(20, 14, 24, 0.55), rgba(6, 4, 10, 0.92)),
    url("assets/ui/bg-place-A.jpg") center / cover no-repeat;
}

.placesHeader {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  flex: none;
}

.placesTitlePlaque {
  flex: 1;
  min-width: 0;
  min-height: 40px;
  padding: 4px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: url("assets/ui/plaque-banner.webp") center / 100% 100% no-repeat;
  color: var(--ink-dark);
  font-size: 16.5px;
  font-weight: 900;
  line-height: 1.15;
  text-align: center;
}

.placesMainList {
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex: none;
}

.placeCard {
  position: relative;
  width: 100%;
  height: 94px;
  padding: 10px 16px;
  border: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: left;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  overflow: hidden;
  border-radius: 10px;
  background-color: #1a120d;
  box-shadow: inset 0 0 0 3px #9c7438, inset 0 0 0 5px #2c1c0e, 0 5px 14px rgba(0, 0, 0, 0.65);
}
.placeCard:active { transform: scale(0.985); }

.placeCardBg {
  position: absolute;
  inset: 3px;
  background-position: center 38%;
  background-size: cover;
  filter: brightness(0.68);
  z-index: 0;
}
.placeCard.locked .placeCardBg {
  filter: grayscale(0.85) brightness(0.32);
}

.placeCardShade {
  position: absolute;
  inset: 3px;
  background: linear-gradient(90deg, rgba(8, 5, 10, 0.86) 0%, rgba(8, 5, 10, 0.42) 60%, rgba(8, 5, 10, 0.78) 100%);
  z-index: 1;
}

.placeCardTop, .placeCardBot {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.placeCodeName {
  font-size: 18px;
  font-weight: 900;
  color: #f9efd9;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.95);
}

.placeCountBadge {
  padding: 3px 10px;
  background: url("assets/ui/count-plate.webp") center / 100% 100% no-repeat;
  color: var(--amber);
  font-size: 13px;
  font-weight: 900;
}

.placeSubNote {
  font-size: 12px;
  font-weight: 700;
  color: #d6c5a3;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.95);
}

.placesFriendsWrap {
  display: flex;
  flex-direction: column;
  flex: none;
}

.placeFriendsCard {
  width: 100%;
  min-height: 62px;
  padding: 9px 14px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(24, 17, 12, 0.95) 0%, rgba(36, 24, 15, 0.92) 100%);
  box-shadow: inset 0 0 0 2.5px #8d6833, inset 0 0 0 4.5px #26180c, 0 4px 12px rgba(0, 0, 0, 0.6);
  color: var(--ink);
  font: inherit;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  cursor: pointer;
}
.placeFriendsCard:active { transform: scale(0.985); }
.placeFriendsCard.unlocked {
  background: linear-gradient(90deg, rgba(34, 23, 13, 0.96) 0%, rgba(56, 36, 17, 0.94) 100%);
  box-shadow: inset 0 0 0 2.5px #d4a455, inset 0 0 0 4.5px #2b1a0c, 0 5px 14px rgba(0, 0, 0, 0.65);
}
.placeFriendsCard.connected {
  background: linear-gradient(90deg, rgba(22, 38, 28, 0.96) 0%, rgba(44, 34, 16, 0.94) 100%);
  box-shadow: inset 0 0 0 2.5px #6de3a5, inset 0 0 0 4.5px #19291e, 0 5px 16px rgba(0, 0, 0, 0.68);
}
.placeFriendsCard.unlocked .placeFriendsCopy span {
  color: #e4cca0;
}
.placeFriendsCard.connected .placeFriendsCopy span {
  color: #9ef2c3;
}

.placeFriendsIcon {
  width: 46px;
  height: 38px;
  object-fit: contain;
  flex: none;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.75));
}

.placeFriendsCopy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.placeFriendsCopy strong {
  font-size: 14.5px;
  font-weight: 900;
  color: #f6e7c8;
  line-height: 1.2;
}

.placeFriendsCopy span {
  font-size: 11.5px;
  font-weight: 700;
  color: #b8a382;
  line-height: 1.2;
}

.placesLockedRow {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-top: 1px;
  flex: none;
}

.placeFutureSlot {
  height: 86px;
  padding: 8px 5px 18px;
  border: 0;
  background: url("assets/ui/dex-slot-locked.webp") center / 100% 100% no-repeat;
  color: #b7a587;
  font: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  text-align: center;
  cursor: pointer;
}
.placeFutureSlot strong {
  font-size: 13px;
  font-weight: 900;
  color: #dccaa9;
}
.placeFutureSlot span {
  font-size: 10.5px;
  font-weight: 700;
  color: #9e8c70;
  line-height: 1.2;
}

/* ---- 첫 판 안전 안내 카드 (#intro: title-plate-safety + btn-wide) ---- */
#intro {
  position: absolute;
  inset: 0;
  z-index: 18;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 20px 20px 100px;
  gap: 12px;
  background: rgba(8, 6, 12, 0.84);
}

.safetyCard {
  position: relative;
  width: min(84vw, 310px);
  aspect-ratio: 1100 / 1300;
  background: url("assets/ui/title-plate-safety.webp") center / 100% 100% no-repeat;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.75));
}

.safetyTextArea {
  position: absolute;
  left: 9%;
  right: 9%;
  top: 50%;
  bottom: 7%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
}

.introTitle {
  margin: 0;
  font-size: 21px;
  font-weight: 900;
  line-height: 1.25;
  color: var(--ink-dark);
  white-space: pre-line;
}

.introSub {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.42;
  color: #462c16;
  white-space: pre-line;
}

/* ---- 도감·상점·설정 모달 (panel-bg, 하단 광고와 300px 이상 거리 보장: bottom 92px) ---- */
.panelModal {
  position: absolute;
  top: 6px;
  left: 8px;
  right: 8px;
  bottom: 92px;
  z-index: 30;
  background: url("assets/ui/panel-bg.webp") center / 100% 100% no-repeat;
  filter: drop-shadow(0 10px 28px rgba(0, 0, 0, 0.85));
  display: flex;
}

.panelInner {
  flex: 1;
  min-height: 0;
  padding: 20px 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.panelHeader {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.panelTitle {
  margin: 0;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.2;
  color: var(--amber);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.85);
}

/* ---- 컬렉션(도감) 모드: 등급 S~F 구역 · 완성률 · 그림자 실루엣 · 반짝이 변종 칸 따로 · 상세 보기 ---- */
.dexOverview {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.dexSummaryBar {
  flex: none;
  padding: 6px 10px 7px;
  background: rgba(10, 6, 4, 0.52);
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px rgba(216, 174, 100, 0.32);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dexSummaryLabels {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  column-gap: 8px;
  row-gap: 2px;
  font-size: 11px;
  line-height: 1.25;
  font-weight: 800;
  color: #f3e4c6;
}

.dexShinyStat {
  color: #96f7e0;
}

.dexProgTrack {
  width: 100%;
  height: 7px;
  background: #0d0806;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(216, 174, 100, 0.35);
}

.dexProgFill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #b88034 0%, #ffd27a 60%, #7ee8ff 100%);
  border-radius: 4px;
  transition: width 0.25s ease;
}

.dexFilterBar {
  flex: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  padding: 1px 1px 2px;
}

.dexFilterChip {
  flex: none;
  min-height: 26px;
  height: auto;
  padding: 3px 7px;
  border: 0;
  border-radius: 6px;
  background: url("assets/ui/count-plate.webp") center / 100% 100% no-repeat;
  color: #cdb998;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.15;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  opacity: 0.78;
}
.dexFilterChip img {
  width: 15px;
  height: 15px;
  object-fit: contain;
  pointer-events: none;
}
.dexFilterChip.active {
  opacity: 1;
  color: #fff6dc;
  filter: brightness(1.2) drop-shadow(0 0 5px rgba(255, 200, 96, 0.55));
}

.dexSectionsScroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 2px 2px 8px;
}

.dexSection {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dexSectionHeader {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 8px;
  padding: 5px 8px;
  background: rgba(12, 8, 5, 0.55);
  border-radius: 7px;
  box-shadow: inset 0 0 0 1px rgba(216, 174, 100, 0.28);
}
.dexSectionHeader.shinyHeader {
  box-shadow: inset 0 0 0 1px rgba(130, 245, 220, 0.45);
}

.dexSecLeft {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  line-height: 1.2;
  font-weight: 900;
  color: #ffe2a4;
}
.dexSecLeft img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex: none;
}

.dexSecRate {
  font-size: 11px;
  font-weight: 800;
  color: #d5c19c;
}

.dexGrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.dexSlotBtn {
  position: relative;
  min-height: 132px;
  aspect-ratio: 340 / 445;
  border: 0;
  padding: 6px 5px 7px;
  background: url("assets/ui/dex-slot.webp") center / 100% 100% no-repeat;
  color: var(--ink);
  font: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}
.dexSlotBtn.locked {
  background-image: url("assets/ui/dex-slot-locked.webp");
}
.dexSlotBtn.shinySlot:not(.locked) {
  filter: drop-shadow(0 0 6px rgba(120, 250, 220, 0.45));
}
.dexSlotBtn:active { transform: scale(0.96); }

.dexSlotTop {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 3px;
}

.dexSlotNum {
  font-size: 10px;
  font-weight: 800;
  color: #d6b67c;
}

.dexSlotGradeIcon {
  width: 17px;
  height: 17px;
  object-fit: contain;
  pointer-events: none;
}

.dexSlotImg {
  width: 68%;
  height: 48%;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.65));
}
.dexSlotImg.shinyImg {
  filter: hue-rotate(155deg) saturate(1.42) brightness(1.08) drop-shadow(0 0 6px rgba(130, 255, 225, 0.55));
}
.dexSlotImg.silhouetteImg {
  filter: brightness(0) saturate(100%) opacity(0.76) drop-shadow(0 0 5px rgba(110, 165, 230, 0.42));
}

.dexSilhouetteBox {
  width: 64%;
  height: 48%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.dexSilhouetteBox svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.dexSlotName {
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1.16;
  color: #f6ead2;
  width: 94%;
  text-align: center;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: keep-all;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95);
}
.dexSlotBtn.locked .dexSlotName {
  color: #9e8d73;
}

/* 컬렉션 상세 보기 (큰 그림 + 등장 영상 + 3언어 한 줄 설명 + 기록) */
.dexDetail {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 7px;
  overflow-y: auto;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

.dexDetailHeader {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.dexDetailTitleWrap {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.dexDetailBadge {
  width: 26px;
  height: 26px;
  object-fit: contain;
  flex: none;
}

.dexDetailName {
  font-size: 15.5px;
  font-weight: 900;
  line-height: 1.2;
  color: var(--amber);
  white-space: normal;
  overflow-wrap: break-word;
}

.dexShinyBanner {
  align-self: center;
  padding: 3px 12px;
  border-radius: 999px;
  background: rgba(16, 48, 44, 0.85);
  box-shadow: inset 0 0 0 1px rgba(135, 250, 220, 0.65);
  color: #a6ffea;
  font-size: 11px;
  font-weight: 900;
}

.dexMediaRow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
}

.dexMediaCard {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.dexMediaLabel {
  font-size: 11px;
  font-weight: 800;
  color: #d7c097;
}

.dexArtFrame, .dexVideoFrame {
  width: 100%;
  aspect-ratio: 1 / 1;
  padding: 8px;
  background: url("assets/ui/dex-slot.webp") center / 100% 100% no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.dexArtImg {
  width: 90%;
  height: 90%;
  object-fit: contain;
  border-radius: 6px;
}
.dexArtImg.shinyImg {
  filter: hue-rotate(155deg) saturate(1.42) brightness(1.08) drop-shadow(0 0 8px rgba(130, 255, 225, 0.55));
}
.dexArtImg.silhouetteImg {
  filter: brightness(0) saturate(100%) opacity(0.82) drop-shadow(0 0 8px rgba(110, 165, 230, 0.5));
}

.dexVideoFrame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
  background: #08060a;
}
.dexVideoFrame video.shinyVid {
  filter: hue-rotate(155deg) saturate(1.42) brightness(1.08);
}

.dexVideoFallback {
  font-size: 11.5px;
  font-weight: 800;
  color: #a89678;
  text-align: center;
  padding: 8px;
}

.dexDescBox {
  margin: 0;
  width: 100%;
  padding: 7px 11px;
  background: rgba(18, 11, 7, 0.62);
  border-radius: 7px;
  box-shadow: inset 0 0 0 1px rgba(216, 174, 100, 0.25);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.38;
  color: #f5ead2;
}

.dexMetaList {
  width: 100%;
  padding: 7px 12px;
  background: rgba(10, 6, 4, 0.48);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  color: #eadcc2;
}
.dexMetaRow {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.dexMetaRow span:last-child {
  font-weight: 800;
  color: #ffe4ab;
  text-align: right;
}

/* ---- 트로피 모드 (진열장) ---- */
.trophySubNote {
  margin: 0;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.32;
  color: #d9c49d;
  padding: 4px 8px;
  background: rgba(10, 6, 4, 0.45);
  border-radius: 6px;
}

.trophyGrid {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 2px 2px 8px;
}

.trophyCard {
  position: relative;
  min-height: 146px;
  padding: 10px 9px 9px;
  background: url("assets/ui/dex-slot.webp") center / 100% 100% no-repeat;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  text-align: center;
}
.trophyCard.achieved {
  filter: drop-shadow(0 0 9px rgba(255, 200, 92, 0.52));
}
.trophyCard.locked {
  background-image: url("assets/ui/dex-slot-locked.webp");
  opacity: 0.84;
}

.trophyBadgeImg {
  width: 40px;
  height: 40px;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(255, 210, 120, 0.65));
}
.trophyCard.locked .trophyBadgeImg {
  filter: grayscale(0.92) brightness(0.42);
}

.trophyName {
  font-size: 12.5px;
  font-weight: 900;
  color: #fff0cb;
  line-height: 1.2;
}
.trophyCard.locked .trophyName {
  color: #b7a488;
}

.trophyCond {
  font-size: 10.5px;
  font-weight: 700;
  color: #dcc9a7;
  line-height: 1.25;
}
.trophyCard.locked .trophyCond {
  color: #9c8a6e;
}

.trophyRewardTag {
  font-size: 10.5px;
  font-weight: 800;
  color: #9be8ff;
  padding: 2px 7px;
  background: rgba(8, 16, 28, 0.62);
  border-radius: 999px;
}

.trophyFooter {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.trophyProgText {
  font-size: 11px;
  font-weight: 800;
  color: #b5a182;
}

.trophyClaimBtn {
  height: 26px;
  padding: 0 12px;
  border: 0;
  background: url("assets/ui/plaque-banner.webp") center / 100% 100% no-repeat;
  color: var(--ink-dark);
  font: inherit;
  font-size: 11.5px;
  font-weight: 900;
  cursor: pointer;
}
.trophyClaimBtn:active { transform: scale(0.95); }
.trophyClaimBtn.requested {
  opacity: 0.78;
}

/* 설정 본문 */
.settingsBody {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 2px 2px 6px;
}

.setRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 36px;
}

.setBlock {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.setLabel {
  font-size: 14px;
  font-weight: 800;
  color: #f2e5cb;
}

.toggleSwitch {
  width: 72px;
  height: 36px;
  border: 0;
  padding: 0;
  background: url("assets/ui/toggle-off.webp") center / 100% 100% no-repeat;
  cursor: pointer;
}
.toggleSwitch.on {
  background-image: url("assets/ui/toggle-on.webp");
}

.langGroup {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
}

.langOptBtn {
  height: 34px;
  border: 0;
  padding: 0 4px;
  background: url("assets/ui/count-plate.webp") center / 100% 100% no-repeat;
  color: #cbb99a;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  opacity: 0.76;
}
.langOptBtn.active {
  opacity: 1;
  color: #fff3d1;
  filter: brightness(1.22) drop-shadow(0 0 6px rgba(255, 198, 92, 0.55));
}

.seg3 {
  width: 100%;
  height: 42px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background-position: center;
  background-size: 100% 100%;
  background-repeat: no-repeat;
}
.seg3.seg-a { background-image: url("assets/ui/seg-3-a.webp"); }
.seg3.seg-b { background-image: url("assets/ui/seg-3-b.webp"); }
.seg3.seg-c { background-image: url("assets/ui/seg-3-c.webp"); }

.segBtn {
  border: 0;
  background: transparent;
  color: #cdbda0;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  padding: 0 4px;
}
.segBtn.active {
  color: #241407;
  font-weight: 900;
  text-shadow: none;
}

.inRoundActions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 2px;
}
.inRoundActions .fullSpan {
  grid-column: 1 / -1;
}

.setActions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 2px;
}

.setLinks {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  margin-top: 2px;
}
.setLinks a {
  color: #d9b574;
  text-decoration: underline;
  font-weight: 700;
}
.dotSep { color: #8c7350; }

.creditLine {
  margin: 0;
  text-align: center;
  font-size: 11.5px;
  font-weight: 700;
  color: #ab9574;
}

/* ---- 완충띠 + 하단 상시 광고 자리(ad-frame 받침, 320x50 크기·위치 고정) ---- */
#buffer {
  flex: none;
  height: 20px;
  background: var(--dark-bg);
  z-index: 25;
}

#adRow {
  flex: none;
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--dark-bg);
  z-index: 26;
}

#adWrap {
  position: relative;
  width: 320px;
  height: 50px;
}

#ad {
  width: 320px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #120d09;
  color: #8f7b5e;
  font-size: 12px;
  font-weight: 700;
}

/* ad-frame (1060x210 중 안쪽 창 960x150 = 320x50, 좌우 16.67px·상하 10px 놋쇠 테) */
#adFrame {
  position: absolute;
  left: -16.67px;
  top: -10px;
  width: 353.34px;
  height: 70px;
  background: url("assets/ui/ad-frame.webp") center / 100% 100% no-repeat;
  pointer-events: none;
}

#safeBottom {
  flex: none;
  height: var(--safe-bottom-h);
  background: var(--dark-bg);
  z-index: 25;
}

#result {
  position: absolute;
  left: 6px;
  bottom: 6px;
  z-index: 40;
  font-size: 11px;
  font-weight: 700;
  color: #9fb0e8;
  background: rgba(0, 0, 0, 0.55);
  padding: 2px 5px;
  border-radius: 4px;
  pointer-events: none;
}

.domToast {
  position: absolute;
  left: 50%;
  top: calc(max(env(safe-area-inset-top), 12px) + 66px);
  transform: translateX(-50%);
  z-index: 42;
  min-width: 220px;
  max-width: 88%;
  padding: 12px 24px;
  background: url("assets/ui/plaque-banner.webp") center / 100% 100% no-repeat;
  color: var(--ink-dark);
  font-size: 14px;
  font-weight: 900;
  text-align: center;
  pointer-events: none;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.72));
}

/* ---- AG-007: 사냥 중 상단 빠른 아이템 표시줄 · 포획 결과 행동줄 · 상점 · 확인/부활/출석 대화상자 · 광고 제거 ---- */
.roundItemBar {
  position: absolute;
  top: 102px;
  left: 12px;
  right: 12px;
  z-index: 16;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  pointer-events: none;
}

.roundItemBadge {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(12, 18, 28, 0.84);
  box-shadow: inset 0 0 0 1px rgba(132, 224, 255, 0.55);
  color: #b7f2ff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.15;
}

.roundTrapBtn {
  pointer-events: auto;
  min-height: 30px;
  padding: 4px 11px;
  font-size: 11.5px;
  color: #a8f4ff;
  filter: drop-shadow(0 0 6px rgba(84, 218, 255, 0.45));
}
.roundTrapBtn.activeTrap {
  opacity: 0.65;
  pointer-events: none;
}

.resultOverlay {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 92px;
  z-index: 22;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}
.resultOverlay .wideBtn.compactWide {
  min-height: 42px;
  padding: 6px 14px;
  font-size: 14px;
}

.trophyClaimBtn.claimed {
  opacity: 0.62;
  cursor: default;
}

/* 상점 모달 (#shopModal) */
.shopInner {
  gap: 8px;
}

.shopHeaderRight {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
}

.shopCoinPill {
  padding: 4px 10px;
  background: url("assets/ui/count-plate.webp") center / 100% 100% no-repeat;
  color: #ffe28c;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.15;
}

.shopStatusBanner {
  flex: none;
  padding: 5px 10px;
  border-radius: 7px;
  background: rgba(14, 34, 42, 0.72);
  box-shadow: inset 0 0 0 1px rgba(126, 236, 224, 0.48);
  color: #b2ffec;
  font-size: 11.5px;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  white-space: normal;
}

.shopScroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 2px 2px 8px;
}

.shopSection {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.shopSecTitle {
  margin: 0;
  padding: 4px 9px;
  border-radius: 6px;
  background: rgba(12, 8, 5, 0.58);
  box-shadow: inset 0 0 0 1px rgba(216, 174, 100, 0.3);
  color: #ffd98e;
  font-size: 12.5px;
  font-weight: 900;
  line-height: 1.25;
}

.shopList {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.shopCard {
  padding: 9px 10px;
  border-radius: 9px;
  background: rgba(15, 10, 7, 0.76);
  box-shadow: inset 0 0 0 1.5px rgba(206, 158, 84, 0.42), 0 3px 8px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.shopCardTop {
  display: flex;
  align-items: center;
  gap: 8px;
}

.shopItemIcon {
  width: 32px;
  height: 32px;
  object-fit: contain;
  flex: none;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.75));
}

.shopCardHead {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 8px;
}

.shopItemName {
  font-size: 13.5px;
  font-weight: 900;
  line-height: 1.22;
  color: #fff1cf;
  white-space: normal;
  overflow-wrap: break-word;
}

.shopItemBadge {
  font-size: 11px;
  font-weight: 800;
  line-height: 1.15;
  color: #9be8ff;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(8, 18, 30, 0.72);
  flex: none;
}

.shopItemDesc {
  margin: 0;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.32;
  color: #decba8;
  white-space: normal;
  overflow-wrap: break-word;
}

.shopCardActions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.shopBuyBtn {
  min-height: 32px;
  height: auto;
  padding: 5px 13px;
  border: 0;
  background: url("assets/ui/plaque-banner.webp") center / 100% 100% no-repeat;
  color: var(--ink-dark);
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
  white-space: normal;
  cursor: pointer;
}
.shopBuyBtn:active { transform: scale(0.96); }
.shopBuyBtn:disabled, .shopBuyBtn.disabled {
  opacity: 0.54;
  cursor: default;
  transform: none;
}

.shopSecondaryBtn {
  min-height: 32px;
  height: auto;
  padding: 5px 11px;
  font-size: 11.5px;
}

.shopOldPrice {
  font-size: 11px;
  font-weight: 700;
  color: #a99272;
  text-decoration: line-through;
  margin-right: 2px;
}

.shopRestoreBtn {
  margin-top: 2px;
}

/* 1단계 확인 · 일일 선물 · 부활 · 다시 부르기 대화상자 (하단 광고와 300px 이상 거리 보장: padding-bottom 96px) */
.dialogOverlay {
  position: absolute;
  inset: 0;
  padding: 16px 16px 96px;
  z-index: 36;
  background: rgba(6, 4, 10, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
}

.dialogCard {
  width: min(100%, 356px);
  padding: 22px 20px 20px;
  background: url("assets/ui/panel-bg.webp") center / 100% 100% no-repeat;
  filter: drop-shadow(0 10px 26px rgba(0, 0, 0, 0.9));
  display: flex;
  flex-direction: column;
  gap: 11px;
  text-align: center;
}

.dialogTitle {
  margin: 0;
  font-size: 17.5px;
  font-weight: 900;
  line-height: 1.24;
  color: var(--amber);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.85);
}

.dialogBody {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.42;
  color: #f2e4c7;
  white-space: pre-line;
  overflow-wrap: break-word;
}

.dialogActions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 2px;
}
.dialogActions.singleAction .dialogPrimaryBtn {
  max-width: 240px;
}
.dialogActions.verticalActions {
  flex-direction: column;
  align-items: stretch;
}
.dialogCancelBtn {
  min-width: 92px;
  min-height: 40px;
}
.dialogPrimaryBtn {
  flex: 1;
}

/* 6.1절: 매일 선물 창이 떠 있을 때 뒤 화면을 어둡게 완전히 막고 가운데 "받기" 단추를 크게 배치 */
.dailyGiftOverlay {
  z-index: 39;
  background: rgba(3, 2, 7, 0.95);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  pointer-events: auto;
  touch-action: manipulation;
}

.dailyGiftCard {
  width: min(100%, 364px);
  padding: 28px 22px 26px;
  gap: 14px;
}

.dailyGiftTitle {
  font-size: 21px;
}

.dailyGiftBody {
  font-size: 14.5px;
  line-height: 1.48;
  color: #fff2d6;
}

.dailyGiftActions {
  margin-top: 6px;
}

.dailyGiftClaimBigBtn {
  width: 90%;
  max-width: 288px;
  min-height: 60px;
  height: auto;
  padding: 12px 24px;
  font-size: 21px;
  font-weight: 900;
  line-height: 1.2;
  color: #fff7df;
  filter: drop-shadow(0 4px 12px rgba(255, 196, 84, 0.45));
}

/* 광고 제거 / 광고 없는 시간 적용 시 하단 배너 및 받침 테두리 즉시 숨김 */
html.ad-free #adWrap {
  display: none !important;
}

/* 네이티브 AR 카메라 배경 모드 보존 (ANTIGRAVITY-003 연결) */
html.native-ar, html.native-ar body, html.native-ar #app, html.native-ar #stage { background: transparent; }
html.native-ar #safeTop, html.native-ar #buffer, html.native-ar #adRow, html.native-ar #safeBottom { background: var(--dark-bg); }

/* AG-005 근거리 2인 코옵 창 스타일 */
.coopInner {
  display: flex;
  flex-direction: column;
}
.coopBody {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 11px;
  padding: 4px 2px 10px;
}
.coopSubtitle {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.4;
  color: #decba8;
  text-align: center;
}
.coopNoticeBox {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(44, 28, 14, 0.85);
  border: 1.5px solid rgba(216, 168, 86, 0.55);
  color: #f4dfba;
  font-size: 12.5px;
  line-height: 1.42;
  text-align: center;
}
.coopRoomField {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(14, 10, 8, 0.72);
  border: 1.5px solid rgba(186, 142, 74, 0.52);
}
.coopFieldLabel {
  flex: none;
  font-size: 12.5px;
  font-weight: 800;
  color: #efd9b0;
}
.coopRoomInput {
  flex: 1;
  min-width: 0;
  min-height: 36px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(218, 174, 98, 0.58);
  background: rgba(28, 19, 12, 0.92);
  color: #fff6e2;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  outline: none;
}
.coopRoomInput:focus {
  border-color: #ffd37a;
}
.coopActionRow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.coopPrimaryBtn {
  width: 100%;
  min-height: 48px;
}
.coopRejoinBtn {
  width: 100%;
  min-height: 46px;
}
.coopStatusBox {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(12, 9, 8, 0.78);
  border: 1.5px solid rgba(164, 126, 68, 0.48);
}
.coopStatusBox.connected {
  background: rgba(14, 32, 22, 0.85);
  border-color: rgba(102, 226, 158, 0.72);
}
.coopStatusDot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: none;
  background: #8f7c60;
}
.coopStatusDot.waiting {
  background: #ffbf52;
  box-shadow: 0 0 8px rgba(255, 191, 82, 0.85);
}
.coopStatusDot.connected {
  background: #4ce699;
  box-shadow: 0 0 9px rgba(76, 230, 153, 0.9);
}
.coopStatusText {
  font-size: 13px;
  font-weight: 800;
  color: #f6e8cb;
  text-align: center;
  line-height: 1.35;
}
.coopRoomSection {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.coopRoomList {
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-height: 180px;
  overflow-y: auto;
}
.coopRoomEmpty {
  padding: 14px 10px;
  border-radius: 9px;
  background: rgba(16, 11, 9, 0.62);
  color: #cbb693;
  font-size: 12.5px;
  line-height: 1.4;
  text-align: center;
}
.coopRoomItem {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 50px;
  padding: 8px 12px;
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(34, 23, 14, 0.95), rgba(48, 32, 18, 0.92));
  border: 1.5px solid rgba(214, 168, 88, 0.68);
}
.coopRoomItemTitle {
  font-size: 14.5px;
  font-weight: 900;
  color: #fff3da;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.coopRoomJoinBtn {
  min-width: 76px;
  min-height: 38px;
  font-weight: 900;
}
.coopFooterActions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding-top: 4px;
}
.coopStartBtn {
  width: 100%;
  min-height: 50px;
}
.coopGuestWaitNote {
  margin: 0;
  padding: 8px 10px;
  font-size: 12.5px;
  font-weight: 800;
  color: #ffe2a4;
  text-align: center;
  line-height: 1.4;
}
.coopLeaveBtn {
  min-height: 40px;
  padding: 6px 18px;
}
.coopInviteOverlay {
  z-index: 40;
}

/* Claude 2026-11-14: 상점·컬렉션·트로피·설정·코옵 창(.panelModal / .dialogOverlay)은 #stage(z 10) 안에 있어서
   타이틀(#titleLayer, z 15) 위에서 열면 가려졌다. 창이 열려 있는 동안만 #stage를 타이틀 위로 올린다. */
#app:has(.panelModal:not(.hidden)) #stage,
#app:has(.dialogOverlay:not(.hidden)) #stage { z-index: 20; }

/* Ghost Hunter practice, daily hunt and timing records. */
.hunterGuide { position:absolute; top:12px; left:12px; right:12px; z-index:25; padding:12px 16px; border:1px solid #7fffd6; border-radius:14px; background:rgba(5,19,32,.94); color:#d8fff2; text-align:center; font-size:16px; line-height:1.4; pointer-events:none; display:flex; align-items:center; gap:12px; }
#tutorialInstruction { flex:1; min-width:0; }
#btnTutorialSkip { flex:none; min-height:44px; padding:8px 12px; border:1px solid #7fffd6; border-radius:10px; background:#153a46; color:#d8fff2; font:inherit; pointer-events:auto; touch-action:manipulation; }
.hunterDaily { flex:none; width:100%; padding:12px; border:1px solid #72e7bf; border-radius:12px; background:#102536; color:#e0fff4; text-align:left; white-space:pre-line; font:inherit; line-height:1.4; }
.hunterRecord { padding:5px 10px; border-radius:8px; background:rgba(5,19,32,.94); color:#a6ffdf; text-align:center; font-size:13px; white-space:pre-line; }

.placeSubNote { white-space: pre-line; line-height: 1.35; }
