:root {
    --portal-ink: #182433;
    --portal-muted: #657285;
    --portal-line: #dce2ea;
    --portal-canvas: #f5f7fa;
    --portal-rail: #111827;
    --portal-rail-line: rgba(255, 255, 255, 0.1);
}

html,
body {
    min-height: 100%;
}

body {
    min-width: 320px;
    color: var(--portal-ink);
    background: var(--portal-canvas);
}

.portal-shell {
    display: grid;
    min-height: 100vh;
    grid-template-columns: minmax(280px, 34vw) minmax(0, 1fr);
    background: var(--portal-rail);
}

.portal-rail {
    position: relative;
    display: flex;
    min-height: 100vh;
    overflow: hidden;
    flex-direction: column;
    padding: 34px clamp(30px, 4vw, 72px) 30px;
    color: #fff;
    background: var(--portal-rail);
}

body[data-portal-state="generator"] .portal-rail {
    position: sticky;
    top: 0;
    height: 100vh;
    align-self: start;
}

body[data-portal-state="generator"] .portal-shell {
    grid-template-columns: 280px minmax(0, 1fr);
}

body[data-portal-state="generator"] .portal-rail {
    padding-right: 28px;
    padding-left: 28px;
}

body[data-portal-state="generator"] .rail-content h1 {
    font-size: 2.25rem;
}

.portal-rail::before {
    position: absolute;
    top: 0;
    right: 0;
    width: 1px;
    height: 100%;
    content: '';
    background: rgba(255, 255, 255, 0.12);
}

.portal-rail::after {
    position: absolute;
    right: clamp(30px, 4vw, 72px);
    bottom: 86px;
    left: clamp(30px, 4vw, 72px);
    height: 1px;
    content: '';
    background: var(--portal-rail-line);
}

.rail-brand {
    position: relative;
    z-index: 1;
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 14px;
    color: #fff;
}

.rail-brand:hover {
    color: #fff;
    text-decoration: none;
}

.rail-brand-mark {
    display: grid;
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    place-content: center;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 6px;
    background: #066fd1;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.rail-brand-mark strong,
.rail-brand-mark small {
    display: block;
    letter-spacing: 0;
    line-height: 1;
}

.rail-brand-mark strong {
    font-size: 1rem;
}

.rail-brand-mark small {
    margin-top: 5px;
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.5rem;
}

.rail-brand-copy {
    min-width: 0;
}

.rail-brand-copy strong,
.rail-brand-copy small {
    display: block;
    letter-spacing: 0;
}

.rail-brand-copy strong {
    max-width: 250px;
    overflow: hidden;
    font-size: 1.0625rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rail-brand-copy small {
    margin-top: 4px;
    color: #8491a5;
    font-size: 0.625rem;
}

.rail-content {
    position: relative;
    z-index: 1;
    display: flex;
    width: min(100%, 470px);
    flex: 1 1 auto;
    flex-direction: column;
    justify-content: center;
    padding: 64px 0 96px;
}

.rail-kicker {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #7daee8;
    font-size: 0.6875rem;
    font-weight: 700;
}

.rail-kicker span {
    width: 28px;
    height: 2px;
    background: #2b8aeb;
}

.rail-content h1 {
    margin: 19px 0 14px;
    color: #fff;
    font-size: clamp(2.25rem, 4vw, 4.5rem);
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.08;
}

.rail-content > p {
    margin: 0;
    color: #8f9db0;
    font-size: 0.9375rem;
}

.workflow {
    display: grid;
    max-width: 400px;
    margin: 54px 0 0;
    padding: 0;
    gap: 10px;
    list-style: none;
}

.workflow-step {
    display: grid;
    min-height: 74px;
    align-items: center;
    padding: 14px 16px;
    grid-template-columns: 48px minmax(0, 1fr) 24px;
    border: 1px solid transparent;
    border-radius: 6px;
    color: #758297;
    transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.workflow-step.active {
    border-color: rgba(86, 153, 226, 0.26);
    color: #fff;
    background: rgba(255, 255, 255, 0.055);
}

.workflow-step.complete {
    color: #9ac7f4;
}

.workflow-index {
    font-family: var(--tblr-font-monospace);
    font-size: 0.6875rem;
}

.workflow-copy strong,
.workflow-copy small {
    display: block;
    letter-spacing: 0;
}

.workflow-copy strong {
    font-size: 0.875rem;
}

.workflow-copy small {
    margin-top: 3px;
    color: #6f7c8f;
    font-size: 0.6875rem;
}

.workflow-step.active .workflow-copy small {
    color: #a9b5c5;
}

.workflow-step > i {
    justify-self: end;
    font-size: 1rem;
}

.rail-footer {
    position: relative;
    z-index: 1;
    display: flex;
    min-height: 40px;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    color: #8f9bae;
    font-size: 0.6875rem;
}

.rail-footer span:first-child {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.rail-node {
    font-family: var(--tblr-font-monospace);
}

.portal-workspace {
    display: grid;
    min-width: 0;
    min-height: 100vh;
    grid-template-rows: 72px minmax(0, 1fr) 56px;
    background: var(--portal-canvas);
}

.workspace-header,
.workspace-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 clamp(28px, 5vw, 76px);
    border-color: var(--portal-line);
    color: var(--portal-muted);
    font-size: 0.75rem;
}

.workspace-header {
    border-bottom: 1px solid var(--portal-line);
    background: rgba(255, 255, 255, 0.75);
}

.workspace-footer {
    border-top: 1px solid var(--portal-line);
    font-size: 0.6875rem;
}

.workspace-label,
.workspace-session {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.workspace-label i {
    color: #066fd1;
}

.workspace-main {
    display: flex;
    min-height: 0;
    align-items: center;
    padding: 46px clamp(28px, 8vw, 118px);
}

.auth-stack {
    width: min(100%, 520px);
    margin: 0 auto;
    transition: width 180ms ease;
}

body[data-portal-state="generator"] .auth-stack {
    width: min(100%, 1050px);
}

body[data-portal-state="generator"] .workspace-main {
    align-items: flex-start;
    padding: 34px clamp(28px, 5vw, 72px) 46px;
}

body[data-portal-state="generator"] .auth-heading {
    margin-bottom: 20px;
}

.auth-heading {
    margin-bottom: 28px;
}

.auth-step-label {
    display: inline-block;
    margin-bottom: 13px;
    color: #066fd1;
    font-family: var(--tblr-font-monospace);
    font-size: 0.6875rem;
    font-weight: 700;
}

.auth-heading h2 {
    margin-bottom: 7px;
    color: #17202e;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.2;
}

.auth-heading p {
    margin: 0;
    color: var(--portal-muted);
}

.portal-card {
    overflow: hidden;
    border-color: var(--portal-line);
    border-radius: 8px;
    box-shadow: 0 18px 45px rgba(24, 36, 51, 0.09);
}

.portal-card .card-body {
    padding: 32px;
}

.portal-card .avatar {
    flex: 0 0 auto;
    font-size: 1.15rem;
}

.portal-card .card-title {
    font-size: 1rem;
    line-height: 1.35;
}

.form-title-row,
.generator-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 30px;
}

.generator-head {
    align-items: center;
    justify-content: space-between;
}

.portal-logout {
    display: inline-flex;
    min-width: 104px;
    min-height: 38px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-weight: 600;
}

.portal-logout i {
    font-size: 1rem;
}

.portal-input {
    min-height: 50px;
    overflow: hidden;
    border: 1px solid var(--tblr-border-color);
    border-radius: var(--tblr-border-radius);
    background: #fff;
}

.portal-input:focus-within {
    border-color: var(--tblr-primary);
    box-shadow: 0 0 0 0.25rem rgba(var(--tblr-primary-rgb), 0.12);
}

.portal-input:focus-within .form-control,
.portal-input:focus-within .input-group-text,
.portal-input:focus-within .portal-visibility-toggle {
    border-color: transparent;
    box-shadow: none;
}

.portal-input > .form-control,
.portal-input > .input-group-text {
    border: 0;
}

#card-key {
    min-width: 0;
    letter-spacing: 0;
}

.portal-visibility-toggle {
    display: grid;
    width: 50px;
    min-width: 50px;
    padding: 0;
    place-items: center;
    color: var(--portal-muted);
    border-radius: 0;
    background: transparent;
    cursor: pointer;
}

.portal-visibility-toggle:hover {
    color: var(--tblr-primary);
    background: #f3f6f9;
}

.portal-visibility-toggle:focus-visible {
    outline: 2px solid rgba(var(--tblr-primary-rgb), 0.45);
    outline-offset: -3px;
}

.portal-primary-action {
    display: flex;
    min-height: 50px;
    align-items: center;
    justify-content: space-between;
    padding-right: 18px;
    padding-left: 18px;
}

.portal-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 13px 32px;
    color: #7a8797;
    background: #fafbfc;
    font-family: var(--tblr-font-monospace);
    font-size: 0.625rem;
}

.portal-card-footer span:first-child {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

#login-message,
#copy-message,
#config-message {
    display: flex;
}

#login-message[hidden],
#copy-message[hidden],
#config-message[hidden] {
    display: none;
}

.btn .spinner-border {
    width: 1rem;
    height: 1rem;
    border-width: 2px;
}

.min-width-0 {
    min-width: 0;
}

.control-console {
    min-width: 0;
}

.console-toolbar {
    display: flex;
    min-height: 72px;
    align-items: center;
    justify-content: space-between;
    padding: 0 4px 18px;
    gap: 20px;
}

.console-profile,
.console-actions,
.console-profile-line,
.code-actions {
    display: flex;
    align-items: center;
}

.console-profile {
    min-width: 0;
    gap: 12px;
}

.console-profile-line {
    min-width: 0;
    gap: 8px;
}

.console-profile-line .font-monospace {
    max-width: 270px;
    font-size: 0.6875rem;
}

.console-profile h3 {
    margin: 3px 0 0;
    font-size: 1rem;
    letter-spacing: 0;
}

.console-actions {
    flex: 0 0 auto;
    gap: 8px;
}

.console-actions .btn {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.config-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-bottom: 1px solid var(--portal-line);
}

.config-tabs .nav-link {
    display: flex;
    min-height: 52px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0 0 -1px;
    padding: 12px 16px;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    color: #687588;
    background: transparent;
    font-size: 0.8125rem;
    font-weight: 600;
}

.config-tabs .nav-link:hover {
    color: #17202e;
    border-bottom-color: #a8c7e8;
}

.config-tabs .nav-link.active {
    color: #066fd1;
    border-bottom-color: #066fd1;
    background: #fff;
}

.config-tabs .nav-link i {
    font-size: 1.05rem;
}

.config-tab-content {
    overflow: hidden;
    border: 1px solid var(--portal-line);
    border-top: 0;
    border-radius: 0 0 8px 8px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(24, 36, 51, 0.07);
}

.config-message {
    margin: 0 0 16px;
}

.config-sections {
    display: grid;
    gap: 18px;
}

.config-section {
    padding: 28px 30px 30px;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.config-section-head {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 24px;
}

.config-section-head h4,
.config-section-head span {
    display: block;
    margin: 0;
    letter-spacing: 0;
}

.config-section-head h4 {
    color: var(--portal-ink);
    font-size: 0.9375rem;
    line-height: 1.35;
}

.config-section-head div > span {
    margin-top: 2px;
    color: #8995a6;
    font-family: var(--tblr-font-monospace);
    font-size: 0.5625rem;
}

.recoil-presets {
    margin-bottom: 26px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--portal-line);
}

.recoil-presets-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 10px;
    gap: 12px;
}

.recoil-presets-title strong {
    font-size: 0.75rem;
}

.recoil-presets-title span {
    color: #8995a6;
    font-family: var(--tblr-font-monospace);
    font-size: 0.5625rem;
}

.recoil-preset-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.recoil-preset {
    display: flex;
    min-width: 0;
    min-height: 58px;
    align-items: flex-start;
    justify-content: center;
    flex-direction: column;
    padding: 9px 12px;
    border-radius: 6px;
    text-align: left;
}

.recoil-preset strong,
.recoil-preset span {
    display: block;
    width: 100%;
    overflow: hidden;
    letter-spacing: 0;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recoil-preset strong {
    font-size: 0.75rem;
}

.recoil-preset span {
    margin-top: 4px;
    color: #7e8a9a;
    font-family: var(--tblr-font-monospace);
    font-size: 0.5625rem;
}

.recoil-preset.active span {
    color: inherit;
    opacity: 0.76;
}

.recoil-preset-off {
    color: #b4232f;
    border-color: #f0b8bd;
    background: #fff5f5;
}

.recoil-preset-off:hover,
.recoil-preset-off.active {
    color: #a61e29;
    border-color: #e89aa1;
    background: #ffe9eb;
}

.recoil-settings-group + .recoil-settings-group {
    margin-top: 26px;
    padding-top: 24px;
    border-top: 1px solid var(--portal-line);
}

.recoil-settings-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

.recoil-settings-head h4,
.recoil-settings-head span {
    display: block;
    margin: 0;
    letter-spacing: 0;
}

.recoil-settings-head h4 {
    color: var(--portal-ink);
    font-size: 0.8125rem;
    line-height: 1.35;
}

.recoil-settings-head div > span {
    margin-top: 2px;
    color: #8995a6;
    font-family: var(--tblr-font-monospace);
    font-size: 0.5625rem;
}

.recoil-disable-switch {
    color: var(--portal-ink);
    border-color: #f0b8bd;
    background: #fff5f5;
}

.recoil-disable-switch:has(.form-check-input:checked) {
    color: var(--portal-ink);
    border-color: #e89aa1;
    background: #ffe9eb;
}

.recoil-notice {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 24px 0 18px;
    color: #664d03;
    font-size: 0.75rem;
}

.recoil-notice strong {
    font-weight: 700;
}

.aimbot-toggle {
    color: #b4232f;
    border-color: #f0b8bd;
    background: #fff5f5;
}

.aimbot-toggle:has(.form-check-input:checked) {
    color: #a61e29;
    border-color: #e89aa1;
    background: #ffe9eb;
}

.config-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 28px;
}

.config-grid-spaced {
    margin-top: 24px;
    padding-top: 22px;
    border-top: 1px solid var(--portal-line);
}

.config-field {
    min-width: 0;
}

.config-field-wide {
    grid-column: 1 / -1;
}

.config-field .form-label {
    margin-bottom: 8px;
    font-size: 0.75rem;
    font-weight: 600;
}

.range-label,
.range-limits,
.color-input-group,
.config-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.range-label {
    gap: 16px;
}

.range-label output,
.color-input-group output {
    color: #066fd1;
    font-family: var(--tblr-font-monospace);
    font-size: 0.6875rem;
    font-weight: 700;
}

.config-field .form-range {
    display: block;
    width: 100%;
    margin: 2px 0 0;
}

.range-limits {
    margin-top: 1px;
    color: #8a96a6;
    font-family: var(--tblr-font-monospace);
    font-size: 0.5625rem;
}

.switch-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.config-switch {
    min-height: 42px;
    margin: 0;
    padding: 10px 12px 10px 46px;
    border: 1px solid var(--portal-line);
    border-radius: 6px;
    background: #f7f9fc;
    transition: border-color 150ms ease, background-color 150ms ease;
}

.config-switch:has(.form-check-input:checked) {
    border-color: #b9d7f3;
    background: #f1f7fd;
}

.config-switch .form-check-input {
    margin-left: -34px;
}

.config-switch .form-check-label {
    display: block;
    overflow: hidden;
    font-size: 0.75rem;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.info-switch-group {
    grid-column: auto;
}

.info-switch-heading {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 8px;
    color: var(--portal-ink);
    font-size: 0.75rem;
    font-weight: 700;
}

.info-switch-heading i {
    color: #066fd1;
    font-size: 1rem;
}

.info-switch-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.info-switch-option {
    min-width: 0;
    min-height: 40px;
    margin: 0;
    padding: 9px 10px 9px 44px;
    border: 1px solid var(--portal-line);
    border-radius: 5px;
    background: #fff;
}

.info-switch-option-with-color {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 7px;
    padding: 0 7px 0 44px;
}

.info-switch-option-with-color .info-switch-toggle {
    min-width: 0;
    flex: 1 1 auto;
    margin: 0;
    padding: 9px 0;
}

.info-switch-option:has(.form-check-input:checked) {
    border-color: #b9d7f3;
    background: #f1f7fd;
}

.config-switch-with-color {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 7px 0 46px;
    gap: 8px;
}

.config-switch-toggle {
    min-width: 0;
    flex: 1 1 auto;
    margin: 0;
    padding: 10px 0;
}

.inline-color-control {
    display: inline-flex;
    min-width: 66px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    color: #748195;
    font-size: 0.625rem;
    cursor: pointer;
}

.inline-color-control .form-control-color {
    width: 34px;
    min-width: 34px;
    height: 30px;
    padding: 3px;
    border-color: #cfd7e2;
    border-radius: 5px;
    cursor: pointer;
}

.inline-color-control:hover {
    color: #066fd1;
}

.color-input-group {
    min-height: 40px;
    justify-content: flex-start;
    gap: 12px;
}

.color-input-group .form-control-color {
    width: 46px;
    min-width: 46px;
    height: 36px;
    padding: 4px;
}

.config-actions {
    margin: 20px 0;
    padding: 16px 0 20px;
    gap: 18px;
    border-bottom: 1px solid var(--portal-line);
}

.config-actions .btn {
    min-width: 142px;
}

.config-actions > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.6875rem;
}

.generator-empty {
    display: grid;
    min-height: 112px;
    align-items: center;
    margin-top: 18px;
    padding: 18px 22px;
    grid-template-columns: 58px minmax(0, 1fr) auto;
    gap: 18px;
    border: 1px solid #dfe5ec;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 26px rgba(24, 36, 51, 0.05);
}

.generator-symbol {
    position: relative;
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    border: 1px solid rgba(var(--tblr-blue-rgb), 0.2);
    border-radius: 6px;
    color: #066fd1;
    background: #eaf3fb;
    font-size: 1.4rem;
}

.generator-symbol span {
    position: absolute;
    right: -4px;
    bottom: -4px;
    width: 12px;
    height: 12px;
    border: 2px solid #f8fafc;
    border-radius: 50%;
    background: #2fb344;
}

.generator-copy span,
.generator-copy strong {
    display: block;
    letter-spacing: 0;
}

.generator-copy span {
    margin-bottom: 5px;
    color: #7a8798;
    font-family: var(--tblr-font-monospace);
    font-size: 0.625rem;
}

.generator-copy strong {
    font-size: 0.9375rem;
}

.code-result {
    overflow: hidden;
    margin-top: 18px;
    border: 1px solid #1f2937;
    border-radius: 6px;
    background: #111827;
}

.code-toolbar {
    display: grid;
    height: 40px;
    align-items: center;
    padding: 0 14px;
    grid-template-columns: 1fr auto 1fr;
    color: #8090a6;
    border-bottom: 1px solid #253044;
    font-family: var(--tblr-font-monospace);
    font-size: 0.5625rem;
}

.code-window-dots {
    display: flex;
    gap: 5px;
}

.code-window-dots i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #48566b;
}

.code-window-dots i:first-child {
    background: #e25555;
}

.code-window-dots i:nth-child(2) {
    background: #d4a23c;
}

.code-window-dots i:last-child {
    background: #3fa55b;
}

.code-ready {
    display: inline-flex;
    align-items: center;
    justify-self: end;
    gap: 4px;
    color: #70c681;
}

.code-output,
.code-output:focus {
    min-height: 178px;
    resize: none;
    overflow-wrap: anywhere;
    color: #d8e1ed;
    border: 0;
    border-radius: 0;
    background: #111827;
    box-shadow: none;
    font-size: 0.75rem;
    line-height: 1.65;
}

.code-result .alert {
    margin-right: 14px;
    margin-left: 14px;
}

.generator-card > .card-footer {
    padding: 16px 32px;
    background: #fafbfc;
}

.code-actions {
    margin-top: 10px;
    gap: 8px;
}

.code-actions[hidden] {
    display: none;
}

.hotkey-modal-content {
    overflow: hidden;
    border-radius: 8px;
}

.hotkey-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-top: 1px solid var(--portal-line);
}

.hotkey-row {
    display: grid;
    min-width: 0;
    min-height: 64px;
    align-items: center;
    padding: 12px 16px;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 14px;
    border-bottom: 1px solid var(--portal-line);
}

.hotkey-row:nth-child(odd) {
    border-right: 1px solid var(--portal-line);
}

.hotkey-row kbd {
    display: inline-grid;
    width: 48px;
    height: 32px;
    place-items: center;
    color: #17202e;
    border: 1px solid #cfd7e2;
    border-bottom-width: 3px;
    border-radius: 5px;
    background: #f7f9fc;
    box-shadow: none;
    font-family: var(--tblr-font-monospace);
    font-size: 0.75rem;
}

.hotkey-row strong {
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 0.8125rem;
    letter-spacing: 0;
}

@media (max-width: 991.98px) {
    .portal-shell {
        grid-template-columns: 250px minmax(0, 1fr);
    }

    .portal-rail {
        padding-right: 26px;
        padding-left: 26px;
    }

    .rail-content h1 {
        font-size: 2.35rem;
    }

    .workflow-step {
        grid-template-columns: 40px minmax(0, 1fr) 18px;
    }

    .workspace-main {
        padding-right: 36px;
        padding-left: 36px;
    }

    body[data-portal-state="generator"] .portal-shell {
        grid-template-columns: 240px minmax(0, 1fr);
    }

    body[data-portal-state="generator"] .portal-rail {
        padding-right: 24px;
        padding-left: 24px;
    }

    body[data-portal-state="generator"] .workspace-main {
        padding-right: 32px;
        padding-left: 32px;
    }

    .recoil-preset-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .portal-shell {
        display: block;
    }

    .portal-rail {
        display: block;
        min-height: auto;
        padding: 18px 20px 22px;
    }

    body[data-portal-state="generator"] .portal-rail {
        position: relative;
        top: auto;
        height: auto;
    }

    body[data-portal-state="generator"] .workspace-main {
        padding: 26px 16px 36px;
    }

    .portal-rail::before,
    .portal-rail::after,
    .rail-content > p,
    .rail-footer {
        display: none;
    }

    .rail-brand-mark {
        width: 44px;
        height: 44px;
        flex-basis: 44px;
    }

    .rail-content {
        display: block;
        width: 100%;
        padding: 26px 0 0;
    }

    .rail-kicker {
        display: none;
    }

    .rail-content h1 {
        margin: 0;
        font-size: 1.4rem;
        line-height: 1.2;
    }

    .rail-content h1 br {
        display: none;
    }

    .workflow {
        display: grid;
        max-width: none;
        margin-top: 20px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .workflow-step {
        min-height: 56px;
        padding: 9px 10px;
        grid-template-columns: 32px minmax(0, 1fr);
    }

    .workflow-step > i,
    .workflow-copy small {
        display: none;
    }

    .workflow-copy strong {
        font-size: 0.75rem;
    }

    .portal-workspace {
        min-height: calc(100vh - 190px);
        grid-template-rows: 50px minmax(0, 1fr) 44px;
    }

    .workspace-header,
    .workspace-footer {
        padding-right: 20px;
        padding-left: 20px;
    }

    .workspace-main {
        align-items: flex-start;
        padding: 28px 16px 36px;
    }

    .auth-stack {
        max-width: 980px;
    }

    .auth-heading {
        margin-bottom: 20px;
    }

    .auth-step-label {
        margin-bottom: 8px;
    }

    .auth-heading h2 {
        font-size: 1.5rem;
    }

    .portal-card .card-body {
        padding: 22px;
    }

    .form-title-row,
    .generator-head {
        margin-bottom: 24px;
    }

    .portal-logout {
        min-width: 92px;
        padding-right: 10px;
        padding-left: 10px;
        font-size: 0.75rem;
    }

    .console-toolbar {
        align-items: stretch;
        flex-direction: column;
        padding-bottom: 14px;
        gap: 14px;
    }

    .console-actions {
        width: 100%;
    }

    .console-actions .btn {
        flex: 1 1 0;
    }

    .config-section {
        padding: 24px;
    }

    .portal-card-footer,
    .generator-card > .card-footer {
        padding-right: 22px;
        padding-left: 22px;
    }

    .generator-empty {
        min-height: 0;
        padding: 20px;
        grid-template-columns: 48px minmax(0, 1fr);
    }

    .generator-empty .btn {
        grid-column: 1 / -1;
    }

    .generator-symbol {
        width: 46px;
        height: 46px;
    }

    .switch-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 399.98px) {
    .portal-rail {
        padding-right: 16px;
        padding-left: 16px;
    }

    .rail-brand-copy strong {
        max-width: 190px;
    }

    .workspace-header,
    .workspace-footer {
        padding-right: 16px;
        padding-left: 16px;
    }

    .portal-card .card-body {
        padding: 18px;
    }

    .portal-card-footer,
    .generator-card > .card-footer {
        padding-right: 18px;
        padding-left: 18px;
    }

    .config-section {
        padding: 20px 18px 22px;
    }

    .config-grid,
    .switch-grid,
    .info-switch-options {
        grid-template-columns: 1fr;
    }

    .config-field-wide {
        grid-column: auto;
    }

    .config-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .config-actions .btn {
        width: 100%;
    }

    .config-tabs .nav-link {
        min-height: 48px;
        padding: 10px 6px;
        gap: 5px;
        font-size: 0.75rem;
    }

    .hotkey-list {
        grid-template-columns: 1fr;
    }

    .hotkey-row:nth-child(odd) {
        border-right: 0;
    }

    .workspace-session span,
    .workspace-footer span:last-child {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .status-dot-animated::before {
        animation: none;
    }
}
