body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #99CC33;
    font-family: "PMingLiU", "新細明體", MingLiU, serif;
}

/* 讓地圖容器固定置中，並由 JS 計算出與原圖相同長寬比的尺寸 */
.map-viewport {
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: #99CC33;
}

.map-container {
    position: relative;
    overflow: hidden;
    transform-origin: center center;
    cursor: grab;
    /* width/height 會由 index.html 的 JS 依照圖片比例設定 */
}

.map-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain; /* 不變形、也不裁切；搭配容器比例可避免點位漂移 */
    pointer-events: none; /* 讓點位/拖曳事件主要由容器處理 */
    user-select: none;
}

/* ================================ */
/* 👇 ThingLink 風格按鈕設計 👇 */
/* ================================ */

.tl-pin {
    position: absolute;
    display: block;
    text-decoration: none;
    z-index: 10;
}

.tl-pin:hover,
.tl-pin:focus-within {
    z-index: 999;
}

.tl-dot {
    position: relative;
    z-index: 1;
    width: 8px;  
    height: 8px; 
    border-radius: 50%;
    border: 1px solid white; 
    box-shadow: 0 1px 3px rgba(0,0,0,0.25); 
    transition: transform 0.2s;
}

.blue-dot { background-color: #1e88e5; }   /* 全站基礎藍色 */
.orange-dot { background-color: #1e88e5; } /* 與藍色統一，避免混色 */

/* 分區用顏色 */
.dot-dorm {          /* 宿舍、宿舍餐廳：改為灰色系 */
    background-color: #9e9e9e;
}

.dot-campus,         /* 教學館、公共設施 */
.blue-dot,           /* 入口等原本藍點 */
.orange-dot {        /* 原本橘點一併統一為藍點 */
    background-color: #1e88e5;
}

.tl-label {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    background-color: rgba(20, 28, 38, 0.65);
    color: rgba(255, 255, 255, 0.96);
    font-size: 12px;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s;
    pointer-events: none;
}

.tl-pin:hover .tl-dot {
    transform: scale(1.2);
}

.tl-pin:hover .tl-label { 
    opacity: 1;
    visibility: visible;
}

.tl-pin:focus-visible .tl-label {
    opacity: 1;
    visibility: visible;
}

/* ================================ */
/* 👇 在這裡調整按鈕在地圖上的位置 👇 */
/* ================================ */

#pin-a {
    left: 30.62%;
    top: 82.62%;
}

