/* city.css —— 城市页（在 app.css 的配色与顶栏之上；类名都带 city- 前缀，lessons：别和单塔页撞名） */
/* app.css 在窄屏把 body 改成块布局（单塔页的手机版）；城市页任何宽度都是"顶栏 + 占满剩下的场景" */
body.city-page { display: grid; grid-template-rows: auto minmax(0, 1fr); height: 100dvh; overflow: hidden; }
.city-search { position: relative; flex: 1; max-width: 360px; }
.city-search input { width: 100%; background: var(--night); border: 2px solid var(--edge); padding: 7px 10px; color: var(--ink); outline: none; }
.city-search input:focus { border-color: var(--gold-d); }
.city-miss { position: absolute; left: 0; top: 100%; margin-top: 4px; color: var(--down); font-size: 12px; background: var(--night); padding: 2px 6px; }
.city-launch {
  font: 700 12px/1 var(--px); letter-spacing: 1px; color: #1a1205; text-decoration: none; padding: 9px 12px;
  background: linear-gradient(var(--gold-2), var(--gold)); box-shadow: 0 3px 0 0 var(--gold-d), 0 5px 0 0 #000;
}
.city-launch:active { transform: translateY(2px); }

.city-stage { position: relative; min-height: 0; overflow: hidden; }
.city-scene { position: absolute; inset: 0; }
.city-scene canvas { display: block; image-rendering: pixelated; cursor: grab; touch-action: none; }

.city-lists { position: absolute; left: 12px; top: 12px; width: 250px; max-height: calc(100% - 70px); display: flex; flex-direction: column;
  background: rgba(10, 18, 48, 0.88); box-shadow: var(--frame); }
.city-lists .tabs { display: flex; }
.city-lists .tabs button { flex: 1; }
.city-rank { list-style: none; margin: 0; padding: 6px 0; overflow: auto; }
.city-rank li { display: grid; grid-template-columns: 20px 1fr auto; gap: 6px; align-items: baseline; padding: 4px 10px; cursor: pointer; }
.city-rank li:hover, .city-rank li.on { background: var(--lapis-7); }
.city-rank .n { color: var(--mute); font: 400 10px/1 var(--px); }
.city-rank .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.city-rank .v { font: 400 11px/1 var(--px); color: var(--gold-2); }
.city-meta { margin: 0; padding: 6px 10px 8px; color: var(--mute); font-size: 12px; border-top: 1px solid var(--edge); }

.city-card { position: absolute; right: 12px; top: 12px; width: 280px; padding: 14px; background: linear-gradient(#0d1738, #0a1230); box-shadow: var(--frame); }
.city-card .hd { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.city-card .ic { width: 48px; height: 48px; flex: none; object-fit: cover; background: var(--night); box-shadow: var(--frame); }
.city-card .ic.ph { display: grid; place-items: center; font: 700 18px/1 var(--px); color: var(--gold-d); }
.city-card .nm { font: 700 15px/1.2 var(--px); color: var(--gold); word-break: break-word; }
.city-card .tk { color: var(--mute); font: 400 11px/1.4 var(--px); }
.city-card .badge { display: inline-block; margin-left: 6px; padding: 1px 5px; font: 400 9px/1.4 var(--px); color: #1a1205; background: var(--gold); vertical-align: middle; }
.city-card dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0 0 10px; }
.city-card dt { color: var(--mute); font-size: 12px; }
.city-card dd { margin: 0; text-align: right; font: 400 12px/1.4 var(--px); color: var(--ink); }
.city-card .desc { color: var(--sand); font-size: 12px; margin: 0 0 10px; }
.city-card .open { display: block; text-align: center; padding: 8px; color: #1a1205; text-decoration: none; font: 700 12px/1 var(--px);
  background: linear-gradient(var(--gold-2), var(--gold)); box-shadow: 0 3px 0 0 var(--gold-d); }
.city-card .x { position: absolute; right: 6px; top: 4px; background: none; border: 0; color: var(--mute); font-size: 18px; cursor: pointer; }

.city-hint { position: absolute; left: 12px; bottom: 8px; margin: 0; color: var(--mute); font-size: 12px; pointer-events: none; text-shadow: 1px 1px 0 #000; }
.city-simbar { position: absolute; right: 12px; bottom: 8px; display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; max-width: calc(100% - 300px); }
.city-simbar span { font: 400 10px/2 var(--px); color: var(--gold); }
.city-simbar button { background: var(--lapis-7); border: 0; box-shadow: var(--frame); padding: 5px 8px; cursor: pointer; font-size: 12px; }
.city-simbar button.on { color: var(--gold); }

@media (max-width: 760px) {
  .bar { flex-wrap: wrap; gap: 8px; }
  .city-search { order: 3; flex-basis: 100%; max-width: none; }
  .city-lists { display: none; }
  .city-card { left: 0; right: 0; top: auto; bottom: 0; width: auto; max-height: 55%; overflow: auto; }
  .city-hint { display: none; }
  .city-simbar { left: 8px; right: 8px; top: 8px; bottom: auto; max-width: none; justify-content: flex-start; }
}
