@font-face {
    font-family: "Roboto Condensed";
    src: url("./assets/fonts/roboto-condensed/RobotoCondensed-Variable.ttf") format("truetype");
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
}

:root {
    color-scheme: only light;
    --rx36-game-font-family: "Roboto Condensed", "Noto Sans JP", sans-serif;
}

*,
*::before,
*::after {
    forced-color-adjust: none !important;
    -ms-high-contrast-adjust: none !important;
}

@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: only light;
        background-color: #000000 !important;
    }
}

html,
body {
    margin: 0;
    padding: 0;
    color: #1f2937;
    background-color: #000000;
    color-scheme: only light;
    forced-color-adjust: none;
    -ms-high-contrast-adjust: none;
}

#app {
    width: 100%;
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #000000;
    color-scheme: only light;
    forced-color-adjust: none;
    -ms-high-contrast-adjust: none;
}

#game-container,
[data-rx36-english-game-mount] {
    position: relative;
    background-color: #000000;
    color-scheme: only light;
    font-family: var(--rx36-game-font-family);
    font-weight: 500;
    forced-color-adjust: none;
    -ms-high-contrast-adjust: none;
    filter: none !important;
    opacity: 1 !important;
    mix-blend-mode: normal !important;
    isolation: isolate;
}

#game-container:fullscreen,
#game-container:-webkit-full-screen,
#game-container.rx36-iframe-fullscreen-fallback {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100dvh;
    max-width: none;
    max-height: none;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #000000;
    z-index: 2147483647;
    overflow: hidden;
    box-sizing: border-box;
}

#game-container:fullscreen canvas,
#game-container:-webkit-full-screen canvas,
#game-container.rx36-iframe-fullscreen-fallback canvas {
    position: static !important;
    left: auto !important;
    top: auto !important;
    margin: 0 !important;
    transform: none !important;
    flex: 0 0 auto;
    max-width: 100vw;
    max-height: 100dvh;
}

#game-container canvas,
[data-rx36-english-game-mount] canvas,
canvas {
    color-scheme: only light;
    forced-color-adjust: none;
    -ms-high-contrast-adjust: none;
    filter: none !important;
    opacity: 1 !important;
    mix-blend-mode: normal !important;
}

.rx36-game-start-screen {
    position: relative;
    width: min(384px, 100vw, calc(100dvh / 2));
    max-width: 100%;
    aspect-ratio: 1 / 2;
    margin: auto;
    overflow: hidden;
    color: #ffffff;
    background: #000000;
    font-family: var(--rx36-game-font-family);
}

.rx36-game-start-screen__panel {
    position: absolute;
    inset: 0;
    background-image: url("./assets/ui/title/top-page-design.png");
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.rx36-game-start-screen__button {
    position: absolute;
    left: 50%;
    top: 75%;
    width: 180px;
    height: 40px;
    padding: 0 16px;
    border: 2px solid #f0fdfa;
    border-radius: 0;
    color: #ffffff;
    background: #0f766e;
    box-shadow: 0 4px 0 #134e4a;
    font: 700 18px/1 var(--rx36-game-font-family);
    letter-spacing: 0.08em;
    transform: translate(-50%, -50%);
    cursor: pointer;
}

.rx36-game-start-screen__button:hover:not(:disabled) {
    background: #0d9488;
}

.rx36-game-start-screen__button:focus-visible {
    outline: 3px solid #fef08a;
    outline-offset: 4px;
}

.rx36-game-start-screen__button:active:not(:disabled) {
    box-shadow: 0 2px 0 #134e4a;
    transform: translate(-50%, calc(-50% + 2px));
}

.rx36-game-start-screen__button:disabled {
    cursor: wait;
    opacity: 0.82;
}

.rx36-game-start-screen__status {
    position: absolute;
    left: 50%;
    top: calc(75% + 30px);
    width: min(280px, calc(100% - 32px));
    margin: 0;
    color: #fef3c7;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
    text-shadow: 0 1px 2px #000000;
    transform: translateX(-50%);
}

body.rx36-multi-tab-blocked #app {
    pointer-events: none;
}

body.rx36-multi-tab-blocked .training-dialog-overlay {
    pointer-events: none !important;
}

body.rx36-multi-tab-blocked .guide-dialog-overlay {
    pointer-events: none !important;
}

body.rx36-multi-tab-blocked .guide-dialog-backdrop {
    pointer-events: none !important;
}

body.rx36-multi-tab-blocked .guide-dialog-backdrop__button {
    pointer-events: none !important;
    opacity: 0.45 !important;
    cursor: default !important;
}

body.rx36-multi-tab-blocked .office-receptionist-dialog,
body.rx36-multi-tab-blocked .office-style-dialog {
    pointer-events: none !important;
}

.npc-recording-indicator {
    position: absolute;
    z-index: 30;
    display: none;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    color-scheme: only light;
    forced-color-adjust: none;
    -ms-high-contrast-adjust: none;
}

.npc-recording-indicator--visible {
    display: flex;
}

.npc-recording-indicator__glow {
    position: absolute;
    inset: -3px;
    border-radius: 999px;
    background: transparent;
    box-shadow: none;
    opacity: 0;
    transform: scale(0.92);
    transition: opacity 120ms ease, transform 120ms ease, box-shadow 120ms ease;
}

.npc-recording-indicator__image {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(47, 36, 23, 0.28));
    user-select: none;
    -webkit-user-select: none;
}

.npc-recording-indicator--recording .npc-recording-indicator__glow {
    background: rgba(255, 255, 255, 0.34);
    box-shadow: 0 0 0 3px rgba(255, 251, 235, 0.94), 0 0 34px rgba(255, 255, 255, 0.86);
    animation: npc-recording-glow-pulse 980ms ease-in-out infinite;
}

.npc-recording-indicator--recording .npc-recording-indicator__image {
    animation: npc-recording-icon-pulse 980ms ease-in-out infinite;
}

.npc-recording-indicator--guide {
    z-index: 5;
}

.npc-recording-indicator--office,
.npc-recording-indicator--interview {
    z-index: 21;
}

body.rx36-multi-tab-blocked .conf-file-list-overlay {
    pointer-events: none !important;
}

.rx36-conf-scene-active .training-dialog-overlay,
.rx36-conf-scene-active .job-interview-dialog-overlay,
.rx36-conf-scene-active .erc-result-dialog-overlay,
.rx36-conf-scene-active .office-style-dialog,
.rx36-conf-scene-active .guide-dialog-overlay,
.rx36-conf-scene-active .guide-dialog-backdrop,
.rx36-conf-scene-active .office-receptionist-dialog {
    visibility: hidden !important;
    pointer-events: none !important;
}

.rx36-conf-scene-active .free-trial-ended-backdrop,
.rx36-conf-scene-active .office-style-dialog.free-trial-ended-dialog {
    visibility: visible !important;
    pointer-events: auto !important;
}

.conf-file-list-overlay {
    display: block;
    background: transparent !important;
    box-shadow: none;
    scrollbar-color: #8a6b3d #fffbeb;
}

.conf-download-item {
    display: block;
    margin: 0;
    padding: 9px 8px 10px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.conf-download-item--last {
    margin-bottom: 0;
}

.conf-download-title {
    color: #2f2417;
    font-family: var(--rx36-game-font-family);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.25;
    word-break: break-word;
}

.conf-download-filename {
    margin-top: 2px;
    color: #6b5a45;
    font-family: var(--rx36-game-font-family);
    font-size: 10px;
    font-weight: 700;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.conf-download-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: end;
    gap: 6px;
    margin-top: 8px;
}

.conf-download-control {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 4px;
}

.conf-download-button-row {
    display: flex;
    width: 100%;
    min-width: 0;
    align-items: center;
    gap: 6px;
}

.conf-download-button-row .conf-download-button {
    width: auto;
    min-width: 0;
    flex: 1 1 auto;
}

.conf-download-button {
    width: 100%;
    min-height: 30px;
    border: 0;
    border-radius: 4px;
    background: linear-gradient(180deg, #0f766e 0%, #0b5f59 100%);
    color: #ffffff;
    font-family: var(--rx36-game-font-family);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.1;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.18);
}

.conf-download-button:hover:not(:disabled) {
    background: linear-gradient(180deg, #0d9488 0%, #0f766e 100%);
}

.conf-download-button--compact {
    min-width: 0;
}

.conf-download-button--disabled,
.conf-download-button:disabled {
    background: #cbd5e1;
    color: #ffffff;
    cursor: not-allowed;
    opacity: 0.82;
    box-shadow: none;
}

.conf-download-timer {
    grid-column: 1 / -1;
    min-width: 0;
    padding: 6px 7px;
    box-sizing: border-box;
    border: 1px solid rgba(15, 118, 110, 0.28);
    border-radius: 4px;
    background: rgba(240, 253, 250, 0.9);
    color: #0f766e;
    font-family: var(--rx36-game-font-family);
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
}

.conf-download-limit {
    width: 100%;
    min-height: 20px;
    padding: 4px 5px;
    box-sizing: border-box;
    border: 1px solid rgba(154, 52, 18, 0.24);
    border-radius: 4px;
    background: linear-gradient(180deg, #fff7ed 0%, #ffedd5 100%);
    color: #9a3412;
    font-family: var(--rx36-game-font-family);
    font-size: 10px;
    font-weight: 700;
    line-height: 1.15;
    text-align: center;
    white-space: nowrap;
}

.conf-download-count-text {
    margin-top: 6px;
    color: #334155;
    font-family: var(--rx36-game-font-family);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.conf-download-note,
.conf-download-status {
    margin-top: 6px;
    color: #5c4c3a;
    font-family: var(--rx36-game-font-family);
    font-size: 11px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.conf-download-status {
    color: #3f3326;
}

.conf-download-status--alert {
    color: #6b3f16;
}

.training-dialog-overlay {
    position: fixed;
    z-index: 20;
    color: #1f2937;
    font-family: var(--rx36-game-font-family);
    font-size: 14px;
    line-height: 1.4;
    text-align: left;
    white-space: normal;
    word-break: break-word;
    user-select: text;
    -webkit-user-select: text;
    pointer-events: auto;
    cursor: text;
    padding-right: 4px;
    background: transparent;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #94a3b8 #ffffff;
    color-scheme: only light;
    forced-color-adjust: none;
    -ms-high-contrast-adjust: none;
}

.training-dialog-overlay p {
    margin: 0;
}

@media (max-width: 640px) {
    #game-container .training-dialog-overlay {
        font-size: 12px;
    }

    #game-container:fullscreen .training-dialog-overlay,
    #game-container:-webkit-full-screen .training-dialog-overlay,
    #game-container.rx36-iframe-fullscreen-fallback .training-dialog-overlay {
        font-size: 14px;
    }
}

.training-dialog-entry {
    margin-bottom: 6px;
    padding: 8px 6px;
    border: 1px solid #cbd5e1;
    background-color: #ffffff !important;
    color: #1f2937 !important;
    box-shadow: none;
    color-scheme: only light;
    forced-color-adjust: none;
    -ms-high-contrast-adjust: none;
}

.training-dialog-entry--student {
    background-color: #f0fdfa !important;
}

.training-dialog-entry--student-listening {
    border-color: #5eead4;
}

.training-dialog-entry--correction {
    background-color: #fff7ed !important;
}

.training-center-dialog-overlay,
.job-interview-dialog-overlay,
.erc-result-dialog-overlay {
    box-sizing: border-box;
    padding: 4px 5px;
    background: #e2dccb;
    scrollbar-color: #8a6b3d #e2dccb;
}

.training-center-dialog-overlay {
    line-height: 1.50;
    padding: 2px 4px;
}

.job-interview-dialog-overlay {
    line-height: 1.5;
}

.training-center-dialog-overlay .training-dialog-entry,
.job-interview-dialog-overlay .training-dialog-entry,
.erc-result-dialog-overlay .training-dialog-entry {
    margin-bottom: 4px;
    padding: 0 2px 3px;
    border: 0;
    background: transparent !important;
}

.training-center-dialog-overlay .training-dialog-entry {
    margin-bottom: 2px;
    padding: 0 1px 1px;
}

.training-center-dialog-overlay .training-dialog-line {
    margin: 0;
    line-height: 1.50;
}

.job-interview-dialog-overlay .training-dialog-line {
    margin: 0;
    line-height: 1.5;
}

#game-container:fullscreen .job-interview-dialog-overlay,
#game-container:-webkit-full-screen .job-interview-dialog-overlay,
#game-container.rx36-iframe-fullscreen-fallback .job-interview-dialog-overlay {
    font-size: 16px;
    line-height: 1.5;
}

.training-center-dialog-overlay .training-dialog-entry--student,
.training-center-dialog-overlay .training-dialog-entry--correction,
.job-interview-dialog-overlay .training-dialog-entry--student,
.job-interview-dialog-overlay .training-dialog-entry--correction,
.erc-result-dialog-overlay .training-dialog-entry--student,
.erc-result-dialog-overlay .training-dialog-entry--correction {
    background: transparent !important;
}

.training-center-dialog-overlay .training-dialog-entry--student-listening,
.job-interview-dialog-overlay .training-dialog-entry--student-listening,
.erc-result-dialog-overlay .training-dialog-entry--student-listening {
    border: 0;
}

.training-profile-model-answer {
    scrollbar-width: auto;
    scrollbar-color: #0f766e #d1fae5;
    touch-action: pan-y;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.training-profile-model-answer__title {
    margin: 0 0 4px;
    color: #047857;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.1;
}

.training-profile-model-answer__body {
    margin: 0;
    color: #064e3b;
    line-height: inherit;
}

.training-profile-model-answer::-webkit-scrollbar {
    width: 14px;
}

.training-profile-model-answer::-webkit-scrollbar-track {
    background: #d1fae5;
}

.training-profile-model-answer::-webkit-scrollbar-thumb {
    min-height: 28px;
    border: 3px solid #d1fae5;
    border-radius: 8px;
    background: #0f766e;
}

.training-profile-model-answer::-webkit-scrollbar-thumb:hover {
    background: #047857;
}

.training-sample-answer-toggle {
    position: fixed;
    z-index: 46;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0 6px;
    border: 2px solid #fffbeb;
    border-radius: 0;
    background: #0f766e;
    color: #ffffff;
    box-shadow: 0 3px 8px rgba(15, 23, 42, 0.26);
    font-family: var(--rx36-game-font-family);
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0;
    text-align: center;
    white-space: nowrap;
    cursor: pointer;
    touch-action: manipulation;
    user-select: none;
    transition: opacity 160ms ease, transform 160ms ease, background-color 120ms ease;
}

.training-sample-answer-toggle:hover,
.training-sample-answer-toggle:active {
    background: #0d9488;
}

.training-sample-answer-toggle--off {
    border-color: #e2dccb;
    background: #475569;
}

.training-sample-answer-toggle--off:hover,
.training-sample-answer-toggle--off:active {
    background: #64748b;
}

.training-sample-answer-toggle:focus-visible {
    outline: 2px solid #facc15;
    outline-offset: 2px;
}

.training-sample-answer-toggle:disabled {
    cursor: default;
}

.training-dialog-question-text {
    display: block;
    margin: 0.35em 0;
    font-weight: 700;
}

.office-receptionist-dialog {
    position: fixed;
    z-index: 20;
    box-sizing: border-box;
    pointer-events: auto;
    color-scheme: only light;
    forced-color-adjust: none;
    -ms-high-contrast-adjust: none;
}

.office-receptionist-dialog__panel {
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    box-sizing: border-box;
    border: 3px solid #5f4b32;
    background: #e2dccb;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.35);
    color: #1f2937;
    font-family: var(--rx36-game-font-family);
    font-size: 14px;
    line-height: 1.45;
}

.office-receptionist-dialog__title {
    padding: 8px 12px 6px;
    border-bottom: 2px solid #8a6b3d;
    color: #5b3f1c;
    font-family: var(--rx36-game-font-family);
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    letter-spacing: 0;
}

.office-receptionist-dialog__body {
    min-height: 0;
    padding: 4px 10px 2px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #8a6b3d #fffbeb;
}

.office-receptionist-dialog .training-dialog-entry {
    margin: 0 0 4px;
    padding: 2px 0;
    border: 0;
    background: transparent !important;
}

.office-receptionist-dialog__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 4px 8px 8px;
}

.office-sophie-dialog .office-receptionist-dialog__actions {
    grid-template-columns: 1fr;
}

.office-receptionist-dialog__button {
    min-width: 0;
    height: 38px;
    border: 2px solid #fffbeb;
    border-radius: 0;
    background: #475569;
    color: #ffffff;
    font-family: var(--rx36-game-font-family);
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

.office-receptionist-dialog__button--primary {
    background: #5f4b32;
}

.office-receptionist-dialog__button:disabled {
    opacity: 0.45;
    cursor: default;
}

.office-style-dialog {
    position: fixed;
    z-index: 20;
    box-sizing: border-box;
    pointer-events: auto;
    color-scheme: only light;
    forced-color-adjust: none;
    -ms-high-contrast-adjust: none;
}

.free-trial-ended-backdrop {
    position: fixed;
    z-index: 35;
    box-sizing: border-box;
    background: rgba(2, 6, 23, 0.64);
    pointer-events: auto;
    color-scheme: only light;
    forced-color-adjust: none;
    -ms-high-contrast-adjust: none;
}

.office-style-dialog.free-trial-ended-dialog {
    z-index: 36;
}

.tts-limit-dialog-backdrop {
    position: fixed;
    z-index: 39;
    box-sizing: border-box;
    background: rgba(2, 6, 23, 0.64);
    pointer-events: auto;
}

.office-style-dialog.tts-limit-dialog {
    z-index: 40;
}

.tts-limit-dialog .office-style-dialog__body p {
    margin: 0 0 0.75em;
    line-height: 1.4;
}

.tts-limit-mode-badge {
    position: fixed;
    z-index: 18;
    box-sizing: border-box;
    padding: 4px 8px;
    border: 2px solid #5f4b32;
    border-radius: 0;
    background: #e2dccb;
    color: #5b3f1c;
    font: 700 12px/1.2 var(--rx36-game-font-family);
    pointer-events: none;
}

.stt-limit-dialog-backdrop,
.stt-typed-answer-backdrop {
    position: fixed;
    z-index: 41;
    box-sizing: border-box;
    background: rgba(2, 6, 23, 0.68);
    pointer-events: auto;
}

.office-style-dialog.stt-limit-dialog {
    z-index: 42;
}

.office-style-dialog.stt-typed-answer-dialog {
    z-index: 44;
}

.stt-limit-dialog .office-style-dialog__body p,
.stt-typed-answer-dialog .office-style-dialog__body p {
    margin: 0 0 0.7em;
    line-height: 1.4;
}

.stt-limit-mode-badge {
    position: fixed;
    z-index: 19;
    box-sizing: border-box;
    max-width: 180px;
    padding: 4px 8px;
    border: 2px solid #5f4b32;
    border-radius: 0;
    background: #e2dccb;
    color: #5b3f1c;
    font: 700 11px/1.2 var(--rx36-game-font-family);
    text-align: center;
    pointer-events: none;
}

.stt-typed-answer-input {
    display: block;
    width: 100%;
    min-height: 132px;
    resize: vertical;
    box-sizing: border-box;
    border: 2px solid #5f4b32;
    border-radius: 0;
    padding: 8px;
    background: #fffdf6;
    color: #1f2937;
    font: 500 14px/1.4 var(--rx36-game-font-family);
}

.stt-typed-answer-input:focus {
    outline: 3px solid rgba(146, 104, 52, 0.35);
    outline-offset: 1px;
}

.stt-typed-answer-counter {
    margin-top: 4px;
    color: #5b3f1c;
    font: 700 11px/1.2 var(--rx36-game-font-family);
    text-align: right;
}
.office-style-dialog__panel {
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    box-sizing: border-box;
    border: 3px solid #5f4b32;
    background: #e2dccb;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.35);
    color: #1f2937;
    font-family: var(--rx36-game-font-family);
    font-size: max(
        calc(0.875rem * var(--office-style-dialog-font-scale, 1.1)),
        calc(14px * var(--office-style-dialog-font-scale, 1.1))
    );
    line-height: 1.28;
}

.office-style-dialog__title {
    padding: 0.571em 0.857em 0.429em;
    border-bottom: 2px solid #8a6b3d;
    color: #5b3f1c;
    font-family: var(--rx36-game-font-family);
    font-size: 1.285714em;
    font-weight: 700;
    text-align: center;
    letter-spacing: 0;
}

.office-style-dialog__body {
    min-height: 0;
    padding: 0.357em 0.714em 0.214em;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #8a6b3d #fffbeb;
}

.office-style-dialog .training-dialog-entry {
    margin: 0 0 2px;
    padding: 1px 0;
    border: 0;
    background: transparent !important;
}

.office-style-dialog .training-dialog-line {
    margin: 0;
    line-height: 1.24;
}

.office-style-dialog__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: minmax(2.714em, auto);
    gap: 0.714em;
    padding: 0.286em 0.571em 0.571em;
}

.free-trial-ended-dialog .office-style-dialog__actions:empty {
    display: none;
}

.office-style-dialog__button {
    --office-style-dialog-button-border-color: #354052;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    min-height: 2.533em;
    height: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.75em;
    border: 1px solid var(--office-style-dialog-button-border-color);
    border-radius: 0;
    background: #475569;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 1px 1px rgba(67, 52, 34, 0.18);
    color: #ffffff;
    font-family: var(--rx36-game-font-family);
    font-size: 1.071429em;
    font-weight: 700;
    line-height: 1.1;
    text-align: center;
    white-space: normal;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    cursor: pointer;
}

.field-map-dialog {
    isolation: isolate;
}

.office-style-dialog__button--primary {
    --office-style-dialog-button-border-color: #493822;
    background: #5f4b32;
}

.office-style-dialog__button--close,
.office-style-dialog__button--secondary {
    background: #475569;
}

.office-style-dialog__button:disabled {
    opacity: 0.45;
    cursor: default;
}

.scene-text-window-dialog .office-style-dialog__panel {
    grid-template-rows: auto minmax(0, 1fr) auto;
    overflow: hidden;
}

.scene-text-window-dialog .office-style-dialog__title:empty {
    display: none;
    padding: 0;
    border-bottom: 0;
}

.scene-text-window-dialog .office-style-dialog__body {
    grid-row: 2;
    box-sizing: border-box;
    min-height: 0;
    background: #e2dccb;
    scrollbar-color: #8a6b3d #e2dccb;
}

.scene-text-window-dialog .office-style-dialog__actions {
    grid-row: 3;
    align-items: stretch;
    box-sizing: border-box;
    grid-auto-rows: 38px;
    align-content: start;
    height: 50px;
}

.scene-text-window-dialog .office-style-dialog__actions:empty {
    display: none;
    height: 0;
    padding: 0;
}

.scene-text-window-dialog .office-style-dialog__button {
    width: 100%;
    min-height: 0;
    height: 38px;
}

.training-dialog-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
    padding: 14px 12px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    box-shadow: none;
    forced-color-adjust: none;
    -ms-high-contrast-adjust: none;
}

.training-dialog-loading-spinner {
    position: relative;
    width: 32px;
    height: 32px;
    animation: training-dialog-loading-rotate 0.9s linear infinite;
}

.training-dialog-loading-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 6px;
    margin: -3px;
    border-radius: 999px;
    background: #0f766e;
}

.training-dialog-loading-dot--1 {
    width: 8px;
    height: 8px;
    margin: -4px;
    opacity: 0.28;
    transform: translate(-50%, -50%) rotate(0deg) translateY(-11px);
}

.training-dialog-loading-dot--2 {
    opacity: 0.36;
    transform: translate(-50%, -50%) rotate(45deg) translateY(-11px);
}

.training-dialog-loading-dot--3 {
    opacity: 0.44;
    transform: translate(-50%, -50%) rotate(90deg) translateY(-11px);
}

.training-dialog-loading-dot--4 {
    opacity: 0.52;
    transform: translate(-50%, -50%) rotate(135deg) translateY(-11px);
}

.training-dialog-loading-dot--5 {
    opacity: 0.6;
    transform: translate(-50%, -50%) rotate(180deg) translateY(-11px);
}

.training-dialog-loading-dot--6 {
    opacity: 0.68;
    transform: translate(-50%, -50%) rotate(225deg) translateY(-11px);
}

.training-dialog-loading-dot--7 {
    opacity: 0.76;
    transform: translate(-50%, -50%) rotate(270deg) translateY(-11px);
}

.training-dialog-loading-dot--8 {
    opacity: 0.84;
    transform: translate(-50%, -50%) rotate(315deg) translateY(-11px);
}

.training-dialog-loading-label {
    margin: 0;
    color: #334155;
    font-family: var(--rx36-game-font-family);
    font-size: 14px;
    font-weight: 700;
    text-align: center;
}

.training-dialog-line {
    margin-bottom: 0;
}

.training-dialog-listening-line {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 24px;
    white-space: nowrap;
}

.training-dialog-waveform {
    display: block;
    flex: 0 0 44px;
    width: 44px;
    height: 24px;
    overflow: visible;
}

.training-dialog-waveform-bar {
    fill: #0f766e;
}

.training-dialog-listening-text {
    color: #0f766e;
    font-weight: 700;
}

.training-dialog-label {
    font-weight: 700;
    color: #334155;
}

.training-dialog-entry--student .training-dialog-label {
    color: #0f766e;
}

.training-dialog-entry--correction .training-dialog-label {
    color: #b45309;
}

@keyframes npc-recording-glow-pulse {
    0%, 100% {
        opacity: 0.72;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.42);
    }
}

@keyframes npc-recording-icon-pulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.07);
    }
}

@media (prefers-reduced-motion: reduce) {
    .npc-recording-indicator--recording .npc-recording-indicator__glow,
    .npc-recording-indicator--recording .npc-recording-indicator__image {
        animation: none;
    }
}

.learner-profile-setup {
    position: absolute;
    inset: 0;
    z-index: 10020;
    display: grid;
    place-items: center;
    box-sizing: border-box;
    overflow: hidden;
    padding: clamp(8px, 3vw, 20px);
    background: rgba(15, 23, 42, 0.72);
    color: #2f2417;
    font-family: var(--rx36-game-font-family);
}

.learner-profile-setup__panel {
    width: min(420px, 100%);
    max-height: 100%;
    box-sizing: border-box;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    border: 3px solid #8a6b3d;
    background: #f4ecd9;
    padding: 22px;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.36);
}

.learner-profile-setup__title {
    margin: 0 0 14px;
    color: #4b3520;
    font-family: var(--rx36-game-font-family);
    font-size: 24px;
    line-height: 1.2;
    text-align: center;
}

.learner-profile-setup__message,
.learner-profile-setup__question {
    margin: 0 0 14px;
    font-size: 14px;
    line-height: 1.45;
}

.learner-profile-setup__message--error {
    color: #8a3d2f;
    font-weight: 700;
}

.learner-profile-setup__summary {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 8px 12px;
    margin: 0 0 14px;
    padding: 12px;
    border: 1px solid #b08a55;
    background: #fffaf0;
    font-size: 14px;
}

.learner-profile-setup__summary dt {
    margin: 0;
    font-weight: 700;
}

.learner-profile-setup__summary dd {
    margin: 0;
}

.learner-profile-setup__field {
    display: grid;
    gap: 6px;
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 700;
}

.learner-profile-setup__select,
.learner-profile-setup__input {
    width: 100%;
    min-height: 40px;
    box-sizing: border-box;
    border: 2px solid #8a6b3d;
    background: #fffaf0;
    color: #2f2417;
    font: inherit;
    font-weight: 500;
    padding: 7px 9px;
}

.learner-profile-setup__input:focus {
    border-color: #0f766e;
    outline: 2px solid rgba(15, 118, 110, 0.22);
    outline-offset: 1px;
}

.learner-profile-setup__profile-dropdown {
    cursor: pointer;
}

.learner-profile-setup__custom-input[hidden] {
    display: none;
}

.learner-profile-setup__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 18px;
}

.learner-profile-setup__actions--single {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
}

.learner-profile-setup__actions--single .learner-profile-setup__button {
    width: 100%;
    min-width: 0;
}

.learner-profile-setup__button {
    min-width: 90px;
    min-height: 40px;
    border: 2px solid #fffbeb;
    color: #ffffff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.learner-profile-setup__button--primary {
    background: #0f766e;
}

.learner-profile-setup__button--secondary {
    background: #5f4b32;
}

.learner-profile-setup__button--plain {
    background: #475569;
}

@media (max-width: 420px), (max-height: 640px) {
    .learner-profile-setup {
        padding: 8px;
    }

    .learner-profile-setup__panel {
        border-width: 2px;
        padding: 14px;
    }

    .learner-profile-setup__title {
        margin-bottom: 10px;
        font-size: 20px;
    }

    .learner-profile-setup__message,
    .learner-profile-setup__question {
        margin-bottom: 10px;
        font-size: 13px;
        line-height: 1.35;
    }

    .learner-profile-setup__field {
        gap: 4px;
        margin-bottom: 9px;
        font-size: 13px;
    }

    .learner-profile-setup__select,
    .learner-profile-setup__input {
        min-height: 38px;
        padding: 6px 8px;
    }

    .learner-profile-setup__actions {
        gap: 8px;
        margin-top: 12px;
    }

    .learner-profile-setup__button {
        flex: 1 1 0;
        min-width: 0;
        min-height: 38px;
    }
}


@keyframes training-dialog-loading-rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}
