/* 고양이 택배창고 2048 · B 컨베이어 — 3D 장난감 스킨 (UI 아르, 2026-10-12, 초영 확정 시안)
   규칙·터치·화면 맞추기(fit)는 그대로. 색·형태만 바꾼다. 토큰 원본: ui-kit/themes/cat-box-2048-3d.json */
.skin3d {
  --peach: #f6c99a; --peach-2: #f1bb86; --wood: #a8673a; --wood-dk: #6b3a1e; --wood-in: #4a2814;
  --navy: #4b3ba8; --navy-dk: #2e2470; --cell: #2b2468; --cell-dk: #221c55;
  --gold: #f7c531; --gold-dk: #e59a16; --blue: #3d8be8; --blue-dk: #2463b8;
  --ink: #4a2a14; --cream: #fff6e6;
  background-color: var(--peach);
  background-image: repeating-conic-gradient(var(--peach) 0 25%, var(--peach-2) 0 50%);
  background-size: 56px 56px;
  color: var(--ink);
  font-family: "Arial Rounded MT Bold", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
}
.skin3d .app { gap: 6px; }

/* 굵은 흰 글자 + 갈색 테두리 */
.skin3d .lv-word, .skin3d .rg-text, .skin3d .box3d, .skin3d .earn-num, .skin3d .sheet h2 {
  font-weight: 900;
  text-shadow: -2px -2px 0 var(--o, var(--wood-dk)), 2px -2px 0 var(--o, var(--wood-dk)), -2px 2px 0 var(--o, var(--wood-dk)), 2px 2px 0 var(--o, var(--wood-dk)),
               0 -2px 0 var(--o, var(--wood-dk)), 0 2px 0 var(--o, var(--wood-dk)), -2px 0 0 var(--o, var(--wood-dk)), 2px 0 0 var(--o, var(--wood-dk)), 0 4px 0 var(--o, var(--wood-dk));
}

/* ── 상단: 일시정지 · LEVEL · 설정 ── */
.skin3d .hud-top { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 8px; }
.skin3d .round-btn {
  width: 44px; height: 44px; border-radius: 50%; border: 3px solid #fff; padding: 0; cursor: pointer;
  background: radial-gradient(circle at 50% 30%, #6fb0ff 0 30%, var(--blue) 70%);
  box-shadow: 0 4px 0 var(--blue-dk), 0 6px 8px rgba(74, 40, 20, 0.25);
  display: flex; align-items: center; justify-content: center;
}
.skin3d .round-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--blue-dk); }
.skin3d .round-btn svg { width: 26px; height: 26px; }
.skin3d .ico-pause { width: 16px; height: 18px; display: block; background: linear-gradient(90deg, #fff 0 35%, transparent 35% 65%, #fff 65%); border-radius: 2px; }
.skin3d .round-btn.is-paused .ico-pause { width: 0; height: 0; background: none; border-radius: 0; border-left: 16px solid #fff; border-top: 10px solid transparent; border-bottom: 10px solid transparent; margin-left: 4px; }
.skin3d .level-title { text-align: center; line-height: 1; }
.skin3d .lv-word { color: #fff; font-size: 28px; letter-spacing: 0.5px; }
.skin3d .lv-sub { margin-top: 5px; font-size: 11px; font-weight: 800; color: var(--wood-dk); opacity: 0.85; }

/* ── 월세 게이지: 나무 틀 + 금색 막대 ── */
.skin3d .rent-gauge {
  display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 6px;
  background: linear-gradient(#b87642, var(--wood)); border-radius: 16px; padding: 5px 8px 5px 5px;
  box-shadow: inset 0 2px 0 rgba(255, 220, 170, 0.5), 0 4px 0 var(--wood-dk), 0 6px 8px rgba(74, 40, 20, 0.25);
}
.skin3d .rg-icon { width: 40px; height: 40px; border-radius: 12px; background: var(--cream); box-shadow: inset 0 -3px 0 #e8cfa6; }
.skin3d .rg-icon svg { width: 100%; height: 100%; display: block; }
.skin3d .rg-track { position: relative; height: 28px; border-radius: 14px; background: var(--wood-in); box-shadow: inset 0 3px 4px rgba(0, 0, 0, 0.45); overflow: hidden; }
.skin3d .rg-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 14px; transition: width 0.4s ease;
  background: linear-gradient(#ffe27a, var(--gold) 45%, var(--gold-dk)); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.6), inset 0 -3px 0 rgba(160, 90, 10, 0.4); }
.skin3d .rent-gauge.ready .rg-fill { background: linear-gradient(#b8f07a, #6cc94a 45%, #3f9a2c); }
.skin3d .rg-text { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 15px; --o: #6b3a1e; }
.skin3d .rg-text span { font-weight: 900; }
.skin3d .rg-due { text-align: center; color: #fff; line-height: 1.05; min-width: 44px; }
.skin3d .rg-due small { display: block; font-size: 9px; font-weight: 800; opacity: 0.9; }
.skin3d .rg-due b { font-size: 16px; font-weight: 900; }
.skin3d .rent-gauge.warn { animation: rentwarn 0.8s ease-in-out infinite alternate; }
.skin3d .rent-gauge.warn .rg-track { box-shadow: inset 0 0 0 2px #ff6a4d, inset 0 3px 4px rgba(0, 0, 0, 0.45); }
@keyframes rentwarn { to { box-shadow: inset 0 2px 0 rgba(255, 220, 170, 0.5), 0 4px 0 var(--wood-dk), 0 0 0 3px #ff6a4d; } }

/* ── 번 돈 카운터 + 다음 상자 ── */
.skin3d .earn-row { position: relative; display: flex; justify-content: center; align-items: center; min-height: 34px; }
.skin3d .earn-pill { position: relative; display: flex; align-items: center; gap: 6px; padding: 3px 14px 3px 4px; border-radius: 20px; background: rgba(74, 40, 20, 0.88); box-shadow: 0 3px 0 rgba(40, 20, 8, 0.6); }
.skin3d .paw-coin { width: 26px; height: 26px; border-radius: 50%; background: radial-gradient(circle at 50% 58%, #a8661a 0 3.5px, transparent 4px), radial-gradient(circle at 30% 36%, #a8661a 0 2px, transparent 2.5px), radial-gradient(circle at 50% 28%, #a8661a 0 2px, transparent 2.5px), radial-gradient(circle at 70% 36%, #a8661a 0 2px, transparent 2.5px), radial-gradient(circle at 50% 40%, #ffe27a, var(--gold) 60%, var(--gold-dk)); box-shadow: inset 0 -2px 0 rgba(140, 80, 10, 0.5); }
.skin3d .earn-num { color: #fff; font-size: 17px; --o: #2a160a; text-shadow: none; }
.skin3d .earn-pill.bump { animation: bump 0.35s ease-out; }
@keyframes bump { 40% { transform: scale(1.12); } }
.skin3d .coin-float { position: absolute; left: 50%; top: -4px; transform: translateX(-50%); color: #fff; font-weight: 900; font-size: 16px; pointer-events: none; white-space: nowrap;
  text-shadow: 0 0 3px #a8661a, 0 2px 0 #a8661a; animation: floatup 0.9s ease-out forwards; }
.skin3d .next-chip { position: absolute; right: 0; top: 50%; transform: translateY(-50%); display: flex; align-items: center; gap: 5px; cursor: pointer;
  background: var(--cream); border-radius: 14px; padding: 3px 8px; box-shadow: 0 3px 0 #d9b98a; }
.skin3d .next-chip small { font-size: 10px; font-weight: 800; color: #8a6a4a; }
.skin3d .next-chip b { font-size: 15px; font-weight: 900; }

/* ── 주문 카드: 색 틀 + 고양이 귀 + 상자 + 인내심 ── */
.skin3d .orders-wrap { padding-top: 10px; }
.skin3d .orders { gap: 8px; }
.skin3d .order, .skin3d.bpage .order {
  --oc: #e5433f; position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 4px; padding: 6px 6px 7px;
  border: none; border-radius: 16px; background: var(--oc);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.45), inset 0 -4px 0 rgba(0, 0, 0, 0.22), 0 4px 0 rgba(74, 40, 20, 0.35);
}
.skin3d .order::before { /* 고양이 귀 달린 머리 */
  content: ''; position: absolute; left: 50%; top: -10px; width: 30px; height: 14px; transform: translateX(-50%);
  background: var(--oc); clip-path: polygon(0 100%, 6% 0, 38% 45%, 62% 45%, 94% 0, 100% 100%);
}
.skin3d .owin { display: flex; align-items: center; justify-content: center; height: 46px; border-radius: 10px; background: rgba(40, 20, 10, 0.28); box-shadow: inset 0 3px 4px rgba(0, 0, 0, 0.3); }
.skin3d .order .ov, .skin3d.bpage .order .ov { position: relative; width: 40px; height: 36px; display: flex; align-items: center; justify-content: center; font-size: 16px; line-height: 1; color: #fff; border-radius: 8px; }
.skin3d .order .oc, .skin3d .order .opat, .skin3d.bpage .order small { display: none; }
.skin3d .order .pbar, .skin3d.bpage .order .pbar { height: 8px; margin: 0 2px; border-radius: 4px; background: rgba(40, 20, 10, 0.55); box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4); }
.skin3d .pfill { background: linear-gradient(#8ef06a, #3fb83a); border-radius: 4px; }
.skin3d .pfill.mid { background: linear-gradient(#ffe27a, #e5a81d); }
.skin3d .pfill.low { background: linear-gradient(#ff9a7a, #e5433f); }
.skin3d .order.big { box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.6), inset 0 -4px 0 rgba(0, 0, 0, 0.18), 0 4px 0 rgba(74, 40, 20, 0.35), 0 0 14px 4px rgba(255, 210, 60, 0.85); animation: bigglow 1.4s ease-in-out infinite alternate; }
@keyframes bigglow { to { box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.6), inset 0 -4px 0 rgba(0, 0, 0, 0.18), 0 4px 0 rgba(74, 40, 20, 0.35), 0 0 6px 1px rgba(255, 210, 60, 0.6); } }
.skin3d .order.hit { filter: brightness(1.15); }
.skin3d .order.fresh { border: none; }

/* ── 판: 남보라 3D 트레이 (위 대기 줄 + 판을 한 덩어리로) ── */
.skin3d .shape-name { display: none; }
.skin3d .dropper, .skin3d .bboard { background: var(--navy); border: 4px solid #5d4cc4; }
.skin3d .dropper { padding: 8px 8px 5px; border-bottom: none; border-radius: 20px 20px 0 0; box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.18); }
.skin3d .bboard { padding: 0 8px 8px; border-top: none; border-radius: 0 0 20px 20px; gap: 5px;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.25), 0 6px 0 var(--navy-dk), 0 10px 14px rgba(46, 36, 112, 0.35); }
.skin3d .dropper .slot { border-radius: 9px; background: repeating-linear-gradient(45deg, #3a3090 0 5px, #33298a 5px 10px); box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.35); }
.skin3d .bcol .cell { background: var(--cell); border-radius: 9px; box-shadow: inset 0 3px 4px rgba(0, 0, 0, 0.4); }
.skin3d .bcol.hover .cell { background: #352d7c; }
.skin3d .bcol .cell.top { box-shadow: inset 0 3px 0 rgba(255, 106, 77, 0.75), inset 0 3px 4px rgba(0, 0, 0, 0.4); }
.skin3d .bcol .cell.wall, .skin3d .bcol.hover .cell.wall { background: repeating-linear-gradient(45deg, #3a3090 0 5px, #2a2273 5px 10px); }

/* ── 상자(타일): 골판지 3D 블록 ── */
.skin3d .box3d {
  --bc: #e5433f; background: var(--bc) !important; color: #fff; --o: rgba(40, 22, 10, 0.75);
  border-radius: 18%;
  box-shadow: inset 0 -0.32em 0 rgba(0, 0, 0, 0.24), inset 0 0.16em 0 rgba(255, 255, 255, 0.4), 0 0.1em 0 rgba(20, 10, 40, 0.45);
  padding-top: 0.12em;
  text-shadow: -1.5px -1.5px 0 var(--o), 1.5px -1.5px 0 var(--o), -1.5px 1.5px 0 var(--o), 1.5px 1.5px 0 var(--o), 0 2px 0 var(--o);
}
.skin3d .box3d.light { color: #fff; --o: #7a4a22; }
.skin3d .box3d::before { /* 윗면 테이프 */
  content: ''; position: absolute; left: 39%; width: 22%; top: 0; height: 30%; border-radius: 0 0 3px 3px;
  background: rgba(255, 238, 200, 0.55); box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.08);
}
.skin3d .box3d::after { /* 발바닥 스티커 */
  content: ''; position: absolute; right: 10%; bottom: 16%; width: 18%; height: 18%; opacity: 0.55;
  background: radial-gradient(circle at 50% 70%, #fff 0 28%, transparent 30%), radial-gradient(circle at 18% 30%, #fff 0 14%, transparent 16%), radial-gradient(circle at 50% 14%, #fff 0 14%, transparent 16%), radial-gradient(circle at 82% 30%, #fff 0 14%, transparent 16%);
}
.skin3d .tile.falling { box-shadow: inset 0 -0.32em 0 rgba(0, 0, 0, 0.24), inset 0 0.16em 0 rgba(255, 255, 255, 0.4), 0 0 0 2px #fff, 0 0 14px 4px rgba(120, 190, 255, 0.85); }
.skin3d .tile.can-ship { box-shadow: inset 0 -0.32em 0 rgba(0, 0, 0, 0.24), inset 0 0.16em 0 rgba(255, 255, 255, 0.4), 0 0 0 3px #fff, 0 0 12px 4px rgba(255, 214, 70, 0.95); animation: shipglow 1.2s ease-in-out infinite; }
@keyframes shipglow { 50% { box-shadow: inset 0 -0.32em 0 rgba(0, 0, 0, 0.24), inset 0 0.16em 0 rgba(255, 255, 255, 0.4), 0 0 0 3px #ffe27a, 0 0 4px 1px rgba(255, 214, 70, 0.5); } }
.skin3d .aim-line { border-left: 4px dotted rgba(255, 255, 255, 0.9); transform: translateX(-2px); }
.skin3d .aim-line::after { background: rgba(255, 255, 255, 0.9); }
.skin3d .aim-line.full { border-left-color: rgba(255, 106, 77, 0.9); }

/* ── 아래: 롤러 컨베이어 + 우체부 고양이 ── */
.skin3d .belt, .skin3d.bpage .belt {
  position: relative; overflow: visible; height: 34px; margin-top: 10px; border-radius: 10px; animation: rollers 0.7s linear infinite;
  background: linear-gradient(rgba(255, 255, 255, 0.18), transparent 40%, rgba(0, 0, 0, 0.35)), repeating-linear-gradient(90deg, #5b6170 0 6px, #8a92a3 6px 14px, #5b6170 14px 18px);
  background-size: 100% 100%, 18px 100%;
  box-shadow: 0 -4px 0 #3d424e inset, 0 4px 0 #2c3038, 0 6px 8px rgba(0, 0, 0, 0.25);
}
@keyframes rollers { from { background-position: 0 0, 0 0; } to { background-position: 0 0, 18px 0; } }
.skin3d .belt span { background: rgba(255, 246, 230, 0.92); color: var(--ink); border-radius: 10px; padding: 2px 10px; font-size: 12px; font-weight: 800; position: relative; z-index: 1; }
.skin3d .belt.flash span { background: #6cc94a; color: #fff; }
.skin3d .belt.bad span { background: #ff8a6a; color: #fff; }
.skin3d .belt-cat { position: absolute; left: 2px; bottom: 4px; width: 62px; height: 50px; pointer-events: none; z-index: 2; }
.skin3d .belt-cat svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.2)); }
.skin3d .belt-box { position: absolute; right: 8px; bottom: 8px; width: 34px; height: 30px; border-radius: 5px; pointer-events: none;
  background: #d9a86c; box-shadow: inset 0 -5px 0 rgba(0, 0, 0, 0.2), inset 0 3px 0 rgba(255, 255, 255, 0.35), 0 2px 0 rgba(0, 0, 0, 0.3); }
.skin3d .belt-box::before { content: ''; position: absolute; left: 40%; width: 20%; top: 0; height: 40%; background: rgba(255, 238, 200, 0.6); }

/* ── 멈춤·팝업·알림 ── */
.skin3d .paused { background: rgba(46, 36, 112, 0.72); color: #fff; border-radius: 20px; }
.skin3d .paused small { color: #e6e0ff; }
.skin3d .sheet { background: var(--cream); border: 4px solid var(--wood); box-shadow: 0 6px 0 var(--wood-dk); border-radius: 20px; }
.skin3d .sheet h2 { color: #fff; text-align: center; font-size: 24px; }
.skin3d .btn { border-radius: 14px; box-shadow: 0 4px 0 #cdb592; }
.skin3d .btn.primary { background: linear-gradient(#ffa25a, #f07a2a); box-shadow: 0 4px 0 #b8541a; }
.skin3d .btn:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 #cdb592; }
.skin3d .toast { background: rgba(74, 40, 20, 0.92); border: 3px solid #fff; border-radius: 18px; }
.skin3d .note#hint { display: none; }

@media (max-height: 700px) {
  .skin3d .lv-word { font-size: 24px; }
  .skin3d .lv-sub { margin-top: 3px; }
  .skin3d .round-btn { width: 40px; height: 40px; }
  .skin3d .hud-top { grid-template-columns: 40px 1fr 40px; }
  .skin3d .rg-icon { width: 34px; height: 34px; }
  .skin3d .rent-gauge { grid-template-columns: 34px 1fr auto; }
  .skin3d .rg-track { height: 24px; }
  .skin3d .owin { height: 38px; }
  .skin3d .order .ov, .skin3d.bpage .order .ov { width: 34px; height: 30px; font-size: 14px; }
}

/* ════ 그림 스킨 (UI 아르 2026-10-12 v2: 시안과 똑같이 보이도록 그림 파일 사용) ════
   그림: img/skin3d/bg.jpg(창고+컨베이어), box-*.png(색깔 상자), cat.png(우체부 고양이) */
html { background: #efb988; }
body.skin3d { min-height: 100dvh; background: #efb988 url(../img/skin3d/bg.jpg) center bottom / cover no-repeat; }

/* 시안에 없는 정보는 숨김(값은 그대로 계산) */
.skin3d .lv-sub, .skin3d .rg-due, .skin3d .next-chip { display: none !important; }
.skin3d .rent-gauge { grid-template-columns: 40px 1fr auto; }
.skin3d .rg-goal { color: #fff; font-size: 16px; font-weight: 900; padding: 0 4px 0 2px; --o: #6b3a1e;
  text-shadow: -1.5px -1.5px 0 var(--o), 1.5px -1.5px 0 var(--o), -1.5px 1.5px 0 var(--o), 1.5px 1.5px 0 var(--o), 0 2px 0 var(--o); }

/* 상자: 그림 위에 숫자 */
.skin3d .box3d {
  background: var(--img) center 60% / 94% auto no-repeat !important;
  box-shadow: none !important; border-radius: 0; padding-top: 0.42em;
  --o: rgba(30, 16, 40, 0.78);
}
.skin3d .box3d.light { --o: #7a4a22; }
.skin3d .box3d::before, .skin3d .box3d::after { display: none; }
.skin3d .tile.falling { box-shadow: none !important; filter: drop-shadow(0 0 2px #fff) drop-shadow(0 0 8px rgba(120, 190, 255, 0.95)); }
.skin3d .tile.can-ship { box-shadow: none !important; animation: shipglow2 1.2s ease-in-out infinite; }
@keyframes shipglow2 { 0%, 100% { filter: drop-shadow(0 0 2px #fff) drop-shadow(0 0 7px rgba(255, 214, 70, 1)); } 50% { filter: drop-shadow(0 0 1px #ffe27a) drop-shadow(0 0 2px rgba(255, 214, 70, 0.5)); } }

/* 주문 카드: 큰 창 안에 그림 상자 */
.skin3d .orders-wrap { padding-top: 12px; }
.skin3d .order, .skin3d.bpage .order { padding: 7px 7px 8px; border-radius: 18px; }
.skin3d .owin { height: 60px; border-radius: 12px; background: rgba(40, 20, 10, 0.32); }
.skin3d .order .ov, .skin3d.bpage .order .ov { width: 62px; height: 58px; font-size: 17px; border-radius: 0; padding-top: 0.5em; }
.skin3d .order .pbar, .skin3d.bpage .order .pbar { height: 10px; border-radius: 5px; }
.skin3d .order::before { width: 36px; height: 16px; top: -12px; }

/* 판: 시안처럼 진한 남보라 */
.skin3d .dropper, .skin3d .bboard { background: #4a3aa6; border-color: #5b49c2; }
.skin3d .bcol .cell { background: #2a2366; }

/* 아래: 컨베이어는 배경 그림, 고양이는 그림 */
.skin3d .belt, .skin3d.bpage .belt { height: 82px; margin-top: 8px; background: none; box-shadow: none; animation: none; border-radius: 0; overflow: visible; }
.skin3d .belt span { opacity: 0; transition: opacity 0.2s; position: absolute; left: 50%; top: 10px; transform: translateX(-50%); white-space: nowrap; font-size: 13px; padding: 4px 12px; box-shadow: 0 3px 0 rgba(74, 40, 20, 0.35); }
.skin3d .belt.flash span, .skin3d .belt.bad span { opacity: 1; }
.skin3d .belt-box { display: none; }
.skin3d .belt-cat { left: -10px; bottom: -4px; width: 92px; height: 108px; z-index: 3; background: url(../img/skin3d/cat.png) center bottom / contain no-repeat; }
.skin3d .belt-cat svg { display: none; }

@media (max-height: 700px) {
  .skin3d .owin { height: 46px; }
  .skin3d .order .ov, .skin3d.bpage .order .ov { width: 48px; height: 44px; font-size: 14px; }
  .skin3d .belt, .skin3d.bpage .belt { height: 62px; }
  .skin3d .belt-cat { width: 76px; height: 90px; }
}
