/* Locations page */
.regions { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.region-tab {
  --rc: #888;
  position: relative; display: grid; gap: 2px; padding: 12px 14px 12px 18px; border-radius: 16px; cursor: pointer; text-align: left;
  border: 1px solid var(--line-2); background: rgba(255,255,255,.03); color: #fff; overflow: hidden;
}
.region-tab::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--rc); }
.region-tab b { font-family: var(--display); font-weight: 400; font-size: 17px; letter-spacing: .4px; }
.region-tab span { font-size: 12.5px; color: var(--muted); font-weight: 800; }
.region-tab:hover { background: rgba(255,255,255,.07); }
.region-tab[aria-pressed="true"] { background: linear-gradient(135deg, color-mix(in srgb, var(--rc) 55%, #12163a 45%), color-mix(in srgb, var(--rc) 22%, #12163a 78%)); border-color: color-mix(in srgb, var(--rc) 70%, #fff 30%); box-shadow: 0 10px 24px rgba(0,0,0,.3); }
.region-tab[aria-pressed="true"] span { color: #fff; }
@media (max-width: 980px) { .regions { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 520px) { .regions { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.area-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); gap: 14px; }
.area {
  --rc: #888;
  display: flex; flex-direction: column; border-radius: 18px; overflow: hidden; text-decoration: none; color: #fff;
  background: linear-gradient(180deg, rgba(30, 36, 86, .95), rgba(23, 28, 70, .95)); border: 1px solid var(--line);
  content-visibility: auto; contain-intrinsic-size: 258px 250px;
  transition: transform .12s ease, border-color .12s ease;
}
.area:hover, .area:focus-visible { color: #fff; transform: translateY(-3px); border-color: rgba(255,255,255,.7); }
.area .body { padding: 12px 14px 14px; display: grid; gap: 6px; }
.area .nm { font-weight: 900; font-size: 17.5px; line-height: 1.2; }
.area .meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); font-weight: 800; }
.area .meta .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--rc); box-shadow: 0 0 0 2px rgba(255,255,255,.15); }

/* the picture: taxi photo or a drawn card */
.vis { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #0d1232; }
.vis img.photo { width: 100%; height: 100%; object-fit: cover; display: block; }
.vis .badges { position: absolute; left: 10px; top: 10px; display: flex; gap: 6px; z-index: 2; }
.vis .vis-switch { position: absolute; right: 10px; bottom: 10px; z-index: 2; display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(6, 9, 30, .72); backdrop-filter: blur(6px); }
.vis .vis-switch button { font: 800 12px/1 var(--ui); letter-spacing: .02em; color: rgba(255,255,255,.78); background: transparent; border: 0; border-radius: 999px; padding: 7px 11px; cursor: pointer; }
.vis .vis-switch button[aria-pressed="true"] { background: #fff; color: #10153a; }
.vis .vis-switch button:focus-visible { outline: 2px solid #ffd23f; outline-offset: 2px; }
.vis.drawn {
  background:
    radial-gradient(120% 90% at 20% 0%, color-mix(in srgb, var(--rc) 70%, #fff 8%) 0%, transparent 60%),
    linear-gradient(160deg, color-mix(in srgb, var(--rc) 55%, #12163a 45%) 0%, #11153a 100%);
}
.vis.drawn .kind-ico { position: absolute; right: -14px; bottom: -18px; width: 58%; height: auto; color: rgba(255,255,255,.12); }
.vis.drawn .ground, .vis.has-party .ground { position: absolute; left: 0; right: 0; bottom: 0; height: 34%; background: linear-gradient(180deg, transparent, rgba(5, 7, 24, .55)); }
.vis.drawn .party, .vis.has-party .party { position: absolute; left: 0; right: 0; bottom: 8%; display: flex; justify-content: center; align-items: flex-end; gap: 2%; z-index: 1; }
.vis.drawn .party .stage, .vis.has-party .party .stage { width: 30%; height: 82px; }
.vis.drawn .party .stage::before, .vis.has-party .party .stage::before { width: 90%; height: 22%; bottom: 0; }
.vis.drawn .party .sprite, .vis.has-party .party .sprite { margin-bottom: 9%; }
.vis.drawn .town-name { position: absolute; left: 14px; bottom: 12px; font-family: var(--display); font-size: 22px; line-height: 1; color: rgba(255,255,255,.92); text-shadow: 0 3px 0 rgba(0,0,0,.35); max-width: 70%; }

/* detail */
.ar-top { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; align-items: stretch; }
.ar-top .vis { border-radius: var(--r-lg); border: 1px solid var(--line-2); aspect-ratio: 16 / 9; }
.ar-top .vis.drawn .party .stage, .vis.has-party .party .stage { height: 130px; }
.ar-info { padding: 22px 24px; display: flex; flex-direction: column; gap: 10px; }
.ar-info h1 { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(28px, 4.6vw, 46px); line-height: 1; letter-spacing: .6px; text-shadow: 0 4px 0 rgba(0,0,0,.35); }
.ar-info .region-chip { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px; font-weight: 900; background: color-mix(in srgb, var(--rc) 35%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rc) 80%, #fff 20%); }
.ar-info .facts { margin-top: 4px; }
.enc { display: grid; gap: 18px; margin-top: 18px; }
.enc-block { padding: 20px 22px; }
.enc-block h2 { display: flex; align-items: center; gap: 10px; }
.enc-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.enc-row { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 10px; align-items: center; padding: 8px 12px 8px 6px; border-radius: 14px; background: rgba(10, 12, 40, .35); border: 1px solid var(--line); text-decoration: none; color: #fff; }
.enc-row:hover { color: #fff; border-color: rgba(255,255,255,.6); }
.enc-row .stage { height: 60px; }
.enc-row .stage::before { width: 86%; bottom: 0; }
.enc-row .stage .sprite { margin-bottom: 4px; }
.enc-row .nm { font-weight: 900; font-size: 15px; line-height: 1.2; overflow-wrap: anywhere; }
.enc-row .lv { color: var(--muted); font-weight: 800; font-size: 12.5px; }
.enc-row .rate { min-width: 0; margin-top: 4px; }
@media (max-width: 860px) { .ar-top { grid-template-columns: 1fr; } }
.ar-sum { margin: 6px 0 0; color: #d8ddf8; line-height: 1.7; }
.ar-sum b { color: var(--muted); font-weight: 800; }
.ar-sum a { color: #fff; font-weight: 900; }

/* wild Pokémon standing on area pictures */
.vis.has-party .ground { height: 46%; background: linear-gradient(180deg, transparent, rgba(5, 7, 24, .62)); z-index: 1; pointer-events: none; }
.vis.has-party .party { bottom: 4%; z-index: 2; pointer-events: none; }
.vis.has-party .party .sprite { filter: drop-shadow(0 3px 2px rgba(0,0,0,.45)); }
.ar-top .vis.has-party .party .stage { height: 140px; }
.vis.has-party .vis-switch { top: 10px; bottom: auto; }
