/* Where in the Azeroth? (/play/): the street view fills the stage; the box in its top-right corner and the map with
   its panel in the bottom-right corner are the addon's (its Viewer's corner box, AzerothGPS's map window). */
.play { padding: 14px 16px 0; }
.play [hidden] { display: none !important; }
.play-stage {
  position: relative; max-width: 1640px; margin: 0 auto;
  height: calc(100vh - var(--top) - 96px); min-height: 520px; max-height: 1000px;
  border-radius: 14px; overflow: hidden; background: #000;
  border: 1px solid var(--edge-hi); box-shadow: var(--shade);
}

/* The street view: a cube of six pictures, looked at from its middle. */
.sv { position: absolute; inset: 0; overflow: hidden; background: #050608; cursor: grab; touch-action: none; outline: none; }
.sv.dragging { cursor: grabbing; }
.sv:focus-visible { box-shadow: inset 0 0 0 2px rgba(242, 193, 78, 0.6); }
.sv-scene { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform-style: preserve-3d; }
/* (with WebGL the canvas draws the cube; the pictures stay in the page, unshown) */
.sv-gl { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.sv.gl .sv-scene { display: none; }
.sv-face {
  position: absolute; left: -500px; top: -500px; width: 1000px; height: 1000px; max-width: none;
  user-select: none; pointer-events: none; -webkit-user-drag: none;
}

/* The box in the street view's corner. */
.hud {
  position: absolute; top: 12px; right: 12px; z-index: 3; width: 290px;
  padding: 10px 12px 11px; border-radius: 8px;
  background: rgba(0, 0, 0, 0.74); border: 1px solid rgba(255, 209, 0, 0.32);
  font: 500 13.5px/1.45 var(--body); color: #fff; pointer-events: none;
}
.hud-head { font-weight: 650; font-size: 14px; }
.hud-big { font: 750 26px/1.15 var(--body); margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.hud-line { color: #e8e8e8; }
.hud-board { margin-top: 7px; padding-top: 6px; border-top: 1px solid rgba(255, 255, 255, 0.12); }
.hud-board .row { display: flex; gap: 8px; font-size: 13px; line-height: 1.55; font-variant-numeric: tabular-nums; }
.hud-board .name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud-board .row.solo .name { white-space: normal; }
.hud-board .last { width: 64px; text-align: right; }
.hud-board .total { width: 52px; text-align: right; color: #fff; }
.hud-board .row.solo .total { width: auto; color: var(--dim); white-space: nowrap; }
.hud-board .row.you .name { font-weight: 650; }
.celebrate .hud-board .row.winner .name span { animation: roll 2.4s linear infinite; }
@keyframes roll { 0% { filter: hue-rotate(0deg) brightness(1.2); } 100% { filter: hue-rotate(360deg) brightness(1.2); } }

/* The map with the game's panel over it: small while you look, big for the results (and on hover). */
.gmap {
  position: absolute; right: 12px; bottom: 12px; z-index: 4;
  width: 380px; max-height: calc(100% - var(--hud-h, 190px) - 36px); display: flex; flex-direction: column;
  border-radius: 8px; overflow: hidden; background: rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(255, 209, 0, 0.32); box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}
.gm-wrap { position: relative; height: 270px; min-height: 160px; flex: 0 1 auto; }
.gmap:hover, .gmap:focus-within, .gmap.big, .gmap.pinned { width: min(760px, calc(100% - 24px)); }
.gmap:hover .gm-wrap, .gmap:focus-within .gm-wrap, .gmap.big .gm-wrap, .gmap.pinned .gm-wrap { height: 560px; }
#gm-canvas { display: block; width: 100%; height: 100%; cursor: crosshair; touch-action: none; outline: none; }
#gm-canvas.dragging { cursor: grabbing; }
#gm-canvas:focus-visible { box-shadow: inset 0 0 0 2px rgba(242, 193, 78, 0.6); }
.gm-tools { position: absolute; left: 8px; bottom: 8px; display: flex; gap: 4px; }
.gm-tools button {
  width: 28px; height: 28px; padding: 0; border-radius: 6px; cursor: pointer;
  background: rgba(0, 0, 0, 0.7); color: #f3e3b5; border: 1px solid rgba(255, 209, 0, 0.35);
  font: 600 16px/1 var(--body);
}
.gm-tools button:hover { background: rgba(40, 30, 6, 0.9); }
.gm-tools button[aria-pressed="true"] { background: rgba(242, 193, 78, 0.25); }
.gm-tip {
  position: absolute; z-index: 5; pointer-events: none; padding: 6px 9px; border-radius: 6px;
  background: rgba(0, 0, 0, 0.88); border: 1px solid rgba(255, 255, 255, 0.18); font-size: 12.5px; line-height: 1.45; color: #fff;
  white-space: nowrap;
}

.gpanel { padding: 7px 10px 8px; font: 500 13.5px/1.45 var(--body); color: #fff; background: rgba(0, 0, 0, 0.75); }
.gp-top { display: flex; align-items: center; gap: 8px; }
.gp-title { flex: 1; min-width: 0; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gp-timer { font: 700 17px/1 var(--body); font-variant-numeric: tabular-nums; }
.gp-x {
  width: 24px; height: 24px; padding: 0; border-radius: 5px; cursor: pointer;
  background: rgba(120, 20, 10, 0.55); color: #ffd5c8; border: 1px solid rgba(255, 140, 110, 0.45);
  font: 600 17px/1 var(--body);
}
.gp-x:hover { background: rgba(170, 30, 15, 0.8); }
.gp-sub { margin-top: 2px; }
.gp-status { margin-top: 2px; color: #eee; }
.gp-buttons { display: flex; gap: 6px; }
.gp-buttons:has(> :not([hidden])) { margin-top: 6px; }
.celebrate .gmap, .celebrate .hud { transition: box-shadow 0.2s; }

/* Small gold-edged buttons, as the addon's own. */
.chip {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 14px; border-radius: 7px; cursor: pointer;
  background: rgba(0, 0, 0, 0.6); color: #f6efdc; border: 1px solid rgba(255, 209, 0, 0.5);
  font: 600 14.5px/1 var(--body);
}
.chip:hover { background: rgba(60, 44, 8, 0.85); border-color: rgba(255, 209, 0, 0.85); }
.chip-gold { background: linear-gradient(180deg, #ffd96a, #e2a62c); color: #1d1400; border-color: #ffe08a; }
.chip-gold:hover { background: linear-gradient(180deg, #ffe692, #edb33a); }
.chip-back { width: 34px; padding: 0; }
.gpanel .chip { height: 28px; padding: 0 12px; font-size: 13.5px; }

/* The menu. */
.menu {
  position: absolute; inset: 0; z-index: 6; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(ellipse at center, rgba(5, 6, 8, 0.45), rgba(5, 6, 8, 0.82));
}
.menu[hidden] { display: none; }
.menu-card {
  width: min(560px, 100%); max-height: 100%; overflow: auto; padding: 26px 28px 22px; border-radius: 14px;
  background: rgba(14, 15, 18, 0.88); border: 1px solid var(--edge-gold); box-shadow: var(--shade); backdrop-filter: blur(6px);
}
.menu-kicker { margin: 0 0 2px; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); font-weight: 650; }
.menu-card h1 { margin: 0 0 8px; font: 700 clamp(28px, 4vw, 38px)/1.15 var(--display); color: var(--gold-hi); }
.menu-intro { margin: 0 0 18px; color: var(--text-2); }
/* (the menu holds still: its steps share one grid cell, as tall as the tallest, and so do its tips) */
.menu-steps { display: grid; }
.menu-steps > .step { grid-area: 1 / 1; }
.step { display: flex; flex-wrap: wrap; align-items: center; align-content: flex-start; gap: 8px; }
.step.off { visibility: hidden; }
.step-label { color: var(--text-2); font-weight: 600; margin: 0 4px; }
.menu-tip { display: grid; margin: 12px 0 0; color: var(--dim); font-size: 14.5px; }
.menu-tip > span { grid-area: 1 / 1; visibility: hidden; }
.menu-tip > span.on { visibility: visible; }
.menu-scores h3 { margin: 16px 0 6px; font: 600 16px/1.3 var(--body); color: var(--gold-hi); }
.menu-scores .scores { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.menu-scores td { padding: 4px 0; border-top: 1px solid rgba(255, 255, 255, 0.06); color: var(--text-2); }
.menu-scores td.n { text-align: right; padding-left: 12px; white-space: nowrap; }
.menu-scores .kept { margin: 10px 0 0; font-size: 13px; color: var(--dim); }
.menu-account { margin-top: 14px; font-size: 14.5px; color: var(--text-2); }
.menu-account:empty { display: none; }
.menu-account p { margin: 0 0 8px; }
.menu-account .acct-note { color: var(--bad); }
.acct-name { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.acct-name input { height: 34px; padding: 0 10px; border-radius: 7px; border: 1px solid rgba(255, 209, 0, 0.45); background: rgba(0, 0, 0, 0.5); color: var(--text); font: 500 14.5px var(--body); }
.chip-discord { background: #5865f2; border-color: #7983f5; color: #fff; text-decoration: none; }
.chip-discord:hover { background: #4752c4; border-color: #9aa2f7; text-decoration: none; }
.linkish { background: none; border: 0; padding: 0; color: var(--gold-hi); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255, 224, 138, 0.4); }

/* "Want this in WoW?": a line above the game (and the viewer), to StreetView's CurseForge page. */
.get-addon { max-width: 1640px; margin: 0 auto 10px; padding: 0 4px; font-size: 14.5px; line-height: 22px; color: var(--text-2); text-align: center; }
.get-addon a { font-weight: 600; }
.get-addon a::after { content: " \2192"; }
.play-legal { max-width: 1640px; margin: 8px auto 0; padding: 0 4px; font-size: 13px; line-height: 1.45; color: var(--text-2); text-align: center; }
.play-about { margin-top: 26px; }
.play-about h2 { margin-top: 0; padding-top: 0; border-top: 0; }
.play-about .fine-print { font-size: 14px; color: var(--dim); }

/* Phones: the street view on top, the map under it. */
@media (max-width: 760px) {
  .play { padding: 8px 8px 0; }
  .get-addon { margin-bottom: 8px; font-size: 14px; }
  .play-stage { height: auto; min-height: 0; max-height: none; display: flex; flex-direction: column; border-radius: 10px; }
  .sv { position: relative; inset: auto; height: 52vh; min-height: 280px; }
  .hud { top: 8px; right: 8px; width: auto; max-width: calc(100% - 16px); padding: 7px 9px; font-size: 12.5px; }
  .hud-big { font-size: 20px; }
  .gmap, .gmap:hover, .gmap:focus-within, .gmap.big, .gmap.pinned { position: relative; right: auto; bottom: auto; width: 100%; max-height: none; border-radius: 0; border: 0; border-top: 1px solid rgba(255, 209, 0, 0.32); }
  .gm-wrap, .gmap:hover .gm-wrap, .gmap:focus-within .gm-wrap, .gmap.big .gm-wrap, .gmap.pinned .gm-wrap { height: 46vh; min-height: 260px; }
  #gm-size { display: none; }
  .menu { position: absolute; }
  .playing .play-stage { min-height: 0; }
  .play-stage:not(:has(.gmap:not([hidden]))) .sv { height: 78vh; }
}

/* The leaderboard page. */
.board-page { max-width: 900px; margin: 0 auto; padding: 0 16px 40px; }
.board-panel { margin-top: 18px; padding: 20px 22px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--edge-hi); }
.board-tabs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.board-tabs .chip[aria-selected="true"] { background: rgba(242, 193, 78, 0.18); border-color: var(--gold); }
.board-gap { flex: 0 0 12px; }
.board-table { margin-top: 16px; overflow-x: auto; }
.board-table table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.board-table caption { text-align: left; color: var(--dim); font-size: 14px; padding-bottom: 8px; }
.board-table th, .board-table td { padding: 7px 8px; border-top: 1px solid rgba(255, 255, 255, 0.07); text-align: left; color: var(--text-2); }
.board-table th { color: var(--dim); font-weight: 600; font-size: 13.5px; }
.board-table .n { text-align: right; white-space: nowrap; }
.board-table tr.you td { background: rgba(242, 193, 78, 0.10); color: var(--text); }
.board-table .you-tag { color: var(--gold-hi); font-size: 13px; }
.board-empty, .board-you { color: var(--text-2); }
.board-account h2 { margin: 0 0 8px; font: 600 20px/1.3 var(--display); color: var(--gold-hi); }
.board-account p { color: var(--text-2); }
.board-account label { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; color: var(--text-2); }
.acct-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.chip-danger { border-color: rgba(255, 140, 110, 0.6); color: #ffd5c8; }
.chip-danger:hover { background: rgba(170, 30, 15, 0.6); border-color: rgba(255, 140, 110, 0.9); }
.board-account .fine { font-size: 13.5px; color: var(--dim); }

/* The StreetView viewer (/view/): the map fills the stage, the figure in its bottom-right corner (the addon's button
   column there); the street view over it with its arrows on the ground, a bar on top and the small map in a corner. */
.view .play-stage { background: #000; }
.vmap { position: absolute; inset: 0; }
#vm-canvas { display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; outline: none; }
#vm-canvas.dragging { cursor: grabbing; }
#vm-canvas:focus-visible { box-shadow: inset 0 0 0 2px rgba(242, 193, 78, 0.6); }
.vm-head {
  position: absolute; left: 12px; top: 12px; z-index: 2; max-width: min(440px, calc(100% - 24px)); padding: 9px 13px 10px;
  border-radius: 8px; background: rgba(0, 0, 0, 0.74); border: 1px solid rgba(255, 209, 0, 0.32); pointer-events: none;
}
.vm-title { margin: 0; font: 700 18px/1.2 var(--display); letter-spacing: 0.02em; color: var(--gold-hi); }
.vm-hint { margin: 4px 0 0; font-size: 13.5px; line-height: 1.45; color: #e8e8e8; }
.view .gm-tools { left: 12px; bottom: 12px; }
.view .gm-tools button { width: 32px; height: 32px; }
.vm-figure {
  position: absolute; right: 12px; bottom: 12px; z-index: 2; width: 54px; height: 66px; display: grid; place-items: center;
  padding: 0; border-radius: 10px; cursor: grab; touch-action: none;
  background: radial-gradient(circle at 50% 38%, rgba(70, 55, 20, 0.95), rgba(10, 10, 12, 0.92) 70%);
  border: 1px solid rgba(255, 209, 0, 0.55); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
}
.vm-figure img { width: 28px; height: auto; pointer-events: none; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.6)); }
.vm-figure:hover, .vm-figure:focus-visible { border-color: var(--gold-hi); }
.vm-figure.lifted img { opacity: 0.25; }
.vm-ghost {
  position: fixed; left: 0; top: 0; z-index: 50; height: 60px; width: auto; pointer-events: none;
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.55));
}
.vm-toast {
  position: absolute; left: 50%; bottom: 20px; z-index: 6; transform: translateX(-50%); max-width: calc(100% - 24px);
  padding: 8px 14px; border-radius: 8px; background: rgba(0, 0, 0, 0.86); border: 1px solid rgba(255, 209, 0, 0.4);
  color: #fff; font-size: 14px; line-height: 1.4; pointer-events: none; overflow-wrap: anywhere; text-align: center;
}
.view .sv { z-index: 5; }
.vw-arrows { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.vw-arrow {
  position: absolute; left: 0; top: 0; width: 56px; height: 56px; padding: 0; border: 0; background: none;
  cursor: pointer; pointer-events: auto; transform-origin: 50% 50%;
}
.vw-arrow svg {
  display: block; width: 100%; height: 100%; fill: #fff; stroke: rgba(12, 12, 14, 0.9); stroke-width: 3.5;
  stroke-linejoin: round; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.6));
}
.vw-arrow:hover svg, .vw-arrow:focus-visible svg { fill: rgb(255, 217, 89); }
.vw-arrow:focus-visible { outline: none; }
.sv-ghost { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.sv-ghost-shot { position: absolute; inset: 0; width: 100%; height: 100%; transform-origin: 50% 50%; }
.vw-bar { position: absolute; left: 12px; right: 12px; top: 12px; z-index: 3; display: flex; align-items: center; gap: 8px; pointer-events: none; }
.vw-title {
  min-width: 0; padding: 7px 12px; border-radius: 8px; background: rgba(0, 0, 0, 0.74); border: 1px solid rgba(255, 209, 0, 0.32);
  font: 650 14px/1.3 var(--body); color: #fff; white-space: pre; overflow: hidden; text-overflow: ellipsis;
}
.vw-btn, .vw-x {
  pointer-events: auto; height: 34px; border-radius: 8px; cursor: pointer; flex: none;
  background: rgba(0, 0, 0, 0.74); border: 1px solid rgba(255, 209, 0, 0.42); color: #f3e3b5;
}
.vw-btn { margin-left: auto; padding: 0 12px; font: 600 13.5px var(--body); }
.vw-x { width: 34px; padding: 0; color: #fff; font: 500 24px/1 var(--body); }
.vw-btn:hover, .vw-x:hover { background: rgba(40, 30, 6, 0.92); }
.vw-mini {
  position: absolute; right: 12px; bottom: 12px; z-index: 3; width: 240px; height: 240px; border-radius: 8px; overflow: hidden;
  background: #000; border: 1px solid rgba(255, 209, 0, 0.45); box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5); cursor: pointer;
}
.vw-mini:hover { border-color: var(--gold-hi); }
.vw-mini canvas { display: block; width: 100%; height: 100%; pointer-events: none; }
.view .sv .vm-toast { bottom: 64px; }
@media (max-width: 760px) {
  .view .play-stage { display: block; height: calc(100svh - var(--top) - 72px); min-height: 440px; max-height: 900px; }
  .view .sv { position: absolute; inset: 0; height: auto !important; min-height: 0; } /* (the game's phone rule sets 78vh) */
  .vm-head { padding: 7px 10px 8px; }
  .vm-title { font-size: 16px; }
  .vm-hint { font-size: 13px; }
  .vw-title { font-size: 13px; padding: 6px 9px; }
  .vw-btn { padding: 0 9px; font-size: 13px; }
  .vw-mini { width: 128px; height: 128px; right: 8px; bottom: 8px; }
  .view .sv .vm-toast { bottom: 150px; }
}
