@font-face {
  font-family: "Tomorrow";
  src: url("fonts/tomorrow/Tomorrow-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Tomorrow";
  src: url("fonts/tomorrow/Tomorrow-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Tomorrow";
  src: url("fonts/tomorrow/Tomorrow-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Tomorrow";
  src: url("fonts/tomorrow/Tomorrow-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #101212;
  --surface: #222626;
  --elev: #2f3433;
  --elev2: #3a4040;
  --orange: #ff780a;
  --orange-soft: rgba(255, 120, 10, 0.22);
  --text: #f7f7f2;
  --muted: #c2c7c4;
  --line: rgba(255, 255, 255, 0.16);
  --head: "Tomorrow", "Segoe UI", system-ui, sans-serif;
  --body: "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(21, 23, 23, 0.82), rgba(21, 23, 23, 0.94)),
    url("/static/brand/map-texture.jpg") center top / 960px auto repeat;
  color: var(--text);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 8px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(28, 32, 32, 0.96);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand-row { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand-row img { height: 26px; width: auto; display: block; }
.brand-divider { width: 1px; height: 22px; background: var(--line); }
.map-picker { position: relative; }
.map-picker-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--head);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 999px;
  padding: 7px 12px 7px 10px;
  cursor: pointer;
}
.map-picker.open .map-picker-btn,
.map-picker-btn:hover { border-color: rgba(255, 120, 10, 0.45); background: var(--orange-soft); }
.map-picker-btn .dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--orange);
  box-shadow: 0 0 0 3px var(--orange-soft);
}
.map-picker-btn .sub { color: var(--muted); font-weight: 500; letter-spacing: 0.08em; text-transform: none; }
.map-picker-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 30;
  min-width: 220px;
  padding: 8px;
  background: var(--elev);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.map-picker.open .map-picker-menu { display: block; animation: panelIn 0.16s ease; }
.map-picker-menu button {
  display: flex;
  width: 100%;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-family: var(--head);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.map-picker-menu button span { font-family: var(--body); font-size: 11px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--muted); }
.map-picker-menu button.on { background: rgba(255, 120, 10, 0.14); color: var(--orange); }
.map-picker-menu button:disabled { opacity: 0.45; cursor: not-allowed; }
.header-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-left: auto; }
.login-btn {
  display: inline-flex;
  align-items: center;
  border: 0;
  border-radius: 999px;
  padding: 8px 16px;
  background: #ff780a;
  color: #1a1208;
  font-family: var(--head);
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
}
.login-btn[hidden] { display: none !important; }
.announcement {
  margin: 0;
  padding: 6px 18px;
  text-align: center;
  background: #1b221c;
  color: #f7f7f2;
  border-bottom: 1px solid rgba(255, 176, 32, 0.45);
  font-family: "Tomorrow", "Segoe UI", system-ui, sans-serif;
  font-weight: 500;
  font-size: 13px;
  line-height: 1.4;
}
.announcement[hidden] { display: none !important; }
.auth-notice { max-width: 980px; margin: 0 auto; padding: 8px 16px 0; }
.auth-notice[hidden] { display: none !important; }
.auth-notice-card {
  background: rgba(36, 40, 40, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 16px 18px;
}
.auth-notice-card h2 { font-family: var(--head); margin: 0 0 8px; }
.auth-notice-card p { margin: 0; line-height: 1.5; }
.membership-note { text-align: center; padding: 8px 16px 10px; font-family: "Tomorrow", "Segoe UI", system-ui, sans-serif; }
.membership-note h2 {
  margin: 0 0 4px;
  font-family: "Tomorrow", "Segoe UI", system-ui, sans-serif;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--orange);
}
.membership-note p { font-family: "Tomorrow", "Segoe UI", system-ui, sans-serif; font-weight: 400; font-size: 14px; line-height: 1.45; }
.chip {
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  background: var(--elev);
  color: var(--muted);
  font-family: var(--head);
  font-weight: 600;
  font-size: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.chip.on { background: var(--orange); color: #161616; border-color: transparent; }
.logout-btn, .learner-logout {
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  background: transparent;
  color: var(--muted);
  font-family: var(--head);
  font-weight: 600;
  font-size: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.learner-logout {
  background: rgba(90, 36, 36, 0.28);
  color: #e7b2b2;
  border-color: rgba(180, 80, 80, 0.4);
}
.logout-btn[hidden], .learner-logout[hidden] { display: none !important; }
:root { --rail: clamp(200px, 18vw, 260px); --chrome: 52px; }
.layout.stage {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr) var(--rail);
  align-items: stretch;
  width: 100%;
  margin: 0;
  padding: 8px 12px;
  gap: 12px;
  min-width: 0;
  min-height: 0;
  height: calc(100vh - var(--chrome));
  height: calc(100dvh - var(--chrome));
}
.rail { min-width: 0; min-height: 0; }
.rail-left {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 100%;
  overflow: auto;
  padding-right: 2px;
}
.rail-right { position: relative; }
.map-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
  height: 100%;
}
.map-caption {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  font-family: var(--head);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #d0d5d2;
}
.map-caption strong { color: var(--orange); }
#mapHint { text-transform: none; letter-spacing: 0; font-family: var(--body); font-size: 14px; line-height: 1.45; }
.icon-legend {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  padding: 8px;
  border-radius: 14px;
  background: rgba(40, 45, 44, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.16);
  min-width: 0;
}
.icon-legend .chip {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
  font-size: 13px;
  padding: 8px 12px;
}
.new-lineups {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 2px 2px 0;
}
.new-lineups[hidden] { display: none !important; }
.new-lineups h2 {
  margin: 2px 0 4px;
  font-family: var(--head);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #f3f5f3;
}
.new-lineups-empty {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
.new-lineups-empty[hidden] { display: none !important; }
.new-lineups ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.new-lineups button {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font: 13px/1.3 var(--body);
  padding: 7px 8px;
  border-radius: 10px;
  cursor: pointer;
}
.new-lineup-name { font-weight: 600; }
.new-lineup-meta { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.new-lineup-meta .tag { display: inline-flex; align-items: center; gap: 4px; text-transform: none; letter-spacing: 0.02em; }
.new-lineup-meta .pin-ico { width: 12px; height: 12px; display: inline-flex; }
.new-lineup-meta .pin-ico svg { width: 12px; height: 12px; display: block; }
.new-lineups button:hover,
.new-lineups button:focus-visible { background: rgba(255, 255, 255, 0.07); border-color: rgba(255, 255, 255, 0.16); }
.access-cta {
  display: block;
  margin: 2px 0 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 120, 10, 0.16);
  border: 1px solid rgba(255, 120, 10, 0.55);
  color: #fff8f2;
  font-family: "Tomorrow", "Segoe UI", system-ui, sans-serif;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  text-decoration: none;
}
.access-cta:hover { background: rgba(255, 120, 10, 0.24); }
.access-cta[hidden] { display: none !important; }
.notice-form { display: flex; flex-direction: column; gap: 8px; margin: 0 0 14px; padding-bottom: 12px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.notice-form input[type="text"] {
  width: 100%;
  background: var(--elev);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  font: 13px/1.4 var(--body);
}
.teaser-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}
.map-viewport {
  position: relative;
  flex: 0 0 auto;
  aspect-ratio: 1;
  border-radius: 18px;
  background: #0a0c0b;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 0 0 1px rgba(255, 120, 10, 0.22), 0 24px 60px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  touch-action: pan-y;
}
.map { position: absolute; left: 0; top: 0; width: 100%; height: 100%; transform-origin: 0 0; }
.map img { width: 100%; height: 100%; display: block; pointer-events: none; user-select: none; -webkit-user-drag: none; }
.map, .pin { -webkit-user-drag: none; user-select: none; }
.map-zoom-ui { position: absolute; right: 10px; bottom: 10px; z-index: 6; display: flex; gap: 6px; align-items: center; }
.map-zoom-ui button, .zoom-label {
  border: 1px solid var(--line);
  background: rgba(38, 41, 41, 0.92);
  color: var(--text);
  border-radius: 999px;
  height: 32px;
  font-family: var(--head);
  font-weight: 700;
}
.map-zoom-ui button { width: 32px; cursor: pointer; }
#zoomReset { width: auto; padding: 0 10px; font-size: 11px; }
.zoom-label { display: grid; place-items: center; min-width: 52px; font-size: 11px; color: var(--muted); }
.pin {
  --pin: #ffb020;
  --pin-ring: rgba(255, 176, 32, 0.5);
  position: absolute;
  transform: translate(-50%, -50%);
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: var(--pin);
  border: 2.25px solid rgba(255, 255, 255, 0.98);
  cursor: pointer;
  box-shadow: 0 0 0 3.6px var(--pin-ring), 0 3px 14px rgba(0, 0, 0, 0.55);
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.18s ease;
  z-index: 2;
  display: grid;
  place-items: center;
  padding: 0;
}
.pin.pin-t { --pin: #ffb020; --pin-ring: rgba(255, 176, 32, 0.55); }
.pin.pin-ct { --pin: #2f7cf6; --pin-ring: rgba(47, 124, 246, 0.55); }
.pin.pin-mixed { --pin: #3e4645; --pin-ring: rgba(255, 255, 255, 0.42); }
.pin:hover, .pin.open, .pin.selected { transform: translate(-50%, -50%) scale(1.18); z-index: 5; }
.pin.selected { box-shadow: 0 0 0 5px var(--pin-ring), 0 4px 14px rgba(0, 0, 0, 0.5); }
.pin.open { box-shadow: 0 0 0 2px #fff, 0 0 0 8px var(--pin-ring), 0 0 16px var(--pin-ring); }
.throw-links, #throwGhost { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 1; }
.throw-links line { stroke-width: 2; stroke-dasharray: 7 6; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.throw-links .throw-line-t { stroke: #ffb020; }
.throw-links .throw-line-ct { stroke: #2f7cf6; }
.throw-links .throw-line-mixed { stroke: #d7ddd8; }
.throw {
  --throw: #ffb020;
  position: absolute;
  z-index: 3;
  width: 18px;
  height: 18px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid var(--throw);
  background: transparent;
  box-shadow: inset 0 0 0 4px rgba(12, 14, 14, 0.28), 0 0 0 1px rgba(0, 0, 0, 0.7);
  transform: translate(-50%, -50%);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.throw.guide { pointer-events: none; }
.throw-t { --throw: #ffb020; }
.throw-ct { --throw: #2f7cf6; }
.throw-mixed { --throw: #d7ddd8; }
.throw-count { color: #fff; font-family: var(--head); font-size: 10px; font-weight: 700; line-height: 1; text-shadow: 0 1px 2px #000; pointer-events: none; }
.menu-heading { font-family: var(--head); font-size: 11px; font-weight: 700; letter-spacing: 0.03em; color: var(--muted); padding: 2px 6px 0; }
#map.has-selection > .pin,
#map.has-selection > .pin:hover { opacity: 0.2; }
#map.has-selection > .pin.open,
#map.has-selection > .pin.open:hover { opacity: 1; }
body.editing-pins .pin { opacity: 1; }
body.editing-pins .pin { cursor: grab; }
body.editing-pins .pin:active { cursor: grabbing; }
.pin-icons { display: flex; gap: 1px; align-items: center; justify-content: center; pointer-events: none; line-height: 0; }
.pin-ico svg { width: 16px; height: 16px; display: block; filter: drop-shadow(0 0 1px rgba(0, 0, 0, 0.45)); }
.pin .pin-ico svg { width: 14px; height: 14px; }
.pin-tip, .menu {
  position: absolute;
  z-index: 12;
  background: rgba(38, 41, 41, 0.96);
  border: 1px solid rgba(255, 120, 10, 0.35);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}
.pin-tip { max-width: min(280px, calc(100% - 16px)); padding: 8px 10px; pointer-events: none; opacity: 0; visibility: hidden; transition: opacity 0.16s ease; }
.pin-tip.show { opacity: 1; visibility: visible; }
.pin-tip-summary { font-family: var(--head); font-weight: 700; font-size: 12px; letter-spacing: 0.02em; line-height: 1.35; }
.pin-tip.throw-tip { padding: 6px; }
.throw-card {
  display: block;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-left: 2px solid rgba(255, 120, 10, 0.75);
  background: rgba(47, 52, 51, 0.96);
  color: var(--text);
  padding: 8px 10px;
  border-radius: 8px;
}
.throw-card + .throw-card { margin-top: 6px; }
.throw-card .tag-row { margin-top: 6px; }
.menu { width: min(280px, calc(100% - 16px)); padding: 6px; display: none; flex-direction: column; gap: 6px; overflow: auto; }
.menu.show { display: flex; }
.menu button, .fallback-list button { display: block; width: 100%; text-align: left; border: 1px solid rgba(255, 255, 255, 0.1); border-left: 2px solid rgba(255, 120, 10, 0.75); background: rgba(47, 52, 51, 0.96); color: var(--text); padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.fallback-list { display: flex; flex-direction: column; gap: 6px; }
.menu-name { display: block; font-family: var(--head); font-weight: 700; font-size: 14px; line-height: 1.3; }
.menu button:hover, .menu button:focus-visible, .fallback-list button:hover, .fallback-list button:focus-visible { background: rgba(255, 120, 10, 0.16); border-color: rgba(255, 120, 10, 0.45); }
.panel-close {
  position: absolute;
  top: 12px;
  right: 12px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
aside[hidden] { display: none !important; }
#panel {
  position: relative;
  top: auto;
  margin: 0;
  height: 100%;
  max-height: 100%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 18px;
  background: rgba(36, 40, 40, 0.97);
  padding: 18px 14px 14px;
  backdrop-filter: blur(12px);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
aside .panel-in {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: auto;
  animation: panelSlide 0.28s ease-out;
}
@keyframes panelSlide {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes panelIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.panel-label, .note-label {
  font-family: var(--head);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--orange);
}
aside h2, .player-top h2 { font-family: var(--head); margin: 0 0 6px; }
aside .sub { color: var(--muted); font-size: 13px; margin: 0 0 8px; }
.empty, .hint { color: #d5dad7; font-size: 14px; line-height: 1.55; }
.empty { padding: 16px; border: 1px dashed rgba(255, 255, 255, 0.22); border-radius: 14px; }
#panel .panel-label + .empty { margin-top: 16px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tag { font-family: var(--head); font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; padding: 4px 9px; border-radius: 999px; }
.tag-side-T { background: #ff780a; color: #1a1208; border: 1px solid #ff9a3d; }
.tag-side-CT { background: #2f7cf6; color: #f5f9ff; border: 1px solid #8eb6ff; }
.tag-type-smoke { background: #d5dde8; color: #1c2430; border: 1px solid #eef2f7; }
.tag-type-flash { background: #ffe18a; color: #3a2c08; border: 1px solid #fff2c4; }
.tag-type-molly { background: #ff2a1a; color: #fff5f2; border: 1px solid #ffd24a; }
.tag-type-he { background: #3fbf62; color: #06210f; border: 1px solid #b6f0c2; }
.tag-type-utility { background: #ff9a3d; color: #1a1208; border: 1px solid #ffd2a8; }
.lineup-note {
  margin-top: 12px;
  padding: 14px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 120, 10, 0.16), rgba(255, 120, 10, 0.08));
  border: 1px solid rgba(255, 120, 10, 0.4);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.lineup-note:empty { display: none; }
.lineup-note p { margin: 6px 0 0; }
.panel-link {
  display: inline-block;
  margin-top: 12px;
  color: #161616;
  background: var(--orange);
  font-family: var(--head);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  padding: 9px 14px;
  border-radius: 999px;
}
.player {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(38, 41, 41, 0.82);
}
.player.open { display: flex; }
.player.open .player-card { animation: panelIn 0.16s ease; }
.player-card {
  width: min(1100px, 94vw);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px 18px 16px;
}
.player-top { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.player-close {
  width: 36px; height: 36px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--elev); color: var(--text); cursor: pointer;
}
.player-frame-wrap { position: relative; border-radius: 14px; overflow: hidden; background: #000; aspect-ratio: 16 / 9; }
.player-frame, .player-frame video { position: absolute; inset: 0; width: 100%; height: 100%; }
.player-frame video { object-fit: contain; background: #000; pointer-events: none; }
.player-shield { position: absolute; inset: 0; z-index: 2; background: transparent; cursor: pointer; }
.player-controls { display: flex; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.player-toggle, .player-mute, .player-fs, .player-quality {
  border: 1px solid rgba(255, 120, 10, 0.45);
  background: rgba(255, 120, 10, 0.14);
  color: #ffb16a;
  border-radius: 999px;
  padding: 9px 14px;
  cursor: pointer;
  font-family: var(--head);
  font-size: 12px;
  font-weight: 700;
}
.player-seek { flex: 1 1 160px; min-width: 120px; accent-color: var(--orange); }
.player-vol { width: 88px; accent-color: var(--orange); }
.player-time { font-family: var(--head); font-size: 12px; color: var(--muted); min-width: 92px; text-align: right; }
.player-quality-wrap { display: flex; align-items: center; gap: 8px; margin-left: auto; color: var(--muted); font-family: var(--head); font-size: 12px; }
.player-quality-wrap[hidden] { display: none !important; }
.player-quality { min-width: 132px; }
.player-quality option { color: #161616; }
.player-card:fullscreen, .player-card:-webkit-full-screen, .player-card.fs-fallback {
  width: 100%; height: 100dvh; max-width: none; max-height: 100dvh; border-radius: 0;
  display: flex; flex-direction: column; background: #262929; overflow: auto; box-sizing: border-box;
}
.player-card.fs-fallback { position: fixed; inset: 0; z-index: 50; }
.player-card:fullscreen .player-frame-wrap,
.player-card:-webkit-full-screen .player-frame-wrap,
.player-card.fs-fallback .player-frame-wrap {
  width: min(100%, calc((100dvh - 168px) * 16 / 9));
  margin: 0 auto;
  max-height: calc(100dvh - 168px);
  flex: 0 1 auto;
}
.player-note { margin-top: 12px; }
.player-note:empty { display: none; }
.player-help { color: var(--muted); font-size: 12px; margin: 10px 0 0; }
.admin-filter-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.admin-help { display: flex; flex-direction: column; gap: 6px; }
.foot-note {
  margin-top: auto;
  padding: 8px 2px 0;
  color: var(--muted);
  font-size: 12px;
  display: flex;
  border-top: 1px solid var(--line);
}
.foot-note span { font-family: var(--head); letter-spacing: 0.08em; text-transform: uppercase; font-size: 11px; }
.edit-bar {
  display: none;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 12px;
  color: #d5dad7;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(36, 40, 40, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.16);
}
.edit-bar span { overflow-wrap: anywhere; }
body.editing-pins .edit-bar,
.edit-bar:not([hidden]) { display: flex; }
.edit-bar button, .admin-row button, .admin-form button, .nconfirm-card button {
  border: 0;
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
  background: var(--elev);
  color: var(--text);
  font-family: var(--head);
  font-weight: 600;
  font-size: 11px;
}
.admin-row button.primary, .edit-bar button.primary, .admin-form button.primary { background: var(--orange); color: #161616; }
.admin-row button.throw-start { background: #2f7cf6; color: #f5f9ff; }
.admin-row button.throw-active { background: #ffb020; color: #1a1208; box-shadow: 0 0 0 3px rgba(255, 176, 32, 0.45); }
.throw-actions { border: 1px solid rgba(47, 124, 246, 0.5); border-radius: 12px; padding: 8px 8px 4px; }
.throw-actions.is-placing { border-color: #ffb020; }
.throw-actions-label { display: block; font-family: var(--head); font-weight: 700; font-size: 11px; letter-spacing: 0.04em; color: #8eb6ff; }
body.placing-throw #map { cursor: crosshair; }
.admin-row button.danger, #nconfirm-ok { background: #3a1f1f; color: #ffb4a8; }
#addPin.placing, .edit-bar button.placing {
  background: #3d8bfd;
  color: #0b1220;
  box-shadow: 0 0 0 3px rgba(61, 139, 253, 0.35);
}
.admin-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; align-items: center; }
.admin-sticky {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin-top: auto;
  padding-top: 10px;
  background: linear-gradient(180deg, rgba(36, 40, 40, 0), rgba(36, 40, 40, 0.98) 28%);
}
.admin-row .field, .admin-form input, .admin-form select, .admin-form textarea {
  appearance: none;
  background: var(--elev);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  font-family: var(--body);
  font-size: 13px;
}
.admin-name-edit, .admin-desc-edit {
  width: 100%;
  box-sizing: border-box;
  background: #141818;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 8px 10px;
  font-family: var(--body);
  font-size: 13px;
  font-weight: 600;
}
.admin-desc-edit { min-height: 64px; resize: vertical; line-height: 1.4; font-weight: 500; background: var(--elev); border-radius: 12px; }
.admin-name-edit:focus, .admin-desc-edit:focus, .admin-form input:focus, .admin-form select:focus, .admin-form textarea:focus {
  outline: none;
  border-color: rgba(255, 120, 10, 0.55);
}
.admin-form { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.admin-form label, .admin-field-label { display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: 11px; font-weight: 600; font-family: var(--head); }
.admin-form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.admin-list { display: flex; flex-direction: column; gap: 10px; flex: 1 1 auto; min-height: 0; overflow: auto; margin-top: 8px; padding-right: 4px; }
.admin-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.admin-item.on { border-color: rgba(255, 120, 10, 0.45); background: var(--orange-soft); }
.admin-item-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.admin-item .meta { color: var(--muted); font-size: 11px; }
.admin-meta-edit { display: flex; flex-wrap: wrap; gap: 6px; }
.admin-meta-edit select {
  appearance: none;
  background: #1a1e1e;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 6px 26px 6px 12px;
  font-family: var(--head);
  font-size: 11px;
  font-weight: 700;
}
.admin-meta-edit select[data-field="type"] {
  border-color: rgba(255, 120, 10, 0.75);
  color: #ffb16a;
}
.admin-preview-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.admin-preview-btn, .admin-delete-btn {
  border-radius: 999px;
  padding: 5px 10px;
  cursor: pointer;
  font-family: var(--head);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.admin-preview-btn { border: 0; background: #ff780a; color: #1a1208; }
.admin-delete-btn { border: 0; background: #6e3030; color: #ffd0c8; }
.admin-id-line { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 11px; }
.admin-id-line span { font-family: var(--head); letter-spacing: 0.04em; }
.admin-id-line input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  padding: 0;
}
.nconfirm { position: fixed; inset: 0; z-index: 60; background: rgba(10, 12, 11, 0.78); display: flex; align-items: center; justify-content: center; padding: 24px; }
.nconfirm[hidden] { display: none; }
.nconfirm-card { width: min(420px, 92vw); background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 20px 20px 16px; animation: panelIn 0.2s ease; }
#adminBtn.on { background: var(--orange); color: #161616; border-color: transparent; }
body.editing-pins .menu { display: none !important; }
@media (prefers-reduced-motion: reduce) {
  .player-card, .menu, .pin, .pin-tip, .nconfirm-card { animation: none; transition: none; }
}
@media (min-width: 761px) {
  body { height: 100vh; height: 100dvh; overflow: hidden; }
}
@media (max-width: 760px) {
  header { padding: 10px 12px; gap: 10px; }
  body { overflow-x: hidden; }
  .layout.stage {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 0;
    padding: 8px;
    gap: 8px;
  }
  .rail-left { max-height: none; overflow: visible; width: 100%; }
  .rail-right:has(#panel[hidden]) { display: none; }
  .map-stage { height: auto; width: 100%; }
  .icon-legend {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    max-width: 100%;
  }
  .icon-legend .chip { width: auto; flex: 0 0 auto; }
  .new-lineups { max-height: 132px; overflow: auto; }
  #panel { position: static; height: auto; max-height: none; }
  .auth-notice { padding: 8px 10px 0; }
  .foot-note { margin-top: 0; }
  .pin {
    width: 16px;
    height: 16px;
    border-width: 1.5px;
    box-shadow: 0 0 0 2px var(--pin-ring);
  }
  .pin .pin-ico svg { width: 10px; height: 10px; }
  .throw { width: 16px; height: 16px; }
  .map-zoom-ui { gap: 8px; }
  .map-zoom-ui button, .zoom-label { height: 44px; }
  .map-zoom-ui button { width: 44px; font-size: 18px; }
  .player { padding: 8px; }
  .player-card { width: 100%; }
}
