/* 게임 화면 스킨: 기본으로 켜짐 (?ui=1 로 끔). 3D 장면은 건드리지 않고 위에 얹는 화면만 바꿈 */

.ui2 { --ink: #3a2414; --cream: #fff6df; --cream2: #f3e4c0; --sun: #ffd23d; --orange: #ff9a1f; --orange-d: #b85a00; --red: #ef4b3f; --blue: #2f7fe6; --game: 'Jua', "Pretendard Variable", Pretendard, sans-serif; }

/* 이름표: 배경 없이 굵은 외곽선 글자 (게임 이름표) */
.ui2 .label { background: none; padding: 0 2px; border-radius: 0; font-family: var(--game); font-size: 14px; font-weight: 400; color: #fff;
  -webkit-text-stroke: 4px #18213a; paint-order: stroke fill; letter-spacing: .2px; }
.ui2 .label.me { background: none; color: var(--sun); font-size: 16px; }
.ui2 .label.loss2 { color: #a9d0ff; } .ui2 .label.loss3 { color: #ffe08a; }
.ui2 .label.me.loss2, .ui2 .label.me.loss3 { color: var(--sun); }
.ui2 .label.same { box-shadow: none; text-decoration: underline; text-decoration-color: var(--sun); text-underline-offset: 3px; }
.ui2 .label.trace { background: none; color: rgba(255, 255, 255, .8); font-size: 12px; -webkit-text-stroke: 3px rgba(24, 33, 58, .8); }
.ui2 .bubble { font-family: var(--game); font-weight: 400; font-size: 15px; color: var(--ink); background: #fff; border: 2.5px solid var(--ink);
  border-radius: 16px; padding: 5px 12px; box-shadow: 0 3px 0 var(--ink); }

/* 위쪽 표시: 두툼한 알림판 */
.ui2 #hud { gap: 7px; }
.ui2 .pill { background: var(--cream); color: var(--ink); border: 2.5px solid var(--ink); border-radius: 14px; box-shadow: 0 3px 0 var(--ink);
  font-family: var(--game); font-weight: 400; font-size: 14px; padding: 6px 11px; }
.ui2 .pill .down { color: var(--blue); } .ui2 .pill .up { color: var(--red); }
.ui2 .invite-pill { background: var(--sun); color: var(--ink); }
.ui2 .exit-pill { background: #fff; color: var(--ink); }
.ui2 .pill:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }

/* 아래 버튼: 큰 버튼 4개 + 더보기 */
.ui2 #actions { background: none; padding: 0; gap: 9px; overflow: visible; flex-wrap: nowrap; width: auto; max-width: none; border-radius: 0; bottom: 30px; }
.ui2 #actions button, .ui2 #moreTray button { flex: 0 0 auto; width: 64px; height: 68px; padding: 5px 2px 4px; border-radius: 18px; background: var(--cream); color: var(--ink);
  border: 2.5px solid var(--ink); box-shadow: 0 5px 0 var(--ink), inset 0 2px 0 #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; }
.ui2 #actions button b, .ui2 #moreTray button b { font-size: 0; line-height: 0; }
.ui2 #actions button b svg, .ui2 #moreTray button b svg { width: 34px; height: 34px; display: block; }
.ui2 #actions button span, .ui2 #moreTray button span { font-family: var(--game); font-size: 12px; white-space: nowrap; letter-spacing: -.3px; }
.ui2 #actions button:active, .ui2 #moreTray button:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink), inset 0 2px 0 #fff; }
.ui2 #actions button.on, .ui2 #moreTray button.on { background: var(--sun); }
.ui2 #actions button.disabled { opacity: 1; filter: grayscale(1); background: #d9d4c6; }
.ui2 #actions button[data-act=tube] { background: #ffb347; }
.ui2 #actions button[data-act=tube].on { background: var(--sun); }
.ui2 #actions button[data-badge]:not([data-badge=""])::after { border: 2px solid var(--ink); font-family: var(--game); }
.ui2 #moreTray { position: fixed; left: 50%; bottom: 112px; transform: translateX(-50%); z-index: 9; display: grid; grid-template-columns: repeat(5, 64px); gap: 12px 9px;
  background: var(--cream2); border: 3px solid var(--ink); border-radius: 22px; padding: 14px 12px 16px; box-shadow: 0 6px 0 var(--ink); }
.ui2 #moreTray.hidden { display: none; }

/* 창: 두꺼운 테두리 판 */
.ui2 .sheet, .ui2 .card { background: var(--cream); color: var(--ink); border: 3px solid var(--ink); border-radius: 24px; box-shadow: 0 7px 0 var(--ink); }
.ui2 .sheet h2, .ui2 .card h2 { font-family: var(--game); font-weight: 400; font-size: 21px; }
.ui2 .card h1 { font-family: var(--game); font-weight: 400; font-size: 40px; color: var(--orange); -webkit-text-stroke: 6px var(--ink); paint-order: stroke fill; letter-spacing: 1px; margin-top: 2px; }
.ui2 .logo { font-size: 0; height: 74px; } .ui2 .logo svg { width: 74px; height: 74px; }
.ui2 .sub { color: #6b5a45; }
.ui2 .x { width: 36px; height: 36px; border-radius: 50%; background: var(--red); color: #fff; border: 2.5px solid var(--ink); box-shadow: 0 3px 0 var(--ink);
  font-size: 22px; line-height: 1; display: grid; place-items: center; padding-bottom: 3px; }
.ui2 .x:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.ui2 .primary { background: var(--orange); color: #fff; font-family: var(--game); font-weight: 400; font-size: 20px; border: 2.5px solid var(--ink); border-radius: 16px;
  box-shadow: 0 5px 0 var(--ink), inset 0 2px 0 rgba(255, 255, 255, .5); -webkit-text-stroke: 3.5px var(--ink); paint-order: stroke fill; padding: 12px; margin-bottom: 5px; }
.ui2 .primary:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.ui2 .primary:disabled { background: #cfc8b6; }
.ui2 .ghost { font-family: var(--game); font-size: 15px; color: #6b5a45; }
.ui2 .tabs button { background: #fff; color: var(--ink); border: 2px solid var(--ink); border-radius: 12px; font-family: var(--game); font-weight: 400; font-size: 14px; padding: 6px 11px; box-shadow: 0 2px 0 var(--ink); }
.ui2 .tabs button.on { background: var(--ink); color: var(--sun); }
.ui2 .market-pill { background: var(--ink); color: #fff; font-family: var(--game); font-size: 15px; border-radius: 12px; }
.ui2 .field span { font-family: var(--game); font-weight: 400; font-size: 15px; color: var(--ink); }
.ui2 .field input { border: 2.5px solid var(--ink); border-radius: 14px; box-shadow: inset 0 3px 0 #efe6cf; }
.ui2 .field input:focus { border-color: var(--orange); }
.ui2 .preview { font-family: var(--game); font-weight: 400; font-size: 16px; color: var(--blue); }
.ui2 .preview.escaped { color: var(--red); }
.ui2 .overlay { background: rgba(10, 18, 36, .45); backdrop-filter: blur(3px); }
.ui2 .daily .d-loss, .ui2 .big-num { font-family: var(--game); font-weight: 400; }
.ui2 .daily .d-msg, .ui2 .daily .d-stock { font-family: var(--game); font-weight: 400; font-size: 17px; }
.ui2 #rankList li::before { background: var(--ink); color: var(--sun); font-family: var(--game); }
.ui2 #rankList li { border-bottom: 2px dashed #e0d2ae; }
.ui2 .entry-rank { border: 2.5px solid var(--ink); border-radius: 16px; background: #fff; }

/* 알림·안내·확대 버튼·대화 미니창 */
.ui2 #toast { background: var(--cream); color: var(--ink); border: 2.5px solid var(--ink); border-radius: 16px; box-shadow: 0 4px 0 var(--ink); font-family: var(--game); font-weight: 400; font-size: 15px; top: 64px; }
.ui2 #hint { background: rgba(24, 33, 58, .85); font-family: var(--game); font-size: 13px; border-radius: 12px; }
.ui2 #zoomBtns button { background: var(--cream); color: var(--ink); border: 2.5px solid var(--ink); border-radius: 14px; box-shadow: 0 4px 0 var(--ink); font-family: var(--game); width: 44px; height: 44px; }
.ui2 #zoomBtns button:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.ui2 #chatFeed .cf-line { background: rgba(24, 33, 58, .86); border-radius: 12px 12px 12px 3px; font-size: 13px; padding: 5px 10px; }
.ui2 #chatFeed .cf-line b { font-family: var(--game); font-weight: 400; color: var(--sun); }
.ui2 .note-label { border: 2px solid var(--ink); border-radius: 8px; font-family: var(--game); font-weight: 400; font-size: 13px; box-shadow: 0 3px 0 var(--ink); }

@media (max-width: 800px) {
  .ui2 #actions { width: auto; max-width: none; flex-wrap: nowrap; gap: 8px; padding: 0; bottom: calc(26px + env(safe-area-inset-bottom)); }
  .ui2 #actions button, .ui2 #moreTray button { width: 62px; height: 66px; padding: 5px 2px 4px; }
  .ui2 #actions button span, .ui2 #moreTray button span { font-size: 12px; }
  .ui2 #moreTray { grid-template-columns: repeat(5, 62px); gap: 12px 7px; padding: 12px 9px 15px; bottom: calc(106px + env(safe-area-inset-bottom)); }
  .ui2 .pill { font-size: 13px; padding: 5px 9px; }
  .ui2 .label { font-size: 13px; padding: 0 2px; } .ui2 .label.me { font-size: 15px; }
  .ui2 #toast { top: calc(96px + env(safe-area-inset-top)); font-size: 14px; }
}
.ui2 #actions button.hidden, .ui2 #moreTray button.hidden { display: none; }
.ui2 #moreTray button[data-badge]:not([data-badge=""]) { position: relative; }
.ui2 .primary:disabled { -webkit-text-stroke: 0; color: #8a8170; box-shadow: 0 5px 0 #8a8170; border-color: #8a8170; }

/* 창 안 부품: 보내기·작은 버튼·옷장·난간 쪽지·대화 */
.ui2 .chat-form input, .ui2 .note-edit textarea { border: 2.5px solid var(--ink); border-radius: 14px; box-shadow: inset 0 3px 0 #efe6cf; }
.ui2 .chat-form input:focus, .ui2 .note-edit textarea:focus { border-color: var(--orange); }
.ui2 .chat-form .send { background: var(--orange); color: #fff; font-family: var(--game); font-weight: 400; font-size: 16px; border: 2.5px solid var(--ink); border-radius: 14px;
  box-shadow: 0 3px 0 var(--ink); -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; margin-bottom: 3px; }
.ui2 .chat-form .send:active, .ui2 .mini:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.ui2 .chat-list li { border: 2px solid var(--ink); border-radius: 14px 14px 14px 4px; }
.ui2 .chat-list li.mine { background: var(--sun); border-radius: 14px 14px 4px 14px; }
.ui2 .chat-list li.day, .ui2 .chat-list li.empty { border: 0; }
.ui2 .chat-list li b { font-family: var(--game); font-weight: 400; font-size: 12px; color: #8a6a3c; }
.ui2 .mini { background: var(--sun); color: var(--ink); border: 2px solid var(--ink); border-radius: 10px; box-shadow: 0 2px 0 var(--ink); font-family: var(--game); font-weight: 400; font-size: 12px; padding: 4px 9px; }
.ui2 .mini:disabled { opacity: 1; background: #e3dccb; color: #9a917e; border-color: #9a917e; box-shadow: 0 2px 0 #9a917e; }
.ui2 .g-wallet, .ui2 .g-wallet b { font-family: var(--game); font-weight: 400; } .ui2 .g-wallet { font-size: 15px; } .ui2 .g-wallet b { font-size: 19px; }
.ui2 .g-result { border: 2.5px solid var(--ink); border-radius: 18px; box-shadow: inset 0 4px 0 #efe6cf; }
.ui2 .g-result.empty, .ui2 .g-name, .ui2 .g-rar { font-family: var(--game); font-weight: 400; }
.ui2 .g-name { font-size: 21px; } .ui2 .g-result.empty { font-size: 18px; color: #a39880; }
.ui2 .g-result.r-rare { box-shadow: inset 0 0 0 3px #4a8dff; } .ui2 .g-result.r-legend { box-shadow: inset 0 0 0 3px var(--sun); }
.ui2 .g-odds { border: 2px solid var(--ink); }
.ui2 .closet-item { border: 2.5px solid var(--ink); border-radius: 16px; box-shadow: 0 3px 0 var(--ink); font-family: var(--game); margin-bottom: 3px; }
.ui2 .closet-item.on, .ui2 .closet-item.r-streak.on { background: var(--sun); box-shadow: 0 3px 0 var(--ink); }
.ui2 .closet-item.locked { opacity: 1; background: #ece4d0; border-color: #b9ae96; box-shadow: 0 3px 0 #b9ae96; color: #9a917e; }
.ui2 .closet-item.r-streak { box-shadow: 0 3px 0 var(--ink); }
.ui2 .closet { gap: 9px; padding-bottom: 2px; }
.ui2 .note-list li { border: 2px solid var(--ink); border-radius: 6px; box-shadow: 0 2px 0 var(--ink); margin-bottom: 8px; }
.ui2 .note-list .empty { border: 0; box-shadow: none; }
.ui2 .note-card { border: 2.5px solid var(--ink); border-radius: 8px; box-shadow: 0 4px 0 var(--ink); font-family: var(--game); font-weight: 400; font-size: 20px; }
.ui2 .er-head, .ui2 .er-n { font-family: var(--game); font-weight: 400; font-size: 15px; }
.ui2 .er-no { background: var(--ink); color: var(--sun); font-family: var(--game); width: 20px; height: 20px; }
.ui2 .er-me { background: var(--sun); color: var(--ink); border: 2px solid var(--ink); font-family: var(--game); font-weight: 400; box-shadow: 0 2px 0 var(--ink); padding: 1px 9px; }
.ui2 .er-king { background: #fff3c4; border: 2px dashed #d9b24a; } .ui2 .er-king b { color: var(--blue); }
.ui2 .daily .d-loss { font-size: 36px; }

@media (max-width: 800px) {
  /* 위쪽 표시를 두 줄로: 1줄 날씨+나가기, 2줄 인원+친구 부르기 */
  .ui2 #hudMarket { order: 1; } .ui2 #hudExit { order: 2; margin-left: auto; } .ui2 #hudCount { order: 3; } .ui2 #hudInvite { order: 4; margin-left: auto; } .ui2 #hudStreak { order: 5; }
  .ui2 #hint { top: calc(104px + env(safe-area-inset-top)); }
  .ui2 #toast { top: calc(150px + env(safe-area-inset-top)); }
}

/* ?ui=3 덜 귀여운 버전: 모양은 같고 남색 테두리·흰 바탕, 숫자와 이름표는 굵은 프리텐다드 */
.ui3 { --ink: #18213a; --cream: #ffffff; --cream2: #e6ecf8; --num: "Pretendard Variable", Pretendard, sans-serif; }
.ui3 .label, .ui3 .pill, .ui3 .preview, .ui3 .daily .d-loss, .ui3 .big-num, .ui3 .g-wallet, .ui3 .g-wallet b, .ui3 .market-pill, .ui3 .er-n, .ui3 .er-head, .ui3 #toast, .ui3 #hint, .ui3 .bubble, .ui3 .chat-list li b, .ui3 #chatFeed .cf-line b, .ui3 .note-label, .ui3 .note-card, .ui3 .daily .d-msg, .ui3 .daily .d-stock, .ui3 .field span, .ui3 .ghost, .ui3 .closet-item { font-family: var(--num); font-weight: 800; letter-spacing: -.2px; }
.ui3 .label { font-size: 13px; -webkit-text-stroke: 3.5px #18213a; } .ui3 .label.me { font-size: 14.5px; }
.ui3 .pill { font-size: 13px; font-weight: 700; } .ui3 #toast { font-weight: 700; font-size: 14px; } .ui3 #hint { font-weight: 600; }
.ui3 .ghost { font-weight: 700; color: #5c6476; } .ui3 .sub { color: #5c6476; }
.ui3 .field input, .ui3 .chat-form input, .ui3 .note-edit textarea, .ui3 .g-result { box-shadow: inset 0 3px 0 #e3e9f5; }
.ui3 .card h1 { color: var(--sun); }
.ui3 #actions button[data-act=tube] { background: var(--sun); }
.ui3 #actions button.on, .ui3 #moreTray button.on, .ui3 #actions button[data-act=tube].on { background: #ffb347; }
.ui3 #rankList li { border-bottom-color: #d5dcea; }
.ui3 .closet-item.locked { background: #eef1f6; border-color: #aeb6c6; box-shadow: 0 3px 0 #aeb6c6; color: #8a90a0; }
.ui3 .er-king { background: #eef3ff; border-color: #a9c0ee; }
.ui3 .chat-list li b { color: #6a7183; font-weight: 700; }
.ui3 .mini:disabled { background: #e6e9ef; color: #8a90a0; border-color: #8a90a0; box-shadow: 0 2px 0 #8a90a0; }
.ui3 .primary:disabled { background: #d5d9e2; color: #7a8193; border-color: #7a8193; box-shadow: 0 5px 0 #7a8193; }
@media (max-width: 800px) { .ui3 .label { font-size: 12.5px; } .ui3 .label.me { font-size: 14px; } }
