@font-face {
    font-family: "Roboto";
    font-style: normal;
    font-weight: normal;
    src: url("../fonts/Roboto-VariableFont.ttf") format("truetype");
}

@font-face {
    font-family: "Espionage";
    font-style: normal;
    font-weight: normal;
    src: url("../fonts/Espionage.woff") format("woff");
    unicode-range: U+0030-0039, U+0041-005A, U+0061-007A;
}

@font-face {
    font-family: "MGS2";
    font-style: normal;
    font-weight: normal;
    src: url("../fonts/MGS2.ttf") format("truetype");
}

@font-face {
    font-family: "Metal Gear";
    font-style: normal;
    font-weight: normal;
    src: url("../fonts/Metal Gear.woff") format("woff");
}

::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: #0000;
}

::-webkit-scrollbar-thumb {
    background-color: #eddb7e;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    -webkit-tap-highlight-color: #0000;
}

:root {
    --step--2: clamp(0.7813rem, 0.6829rem + 0.3575vw, 0.96rem);
    --step--1: clamp(0.9375rem, 0.7931rem + 0.525vw, 1.2rem);
    --step-0: clamp(1.125rem, 0.9188rem + 0.75vw, 1.5rem);
    --step-05: clamp(1.25rem, 0.975rem + 0.9vw, 1.625rem);
    --step-1: clamp(1.35rem, 1.0613rem + 1.05vw, 1.875rem);
    --step-2: clamp(1.62rem, 1.2219rem + 1.4475vw, 2.3438rem);
    --step-3: clamp(1.944rem, 1.4019rem + 1.9714vw, 2.9297rem);
    --step-4: clamp(2.3328rem, 1.6017rem + 2.6586vw, 3.6621rem);
    --step-5: clamp(2.7994rem, 1.8213rem + 3.5566vw, 4.5776rem);

    --text-outline: 0.04em 0 0.06em #11111175,
        0 0.04em 0.06em #11111175,
        -0.04em 0 0.06em #11111175,
        0 -0.04em 0.06em #11111175,
        -0.04em -0.04em 0.06em #11111175,
        -0.04em 0.04em 0.06em #11111175,
        0.04em -0.04em 0.06em #11111175,
        0.04em 0.04em 0.06em #11111175;
    --text-color: #fffffd;
    --background-color: #111;
    --preamble-color: #fffa;
    --big-input-bg-color: #000a;
    --bracket-color: #eddb7e;
    --bracket-box-shadow: 0 0 0.33rem #9e8847;
    --display-label-color: #fffffd;
    --offcanvas-fg: #fffffd;
    --offcanvas-bg: radial-gradient(circle at top center, #000, #100);
    --small-input-bg-color: #111a;
    --profile-bg: #222;
    --profile-arrow-bg: #111;
    --profile-border: 1px solid #333;
    --profile-select-bg: #222;
    --profile-select-border: 1px solid #333;
    --multi-input-bg: #000a;
    --single-input-bg: #222a;
    --spinner-bg: #111a;
    --folder-bg: #222;
    --profile-select-highlight: #248;
    --profile-select-hover: #444;
    --profile-select-highlight-hover: #36A;
    --profile-select-delete: #523;
    --profile-select-delete-hover: #956;
    --switch-background-color: #333;
    --switch-unselected-color: #444;
    --switch-selected-color: #CFF;
    --switch-border-color: #666;
    --switch-border-checked-color: #cff9;
    --linear-settings-background-color: #222;
    --select-background-color: #191919;
    --correct-color: #192;
    --wrong-color: #912;
    --background-image-bg-color: #000c;
    --background-brightness: 0.50;
    --label-background-color: #0009;
    --label-color: #abf4ff;
    --overlay-background-color: #000;
    --three-d-background: radial-gradient(circle at center, #555555E0, #222222E0);
    --inline-input-bg-color: #282828;
}

.light-mode {
    --text-color: #111;
    --background-color: #FFF;
    --text-outline: 0 0.01em 0.04em #11111175;
    --preamble-color: #111;
    --big-input-bg-color: #AAAa;
    --bracket-color: #1798B0;
    --bracket-box-shadow: 0;
    --display-label-color: #001122;
    --offcanvas-fg: #111;
    --offcanvas-bg: radial-gradient(circle at top center, #FFF, #DEF);
    --small-input-bg-color: #fffa;
    --profile-bg: #eee;
    --profile-arrow-bg: #bbb;
    --profile-border: 1px solid #333;
    --profile-select-bg: #eee;
    --profile-select-border: 1px solid #444;
    --multi-input-bg: #ddda;
    --single-input-bg: #eeea;
    --spinner-bg: #fffa;
    --folder-bg: #bbba;
    --profile-select-highlight: #9BF;
    --profile-select-hover: #BBB;
    --profile-select-highlight-hover: #ACF;
    --profile-select-delete: #D67;
    --profile-select-delete-hover: #F89;
    --switch-background-color: #DDD;
    --switch-unselected-color: #FFF;
    --switch-selected-color: #38B;
    --switch-border-color: #888;
    --switch-border-checked-color: #393939;
    --linear-settings-background-color: #DDD;
    --select-background-color: #DDD;
    --correct-color: #093;
    --wrong-color: #A03;
    --background-image-bg-color: #FFF;
    --background-brightness: 0.75;
    --label-background-color: #FFF9;
    --label-color: #1E4D5A;
    --overlay-background-color: #DDDA;
    --three-d-background: radial-gradient(circle at center, #FFFFFFE0, #BBDDEEE0);
    --inline-input-bg-color: #FAFAFA;
}

body {
    height: 100svh;
    margin: 0;
    padding: 0;
    font-family: "Roboto", sans-serif;
    font-size: var(--step-0);
    color: var(--text-color);
    background-color: var(--background-color);
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
pre,
ul {
    margin: 0;
    padding: 0;
}

ul {
    list-style: none;
    max-height: 7.5em;
    padding: 0 1em;
    overflow: auto;
}

ul li:not(:last-child) {
    margin-bottom: 0.3em;
}

a {
  color: #1e90ff;
  text-decoration: none;
  transition: color 0.3s ease;
}

button {
    padding: 0.25em 0.75em;
    font-family: inherit;
    font-size: inherit;
    color: #dfe9ec;
    border: 0;
    background-color: #3c6c64;
    cursor: pointer;
}

button:disabled {
    background-color: #2b3a37;
}

button:not(:disabled):hover {
    box-shadow: 0 2px 4px #4aa39a;
}

button.delete {
    background-color: #981f25;
}

button.delete:hover {
    box-shadow: 0 2px 4px #bf3f65;
}

/* start of Utils */
.mb-05 {
    margin-bottom: 1rem;
}

.mb-1 {
    margin-bottom: 1.5rem;
}

.mb-2 {
    margin-bottom: 2.5rem;
}

.ffmono {
    font-family: monospace;
}
/* end of Utils */

.feedback {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    position: fixed;
    transition: all 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
}

.feedback.active {
    opacity: 1.0;
    pointer-events: all;
}

.feedback .noise-bg {
    border: 8px solid;
    border-left: none;
    border-right: none;
    background-image: url(../img/nnnoise.svg);
    opacity: 0.9;
    position: fixed;
    height: 100vh;
    width: 100vw;
    top: 0;
    left: 0;
    transition: all 0.5s ease;
    transform: scaleY(0);
}

.feedback.active .noise-bg {
    transform: scaleY(1);
}

.feedback--wrong {
    color: #d00;
}

.feedback--missed {
    color: #fff;
}

.feedback--right {
    color: #0d0;
}

.feedback span {
    font-family: "metal gear", sans-serif;
    font-size: var(--step-5);
    letter-spacing: 0.75rem;
    padding: 0.75rem;
    margin-bottom: 10rem;
    position: fixed;
    z-index: 10;
}

.feedback--wrong span {
    border: 4px solid #f00a;
}

.feedback--missed span {
    border: 4px solid #bbba;
}

.feedback--right span {
    border: 4px solid #0f0a;
}

.feedback .line {
    height: 4px;
    position: fixed;
    top: 50%;
    width: 100%;
    z-index: 10;
}

.feedback--wrong .line {
    background-color: #f00a;
}

.feedback--missed .line {
    background-color: #bbba;
}

.feedback--right .line {
    background-color: #0f0a;
}

.main-view {
    align-content: center;
    align-items: center;
    border: 4px solid #3c6c64;
    box-shadow: 0 0 20px #4aa39a;
    display: grid;
    height: 100%;
    letter-spacing: 0.1em;
    justify-content: space-evenly;
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
    position: relative;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200"><filter id="n"><feTurbulence type="fractalNoise" baseFrequency="0.9" numOctaves="4" /></filter><rect width="100%" height="100%" filter="url(%23n)" opacity="0.15"/></svg>');
    background-color: var(--overlay-background-color);
    opacity: 0.30;
}

.background-image {
    position: absolute;
    top: 0;
    left: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    background-color: var(--background-image-bg-color);
    background-size: cover;
    background-position: center;
    filter: brightness(var(--background-brightness));
}

.metal-gear {
    font-family: "Espionage", sans-serif;
    letter-spacing: 0.25em;
}

.metal-gear .v3 {
    position: relative;
    display: inline-block;
    isolation: isolate;
}

.metal-gear .v3 img {
    position: absolute;
    top: 75%;
    left: 75%;
    z-index: -1;
    transform: translate(-50%, -50%);
    height: 5em;
    opacity: 0.75;
}

.metal-gear h1 {
    font-family: "Metal Gear", serif;
    letter-spacing: 0.3em;
}

.timer-wrap {
    width: 100%;
    margin: 0 auto;
    margin-bottom: 3rem;
}

.timer {
    background-color: #111a;
    border: 2px solid #000;
    border-bottom-width: 4px;
    position: relative;
}
.timer__bar {
    background-color: #2bdef9;
    height: 20px;
    transition: none;
}

.timer__bar.override {
    background-color: #21A179;
}

.custom-time-info {
    display: none;
    font-family: monospace;
    position: absolute;
    height: 100%;
    width: 100%;
    font-size: var(--step--2);
    align-items: center;
    justify-content: flex-end;
    color: var(text-color);
    text-shadow: 0 1px 1px #000;
}

.custom-time-info.visible {
    display: flex;
}

.inline-input__outer {
    align-items: center;
    background-color: var(--big-input-bg-color);
    display: flex;
    font-family: "Espionage", sans-serif;
    gap: 1.25rem;
    justify-content: space-between;
    padding: .25rem 1rem;
}
.inline-input__inner {
    background-color: var(--small-input-bg-color);
    font-family: "Roboto", sans-serif;
    padding: .25rem;
    white-space: nowrap;
}
.inline-input__inner > input,
.inline-input__inner > select,
.inline-premise-spinner > input {
    text-align: right;
    background-color: var(--inline-input-bg-color);
    border: none;
    border-bottom: 1px solid #050505;
    margin: 0 3px;
    color: var(--text-color);
    font-size: var(--step--1);
    box-shadow: 0px 0px 2px #112a;
}

/* Remove spinner buttons on WebKit browsers (Chrome, Safari, etc.) */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  margin-left: 5px; /* Adds distance from text */
}

/* Optional: Style spinner buttons for Firefox */
input[type="number"]::-moz-inner-spin-button {
  margin-left: 5px; /* Adds distance from text in Firefox */
}

.inline-input__inner > select option {
    color: #000;
}

.inline-premise-wrapper {
    align-items: center;
    background-color: #000a;
    display: flex;
    gap: 1.25rem;
    justify-content: space-between;
    padding: .25rem .75rem;
    margin-left: 1rem;
}

.inline-premise-spinner {
    background-color: var(--spinner-bg);
    font-family: "Roboto", sans-serif;
    padding: .25rem;
    display: flex;
    gap: 0.25rem;
    position: relative;
}

.multi-input {
    align-items: center;
    background-color: var(--multi-input-bg);
    display: flex;
    gap: 0.2rem;
    justify-content: flex-start;
    padding: .25rem 0 .25rem .75rem;
    margin-left: 1rem;
    margin-bottom: 2.5rem;
}

.single-input {
    display: flex;
    gap: 0.2rem;
    background-color: var(--single-input-bg);
    text-align: center;
    width: fit-content;
    padding: 0 4px;
    flex-direction: column;
    white-space: nowrap;
}

.single-input.grow {
    flex-grow: 1;
}

.single-input.shrink {
    flex-shrink: 1;
}

.select-item {
    background-color: var(--select-background-color);
    color: var(--text-color);
    border: 1px solid #444;
    padding: 8px 10px;
    border-radius: 2px;
    cursor: pointer;
    appearance: none;
}

.select-item:focus {
    outline: none;
    border-color: #888;
}

.ux-customize {
    display: flex;
    justify-content: space-around;
}

.divider {
    height: 1px; /* Line thickness */
    background-color: #ddd; /* Light gray color */
    margin: 20px 0; /* Space above and below the line */
    border: none; /* No border styles */
}

.game-display {
    flex-grow: 1;
}

.game-area {
    display: flex;
    gap: 0.5rem;
    flex-direction: column;
    border-radius: 0 0 20px 20px;
    max-width: 750px;
    transition: box-shadow 0.3s ease-in-out;
    position: relative;
    box-sizing: content-box;
}

.game-area:before {
    display: none;
    font-family: "Espionage", sans-serif;
    position: absolute;
    bottom: 100%;
    width: calc(100% + 4px);
    left: -2px;
    text-align: center;
}

.game-area.right, .game-area.right:before {
    border: 2px solid #28a745; /* Green border */
    box-shadow: 0 0 10px rgba(40, 167, 69, 0.7); /* Glowing green effect */
}

.game-area.right:before {
    content: 'RIGHT';
    display: block;
    background: #28a745;
}

.game-area.wrong, .game-area.wrong:before {
    border: 2px solid #dc3545;
    box-shadow: 0 0 10px rgba(220, 53, 69, 0.7);
}

.game-area.wrong:before {
    content: 'WRONG';
    display: block;
    background: #dc3545;
}

.game-area.missed, .game-area.missed:before {
    border: 2px solid #6c757d;
    box-shadow: 0 0 10px rgba(108, 117, 125, 0.7);
}

.game-area.missed:before {
    content: 'MISSED';
    display: block;
    background: #6c757d;
}

.ux-customize {
    display: flex;
    gap: 1rem;
}

.carousel, .display-outer {
    margin: 0 auto;
    height: fit-content;
    display: none;
}

.carousel.visible, .display-outer.visible {
    display: block;
}

.confirmation-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 0.5rem 0;
    transition: all 0.3s ease-out;
}

.confirmation-true,
.confirmation-false {
    flex-grow: 1;
    font-size: var(--step-1);
    max-width: 10rem;
    padding: 0.3rem 0.7rem;
}

.confirmation-true {
    background-color: var(--correct-color)!important;
}
.confirmation-true:hover {
    box-shadow: 0 3px 5px 0 #0908!important;
}

.confirmation-false {
    background-color: var(--wrong-color)!important;
}
.confirmation-false:hover {
    box-shadow: 0 3px 5px 0 #9008!important;
}

.score {
    padding: 0 0.5rem;
    font-size: var(--step-1);
    text-shadow: var(--text-outline);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
}

.carousel {
    text-align: center;
}

.carousel_display_label-wrapper, .display-inner {
    position: relative;
    gap: 1em;
}

.carousel_display_label-wrapper {
    padding: 1.5em 1em;
    margin: 0 1.5rem;
}

.display-outer {
    width: fit-content;
}

.display-inner {
    padding: 1rem 1.5rem;
    margin: 0 3rem;
}

.carousel_display_label-wrapper h2, .display-inner h2 {
    display: flex;
    font-family: "Espionage", sans-serif;
    font-size: var(--step-0);
    letter-spacing: 0.15em;
    justify-content: space-between;
    margin-top: -0.6rem;
    padding: 0 0.5rem 0 0.65rem;
    position: absolute;
    width: 100%;
    gap: 0.5rem;
    top: 0;
    left: 0;
    text-shadow: var(--text-outline);
    color: var(--display-label-color);
}

.carousel_display_label_progress, .display_label_level {
    font-family: monospace;
}

.display_label_type {
    white-space: nowrap;
}

.display_text {
    max-height: calc(100vh - 260px);
    min-width: 270px;
    line-height: 1.5;
    padding: 0.5rem 0.75rem 0 0.125rem;
    overflow-y: auto;
    overflow-x: hidden;
}

.display_text.big-question .formatted-premise {
    margin-bottom: 0.2rem;
}

.display_text.minimal .formatted-premise,
.display_text.minimal .formatted-operation,
.display_text.minimal:not(.complicated-conclusion) .formatted-conclusion {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    justify-items: center;
    gap: 1.2rem;
}

.display_text.minimal .formatted-premise > span:nth-child(1),
.display_text.minimal .formatted-operation > span:nth-child(1),
.display_text.minimal:not(.complicated-conclusion) .formatted-conclusion > span:nth-child(1) {
    justify-self: end;
}

.display_text.minimal .formatted-premise > span:nth-child(2),
.display_text.minimal .formatted-operation > span:nth-child(2),
.display_text.minimal:not(.complicated-conclusion) .formatted-conclusion > span:nth-child(2) {
    min-width: 2rem;
    justify-self: center;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

.display_text.minimal .formatted-premise > span:nth-child(3),
.display_text.minimal .formatted-operation > span:nth-child(3),
.display_text.minimal:not(.complicated-conclusion) .formatted-conclusion > span:nth-child(3) {
    justify-self: start;
}

.game-area.wide-premises {
    max-width: 900px;
}

.display_text.wide-premises .formatted-premise {
    display: grid;
    grid-template-columns: 1fr 2.5fr 1fr 2.5fr 1fr;
    justify-items: center;
    gap: 0.7rem;
}

.display_text.wide-premises.minimal .formatted-premise {
    grid-template-columns: repeat(5, 1fr);
    gap: 1.2rem;
}

.display_text.wide-premises .formatted-premise > span:nth-child(1) {
    justify-self: end;
}

.display_text.wide-premises .formatted-premise > span:nth-child(3) {
    justify-self: center;
}

.display_text.wide-premises .formatted-premise > span:nth-child(5) {
    justify-self: start;
}

.ci-Wifi_None {
    visibility: hidden;
}

.hqli-preamble,
.hqli-postamble,
.hqli-transform-header {
    font-size: var(--step--2);
    opacity: 0.7;
}

.formatted-premise,
.formatted-operation {
    margin-bottom: 0.7rem;
}

.hqli-premise,
.hqli-operation {
    margin-bottom: 0.4rem;
}

.preamble,
.postamble,
.transform-header {
    user-select: none;
    color: var(--preamble-color);
    display: block;
    font-size: var(--step--1);
    font-weight: bolder;
    line-height: 0.4rem;
    margin: 0.5rem 0 0.9rem 0;
}

.postamble, .transform-header {
    margin-top: 2.2rem;
}

.highlight {
    font-weight: 700;
    padding: 0 3px;
    background-color: var(--background-color);
    letter-spacing: normal;
    border-radius: 2px;
}

.pos-degree {
    color: #00E5FF;
}

.neg-degree {
    color: #FF6700;
}

.formatted-conclusion {
    margin-top: 0;
    position: relative;
}

.formatted-conclusion,
.formatted-premise,
.formatted-operation,
.preamble,
.postamble,
.transform-header {
    padding: 0 1px;
    text-shadow: var(--text-outline);
}

.spoiler .formatted-conclusion::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 3px;
    background: #000;
}

.spoiler:hover .formatted-conclusion::after {
    background: transparent;
    pointer-events: none;
}

.carousel_controls {
    display: inline-flex;
    gap: 150px;
    margin: 0.5rem auto 0 auto;
}

.border-left,
.border-right,
.bracket-lip-top-left,
.bracket-lip-top-right,
.bracket-lip-bottom-left,
.bracket-lip-bottom-right {
    position: absolute;
    background-color: var(--bracket-color);
    box-shadow: var(--bracket-box-shadow);
}

.border-left,
.border-right {
    height: 100%;
    width: 0.33rem;
    top: 0;
}

.border-left {
    left: -1rem;
}

.border-right {
    right: -1rem;
}

.bracket-lip-top-left {
    top: 0;
    left: -1rem;
    width: 1rem;
    height: 0.33rem;
}

.bracket-lip-bottom-left {
    bottom: 0;
    left: -1rem;
    width: 1rem;
    height: 0.33rem;
}

.bracket-lip-top-right {
    top: 0;
    right: -1rem;
    width: 1rem;
    height: 0.33rem;
}

.bracket-lip-bottom-right {
    bottom: 0;
    right: -1rem;
    width: 1rem;
    height: 0.33rem;
}

.subject {
    font-weight: bolder;
    text-transform: uppercase;
}

.analogy-statement {
    font-size: var(--step--1);
    margin: 2px 0;
}

.level-wrapper {
    justify-self: center;
    width: fit-content;
    margin: 0 auto;
    padding-bottom: 20px;
}

.level {
    position: relative;
    padding: 0 0.5rem 0 calc(4px + 0.5rem);
}

.progress-tracker {
    display: none;
    position: relative;
    bottom: 10px;
    height: 10px;
    margin-top: -4px;
    left: 5%;
    width: 90%;
    align-items: center;
    justify-content: flex-start;
    flex-direction: row-reverse;
    opacity: 0.25;
}

.progress-tracker.visible {
    display: flex;
}

.trailing-dot {
    width: 5%;
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.trailing-dot::before {
    content: '';
    display: inline-block;
    width: 95%;
    height: 6px;
    border: 1px solid #0007;
}

.trailing-dot.success::before {
    background-color: #11ff44;
}

.trailing-dot.fail::before {
    background-color: #ee4411;
}

.is-connector {
    color: #2bdef9;
    text-transform: uppercase;
}

.is-negated {
    color: #f00;
}

.is-negated > svg {
    fill: #f00 !important;
}

.negation-explainer {
    color: #eddb7e;
    font-size: var(--step--1);
    font-style: italic;
}

.sign {
    position: absolute;
    bottom: 0.5em;
    left: 50%;
    transform: translateX(-50%);
    font-family: "Metal Gear", serif;
    color: #444;
    text-decoration: none;
}

label.open {
    display: block;
    background-color: var(--label-background-color);
    color: var(--label-color);
    cursor: pointer;
    font-size: var(--step-0);
    font-weight: bold;
    padding: 1rem;
    position: absolute;
    z-index: 50;
}

label.open[for="offcanvas-settings"] {
    left: 0;
    top: 0;
    transform-origin: top left;
    transform: rotateZ(90deg) translateY(-100%);
}

label.open[for="offcanvas-history"] {
    right: 0;
    top: 0;
    transform-origin: top right;
    transform: rotateZ(-90deg) translateY(-100%);
}

label.open[for="offcanvas-credits"] {
    left: 0;
    bottom: 0;
    transform-origin: bottom left;
    transform: rotateZ(90deg) translateX(calc(-100% - 1rem));
}

label.open[for="offcanvas-graph"] {
    right: 0;
    bottom: 0;
    transform-origin: bottom right;
    transform: rotateZ(-90deg) translateX(calc(100% + 1rem));
}

label.open[for="offcanvas-settings"]:hover {
    text-shadow: 0px 0px 5px #affa;
}

label.open[for="offcanvas-history"]:hover {
    text-shadow: 0px 0px 5px #affa;
}

label.open[for="offcanvas-credits"]:hover {
    text-shadow: 0px 0px 5px #affa;
}

#offcanvas-settings:checked + .offcanvas {
    transform: translateX(0);
}

#offcanvas-history:checked + .offcanvas {
    transform: translateX(0);
}

#offcanvas-credits:checked + .offcanvas {
    transform: translateX(0);
}

.offcanvas {
    align-content: start;
    color: var(--offcanvas-fg);
    background: var(--offcanvas-bg);
    display: flex;
    height: 100%;
    max-width: 480px;
    position: absolute;
    top: 0;
    transition: all 0.3s ease-out;
    width: fit-content;
    z-index: 1000;
}

.offcanvas-body {
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1rem;
    width: calc(100% - 2rem);
    font-size: var(--step--1);
}

.offcanvas-side {
    width: 2rem;
}

.offcanvas--left {
    left: 0;
    transform: translateX(-100%);
}

.offcanvas--left .offcanvas-body {
    direction: rtl;
}

.offcanvas--right {
    right: 0;
    transform: translateX(100%);
}

.offcanvas-close {
    cursor: pointer;
    font-size: 2rem;
    line-height: 1;
    padding: 0.5rem;
    padding-bottom: 300%;
    position: absolute;
    top: 0;
}

.offcanvas--left .offcanvas-close {
    right: 0;
}

.offcanvas--right .offcanvas-close {
    left: 0;
}

.explainer {
    font-size: var(--step--1);
    font-style: italic;
    list-style: none;
    margin: 0.5rem 0.2rem;
    padding-left: 1rem;
}

.ctrl__outer {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    justify-content:space-between;
    gap: 1.25rem;
}

.ctrl__inner {
    align-items: center;
    display: flex;
    gap: 0.6rem;
}

.big-input {
    font-size: var(--step-0);
}

.switch {
    align-items: center;
    border: 2px solid var(--switch-border-color);
    background-color: var(--switch-background-color);
    cursor: pointer;
    display: flex;
    justify-content: center;
    overflow: hidden;
    position: relative;
    transition: all 1s ease-out;
    height: 2rem;
    width: 2rem;
}

.switch::after {
    background-color: var(--switch-unselected-color);
    content: "";
    height: 0.75rem;
    position: absolute;
    transition: all 0.1s ease-out;
    width: 0.75rem;
}

.inline-premise-spinner .switch {
    height: 1.5rem;
    width: 1.5rem;
}

input[type="checkbox"]:checked + .switch {
    border-color: var(--switch-border-checked-color);
    box-shadow: 0 0 4px 1px var(--switch-border-checked-color);
    transition-timing-function: ease-in;
}

input[type="checkbox"]:checked + .switch::after {
    background-color: var(--switch-selected-color);
    transition-timing-function: ease-in;
}

.shortcuts {
    display: table;
    border-spacing: 36px 1px;
    margin: 0 -24px;
    border-collapse: separate;
}

.keyboard-shortcut {
    display: table-row;
}

.keyboard-shortcut > span {
    display: table-cell;
}

.keyboard-shortcut > p:nth-child(2) {
    margin: 0 auto;
    text-align: center;
}

.hql-frame {
    display: flex;
    flex-direction: column;
}

.hql {
    display: grid;
    gap: 1rem;
    padding: 1rem 0;
    max-height: 100%;
    overflow: scroll;
}

.hqli {
    background-color: var(--background-color);
    box-shadow: 0 1px 10px 5px #0004;
    position: relative;
}

.hqli .inner {
    border: 1px solid #333;
    border-bottom: 2px dashed #444;
    display: grid;
    gap: 0.15rem;
    padding: 0.5rem 2rem 0.5rem 0.5rem;
}

.hqli .inner > .hqli-premise:nth-child(even) {
    background-color: #fff1;
}

.hqli-premises, .hqli-conclusion {
    margin-bottom: 4px;
}

.hqli--right .inner {
    background-color: #3e31;
    border-bottom-style: solid;
    border-bottom-color: #3e3a!important;
}

.hqli--wrong .inner {
    background-color: #e331;
    border-bottom-style: solid;
    border-bottom-color: #e33a!important;
}

.hqli-answer-user::before,
.hqli-answer::before,
.hqli-response-time::before {
    color: var(--text-color);
    font-weight: bold;
    margin-right: 0.25rem;
}

.hqli-answer-user::before {
    content: "User Answer:"
}

.hqli-answer::before {
    content: "Right Answer:"
}

.hqli-answer-user.true, .hqli-answer.true {
    color: var(--correct-color);
}

.hqli-answer-user.false, .hqli-answer.false {
    color: var(--wrong-color);
}

.hqli-response-time::before {
    content: "Response Time:"
}

.hqli-footer {
    color: #fff6;
    font-size: var(--step--2);
    margin-right: -1rem;
    text-align: right;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hqli .inner .index {
    position: absolute;
    padding: 4px;
    top: 0;
    right: 0;
}

.table {
    display: grid;
    grid-auto-rows: minmax(40px, 1fr);
}

.td {
    padding: 3px;
    border: 1px solid var(--switch-border-color);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.three-d-scene {
    perspective: 1000px;
    padding: 0 0 10px 20px;
    transform-style: preserve-3d;
}

.three-d-plane {
    box-shadow: 0 10px 10px rgba(0, 0, 0, 0.3);
    background: var(--three-d-background);
}

.plane-1 { transform: rotateY(10deg) rotateX(10deg) translateZ(0px);}
.plane-2 { transform: rotateY(12deg) rotateX(10deg) translateZ(-60px);}
.plane-3 { transform: rotateY(14deg) rotateX(10deg) translateZ(-120px);}
.plane-4 { transform: rotateY(16deg) rotateX(10deg) translateZ(-180px);}
.plane-5 { transform: rotateY(18deg) rotateX(10deg) translateZ(-240px);}
.plane-6 { transform: rotateY(20deg) rotateX(10deg) translateZ(-300px);}
.plane-7 { transform: rotateY(22deg) rotateX(10deg) translateZ(-360px);}
.plane-8 { transform: rotateY(24deg) rotateX(10deg) translateZ(-420px);}
.plane-9 { transform: rotateY(26deg) rotateX(10deg) translateZ(-480px);}
.plane-10 { transform: rotateY(26deg) rotateX(10deg) translateZ(-540px);}
.plane-11 { transform: rotateY(26deg) rotateX(10deg) translateZ(-600px);}

.three-d-scene:has(.plane-2) { padding-left: 10px; }
.three-d-scene:has(.plane-3) { padding-left: 20px; }
.three-d-scene:has(.plane-4) { padding-left: 30px; }
.three-d-scene:has(.plane-5) { padding-left: 40px; }
.three-d-scene:has(.plane-6) { padding-left: 50px; }
.three-d-scene:has(.plane-7) { padding-left: 60px; }
.three-d-scene:has(.plane-8) { padding-left: 70px; }
.three-d-scene:has(.plane-9) { padding-left: 80px; }
.three-d-scene:has(.plane-10) { padding-left: 90px; }
.three-d-scene:has(.plane-11) { padding-left: 100px; }

.four-d-scene {
    padding: 30px;
}

.four-d-scene .three-d-scene {
    padding: 0;
}

.floor-heading {
    border-left: 1px solid #0000;
    border-right: 1px solid #0000;
}

.floor-heading.top {
    border-top: 1px solid #0000;
}

.binary-explainer-separator {
    height: 2px; 
    margin: 10px 0;
    width: 100%;
    background-color: #2bdef9;
}

.depth-a {
    color: #FFFF00;
}

.depth-b {
    color: #00FFFF;
}

.depth-c {
    color: #FF00FF;
}

.depth-d {
    color: #00FF00;
}

.depth-e {
    color: #FF8000;
}

.depth-f {
    color: #0080FF;
}

.depth-g {
    color: #8000FF;
}

.depth-h {
    color: #008040;
}

.depth-i {
    color: #000080;
}

.indent-a::before { content: ''; visibility: hidden; }
.indent-b::before { content: '('; visibility: hidden; }
.indent-c::before { content: '(('; visibility: hidden; }
.indent-d::before { content: '((('; visibility: hidden; }
.indent-e::before { content: '(((('; visibility: hidden; }
.indent-f::before { content: '((((('; visibility: hidden; }
.indent-g::before { content: '(((((('; visibility: hidden; }
.indent-h::before { content: '((((((('; visibility: hidden; }
.indent-i::before { content: '(((((((('; visibility: hidden; }

svg.junk, svg.noise, svg.anchor {
    height: var(--stimulus-size, 1.125em);
    width: auto;
    vertical-align: middle;
}

svg.junk, svg.noise {
    box-shadow: 0 0 0.02em 0.06em #000;
}

.subject svg.junk {
    margin-bottom: 3px;
}

svg.arrow {
    fill: var(--text-color);
}

table.distinction td,
table.distinction th {
    vertical-align: top;
    border-left: 1px solid var(--text-color);
    border-right: 1px solid var(--text-color);
    min-width: 1em;
}

table.distinction {
    margin: 0 auto;
    border-collapse: collapse;
}

.settings-label::before {
    content: 'SETTINGS';
}

.history-label::before {
    content: 'HISTORY';
}

.credits-label::before {
    content: 'INFO';
}

.graph-label::before {
    content: 'GRAPH';
}

.tooltip-container {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: monospace;
    width: 20px;
    height: 20px;
    padding-left: 2px;
    background-color: #404E4D;
    color: #fff;
    font-size: var(--step--2);
    font-weight: bold;
    border-radius: 50%;
    cursor: pointer;
    text-align: center;
    user-select: none;
}

.tooltip-text {
    visibility: hidden;
    background-color: var(--background-color);
    color: var(--text-color);
    text-align: left;
    padding: 8px;
    border-radius: 4px;
    position: absolute;
    z-index: 100;
    bottom: 120%;
    white-space: nowrap;
    font-size: var(--step--2);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.tooltip-text.right {
    right: 1px;
}

.tooltip-text.shift-left {
    margin-right: 100px;
}

.tooltip-text.shift-left-left {
    margin-right: 200px;
}

.tooltip-text.shift-right {
    margin-left: 100px;
}

.tooltip-container:hover .tooltip-text,
.tooltip-container:focus-within .tooltip-text,
.tooltip-container.show .tooltip-text {
    visibility: visible;
}

.profile-container {
    display: flex;
    position: relative;
    gap: 2px;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.profile-dropdown {
    position: relative;
    font-size: var(--step-0);
    font-family: monospace;
    width: 250px;
}

.profile-input {
    width: 100%;
    padding: 8px;
    font-size: var(--step--1);
    font-family: inherit;
    letter-spacing: inherit;
    box-sizing: border-box;
    color: var(--text-color);
    background-color: var(--profile-bg);
    border: var(--profile-border);
    height: 50px;
}

.profile-arrow {
    position: absolute;
    right: 1px;
    top: 0;
    width: 20%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-arrow, .profile-plus, .profile-share {
    font-size: var(--step-2);
    cursor: pointer;
    user-select: none;
    background-color: var(--profile-arrow-bg);
    text-align: center;
    border: 1px solid #333;
    height: 50px;
}

.profile-plus, .profile-share {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-share .icon {
    line-height: 0;
    font-size: var(--step-1);
}

.profile-share .text {
    font-size: var(--step--1);
}

.profile-copied {
    pointer-events: none;
    opacity: 0;
    position: absolute;
    top: 100%;
    right: 0;
    padding: 4px;
    border-radius: 2px;
    background-color: #224222;
    transition: all 0.2s ease-out;
}

.profile-copied.toast {
    opacity: 0.92;
}

.profile-list {
    display: none;
    position: absolute;
    margin-top: 2px;
    border: var(--profile-select-border);
    background: var(--profile-select-bg);
    max-height: 300px;
    width: 360px;
    overflow-y: auto;
    z-index: 1000;
    user-select: none;
}

.profile-list .profile-select {
    border-top: 1px solid #444;
    padding: 8px;
    cursor: pointer;
    display: flex;
    position: relative;
    align-items: center;
    justify-content: space-between;
    white-space: nowrap;
    overflow: hidden;
    max-width: 380px;
}

.profile-list .profile-select.highlight {
    background-color: var(--profile-select-highlight);
}

.profile-list .profile-select:hover {
    background-color: var(--profile-select-hover);
}

.profile-list .profile-select.highlight:hover {
    background-color: var(--profile-select-highlight-hover);
}

.profile-list .profile-delete {
    display: flex;
    position: absolute;
    right: 9px;
    justify-content: center;
    align-items: center;
    background-color: var(--profile-select-delete);
    width: 40px;
    padding: 8px;
    margin: -9px;
    border-left: 1px solid #444;
    height: 100%;
}

.profile-list .profile-delete:hover {
    background-color: var(--profile-select-delete-hover);
}


.dropdown-settings {
    position: relative;
}

#progression-dropdown {
    font-size: var(--step--2);
    right: -2.5rem;
    width: 16rem;
    gap: 6px;
}

#linear-dropdown {
    left: -8rem;
}

.form-select {
    background-color: var(--select-background-color);
    color: var(--text-color);
    border: 1px solid #AAA;
    padding: 5px;
    padding-right: 30px;
    font-size: 16px;
    border-radius: 2px;
    appearance: none;
    cursor: pointer;
    width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 5px center;
    background-size: 20px;
}

.form-select:hover, .form-select:focus {
    border-color: #666;
}

.settings-gear {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

#linear-settings-button {
    background-color: var(--linear-settings-background-color);
    color: var(--text-color);
    border: 1px solid #444;
    padding: 3px 4px;
    border-radius: 2px;
    display: flex;
    gap: 5px;
}

.dropdown {
    display: none;
    flex-direction: column;
    top: 120%;
    position: absolute;
    background-color: var(--background-color);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    padding: 6px;
    border-radius: 7px;
}

.dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    margin-bottom: 4px;
    
}

.error-popup {
    display: none;
    position: fixed;
    bottom: 5%;
    right: 5%;
    background-color: #222;
    font-size: var(--step-0);
    width: fit-content;
    height: fit-content;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.error-popup-content {
    background-color: #333;
    padding: 15px;
    padding-bottom: 50px;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    max-width: 350px;
    overflow-wrap: break-word;
}

#error-stack {
    width: 100%;
    height: 150px;
    margin-top: 10px;
    padding: 10px;
    border: 1px solid #555;
    color: #eee;
    background: #111;
    border-radius: 4px;
    font-family: monospace;
    font-size: var(--step--2);
    resize: none;
}

#error-close-popup, #graph-close-popup {
    font-family: "Espionage";
    font-size: var(--step-1);
    background-color: #633;
    color: white;
    border: none;
    cursor: pointer;
}

#error-close-popup:hover, #graph-close-popup:hover {
    background-color: #744;
}

#error-close-popup {
    position: absolute;
    bottom: 4px;
    right: 4px;
}

#graph-close-popup {
    position: relative;
    max-width: 300px;
    min-width: 150px;
    align-self: flex-end;
    white-space: nowrap;
    overflow: hidden;
}

.graph-popup {
    position: fixed;
    display: none;
    z-index: 1000;
    padding: 20px;
    background-color: var(--background-color);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    top: 10.0%;
    left: 10%;
    width: 80vw;
    min-height: 75vh;
}

.graph-popup.visible {
    display: flex;
    gap: 8px;
    flex-direction: column;
}

.graph-popup-content {
    height: 60vh;
    display: none;
}

.graph-popup-content.visible {
    display: block;
}

.graph-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.graph-select {
    flex: 1 1 auto;
    white-space: nowrap;
    overflow: hidden;
}

.graph-select.selected {
    background: #1c3c30;
}

.graph-select.selected:hover {
    background: #316154;
}

.graph-end-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.graph-end-controls > * {
    flex: 1 1 auto;
}

.folder {
    cursor: pointer;
    padding: 8px;
    width: 300px;
    display: flex;
    align-items: center;
    height: 50px;
    background-color: var(--folder-bg);
    margin-bottom: 20px;
    user-select: none;
}

.folder-content {
    display: none;
    margin-bottom: 20px;
}

.folder-arrow {
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--step--1);
}

.folder-arrow.open {
    transform: rotate(90deg) translateX(3px);
}

#reset-app {
    margin-top: 10px;
    padding: 10px;
    width: 200px;
}

.anchor-explanation {
    display: grid;
    grid-template-columns: repeat(3, 20px);
    grid-template-rows: repeat(3, 20px);
    gap: 2px;
    width: 70px;
    height: 70px;
    margin: 0 auto;
}

#svg-0 { grid-column: 2 / 3; grid-row:  1 / 2; }
#svg-1 { grid-column: 3 / 4; grid-row:  2 / 3; }
#svg-3 { grid-column: 2 / 3; grid-row:  3 / 4; }
#svg-2 { grid-column: 1 / 2; grid-row:  2 / 3; }

.progress-container {
    display: none;
    flex-direction: column;
    align-items: center;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    font-family: "Espionage", sans-serif;
}

.progress-container.visible {
    display: flex;
}

#daily-progress-container {
    left: 0;
}

#weekly-progress-container {
    right: 0;
}

.progress-bar-vertical {
    height: 40vh;
    width: 24px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid #3c6c64;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-fill {
    position: absolute;
    bottom: 0;
    width: 100%;
    background-color: #2bdef9;
    box-shadow: 0 0 10px rgba(43, 222, 249, 0.7);
    transition: height 0.5s ease;
}

.progress-fill.halfway {
    background-color: #4aa39a;
    box-shadow: 0 0 10px rgba(74, 163, 154, 0.7);
}

.progress-fill.complete {
    background-color: #eddb7e;
    box-shadow: 0 0 10px rgba(237, 219, 126, 0.7);
}

.progress-content {
    writing-mode: vertical-lr;
    transform: rotate(180deg);
    position: absolute;
    z-index: 1;
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    pointer-events: none;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.7);
}

.progress-label {
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.progress-value {
    font-family: "Roboto", sans-serif;
    font-size: 13px;
    white-space: nowrap;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.5);
}

@media (max-width: 768px) {
    .main-view {
        border: 0;
        box-shadow: none;
    }
    .progress-bar-vertical {
      width: 20px;
    }
    .progress-content {
      padding: 8px 0;
    }
    .progress-label {
      font-size: 12px;
    }
    .progress-value {
      font-size: 11px;
    }
    .display_text {
        font-size: var(--step-05);
    }
    .graph-select {
        font-size: var(--step--1);
        flex: 1 1 auto;
        white-space: nowrap;
        overflow: hidden;
    }
}

@media (max-width: 500px) {
    .offcanvas {
        max-width: none;
        width: calc(100vw);
    }

    .display-inner {
        padding: 0.5rem 0.125rem 0.5rem 0.625rem;
        margin: 0;
    }

    .display_text {
        padding-right: 0.375em;
    }

    .display-inner .border-left,
    .display-inner .border-right,
    .display-inner .bracket-lip-top-left,
    .display-inner .bracket-lip-top-right,
    .display-inner .bracket-lip-bottom-left,
    .display-inner .bracket-lip-bottom-right {
        display: none;
    }

    label.open {
        padding: 0.5rem 0.8rem;
    }

    .game-area {
        max-width: calc(100vw - 3rem);
    }

    .inline-input__outer {
        gap: 0.2rem;
    }

    .carousel_display_label-wrapper h2, .display-inner h2 {
        gap: 0.2rem;
    }

    .display_text.minimal {
        font-size: var(--step-1);
    }

    svg.junk, svg.noise, svg.anchor {
        height: var(--stimulus-size, 1.25em);
    }
}

@media (max-width: 360px) {
    label.open {
        padding: 0.4rem;
    }

    .display-inner {
        padding: 0.5rem 0 0.5rem 0.25rem;
        margin: 0;
    }

    .display_text {
        padding-right: 0.125em;
    }
}

/* -------------------------------------------------------------------------
   Compatibility shield for the current application.
   The v3 stylesheet above is kept verbatim; these scoped rules make its
   tokens win over newer inline appearance controls without hiding features.
   ------------------------------------------------------------------------- */
html.original-v3-theme,
body.original-v3-theme {
    --text-color: #fffffd !important;
    --background-color: #111 !important;
    --preamble-color: #fffa !important;
    --big-input-bg-color: #000a !important;
    --bracket-color: #eddb7e !important;
    --bracket-box-shadow: 0 0 0.33rem #9e8847 !important;
    --display-label-color: #fffffd !important;
    --offcanvas-fg: #fffffd !important;
    --offcanvas-bg: radial-gradient(circle at top center, #000, #100) !important;
    --small-input-bg-color: #111a !important;
    --profile-bg: #222 !important;
    --profile-arrow-bg: #111 !important;
    --profile-border: 1px solid #333 !important;
    --profile-select-bg: #222 !important;
    --profile-select-border: 1px solid #333 !important;
    --multi-input-bg: #000a !important;
    --single-input-bg: #222a !important;
    --spinner-bg: #111a !important;
    --folder-bg: #222 !important;
    --profile-select-highlight: #248 !important;
    --profile-select-hover: #444 !important;
    --profile-select-highlight-hover: #36a !important;
    --profile-select-delete: #523 !important;
    --profile-select-delete-hover: #956 !important;
    --switch-background-color: #333 !important;
    --switch-unselected-color: #444 !important;
    --switch-selected-color: #cff !important;
    --switch-border-color: #666 !important;
    --switch-border-checked-color: #cff9 !important;
    --linear-settings-background-color: #222 !important;
    --select-background-color: #191919 !important;
    --correct-color: #192 !important;
    --wrong-color: #912 !important;
    --background-image-bg-color: #000c !important;
    --background-brightness: 0.5 !important;
    --label-background-color: #0009 !important;
    --label-color: #abf4ff !important;
    --overlay-background-color: #000 !important;
    --three-d-background: radial-gradient(circle at center, #555555e0, #222222e0) !important;
    --inline-input-bg-color: #282828 !important;
    --theme-color: #eddb7e !important;
    --accent-color: #eddb7e !important;
    --accent-rgb: 237, 219, 126 !important;
    --ui-font: "Roboto", sans-serif !important;
    --premise-font: inherit !important;
    --ui-padding: 1rem !important;
    --section-gap: 1rem !important;
    --element-gap: 0.5rem !important;
    --game-area-radius: 0 0 20px 20px !important;
    --conclusion-color: #fffffd !important;
}

body.original-v3-theme,
body.original-v3-theme.light-mode {
    margin: 0 !important;
    padding: 0 !important;
    color: #fffffd !important;
    background: #111 !important;
    font-family: "Roboto", sans-serif !important;
    font-size: var(--step-0) !important;
}

body.original-v3-theme::before,
body.original-v3-theme::after,
body.original-v3-theme .main-view::before,
body.original-v3-theme .main-view::after,
body.original-v3-theme .game-area::after {
    content: none !important;
    display: none !important;
}

body.original-v3-theme .main-view {
    align-content: center !important;
    align-items: center !important;
    justify-content: space-evenly !important;
    width: auto !important;
    max-width: 1200px !important;
    height: 100% !important;
    margin: 0 auto !important;
    padding: 0 !important;
    overflow: hidden !important;
    border: 4px solid #3c6c64 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: 0 0 20px #4aa39a !important;
    letter-spacing: 0.1em !important;
}

body.original-v3-theme .game-area {
    display: flex !important;
    position: relative !important;
    flex-direction: column !important;
    gap: 0.5rem !important;
    width: auto !important;
    max-width: 750px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 0 20px 20px !important;
    background: #293247cc !important;
    box-shadow: none !important;
    box-sizing: content-box !important;
    backdrop-filter: none !important;
}

body.original-v3-theme .timer-wrap {
    width: 100% !important;
    margin: 0 auto 3rem !important;
    padding: 0 !important;
}

body.original-v3-theme .timer {
    min-height: 0 !important;
    padding: 0 !important;
    border: 2px solid #000 !important;
    border-bottom-width: 4px !important;
    border-radius: 0 !important;
    background: #111a !important;
    box-shadow: none !important;
}

body.original-v3-theme .timer__bar {
    height: 20px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #2bdef9 !important;
    box-shadow: none !important;
}

body.original-v3-theme .timer-controls {
    position: static !important;
    display: flex !important;
    min-height: 0 !important;
    padding: 0.25rem 0.75rem !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #000a !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
}

body.original-v3-theme .display-inner {
    margin: 0 3rem !important;
    padding: 1rem 1.5rem !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

body.original-v3-theme .display_text {
    min-width: 270px !important;
    max-height: calc(100vh - 260px) !important;
    padding: 0.5rem 0.75rem 0 0.125rem !important;
    color: #fffffd !important;
    font-family: inherit !important;
    font-size: inherit !important;
    line-height: 1.5 !important;
}

body.original-v3-theme .carousel_display_label-wrapper h2,
body.original-v3-theme .display-inner h2 {
    color: #fffffd !important;
    font-family: "Espionage", sans-serif !important;
    font-size: var(--step-0) !important;
    letter-spacing: 0.15em !important;
    text-shadow: var(--text-outline) !important;
}

body.original-v3-theme .confirmation-buttons {
    gap: 1rem !important;
    margin: 0.5rem 0 !important;
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

body.original-v3-theme .confirmation-true,
body.original-v3-theme .confirmation-false {
    min-height: 0 !important;
    max-width: 10rem !important;
    padding: 0.3rem 0.7rem !important;
    border: 0 !important;
    border-radius: 0 !important;
    color: #dfe9ec !important;
    font: inherit !important;
    font-size: var(--step-1) !important;
    box-shadow: none !important;
}

body.original-v3-theme .confirmation-true { background: #192 !important; }
body.original-v3-theme .confirmation-false { background: #912 !important; }

body.original-v3-theme .score {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 18px !important;
    padding: 0 0.5rem !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    font-size: var(--step-1) !important;
    text-shadow: var(--text-outline) !important;
}

body.original-v3-theme label.open {
    color: #abf4ff !important;
    background: #0009 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    filter: none !important;
    font-size: var(--step-0) !important;
    padding: 1rem !important;
}

body.original-v3-theme label.open::before,
body.original-v3-theme label.open::after,
body.original-v3-theme .sidebar-button::before,
body.original-v3-theme .sidebar-button::after {
    content: none !important;
    display: none !important;
}

body.original-v3-theme .offcanvas,
body.original-v3-theme.light-mode .offcanvas {
    color: #fffffd !important;
    background: radial-gradient(circle at top center, #000, #100) !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
}

body.original-v3-theme .offcanvas-body {
    width: calc(100% - 2rem) !important;
    padding: 1rem !important;
    font-family: monospace !important;
    font-size: var(--step--1) !important;
}

body.original-v3-theme .settings-main-menu {
    display: grid !important;
    gap: 0.5rem !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
}

body.original-v3-theme .settings-menu-btn,
body.original-v3-theme .settings-menu-btn.footer-btn {
    display: flex !important;
    min-height: 0 !important;
    padding: 0.55rem 0.75rem !important;
    border: 1px solid #333 !important;
    border-radius: 0 !important;
    color: #dfe9ec !important;
    background: #222 !important;
    box-shadow: none !important;
    filter: none !important;
    transform: none !important;
}

body.original-v3-theme .settings-menu-btn::before,
body.original-v3-theme .settings-menu-btn::after {
    content: none !important;
    display: none !important;
}

body.original-v3-theme .settings-menu-btn .btn-icon-wrap {
    color: #abf4ff !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #111 !important;
    box-shadow: none !important;
}

body.original-v3-theme .settings-menu-btn .btn-label { color: #fffffd !important; }
body.original-v3-theme .settings-menu-btn .btn-sublabel { color: #fffa !important; }

body.original-v3-theme .settings-section,
body.original-v3-theme .settings-section-content,
body.original-v3-theme .advanced-setting,
body.original-v3-theme .multi-input,
body.original-v3-theme .single-input {
    border-radius: 0 !important;
    color: #fffffd !important;
    background-color: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
}

body.original-v3-theme input,
body.original-v3-theme select,
body.original-v3-theme textarea {
    color: #fffffd !important;
    border-color: #333 !important;
    border-radius: 0 !important;
    background: #191919 !important;
    box-shadow: none !important;
}

body.original-v3-theme .hql {
    gap: 1rem !important;
    padding: 1rem 0 !important;
}

body.original-v3-theme .hqli {
    margin: 0 !important;
    border-radius: 0 !important;
    color: #fffffd !important;
    background: #111 !important;
    box-shadow: 0 1px 10px 5px #0004 !important;
}

body.original-v3-theme .hqli .inner {
    padding: 0.5rem 2rem 0.5rem 0.5rem !important;
    border: 1px solid #333 !important;
    border-bottom: 2px dashed #444 !important;
    border-radius: 0 !important;
    background: transparent !important;
}

body.original-v3-theme .history-filter-rail,
body.original-v3-theme .history-stats,
body.original-v3-theme .history-footer {
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

body.original-v3-theme .history-filter-btn,
body.original-v3-theme .clear-history-btn {
    border: 0 !important;
    border-radius: 0 !important;
    color: #dfe9ec !important;
    background: #3c6c64 !important;
    box-shadow: none !important;
}

body.original-v3-theme .history-filter-btn.selected {
    color: #fffffd !important;
    background: #1c3c30 !important;
}

body.original-v3-theme .graph-popup,
body.original-v3-theme.light-mode .graph-popup {
    color: #fffffd !important;
    border: 0 !important;
    border-radius: 8px !important;
    background: #111 !important;
    box-shadow: 0 4px 8px #0003 !important;
    backdrop-filter: none !important;
}

body.original-v3-theme .graph-toolbar,
body.original-v3-theme .graph-summary,
body.original-v3-theme .graph-controls,
body.original-v3-theme .graph-popup-content,
body.original-v3-theme .graph-canvas-wrap,
body.original-v3-theme .graph-summary-card {
    color: #fffffd !important;
    border-color: #333 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

body.original-v3-theme .graph-range-select,
body.original-v3-theme .graph-select,
body.original-v3-theme .graph-close-popup,
body.original-v3-theme .graph-mode-filter select {
    color: #dfe9ec !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #3c6c64 !important;
    box-shadow: none !important;
}

body.original-v3-theme .graph-range-select.selected,
body.original-v3-theme .graph-select.selected {
    background: #1c3c30 !important;
}

@media (max-width: 500px) {
    body.original-v3-theme .main-view {
        border: 0 !important;
        box-shadow: none !important;
    }

    body.original-v3-theme .game-area {
        max-width: calc(100vw - 3rem) !important;
    }

    body.original-v3-theme .display-inner {
        margin: 0 !important;
        padding: 0.5rem 0.125rem 0.5rem 0.625rem !important;
    }
}


/* -------------------------------------------------------------------------
   Current-app layout guard

   The original skin is cosmetic. It must not restore v3's document geometry,
   because that breaks the current settings router and centered graph modal.
   ------------------------------------------------------------------------- */

html.original-v3-theme,
body.original-v3-theme {
    /* Do not redefine the fluid type scale here. The standard interface and
       v3 use the same --step-* values, and html's --base-font-size already
       scales that whole system from the Appearance control. */
    --bracket-box-shadow: 0 0 0.12rem rgba(237, 219, 126, 0.55) !important;
    --text-outline: 0.035em 0 0.045em #1118,
        0 0.035em 0.045em #1118,
        -0.035em 0 0.045em #1118,
        0 -0.035em 0.045em #1118 !important;
}

body.original-v3-theme,
body.original-v3-theme.light-mode {
    font-size: var(--step-0) !important;
}

body.original-v3-theme .main-view {
    width: min(100%, 1200px) !important;
    max-width: 1200px !important;
    height: 100svh !important;
    min-height: 0 !important;
    overflow: hidden !important;
}

body.original-v3-theme .game-area {
    align-items: center !important;
    justify-self: center !important;
    width: max-content !important;
    inline-size: max-content !important;
    min-width: 0 !important;
    max-width: calc(100vw - 3rem) !important;
    max-inline-size: calc(100vw - 3rem) !important;
    gap: 0.5rem !important;
}

body.original-v3-theme .game-area.wide-premises,
body.original-v3-theme .game-area:has(.display_text[data-question-type="binary-analogy"]) {
    width: max-content !important;
    inline-size: max-content !important;
    max-width: min(52rem, calc(100vw - 3rem)) !important;
    max-inline-size: min(52rem, calc(100vw - 3rem)) !important;
}

body.original-v3-theme .timer-wrap {
    align-self: stretch !important;
    width: 100% !important;
    margin: 0 0 0.35rem !important;
    padding: 0 0 0.12rem !important;
    box-sizing: border-box !important;
}

body.original-v3-theme #spoiler-area,
body.original-v3-theme .game-display,
body.original-v3-theme .display-outer {
    align-self: center !important;
    width: max-content !important;
    max-width: 100% !important;
}

body.original-v3-theme .timer {
    width: 100% !important;
    box-sizing: border-box !important;
    border-width: 1px 1px 2px !important;
}

body.original-v3-theme .timer__bar,
body.original-v3-theme.colored-timer .timer__bar,
body.original-v3-theme.colored-timer .timer__bar.override {
    height: 12px !important;
    min-height: 12px !important;
    border-radius: 0 !important;
    background: #2bdef9 !important;
    box-shadow: none !important;
}

body.original-v3-theme .timer-controls {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 0.45rem !important;
    min-height: 2.55rem !important;
    width: 100% !important;
    padding: 0.16rem 0.65rem !important;
    box-sizing: border-box !important;
    font-size: var(--step-0) !important;
    line-height: 1 !important;
}

body.original-v3-theme .timer-controls .timer-label {
    justify-self: start !important;
    font-size: var(--step-05) !important;
}

body.original-v3-theme .timer-controls .inline-input__inner {
    display: inline-flex !important;
    align-items: center !important;
    justify-self: center !important;
    flex-flow: row nowrap !important;
    gap: 0.2rem !important;
    padding: 0 !important;
    white-space: nowrap !important;
}

body.original-v3-theme .timer-controls .inline-input__inner input[type="number"] {
    width: 4ch !important;
    min-width: 4ch !important;
    padding: 0.12rem 0.35rem !important;
    margin: 0 !important;
    font-size: var(--step-0) !important;
    line-height: 1.2 !important;
    box-sizing: content-box !important;
    -moz-appearance: textfield !important;
    box-shadow: inset 0 -1px 0 #eddb7e !important;
}

body.original-v3-theme .timer-controls .inline-input__inner input[type="number"]::-webkit-inner-spin-button,
body.original-v3-theme .timer-controls .inline-input__inner input[type="number"]::-webkit-outer-spin-button {
    margin: 0 !important;
    appearance: none !important;
    -webkit-appearance: none !important;
}

body.original-v3-theme .timer-controls input[type="checkbox"] {
    position: relative !important;
    display: block !important;
    justify-self: end !important;
    width: 1.45rem !important;
    height: 1.05rem !important;
    margin: 0 !important;
    padding: 0 !important;
    appearance: none !important;
    border: 1px solid #333 !important;
    border-radius: 0 !important;
    background: #191919 !important;
    box-shadow: inset 0 0 0 1px #090909 !important;
    cursor: pointer !important;
}

body.original-v3-theme .timer-controls input[type="checkbox"]::after {
    content: "" !important;
    position: absolute !important;
    inset: 0.2rem !important;
    display: block !important;
    background: #444 !important;
    opacity: 0.45 !important;
}

body.original-v3-theme .timer-controls input[type="checkbox"]:checked {
    border-color: #cff9 !important;
    background: #213334 !important;
    box-shadow: 0 0 4px 1px #cff8, inset 0 0 0 1px #101b1b !important;
}

body.original-v3-theme .timer-controls input[type="checkbox"]:checked::after {
    background: #cff !important;
    opacity: 1 !important;
}

body.original-v3-theme .display-inner {
    width: auto !important;
    min-width: 0 !important;
    margin: 0 3rem !important;
    padding: 1rem 1.5rem !important;
}

body.original-v3-theme .display_text {
    width: auto !important;
    min-width: 270px !important;
    max-width: calc(100vw - 12rem) !important;
    max-height: calc(100svh - 10rem) !important;
    padding: 0.35rem 0.45rem 0 0 !important;
    font-size: var(--step-0) !important;
    line-height: 1.42 !important;
    box-sizing: border-box !important;
}

body.original-v3-theme .carousel_display_label-wrapper h2,
body.original-v3-theme .display-inner h2,
body.original-v3-theme .display_label_type,
body.original-v3-theme .carousel_display_label_type {
    color: #fffffd !important;
    font-size: var(--step-0) !important;
}

body.original-v3-theme .display_label_level,
body.original-v3-theme .carousel_display_label_progress {
    color: #fffffda8 !important;
    font-size: var(--step--1) !important;
}

body.original-v3-theme.colored-words .formatted-premise .subject,
body.original-v3-theme.colored-words .formatted-conclusion .subject,
body.original-v3-theme .formatted-conclusion {
    color: #fffffd !important;
}

body.original-v3-theme .confirmation-buttons {
    gap: 0.65rem !important;
    margin: 0.25rem 0 !important;
}

body.original-v3-theme .confirmation-true,
body.original-v3-theme .confirmation-false {
    flex: 0 1 8.8rem !important;
    width: 8.8rem !important;
    min-width: 0 !important;
    max-width: 8.8rem !important;
    min-height: 2.75rem !important;
    padding: 0.35rem 0.65rem !important;
    border-radius: 0 !important;
    font-size: var(--step-1) !important;
}

body.original-v3-theme .score {
    gap: 0.65rem !important;
    padding: 0.12rem 0.45rem !important;
    font-size: var(--step-1) !important;
}

body.original-v3-theme label.open {
    min-width: 0 !important;
    padding: 0.8rem 1.8rem !important;
    font-size: var(--step-0) !important;
    text-align: center !important;
}

body.original-v3-theme.side-tabs-floating label.open {
    padding-inline: 0.7rem !important;
}

/* The original brackets were narrow illuminated strokes, not neon tubes. */
body.original-v3-theme .border-left,
body.original-v3-theme .border-right {
    width: 0.22rem !important;
}

body.original-v3-theme .bracket-lip-top-left,
body.original-v3-theme .bracket-lip-top-right,
body.original-v3-theme .bracket-lip-bottom-left,
body.original-v3-theme .bracket-lip-bottom-right {
    height: 0.22rem !important;
}

body.original-v3-theme .offcanvas,
body.original-v3-theme.light-mode .offcanvas {
    width: min(92vw, 520px) !important;
    max-width: min(92vw, 520px) !important;
    height: 100svh !important;
}

body.original-v3-theme .offcanvas-body {
    width: calc(100% - 2rem) !important;
    padding: 1rem 1.05rem !important;
    font-size: var(--step--1) !important;
}

body.original-v3-theme .settings-main-menu {
    display: grid !important;
    gap: 0.42rem !important;
}

body.original-v3-theme .settings-main-menu.hidden {
    display: none !important;
}

body.original-v3-theme .settings-menu-btn,
body.original-v3-theme .settings-menu-btn.footer-btn {
    min-height: 0 !important;
    padding: 0.5rem 0.65rem !important;
}

body.original-v3-theme .settings-menu-btn .btn-label {
    color: #fffffd !important;
    font-size: 0.92rem !important;
}

body.original-v3-theme .settings-menu-btn .btn-sublabel {
    color: #fffffda8 !important;
    font-size: 0.7rem !important;
}

body.original-v3-theme .settings-section {
    display: none !important;
}

body.original-v3-theme .settings-section.active {
    display: block !important;
}

body.original-v3-theme .settings-section.active .settings-section-content,
body.original-v3-theme .settings-section.active .settings-section-content.collapsed {
    display: block !important;
    padding: 0.75rem !important;
}

body.original-v3-theme .original-theme-incompatible {
    display: none !important;
}

body.original-v3-theme .graph-popup,
body.original-v3-theme.light-mode .graph-popup {
    position: fixed !important;
    top: 50% !important;
    right: auto !important;
    bottom: auto !important;
    left: 50% !important;
    width: min(920px, calc(100vw - 2rem)) !important;
    height: min(700px, calc(100svh - 2rem)) !important;
    min-height: 0 !important;
    max-width: none !important;
    padding: clamp(0.7rem, 1.6vw, 1.1rem) !important;
    overflow: auto !important;
    transform: translate(-50%, -50%) !important;
    box-sizing: border-box !important;
}

body.original-v3-theme .graph-popup-content {
    width: 100% !important;
    height: auto !important;
    min-height: 340px !important;
    flex: 1 1 340px !important;
    box-sizing: border-box !important;
}

body.original-v3-theme .graph-popup-content canvas {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* The v3 switch is a square socket with a stationary square lamp. The
   current pill-switch geometry leaves inherited offsets behind unless every
   geometric property is reset explicitly. */
body.original-v3-theme .switch {
    --track-w: 2rem !important;
    --track-h: 2rem !important;
    --knob: 0.75rem !important;
    --pad: 0 !important;
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 2rem !important;
    height: 2rem !important;
    overflow: hidden !important;
    border: 2px solid var(--switch-border-color) !important;
    border-radius: 0 !important;
    background: var(--switch-background-color) !important;
    box-shadow: none !important;
    transform: none !important;
    transition: border-color 0.12s ease, box-shadow 0.12s ease !important;
}

body.original-v3-theme .switch::after,
body.original-v3-theme input[type="checkbox"]:checked + .switch::after {
    position: absolute !important;
    top: 50% !important;
    right: auto !important;
    bottom: auto !important;
    left: 50% !important;
    width: 0.75rem !important;
    height: 0.75rem !important;
    border-radius: 0 !important;
    background: var(--switch-unselected-color) !important;
    box-shadow: none !important;
    transform: translate(-50%, -50%) !important;
    transition: background-color 0.1s ease !important;
}

body.original-v3-theme input[type="checkbox"]:checked + .switch {
    border-color: var(--switch-border-checked-color) !important;
    background: var(--switch-background-color) !important;
    box-shadow: 0 0 4px 1px var(--switch-border-checked-color) !important;
}

body.original-v3-theme input[type="checkbox"]:checked + .switch::after {
    background: var(--switch-selected-color) !important;
}

body.original-v3-theme .inline-premise-spinner .switch {
    width: 1.5rem !important;
    height: 1.5rem !important;
}

/* Restore the original history read-at-a-glance tint. */
body.original-v3-theme .hqli.hqli--right .inner {
    border-bottom: 2px solid #33ee33aa !important;
    background: rgba(51, 238, 51, 0.075) !important;
}

body.original-v3-theme .hqli.hqli--wrong .inner {
    border-bottom: 2px solid #ee3333aa !important;
    background: rgba(238, 51, 51, 0.075) !important;
}

body.original-v3-theme .hqli.hqli--right {
    background: #0f1711 !important;
}

body.original-v3-theme .hqli.hqli--wrong {
    background: #190f11 !important;
}

@media (max-width: 700px) {
    body.original-v3-theme .main-view {
        width: 100% !important;
        border: 0 !important;
    }

    body.original-v3-theme .game-area,
    body.original-v3-theme .game-area.wide-premises,
    body.original-v3-theme .game-area:has(.display_text[data-question-type="binary-analogy"]) {
        width: calc(100vw - 2.5rem) !important;
        inline-size: calc(100vw - 2.5rem) !important;
        max-width: calc(100vw - 2.5rem) !important;
        max-inline-size: calc(100vw - 2.5rem) !important;
        box-sizing: border-box !important;
    }

    body.original-v3-theme #spoiler-area,
    body.original-v3-theme .game-display,
    body.original-v3-theme .display-outer {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }

    body.original-v3-theme .display-inner {
        width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 1rem clamp(0.4rem, 2vw, 0.75rem) !important;
        box-sizing: border-box !important;
    }

    body.original-v3-theme .display_text {
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        padding-inline: 0.35rem 0.2rem !important;
        font-size: var(--step-0) !important;
        box-sizing: border-box !important;
    }

    body.original-v3-theme .graph-popup,
    body.original-v3-theme.light-mode .graph-popup {
        width: calc(100vw - 0.5rem) !important;
        height: calc(100svh - 0.5rem) !important;
        padding: 0.55rem !important;
    }
}

@media (max-width: 620px) {
    body.original-v3-theme .offcanvas,
    body.original-v3-theme.light-mode .offcanvas {
        width: 100vw !important;
        max-width: 100vw !important;
    }
}

/* Keep the current app geometry when the original visual skin is active.
   Long multi-dimensional relations wrap inside the same compact card used by
   the normal theme instead of stretching that card across the viewport. */
body.original-v3-theme .game-area {
    width: fit-content !important;
    inline-size: fit-content !important;
    min-width: 0 !important;
    max-width: min(750px, calc(100vw - 3rem)) !important;
    max-inline-size: min(750px, calc(100vw - 3rem)) !important;
}

body.original-v3-theme .game-area.wide-premises,
body.original-v3-theme .game-area:has(.display_text[data-question-type="binary-analogy"]) {
    width: fit-content !important;
    inline-size: fit-content !important;
    max-width: min(52rem, calc(100vw - 3rem)) !important;
    max-inline-size: min(52rem, calc(100vw - 3rem)) !important;
}

body.original-v3-theme #spoiler-area,
body.original-v3-theme .game-display,
body.original-v3-theme .display-outer {
    width: fit-content !important;
    min-width: 0 !important;
    max-width: 100% !important;
}

body.original-v3-theme .display-inner {
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

body.original-v3-theme .display_text {
    width: auto !important;
    min-width: min(270px, 100%) !important;
    max-width: 100% !important;
    white-space: normal !important;
    overflow-wrap: break-word !important;
    box-sizing: border-box !important;
}

body.original-v3-theme .formatted-premise,
body.original-v3-theme .formatted-conclusion,
body.original-v3-theme .formatted-operation {
    max-width: 100% !important;
    white-space: normal !important;
}

/* The old v3 close label used a 300%-tall click strip. Current sidebars use
   one predictable close control that does not move or highlight an edge. */
body.original-v3-theme .offcanvas-close {
    position: absolute !important;
    top: 0.55rem !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    display: grid !important;
    width: 2rem !important;
    min-width: 2rem !important;
    max-width: 2rem !important;
    height: 2rem !important;
    min-height: 2rem !important;
    max-height: 2rem !important;
    place-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid var(--panel-line-soft) !important;
    border-radius: 999px !important;
    background: rgba(var(--accent-rgb, 33, 127, 228), 0.08) !important;
    color: var(--text-color) !important;
    box-shadow: none !important;
    font-size: 1.25rem !important;
    line-height: 1 !important;
    opacity: 0.72 !important;
    transform: none !important;
}

body.original-v3-theme .offcanvas--left .offcanvas-close {
    right: 0.45rem !important;
    left: auto !important;
}

body.original-v3-theme .offcanvas--right .offcanvas-close {
    right: auto !important;
    left: 0.45rem !important;
}

body.original-v3-theme .offcanvas-close:hover {
    border-color: var(--panel-line-soft) !important;
    background: rgba(var(--accent-rgb, 33, 127, 228), 0.18) !important;
    opacity: 1 !important;
    transform: scale(1.04) !important;
}

/* CHANGELOGS uses the same rotated component and metrics as HISTORY/GRAPH. */
body.original-v3-theme label.open.changelog-side-tab {
    top: 50% !important;
    right: 0 !important;
    bottom: auto !important;
    left: auto !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: 0.8rem 1.8rem !important;
    transform-origin: top right !important;
    transform: rotateZ(-90deg) translateY(-100%) translateX(50%) !important;
}

body.original-v3-theme .changelog-side-tab .changelog-label {
    font-size: inherit !important;
    letter-spacing: 0.15em !important;
    line-height: 1 !important;
}

body.original-v3-theme label.open.changelog-side-tab:hover {
    border-color: rgba(var(--accent-rgb, 33, 127, 228), 0.34) !important;
    box-shadow: 0 0 0 1px rgba(var(--accent-rgb, 33, 127, 228), 0.16) !important;
    text-shadow: none !important;
    filter: none !important;
}

body.original-v3-theme.hide-side-buttons label.open.changelog-side-tab {
    opacity: 0 !important;
    transform: rotateZ(-90deg) translateY(calc(-100% - 60px)) translateX(50%) !important;
    pointer-events: none !important;
}

body.original-v3-theme.hide-side-buttons label.open.changelog-side-tab.revealed {
    opacity: 1 !important;
    transform: rotateZ(-90deg) translateY(-100%) translateX(50%) !important;
    pointer-events: auto !important;
}

@media (max-width: 700px) {
    body.original-v3-theme .game-area,
    body.original-v3-theme .game-area.wide-premises,
    body.original-v3-theme .game-area:has(.display_text[data-question-type="binary-analogy"]) {
        width: calc(100vw - 2.5rem) !important;
        inline-size: calc(100vw - 2.5rem) !important;
        max-width: calc(100vw - 2.5rem) !important;
        max-inline-size: calc(100vw - 2.5rem) !important;
    }

    body.original-v3-theme #spoiler-area,
    body.original-v3-theme .game-display,
    body.original-v3-theme .display-outer,
    body.original-v3-theme .display-inner,
    body.original-v3-theme .display_text {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }

    body.original-v3-theme label.open.changelog-side-tab {
        top: 50% !important;
        right: 0 !important;
        display: grid !important;
        width: 1.5rem !important;
        min-width: 1.5rem !important;
        max-width: 1.5rem !important;
        height: 3.9rem !important;
        min-height: 3.9rem !important;
        max-height: 3.9rem !important;
        padding: 0 !important;
        place-items: center !important;
        border-radius: 9px 0 0 9px !important;
        font-size: 0 !important;
        transform: translateY(-50%) !important;
        transform-origin: center !important;
    }

    body.original-v3-theme label.open.changelog-side-tab:hover {
        transform: translateY(-50%) !important;
    }

    body.original-v3-theme label.open.changelog-side-tab .changelog-label,
    body.original-v3-theme label.open.changelog-side-tab:hover .changelog-label {
        display: grid !important;
        place-items: center !important;
        font-size: 0 !important;
        letter-spacing: 0 !important;
        line-height: 1 !important;
    }

    body.original-v3-theme label.open.changelog-side-tab .changelog-label::after {
        content: 'LOG' !important;
        writing-mode: vertical-rl !important;
        color: inherit !important;
        font-size: 0.52rem !important;
        font-weight: 800 !important;
        letter-spacing: 0.12em !important;
        line-height: 1 !important;
        transform: rotate(180deg) !important;
    }

    body.original-v3-theme.hide-side-buttons label.open.changelog-side-tab {
        opacity: 0 !important;
        transform: translate(100%, -50%) !important;
        pointer-events: none !important;
    }

    body.original-v3-theme.hide-side-buttons label.open.changelog-side-tab.revealed {
        opacity: 1 !important;
        transform: translateY(-50%) !important;
        pointer-events: auto !important;
    }
}

/* Current-theme parity fixes.
   Keep the compact v3 geometry while preserving result feedback, readable
   mode labels, and the optional cyan background palette. */
body.original-v3-theme .display-inner > h2 {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 0.4rem !important;
}

body.original-v3-theme .display_label_type {
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: clip !important;
    white-space: nowrap !important;
    font-size: 0.84em !important;
    letter-spacing: 0.08em !important;
}

body.original-v3-theme:not(.hide-feedback) .game-area.right {
    outline: 2px solid #28a745 !important;
    box-shadow: 0 0 10px rgba(40, 167, 69, 0.7) !important;
}

body.original-v3-theme:not(.hide-feedback) .game-area.wrong {
    outline: 2px solid #dc3545 !important;
    box-shadow: 0 0 10px rgba(220, 53, 69, 0.7) !important;
}

body.original-v3-theme:not(.hide-feedback) .game-area.missed {
    outline: 2px solid #6c757d !important;
    box-shadow: 0 0 10px rgba(108, 117, 125, 0.7) !important;
}

body.original-v3-theme.cyan-preset {
    --background-color: #082e2e !important;
    --big-input-bg-color: #062222cc !important;
    --small-input-bg-color: #0d3a3acc !important;
    --offcanvas-bg: radial-gradient(circle at top center, #0d3a3a, #062222) !important;
    --profile-bg: #0d3a3a !important;
    --profile-arrow-bg: #062222 !important;
    --profile-select-bg: #0d3a3a !important;
    --multi-input-bg: #062222cc !important;
    --single-input-bg: #0d3a3acc !important;
    --spinner-bg: #062222cc !important;
    --folder-bg: #0d3a3a !important;
    --linear-settings-background-color: #0d3a3a !important;
    --select-background-color: #0a3030 !important;
    --background-image-bg-color: #062222cc !important;
    --label-background-color: #062222cc !important;
    --overlay-background-color: #062222 !important;
    --three-d-background: radial-gradient(circle at center, #1a5a5ae0, #082e2ee0) !important;
    --inline-input-bg-color: #0a3030 !important;
}

body.original-v3-theme.cyan-preset,
body.original-v3-theme.cyan-preset.light-mode {
    background: #082e2e !important;
}

body.original-v3-theme.cyan-preset .game-area {
    background: #1a5a5acc !important;
}

body.original-v3-theme.cyan-preset .timer-controls {
    background: #062222cc !important;
}

body.original-v3-theme.cyan-preset .offcanvas,
body.original-v3-theme.cyan-preset.light-mode .offcanvas {
    background: radial-gradient(circle at top center, #0d3a3a, #062222) !important;
}

body.original-v3-theme.cyan-preset .settings-menu-btn,
body.original-v3-theme.cyan-preset .settings-menu-btn.footer-btn,
body.original-v3-theme.cyan-preset .settings-menu-btn .btn-icon-wrap {
    border-color: #245b5b !important;
    background: #0d3a3a !important;
}

body.original-v3-theme.cyan-preset input,
body.original-v3-theme.cyan-preset select,
body.original-v3-theme.cyan-preset textarea {
    border-color: #245b5b !important;
    background: #0a3030 !important;
}

body.original-v3-theme.cyan-preset .hqli,
body.original-v3-theme.cyan-preset .graph-popup,
body.original-v3-theme.cyan-preset.light-mode .graph-popup {
    background: #082626 !important;
}

body.original-v3-theme .settings-menu-btn.nice-secret-btn,
body.original-v3-theme.cyan-preset .settings-menu-btn.nice-secret-btn {
    overflow: hidden !important;
    border: 1px solid #333 !important;
    background: #050607 !important;
}

body.original-v3-theme .nice-secret-thumbnail {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

/* New cue and feedback surfaces keep the compact v3 geometry. */
body.original-v3-theme .relation-gap-dependent-fields {
    border-color: color-mix(in srgb, var(--theme-color) 34%, #2b313d) !important;
    border-radius: 2px !important;
    background: rgba(5, 8, 12, 0.62) !important;
}

body.original-v3-theme .relation-gap-question {
    color: var(--theme-color) !important;
}

body.original-v3-theme .changelog-panel-actions {
    background: linear-gradient(to bottom, transparent, #070a0f 30%) !important;
}

body.original-v3-theme.cyan-preset .changelog-panel-actions {
    background: linear-gradient(to bottom, transparent, #062222 30%) !important;
}

body.original-v3-theme:not(.light-mode) #sidebar-changelog .changelog-item {
    border: 1px solid color-mix(in srgb, var(--theme-color) 22%, #303642) !important;
    background: color-mix(in srgb, var(--theme-color) 7%, #10151d) !important;
}

body.original-v3-theme .submit-suggestion-button,
body.original-v3-theme .suggestion-dialog,
body.original-v3-theme .suggestion-dialog-close,
body.original-v3-theme .suggestion-field textarea,
body.original-v3-theme .suggestion-image-picker,
body.original-v3-theme .suggestion-image-preview,
body.original-v3-theme .suggestion-secondary-button,
body.original-v3-theme .suggestion-primary-button {
    border-radius: 2px !important;
}

body.original-v3-theme .submit-suggestion-button {
    border: 0 !important;
    outline: 0 !important;
    background: color-mix(in srgb, var(--theme-color) 26%, #071018) !important;
}

body.original-v3-theme .suggestion-image-picker {
    border-color: color-mix(in srgb, var(--theme-color) 52%, #2b313d) !important;
    background: rgba(7, 12, 18, 0.84) !important;
}

body.original-v3-theme .submit-suggestion-icon {
    border-radius: 1px !important;
    color: var(--theme-color) !important;
    background: color-mix(in srgb, var(--theme-color) 18%, transparent) !important;
}

body.original-v3-theme .suggestion-dialog {
    border-color: color-mix(in srgb, var(--theme-color) 58%, #333) !important;
    background: var(--offcanvas-bg) !important;
    box-shadow: none !important;
}

body.original-v3-theme .suggestion-dialog-header > div > span,
body.original-v3-theme .suggestion-image-picker svg,
body.original-v3-theme .suggestion-form-status.is-working {
    color: var(--theme-color) !important;
}

body.original-v3-theme .suggestion-primary-button {
    border-color: var(--theme-color) !important;
    background: color-mix(in srgb, var(--theme-color) 72%, #10151d) !important;
}

/* Current application compatibility without replacing the original v3
   geometry or its untouched gold default. */
html.original-v3-theme,
body.original-v3-theme {
    --theme-color: var(--original-theme-color, #eddb7e) !important;
    --bracket-color: var(--original-theme-color, #eddb7e) !important;
    --accent-color: var(--original-theme-color, #eddb7e) !important;
    --accent-rgb: var(--original-theme-rgb, 237, 219, 126) !important;
    --conclusion-color: var(--original-conclusion-color, #fffffd) !important;
}

body.original-v3-theme .mode-title-number {
    display: inline;
    font-family: "MGS2", monospace !important;
    font-size: 1.08em;
    letter-spacing: 0.04em;
}

body.original-v3-theme .custom-time-info {
    inset: 0 !important;
    z-index: 2 !important;
    color: var(--text-color) !important;
    pointer-events: none !important;
}

body.original-v3-theme .timer {
    border: 0 !important;
    outline: 0 !important;
}

body.original-v3-theme .timer__bar {
    position: relative !important;
    z-index: 0 !important;
    border: 0 !important;
    outline: 0 !important;
}

body.original-v3-theme:not(.colored-timer) .timer__bar {
    background: #2bdef9 !important;
}

body.original-v3-theme .timer__bar.override,
body.original-v3-theme.colored-timer .timer__bar.override {
    background: #21a179 !important;
}

body.original-v3-theme.colored-timer .timer__bar:not(.override) {
    background: var(--theme-color) !important;
}

body.original-v3-theme .formatted-conclusion,
body.original-v3-theme .formatted-conclusion .subject,
body.original-v3-theme .hqli-conclusion {
    color: var(--conclusion-color) !important;
}

body.original-v3-theme.colored-words .formatted-premise .subject {
    color: var(--theme-color) !important;
}

body.original-v3-theme .main-view {
    border-color: color-mix(in srgb, var(--theme-color) 55%, #3c6c64) !important;
    box-shadow: 0 0 20px color-mix(in srgb, var(--theme-color) 42%, #4aa39a) !important;
}

body.original-v3-theme .timer-controls .inline-input__inner input[type="number"] {
    box-shadow: inset 0 -1px 0 var(--theme-color) !important;
}

body.original-v3-theme .hqli .inner .index {
    font-family: "MGS2", sans-serif !important;
    font-size: var(--step--1) !important;
    font-weight: 400 !important;
}

body.original-v3-theme .hqli-trial-actions button,
body.original-v3-theme button.explanation-button,
body.original-v3-theme button.explanation-button:hover,
body.original-v3-theme button.explanation-button:active {
    min-height: 0 !important;
    padding: 0.25em 0.75em !important;
    border: 0 !important;
    border-radius: 0 !important;
    outline: 0 !important;
    color: #fffffd !important;
    background: #3c6c64 !important;
    box-shadow: none !important;
    filter: none !important;
    transform: none !important;
    font-family: "MGS2", sans-serif !important;
    font-size: var(--step--2) !important;
    font-weight: 400 !important;
}

body.original-v3-theme .hqli-trial-actions .delete,
body.original-v3-theme .hqli-trial-actions .delete:hover,
body.original-v3-theme .hqli-trial-actions .delete:active {
    color: #fffffd !important;
    background: #912 !important;
}

body.original-v3-theme .history-stats .stat-row,
body.original-v3-theme .info-panel-body .mb-2,
body.original-v3-theme .info-panel-body .inline-input__outer,
body.original-v3-theme .info-panel-body ul.explainer,
body.original-v3-theme .info-panel-body .symbol-category,
body.original-v3-theme .info-panel-body .reference-image-grid img {
    border-radius: 0 !important;
}

body.original-v3-theme #sidebar-settings .profile-container {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    align-content: start !important;
    align-items: stretch !important;
    width: auto !important;
    min-height: 0 !important;
    height: auto !important;
    gap: 0.35rem !important;
}

body.original-v3-theme #sidebar-settings .profile-dropdown,
body.original-v3-theme #sidebar-settings .profile-actions {
    width: 100% !important;
    min-width: 0 !important;
}

body.original-v3-theme .settings-menu-btn.nice-secret-btn,
body.original-v3-theme .settings-menu-btn.nice-secret-btn:hover,
body.original-v3-theme .settings-menu-btn.nice-secret-btn:focus,
body.original-v3-theme .settings-menu-btn.nice-secret-btn:focus-visible {
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
}

body.original-v3-theme .suggestion-field input:focus,
body.original-v3-theme .suggestion-field textarea:focus,
body.original-v3-theme .suggestion-image-picker:focus-within {
    outline: 0 !important;
    outline-offset: 0 !important;
    box-shadow: none !important;
}

body.original-v3-theme .progress-bar-vertical {
    isolation: isolate !important;
    box-sizing: border-box !important;
    border-radius: 0 !important;
}

body.original-v3-theme .progress-fill {
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: auto !important;
    max-height: 100% !important;
    min-height: 0 !important;
    border-radius: 0 !important;
}

/* Original v3 light mode keeps the typography and square surfaces while
   exchanging the forced dark palette for the upstream light tokens. */
body.original-v3-theme.light-mode {
    --text-color: #111 !important;
    --background-color: #e8e8f0 !important;
    --preamble-color: #555 !important;
    --big-input-bg-color: #aaaa !important;
    --display-label-color: #001122 !important;
    --offcanvas-fg: #111 !important;
    --offcanvas-bg: radial-gradient(circle at top center, #f7f7fa, #dddde7) !important;
    --small-input-bg-color: #ffffffa0 !important;
    --profile-bg: #d8d8e8 !important;
    --profile-arrow-bg: #c0c0d0 !important;
    --profile-border: 1px solid #888 !important;
    --profile-select-bg: #d8d8e8 !important;
    --profile-select-border: 1px solid #888 !important;
    --multi-input-bg: #c8c8d8a0 !important;
    --single-input-bg: #d0d0e0a0 !important;
    --spinner-bg: #ffffffa0 !important;
    --folder-bg: #c0c0d0a0 !important;
    --switch-background-color: #d0d0e0 !important;
    --switch-unselected-color: #fff !important;
    --switch-selected-color: var(--theme-color) !important;
    --switch-border-color: #888 !important;
    --switch-border-checked-color: color-mix(in srgb, var(--theme-color) 72%, #444) !important;
    --linear-settings-background-color: #d0d0e0 !important;
    --select-background-color: #e1e1e8 !important;
    --background-image-bg-color: #fff !important;
    --background-brightness: 0.75 !important;
    --label-background-color: #ffffffdd !important;
    --label-color: color-mix(in srgb, var(--theme-color) 68%, #263043) !important;
    --overlay-background-color: #d0d0e0a0 !important;
    --three-d-background: rgba(236, 240, 246, 0.94) !important;
    --inline-input-bg-color: #e8e8f0 !important;
    --bg-dark: #e8e8f0 !important;
    --bg-card: #f3f3f7 !important;
    --bg-panel: #d8d8e3 !important;
    --soft-text: rgba(17, 17, 17, 0.62) !important;
    color: #111 !important;
    color-scheme: light !important;
    background: #e8e8f0 !important;
}

body.original-v3-theme.light-mode .main-view {
    border-color: color-mix(in srgb, var(--theme-color) 55%, #66847f) !important;
    background: transparent !important;
    box-shadow: 0 0 16px color-mix(in srgb, var(--theme-color) 28%, transparent) !important;
}

body.original-v3-theme.light-mode .game-area {
    color: #111 !important;
    background: rgba(218, 222, 234, 0.92) !important;
}

body.original-v3-theme.light-mode .timer {
    border-color: rgba(0, 0, 0, 0.32) !important;
    background: rgba(255, 255, 255, 0.56) !important;
}

body.original-v3-theme.light-mode .timer-controls {
    color: #111 !important;
    background: rgba(255, 255, 255, 0.72) !important;
}

body.original-v3-theme.light-mode .display_text,
body.original-v3-theme.light-mode .carousel_display_label-wrapper h2,
body.original-v3-theme.light-mode .display-inner h2,
body.original-v3-theme.light-mode .display_label_type {
    color: #111 !important;
}

body.original-v3-theme.light-mode .display_label_level,
body.original-v3-theme.light-mode .carousel_display_label_progress {
    color: rgba(17, 17, 17, 0.62) !important;
}

body.original-v3-theme.light-mode label.open {
    color: var(--label-color) !important;
    background: var(--label-background-color) !important;
}

body.original-v3-theme.light-mode .offcanvas,
body.original-v3-theme.light-mode .graph-popup {
    color: #111 !important;
    background: var(--offcanvas-bg) !important;
}

body.original-v3-theme.light-mode .settings-menu-btn,
body.original-v3-theme.light-mode .settings-menu-btn.footer-btn {
    color: #111 !important;
    border-color: #b8bac4 !important;
    background: #e6e6ec !important;
}

body.original-v3-theme.light-mode .settings-menu-btn:hover,
body.original-v3-theme.light-mode .settings-menu-btn[data-active] {
    background: #d8d9e1 !important;
}

body.original-v3-theme.light-mode .settings-menu-btn .btn-icon-wrap {
    color: color-mix(in srgb, var(--theme-color) 74%, #245f68) !important;
    border: 1px solid color-mix(in srgb, var(--theme-color) 32%, #aeb1bc) !important;
    background: #f2f2f6 !important;
    filter: saturate(1.25) contrast(1.12) !important;
}

body.original-v3-theme.light-mode .settings-menu-btn .btn-label {
    color: #111 !important;
}

body.original-v3-theme.light-mode .settings-menu-btn .btn-sublabel {
    color: rgba(17, 17, 17, 0.62) !important;
}

body.original-v3-theme.light-mode .settings-section,
body.original-v3-theme.light-mode .settings-section-content,
body.original-v3-theme.light-mode .advanced-setting,
body.original-v3-theme.light-mode .multi-input,
body.original-v3-theme.light-mode .single-input {
    color: #111 !important;
}

body.original-v3-theme.light-mode input,
body.original-v3-theme.light-mode select,
body.original-v3-theme.light-mode textarea {
    color: #111 !important;
    border-color: #aeb1bc !important;
    background: #f2f2f6 !important;
}

body.original-v3-theme.light-mode .hqli,
body.original-v3-theme.light-mode .graph-popup-content {
    color: #111 !important;
    background: #f4f4f7 !important;
    box-shadow: none !important;
}

body.original-v3-theme.light-mode .hqli .inner {
    border-color: #b8bac4 !important;
    background: transparent !important;
}

body.original-v3-theme.light-mode .hqli.hqli--right,
body.original-v3-theme.light-mode .hqli.hqli--right .inner {
    background: #e7f4e9 !important;
}

body.original-v3-theme.light-mode .hqli.hqli--wrong,
body.original-v3-theme.light-mode .hqli.hqli--wrong .inner {
    background: #f7e8e9 !important;
}

body.original-v3-theme.light-mode .progress-bar-vertical {
    border-color: color-mix(in srgb, var(--theme-color) 45%, #888) !important;
    background: rgba(255, 255, 255, 0.52) !important;
}

body.original-v3-theme.light-mode .progress-content,
body.original-v3-theme.light-mode .progress-value {
    color: var(--label-color) !important;
    text-shadow: none !important;
}

body.original-v3-theme.light-mode .relation-gap-dependent-fields,
body.original-v3-theme.light-mode .suggestion-dialog,
body.original-v3-theme.light-mode .suggestion-image-picker {
    color: #111 !important;
    border-color: #aeb1bc !important;
    background: #f2f2f6 !important;
}

body.original-v3-theme.light-mode .changelog-panel-actions {
    background: linear-gradient(to bottom, transparent, #e3e3eb 30%) !important;
}

/* A separate cyan-light palette for the original geometry. */
body.original-v3-theme.light-mode.cyan-preset {
    --text-color: #10282b !important;
    --background-color: #dceff0 !important;
    --display-label-color: #123a3f !important;
    --offcanvas-fg: #10282b !important;
    --offcanvas-bg: radial-gradient(circle at top center, #f4fbfb, #d6eaeb) !important;
    --profile-bg: #eaf6f6 !important;
    --profile-arrow-bg: #d0e7e8 !important;
    --profile-border: 1px solid rgba(8, 127, 145, 0.28) !important;
    --profile-select-bg: #eaf6f6 !important;
    --profile-select-border: 1px solid rgba(8, 127, 145, 0.28) !important;
    --multi-input-bg: #d7eaebcc !important;
    --single-input-bg: #e8f4f4cc !important;
    --spinner-bg: #f5fbfbcc !important;
    --folder-bg: #d6e9ea !important;
    --linear-settings-background-color: #dceced !important;
    --select-background-color: #e6f3f3 !important;
    --background-image-bg-color: #e8f6f6 !important;
    --label-background-color: #f4fbfbe8 !important;
    --label-color: #087f91 !important;
    --overlay-background-color: #b9dfe1 !important;
    --three-d-background: rgba(220, 239, 240, 0.96) !important;
    --inline-input-bg-color: #e8f4f4 !important;
    color: #10282b !important;
    background: #dceff0 !important;
}

body.original-v3-theme.light-mode.cyan-preset .game-area {
    color: #10282b !important;
    background: #d0e9eacc !important;
}

body.original-v3-theme.light-mode.cyan-preset .timer-controls,
body.original-v3-theme.light-mode.cyan-preset .settings-menu-btn,
body.original-v3-theme.light-mode.cyan-preset .settings-menu-btn.footer-btn,
body.original-v3-theme.light-mode.cyan-preset input,
body.original-v3-theme.light-mode.cyan-preset select,
body.original-v3-theme.light-mode.cyan-preset textarea {
    color: #10282b !important;
    border-color: rgba(8, 127, 145, 0.24) !important;
    background: rgba(244, 251, 251, 0.78) !important;
}

body.original-v3-theme.light-mode.cyan-preset .offcanvas,
body.original-v3-theme.light-mode.cyan-preset .graph-popup,
body.original-v3-theme.light-mode.cyan-preset .suggestion-dialog {
    color: #10282b !important;
    background: var(--offcanvas-bg) !important;
}

body.original-v3-theme.light-mode.cyan-preset .hqli,
body.original-v3-theme.light-mode.cyan-preset .graph-popup-content {
    color: #10282b !important;
    background: #edf7f7 !important;
}

body.original-v3-theme.light-mode.cyan-preset .changelog-panel-actions {
    background: linear-gradient(to bottom, transparent, #dceff0 30%) !important;
}

body.original-v3-theme:not(.cyan-preset) .game-area {
    background: var(--game-area-custom-color, #293247cc) !important;
}

/* Final Original v3 theme boundaries and light-mode harmony. */
body.original-v3-theme .timer {
    overflow: hidden !important;
    border: 1px solid color-mix(in srgb, var(--theme-color) 28%, #1b2325) !important;
    outline: 0 !important;
}

body.original-v3-theme .timer__bar {
    box-sizing: border-box !important;
    box-shadow: inset 0 0 0 1px rgba(4, 12, 16, 0.18) !important;
}

/* Every edge tab receives the same restrained outline response. */
body.original-v3-theme label.open:hover,
body.original-v3-theme label.open:focus-visible,
body.original-v3-theme label.open.changelog-side-tab:hover,
body.original-v3-theme label.open.changelog-side-tab:focus-visible {
    border: 0 !important;
    outline: 1px solid color-mix(in srgb, var(--theme-color) 54%, transparent) !important;
    outline-offset: -1px !important;
    background: #0009 !important;
    box-shadow: 0 0 7px color-mix(in srgb, var(--theme-color) 20%, transparent) !important;
    color: #abf4ff !important;
    text-shadow: none !important;
    filter: none !important;
}

body.original-v3-theme.light-mode label.open:hover,
body.original-v3-theme.light-mode label.open:focus-visible,
body.original-v3-theme.light-mode label.open.changelog-side-tab:hover,
body.original-v3-theme.light-mode label.open.changelog-side-tab:focus-visible {
    background: var(--label-background-color) !important;
    color: var(--label-color) !important;
}

/* Original v3 loads after the base stylesheet, so repeat the essential Focus
   Layout geometry with stronger theme-scoped selectors. */
body.original-v3-theme.focus-layout .timer-wrap {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    z-index: 20 !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
}

body.original-v3-theme.focus-layout .timer,
body.original-v3-theme.focus-layout .timer-controls {
    display: none !important;
}

body.original-v3-theme.focus-layout .focus-timer-readout {
    --focus-timer-progress: 0%;
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    z-index: 30 !important;
    display: grid !important;
    width: 2.25rem !important;
    height: 2.25rem !important;
    min-width: 2.25rem !important;
    min-height: 2.25rem !important;
    place-items: center !important;
    padding: 0 !important;
    transform: translate(35%, -35%) !important;
    overflow: hidden !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: conic-gradient(var(--theme-color) var(--focus-timer-progress), rgba(126, 141, 170, 0.3) 0) !important;
    color: var(--text-color) !important;
    box-shadow: none !important;
    font: 800 0.78rem/1 "MGS2", monospace !important;
    isolation: isolate !important;
}

body.original-v3-theme.focus-layout .focus-timer-readout::before {
    content: "" !important;
    position: absolute !important;
    inset: 3px !important;
    z-index: -1 !important;
    display: block !important;
    border-radius: inherit !important;
    background: var(--background-color) !important;
}

body.original-v3-theme.focus-layout .focus-timer-readout.is-off {
    background: rgba(126, 141, 170, 0.3) !important;
    color: var(--soft-text, #9aa4b8) !important;
}

body.original-v3-theme.focus-layout .display-inner > h2,
body.original-v3-theme.focus-layout .carousel_display_label-wrapper > h2,
body.original-v3-theme.focus-layout .level-wrapper,
body.original-v3-theme.focus-layout .game-area .border-left,
body.original-v3-theme.focus-layout .game-area .border-right,
body.original-v3-theme.focus-layout .game-area .bracket-lip-top-left,
body.original-v3-theme.focus-layout .game-area .bracket-lip-top-right,
body.original-v3-theme.focus-layout .game-area .bracket-lip-bottom-left,
body.original-v3-theme.focus-layout .game-area .bracket-lip-bottom-right {
    display: none !important;
}

body.original-v3-theme.focus-layout .display-inner,
body.original-v3-theme.focus-layout .carousel_display_label-wrapper {
    width: auto !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0.65rem 0.8rem 0.35rem !important;
}

body.original-v3-theme.focus-layout .display_text,
body.original-v3-theme.focus-layout .carousel_display_text {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    max-height: calc(100svh - 7.5rem) !important;
    padding-right: 0.25rem !important;
    overflow-y: auto !important;
    box-sizing: border-box !important;
}

/* Light Original v3 uses clean text and a visible neutral timer toggle. */
body.original-v3-theme.light-mode .game-area,
body.original-v3-theme.light-mode .game-area * {
    text-shadow: none !important;
}

body.original-v3-theme.light-mode .timer-controls input[type="checkbox"] {
    border: 1px solid #8d9ba0 !important;
    background: #edf1f2 !important;
    box-shadow: inset 0 0 0 1px rgba(31, 52, 58, 0.08) !important;
}

body.original-v3-theme.light-mode .timer-controls input[type="checkbox"]::after {
    background: #71848a !important;
    opacity: 0.62 !important;
}

body.original-v3-theme.light-mode .timer-controls input[type="checkbox"]:checked {
    border-color: color-mix(in srgb, var(--theme-color) 72%, #617176) !important;
    background: color-mix(in srgb, var(--theme-color) 16%, #edf1f2) !important;
    box-shadow: none !important;
}

body.original-v3-theme.light-mode .timer-controls input[type="checkbox"]:checked::after {
    background: color-mix(in srgb, var(--theme-color) 74%, #4e656b) !important;
    opacity: 1 !important;
}

body.original-v3-theme.light-mode:not(.cyan-preset) {
    background: #dfe1e5 !important;
}

body.original-v3-theme.light-mode:not(.cyan-preset) .main-view {
    background: #e7e8eb !important;
}

body.original-v3-theme.light-mode:not(.cyan-preset) .game-area {
    background: var(--game-area-custom-color, #efefef) !important;
}

body.original-v3-theme.light-mode:not(.cyan-preset) .timer-wrap {
    background: transparent !important;
}

body.original-v3-theme.light-mode:not(.cyan-preset) .timer,
body.original-v3-theme.light-mode:not(.cyan-preset) .timer-controls {
    background: #f7f7f9 !important;
}

/* Cyan-light keeps Original v3 geometry but uses one continuous pale-cyan
   surface instead of a dark center surrounded by a light page. */
body.original-v3-theme.light-mode.cyan-preset {
    --background-color: #e4eff0 !important;
    --offcanvas-bg: #eef6f6 !important;
    --background-image-bg-color: #e4eff0 !important;
    --overlay-background-color: #9fcdd0 !important;
    --three-d-background: rgba(228, 239, 240, 0.97) !important;
    color: #10282b !important;
    background: #e4eff0 !important;
}

body.original-v3-theme.light-mode.cyan-preset .main-view {
    border-color: color-mix(in srgb, var(--theme-color) 40%, #6f9ca0) !important;
    background: #d9e9ea !important;
    box-shadow: none !important;
}

body.original-v3-theme.light-mode.cyan-preset .background-image {
    background: #e4eff0 !important;
    filter: none !important;
}

body.original-v3-theme.light-mode.cyan-preset .overlay {
    background: #94c5c9 !important;
    opacity: 0.12 !important;
}

body.original-v3-theme.light-mode.cyan-preset .game-area {
    color: #10282b !important;
    background: #edf5f5 !important;
}

body.original-v3-theme.light-mode.cyan-preset .timer-wrap {
    background: transparent !important;
}

body.original-v3-theme.light-mode.cyan-preset .timer,
body.original-v3-theme.light-mode.cyan-preset .timer-controls {
    color: #10282b !important;
    border-color: rgba(8, 127, 145, 0.22) !important;
    background: #f7fbfb !important;
}

/* Suggestion controls use Original v3 surfaces in both dark and light modes. */
body.original-v3-theme .changelog-panel-actions {
    background: var(--offcanvas-bg) !important;
}

body.original-v3-theme .submit-suggestion-button {
    border: 0 !important;
    color: #fffffd !important;
    background: color-mix(in srgb, var(--theme-color) 10%, #202223) !important;
}

body.original-v3-theme .submit-suggestion-button:hover {
    background: color-mix(in srgb, var(--theme-color) 16%, #202223) !important;
}

body.original-v3-theme .submit-suggestion-icon {
    color: var(--theme-color) !important;
    background: color-mix(in srgb, var(--theme-color) 13%, #111) !important;
}

body.original-v3-theme.light-mode .changelog-panel-actions {
    background: var(--offcanvas-bg) !important;
}

body.original-v3-theme.light-mode .submit-suggestion-button {
    color: #172326 !important;
    background: color-mix(in srgb, var(--theme-color) 11%, #e8ecee) !important;
}

body.original-v3-theme.light-mode .submit-suggestion-button:hover {
    background: color-mix(in srgb, var(--theme-color) 17%, #e4e9eb) !important;
}

body.original-v3-theme.light-mode .submit-suggestion-icon {
    color: color-mix(in srgb, var(--theme-color) 72%, #3d6067) !important;
    background: #f5f7f8 !important;
}

body.original-v3-theme.light-mode.cyan-preset .changelog-panel-actions {
    background: #eef6f6 !important;
}

body.original-v3-theme.light-mode.cyan-preset .submit-suggestion-button {
    color: #12363a !important;
    background: #d5e8e9 !important;
}

body.original-v3-theme.light-mode.cyan-preset .submit-suggestion-button:hover {
    background: #c9e1e3 !important;
}

body.original-v3-theme.light-mode.cyan-preset .submit-suggestion-icon {
    color: #087f91 !important;
    background: #edf7f7 !important;
}

/* Stronger cyan-light identity without introducing dark islands. */
body.original-v3-theme.light-mode.cyan-preset {
    --background-color: #cbe5e7 !important;
    --offcanvas-bg: #e0f1f2 !important;
    --profile-bg: #c8e3e5 !important;
    --profile-arrow-bg: #b5d9dc !important;
    --profile-select-bg: #e6f3f4 !important;
    --multi-input-bg: #d6eaec !important;
    --single-input-bg: #e5f3f4 !important;
    --spinner-bg: #edf7f7 !important;
    --folder-bg: #badcdf !important;
    --linear-settings-background-color: #d1e8ea !important;
    --select-background-color: #e8f5f6 !important;
    --background-image-bg-color: #cbe5e7 !important;
    --label-background-color: #e5f4f5 !important;
    --label-color: #087f91 !important;
    --overlay-background-color: #62adb4 !important;
    --three-d-background: rgba(214, 234, 236, 0.97) !important;
    --inline-input-bg-color: #edf7f7 !important;
    background: #cbe5e7 !important;
}

body.original-v3-theme.light-mode.cyan-preset .main-view {
    border-color: color-mix(in srgb, var(--theme-color) 42%, #4f9ba2) !important;
    background: #b8dadd !important;
}

body.original-v3-theme.light-mode.cyan-preset .background-image {
    background: #cbe5e7 !important;
}

body.original-v3-theme.light-mode.cyan-preset .overlay {
    background: #62adb4 !important;
    opacity: 0.16 !important;
}

body.original-v3-theme.light-mode.cyan-preset .game-area {
    background: #dff0f1 !important;
}

body.original-v3-theme.light-mode.cyan-preset .offcanvas,
body.original-v3-theme.light-mode.cyan-preset .graph-popup {
    background: #e0f1f2 !important;
}

body.original-v3-theme.light-mode.cyan-preset .settings-menu-btn,
body.original-v3-theme.light-mode.cyan-preset .settings-menu-btn.footer-btn {
    border-color: #8fc4c9 !important;
    background: #c9e4e6 !important;
}

body.original-v3-theme.light-mode.cyan-preset .settings-menu-btn:hover,
body.original-v3-theme.light-mode.cyan-preset .settings-menu-btn[data-active] {
    background: #bbdce0 !important;
}

body.original-v3-theme.light-mode.cyan-preset .settings-section-content > .mb-1,
body.original-v3-theme.light-mode.cyan-preset .settings-section-content > .mb-2,
body.original-v3-theme.light-mode.cyan-preset .settings-section-content > .folder,
body.original-v3-theme.light-mode.cyan-preset .settings-section-content > .ctrl__inner,
body.original-v3-theme.light-mode.cyan-preset .profile-container,
body.original-v3-theme.light-mode.cyan-preset .history-stats .stat-row,
body.original-v3-theme.light-mode.cyan-preset .history-filter-rail {
    border-color: #92c7cb !important;
    background: #cce6e8 !important;
}

body.original-v3-theme.light-mode.cyan-preset #sidebar-settings .mb-1,
body.original-v3-theme.light-mode.cyan-preset #sidebar-settings .mb-1:hover,
body.original-v3-theme.light-mode.cyan-preset #sidebar-settings .multi-input,
body.original-v3-theme.light-mode.cyan-preset #sidebar-settings .inline-input__outer,
body.original-v3-theme.light-mode.cyan-preset #sidebar-settings .single-input {
    border-color: #a9d1d4 !important;
    background: #deeff0 !important;
}

body.original-v3-theme.light-mode.cyan-preset input,
body.original-v3-theme.light-mode.cyan-preset select,
body.original-v3-theme.light-mode.cyan-preset textarea,
body.original-v3-theme.light-mode.cyan-preset .profile-input,
body.original-v3-theme.light-mode.cyan-preset .profile-plus,
body.original-v3-theme.light-mode.cyan-preset .profile-export,
body.original-v3-theme.light-mode.cyan-preset .profile-import {
    color: #10282b !important;
    border-color: #86bfc4 !important;
    background: #edf7f7 !important;
}

body.original-v3-theme .history-footer,
body.original-v3-theme.light-mode .history-footer,
body.original-v3-theme.light-mode.cyan-preset .history-footer {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* Original-theme navigation keeps the compact v3 geometry while using the
   same persistent section rail as the default theme. */
body.original-v3-theme .section-nav-bar.offcanvas,
body.original-v3-theme.light-mode .section-nav-bar.offcanvas {
    width: min(94vw, 620px) !important;
    max-width: min(94vw, 620px) !important;
}

body.original-v3-theme .section-nav-bar .offcanvas-body {
    width: 100% !important;
    padding: 0 !important;
    overflow: hidden !important;
}

body.original-v3-theme .section-nav-bar .offcanvas-body > div {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    height: 100% !important;
}

body.original-v3-theme .section-nav-bar .settings-main-menu,
body.original-v3-theme .section-nav-bar .settings-main-menu.hidden {
    display: flex !important;
    flex: 0 0 64px !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: stretch !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 64px !important;
    padding: 0.35rem 3.25rem 0.35rem 0.35rem !important;
    gap: 0.3rem !important;
    overflow: hidden !important;
    border: 0 !important;
    border-bottom: 1px solid #333 !important;
    background: #090909 !important;
}

body.original-v3-theme .section-nav-bar .settings-menu-btn,
body.original-v3-theme .section-nav-bar .settings-menu-btn.footer-btn {
    display: flex !important;
    flex: 1 1 0 !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 54px !important;
    padding: 0 !important;
    border: 1px solid #333 !important;
    border-radius: 0 !important;
    background: #222 !important;
    box-shadow: none !important;
}

body.original-v3-theme .section-nav-bar .settings-menu-btn:hover,
body.original-v3-theme .section-nav-bar .settings-menu-btn:focus-visible,
body.original-v3-theme .section-nav-bar .settings-menu-btn[data-active] {
    border-color: var(--theme-color) !important;
    background: #222 !important;
    box-shadow:
        0 0 0 1px color-mix(in srgb, var(--theme-color) 56%, transparent),
        0 0 8px color-mix(in srgb, var(--theme-color) 42%, transparent) !important;
    filter: none !important;
    transform: none !important;
}

body.original-v3-theme .section-nav-bar .settings-menu-btn .btn-icon-wrap {
    width: 36px !important;
    height: 36px !important;
    margin: auto !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #111 !important;
}

body.original-v3-theme .section-nav-bar .settings-menu-btn .btn-text-wrap,
body.original-v3-theme .section-nav-bar .settings-menu-btn .btn-chevron,
body.original-v3-theme .section-nav-bar .settings-menu-footer,
body.original-v3-theme .section-nav-bar .settings-back-btn {
    display: none !important;
}

body.original-v3-theme .section-nav-bar .settings-section.active {
    display: block !important;
    flex: 1 1 auto !important;
    width: 100% !important;
    max-width: none !important;
    min-height: 0 !important;
    padding: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
}

body.original-v3-theme .section-nav-bar .settings-section.active .settings-section-content,
body.original-v3-theme .section-nav-bar .settings-section.active .settings-section-content.collapsed {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    padding: 1rem !important;
}

body.original-v3-theme.light-mode .section-nav-bar .settings-main-menu,
body.original-v3-theme.light-mode .section-nav-bar .settings-main-menu.hidden {
    border-bottom-color: #b8bac4 !important;
    background: var(--offcanvas-bg) !important;
}

body.original-v3-theme.light-mode .section-nav-bar .settings-menu-btn,
body.original-v3-theme.light-mode .section-nav-bar .settings-menu-btn.footer-btn,
body.original-v3-theme.light-mode .section-nav-bar .settings-menu-btn:hover,
body.original-v3-theme.light-mode .section-nav-bar .settings-menu-btn:focus-visible,
body.original-v3-theme.light-mode .section-nav-bar .settings-menu-btn[data-active] {
    background: #e6e6ec !important;
}

body.original-v3-theme.cyan-preset:not(.light-mode) .section-nav-bar .settings-main-menu,
body.original-v3-theme.cyan-preset:not(.light-mode) .section-nav-bar .settings-main-menu.hidden {
    border-bottom-color: #245b5b !important;
    background: #062222 !important;
}

body.original-v3-theme.cyan-preset:not(.light-mode) .section-nav-bar .settings-menu-btn,
body.original-v3-theme.cyan-preset:not(.light-mode) .section-nav-bar .settings-menu-btn:hover,
body.original-v3-theme.cyan-preset:not(.light-mode) .section-nav-bar .settings-menu-btn:focus-visible,
body.original-v3-theme.cyan-preset:not(.light-mode) .section-nav-bar .settings-menu-btn[data-active] {
    background: #0d3a3a !important;
}

body.original-v3-theme.light-mode.cyan-preset .section-nav-bar .settings-main-menu,
body.original-v3-theme.light-mode.cyan-preset .section-nav-bar .settings-main-menu.hidden {
    border-bottom-color: #8fc4c9 !important;
    background: #e0f1f2 !important;
}

body.original-v3-theme.light-mode.cyan-preset .section-nav-bar .settings-menu-btn,
body.original-v3-theme.light-mode.cyan-preset .section-nav-bar .settings-menu-btn:hover,
body.original-v3-theme.light-mode.cyan-preset .section-nav-bar .settings-menu-btn:focus-visible,
body.original-v3-theme.light-mode.cyan-preset .section-nav-bar .settings-menu-btn[data-active] {
    background: #c9e4e6 !important;
}

/* Match the default theme's notebook-height scaling while preserving the
   Original theme's square edge-tab geometry. */
@media (min-width: 769px) and (max-height: 900px) {
    body.original-v3-theme label.open.side-btn-reveal {
        padding: clamp(0.45rem, 1.2vh, 0.8rem)
            clamp(0.9rem, 2.5vh, 1.8rem) !important;
        font-size: clamp(0.72rem, 1.8vh, var(--step-0)) !important;
    }

    body.original-v3-theme.side-tabs-floating label.open.side-btn-reveal {
        padding: clamp(0.4rem, 1vh, 0.6rem)
            clamp(0.45rem, 1.4vh, 0.7rem) !important;
    }
}

/* Match the shared edge-control behavior without changing Original v3's
   square geometry. */
body.original-v3-theme label.open.side-btn-reveal {
    transition:
        outline-color 180ms ease,
        box-shadow 180ms ease,
        color 180ms ease,
        opacity 220ms ease !important;
}

body.original-v3-theme .offcanvas .offcanvas-side {
    position: relative !important;
    flex: 0 0 2.5rem !important;
    width: 2.5rem !important;
}

body.original-v3-theme .offcanvas .offcanvas-close {
    top: 0.5rem !important;
    right: auto !important;
    left: 50% !important;
    width: 2rem !important;
    height: 2rem !important;
    border: 0 !important;
    border-radius: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    transform: translateX(-50%) !important;
    transition: color 160ms ease, opacity 160ms ease !important;
}

body.original-v3-theme .offcanvas .offcanvas-close:hover,
body.original-v3-theme .offcanvas .offcanvas-close:focus,
body.original-v3-theme .offcanvas .offcanvas-close:focus-visible {
    border: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    color: var(--theme-color) !important;
    box-shadow: none !important;
    opacity: 1 !important;
    transform: translateX(-50%) !important;
}

body.original-v3-theme .section-nav-bar .offcanvas-side {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    width: 3rem !important;
    height: 64px !important;
}

body.original-v3-theme .section-nav-bar .offcanvas-close {
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
}

body.original-v3-theme .section-nav-bar .offcanvas-close:hover,
body.original-v3-theme .section-nav-bar .offcanvas-close:focus,
body.original-v3-theme .section-nav-bar .offcanvas-close:focus-visible {
    transform: translate(-50%, -50%) !important;
}

/* Focus Layout uses the normal countdown strip instead of a detached circle. */
body.original-v3-theme.focus-layout .timer-wrap {
    position: relative !important;
    inset: auto !important;
    z-index: 20 !important;
    width: 100% !important;
    height: auto !important;
    margin: 0 0 0.2rem !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: transparent !important;
}

body.original-v3-theme.focus-layout .timer {
    display: block !important;
    width: 100% !important;
}

body.original-v3-theme.focus-layout .timer-controls,
body.original-v3-theme.focus-layout .focus-timer-readout {
    display: none !important;
}

body.original-v3-theme .custom-time-info,
body.original-v3-theme.light-mode .custom-time-info {
    color: #fff !important;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.68) !important;
}

/* Light Original history controls use the same pale surface family as the
   panel instead of importing the dark teal buttons. */
body.original-v3-theme.light-mode .history-filter-btn {
    color: #26383b !important;
    background: color-mix(in srgb, var(--theme-color) 7%, #edf1f2) !important;
}

body.original-v3-theme.light-mode .history-filter-btn:hover {
    color: #17282b !important;
    background: color-mix(in srgb, var(--theme-color) 13%, #e7edef) !important;
}

body.original-v3-theme.light-mode .history-filter-btn.selected {
    color: #102326 !important;
    background: color-mix(in srgb, var(--theme-color) 22%, #e5ecee) !important;
}

body.original-v3-theme.light-mode .settings-menu-btn .btn-icon-wrap {
    border: 0 !important;
    outline: 0 !important;
    filter: saturate(1.45) contrast(1.16) !important;
}

/* Final flat-surface pass for Original v3. Geometry stays square; only
   redundant framing is removed. */
body.original-v3-theme #experimental-folder-content,
body.original-v3-theme #experimental-folder-content > .mb-1,
body.original-v3-theme #experimental-folder-content .experimental-setting,
body.original-v3-theme #experimental-folder-content .multi-input,
body.original-v3-theme #experimental-folder-content .single-input,
body.original-v3-theme #experimental-folder-content ul.explainer,
body.original-v3-theme #experimental-folder-content div[style*="margin-left: 2rem"],
body.original-v3-theme.light-mode.cyan-preset
    #experimental-folder-content .multi-input,
body.original-v3-theme.light-mode.cyan-preset
    #experimental-folder-content .single-input {
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
}

body.original-v3-theme #experimental-folder-content div[style*="margin-left: 2rem"] {
    border-left: 0 !important;
}

body.original-v3-theme #experimental-folder-content .multi-input,
body.original-v3-theme #experimental-folder-content .single-input,
body.original-v3-theme #experimental-folder-content ul.explainer {
    background: transparent !important;
}

body.original-v3-theme.light-mode #history-list > .hqli,
body.original-v3-theme.light-mode #history-list > div {
    border: 0 !important;
    background: #f6f8f8 !important;
    box-shadow: none !important;
}

body.original-v3-theme.light-mode #history-list .hqli .inner {
    border-color: transparent !important;
    background: transparent !important;
    box-shadow: none !important;
}

body.original-v3-theme.light-mode #history-list .hqli.hqli--right .inner {
    background: #edf7ef !important;
}

body.original-v3-theme.light-mode #history-list .hqli.hqli--wrong .inner {
    background: #faeeee !important;
}

body.original-v3-theme .graph-popup,
body.original-v3-theme .graph-range-controls,
body.original-v3-theme .graph-summary-card,
body.original-v3-theme .graph-controls,
body.original-v3-theme .graph-popup-content,
body.original-v3-theme .graph-end-controls,
body.original-v3-theme .graph-series-key,
body.original-v3-theme #graph-close-popup.graph-close-popup {
    border-color: transparent !important;
    outline: 0 !important;
    box-shadow: none !important;
}

body.original-v3-theme #sidebar-changelog .changelog-item,
body.original-v3-theme .suggestion-dialog {
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
}

body.original-v3-theme .anchor-pattern-refresh-row {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

body.original-v3-theme .anchor-pattern-refresh {
    border: 0 !important;
    border-radius: 0 !important;
    background: color-mix(in srgb, var(--theme-color) 16%, #151515) !important;
    color: #fffffd !important;
    box-shadow: none !important;
    font-family: "Espionage", sans-serif !important;
}

body.original-v3-theme .anchor-pattern-refresh:hover,
body.original-v3-theme .anchor-pattern-refresh:focus-visible {
    border: 0 !important;
    outline: 0 !important;
    background: color-mix(in srgb, var(--theme-color) 24%, #151515) !important;
    color: var(--theme-color) !important;
    box-shadow: none !important;
}

body.original-v3-theme.light-mode .anchor-pattern-refresh {
    background: color-mix(in srgb, var(--theme-color) 9%, #eef2f2) !important;
    color: #172326 !important;
}

body.original-v3-theme.light-mode .anchor-pattern-refresh:hover,
body.original-v3-theme.light-mode .anchor-pattern-refresh:focus-visible {
    background: color-mix(in srgb, var(--theme-color) 17%, #e9eeee) !important;
    color: color-mix(in srgb, var(--theme-color) 78%, #172326) !important;
}

/* Original v3 keeps square controls. Enabled rails get only a restrained
   theme tint; the center lamp remains the stronger state cue. */
body.original-v3-theme .switch,
body.original-v3-theme .switch:hover,
body.original-v3-theme .switch:focus,
body.original-v3-theme .switch:focus-visible,
body.original-v3-theme input[type="checkbox"]:checked + .switch {
    border-color: var(--switch-border-color) !important;
    background: var(--switch-background-color) !important;
    outline: 0 !important;
    box-shadow: none !important;
    filter: none !important;
    transform: none !important;
}

body.original-v3-theme input[type="checkbox"]:checked + .switch {
    background: color-mix(
        in oklab,
        var(--switch-background-color) 82%,
        var(--theme-color, #eddb7e) 18%
    ) !important;
}

body.original-v3-theme #advanced-section #experimental-folder-content,
body.original-v3-theme #advanced-section #legacy-folder-content {
    display: block !important;
    height: auto !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    border: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    opacity: 1 !important;
}

body.original-v3-theme #advanced-section #legacy-folder-content {
    margin-top: 0.65rem !important;
}

body.original-v3-theme #advanced-section #experimental-folder-content > .mb-1,
body.original-v3-theme #advanced-section #legacy-folder-content > .mb-1 {
    border: 0 !important;
    border-radius: 0 !important;
    outline: 0 !important;
    background: var(--single-input-bg, #000a) !important;
    box-shadow: none !important;
    padding: 0.85rem !important;
}

body.original-v3-theme #advanced-section #experimental-folder-content .multi-input,
body.original-v3-theme #advanced-section #legacy-folder-content .multi-input,
body.original-v3-theme #advanced-section #experimental-folder-content .single-input,
body.original-v3-theme #advanced-section #legacy-folder-content .single-input,
body.original-v3-theme #advanced-section #experimental-folder-content ul.explainer,
body.original-v3-theme #advanced-section #legacy-folder-content ul.explainer,
body.original-v3-theme #advanced-section #experimental-folder-content div[style*="margin-left: 2rem"],
body.original-v3-theme #advanced-section #legacy-folder-content div[style*="margin-left: 2rem"] {
    border: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

body.original-v3-theme.light-mode
    #advanced-section #experimental-folder-content > .mb-1,
body.original-v3-theme.light-mode
    #advanced-section #legacy-folder-content > .mb-1 {
    background: rgba(255, 255, 255, 0.62) !important;
}

body.original-v3-theme.light-mode.cyan-preset
    #advanced-section #experimental-folder-content > .mb-1,
body.original-v3-theme.light-mode.cyan-preset
    #advanced-section #legacy-folder-content > .mb-1 {
    background: #cce6e8 !important;
}

body.original-v3-theme .custom-modal,
body.original-v3-theme .custom-modal-buttons button,
body.original-v3-theme .custom-modal-buttons button:hover,
body.original-v3-theme .custom-modal-buttons button:focus,
body.original-v3-theme .custom-modal-buttons button:focus-visible,
body.original-v3-theme .custom-modal-buttons button:active {
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
}

body.original-v3-theme .custom-modal[data-tone="danger"] .modal-btn-confirm {
    background: #912 !important;
    color: #fffffd !important;
}

body.original-v3-theme .custom-modal[data-tone="danger"] .modal-btn-confirm:hover {
    background: #b21d2e !important;
}

body.original-v3-theme .hqli-trial-actions button,
body.original-v3-theme .hqli-trial-actions button:hover,
body.original-v3-theme .hqli-trial-actions button:focus,
body.original-v3-theme .hqli-trial-actions button:focus-visible,
body.original-v3-theme .hqli-trial-actions button:active,
body.original-v3-theme .clear-history-btn,
body.original-v3-theme .clear-history-btn:hover,
body.original-v3-theme .clear-history-btn:focus,
body.original-v3-theme .clear-history-btn:focus-visible,
body.original-v3-theme .clear-history-btn:active {
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
}

body.original-v3-theme .hqli-trial-actions .delete,
body.original-v3-theme .hqli-trial-actions .delete:hover,
body.original-v3-theme .hqli-trial-actions .delete:focus,
body.original-v3-theme .hqli-trial-actions .delete:focus-visible,
body.original-v3-theme .hqli-trial-actions .delete:active {
    background: #912 !important;
    color: #fffffd !important;
}

body.original-v3-theme .hqli-trial-actions .delete {
    display: grid !important;
    width: 2rem !important;
    min-width: 2rem !important;
    height: 2rem !important;
    min-height: 2rem !important;
    place-items: center !important;
    padding: 0 !important;
}

body.original-v3-theme.light-mode #history-list > .hqli.hqli--right,
body.original-v3-theme.light-mode #history-list > .hqli.hqli--right .inner {
    background: #c9e4d0 !important;
}

body.original-v3-theme.light-mode #history-list > .hqli.hqli--wrong,
body.original-v3-theme.light-mode #history-list > .hqli.hqli--wrong .inner {
    background: #edc8ce !important;
}

/* Original-theme compatibility details. Punctuation falls back from the
   restricted Espionage face above, while these UI labels and controls retain
   the intended Original typography. */
body.original-v3-theme .submit-suggestion-button,
body.original-v3-theme .submit-suggestion-button strong {
    font-family: "Espionage", "Roboto", sans-serif !important;
}

body.original-v3-theme .hqli-trial-actions .explanation-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    height: 2rem !important;
    min-height: 2rem !important;
    line-height: 1 !important;
}

body.original-v3-theme:not(.colored-words) .hqli-preamble,
body.original-v3-theme:not(.colored-words) .hqli-postamble,
body.original-v3-theme:not(.colored-words) .hqli-transform-header {
    color: rgba(255, 255, 253, 0.64) !important;
}

body.original-v3-theme.light-mode:not(.colored-words) .hqli-preamble,
body.original-v3-theme.light-mode:not(.colored-words) .hqli-postamble,
body.original-v3-theme.light-mode:not(.colored-words) .hqli-transform-header {
    color: rgba(17, 27, 30, 0.60) !important;
}

body.original-v3-theme.light-mode .graph-range-select,
body.original-v3-theme.light-mode .graph-select,
body.original-v3-theme.light-mode .graph-close-popup,
body.original-v3-theme.light-mode .graph-mode-filter select,
body.original-v3-theme.light-mode .graph-range-select:hover,
body.original-v3-theme.light-mode .graph-range-select:focus-visible,
body.original-v3-theme.light-mode .graph-range-select.selected,
body.original-v3-theme.light-mode .graph-select:hover,
body.original-v3-theme.light-mode .graph-select:focus-visible,
body.original-v3-theme.light-mode .graph-select.selected,
body.original-v3-theme.light-mode .graph-select.selected:hover {
    color: #172326 !important;
}

body.original-v3-theme.light-mode .graph-range-select:hover,
body.original-v3-theme.light-mode .graph-range-select:focus-visible,
body.original-v3-theme.light-mode .graph-select:hover,
body.original-v3-theme.light-mode .graph-select:focus-visible {
    background: color-mix(
        in srgb,
        var(--theme-color, #eddb7e) 18%,
        #e8eeee
    ) !important;
}

/* The Original skin follows the same mobile-smallest sidebar scale as the
   default skin while retaining its square v3 geometry. */
@media (max-width: 620px) {
    body.original-v3-theme .offcanvas-body {
        width: calc(100% - 2rem) !important;
        padding: 0.55rem 0.65rem 0.7rem !important;
        font-size: var(--step--1) !important;
    }

    body.original-v3-theme .settings-section.active .settings-section-content,
    body.original-v3-theme .settings-section.active .settings-section-content.collapsed {
        padding: 0.55rem !important;
    }

    body.original-v3-theme .settings-menu-btn .btn-label {
        font-size: 0.72rem !important;
    }

    body.original-v3-theme .settings-menu-btn .btn-sublabel {
        font-size: 0.6rem !important;
    }

    body.original-v3-theme .per-mode-conclusion-settings,
    body.original-v3-theme .per-mode-conclusion-grid label {
        border-radius: 0 !important;
    }
}
