/* Product chrome stays quiet so the pictures can do the talking. */
body.app-polished {
  --body: 'Apple SD Gothic Neo', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --ink: #293d34;
  --sub: #68786f;
  --bg: #f5f8f4;
  --panel: #fff;
  --accent: #356d56;
  --accent2: #356d56;
  --app-line: #dce5dc;
  --app-tint: #e6efe8;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 var(--body);
  -webkit-font-smoothing: antialiased;
}
body.app-polished.adult { --bg: #f9f8f3; --app-tint: #e9ede2; --app-line: #e0e4d9; }
body.app-polished button { text-shadow: none; font-family: var(--body); line-height: 1.35; letter-spacing: -.02em; touch-action: manipulation; }
body.app-polished button:focus-visible { outline: 3px solid #5e9278; outline-offset: 3px; }
body.app-polished [hidden] { display: none !important; }
body.app-polished .ui-icon { flex: none; width: 20px; height: 20px; vertical-align: middle; }
body.app-polished #home { display: flex; flex-direction: column; max-width: 1040px; padding: calc(20px + env(safe-area-inset-top)) 28px calc(28px + env(safe-area-inset-bottom)); gap: 24px; }
body.app-polished #home .topline { display: grid; grid-template-columns: minmax(0,1fr) auto auto 44px; align-items: center; gap: 10px; min-height: 48px; margin: 0; padding: 0 0 20px; border-bottom: 1px solid var(--app-line); }
body.app-polished #home .topline .logo { display: flex; align-items: center; gap: 9px; width: auto; min-width: 0; height: 44px; background: none; color: var(--ink); }
body.app-polished #home .topline .logo > * { opacity: 1; pointer-events: auto; }
body.app-polished #home .brand-puzzle { width: 34px; height: 34px; flex: none; }
body.app-polished #home #logoName { font: 21px/1 var(--disp); white-space: nowrap; }
body.app-polished #home #modeToggle { display: flex; align-items: center; gap: 2px; padding: 3px; border: 0; border-radius: 14px; background: var(--app-tint); box-shadow: none; }
body.app-polished #home #modeToggle button { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 17px; border: 0; border-radius: 11px; color: var(--sub); background: none; font: 600 14px/1.3 var(--body); box-shadow: none; white-space: nowrap; }
body.app-polished #home #modeToggle button.on { color: var(--ink); background: #fff; box-shadow: 0 1px 3px #263c3214; }
body.app-polished #home .topline :is(.stat,.statgrp) { display: flex; align-items: center; justify-content: center; gap: 5px; min-width: 44px; min-height: 44px; padding: 6px; border: 0; border-radius: 12px; box-shadow: none; background: none; font: 600 14px/1 var(--body); color: var(--ink); }
body.app-polished #home .adult-intro { display: none; }
body.app-polished #home .picker-heading { align-items: center; margin: 0; }
body.app-polished #home .picker-heading h2 { font: 22px/1.3 var(--disp); color: var(--ink); margin: 0; }
body.app-polished #home #pickHint { display: none; }
body.app-polished #home :is(.daily,.pickbody,.collcard) { background: none !important; border: 0; box-shadow: none; filter: none; }
body.app-polished #home :is(.daily,.pickbody,.collcard)::before,
body.app-polished #home :is(.daily,.pickbody,.collcard)::after,
body.app-polished #home :is(.ctab,.cnt,.card,#photoChoose,.playbtn)::before,
body.app-polished #home :is(.ctab,.cnt,.card,#photoChoose,.playbtn)::after { display: none; }
body.app-polished #pickSec { gap: 14px; margin: 0; }
body.app-polished #home #cTabs .ctabs { display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 0 0 2px; border: 0; }
body.app-polished #home #cTabs .ctabs::-webkit-scrollbar { display: none; }
body.app-polished #home #cTabs .ctab { display: inline-flex; flex: none; align-items: center; justify-content: center; min-height: 44px; padding: 9px 15px; background: none !important; border: 1px solid transparent !important; border-radius: 12px; font: 600 14px/1.3 var(--body); color: var(--sub); box-shadow: none; filter: none; transform: none; }
body.app-polished #home #cTabs .ctab.on { color: #285b45; background: var(--app-tint) !important; border-color: #ceded1 !important; filter: none; }
body.app-polished #home #cTabs .ctab.more { color: var(--ink); border-color: var(--app-line) !important; }
body.app-polished #home .pickbody { padding: 0; }
body.app-polished #home .caro { gap: 12px; padding: 3px 1px 10px; scroll-padding-inline: 1px; }
body.app-polished #home .caro .card { display: flex; flex-direction: column; align-items: stretch; gap: 8px; flex: 0 0 132px; width: 132px; padding: 5px; border: 2px solid transparent !important; border-radius: 14px; background: none !important; box-shadow: none; filter: none; transform: none; transition: border-color 140ms, background 140ms; }
body.app-polished #home .caro .card[aria-pressed="true"] { border-color: #5c8f71 !important; background: #fff !important; transform: none; box-shadow: none; filter: none; }
body.app-polished #home .caro .card canvas { display: block; width: 100%; height: auto; aspect-ratio: 4/3; border-radius: 8px; box-shadow: none; border: 0; }
body.app-polished #home .caro .card .row { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; width: 100%; padding: 0 3px 3px; }
body.app-polished #home .caro .card .name { width: 100%; min-height: 36px; height: 36px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; text-align: left; white-space: normal; word-break: keep-all; overflow-wrap: anywhere; font: 600 13px/18px var(--body); color: var(--ink); }
body.app-polished #home .caro .card .chip { display: inline-flex; position: static; align-self: flex-start; align-items: center; min-height: 20px; padding: 1px 6px; border: 0; border-radius: 5px; background: #e9f0e7; font: 500 10px/16px var(--body); color: #526c5a; box-shadow: none; }
body.app-polished #home #dailyCard { display: flex; flex-direction: column; padding: 20px; border: 1px solid var(--app-line) !important; border-radius: 22px; background: #fff !important; gap: 20px; }
body.app-polished #home .stage-preview { display: flex; flex-direction: column; align-items: stretch; gap: 12px; }
body.app-polished #home .stage-summary { display: flex; flex-direction: column; gap: 5px; order: -1; align-items: flex-start; text-align: left; padding: 0; }
body.app-polished #home .stage-summary :is(.eyebrow,.date) { display: none; }
body.app-polished #home #dailyName { margin: 0; color: var(--ink); font: 23px/1.3 var(--disp); letter-spacing: -.02em; word-break: keep-all; }
body.app-polished #home .stage-summary .artist-label { color: var(--sub); font: 13px/1.5 var(--body); }
body.app-polished #home .stage-art { position: relative; aspect-ratio: 4/3; width: 100%; border-radius: 14px; background: #edf1e8; overflow: hidden; filter: none; box-shadow: none; }
body.app-polished #home .stage-art::before { display: none; }
body.app-polished #home .stage-art :is(.art-frame-kid,.art-frame-adult) { display: none; }
body.app-polished #home .stage-art #dailyThumb { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 0; object-fit: cover; }
body.app-polished #home .stage-controls { gap: 10px; align-items: stretch; padding: 0; }
body.app-polished #home .difficulty-label { text-transform: none; letter-spacing: normal; margin: 0; color: var(--sub); font: 600 12px/1.4 var(--body); }
body.app-polished #home .cntrow { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 6px; padding: 0; }
body.app-polished #home #stageCnts .cnt { display: flex; align-items: center; justify-content: center; min-width: 0; min-height: 44px; padding: 10px 3px; background: #f3f5f0 !important; border: 1px solid transparent; border-radius: 10px; font: 600 14px/1.3 var(--body); color: var(--sub); box-shadow: none; filter: none; transform: none; white-space: nowrap; }
body.app-polished #home #stageCnts .cnt.on { background: #e6efe8 !important; border-color: #7ba38b; color: #285b45; box-shadow: none; filter: none; }
body.app-polished #home .daily .playbtn { display: flex; flex-direction: row; align-items: center; justify-content: center; align-self: stretch; gap: 9px; width: 100%; max-width: none; height: auto; min-height: 54px; padding: 14px 18px; margin: 6px 0 0; aspect-ratio: auto; background: #356d56 !important; border: 0; border-radius: 14px; box-shadow: none; color: #fff; font: 600 17px/1.4 var(--body); filter: none; }
body.app-polished #home .daily .playbtn:active { transform: scale(.985); }
body.app-polished #home .daily .playbtn.resumebtn { margin-top: 6px; }
body.app-polished #home .daily .playbtn.resumebtn:not([hidden]) + .playbtn { color: #356d56; background: #edf3ee !important; min-height: 46px; margin-top: 0; font-size: 14px; }
body.app-polished .ui-play-icon { width: 21px; height: 21px; flex: none; fill: currentColor; }
body.app-polished .ui-button-label { min-width: 0; line-height: 1.4; }
body.app-polished #home .backdaily { align-self: center; min-height: 44px; margin: 0; padding: 10px; color: var(--sub); font: 13px/1.4 var(--body); border: 0; background: none; }
body.app-polished #home .stagecoin { font: 12px/1.4 var(--body); color: var(--sub); text-align: center; margin: 0; }
body.app-polished #home .photo-entry { order: 0; }
body.app-polished #home #photoChoose { display: flex; align-items: center; gap: 12px; min-height: 68px; padding: 14px 16px; border: 1px solid var(--app-line); border-radius: 16px; background: #fff; box-shadow: none; color: var(--ink); font-family: var(--body); }
body.app-polished #home #photoChoose .photo-object { display: none; }
body.app-polished #home #photoChoose > .ui-icon { display: block; width: 26px; height: 26px; color: #5b7967; }
body.app-polished #home #photoChoose > span:not(.photo-cost) { flex: 1; text-align: left; }
body.app-polished #home #photoChoose b { font: 600 15px/1.4 var(--body); }
body.app-polished #home #photoChoose small { display: none; }
body.app-polished #home #photoChoose .photo-cost { display: flex; align-items: center; gap: 4px; font: 600 13px/1 var(--body); color: var(--sub); }
body.app-polished #home #collCard { display: flex; align-items: center; gap: 12px; min-height: 68px; padding: 14px 16px; border: 1px solid var(--app-line); border-radius: 16px; background: #fff !important; }
body.app-polished #home #collCard .collico { display: flex; align-items: center; justify-content: center; width: 26px; height: 26px; background: none; border: 0; }
body.app-polished #home #collCard .collinfo { text-align: left; }
body.app-polished #home #collCard b { color: var(--ink); font: 600 15px/1.4 var(--body); }
body.app-polished #home #collCard small { color: var(--sub); font: 12px/1.5 var(--body); }
body.app-polished #home #collCard .collarr { color: var(--sub); font-size: 18px; }
body.app-polished #home #collCard .collbar { display: none; }
body.app-polished #home #collCard .collnum { color: var(--sub); font: 500 13px/1.4 var(--body); }
body.app-polished #home #footNote { display: none; }
body.app-polished #home:has(#cTabs .ctab[data-category="starter"][aria-pressed="true"]) #backDaily { display: none; }
body.app-polished #home .caro .card[aria-pressed="true"] { border-radius: 14px; }
body.app-polished #home #photoEntry #photoChoose { border: 1px solid var(--app-line); border-radius: 16px; background: #fff !important; }
body.app-polished #home #photoEntry #photoChoose > .ui-icon { display: block; width: 26px; height: 26px; }
body.app-polished #home #photoEntry #photoChoose .photo-cost { display: flex; align-items: center; gap: 4px; padding: 0; border: 0; border-radius: 0; background: none; font: 600 13px/1 var(--body); color: var(--sub); }
/* The same sheet and control language in both modes. */
body.app-polished :is(#settings,#collview,#packview,#themeview,#sheet,#winwrap) { background: #1f352e66; padding: max(18px,env(safe-area-inset-top)) 18px max(18px,env(safe-area-inset-bottom)); backdrop-filter: blur(5px); }
body.app-polished :is(#settings,#collview,#packview,#themeview,#sheet) .box,
body.app-polished #winwrap .win { background: #fff !important; border: 1px solid #e0e6df; border-radius: 24px; box-shadow: 0 16px 60px #16352924; padding: 24px; gap: 18px; max-height: 90vh; max-height: 90svh; overflow-y: auto; transform: none; }
body.app-polished :is(#settings,#collview,#packview,#themeview,#sheet) .box::before,
body.app-polished :is(#settings,#collview,#packview,#themeview,#sheet) .box::after,
body.app-polished #winwrap .win::before,
body.app-polished #winwrap .win::after { display: none; }
body.app-polished :is(#settings,#collview,#packview,#themeview,#sheet,#winwrap) :is(h2,h3) { color: var(--ink); margin: 0; font-family: var(--disp); line-height: 1.35; }
body.app-polished :is(#settings,#collview,#packview,#themeview,#sheet) .box > h3 { font-size: 23px; }
body.app-polished :is(#settings,#collview,#packview,#themeview,#sheet,#winwrap) button:not(.album-picture):not(.thumb) { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 11px 16px; border: 1px solid var(--app-line); border-radius: 12px; background: #f3f6f1; color: var(--ink); box-shadow: none; font: 600 14px/1.4 var(--body); text-align: center; }
body.app-polished :is(#settings,#collview,#packview,#themeview,#sheet,#winwrap) button::before,
body.app-polished :is(#settings,#collview,#packview,#themeview,#sheet,#winwrap) button::after { display: none; }
body.app-polished :is(#settings,#collview,#packview,#themeview,#sheet,#winwrap) button.on { border-color: #8bac96; background: #e8f0e8; color: #285b45; }
body.app-polished :is(#settings,#collview,#packview,#themeview,#sheet,#winwrap) button.cancel { align-self: stretch; background: #f3f5f0; min-height: 46px; color: var(--sub); }
body.app-polished .account-settings { border-top: 1px solid var(--app-line); padding-top: 18px; margin-top: 2px; gap: 12px; }
body.app-polished .account-settings .acct-btn { min-height: 46px; }
body.app-polished #settings .stylerow { display: flex; flex-wrap: wrap; gap: 8px; }
body.app-polished #settings .acct-note { color: var(--sub); font: 13px/1.6 var(--body); }
body.app-polished #settings .settings-label { margin: 0 0 10px; font-weight: 600; color: var(--ink); }
body.app-polished #settings dl.coinrules { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 8px 16px; margin: 0; font: 13px/1.5 var(--body); }
body.app-polished #settings dl.coinrules :is(dt,dd) { margin: 0; min-width: 0; }
body.app-polished #settings dl.coinrules :is(dt,dd) { padding: 3px 0; border: 0; }
body.app-polished #settings dl.coinrules dd { text-align: right; color: var(--ink); }
body.app-polished #settings .box { text-align: left; }
body.app-polished #settings .acct-note { text-align: left; }
body.app-polished #settings .acct-stats { display: none; }
body.app-polished #settings #buildLine { display: none; }
body.app-polished #settings #privLink { display: inline-flex; align-items: center; align-self: flex-start; min-height: 44px; padding-block: 8px; color: var(--sub); font: 13px/1.5 var(--body); text-underline-offset: 3px; }
body.app-polished #settings :is(h3,.settings-label) { text-align: left; }
body.app-polished #settings .box button.on { border-color: #8bac96; background: #e8f0e8; color: #285b45; }
body.app-polished :is(#settings,#collview,#packview,#themeview,#sheet) .box button[aria-pressed="true"] { border-color: #8bac96; background: #e8f0e8; color: #285b45; }
body.app-polished #collview .album-heading h3 { text-align: left; font-size: 23px; }
body.app-polished #collview .album-heading p { margin-top: 7px; text-align: left; font: 13px/1.5 var(--body); color: var(--sub); }
body.app-polished #collview .box { overflow: hidden; min-height: 0; }
body.app-polished #collGrid { overflow-y: auto; min-height: 0; max-height: none; padding: 2px; scrollbar-width: thin; flex: 1; }
body.app-polished #collGrid .album-picture .name { font: 600 13px/18px var(--body); white-space: normal; min-height: 36px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
body.app-polished #winwrap .win { width: 100%; max-width: min(100%,400px); text-align: center; }
body.app-polished #winwrap h2 { font-size: 28px; }
body.app-polished #winwrap .wbtns { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; width: 100%; }
body.app-polished #winwrap .wbtns button { width: 100%; min-width: 0; min-height: 48px; padding: 12px; }
body.app-polished #winwrap .win .wbtns button::before,
body.app-polished #winwrap .win .wbtns button::after { display: none; }
body.app-polished #winwrap .wbtns button.playbtn { background: #356d56 !important; color: #fff; border-color: #356d56; }
/* A compact, centered toolbar leaves room for the puzzle itself. */
body.app-polished #game,body.app-polished #arena { background: var(--bg); }
body.app-polished #gtop { width: 100%; max-width: 1040px; margin-inline: auto; padding-inline: 20px; }
body.app-polished:not(.adult) #gtop { grid-template-columns: 48px minmax(0,1fr) 48px 48px; gap: 3px 10px; padding-block: calc(8px + env(safe-area-inset-top)) 4px; }
body.app-polished #gtop .gbtn { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 44px; min-height: 52px; padding: 4px; border: 0; border-radius: 11px; background: none; box-shadow: none; color: var(--sub); font: 500 11px/1.3 var(--body); gap: 3px; }
body.app-polished #gtop .gbtn::before { display: none; }
body.app-polished:not(.adult) #gtop .gbtn { width: 48px; min-width: 48px; }
body.app-polished #gtop .gbtn img { width: 30px; height: 30px; object-fit: contain; }
body.app-polished #gtitle { font: 19px/1.3 var(--disp); color: var(--ink); text-align: center; word-break: keep-all; min-width: 0; }
body.app-polished #gcount { border: 0; background: none; color: var(--sub); box-shadow: none; padding: 3px 6px; font: 600 12px/1.4 var(--body); font-variant-numeric: tabular-nums; }
body.app-polished #gprog { height: 4px; margin: 2px 20px 4px; background: #e1e8de; border: 0; border-radius: 8px; }
body.app-polished #gprogFill { background: #5d9475; }
body.app-polished #kidGameHelp { margin: 3px 16px 8px; color: var(--sub); font: 12px/1.4 var(--body); }
body.app-polished #board { border: 1px solid #d8e2d5; background: #fff; border-radius: 8px; box-shadow: 0 3px 16px #274f3410; }
body.app-polished #board::before { display: none; }
body.app-polished #peekpop { background: #1f352eb3; }
body.app-polished #peekpop canvas { border: 6px solid #fff; border-radius: 12px; }
@media(min-width:760px) {
  body.app-polished #home #dailyCard { display: grid; grid-template-columns: minmax(0,1.5fr) minmax(240px,1fr); grid-template-rows: auto 1fr; gap: 18px 28px; padding: 24px; }
  body.app-polished #home .stage-preview { display: contents; }
  body.app-polished #home .stage-art { grid-column: 1; grid-row: 1/3; align-self: center; }
  body.app-polished #home .stage-summary { grid-column: 2; grid-row: 1; align-self: end; padding-top: 10px; }
  body.app-polished #home .stage-controls { grid-column: 2; grid-row: 2; align-self: start; }
  body.app-polished #home #dailyName { font-size: 27px; }
  body.app-polished #home .daily .playbtn { margin-top: 12px; }
  body.app-polished #home .photo-entry { grid-row: auto; }
  body.app-polished #home #pickSec { grid-row: auto; }
}
@media(max-width:600px) {
  body.app-polished #home { display: flex; padding: calc(14px + env(safe-area-inset-top)) 18px calc(24px + env(safe-area-inset-bottom)); gap: 20px; }
  body.app-polished #home .topline { gap: 6px; padding-bottom: 14px; grid-template-columns: minmax(28px,1fr) auto auto 44px; }
  body.app-polished #home #logoName { display: none; }
  body.app-polished #home .brand-puzzle { width: 30px; height: 30px; }
  body.app-polished #home #modeToggle button { min-height: 44px; padding: 8px 12px; font-size: 13px; }
  body.app-polished #home .topline :is(.stat,.statgrp) { min-width: 44px; }
  body.app-polished #home #coinBtn { padding-inline: 4px; font-size: 13px; }
  body.app-polished #home #coinBtn .ui-icon { width: 16px; height: 16px; }
  body.app-polished #home .picker-heading h2 { font-size: 21px; }
  body.app-polished #pickSec { gap: 11px; }
  body.app-polished #home #cTabs .ctab { padding-inline: 12px; font-size: 12px; }
  body.app-polished #home .caro { gap: 8px; }
  body.app-polished #home .caro .card { width: 112px; flex-basis: 112px; gap: 6px; }
  body.app-polished #home #dailyCard { padding: 16px; gap: 16px; border-radius: 19px; }
  body.app-polished #home #dailyName { font-size: 21px; }
  body.app-polished #home .stage-art { border-radius: 10px; }
  body.app-polished #home #stageCnts .cnt { font-size: 13px; }
  body.app-polished #collview #collGrid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
  body.app-polished :is(#settings,#collview,#packview,#themeview,#sheet) .box,
  body.app-polished #winwrap .win { padding: 20px; border-radius: 21px; }
  body.app-polished #gtop { padding-inline: 12px; }
  body.app-polished:not(.adult) #gtop { gap: 2px 6px; }
  body.app-polished #gtitle { font-size: 16px; }
}
@media(max-width:350px) {
  body.app-polished #home { padding-inline: 12px; }
  body.app-polished #home #modeToggle button { padding-inline: 9px; font-size: 12px; }
  body.app-polished #home .topline { gap: 3px; }
  body.app-polished #home #stageCnts .cnt { font-size: 12px; }
  body.app-polished #winwrap .wbtns { grid-template-columns: 1fr; }
  body.app-polished #gtitle { font-size: 14px; }
}
@media(prefers-reduced-motion:reduce) {
  body.app-polished :is(button,.box,.card,.win) { transition: none !important; animation: none !important; }
}
