/* v1.5.0 – /me: account, team, stats, map */
.me [hidden], .me-foot [hidden] { display: none !important; }
.me .card { margin-bottom: 14px; padding: 20px 18px; }
.pill-link { text-decoration: none; }
.small-gap { margin: 6px 0 14px; font-size: 14px; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.hint { display: block; color: var(--muted); font-size: 12px; margin-top: 6px; }
.tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.tabs button { flex: 1; padding: 10px; border-radius: 12px; border: 1px solid var(--line); background: transparent; color: var(--muted); font: inherit; font-weight: 800; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.ghost-btn { background: transparent !important; color: var(--text) !important; border: 1px solid var(--line) !important; margin-top: 10px; }
.secondary-btn { background: transparent !important; color: var(--accent) !important; border: 2px solid var(--accent) !important; }
.linkbtn { border: 0; background: none; color: var(--accent); font: inherit; font-weight: 800; cursor: pointer; padding: 6px 0; }
.center-block { display: block; margin: 8px auto 0; }
.small { font-size: 13px; }
.small.ok { color: var(--accent); font-weight: 700; }
.small.err { color: var(--danger); font-weight: 700; }
.inline-form { display: flex; gap: 8px; }
.inline-form input { flex: 1; min-width: 0; text-transform: uppercase; }
.small-btn { width: auto !important; margin: 0 !important; padding: 10px 16px !important; }
.my-requests { display: grid; gap: 10px; margin-top: 12px; }
.req { border: 1px solid var(--line); border-radius: 16px; padding: 12px; }
.req-head { display: flex; justify-content: space-between; gap: 8px; align-items: center; font-weight: 800; }
.status { font-size: 12px; padding: 3px 9px; border-radius: 99px; border: 1px solid var(--line); }
.status.pending { color: #ffd666; border-color: #ffd66688; }
.status.accepted { color: var(--accent); border-color: var(--accent); }
.status.rejected { color: var(--danger); border-color: var(--danger); }
.tally { display: grid; gap: 6px; margin-top: 10px; }
.tally-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; font-size: 14px; }
.tally-row .bar { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.tally-row .bar i { display: block; height: 100%; background: var(--accent); }
.heading { margin-top: 10px; font-size: 18px; font-weight: 900; }
.level-row { display: flex; gap: 14px; align-items: center; }
.level-badge { width: 64px; height: 64px; border-radius: 18px; background: linear-gradient(135deg, var(--accent), #6ef0c1); color: var(--bg); display: grid; place-items: center; text-align: center; line-height: 1; flex: none; }
.level-badge small { font-size: 9px; font-weight: 900; letter-spacing: 1px; }
.level-badge b { font-size: 28px; font-weight: 900; }
.xp { flex: 1; min-width: 0; }
.xp-top { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.xp-bar { height: 12px; border-radius: 6px; background: var(--line); overflow: hidden; }
.xp-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), #6ef0c1); transition: width .6s; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 16px 0 6px; text-align: center; }
.kpis b { display: block; font-size: 22px; font-weight: 900; }
.kpis span { color: var(--muted); font-size: 11px; }
.summary { display: grid; gap: 6px; margin: 10px 0; font-size: 14px; }
.summary div { background: rgba(255, 255, 255, .04); border-radius: 12px; padding: 8px 10px; }
.sec { margin: 14px 0 8px; font-size: 15px; font-weight: 900; }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.badge-tile { border: 1px solid var(--line); border-radius: 14px; padding: 10px 6px; text-align: center; font-size: 12px; }
.badge-tile .ic { font-size: 26px; display: block; filter: grayscale(1); opacity: .45; }
.badge-tile.earned { border-color: var(--accent); background: rgba(200, 255, 61, .08); }
.badge-tile.earned .ic { filter: none; opacity: 1; }
.badge-tile b { display: block; margin: 4px 0 2px; font-size: 12px; }
.badge-tile .prog { height: 4px; border-radius: 2px; background: var(--line); margin-top: 6px; overflow: hidden; }
.badge-tile .prog i { display: block; height: 100%; background: var(--accent); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.chips button { border: 1px solid var(--line); background: transparent; color: var(--text); border-radius: 99px; padding: 6px 12px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.chips button[aria-pressed="true"] { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.chips button:disabled { opacity: .4; cursor: not-allowed; }
.map { height: 340px; border-radius: 16px; overflow: hidden; background: #1b1b24; }
.map .leaflet-control-attribution { font-size: 9px; }
.crown-icon { font-size: 22px; line-height: 1; text-shadow: 0 1px 3px #000; }
.hist-list { display: grid; gap: 8px; }
.hist { border-bottom: 1px solid var(--line); padding: 6px 0 8px; font-size: 14px; }
.hist-head { display: flex; justify-content: space-between; gap: 8px; }
.hist .muted { font-size: 12px; }
.won { color: var(--accent); font-weight: 800; }
.more-btn { margin-top: 8px; }
.me-foot { text-align: center; color: var(--muted); font-size: 13px; margin: 8px 0 24px; }
.me-foot a { color: var(--accent); }
@media (max-width: 380px) { .kpis b { font-size: 18px; } }

/* v1.6.0 avatar + crop */
.avatar-row { display: flex; align-items: center; gap: 14px; margin: 12px 0 6px; flex-wrap: wrap; }
.avatar-slot .avatar { box-shadow: 0 0 0 3px var(--accent); }
.avatar-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.file-btn { display: inline-flex !important; align-items: center; min-height: 44px; cursor: pointer; font-size: 14px; }
.crop-box { max-width: 340px; text-align: center; }
.crop-canvas { width: 256px; height: 256px; max-width: 100%; border-radius: 50%; touch-action: none; cursor: grab; background: #222; margin: 8px auto; display: block; }
.return-note { background: rgba(200, 255, 61, .12); border: 1px solid var(--accent); border-radius: 12px; padding: 10px 12px; margin: 0 0 12px; font-weight: 700; }
#crop[hidden] { display: none; }

/* Responsive (v1.6.0): two columns on tablet landscape / desktop; the map fills the space. */
.map { height: clamp(320px, 55vh, 760px); }
@media (min-width: 960px) {
  main.me { max-width: 1240px; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 0 18px; align-items: start; }
  main.me > #loading, main.me > #anon-teaser { grid-column: 1 / -1; }
  main.me > #acct-anon, main.me > #acct-user, main.me > #join, main.me > #history, main.me > #reviews-card { grid-column: 1; }
  main.me > #stats, main.me > #map-card { grid-column: 2; }
  main.me > #map-card { grid-row: span 3; }
  .map { height: clamp(420px, 62vh, 820px); }
}
.chips button { min-height: 44px; padding: 0 14px; }
.pill-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; }
@media (min-width: 960px) { main.me { grid-auto-flow: row dense; } }

/* v1.7.0 sharing + scoreboard + Google button */
.gsi-btn { all: unset; box-sizing: border-box; display: flex; justify-content: center; align-items: center; width: 100%; min-height: 44px; cursor: pointer; border-radius: 22px; margin-top: 12px; }
.gsi-btn img { display: block; width: 180px; height: 40px; }
.gsi-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.share-row { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 800; cursor: pointer; }
.share-row input { width: 22px; height: 22px; accent-color: var(--accent); }
.board { display: grid; gap: 14px; }
.board h4 { margin: 0 0 6px; font-size: 14px; }
.board ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.board li { display: flex; align-items: center; gap: 8px; font-size: 14px; min-width: 0; }
.board li .who { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board li .n { font-weight: 900; color: var(--accent); }
.approval-note { margin: 10px 0 0; padding: 10px 12px; border-radius: 12px; border: 1px solid #ffc857; color: #ffc857; background: rgba(255,200,87,.1); font-size: 14px; font-weight: 700; }
.approval-note[hidden] { display: none; }
@media (min-width: 960px) { main.me > #share-card { grid-column: 1; } main.me > #board-card { grid-column: 2; } }
