@font-face {
  font-family: "Silver";
  src:
    url("/device/static/Silver.woff2") format("woff2"),
    url("/device/static/Silver.woff") format("woff");
  font-weight: normal;
  font-style: normal;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  image-rendering: pixelated;
}

html,
body {
  height: 100%;
  background: #141013;
  color: #ccc;
  font-family: "Silver", monospace, sans-serif;
  font-size: 32px;
  line-height: 1;
  letter-spacing: 0.03em;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ─── Exit link ──────────────────────────────────── */
.city-exit {
  display: block;
  text-align: center;
  padding: 12px;
  color: #666;
  font-family: "Silver", monospace;
  font-size: 22px;
  letter-spacing: 0.05em;
  transition: color 0.15s;
}
.city-exit:hover { color: #fff; }

/* ─── Page frame ─────────────────────────────────── */
.city-frame {
  max-width: 640px;
  margin: 0 auto;
  padding: 16px 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ─── Image placeholder (640x360) ────────────────── */
.city-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #1c1c1e;
  border: 2px solid #333;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  letter-spacing: 0.08em;
  color: #444;
  text-transform: uppercase;
}

/* ─── Icon Navbar ────────────────────────────────── */
.city-nav {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 16px;
  border: 2px solid #333;
  padding: 16px;
}

.city-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  text-decoration: none;
  color: #fff;
  -webkit-tap-highlight-color: transparent;
}

a.city-nav-item:active .city-nav-icon { opacity: 0.75; }

.city-nav-item-disabled {
  pointer-events: none;
  opacity: 0.25;
  filter: grayscale(1);
}

.city-nav-icon {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.1s;
}

.city-nav-icon img {
  width: 65%;
  height: 65%;
  filter: brightness(0) invert(1);
  image-rendering: pixelated;
}

.city-nav-label {
  font-family: "Silver", monospace;
  font-size: 22px;
  letter-spacing: 0.04em;
  text-align: center;
  color: #e5e5e5;
  line-height: 1.2;
}

/* ─── Chat box (RPG dialog) ──────────────────────── */
.city-chat {
  position: relative;
  display: flex;
  gap: 14px;
  border: 2px solid #333;
  padding: 16px 16px 40px;
  height: 210px;
  align-items: flex-start;
}

.city-chat-avatar {
  width: 80px;
  height: 80px;
  background: #1c1c1e;
  flex-shrink: 0;
}

.city-chat-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-top: 4px;
  min-width: 0;
}

.city-chat-name {
  font-family: "Silver", monospace;
  font-size: 32px;
  color: #fff;
  letter-spacing: 0.04em;
  line-height: 1;
}

.city-chat-text {
  font-family: "Silver", monospace;
  font-size: 32px;
  line-height: 1;
  color: #e5e5e5;
  letter-spacing: 0.03em;
}

.city-chat-cursor {
  display: inline-block;
  width: 12px;
  height: 28px;
  background: #e5e5e5;
  margin-left: 4px;
  vertical-align: -4px;
  animation: cursor-blink 0.7s steps(1) infinite;
}

@keyframes cursor-blink {
  50% { opacity: 0; }
}

/* ─── Chat controls (prev / counter / next) ──────── */
.city-chat-controls {
  position: absolute;
  bottom: 6px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.city-chat-arrow {
  background: none;
  border: 0;
  color: #777;
  font-family: "Silver", monospace;
  font-size: 28px;
  line-height: 1;
  padding: 2px 8px;
  cursor: pointer;
  transition: color 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.city-chat-arrow:hover { color: #fff; }
.city-chat-arrow:active { color: #aaa; }
.city-chat-arrow:focus-visible { outline: 2px solid #555; outline-offset: 2px; }

.city-chat-counter {
  font-family: "Silver", monospace;
  font-size: 18px;
  color: #555;
  letter-spacing: 0.1em;
  min-width: 50px;
  text-align: center;
}

/* ─── Mobile ─────────────────────────────────────── */
@media (max-width: 480px) {
  .city-nav-label { font-size: 24px; }
  .city-nav-icon { width: 56px; height: 56px; }
  .city-chat-avatar { width: 64px; height: 64px; }
  .city-chat-name,
  .city-chat-text { font-size: 24px; }
  .city-chat-cursor { height: 22px; }
}
