html,
body {
  height: 100%;
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  overflow: hidden;
}

.main-nav {
  position: fixed;
  left: 0;
  top: 0;
  right: 0;
  z-index: 1100;
  background: rgba(8, 32, 38, 0.72);
  border-bottom: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(8px);
}
.main-nav .inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.main-nav .left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.main-nav .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.main-nav .brand img { height: 44px; width: auto; display: block; }
.main-nav .links {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.main-nav a { color: rgba(255,255,255,0.92); text-decoration: none; font-size: 14px; }
.main-nav a:hover { text-decoration: underline; color: #fff; }

.navbtn { display:inline-flex; align-items:center; justify-content:center; width:44px; height:44px; border-radius:14px; overflow:hidden; background:rgba(0,0,0,0.45); border:1px solid rgba(255,255,255,0.15); cursor:pointer; text-decoration:none; box-sizing:border-box; font-size:0; line-height:0; }
.navbtn::before, .navbtn::after { content:none !important; }
.navbtn img { width:100%; height:100%; display:block; opacity:0.92; object-fit:cover; object-position:center; padding:0; box-sizing:border-box; }
.navbtn img.home-icon { object-position:50% 50%; transform:scale(1.18); will-change:transform; }
.member-link { font-size: 14px; }

#app {
  height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  box-sizing: border-box;
  padding-top: 64px;
}

#toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(8, 32, 38, 0.72);
  backdrop-filter: blur(8px);
}

#title {
  font-weight: 700;
  margin-right: 8px;
  color: rgba(255, 255, 255, 0.92);
}

#hint {
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  line-height: 1.2;
}

#debug {
  margin-left: 10px;
  padding: 4px 8px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 200, 80, 0.20);
  border: 1px solid rgba(255, 200, 80, 0.40);
  border-radius: 6px;
  max-width: 100%;
  white-space: pre-wrap;
}

#actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

#league select {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.25);
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.92);
}

#actions button,
#actions .file {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.25);
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.92);
}

#actions button:hover,
#actions .file:hover {
  background: rgba(255, 255, 255, 0.12);
}

#actions .file input {
  display: none;
}

#stats {
  margin-left: auto;
  display: flex;
  gap: 14px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 14px;
}

#map {
  flex: 1;
  min-height: 0;
}

#sidepanel {
  position: absolute;
  right: 10px;
  top: 286px;
  z-index: 600;
  background: rgba(8, 32, 38, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
  padding: 8px;
  min-width: 140px;
  user-select: none;
}

.panel-head {
  font-size: 18px;
  font-weight: 800;
  padding: 6px 6px 2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.92);
}

.panel-sub {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.78);
  padding: 0 6px 8px;
}

#panel-score {
  font-size: 24px;
  font-weight: 800;
  padding-top: 0;
}

.panel-row {
  border: 1px solid rgba(255, 255, 255, 0.16);
  margin: 6px 0;
}

.panel-row-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.78);
  padding: 4px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.18);
}

.panel-row-value {
  font-size: 18px;
  font-weight: 700;
  padding: 6px;
  text-align: center;
  color: rgba(255, 255, 255, 0.92);
}

.panel-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.panel-actions button {
  border: 1px solid #ddd;
  background: #f7f7f7;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}

.panel-actions button:hover {
  background: #efefef;
}

.dialog {
  position: absolute;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
}

.dialog-box {
  background: #fff;
  border: 1px solid #d0d0d0;
  border-radius: 8px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
  padding: 12px;
  width: 320px;
}

.dialog-title {
  font-weight: 800;
  margin-bottom: 10px;
}

.dialog-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.dialog-label {
  width: 70px;
  font-size: 13px;
}

.dialog-select {
  flex: 1;
  padding: 6px 8px;
  border: 1px solid #ddd;
  border-radius: 6px;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.dialog-actions button {
  border: 1px solid #ddd;
  background: #f7f7f7;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
}

.dialog-actions button:hover {
  background: #efefef;
}

#share-url {
  font-size: 12px;
}

#share-qr {
  display: block;
  background: #fff;
}

#inp-speed {
  font-size: 14px;
  padding: 4px 6px;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.wp-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #d00;
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.wp-dot .wp-num {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 11px;
  line-height: 1;
  padding: 2px 5px;
  border-radius: 10px;
  white-space: nowrap;
}
