* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

::before,
::after {
    box-sizing: inherit;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard Variable", Pretendard, Roboto, "Noto Sans KR", "Segoe UI", "Malgun Gothic", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
}

input,
select,
button {
    font-family: inherit;
}

body {
    margin: 0;
}

.hidden {
    display: none !important;
}

.style-laid {
    box-shadow:
        rgba(0, 0, 0, 0.1) 0px 10px 15px -3px,
        rgba(0, 0, 0, 0.05) 0px 4px 6px -2px;
    background: #ffffff;
    color: #000000;
    border: 0.25px solid rgba(0, 0, 0, 0.08);
}

.app {
    width: 100dvw;
    height: 100dvh;
    /* Keep this here until overflow on small displays (mobile) is fixed */
    overflow: hidden;
}

.app__dialog {
    position: relative;
    border-radius: 2rem;
    align-self: center;
    justify-self: center;
}

.app__dialog::backdrop {
    backdrop-filter: blur(4px);
    background: rgba(255, 255, 255, 0.1);
}

.loading header {
    margin: 1.5rem;
}

.progress-container {
    display: grid;
    grid-template-columns: auto auto;
    margin: 1.5rem;
    gap: 0.2rem 0.6rem;
}

.progress {
    display: contents;
}

.progress__description {
    grid-column: 1 / 2;
}

.progress__bar {
    grid-column: 2 / 3;
}

.content-container {
    display: contents;
}

.scene-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.omnibox-container {
    position: absolute;
    top: 0;
    left: 0;
    max-width: 100%;
    margin: 2.2rem 0 0 3rem;
}

.footer-container {
    position: absolute;
    bottom: 0;
    right: 0;
    margin: 0 0 0 2rem;
}

.scene {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.scene {
    background: linear-gradient(320deg, #0002, #0000);
}

.omnibox-container {
    pointer-events: none;
}

.omnibox {
    display: flex;
    flex-flow: row wrap;
    align-items: start;
}

.dropbutton-container {
    display: flex;
    flex-flow: column wrap;
    height: 3rem;
    margin: 0 0 0 1rem;
    align-items: center;
    justify-content: center;
}

.dropbutton {
    pointer-events: auto;
    display: flex;
    flex-flow: row nowrap;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border-radius: 9e9px;
    background: #fff;
    color: #333;
}

.dropbutton:hover {
    background: #f5f5f5;
}

.dropbutton__icon {
    height: 1rem;
    width: 1rem;
}

.dropbutton__label {
    margin: 0 0 0 0.2rem;
    font-size: 0.8rem;
}

.search-container {
    pointer-events: auto;
}

.search-container {
    width: 20rem;
    margin: 0;
    padding: 0 0 0 2rem;
    overflow: hidden;
    transition: all 0.2s ease-in-out;
    border-radius: 24px;
}

.search__input {
    outline: none;
    width: 100%;
    margin: 0.3rem 0;
    padding: 0.5rem 0;
    background: transparent;
    border: none;
    font-size: 1.2rem;
    color: #666;
}

.search__results {
    width: 18rem;
}

.search__no-results-msg,
.search__many-results-msg {
    display: none;
    font-size: 0.8rem;
}

.--no-results .search__no-results-msg {
    display: block;
}

.--no-query .search__no-results-msg {
    display: none;
}

.--no-results .search__results__status,
.--no-results .search__results__list {
    display: none;
}

.--many-results .search__many-results-msg {
    display: block;
    margin-right: 2rem;
    margin-bottom: 2rem;
}

.search__no-results-msg,
.search__many-results-msg,
.search__results__status {
    margin: 0 0 0.5rem;
    font-size: 0.8rem;
    color: #666;
}

.search__results__status .search__results__count,
.search__results__status .search__results__time {
    color: #000;
}

.search__results__body {
    overflow: auto;
    max-height: calc(100dvh - 16rem);
}

.search__results__list {
    display: flex;
    flex-flow: column nowrap;
    justify-content: flex-start;
    align-items: stretch;
    gap: 2.5rem 0;
    margin: 1rem 0 0;
    padding: 0 0 2rem;
    list-style: none;
}

.search__result {
    display: flex;
    flex-flow: column nowrap;
    margin: 0 2rem 0 0;
    gap: 0.3rem;
}

.search__result__header {
    display: flex;
    justify-content: space-between;
}

.search__result__id,
.search__result__level {
    font-size: 0.8rem;
    color: #666;
}

.search__result__id a {
    color: inherit;
    text-decoration: none;
}

.search__result__id a:hover {
    text-decoration: underline;
}

.search__result__title {
    cursor: pointer;
    font-size: 1.2rem;
}

.search__result__title:hover {
    text-decoration: underline;
}

.tooltip__tags,
.search__result__tags {
    list-style: none;
    display: flex;
    gap: 0 0.5rem;
    flex-flow: row wrap;
    font-size: 0.8rem;
    color: #666;
}

.tooltip__tag,
.search__result__tag {
    line-height: 1.2;
    word-spacing: -0.1ch;
}

.tooltip__tag::before,
.search__result__tag::before {
    display: inline-block;
    content: "#";
    margin-right: 0.1ch;
}

.search__result__level__color {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    vertical-align: baseline;
}

.tooltip {
    pointer-events: none;
    display: flex;
    flex-flow: column nowrap;
    position: absolute;
    z-index: 20000;
    width: 200px;
    min-height: 250px;
    padding: 9px 12px;
    background: transparent;
    border-radius: 12px;
    font-size: 12px;
    line-height: 1.5;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: saturate(180%) blur(4px);
}

.tooltip__header {
    display: flex;
    justify-content: space-between;
}

.tooltip__tags {
    margin-bottom: 0.2rem;
}

.tooltip__stats {
    width: 100%;
    margin: auto 0 0 0;
    padding: 0;
    border-collapse: collapse;
}

.tooltip__statname {
    width: calc(100% / 3);
    font-weight: normal;
    color: #666;
}

.tooltip__statvalue {
    font-family: monospace;
    text-align: end;
}

.tooltip-circle {
    pointer-events: none;
    position: absolute;
    z-index: 10000;
    transition: transform 0.2s cubic-bezier(0.19, 1, 0.22, 1);
}

.tooltip,
.tooltip-circle {
    will-change: transform;
}

.tooltip-circle__icon {
    width: 24px;
    height: 24px;
    background: url("data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20height=%2224px%22%20width=%2224px%22%20viewBox=%220%200%2024%2024%22%20fill=%22currentColor%22%3E%3Cpath%20d=%22M3.05,13H1V11H3.05C3.5,6.83%206.83,3.5%2011,3.05V1H13V3.05C17.17,3.5%2020.5,6.83%2020.95,11H23V13H20.95C20.5,17.17%2017.17,20.5%2013,20.95V23H11V20.95C6.83,20.5%203.5,17.17%203.05,13M12,5A7,7%200%200,0%205,12A7,7%200%200,0%2012,19A7,7%200%200,0%2019,12A7,7%200%200,0%2012,5Z%22/%3E%3C/svg%3E") no-repeat center center / contain;
    animation: tooltip-circle-rotate 3s linear infinite;
}

@keyframes tooltip-circle-rotate {
    0% {
        transform: rotate(0turn);
    }

    100% {
        transform: rotate(1turn);
    }
}

.tooltip__title {
    margin: 0.2em 0 0.4em;
    font-size: 1.1rem;
    font-weight: bold;
    line-height: 1.1;
}

.tooltip__level-circle {
    display: inline-block;
    width: 0.8em;
    height: 0.8em;
    margin-left: 0.2em;
    border-radius: 50%;
    vertical-align: baseline;
}

.footer {
    padding: 0.1rem 0.3rem;
    background: #f5f5f5;
    color: #666;
}

.content-copyright {
    display: block;
    font-size: 0.8rem;
}

.copyright-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.copyright-notice {
    line-height: 1;
}


.katex {
    font-size: 1em;
    line-height: 1;
}

.scene d3fc-group.cartesian-chart {
    width: calc(100% + 2em);
    height: calc(100% + 2em);
    margin: -1em;
}

.scene d3fc-group.cartesian-chart .bottom-axis {
    height: 0;
}

.scene d3fc-group.cartesian-chart .right-axis {
    width: 0;
}

.settings {
    padding: 1rem;
}

.settings__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.settings__title {
    font-size: 1.2rem;
    margin: 0;
}

.settings__body {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto;
    gap: 1rem;
    grid-auto-rows: 2rem;
}

.settings__item {
    display: contents;
}

.settings__right,
.settings__left {
    display: flex;
    flex-flow: row nowrap;
    align-items: center;
    justify-content: space-between;
}

.settings__footer {
    display: flex;
    justify-content: flex-end;
    margin: 1rem 0 0 0;
    gap: 1rem;
}

.settings__button {
    padding: 0.5rem 1rem;
    color: #000;
}


@media (max-width: 425px) {
    .omnibox-container {
        margin: 0;
    }

    .search-container {
        width: 100%;
        margin: 0;
        padding: 0 0 0 1rem;
        border-radius: 0;
    }

    .search__results {
        width: 100%;
        margin: 0;
    }

    .search__results__body {
        max-height: 33.333333dvh;
    }
}
