/* 숫자 전용 글꼴: 원작 2048과 같은 Clear Sans Bold, 숫자·기호만 잘라 넣음 (Apache-2.0, assets/fonts/LICENSE-clear-sans.txt) */
@font-face {
  font-family: "Num2048";
  src: url("../assets/fonts/clear-sans-700-digits.woff2") format("woff2");
  font-weight: 700 900; font-display: block;
}
:root {
  --bg: #faf8ef;
  --ink: #776e65;
  --ink-strong: #4a443e;
  --board: #bbada0;
  --cell: #cdc1b4;
  --accent: #f67c5f;
  --win: #2fb36d;
  --lose: #8f7a66;
  --gap: 10px;
  --size: min(92vw, 440px, calc(100dvh - 392px - var(--ncq-toss-top, 0px) - var(--ncq-safe-bottom, 0px)));
  --cellsz: calc((var(--size) - var(--gap) * 5) / 4);
  --slide: 100ms;
  --num: "Num2048", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Noto Sans KR", system-ui, sans-serif;
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Noto Sans KR", system-ui, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); overscroll-behavior: none; }
body { touch-action: none; user-select: none; -webkit-user-select: none; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
[hidden] { display: none !important; }

#app {
  min-height: 100dvh;
  display: flex; flex-direction: column; align-items: center;
  padding-block: calc(14px + var(--ncq-toss-top, 0px) + var(--ncq-safe-top, 0px)) calc(14px + var(--ncq-safe-bottom, 0px) + var(--ncq-banner-bottom, 0px));
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  gap: 12px;
  height: 100dvh; overflow: hidden;
}

/* 상단 */
.top { width: var(--size); display: flex; flex-direction: column; gap: 10px; }
.title-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-right: var(--ncq-toss-right, 0px); }
.logo { margin: 0; flex: none; font-size: clamp(32px, 10.5vw, 44px); font-weight: 800; color: var(--ink); letter-spacing: -1px; }
.scores { display: flex; gap: 6px; min-width: 0; }
.score-box {
  position: relative; min-width: 64px; padding: 7px 10px 6px; border-radius: 12px; background: var(--board);
  display: flex; flex-direction: column; align-items: center; color: #fff;
}
.score-box .label { font-size: 11px; font-weight: 700; color: #eee4da; letter-spacing: .04em; }
.score-box .value { font-size: clamp(13px, 4.2vw, 20px); font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.score-box.bump .value { animation: bump 240ms ease-out; }
@keyframes bump { 40% { transform: scale(1.18); } }

.mode-chip {
  align-self: flex-start; padding: 6px 12px; border-radius: 999px; background: #ede0c8;
  color: var(--ink-strong); font-size: 14px; font-weight: 700;
}
.mode-chip::after { content: " ▾"; font-size: 11px; opacity: .7; }

/* 대결 진행 바 + 고스트 */
.duel-bar { width: var(--size); background: #fff; border-radius: 12px; padding: 10px 12px; box-shadow: 0 1px 0 rgba(0,0,0,.04); display: flex; gap: 12px; align-items: center; }
.duel-info { flex: 1; min-width: 0; }
.duel-text { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; margin-bottom: 2px; }
.duel-text span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.duel-text strong { color: var(--ink-strong); white-space: nowrap; font-variant-numeric: tabular-nums; }
.duel-bar.ahead .duel-text strong { color: var(--win); }
.duel-bar.behind .duel-text strong { color: #d64545; }
.duel-sub { font-size: 11px; color: #a39689; margin-bottom: 6px; min-height: 13px; font-variant-numeric: tabular-nums; }
.duel-track { position: relative; height: 6px; border-radius: 3px; background: #eee4da; overflow: hidden; }
.duel-fill { height: 100%; width: 0; border-radius: 3px; background: var(--accent); transition: width 240ms ease-out; }
.duel-bar.ahead .duel-fill { background: var(--win); }
.ghost { display: none; flex: none; width: 58px; height: 58px; padding: 3px; gap: 2px; border-radius: 6px; background: var(--board); grid-template-columns: repeat(4, 1fr); }
.duel-bar.has-ghost .ghost { display: grid; }
.ghost span { border-radius: 2px; background: var(--cell); font-size: 6.5px; font-weight: 800; display: flex; align-items: center; justify-content: center; color: var(--ink); overflow: hidden; }

/* 판 */
.board-wrap { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.board {
  position: relative; width: var(--size); height: var(--size);
  background: var(--board); border-radius: 10px; padding: var(--gap);
}
.grid, .tiles { position: absolute; inset: var(--gap); }
.grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(4, 1fr); gap: var(--gap); }
.grid i { background: var(--cell); border-radius: 6px; }

.tile {
  position: absolute; left: 0; top: 0; width: var(--cellsz); height: var(--cellsz);
  transform: translate(calc(var(--c) * (var(--cellsz) + var(--gap))), calc(var(--r) * (var(--cellsz) + var(--gap))));
  transition: transform var(--slide) ease-in-out;
  z-index: 1;
}
.tile .in {
  width: 100%; height: 100%; border-radius: 6px; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: calc(var(--cellsz) * .45); font-variant-numeric: tabular-nums;
  background: #eee4da; color: var(--ink);
}
.tile.new .in { animation: appear 200ms ease var(--slide) backwards; }
.tile.merged { z-index: 2; }
.tile.merged .in { animation: pop 200ms ease var(--slide) backwards; }
@keyframes appear { from { opacity: 0; transform: scale(0); } to { opacity: 1; transform: scale(1); } }
@keyframes pop { 0% { transform: scale(0); } 50% { transform: scale(1.2); } 100% { transform: scale(1); } }

/* 원작 2048 타일 색 */
.v2 .in { background: #eee4da; }
.v4 .in { background: #ede0c8; }
.v8 .in { background: #f2b179; color: #f9f6f2; }
.v16 .in { background: #f59563; color: #f9f6f2; }
.v32 .in { background: #f67c5f; color: #f9f6f2; }
.v64 .in { background: #f65e3b; color: #f9f6f2; }
.v128 .in { background: #edcf72; color: #f9f6f2; font-size: calc(var(--cellsz) * .37); box-shadow: 0 0 20px 3px rgba(243,215,116,.24); }
.v256 .in { background: #edcc61; color: #f9f6f2; font-size: calc(var(--cellsz) * .37); box-shadow: 0 0 20px 4px rgba(243,215,116,.32); }
.v512 .in { background: #edc850; color: #f9f6f2; font-size: calc(var(--cellsz) * .37); box-shadow: 0 0 20px 5px rgba(243,215,116,.40); }
.v1024 .in { background: #edc53f; color: #f9f6f2; font-size: calc(var(--cellsz) * .30); box-shadow: 0 0 22px 6px rgba(243,215,116,.48); }
.v2048 .in { background: #edc22e; color: #f9f6f2; font-size: calc(var(--cellsz) * .30); box-shadow: 0 0 26px 8px rgba(243,215,116,.56); }
.vbig .in { background: #3c3a32; color: #f9f6f2; font-size: calc(var(--cellsz) * .26); }

.gained {
  position: absolute; right: 8px; top: 2px; font-weight: 800; color: var(--accent); font-size: 18px;
  pointer-events: none; animation: rise 600ms ease-out forwards;
}
@keyframes rise { to { transform: translateY(-28px); opacity: 0; } }

/* 하단 버튼 */
.actions { width: var(--size); display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.act {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 10px 4px; border-radius: 12px; background: #ede0c8; color: var(--ink-strong);
  font-size: 13px; font-weight: 700;
}
.act .ico { font-size: 20px; line-height: 1; }
.act:active { transform: scale(.96); }
.act:disabled { opacity: .4; }
.ad-tag {
  position: absolute; top: 4px; right: 6px; font-style: normal; font-size: 9px; padding: 1px 4px;
  border-radius: 4px; background: var(--accent); color: #fff;
}

/* 시트(모달) */
.sheet {
  position: fixed; inset: 0; z-index: 20; background: rgba(60, 50, 40, .45);
  display: flex; align-items: flex-end; justify-content: center; animation: fade 160ms ease;
}
.sheet-card {
  width: 100%; max-width: 480px; max-height: 88dvh; overflow: auto; background: var(--bg);
  border-radius: 20px 20px 0 0; padding: 22px 20px calc(22px + var(--ncq-safe-bottom, 0px));
  animation: up 220ms cubic-bezier(.2,.8,.2,1);
}
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.sheet h2 { margin: 0 0 4px; font-size: 22px; color: var(--ink-strong); }
.sheet p.sub { margin: 0 0 16px; font-size: 14px; }
.btn {
  display: block; width: 100%; padding: 15px; margin-top: 10px; border-radius: 14px;
  background: var(--ink); color: #fff; font-size: 16px; font-weight: 800;
}
.btn.primary { background: var(--accent); }
.btn.ghost { background: #ede0c8; color: var(--ink-strong); }
.btn.danger { background: #fff; color: #d64545; border: 1px solid #f0c9c9; }
.btn small { font-weight: 600; opacity: .85; margin-left: 4px; }

/* 결과 카드 */
.vs { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; margin: 8px 0 6px; }
.vs .side { background: #fff; border-radius: 14px; padding: 12px; text-align: center; }
.vs .side.win { outline: 3px solid var(--win); }
.vs .who { font-size: 13px; font-weight: 700; }
.vs .pts { font-size: 26px; font-weight: 800; color: var(--ink-strong); font-variant-numeric: tabular-nums; }
.vs .tilemax { font-size: 12px; }
.vs .mid { font-weight: 800; color: #b9ab9e; }
.result-badge { font-size: 40px; text-align: center; margin: 4px 0; }
.solo-score { text-align: center; font-size: 44px; font-weight: 800; color: var(--ink-strong); font-variant-numeric: tabular-nums; }
.note { font-size: 12px; color: #a39689; margin-top: 12px; line-height: 1.5; }

/* 모드 선택 */
.mode-item { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 14px; border-radius: 14px; background: #fff; margin-top: 10px; }
.mode-item .emo { font-size: 26px; }
.mode-item b { display: block; color: var(--ink-strong); font-size: 16px; }
.mode-item span { font-size: 13px; }

/* 랭킹 */
.rank-list { list-style: none; margin: 8px 0 0; padding: 0; }
.rank-list li { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 8px; padding: 12px; border-radius: 12px; background: #fff; margin-top: 6px; }
.rank-list li.me { outline: 2px solid var(--accent); }
.rank-list .no { font-weight: 800; color: #b9ab9e; text-align: center; }
.rank-list .nm { font-weight: 700; color: var(--ink-strong); }
.rank-list .nm small { font-weight: 500; color: #a39689; margin-left: 4px; }
.rank-list .sc { font-weight: 800; font-variant-numeric: tabular-nums; }

/* 설정 */
.row { display: flex; align-items: center; justify-content: space-between; padding: 14px; background: #fff; border-radius: 14px; margin-top: 10px; }
.row input[type=text] { width: 50%; padding: 8px 10px; border-radius: 8px; border: 1px solid #e3d8cc; font: inherit; text-align: right; user-select: text; -webkit-user-select: text; }
.row .owned { color: var(--win); font-weight: 800; } /* 광고 제거를 산 뒤 설정에 보이는 표시 */
.switch { width: 50px; height: 30px; border-radius: 15px; background: #d9cfc4; position: relative; transition: background 160ms; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform 160ms; }
.switch.on { background: var(--win); }
.switch.on::after { transform: translateX(20px); }

.toast {
  position: fixed; left: 50%; bottom: calc(90px + var(--ncq-safe-bottom, 0px)); transform: translateX(-50%); z-index: 40;
  background: rgba(60,50,40,.92); color: #fff; padding: 10px 16px; border-radius: 999px; font-size: 14px; font-weight: 600;
  animation: fade 160ms ease; max-width: 90vw; text-align: center;
}

/* NCQ_TEST_CHEAT 테스트 패널 */
.test-panel { width: var(--size); display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.test-panel button { font-size: 11px; padding: 4px 6px; border-radius: 6px; background: #3c3a32; color: #fff; opacity: .7; }
.link-box { width: 100%; padding: 12px; border-radius: 12px; border: 1px solid #e3d8cc; background: #fff; color: var(--ink-strong); font: inherit; font-size: 14px; resize: none; user-select: text; -webkit-user-select: text; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { :root { --slide: 0ms; } .tile .in, .sheet, .sheet-card { animation: none !important; } }

/* 원작 타일 색을 고스트·불꽃에도 */
.ghost .v2, .spark.v2 { background: #eee4da; } .ghost .v4, .spark.v4 { background: #ede0c8; }
.ghost .v8, .spark.v8 { background: #f2b179; color: #fff; } .ghost .v16, .spark.v16 { background: #f59563; color: #fff; }
.ghost .v32, .spark.v32 { background: #f67c5f; color: #fff; } .ghost .v64, .spark.v64 { background: #f65e3b; color: #fff; }
.ghost .v128, .spark.v128 { background: #edcf72; color: #fff; } .ghost .v256, .spark.v256 { background: #edcc61; color: #fff; }
.ghost .v512, .spark.v512 { background: #edc850; color: #fff; } .ghost .v1024, .spark.v1024 { background: #edc53f; color: #fff; }
.ghost .v2048, .spark.v2048 { background: #edc22e; color: #fff; } .ghost .vbig, .spark.vbig { background: #3c3a32; color: #fff; }

/* 콤보: 판 흔들기, 불꽃, 콤보 글자 */
.board.shake { animation: shake 180ms ease-out var(--slide); }
@keyframes shake { 25% { transform: translate(3px, -2px); } 50% { transform: translate(-3px, 2px); } 75% { transform: translate(2px, 1px); } }
.spark {
  position: absolute; left: 0; top: 0; width: 9px; height: 9px; border-radius: 50%; z-index: 3; pointer-events: none;
  transform: translate(calc(var(--c) * (var(--cellsz) + var(--gap)) + var(--cellsz) / 2 - 4.5px), calc(var(--r) * (var(--cellsz) + var(--gap)) + var(--cellsz) / 2 - 4.5px));
  animation: spark 520ms ease-out var(--slide) forwards; opacity: 0;
}
@keyframes spark {
  0% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(var(--c) * (var(--cellsz) + var(--gap)) + var(--cellsz) / 2 - 4.5px + var(--dx)), calc(var(--r) * (var(--cellsz) + var(--gap)) + var(--cellsz) / 2 - 4.5px + var(--dy))) scale(.3); }
}
.combo {
  position: absolute; left: 50%; top: 42%; z-index: 4; transform: translate(-50%, -50%); pointer-events: none;
  font-size: 30px; font-weight: 900; color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.18); letter-spacing: -.5px;
  animation: combo 760ms ease-out forwards;
}
@keyframes combo { 0% { opacity: 0; transform: translate(-50%, -30%) scale(.6); } 25% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); } 100% { opacity: 0; transform: translate(-50%, -90%) scale(1); } }

/* 위기: 빈칸 2칸 이하 */
.board { transition: box-shadow 260ms ease; }
.board.danger { box-shadow: 0 0 0 3px rgba(214, 69, 69, .55), 0 0 22px rgba(214, 69, 69, .35); animation: pulse 1.6s ease-in-out infinite; }
.board.danger.shake { animation: shake 180ms ease-out var(--slide); }
@keyframes pulse { 50% { box-shadow: 0 0 0 3px rgba(214, 69, 69, .3), 0 0 10px rgba(214, 69, 69, .15); } }

/* 결과: 구간 비교, 표시, 이어하기 */
.miles { background: #fff; border-radius: 14px; padding: 10px 12px; margin-top: 8px; }
.miles-head, .miles li { display: grid; grid-template-columns: 64px 1fr 1fr; align-items: center; text-align: center; font-variant-numeric: tabular-nums; }
.miles-head { font-size: 12px; color: #a39689; font-weight: 700; padding-bottom: 6px; }
.miles-head span:not(:first-child) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.miles ul { list-style: none; margin: 0; padding: 0; }
.miles li { padding: 5px 0; border-top: 1px solid #f1ebe3; font-size: 14px; color: var(--ink-strong); }
.miles .fast { font-weight: 800; color: var(--win); }
.miles .fast::after { content: " ▲"; font-size: 10px; }
.mt { justify-self: center; min-width: 44px; padding: 2px 6px; border-radius: 6px; font-size: 12px; font-weight: 800; color: #fff; background: #edcf72; }
.mt.v128 { background: #edcf72; } .mt.v256 { background: #edcc61; } .mt.v512 { background: #edc850; } .mt.v1024 { background: #edc53f; } .mt.v2048 { background: #edc22e; }
.flag { display: inline-block; margin-top: 6px; padding: 2px 8px; border-radius: 999px; background: #f3ece3; font-size: 11px; font-weight: 700; }
.flag.ok { background: #e3f5ea; color: #1f8a52; }
.btn.revive { background: #2fb36d; }
.btn.revive small { display: block; margin: 2px 0 0; font-size: 12px; }

/* 공유 카드 */
.share-img { display: block; width: 100%; max-width: 320px; margin: 0 auto 4px; border-radius: 14px; box-shadow: 0 4px 18px rgba(60,50,40,.18); }

/* 랭킹 탭·빈 상태 */
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 12px; background: #ede0c8; margin: 8px 0 12px; }
.tabs button { padding: 9px; border-radius: 9px; font-size: 14px; font-weight: 700; color: var(--ink); }
.tabs button.on { background: #fff; color: var(--ink-strong); box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.rank-list .sc.rec { font-weight: 600; } .rank-list .sc .w { color: var(--win); }
.empty { background: #fff; border-radius: 14px; padding: 20px 16px; text-align: center; display: flex; flex-direction: column; gap: 6px; }
.empty b { color: var(--ink-strong); } .empty span { font-size: 13px; line-height: 1.5; }
.streak { font-style: normal; font-size: 12px; padding: 1px 7px; border-radius: 999px; background: #fde3d9; color: #d4532f; margin-left: 4px; vertical-align: 2px; }

/* 스킨 선택 */
.sec { margin: 18px 0 2px; font-size: 15px; color: var(--ink-strong); }
.sec small { font-weight: 600; color: #a39689; }
.skins { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-top: 8px; }
.skin { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; border-radius: 14px; background: #fff; border: 2px solid transparent; }
.skin.on { border-color: var(--accent); }
.skin.locked { opacity: .55; }
.skin b { font-size: 13px; color: var(--ink-strong); } .skin small { font-size: 11px; text-align: center; line-height: 1.3; }
.sw { display: grid; grid-template-columns: repeat(2, 18px); gap: 3px; padding: 4px; border-radius: 6px; background: var(--board); }
.sw i { width: 18px; height: 18px; border-radius: 3px; }
.sw .v2 { background: #eee4da; } .sw .v8 { background: #f2b179; } .sw .v64 { background: #f65e3b; } .sw .v512 { background: #edc850; }

/* 동물 진화 스킨: 이모지 + 작은 숫자 */
.tile .in .emo { font-size: calc(var(--cellsz) * .5); line-height: 1; }
.tile .in .num { position: absolute; right: 6px; bottom: 4px; font-size: calc(var(--cellsz) * .16); opacity: .7; }
.tile .in { position: relative; }

/* 파스텔 */
.skin-pastel.board, .sw.skin-pastel, .ghost.skin-pastel { background: #c9c3e0; }
.skin-pastel .grid i, .ghost.skin-pastel span { background: #dcd7ee; }
.skin-pastel .v2 .in, .sw.skin-pastel .v2 { background: #fdf2f8; color: #8a6f8e; }
.skin-pastel .v4 .in { background: #fbe1ee; color: #8a6f8e; }
.skin-pastel .v8 .in, .sw.skin-pastel .v8 { background: #f9c6d9; color: #fff; }
.skin-pastel .v16 .in { background: #c9e4f6; color: #fff; }
.skin-pastel .v32 .in { background: #a9d4f0; color: #fff; }
.skin-pastel .v64 .in, .sw.skin-pastel .v64 { background: #9fdcc8; color: #fff; }
.skin-pastel .v128 .in { background: #bfe6a7; color: #fff; box-shadow: none; }
.skin-pastel .v256 .in { background: #f7e09a; color: #fff; box-shadow: none; }
.skin-pastel .v512 .in, .sw.skin-pastel .v512 { background: #f6c58f; color: #fff; box-shadow: none; }
.skin-pastel .v1024 .in { background: #c8a8ec; color: #fff; box-shadow: none; }
.skin-pastel .v2048 .in { background: #a98be4; color: #fff; box-shadow: 0 0 22px 6px rgba(169,139,228,.45); }

/* 네온 */
.skin-neon.board, .sw.skin-neon, .ghost.skin-neon { background: #12122a; }
.skin-neon .grid i, .ghost.skin-neon span { background: #1d1d3d; }
.skin-neon .tile .in { background: #1d1d3d !important; color: var(--neon) !important; box-shadow: inset 0 0 0 2px var(--neon), 0 0 12px var(--neon) !important; text-shadow: 0 0 8px var(--neon); }
.skin-neon .v2 { --neon: #5eead4; } .skin-neon .v4 { --neon: #67e8f9; } .skin-neon .v8 { --neon: #60a5fa; } .skin-neon .v16 { --neon: #818cf8; }
.skin-neon .v32 { --neon: #c084fc; } .skin-neon .v64 { --neon: #f472b6; } .skin-neon .v128 { --neon: #fb7185; } .skin-neon .v256 { --neon: #fb923c; }
.skin-neon .v512 { --neon: #facc15; } .skin-neon .v1024 { --neon: #a3e635; } .skin-neon .v2048 { --neon: #ffffff; } .skin-neon .vbig { --neon: #ffffff; }
.sw.skin-neon i { background: #1d1d3d !important; box-shadow: inset 0 0 0 2px #5eead4; }
.sw.skin-neon .v8 { box-shadow: inset 0 0 0 2px #60a5fa; } .sw.skin-neon .v64 { box-shadow: inset 0 0 0 2px #f472b6; } .sw.skin-neon .v512 { box-shadow: inset 0 0 0 2px #facc15; }

/* 먹물 */
.skin-ink.board, .sw.skin-ink, .ghost.skin-ink { background: #2b2a28; }
.skin-ink .grid i, .ghost.skin-ink span { background: #3a3936; }
.skin-ink .tile .in { color: #f4f1ea; box-shadow: none !important; }
.skin-ink .v2 .in, .sw.skin-ink .v2 { background: #e9e6df; color: #2b2a28; }
.skin-ink .v4 .in { background: #d6d2c9; color: #2b2a28; }
.skin-ink .v8 .in, .sw.skin-ink .v8 { background: #b9b4a9; }
.skin-ink .v16 .in { background: #9d978b; } .skin-ink .v32 .in { background: #827c70; }
.skin-ink .v64 .in, .sw.skin-ink .v64 { background: #686256; } .skin-ink .v128 .in { background: #514c42; }
.skin-ink .v256 .in { background: #3e3a32; } .skin-ink .v512 .in, .sw.skin-ink .v512 { background: #c0392b; }
.skin-ink .v1024 .in { background: #a93226; } .skin-ink .v2048 .in { background: #e74c3c; }

/* 동물 진화 미리보기 */
.sw.skin-animal i { background: #eee4da; display: flex; align-items: center; justify-content: center; font-size: 12px; font-style: normal; }
.sw.skin-animal .v2::after { content: "🥚"; } .sw.skin-animal .v8::after { content: "🐥"; }
.sw.skin-animal .v64::after { content: "🦃"; } .sw.skin-animal .v512::after { content: "🦩"; }
.sw.skin-animal .v8 { background: #f2b179; } .sw.skin-animal .v64 { background: #f65e3b; } .sw.skin-animal .v512 { background: #edc850; }

/* ── 클래식 UI 다듬기 (2026-11-04) ───────────── */
.new-tag { display: none; position: absolute; top: -7px; right: -6px; padding: 1px 6px; border-radius: 999px; background: var(--accent); color: #fff; font-style: normal; font-size: 10px; font-weight: 800; letter-spacing: .04em; box-shadow: 0 2px 6px rgba(246,124,95,.4); }
.score-box.is-new .new-tag { display: block; animation: pop 260ms ease; }

/* 타일 입체감: 아래쪽에 얇은 그림자 */
.tile .in { box-shadow: inset 0 -3px 0 rgba(0,0,0,.06); }
.v8 .in, .v16 .in, .v32 .in, .v64 .in { box-shadow: inset 0 -3px 0 rgba(0,0,0,.08); }
.board { box-shadow: inset 0 2px 6px rgba(0,0,0,.06); }
.grid i { box-shadow: inset 0 2px 3px rgba(0,0,0,.05); }

/* 하단 버튼: 선 아이콘 + 부드러운 면 */
.act { background: #f3eadb; box-shadow: inset 0 0 0 1px rgba(119,110,101,.08); transition: transform 80ms ease, background 120ms ease; }
.act:active { background: #ebdfca; }
.act .ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; display: block; }
.ad-tag { top: 5px; right: 6px; font-size: 8.5px; font-weight: 800; letter-spacing: .04em; padding: 1px 4px; border-radius: 4px; }

/* 모드 칩 */
.mode-chip { padding: 7px 14px; box-shadow: inset 0 0 0 1px rgba(119,110,101,.08); }

/* 시트: 손잡이 + 흐린 배경 */
.sheet { backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.sheet-card { position: relative; padding-top: 28px; box-shadow: 0 -8px 30px rgba(60,50,40,.12); }
.sheet-card::before { content: ""; position: absolute; top: 9px; left: 50%; width: 38px; height: 5px; margin-left: -19px; border-radius: 3px; background: #ddd2c4; }
.btn { transition: transform 80ms ease, filter 120ms ease; }
.btn:active { transform: scale(.98); filter: brightness(.96); }

/* 처음 판 안내 */
.hint {
  position: absolute; left: 50%; bottom: 14%; z-index: 5; transform: translateX(-50%); pointer-events: none;
  display: flex; align-items: center; gap: 8px; white-space: nowrap;
  padding: 9px 14px; border-radius: 999px; background: rgba(60,50,40,.82); color: #fff; font-size: 14px; font-weight: 700;
  animation: hintIn 400ms ease 300ms backwards;
}
.hint .hand { display: inline-block; font-size: 18px; animation: sway 1.3s ease-in-out infinite; }
.hint.out { animation: hintOut 260ms ease forwards; }
@keyframes hintIn { from { opacity: 0; transform: translate(-50%, 8px); } }
@keyframes hintOut { to { opacity: 0; transform: translate(-50%, 8px); } }
@keyframes sway { 50% { transform: translateX(6px); } }

/* 게임 끝: 판이 흐려지며 글자 */
.over-veil {
  position: absolute; inset: 0; z-index: 6; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  background: rgba(238, 228, 218, .62); animation: fade 380ms ease;
}
.over-veil b { font-size: clamp(32px, 11vw, 52px); font-weight: 900; color: var(--ink); letter-spacing: -1px; animation: up 380ms cubic-bezier(.2,.8,.2,1); }

/* 테스트 버튼: 접어 두기 */
.test-panel { width: var(--size); display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.test-panel .test-toggle { font-size: 11px; padding: 3px 9px; border-radius: 999px; background: transparent; color: #b3a697; border: 1px dashed #d8ccbd; }
.test-panel:not(.open) button:not(.test-toggle) { display: none; }

/* 대결 중에는 상대 바만큼 판을 줄임
   --cellsz는 :root에서 이미 계산된 값이 내려오므로, 판 크기를 바꾸는 곳에서 같이 다시 계산해야 타일이 판과 맞아요 */
body.in-duel {
  --size: min(92vw, 440px, calc(100dvh - 405px - var(--ncq-toss-top, 0px) - var(--ncq-safe-bottom, 0px)));
  --cellsz: calc((var(--size) - var(--gap) * 5) / 4);
}

/* 숫자는 전용 글꼴로 (한글은 기기 글꼴로 자연스럽게 넘어감) */
.logo, .tile .in, .score-box .value, .ghost span, .gained, .combo, .solo-score, .vs .pts, .mt, .miles li, .rank-list .sc, .duel-text strong, .tile-mini .in, .goal-prog { font-family: var(--num); }
.tile .in { letter-spacing: -.5px; }

/* 합칠 때 색 번짐 */
.bloom {
  position: absolute; left: 0; top: 0; z-index: 0; width: var(--cellsz); height: var(--cellsz); border-radius: 8px; pointer-events: none;
  transform: translate(calc(var(--c) * (var(--cellsz) + var(--gap))), calc(var(--r) * (var(--cellsz) + var(--gap))));
  background: var(--bloom, #edc22e); opacity: 0;
  animation: bloom 380ms ease-out var(--slide) forwards;
}
@keyframes bloom {
  0% { opacity: .65; transform: translate(calc(var(--c) * (var(--cellsz) + var(--gap))), calc(var(--r) * (var(--cellsz) + var(--gap)))) scale(.85); }
  100% { opacity: 0; transform: translate(calc(var(--c) * (var(--cellsz) + var(--gap))), calc(var(--r) * (var(--cellsz) + var(--gap)))) scale(1.45); }
}
.bloom.v8 { --bloom: #f2b179; } .bloom.v16 { --bloom: #f59563; } .bloom.v32 { --bloom: #f67c5f; } .bloom.v64 { --bloom: #f65e3b; }
.bloom.v128 { --bloom: #edcf72; } .bloom.v256 { --bloom: #edcc61; } .bloom.v512 { --bloom: #edc850; } .bloom.v1024 { --bloom: #edc53f; } .bloom.v2048, .bloom.vbig { --bloom: #edc22e; }
.skin-neon .bloom { --bloom: #818cf8; } .skin-ink .bloom { --bloom: #c0392b; } .skin-pastel .bloom { --bloom: #c8a8ec; }

/* 오늘의 목표 */
.goal { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 1px rgba(119,110,101,.06); }
.goal-ico { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #fdebe3; color: var(--accent); }
.goal-ico svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.goal-body { flex: 1; min-width: 0; }
.goal-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.goal-label { font-size: 11px; font-weight: 700; color: #a39689; letter-spacing: .02em; }
.goal-text { font-size: 14px; font-weight: 800; color: var(--ink-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.goal-prog { font-size: 12px; font-weight: 700; color: #a39689; font-variant-numeric: tabular-nums; white-space: nowrap; }
.goal-track { height: 4px; border-radius: 2px; background: #f1ebe3; margin-top: 6px; overflow: hidden; }
.goal-fill { height: 100%; width: 0; border-radius: 2px; background: var(--accent); transition: width 300ms ease-out; }
.goal.done .goal-ico { background: #e3f5ea; color: var(--win); }
.goal.done .goal-fill { background: var(--win); }
.goal.done .goal-prog { color: var(--win); }
.goal.flash { animation: goalFlash 900ms ease; }
@keyframes goalFlash { 20% { box-shadow: 0 0 0 3px rgba(47,179,109,.45); transform: scale(1.02); } }

/* 알림은 위쪽에 띄워 판과 하단 버튼을 가리지 않게 */
.toast { top: calc(12px + var(--ncq-toss-top, 0px) + var(--ncq-safe-top, 0px)); bottom: auto; animation: toastIn 220ms cubic-bezier(.2,.8,.2,1); box-shadow: 0 6px 20px rgba(60,50,40,.25); }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, -10px); } }

/* '한 번에 N쌍!' 글자: 어두운 알약 모양으로 어떤 타일 위에서도 잘 보이게 */
.combo {
  top: 50%; padding: 8px 16px; border-radius: 999px; white-space: nowrap;
  background: rgba(60, 50, 40, .86); color: #fff; text-shadow: none;
  font-size: clamp(18px, 5.6vw, 24px); font-weight: 900; letter-spacing: -.3px;
  box-shadow: 0 6px 18px rgba(60,50,40,.3);
}
.combo { z-index: 10; animation: pairs 1000ms ease-out forwards; }
@keyframes pairs {
  0% { opacity: 0; transform: translate(-50%, -30%) scale(.7); }
  14% { opacity: 1; transform: translate(-50%, -50%) scale(1.06); }
  22% { transform: translate(-50%, -50%) scale(1); }
  72% { opacity: 1; transform: translate(-50%, -50%); }
  100% { opacity: 0; transform: translate(-50%, -80%); }
}

/* ══ 3차 다듬기: 볼륨감 있는 타일 + 같은 입체 언어로 UI 정리 (2026-11-04) ══ */
:root {
  --surface: #fffdf8;
  --shadow-sm: 0 1px 2px rgba(119,110,101,.08), 0 4px 12px rgba(119,110,101,.10);
  --shadow-md: 0 2px 4px rgba(119,110,101,.10), 0 10px 26px rgba(119,110,101,.16);
  --lip: inset 0 1px 0 rgba(255,255,255,.9), inset 0 -3px 0 rgba(119,110,101,.10);
}
body { background: radial-gradient(130% 70% at 50% 0%, #fffdf7 0%, #f8f3e8 60%, #f3ecdf 100%) fixed; }

/* 로고: 살짝 눌러 찍은 느낌 */
.logo { color: #776e65; text-shadow: 0 1px 0 rgba(255,255,255,.9), 0 3px 0 rgba(119,110,101,.14); }

/* 판: 오목하게 파인 쟁반, 빈칸은 안으로 들어간 홈 */
.board {
  border-radius: 14px;
  background: linear-gradient(180deg, #c3b6a9 0%, #b5a698 100%);
  box-shadow: inset 0 3px 8px rgba(0,0,0,.12), inset 0 -1px 0 rgba(255,255,255,.25), 0 1px 0 rgba(255,255,255,.8), 0 10px 28px rgba(119,110,101,.20);
}
.grid i { border-radius: 9px; background: #cdc1b4; box-shadow: inset 0 3px 5px rgba(0,0,0,.09), inset 0 -1px 0 rgba(255,255,255,.3); }

/* 타일: 위는 밝고 아래는 두께가 보이는 키캡 */
.tile .in {
  border-radius: 9px; padding-bottom: 4px; box-sizing: border-box;
  background-image: linear-gradient(180deg, rgba(255,255,255,.30) 0%, rgba(255,255,255,.08) 40%, rgba(255,255,255,0) 58%, rgba(0,0,0,.05) 100%);
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,.55),
    inset 0 -5px 0 rgba(0,0,0,.13),
    0 3px 0 rgba(110,92,74,.16),
    0 6px 12px rgba(80,60,40,.16),
    var(--glow, 0 0 0 transparent);
  text-shadow: 0 1px 0 rgba(255,255,255,.35);
}
.v8 .in, .v16 .in, .v32 .in, .v64 .in, .v128 .in, .v256 .in, .v512 .in, .v1024 .in, .v2048 .in, .vbig .in { text-shadow: 0 1px 1px rgba(0,0,0,.14); }
.v128 .in { --glow: 0 0 20px 3px rgba(243,215,116,.30); }
.v256 .in { --glow: 0 0 22px 4px rgba(243,215,116,.38); }
.v512 .in { --glow: 0 0 24px 5px rgba(243,215,116,.46); }
.v1024 .in { --glow: 0 0 26px 6px rgba(243,215,116,.54); }
.v2048 .in { --glow: 0 0 30px 9px rgba(243,215,116,.62); }
.vbig .in { --glow: 0 0 24px 6px rgba(60,58,50,.35); }
.tile.merged .in { animation-name: popVol; }
@keyframes popVol { 0% { transform: scale(0); } 55% { transform: scale(1.14); } 78% { transform: scale(.97); } 100% { transform: scale(1); } }

/* 점수 상자: 타일과 같은 키캡 */
.score-box {
  background: linear-gradient(180deg, #c6b8aa 0%, #b2a293 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), inset 0 -3px 0 rgba(0,0,0,.10), 0 4px 12px rgba(119,110,101,.18);
}
.score-box .value { text-shadow: 0 1px 1px rgba(0,0,0,.12); }

/* 떠 있는 카드: 모드 칩, 목표, 대결 바 */
.mode-chip { background: var(--surface); color: var(--ink-strong); box-shadow: var(--lip), var(--shadow-sm); }
.mode-chip::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 8px; vertical-align: 3px; border-right: 2px solid #a39689; border-bottom: 2px solid #a39689; transform: rotate(45deg); }
.goal, .duel-bar { background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-sm); }
.goal-ico { box-shadow: inset 0 -2px 0 rgba(0,0,0,.05); }
.duel-track, .goal-track { box-shadow: inset 0 1px 2px rgba(0,0,0,.08); }
.ghost { border-radius: 8px; box-shadow: inset 0 2px 4px rgba(0,0,0,.12); }

/* 하단 버튼: 눌리는 키 */
.act {
  border-radius: 16px; color: var(--ink-strong);
  background: linear-gradient(180deg, #fffdf8 0%, #f4ecdf 100%);
  box-shadow: inset 0 1px 0 #fff, inset 0 -3px 0 rgba(119,110,101,.12), 0 4px 12px rgba(119,110,101,.16);
  transition: transform 90ms ease, box-shadow 90ms ease;
}
.act:active { transform: translateY(2px); background: linear-gradient(180deg, #f7f0e4 0%, #efe5d5 100%); box-shadow: inset 0 1px 0 #fff, inset 0 -1px 0 rgba(119,110,101,.12), 0 2px 6px rgba(119,110,101,.14); }
.act:disabled { opacity: .45; box-shadow: inset 0 1px 0 #fff, 0 2px 6px rgba(119,110,101,.08); }

/* 시트 안 */
.sheet-card { background: #fbf8f1; border-radius: 24px 24px 0 0; }
.btn {
  border-radius: 16px; position: relative;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22), inset 0 -4px 0 rgba(0,0,0,.14), 0 4px 12px rgba(119,110,101,.16);
  transition: transform 90ms ease, box-shadow 90ms ease;
}
.btn:active { transform: translateY(2px); box-shadow: inset 0 1px 0 rgba(255,255,255,.22), inset 0 -2px 0 rgba(0,0,0,.14), 0 2px 6px rgba(119,110,101,.14); }
.btn.primary { background: linear-gradient(180deg, #f99272 0%, #f2704f 100%); }
.btn.revive { background: linear-gradient(180deg, #43c57f 0%, #27a663 100%); }
.btn:not(.primary):not(.ghost):not(.danger):not(.revive) { background: linear-gradient(180deg, #8a8077 0%, #6f665d 100%); }
.btn.ghost { background: linear-gradient(180deg, #fffdf8 0%, #f1e8da 100%); box-shadow: inset 0 1px 0 #fff, inset 0 -3px 0 rgba(119,110,101,.12), 0 3px 10px rgba(119,110,101,.12); }
.btn.danger { background: var(--surface); box-shadow: inset 0 0 0 1px #f0c9c9, inset 0 -3px 0 rgba(214,69,69,.10); }
.mode-item, .row, .vs .side, .miles, .rank-list li, .empty, .skin, .pick { background: var(--surface); box-shadow: var(--shadow-sm); }
.mode-item { transition: transform 90ms ease; } .mode-item:active { transform: scale(.985); }
.mode-item .emo { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: #f6eee2; box-shadow: inset 0 -2px 0 rgba(0,0,0,.05); font-size: 22px; }
.tabs { background: #efe5d6; box-shadow: inset 0 1px 3px rgba(0,0,0,.08); }
.tabs button.on { box-shadow: var(--shadow-sm); }
.switch { box-shadow: inset 0 1px 3px rgba(0,0,0,.15); }
.switch::after { box-shadow: 0 2px 4px rgba(0,0,0,.2); }

/* 알림: 유리 느낌 */
.toast { background: rgba(60,50,40,.78); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }

/* 새 게임 메뉴 아이콘: 하단 버튼과 같은 선 아이콘 */
.mode-item .emo { flex: none; }
.mode-item .ico-line { color: var(--accent); background: #fdeee6; }
.mode-item[data-m="weekly"] .ico-line { color: #5d8fc6; background: #e8f0fa; }
.mode-item[data-m="duel"] .ico-line { color: #d64545; background: #fbe6e6; }
.mode-item[data-m="practice"] .ico-line { color: #6aa35a; background: #eaf4e5; }
.ico-line svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mode-item .ico-line circle { fill: currentColor; stroke: none; }
.mode-item[data-m="weekly"] .ico-line circle, .mode-item[data-m="daily"] .ico-line circle { fill: none; }
.mode-item > div { min-width: 0; }

/* ══ 큰 순간 연출 (512·1024·2048) ══ */
.goldwash {
  position: absolute; inset: 0; z-index: 7; border-radius: 14px; pointer-events: none;
  background: radial-gradient(circle at 50% 50%, rgba(255, 224, 120, .75) 0%, rgba(255, 210, 90, .35) 40%, rgba(255, 210, 90, 0) 75%);
  animation: wash 1000ms ease-out forwards;
}
.goldwash.v1024 { background: radial-gradient(circle, rgba(255,220,100,.85) 0%, rgba(255,200,70,.45) 45%, rgba(255,200,70,0) 80%); }
.goldwash.v2048, .goldwash.vbig { background: radial-gradient(circle, rgba(255,240,170,.95) 0%, rgba(255,205,60,.55) 50%, rgba(255,205,60,0) 85%); }
@keyframes wash { 0% { opacity: 0; transform: scale(.4); } 25% { opacity: 1; transform: scale(1.05); } 100% { opacity: 0; transform: scale(1.25); } }
.bigmoment {
  position: absolute; left: 50%; top: 46%; z-index: 9; pointer-events: none; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  animation: bigIn 1650ms cubic-bezier(.2,.8,.2,1) forwards;
}
.bigmoment b {
  font-family: var(--num); font-size: clamp(64px, 22vw, 104px); line-height: 1; color: #fff; letter-spacing: -2px;
  text-shadow: 0 4px 0 #c99a1d, 0 8px 22px rgba(201,154,29,.55), 0 0 40px rgba(255,230,140,.9);
}
.bigmoment span { padding: 5px 12px; border-radius: 999px; background: rgba(60,50,40,.82); color: #fff; font-size: 14px; font-weight: 800; white-space: nowrap; }
@keyframes bigIn {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.3) rotate(-8deg); }
  18% { opacity: 1; transform: translate(-50%, -50%) scale(1.12) rotate(2deg); }
  28% { transform: translate(-50%, -50%) scale(1) rotate(0); }
  80% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -62%) scale(.96); }
}
.board.thump { animation: thump 420ms cubic-bezier(.2,.8,.2,1) var(--slide); }
@keyframes thump { 30% { transform: scale(1.025); } 60% { transform: scale(.995); } }
.confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 15; pointer-events: none; }

/* 최고 기록 갱신: 최고 상자 반짝 + 별 */
.score-box.glint { animation: glint 700ms ease; }
@keyframes glint { 30% { box-shadow: inset 0 1px 0 rgba(255,255,255,.35), inset 0 -3px 0 rgba(0,0,0,.10), 0 0 0 4px rgba(246,124,95,.35), 0 0 22px rgba(246,124,95,.5); transform: scale(1.06); } }
.star {
  position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px; z-index: 3; pointer-events: none;
  background: #ffd85a; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  animation: star 800ms ease-out forwards; opacity: 0;
}
@keyframes star { 0% { opacity: 1; transform: translate(0, 0) scale(.6); } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1.3) rotate(90deg); } }

/* ── 언어: 언어 메뉴 + 영어처럼 긴 글자도 넘치지 않게 ── */
.seg { display: inline-grid; grid-auto-flow: column; gap: 4px; padding: 3px; border-radius: 10px; background: #efe5d6; box-shadow: inset 0 1px 3px rgba(0,0,0,.08); }
.seg button { padding: 6px 12px; border-radius: 8px; font-size: 14px; font-weight: 700; color: var(--ink); }
.seg button.on { background: #fff; color: var(--ink-strong); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.btn, .mode-item, .mode-item b, .mode-item span, .row > span, .skin b, .skin small, .tabs button,
.goal-text, .duel-text, .duel-sub, .toast, .note, .sub, .vs .who, .vs .tilemax, .flag, .empty, .hint, .combo, .bigmoment span {
  overflow-wrap: anywhere;
}
.row { gap: 12px; }
.act > span:not(.ico) { white-space: nowrap; }

/* 여는 첫 순간 다른 언어가 비치지 않게 (NcqLang.init이 <html lang>을 정함) */
html:not([lang]) [data-i18n] { visibility: hidden; }

/* ── 노을 스킨 (목표 도장판 1장 보상) ── */
.skin-sunset.board, .sw.skin-sunset, .ghost.skin-sunset { background: #b88a8a; }
.skin-sunset .grid i, .ghost.skin-sunset span { background: #cfa6a0; }
.skin-sunset .tile .in { color: #fff; }
.skin-sunset .v2 .in, .sw.skin-sunset .v2 { background: #fff1e6; color: #9a6b5c; }
.skin-sunset .v4 .in { background: #ffe0c7; color: #9a6b5c; }
.skin-sunset .v8 .in, .sw.skin-sunset .v8 { background: #ffc49b; }
.skin-sunset .v16 .in { background: #ffa77a; } .skin-sunset .v32 .in { background: #ff8a6b; }
.skin-sunset .v64 .in, .sw.skin-sunset .v64 { background: #f26d6d; } .skin-sunset .v128 .in { background: #e0607e; }
.skin-sunset .v256 .in { background: #c95b91; } .skin-sunset .v512 .in, .sw.skin-sunset .v512 { background: #a35ba3; }
.skin-sunset .v1024 .in { background: #7e5bb0; } .skin-sunset .v2048 .in { background: #5b5bb8; box-shadow: 0 0 22px 6px rgba(91,91,184,.45); }
.skin-sunset .bloom { --bloom: #ff8a6b; }

/* ── 목표 도장 (오늘의 목표 카드·내일 카드) ── */
.stamps { display: inline-flex; gap: 3px; align-items: center; }
.stamps i { width: 7px; height: 7px; border-radius: 50%; background: #e6dccf; box-shadow: inset 0 1px 1px rgba(0,0,0,.08); }
.stamps i.on { background: var(--accent); box-shadow: none; }
.goal-stamps { margin-left: auto; margin-right: 8px; }
.goal.done .stamps i.on { background: var(--win); }

/* ── 내일 카드 (결과 화면) ── */
.tomorrow { background: var(--surface); box-shadow: var(--shadow-sm); border-radius: 14px; padding: 10px 14px; margin: 12px 0 4px; display: grid; gap: 7px; }
.tm-row { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--ink-strong); overflow-wrap: anywhere; }
.tm-ico { flex: none; width: 22px; text-align: center; }
.tm-row small { margin-left: auto; color: #a39689; font-weight: 700; font-family: var(--num); }
.mode-item em.shield { font-style: normal; font-size: 12px; margin-left: 4px; }
