/* Country ranking. The player map is a terminal-style window with a pixel world map drawn on a canvas. */
.country-term{--term-bg:#110e16;--term-bar:#1d1824;--term-line:#3b3346;--term-text:#cfc4d8;--term-green:#9fe870;--term-pink:#ff66aa;
  margin:0 4px 20px;background:var(--term-bg);color:var(--term-text);font-family:var(--mono);
  /* 4px "pixel" border with notched corners */
  box-shadow:0 -4px 0 0 var(--term-line),0 4px 0 0 var(--term-line),-4px 0 0 0 var(--term-line),4px 0 0 0 var(--term-line)}
.term-bar{display:flex;align-items:center;gap:12px;padding:8px 12px;background:var(--term-bar);border-bottom:4px solid var(--term-line)}
.term-lights{display:inline-flex;gap:6px;flex:none}.term-lights i{width:8px;height:8px;background:#e8457f}
.term-lights i:nth-child(2){background:#f2c14e}.term-lights i:nth-child(3){background:var(--term-green)}
.term-title{font-size:12px;color:var(--term-green);background:none;padding:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.term-cursor{animation:term-blink 1s steps(1) infinite}
@keyframes term-blink{50%{opacity:0}}
.term-body{display:grid;grid-template-columns:minmax(0,1fr) 220px;gap:16px;padding:16px}
.term-screen{position:relative;align-self:start;background:#0f1320;box-shadow:0 0 0 4px #000,0 0 0 8px var(--term-line)}
.term-screen canvas{display:block;width:100%;height:auto}
.term-side{min-width:0;font-size:12px}
.term-comment{margin:0 0 10px;color:#857a91}.term-side .term-comment:last-child{margin:12px 0 0}
.term-bars{list-style:none;margin:0;padding:0;display:grid;gap:6px}
.term-bars a{display:grid;grid-template-columns:26px minmax(0,1fr) auto;align-items:center;gap:8px;color:var(--term-text);text-decoration:none}
.term-bars a:hover .term-code,.term-bars a:focus-visible .term-code{color:var(--term-pink)}
.term-code{color:var(--term-green)}
.term-track{height:10px;background:#1f1a26}
.term-fill{display:block;height:100%;background:repeating-linear-gradient(90deg,var(--term-pink) 0 6px,transparent 6px 8px)}
.term-num{min-width:2ch;text-align:right}
.term-foot{padding:10px 16px 14px;border-top:4px solid var(--term-line);font-size:12px;line-height:1.7}
.term-foot p{margin:0}.term-prompt{color:var(--term-green);margin-right:6px}
.term-foot a{color:var(--term-pink)}
.country-map-tip{position:absolute;z-index:2;transform:translate(-50%,calc(-100% - 16px));background:#110e16;color:#cfc4d8;font-family:var(--mono);
  padding:6px 10px;font-size:12px;line-height:1.5;white-space:pre;pointer-events:none;border:2px solid #3b3346;box-shadow:4px 4px 0 #000}
@media (max-width:760px){.term-body{grid-template-columns:1fr;padding:12px}.term-side{order:2}}
@media (prefers-reduced-motion:reduce){.term-cursor{animation:none}}
/* The player ranking hides its last three cells on narrow screens; here those are the players and the total. */
.ranking-table.country-rank-table td:not(.hide-xs){display:table-cell}
.country-top{display:inline-flex;gap:4px}
/* Map zoom buttons: pixel-style, top right of the map. */
.country-map-controls{position:absolute;top:8px;right:8px;display:flex;gap:4px;z-index:1}
.country-map-controls button{min-width:28px;height:28px;padding:0 6px;font:12px var(--mono);color:#cfc4d8;background:#1d1824;
  border:2px solid #3b3346;box-shadow:2px 2px 0 #000;cursor:pointer}
.country-map-controls button:hover,.country-map-controls button:focus-visible{color:#ff66aa;border-color:#ff66aa;outline:none}
.country-map-controls button:active{transform:translate(2px,2px);box-shadow:none}
.country-map-controls[data-zoom="out"] button:nth-child(n+2){opacity:.45}
/* Collapsible notice under the map; the owner can replace its text. */
.term-notice summary,.term-notice-edit summary{cursor:pointer;list-style:none;color:var(--term-text)}
.term-notice summary::-webkit-details-marker,.term-notice-edit summary::-webkit-details-marker{display:none}
.term-notice summary::before{content:"[+] ";color:var(--term-green)}
.term-notice[open] summary::before{content:"[-] "}
.term-notice-hint{color:#857a91}
.term-notice > p,.term-notice-text{margin:8px 0 0 18px}
.term-notice-text{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.7}
.term-notice-edit{margin-top:10px}
.term-notice-edit summary{color:#857a91;font-size:11px}
.term-notice-edit form{display:grid;gap:8px;margin-top:8px}
.term-notice-edit textarea{width:100%;box-sizing:border-box;font-family:var(--mono);font-size:12px;background:#1a1520;color:var(--term-text)}
.term-notice-edit button{justify-self:start}
