/* === RADAR AREA === */
.radar-detail {
    position: absolute;
    bottom: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    z-index: 3;
    pointer-events: none;
}
.menu-gps {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}
.gps-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    position: relative;
    width: 38px;
    cursor: pointer;
}
.gps-img {
    width: 30px;
}
.gps-text {
    font-size: 0.6em;
    color: #eee;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
    position: absolute;
    bottom: 0;
}
.gps-zoom {
    width: 30px;
    height: 100%;
    position: absolute;
}
.gps-item .zoom {
    font-weight: 600;
    color: #ccc;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}
.radar-arena {
    pointer-events: auto;
    display: flex;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    touch-action: manipulation;
}
.radar-info {
    position: relative;
    width: 100%;
    overflow: hidden;
    pointer-events: none;
    display: flex;
    justify-content: end;
    align-items: end;
    padding: 0 12px;
    color: #fff;
    height: 90px;
}
.radar-runner {
    position: relative;
    bottom: 0;
    right: 0;
    width: 160px;
    aspect-ratio: 1 / 1;
    pointer-events: auto;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.radar-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    pointer-events: none !important;
}
.radar-canvas {
    width: 100%;
    aspect-ratio: 1 / 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: auto !important;
    cursor: pointer;
}
.radar-item, .radar-no-item {
    width: 100px;
    border-radius: 50%;
    background: radial-gradient(circle, #043b0b30, #021e04);
    border: 1px solid rgba(0, 255, 0, 0.5);
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.8);
}
.radar-battery-badge {
    position: absolute;
    top: 0;
    right: 0;
    width: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1;
}
.radar-battery-icon {
    width: 100%;
    position: absolute;
    z-index: -1;
}
.radar-battery-value {
    font-size: 0.7em;
    color: #fff;
    transition: color 0.2s ease;
}
.radar-battery-badge.is-dead .radar-battery-value {
    color: #ff3333;
}
.radar-status-text {
    position: absolute;
    color: #fff;
    font-weight: 200;
    pointer-events: none !important;
}
/* === Travel === */
.travel-info {
    color: #fff;
    text-align: justify;
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.travel-info img {
    width: 100% !important;
    height: 100% !important;
    /* aspect-ratio: 3 / 4; */
    border-radius: 5px;
}
.travel-pane {
    display: none;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.travel-pane.active {
    display: block;
}
.travel-pane::-webkit-scrollbar {
    display: none;
}
.travel-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.remark-timeline {
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
}
.timeline-item {
    display: grid;
    grid-template-columns: 2fr 1fr 8fr;
    align-items: center;
}
.timeline-distance {
    font-size: 0.8em;
}
.timeline-axis {
    width: 14px;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-self: stretch;
    position: relative;
}
.timeline-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 3px solid #00a86b;
    background: #00a86b;
    z-index: 2;
    box-shadow: 0 0 0 3px rgba(0,168,107,0.15);
    flex-shrink: 0;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
.timeline-item:not(:last-child) .timeline-axis::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: calc(100% + 10px);
    background: #e0e0e0;
    z-index: 1;
}
.timeline-card {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 5px;
    background: linear-gradient(180deg, rgba(55, 73, 97, .75), rgba(31, 48, 70, .82));
    border: 1px solid rgba(130, 220, 255, .15);
}
.timeline-thumb {
    width: 60px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    overflow: hidden;
    flex-shrink: 0;
}
.timeline-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    color: #bbb;
    background: linear-gradient(135deg, #f0f0f0, #e8e8e8);
}
.timeline-info {
    flex: 1;
    min-width: 0;
}
.timeline-name {
    font-size: 0.8em;
    font-weight: 400;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}
.timeline-meta {
    font-size: 0.7em;
    color: #ccc;
}
.checkin-count {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.travel-map-marker {
    width: 56px;
    height: 56px;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
}
.travel-map-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    pointer-events: none;
}
.travel-map-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 22px;
    height: 22px;
    padding: 0 5px;
    border-radius: 5px;
    background: url(/images/clan/editor/ui/frame.webp) center center / cover no-repeat;
    border: 1px solid rgba(89, 210, 255, 0.55);
    color: #fff;
    font-size: 0.75em;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
    pointer-events: none;
}
/* ===== NPC Carousel (1–5) ===== */
.npc-carousel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    height: 100%;
    overflow: hidden;
}
.npc-carousel .npc-card {
    flex: 1;
    width: auto;
    height: 100%;
    overflow: hidden;
    cursor: pointer;
}
.npc-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-shrink: 0;
    height: 30px;
}
.npc-dot {
    width: 22px;
    height: 22px;
    object-fit: contain;
    opacity: 0.4;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s;
}
.npc-dot.active {
    opacity: 1;
    transform: scale(1.25);
}
/* ===== NPC Grid (≥ 6) ===== */
.npc-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 4px 0 12px;
}
.npc-grid .npc-card {
    width: 100%;
    aspect-ratio: 3 / 5;
    object-fit: cover;
    object-position: top center;
    border-radius: 10px;
    border: 1px solid rgba(130, 220, 255, 0.15);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    cursor: pointer;
    background: #1a2433;
}
.btn-go-icon {
    height: 100%;
}
/* ===== Travel AirShip ===== */
.travel-list-panel {
    position: absolute;
    top: calc(var(--weather-bottom, 56px) + 6px);
    right: 5px;
    width: min(34vw, 160px);
    pointer-events: auto;
    font-size: 0.75em;
    color: #fff;
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.35);
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
    overflow: visible;
}
.tlp-peek {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}
.tlp-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
    flex-shrink: 0;
}
.tlp-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.tlp-name {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}
.tlp-distance {
    font-size: 0.85em;
    opacity: 0.9;
    color: #ddd;
}
.tlp-checkin {
    display: flex;
    align-items: center;
    gap: 3px;
    opacity: 0.9;
    font-size: 0.85em;
    color: #ddd;
}
.tlp-toggle {
    background: none;
    border: none;
    color: #9fdfff;
    padding: 4px;
    cursor: pointer;
    flex-shrink: 0;
    font-size: 0.9em;
}
.tlp-body {
    display: none;
    flex-direction: column;
    height: 100%;
    max-height: none;
    overflow: visible;
    box-sizing: border-box;
}
.tlp-footer {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 6px 4px 8px;
    background: rgba(0, 0, 0, 0.45);
    border-top: 1px solid rgba(130, 220, 255, 0.2);
}
.tlp-search,
.tlp-coord {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid rgba(130, 220, 255, 0.35);
    border-radius: 4px;
    background: rgba(10, 20, 35, 0.85);
    color: #fff;
    font-size: 0.85em;
    padding: 7px 8px;
    outline: none;
}
.tlp-search:focus,
.tlp-coord:focus {
    border-color: rgba(255, 170, 0, 0.7);
}
.tlp-coord-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    border-top: 1px solid rgba(0, 200, 255, 0.55);
    padding-top: 5px;
}
.tlp-coord {
    flex: 1;
    min-width: 0;
}
.tlp-fly-btn {
    width: 100%;
    height: 36px;
    border: 1px solid rgba(0, 200, 255, 0.55);
    border-radius: 4px;
    background: rgba(0, 60, 100, 0.65);
    color: #9fdfff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.tlp-fly-btn img {
    width: 28px;
    height: auto;
    object-fit: contain;
    pointer-events: none;
}
.tlp-fly-btn:active {
    background: rgba(0, 140, 200, 0.75);
}
.travel-list-panel[data-state="expanded"] .tlp-peek {
    display: none;
}
.travel-list-panel[data-state="expanded"] .tlp-body {
    display: flex;
    gap: 5px;
    height: 100%;
}
.tlp-header {
    position: relative;
    overflow: visible;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    min-height: 36px;
    padding: 14px 0 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
}
.f-ragnarok {
    position: absolute;
    left: -30px;
    top: 50%;
    width: 70px;
    height: 37px;
    background: url(/images/character/ragnarok/f-ragnarok.webp) 0 0 / 560px 37px no-repeat;
    transform: translateY(-50%) scale(1.45);
    transform-origin: center center;
    z-index: 6;
    pointer-events: none;
    filter: drop-shadow(0 0 1px rgba(0, 200, 255, 0.9));
    image-rendering: crisp-edges;
    animation: ragnarokIdle 0.6s steps(8) infinite;
}
@keyframes ragnarokIdle {
    from { background-position-x: 0; }
    to   { background-position-x: -560px; }
}
.tlp-title {
    font-weight: 600;
    font-size: 0.95em;
    margin-left: auto;
    position: relative;
    z-index: 1;
}
.tlp-close {
    background: none;
    border: none;
    color: #9fdfff;
    padding: 4px;
    cursor: pointer;
}
.tlp-scroll {
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.tlp-scroll::-webkit-scrollbar { display: none; }
.tlp-vpad {
    pointer-events: none;
    visibility: hidden;
}
.tlp-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #ddd;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.25);
}
.tlp-item:active,
.tlp-item.active {
    position: sticky;
    top: 0;
    z-index: 5;
    border: 1px solid rgba(255, 170, 0, 0.55);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
    background: url(/images/clan/editor/ui/frame.webp) center center / cover no-repeat;
}
.tlp-empty {
    text-align: center;
    padding: 24px 8px;
    color: #9ab;
    font-size: 0.9em;
}
.travel-focus-arc {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 4;
    display: none;
}
.travel-focus-arc.show { display: block; }
.travelFocusDot {
    pointer-events: none;
}
/* ===== Ragnarok ===== */
.map-fly-overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    background: #000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease;
}
.map-fly-overlay.show {
    opacity: 1;
    pointer-events: auto;
}
.map-fly-overlay.fade-out {
    opacity: 0;
    transition: opacity 0.55s ease;
}
.map-fly-ship {
    position: absolute;
    right: 0;
    top: 48%;
    width: 283px;
    height: 150px;
    background: url(/images/character/ragnarok/f-ragnarok.webp) 0 0 / 2264px 150px no-repeat;
    transform: translateY(-50%) scale(0.55);
    transform-origin: right center;
    opacity: 0;
    filter: drop-shadow(0 0 5px rgba(0, 200, 255, 0.7));
    will-change: transform, opacity, background-position;
    image-rendering: crisp-edges;
    pointer-events: none;
}
.map-fly-ship.appear {
    opacity: 1;
    animation: shipSprite 0.48s steps(8) infinite;
}
.map-fly-ship.dash {
    opacity: 1;
    animation: 
        shipSprite 0.15s steps(8) infinite,
        shipDashLeft 0.55s cubic-bezier(0.25, 0.1, 0.2, 1) forwards;
}
/* === CLAN VIEWER === */
.popup-clan {
    position: fixed;
    transform: translate(-50%, -100%);
    z-index: 9999;
    background: url(/images/clan/editor/ui/frame.webp) center center / cover no-repeat;
    border: 1px solid rgba(89, 210, 255, 0.55);
    border-radius: 5px;
    padding: 12px 14px;
    color: #fff;
    font-size: 0.9em;
    pointer-events: auto;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    max-width: 80%;
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
}
.popup-clan.show {
    opacity: 1;
}
.popup-clan.hide {
    opacity: 0;
}
.popup-clan .bottom-btn {
    pointer-events: auto;
    cursor: pointer;
}
.clan-viewer {
    position: relative;
    margin: 0 auto;
    overflow: hidden;
}
.clan-viewer-tile {
    position: absolute;
    background-size: cover;
    background-position: center;
}
.clan-map-item {
    opacity: 1;
}
.clan-viewer-item {
    position: absolute;
    pointer-events: none;
}
.clan-viewer-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
}
.clan-viewer-item.main-city {
    pointer-events: auto;
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.clan-info-mini {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    transform-origin: center center;
    background: url(/images/clan/editor/ui/frame.webp) center center / cover no-repeat;
    border: 1px solid rgba(89, 210, 255, 0.55);
    border-radius: 5px;
    padding: 3px;
    display: flex;
    align-items: center;
    gap: 5px;
    pointer-events: none;
}
.clan-info-mini img {
    pointer-events: auto;
    width: 18px;
    height: 18px;
    object-fit: cover;
    vertical-align: middle;
}
.name-player {
    font-size: 0.8em;
    color: #fff;
    white-space: nowrap;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70px;
}
.clan-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}
.clan-info .clan-logo-mini {
    width: 50px;
    object-fit: cover;
    vertical-align: middle;
}
.img-shield {
    position: absolute;
    top: 0;
    right: 0;
    width: 30px;
    pointer-events: none;
    animation: gemGlow 2s infinite;
}
/* ==================== WAR CLAN ==================== */
.war-global-smoke {
    position: absolute;
    inset: 0;
    pointer-events: none;
    mix-blend-mode: multiply;
    opacity: 0.85;
}
.war-global-fire {
    position: absolute;
    inset: 0;
    pointer-events: none;
    mix-blend-mode: screen;
}
.clan-viewer-item.main-city.at-war {
    animation: aaa_micro_seismic 3s ease-in-out infinite;
    transform-origin: center bottom;
}
@keyframes aaa_micro_seismic {
    0%, 82%, 100% { transform: translate3d(0, 0, 0) scale(1) rotate(0deg); }
    84% { transform: translate3d(-0.5px, 0.3px, 0) scale(0.998) rotate(-0.15deg); }
    86% { transform: translate3d(0.6px, -0.2px, 0) scale(1) rotate(0.15deg); }
    88% { transform: translate3d(-0.4px, -0.4px, 0) scale(0.999) rotate(-0.05deg); }
    90% { transform: translate3d(0.4px, 0.2px, 0) scale(1) rotate(0.05deg); }
    92% { transform: translate3d(-0.2px, 0.1px, 0) scale(0.999) rotate(0deg); }
    95% { transform: translate3d(0.1px, -0.1px, 0) scale(1); }
}
@keyframes shipSprite {
    from { background-position-x: 0; }
    to   { background-position-x: -2264px; }
}
@keyframes shipDashLeft {
    0% {
        transform: translateY(-50%) scale(0.55) translateX(0);
        opacity: 1;
        filter: drop-shadow(0 0 18px rgba(0, 200, 255, 0.75)) brightness(1.15);
    }
    100% {
        transform: translateY(-50%) scale(0.48) translateX(-135vw);
        opacity: 0;
        filter: drop-shadow(-30px 0 28px rgba(0, 200, 255, 0.4));
    }
}