@font-face {
    font-family: "Sim Dialogue";
    src: url("./simdialogue-uni-game.ttf") format("truetype");
    font-style: normal;
    font-weight: 700;
    font-display: swap;
}

:root {
    color-scheme: dark;
    font: 700 100%/1.55 "Sim Dialogue", system-ui, sans-serif;
    color: #9900cc;
    background: #00ffff;
}

body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(ellipse at top, #ffff00, #00ff00 65%);
}

.realm-shell {
    width: min(75rem, calc(100% - 2rem));
    margin: 0 auto;
    padding: clamp(1rem, 4vw, 3rem) 0 3rem;
}

.realm-brand {
    color: #d7b5eb;
    text-underline-offset: .2em;
}

.realm-header {
    margin: clamp(1rem, 3vw, 2rem) 0 1.25rem;
}

.realm-header h1 {
    margin: 0;
    font-size: clamp(2.2rem, 6vw, 4rem);
    line-height: 1.1;
    letter-spacing: -.045em;
}

.realm-kicker {
    margin: 0 0 .35rem;
    color: #ff33cc;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.realm-lead {
    margin: .55rem 0 0;
    color: #d5c1df;
}

.realm-clock {
    display: inline-flex;
    align-items: baseline;
    gap: .5rem;
    margin: .65rem 0 0;
    padding: .2rem .65rem;
    border: 1px solid #6b4e83;
    border-radius: 999px;
    color: #9900cc;
    font-size: .88rem;
}

#realm-clock {
    color: #ff33cc;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.realm-toolbar, .realm-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .65rem 1.2rem;
}

.realm-toolbar {
    justify-content: space-between;
    margin: 0 0 .75rem;
}

#realm-status {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    margin: 0;
    padding: .2rem .65rem;
    border: 1px solid #6b4e83;
    border-radius: 999px;
    color: #ebdcf6;
    font-size: .88rem;
}

#realm-status::before {
    content: "";
    width: .48rem;
    height: .48rem;
    border-radius: 50%;
    background: #cc9dea;
}

#realm-status[data-state="live"]::before {
    background: #8ae3ac;
}

#realm-status[data-state="partial"]::before,
#realm-status[data-state="unavailable"]::before {
    background: #ffcc78;
}

.realm-map-frame {
    overflow: hidden;
    border: 50px solid #ffff00;
    border-radius: clamp(.55rem, 2vw, 1.2rem);
    background: #9933ff;
    box-shadow: 0 .9rem 2.5rem #080411a6;
}

.realm-sky {
    position: relative;
    height: clamp(6.25rem, 17vw, 13rem);
    overflow: hidden;
    background: linear-gradient(#8aabd0, #dce4ed 72%, #f3cda7);
}

.realm-sky-stars,
.realm-sky-planet {
    position: absolute;
    pointer-events: none;
}

.realm-sky-stars {
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: var(--realm-stars, 0);
}

.realm-sky-planet {
    top: 48%;
    right: 10%;
    width: clamp(9.25rem, 40%, 31rem);
    height: auto;
    transform: translateY(-50%);
    opacity: var(--realm-planet, 0);
}

#realm-map {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
}

.realm-beam-sway {
    animation: realm-sway calc(5s / 3) linear infinite;
    transform-origin: 0 0;
}

.realm-dot {
    fill: #ff3934;
    stroke: #ffd2b4;
    stroke-width: .75;
    animation: realm-pulse calc(5s / 6) ease-in-out infinite;
}

.realm-selected-lot {
    fill: none;
    stroke: #ffe6a2;
    stroke-width: 2.3;
    vector-effect: non-scaling-stroke;
}

@keyframes realm-sway {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(18.9deg); }
    75% { transform: rotate(-18.9deg); }
}

@keyframes realm-pulse {
    0%, 100% { opacity: .52; }
    25% { opacity: 1; }
    75% { opacity: .24; }
}

.realm-panel {
    margin-top: 1rem;
    padding: clamp(.9rem, 3vw, 1.5rem);
    border: 15px solid #00ffff;
    border-radius: .9rem;
    background: #3333ff;
}

.realm-panel h2 {
    margin: 0;
    font-size: 1.15rem;
}

.realm-controls label {
    color: #00ffff;
    font-weight: 600;
}

#realm-category {
    max-width: 100%;
    padding: .42rem .55rem;
    border: 1px solid #0000ff;
    border-radius: .45rem;
    color: #0000ff;
    background: #00ffff;
    font: inherit;
}

#realm-lots {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
    gap: .55rem;
    margin: .8rem 0 0;
    padding: 0;
    list-style: none;
}

.realm-lot-card {
    display: flex;
    width: 100%;
    min-height: 3.9rem;
    height: 100%;
    gap: .7rem;
    align-items: center;
    padding: .6rem .75rem;
    border: 1px solid #604376;
    border-radius: .6rem;
    color: inherit;
    background: #241635;
    text-align: left;
    font: inherit;
    cursor: pointer;
}

.realm-lot-card:hover {
    border-color: #c691ea;
}

.realm-lot-card[aria-pressed="true"] {
    border-color: #ffe6a2;
    background: #3b2850;
}

.realm-lot-thumbnail {
    width: 2.7rem;
    height: 2.7rem;
    flex: none;
    object-fit: contain;
    border-radius: .35rem;
    background: #11091c;
}

.realm-lot-copy {
    display: grid;
    gap: .15rem;
    overflow-wrap: anywhere;
}

.realm-lot-details {
    color: #d8c1e3;
    font-size: .83rem;
}

.realm-empty {
    grid-column: 1 / -1;
    margin: .25rem 0;
    color: #d5c1df;
}

.realm-shell :focus-visible {
    outline: 2px solid #ffe6a2;
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    .realm-beam-sway, .realm-dot {
        animation: none;
    }
}
