:root {
  color-scheme: dark;
  --ink: #080711;
  --graphite: #151025;
  --panel: #151025;
  --panel-raised: #241052;
  --line: #49336A;
  --muted: #B8ADC9;
  --text: #F5F1FF;
  --orange: #FF19C8;
  --yellow: #FFD15C;
  --green: #00DFFF;
  --turquoise: #00DFFF;
  --blue: #176BFF;
  --purple: #8B2CFF;
  --magenta: #FF19C8;
  --rose: #FF4F91;
  --tropical-orange: #FF762E;
  --glass: #151025E8;
  --neon-line: #8B2CFF;
  --font-display: 'Teko', Impact, sans-serif;
  --font-ui: 'Barlow Semi Condensed', 'Arial Narrow', sans-serif;
  --font-data: 'IBM Plex Mono', Consolas, monospace;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;
  --weight-heavy: 800;
  --size-display: clamp(2.99rem, 4.83vw, 4.025rem);
  --size-h1: clamp(2.3rem, 3.45vw, 2.875rem);
  --size-h2: clamp(1.725rem, 2.53vw, 2.156rem);
  --size-h3: clamp(1.438rem, 1.84vw, 1.725rem);
  --size-body: 1.15rem;
  --size-secondary: 1.006rem;
  --size-label: .863rem;
  --line-tight: .9;
  --line-body: 1.45;
  --track-display: .015em;
  --track-ui: .075em;
  --track-label: .11em;
  --text-transform-label: uppercase;
}
* { box-sizing: border-box; }
html { min-width: 320px; background: var(--ink); }
body { margin: 0; color: var(--text); background: var(--ink); font-family: var(--font-ui); font-size: var(--size-body); line-height: var(--line-body); overflow-x: hidden; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
.topbar { height: 66px; display: flex; align-items: center; gap: 1.5rem; padding: 0 24px; background: #0B0D12; border-bottom: 1px solid #27303A; position: relative; z-index: 800; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-width: 205px; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; background: var(--orange); color: var(--ink); font: 700 24.15px/1 var(--font-display); letter-spacing: -.04em; clip-path: polygon(0 0,100% 0,100% 72%,72% 100%,0 100%); }
.brand-copy { display: grid; line-height: .9; letter-spacing: .11em; }
.brand-copy strong { font: 700 19.55px/1 var(--font-ui); }
.brand-copy small { margin-top: 5px; color: #AAB4C1; font: 600 11.5px/1 var(--font-ui); letter-spacing: .2em; }
.brand-copy i { color: var(--yellow); font-style: normal; }
.topbar-center { display: flex; align-items: center; gap: 9px; color: #C6CDD7; font-size: 12.65px; font-weight: 700; letter-spacing: .13em; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; background: var(--green); box-shadow: 0 0 12px #22d3ee77; }
.slash { color: var(--orange); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.nav-link { border: 0; padding: 0; background: transparent; cursor: pointer; min-height: 44px; display: inline-flex; align-items: center; gap: 7px; color: #CDD3DB; font-size: 13.8px; font-weight: 700; letter-spacing: .09em; }
.nav-link:hover { color: #fff; }
.nav-link span { color: var(--orange); }
.nav-player { padding: 0 12px; border-left: 1px solid var(--line); }
.nav-player b { font-size: 19.55px; }
.icon-link { height: 40px; width: 40px; border: 1px solid var(--line); display: grid; place-items: center; color: var(--muted); font-size: 21.85px; }
.icon-link:hover { color: var(--yellow); border-color: var(--yellow); }
.mobile-only { display: none !important; }
.button { display: inline-flex; min-height: 48px; padding: 0 18px; align-items: center; justify-content: center; gap: 12px; border: 1px solid transparent; cursor: pointer; font-size: 14.95px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; transition: transform .12s ease, background .12s ease, border-color .12s ease; }
.button:active { transform: translateY(1px); }
.button:disabled { cursor: not-allowed; opacity: .42; }
.button-small { min-height: 40px; padding: 0 13px; font-size: 12.65px; }
.button-outline { background: transparent; color: var(--text); border-color: #566170; }
.button-outline:hover { border-color: var(--turquoise); color: var(--turquoise); }
.button-action { background: var(--orange); color: #111319; clip-path: polygon(0 0,100% 0,100% 72%,92% 100%,0 100%); }
.button-action:hover:not(:disabled) { background: #FF58DF; }
.button-action b { font: 700 23px/1 var(--font-display); }
.button-full { width: 100%; justify-content: space-between; min-height: 54px; padding: 0 18px; }
.game-layout { display: grid; height: calc(100dvh - 66px); min-height: 520px; grid-template-columns: minmax(245px, 285px) minmax(400px, 1fr) minmax(280px, 326px); }
.side-panel { position: relative; z-index: 300; background: var(--panel); min-width: 0; }
.activity-panel { padding: 24px 19px 16px; border-right: 1px solid #2a3441; display: flex; flex-direction: column; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #674078 transparent; }
.panel-kicker { color: #AEB8C6; font-size: 11.5px; font-weight: 800; letter-spacing: .15em; }
.kicker-index { color: var(--orange); font-family: var(--font-data); margin-right: 6px; }
.city-title { margin: 22px 0 7px; display: flex; flex-direction: column; font: 700 var(--size-display)/.72 var(--font-display); letter-spacing: var(--track-display); }
.city-title span { color: var(--text); }
.city-title strong { color: var(--orange); }
.intro-copy { margin: 14px 0 21px; max-width: 225px; color: #A4AFBD; font-size: 16.1px; line-height: 1.4; }
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid #303946; border-left: 1px solid #303946; }
.stat-cell { min-height: 68px; padding: 10px; border-right: 1px solid #303946; border-bottom: 1px solid #303946; display: flex; flex-direction: column; gap: 3px; }
.stat-cell span { font-size: 10.35px; line-height: 1.1; font-weight: 700; color: #A7B1BE; letter-spacing: .11em; }
.stat-cell strong { font: 500 23px/1.1 var(--font-data); }
.stat-cell small { font: 500 11.5px var(--font-data); color: var(--muted); }
.green-text { color: var(--green); }
.orange-text { color: var(--orange); }
.panel-divider { margin: 19px 0 17px; height: 1px; background: #303946; }
.section-line { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: #E6E9ED; font-size: 11.5px; font-weight: 800; letter-spacing: .1em; }
.section-line a { color: var(--orange); white-space: nowrap; font-size: 10.35px; }
.activity-list { max-height: 210px; margin-top: 8px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #674078 transparent; }
.activity-item { min-height: 55px; display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 7px; border-bottom: 1px solid #27303A; }
.activity-icon { width: 7px; height: 7px; border-radius: 50%; background: var(--magenta); box-shadow: 0 0 9px color-mix(in srgb,var(--magenta) 65%,transparent); }
.activity-item div { min-width: 0; display: flex; flex-direction: column; }
.activity-item strong { font-size: 13.8px; line-height: 1.1; }
.activity-item small { color: #9EA8B6; font-size: 12.65px; }
.activity-item > b { color: #DCE1E8; font: 400 10.35px/1.2 var(--font-data); white-space: nowrap; }
.empty-activity { min-height: 110px; display: grid; place-items: center; align-content: center; color: var(--muted); text-align: center; }
.empty-activity p { margin: 6px 0; max-width: 180px; font-size: 14.95px; }
.empty-icon { color: #596779; font-size: 28.75px; }
.commune-guide { margin-top: 17px; padding: 10px; border: 1px solid #352541; background: linear-gradient(135deg, #15101C, #0D1017); }
.commune-guide-title { margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center; color: #E6D7F0; font: 800 10.35px var(--font-ui); letter-spacing: .12em; }
.commune-guide-title span { color: #9D8AAE; font: 500 9.2px var(--font-data); }
.commune-guide-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 8px; }
.commune-guide-grid .commune-legend-item { min-width: 0; display: flex; align-items: center; gap: 6px; color: #D5D0DA; font-size: 10.35px; font-weight: 700; letter-spacing: .05em; white-space: nowrap; }
.commune-guide-grid .commune-legend-item i { width: 10px; height: 10px; flex: 0 0 auto; display: inline-block; background: var(--commune-color); border: 1px solid #FFFFFF9C; box-shadow: 0 0 7px color-mix(in srgb, var(--commune-color) 70%, transparent); }
.commune-guide .legend-north { display: block; margin-top: 8px; color: #A99AB5; font: 500 8.05px/1.3 var(--font-data); }
.panel-bottom-note { margin-top: auto; padding-top: 14px; color: #748192; font: 400 9.2px/1.3 var(--font-data); letter-spacing: .06em; display: flex; align-items: center; gap: 7px; }
.panel-bottom-note .live-dot { width: 5px; height: 5px; }
.map-stage { min-width: 0; min-height: 0; position: relative; background: #070C12; overflow: hidden; }
.territory-map { width: 100%; height: 100%; z-index: 1; background: transparent; }
.territory-map-loading { position: absolute; z-index: 1000; top: 50%; left: 50%; max-width: calc(100% - 36px); transform: translate(-50%,-50%); padding: 10px 14px; border: 1px solid #8B2CFF99; border-radius: 8px; background: #100D1EED; color: #BFF8FF; box-shadow: 0 0 22px #8B2CFF30,0 6px 24px #000A; font: 700 11px/1.35 var(--font-data); letter-spacing: .04em; text-align: center; pointer-events: none; }
.territory-map-loading[hidden] { display: none; }
.territory-map-loading.is-error { border-color: #FF4F91; color: #FFB1CD; }
.reference-map-wrap { position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; overflow: auto; background: #FFF; }
.city-map-reference { display: block; width: 100%; height: 100%; object-fit: contain; }
.leaflet-container {
  font-family: var(--font-ui);
  background-color: #080711;
  background-image: linear-gradient(#BFA9FF0A 1px, transparent 1px),
    linear-gradient(90deg, #ffffff06 1px, transparent 1px);
  background-size: 44px 44px;
}
.leaflet-control-attribution { display: none; }
.fraction-tooltip { border: 1px solid var(--turquoise) !important; border-radius: 0 !important; background: #100E17F2 !important; color: #F4F7FA !important; box-shadow: 0 8px 26px #0009 !important; font: 700 11.5px/1.2 var(--font-ui) !important; letter-spacing: .04em; }
.leaflet-control-zoom { border: 1px solid #5c6670 !important; border-radius: 0 !important; }
.leaflet-control-zoom a { width: 40px !important; height: 40px !important; line-height: 40px !important; color: #fff !important; background: #10151c !important; border-bottom-color: #39434e !important; }
.map-toolbar { position: absolute; left: 16px; top: 16px; right: 16px; z-index: 400; display: flex; justify-content: space-between; align-items: start; pointer-events: none; }
.map-toolbar > div:first-child:not(.map-toolbar-tools) { padding: 10px 13px 8px; display: grid; background: #111720ee; border-left: 3px solid var(--orange); box-shadow: 0 5px 20px #0005; }
.map-label { color: #A5B0BC; font-size: 10.35px; font-weight: 800; letter-spacing: .15em; }
.map-toolbar strong { margin-top: 1px; font: 700 27.6px/.95 var(--font-display); letter-spacing: .04em; }
.map-toolbar strong b { margin-left: 6px; color: var(--yellow); font: 500 10.35px var(--font-data); vertical-align: middle; }
.map-toolbar-tools { display: flex; align-items: center; gap: 9px; pointer-events: auto; }
.map-share-button { min-height: 40px; padding: 0 11px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid #00DFFF88; border-radius: 7px; background: #100D1EEB; color: #F5F1FF; box-shadow: 0 4px 18px #05040C6B,0 0 12px #00DFFF20; font: 700 10px/1 var(--font-data); letter-spacing: .04em; cursor: pointer; transition: border-color .15s ease,box-shadow .15s ease,transform .15s ease; }
.map-share-button svg { width: 17px; height: 17px; flex: 0 0 auto; fill: none; stroke: #00DFFF; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.map-share-button:hover { border-color: #FF19C8; box-shadow: 0 0 18px #FF19C83B,0 0 12px #00DFFF25; transform: translateY(-1px); }
.map-counter, .demo-pill { padding: 8px 10px; background: #111720ee; color: #DAE1E9; font: 500 10.35px/1 var(--font-data); letter-spacing: .04em; }
.map-counter i { color: var(--orange); font-style: normal; }
.demo-pill { background: var(--yellow); color: #17150E; font: 800 10.35px/1 var(--font-ui); letter-spacing: .1em; }
.demo-warning { position: absolute; bottom: 35px; left: 50%; z-index: 400; width: max-content; max-width: calc(100% - 24px); transform: translateX(-50%); padding: 7px 10px; background: #111720e8; color: var(--yellow); font-size: 11.5px; font-weight: 700; line-height: 1.35; text-align: center; letter-spacing: .04em; pointer-events: none; }
.map-coordinates { position: absolute; right: 65px; bottom: 18px; z-index: 400; color: #d6dce2; font: 400 10.35px var(--font-data); text-shadow: 0 1px 5px #000; pointer-events: none; }
.map-coordinates span { color: var(--orange); }
.leaflet-div-icon { background: transparent; border: 0; }
.territory-panel { padding: 24px 21px 15px; border-left: 1px solid #2a3441; display: flex; flex-direction: column; }
.territory-status { display: flex; align-items: center; justify-content: space-between; margin-top: 30px; color: #8290A0; font: 500 10.35px var(--font-data); }
.status-chip { padding: 5px 8px; background: #12333D; color: var(--green); font: 800 10.35px var(--font-ui); letter-spacing: .1em; }
.status-chip.occupied { background: #341A3D; color: var(--orange); }
.territory-detail h1 { margin: 17px 0 5px; max-width: 100%; overflow-wrap: anywhere; font: 700 var(--size-h1)/.9 var(--font-display); letter-spacing: .015em; text-transform: uppercase; }
.territory-commune { color: var(--turquoise); font: 700 10.35px/1.3 var(--font-data); letter-spacing: .1em; }
.territory-owner { min-height: 22px; color: #ADB8C5; font-size: 14.95px; }
.territory-owner strong { color: var(--turquoise); }
.selection-summary { margin-top: 12px; padding: 10px 11px; border: 1px solid #435262; background: #101923; }
.selection-summary-head, .selection-summary-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.selection-summary-head div { display: flex; flex-direction: column; line-height: 1.2; }
.selection-summary-head span, .selection-summary-foot span { color: #9BA9B8; font: 700 9.2px var(--font-data); letter-spacing: .08em; }
.selection-summary-head strong { color: #F1F4F7; font: 700 13.8px var(--font-data); }
.selection-summary-head button, .selection-summary li button { border: 1px solid #455263; background: transparent; color: #CDD5DE; cursor: pointer; font: 700 9.2px var(--font-ui); letter-spacing: .06em; }
.selection-summary-head button { min-height: 28px; padding: 0 7px; }
.selection-summary ul { display: grid; gap: 4px; max-height: 93px; margin: 8px 0; padding: 0; overflow: auto; list-style: none; }
.selection-summary li { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #CAD2DC; font-size: 11.5px; line-height: 1.25; }
.selection-summary li span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.selection-summary li button { flex: 0 0 auto; width: 21px; height: 21px; padding: 0; font-size: 17.25px; }
.selection-summary li button:hover, .selection-summary-head button:hover { border-color: var(--turquoise); color: var(--turquoise); }
.selection-summary .selection-more { color: #8998A8; font: 500 9.2px var(--font-data); }
.selection-summary-foot { padding-top: 7px; border-top: 1px solid #2b3643; }
.selection-summary-foot b { color: var(--yellow); font: 500 13.8px var(--font-data); }
.selection-summary > small { display: block; margin-top: 3px; color: #8795A5; font-size: 10.35px; }
.price-block { margin-top: 21px; padding: 15px 14px 13px; background: var(--panel-raised); border-left: 3px solid var(--yellow); }
.price-block > span { display: block; color: #BAC3CE; font-size: 10.35px; font-weight: 800; letter-spacing: .12em; }
.price-block > strong { display: block; margin: 5px 0 2px; color: var(--yellow); font: 500 clamp(2.07rem, 3.1vw, 2.88rem)/1 var(--font-data); letter-spacing: -.06em; white-space: nowrap; }
.price-block > strong small { color: #D3D8DE; font: 500 11.5px var(--font-data); letter-spacing: 0; }
.price-block > small { color: #99A5B2; font-size: 12.65px; }
.territory-meta { min-height: 40px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border-bottom: 1px solid #2a3441; }
.territory-meta span { color: #8793A2; font-size: 10.35px; font-weight: 700; letter-spacing: .1em; }
.territory-meta b { color: #DCE1E6; font: 500 11.5px var(--font-data); text-align: right; }
.claim-form { margin-top: auto; padding-top: 18px; }
.fine-print { margin: 9px 0 0; color: #8E9BAA; font-size: 12.65px; line-height: 1.4; }
.setup-callout { margin-top: 12px; padding: 10px; display: flex; flex-direction: column; gap: 3px; background: #21152D; border: 1px solid #5F3B7B; color: #E9D9F7; font-size: 12.65px; line-height: 1.35; }
.setup-callout b { font-size: 13.8px; color: var(--yellow); }
.setup-callout code { color: #F1DDFF; font: 12.65px var(--font-data); }
.territory-empty { flex: 1; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
.target-mark { color: var(--orange); font-size: 46px; line-height: 1; }
.territory-empty h2 { margin: 18px 0 4px; font: 700 var(--size-h1)/.8 var(--font-display); }
.territory-empty h2 em { color: var(--orange); font-style: normal; }
.territory-empty p { max-width: 230px; color: #A2ADBA; font-size: 16.1px; }
.map-admin-link { margin-top: 7px; }
.empty-coordinates { color: #6F7C8B; font: 400 10.35px var(--font-data); letter-spacing: .05em; }
.territory-panel-footer { display: flex; justify-content: space-between; margin-top: 12px; color: #738090; font: 400 9.2px var(--font-data); letter-spacing: .08em; }
.territory-panel-footer span:last-child { color: var(--green); }
.player-dialog { width: min(560px, calc(100vw - 24px)); max-height: min(92dvh, 760px); padding: 25px; border: 1px solid #485463; background: #111720; color: var(--text); box-shadow: 0 20px 80px #000b; overflow-y: auto; }
.player-dialog::backdrop { background: #06090dcc; backdrop-filter: blur(4px); }
.dialog-close { position: absolute; top: 10px; right: 11px; }
.dialog-close button { width: 44px; height: 44px; border: 0; background: transparent; color: #AAB5C2; font-size: 32.2px; cursor: pointer; }
.dialog-kicker { color: var(--yellow); font-size: 11.5px; font-weight: 800; letter-spacing: .12em; }
.player-dialog h2 { margin: 10px 0 2px; font: 700 var(--size-h2)/.9 var(--font-display); }
.player-dialog h2 em { color: var(--orange); font-style: normal; }
.dialog-copy, .privacy-note { color: #A6B0BC; font-size: 14.95px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; margin-top: 18px; }
.form-grid label { display: flex; flex-direction: column; gap: 5px; color: #D7DDE4; font-size: 12.65px; font-weight: 700; letter-spacing: .06em; }
.form-grid input, .form-grid select { min-width: 0; width: 100%; min-height: 46px; padding: 0 11px; border: 1px solid #394554; border-radius: 0; outline: none; background: #0B0D12; color: #F4F5F7; font-size: 16.1px; letter-spacing: 0; }
.form-grid input:focus, .form-grid select:focus { border-color: var(--turquoise); box-shadow: 0 0 0 2px #36ddf522; }
.form-grid input::placeholder { color: #6E7A89; }
.form-wide { grid-column: 1 / -1; }
.field-help { color: #9B8DA7; font-size: 11.5px; font-weight: 500; letter-spacing: 0; line-height: 1.4; }
.badge-picker { min-width: 0; margin: 0; padding: 10px; border: 1px solid #3D2B49; background: #0C0B11; }
.badge-picker legend { padding: 0 5px; color: #D7B7F2; font: 800 10.35px var(--font-data); letter-spacing: .09em; }
.badge-picker > p { margin: 0 0 9px; color: #A89AB5; font-size: 12.65px; }
.badge-choice-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.badge-choice { position: relative; min-width: 0; min-height: 60px; padding: 5px 2px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 1px solid #282432; background: #111019; cursor: pointer; }
.badge-choice:hover { border-color: #A855F7; background: #1A1222; }
.badge-choice input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.badge-choice input:focus-visible + span { outline: 2px solid #22D3EE; outline-offset: 2px; }
.badge-choice:has(input:checked) { border-color: #F226D5; background: #261329; box-shadow: inset 0 0 12px #F226D522; }
.badge-choice > span { font-size: 25.3px; line-height: 1; }
.badge-choice .badge-choice-icon { width: 36px; height: 36px; display: grid; place-items: center; }
.badge-choice .badge-choice-icon img { width: 100%; height: 100%; object-fit: contain; }
.badge-choice > small { max-width: 100%; overflow: hidden; color: #9D93A8; font-size: 8.05px; line-height: 1.1; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.privacy-note { margin: 13px 0 0; font-size: 12.65px; }
.toast { position: fixed; z-index: 1200; right: 22px; top: 78px; max-width: min(440px, calc(100vw - 32px)); padding: 12px 16px; border: 1px solid #46505d; background: #111720; box-shadow: 0 12px 35px #0009; font-size: 16.1px; }
.toast-error { border-left: 4px solid var(--orange); }
.toast-success { border-left: 4px solid var(--green); }
.simple-page { max-width: 700px; margin: clamp(40px, 10vh, 100px) auto; padding: 30px; border: 1px solid var(--line); background: var(--panel); }
.simple-page h1 { font: 700 var(--size-display)/.9 var(--font-display); }
.simple-page p { color: var(--muted); }
[hidden] { display: none !important; }
@media (max-width: 1180px) {
  .game-layout { grid-template-columns: minmax(220px, 245px) minmax(360px, 1fr) minmax(260px, 290px); }
  .activity-panel { padding-inline: 15px; }
  .territory-panel { padding-inline: 17px; }
  .city-title { font-size: clamp(3.1rem, 4.6vw, 3.85rem); }
}
@media (max-width: 920px) {
  .topbar { padding-inline: 16px; }
  .topbar-center { display: none; }
  .game-layout { grid-template-columns: minmax(0, 1fr) 300px; grid-template-areas: "map detail"; }
  .activity-panel { display: none; }
  .mobile-only { display: inline-flex !important; }
  .map-stage { grid-area: map; }
  .territory-panel { grid-area: detail; }
  .territory-panel-footer { font-size: 8.05px; }
}
@media (max-width: 680px) {
  :root {
    --size-display: clamp(2.444rem, 11.5vw, 3.163rem);
    --size-h1: clamp(2.013rem, 9.2vw, 2.444rem);
    --size-h2: clamp(1.581rem, 6.9vw, 1.869rem);
    --size-h3: clamp(1.294rem, 5.75vw, 1.509rem);
  }
  .topbar { height: 59px; padding: 0 max(12px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left)); gap: 7px; }
  .brand { min-width: auto; gap: 8px; }
  .brand-mark { width: 32px; height: 32px; font-size: 20.7px; }
  .brand-copy strong { font-size: 16.1px; }
  .brand-copy small { font-size: 9.2px; }
  .topbar-actions { gap: 6px; }
  .topbar-actions .nav-link { min-height: 40px; font-size: 11.5px; }
  .topbar-actions .nav-player { max-width: 92px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; padding: 0 5px; }
  .topbar-actions .button-small { min-height: 38px; padding: 0 9px; font-size: 10.35px; }
  .icon-link { display: none; }
  .game-layout { display: block; min-height: 0; height: calc(100dvh - 59px); }
  .map-stage { position: absolute; inset: 59px 0 0; height: calc(100dvh - 59px); }
  .territory-map { height: 100%; }
  .reference-map-wrap { display: flex; justify-content: flex-start; }
  .city-map-reference { flex: 0 0 auto; width: auto; height: 100%; max-width: none; }
  .map-toolbar { left: 10px; right: 10px; top: 10px; }
  .map-toolbar > div:first-child:not(.map-toolbar-tools) { padding: 8px 10px 7px; }
  .map-toolbar strong { font-size: 23px; }
  .map-label { font-size: 9.2px; }
  .map-counter { display: none; }
  .map-share-button { width: 42px; height: 42px; padding: 0; border-radius: 9px; }
  .map-share-button > span { display: none; }
  .demo-pill { font-size: 9.2px; padding: 7px 8px; }
  .demo-warning { bottom: calc(88px + env(safe-area-inset-bottom)); max-width: calc(100vw - 24px); font-size: 10.35px; }
  .map-coordinates { right: 10px; bottom: calc(90px + env(safe-area-inset-bottom)); font-size: 9.2px; }
  .leaflet-control-zoom { display: none; }
  .territory-panel { position: fixed; z-index: 600; left: 0; right: 0; bottom: 0; max-height: min(63dvh, 540px); height: 58px; padding: 0 16px max(9px, env(safe-area-inset-bottom)); border: 0; border-top: 1px solid #3A4654; background: #111720f5; box-shadow: 0 -10px 40px #0007; overflow-y: auto; transition: height .2s ease, max-height .2s ease; }
  .territory-panel > .panel-kicker { min-height: 57px; display: flex; align-items: center; position: sticky; z-index: 2; top: 0; background: #111720; }
  .territory-panel:not(.is-selected) .territory-empty, .territory-panel:not(.is-selected) .territory-detail, .territory-panel:not(.is-selected) .territory-panel-footer { display: none !important; }
  .territory-panel.is-map-demo .territory-empty { display: flex !important; }
  .territory-panel.is-map-demo { height: auto; }
  .territory-panel:not(.is-selected)::after { content: "TOCA UN TERRITORIO  ↑"; position: fixed; right: 16px; bottom: calc(17px + env(safe-area-inset-bottom)); color: var(--yellow); font-size: 11.5px; font-weight: 800; letter-spacing: .08em; pointer-events: none; }
  .territory-panel.is-map-demo:not(.is-selected)::after { content: ""; }
  .territory-panel.is-selected { height: 68px; max-height: 68px; padding-bottom: 0; overflow: hidden; }
  .territory-panel.is-selected.is-expanded { height: min(55dvh,450px); max-height: min(55dvh,450px); padding-bottom: max(9px,env(safe-area-inset-bottom)); overflow-y: auto; }
  .territory-status { margin-top: 2px; }
  .territory-detail h1 { margin: 10px 0 4px; }
  .territory-commune { margin-bottom: 3px; }
  .territory-owner { min-height: 18px; }
  .price-block { margin-top: 12px; padding: 10px 12px; }
  .price-block > strong { font-size: 32.2px; }
  .territory-meta { min-height: 34px; }
  .claim-form { margin-top: 11px; padding-top: 0; }
  .button-full { min-height: 48px; }
  .fine-print { margin-top: 5px; }
  .territory-panel-footer { display: none; }
  .territory-empty { min-height: 140px; }
  .territory-empty h2 { margin-top: 9px; }
  .territory-empty p { margin: 5px 0 9px; }
  .player-dialog { padding: 22px 16px; max-height: calc(100dvh - 16px); }
  .form-grid { gap: 10px; }
  .form-grid label { font-size: 11.5px; }
  .form-grid input, .form-grid select { min-height: 44px; font-size: 14.95px; }
  .toast { top: 67px; right: 12px; }
}
@media (max-width: 380px) {
  .brand-copy small { letter-spacing: .12em; }
  .topbar-actions { gap: 3px; }
  .topbar-actions .nav-link:not(.nav-player) { font-size: 10.35px; }
  .topbar-actions .nav-link span { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .form-wide { grid-column: auto; }
}
@media (min-width: 681px) and (max-height: 700px) {
  .activity-panel, .territory-panel { padding-top: 16px; }
  .city-title { margin-top: 13px; }
  .panel-divider { margin-block: 12px; }
  .territory-status { margin-top: 18px; }
}


@font-face { font-family: 'Teko'; src: url('../fonts/Teko-600-latin.woff2') format('woff2'); font-style: normal; font-weight: 600; font-display: swap; }
@font-face { font-family: 'Teko'; src: url('../fonts/Teko-700-latin.woff2') format('woff2'); font-style: normal; font-weight: 700; font-display: swap; }
@font-face { font-family: 'Barlow Semi Condensed'; src: url('../fonts/Barlow-SemiCondensed-500-latin.woff2') format('woff2'); font-style: normal; font-weight: 500; font-display: swap; }
@font-face { font-family: 'Barlow Semi Condensed'; src: url('../fonts/Barlow-SemiCondensed-600-latin.woff2') format('woff2'); font-style: normal; font-weight: 600; font-display: swap; }
@font-face { font-family: 'Barlow Semi Condensed'; src: url('../fonts/Barlow-SemiCondensed-700-latin.woff2') format('woff2'); font-style: normal; font-weight: 700; font-display: swap; }
@font-face { font-family: 'Barlow Semi Condensed'; src: url('../fonts/Barlow-SemiCondensed-800-latin.woff2') format('woff2'); font-style: normal; font-weight: 800; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('../fonts/IBM-Plex-Mono-400-latin.woff2') format('woff2'); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('../fonts/IBM-Plex-Mono-500-latin.woff2') format('woff2'); font-style: normal; font-weight: 500; font-display: swap; }
.page-top { min-height: 66px; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid #27303A; background: #0B0D12; }
.page-top nav, .admin-top-actions { display: flex; align-items: center; gap: 18px; color: #C9D1D9; font-size: 12.65px; font-weight: 800; letter-spacing: .1em; }
.page-top nav a:hover, .page-top nav .active { color: var(--orange); }
.content-page { max-width: 1160px; margin: 0 auto; padding: clamp(25px, 6vw, 62px) 24px 56px; }
.page-eyebrow { display: flex; align-items: center; gap: 8px; color: #A8B3C1; font: 700 11.5px/1.35 var(--font-ui); letter-spacing: .14em; }
.page-title { margin: 12px 0 4px; font: 700 var(--size-display)/.85 var(--font-display); letter-spacing: .015em; }
.page-title em { color: var(--orange); font-style: normal; }
.page-lead { max-width: 680px; margin: 12px 0 25px; color: #A4AFBD; font-size: 17.25px; }
.rank-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.data-panel { min-width: 0; border: 1px solid #303946; background: #111720; }
.panel-heading { min-height: 49px; padding: 0 15px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid #303946; color: #E3E7EC; font-size: 12.65px; font-weight: 800; letter-spacing: .09em; }
.panel-heading span { color: var(--yellow); }
.panel-heading b { color: #8F9CAB; font: 500 10.35px var(--font-data); text-align: right; }
.rank-row { min-height: 65px; padding: 8px 14px; display: grid; grid-template-columns: 34px 38px 1fr 36px; align-items: center; gap: 8px; border-bottom: 1px solid #27303A; }
.rank-number { color: #778494; font: 500 13.8px var(--font-data); }
.rank-badge { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--player-color); background: color-mix(in srgb, var(--player-color) 18%, #111720); font-size: 20.7px; }
.rank-badge img { width: 26px; height: 26px; object-fit: contain; }
.activity-badge-image { width: 20px; height: 20px; margin-right: 5px; object-fit: contain; vertical-align: middle; }
.rank-name { display: flex; flex-direction: column; min-width: 0; }
.rank-name strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16.1px; }
.rank-name small { color: #929EAC; font-size: 10.35px; letter-spacing: .1em; }
.rank-value { color: var(--yellow); text-align: right; font: 500 18.4px var(--font-data); }
.activity-data { margin-top: 16px; }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { min-height: 40px; padding: 11px 13px; border-bottom: 1px solid #27303A; font-size: 13.8px; vertical-align: middle; }
th { color: #8996A5; font-size: 10.35px; font-weight: 800; letter-spacing: .1em; white-space: nowrap; }
td { color: #D8DDE4; }
tbody tr:last-child td { border-bottom: 0; }
.data-cell { font-family: var(--font-data); font-size: 11.5px; white-space: nowrap; }
.empty-state { padding: 24px 16px; color: #99A5B2; font-size: 16.1px; }
.back-map { display: inline-flex; min-height: 46px; align-items: center; margin-top: 20px; color: var(--yellow); font-size: 13.8px; font-weight: 800; letter-spacing: .1em; }
.profile-hero { min-height: 150px; margin: 22px 0 18px; padding: 22px; display: flex; align-items: center; gap: 18px; border: 1px solid var(--player-color); border-left: 5px solid var(--player-color); background: linear-gradient(110deg, color-mix(in srgb, var(--player-color) 13%, #111720), #111720 58%); }
.profile-badge { width: 108px; height: 108px; display: grid; place-items: center; border: 1px solid var(--player-color); background: #0b0d12; font-size: 62.1px; }
.profile-hero h1 { margin: 3px 0 0; font: 700 var(--size-h1)/.9 var(--font-display); }
.profile-hero p { margin: 3px 0; color: #A5B0BD; }
.profile-score { margin-left: auto; display: flex; flex-direction: column; align-items: end; }
.profile-score span { color: #A0ACB9; font-size: 10.35px; font-weight: 800; letter-spacing: .12em; }
.profile-score strong { color: var(--yellow); font: 500 34.5px var(--font-data); }
.profile-territory { min-height: 67px; padding: 10px 14px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid #27303A; }
.territory-symbol { color: var(--orange); font-size: 28.75px; }
.profile-territory > div { display: flex; flex-direction: column; min-width: 0; }
.profile-territory strong { font-size: 16.1px; }
.profile-territory small { color: #8491A0; font: 400 9.2px var(--font-data); }
.profile-territory > b { margin-left: auto; color: var(--yellow); font: 400 11.5px var(--font-data); white-space: nowrap; }
.checkout-page { max-width: 720px; margin: 0 auto; padding: 30px 18px 70px; }
.checkout-page .back-map { margin: 0 0 15px; }
.checkout-card { padding: clamp(20px, 5vw, 38px); border: 1px solid #35404D; background: #111720; box-shadow: 0 20px 50px #0004; }
.checkout-card .page-title { margin-bottom: 22px; }
.sandbox-badge { padding: 7px 10px; border: 1px solid #67562A; color: var(--yellow); font: 500 11.5px var(--font-data); }
.checkout-summary { min-height: 82px; padding: 12px 14px; display: flex; align-items: center; gap: 12px; border: 1px solid #35404D; background: #171D28; }
.summary-mark { color: var(--orange); font-size: 31.05px; }
.checkout-summary > div { display: flex; flex-direction: column; min-width: 0; }
.checkout-summary small { color: #9BA7B5; font-size: 10.35px; font-weight: 800; letter-spacing: .1em; }
.checkout-summary strong { overflow-wrap: anywhere; color: #F3F4F6; font-size: 17.25px; }
.checkout-summary .summary-price { margin-left: auto; text-align: right; }
.checkout-summary .summary-price strong { color: var(--yellow); font: 500 16.1px var(--font-data); white-space: nowrap; }
.checkout-territories { max-height: 180px; margin: 0; padding: 7px 12px; overflow: auto; border: 1px solid #35404D; border-top: 0; background: #10151D; list-style: none; }
.checkout-territories li { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: 1px solid #27303A; color: #D4DBE2; font-size: 12.65px; }
.checkout-territories li:last-child { border-bottom: 0; }
.checkout-territories li span { min-width: 0; overflow-wrap: anywhere; }
.checkout-territories li b { flex: 0 0 auto; color: var(--yellow); font: 400 11.5px var(--font-data); white-space: nowrap; }
.checkout-copy { margin: 16px 0 20px; color: #ADB7C3; font-size: 16.1px; }
.provider-box { padding: 17px; border: 1px solid #374350; }
.provider-title { color: #F2F4F6; font-size: 13.8px; font-weight: 800; letter-spacing: .1em; }
.provider-title span { margin-right: 8px; color: var(--orange); font-family: var(--font-data); }
.provider-box p { max-width: 560px; color: #9EABB9; font-size: 14.95px; }
.wompi-form { min-height: 45px; }
.wompi-form script { display: contents; }
.checkout-security { margin-top: 16px; padding: 11px 13px; display: flex; gap: 10px; background: #0D2021; color: #AAD3D0; }
.checkout-security span { color: var(--turquoise); }
.checkout-security p { margin: 0; font-size: 13.8px; }
.reference-line { margin-top: 17px; padding-top: 13px; display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid #2D3742; color: #8F9BAA; font-size: 10.35px; font-weight: 800; letter-spacing: .1em; }
.reference-line code { color: #C6D0DA; font: 400 11.5px var(--font-data); }
.result-card { text-align: center; }
.result-card .checkout-summary { text-align: left; margin: 20px 0; }
.result-symbol { width: 58px; height: 58px; margin: 0 auto 14px; display: grid; place-items: center; border: 1px solid var(--yellow); border-radius: 50%; color: var(--yellow); font: 500 29.9px var(--font-data); }
.result-symbol.success { color: var(--green); border-color: var(--green); }
.admin-login-wrap { min-height: calc(100dvh - 66px); display: grid; place-items: center; padding: 20px; }
.admin-login { width: min(420px, 100%); padding: 27px; border: 1px solid #35404D; background: #111720; }
.admin-login .page-title { margin-bottom: 18px; }
.admin-login > p { margin-top: 18px; color: #99A5B3; font-size: 13.8px; }
.admin-login code { color: var(--yellow); font-family: var(--font-data); }
.admin-form { display: grid; gap: 14px; }
.admin-form label { display: grid; gap: 5px; color: #CFD5DD; font-size: 13.8px; font-weight: 700; }
.admin-form input, .inline-admin-form input, .inline-admin-form select, td select { width: 100%; min-width: 100px; min-height: 40px; padding: 7px 9px; border: 1px solid #394554; border-radius: 0; background: #0B0D12; color: #F4F5F7; }
.inline-error, .inline-success { margin: 15px 0; padding: 10px 12px; border-left: 3px solid var(--orange); background: #2D172D; color: #FFD8F7; font-size: 14.95px; }
.inline-success { border-color: var(--green); background: #10272F; color: #C7F6FC; }
.admin-page { max-width: 1440px; }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.admin-wide { grid-column: 1 / -1; }
.admin-top-actions { margin-left: auto; font-family: var(--font-data); font-size: 10.35px; }
.admin-top-actions form { margin: 0; }
.inline-admin-form { display: grid; grid-template-columns: minmax(110px,1fr) 120px auto; gap: 7px; }
td:has(.inline-admin-form) { min-width: 370px; }
.table-sub { display: block; margin-top: 2px; color: #8491A0; font-size: 11.5px; }
.admin-page table td { padding: 8px; }
.admin-page .button-small { min-height: 36px; padding: 0 9px; font-size: 10.35px; }
.map-load-error { position: absolute; z-index: 1000; inset: 50% auto auto 50%; width: min(330px, calc(100% - 30px)); transform: translate(-50%,-50%); padding: 16px; border: 1px solid #9E4234; background: #171D28ee; color: #FFD4CB; text-align: center; font-size: 16.1px; }
@media (max-width: 680px) {
  .page-top { min-height: 59px; padding-inline: 12px; }
  .page-top > a, .page-top > .sandbox-badge { font-size: 11.5px; }
  .content-page { padding: 28px 13px 46px; }
  .page-title { line-height: .9; }
  .page-lead { font-size: 16.1px; }
  .rank-grid, .admin-grid { grid-template-columns: 1fr; }
  .admin-wide { grid-column: auto; }
  .panel-heading { min-height: 46px; padding-inline: 10px; font-size: 11.5px; }
  .panel-heading b { font-size: 9.2px; }
  .table-wrap { margin: 0; }
  th, td { padding: 10px 9px; }
  .profile-hero { padding: 16px 12px; gap: 10px; }
  .profile-badge { width: 81px; height: 81px; font-size: 46.575px; }
  .profile-score strong { font-size: 27.6px; }
  .checkout-page { padding: 18px 12px 48px; }
  .checkout-card { padding: 20px 15px; }
  .checkout-summary { gap: 8px; padding: 10px 8px; }
  .summary-mark { font-size: 24.15px; }
  .checkout-summary strong { font-size: 14.95px; }
  .checkout-summary .summary-price strong { font-size: 11.5px; }
  .reference-line code { font-size: 9.2px; }
  .admin-login-wrap { min-height: calc(100dvh - 59px); }
  .admin-login { padding: 21px 17px; }
  .admin-top-actions { gap: 8px; }
  .activity-panel { display: flex; position: fixed; z-index: 750; left: 9px; right: 9px; bottom: calc(72px + env(safe-area-inset-bottom)); max-height: min(52dvh, 430px); overflow-y: auto; padding: 16px; border: 1px solid #465361; box-shadow: 0 12px 45px #000b; visibility: hidden; opacity: 0; transform: translateY(8px); transition: opacity .15s ease, transform .15s ease, visibility .15s; }
  .activity-panel.is-open { visibility: visible; opacity: 1; transform: translateY(0); }
}


.territory-search { display: flex; align-items: end; flex-wrap: wrap; gap: 8px; padding: 12px; border-bottom: 1px solid #27303A; }
.territory-search label { display: grid; gap: 5px; min-width: min(360px, 100%); color: #AAB4C0; font: 700 10.35px var(--font-data); letter-spacing: .08em; }
.territory-search input { min-height: 38px; padding: 7px 9px; border: 1px solid #394554; background: #0B0D12; color: #F4F5F7; }
.territory-admin-row { display: grid; grid-template-columns: minmax(150px, 220px) minmax(390px, 1fr); align-items: center; gap: 12px; }
.bulk-price-panel { margin: 12px; padding: 14px; display: grid; gap: 12px; border: 1px solid #543466; background: linear-gradient(130deg,#17101F,#0D1118); }
.bulk-price-panel > div { display: grid; gap: 5px; }
.bulk-price-panel > div strong { color: #F2E8F8; font: 700 11.5px var(--font-data); letter-spacing: .07em; }
.bulk-price-panel > div small { max-width: 900px; color: #9EA8B5; font-size: 11.5px; line-height: 1.45; }
.bulk-price-panel form { display: flex; align-items: end; flex-wrap: wrap; gap: 10px; }
.bulk-price-panel label { display: grid; gap: 5px; color: #D8CDE2; font-size: 10.35px; font-weight: 700; }
.bulk-price-panel label:first-child input { min-height: 37px; width: 180px; padding: 7px; border: 1px solid #394554; background: #0B0D12; color: #FFF; }
.bulk-price-panel .bulk-reset-owned { min-height: 37px; display: flex; align-items: center; gap: 7px; font-weight: 500; }
.bulk-price-panel .bulk-reset-owned input { accent-color: var(--magenta); }
.profile-request-copy { margin: 0; padding: 12px 16px 0; color: #9EA8B5; font-size: 12.65px; }
.admin-territory-owner { display: flex; flex-direction: column; }
.inline-admin-form { display: grid; grid-template-columns: minmax(110px,1fr) 120px 110px 95px; align-items: center; gap: 7px; }
@media (max-width: 920px) { .territory-admin-row { grid-template-columns: 1fr; } .inline-admin-form { grid-template-columns: minmax(120px,1fr) 110px; } }
@media (max-width: 680px) { .inline-admin-form { grid-template-columns: 1fr 1fr; } .inline-admin-form input, .inline-admin-form select { min-width: 0; } }


.log-output { max-height: 360px; overflow: auto; padding: 13px; background: #0B0D12; }
.log-output pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; color: #D0B9A2; font: 400 11.5px/1.55 var(--font-data); }
.activity-toggle { font-family: var(--font-ui); }

.wompi-admin-content { padding: 16px; }
.admin-help, .wompi-config-note { margin: 0 0 13px; max-width: 880px; color: #AAB4C0; font-size: 13.8px; line-height: 1.55; }
.admin-help code, .wompi-config-note code { color: var(--yellow); font: 12.65px var(--font-data); }
.wompi-key-status { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 15px; }
.key-status { display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px; border: 1px solid #3C4551; background: #0C1016; color: #8E99A7; font: 500 10.35px/1.2 var(--font-data); }
.key-status i { width: 6px; height: 6px; border-radius: 50%; background: #798493; }
.key-status.is-configured { border-color: #1F5A6A; color: #B9F2F8; }
.key-status.is-configured i { background: var(--green); box-shadow: 0 0 8px #22D3EE88; }

/* Mapa HUD y marcas por compra */
.territory-panel { overflow-y: auto; scrollbar-width: thin; scrollbar-color: #674078 transparent; }
.map-toolbar { align-items: flex-start; }
.map-logo { width: 115px; height: 115px; display: block; object-fit: cover; border: 2px solid #F226D5; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px #0b0812cc, 0 0 24px #f226d566; }
.map-toolbar-tools { margin-left: auto; padding: 0; border: 0; background: transparent; box-shadow: none; }
.map-counter { border: 1px solid #36DDF555; background: #0D0A14E8; color: #EDE8F4; }
.territory-hud { position: absolute; top: 186px; left: 50%; z-index: 410; width: min(570px, calc(100% - 34px)); min-height: 70px; padding: 8px 17px; display: flex; align-items: center; gap: 13px; transform: translateX(-50%); border: 1px solid #F226D5A8; border-right: 3px solid var(--turquoise); background: linear-gradient(105deg, #170C20F2 0%, #0B0E19F2 62%, #08151AF2 100%); box-shadow: 0 7px 28px #0009, 0 0 20px #F226D524, inset 0 0 20px #A855F710; clip-path: polygon(0 0, 98% 0, 100% 23%, 100% 77%, 98% 100%, 0 100%); pointer-events: none; }
.territory-hud::before { content: ""; position: absolute; left: 62px; right: 22px; bottom: 5px; height: 1px; background: linear-gradient(90deg, #F226D5, #A855F7 55%, #22D3EE); opacity: .8; }
.hud-signal { width: 45px; height: 45px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid #F226D5; border-radius: 50%; color: #fff; font: 500 34.5px/1 var(--font-ui); text-shadow: 0 0 11px #F226D5; box-shadow: 0 0 15px #F226D555, inset 0 0 12px #A855F733; }
.hud-copy { min-width: 0; display: flex; flex: 1 1 auto; flex-direction: column; gap: 1px; }
.hud-copy small { color: #C5B5D2; font: 500 9.2px/1.2 var(--font-data); letter-spacing: .12em; }
.hud-copy strong { overflow: hidden; color: #FFF; font: 700 clamp(19.55px, 2.3vw, 28.75px)/1.05 var(--font-display); letter-spacing: .025em; text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 2px 6px #000, 0 0 12px #ffffff30; }
.hud-state { max-width: 105px; padding: 5px 7px; color: var(--turquoise); border: 1px solid #22D3EE55; background: #081820; font: 500 8.05px/1.25 var(--font-data); text-align: center; letter-spacing: .04em; }
.territory-hud.is-owned { border-color: #22D3EEA8; border-right-color: #F226D5; }
.territory-hud.is-owned .hud-signal { border-color: var(--turquoise); color: var(--turquoise); text-shadow: 0 0 11px var(--turquoise); }
.territory-hud.is-unavailable .hud-state { color: #F6A7E8; border-color: #F226D555; background: #251126; }
.commune-number-icon { background: transparent; border: 0; pointer-events: none; }
.commune-map-number { color: #F4ECFFE8; font: 800 clamp(36.8px, 5.75vw, 87.4px)/1 var(--font-display); letter-spacing: -.05em; -webkit-text-stroke: 1.5px #080812D9; text-shadow: 0 3px 7px #000, 0 0 14px #F226D588, 0 0 20px #22D3EE50; opacity: .96; }
.owner-label-icon { width: auto !important; height: auto !important; background: transparent; border: 0; pointer-events: none; }
.owner-map-label { max-width: 170px; padding: 3px 7px 3px 4px; display: inline-flex; align-items: center; gap: 5px; border: 1px solid color-mix(in srgb, var(--owner-color) 72%, white); border-radius: 4px; background: #09080FE8; color: #FAF7FC; box-shadow: 0 2px 12px #0009, 0 0 12px color-mix(in srgb, var(--owner-color) 32%, transparent); font: 700 11.5px/1.15 var(--font-data); white-space: nowrap; }
.owner-map-badge { width: 19px; height: 19px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid var(--owner-color); border-radius: 3px; background: #171421; color: #fff; font: 600 13.8px/1 var(--font-ui); }
.owner-map-badge-image { display: block; padding: 1px; object-fit: contain; }
.owner-map-label.is-badge-only { width: 39px; height: 39px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.owner-map-label.is-badge-only .owner-map-badge { width: 39px; height: 39px; border: 0; background: transparent; }
.owner-map-badge-fallback { color: #F7D6FF; font-size: 23.4px !important; }
.owner-map-label > span:last-child { max-width: 135px; overflow: hidden; text-overflow: ellipsis; }
.territory-owner { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.territory-owner-label { color: #AFA0BC; font: 700 9.2px var(--font-data); letter-spacing: .08em; }
.territory-owner-identity { display: flex; align-items: center; gap: 8px; }
.territory-owner-identity strong { color: #F6F0FC; font-size: 16.1px; }
.owner-mini-badge { width: 33px; height: 33px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid var(--owner-color); border-radius: 50%; color: var(--owner-color); }
.territory-owner a { color: var(--turquoise); font-size: 12.65px; }
.territory-owner a:hover { color: #fff; text-decoration: underline; }
.purchase-branding { min-width: 0; margin: 12px 0 0; padding: 10px; border: 1px solid #543466; background: linear-gradient(135deg, #17101F, #0E131C); }
.purchase-branding legend { padding: 0 5px; color: #D7B7F2; font: 700 9.2px var(--font-data); letter-spacing: .08em; }
.branding-color-label { display: block; margin: 2px 0 5px; color: #C5B5D2; font: 700 9.2px var(--font-data); letter-spacing: .07em; }
.branding-color-row { min-height: 33px; display: flex; align-items: center; gap: 8px; }
.branding-color-row input[type="color"] { width: 35px; height: 30px; padding: 2px; border: 1px solid #715181; background: #0C0A12; cursor: pointer; }
.branding-color-row > span { min-width: 62px; color: #E7DCF0; font: 500 10.35px var(--font-data); }
.branding-swatches { display: flex; align-items: center; gap: 5px; }
.branding-swatches button { width: 17px; height: 17px; padding: 0; border: 1px solid #fff9; border-radius: 50%; background: var(--swatch); cursor: pointer; box-shadow: 0 0 0 2px #0D0B12; }
.branding-swatches button.is-active { outline: 2px solid #fff; outline-offset: 2px; box-shadow: 0 0 11px var(--swatch); }
.branding-swatches button:hover, .branding-swatches button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.purchase-brand-preview { min-height: 38px; margin-top: 7px; padding: 4px 7px; display: flex; align-items: center; gap: 6px; border-left: 3px solid var(--claim-color, var(--magenta)); background: color-mix(in srgb, var(--claim-color, var(--magenta)) 9%, #0B0D12); }
.brand-preview-fallback { width: 25px; height: 25px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid var(--claim-color, var(--magenta)); border-radius: 50%; background: #0B0D12; color: var(--claim-color, var(--magenta)); font-size: 16.1px; }
.purchase-brand-preview strong { min-width: 0; overflow: hidden; color: #F8F5FC; font: 700 11.5px var(--font-data); text-overflow: ellipsis; white-space: nowrap; }
.purchase-brand-preview small { margin-left: auto; color: #8E809B; font: 400 6.9px var(--font-data); text-align: right; }
.checkout-brand-summary { margin: 12px 0; padding: 12px; display: flex; align-items: center; gap: 9px; border: 1px solid #4D365D; background: #15101E; }
.checkout-brand-summary > i { width: 28px; height: 28px; border: 2px solid var(--purchase-color); border-radius: 50%; background: color-mix(in srgb, var(--purchase-color) 24%, #0B0D12); }
.checkout-brand-summary strong { color: #EEE6F4; font-size: 13.8px; }
@media (max-width: 680px) {
  .map-logo { width: 84px; height: 84px; border-width: 1px; box-shadow: 0 0 0 3px #0b0812cc, 0 0 15px #f226d566; }
  .territory-hud { top: 140px; width: calc(100% - 20px); min-height: 57px; padding: 6px 9px; gap: 8px; }
  .territory-hud::before { left: 48px; right: 14px; bottom: 3px; }
  .hud-signal { width: 36px; height: 36px; font-size: 27.6px; }
  .hud-copy small { font-size: 6.9px; }
  .hud-copy strong { font-size: 19.55px; }
  .hud-state { max-width: 74px; padding: 4px 5px; font-size: 6.9px; }
  .commune-map-number { font-size: clamp(32.2px, 12.65vw, 64.4px); }
  .purchase-branding { margin-top: 8px; }
}
.wompi-settings-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.wompi-settings-form > label { display: grid; gap: 6px; color: #E4E9EF; font-size: 13.8px; font-weight: 700; }
.wompi-settings-form > label > span { color: #8793A1; font: 500 10.35px var(--font-data); }
.wompi-settings-form input[type="password"] { width: 100%; min-height: 42px; padding: 9px 10px; border: 1px solid #394554; background: #0B0D12; color: #F4F5F7; font: 12.65px var(--font-data); }
.wompi-settings-form input::placeholder { color: #687382; }
.wompi-settings-form label small { display: flex; align-items: center; gap: 7px; color: #99A5B3; font-size: 11.5px; font-weight: 500; }
.wompi-settings-form input[type="checkbox"] { accent-color: var(--orange); }
.wompi-settings-form .button { margin-top: 2px; }
.wompi-config-note { margin: 12px 0 0; color: #8491A0; font-size: 11.5px; }
.admin-help a { color: var(--turquoise); text-decoration: underline; text-underline-offset: 2px; }
.map-import-form { display: flex; align-items: end; flex-wrap: wrap; gap: 11px; }
.map-import-form label { display: grid; gap: 6px; min-width: min(430px, 100%); color: #E4E9EF; font-size: 13.8px; font-weight: 700; }
.map-import-form input[type="file"] { max-width: 100%; min-height: 42px; padding: 7px; border: 1px solid #394554; background: #0B0D12; color: #AEB8C4; font: 11.5px var(--font-data); }
.map-import-form input[type="file"]::file-selector-button { margin-right: 9px; padding: 7px 9px; border: 0; background: #27313E; color: #F4F5F7; font: 700 11.5px var(--font-ui); }
.map-import-form .button { min-height: 42px; }
@media (max-width: 680px) { .wompi-admin-content { padding: 12px; } .wompi-settings-form { grid-template-columns: 1fr; gap: 11px; } }

/* Account, radio, insignia, and promo controls */
.logout-inline { margin: 0; }
.logout-inline button { border: 0; background: transparent; cursor: pointer; }
.nav-player img { width: 20px; height: 20px; object-fit: contain; vertical-align: middle; }
.radio-console { margin: 14px 0 4px; padding: 11px; border: 1px solid #473252; background: linear-gradient(135deg,#14101c,#0a0c12); }
.city-chat { margin: 13px 0 2px; padding: 11px; border: 1px solid #344255; background: linear-gradient(145deg,#10141d,#0a0c12); box-shadow: inset 0 1px #ffffff08; }
.chat-section-heading { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.chat-section-heading > div { min-width: 0; display: grid; gap: 3px; }
.chat-section-heading strong { color: #F3ECFA; font: 700 14.95px var(--font-display); letter-spacing: .06em; }
.chat-section-heading > span:last-child { color: #E879F9; font: 700 12.65px var(--font-data); }
.chat-live-indicator { display: inline-flex; align-items: center; gap: 5px; color: #70EAC2 !important; font-size: 8.05px !important; letter-spacing: .08em; }
.chat-live-indicator i { width: 6px; height: 6px; border-radius: 50%; background: #48E5A7; box-shadow: 0 0 8px #48E5A7; }
.city-chat-messages { height: 205px; margin: 9px 0 8px; padding: 5px; display: flex; flex-direction: column; gap: 6px; overflow-y: auto; border: 1px solid #252D38; background: #080A0F; scrollbar-width: thin; scrollbar-color: #674078 transparent; }
.city-chat-message { min-width: 0; padding: 5px; display: flex; align-items: flex-start; gap: 7px; border-bottom: 1px solid #ffffff0b; }
.city-chat-badge { width: 25px; height: 25px; flex: 0 0 auto; object-fit: contain; border: 1px solid #B443D5; border-radius: 4px; background: #17111F; }
.city-chat-badge-fallback { display: grid; place-items: center; color: #36DDF5; font-size: 12.65px; }
.city-chat-copy { min-width: 0; flex: 1; }
.city-chat-message-head { display: flex; align-items: baseline; justify-content: space-between; gap: 7px; }
.city-chat-message-head strong { overflow: hidden; color: #E879F9; font: 700 10.35px var(--font-data); text-overflow: ellipsis; white-space: nowrap; }
.city-chat-message-head time { flex: 0 0 auto; color: #728090; font: 500 8.05px var(--font-data); }
.city-chat-copy p { margin: 3px 0 0; color: #E0E4EB; font-size: 11.5px; line-height: 1.45; overflow-wrap: anywhere; white-space: pre-wrap; }
.city-chat-form { position: relative; display: flex; gap: 5px; }
.city-chat-form input { min-width: 0; min-height: 36px; flex: 1; padding: 7px 9px; border: 1px solid #354152; background: #090B10; color: #F6F2FA; font-size: 11.5px; }
.city-chat-form button { width: 38px; border: 1px solid #923C9E; background: linear-gradient(135deg,#7A1E82,#163B58); color: white; cursor: pointer; }
.city-chat-form button:disabled { opacity: .55; cursor: wait; }
.city-chat-form small { position: absolute; top: calc(100% + 3px); left: 0; right: 0; color: #FDB3BF; font-size: 9.2px; }
.chat-empty,.chat-login-note { margin: auto; padding: 8px; color: #8E98A7; font-size: 10.35px; line-height: 1.45; text-align: center; }
.chat-login-note { margin: 4px 0 0; padding: 0; }
.chat-login-note button { padding: 0; border: 0; background: transparent; color: #36DDF5; font: inherit; text-decoration: underline; cursor: pointer; }
.dedication-inbox { margin: 12px 0 3px; padding: 9px; border: 1px solid #49304F; background: linear-gradient(135deg,#17101D,#10121A); }
.dedication-inbox .chat-section-heading { margin-bottom: 5px; color: #E7C5F2; font: 700 9.2px var(--font-data); letter-spacing: .08em; }
.map-dedication-item,.received-dedication { min-width: 0; padding: 7px 2px; display: flex; align-items: flex-start; gap: 7px; border-top: 1px solid #ffffff12; }
.map-dedication-item > img,.received-dedication > img,.dedication-sender-mark { width: 25px; height: 25px; flex: 0 0 auto; object-fit: contain; border: 1px solid #A343B6; border-radius: 4px; background: #130F18; }
.dedication-sender-mark { display: grid; place-items: center; color: #E879F9; font-size: 13.8px; }
.map-dedication-item > div,.received-dedication > div { min-width: 0; display: grid; gap: 3px; }
.map-dedication-item strong,.received-dedication strong { color: #F2EAF6; font-size: 10.35px; line-height: 1.35; overflow-wrap: anywhere; }
.map-dedication-item small,.received-dedication p,.received-dedication small { margin: 0; color: #A49AAD; font-size: 9.2px; line-height: 1.4; overflow-wrap: anywhere; }
.received-dedications { display: grid; gap: 3px; }
.received-dedication { padding: 10px 4px; }
.received-dedication strong { font-size: 13.8px; }
.received-dedication p { color: #C9BED0; font-size: 11.5px; }
.received-dedication small { margin-top: 2px; font: 500 9.2px var(--font-data); }
.chat-admin-player { display: inline-flex; align-items: center; gap: 7px; }
.chat-admin-player img { width: 24px; height: 24px; object-fit: contain; border: 1px solid #8A3D94; border-radius: 4px; background: #111; }
.city-chat-form input::placeholder { color: #77818F; opacity: 1; }
.invasion-alert { position: fixed; z-index: 1400; inset: 0; padding: 18px; display: grid; place-items: center; background: #03040DE8; backdrop-filter: blur(5px); opacity: 0; transition: opacity .18s ease; }
.invasion-alert[hidden] { display: none; }
.invasion-alert.is-visible { opacity: 1; }
.invasion-alert-card { width: min(470px, 100%); max-height: min(88dvh, 760px); overflow-y: auto; padding: 22px; border: 1px solid #F226D5; border-right: 3px solid #36DDF5; background: linear-gradient(145deg,#1B1022,#0C111B 70%,#0B1820); box-shadow: 0 20px 70px #000C, 0 0 34px #F226D533, inset 0 1px #fff1; clip-path: polygon(0 0,97% 0,100% 6%,100% 100%,3% 100%,0 94%); }
.invasion-alert-kicker { display: block; color: #36DDF5; font: 700 10.35px var(--font-data); letter-spacing: .15em; }
.invasion-alert-attacker { margin-top: 17px; display: flex; align-items: center; gap: 11px; }
.invasion-alert-attacker > img,.invasion-alert-attacker > span { width: 52px; height: 52px; flex: 0 0 auto; display: grid; place-items: center; object-fit: contain; padding: 3px; border: 1px solid #E340D3; border-radius: 7px; background: #11111C; color: #FF75DE; font: 800 28px var(--font-display); }
.invasion-alert-attacker > div { min-width: 0; display: grid; gap: 3px; }
.invasion-alert-attacker small { color: #9FAAB8; font: 700 9.2px var(--font-data); letter-spacing: .12em; }
.invasion-alert-attacker strong { overflow-wrap: anywhere; color: #FFF; font: 700 23px/1 var(--font-display); }
.invasion-alert-card h2 { margin: 18px 0 5px; color: #FF70DD; font: 700 28.75px/.98 var(--font-display); text-transform: uppercase; }
.invasion-alert-card p { margin: 0 0 9px; color: #D5DDE7; font-size: 13.8px; line-height: 1.45; }
.invasion-alert-card ul { max-height: 210px; margin: 0 0 17px; padding: 0 0 0 18px; overflow-y: auto; color: #D2C8DF; font-size: 12.65px; line-height: 1.55; }
.invasion-alert-card .button { width: 100%; }
.radio-console-head { display: flex; justify-content: space-between; align-items: center; gap: 9px; }
.radio-console-head > div { display: grid; gap: 3px; }
.radio-kicker { color: #36DDF5; font: 700 9.2px var(--font-data); letter-spacing: .13em; }
.radio-console-head strong { color: #F5EFF9; font: 700 17.25px var(--font-display); letter-spacing: .07em; }
.radio-now-playing { min-width: 0; margin-top: 8px; display: grid; gap: 3px; }
.radio-now-playing small { color: #8F7FA0; font: 700 8.05px var(--font-data); letter-spacing: .12em; }
.radio-now-playing strong { overflow: hidden; color: #F1E8F7; font: 700 12.65px var(--font-ui); text-overflow: ellipsis; white-space: nowrap; }
.radio-controls { margin-top: 8px; display: grid; grid-template-columns: 1fr 1.3fr 1fr; gap: 5px; }
.radio-controls button { min-width: 0; min-height: 31px; padding: 5px; border: 1px solid #483253; background: #17101F; color: #D9C8E8; font: 700 8.05px var(--font-data); letter-spacing: .03em; cursor: pointer; }
.radio-controls button:nth-child(2) { border-color: #7E2873; color: #F5EAF7; background: linear-gradient(100deg,#32132F,#102633); }
.radio-controls button:disabled { opacity: .45; cursor: not-allowed; }
.radio-controls button:not(:disabled):hover { border-color: #36DDF5; color: #fff; }
.radio-purchase-request,.payment-choice { display: grid; gap: 9px; }
.radio-purchase-request label,.payment-choice label,.password-form label,.dedication-form label { display: grid; gap: 5px; color: #CBD3DD; font-size: 11.5px; }
.radio-purchase-request input,.radio-purchase-request select,.payment-choice input,.payment-choice select,.password-form input,.dedication-form input,.dedication-form select { width: 100%; min-width: 0; min-height: 38px; padding: 7px 9px; border: 1px solid #394554; background: #0B0D12; color: #F4F5F7; }
.badge-custom-grid { margin: 8px 0; }
.badge-image-choice > span { overflow: hidden; }
.badge-image-choice img { max-width: 100%; max-height: 100%; object-fit: contain; }
.owner-mini-badge img,.owner-map-badge img { width: 100%; height: 100%; object-fit: contain; }
.radio-visualizer { height: 42px; margin-top: 11px; padding: 5px 10px; display: flex; align-items: center; justify-content: center; gap: 4px; border: 1px solid #30283B; background: #09090F; }
.radio-visualizer i { width: 3px; height: 5px; border-radius: 4px; background: #56314F; opacity: .55; transform-origin: center; }
.radio-visualizer.is-playing { border-color: #71215E; box-shadow: inset 0 0 18px #F226D514; }
.radio-visualizer.is-playing i { background: linear-gradient(180deg,#36DDF5,#F226D5); opacity: .95; animation: radio-bars .74s ease-in-out infinite alternate; box-shadow: 0 0 7px #F226D544; }
.radio-visualizer.is-playing i:nth-child(3n) { animation-duration: .53s; }
.radio-visualizer.is-playing i:nth-child(4n) { animation-duration: .91s; }
.radio-visualizer.is-playing i:nth-child(2n) { animation-delay: -.32s; }
.radio-player-stage { position: fixed; left: -10000px; top: 0; width: 200px; height: 200px; overflow: hidden; pointer-events: none; }
.radio-player-stage iframe { width: 200px; height: 200px; border: 0; }
@keyframes radio-bars { from { height: 5px; } to { height: 32px; } }
.profile-badge-empty { display: grid; place-items: center; color: #9BA4B1; font: 700 10.35px var(--font-data); text-align: center; }
.badge-empty-state { grid-column: 1 / -1; padding: 10px; color: #F7A9DC; font-size: 12.65px; }
.profile-account-form { align-items: start; }
.account-email-field { grid-column: 1 / -1; }
.faction-card-link { display: inline-block; margin: 7px 0 0 5px; color: #36DDF5; font-size: 11.5px; }
.profile-badge { object-fit: contain; padding: 7px; border-radius: 14px; }
.profile-hero > div > p { margin: 7px 0 0; color: #aeb8c4; font-size: 14.95px; }
.profile-logout { margin: 12px 0; }
.password-form,.dedication-form { padding: 16px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: end; gap: 12px; }
.password-form .button,.dedication-form .button { min-height: 40px; }
.territory-color-chip { width: 28px; height: 28px; border: 2px solid #eee; border-radius: 50%; background: var(--territory-player-color); }
.profile-territory .territory-symbol { background: var(--territory-player-color); }
.admin-action-cell { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.admin-action-cell form,.admin-feature-grid form,.table-wrap form { margin: 0; }
.player-badge-assignment { display: flex; align-items: center; gap: 4px; }
.player-badge-assignment select { max-width: 150px; min-height: 32px; padding: 4px 6px; border: 1px solid #394554; background: #0B0D12; color: #F4F5F7; font-size: 11.5px; }
.badge-admin-actions { min-width: 260px; }
.badge-admin-actions form { margin: 0 0 7px; }
.badge-edit-form { display: grid; gap: 6px; }
.badge-edit-form label { display: grid; gap: 4px; color: #B9A9C4; font-size: 10.35px; }
.badge-edit-form input:not([type="file"]) { min-height: 32px; padding: 5px 7px; border: 1px solid #394554; background: #0B0D12; color: #F4F5F7; }
.badge-edit-form input[type="file"] { max-width: 250px; color: #AAB4C0; font-size: 10.35px; }
.admin-reset-panel { margin-top: 16px; border-color: #71324A; }
.admin-reset-panel > p { margin: 0; padding: 14px 16px 4px; color: #B8B1BC; font-size: 12.65px; line-height: 1.5; }
.admin-reset-panel > p strong { color: #FFB5CA; }
.admin-reset-panel form { padding: 12px 16px 16px; display: flex; align-items: end; flex-wrap: wrap; gap: 10px; }
.admin-reset-panel label { display: grid; gap: 5px; color: #E4DCE7; font-size: 11.5px; font-weight: 700; }
.admin-reset-panel input { min-height: 38px; padding: 7px 9px; border: 1px solid #71324A; background: #0B0D12; color: #FFF; font: 700 13.8px var(--font-data); }
.button-danger { border-color: #9a3552; background: #3a1420; color: #ffd4df; }
.button-danger:hover { border-color: #ff4d7d; background: #55182b; }
.order-admin-form { min-width: 230px; display: grid; gap: 5px; }
.order-admin-form input,.order-admin-form select,.table-wrap select { width: 100%; min-height: 34px; padding: 5px 7px; border: 1px solid #394554; background: #0B0D12; color: #F4F5F7; font-size: 11.5px; }
.admin-feature-grid { padding: 12px; display: grid; grid-template-columns: minmax(180px,.8fr) minmax(250px,1.2fr); gap: 12px; }
.admin-feature-grid > form,.radio-track-form,.badge-upload-form,.promo-create-form { display: grid; align-content: start; gap: 10px; }
.radio-track-form label,.badge-upload-form label,.promo-create-form label { display: grid; gap: 5px; color: #cbd3dd; font-size: 12.65px; }
.radio-track-form input,.badge-upload-form input,.promo-create-form input { width: 100%; min-height: 38px; padding: 7px; border: 1px solid #394554; background: #0B0D12; color: #F4F5F7; }
.admin-badge-preview { width: 30px; height: 30px; margin-right: 9px; object-fit: contain; vertical-align: middle; }
.promo-create-form { grid-template-columns: 130px auto; align-items: end; }
.promo-code-output { margin: 12px; padding: 12px; border: 1px solid #36DDF5; background: #08141a; color: #d9f9ff; }
.promo-code-output strong { font: 700 11.5px var(--font-data); }
.promo-code-output pre { max-height: 220px; overflow: auto; font: 700 14.95px var(--font-data); line-height: 1.8; }
.login-dialog { width: min(420px, calc(100vw - 24px)); }
.login-dialog .form-grid { display: grid; gap: 12px; }
.login-dialog .password-reset-link { justify-content: center; }
.password-reset-link { display: inline-flex; margin-top: 12px; color: #A6ECFF; font-size: 13px; font-weight: 700; text-underline-offset: 3px; }
.password-reset-link:hover { color: #FF8AE3; text-decoration: underline; }
.legacy-account-link { margin-top: 17px; border-top: 1px solid #49336A; padding-top: 12px; }
.legacy-account-link summary { color: #C8B6D8; font-size: 13px; font-weight: 700; cursor: pointer; }
.legacy-account-form { margin-top: 12px; display: grid; gap: 9px; }
.legacy-account-form p { margin: 0 0 3px; color: #AFA4BD; font-size: 12px; line-height: 1.45; }
.legacy-account-form label { display: grid; gap: 5px; color: #E0D8EA; font-size: 12px; font-weight: 700; }
.legacy-account-form input { min-height: 38px; padding: 8px 9px; border: 1px solid #50396C; border-radius: 5px; background: #0B0912; color: var(--text); }
@media (max-width: 680px) { .password-form,.dedication-form,.admin-feature-grid,.promo-create-form { grid-template-columns: 1fr; } .admin-action-cell { align-items: flex-start; } .admin-action-cell form { width: 100%; } }

/* CÚCUTA BATTLE CITY · synthwave tropical game interface */
body {
  color: var(--text);
  background: radial-gradient(ellipse at 50% -16%, #3B146155 0, transparent 47%),
    radial-gradient(ellipse at 3% 42%, #176BFF12 0, transparent 32%),
    radial-gradient(ellipse at 96% 72%, #FF19C812 0, transparent 31%), var(--ink);
}
.topbar,.page-top,.admin-topbar {
  background: linear-gradient(100deg,#0B0915F5,#100B20F2 54%,#0B0A18F5);
  border-color: #4C2B67;
  box-shadow: 0 8px 30px #05030CB8, inset 0 -1px #FF19C820;
  backdrop-filter: blur(12px);
}
.brand { min-width: 205px; }
.brand-mark {
  background: linear-gradient(145deg,var(--magenta),var(--purple) 68%,var(--blue));
  color: #FFF;
  text-shadow: 0 1px 5px #080711;
  box-shadow: 0 0 18px #FF19C855, inset 0 1px #FFFFFF70;
  clip-path: polygon(0 0,88% 0,100% 20%,100% 100%,13% 100%,0 82%);
}
.brand-copy { letter-spacing: .09em; }
.brand-copy strong { color: #FFF; text-shadow: 0 0 14px #FF19C833; }
.brand-copy small { color: #91EFFF; }
.topbar-center { color: #D9D1EA; }
.nav-link { color: #DCD5EA; transition: color .16s ease,text-shadow .16s ease; }
.nav-link:hover,.page-top nav a:hover,.page-top nav .active { color: var(--turquoise); text-shadow: 0 0 12px #00DFFF65; }
.button {
  border-radius: 7px;
  transition: transform .16s ease,background .16s ease,border-color .16s ease,box-shadow .16s ease;
}
.button-action {
  color: #FFF;
  background: linear-gradient(105deg,#FF19C8 0%,#C42BFF 56%,#176BFF 115%);
  border: 1px solid #FF80E8;
  box-shadow: 0 5px 18px #FF19C833,inset 0 1px #FFFFFF50;
  clip-path: none;
}
.button-action:hover:not(:disabled) {
  background: linear-gradient(105deg,#FF4FD5,#A94BFF 58%,#3183FF);
  box-shadow: 0 0 24px #FF19C85C,0 0 12px #176BFF45,inset 0 1px #FFFFFF75;
  transform: translateY(-1px);
}
.button-outline {
  border-color: #68458A;
  background: #151025A8;
  box-shadow: inset 0 1px #FFFFFF0A;
}
.button-outline:hover:not(:disabled) {
  color: #FFF;
  border-color: var(--turquoise);
  background: #00DFFF12;
  box-shadow: 0 0 16px #00DFFF2B;
}
.game-layout { background: transparent; }
.side-panel {
  background: linear-gradient(180deg,#151025F2,#100D1EF5 62%,#0B0A16F7);
  backdrop-filter: blur(10px);
}
.activity-panel { border-right-color: #8B2CFF66; box-shadow: 8px 0 32px #08071154; }
.territory-panel { border-left-color: #00DFFF50; box-shadow: -8px 0 32px #08071154; }
.panel-kicker,.page-eyebrow { color: #A99DBE; }
.kicker-index { color: var(--rose); }
.city-title strong,.page-title em { color: var(--magenta); text-shadow: 0 0 18px #FF19C83D; }
.intro-copy,.page-lead { color: #C1B8D2; }
.stats-grid { border-color: #563777; }
.stat-cell { border-color: #563777; background: linear-gradient(135deg,#1A1230A0,#100D1C80); }
.stat-cell span { color: #B5A9C8; }
.stat-cell strong { color: #F8F4FF; text-shadow: 0 0 13px #00DFFF30; }
.stat-cell .green-text { color: var(--turquoise); }
.stat-cell .orange-text { color: var(--tropical-orange); }
.panel-divider { background: linear-gradient(90deg,transparent,#8B2CFF8A,#FF19C866,transparent); }
.section-line { color: #F1E9FF; }
.section-line a { color: #9CEFFF; }
.activity-item { border-bottom-color: #FFFFFF12; }
.activity-item strong { color: #FFF; }
.activity-item > b { color: #FFD15C; }
.commune-guide,.radio-console,.city-chat,.dedication-inbox {
  border-color: #583778;
  border-radius: 10px;
  background: linear-gradient(145deg,#1B1230E8,#100D1DEB 72%,#0D101DEB);
  box-shadow: 0 8px 25px #05040C4A,inset 0 1px #FFFFFF0A;
}
.commune-guide-title,.radio-console-head strong,.chat-section-heading strong { color: #F5F1FF; }
.radio-kicker { color: #89F1FF; }
.radio-now-playing strong { color: #FFF; }
.radio-controls button {
  border-color: #563777;
  border-radius: 5px;
  background: #171128;
  color: #D8CBEF;
}
.radio-controls button:nth-child(2) {
  border-color: #A345CE;
  background: linear-gradient(100deg,#3A1644,#152A49);
  box-shadow: inset 0 0 13px #FF19C815;
}
.city-chat-messages { border-color: #47305F; border-radius: 7px; background: #090813C9; }
.city-chat-form input,.form-grid input,.form-grid select,.password-form input,.dedication-form input,.dedication-form select,
.payment-choice input,.payment-choice select,.wompi-settings-form input[type="password"],.map-import-form input[type="file"] {
  border-color: #50396C;
  border-radius: 6px;
  background: #0C0A17;
  color: var(--text);
}
.city-chat-form input:focus,.form-grid input:focus,.form-grid select:focus,.password-form input:focus,
.dedication-form input:focus,.dedication-form select:focus,.payment-choice input:focus,.payment-choice select:focus {
  border-color: var(--turquoise);
  box-shadow: 0 0 0 2px #00DFFF22,0 0 14px #00DFFF24;
}
.city-chat-form button { border-radius: 6px; background: linear-gradient(140deg,#A82CFF,#176BFF); box-shadow: 0 0 12px #8B2CFF40; }
.map-stage { background: #080711; }
.leaflet-container {
  background-color: #080711;
  background-image: linear-gradient(#BFA9FF0A 1px,transparent 1px),linear-gradient(90deg,#BFA9FF0A 1px,transparent 1px);
  background-size: 44px 44px;
}
.leaflet-control-zoom { overflow: hidden; border: 1px solid #8B2CFF !important; border-radius: 8px !important; box-shadow: 0 0 18px #8B2CFF35 !important; }
.leaflet-control-zoom a { color: #F5F1FF !important; background: #151025E8 !important; border-bottom-color: #563777 !important; }
.leaflet-control-zoom a:hover { color: #00DFFF !important; background: #241052 !important; }
.map-logo-lockup {
  width: auto;
  height: auto;
  min-height: 58px;
  padding: 8px 13px 8px 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #FF19C899;
  border-radius: 12px;
  background: #100D1EED;
  box-shadow: 0 5px 24px #05030CCC,0 0 20px #FF19C82D,inset 0 1px #FFFFFF24;
  color: #FFF;
  object-fit: initial;
  pointer-events: auto;
  backdrop-filter: blur(10px);
}
.map-toolbar > div.map-logo-lockup:first-child:not(.map-toolbar-tools) { padding: 8px 13px 8px 8px; display: flex; border: 1px solid #FF19C899; border-radius: 12px; background: #100D1EED; box-shadow: 0 5px 24px #05030CCC,0 0 20px #FF19C82D,inset 0 1px #FFFFFF24; }
.map-logo-mark { width: 42px; height: 42px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid #F5A7FF; border-radius: 9px; background: linear-gradient(145deg,#FF19C8,#8B2CFF 68%,#176BFF); color: #FFF; font: 700 21px/1 var(--font-display); text-shadow: 0 2px 5px #241052; box-shadow: 0 0 16px #FF19C84D; }
.map-logo-lockup > span:last-child { display: grid; gap: 2px; }
.map-logo-lockup strong { margin: 0; color: #FFF; font: 800 14px/1 var(--font-ui); letter-spacing: .12em; }
.map-logo-lockup small { color: #8DEEFF; font: 700 9px/1 var(--font-data); letter-spacing: .15em; }
.map-counter,.demo-pill { border: 1px solid #583778; border-radius: 7px; background: #100D1EE8; color: #F0E9FF; box-shadow: 0 4px 18px #05040C6B; }
.map-counter i { color: var(--magenta); }
.territory-hud { border-color: #FF19C8B8; border-right-color: var(--turquoise); border-radius: 10px; background: linear-gradient(105deg,#241052F2,#100D1EF5 62%,#091521F2); box-shadow: 0 9px 34px #05030CCC,0 0 22px #FF19C82E,inset 0 0 22px #8B2CFF12; clip-path: none; }
.territory-hud::before { background: linear-gradient(90deg,#FF19C8,#8B2CFF 55%,#00DFFF); }
.hud-signal { border-color: #FF4F91; color: #FF4F91; box-shadow: 0 0 15px #FF19C855,inset 0 0 12px #8B2CFF33; }
.hud-state { color: #8DEEFF; border-color: #00DFFF55; background: #081820; }
.territory-panel .panel-kicker { color: #CABDDD; }
.territory-status { color: #B7AEC9; }
.status-chip { border: 1px solid #00DFFF66; border-radius: 5px; background: #092735; color: #8DF4FF; }
.status-chip.occupied { border-color: #FF4F9166; background: #37112D; color: #FF7DAB; }
.territory-commune { color: #8DEEFF; }
.selection-summary { border-color: #69428A; border-radius: 9px; background: linear-gradient(135deg,#1A1230,#0E1020); box-shadow: inset 0 1px #FFFFFF0A; }
.price-block { border-left-color: var(--magenta); border-radius: 0 9px 9px 0; background: linear-gradient(115deg,#241052,#151025 80%); box-shadow: inset 0 1px #FFFFFF0A,0 6px 18px #0807115C; }
.price-block > strong { color: #FFD15C; text-shadow: 0 0 15px #FFD15C32; }
.territory-meta { border-bottom-color: #52366E; }
.territory-panel-footer { color: #9B8FB0; }
.territory-panel-footer span:last-child { color: #00DFFF; text-shadow: 0 0 12px #00DFFF; }
.map-data-pending { margin-top: 11px; padding: 10px 12px; border: 1px solid #FF4F9166; border-radius: 7px; background: #FF4F9110; color: #FFB8CC; font-size: 12px; line-height: 1.4; }
.player-dialog,.invasion-alert-card,.checkout-card {
  border-color: #8B2CFF88;
  border-radius: 14px;
  background: linear-gradient(145deg,#1A1230F7,#100D1EF8 66%,#0E1220F7);
  box-shadow: 0 24px 80px #04030CCC,0 0 28px #8B2CFF24,inset 0 1px #FFFFFF10;
}
.player-dialog::backdrop { background: #05040DD9; backdrop-filter: blur(7px); }
.dialog-kicker { color: #91EEFF; }
.player-dialog h2,.invasion-alert-card h2 { color: #F5F1FF; }
.player-dialog h2 em { color: var(--magenta); text-shadow: 0 0 15px #FF19C840; }
.form-grid label,.password-form label,.dedication-form label { color: #E5DDF4; }
.badge-picker { border-color: #583778; border-radius: 9px; background: #0D0B18; }
.badge-choice { border-color: #37284F; border-radius: 7px; background: #151025; }
.badge-choice:hover,.badge-choice:has(input:checked) { border-color: var(--magenta); background: #241052; box-shadow: 0 0 14px #FF19C82D; }
.field-help { color: #B9AEC9; }
.data-panel,.checkout-card,.provider-box,.admin-workspace .admin-grid > .data-panel {
  border-color: #513773;
  border-radius: 11px;
  background: linear-gradient(145deg,#171228F0,#100D1DEB 75%,#0E101BEB);
  box-shadow: 0 10px 28px #05030C59,inset 0 1px #FFFFFF0B;
}
.panel-heading,.admin-workspace .panel-heading {
  border-bottom-color: #573777;
  background: linear-gradient(95deg,#241052B8,#171228C9 65%,#121020C9);
  color: #F5F1FF;
}
.panel-heading span { color: #FF75DB; }
.panel-heading b { color: #91EFFF; }
th,td { border-bottom-color: #FFFFFF12; }
th { color: #B6A8CF; }
td { color: #E6E0F0; }
tbody tr:hover td,.admin-workspace .table-wrap tr:hover td { background: #8B2CFF13; }
.profile-hero { border-radius: 12px; background: linear-gradient(115deg,color-mix(in srgb,var(--player-color) 15%,#241052),#151025 68%); box-shadow: 0 12px 30px #05030C70; }
.checkout-summary,.checkout-territories,.provider-box { border-color: #52366F; background-color: #151025; }
.checkout-summary strong,.provider-title { color: #F5F1FF; }
.sandbox-badge { border-color: #8B2CFF88; border-radius: 7px; background: #24105266; color: #FFD15C; }
.toast { border-color: #8B2CFF; border-radius: 9px; background: #151025F5; box-shadow: 0 12px 35px #05030CA8,0 0 20px #8B2CFF30; }
.admin-topbar,.admin-sidebar { background: linear-gradient(180deg,#100D1EF5,#0C0A18F7); border-color: #563878; }
.admin-brand strong { color: #FFF; font: 700 18px var(--font-ui); letter-spacing: .09em; }
.admin-brand small { color: #8DEEFF; }
.admin-sidebar-label { color: #9E91B8; }
.admin-nav-link { border: 1px solid transparent; border-radius: 7px; color: #D6CDE7; }
.admin-nav-link:hover { border-color: #8B2CFF65; background: #24105280; color: #FFF; }
.admin-nav-link.is-active { border-color: #FF19C866; background: linear-gradient(100deg,#FF19C82B,#8B2CFF42,#176BFF20); color: #FFF; box-shadow: inset 3px 0 #FF19C8,0 0 18px #8B2CFF20; }
.admin-nav-link.is-active > span,.admin-nav-link.is-active small { color: #8DEEFF; }
.admin-back-map { border-color: #563878; color: #8DEEFF; }
.admin-workspace-heading h1 { color: #FFF; text-shadow: 0 0 18px #8B2CFF30; }
.admin-stat-card { border-color: #50356C; border-radius: 10px; background: linear-gradient(145deg,#1A1430,#12101F); box-shadow: 0 8px 24px #05030C70,inset 0 1px #FFFFFF0A; }
.admin-stat-card:nth-child(1) { border-left-color: #FF19C8; }
.admin-stat-card:nth-child(2) { border-left-color: #8B2CFF; }
.admin-stat-card:nth-child(3) { border-left-color: #00DFFF; }
.admin-stat-card:nth-child(4) { border-left-color: #FFD15C; }
.admin-stat-card:hover { border-color: #B946FF; box-shadow: 0 12px 26px #8B2CFF24; }
.admin-quick-links a { border-color: #49336A; border-radius: 7px; background: #151025; color: #E8E0F4; }
.admin-quick-links a:hover { border-color: #FF19C8; background: #241052; box-shadow: 0 0 16px #FF19C822; }
.admin-quick-links a span { color: #00DFFF; }
.admin-dashboard-welcome .panel-heading { background: linear-gradient(95deg,#241052B8,#171228C9 65%,#121020C9); }
.admin-workspace .admin-grid > .data-panel { box-shadow: 0 10px 28px #05030C59,inset 0 1px #FFFFFF0B; }
input:not([type="radio"]):not([type="checkbox"]):not([type="color"]):focus,select:focus,textarea:focus { outline: none; border-color: #00DFFF !important; box-shadow: 0 0 0 2px #00DFFF22,0 0 14px #00DFFF24; }
input::placeholder,textarea::placeholder { color: #897E9F !important; opacity: 1; }
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible { outline: 2px solid #00DFFF; outline-offset: 2px; }
@media (hover:hover) {
  .activity-item,.profile-territory,.rank-row { transition: background .16s ease,transform .16s ease; }
  .activity-item:hover,.profile-territory:hover,.rank-row:hover { background: #8B2CFF10; }
  .admin-stat-card:hover { transform: translateY(-3px); }
}
@media (max-width: 680px) {
  .brand { min-width: auto; }
  .map-logo-lockup { min-height: 48px; padding: 6px 9px 6px 6px; gap: 7px; border-radius: 9px; }
  .map-logo-mark { width: 34px; height: 34px; border-radius: 7px; font-size: 18px; }
  .map-logo-lockup strong { font-size: 12px; }
  .map-logo-lockup small { font-size: 8px; }
  .invasion-alert { padding: 12px; }
  .invasion-alert-card { padding: 18px; border-radius: 12px; }
  .admin-brand strong { font-size: 14px; }
}

/* Admin theme layer; final cascade overrides follow the legacy layout rules. */
body:has(.admin-layout) { color: var(--text); background: radial-gradient(ellipse at 70% 0%,#3B146155,transparent 42%),var(--ink); }
.admin-topbar { background: linear-gradient(100deg,#0B0915F5,#100B20F2 54%,#0B0A18F5); border-color: #4C2B67; box-shadow: 0 8px 30px #05030CB8,inset 0 -1px #FF19C820; }
.admin-sidebar { background: linear-gradient(180deg,#100D1EF5,#0C0A18F7); border-color: #563878; }
.admin-nav-link { border: 1px solid transparent; border-radius: 7px; color: #D6CDE7; }
.admin-nav-link:hover { border-color: #8B2CFF65; background: #24105280; color: #FFF; }
.admin-nav-link.is-active { border-color: #FF19C866; background: linear-gradient(100deg,#FF19C82B,#8B2CFF42,#176BFF20); color: #FFF; box-shadow: inset 3px 0 #FF19C8,0 0 18px #8B2CFF20; }
.admin-nav-link.is-active > span,.admin-nav-link.is-active small { color: #8DEEFF; }
.admin-back-map { border-color: #563878; color: #8DEEFF; }
.admin-brand strong { color: #FFF; font: 700 18px var(--font-ui); letter-spacing: .09em; }
.admin-brand small { color: #8DEEFF; }
.admin-sidebar-label { color: #9E91B8; }
.admin-workspace-heading h1 { color: #FFF; text-shadow: 0 0 18px #8B2CFF30; }
.admin-stat-card { border-color: #50356C; border-radius: 10px; background: linear-gradient(145deg,#1A1430,#12101F); box-shadow: 0 8px 24px #05030C70,inset 0 1px #FFFFFF0A; }
.admin-stat-card:nth-child(1) { border-left-color: #FF19C8; }
.admin-stat-card:nth-child(2) { border-left-color: #8B2CFF; }
.admin-stat-card:nth-child(3) { border-left-color: #00DFFF; }
.admin-stat-card:nth-child(4) { border-left-color: #FFD15C; }
.admin-stat-card:hover { border-color: #B946FF; box-shadow: 0 12px 26px #8B2CFF24; }
.admin-quick-links a { border-color: #49336A; border-radius: 7px; background: #151025; color: #E8E0F4; }
.admin-quick-links a:hover { border-color: #FF19C8; background: #241052; box-shadow: 0 0 16px #FF19C822; }
.admin-quick-links a span { color: #00DFFF; }
.admin-workspace .admin-grid > .data-panel { border-color: #513773; border-radius: 11px; background: linear-gradient(145deg,#171228F0,#100D1DEB 75%,#0E101BEB); box-shadow: 0 10px 28px #05030C59,inset 0 1px #FFFFFF0B; }
.admin-workspace .panel-heading { border-bottom-color: #573777; background: linear-gradient(95deg,#241052B8,#171228C9 65%,#121020C9); }
.admin-workspace th { color: #B6A8CF; }
.admin-workspace td { border-bottom-color: #FFFFFF12; }
.admin-workspace .table-wrap tr:hover td { background: #8B2CFF13; }
.admin-login-wrap { background: transparent; }
.admin-login { border-color: #69428A; border-radius: 14px; background: linear-gradient(145deg,#1A1230F7,#100D1EF8 66%,#0E1220F7); box-shadow: 0 24px 80px #04030CCC,0 0 28px #8B2CFF24,inset 0 1px #FFFFFF10; }
.admin-login .admin-form label { color: #E5DDF4; }
.admin-login .admin-form input { border-color: #50396C; border-radius: 6px; background: #0C0A17; color: var(--text); }
.admin-login .admin-form input:focus { border-color: var(--turquoise); box-shadow: 0 0 0 2px #00DFFF22,0 0 14px #00DFFF24; }
.admin-login > p { color: #B8ADC9; }
@media (max-width: 680px) { .admin-brand strong { font-size: 14px; } }

/* City popup, mobile module tabs, radio and territory actions. */
.city-title { font-size: calc(var(--size-display) * .9); }
.hud-copy { min-width: 0; }
.hud-radio-track { margin-top: 2px; overflow: hidden; color: #FF92E8; font: 600 9px/1.25 var(--font-data); letter-spacing: .045em; text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 0 11px #FF19C839; }
.territory-info-actions { margin-top: 10px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
.territory-action-button { min-width: 0; min-height: 36px; padding: 8px 9px; display: flex; align-items: center; justify-content: center; border: 1px solid #5B4276; border-radius: 7px; background: linear-gradient(125deg,#1B1430,#111020); color: #DCD4EB; font: 700 9px/1.2 var(--font-data); letter-spacing: .025em; text-align: center; text-decoration: none; cursor: pointer; transition: border-color .16s,background .16s,box-shadow .16s,color .16s,transform .16s; }
.territory-action-button.is-primary { border-color: #C846B4; background: linear-gradient(110deg,#5A174B,#2B1854 65%,#132B50); color: #FFF; box-shadow: 0 0 13px #FF19C827; }
.territory-action-button.is-location { color: #9EEFFF; border-color: #3F6A82; }
.territory-action-button:hover { border-color: #00DFFF; background: #14243A; color: #FFF; box-shadow: 0 0 14px #00DFFF25; transform: translateY(-1px); }
.auth-recovery-page { width: min(820px,100%); min-height: calc(100dvh - 66px); margin: 0 auto; padding: clamp(24px,6vw,60px) 18px; }
.auth-recovery-panel { max-width: 620px; margin: 15px auto 0; padding: 18px; border: 1px solid #62417D; border-radius: 12px; background: linear-gradient(145deg,#171228F5,#100D1DF5); box-shadow: 0 18px 50px #05030C88,0 0 24px #8B2CFF20; }
.auth-recovery-panel .panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid #49336A; color: #F5F1FF; font: 800 12px/1.3 var(--font-data); letter-spacing: .08em; }
.auth-recovery-panel .panel-heading b { color: #00DFFF; font-size: 9px; text-align: right; }
.auth-recovery-copy { color: #C6BCD5; font-size: 15px; }
.auth-recovery-form { display: grid; gap: 14px; margin: 18px 0; }
.auth-recovery-form label { display: grid; gap: 6px; color: #E5DDF4; font-size: 14px; font-weight: 700; }
.auth-recovery-form input { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #50396C; border-radius: 6px; background: #0C0A17; color: var(--text); }
.auth-recovery-form input:focus { border-color: #00DFFF; outline: 0; box-shadow: 0 0 0 2px #00DFFF22,0 0 14px #00DFFF24; }
.auth-recovery-form label small { color: #A99CB8; font-size: 12px; font-weight: 500; }
.auth-recovery-message { padding: 10px 12px; border: 1px solid #00DFFF55; border-radius: 6px; background: #00DFFF0D; color: #B8F5FF; font-size: 14px; }
.auth-recovery-message.is-error { border-color: #FF4F9180; background: #FF4F910D; color: #FFC4D8; }
.radio-controls { grid-template-columns: .9fr .9fr 1.35fr .9fr; }
.radio-controls button { display: flex; align-items: center; justify-content: center; }
.radio-controls button svg { width: 15px; height: 15px; display: block; }
.radio-controls button#radioToggle { border-color: #A345CE; color: #FFF; background: linear-gradient(100deg,#3A1644,#152A49); box-shadow: inset 0 0 13px #FF19C815; font-size: 9px; font-weight: 900; letter-spacing: .08em; }
.radio-controls button#radioPause { border-color: #456185; color: #A6ECFF; background: #111A2A; }
.radio-controls button:focus-visible { outline: 2px solid #00DFFF; outline-offset: 2px; }
.map-toolbar > div.map-logo-image-lockup:first-child:not(.map-toolbar-tools) { width: 159.12px; height: 159.12px; min-height: 0; padding: 0; display: block; flex: 0 0 auto; border: 0; border-radius: 50%; background: transparent; box-shadow: none; backdrop-filter: none; }
.map-logo-official { width: 100%; height: 100%; display: block; object-fit: contain; filter: drop-shadow(0 4px 10px #000C) drop-shadow(0 0 9px #8B2CFF70); }
.song-recommendation { margin: 12px 0 0; padding: 11px; border: 1px solid #68458A; border-radius: 8px; background: linear-gradient(145deg,#171025,#0C0A16); box-shadow: inset 0 1px #FFFFFF0A,0 0 16px #8B2CFF12; }
.song-recommendation-heading { margin-bottom: 9px; display: flex; align-items: center; justify-content: space-between; gap: 7px; }
.song-recommendation-heading strong { color: #F5F1FF; font: 800 10px/1.2 var(--font-data); letter-spacing: .08em; }
.song-recommendation-heading span { flex: 0 0 auto; color: #00DFFF; font: 700 8px var(--font-data); }
.song-recommendation form { display: grid; gap: 8px; }
.song-recommendation label { min-width: 0; display: grid; gap: 4px; color: #CFC2E1; font: 700 9px var(--font-data); }
.song-recommendation input { width: 100%; min-width: 0; min-height: 36px; padding: 7px 8px; border: 1px solid #4C3B60; border-radius: 5px; background: #0B0912; color: #F5F1FF; font: 11px var(--font-ui); }
.song-recommendation input::placeholder { color: #81768D; }
.song-recommendation .button { width: 100%; min-height: 34px; margin-top: 1px; }
.song-recommendation > p { margin: 0 0 8px; color: #B6ABC7; font-size: 10px; line-height: 1.4; }
.recommendation-toggle-form { max-width: 760px; }
.recommendation-toggle-form .button { width: fit-content; }
.recommendation-youtube-link { color: #8DEEFF; font: 700 10px var(--font-data); text-decoration: none; white-space: nowrap; }
.recommendation-youtube-link:hover { color: #FFF; text-decoration: underline; text-underline-offset: 3px; }
.city-popup-dialog { position: fixed; inset: 0; width: min(1040px,calc(100vw - 28px)); max-width: none; max-height: min(92dvh,880px); margin: auto; padding: 12px; overflow: visible; border: 1px solid #FF19C899; border-radius: 16px; background: linear-gradient(145deg,#151025F7,#090711F8); box-shadow: 0 28px 100px #000E,0 0 40px #8B2CFF38; }
.city-popup-dialog::backdrop { background: #05030DDC; backdrop-filter: blur(8px); }
.city-popup-dialog > img { width: 100%; max-height: min(75dvh,740px); display: block; object-fit: contain; border-radius: 9px; }
.city-popup-dismiss { position: absolute; z-index: 1; top: 17px; right: 17px; margin: 0; }
.city-popup-dismiss button { width: 38px; height: 38px; border: 1px solid #FF7BDB; border-radius: 50%; background: #0B0815E8; color: #FFF; font-size: 26px; cursor: pointer; box-shadow: 0 0 16px #FF19C844; }
.city-popup-enter { margin: 10px 0 0; display: flex; justify-content: center; }
.city-popup-enter .button { min-width: min(290px,100%); }
.popup-admin-preview { position: relative; max-width: 880px; margin: 8px 16px 16px; padding: 12px; border: 1px solid #513773; border-radius: 10px; background: #0A0814; }
.popup-admin-preview img { width: 100%; max-height: 390px; display: block; object-fit: contain; }
.popup-admin-preview span { position: absolute; top: 18px; left: 18px; padding: 6px 9px; border: 1px solid #00DFFF66; border-radius: 5px; background: #081820E8; color: #8DEEFF; font: 700 9px var(--font-data); letter-spacing: .08em; }
.popup-admin-empty { margin: 16px; padding: 20px; border: 1px dashed #69428A; border-radius: 8px; color: #B8ADC9; text-align: center; }
.popup-upload-form { max-width: 880px; }
.popup-admin-actions { margin: 0 16px 16px; display: flex; flex-wrap: wrap; gap: 9px; }
.popup-admin-actions form { margin: 0; }
.mobile-game-tabs { display: none; }
.mobile-panel-close,.territory-panel-toggle,.mobile-territory-summary { display: none; }
.mobile-panel-section { display: contents; }
@media (max-width: 680px) {
  .mobile-game-tabs { position: fixed; z-index: 1100; left: 0; right: 0; bottom: 0; min-height: calc(62px + env(safe-area-inset-bottom)); padding: 5px max(7px,env(safe-area-inset-right)) max(5px,env(safe-area-inset-bottom)) max(7px,env(safe-area-inset-left)); display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 3px; border-top: 1px solid #604084; background: linear-gradient(100deg,#0D0919F5,#171025F4 52%,#0C0B1AF5); box-shadow: 0 -8px 30px #05030CB8,0 -1px #FF19C820; backdrop-filter: blur(14px); }
  .mobile-game-tabs button { min-width: 0; padding: 4px 1px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: #B8ADC9; cursor: pointer; }
  .mobile-game-tabs button > span { font: 700 17px/1 var(--font-ui); }
  .mobile-game-tabs button > small { max-width: 100%; overflow: hidden; color: inherit; font: 700 7.3px/1.1 var(--font-data); letter-spacing: .015em; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-game-tabs button[aria-pressed="true"] { border-color: #FF19C855; background: linear-gradient(140deg,#FF19C820,#8B2CFF28,#176BFF15); color: #FFF; box-shadow: inset 0 0 13px #8B2CFF1C,0 0 12px #FF19C81A; }
  .mobile-game-tabs button[aria-pressed="true"] > span { color: #00DFFF; text-shadow: 0 0 12px #00DFFF7A; }
  .activity-panel { bottom: calc(68px + env(safe-area-inset-bottom)); max-height: min(54dvh,440px); padding: 54px 15px 15px; border-color: #744C9B; border-radius: 12px; background: linear-gradient(160deg,#151025F7,#0D0B18F8); }
  .mobile-panel-close { position: absolute; top: 8px; right: 8px; z-index: 5; width: 38px; height: 38px; padding: 0; display: grid; place-items: center; border: 1px solid #8B2CFF99; border-radius: 8px; background: #241052; color: #F5F1FF; font: 500 25px/1 var(--font-ui); cursor: pointer; box-shadow: 0 0 14px #8B2CFF30; }
  .territory-panel-heading { display: flex; align-items: center; gap: 7px; }
  .territory-panel-toggle { width: 38px; height: 36px; flex: 0 0 auto; padding: 0; display: grid; place-items: center; border: 1px solid #00DFFF75; border-radius: 7px; background: #151025; color: #8DEEFF; font: 700 20px/1 var(--font-ui); cursor: pointer; }
  .territory-panel:not(.is-selected) .territory-panel-toggle,.territory-panel:not(.is-selected) .mobile-territory-summary { display: none; }
  .mobile-territory-summary { min-width: 0; flex: 1 1 auto; display: block; overflow: hidden; color: #F5F1FF; font: 700 9px/1.15 var(--font-data); letter-spacing: .015em; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
  .territory-panel.is-selected:not(.is-expanded) .territory-detail,.territory-panel.is-selected:not(.is-expanded) .territory-empty,.territory-panel.is-selected:not(.is-expanded) .territory-panel-footer { display: none !important; }
  .mobile-panel-section { display: block; }
  .activity-panel [data-mobile-section] { display: none !important; }
  body[data-mobile-view="activity"] .activity-panel [data-mobile-section="activity"],
  body[data-mobile-view="radio"] .activity-panel [data-mobile-section="radio"],
  body[data-mobile-view="chat"] .activity-panel [data-mobile-section="chat"],
  body[data-mobile-view="communes"] .activity-panel [data-mobile-section="communes"],
  body[data-mobile-view="dedications"] .activity-panel [data-mobile-section="dedications"] { display: block !important; }
  body[data-mobile-view="map"] .activity-panel { visibility: hidden; opacity: 0; pointer-events: none; }
  body[data-mobile-view="map"] .territory-panel { bottom: calc(62px + env(safe-area-inset-bottom)); max-height: min(60dvh,510px); }
  body[data-mobile-view="map"] .territory-panel.is-selected:not(.is-expanded) { height: 68px; max-height: 68px; overflow: hidden; }
  body[data-mobile-view="map"] .territory-panel.is-selected.is-expanded { height: min(55dvh,450px); max-height: min(55dvh,450px); overflow-y: auto; }
  body[data-mobile-view="map"] .territory-panel:not(.is-selected)::after { bottom: calc(75px + env(safe-area-inset-bottom)); }
  body[data-mobile-view="map"] .map-coordinates { bottom: calc(90px + env(safe-area-inset-bottom)); }
  body[data-mobile-view]:not([data-mobile-view="map"]) .territory-panel { display: none; }
  .territory-info-actions { gap: 5px; margin-top: 7px; }
  .territory-action-button { min-height: 34px; padding: 7px 5px; font-size: 8px; }
  .city-popup-dialog { width: calc(100vw - 18px); max-height: calc(92dvh - env(safe-area-inset-top)); padding: 8px; border-radius: 12px; }
  .city-popup-dialog > img { max-height: 75dvh; }
  .city-popup-dismiss { top: 12px; right: 12px; }
  .map-toolbar > div.map-logo-image-lockup:first-child:not(.map-toolbar-tools) { width: 115.44px; height: 115.44px; }
  .song-recommendation { margin-top: 9px; padding: 9px; }
}
@media (max-width: 920px) {
  .activity-panel.is-open { position: fixed; z-index: 950; top: 74px; right: 9px; bottom: 14px; left: 9px; width: min(480px,calc(100vw - 18px)); max-height: none; display: flex; overflow-y: auto; border: 1px solid #744C9B; border-radius: 12px; background: linear-gradient(160deg,#151025F7,#0D0B18F8); visibility: visible; opacity: 1; transform: none; }
  .activity-panel.is-open .mobile-panel-close { position: fixed; top: 82px; right: 17px; display: grid; }
}
@media (max-width: 680px) {
  .activity-toggle { display: none !important; }
  .activity-panel.is-open { top: auto; right: 9px; bottom: calc(68px + env(safe-area-inset-bottom)); left: 9px; width: auto; max-height: min(54dvh,440px); }
  .activity-panel.is-open .mobile-panel-close { position: absolute; top: 8px; right: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Responsive layout for the private operations panel */
body:has(.admin-layout) { background: #10141c; }
.admin-topbar { min-height: 64px; padding: 9px 22px; display: flex; align-items: center; gap: 20px; border-bottom: 1px solid #262d39; background: #171c25; }
.admin-brand { display: flex; align-items: center; gap: 10px; color: #f5f7fb; text-decoration: none; }
.admin-brand > span:last-child { display: grid; gap: 2px; }
.admin-brand strong { font: 700 14.95px var(--font-display); letter-spacing: .09em; }
.admin-brand small { color: #8993a3; font: 700 9.2px var(--font-data); letter-spacing: .16em; }
.admin-top-actions { display: flex; align-items: center; gap: 16px; color: #aab3c0; }
.admin-layout { min-height: calc(100dvh - 64px); display: grid; grid-template-columns: 238px minmax(0,1fr); align-items: start; }
.admin-sidebar { min-height: calc(100dvh - 64px); height: calc(100dvh - 64px); padding: 18px 11px 14px; position: sticky; top: 64px; display: flex; flex-direction: column; border-right: 1px solid #252c37; background: #171c25; }
.admin-sidebar-label { padding: 7px 12px 12px; color: #697586; font: 700 10.35px var(--font-data); letter-spacing: .16em; }
.admin-sidebar nav { display: grid; gap: 3px; }
.admin-nav-link { min-height: 41px; padding: 8px 10px; display: flex; align-items: center; gap: 11px; border-radius: 4px; color: #c3cad4; font-size: 13.8px; text-decoration: none; transition: background .14s,color .14s; }
.admin-nav-link > span { width: 20px; color: #8b97a8; font-size: 18.4px; text-align: center; }
.admin-nav-link small { margin-left: auto; color: #7c8797; font: 700 9.2px var(--font-data); }
.admin-nav-link:hover { background: #202733; color: #fff; }
.admin-nav-link.is-active { background: linear-gradient(90deg,#c51ba7,#a21bd4); color: #fff; box-shadow: 0 4px 14px #d425bb26; }
.admin-nav-link.is-active > span,.admin-nav-link.is-active small { color: #fff; }
.admin-back-map { margin: auto 10px 5px; padding: 12px 3px 0; border-top: 1px solid #2b3340; color: #36DDF5; font: 700 10.35px var(--font-data); letter-spacing: .07em; text-decoration: none; }
.admin-workspace { min-width: 0; padding: 27px clamp(16px,3vw,42px) 48px; }
.admin-workspace-heading { margin-bottom: 23px; display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.admin-workspace-heading .page-eyebrow { margin-bottom: 7px; color: #939dad; }
.admin-workspace-heading h1 { margin: 0; color: #f5f7fb; font: 700 clamp(27.6px,3.45vw,39.1px) var(--font-display); letter-spacing: -.02em; }
.admin-secure-mark { display: inline-flex; align-items: center; gap: 7px; padding: 7px 9px; border: 1px solid #303846; border-radius: 4px; color: #9ca7b6; font: 700 9.2px var(--font-data); letter-spacing: .08em; }
.admin-secure-mark i { width: 6px; height: 6px; border-radius: 50%; background: #36DDF5; box-shadow: 0 0 9px #36DDF5; }
.admin-overview { margin-bottom: 16px; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; }
.admin-stat-card { min-height: 120px; padding: 17px; display: grid; align-content: start; gap: 8px; border: 1px solid #2b3340; border-left: 3px solid #d122b6; border-radius: 4px; background: #191f29; text-decoration: none; transition: transform .15s,border-color .15s; }
.admin-stat-card:nth-child(2) { border-left-color: #8f3de0; }
.admin-stat-card:nth-child(3) { border-left-color: #36DDF5; }
.admin-stat-card:nth-child(4) { border-left-color: #718099; }
.admin-stat-card:hover { transform: translateY(-2px); border-color: #4c5666; }
.admin-stat-card > span { color: #9aa5b4; font: 700 10.35px var(--font-data); letter-spacing: .09em; }
.admin-stat-card strong { color: #f4f6fa; font: 700 32.2px var(--font-display); }
.admin-stat-card small { color: #8490a0; font-size: 11.5px; }
.admin-dashboard-welcome { margin-top: 14px; }
.admin-quick-links { padding: 14px; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; }
.admin-quick-links a { min-height: 46px; padding: 10px 12px; display: flex; justify-content: space-between; align-items: center; border: 1px solid #2b3340; border-radius: 3px; background: #141923; color: #d7dde6; font-size: 12.65px; text-decoration: none; }
.admin-quick-links a span { color: #36DDF5; }
.admin-quick-links a:hover { border-color: #c51ba7; color: #fff; }
.admin-workspace .admin-grid { grid-template-columns: minmax(0,1fr); gap: 15px; }
.admin-workspace .admin-grid > .data-panel { grid-column: auto; border-color: #2b3340; border-radius: 4px; background: #191f29; box-shadow: 0 3px 14px #0002; }
.admin-workspace .panel-heading { border-bottom-color: #2b3340; background: #1d2430; }
.admin-workspace .table-wrap { padding: 10px 14px 14px; }
.admin-workspace table { min-width: 680px; }
.admin-workspace th { color: #8995a6; }
.admin-workspace td { border-bottom-color: #29313d; }
.admin-workspace .wompi-admin-content,.admin-workspace .map-import-content { background: transparent; }
.admin-workspace .wompi-admin-content > p { color: #aeb8c5; }
.admin-workspace .table-wrap tr:hover td { background: #202733; }
@media (max-width: 900px) {
  .admin-layout { grid-template-columns: 205px minmax(0,1fr); }
  .admin-overview { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .admin-quick-links { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 680px) {
  .admin-topbar { min-height: 58px; padding: 8px 12px; }
  .admin-top-actions { gap: 7px; font-size: 9.2px; }
  .admin-top-actions .button { min-height: 32px; padding-inline: 8px; }
  .admin-layout { display: block; }
  .admin-sidebar { min-height: 0; height: auto; padding: 7px; position: static; border-right: 0; border-bottom: 1px solid #252c37; }
  .admin-sidebar-label,.admin-back-map { display: none; }
  .admin-sidebar nav { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 3px; }
  .admin-nav-link { min-height: 36px; padding: 6px; justify-content: center; gap: 5px; font-size: 10.35px; }
  .admin-nav-link > span { width: auto; font-size: 14.95px; }
  .admin-workspace { padding: 20px 11px 34px; }
  .admin-workspace-heading { align-items: start; }
  .admin-secure-mark { font-size: 0; }
  .admin-secure-mark i { width: 8px; height: 8px; }
  .admin-overview { gap: 8px; }
  .admin-stat-card { min-height: 104px; padding: 12px; }
  .admin-stat-card strong { font-size: 27.6px; }
  .admin-quick-links { padding: 9px; gap: 6px; }
  .admin-quick-links a { padding: 8px; font-size: 10.35px; }
  .admin-workspace .admin-grid { grid-template-columns: minmax(0,1fr); }
}

/* Keep the private operations panel in the same visual world as the game. */
body:has(.admin-layout) { color: var(--text); background: radial-gradient(ellipse at 70% 0%,#3B146155,transparent 42%),var(--ink); }
.admin-topbar { background: linear-gradient(100deg,#0B0915F5,#100B20F2 54%,#0B0A18F5); border-color: #4C2B67; box-shadow: 0 8px 30px #05030CB8,inset 0 -1px #FF19C820; }
.admin-sidebar { background: linear-gradient(180deg,#100D1EF5,#0C0A18F7); border-color: #563878; }
.admin-nav-link { border: 1px solid transparent; border-radius: 7px; color: #D6CDE7; }
.admin-nav-link:hover { border-color: #8B2CFF65; background: #24105280; color: #FFF; }
.admin-nav-link.is-active { border-color: #FF19C866; background: linear-gradient(100deg,#FF19C82B,#8B2CFF42,#176BFF20); color: #FFF; box-shadow: inset 3px 0 #FF19C8,0 0 18px #8B2CFF20; }
.admin-nav-link.is-active > span,.admin-nav-link.is-active small { color: #8DEEFF; }
.admin-back-map { border-color: #563878; color: #8DEEFF; }
.admin-brand strong { color: #FFF; font: 700 18px var(--font-ui); letter-spacing: .09em; }
.admin-brand small { color: #8DEEFF; }
.admin-sidebar-label { color: #9E91B8; }
.admin-workspace-heading h1 { color: #FFF; text-shadow: 0 0 18px #8B2CFF30; }
.admin-stat-card { border-color: #50356C; border-radius: 10px; background: linear-gradient(145deg,#1A1430,#12101F); box-shadow: 0 8px 24px #05030C70,inset 0 1px #FFFFFF0A; }
.admin-stat-card:nth-child(1) { border-left-color: #FF19C8; }
.admin-stat-card:nth-child(2) { border-left-color: #8B2CFF; }
.admin-stat-card:nth-child(3) { border-left-color: #00DFFF; }
.admin-stat-card:nth-child(4) { border-left-color: #FFD15C; }
.admin-stat-card:hover { border-color: #B946FF; box-shadow: 0 12px 26px #8B2CFF24; }
.admin-quick-links a { border-color: #49336A; border-radius: 7px; background: #151025; color: #E8E0F4; }
.admin-quick-links a:hover { border-color: #FF19C8; background: #241052; box-shadow: 0 0 16px #FF19C822; }
.admin-quick-links a span { color: #00DFFF; }
.admin-workspace .admin-grid > .data-panel { border-color: #513773; border-radius: 11px; background: linear-gradient(145deg,#171228F0,#100D1DEB 75%,#0E101BEB); box-shadow: 0 10px 28px #05030C59,inset 0 1px #FFFFFF0B; }
.admin-workspace .panel-heading { border-bottom-color: #573777; background: linear-gradient(95deg,#241052B8,#171228C9 65%,#121020C9); }
.admin-workspace th { color: #B6A8CF; }
.admin-workspace td { border-bottom-color: #FFFFFF12; }
.admin-workspace .table-wrap tr:hover td { background: #8B2CFF13; }
.admin-workspace :is(input:not([type="checkbox"]):not([type="radio"]):not([type="color"]),select,textarea) { border-color: #50396C; border-radius: 6px; background: #0C0A17; color: var(--text); }
.admin-workspace :is(label,.form-help,.admin-help,.table-sub) { color: #C7BDD8; }
.admin-workspace input[type="checkbox"],.admin-workspace input[type="radio"] { accent-color: var(--magenta); }
.admin-workspace .button-danger { border-color: #A33D71; background: #37112D; color: #FFC2D7; }
.admin-workspace .button-danger:hover { border-color: var(--rose); background: #4A173B; box-shadow: 0 0 15px #FF4F912B; }
.admin-login { border-color: #69428A; border-radius: 14px; background: linear-gradient(145deg,#1A1230F7,#100D1EF8 66%,#0E1220F7); box-shadow: 0 24px 80px #04030CCC,0 0 28px #8B2CFF24,inset 0 1px #FFFFFF10; }
.admin-login .admin-form label { color: #E5DDF4; }
.admin-login .admin-form input { border-color: #50396C; border-radius: 6px; background: #0C0A17; color: var(--text); }
.admin-login .admin-form input:focus { border-color: var(--turquoise); box-shadow: 0 0 0 2px #00DFFF22,0 0 14px #00DFFF24; }
.admin-login > p { color: #B8ADC9; }
@media (max-width: 680px) { .admin-brand strong { font-size: 14px; } }
