/* 크기 맞추기 — lib/mini.css 위에 이 게임에만 필요한 것 */
.app[data-game="size"] .stage--mini { touch-action: none; cursor: ns-resize; }
.app[data-game="size"] .mini-body { inset: 50px 14px 12px; justify-content: stretch; align-items: stretch; gap: 0; }
.size { display: flex; flex-direction: column; gap: 8px; width: 100%; height: 100%; min-height: 0; }
.size__q { margin: 0; display: grid; gap: 2px; justify-items: center; }
.size__q b { font: 400 30px/36px var(--font-display); font-weight: 400; overflow-wrap: anywhere; text-align: center; }
.size__q span { font: 600 14px/20px var(--font-sans); color: var(--on-stage-muted); }
.size__time { align-self: center; width: min(100%, 200px); height: 4px; border-radius: 2px; background: rgba(var(--stage-ink), 0.1); overflow: hidden; flex: none; }
.size__time i { display: block; width: 100%; height: 100%; background: rgba(var(--stage-ink), 0.5); transform-origin: left center; }
.size__time i.is-low { background: var(--p1); }
.size__scene { position: relative; flex: 1; min-height: 120px; }
.size__fig { position: absolute; bottom: 30px; transform: translateX(-50%); color: rgb(var(--stage-ink)); }
.size__fig svg { display: block; width: 100%; height: 100%; fill: currentColor; overflow: visible; }
.size__fig .cut, .size-demo .cut { fill: var(--stage); opacity: 0.45; }
/* 견준 것들: 가장 최근 것(기준)이 가장 진하고, 오래된 것일수록 옅어요. 겹쳐도 비치지 않게 무대 색과 섞은 불투명한 색을 써요 */
.size__fig--old { color: rgba(var(--stage-ink), 0.42); color: color-mix(in srgb, rgb(var(--stage-ink)) var(--mix, 42%), var(--stage)); }
.size__fig--old svg * { stroke: var(--stage); stroke-width: 2px; vector-effect: non-scaling-stroke; paint-order: stroke; }   /* 겹친 것끼리 가는 틈으로 갈라 보여요 */
.size__fig--old.is-new { color: var(--sprout); }
.size__fig--me { left: 75%; }
.size__fig--me.is-in { animation: size-in 320ms var(--ease-pop, ease-out); transform-origin: 0 100%; }
@keyframes size-in { from { opacity: 0; transform: translateX(-50%) scale(0.86); } }
.size__fig--true { left: 75%; color: var(--sprout); opacity: 0; }
.size__scene.is-done .size__fig { transition: height 320ms var(--ease-out, ease-out), width 320ms var(--ease-out, ease-out), left 320ms var(--ease-out, ease-out); }
.size__scene.is-done .size__fig--true { opacity: 0.9; transition: height 320ms var(--ease-out, ease-out), width 320ms var(--ease-out, ease-out), opacity 200ms; }
.size__scene.is-shift .size__fig--old { transition: height 480ms var(--ease-out, ease-out), width 480ms var(--ease-out, ease-out), left 480ms var(--ease-out, ease-out), color 480ms; }
.size__scene.is-done .size__fig--me { opacity: 0.45; z-index: 1; }       /* 내가 맞춘 크기는 반투명하게 겹쳐 보여요 */
.size__scene.is-no .size__fig--me { color: var(--p1); opacity: 0.6; }
.size__ground { position: absolute; left: 0; right: 0; bottom: 28px; height: 2px; border-radius: 1px; background: rgba(var(--stage-ink), 0.28); }
.size__lab { position: absolute; bottom: 0; transform: translateX(-50%); max-width: 48%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font: 600 13px/22px var(--font-sans); color: var(--on-stage-muted); }
.size__lab b { font: 600 13px/22px var(--font-mono); color: rgb(var(--stage-ink)); }
.size__lab--ref { left: 26%; } .size__lab--me { left: 75%; max-width: 46%; }
.size__pts { position: absolute; left: 8px; top: 4px; margin: 0; font: 400 28px/1 var(--font-display); color: var(--sprout); animation: kk-pop 420ms var(--ease-pop, ease-out); }
.size__pts.is-no { color: var(--p1); font-family: var(--font-display); }
.size-demo { display: flex; align-items: flex-end; gap: 26px; padding-bottom: 6px; border-bottom: 2px solid rgba(var(--stage-ink), 0.25); }
.size-demo span { display: block; color: rgba(var(--stage-ink), 0.42); } .size-demo span.is-me { color: rgb(var(--stage-ink)); }
.size-demo svg { display: block; width: 100%; height: 100%; fill: currentColor; }
/* 아래 줄: 조절 막대 + 정하기 */
.size-ctl { display: grid; gap: 8px; }
.size-ctl__r { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; font: 600 12px/1 var(--font-sans); color: var(--ink-muted); }
.size-ctl input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 40px; margin: 0; background: none; cursor: pointer; touch-action: none; }
.size-ctl input[type="range"]::-webkit-slider-runnable-track { height: 10px; border-radius: 5px; background: var(--paper-raised); box-shadow: inset 0 0 0 1.5px var(--line); }
.size-ctl input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 34px; height: 34px; margin-top: -12px; border-radius: 50%; border: 0; background: var(--ink); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25); }
.size-ctl input[type="range"]::-moz-range-track { height: 10px; border-radius: 5px; background: var(--paper-raised); box-shadow: inset 0 0 0 1.5px var(--line); }
.size-ctl input[type="range"]::-moz-range-thumb { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--ink); }
.size-ctl input[type="range"]:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 8px; }
/* 결과: 견준 것들을 한눈에. 크기 차이가 비슷한 것끼리 한 칸, 칸 안에서는 실제 비율 그대로예요 */
.app[data-game="size"] { --zbg: var(--paper); }
@media (max-width: 480px) { .app[data-game="size"] { --zbg: var(--game-bg, var(--paper)); } }
.zline { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }
.zline__p { position: relative; display: flex; align-items: flex-end; gap: 3px; padding: 22px 10px 5px; border-radius: 14px; background: rgba(128, 136, 130, 0.1); }
.zline__p em { position: absolute; top: 7px; left: 10px; font: 500 10px/12px var(--font-mono); font-style: normal; color: var(--ink-muted); }
.zline__c { display: grid; justify-items: center; gap: 3px; min-width: 10px; color: var(--ink); }
.zline__c i { display: block; transform-origin: 50% 100%; animation: zline-up 420ms var(--ease-pop, ease-out) both; animation-delay: var(--d, 0ms); }
.zline__c svg { display: block; width: 100%; height: 100%; fill: currentColor; overflow: visible; }
.zline__c .cut { fill: var(--zbg); opacity: 0.6; }
.zline__c b { height: 11px; font: 500 9px/11px var(--font-mono); color: var(--ink-muted); }
.zline__c.is-ghost { color: var(--ink-muted); opacity: 0.45; }
.zline__c.is-no, .zline__c.is-no b { color: var(--stamp-strong); }
@keyframes zline-up { from { transform: scaleY(0); opacity: 0; } }
/* 결과: 맞힌 것들. 스무 개까지 나오니 늘 두 줄로 */
.size-rows { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; grid-auto-flow: column; gap: 1px 14px; text-align: left; }
.size-rows li { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto auto; gap: 5px; align-items: baseline; font: 500 12px/18px var(--font-sans); }
.size-rows li span { font: 500 10px/18px var(--font-mono); color: var(--ink-muted); }
.size-rows li b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.size-rows li em { font: 500 11px/18px var(--font-mono); font-style: normal; color: var(--ink-muted); }
.size-rows li i { font: 600 11px/18px var(--font-mono); font-style: normal; color: var(--sprout-strong); }
.size-rows li.is-no i { color: var(--stamp-strong); }
/* 폰: 스무 개를 다 맞히면 길어져요. 결과 화면만 스크롤되고 버튼은 아래에 붙어 있어요 */
@media (max-width: 959px) {
  .app[data-game="size"] #vTotal { overflow-y: auto; overscroll-behavior: contain; }
  .app[data-game="size"] #vTotal > * { flex-shrink: 0; }
  .app[data-game="size"] #vTotal > .total-foot { position: sticky; bottom: 0; z-index: 2; padding-top: 10px; background: linear-gradient(to top, var(--zbg) 78%, transparent); }
}
@media (max-width: 520px) { .size-rows li em { display: none; } .size-rows li { grid-template-columns: 16px minmax(0, 1fr) auto; } }
@media (max-height: 700px) { .size__q b { font-size: 24px; line-height: 28px; } .size { gap: 6px; } }
@media (min-width: 960px) and (min-height: 620px) {
  .app[data-game="size"] .mini-body { inset: 64px 40px 20px; }
  .size__q b { font-size: 44px; line-height: 50px; } .size__q span { font-size: 16px; } .size__lab, .size__lab b { font-size: 15px; }
  .size__pts { font-size: 48px; left: 20px; top: 10px; }
  .app[data-game="size"] .foot-body { max-width: 560px; }
}
@media (prefers-reduced-motion: reduce) { .size__scene.is-done .size__fig, .size__scene.is-shift .size__fig--old { transition: none; } .size__pts, .size__fig--me.is-in, .zline__c i { animation: none; } }
