:root {
  --gold: #fcd116;
  --red: #ce1126;
  --green: #006b3f;
  --panel: rgba(12, 16, 14, 0.62);
  --text: #f5f5f0;
  --ok: #3ddc84;
  --meh: #ffc233;
  --bad: #ff4d4d;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; height: 100%; overflow: hidden; background: #0e1a12; color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  user-select: none; -webkit-user-select: none; touch-action: none; overscroll-behavior: none;
}
#game { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
.hidden { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; }
.label { font-size: 10px; letter-spacing: 0.14em; opacity: 0.8; font-weight: 700; }

/* ---------- HUD ---------- */
#hud { position: fixed; inset: 0; pointer-events: none; }
#hud > * { pointer-events: auto; }
#topbar {
  position: absolute; top: max(8px, env(safe-area-inset-top)); left: max(10px, env(safe-area-inset-left)); right: max(10px, env(safe-area-inset-right));
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; pointer-events: none;
}
#topbar > * { pointer-events: auto; }
#scoreBox { background: var(--panel); border-radius: 12px; padding: 6px 14px 6px; text-align: center; min-width: 92px; backdrop-filter: blur(4px); }
#score { font-size: 34px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
#score.ok { color: var(--ok); } #score.meh { color: var(--meh); } #score.low { color: var(--bad); }
#stars { color: var(--gold); font-size: 13px; letter-spacing: 1px; }
#progressWrap { flex: 1; max-width: 360px; text-align: center; margin-top: 8px; pointer-events: none; }
#progress { height: 8px; border-radius: 4px; background: rgba(0, 0, 0, 0.45); overflow: hidden; border: 1px solid rgba(255,255,255,0.15); }
#progressFill { height: 100%; width: 0; background: linear-gradient(90deg, var(--red), var(--gold), var(--green)); }
#topRight { display: flex; gap: 8px; align-items: center; }
#limitSign {
  width: 54px; height: 54px; border-radius: 50%; background: #fff; border: 7px solid #c8102e;
  display: grid; place-items: center; color: #111; font-weight: 800; font-size: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
#limitSign.pop { animation: pop 0.5s ease; }
@keyframes pop { 40% { transform: scale(1.3); } }
.iconBtn { width: 44px; height: 44px; border-radius: 12px; border: 0; background: var(--panel); display: grid; place-items: center; }
.iconBtn svg { width: 22px; height: 22px; fill: #fff; }

#banner {
  position: absolute; top: max(74px, calc(env(safe-area-inset-top) + 66px)); left: 50%; transform: translate(-50%, -12px);
  padding: 9px 18px; border-radius: 10px; font-weight: 800; font-size: 17px; opacity: 0; transition: opacity 0.25s, transform 0.25s;
  pointer-events: none; white-space: nowrap; max-width: 92vw; overflow: hidden; text-overflow: ellipsis;
}
#banner.show { opacity: 1; transform: translate(-50%, 0); }
#banner.warn { background: var(--gold); color: #111; }
#banner.bad { background: var(--bad); color: #fff; animation: blink 0.8s infinite; }
#banner.info { background: rgba(20, 90, 160, 0.9); color: #fff; }
@keyframes blink { 50% { filter: brightness(1.3); } }

#toasts { position: absolute; top: max(122px, calc(env(safe-area-inset-top) + 114px)); left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; }
.toast { padding: 7px 14px; border-radius: 9px; font-weight: 700; font-size: 14px; background: var(--panel); transition: opacity 0.4s, transform 0.4s; animation: tin 0.3s ease; white-space: nowrap; }
.toast.bad { border-left: 5px solid var(--bad); }
.toast.good { border-left: 5px solid var(--ok); }
.toast.warn { border-left: 5px solid var(--gold); }
.toast.info { border-left: 5px solid #4aa3ff; }
.toast.out { opacity: 0; transform: translateY(-8px); }
@keyframes tin { from { opacity: 0; transform: translateY(8px); } }

#dash {
  position: absolute; bottom: max(12px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%);
  background: var(--panel); border-radius: 14px; padding: 6px 16px 8px; text-align: center; min-width: 150px; pointer-events: none;
}
#speedRow { display: flex; align-items: baseline; justify-content: center; gap: 4px; }
#speed { font-size: 46px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
#unit { font-size: 13px; opacity: 0.8; }
#dash.over #speed { color: var(--bad); }
#rpmBar { height: 4px; background: rgba(255,255,255,0.15); border-radius: 2px; margin: 4px 0; overflow: hidden; }
#rpmFill { height: 100%; width: 0; background: var(--gold); }
#dashRow { display: flex; justify-content: space-between; gap: 14px; font-size: 12px; opacity: 0.9; }
#damage.meh { color: var(--meh); } #damage.bad { color: var(--bad); }

#wheel {
  position: absolute; left: max(18px, env(safe-area-inset-left)); bottom: max(14px, env(safe-area-inset-bottom));
  width: min(40vmin, 210px); height: min(40vmin, 210px); touch-action: none;
}
#wheelImg { width: 100%; height: 100%; filter: drop-shadow(0 4px 10px rgba(0,0,0,0.5)); }
#tiltHint { display: none; position: absolute; inset: auto 0 -2px; text-align: center; font-size: 12px; opacity: 0.85; }
body.tilt #wheel { pointer-events: none; opacity: 0.55; width: min(26vmin, 130px); height: min(26vmin, 130px); }
body.tilt #tiltHint { display: block; }
#calBtn { display: none; position: absolute; left: max(18px, env(safe-area-inset-left)); bottom: calc(min(26vmin, 130px) + 26px); }
body.tilt #calBtn { display: block; }

#pedals { position: absolute; right: max(18px, env(safe-area-inset-right)); bottom: max(14px, env(safe-area-inset-bottom)); display: flex; align-items: flex-end; gap: 14px; }
.pedal {
  border-radius: 14px; display: grid; place-items: end center; padding-bottom: 10px; font-weight: 800; font-size: 12px; letter-spacing: 0.1em;
  background: repeating-linear-gradient(0deg, #2b2b2b 0 6px, #3a3a3a 6px 12px); border: 2px solid #555; touch-action: none;
  box-shadow: 0 6px 14px rgba(0,0,0,0.5); transition: transform 0.06s;
}
#brake { width: min(22vmin, 120px); height: min(26vmin, 140px); }
#gas { width: min(14vmin, 80px); height: min(40vmin, 210px); }
.pedal.down { transform: scale(0.94) translateY(3px); border-color: var(--gold); }
#gas.down { box-shadow: 0 0 0 3px rgba(61,220,132,0.5); }
#brake.down { box-shadow: 0 0 0 3px rgba(255,77,77,0.5); }
#hornBtn { position: absolute; right: calc(min(14vmin, 80px) + 14px); bottom: calc(min(26vmin, 140px) + 12px); }
#hornBtn.down { background: var(--gold); color: #111; }
#gearBtn { position: absolute; right: calc(min(14vmin, 80px) + 14px + 78px); bottom: calc(min(26vmin, 140px) + 12px); min-width: 46px; font-size: 15px; }
#gearBtn.rev { background: var(--bad); color: #fff; }
.smallBtn { border: 0; border-radius: 10px; background: var(--panel); padding: 9px 14px; font-weight: 800; font-size: 12px; letter-spacing: 0.08em; }
body:not(.touch) #wheel, body:not(.touch) #pedals { display: none; }
body:not(.touch) .touchOnly { display: none; }
body.touch .deskOnly { display: none; }

#flash { position: fixed; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
#flash.on { animation: flash 0.6s ease-out; }
@keyframes flash { 0% { opacity: 0.9; } 100% { opacity: 0; } }

/* ---------- Screens ---------- */
.screen { position: fixed; inset: 0; display: grid; place-items: center; padding: 16px; background: rgba(6, 12, 8, 0.55); overflow-y: auto; touch-action: pan-y; }
.card {
  background: rgba(14, 22, 17, 0.92); border: 1px solid rgba(252, 209, 22, 0.25); border-radius: 18px; padding: 22px 24px; width: min(560px, 100%);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5); text-align: center; max-height: calc(100vh - 32px); overflow-y: auto;
}
.card.small { width: min(340px, 100%); }
.card.wide { width: min(640px, 100%); }
h1 { margin: 0; font-size: 40px; letter-spacing: -0.02em; }
h1 span { color: var(--gold); }
h2 { margin: 0 0 12px; }
h3 { margin: 16px 0 8px; font-size: 15px; text-align: left; opacity: 0.85; }
.tag { margin: 2px 0 14px; opacity: 0.85; }
.rules { text-align: left; padding-left: 20px; margin: 0 0 14px; line-height: 1.45; font-size: 15px; }
.rules li { margin-bottom: 4px; }
.steerPick { display: flex; gap: 14px; justify-content: center; align-items: center; margin-bottom: 14px; font-size: 15px; }
.steerPick label { display: flex; gap: 6px; align-items: center; background: rgba(255,255,255,0.06); padding: 6px 10px; border-radius: 8px; }
.bigBtn { border: 0; border-radius: 12px; background: var(--gold); color: #111; font-weight: 800; font-size: 18px; padding: 13px 28px; display: block; width: 100%; margin: 6px 0; }
.btn { border: 1px solid rgba(255,255,255,0.2); border-radius: 12px; background: rgba(255,255,255,0.06); font-weight: 700; padding: 11px 20px; display: block; width: 100%; margin: 6px 0; }
.keys { font-size: 12px; opacity: 0.7; margin: 10px 0 0; }
.row { display: flex; gap: 10px; margin-top: 12px; }
.row > * { flex: 1; }

.routes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; }
.routeBtn { border: 2px solid transparent; border-radius: 14px; background: rgba(255,255,255,0.07); color: var(--text); padding: 12px 14px; text-align: left; display: flex; flex-direction: column; gap: 4px; opacity: 0.75; transition: opacity 0.15s, background 0.15s; }
.routeBtn.sel { background: var(--gold); color: #111; opacity: 1; }
.routeBtn b { font-size: 18px; }
.routeBtn span { font-size: 12px; line-height: 1.35; opacity: 0.8; }
.routeBtn em { font-style: normal; font-size: 12px; font-weight: 700; color: #6a4a00; min-height: 1em; }
.routeBtn[data-route="motorway"].sel { background: #2fa36b; }
.routeBtn[data-route="rural"].sel { background: #c8673a; color: #fff; }
#objective { margin-top: 3px; font-size: 11px; font-weight: 700; color: #9fd3ff; }
#repFail { background: rgba(255,77,77,0.15); border: 1px solid var(--bad); color: #ffb3b3; border-radius: 10px; padding: 8px 12px; font-weight: 700; }
@media (max-width: 520px) { .routes { grid-template-columns: 1fr; } }
#repTop { display: flex; align-items: center; justify-content: center; gap: 22px; }
#repStars span { font-size: 34px; color: rgba(255,255,255,0.2); }
#repStars span.on { color: var(--gold); }
#repScore { font-size: 48px; font-weight: 800; color: var(--gold); line-height: 1; }
#repMsg { margin: 8px 0 12px; font-weight: 600; }
#repStats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
#repStats div { background: rgba(255,255,255,0.06); border-radius: 10px; padding: 8px 4px; }
#repStats b { display: block; font-size: 20px; }
#repStats span { font-size: 11px; opacity: 0.75; }
.lesson { text-align: left; background: rgba(255,255,255,0.05); border-left: 4px solid var(--bad); border-radius: 8px; padding: 8px 12px; margin-bottom: 8px; }
.lesson.perfect { border-left-color: var(--ok); }
.lh { display: flex; justify-content: space-between; gap: 10px; }
.lh span { color: var(--bad); font-weight: 700; white-space: nowrap; }
.lesson p { margin: 4px 0 0; font-size: 13px; opacity: 0.85; line-height: 1.4; }

@media (max-width: 800px) and (min-height: 431px) {
  #banner { top: max(112px, calc(env(safe-area-inset-top) + 104px)); }
  #toasts { top: max(160px, calc(env(safe-area-inset-top) + 152px)); }
}
#rotate { display: none; z-index: 20; }
@media (orientation: portrait) and (max-width: 820px) {
  body.touch:not(.rotateOk) #rotate { display: grid; }
}
#loading { z-index: 30; }

/* Small landscape phones */
@media (max-height: 430px) {
  #score { font-size: 26px; }
  #speed { font-size: 30px; }
  #dash { padding: 4px 12px 5px; min-width: 128px; bottom: max(6px, env(safe-area-inset-bottom)); }
  #banner { font-size: 14px; padding: 7px 14px; top: 64px; }
  #toasts { top: 104px; }
  .toast { font-size: 12px; }
  .card { padding: 14px 18px; }
  h1 { font-size: 30px; }
  .rules { font-size: 13px; }
  #limitSign { width: 46px; height: 46px; font-size: 17px; border-width: 6px; }
}

/* ---------- Menu: coins, levels, garage button ---------- */
.menuTop { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; text-align: left; }
.menuTop .tag { margin-bottom: 12px; }
.wallet { display: flex; align-items: center; gap: 7px; background: rgba(0,0,0,0.35); border: 1px solid rgba(252,209,22,0.35); border-radius: 999px; padding: 6px 12px; font-size: 16px; white-space: nowrap; }
.coin { display: inline-block; width: 16px; height: 16px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff3a6, #fcd116 45%, #b38b00); box-shadow: inset 0 0 0 2px rgba(0,0,0,0.15); vertical-align: -3px; }
.levelRow { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.levelRow .lbl { font-weight: 700; font-size: 13px; opacity: 0.8; }
#levels { display: grid; grid-template-columns: repeat(10, 1fr); gap: 5px; flex: 1; }
.lvl { border: 1px solid rgba(255,255,255,0.18); background: rgba(255,255,255,0.06); border-radius: 9px; padding: 5px 0 3px; display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.lvl b { font-size: 16px; }
.lvl i { font-style: normal; font-size: 9px; color: var(--gold); min-height: 10px; letter-spacing: -1px; }
.lvl.sel { background: var(--gold); color: #111; border-color: var(--gold); }
.lvl.sel i { color: #6a4a00; }
.lvl.locked { opacity: 0.35; }
#levelInfo { font-size: 13px; text-align: left; margin: 8px 0 0; opacity: 0.9; line-height: 1.4; min-height: 2.8em; }
#levelInfo .hint { opacity: 0.7; }
.startRow { margin-top: 8px; margin-bottom: 12px; }
.startRow .bigBtn { margin: 0; }
.garageBtn { margin: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 6px 12px; }
.garageBtn span { font-size: 11px; opacity: 0.7; letter-spacing: 0.08em; text-transform: uppercase; }
.garageBtn b { font-size: 15px; color: var(--gold); }
.rulesBox { text-align: left; background: rgba(255,255,255,0.04); border-radius: 10px; padding: 8px 12px; }
.rulesBox summary { cursor: pointer; font-weight: 700; font-size: 14px; }
.rulesBox .rules { margin: 8px 0 4px; }
#repReward { display: flex; justify-content: center; gap: 16px; align-items: center; margin: -4px 0 12px; font-weight: 800; color: var(--gold); font-size: 17px; }
#repReward b { color: var(--ok); }
@media (max-width: 520px) { #levels { grid-template-columns: repeat(5, 1fr); } .levelRow { align-items: flex-start; } }

/* ---------- Garage ---------- */
#garage { position: fixed; inset: 0; z-index: 5; touch-action: none; }
#gTop { position: absolute; top: max(12px, env(safe-area-inset-top)); left: max(16px, env(safe-area-inset-left)); right: max(16px, env(safe-area-inset-right)); display: flex; justify-content: space-between; align-items: center; pointer-events: none; }
#gTop > * { pointer-events: auto; }
#gTop .btn { width: auto; margin: 0; background: rgba(0,0,0,0.45); }
.gArrow { position: absolute; top: 42%; width: 52px; height: 52px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.25); background: rgba(0,0,0,0.45); font-size: 32px; line-height: 1; display: grid; place-items: center; padding-bottom: 4px; }
#gPrev { left: max(16px, env(safe-area-inset-left)); }
#gNext { right: calc(max(16px, env(safe-area-inset-right)) + 330px); }
#gPanel { position: absolute; right: max(16px, env(safe-area-inset-right)); top: 70px; bottom: 16px; width: 310px; overflow-y: auto; background: rgba(10, 13, 16, 0.82); border: 1px solid rgba(252,209,22,0.22); border-radius: 18px; padding: 18px 18px 14px; backdrop-filter: blur(6px); }
#gType { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); font-weight: 800; }
#gName { margin: 2px 0 6px; font-size: 26px; }
#gBlurb { margin: 0 0 12px; font-size: 14px; opacity: 0.85; line-height: 1.4; }
.stat { display: grid; grid-template-columns: 110px 1fr; align-items: center; gap: 8px; margin-bottom: 7px; font-size: 13px; }
.stat .bar { height: 7px; border-radius: 4px; background: rgba(255,255,255,0.1); overflow: hidden; }
.stat .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), #ffe680); border-radius: 4px; transition: width 0.3s; }
#gSpecs { font-size: 12px; opacity: 0.7; margin: 8px 0 12px; }
#gColors { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.swatch { width: 32px; height: 32px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.25); box-shadow: inset 0 -6px 10px rgba(0,0,0,0.35); }
.swatch.sel { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(252,209,22,0.35), inset 0 -6px 10px rgba(0,0,0,0.35); }
#gAction:disabled { background: rgba(255,255,255,0.12); color: rgba(255,255,255,0.7); }
#gDots { position: absolute; bottom: 22px; left: calc((100% - 330px) / 2); transform: translateX(-50%); display: flex; gap: 8px; }
#gDots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.3); }
#gDots i.on { background: var(--gold); width: 22px; border-radius: 4px; }
@media (max-width: 700px) and (min-height: 431px) {
  #gPanel { top: auto; left: 16px; right: 16px; width: auto; bottom: 16px; max-height: 46vh; }
  #gNext { right: 16px; }
  .gArrow { top: 30%; }
  #gDots { left: 50%; bottom: auto; top: 50%; }
}
@media (max-height: 430px) {
  #gPanel { top: 60px; bottom: 8px; width: 270px; padding: 12px 14px; }
  #gName { font-size: 20px; }
  #gBlurb { font-size: 12px; margin-bottom: 8px; }
  #gNext { right: calc(max(16px, env(safe-area-inset-right)) + 290px); }
  #gDots { left: calc((100% - 290px) / 2); bottom: 10px; }
  .menuTop .tag { margin-bottom: 6px; }
  #levelInfo { font-size: 12px; min-height: 0; }
}

/* ---------- Phase 3: modes, career, conditions, settings ---------- */
.menuIcons { display: flex; gap: 8px; align-items: center; }
.menuIcons .iconBtn svg { width: 22px; height: 22px; fill: #fff; }
.modeTabs { display: flex; gap: 6px; margin: 2px 0 10px; background: rgba(255,255,255,0.05); padding: 4px; border-radius: 12px; }
.modeTab { flex: 1; border: 0; border-radius: 9px; background: transparent; padding: 8px 6px; font-weight: 800; font-size: 14px; opacity: 0.7; }
.modeTab.sel { background: var(--gold); color: #111; opacity: 1; }
.routes.three { grid-template-columns: 1fr 1fr 1fr; }
.routes.three .routeBtn b { font-size: 16px; }
#careerList { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; max-height: 210px; overflow-y: auto; padding-right: 2px; }
.stage { grid-column: 1 / -1; text-align: left; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); font-weight: 800; margin-top: 6px; }
.mission { border: 1px solid rgba(255,255,255,0.16); background: rgba(255,255,255,0.06); border-radius: 10px; padding: 7px 10px; text-align: left; display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.mission b { font-size: 13px; }
.mission i { font-style: normal; color: var(--gold); font-size: 11px; white-space: nowrap; }
.mission.sel { background: var(--gold); color: #111; border-color: var(--gold); }
.mission.sel i { color: #6a4a00; }
.mission.locked { opacity: 0.35; }
.mission.done:not(.sel) { border-color: rgba(61,220,132,0.5); }
.info { font-size: 13px; text-align: left; margin: 8px 0 0; opacity: 0.92; line-height: 1.45; min-height: 2.8em; }
.hint { opacity: 0.7; }
.hint.small { font-size: 12px; margin: 2px 0 10px; text-align: left; }
.condRow { display: flex; align-items: center; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.condRow .lbl, .setRow .lbl { font-weight: 700; font-size: 13px; opacity: 0.8; }
.condRow .lbl { margin-right: 4px; }
.chip { border: 1px solid rgba(255,255,255,0.2); background: rgba(255,255,255,0.06); border-radius: 999px; padding: 6px 12px; font-weight: 700; font-size: 13px; }
.chip.sel { background: var(--gold); color: #111; border-color: var(--gold); }
#rainBtn { margin-left: auto; }
#rainBtn.sel { background: #5aa9e6; border-color: #5aa9e6; color: #06233a; }
.setRow { display: grid; grid-template-columns: 120px 1fr; align-items: center; gap: 12px; margin: 10px 0; text-align: left; }
.setRow input[type=range] { width: 100%; accent-color: var(--gold); }
.setRow select { background: #1b231e; color: var(--text); border: 1px solid rgba(255,255,255,0.2); border-radius: 8px; padding: 6px 8px; font: inherit; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.switch { display: flex; align-items: center; gap: 8px; }
#radioBtn.on { background: var(--gold); }
#radioBtn.on svg { fill: #111; }
#repReward em { font-style: normal; color: #ffb3b3; font-size: 14px; }
#startBtn:disabled { opacity: 0.4; }
@media (max-width: 620px) { .routes.three { grid-template-columns: 1fr; } .modeTab { font-size: 12px; } }
@media (max-height: 430px) { #careerList { max-height: 120px; } .modeTabs { margin-bottom: 6px; } }

/* ---------- Phase 4: account, premium, leaderboards ---------- */
.heBanner { width: 100%; margin: 0 0 10px; border: 0; border-radius: 12px; padding: 10px 14px; background: linear-gradient(90deg, #ffcc00, #fcd116); color: #111; font-weight: 800; font-size: 15px; text-align: left; }
.heBox { padding: 12px; border-radius: 12px; background: rgba(61,220,132,0.08); border: 1px solid rgba(61,220,132,0.35); margin-bottom: 12px; text-align: left; }
.heBox p { margin: 0 0 8px; }
.premiumBox .switch { margin-top: 8px; }
.accountChip { border: 1px solid rgba(255,255,255,0.2); background: rgba(0,0,0,0.35); border-radius: 999px; padding: 6px 12px; font-weight: 700; font-size: 14px; display: flex; gap: 6px; align-items: center; max-width: 170px; }
.accountChip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.accountChip i, .lockTag { font-style: normal; font-size: 10px; font-weight: 800; letter-spacing: 0.08em; background: var(--gold); color: #111; border-radius: 6px; padding: 2px 5px; }
.field { width: 100%; background: #1b231e; color: var(--text); border: 1px solid rgba(255,255,255,0.22); border-radius: 10px; padding: 10px 12px; font: inherit; font-size: 16px; }
.formMsg { min-height: 1.2em; margin: 8px 0 0; font-weight: 700; font-size: 14px; }
.formMsg.bad { color: #ff8a8a; } .formMsg.good { color: var(--ok); }
.premiumBox { margin: 14px 0 4px; padding: 12px; border-radius: 12px; background: rgba(252,209,22,0.08); border: 1px solid rgba(252,209,22,0.3); text-align: left; }
.premiumBox .bigBtn { margin-top: 8px; }
.premiumNote { font-size: 13px; text-align: left; margin: 8px 0 0; padding: 8px 10px; border-radius: 10px; background: rgba(252,209,22,0.1); border: 1px solid rgba(252,209,22,0.3); }
.friendList { text-align: left; font-size: 14px; margin-bottom: 6px; display: flex; flex-wrap: wrap; gap: 6px; }
.friendList span { background: rgba(255,255,255,0.07); padding: 4px 10px; border-radius: 999px; }
.planList, .payList { display: grid; gap: 8px; margin: 10px 0; }
.plan { border: 2px solid rgba(255,255,255,0.15); background: rgba(255,255,255,0.05); border-radius: 12px; padding: 10px 14px; display: flex; justify-content: space-between; align-items: center; font-weight: 700; }
.plan.sel { border-color: var(--gold); background: rgba(252,209,22,0.12); }
.plan b { font-size: 18px; color: var(--gold); }
.payBtn { border: 0; border-radius: 12px; padding: 12px; font-weight: 800; font-size: 15px; background: #fff; color: #111; }
.payBtn.momo { background: #ffcc00; } .payBtn.airtime { background: #e3e8ef; } .payBtn.test { background: var(--ok); }
.lbChips { margin: 8px 0; align-items: center; }
.lbChips .chip.sel { background: var(--gold); color: #111; }
.lbChips select { margin-left: auto; background: #1b231e; color: var(--text); border: 1px solid rgba(255,255,255,0.2); border-radius: 8px; padding: 5px 8px; font: inherit; font-size: 13px; }
.lbMe { font-weight: 800; color: var(--gold); margin: 6px 0; min-height: 1.3em; text-align: left; }
.lbList { max-height: 46vh; overflow-y: auto; text-align: left; }
.lbRow { display: grid; grid-template-columns: 48px 1fr auto 64px; gap: 8px; padding: 7px 8px; border-bottom: 1px solid rgba(255,255,255,0.06); font-size: 14px; align-items: center; }
.lbRow.me { background: rgba(252,209,22,0.14); border-radius: 8px; }
.lbRow .r { font-weight: 800; opacity: 0.85; }
.lbRow .reg { font-size: 11px; opacity: 0.6; }
.lbRow .sc { font-weight: 800; text-align: right; color: var(--gold); }
.lbEmpty { padding: 16px; opacity: 0.7; text-align: center; }
.repOnline { font-size: 14px; font-weight: 700; margin: 0 0 10px; color: #9fd3ff; }
.mission .lockTag { margin-left: auto; }
@media (max-width: 520px) { .lbRow { grid-template-columns: 40px 1fr 56px; } .lbRow .reg { display: none; } }
