.pl3x-territory-page {
  --territory-bg: #090c0a;
  --territory-panel: #111613;
  --territory-panel-soft: #171e18;
  --territory-line: rgba(208,220,184,.14);
  --territory-muted: #a6ad9c;
  --territory-cream: #eff2df;
  --territory-green: #b1d76e;
  --territory-gold: #efbd56;
  --territory-red: #e56c4e;
  background: radial-gradient(ellipse at 90% 12%,rgba(93,129,58,.08),transparent 34%),var(--territory-bg);
  color: var(--territory-cream);
}
.pl3x-territory-page .site-header { border-bottom-color: rgba(177,215,110,.12); background: rgba(7,10,8,.95); backdrop-filter: blur(14px); }
.pl3x-territory-page .brand-monogram { background: linear-gradient(145deg,#c4e985,#5c843d); color: #11190d; box-shadow: 0 0 22px rgba(177,215,110,.15); }
.pl3x-territory-page .ledger-live-rail { border-color: rgba(177,215,110,.1); background: #101411; }
.pl3x-territory-page .ledger-live-rail a,.pl3x-territory-page .ledger-live-rail b { color: var(--territory-green); }
.territory-page { min-height: 100vh; padding-bottom: 70px; }
.territory-hero { position: relative; overflow: hidden; padding-top: 151px; border-bottom: 1px solid var(--territory-line); background: radial-gradient(ellipse at 78% 36%,rgba(118,153,69,.17),transparent 34%),linear-gradient(120deg,#101610,#151c13 58%,#202013); }
.territory-hero::before { position: absolute; inset: 0; background-image: linear-gradient(rgba(177,215,110,.025) 1px,transparent 1px),linear-gradient(90deg,rgba(177,215,110,.025) 1px,transparent 1px); background-size: 42px 42px; mask-image: linear-gradient(90deg,#000,transparent 82%); content: ""; pointer-events: none; }
.territory-hero-inner { position: relative; display: grid; grid-template-columns: minmax(0,1.2fr) minmax(250px,.8fr); align-items: center; gap: 58px; padding-top: 36px; padding-bottom: 55px; }
.territory-kicker,.territory-section-kicker { margin: 0; color: var(--territory-green); font-size: 9px; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; }
.territory-kicker { display: flex; align-items: center; gap: 9px; }
.territory-kicker span { width: 7px; height: 7px; border-radius: 50%; background: #8cda9a; box-shadow: 0 0 11px rgba(140,218,154,.55); }
.territory-hero h1 { margin: 24px 0 0; color: var(--territory-cream); font-family: var(--display); font-size: clamp(64px,8vw,108px); font-weight: 900; letter-spacing: -.04em; line-height: .8; text-transform: uppercase; }
.territory-hero h1 em,.territory-section-heading h2 em { color: var(--territory-green); font-style: normal; }
.territory-hero-copy { max-width: 655px; margin: 22px 0 0; color: #b7bcad; font-size: 13px; line-height: 1.75; }
.territory-hero-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 21px; }
.territory-button { min-height: 43px; display: inline-flex; align-items: center; gap: 16px; padding: 0 13px; border: 1px solid var(--territory-line); color: var(--territory-cream); font-size: 8px; font-weight: 900; letter-spacing: .1em; text-decoration: none; text-transform: uppercase; transition: border-color .16s ease,background .16s ease,color .16s ease; }
.territory-button-primary { border-color: #a9d26a; background: #a4c95f; color: #17200f; }
.territory-button-primary:hover { border-color: #d1ef96; background: #c1e879; }
.territory-button-quiet:hover { border-color: rgba(177,215,110,.48); color: var(--territory-green); }
.territory-hero-stats { display: grid; grid-template-columns: 1fr; border: 1px solid rgba(177,215,110,.2); background: linear-gradient(145deg,rgba(177,215,110,.05),transparent 58%),rgba(7,10,8,.72); box-shadow: 8px 8px 0 rgba(0,0,0,.17); }
.territory-hero-stats>div { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 56px; padding: 10px 15px; border-bottom: 1px solid rgba(208,220,184,.09); }
.territory-hero-stats>div:last-child { border-bottom: 0; }
.territory-hero-stats strong { color: var(--territory-cream); font-family: var(--display); font-size: 25px; font-weight: 800; line-height: 1; text-transform: uppercase; }
.territory-hero-stats span { color: #989f90; font-size: 8px; font-weight: 800; letter-spacing: .08em; text-align: right; text-transform: uppercase; }
.territory-hero-baseline { border-top: 1px solid rgba(208,220,184,.08); background: rgba(5,8,6,.22); }
.territory-hero-baseline .shell { min-height: 35px; display: flex; align-items: center; justify-content: center; gap: 13px; color: #8c9582; font-size: 7px; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.territory-hero-baseline i { width: 3px; height: 3px; background: var(--territory-gold); }

.territory-map-section { padding: 43px 0 48px; border-bottom: 1px solid var(--territory-line); }
.territory-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 25px; margin-bottom: 19px; }
.territory-section-heading h2 { margin: 8px 0 0; color: var(--territory-cream); font-family: var(--display); font-size: clamp(37px,5vw,58px); font-weight: 900; letter-spacing: -.025em; line-height: .88; text-transform: uppercase; }
.territory-section-heading>div>p:last-child { max-width: 620px; margin: 10px 0 0; color: var(--territory-muted); font-size: 10px; line-height: 1.65; }
.territory-map-open { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 14px; min-height: 39px; padding: 0 11px; border: 1px solid rgba(177,215,110,.33); color: var(--territory-green); font-size: 8px; font-weight: 900; letter-spacing: .1em; text-decoration: none; text-transform: uppercase; }
.territory-map-open:hover,.territory-map-open:focus-visible { border-color: var(--territory-green); background: rgba(177,215,110,.08); }
.territory-map-frame { position: relative; overflow: hidden; border: 1px solid rgba(208,220,184,.2); border-top: 3px solid var(--territory-green); background: #0b100c; box-shadow: 0 20px 55px rgba(0,0,0,.28); }
.territory-map-frame::before { position: absolute; z-index: 1; inset: 0; border: 1px solid rgba(255,255,255,.025); content: ""; pointer-events: none; }
.territory-map-frame iframe { display: block; width: 100%; height: min(76vh,820px); min-height: 590px; border: 0; background: #0b100c; }
.territory-map-caption { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px; padding: 10px 1px 0; color: #8c9386; font-size: 8px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.territory-map-caption>span:first-child { display: flex; align-items: center; gap: 8px; }
.territory-map-caption i { width: 6px; height: 6px; border-radius: 50%; background: #91d88e; box-shadow: 0 0 9px rgba(145,216,142,.5); }
.territory-map-caption a { color: #b6d77a; text-decoration: none; }
.territory-map-caption a:hover { color: #d5f0a1; text-decoration: underline; }

.territory-claims-section { padding: 48px 0 53px; border-bottom: 1px solid var(--territory-line); }
.territory-claims-heading { margin-bottom: 19px; }
.territory-world-filter { min-width: min(100%,340px); display: grid; gap: 7px; padding: 12px; border: 1px solid var(--territory-line); background: #101512; }
.territory-world-filter>label { color: #9fa596; font-size: 7px; font-weight: 900; letter-spacing: .11em; text-transform: uppercase; }
.territory-world-filter>div { display: flex; gap: 7px; }
.territory-world-filter select { min-width: 0; flex: 1; min-height: 38px; padding: 0 9px; border: 1px solid rgba(208,220,184,.16); border-radius: 0; background: #090c0a; color: var(--territory-cream); font: inherit; font-size: 10px; color-scheme: dark; }
.territory-world-filter button { min-height: 38px; padding: 0 12px; border: 1px solid #a7d36d; background: #9bc75e; color: #17200f; font-size: 8px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; cursor: pointer; }
.territory-world-filter button:hover { background: #c5e879; }
.territory-world-filter button:disabled { opacity: .5; cursor: not-allowed; }
.territory-empty { padding: 22px; border: 1px solid var(--territory-line); background: linear-gradient(130deg,rgba(177,215,110,.035),transparent 55%),var(--territory-panel); }
.territory-empty>span { color: var(--territory-gold); font-size: 7px; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.territory-empty h3 { margin: 9px 0 5px; color: var(--territory-cream); font-family: var(--display); font-size: 28px; line-height: 1; text-transform: uppercase; }
.territory-empty p { margin: 0; color: var(--territory-muted); font-size: 10px; line-height: 1.7; }
.territory-register-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 10px; padding: 10px 12px; border: 1px solid var(--territory-line); background: #101512; color: #a5ab9a; font-size: 8px; }
.territory-register-bar>strong { margin-left: auto; color: var(--territory-cream); font-family: var(--display); font-size: 20px; font-weight: 800; }
.territory-sync-indicator { display: inline-flex; align-items: center; gap: 6px; color: #e6bb67; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.territory-sync-indicator i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.territory-sync-indicator.is-complete { color: #9bd789; }
.territory-register-cap { margin-left: auto; color: #8e9486; }
.territory-grid-fallback { border: 1px solid var(--territory-line); background: #0f1310; }
.territory-grid-fallback>summary { padding: 12px 14px; color: #c4cfb1; font-size: 9px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; list-style: none; }
.territory-grid-fallback>summary::-webkit-details-marker { display: none; }
.territory-grid-fallback>summary::after { float: right; color: var(--territory-green); content: "+"; font-size: 15px; line-height: .75; }
.territory-grid-fallback[open]>summary::after { content: "−"; }
.territory-grid-fallback>summary:focus-visible { outline: 2px solid var(--territory-green); outline-offset: -3px; }
.territory-grid-fallback>p { margin: 0; padding: 0 14px 12px; color: #929a8c; font-size: 9px; line-height: 1.6; }
.territory-grid-controls { display: flex; flex-wrap: wrap; gap: 5px; padding: 0 14px 10px; }
.territory-grid-controls button { min-width: 32px; min-height: 31px; padding: 0 8px; border: 1px solid rgba(208,220,184,.17); background: #090c0a; color: #e0e7d2; font-size: 11px; font-weight: 800; cursor: pointer; }
.territory-grid-controls button:hover,.territory-grid-controls button:focus-visible { border-color: var(--territory-gold); color: var(--territory-gold); outline: 2px solid rgba(239,189,86,.16); outline-offset: 1px; }
.territory-grid-controls button[data-map-action="reset"] { font-size: 7px; letter-spacing: .08em; text-transform: uppercase; }
.territory-grid-panel { margin: 0 14px 12px; overflow: hidden; border: 1px solid rgba(208,220,184,.12); background: #0a0d0b; }
.territory-grid-canvas { min-height: 260px; max-height: 600px; display: grid; place-items: center; overflow: auto; padding: 22px; background-color: #0a0d0b; background-image: linear-gradient(rgba(177,215,110,.035) 1px,transparent 1px),linear-gradient(90deg,rgba(177,215,110,.035) 1px,transparent 1px); background-size: 24px 24px; }
.territory-grid-map { display: block; width: min(100%,1100px); max-height: 570px; shape-rendering: crispEdges; }
.territory-grid-map:focus-visible { outline: 2px solid var(--territory-gold); outline-offset: 4px; }
.territory-grid-map rect { stroke: rgba(8,11,9,.88); stroke-width: .06; }
.territory-grid-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 10px 12px; border-top: 1px solid rgba(208,220,184,.1); color: #8e9587; font-size: 7px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.territory-grid-key { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0; padding: 0 14px 13px; color: #b8bead; font-size: 8px; }
.territory-grid-key>strong { color: #8e9587; font-size: 7px; letter-spacing: .12em; text-transform: uppercase; }
.territory-grid-key>span { display: inline-flex; align-items: center; gap: 5px; }
.territory-grid-key small { color: #8e9587; }
.territory-grid-key i { width: 8px; height: 8px; background: var(--territory-color); }
.territory-color-0 { --territory-color:#f3bd51; }.territory-color-1 { --territory-color:#e87932; }.territory-color-2 { --territory-color:#a84d5d; }.territory-color-3 { --territory-color:#d98b43; }.territory-color-4 { --territory-color:#ac7897; }.territory-color-5 { --territory-color:#728ca1; }.territory-color-6 { --territory-color:#9f9c5b; }.territory-color-7 { --territory-color:#c76536; }
.territory-privacy-note { display: flex; align-items: flex-start; gap: 11px; margin-top: 17px; padding: 12px 14px; border: 1px solid rgba(177,215,110,.16); background: rgba(177,215,110,.035); }
.territory-privacy-note>span { color: var(--territory-green); font-size: 16px; }
.territory-privacy-note p { margin: 0; color: #a0a798; font-size: 9px; line-height: 1.65; }
.territory-privacy-note strong { margin-right: 5px; color: #dce9c8; }
.territory-partial-note { margin: 9px 0 0; color: #b59e6c; font-size: 8px; line-height: 1.6; }

.territory-history-section { padding: 43px 0 56px; }
.territory-history-section .territory-section-heading { align-items: end; margin-bottom: 17px; }
.territory-history-count { flex: 0 0 auto; padding: 7px 9px; border: 1px solid var(--territory-line); color: #b5bcaa; font-size: 7px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.territory-history-list { display: grid; margin: 0; padding: 0; border-top: 1px solid var(--territory-line); list-style: none; }
.territory-history-list li { display: grid; grid-template-columns: 135px minmax(0,1fr) 150px; align-items: center; gap: 12px; padding: 12px 13px; border-bottom: 1px solid rgba(208,220,184,.09); background: rgba(255,255,255,.012); }
.territory-history-list time,.territory-history-list small { color: #8f9589; font-size: 8px; }
.territory-history-list li>div { display: grid; gap: 4px; min-width: 0; }
.territory-history-list strong { color: #e0e4d5; font-size: 10px; }
.territory-history-list li>div span { color: #9ba292; font-size: 9px; overflow-wrap: anywhere; }
.territory-history-list small { text-align: right; }
.pl3x-territory-page .site-footer { border-top: 1px solid var(--territory-line); background: #080a08; }

@media(max-width:850px) {
  .territory-hero-inner { grid-template-columns: minmax(0,1.2fr) minmax(210px,.8fr); gap: 28px; }
  .territory-section-heading { align-items: flex-start; }
  .territory-world-filter { min-width: 250px; }
  .territory-map-frame iframe { height: 68vh; min-height: 520px; }
}
@media(max-width:680px) {
  .territory-hero { padding-top: 132px; }
  .territory-hero-inner { grid-template-columns: 1fr; gap: 25px; padding-top: 25px; padding-bottom: 32px; }
  .territory-hero-stats { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .territory-hero-stats>div { min-height: 64px; align-items: flex-start; flex-direction: column; gap: 5px; padding: 10px; border-right: 1px solid rgba(208,220,184,.09); border-bottom: 0; }
  .territory-hero-stats>div:last-child { border-right: 0; }
  .territory-hero-stats strong { font-size: 21px; }
  .territory-hero-stats span { text-align: left; font-size: 6px; }
  .territory-map-section,.territory-claims-section { padding: 32px 0; }
  .territory-section-heading { flex-direction: column; gap: 14px; }
  .territory-map-open { align-self: flex-start; }
  .territory-map-frame iframe { height: 68vh; min-height: 470px; }
  .territory-world-filter { width: 100%; min-width: 0; }
  .territory-history-list li { grid-template-columns: 1fr auto; gap: 6px 10px; }
  .territory-history-list time { grid-column: 1; }
  .territory-history-list li>div { grid-column: 1/-1; grid-row: 2; }
  .territory-history-list small { grid-column: 2; grid-row: 1; }
}
@media(max-width:480px) {
  .territory-hero { padding-top: 122px; }
  .territory-hero h1 { font-size: 59px; }
  .territory-hero-copy { font-size: 11px; }
  .territory-hero-baseline .shell { justify-content: flex-start; overflow-x: auto; white-space: nowrap; }
  .territory-hero-stats>div { padding: 8px; }
  .territory-map-frame iframe { height: 68vh; min-height: 410px; }
  .territory-map-caption { align-items: flex-start; flex-direction: column; }
  .territory-register-bar>strong { margin-left: 0; }
  .territory-register-cap { width: 100%; margin-left: 0; }
  .territory-grid-canvas { min-height: 220px; padding: 12px; }
}
