/* 숨은 낱말 — lib/mini.css 위에 이 게임에만 필요한 것. 글자판이 무대 아래쪽을 가리니까 적는 칸을 맨 위에 둬요 */
.app[data-game="near"] .mini-body { inset: 50px 14px calc(14px + var(--kb, 0px)); gap: 10px; justify-content: flex-start; align-items: stretch; text-align: left; }
.app[data-game="near"] .live { top: 18px; font: 700 17px/1 var(--font-sans); letter-spacing: 0; color: var(--p1); }
.app[data-game="near"] .stage--mini .num { font-size: 15px; color: rgb(var(--stage-ink)); }
.app[data-game="near"] { --t-hot: #E8457A; --t-warm: #F08A1C; --t-near: #3FB65A; --t-far: rgba(var(--stage-ink), 0.28); }
.t-hot { --tc: var(--t-hot); } .t-warm { --tc: var(--t-warm); } .t-near { --tc: var(--t-near); } .t-far { --tc: var(--t-far); } .t-hit { --tc: var(--t-hot); }
/* 적는 칸 */
.nw-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; flex: none; }
.nw-in { min-width: 0; height: 52px; padding: 0 16px; border: 0; border-radius: 16px; background: rgba(var(--stage-ink), 0.07); color: rgb(var(--stage-ink)); font: 600 20px/1 var(--font-sans); outline: none; box-shadow: inset 0 0 0 2px transparent; transition: box-shadow 120ms; -webkit-appearance: none; appearance: none; }
.nw-in::placeholder { color: rgba(var(--stage-ink), 0.38); font-weight: 500; }
.nw-in:focus { box-shadow: inset 0 0 0 2px rgb(var(--stage-ink)); }
.nw-go { height: 52px; padding: 0 20px; border: 0; border-radius: 16px; background: rgb(var(--stage-ink)); color: var(--stage); font: 700 16px/1 var(--font-sans); cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.nw-go:active { transform: translateY(1px); }
.nw-go:focus-visible, .nw-in:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
/* 실마리 */
.nw-clues { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; flex: none; min-height: 30px; }
.nw-clues__k { margin-right: 2px; font: 600 12px/1 var(--font-sans); color: var(--on-stage-muted); }
.nw-clue { display: inline-flex; align-items: baseline; gap: 5px; height: 30px; padding: 0 10px; border-radius: 10px; background: color-mix(in srgb, var(--tc) 16%, transparent); line-height: 30px; }
.nw-clue b { font: 700 15px/30px var(--font-sans); color: rgb(var(--stage-ink)); }
.nw-clue i { font: 500 11px/30px var(--font-mono); font-style: normal; color: var(--on-stage-muted); }
.nw-clue.is-wait { background: none; box-shadow: inset 0 0 0 1.5px rgba(var(--stage-ink), 0.16); font: 500 12px/30px var(--font-mono); color: var(--on-stage-muted); font-variant-numeric: tabular-nums; }
.nw-clue.is-new { animation: nw-in 420ms var(--ease-pop, ease-out) both; }
/* 방금 적은 낱말 */
.nw-last { flex: none; min-height: 22px; margin: 2px 0 0; font: 500 14px/22px var(--font-sans); color: var(--on-stage-muted); word-break: keep-all; }
.nw-last b { font-weight: 700; color: var(--tc, rgb(var(--stage-ink))); }
.nw-last.t-far b, .nw-last.is-warn b { color: rgb(var(--stage-ink)); }
.nw-last.t-hit { font-size: 18px; color: rgb(var(--stage-ink)); }
.nw-last.is-pop { animation: nw-in 260ms ease-out both; }
/* 적은 낱말: 가까운 순 */
.nw-list { flex: 1; min-height: 0; margin: 0; padding: 0; list-style: none; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 4px; scrollbar-width: none; }
.nw-list::-webkit-scrollbar { display: none; }
.nw-row { display: grid; grid-template-columns: 5.2em minmax(0, 1fr) 3em 3.6em; align-items: center; gap: 8px; flex: none; height: 38px; padding: 0 10px; border-radius: 12px; background: rgba(var(--stage-ink), 0.045); }
.nw-row__w { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font: 700 16px/1 var(--font-sans); color: rgb(var(--stage-ink)); }
.nw-row__bar { height: 8px; border-radius: 4px; background: rgba(var(--stage-ink), 0.08); overflow: hidden; }
.nw-row__bar i { display: block; height: 100%; border-radius: 4px; background: var(--tc); }
.nw-row__p { text-align: right; font: 500 12px/1 var(--font-mono); font-variant-numeric: tabular-nums; color: var(--on-stage-muted); }
.nw-row__r { text-align: right; font: 700 13px/1 var(--font-mono); font-variant-numeric: tabular-nums; color: var(--tc); }
.nw-row.t-far .nw-row__r { color: var(--on-stage-muted); }
.nw-row.is-new { box-shadow: inset 0 0 0 2px var(--tc); animation: nw-in 320ms ease-out both; }
.nw-empty { margin: auto 0; padding: 12px 0; text-align: center; font: 500 14px/22px var(--font-sans); color: var(--on-stage-muted); word-break: keep-all; }
.nw-fail { margin: auto 0 12px; text-align: center; font: 500 15px/23px var(--font-sans); color: var(--on-stage-muted); }
.app[data-game="near"] #nwRetry { align-self: center; margin-bottom: auto; }
@keyframes nw-in { 0% { opacity: 0; transform: translateY(6px) scale(0.97); } 100% { opacity: 1; transform: none; } }
/* 소개 그림 */
.nw-demo { display: grid; gap: 6px; width: 190px; }
.nw-demo__r { --tc: rgba(var(--stage-ink), 0.28); display: grid; grid-template-columns: 3.2em 1fr; align-items: center; gap: 8px; height: 30px; padding: 0 10px; border-radius: 10px; background: rgba(var(--stage-ink), 0.06); }
.nw-demo__r b { font: 700 14px/1 var(--font-sans); color: rgb(var(--stage-ink)); text-align: left; }
.nw-demo__r i { display: block; height: 7px; border-radius: 4px; background: var(--tc); }
.nw-demo__r.t-near { --tc: #3FB65A; } .nw-demo__r.t-warm { --tc: #F08A1C; } .nw-demo__r.t-hit { --tc: #E8457A; }
/* 끝 화면 */
.nw-ans { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 14px 18px; border-radius: var(--radius-md, 14px); background: var(--paper-raised); box-shadow: inset 0 0 0 1.5px var(--line); }
.nw-ans span { font-size: 13px; color: var(--ink-muted); }
.nw-ans b { font: 700 24px/1.2 var(--font-sans); color: var(--ink); }
.nw-label { display: block; margin: 16px 0 8px; }
.nw-top { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.nw-top li { display: inline-flex; align-items: baseline; gap: 5px; height: 32px; padding: 0 11px; border-radius: 10px; background: var(--paper-raised); box-shadow: inset 0 0 0 1.5px var(--line); }
.nw-top b { font: 600 14px/32px var(--font-sans); color: var(--ink); }
.nw-top i { font: 500 11px/32px var(--font-mono); font-style: normal; color: var(--ink-muted); }
.nw-list--total { --stage-ink: 18, 22, 19; overflow: visible; }
.nw-list--total .nw-row { background: var(--paper-raised); box-shadow: inset 0 0 0 1.5px var(--line); }
.nw-list--total .nw-row__w { color: var(--ink); } .nw-list--total .nw-row__p { color: var(--ink-muted); }
:root[data-theme="dark"] .nw-list--total { --stage-ink: 255, 255, 255; }
.nw-credit { margin: 16px 0 0; font-size: 11px; line-height: 16px; color: var(--ink-muted); word-break: keep-all; }
@media (min-width: 960px) and (min-height: 620px) {
  .app[data-game="near"] .mini-body { inset: 64px max(32px, calc(50% - 300px)) 28px; gap: 12px; }
  .nw-in, .nw-go { height: 56px; } .nw-in { font-size: 22px; }
  .nw-row { height: 42px; grid-template-columns: 6.5em minmax(0, 1fr) 3.4em 4em; }
}
@media (prefers-reduced-motion: reduce) { .nw-clue.is-new, .nw-last.is-pop, .nw-row.is-new { animation: none; } }
