:root {
  --pink: #ff77bb;
  --dark: #444;
  --bg: #f8f9fa;
  --edit: #4caf50;
  --verse: #7733ff;
  --station: #ff9800;
  --warn: #f44336;
}

body {
  margin: 0;
  padding: 0;
  height: 100vh;
  font-family: sans-serif;
  overflow: hidden;
  background: var(--bg);
}

#map {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

#map-center-cross {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1000;
  pointer-events: none;
  display: none;
  font-size: 32px;
}

#loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.9);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: var(--pink);
}

#sidebar {
  position: absolute;
  top: 0;
  left: 0;
  width: 400px;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #fff;
  z-index: 2000;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s;
}

#sidebar[data-state="closed"] {
  transform: translateX(-100%);
}

@media (max-width: 768px) {
  #sidebar {
    width: 85%;
  }
}

.sidebar-header {
  background: var(--pink);
  color: white;
  display: flex;
  align-items: center;
  padding: 10px 15px;
  height: 50px;
  flex-shrink: 0;
}

.close-btn {
  background: white;
  color: var(--pink);
  border: none;
  padding: 5px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}

.auth-bar {
  background: #f0f0f0;
  padding: 8px 15px;
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #ddd;
}

.auth-btn {
  background: var(--dark);
  color: white;
  border: none;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
}

.nav-bar {
  background: var(--dark);
  color: white;
  padding: 12px;
  font-size: 13px;
  font-weight: bold;
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-link {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
}

.panel {
  display: none;
  flex: 1;
  flex-direction: column;
  overflow: hidden;
}

.panel.active {
  display: flex;
}

.scroll-content {
  flex: 1;
  overflow-y: auto;
  padding: 15px;
  background: var(--bg);
}

.menu-button {
  display: block;
  width: 100%;
  padding: 20px;
  margin-bottom: 15px;
  background: var(--pink);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  text-align: left;
}

.variant-verse {
  background: var(--verse) !important;
}

.shop-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  cursor: pointer;
}

.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: bold;
  margin-bottom: 8px;
  color: #fff;
}

.badge-aipri {
  background: var(--pink);
}

.badge-verse {
  background: var(--verse);
}

.badge-station {
  background: var(--station);
}

.info-card {
  background: white;
  padding: 15px;
  border-radius: 10px;
  border: 1px solid #eee;
  margin-bottom: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.info-label {
  font-size: 11px;
  color: #888;
  margin-bottom: 4px;
  font-weight: bold;
}

.edit-input {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-sizing: border-box;
  font-size: 14px;
  margin-top: 4px;
  margin-bottom: 10px;
}

.save-btn {
  background: var(--edit);
  color: white;
  border: none;
  padding: 12px;
  border-radius: 6px;
  width: 100%;
  font-weight: bold;
  cursor: pointer;
  margin-top: 10px;
}

.variant-dark {
  background: var(--dark) !important;
}

.machine-count {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin: 8px 0;
}

.count-num {
  font-size: 28px;
  font-weight: 900;
}

.count-unit {
  font-size: 14px;
  color: #666;
}

.memo-box {
  background: #fdf2f8;
  padding: 10px;
  border-radius: 8px;
  font-size: 12px;
  border: 1px dashed var(--pink);
  white-space: pre-wrap;
}

.null-check {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: #666;
  margin-top: -5px;
  margin-bottom: 10px;
}

.warning-text {
  font-size: 10px;
  color: #666;
  margin: -5px 0 10px 0;
  line-height: 1.4;
}

#route-canvas {
  position: relative;
  width: 100%;
  background: #fff;
  min-height: 100%;
}

.train-line {
  position: absolute;
  width: 4px;
  top: 0;
  bottom: 0;
  z-index: 1;
}

.station-node {
  position: absolute;
  left: 0;
  width: 100%;
  display: flex;
  align-items: center;
  cursor: pointer;
  z-index: 2;
  height: 55px;
}

.station-box {
  background: #fff;
  border: 2px solid #444;
  height: 32px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  font-size: 13px;
  font-weight: bold;
  border-left: 6px solid #444;
  box-sizing: border-box;
}

.floating-menu-btn {
  position: absolute;
  top: 15px;
  left: 15px;
  z-index: 1500;
  padding: 12px 20px;
  background: var(--pink);
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.disclaimer-box {
    margin-top: 20px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #ddd; 
    font-size: 0.85rem;
    line-height: 1.6;
    color: #444; 
    text-align: left;
}

.contact-box {
    margin-top: 20px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #ddd; 
    font-size: 0.85rem;
    line-height: 1.6;
    color: #444; 
    text-align: left;
}

.credit-text {
  font-size: 0.75rem;
  color: #999;
  margin-top: 15px;
  border-top: 1px solid #eee;
  padding-top: 10px;
}

.warning-text {
    color: #d9534f; /* 警告色 */
    font-weight: bold;
    font-size: 1em; 
    display: inline;
}

body.modal-open {
    overflow: hidden;
}

.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: none; 
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.modal-content {
    background: white;
    padding: 20px;
    border-radius: 12px;
    width: 85%;
    max-width: 400px;

    height: 70vh; 
    max-height: 450px; 

    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden; 
}

.modal-body {
    text-align: left;
    font-size: 0.85rem;
    
    flex: 1; 
    overflow-y: auto; 
    
    -webkit-overflow-scrolling: touch;
    
    margin-bottom: 15px;
    padding: 10px;
    border: 1px solid #eee;
    background: #fafafa;
}

.menu-button {
    flex-shrink: 0;
    width: 100%;
    height: 48px; 
    
    display: flex;
    align-items: center;    /* 上下中央 */
    justify-content: center; /* 左右中央 */
    
    padding: 0; 
    line-height: 1; 
    
    background-color: --pink;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: bold;
}