/* 섬 마을 시험 페이지 */
:root { --ink: #263046; --bg: #eaf5f8; --paper: #fff; --muted: #6b7486; --line: #dde6ec; --brand: #2f7d8c; }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink);
  font-family: -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", "Segoe UI", sans-serif; }
.bar { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: rgba(255,255,255,.85); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; backdrop-filter: blur(6px); }
.bar .logo { font-weight: 900; letter-spacing: 2px; color: var(--ink); text-decoration: none; }
.bar .tag { font-size: 12px; color: var(--muted); background: #eef3f6; padding: 3px 8px; border-radius: 999px; }
.bar .calc { margin-left: auto; font-size: 13px; font-weight: 800; color: #0F766E; text-decoration: none; border: 1.5px solid #0F766E; padding: 5px 10px; border-radius: 999px; white-space: nowrap; }
.stage { position: relative; height: min(72vh, 680px); min-height: 400px; background: url(/island/poster.jpg?v=20261104a) center / cover no-repeat, linear-gradient(#cfeaf3, #a9d9ea); overflow: hidden; touch-action: none; }
/* 첫 화면: 섬 그림(poster.jpg)이 바로 보이고, 3D 가 준비되면 그 위를 덮는다 — 「짓는 중」 글씨는 3D 를 못 쓸 때만 */
.loading { display: none !important; }
.stage.nogl .loading { display: grid !important; }
.stage canvas { display: block; width: 100%; height: 100%; cursor: grab; }
.stage canvas.dragging { cursor: grabbing; }
.stage canvas.pointer { cursor: pointer; }
.hint { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); margin: 0; font-size: 12.5px; background: rgba(255,255,255,.85); padding: 6px 12px; border-radius: 999px; color: var(--muted); white-space: nowrap; pointer-events: none; transition: opacity .6s; }
.loading { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; font-weight: 800; color: #3b6d7a; pointer-events: none; }
.tip { position: absolute; pointer-events: none; background: #263046; color: #fff; font-size: 13px; font-weight: 700; padding: 5px 10px; border-radius: 8px; transform: translate(-50%, -130%); white-space: nowrap; }
.stage.nogl { height: auto; min-height: 0; padding: 18px 16px; }
.stage.nogl canvas, .stage.nogl .hint { display: none; }
.stage.nogl .loading { position: static; }

/* 진열장 — PC 가운데 창, 휴대폰은 아래에서 올라오는 창 */
.showcase { border: 0; border-radius: 18px; padding: 0; width: min(560px, calc(100vw - 32px)); max-height: 80vh; color: var(--ink); box-shadow: 0 20px 60px rgba(20,40,60,.35); }
.showcase::backdrop { background: rgba(20,40,60,.35); }
.sc-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 4px; position: sticky; top: 0; background: #fff; }
.sc-head h2 { margin: 0; font-size: 19px; }
.sc-head .x { border: 0; background: #eef3f6; width: 34px; height: 34px; border-radius: 50%; font-size: 15px; cursor: pointer; }
.sc-sub { margin: 0 18px 10px; font-size: 13.5px; color: var(--muted); }
.sc-body { padding: 0 14px 18px; display: grid; gap: 10px; }
@media (max-width: 640px) {
  .showcase { margin: auto 0 0; width: 100vw; max-width: 100vw; border-radius: 18px 18px 0 0; max-height: 78vh; }
  .showcase[open] { animation: up .25s ease-out; }
  @keyframes up { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
}
@media (prefers-reduced-motion: reduce) { .showcase[open] { animation: none; } }

/* 목록 */
.wrap { max-width: 860px; margin: 0 auto; padding: 22px 16px 60px; }
h1 { font-size: 24px; margin: 0 0 6px; }
.lead { color: var(--muted); font-size: 15px; line-height: 1.7; margin: 0 0 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.chips button { border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 12px; font-size: 14px; font-weight: 700; color: var(--ink); cursor: pointer; }
.chips button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.cat { margin: 0 0 18px; }
.cat h2 { font-size: 17px; margin: 14px 0 8px; display: flex; gap: 8px; align-items: baseline; }
.cat h2 small { font-size: 13px; color: var(--muted); font-weight: 600; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: grid; grid-template-columns: 52px 1fr; gap: 12px; align-items: start; }
.card .ic { width: 52px; height: 52px; border-radius: 13px; object-fit: cover; background: #f1f4f6; display: grid; place-items: center; font-size: 28px; }
.card h3 { margin: 0 0 2px; font-size: 16px; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card .badge { font-size: 11px; font-weight: 800; color: #b45309; background: #fef3c7; padding: 2px 6px; border-radius: 6px; margin-left: 4px; vertical-align: 2px; }
.card .badge.new { color: #be185d; background: #fce7f3; }
.card p { margin: 0 0 8px; font-size: 13.5px; color: var(--muted); line-height: 1.55; }
.card .links { display: flex; flex-wrap: wrap; gap: 6px; }
.card .links a { font-size: 12.5px; font-weight: 800; text-decoration: none; padding: 5px 9px; border-radius: 999px; border: 1.5px solid var(--line); color: var(--ink); }
.card .links a.store { background: var(--ink); border-color: var(--ink); color: #fff; }
.extra { font-size: 14px; line-height: 1.8; }
.extra a { color: var(--brand); font-weight: 700; }
.foot { font-size: 12.5px; color: var(--muted); margin-top: 30px; line-height: 1.7; }
.foot a { color: var(--muted); }
.bar .tag { white-space: nowrap; }
@media (max-width: 420px) { .bar .tag { display: none; } .hint { font-size: 11.5px; } }
.bar .langs { display: flex; gap: 2px; margin-left: auto; background: #eef3f6; border-radius: 999px; padding: 2px; }
.bar .langs button { border: 0; background: none; font-size: 12.5px; font-weight: 800; color: var(--muted); padding: 5px 9px; border-radius: 999px; cursor: pointer; }
.bar .langs button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.bar .langs + .calc { margin-left: 0; }
@media (max-width: 520px) { .bar { gap: 8px; } .bar .calc { font-size: 12px; padding: 4px 8px; } .bar .langs button { padding: 4px 6px; font-size: 11.5px; } }
