:root {
    color-scheme: dark;
    --bg-base: #02060f;
    --bg-overlay: rgba(1, 5, 12, 0.5);
    --panel-bg: rgba(7, 12, 24, 0.92);
    --panel-gradient: linear-gradient(155deg, rgba(10, 16, 32, 0.96), rgba(2, 6, 14, 0.98));
    --panel-border: rgba(120, 188, 255, 0.5);
    --panel-glow: rgba(46, 116, 196, 0.42);
    --accent: #7fe3ff;
    --accent-strong: #c5f6ff;
    --accent-soft: rgba(112, 216, 255, 0.14);
    --accent-muted: rgba(46, 116, 196, 0.35);
    --text-primary: #f6f8ff;
    --text-secondary: rgba(199, 219, 255, 0.68);
    --text-tertiary: rgba(158, 192, 243, 0.52);
    --surface-alt: rgba(4, 10, 22, 0.72);
    --shadow-strong: 0 28px 60px rgba(0, 6, 18, 0.66);
    --shadow-soft: 0 18px 34px rgba(6, 16, 36, 0.55);
    --corner-size: 28px;
    --corner-thickness: 2px;
    --font-base: 'Sarpanch', 'Segoe UI', sans-serif;
    --ui-scale-desktop: 0.88;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    font-family: var(--font-base);
    background: var(--bg-base);
    color: var(--text-primary);
    display: flex;
    justify-content: center;
    align-items: stretch;
    padding: clamp(16px, 3vw, 32px);
    position: relative;
    overflow-x: hidden;
}

body.biome--glitch {
    --bg-base: #050010;
    --panel-border: rgba(255, 100, 246, 0.52);
    --panel-glow: rgba(255, 100, 246, 0.24);
    --accent: #ff64f6;
    --accent-strong: #ffd7ff;
    --accent-soft: rgba(255, 100, 246, 0.18);
    --accent-muted: rgba(255, 100, 246, 0.32);
    --text-secondary: rgba(222, 206, 255, 0.78);
    --text-tertiary: rgba(188, 180, 255, 0.54);
}

body.biome--glitch .ui-backdrop {
    filter: hue-rotate(-18deg) saturate(1.35) contrast(1.08);
}

body.biome--glitch .ui-backdrop__veil {
    opacity: 0.85;
    mix-blend-mode: screen;
    animation: glitch-noise 12s steps(2, end) infinite;
}

body.biome--glitch::before,
body.biome--glitch::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    transition: opacity 0.4s ease;
}

body.biome--glitch::before {
    background:
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 3px),
        repeating-linear-gradient(90deg, rgba(255, 92, 231, 0.08) 0 2px, transparent 2px 6px);
    mix-blend-mode: screen;
    opacity: 0.22;
}

body.biome--glitch::after {
    background:
        radial-gradient(circle at 18% 18%, rgba(255, 92, 231, 0.22), transparent 48%),
        radial-gradient(circle at 82% 24%, rgba(72, 214, 255, 0.2), transparent 50%);
    mix-blend-mode: lighten;
    opacity: 0.18;
}

body.biome--glitch .panel {
    border-color: rgba(255, 100, 246, 0.45);
    box-shadow: 0 28px 60px rgba(18, 0, 34, 0.68), 0 0 34px rgba(255, 100, 246, 0.18);
}

body.biome--glitch .panel::after {
    background: radial-gradient(circle at 50% 0%, rgba(255, 100, 246, 0.12), transparent 44%),
                linear-gradient(160deg, rgba(22, 6, 32, 0.96), rgba(6, 0, 14, 0.98));
}

body.biome--glitch .ui-toggle,
body.biome--glitch .roll-button {
    background-image: linear-gradient(92deg, rgba(38, 0, 64, 0.9), rgba(10, 0, 24, 0.92));
    border-color: rgba(255, 100, 246, 0.42);
    color: #fff;
}

body.biome--glitch .resource-card {
    box-shadow: 0 10px 24px rgba(20, 0, 40, 0.55);
}

body.is-glitching::before,
body.is-glitching::after {
    opacity: 0.52;
    animation: glitch-noise 0.46s steps(4, end) infinite;
    filter: saturate(1.4) contrast(1.18);
}

body.is-glitching .ui-backdrop__veil {
    animation-duration: 1.6s;
    filter: hue-rotate(18deg) saturate(1.65) blur(2px);
}

body.is-glitching .ui-shell {
    animation: glitch-shell 0.16s steps(3, end) infinite;
    filter: contrast(1.38) saturate(1.8) brightness(1.08);
    transform-origin: 50% 12%;
}

body.is-glitching .panel {
    animation: glitch-panel 0.18s steps(3, end) infinite;
    filter: saturate(1.6) contrast(1.22) brightness(1.05);
    box-shadow: 0 0 24px rgba(255, 100, 246, 0.32), 0 18px 42px rgba(18, 0, 34, 0.7);
}

body.is-glitching .panel::after {
    animation: glitch-flicker 0.18s steps(3, end) infinite;
    mix-blend-mode: screen;
}

body.is-glitching .panel::before {
    content: '';
    position: absolute;
    inset: -6px;
    background:
        linear-gradient(0deg, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.35)),
        linear-gradient(90deg, rgba(0, 0, 0, 0.9) 50%, transparent 50%),
        linear-gradient(0deg, rgba(0, 0, 0, 0.9) 50%, transparent 50%),
        repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0 2px, transparent 2px 4px);
    background-size: 200% 200%, 120px 120px, 120px 120px, 6px 6px;
    background-position: center;
    mix-blend-mode: hard-light;
    opacity: 0.65;
    filter: blur(0.2px) contrast(1.4);
    animation: glitch-fracture 0.22s steps(4, end) infinite;
    z-index: 2;
    pointer-events: none;
}

body.is-glitching .ui-shell::after {
    content: '';
    position: absolute;
    inset: -6px;
    border: 2px solid rgba(255, 100, 246, 0.38);
    pointer-events: none;
    mix-blend-mode: screen;
    animation: glitch-outline 0.16s steps(3, end) infinite;
    box-shadow: 0 0 36px rgba(255, 100, 246, 0.28);
}

body.is-glitching .ui-shell::before {
    content: '';
    position: absolute;
    inset: -12px;
    background:
        repeating-conic-gradient(from 45deg, rgba(0, 0, 0, 0.8) 0 12deg, transparent 12deg 24deg),
        repeating-linear-gradient(120deg, rgba(255, 255, 255, 0.08) 0 18px, transparent 18px 36px);
    mix-blend-mode: multiply;
    opacity: 0.4;
    animation: glitch-shard 0.18s steps(3, end) infinite;
    pointer-events: none;
    z-index: 1;
}

body.is-glitching .panel > * {
    animation: glitch-content 0.2s steps(4, end) infinite;
    filter: saturate(1.2) contrast(1.2);
}

body.is-glitching .panel > *:nth-child(odd) {
    animation-duration: 0.18s;
}

body.is-glitching .ui-toggle,
body.is-glitching .roll-button,
body.is-glitching .field__input,
body.is-glitching .ui-select__summary,
body.is-glitching .ui-select__option-button,
body.is-glitching .switch__track,
body.is-glitching .switch__thumb,
body.is-glitching .resource-card {
    animation: glitch-translate 0.16s steps(3, end) infinite;
    filter: hue-rotate(-12deg) saturate(1.4);
}

body.is-glitching .ui-toggle,
body.is-glitching .roll-button {
    box-shadow: 0 0 28px rgba(255, 100, 246, 0.38);
}

body.is-glitching .resource-card {
    box-shadow: 0 0 32px rgba(255, 100, 246, 0.28);
    transform: perspective(500px) translateZ(6px);
}

body.is-glitching .brand__title,
body.is-glitching .panel__title,
body.is-glitching .results__tip-label,
body.is-glitching .results__mythic-label {
    animation: glitch-chroma 0.32s steps(3, end) infinite;
}

body.is-glitching .results__viewport {
    animation: glitch-flicker 0.18s steps(3, end) infinite;
    filter: saturate(1.5) blur(0.6px);
}

body.is-glitching .results__viewport::before,
body.is-glitching .results__viewport::after {
    content: '';
    position: absolute;
    inset: -2px;
    pointer-events: none;
    mix-blend-mode: difference;
}

body.is-glitching .results__viewport::before {
    background:
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.12) 0 6px, transparent 6px 12px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.85) 50%, transparent 50%),
        linear-gradient(0deg, rgba(0, 0, 0, 0.85) 50%, transparent 50%);
    background-size: 12px 12px, 110px 110px, 110px 110px;
    animation: glitch-fracture 0.22s steps(4, end) infinite;
    opacity: 0.8;
}

body.is-glitching .results__viewport::after {
    background: linear-gradient(90deg, rgba(255, 0, 170, 0.35), rgba(0, 255, 255, 0.3));
    animation: glitch-scan 1s steps(6, end) infinite;
    opacity: 0.45;
}

.ui-backdrop {
    position: fixed;
    inset: 0;
    background-color: var(--bg-base);
    background-image: var(--biome-background, url("files/normalBiomeImage.jpg"));
    background-position: center top;
    background-repeat: no-repeat;
    background-size: 100% 100%;
    background-attachment: fixed;
    z-index: -2;
    overflow: hidden;
}

.ui-backdrop__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease;
    pointer-events: none;
    z-index: 0;
}

.ui-backdrop--video-active .ui-backdrop__video {
    opacity: 1;
    visibility: visible;
}

.ui-backdrop__veil {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(30, 80, 180, 0.28), transparent 42%),
                radial-gradient(circle at 80% 15%, rgba(18, 42, 110, 0.22), transparent 28%),
                linear-gradient(135deg, rgba(2, 6, 16, 0.42), rgba(1, 4, 12, 0.5));
    backdrop-filter: blur(5px);
    z-index: 1;
}

.ui-shell {
    width: min(1260px, 100%);
    display: flex;
    flex-direction: column;
    gap: clamp(16px, 2vw, 24px);
    position: relative;
    z-index: 1;
}

.panel {
    position: relative;
    padding: clamp(16px, 2vw, 24px);
    background:
        linear-gradient(var(--accent), var(--accent)) top left / var(--corner-size) var(--corner-thickness) no-repeat,
        linear-gradient(var(--accent), var(--accent)) top left / var(--corner-thickness) var(--corner-size) no-repeat,
        linear-gradient(var(--accent), var(--accent)) top right / var(--corner-size) var(--corner-thickness) no-repeat,
        linear-gradient(var(--accent), var(--accent)) top right / var(--corner-thickness) var(--corner-size) no-repeat,
        linear-gradient(var(--accent), var(--accent)) bottom left / var(--corner-size) var(--corner-thickness) no-repeat,
        linear-gradient(var(--accent), var(--accent)) bottom left / var(--corner-thickness) var(--corner-size) no-repeat,
        linear-gradient(var(--accent), var(--accent)) bottom right / var(--corner-size) var(--corner-thickness) no-repeat,
        linear-gradient(var(--accent), var(--accent)) bottom right / var(--corner-thickness) var(--corner-size) no-repeat,
        var(--panel-gradient);
    border: 1px solid var(--panel-border);
    box-shadow: var(--shadow-strong);
    overflow: hidden;
}

.panel::after {
    content: '';
    position: absolute;
    inset: 1px;
    background: radial-gradient(circle at 50% 0%, rgba(127, 227, 255, 0.08), transparent 40%),
                linear-gradient(160deg, rgba(10, 18, 34, 0.94), rgba(4, 9, 20, 0.98));
    border-radius: 12px;
    pointer-events: none;
    z-index: 0;
}

.panel > * {
    position: relative;
    z-index: 1;
}

.ui-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(16px, 3vw, 32px);
}

.header__brand {
    display: flex;
    align-items: center;
    gap: clamp(12px, 2vw, 20px);
    flex: 1 1 auto;
}

.brand__mark {
    width: clamp(56px, 6vw, 68px);
    aspect-ratio: 1;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 40% 30%, rgba(127, 227, 255, 0.4), rgba(32, 74, 136, 0.18));
    border: 1px solid rgba(140, 220, 255, 0.65);
    box-shadow: inset 0 0 14px rgba(110, 210, 255, 0.25), 0 12px 22px rgba(0, 10, 24, 0.55);
    overflow: hidden;
}

.brand__mark img {
    width: 72%;
    height: 72%;
    object-fit: contain;
    display: block;
}

.brand__mark--spinning img {
    animation: logo-spin 2.4s linear infinite;
    transform-origin: 50% 50%;
}

.brand__meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.brand__title {
    margin: 0;
    font-size: clamp(22px, 3.2vw, 30px);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.brand__subtitle {
    margin: 0;
    font-size: clamp(13px, 1.8vw, 15px);
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

@keyframes glitch-panel {
    0% {
        transform: translate3d(0, 0, 0);
    }
    20% {
        transform: translate3d(-6px, 3px, 0) skewX(1.6deg) skewY(-0.4deg) scale(1.01);
    }
    40% {
        transform: translate3d(6px, -4px, 0) skewX(-1.4deg) rotate(0.25deg);
    }
    60% {
        transform: translate3d(-4px, 5px, 0) skewY(1deg) scale(1.015);
    }
    80% {
        transform: translate3d(5px, -3px, 0) skewX(1.2deg) rotate(-0.35deg);
    }
    100% {
        transform: translate3d(0, 0, 0);
    }
}

@keyframes glitch-translate {
    0% {
        transform: translate3d(0, 0, 0);
    }
    25% {
        transform: translate3d(-6px, 4px, 0);
    }
    50% {
        transform: translate3d(6px, -4px, 0);
    }
    75% {
        transform: translate3d(-4px, -5px, 0) skewX(1deg);
    }
    100% {
        transform: translate3d(0, 0, 0);
    }
}

@keyframes glitch-flicker {
    0%, 100% {
        opacity: 1;
    }
    40% {
        opacity: 0.18;
    }
    55% {
        opacity: 0.95;
    }
    70% {
        opacity: 0.28;
    }
}

@keyframes glitch-chroma {
    0%, 100% {
        text-shadow: 0 0 0 rgba(255, 0, 170, 0), 0 0 0 rgba(0, 255, 255, 0);
    }
    33% {
        text-shadow: -4px 0 rgba(255, 0, 170, 0.9), 4px 0 rgba(0, 255, 255, 0.9);
    }
    66% {
        text-shadow: 4px 0 rgba(255, 0, 170, 0.85), -4px 0 rgba(0, 255, 255, 0.85);
    }
}

@keyframes glitch-noise {
    0% {
        background-position: 0 0, 0 0, 0 0;
    }
    20% {
        background-position: 24px -14px, -18px 16px, 0 0;
    }
    40% {
        background-position: -18px 22px, 16px -26px, 0 0;
    }
    60% {
        background-position: 22px 12px, -22px -16px, 0 0;
    }
    80% {
        background-position: -26px -18px, 26px 18px, 0 0;
    }
    100% {
        background-position: 0 0, 0 0, 0 0;
    }
}

@keyframes glitch-outline {
    0% {
        opacity: 0.25;
        transform: translate3d(0, 0, 0);
    }
    30% {
        opacity: 0.75;
        transform: translate3d(-8px, 6px, 0) skewX(1.2deg);
    }
    55% {
        opacity: 0.5;
        transform: translate3d(6px, -6px, 0) skewY(-1deg);
    }
    75% {
        opacity: 0.85;
        transform: translate3d(-6px, -4px, 0) rotate(0.4deg);
    }
    100% {
        opacity: 0.25;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes glitch-shell {
    0% {
        transform: translate3d(0, 0, 0) skewX(0deg);
    }
    30% {
        transform: translate3d(-8px, 4px, 0) skewX(1.8deg) scaleX(1.01);
    }
    55% {
        transform: translate3d(6px, -6px, 0) skewY(-1.4deg) rotate(-0.3deg);
    }
    70% {
        transform: translate3d(-10px, 8px, 0) skewX(-2deg) rotate(0.35deg);
    }
    100% {
        transform: translate3d(0, 0, 0) skewX(0deg);
    }
}

@keyframes glitch-fracture {
    0% {
        clip-path: polygon(0 0, 100% 0, 100% 18%, 0 12%);
        transform: translate3d(0, 0, 0);
    }
    25% {
        clip-path: polygon(0 38%, 100% 30%, 100% 58%, 0 64%);
        transform: translate3d(-12px, 6px, 0);
    }
    50% {
        clip-path: polygon(0 70%, 100% 62%, 100% 100%, 0 86%);
        transform: translate3d(10px, -6px, 0);
    }
    75% {
        clip-path: polygon(0 16%, 100% 0, 100% 44%, 0 32%);
        transform: translate3d(-8px, -8px, 0);
    }
    100% {
        clip-path: polygon(0 0, 100% 0, 100% 18%, 0 12%);
        transform: translate3d(0, 0, 0);
    }
}

@keyframes glitch-shard {
    0% {
        background-position: 0 0, 0 0;
        opacity: 0.2;
    }
    30% {
        background-position: -40px 20px, 10px -30px;
        opacity: 0.6;
    }
    60% {
        background-position: 38px -24px, -26px 36px;
        opacity: 0.45;
    }
    80% {
        background-position: -24px -12px, 32px -20px;
        opacity: 0.7;
    }
    100% {
        background-position: 0 0, 0 0;
        opacity: 0.3;
    }
}

@keyframes glitch-content {
    0% {
        transform: translate3d(0, 0, 0);
    }
    28% {
        transform: translate3d(-4px, 2px, 0) skewX(1deg);
    }
    56% {
        transform: translate3d(6px, -4px, 0) skewY(-1deg);
    }
    72% {
        transform: translate3d(-6px, -6px, 0) rotate(0.4deg);
    }
    100% {
        transform: translate3d(0, 0, 0);
    }
}

@keyframes glitch-scan {
    0% {
        transform: translateY(-100%);
        opacity: 0.2;
    }
    50% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(100%);
        opacity: 0.2;
    }
}

.header__controls {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    margin-left: auto;
    align-items: center;
}

@media (min-width: 1200px) {
    .ui-shell {
        margin-inline: auto;
        zoom: var(--ui-scale-desktop);
    }

    @supports not (zoom: 1) {
        .ui-shell {
            transform: scale(var(--ui-scale-desktop));
            transform-origin: top center;
        }
    }
}

.ui-toggle {
    min-width: 150px;
    padding: 10px 18px;
    font-family: inherit;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--text-primary);
    background: linear-gradient(90deg, rgba(15, 28, 52, 0.9), rgba(10, 20, 38, 0.92));
    border: 1px solid var(--accent-muted);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    box-shadow: inset 0 0 12px rgba(100, 180, 255, 0.15);
}

.ui-toggle:hover {
    border-color: var(--accent);
    box-shadow: inset 0 0 18px rgba(127, 227, 255, 0.25), 0 6px 12px rgba(0, 0, 0, 0.25);
    transform: translateY(-1px);
}

.ui-toggle[aria-pressed="true"] {
    border-color: var(--accent);
    color: var(--accent-strong);
}

.ui-layout {
    display: grid;
    grid-template-columns: minmax(220px, 260px) minmax(420px, 1fr) minmax(320px, 360px);
    grid-template-areas: "side results controls";
    gap: clamp(16px, 2vw, 24px);
    align-items: stretch;
}

.panel--side { grid-area: side; }
.panel--results { grid-area: results; }
.panel--controls { grid-area: controls; }

.ui-subgrid {
    margin-top: clamp(16px, 2vw, 24px);
    display: grid;
    grid-template-columns: repeat(2, minmax(280px, 1fr));
    gap: clamp(16px, 2vw, 24px);
    align-items: stretch;
}

.ui-layout > .panel,
.ui-subgrid > .panel {
    height: 100%;
}

.panel--results {
    display: flex;
    flex-direction: column;
    gap: clamp(14px, 2vw, 20px);
}

.panel--controls {
    display: flex;
    flex-direction: column;
    gap: clamp(14px, 2vw, 20px);
}

.panel--side {
    display: flex;
    flex-direction: column;
    gap: clamp(14px, 2vw, 20px);
}

.panel--parameters,
.panel--presets {
    display: flex;
    flex-direction: column;
    gap: clamp(14px, 2vw, 20px);
}

.results__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(12px, 2vw, 24px);
    margin-top: clamp(8px, 1.6vw, 16px);
}

.results__tip {
    margin: 0;
    font-size: clamp(12px, 1.6vw, 14px);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.results__tip-label {
    color: #38f582;
    margin-right: 8px;
}

.results__mythic {
    margin: 0;
    font-size: clamp(8px, 1.6vw, 10px);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(199, 219, 255, 0.8);
    text-align: right;
}

.results__mythic-label {
    color: rgba(46, 255, 238, 0.8);
    margin-right: 8px;
}

.panel__header {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(127, 227, 255, 0.16);
}

.panel__title {
    margin: 0;
    font-size: clamp(16px, 2.3vw, 20px);
    letter-spacing: 0.24em;
    text-transform: uppercase;
}

.panel__subtitle {
    margin: 0;
    font-size: 13px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-tertiary);
}

.resource-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.resource-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 16px;
    background: linear-gradient(180deg, rgba(14, 22, 38, 0.82), rgba(8, 14, 28, 0.88));
    border: 1px solid rgba(95, 160, 230, 0.4);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-primary);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 13px;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: inset 0 0 18px rgba(90, 160, 230, 0.15);
}

.resource-card--nolifers {
    position: relative;
    overflow: visible;
}

.resource-card__arrow-cluster {
    position: absolute;
    top: 50%;
    left: -40px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transform: translateY(-50%) scale(0.85);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.resource-card__arrow {
    color: var(--accent);
    font-size: 20px;
    line-height: 1;
    animation: arrow-pulse 0.6s steps(2, jump-none) infinite;
}

.resource-card__arrow:nth-child(2) {
    animation-delay: 0.15s;
}

.resource-card__arrow:nth-child(3) {
    animation-delay: 0.3s;
}

.resource-card--nolifers:hover .resource-card__arrow-cluster,
.resource-card--nolifers:focus-visible .resource-card__arrow-cluster {
    opacity: 1;
    transform: translateY(-50%) scale(1);
}

.resource-card--nolifers:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}

.resource-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent);
    box-shadow: inset 0 0 24px rgba(127, 227, 255, 0.2), 0 10px 18px rgba(0, 0, 0, 0.35);
}

.resource-card__label {
    font-size: 14px;
}

.resource-card__meta {
    font-size: 11px;
    color: var(--text-secondary);
}

@keyframes arrow-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.1;
    }
}

.progress {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    background: linear-gradient(135deg, rgba(12, 20, 38, 0.8), rgba(4, 10, 20, 0.88));
    border: 1px solid rgba(127, 227, 255, 0.18);
    border-radius: 10px;
    box-shadow: inset 0 0 18px rgba(120, 180, 255, 0.12);
}

.progress__rail {
    flex: 1;
    height: 8px;
    border-radius: 8px;
    background: rgba(60, 110, 180, 0.2);
    overflow: hidden;
}

.progress__fill {
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, rgba(127, 227, 255, 0.9), rgba(150, 255, 210, 0.9));
    transition: width 0.3s ease;
}

.progress__value {
    min-width: 52px;
    text-align: right;
    font-size: 12px;
    letter-spacing: 0.16em;
    color: var(--accent-strong);
}

.results__viewport {
    flex: 1;
    min-height: 320px;
    background: linear-gradient(180deg, rgba(7, 14, 28, 0.92), rgba(4, 9, 20, 0.95));
    border: 1px solid rgba(95, 160, 230, 0.35);
    border-radius: 12px;
    padding: 18px 20px;
    box-shadow: inset 0 0 26px rgba(40, 94, 168, 0.25);
    overflow-y: auto;
    font-size: 14px;
    letter-spacing: 0.05em;
    line-height: 1.55;
    position: relative;
}

.results__viewport p {
    margin: 0 0 10px;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 16px;
    background: linear-gradient(180deg, rgba(12, 20, 38, 0.72), rgba(6, 12, 24, 0.82));
    border: 1px solid rgba(95, 160, 230, 0.22);
    border-radius: 12px;
    box-shadow: inset 0 0 18px rgba(70, 130, 210, 0.15);
}

.control-group__title {
    margin: 0;
    font-size: 14px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent-strong);
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.field__label {
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.field__combo {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.field__combo .field__input {
    min-width: 0;
}

.field__combo .ui-button {
    flex-shrink: 0;
    white-space: nowrap;
}

.field__input {
    flex: 1;
    font-family: inherit;
    font-size: 14px;
    letter-spacing: 0.08em;
    padding: 12px 14px;
    color: var(--text-primary);
    background: rgba(6, 12, 24, 0.9);
    border: 1px solid rgba(95, 160, 230, 0.35);
    border-radius: 10px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field--select {
    position: relative;
}

.field__input--native {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.field__select-shell {
    position: relative;
    display: block;
    width: 160px;
}

.field__select-shell--biome {
    width: clamp(210px, 24vw, 225px);
}

.biome-control-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
}

.biome-control-row > .field {
    flex: 1 1 clamp(210px, 24vw, 240px);
}

.field--events {
    min-width: clamp(200px, 25vw, 240px);
}

.ui-select {
    position: relative;
    display: block;
}

.ui-select__summary.field__input--event,
.field__input--event {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.ui-select__summary.field__input--placeholder,
.field__input--event.field__input--placeholder {
    color: var(--text-tertiary);
}

.ui-select summary {
    list-style: none;
    position: relative;
    padding-right: 48px;
}

.ui-select summary::-webkit-details-marker {
    display: none;
}

.ui-select summary:hover,
.ui-select summary:focus-visible {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(127, 227, 255, 0.25);
    outline: none;
}

.ui-select__menu {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    right: 0;
    background: linear-gradient(175deg, rgba(12, 20, 38, 0.96), rgba(4, 10, 22, 0.98));
    border: 1px solid rgba(95, 160, 230, 0.35);
    border-radius: 12px;
    box-shadow: 0 -18px 38px rgba(4, 10, 24, 0.65);
    padding: 14px 16px;
    display: grid;
    gap: 10px;
    max-height: 290px;
    overflow-y: auto;
    opacity: 0;
    pointer-events: none;
    transform: translateY(6px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 20;
}

.ui-select[open] .ui-select__menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.ui-select__option {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.ui-select__option:hover {
    color: var(--text-primary);
}

.ui-select__option--checkbox input[type="checkbox"] {
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 5px;
    border: 1px solid rgba(95, 160, 230, 0.5);
    background: rgba(6, 12, 24, 0.85);
    display: grid;
    place-items: center;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.ui-select__option--checkbox input[type="checkbox"]::after {
    content: '';
    width: 10px;
    height: 10px;
    clip-path: polygon(14% 44%, 0% 63%, 43% 100%, 100% 18%, 80% 0%, 40% 62%);
    background: transparent;
    transition: background 0.2s ease;
}

.ui-select__option--checkbox input[type="checkbox"]:checked {
    border-color: var(--accent);
    background: rgba(20, 36, 64, 0.95);
}

.ui-select__option--checkbox input[type="checkbox"]:checked::after {
    background: var(--accent);
}

.ui-select__option--checkbox input[type="checkbox"]:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.ui-select__option span {
    flex: 1;
}

.ui-select--single .ui-select__menu {
    gap: 6px;
}

.ui-select__option-button {
    display: inline-flex;
    align-items: center;
    width: 100%;
    padding: 10px 12px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.ui-select__option-button:hover,
.ui-select__option-button:focus-visible {
    color: var(--text-primary);
    background: rgba(30, 60, 110, 0.2);
    outline: none;
}

.ui-select__option-button--active {
    background: rgba(20, 36, 64, 0.95);
    color: var(--accent);
    box-shadow: inset 0 0 0 1px rgba(127, 227, 255, 0.4);
}

.ui-select__option-button--disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.field--select select.field__input {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 44px;
    background: linear-gradient(165deg, rgba(16, 28, 52, 0.88), rgba(4, 10, 22, 0.94));
    box-shadow: inset 0 0 18px rgba(60, 120, 200, 0.18);
    cursor: pointer;
}

.field__select-shell::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 18px;
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--accent);
    border-bottom: 2px solid var(--accent);
    transform: translateY(-50%) rotate(45deg);
    pointer-events: none;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

#biome-select.field__input {
    padding-right: 60px;
}

.field--select:focus-within .field__select-shell::after {
    border-color: var(--accent-strong);
    transform: translateY(-50%) rotate(225deg);
}

select.field__input option {
    background-color: #050913;
    color: var(--text-primary);
}

.field__input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(127, 227, 255, 0.25);
}

.field--switch {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

.switch {
    position: relative;
    width: 56px;
    height: 24px;
    display: inline-flex;
    align-items: center;
}

.switch__input {
    appearance: none;
    position: absolute;
    inset: 0;
    margin: 0;
    cursor: pointer;
    z-index: 2;
}

.switch__track {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: rgba(50, 90, 150, 0.4);
    border: 1px solid rgba(127, 227, 255, 0.25);
    transition: background 0.2s ease, border-color 0.2s ease;
}

.switch__thumb {
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent);
    top: 2px;
    left: 4px;
    transition: transform 0.2s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.switch__input:checked + .switch__track {
    background: rgba(100, 220, 210, 0.55);
    border-color: rgba(150, 255, 220, 0.5);
}

.switch__input:checked + .switch__track + .switch__thumb {
    transform: translateX(26px);
}

.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.ui-button {
    font-family: inherit;
    font-size: 12px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid rgba(95, 160, 230, 0.4);
    background: rgba(6, 12, 24, 0.85);
    color: var(--text-primary);
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.ui-button:hover {
    border-color: var(--accent);
    box-shadow: inset 0 0 16px rgba(127, 227, 255, 0.18);
    transform: translateY(-1px);
}

.ui-button--minor {
    min-width: 90px;
    background: rgba(10, 18, 34, 0.9);
}

.ui-button--ghost {
    background: rgba(10, 20, 36, 0.7);
}

.preset-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
}

.preset-grid button {
    font-family: inherit;
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(95, 160, 230, 0.35);
    background: rgba(6, 12, 24, 0.85);
    color: var(--text-primary);
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.preset-grid button:hover {
    border-color: var(--accent);
    box-shadow: inset 0 0 16px rgba(127, 227, 255, 0.2);
    transform: translateY(-1px);
}

.preset-dropdown {
    position: relative;
    border-radius: 10px;
    border: 1px solid rgba(95, 160, 230, 0.35);
    background: rgba(6, 12, 24, 0.85);
    color: var(--text-primary);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
    margin: 0;
    overflow: hidden;
}

.preset-dropdown[open] {
    border-color: var(--accent);
    box-shadow: inset 0 0 16px rgba(127, 227, 255, 0.2);
}

.preset-dropdown__summary {
    list-style: none;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 10px 36px 10px 12px;
    font-family: inherit;
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    cursor: pointer;
    color: var(--text-primary);
    position: relative;
}

.preset-dropdown__summary::-webkit-details-marker {
    display: none;
}

.preset-dropdown__summary::after {
    content: '\25BC';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    opacity: 0.7;
    transition: transform 0.2s ease;
}

.preset-dropdown[open] .preset-dropdown__summary::after {
    transform: translateY(-50%) rotate(180deg);
}

.preset-dropdown__summary:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.preset-dropdown__title {
    font-weight: 600;
}

.preset-dropdown__selection {
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.preset-dropdown__selection--placeholder {
    color: rgba(199, 219, 255, 0.48);
}

.preset-dropdown__options {
    display: grid;
    gap: 8px;
    padding: 8px 12px 12px;
    border-top: 1px solid rgba(95, 160, 230, 0.35);
    background: rgba(4, 10, 22, 0.95);
}

.preset-dropdown__options button {
    width: 100%;
    text-align: left;
}

.preset-footer {
    position: relative;
    margin-top: clamp(12px, 2vw, 20px);
    padding: clamp(12px, 2vw, 18px);
    min-height: clamp(82px, 9vw, 110px);
}

.preset-footer__status {
    margin: 0;
    font-size: clamp(9px, 1.6vw, 12px);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(212, 224, 255, 0.82);
    text-align: left;
    max-width: clamp(500px, 36vw, 460px);
    position: absolute;
    left: 0;
    bottom: 0;
}

.preset-footer__status-channel {
    color: #6f7aff;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-shadow: 0 0 8px rgba(111, 122, 255, 0.4);
}

.preset-footer__status-message {
    line-height: 1.5;
    color: rgba(237, 241, 255, 0.88);
}

.preset-footer__name {
    font-size: clamp(18px, 3vw, 26px);
    font-weight: 700;
    letter-spacing: 0.34em;
    text-transform: uppercase;
    background: linear-gradient(95deg, #000000 0%, #050505 24%, #f7f7f7 78%, #ffffff 100%);
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.32));
    white-space: nowrap;
    text-align: right;
    position: absolute;
    top: 0;
    right: 0;
}

@media (max-width: 600px) {
    .preset-footer {
        padding: clamp(12px, 3vw, 18px) clamp(12px, 4vw, 20px);
        min-height: unset;
        display: flex;
        flex-direction: column;
        gap: clamp(12px, 3vw, 16px);
    }

    .preset-footer__name,
    .preset-footer__status {
        position: static;
    }

    .preset-footer__name {
        align-self: flex-end;
    }

    .preset-footer__status {
        max-width: none;
    }
}

.control-group--cta {
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(8, 14, 28, 0.82), rgba(4, 9, 20, 0.9));
}

.roll-button {
    width: 100%;
    padding: 18px 20px 26px;
    font-family: inherit;
    font-size: 22px;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: #d9ff9d;
    background: linear-gradient(180deg, rgba(10, 20, 6, 0.95), rgba(8, 18, 14, 0.92));
    border: 1px solid rgba(164, 255, 140, 0.55);
    border-radius: 12px;
    box-shadow: inset 0 0 24px rgba(120, 255, 150, 0.18), 0 16px 28px rgba(0, 0, 0, 0.45);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.roll-button::after {
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    letter-spacing: 0.2em;
    color: rgba(201, 255, 160, 0.75);
}

.roll-button:hover {
    transform: translateY(-2px);
    border-color: rgba(198, 255, 170, 0.8);
    box-shadow: inset 0 0 26px rgba(180, 255, 200, 0.22), 0 20px 34px rgba(0, 0, 0, 0.48);
}

.roll-button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

.ui-footer {
    text-align: center;
    padding-block: clamp(12px, 1.8vw, 18px);
}

.footer__text {
    margin: 0;
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-tertiary);
}

.footer__credit {
    margin-top: 6px;
    letter-spacing: 0.12em;
}

.footer__credit a {
    color: inherit;
    text-decoration: underline;
}

.aura-video {
    display: none;
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    z-index: 1001;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: #000;
}

@media (max-width: 900px) {
    .aura-video {
        top: 50%;
        left: 50%;
        right: auto;
        bottom: auto;
        width: auto;
        height: auto;
        max-width: 90vw;
        max-height: 70vh;
        transform: translate(-50%, -50%);
        border: 2px solid rgba(127, 227, 255, 0.5);
        border-radius: 12px;
        box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65);
    }
}

@media (max-width: 640px) {
    .resource-card__arrow-cluster {
        left: -28px;
        transform: translateY(-50%) scale(0.75);
    }

    .resource-card--nolifers:hover .resource-card__arrow-cluster,
    .resource-card--nolifers:focus-visible .resource-card__arrow-cluster {
        transform: translateY(-50%) scale(0.9);
    }

    .biome-control-row {
        gap: 12px;
    }

    .biome-control-row > .field,
    .field--events {
        flex: 1 1 100%;
        min-width: 100%;
    }
}

.video-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 14, 0.55);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(6px);
}

.skip-button {
    position: fixed;
    top: clamp(16px, 4vw, 32px);
    right: clamp(16px, 4vw, 32px);
    padding: 12px 18px;
    background: rgba(6, 12, 24, 0.9);
    color: var(--text-primary);
    border: 1px solid rgba(127, 227, 255, 0.4);
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 12px;
    cursor: pointer;
    display: none;
    z-index: 1002;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.45);
}

.skip-button:hover {
    border-color: var(--accent);
}

/* rarity colors */
.rarity-basic { color: #d3d3d3; text-shadow: 1px 1px 2px #000; }
.rarity-epic { color: #754c73; text-shadow: 1px 1px 2px #000; }
.rarity-unique { color: #d49924; text-shadow: 1px 1px 2px #000; }
.rarity-legendary { color: #35f2c9; text-shadow: 1px 1px 2px #000; }
.rarity-mythic { color: #d607a3; text-shadow: 1px 1px 2px #000; }
.rarity-exalted { color: #0d3d6e; text-shadow: 1px 1px 2px #000; }
.rarity-glorious { color: #790707; text-shadow: 1px 1px 2px #000; }
.rarity-transcendent { color: #afeeee; text-shadow: 1px 1px 2px #000; }
.rarity-challenged { color: #000000; text-shadow: -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff, 1px 1px 0 #fff; }
.rarity-limbo { color: #000; text-shadow: 0 0 2px #aaa, 0 0 4px #aaa, 1px 1px 0 #aaa, -1px -1px 0 #aaa; }

.aura-subtitle {
    display: block;
    font-size: 0.85em;
    letter-spacing: 0.08em;
    text-transform: none;
    color: var(--text-secondary);
    font-style: italic;
}

.aura-event-text {
  color: #fff !important;
  text-shadow: 1px 1px 2px #000;
}

.aura-outline-halloween {
    text-shadow:
        0 0 4px rgba(255, 140, 0, 0.85),
        0 0 8px rgba(255, 90, 0, 0.7),
        1px 1px 0 rgba(60, 20, 0, 0.95),
        -1px 1px 0 rgba(60, 20, 0, 0.95),
        1px -1px 0 rgba(60, 20, 0, 0.95),
        -1px -1px 0 rgba(60, 20, 0, 0.95);
}

.aura-outline-prowler {
    text-shadow:
        0 0 4px rgba(80, 170, 255, 0.85),
        0 0 8px rgba(20, 110, 220, 0.7),
        1px 1px 0 rgba(5, 40, 120, 0.9),
        -1px 1px 0 rgba(5, 40, 120, 0.9),
        1px -1px 0 rgba(5, 40, 120, 0.9),
        -1px -1px 0 rgba(5, 40, 120, 0.9);
}

.aura-outline-valentine {
    text-shadow:
        0 0 4px rgba(255, 140, 200, 0.85),
        0 0 8px rgba(255, 95, 170, 0.75),
        1px 1px 0 rgba(115, 20, 80, 0.9),
        -1px 1px 0 rgba(115, 20, 80, 0.9),
        1px -1px 0 rgba(115, 20, 80, 0.9),
        -1px -1px 0 rgba(115, 20, 80, 0.9);
}

.aura-outline-april {
    text-shadow:
        0 0 4px rgba(190, 190, 190, 0.85),
        0 0 8px rgba(140, 140, 140, 0.75),
        1px 1px 0 rgba(80, 80, 80, 0.9),
        -1px 1px 0 rgba(80, 80, 80, 0.9),
        1px -1px 0 rgba(80, 80, 80, 0.9),
        -1px -1px 0 rgba(80, 80, 80, 0.9);
}

.aura-outline-summer {
    text-shadow:
        0 0 4px rgba(255, 255, 140, 0.9),
        0 0 8px rgba(234, 240, 70, 0.75),
        1px 1px 0 rgba(145, 155, 10, 0.85),
        -1px 1px 0 rgba(155, 155, 10, 0.85),
        1px -1px 0 rgba(150, 155, 10, 0.85),
        -1px -1px 0 rgba(155, 155, 10, 0.85);
}

.aura-outline-innovator {
    color: #f1e6ff;
    text-shadow:
        0 0 4px rgba(200, 140, 255, 0.9),
        0 0 8px rgba(150, 90, 235, 0.75),
        1px 1px 0 rgba(70, 20, 120, 0.9),
        -1px 1px 0 rgba(70, 20, 120, 0.9),
        1px -1px 0 rgba(70, 20, 120, 0.9),
        -1px -1px 0 rgba(70, 20, 120, 0.9);
}

.aura-outline-winter {
    text-shadow:
        0 0 4px rgba(210, 240, 255, 0.9),
        0 0 8px rgba(140, 200, 255, 0.75),
        1px 1px 0 rgba(40, 90, 140, 0.85),
        -1px 1px 0 rgba(40, 90, 140, 0.85),
        1px -1px 0 rgba(40, 90, 140, 0.85),
        -1px -1px 0 rgba(40, 90, 140, 0.85);
}

.aura-effect-oblivion,
.aura-effect-memory,
.aura-effect-pixelation,
.aura-effect-luminosity,
.aura-effect-equinox {
    display: inline-block;
    position: relative;
}

.aura-effect-oblivion {
    background: linear-gradient(92deg, #bb7aff 0%, #401768 40%, #26063c 100%);
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    text-shadow: 0 0 16px rgba(187, 122, 255, 0.45);
}

.aura-effect-memory {
    background: linear-gradient(110deg, #f3d9ff 0%, #a26bff 45%, #3b1061 100%);
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    text-shadow: 0 0 20px rgba(200, 140, 255, 0.55);
}

.aura-effect-pixelation {
    color: #ff004c;
    animation: aura-pixelation-rgb 0.75s linear infinite, aura-pixelation-sway 1.1s ease-in-out infinite;
    font-family: "Press Start 2P", "Sarpanch", sans-serif;
    font-size: 0.65em;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    -webkit-font-smoothing: none;
    font-smooth: never;
    text-shadow:
        1px 1px 0 rgba(0, 0, 0, 0.85),
        -1px 1px 0 rgba(0, 0, 0, 0.85),
        1px -1px 0 rgba(0, 0, 0, 0.85),
        -1px -1px 0 rgba(0, 0, 0, 0.85),
        0 0 8px rgba(255, 255, 255, 0.55);
}

@keyframes aura-pixelation-rgb {
    0% { color: #ff004c; }
    33% { color: #00fffb; }
    66% { color: #7bff00; }
    100% { color: #ff004c; }
}

@keyframes aura-pixelation-sway {
    0% { transform: rotate(-6deg); }
    50% { transform: rotate(6deg); }
    100% { transform: rotate(-6deg); }
}

.aura-effect-luminosity {
    color: transparent !important;
    background: linear-gradient(120deg, #f7fdff 0%, #6ad6ff 40%, #e4f7ff 70%, #ffffff 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    animation: aura-luminosity-gradient 1.6s ease-in-out infinite;
    text-shadow: 0 0 18px rgba(142, 230, 255, 0.85);
}

@keyframes aura-luminosity-gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}


.aura-effect-equinox {
    position: relative;
    display: inline-flex;
    align-items: center;
    font-family: "Noto Serif TC", "Noto Serif", "Songti TC", "PMingLiU", serif;
    font-style: normal;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    padding: 0.28em 0.9em;
    color: #ffffff;
    text-shadow:
        0 1px 0 rgba(99, 99, 99, 0.9),
        0 6px 18px rgba(12, 21, 43, 0.58),
        0 18px 38px rgba(0, 0, 0, 0.4);
    filter: drop-shadow(0 5px 18px rgba(8, 15, 34, 0.72));
    transform: skewX(-6deg) scale3d(0.98, 0.98, 1);
    animation:
        aura-equinox-beat calc(60s / 180) linear infinite,
        aura-equinox-chroma calc(120s / 180) steps(2, jump-end) infinite;
    will-change: transform, color;
}

.aura-effect-equinox::before,
.aura-effect-equinox::after {
    font-family: "Noto Serif TC", "Noto Serif", "Songti TC", "PMingLiU", serif;
    font-weight: 700;
    font-style: normal;
    letter-spacing: 0;
    color: currentColor;
    text-shadow:
        0 1px 0 rgba(255, 255, 255, 0.8),
        0 5px 12px rgba(12, 21, 43, 0.48);
}

.aura-effect-equinox::before {
    content: '『';
    margin-right: 0.2em;
    transform: skewX(5deg) translateY(-0.06em);
    text-shadow:
        0 1px 0 rgba(99, 99, 99, 0.9),
        0 6px 18px rgba(12, 21, 43, 0.58),
        0 18px 38px rgba(0, 0, 0, 0.4);
}

.aura-effect-equinox::after {
    content: '』';
    margin-left: 0.2em;
    transform: skewX(-5deg) translateY(-0.06em);
    text-shadow:
        0 1px 0 rgba(99, 99, 99, 0.9),
        0 6px 18px rgba(12, 21, 43, 0.58),
        0 18px 38px rgba(0, 0, 0, 0.4);
}

@keyframes aura-equinox-beat {
    0% {
        transform: skewX(-6deg) scale3d(0.96, 0.96, 1);
        animation-timing-function: cubic-bezier(0.26, 0.0, 0.42, 1);
    }
    18% {
        transform: skewX(-6deg) scale3d(1.16, 1.16, 1);
        animation-timing-function: cubic-bezier(0.55, 0.02, 0.44, 1);
    }
    46% {
        transform: skewX(-6deg) scale3d(0.98, 0.98, 1);
        animation-timing-function: cubic-bezier(0.25, 0.55, 0.38, 1);
    }
    100% {
        transform: skewX(-6deg) scale3d(1, 1, 1);
    }
}

@keyframes aura-equinox-chroma {
    0%,
    49.999% {
        color: #f7f7f7;
    }
    50%,
    100% {
        color: #050505;
    }
}

@keyframes logo-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@media (max-width: 1180px) {
    .ui-layout {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-areas:
            "results results"
            "controls controls"
            "side side";
    }

    .header__controls {
        flex-wrap: wrap;
    }

    .panel--side,
    .panel--results,
    .panel--controls {
        width: 100%;
    }
}

@media (max-width: 900px) {
    body {
        padding: clamp(12px, 4vw, 20px);
        align-items: flex-start;
    }

    .ui-layout {
        grid-template-columns: 1fr;
        grid-template-areas:
            "results"
            "controls"
            "side";
    }

    .ui-layout > .panel {
        width: 100%;
    }

    .header__controls {
        width: 100%;
        justify-content: center;
        margin-left: 0;
        align-self: center;
        flex-wrap: wrap;
    }

    .ui-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .brand__meta {
        text-align: center;
    }

    .brand__title,
    .brand__subtitle,
    .panel__title,
    .panel__subtitle {
        text-align: center;
    }

    .results__viewport {
        min-height: 260px;
    }

    .results__meta {
        flex-direction: column;
        align-items: flex-start;
    }
}

.panel--parameters,
.panel--presets {
    grid-area: auto;
}

@media (max-width: 1180px) {
    .ui-subgrid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .ui-subgrid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .ui-shell {
        gap: 14px;
    }

    .ui-header {
        align-items: center;
    }

    .header__brand {
        flex-direction: column;
        text-align: center;
    }

    .panel {
        padding: 16px;
    }

    .field__combo {
        flex-direction: column;
    }

    .ui-toggle {
        width: 100%;
        text-align: center;
    }

    .quick-actions {
        flex-direction: column;
    }

    .preset-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }

    .roll-button {
        font-size: 18px;
    }
}
