@import url(https://fonts.googleapis.com/css2?family=BIZ+UDPGothic:wght@400;700&display=swap);

html {
    overscroll-behavior: none;
}

body {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    overflow: hidden;
    overscroll-behavior: none;
}

body *,
body *::before,
body *::after {
    margin: 0;
    box-sizing: border-box;
    font-family: "BIZ UDPGothic", "Helvetica Neue", "Helvetica", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Arial", "Yu Gothic", "Meiryo", sans-serif !important;
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    text-size-adjust: 100%;
    -webkit-user-select: none;
    user-select: none;
    overscroll-behavior: none;
    /* touch-action: none;
    pointer-events: none; */
    backface-visibility: hidden;
    -webkit-user-drag: none;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    -webkit-backface-visibility: hidden;
    -webkit-overflow-scrolling: touch
}

.map {
    width: 100%;
    height: 100dvh;
    background-color: #bfe4ff;
}

.svg-layer {
    position: absolute;
}

.svg-layer path:hover {
    opacity: 0.4;
}

#base_map {
    display: none;
    position: absolute;
    top: 52px;
    left: 82px;
    opacity: .2;
    z-index: 100;
    touch-action: none;
    pointer-events: none;
}

#center_line {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    opacity: .9;
    z-index: 1000;
    width: 100%;
    height: 100dvh;
    touch-action: none;
    pointer-events: none;
}

#center_line::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    height: 100%;
    width: 1px;
    background: #f00;
}

#center_line::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    height: 1px;
    width: 100%;
    background: #f00;
}

#overlay {
    display: none;
}

.ol-overlay-container:has(.staff_icon_wrapper input:checked) {
    z-index: 10;
}

.staff_icon_wrapper {
    position: relative;
}

.staff_icon_wrapper input {
    display: none;
}

.staff_icon_wrapper label {
    cursor: pointer;
}

.staff_icon {
    position: relative;
    width: 48px;
    height: 48px;
    background-color: var(--staff-icon-bg, #ff848480);
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    border: solid 3px var(--staff-icon-border, #ff8484aa);
    border-radius: 50%;
    box-shadow: 0px 10px 10px -6px rgba(0, 0, 0, .3);
    transform-origin: center;
    -webkit-backdrop-filter: blur(4px) saturate(86%);
    backdrop-filter: blur(4px) saturate(86%);
    will-change: transform;
    animation: pikopiko 1s steps(2, start) infinite;
    transition: all .2s 0s ease-in;
}

.staff_icon_wrapper input:checked+label .staff_icon {
    width: 120px;
    height: 120px;
}

.staff_icon i {
    display: none;
    padding: 2px;
    font-size: 8px;
    font-style: normal;
    font-weight: bold;
    color: var(--staff-icon-text, #fff);
    background-color: var(--staff-icon-border, #ff8484aa);
    border-radius: 8px;
}

.staff_icon_wrapper .caption {
    position: absolute;
    bottom: -24px;
    left: 50%;
    padding: 2px 4px;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    white-space: nowrap;
    color: var(--staff-icon-text, #fff);
    background-color: var(--staff-icon-border, #ff8484aa);
    border-radius: 4px;
    text-shadow: 0px 0px 4px #333;
    box-shadow: 0px 10px 10px -6px rgba(0, 0, 0, .3);
    -webkit-backdrop-filter: blur(4px) saturate(86%);
    backdrop-filter: blur(4px) saturate(86%);
    opacity: 0;
    z-index: 11;
    transform: translateX(-50%);
    transition: opacity .2s 0s ease-in;
}

.staff_icon_wrapper input:checked+label .caption {
    opacity: 1;
}

.anchor {
    display: flex;
    align-content: center;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    width: 120px;
    gap: .5rem .125rem;
}

#info {
    display: none;
}

body.disabled_icon #info {
    position: fixed;
    right: 0;
    left: 0;
    top: 0;
    bottom: 0;
    display: flex;
    align-content: center;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    text-align: center;
}

#info>div {
    display: none;
}

body.night #info {
    background-color: rgba(0, 0, 0, .2);
    -webkit-backdrop-filter: blur(4px) saturate(86%);
    backdrop-filter: blur(4px) saturate(86%);
}

body.night #info>div {
    display: block;
    padding: 1rem 2rem;
    border-radius: .5rem;
    background-color: rgba(255, 255, 255, .7);
    box-shadow: 0px 10px 10px -6px rgba(0, 0, 0, .3);
}

#info strong {
    display: block;
    margin-bottom: 1rem;
}

/* #debug_info */
#debug_info {
    display: none;
    position: fixed;
    right: .5em;
    bottom: .5em;
    font-size: 8px;
    z-index: 10000;
    background-color: rgba(255, 255, 255, .3);
}

#debug_info .update {
    color: #f00;
}


/* .ol-control */
.ol-rotate {
    display: none;
}

.ol-zoomslider {
    top: 2.5em;
    left: unset;
    right: .5em;
    -webkit-backdrop-filter: blur(4px) saturate(86%);
    backdrop-filter: blur(4px) saturate(86%);
}



/* #notice */
body #notice {
    position: fixed;
    right: .5rem;
    bottom: .5rem;
    left: .5rem;
    max-width: min(640px, calc(100dvw - 1.5rem));
    display: flex;
    align-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin: 0 auto;
    padding: .25rem .5rem;
    font-size: .75rem;
    border-radius: .5rem;
    background-color: rgba(255, 255, 255, .7);
    box-shadow: 0px 10px 10px -6px rgba(0, 0, 0, .3);
    -webkit-backdrop-filter: blur(4px) saturate(86%);
    backdrop-filter: blur(4px) saturate(86%);
    z-index: 10001;
    transition: opacity .2s 0s ease-in;

    &.hidden {
        opacity: 0;
    }

    .l_bg {
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;
        overflow: hidden;

        .bg_image {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            max-height: 25dvh;
            transform: translate(30%, 0%);
            opacity: .2;
        }

        .bg_image::before {
            content: '';
            display: block;
            width: 100%;
            height: 250%;
            background-position-x: left;
            background-position-y: bottom;
            background-repeat: no-repeat;
            background-size: contain;
            will-change: background-position;
            animation: shake-walk 5s ease-in-out infinite;
        }
    }

    .l_text {
        width: 100%;
        max-height: 25dvh;
        overflow: auto;
        font-weight: bold;
        text-shadow: 1px 1px 2px white;
        z-index: 1;
        pointer-events: all;

        & dl {
            display: grid;
            grid-template-columns: auto 1fr;
            gap: .5rem;
            margin-top: 1rem;
        }
    }
}

body.disabled_icon #notice {
    display: none;
}

body #debug_info {
    /* display: block; */
}


/* body.dev */
body.dev .map {
    /* background-image: linear-gradient(125deg, rgba(253, 219, 146, 1), rgba(209, 253, 254, 1)); */
}


@keyframes pikopiko {
    0% {
        transform: rotate(20deg);
    }

    to {
        transform: rotate(-10deg);
    }
}