/* ============================================================
   AUSTIN LIFE — prototype UI
   ============================================================ */
:root {
  --bg: #080b10;
  --panel: rgba(13, 18, 26, 0.82);
  --panel-solid: #0f151e;
  --line: rgba(255, 255, 255, 0.09);
  --text: #eef3f8;
  --muted: #8b9aab;
  --pink: #ff4d6d;
  --mint: #3ee8c4;
  --amber: #ffb84d;
  --radius: 18px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  touch-action: none;
  user-select: none;
}

#app { position: fixed; inset: 0; }

#world { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

#ui {
  position: absolute; inset: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  padding: 16px;
  gap: 12px;
}
#ui > * { pointer-events: auto; }

/* ---------------- top bar ---------------- */
.hud-top {
  display: flex;
  align-items: center;
  gap: 14px;
  pointer-events: none;
}
.hud-top > * { pointer-events: auto; }

.brand { display: flex; align-items: center; gap: 10px; }
.logo {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center;
  font-weight: 900; font-size: 13px; letter-spacing: .5px;
  color: #12060a;
  background: linear-gradient(140deg, #ff8fa3, var(--pink) 55%, #ff2e55);
  box-shadow: 0 8px 24px rgba(255, 77, 109, .35), inset 0 1px 0 rgba(255,255,255,.4);
}
.brand-text h1 {
  margin: 0; font-size: 15px; letter-spacing: 3.4px; font-weight: 800;
}
.brand-text p {
  margin: 2px 0 0; font-size: 10px; letter-spacing: 1.6px;
  text-transform: uppercase; color: var(--muted);
}

.hud-stats { display: flex; gap: 8px; margin-left: auto; }
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 12px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--line);
  backdrop-filter: blur(14px);
  font-size: 12px; color: #cdd8e4; font-variant-numeric: tabular-nums;
}
.pill b { color: #fff; font-weight: 700; }
.pill.money { color: var(--amber); }
.pill.money b { color: var(--amber); }
.pill.loc { color: var(--mint, #3ee8c4); cursor: default; }
.pill.loc b { color: var(--mint, #3ee8c4); }
.aqi-pill {
  color: var(--aqi-color, #cdd8e4);
  border-color: color-mix(in srgb, var(--aqi-color, #cdd8e4) 38%, transparent);
  cursor: pointer;
}
.aqi-pill b { color: inherit; }
.dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--mint);
  box-shadow: 0 0 10px var(--mint); animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.35} }

.hud-actions { display: flex; gap: 8px; }

.map-search {
  position: absolute;
  top: 66px;
  left: 50%;
  z-index: 8;
  display: flex;
  align-items: center;
  width: min(460px, calc(100vw - 640px));
  min-width: 280px;
  transform: translateX(-50%);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 14px;
  background: rgba(11, 17, 25, .9);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .28);
  backdrop-filter: blur(16px);
}

.map-search-icon {
  padding-left: 12px;
  color: #6d7d90;
  font-size: 18px;
}

.map-search input {
  flex: 1;
  min-width: 0;
  padding: 11px 10px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #f0f5fa;
  font: inherit;
  font-size: 12px;
}

.map-search input::placeholder { color: #738296; }

.map-search > button {
  margin-right: 5px;
  padding: 7px 11px;
  border: 0;
  border-radius: 9px;
  background: rgba(62, 232, 196, .13);
  color: var(--mint);
  font: 700 10px Inter, "Segoe UI", sans-serif;
  cursor: pointer;
}

.search-results {
  position: absolute;
  top: calc(100% + 7px);
  left: 0;
  right: 0;
  max-height: min(420px, 60vh);
  overflow: auto;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 14px;
  background: rgba(9, 14, 21, .97);
  box-shadow: 0 18px 46px rgba(0, 0, 0, .42);
}

.search-result {
  display: grid;
  grid-template-columns: 45px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  width: 100%;
  padding: 9px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #e7eff7;
  text-align: left;
  cursor: pointer;
}

.search-result:hover,
.search-result.active { background: rgba(255, 255, 255, .06); }
.search-result-type { color: var(--mint); font-size: 9px; font-weight: 800; letter-spacing: .6px; }
.search-result-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.search-result-meta { color: #728296; font-size: 9px; white-space: nowrap; }

.btn {
  font: inherit; font-size: 12px; font-weight: 600;
  padding: 9px 14px; border-radius: 12px; cursor: pointer;
  color: var(--text); background: var(--panel); border: 1px solid var(--line);
  backdrop-filter: blur(14px);
  transition: transform .15s, background .2s, border-color .2s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); border-color: rgba(255,255,255,.2); }
.btn:active { transform: translateY(0) scale(.98); }
.btn.ghost { color: #b9c6d4; }
.btn.primary {
  background: linear-gradient(135deg, #ff6b85, var(--pink));
  border-color: transparent; color: #1a060b; font-weight: 800;
  box-shadow: 0 10px 30px rgba(255, 77, 109, .3);
}
.btn.wide { width: 100%; padding: 13px; }
.btn.big { padding: 15px 46px; font-size: 13px; letter-spacing: 1px; }

/* ---------------- quest ---------------- */
.quest {
  position: absolute; top: 78px; left: 16px; width: 268px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--line);
  backdrop-filter: blur(18px);
  box-shadow: 0 16px 40px rgba(0,0,0,.35);
  transition: opacity .3s, transform .3s;
}
.quest-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.quest-tag {
  font-size: 9px; letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--mint); border: 1px solid rgba(62,232,196,.32);
  background: rgba(62,232,196,.08);
  padding: 3px 7px; border-radius: 6px; font-weight: 700;
}
.quest-title { font-size: 12px; font-weight: 700; }
.quest-bar {
  height: 5px; border-radius: 99px; background: rgba(255,255,255,.09); overflow: hidden;
}
.quest-bar i {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--mint), #7cf7ff);
  border-radius: 99px; transition: width .4s cubic-bezier(.2,.8,.2,1);
  box-shadow: 0 0 12px rgba(62,232,196,.6);
}
.quest p { margin: 9px 0 0; font-size: 11px; color: var(--muted); line-height: 1.5; }

/* ---------------- chat ---------------- */
.chat {
  position: absolute; left: 16px; bottom: 16px; width: 330px;
  display: flex; flex-direction: column; gap: 8px;
}
.chat-head {
  display: flex;
  gap: 7px;
}
.chat-head button {
  padding: 7px 10px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 9px;
  background: rgba(9,14,21,.86);
  color: #d9e5f0;
  font: 700 10px Inter, "Segoe UI", sans-serif;
  cursor: pointer;
  backdrop-filter: blur(10px);
}
.chat-head button:first-child {
  flex: 1;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-head button:last-child {
  color: var(--mint);
}
.chat-log {
  display: flex; flex-direction: column; gap: 6px;
  max-height: 190px; overflow: hidden; justify-content: flex-end;
  mask-image: linear-gradient(to bottom, transparent, #000 28%);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 28%);
}
.chat-line {
  position: relative;
  font-size: 11.5px; line-height: 1.45; color: #c3cfdb;
  background: rgba(10, 14, 20, .72);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 10px; padding: 6px 9px;
  backdrop-filter: blur(8px);
  animation: slideUp .3s ease both;
  word-break: break-word;
}
.chat-line:not(.sys) { padding-right: 76px; }
.chat-line b { color: var(--mint); font-weight: 700; margin-right: 5px; }
.chat-line.me b { color: var(--pink); }
.chat-line.sys { color: #93a3b5; font-style: italic; border-style: dashed; }
.chat-line.deleted { color: #748395; font-style: italic; }
.chat-actions {
  position: absolute;
  top: 5px;
  right: 6px;
  display: flex;
  gap: 2px;
}
.chat-action {
  padding: 2px 4px;
  border: 0;
  background: transparent;
  color: #718196;
  font: 600 8px Inter, "Segoe UI", sans-serif;
  cursor: pointer;
}
.chat-action:hover { color: #ff8a9d; }
@keyframes slideUp { from { opacity: 0; transform: translateY(6px); } }

.chat-input {
  display: flex; align-items: center; gap: 8px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 6px 6px 14px;
  backdrop-filter: blur(14px);
}
.chat-input input {
  flex: 1; background: none; border: 0; outline: 0;
  color: var(--text); font: inherit; font-size: 12px;
}
.chat-input input::placeholder { color: #67768a; }
.chat-input button {
  width: 30px; height: 30px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--pink); color: #1a060b; font-weight: 900; font-size: 14px;
  display: grid; place-items: center;
}

.chat-room-list {
  display: grid;
  gap: 8px;
  max-height: 32vh;
  overflow: auto;
  margin: 14px 0 16px;
}
.chat-room-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  width: 100%;
  padding: 10px 11px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 11px;
  background: rgba(8,14,21,.75);
  color: #dce7f1;
  text-align: left;
  cursor: pointer;
}
.chat-room-item.current {
  border-color: rgba(62,232,196,.4);
  background: rgba(62,232,196,.07);
}
.chat-room-item b {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-room-item small {
  display: block;
  margin-top: 3px;
  color: #738396;
  font-size: 9px;
}
.chat-room-code {
  color: var(--amber);
  font: 700 10px ui-monospace, "Segoe UI", monospace;
  letter-spacing: .8px;
}
.chat-group-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
  margin-top: 10px;
}
.chat-group-form label {
  display: grid;
  gap: 6px;
  color: #b7c5d4;
  font-size: 10px;
  font-weight: 700;
}
.chat-group-form input {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  background: #0a1018;
  color: #f0f5fa;
  font: inherit;
  outline: none;
}
.chat-group-form input:focus {
  border-color: rgba(62,232,196,.42);
}
.chat-group-form .btn {
  padding: 9px 10px;
  white-space: nowrap;
}
.chat-room-message {
  min-height: 18px;
  margin: 12px 0 0;
  color: #8494a6;
  font-size: 10px;
}
.chat-room-message.error { color: #ff8a9d; }
.chat-room-message.success { color: var(--mint); }
.chat-report-preview {
  padding: 11px 12px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  background: rgba(8,14,21,.75);
  color: #cbd8e5;
  font-size: 11px;
  line-height: 1.55;
}
.chat-report-form {
  display: grid;
  gap: 10px;
}
.chat-report-form label {
  display: grid;
  gap: 7px;
  color: #b7c5d4;
  font-size: 10px;
  font-weight: 700;
}
.chat-report-form textarea {
  min-height: 90px;
  padding: 10px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  background: #0a1018;
  color: #f0f5fa;
  font: inherit;
  resize: vertical;
  outline: none;
}
.chat-report-form textarea:focus {
  border-color: rgba(255,138,157,.45);
}

/* ---------------- minimap ---------------- */
.minimap-wrap {
  position: absolute; right: 16px; bottom: 16px;
  width: 210px; border-radius: 16px; overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(8, 11, 16, .78);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}
.minimap-wrap canvas { display: block; width: 100%; height: auto; }
.minimap-label {
  position: absolute; left: 10px; bottom: 8px;
  font-size: 8px; letter-spacing: 2px; color: #6f8194; font-weight: 700;
}

/* ---------------- joystick ---------------- */
.joystick {
  position: absolute; left: 26px; bottom: 210px;
  width: 108px; height: 108px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.13);
  background: radial-gradient(circle at 50% 45%, rgba(255,255,255,.06), rgba(8,11,16,.35));
  backdrop-filter: blur(8px);
  display: none; place-items: center;
}
.joystick .knob {
  width: 44px; height: 44px; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #ffd0d9, var(--pink));
  box-shadow: 0 6px 18px rgba(255,77,109,.5);
  transition: transform .06s linear;
}
body.touch .joystick { display: grid; }

/* ---------------- toast / hint ---------------- */
.toast {
  position: absolute; left: 50%; top: 84px; transform: translate(-50%, -14px);
  padding: 10px 18px; border-radius: 999px;
  background: rgba(10,14,20,.92); border: 1px solid rgba(62,232,196,.35);
  color: #d8fff5; font-size: 12px; font-weight: 600;
  box-shadow: 0 12px 40px rgba(0,0,0,.5);
  opacity: 0; transition: opacity .3s, transform .3s; pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.hint {
  position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%);
  font-size: 11px; color: #7b8b9d; letter-spacing: .3px;
  background: rgba(8,11,16,.6); padding: 7px 14px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.05);
  transition: opacity .6s;
  pointer-events: none;
  white-space: nowrap;
}

/* ---------------- modals ---------------- */
.modal {
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-items: center;
  padding: 18px;
  background: rgba(4, 6, 10, .68);
  backdrop-filter: blur(10px);
  opacity: 0; pointer-events: none;
  transition: opacity .22s;
}
.modal.open { opacity: 1; pointer-events: auto; }

.sheet {
  position: relative;
  width: min(420px, 100%);
  max-height: min(88vh, 760px);
  overflow: auto;
  border-radius: 24px;
  background: linear-gradient(180deg, #131a25, #0c1118);
  border: 1px solid rgba(255,255,255,.1);
  box-shadow: var(--shadow);
  transform: translateY(10px) scale(.985);
  transition: transform .25s cubic-bezier(.2,.9,.2,1);
  scrollbar-width: thin;
}
.modal.open .sheet { transform: none; }
.sheet.narrow { width: min(360px, 100%); }
.sheet.wide { width: min(560px, 100%); }

.close {
  position: absolute; top: 12px; right: 12px; z-index: 3;
  width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(8,11,16,.6); color: #cfdae6; cursor: pointer;
  font-size: 12px; backdrop-filter: blur(6px);
}

/* merchant hero */
.m-hero {
  position: relative; height: 150px; overflow: hidden;
  background: var(--m-hero, linear-gradient(135deg, #ff4d6d, #7b2cff));
  display: grid; place-items: center;
}
.m-hero::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 25% 18%, rgba(255,255,255,.45), transparent 55%);
  mix-blend-mode: overlay;
}
.m-hero-glow {
  position: absolute; inset: 0;
  background: radial-gradient(circle at 70% 110%, rgba(0,0,0,.55), transparent 60%);
}
.m-hero-initial {
  position: relative; z-index: 1;
  font-size: 58px; font-weight: 900; letter-spacing: -2px;
  color: rgba(255,255,255,.92);
  text-shadow: 0 8px 30px rgba(0,0,0,.35);
}
.m-cat, .m-flag {
  position: absolute; z-index: 2; top: 14px;
  font-size: 9px; letter-spacing: 1.2px; text-transform: uppercase;
  padding: 5px 9px; border-radius: 7px; font-weight: 700;
  background: rgba(6, 9, 14, .55); backdrop-filter: blur(6px);
}
.m-cat { left: 14px; color: #fff; }
.m-flag { right: 52px; color: #ffd9a3; border: 1px solid rgba(255,184,77,.35); }

.m-body { padding: 18px 20px 22px; }
.m-top { display: flex; justify-content: space-between; align-items: start; gap: 10px; }
.m-top h2 { margin: 0 0 4px; font-size: 20px; letter-spacing: -.3px; }
.m-addr { margin: 0; font-size: 11px; color: var(--muted); }
.m-open {
  font-size: 10px; color: var(--mint); display: flex; align-items: center; gap: 5px;
  white-space: nowrap; padding-top: 4px;
}
.m-desc { font-size: 12.5px; line-height: 1.65; color: #adbdcc; margin: 12px 0 16px; }
.m-notice {
  margin: -6px 0 15px;
  padding: 10px 12px;
  border-left: 2px solid #ffd166;
  border-radius: 0 10px 10px 0;
  background: rgba(255, 209, 102, .07);
  color: #f5dda0;
  font-size: 12px;
  line-height: 1.55;
}
.m-notice[hidden] { display: none; }

.offer {
  border-radius: 16px; padding: 14px;
  background: linear-gradient(160deg, rgba(62,232,196,.1), rgba(62,232,196,.02));
  border: 1px solid rgba(62,232,196,.22);
}
.offer-head {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 10px; letter-spacing: 1px; text-transform: uppercase;
  color: var(--mint); font-weight: 700;
}
.offer-badge {
  font-size: 9px; padding: 3px 7px; border-radius: 6px;
  background: rgba(62,232,196,.14); letter-spacing: .6px;
}
.offer p { margin: 8px 0 13px; font-size: 14px; font-weight: 700; line-height: 1.45; }

.m-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1px; margin: 18px 0 12px;
  background: rgba(255,255,255,.07); border-radius: 12px; overflow: hidden;
}
.m-stats div { background: #0d131b; padding: 11px 8px; text-align: center; }
.m-stats b { display: block; font-size: 15px; }
.m-stats span { font-size: 9.5px; color: var(--muted); letter-spacing: .4px; }

.fine { font-size: 9.5px; color: #5d6b7c; line-height: 1.55; margin: 0; }
.fine.center { text-align: center; margin-top: 14px; }

/* coupon */
.coupon { padding: 26px 22px 22px; text-align: center; }
.coupon-kicker { font-size: 9px; letter-spacing: 2px; color: var(--mint); font-weight: 700; }
.coupon h3 { margin: 10px 0 4px; font-size: 20px; }
.coupon-top p { margin: 0; font-size: 12.5px; color: #adbdcc; }
.qr {
  width: 150px; height: 150px; margin: 20px auto 14px;
  background: #fff; border-radius: 12px; padding: 9px;
  display: grid; grid-template-columns: repeat(21, 1fr); gap: 0;
}
.qr i { display: block; }
.coupon-code {
  font-family: "SF Mono", "Consolas", monospace;
  font-size: 18px; letter-spacing: 4px; font-weight: 700;
  color: var(--mint); margin-bottom: 6px;
}

/* stamps */
.panel-head { padding: 24px 22px 8px; }
.panel-head h2 { margin: 8px 0 4px; font-size: 21px; }
.panel-head p { margin: 0; font-size: 12px; color: var(--muted); }
.stamp-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px;
  padding: 14px 22px 8px;
}
.stamp {
  aspect-ratio: 1; border-radius: 14px;
  border: 1px dashed rgba(255,255,255,.14);
  background: rgba(255,255,255,.02);
  display: grid; place-items: center; text-align: center;
  padding: 6px; position: relative; overflow: hidden;
}
.stamp svg { position: absolute; inset: 0; margin: auto; opacity: 0; }
.stamp.on {
  border-style: solid; border-color: rgba(62,232,196,.4);
  background: rgba(62,232,196,.08);
}
.stamp.on svg { opacity: .28; }
.stamp b { position: relative; z-index: 1; font-size: 9px; line-height: 1.3; color: #738394; font-weight: 600; }
.stamp.on b { color: #d6fff6; }
.stamp .num { position: absolute; top: 4px; left: 6px; font-size: 8px; color: #4a5867; }
.progress-line {
  height: 6px; border-radius: 99px; background: rgba(255,255,255,.08);
  margin: 8px 22px 0; overflow: hidden;
}
.progress-line i {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--pink), var(--amber));
  transition: width .45s cubic-bezier(.2,.8,.2,1);
}

/* dashboard */
.dash-kpis {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
  padding: 14px 22px;
}
.dash-kpis div {
  background: rgba(255,255,255,.035); border: 1px solid var(--line);
  border-radius: 12px; padding: 11px 10px;
}
.dash-kpis b { display: block; font-size: 17px; font-variant-numeric: tabular-nums; }
.dash-kpis span { font-size: 9.5px; color: var(--muted); display: block; margin-top: 2px; }
.dash-kpis i { font-style: normal; font-size: 9px; color: var(--mint); }
.dash-chart { padding: 4px 22px 14px; }
.chart-head {
  display: flex; justify-content: space-between;
  font-size: 10px; color: var(--muted); margin-bottom: 10px;
}
.mono { font-family: "SF Mono", Consolas, monospace; }
.bars { display: flex; align-items: flex-end; gap: 7px; height: 92px; }
.bars i {
  flex: 1; border-radius: 5px 5px 2px 2px;
  background: linear-gradient(180deg, var(--pink), rgba(255,77,109,.18));
  animation: grow .7s cubic-bezier(.2,.9,.2,1) both;
}
@keyframes grow { from { height: 0 !important; opacity: .2; } }

.dash-slots { padding: 4px 22px; display: grid; gap: 6px; }
.slot {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 10px;
  border: 1px dashed rgba(255,255,255,.12); font-size: 11px;
}
.slot b { color: #4d5b6b; font-size: 10px; }
.slot span { flex: 1; }
.slot i { font-style: normal; font-size: 9px; color: #6f8091; }
.slot.sold { border-style: solid; border-color: rgba(62,232,196,.18); background: rgba(62,232,196,.05); }
.slot.sold i { color: var(--mint); }

/* billboard */
.bb { padding: 26px 22px 22px; }
.bb-kicker { font-size: 9px; letter-spacing: 2px; color: var(--amber); font-weight: 700; }
.bb-ad {
  margin: 14px 0 16px; border-radius: 16px; padding: 20px;
  background: linear-gradient(150deg, #1d2734, #101721);
  border: 1px solid rgba(255,255,255,.1);
  text-align: center;
}
.bb-logo {
  width: 46px; height: 46px; border-radius: 13px; margin: 0 auto 12px;
  display: grid; place-items: center; font-weight: 900; font-size: 13px;
  background: var(--bb, #ffb84d); color: #171006;
}
.bb-ad h3 { margin: 0 0 6px; font-size: 17px; }
.bb-ad p { margin: 0; font-size: 12px; color: #a8b8c8; }
.bb-ad .bb-area {
  margin-top: 9px;
  font-size: 10px;
  letter-spacing: .8px;
  color: rgba(205, 219, 232, .58);
}
.bb-meta {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: rgba(255,255,255,.07); border-radius: 12px; overflow: hidden;
  margin-bottom: 14px;
}
.bb-meta div { background: #0d131b; padding: 11px 6px; text-align: center; }
.bb-meta b { display: block; font-size: 14px; }
.bb-meta span { font-size: 9px; color: var(--muted); }
.bb-note { font-size: 11.5px; color: #9fb0c1; line-height: 1.6; margin: 0 0 16px; }

/* alerts and air quality */
.alert-banner {
  position: absolute;
  top: 66px;
  left: 16px;
  z-index: 7;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: min(360px, calc(100vw - 32px));
  padding: 8px 11px;
  border: 1px solid color-mix(in srgb, var(--alert-color, #ffd166) 35%, transparent);
  border-radius: 11px;
  background: rgba(11, 17, 25, .92);
  color: #cdd8e4;
  font: 600 10px Inter, "Segoe UI", sans-serif;
  cursor: pointer;
  backdrop-filter: blur(14px);
}
.alert-banner[hidden] { display: none; }
.alert-banner-tag { color: var(--alert-color, #ffd166); font-weight: 800; }
.alert-banner b {
  overflow: hidden;
  color: #f3f7fb;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#alertModal[data-severity="info"] #alertSeverity { color: var(--mint); }
#alertModal[data-severity="warning"] #alertSeverity { color: var(--amber); }
#alertModal[data-severity="danger"] #alertSeverity { color: #ff7a8e; }
.alert-time { margin: 14px 0; color: #708094; font-size: 10px; }

.air-summary {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 16px;
  background: rgba(255, 255, 255, .025);
}
.air-score {
  min-width: 88px;
  color: var(--air-color, #ffd166);
  font-size: 42px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
}
.air-summary > div:last-child { display: grid; gap: 6px; }
.air-summary b { color: var(--air-color, #ffd166); }
.air-summary span { color: #90a0b2; font-size: 11px; }
.air-advice { margin: 16px 0 8px; color: #c5d2df; font-size: 12px; line-height: 1.65; }
.air-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #657588;
  font-size: 9px;
}

/* intro */
#intro {
  position: fixed; inset: 0; z-index: 80;
  display: grid; place-items: center; text-align: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(255,77,109,.14), transparent 55%),
    radial-gradient(circle at 80% 90%, rgba(62,232,196,.09), transparent 50%),
    #06090d;
  transition: opacity .5s;
  padding: 24px;
}
#intro.hide { opacity: 0; pointer-events: none; }
.intro-inner { max-width: 420px; }
.intro-kicker {
  font-size: 9px; letter-spacing: 3px; color: var(--mint);
  border: 1px solid rgba(62,232,196,.3); padding: 5px 10px; border-radius: 99px;
}
#intro h1 {
  margin: 20px 0 12px; font-size: 64px; line-height: .88;
  letter-spacing: -2px; font-weight: 900;
}
#intro h1 em {
  font-style: normal;
  background: linear-gradient(100deg, #ff8fa3, var(--pink));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.intro-sub { font-size: 12.5px; line-height: 1.7; color: #93a3b5; margin: 0 0 26px; }
.intro-list { display: grid; gap: 9px; margin-bottom: 28px; text-align: left; }
.intro-list div {
  display: flex; gap: 11px; align-items: baseline;
  font-size: 11.5px; color: #a9b8c8; line-height: 1.5;
  border-bottom: 1px solid rgba(255,255,255,.06); padding-bottom: 9px;
}
.intro-list b { color: var(--pink); font-size: 9px; letter-spacing: 1px; }
.intro-note { font-size: 9px; color: #4e5c6b; line-height: 1.6; margin: 22px 0 0; }

/* ---------------- responsive ---------------- */
@media (max-width: 720px) {
  #ui { padding: 12px; gap: 10px; }
  .hud-top { gap: 6px; }
  .brand { min-width: 0; }
  .brand-text p { display: none; }
  .brand-text h1 { font-size: 11px; letter-spacing: 1.8px; white-space: nowrap; }
  .logo { width: 34px; height: 34px; }
  .hud-stats { gap: 5px; }
  .hud-stats .pill { padding: 6px 8px; font-size: 10.5px; }
  .pill.live { display: none; }
  #clock { display: none; }
  .hud-actions .btn { padding: 6px 8px; font-size: 10px; }
  #btn-dashboard { display: none; }
  .aqi-pill { padding: 6px 8px; }
  .alert-banner {
    top: 166px;
    right: 12px;
    left: auto;
    max-width: 190px;
  }
  .map-search {
    top: 62px;
    width: calc(100% - 24px);
    min-width: 0;
  }
  .map-search input { padding: 9px 8px; }
  .map-search > button { padding: 6px 9px; }
  .quest { top: 112px; left: 12px; width: 210px; padding: 11px 12px; }
  .quest-title { font-size: 11px; }
  .quest p { font-size: 10px; }
  .chat { width: min(58vw, 250px); left: 12px; bottom: 12px; }
  .chat-log { max-height: 118px; }
  .chat-line { font-size: 10.5px; padding: 5px 8px; }
  .minimap-wrap { width: 118px; right: 12px; bottom: 12px; border-radius: 12px; }
  .minimap-label { display: none; }
  .joystick { bottom: 150px; left: 18px; width: 92px; height: 92px; }
  .hint { display: none; }
  .sheet { max-height: 92vh; }
  #intro h1 { font-size: 52px; }
  .intro-list { display: none; }
  .stamp-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 520px) {
  .brand-text { display: none; }
  .pill.money { display: none; }
  .hud-stats { margin-left: auto; }
  .hud-actions { gap: 5px; }
  .hud-actions .btn { padding: 6px; }
}

/* ---------------- Tebrau overview ---------------- */
.minimap-overview {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 2;
  padding: 4px 7px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 8px;
  background: rgba(9, 14, 21, .82);
  color: #e1edf7;
  font: 700 9px Inter, "Segoe UI", sans-serif;
  letter-spacing: .5px;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.minimap-shops {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  padding: 4px 7px;
  border: 1px solid rgba(62, 232, 196, .2);
  border-radius: 8px;
  background: rgba(9, 14, 21, .82);
  color: var(--mint);
  font: 700 9px Inter, "Segoe UI", sans-serif;
  letter-spacing: .3px;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.zoom-controls {
  position: absolute;
  right: 18px;
  bottom: 244px;
  display: grid;
  gap: 5px;
}

.zoom-controls button {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 9px;
  background: rgba(9, 14, 21, .82);
  color: #dce8f2;
  font: 700 17px/1 Inter, "Segoe UI", sans-serif;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.zoom-controls button:hover {
  border-color: rgba(62, 232, 196, .4);
}

.nearby-shop-list {
  display: grid;
  gap: 8px;
  max-height: 58vh;
  overflow: auto;
  margin-top: 16px;
}

.nearby-shop {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 12px;
  background: rgba(10, 16, 24, .82);
  color: #e7eff7;
  text-align: left;
  cursor: pointer;
}

.nearby-shop:hover {
  border-color: rgba(62, 232, 196, .32);
}

.nearby-shop-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: #081016;
  font-weight: 900;
  font-size: 11px;
}

.nearby-shop-copy {
  min-width: 0;
}

.nearby-shop-copy b,
.nearby-shop-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nearby-shop-copy b { font-size: 12px; }
.nearby-shop-copy span { color: #7f8fa2; font-size: 10px; margin-top: 3px; }
.nearby-shop-distance { color: var(--mint); font-size: 10px; white-space: nowrap; }

.overview-sheet {
  width: min(1180px, calc(100vw - 34px));
  max-height: 94vh;
  overflow: auto;
}

.overview-canvas-wrap {
  margin-top: 16px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 14px;
  overflow: hidden;
  background: #080d13;
}

.overview-canvas-wrap canvas {
  display: block;
  width: 100%;
  height: auto;
  cursor: crosshair;
  touch-action: manipulation;
}

.overview-note {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.overview-districts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.overview-districts button {
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 999px;
  background: rgba(11, 17, 25, .9);
  color: #aebdcc;
  padding: 6px 9px;
  font: 600 10px Inter, "Segoe UI", sans-serif;
  cursor: pointer;
}

.overview-districts button:hover {
  color: #fff;
  border-color: rgba(62, 232, 196, .34);
}

.overview-note span {
  padding: 6px 9px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 999px;
  color: #92a2b5;
  font-size: 10px;
}

@media (max-width: 720px) {
  .overview-sheet {
    width: calc(100vw - 16px);
    max-height: 94vh;
    padding: 14px;
  }

  .overview-canvas-wrap {
    margin-top: 10px;
  }

  .zoom-controls {
    right: 12px;
    bottom: 138px;
  }
}

.auth-btn {
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.auth-form {
  display: grid;
  gap: 11px;
  margin-top: 16px;
}

.auth-form label {
  display: grid;
  gap: 6px;
  color: #afbdcb;
  font-size: 10px;
  font-weight: 700;
}

.auth-form input[type="tel"],
.auth-form input[type="text"],
.auth-form input:not([type]) {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 11px;
  outline: none;
  background: #0a1018;
  color: #edf4fb;
  font: inherit;
}

.auth-form input:focus {
  border-color: rgba(62, 232, 196, .45);
}

#authVerifyFields {
  display: grid;
  gap: 11px;
}

#authVerifyFields[hidden] {
  display: none;
}

.auth-consent {
  display: flex !important;
  grid-template-columns: auto 1fr;
  align-items: flex-start;
  gap: 8px !important;
  color: #8494a7 !important;
  line-height: 1.5;
}

.auth-consent input {
  margin-top: 2px;
}

.auth-status {
  min-height: 17px;
  margin: 0;
  color: #8f9fb1;
  font-size: 10px;
}

.auth-status.error { color: #ff8a9d; }
.auth-status.success { color: var(--mint); }

.auth-profile-name {
  margin: 16px 0 4px;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
}

@media (max-width: 720px) {
  .auth-btn { max-width: 64px; }
}
