/* Conquistas e recordes por cidade: abas, seletor de cidade, medalhas em disco, ranking, banner de conquista e chip de recorde no HUD. */
.ach-ui{--ach-bronze:#b07a45;--ach-silver:#c9d1d6;--ach-gold:#f2c14e;--ach-line:#18394b}
.ach-medal{display:inline-block;flex:none;width:18px;height:18px;border-radius:50%;box-sizing:border-box;border:2px solid #18394b;background:#ffffff14;box-shadow:inset 0 0 0 1px #ffffff26;vertical-align:-3px}
.ach-medal.m1{background:radial-gradient(circle at 35% 30%,#e3b487,#b07a45 60%,#7d522b)}
.ach-medal.m2{background:radial-gradient(circle at 35% 30%,#fff,#c9d1d6 60%,#8b979f)}
.ach-medal.m3{background:radial-gradient(circle at 35% 30%,#fff3bf,#f2c14e 58%,#b98a1c)}
.ach-medal.m0{background:#0d1a2466;border-style:dashed;border-color:#6b8d99}
.ach-medal.big{width:44px;height:44px;border-width:3px}
.ach-ui .ach-sum{margin:.2em 0 .5em;font-size:13px;opacity:.9}
.ach-tabs,.ach-cities{display:flex;flex-wrap:wrap;gap:7px;margin:8px 0 12px}
.ach-tabs .btn,.ach-cities .btn{flex:1 1 0;min-width:0;width:auto;margin:0;min-height:44px;padding:9px 10px;font-size:12px;letter-spacing:.04em}
.ach-cities .btn{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;line-height:1.15}
.ach-cities .btn small{font-size:10px;font-weight:600;letter-spacing:0;opacity:.8;text-transform:none}
.ach-ui .ach-note,.ach-ui .ach-how,.ach-ui .ach-out{font-size:12px;opacity:.78}
.ach-ui .ach-city-sum{margin:.2em 0 .6em;font-size:13px}
.ach-ui .ach-away{margin:.2em 0 .7em;padding:6px 10px;border-left:3px solid var(--ach-gold);background:#f2c14e14;font-size:12px}
.ach-card,.ach-rec{position:relative}
.ach-card h3,.ach-rec h3{display:flex;align-items:center;gap:8px;min-width:0}
.ach-card .ach-name,.ach-rec .ach-name{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ach-card .ach-dots{flex:none;font-size:12px;letter-spacing:1px;color:var(--ach-gold)}
.ach-card.done{border-color:#b98a1c}
.ach-card.fresh{border-color:var(--ach-gold);box-shadow:0 0 0 1px #f2c14e66}
.ach-new{position:absolute;top:-8px;right:10px;padding:2px 7px;border-radius:8px;background:var(--ach-gold);color:#14212b;font:800 10px/1.3 system-ui;letter-spacing:.08em;font-style:normal}
.ach-ui .ach-next{color:#f0d18b}
.ach-rec .btn{width:100%;margin:6px 0 0;min-height:44px}
.ach-rec.empty{border-style:dashed}
.ach-rec.sel{border-color:var(--ach-gold)}
.ach-pager span{font-size:12px;opacity:.75}
.ach-pager .btn{min-height:44px;margin:0}
.ach-ui .btn.ach-back{min-height:44px}
.ach-rank-wrap{max-width:100%;overflow-x:auto}
.ach-rank{width:100%;border-collapse:collapse;font-size:13px;table-layout:fixed}
.ach-rank th{font-size:10px;letter-spacing:.08em;text-transform:uppercase;opacity:.65;text-align:left;padding:4px 6px;border-bottom:1px solid #527482}
.ach-rank td{padding:6px;border-bottom:1px solid #52748255;vertical-align:middle}
.ach-rank th:nth-child(1),.ach-rank td.p{width:38px}
.ach-rank th:nth-child(2),.ach-rank td.m{width:26px}
.ach-rank th:nth-child(4),.ach-rank td.v{width:34%;text-align:right;font-variant-numeric:tabular-nums}
.ach-rank td.n{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ach-rank tr.you td{background:#f4ecd6;color:#14212b;font-weight:800}
.ach-rank tr.you td:first-child{border-radius:6px 0 0 6px}.ach-rank tr.you td:last-child{border-radius:0 6px 6px 0}
.ach-ui .sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
.ach-split{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:14px;align-items:start}
.ach-split .ach-recs{grid-template-columns:1fr}
.ach-side{border:1px solid #527482;border-radius:12px;padding:12px;background:#152f3b}
.ach-side-title{margin:0 0 6px;font-size:15px}
#menuBox:has(.ach-ui.wide){max-width:1000px}
.ach-titles h3{margin:.2em 0 .3em}
.ach-titles .btn{min-height:44px}
.ach-ui.phone .ach-tabs .btn{font-size:11px;padding:8px 4px}
.ach-ui.phone .hub-cards{grid-template-columns:1fr}
/* Banner de conquista, medalha e recorde: abaixo da fila de avisos, sem receber toque. */
.ach-banner{position:fixed;left:50%;top:calc(132px + env(safe-area-inset-top));z-index:44;display:flex;align-items:center;gap:12px;box-sizing:border-box;min-width:240px;max-width:min(460px,86vw);padding:9px 16px 9px 10px;border-radius:12px;border:2px solid #e3d5ac80;border-top:3px solid #f2c14e;background:#192e3af4;box-shadow:0 4px 0 #18394b55,0 8px 22px #0006;color:#f3eedc;pointer-events:none;opacity:0;transform:translate(-50%,-14px);transition:opacity .2s ease,transform .2s ease}
.ach-banner[hidden]{display:none}
.ach-banner.on{opacity:1;transform:translate(-50%,0)}
.ach-banner.out{opacity:0;transform:translate(-50%,0);transition:opacity .25s ease}
.ach-banner>div{display:flex;flex-direction:column;gap:1px;min-width:0}
.ach-banner .ach-eb{font:800 10px/1.25 system-ui;letter-spacing:.12em;color:#f2c14e;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ach-banner .ach-bname{font:800 16px/1.25 system-ui;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ach-banner .ach-detail{font:500 12px/1.3 system-ui;color:#bcd8d4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ach-banner.t1{border-top-color:#b07a45}.ach-banner.t1 .ach-eb{color:#e3b487}
.ach-banner.t2{border-top-color:#c9d1d6}.ach-banner.t2 .ach-eb{color:#dfe5e8}
.ach-banner.recorde{border-top-color:#7fd1b7}.ach-banner.recorde .ach-eb{color:#7fd1b7}
.ach-banner .ach-medal.big{border-color:#0d1a24}
/* Chip de recorde ao vivo: abaixo das estrelas, dourado ao passar do recorde. */
.record-chip{position:fixed;left:50%;top:calc(142px + env(safe-area-inset-top));transform:translateX(-50%);z-index:29;max-width:min(360px,calc(100vw - 32px));overflow:hidden;text-overflow:ellipsis;white-space:nowrap;box-sizing:border-box;padding:6px 12px;border-radius:14px;border:2px solid #7fd1b7;background:#1d2a30e6;color:#f4ecd6;font:800 12px/1 system-ui,sans-serif;letter-spacing:.04em;pointer-events:none}
.record-chip.gold{border-color:#f2c14e;background:#5a4512ee;color:#fff3bf}
.record-chip[hidden]{display:none}
.ui-open .record-chip,.map-mode .record-chip,.ui-open .ach-banner,.map-mode .ach-banner{display:none}
@media(min-width:760px) and (max-height:550px){.ach-ui:not(.phone) .ach-cards{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(min-width:1000px){.ach-ui:not(.phone):not(.wide) .ach-cards{grid-template-columns:repeat(3,minmax(0,1fr))}.ach-ui.wide .ach-cards:not(.ach-recs){grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:520px){.ach-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.ach-rank{font-size:12px}.ach-rank td{padding:6px 4px}.ach-rank th:nth-child(1),.ach-rank td.p{width:30px}.ach-rank th:nth-child(4),.ach-rank td.v{width:30%}}
@media(orientation:landscape) and (max-height:500px){.ach-banner{top:calc(58px + env(safe-area-inset-top));padding:6px 12px 6px 8px;gap:9px;min-width:200px}.ach-banner .ach-medal.big{width:34px;height:34px}.ach-banner .ach-bname{font-size:14px}.ach-banner .ach-detail{font-size:11px}.record-chip{font-size:11px;padding:5px 10px}.ach-ui:not(.phone) h2{font-size:19px;margin:2px 0 4px}.ach-ui .eyebrow{margin-bottom:2px}.ach-tabs,.ach-cities{margin:5px 0 8px}.ach-cities .btn{flex-direction:row;gap:6px}.ach-cities .btn small::before{content:"· "}.ach-ui .ach-sum{margin:0 0 .2em}}
@media(orientation:portrait) and (max-width:520px){.ach-banner{top:41vh}.record-chip{left:auto;right:calc(12px + env(safe-area-inset-right));top:calc(124px + env(safe-area-inset-top));transform:none;max-width:46vw;white-space:normal;line-height:1.2;text-align:center}}
/* 3.42: com oito cidades a fileira única deixava botões de 34 px; quatro por linha. */
.ach-cities .btn{flex:1 1 23%;min-width:76px}
