/* Questy Field Manual: original shared language for the Player's Handbook role.
   This is deliberately independent of the retired Tron presentation. */
:root {
    color-scheme: light;
    --questy-night: #111a27;
    --questy-ink: #172332;
    --questy-ink-soft: #425162;
    --questy-paper: #f5eddc;
    --questy-paper-bright: #fffaf0;
    --questy-paper-deep: #e8d7b9;
    --questy-brass: #b8843c;
    --questy-brass-bright: #e2bf78;
    --questy-oxblood: #6d2932;
    --questy-forest: #28554a;
    --questy-link: #744229;
    --questy-focus: #1c6b83;
    --questy-shadow: 0 18px 38px rgba(17, 26, 39, 0.18);
    --questy-ring: 0 0 0 3px rgba(28, 107, 131, 0.32), 0 0 0 5px rgba(255, 250, 240, 0.9);
    --paper: var(--questy-paper);
    --paper-soft: var(--questy-paper-bright);
    --paper-warm: var(--questy-paper-deep);
    --ink: var(--questy-ink);
    --ink-muted: var(--questy-ink-soft);
    --leather: var(--questy-night);
    --leather-soft: #23364a;
    --brass: var(--questy-brass);
    --brass-dark: var(--questy-link);
    --green: var(--questy-forest);
    --shadow: var(--questy-shadow);
    --ring: var(--questy-ring);
}

html,
body {
    min-height: 100%;
    background: var(--questy-night);
    color: var(--ink);
    font-family: Georgia, "Times New Roman", serif;
}

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

.app-container {
    display: flex;
    min-height: 100vh;
    background:
        linear-gradient(90deg, rgba(226, 191, 120, 0.13) 1px, transparent 1px) 0 0 / 24px 24px,
        linear-gradient(0deg, rgba(226, 191, 120, 0.09) 1px, transparent 1px) 0 0 / 24px 24px,
        var(--questy-night);
}

.questy-shell[data-theme="content-first"] {
    --questy-shadow: none;
    --shadow: none;
    background: var(--questy-night);
}

.questy-shell[data-theme="content-first"] .sidebar {
    background: var(--questy-night);
    box-shadow: none;
}

.questy-shell[data-theme="content-first"] .main-content {
    background: var(--questy-paper-bright);
}

.questy-shell[data-theme="content-first"] .questy-masthead-mark,
.questy-shell[data-theme="content-first"] .questy-card,
.questy-shell[data-theme="content-first"] .questy-btn,
.questy-shell[data-theme="content-first"] .questy-tab {
    box-shadow: none;
}

.questy-shell[data-theme="content-first"] .questy-card::before,
.questy-shell[data-theme="content-first"] .questy-page-plaque {
    display: none;
}

.questy-shell[data-theme="content-first"] .nav-links a:hover,
.questy-shell[data-theme="content-first"] .nav-links a.active {
    background: rgba(184, 132, 60, 0.22);
}

.sidebar {
    width: 17.5rem;
    flex-shrink: 0;
    background:
        linear-gradient(135deg, rgba(226, 191, 120, 0.12) 0 7px, transparent 7px) top left / 100% 100% no-repeat,
        linear-gradient(180deg, #162433, #0c1420);
    border-right: 2px solid var(--questy-brass);
    box-shadow: 8px 0 0 rgba(0, 0, 0, 0.12);
}

.app-title {
    padding: 1.5rem 1.25rem 1.1rem;
    border-bottom: 1px solid rgba(226, 191, 120, 0.34);
}

.questy-masthead {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    color: var(--questy-paper-bright);
    text-decoration: none;
}

.questy-masthead-mark {
    display: grid;
    width: 2.75rem;
    aspect-ratio: 1;
    place-items: center;
    color: var(--questy-brass-bright);
    background: rgba(12, 20, 32, 0.72);
    border: 1px solid var(--questy-brass);
    box-shadow: inset 0 0 0 3px rgba(226, 191, 120, 0.12);
    font-size: 1.45rem;
}

.questy-kicker,
.questy-wordmark {
    display: block;
}

.questy-kicker {
    color: var(--questy-brass-bright);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.63rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.questy-wordmark {
    margin: 0;
    color: var(--questy-paper-bright);
    font-size: 1.48rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.questy-motto {
    margin: 0.9rem 0 0;
    color: rgba(255, 250, 240, 0.74);
    font-size: 0.86rem;
    font-style: italic;
}

.app-auth {
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid rgba(226, 191, 120, 0.24);
}

.app-auth .auth-buttons {
    align-items: center;
    margin-top: 0;
}

.app-auth .user-name {
    color: rgba(255, 250, 240, 0.76);
    font-size: 0.95rem;
}

.main-content {
    flex: 1;
    min-width: 0;
    padding: clamp(1.35rem, 3vw, 3.25rem);
    overflow: auto;
    background:
        radial-gradient(circle at 88% 2%, rgba(184, 132, 60, 0.2), transparent 26rem),
        linear-gradient(105deg, rgba(255, 250, 240, 0.95), rgba(232, 215, 185, 0.96)),
        var(--questy-paper);
}

.nav-menu {
    padding: 1.2rem 0.9rem 2rem;
}

.nav-section {
    margin-bottom: 1.15rem;
}

.nav-section-title {
    margin: 0 0 0.55rem;
    padding: 0 0.65rem 0.45rem;
    border-bottom: 1px solid rgba(226, 191, 120, 0.42);
    color: var(--questy-brass-bright);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.67rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-links li {
    margin: 0.22rem 0;
}

.nav-links a {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.58rem 0.7rem;
    color: rgba(255, 250, 240, 0.86);
    text-decoration: none;
    border: 1px solid transparent;
    border-left: 3px solid transparent;
    transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--questy-paper-bright);
    background: linear-gradient(90deg, rgba(184, 132, 60, 0.3), transparent);
    border-color: var(--questy-brass-bright);
}

/* Section identity glyphs (issue #119): each nav/home entry carries an
   original mark tinted by its section's semantic accent token. */
.questy-icon {
    width: 1.1em;
    height: 1.1em;
    flex-shrink: 0;
}

.questy-accent-forest { color: var(--questy-forest); }
.questy-accent-oxblood { color: var(--questy-oxblood); }
.questy-accent-brass { color: var(--questy-brass-bright); }
.questy-accent-focus { color: var(--questy-focus); }
.questy-accent-craft { color: var(--questy-link); }

.questy-list-item > .questy-icon {
    margin-top: 0.2rem;
}

.questy-page {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 1rem 1.5rem;
}

.questy-page-title {
    margin: 0 0 0.35rem;
    color: var(--ink);
    font-size: clamp(2rem, 4vw, 3.35rem);
    line-height: 1.08;
    letter-spacing: -0.035em;
}

.questy-page-plaque {
    width: 4.5rem;
    height: 0.35rem;
    margin-bottom: 0.9rem;
    background: var(--questy-oxblood);
    box-shadow: 0.7rem 0 0 var(--questy-brass);
}

.questy-page-subtitle {
    max-width: 68ch;
    margin: 0 0 1.5rem;
    color: var(--ink-muted);
    font-size: 1.08rem;
    line-height: 1.55;
}

.questy-card {
    position: relative;
    margin-bottom: 1rem;
    padding: clamp(1.1rem, 2.4vw, 1.65rem);
    color: var(--ink);
    background: var(--questy-paper-bright);
    border: 1px solid rgba(23, 35, 50, 0.26);
    border-radius: 0;
    box-shadow: var(--shadow);
}

.questy-card::before {
    content: "";
    position: absolute;
    inset: 0.38rem;
    border: 1px solid rgba(184, 132, 60, 0.34);
    border-radius: 0;
    pointer-events: none;
}

.questy-card h2,
.questy-card h3 {
    margin-top: 0;
    color: var(--questy-ink);
    letter-spacing: -0.02em;
}

.questy-card p {
    color: var(--ink-muted);
}

.questy-section-title {
    margin: 1.5rem 0 0.75rem;
    padding-bottom: 0.45rem;
    border-bottom: 2px solid var(--questy-brass);
    color: var(--questy-ink);
    font-size: 1.08rem;
    font-weight: 700;
}

.questy-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.questy-list-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin: 0.35rem 0;
    padding: 0.72rem 0.9rem;
    color: var(--ink);
    background: rgba(245, 237, 220, 0.76);
    border: 1px solid rgba(23, 35, 50, 0.16);
    border-left: 3px solid rgba(184, 132, 60, 0.46);
    border-radius: 0;
    transition: background-color 0.16s ease, border-color 0.16s ease;
}

.questy-list-item:hover {
    background: #fffdf7;
    border-color: var(--questy-brass);
}

.questy-btn,
.questy-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.55rem;
    padding: 0.52rem 0.95rem;
    color: var(--questy-paper-bright);
    background: var(--questy-ink);
    border: 1px solid var(--questy-ink);
    border-radius: 0;
    box-shadow: 3px 3px 0 var(--questy-brass);
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.12s ease, background-color 0.16s ease, box-shadow 0.16s ease;
}

.questy-btn:hover,
.questy-tab:hover {
    color: var(--questy-paper-bright);
    background: var(--questy-forest);
    box-shadow: 4px 4px 0 var(--questy-brass-bright);
    transform: translate(-1px, -1px);
}

.questy-btn-primary {
    background: var(--questy-oxblood);
    border-color: var(--questy-oxblood);
}

.questy-btn-quiet {
    color: var(--questy-ink);
    background: transparent;
    border-color: var(--questy-ink);
    box-shadow: 3px 3px 0 rgba(23, 35, 50, 0.2);
}

.questy-btn-danger {
    color: var(--questy-oxblood);
    background: var(--questy-paper-bright);
    border: 2px solid var(--questy-oxblood);
    box-shadow: 3px 3px 0 var(--questy-oxblood);
    font-weight: 700;
}

.questy-btn-danger:hover {
    color: var(--questy-paper-bright);
    background: var(--questy-oxblood);
    box-shadow: 4px 4px 0 var(--questy-ink);
}

.questy-btn:focus-visible,
.questy-tab:focus-visible,
.questy-input:focus-visible,
.questy-link:focus-visible {
    outline: none;
    box-shadow: var(--ring);
}

.questy-btn:disabled,
.questy-tab:disabled {
    cursor: not-allowed;
    opacity: 0.58;
    transform: none;
}

.questy-btn-group {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.questy-toolbar {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    margin-bottom: 0.9rem;
}

.questy-toolbar .questy-input {
    margin-bottom: 0;
}

.questy-list-row {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: center;
}

.questy-link {
    color: var(--questy-link);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
}

.questy-link:hover {
    color: var(--questy-forest);
}

.questy-link-button {
    max-width: 100%;
    padding: 0;
    color: var(--brass-dark);
    background: none;
    border: 0;
    cursor: pointer;
    text-align: left;
}

.questy-input {
    width: 100%;
    max-width: 32rem;
    min-width: 15rem;
    margin-bottom: 1rem;
    padding: 0.55rem 0.7rem;
    color: var(--ink);
    background: #fffaf0;
    border: 1px solid rgba(122, 80, 34, 0.32);
    border-radius: 0.45rem;
}

.questy-input::placeholder {
    color: #756249;
}

.questy-input:focus {
    outline: none;
    border-color: var(--brass);
    box-shadow: var(--ring);
}

.questy-spell-item {
    cursor: pointer;
}

.questy-list-action {
    display: block;
    width: 100%;
    font: inherit;
    text-align: left;
}

.questy-spell-meta,
.questy-loading,
.questy-craft-row label {
    color: var(--ink-muted);
}

.questy-loading {
    font-style: italic;
}

.questy-empty-state {
    padding: 1rem;
    color: var(--ink-muted);
    background: rgba(255, 248, 234, 0.58);
    border: 1px dashed rgba(122, 80, 34, 0.26);
    border-radius: 0.45rem;
}

.questy-empty-state h3 {
    margin: 0 0 0.35rem;
    color: var(--leather);
    font-size: 1.05rem;
}

.questy-empty-state p {
    margin: 0;
}

.questy-empty-state .questy-btn {
    margin-top: 0.85rem;
}

.questy-empty-state-compact {
    padding: 0.85rem;
}

.questy-empty-state-spaced {
    margin-top: 1rem;
}

.questy-advanced-details {
    margin-top: 0.85rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(122, 80, 34, 0.18);
}

.questy-advanced-details summary {
    color: var(--brass-dark);
    cursor: pointer;
    font-weight: 700;
}

.questy-form-intro {
    max-width: 58ch;
}

.questy-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid rgba(122, 80, 34, 0.22);
}

.questy-tab {
    color: var(--leather);
    background: #eadfca;
    box-shadow: none;
}

.questy-tab:hover,
.questy-tab-active,
.questy-editor-tab-active {
    color: #fff8ea;
    background: linear-gradient(180deg, var(--green), #24381f);
}

.questy-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(29, 23, 17, 0.72);
}

.questy-modal {
    width: min(100%, 760px);
    max-width: 760px;
    max-height: 85vh;
    overflow-y: auto;
}

.questy-modal[role="dialog"]:focus-visible {
    outline: none;
    box-shadow: var(--questy-ring), var(--questy-shadow);
}

.questy-modal-header,
.questy-editor-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

.questy-modal-header h2 {
    flex: 1;
    margin: 0;
}

.questy-btn-close {
    padding: 0.25rem 0.5rem;
    font-size: 1.5rem;
    line-height: 1;
}

.questy-spell-detail p,
.questy-spell-detail dl {
    margin: 0.5rem 0;
}

.questy-spell-section {
    padding: 1rem;
    border: 1px solid rgba(23, 35, 50, 0.2);
    border-left: 4px solid var(--questy-brass);
}

.questy-spell-section + .questy-spell-section {
    margin-top: 1rem;
}

.questy-spell-section h3,
.questy-spell-section h4 {
    margin: 0 0 0.75rem;
}

.questy-spell-summary {
    background: rgba(232, 215, 185, 0.4);
}

.questy-spell-reference {
    background: var(--questy-paper-bright);
    border-left-color: var(--questy-ink);
}

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

.questy-definition-grid > div {
    padding: 0.6rem 0.7rem;
    background: rgba(255, 250, 240, 0.72);
    border: 1px solid rgba(23, 35, 50, 0.16);
}

.questy-definition-grid dt {
    color: var(--questy-ink);
    font-weight: 700;
}

.questy-definition-grid dd {
    margin: 0.2rem 0 0;
    color: var(--questy-ink-soft);
}

.questy-definition-grid-reference {
    grid-template-columns: 1fr;
}

.questy-spell-guidance {
    padding-top: 0.65rem;
    border-top: 1px solid rgba(23, 35, 50, 0.18);
}

.questy-spell-description,
.questy-craft-results {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(122, 80, 34, 0.22);
}

.questy-editor-summary {
    margin-bottom: 0;
}

.questy-editor-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.questy-editor-panel {
    padding-top: 0.25rem;
}

.questy-editor-action-area {
    min-width: min(100%, 26rem);
}

.questy-action-feedback {
    margin: 0.65rem 0 0;
    padding: 0.55rem 0.7rem;
    color: var(--questy-ink) !important;
    background: rgba(40, 85, 74, 0.1);
    border: 1px solid rgba(40, 85, 74, 0.45);
    border-left: 4px solid var(--questy-forest);
    font-weight: 700;
}

.questy-action-stack {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    align-items: flex-end;
}

.questy-action-stack .questy-action-feedback {
    max-width: 28rem;
    margin: 0;
}

.questy-workspace-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr);
    gap: 1rem;
    align-items: start;
}

.questy-detail-card {
    margin: 0;
}

.questy-home-hero {
    max-width: 100%;
    overflow: hidden;
    background:
        linear-gradient(115deg, rgba(109, 41, 50, 0.1), transparent 50%),
        var(--questy-paper-bright);
}

.questy-eyebrow {
    margin: 0 0 0.45rem;
    color: var(--questy-oxblood) !important;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.questy-beta-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.questy-beta-grid div {
    padding: 0.8rem;
    background: rgba(23, 35, 50, 0.06);
    border: 1px solid rgba(23, 35, 50, 0.18);
    border-top: 3px solid var(--questy-brass);
    border-radius: 0;
}

.questy-beta-grid strong,
.questy-beta-grid span {
    display: block;
}

.questy-beta-grid strong {
    margin-bottom: 0.25rem;
    color: var(--questy-ink);
}

.questy-beta-grid span {
    color: var(--ink-muted);
}

.questy-home-links .questy-list-item {
    display: flex;
    gap: 0.5rem;
    align-items: baseline;
    flex-wrap: wrap;
}

.questy-home-links .questy-link {
    white-space: nowrap;
}

.questy-home-actions {
    margin-top: 1rem;
}

.beta-welcome-backdrop {
    position: fixed;
    inset: 0;
    z-index: 950;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(29, 23, 17, 0.72);
    backdrop-filter: blur(3px);
}

.beta-welcome-panel {
    width: min(100%, 64rem);
    max-height: min(100%, 92vh);
    overflow: auto;
    box-shadow: 0 28px 60px rgba(0, 0, 0, 0.34);
}

.beta-welcome-header {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.beta-welcome-eyebrow {
    margin: 0 0 0.15rem;
    color: var(--brass-dark);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.beta-welcome-version {
    display: inline-flex;
    align-items: center;
    min-height: 2rem;
    padding: 0.2rem 0.6rem;
    color: var(--leather);
    background: rgba(184, 138, 66, 0.18);
    border: 1px solid rgba(122, 80, 34, 0.22);
    border-radius: 999px;
    font-size: 0.9rem;
    white-space: nowrap;
}

.beta-welcome-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.beta-welcome-grid h3 {
    margin-bottom: 0.75rem;
}

.beta-welcome-list {
    margin: 0;
}

.beta-welcome-list .questy-list-item {
    margin: 0.35rem 0;
}

.beta-welcome-actions {
    margin-top: 1rem;
}

.questy-craft-row {
    margin-bottom: 1rem;
}

.questy-craft-row label {
    display: block;
    margin-bottom: 0.25rem;
}

.questy-craft-row select.questy-input {
    max-width: 220px;
}

.questy-craft-results p {
    margin: 0.5rem 0;
}

.questy-combat-placeholder {
    margin-top: 1rem;
}

#components-reconnect-modal {
    width: 20rem;
    margin: 20vh auto;
    padding: 2rem;
    color: var(--ink);
    background: var(--paper-soft);
    border: 1px solid rgba(122, 80, 34, 0.28);
    border-radius: 0.85rem;
    box-shadow: var(--shadow);
    opacity: 0;
    transition: display 0.5s allow-discrete, overlay 0.5s allow-discrete;
    animation: components-reconnect-modal-fadeOutOpacity 0.5s both;
}

#components-reconnect-modal[open] {
    animation: components-reconnect-modal-slideUp 0.45s ease-out 0.1s, components-reconnect-modal-fadeInOpacity 0.3s ease-in-out 0.1s;
    animation-fill-mode: both;
}

#components-reconnect-modal::backdrop {
    background-color: rgba(29, 23, 17, 0.72);
    animation: components-reconnect-modal-fadeInOpacity 0.3s ease-in-out;
    opacity: 1;
}

#components-reconnect-modal p {
    margin: 0;
    text-align: center;
}

#components-reconnect-modal button {
    padding: 4px 24px;
    color: #fff8ea;
    background: var(--leather);
    border: 1px solid rgba(122, 80, 34, 0.45);
    border-radius: 0.45rem;
}

.components-reconnect-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.components-reconnect-first-attempt-visible,
.components-reconnect-repeated-attempt-visible,
.components-reconnect-failed-visible,
.components-pause-visible,
.components-resume-failed-visible,
.components-rejoining-animation {
    display: none;
}

#components-reconnect-modal.components-reconnect-show .components-reconnect-first-attempt-visible,
#components-reconnect-modal.components-reconnect-show .components-rejoining-animation,
#components-reconnect-modal.components-reconnect-paused .components-pause-visible,
#components-reconnect-modal.components-reconnect-resume-failed .components-resume-failed-visible,
#components-reconnect-modal.components-reconnect-retrying,
#components-reconnect-modal.components-reconnect-retrying .components-reconnect-repeated-attempt-visible,
#components-reconnect-modal.components-reconnect-retrying .components-rejoining-animation,
#components-reconnect-modal.components-reconnect-failed,
#components-reconnect-modal.components-reconnect-failed .components-reconnect-failed-visible {
    display: block;
}

.components-rejoining-animation {
    position: relative;
    width: 80px;
    height: 80px;
}

.components-rejoining-animation div {
    position: absolute;
    border: 3px solid var(--brass);
    opacity: 1;
    border-radius: 50%;
    animation: components-rejoining-animation 1.5s cubic-bezier(0, 0.2, 0.8, 1) infinite;
}

.components-rejoining-animation div:nth-child(2) {
    animation-delay: -0.5s;
}

#blazor-error-ui {
    color-scheme: light;
    display: none;
    position: fixed;
    z-index: 1000;
    right: 1rem;
    bottom: 1rem;
    left: 1rem;
    box-sizing: border-box;
    padding: 0.7rem 1.25rem;
    color: #fff8ea;
    background: var(--leather);
    border: 1px solid var(--brass);
    border-radius: 0.65rem;
    box-shadow: var(--shadow);
}

#blazor-error-ui .dismiss {
    position: absolute;
    top: 0.5rem;
    right: 0.75rem;
    cursor: pointer;
}

@keyframes components-reconnect-modal-slideUp {
    0% {
        transform: translateY(20px) scale(0.98);
    }

    100% {
        transform: translateY(0);
    }
}

@keyframes components-reconnect-modal-fadeInOpacity {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

@keyframes components-reconnect-modal-fadeOutOpacity {
    0% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

@keyframes components-rejoining-animation {
    0% {
        top: 40px;
        left: 40px;
        width: 0;
        height: 0;
        opacity: 0;
    }

    5% {
        opacity: 1;
    }

    100% {
        top: 0;
        left: 0;
        width: 80px;
        height: 80px;
        opacity: 0;
    }
}

@media (max-width: 900px) {
    .app-container {
        flex-direction: column;
    }

    .sidebar {
        border-right: 0;
        border-bottom: 1px solid rgba(234, 223, 202, 0.18);
    }

    .main-content {
        padding: 1.2rem;
    }

    .questy-page {
        padding-left: 0;
        padding-right: 0;
    }

    .questy-workspace-grid {
        grid-template-columns: 1fr;
    }

    .questy-btn-group {
        flex-wrap: wrap;
    }

    .questy-toolbar {
        flex-direction: column;
    }

    .questy-toolbar .questy-btn,
    .questy-toolbar .questy-input {
        width: 100%;
    }

    .questy-beta-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .questy-card {
        padding: 1rem;
    }

    .questy-page-title {
        font-size: 1.55rem;
    }

    .questy-editor-header {
        flex-direction: column;
    }

    .questy-editor-actions,
    .questy-editor-panel-actions {
        width: 100%;
    }

    .questy-editor-actions .questy-btn,
    .questy-editor-panel-actions .questy-btn {
        flex: 1 1 100%;
    }

    .questy-editor-action-area,
    .questy-action-stack,
    .questy-action-stack .questy-action-feedback {
        width: 100%;
        max-width: none;
        align-items: stretch;
    }

    .questy-definition-grid {
        grid-template-columns: 1fr;
    }

    .questy-input {
        max-width: 100%;
        min-width: 0;
    }

    .questy-list-item {
        padding: 0.65rem 0.75rem;
    }

    .questy-list-row {
        align-items: stretch;
        flex-direction: column;
    }

    .questy-list-row .questy-btn-group,
    .questy-list-row .questy-btn {
        width: 100%;
    }
}

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