:root {
    --main-bg: #1a1d23;
    --panel-bg: #252932;
    --accent: #ffff33;
    --gold: linear-gradient(45deg, #ffd700, #ffae00, #ffd700);
    --plane: #66ccff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    margin: 0 !important;
    padding: 0 !important;
    background: var(--main-bg);
    color: white;
    font-family: "Microsoft JhengHei", "Segoe UI", sans-serif;
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.main-content {
    flex: 1;
    display: flex;
    transition: margin-right 0.3s ease;
    position: relative;
}

#map-container {
    flex: 1;
    position: relative;
    padding: 0;
    transition: all 0.3s ease;
    background: var(--main-bg) !important;
    overflow: hidden;
}

svg {
    width: 100%;
    height: 100%;
}

.county {
    fill: #4a5d4e;
    stroke: #fff;
    stroke-width: 0.5;
    cursor: pointer;
    transition: 0.3s;
}

.county.active {
    fill: var(--accent) !important;
    filter: drop-shadow(0 0 10px var(--accent));
}

.reg-north { fill: #00d4ff !important; }
.reg-central { fill: #52ff52 !important; }
.reg-south { fill: #ffbb33 !important; }
.reg-east { fill: #ff66cc !important; }
.reg-islands { fill: #cccccc !important; }
.reg-system { fill: #ffd700 !important; }

.county-label {
    fill: #fff;
    font-size: 1vw;
    font-weight: 900;
    letter-spacing: 0.5px;
    paint-order: stroke;
    stroke: #000;
    stroke-width: 2.5px;
    stroke-linecap: round;
    stroke-linejoin: round;
    dominant-baseline: middle;
    text-shadow: 0 0 2px rgba(0,0,0,0.5);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.extra-label {
    font-size: 0.7vw;
}

.airport-label {
    fill: var(--plane);
    font-size: 0.7vw;
    font-weight: 900;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
    paint-order: stroke;
    stroke: #000;
    stroke-width: 2.5px;
}

.label-visible { opacity: 1 !important; }

.airport-icon {
    font-size: 18px;
    opacity: 0;
    transition: 0.5s;
    pointer-events: none;
}

.airport-visible { opacity: 1 !important; }

.tra-station {
    font-size: 0.45vw;
    font-weight: bold;
    white-space: nowrap;
    background: rgba(0, 0, 0, 0.65);
    padding: 2px 3px;
    border-radius: 4px;
    dominant-baseline: hanging;
    fill: #ffffff;
    paint-order: stroke;
    stroke: #000000;
    stroke-width: 2px;
}

.hsr-station {
    fill: #ffaa33;
    font-size: 0.7vw;
    font-weight: bold;
    white-space: nowrap;
    background: rgba(0, 0, 0, 0.65);
    padding: 2px 4px;
    border-radius: 4px;
    dominant-baseline: hanging;
    paint-order: stroke;
    stroke: #000;
    stroke-width: 2px;
}

.tra-stations circle {
    fill: white;
    stroke: black;
    stroke-width: 1px;
}

.hsr-dot {
    fill: #ffaa33;
    stroke: #000;
    stroke-width: 0.5px;
}

.photo-panel {
    position: fixed;
    right: -50%;
    top: 0;
    width: 50%;
    height: 100vh;
    background: var(--panel-bg);
    transition: right 0.3s ease;
    z-index: 300;
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 20px rgba(0,0,0,0.5);
}

.photo-panel.open {
    right: 0;
}

body.panel-open .main-content {
    margin-right: 50%;
}

.photo-panel .panel-handle {
    position: absolute;
    left: -3.5vw;
    top: 50%;
    transform: translateY(-50%);
    width: 3.5vw;
    height: 24vh;
    background: var(--accent);
    border-radius: 1.5vw 0 0 1.5vw;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #000;
    font-weight: bold;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    letter-spacing: normal;
    font-size: 1.4vw;
    box-shadow: -2px 0 10px rgba(0,0,0,0.3);
    z-index: 301;
    white-space: nowrap;
    padding: 0;
    margin: 0;
    line-height: 1;
    transition: all 0.3s ease;
}

.photo-panel.open .panel-handle {
    align-items: center;
}

.photo-panel .panel-handle:hover {
    background: #ffdd55;
}

#thumb-grid {
    flex-grow: 1;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    overflow-y: auto;
    overflow-x: hidden;
    gap: 1.5vw;
    padding: 1.5vw;
    scroll-behavior: smooth;
    align-content: flex-start;
}

#thumb-grid::-webkit-scrollbar {
    width: 0.6vw;
}
#thumb-grid::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 1vw;
}

.thumb-card {
    flex: 0 0 18vw;
    background: #1a1d23;
    border-radius: 1vw;
    border: 1px solid rgba(255,255,255,0.1);
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.thumb-card:hover {
    transform: scale(1.02);
    border-color: var(--accent);
}

.thumb-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.thumb-card p {
    font-size: 1vw;
    margin: 0;
    padding: 0.8vw;
    text-align: center;
    font-weight: bold;
    background: rgba(0,0,0,0.6);
    color: white;
    white-space: normal;
    word-wrap: break-word;
}

.thumb-card .favorite-star {
    position: absolute;
    top: 0.8vw;
    right: 0.8vw;
    background: rgba(0,0,0,0.6);
    border-radius: 50%;
    width: 3vw;
    height: 3vw;
    min-width: 28px;
    min-height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 2vw;
    backdrop-filter: blur(4px);
    transition: 0.2s;
}

.panel-title {
    text-align: center;
    padding: 1.5vw;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-size: 1.5vw;
    font-weight: bold;
    background: rgba(0,0,0,0.3);
}

.island-bar {
    position: absolute;
    top: 2vh;
    left: 2vw;
    z-index: 150;
    display: flex;
    gap: 1.2vw;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(12px);
    padding: 1vh 2vw;
    border-radius: 5vw;
    border: 1px solid rgba(255,255,255,0.2);
}

.island-btn {
    padding: 1vh 1.8vw;
    border-radius: 5vw;
    font-size: 1.4vw;
    font-weight: bold;
    cursor: pointer;
    background: rgba(0,0,0,0.5);
    border: 1px dashed var(--accent);
    color: var(--accent);
    transition: 0.2s;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5vw;
    font-family: 'Microsoft JhengHei', sans-serif;
}

.island-btn:hover { background: var(--accent); color: #000; }

.memory-badge {
    position: absolute;
    top: 2vh;
    right: 10vw;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    padding: 1vh 1.8vw;
    border-radius: 5vw;
    font-size: 1.2vw;
    z-index: 150;
    border: 1px solid rgba(255,255,255,0.2);
    font-family: 'Microsoft JhengHei', sans-serif;
}

.search-area {
    position: absolute;
    top: 2vh;
    right: 25vw;
    z-index: 150;
}

.search-box {
    display: flex;
    gap: 0.5vw;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(12px);
    padding: 0.5vh 1vw;
    border-radius: 5vw;
    border: 1px solid rgba(255,255,255,0.2);
}

.search-box input {
    background: transparent;
    border: none;
    color: white;
    padding: 0.8vh 1vw;
    font-size: 1.2vw;
    outline: none;
    width: 12vw;
    font-family: 'Microsoft JhengHei', sans-serif;
}

.search-box input::placeholder { color: rgba(255,255,255,0.5); }

.search-box button {
    background: var(--accent);
    border: none;
    border-radius: 5vw;
    padding: 0.8vh 1.5vw;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.2vw;
    color: #000;
    font-family: 'Microsoft JhengHei', sans-serif;
}

.search-box button:hover { background: #ffdd55; }

.search-results {
    position: absolute;
    top: 6vh;
    right: 0;
    background: rgba(0,0,0,0.95);
    backdrop-filter: blur(16px);
    border-radius: 1vw;
    padding: 0.8vw;
    min-width: 12vw;
    max-height: 25vh;
    overflow-y: auto;
    display: none;
    z-index: 151;
}

.search-results.show { display: block; }

.search-result-item {
    padding: 0.8vw 1vw;
    cursor: pointer;
    border-radius: 0.8vw;
    transition: 0.2s;
    font-size: 1.2vw;
    font-family: 'Microsoft JhengHei', sans-serif;
}

.search-result-item:hover { background: var(--accent); color: #000; }

.menu-stack {
    position: absolute;
    bottom: 3vh;
    left: 2vw;
    display: flex;
    flex-direction: column;
    gap: 1.5vh;
    z-index: 160;
}

.menu-item { position: relative; }

.menu-trigger {
    padding: 1.2vh 2.5vw;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(12px);
    border-radius: 5vw;
    font-size: 1.4vw;
    font-weight: bold;
    cursor: pointer;
    border: 1px solid rgba(255,255,255,0.2);
    transition: 0.2s;
    color: white;
    letter-spacing: 0.2vw;
    text-align: center;
    font-family: 'Microsoft JhengHei', sans-serif;
}

.menu-trigger:hover {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
}

.menu-trigger.active {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
}

.menu-dropdown-vertical {
    position: absolute;
    left: 100%;
    bottom: 0;
    margin-left: 1vw;
    background: rgba(0,0,0,0.95);
    backdrop-filter: blur(16px);
    border-radius: 1vw;
    padding: 0.8vw;
    min-width: 15vw;
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 4px 4px 20px rgba(0,0,0,0.5);
    display: none;
    z-index: 170;
}

.menu-dropdown-vertical.show { display: block; }

.vertical-item {
    padding: 0.8vw 1.5vw;
    margin: 0.3vw 0;
    border-radius: 1vw;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    gap: 1vw;
    font-family: 'Microsoft JhengHei', sans-serif;
    font-size: 1.1vw;
    font-weight: bold;
}

.vertical-item:hover {
    filter: brightness(1.1);
    transform: scale(1.02);
}

.vertical-item img {
    width: 5vw;
    height: 5vw;
    min-width: 24px;
    min-height: 24px;
    object-fit: contain;
}

.cruise-area {
    position: absolute;
    bottom: 3vh;
    right: 2vw;
    z-index: 160;
}

.cruise-btn {
    display: flex;
    align-items: center;
    gap: 0.8vw;
    padding: 1.2vh 2.5vw;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(12px);
    border: 1px solid var(--accent);
    border-radius: 5vw;
    cursor: pointer;
    transition: 0.2s;
    font-size: 1.4vw;
    font-weight: bold;
    color: var(--accent);
    font-family: 'Microsoft JhengHei', sans-serif;
}

.cruise-btn:hover { background: var(--accent); color: #000; }
.cruise-btn:hover #cruise-dot { background: #000 !important; }

#cruise-dot {
    width: 0.8vw;
    height: 0.8vw;
    background: var(--accent);
    border-radius: 50%;
    transition: 0.2s;
}

.favorite-wrapper {
    position: absolute;
    bottom: 3vh;
    right: 15vw;
    z-index: 160;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.favorite-btn {
    display: flex;
    align-items: center;
    gap: 0.6vw;
    padding: 1.2vh 2.5vw;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(12px);
    border: 1px solid var(--accent);
    border-radius: 5vw;
    cursor: pointer;
    transition: 0.2s;
    font-size: 1.4vw;
    font-weight: bold;
    color: var(--accent);
    font-family: 'Microsoft JhengHei', sans-serif;
}

.favorite-btn:hover {
    background: var(--accent);
    color: #000;
}

.favorite-count {
    background: rgba(0,0,0,0.5);
    padding: 0.2vh 0.8vw;
    border-radius: 2vw;
    font-size: 1vw;
}

.favorite-panel-dropup {
    position: absolute;
    bottom: 6vh;
    right: 0;
    width: 20vw;
    background: rgba(0,0,0,0.95);
    backdrop-filter: blur(16px);
    border-radius: 1vw;
    padding: 1vw;
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    display: none;
    z-index: 250;
    max-height: 40vh;
    overflow-y: auto;
}

.favorite-panel-dropup.show {
    display: block;
}

.favorite-panel-title {
    font-size: 1.2vw;
    font-weight: bold;
    margin-bottom: 1vh;
    padding-bottom: 0.5vh;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    text-align: center;
    font-family: 'Microsoft JhengHei', sans-serif;
}

.favorite-list {
    display: flex;
    flex-direction: column;
    gap: 0.5vh;
}

.favorite-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6vw 1vw;
    background: rgba(255,255,255,0.1);
    border-radius: 2vw;
    cursor: pointer;
    transition: 0.2s;
    font-size: 1vw;
    font-family: 'Microsoft JhengHei', sans-serif;
}

.favorite-item:hover {
    background: var(--accent);
    color: #000;
}

.favorite-item .remove {
    width: 1.5vw;
    height: 1.5vw;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9vw;
}

.favorite-item .remove:hover {
    background: #ff4444;
    color: white;
}

.empty-favorite {
    text-align: center;
    padding: 2vh;
    color: rgba(255,255,255,0.5);
    font-size: 1vw;
    font-family: 'Microsoft JhengHei', sans-serif;
}

.fixed-controls {
    position: fixed;
    top: 2vh;
    right: 2vw;
    z-index: 400;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1.5vh;
}

#music-toggle {
    width: 4.5vw;
    height: 4.5vw;
    min-width: 44px;
    min-height: 44px;
    background: rgba(0,0,0,0.7);
    border: 2px solid var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--accent);
    font-size: 2.2vw;
    backdrop-filter: blur(8px);
}

.map-controls {
    display: flex;
    flex-direction: column;
    gap: 1.5vh;
}

.map-controls button {
    width: 4.5vw;
    height: 4.5vw;
    min-width: 44px;
    min-height: 44px;
    background: rgba(0,0,0,0.7);
    border: 1px solid var(--accent);
    border-radius: 50%;
    color: var(--accent);
    font-size: 2.2vw;
    cursor: pointer;
    backdrop-filter: blur(8px);
}

.map-controls button:hover { background: var(--accent); color: #000; }

.theme-toggle {
    width: 4.5vw;
    height: 4.5vw;
    min-width: 44px;
    min-height: 44px;
    background: rgba(0,0,0,0.7);
    border: 2px solid var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 2.2vw;
    backdrop-filter: blur(8px);
    transition: 0.2s;
}

.theme-toggle:hover {
    transform: scale(1.05);
    background: var(--accent);
    color: #000;
}

.favorite-preview {
    position: fixed;
    bottom: 8vh;
    left: 2vw;
    width: 6vw;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(8px);
    border-radius: 1vw;
    padding: 0.5vw;
    text-align: center;
    z-index: 170;
    border: 1px solid var(--accent);
}

.favorite-preview img {
    width: 100%;
    height: 4vw;
    object-fit: cover;
    border-radius: 0.5vw;
}

.favorite-preview div {
    font-size: 0.8vw;
    margin-top: 0.3vw;
    color: var(--accent);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

#modal-box {
    max-width: 80%;
    text-align: center;
}

#modal-img {
    max-width: 100%;
    max-height: 80vh;
    border: 3px solid white;
    border-radius: 8px;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.playing { animation: spin 3s linear infinite; }

:root[data-theme="light"] {
    --main-bg: #f0f0f0;
    --panel-bg: #ffffff;
    --text-color: #1a1d23;
    --border-color: rgba(0,0,0,0.1);
    --shadow-color: rgba(0,0,0,0.1);
}

:root[data-theme="light"] body {
    background: var(--main-bg);
    color: var(--text-color);
}

:root[data-theme="light"] .county {
    stroke: #666;
}

:root[data-theme="light"] .menu-trigger,
:root[data-theme="light"] .cruise-btn,
:root[data-theme="light"] .island-bar,
:root[data-theme="light"] .search-box,
:root[data-theme="light"] .memory-badge,
:root[data-theme="light"] .fixed-controls button,
:root[data-theme="light"] #music-toggle,
:root[data-theme="light"] .favorite-btn,
:root[data-theme="light"] .theme-toggle {
    background: rgba(255,255,255,0.9);
    color: #1a1d23;
    border-color: rgba(0,0,0,0.2);
}

:root[data-theme="light"] .menu-dropdown-vertical,
:root[data-theme="light"] .search-results,
:root[data-theme="light"] .favorite-panel-dropup {
    background: rgba(255,255,255,0.95);
    color: #1a1d23;
}

:root[data-theme="light"] .vertical-item,
:root[data-theme="light"] .search-result-item,
:root[data-theme="light"] .favorite-item {
    color: #1a1d23;
}

:root[data-theme="light"] .vertical-item:hover,
:root[data-theme="light"] .search-result-item:hover,
:root[data-theme="light"] .favorite-item:hover {
    background: var(--accent);
    color: #000;
}

:root[data-theme="light"] .photo-panel {
    background: #f5f5f5;
}

:root[data-theme="light"] .thumb-card {
    background: white;
    border-color: rgba(0,0,0,0.1);
}

:root[data-theme="light"] .county-label {
    fill: #1a1d23;
    stroke: #ffffff;
    stroke-width: 2px;
}

.vertical-item {
    transition: all 0.2s ease;
    cursor: pointer;
}

.menu-trigger:hover,
.island-btn:hover {
    filter: brightness(1.1);
    transform: scale(1.02);
}

@media (max-width: 1024px) and (min-width: 769px) {
    .thumb-card { width: 22vw; }
    .thumb-card p { font-size: 1.4vw; }
    .island-btn { font-size: 1.6vw; padding: 0.8vh 2vw; }
    .vertical-item img { width: 5vw; height: 5vw; }
}

.mobile-dpad {
    position: fixed;
    bottom: 3vh;
    left: 30vw;
    transform: translateX(0);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    z-index: 210;
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(4px);
    padding: 8px 12px;
    border-radius: 20px;
}

.dpad-up, .dpad-down {
    display: flex;
    justify-content: center;
}

.dpad-middle {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dpad-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0,0,0,0.6);
    border: 1px solid var(--accent);
    color: var(--accent);
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
}

.dpad-btn:hover {
    background: var(--accent);
    color: #000;
}

.dpad-text {
    font-size: 12px;
    color: var(--accent);
    font-weight: bold;
    white-space: nowrap;
}

@media (max-aspect-ratio: 1/1) {
    body {
        flex-direction: column;
        overflow: hidden;
        background: var(--main-bg);
        margin: 0;
        padding: 0;
        position: relative;
    }
    
    .main-content {
        flex: 1;
        width: 100%;
        height: 100vh;
        margin: 0;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        background: transparent;
    }
    
    #map-container {
        flex: none;
        width: 100%;
        height: 100vh;
        padding: 0 !important;
        margin: 0 !important;
        display: flex;
        align-items: center;
        justify-content: center;
        background: var(--main-bg) !important;
    }
    
    svg {
        width: 100%;
        height: 100%;
        transform: scale(1);
        transform-origin: center center;
        background: transparent;
    }
    
    .county-label {
        font-size: max(12px, 1.2vw);
    }
    .extra-label {
        font-size: max(9px, 0.8vw);
    }
    .airport-label {
        font-size: max(10px, 0.9vw);
    }
    .hsr-station {
        font-size: max(11px, 0.9vw);
    }
    .tra-station {
        font-size: max(6.5px, 0.45vw);
    }
    
    .photo-panel {
        position: fixed;
        right: 0;
        bottom: -30%;
        left: 0;
        top: auto;
        width: 100%;
        height: 30%;
        border-radius: 4vw 4vw 0 0;
        transition: bottom 0.3s ease;
        z-index: 300;
    }
    
    .photo-panel.open {
        bottom: 0;
    }
    
    body.panel-open .main-content {
        margin-right: 0;
    }
    
    .photo-panel .panel-handle {
        position: absolute;
        left: 50%;
        top: -8vw;
        transform: translateX(calc(-50% + 8vw));
        width: 30vw;
        height: 8vw;
        border-radius: 4vw 4vw 0 0;
        background: var(--accent);
        color: #000;
        text-align: center;
        line-height: 8vw;
        writing-mode: horizontal-tb;
        font-size: 4vw;
    }
    
    .photo-panel .panel-title {
        display: none;
    }
    
    #thumb-grid {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 2vw;
        padding: 2vw;
        height: calc(100% - 2vw);
        flex-wrap: nowrap;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }
    
    #thumb-grid::-webkit-scrollbar {
        height: 0.8vw;
        width: auto;
    }
    #thumb-grid::-webkit-scrollbar-thumb {
        background: var(--accent);
        border-radius: 1vw;
    }
    
    .thumb-card {
        flex: 0 0 auto;
        width: auto;
        min-width: 35vw;
        max-width: 45vw;
        height: auto;
        position: relative;
        cursor: pointer;
        touch-action: pan-x pan-y;
        background: transparent;
        border: none;
        border-radius: 2vw;
    }
    
    .thumb-card img {
        height: auto;
        width: 100%;
        aspect-ratio: 4 / 3;
        object-fit: cover;
        border-radius: 2vw;
    }
    
    .thumb-card p {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        background: linear-gradient(transparent, rgba(0,0,0,0.6));
        color: white;
        font-size: 3vw;
        padding: 5vw 2vw 2vw;
        margin: 0;
        text-align: center;
        font-weight: bold;
        text-shadow: 1px 1px 0px #000000;
        border-radius: 0 0 2vw 2vw;
    }
    
    .thumb-card .favorite-star {
        width: 12vw;
        height: 12vw;
        min-width: 50px;
        min-height: 50px;
        font-size: 7vw;
        top: 2vw;
        right: 2vw;
        background: rgba(0,0,0,0.5);
        border-radius: 50%;
    }
    
    .island-bar {
        position: fixed;
        top: 1.5vh;
        left: 2vw;
        display: flex;
        flex-direction: column;
        gap: 1.5vh;
        background: rgba(0,0,0,0.6);
        backdrop-filter: blur(12px);
        padding: 1.5vh 2vw;
        border-radius: 5vw;
        border: 1px solid rgba(255,255,255,0.2);
        z-index: 200;
    }
    
    .island-btn {
        padding: 1vh 3vw;
        font-size: 3.5vw;
        white-space: nowrap;
    }
    
    .memory-badge {
        position: fixed;
        top: 1.5vh;
        right: 10vw;
        font-size: 3vw;
        padding: 1vh 3vw;
        z-index: 200;
    }
    
    .search-area {
        display: none;
    }
    
    .mobile-dpad {
        position: fixed;
        top: 1.5vh;
        height: auto !important;
        align-self: flex-start !important;
        left: 38vw;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
        z-index: 210;
        background: transparent;
        backdrop-filter: none;
        padding: 0;
        border-radius: 12px;
    }

    .dpad-up, .dpad-down {
        display: flex;
        justify-content: center;
    }

    .dpad-middle {
        display: flex;
        align-items: center;
        gap: 3px;
    }

    .dpad-btn {
        width: 22px;
        height: 22px;
        border-radius: 50%;
        background: rgba(0,0,0,0.5);
        border: 0.8px solid var(--accent);
        color: var(--accent);
        font-size: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
    }

    .dpad-text {
        font-size: 8px;
        color: var(--accent);
        font-weight: bold;
        white-space: nowrap;
    }

    
    .fixed-controls {
        position: fixed;
        top: 1.5vh;
        right: 2vw;
        gap: 1vh;
        z-index: 200;
    }
    
    #music-toggle, .theme-toggle {
        width: 10vw;
        height: 10vw;
        min-width: 36px;
        min-height: 36px;
        font-size: 5vw;
    }
    
    .map-controls button {
        width: 10vw;
        height: 10vw;
        min-width: 36px;
        min-height: 36px;
        font-size: 5vw;
    }
    
    .menu-stack {
        position: fixed;
        top: 40%;
        left: 2vw;
        z-index: 200;
    }
    
    .menu-trigger {
        padding: 1.5vh 4vw;
        font-size: 3.5vw;
        white-space: nowrap;
    }
    
    .menu-dropdown-vertical {
        left: 100%;
        bottom: 0;
        top: auto;
        margin-left: 2vw;
        margin-bottom: 0;
        min-width: 35vw;
        padding: 2vw;
    }
    
    .vertical-item {
        padding: 0.8vh 3vw;
        margin: 0.3vh 0;
        font-size: 2.8vw;
        gap: 1.5vw;
    }
    
    .vertical-item img {
        display: none;
    }
    
    .favorite-wrapper {
        position: fixed;
        bottom: 2vh;
        right: 2vw;
        z-index: 200;
    }
    
    .favorite-btn {
        padding: 1.5vh 4vw;
        font-size: 3.5vw;
    }
    
    .favorite-panel-dropup {
        bottom: 7vh;
        width: 50vw;
        max-height: 40vh;
        padding: 2vw;
    }
    
    .favorite-panel-title {
        font-size: 3.5vw;
        margin-bottom: 1vh;
    }
    
    .favorite-item {
        padding: 1vh 3vw;
        font-size: 3vw;
    }
    
    .favorite-item .remove {
        width: 5vw;
        height: 5vw;
        font-size: 3vw;
    }
    
    .empty-favorite {
        font-size: 3vw;
        padding: 2vh;
    }
    
    .cruise-area {
        position: fixed;
        bottom: 2vh;
        right: 28vw;
        z-index: 200;
    }
    
    .cruise-btn {
        padding: 1.5vh 4vw;
        font-size: 3.5vw;
    }
    
    #cruise-dot {
        width: 3vw;
        height: 3vw;
    }
    
    #modal-overlay { z-index: 500; }
    #modal-img { max-width: 95%; max-height: 70vh; }
    #modal-title { font-size: 1rem; }
}

@keyframes goldPulse {
    0% {
        stroke: #ffd700;
        stroke-width: 5px;
        filter: drop-shadow(0 0 2px #ffd700);
    }
    50% {
        stroke: #ffaa00;
        stroke-width: 8px;
        filter: drop-shadow(0 0 15px #ffaa00);
    }
    100% {
        stroke: #ffd700;
        stroke-width: 5px;
        filter: drop-shadow(0 0 2px #ffd700);
    }
}

.hsr-dot.transfer-gold {
    cursor: pointer;
    fill: #ffaa33;
}

.tra-stations circle.transfer-gold {
    cursor: pointer;
    fill: #ffffff;
}

.reset-view-btn {
    width: 4.5vw;
    height: 4.5vw;
    min-width: 44px;
    min-height: 44px;
    background: rgba(0,0,0,0.7);
    border: 1px solid var(--accent);
    border-radius: 50%;
    color: var(--accent);
    font-size: 2.2vw;
    cursor: pointer;
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

@media (max-aspect-ratio: 1/1) {
    .reset-view-btn {
        width: 10vw;
        height: 10vw;
        font-size: 5vw;
    }
}

/* ========== 每月必去月份選單 ========== */
.monthly-panel {
    position: absolute;
    left: 100%;
    bottom: 0;
    margin-left: 1vw;
    background: rgba(0,0,0,0.95);
    backdrop-filter: blur(16px);
    border-radius: 1vw;
    padding: 0.8vw;
    min-width: 20vw;
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 4px 4px 20px rgba(0,0,0,0.5);
    display: none;
    z-index: 170;
}

.monthly-panel.show {
    display: block;
}

.monthly-grid-3x4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5vw;
}

.monthly-item {
    padding: 0.5vw 0.8vw;
    text-align: center;
    cursor: pointer;
    font-size: 1vw;
    font-weight: bold;
    color: white;
    border-radius: 0.5vw;
    transition: 0.2s;
}

.monthly-item:hover {
    background: var(--accent);
    color: #000;
}

/* 美食模式按鈕啟用樣式 */
.food-mode-active {
    background: var(--accent) !important;
    color: #000 !important;
    border-color: var(--accent) !important;
    box-shadow: 0 0 10px var(--accent);
}

/* 手機版每月必去 */
@media (max-aspect-ratio: 1/1) {
    .monthly-panel {
        left: 100%;
        bottom: 0;
        margin-left: 2vw;
        min-width: 40vw;
        padding: 2vw;
    }
    
    .monthly-grid-3x4 {
        gap: 1vw;
    }
    
    .monthly-item {
        padding: 1vh 2vw;
        font-size: 3vw;
    }
}