:root {
    color-scheme: dark;
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    background: #000;
    color: #f5f5f5;
    --focus: #8bc4ff;
    --panel: #1b1b1b;
    --panel-raised: #292929;
    --accent: #2f8fe8;
    --accent-dark: #1761a8;
    --muted: #c6c6c6;
    --border: #858585;
}

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-width: 0;
    height: 100%;
    margin: 0;
}

body {
    overflow: hidden;
    background: #000;
}

button,
input,
select,
a {
    font: inherit;
}

button,
.secondary-button,
select {
    min-height: 44px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
canvas:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
}

.hidden,
[hidden] {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

a {
    color: var(--focus);
}

.startup-fallback,
.noscript-fallback {
    position: fixed;
    inset: 0;
    z-index: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: #101010;
    color: #fff;
}

.startup-fallback-card {
    width: min(100%, 36rem);
    padding: 1.5rem;
    border: 2px solid var(--focus);
    border-radius: 1rem;
    background: #242424;
    text-align: center;
}

.startup-fallback-card h1 {
    margin-top: 0;
    font-size: clamp(1.3rem, 5vw, 2rem);
}

.diagnostic-code {
    padding: 0.5rem;
    border-radius: 0.4rem;
    background: #111;
    color: #ffd56a;
    font-family: ui-monospace, "Cascadia Mono", monospace;
}

.license-gate,
.start-menu,
.game-screen,
.result-overlay {
    position: fixed;
    inset: 0;
}

.license-gate {
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding:
        max(1rem, env(safe-area-inset-top))
        max(1rem, env(safe-area-inset-right))
        max(1rem, env(safe-area-inset-bottom))
        max(1rem, env(safe-area-inset-left));
    overflow: auto;
    background: rgb(0 0 0 / 78%);
}

.license-card {
    width: min(100%, 38rem);
    margin: auto;
    padding: clamp(1rem, 4vw, 1.75rem);
    border: 2px solid var(--focus);
    border-radius: 1.25rem;
    background: linear-gradient(135deg, #2a2a2a, #171717);
    box-shadow: 0 10px 40px rgb(74 158 255 / 30%);
}

.license-title,
.menu-title {
    margin: 0;
    text-align: center;
    color: #fff;
}

.license-title {
    color: var(--focus);
    font-size: clamp(1.4rem, 6vw, 2rem);
}

.license-text,
.license-note {
    line-height: 1.55;
    color: #e1e1e1;
}

.license-text strong {
    display: block;
    margin-bottom: 0.7rem;
}

.license-note {
    font-size: 0.9rem;
    color: var(--muted);
}

.license-checks {
    margin: 1.25rem 0;
}

.checkbox-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin: 0.9rem 0;
}

.checkbox-item input,
.toggle-row input {
    flex: 0 0 auto;
    width: 1.3rem;
    height: 1.3rem;
}

.primary-button,
.secondary-button,
.size-button,
.preset-button,
.home-button,
.header-button,
.control-button,
.text-button {
    border-radius: 0.75rem;
    color: #fff;
    cursor: pointer;
    touch-action: manipulation;
}

.primary-button {
    width: min(100%, 20rem);
    min-height: 3.2rem;
    padding: 0.7rem 1rem;
    border: 0;
    background: linear-gradient(145deg, var(--accent), var(--accent-dark));
    box-shadow: 0 5px 18px rgb(35 126 219 / 35%);
    font-size: 1.1rem;
    font-weight: 750;
}

.primary-button:hover,
.primary-button:focus-visible {
    background: linear-gradient(145deg, #48a2f6, #1b6cb9);
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.48;
}

.license-card > .primary-button {
    display: block;
    margin: 1rem auto 0;
}

.start-menu {
    z-index: 200;
    overflow: auto;
    padding:
        max(1rem, env(safe-area-inset-top))
        max(1rem, env(safe-area-inset-right))
        max(1rem, env(safe-area-inset-bottom))
        max(1rem, env(safe-area-inset-left));
    background: linear-gradient(135deg, #1a1a1a, #000);
}

.menu-content {
    display: flex;
    width: min(100%, 38rem);
    min-height: 100%;
    margin: auto;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 1rem;
}

.menu-title {
    font-size: clamp(1.7rem, 8vw, 3.7rem);
    text-shadow: 0 0 20px rgb(255 255 255 / 35%);
}

.menu-subtitle {
    margin: -0.7rem 0 0;
    color: var(--muted);
}

.menu-controls {
    display: flex;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.7rem;
}

.menu-start-actions {
    display: flex;
    width: 100%;
    justify-content: center;
}

#startButton {
    display: grid;
    align-items: center;
    justify-content: center;
    grid-template-columns: minmax(3.2rem, 4.95rem) auto minmax(3.2rem, 4.95rem);
    gap: 0.55rem;
}

.start-button-trail,
.start-button-mouse {
    width: 100%;
    object-fit: contain;
    image-rendering: pixelated;
}

.start-button-trail {
    height: 1.95rem;
    justify-self: start;
    object-position: left center;
}

.start-button-mouse {
    width: 2.7rem;
    height: 2.7rem;
    justify-self: end;
    transform: scaleX(-1);
}

.start-button-label {
    white-space: nowrap;
}

.game-type-fieldset,
.config-section,
.display-options {
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0.9rem;
    border: 1px solid rgb(255 255 255 / 24%);
    border-radius: 0.9rem;
    background: rgb(255 255 255 / 5%);
}

.game-type-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.choice-card,
.mode-toggle-row {
    display: flex;
    min-width: 0;
    align-items: flex-start;
    gap: 0.7rem;
    cursor: pointer;
}

.choice-card {
    min-height: 72px;
    padding: 0.75rem;
    border: 2px solid var(--border);
    border-radius: 0.75rem;
    background: #242424;
}

.choice-card:has(input:checked) {
    border-color: var(--focus);
    background: #123c60;
}

.choice-card input,
.mode-toggle-row input {
    flex: 0 0 auto;
    width: 1.3rem;
    height: 1.3rem;
    margin-top: 0.12rem;
}

.choice-card span,
.mode-toggle-row span {
    display: grid;
    min-width: 0;
    gap: 0.15rem;
}

.choice-card small,
.mode-toggle-row small {
    color: var(--muted);
    line-height: 1.35;
}

.mode-toggle-row {
    padding: 0.65rem;
    border: 1px solid rgb(255 255 255 / 16%);
    border-radius: 0.65rem;
    background: #202020;
    touch-action: manipulation;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

.mode-option-icon {
    width: 2.75rem;
    height: 2.75rem;
    flex: 0 0 2.75rem;
    object-fit: contain;
    image-rendering: pixelated;
}

.trail-option-icon {
    width: 3.4rem;
    height: 2rem;
    flex: 0 0 3.4rem;
    object-fit: contain;
    image-rendering: pixelated;
}

.mode-toggle-row:has(input:disabled) {
    cursor: not-allowed;
    opacity: 0.55;
}

.alternative-fieldset {
    display: grid;
    gap: 0.55rem;
}

.alternative-fieldset > p {
    margin: 0 0 0.25rem;
    color: var(--muted);
}

.config-section h2,
.display-options h2 {
    margin: 0 0 0.65rem;
    color: var(--focus);
    font-size: 1.08rem;
}

.config-section:not(fieldset) {
    display: grid;
    gap: 0.55rem;
}

.mode-conflict-notice {
    min-height: 1.4em;
    color: #ffd56a !important;
    font-weight: 650;
}

.menu-label,
.size-fieldset legend,
.game-type-fieldset legend,
.alternative-fieldset legend {
    font-size: 1.08rem;
    font-weight: 700;
}

.menu-select,
.menu-input {
    border: 2px solid var(--border);
    border-radius: 0.65rem;
    background: #222;
    color: #fff;
}

.menu-select {
    width: 100%;
    padding: 0.55rem 0.7rem;
}

.mode-options {
    display: grid;
    grid-template-columns: minmax(8rem, auto) 1fr;
    align-items: center;
    gap: 0.6rem;
}

.size-fieldset {
    display: flex;
    min-width: 0;
    margin: 0;
    padding: 0.8rem;
    border: 1px solid rgb(255 255 255 / 24%);
    border-radius: 0.8rem;
    flex-direction: column;
    gap: 0.7rem;
}

.preset-buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
}

.preset-button,
.size-button,
.home-button,
.header-button,
.control-button,
.secondary-button {
    border: 2px solid var(--border);
    background: linear-gradient(145deg, #565656, #303030);
}

.preset-button {
    min-height: 46px;
    padding: 0.45rem;
}

.preset-button.selected {
    border-color: var(--focus);
    background: #145f9e;
}

.size-control,
.seed-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.size-control {
    justify-content: center;
}

.size-button {
    width: 3.25rem;
    height: 3.25rem;
    font-size: 1.7rem;
    font-weight: 750;
}

.menu-input {
    width: 6rem;
    min-height: 3rem;
    padding: 0.45rem;
    text-align: center;
    font-size: 1.05rem;
}

.seed-control {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.seed-input {
    width: 100%;
    flex: 1;
    text-align: left;
}

.compact-button {
    flex: 0 0 auto !important;
    padding-inline: 0.9rem !important;
}

.toggle-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.trail-menu-toggle {
    width: 100%;
    padding: 0.65rem 0.9rem;
    border: 1px solid rgb(255 255 255 / 24%);
    border-radius: 0.75rem;
    background: rgb(255 255 255 / 5%);
}

.menu-controls > .primary-button {
    align-self: center;
}

.legal-links {
    display: flex;
    width: min(100%, 28rem);
    flex-wrap: wrap;
    gap: 0.6rem;
}

.secondary-button {
    display: inline-flex;
    flex: 1 1 calc(50% - 0.3rem);
    align-items: center;
    justify-content: center;
    padding: 0.6rem;
    color: #fff;
    text-align: center;
    text-decoration: none;
}

.data-actions {
    text-align: center;
}

.text-button {
    min-height: 44px;
    padding: 0.4rem;
    border: 0;
    background: transparent;
    color: var(--focus);
    text-decoration: underline;
}

.menu-instructions {
    width: 100%;
    padding: 0.9rem;
    border: 1px solid rgb(255 255 255 / 18%);
    border-radius: 0.9rem;
    background: rgb(255 255 255 / 7%);
    text-align: center;
}

.campaign-panel {
    display: grid;
    width: 100%;
    gap: 0.65rem;
    margin-top: 0.5rem;
    padding: 1rem;
    border: 2px solid var(--border);
    border-radius: 0.9rem;
    background: var(--panel-raised);
}

.campaign-panel h2,
.campaign-panel p {
    margin: 0;
}

.campaign-progress {
    font-weight: 700;
}

.display-options {
    display: grid;
    gap: 0.65rem;
}

.menu-instructions h2 {
    margin: 0 0 0.55rem;
    color: var(--focus);
    font-size: 1.1rem;
}

.menu-instructions p {
    margin: 0.25rem 0;
    color: #d6d6d6;
}

.game-screen {
    display: flex;
    flex-direction: column;
    background: #000;
}

.game-header {
    z-index: 100;
    display: grid;
    flex: 0 0 auto;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.75rem;
    padding:
        max(0.45rem, env(safe-area-inset-top))
        max(0.45rem, env(safe-area-inset-right))
        0.45rem
        max(0.45rem, env(safe-area-inset-left));
    background: var(--panel-raised);
}

.header-actions {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 0.4rem;
}

.home-menu-container {
    position: relative;
}

.home-menu {
    position: absolute;
    top: calc(100% + 0.4rem);
    left: 0;
    z-index: 350;
    display: grid;
    width: min(calc(100vw - 1rem), 22rem);
    padding: 0.45rem;
    border: 2px solid var(--border);
    border-radius: 0.75rem;
    background: var(--panel-raised);
    box-shadow: 0 0.7rem 2rem rgb(0 0 0 / 65%);
    gap: 0.3rem;
}

.home-menu button {
    display: grid;
    align-items: center;
    grid-template-columns: 5rem minmax(0, 1fr);
    width: 100%;
    padding: 0.65rem 0.75rem;
    border: 1px solid transparent;
    border-radius: 0.45rem;
    background: transparent;
    color: #fff;
    text-align: left;
    column-gap: 0.6rem;
}

.home-menu-action-icon,
.home-menu-house-icon {
    width: 1.9rem;
    height: 1.9rem;
    justify-self: center;
}

.home-menu-action-icon {
    object-fit: contain;
    image-rendering: pixelated;
}

.home-menu-action-icon-wide {
    width: 4.5rem;
    height: 2.25rem;
}

.home-menu-house-icon {
    font-size: 1.3rem;
    line-height: 1.9rem;
    text-align: center;
}

.home-menu button > :last-child {
    min-width: 0;
}

.home-menu button:hover,
.home-menu button:focus-visible {
    border-color: var(--focus);
    background: rgb(255 255 255 / 10%);
}

.home-menu-separator {
    width: 100%;
    height: 0;
    margin: 0.3rem 0;
    border: 0;
    border-top: 1px solid var(--border);
}

.home-menu-status {
    display: grid;
    margin: 0;
    padding: 0.25rem 0.45rem 0.4rem;
    gap: 0.55rem;
}

.home-menu-status div {
    display: grid;
    gap: 0.12rem;
}

.home-menu-status dt {
    color: var(--muted);
    font-size: 0.75rem;
}

.home-menu-status dd {
    margin: 0;
    overflow-wrap: anywhere;
    font-size: 0.88rem;
    font-weight: 700;
}

.home-menu-variant dd {
    display: grid;
    justify-items: start;
    gap: 0.28rem;
}

.home-menu-mode-icons {
    display: flex;
    min-height: 2.7rem;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem;
}

.home-menu-mode-icon {
    width: 2.7rem;
    height: 2.7rem;
    object-fit: contain;
    image-rendering: pixelated;
}

.header-support {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.4rem;
}

.home-button,
.header-button {
    min-height: 44px;
    padding: 0.45rem 0.65rem;
}

.home-button {
    min-width: 46px;
    font-size: 1.35rem;
}

.header-stats {
    display: grid;
    margin: 0;
    grid-template-columns: repeat(2, minmax(0, auto));
    gap: 0.25rem 0.65rem;
}

.header-stats div {
    min-width: 0;
}

.header-stats dt {
    color: var(--muted);
    font-size: 0.68rem;
}

.header-stats dd {
    margin: 0;
    overflow: hidden;
    font-size: 0.78rem;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.main-container {
    display: flex;
    min-width: 0;
    min-height: 0;
    flex: 1;
    flex-direction: column;
}

.game-area {
    position: relative;
    display: grid;
    min-width: 0;
    min-height: 0;
    flex: 1 1 auto;
    place-items: start center;
    overflow: hidden;
    scrollbar-width: none;
    padding: 6px;
    overscroll-behavior: contain;
    background: #080808;
}

.game-area::-webkit-scrollbar {
    display: none;
}

#gameCanvas {
    display: block;
    flex: 0 0 auto;
    justify-self: safe center;
    border: 3px solid #fff;
    background: #000;
    box-shadow: 0 0 18px rgb(255 255 255 / 25%);
    image-rendering: pixelated;
    touch-action: none;
}

.game-toast {
    position: absolute;
    bottom: 0.5rem;
    left: 50%;
    z-index: 20;
    display: none;
    width: max-content;
    max-width: calc(100% - 1rem);
    padding: 0.55rem 0.8rem;
    border: 1px solid var(--focus);
    border-radius: 0.6rem;
    background: rgb(20 20 20 / 94%);
    color: #fff;
    transform: translateX(-50%);
}

.game-toast.show {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.hint-direction-icon {
    width: 2.4rem;
    height: 2.4rem;
    flex: 0 0 2.4rem;
    object-fit: contain;
    image-rendering: pixelated;
    transform-origin: center;
}

.hint-direction-icon[data-direction="up"] {
    transform: rotate(-90deg);
}

.hint-direction-icon[data-direction="right"] {
    transform: rotate(0deg);
}

.hint-direction-icon[data-direction="down"] {
    transform: rotate(90deg);
}

.hint-direction-icon[data-direction="left"] {
    transform: rotate(180deg);
}

.controls-area {
    display: flex;
    min-width: 0;
    min-height: 0;
    flex: 0 0 calc(164px + env(safe-area-inset-bottom));
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 8px;
    padding-bottom: max(8px, env(safe-area-inset-bottom));
    background: var(--panel);
}

.zoom-control {
    display: grid;
    min-width: 0;
    max-width: 180px;
    flex: 1 1 120px;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 0.3rem 0.55rem;
    padding: 0.45rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: 0.55rem;
    background: var(--panel-raised);
    font-size: 0.82rem;
}

.zoom-control label {
    font-weight: 700;
}

.zoom-control output {
    color: var(--focus);
    font-variant-numeric: tabular-nums;
}

.zoom-control input {
    width: 100%;
    min-width: 0;
    grid-column: 1 / -1;
    accent-color: var(--focus);
}

.zoom-overlay,
.exit-confirmation-overlay {
    position: fixed;
    inset: 0;
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgb(0 0 0 / 78%);
}

.exit-confirmation-overlay {
    z-index: 950;
}

.zoom-card {
    width: min(100%, 27rem);
    padding: 1.1rem;
    border: 2px solid var(--focus);
    border-radius: 1rem;
    background: var(--panel-raised);
    box-shadow: 0 0.8rem 2.4rem rgb(0 0 0 / 60%);
}

.zoom-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.zoom-dialog-header h2,
.zoom-card p {
    margin-top: 0;
}

.zoom-card .zoom-control {
    width: 100%;
    max-width: none;
}

.confirmation-card {
    width: min(100%, 31rem);
    max-height: 100%;
    overflow: auto;
    padding: clamp(1.1rem, 4vw, 1.5rem);
    border: 2px solid var(--focus);
    border-radius: 1rem;
    background: var(--panel-raised);
    box-shadow: 0 0.8rem 2.4rem rgb(0 0 0 / 60%);
}

.confirmation-card h2 {
    margin-top: 0;
    color: var(--focus);
}

.confirmation-card p {
    line-height: 1.5;
}

.confirmation-actions {
    display: flex;
    margin-top: 1.1rem;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.confirmation-actions .primary-button,
.confirmation-actions .secondary-button {
    flex: 1 1 11rem;
}

.confirmation-actions .secondary-button {
    gap: 0.5rem;
}

.confirmation-house-icon {
    font-size: 1.35rem;
    line-height: 1;
}

.control-pad {
    display: grid;
    width: min(100%, 148px);
    height: min(100%, 148px);
    aspect-ratio: 1;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 6px;
}

.control-button {
    width: 100%;
    height: 100%;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    font-size: clamp(1rem, 5vmin, 1.8rem);
    font-weight: 750;
}

.control-button[data-dir="up"] { grid-area: 1 / 2; }
.control-button[data-dir="left"] { grid-area: 2 / 1; }
.control-button[data-dir="right"] { grid-area: 2 / 3; }
.control-button[data-dir="down"] { grid-area: 3 / 2; }

.result-overlay {
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgb(0 0 0 / 90%);
}

.result-card {
    width: min(100%, 34rem);
    max-height: 100%;
    overflow: auto;
    padding: 1.4rem;
    border: 2px solid #f3d34a;
    border-radius: 1.1rem;
    background: #242424;
    box-shadow: 0 12px 42px rgb(0 0 0 / 55%);
}

.result-card h2 {
    margin-top: 0;
    color: #ffe56b;
}

.result-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
}

.result-stats div {
    padding: 0.6rem;
    border-radius: 0.5rem;
    background: #161616;
}

.result-stats dt {
    color: var(--muted);
    font-size: 0.85rem;
}

.result-stats dd {
    margin: 0.2rem 0 0;
    font-weight: 750;
}

.result-actions {
    display: flex;
    margin-top: 1rem;
    flex-direction: column;
    gap: 0.6rem;
}

.result-actions .primary-button,
.result-actions .secondary-button {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    flex: none;
    gap: 0.7rem;
    text-align: left;
}

.result-action-icon,
.result-house-icon {
    width: 2.2rem;
    height: 2.2rem;
    flex: 0 0 2.2rem;
}

.result-action-icon {
    object-fit: contain;
    image-rendering: pixelated;
}

.result-action-icon-wide {
    width: 5rem;
    height: 2.5rem;
    flex-basis: 5rem;
}

.result-house-icon {
    font-size: 1.5rem;
    line-height: 2.2rem;
    text-align: center;
}

body.high-contrast {
    --focus: #8fd5ff;
    --panel: #000;
    --panel-raised: #000;
    --muted: #fff;
    --border: #fff;
}

body.high-contrast .menu-instructions,
body.high-contrast .size-fieldset,
body.high-contrast .game-type-fieldset,
body.high-contrast .trail-menu-toggle,
body.high-contrast .config-section,
body.high-contrast .display-options,
body.high-contrast .home-menu,
body.high-contrast .zoom-card,
body.high-contrast .confirmation-card,
body.high-contrast .result-card {
    border-color: #fff;
}

body.high-contrast .home-menu-separator {
    border-top-color: #fff;
}

@media (min-width: 720px) and (min-aspect-ratio: 1.3/1) {
    .main-container {
        flex-direction: row;
    }

    .controls-area {
        flex: 0 0 clamp(152px, 22vw, 220px);
        height: 100%;
        flex-direction: column;
        padding-bottom: 8px;
    }

    .control-pad {
        width: min(100%, 190px);
        height: auto;
        max-height: 190px;
    }
}

@media (max-width: 680px) {
    .game-type-options {
        grid-template-columns: 1fr;
    }

    .game-header {
        grid-template-columns: 1fr auto;
    }

    .header-support {
        align-self: start;
    }

}

@media (max-height: 360px) {
    .game-header {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 0.35rem;
        padding-block: 0.25rem;
    }

    .header-button,
    .home-button {
        min-height: 40px;
        padding: 0.25rem 0.45rem;
        font-size: 0.82rem;
    }

    .main-container {
        flex-direction: row;
    }

    .controls-area {
        flex: 0 0 min(208px, 65vw);
        height: 100%;
        padding: 6px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
