.conversation-picker,
.conversation-picker * {
    box-sizing: border-box;
    letter-spacing: 0;
}

.conversation-picker {
    color: #17456f;
    margin: 0 auto;
    max-width: 576px;
    padding: 8px 8px 52px;
}

.conversation-scenario-intro,
.conversation-scenario-section {
    background: rgb(255 255 255 / 84%);
    border: 1px solid rgb(182 213 255 / 88%);
    border-radius: 18px;
    box-shadow: 0 1px 2px rgb(0 0 0 / 18%);
    overflow: hidden;
}

.conversation-picker__form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 0;
}

.conversation-level-tabs {
    box-sizing: border-box;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: -8px -8px 0;
    min-height: clamp(52px, 9svh, 70px);
    position: sticky;
    top: var(--exercise-toolbar-height, 65px);
    z-index: 9;
}

.conversation-level-tab {
    -webkit-tap-highlight-color: transparent;
    align-items: center;
    background: rgb(255 255 255 / 88%);
    border: 1px solid rgb(182 213 255 / 78%);
    box-sizing: border-box;
    color: #8b9be8;
    display: flex;
    flex-direction: column;
    font-family: "Nunito", Arial, sans-serif;
    font-size: clamp(12px, 3.8vw, 15px);
    font-weight: 900;
    gap: 3px;
    justify-content: center;
    line-height: 1;
    padding: 8px 6px;
    text-align: center;
    text-decoration: none;
    transition: transform 0.08s ease, filter 0.08s ease, background-color 0.08s ease;
}

.conversation-level-tab:first-child {
    border-radius: 0 0 0 18px;
}

.conversation-level-tab:last-child {
    border-radius: 0 0 18px 0;
}

.conversation-level-tab--active {
    background: #ffcc08;
    color: #111;
}

.conversation-level-tab__name,
.conversation-level-tab__progress {
    display: block;
}

.conversation-level-tab__name {
    font-size: 1.22em;
}

.conversation-level-tab__progress {
    font-size: 0.72em;
    opacity: 0.82;
}

.conversation-level-tab:active {
    filter: brightness(0.97);
    transform: translateY(1px) scale(0.99);
}

.conversation-current-teacher {
    align-items: center;
    background: rgb(245 252 255 / 94%);
    border: 1px solid rgb(119 199 255 / 64%);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgb(23 78 166 / 10%);
    color: #174ea6;
    cursor: pointer;
    display: grid;
    font: inherit;
    gap: 12px;
    grid-template-columns: 72px minmax(0, 1fr) auto;
    min-height: 90px;
    padding: 8px 12px 8px 8px;
    text-align: left;
    transition: background-color 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease, transform 0.08s ease;
    width: 100%;
}

.conversation-current-teacher:hover {
    background: #fff;
    border-color: #29b6f6;
    box-shadow: 0 4px 12px rgb(23 78 166 / 14%);
}

.conversation-current-teacher:active,
.conversation-scenario:active,
.conversation-teacher:active {
    filter: brightness(0.97);
    transform: translateY(1px) scale(0.99);
}

.conversation-current-teacher:focus-visible,
.conversation-level-tab:focus-visible,
.conversation-teacher:focus-within,
.conversation-scenario:focus-within {
    outline: 3px solid rgb(23 78 166 / 16%);
    outline-offset: 2px;
}

.conversation-teacher-portrait {
    background-image: url('/assets/img/conversation/teachers.webp');
    background-repeat: no-repeat;
    background-size: 200% auto;
    display: block;
}

.conversation-current-teacher__portrait {
    background-color: #d9f2ff;
    border: 1px solid rgb(119 199 255 / 72%);
    border-radius: 8px;
    height: 72px;
    width: 72px;
}

.conversation-current-teacher__copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.conversation-current-teacher__copy > span {
    color: #557386;
    font-size: 11px;
    font-weight: 900;
    line-height: 1.2;
    text-transform: uppercase;
}

.conversation-current-teacher__copy strong {
    color: #174ea6;
    font-size: 20px;
    font-weight: 900;
    line-height: 1.05;
    margin-top: 3px;
}

.conversation-current-teacher__copy small {
    color: #008f83;
    display: -webkit-box;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.22;
    margin-top: 4px;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.conversation-current-teacher__action {
    align-items: center;
    color: #1759a5;
    display: inline-flex;
    font-size: 13px;
    font-weight: 900;
    gap: 6px;
    white-space: nowrap;
}

.conversation-current-teacher__arrow {
    background: #54a4ff;
    display: block;
    height: 45px;
    -webkit-mask: url('/assets/img/svg/circle-right.svg') center / contain no-repeat;
    mask: url('/assets/img/svg/circle-right.svg') center / contain no-repeat;
    width: 45px;
}

.conversation-scenario-intro {
    background: rgb(220 244 255 / 62%);
    padding: 14px;
}

.conversation-scenario-intro h1 {
    color: #174ea6;
    font-size: 21px;
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1.15;
    margin: 0;
}

.conversation-scenario-intro p {
    color: #557386;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    margin: 6px 0 0;
}

.conversation-scenario-groups {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.conversation-scenario-list {
    display: grid;
    gap: 8px;
    padding: 8px;
}

.conversation-scenario-group {
    align-items: center;
    background: rgb(220 244 255 / 72%);
    border-bottom: 1px solid rgb(119 199 255 / 48%);
    color: #174ea6;
    display: flex;
    font-size: 16px;
    font-weight: 900;
    line-height: 1.2;
    margin: 0;
    min-height: 40px;
    padding: 10px 13px;
}

.conversation-limit-modal .app-modal__box {
    gap: 16px;
    max-width: 420px;
    padding: 18px;
}

.conversation-limit-modal .app-modal__footer {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    width: 100%;
}

.conversation-limit-modal .modal-action-button {
    min-height: 46px;
    width: 100%;
}

.conversation-scenario {
    background: rgb(255 255 255 / 82%);
    border: 2px solid rgb(182 213 255 / 70%);
    border-radius: 10px;
    overflow: hidden;
    scroll-margin-top: 142px;
    transition: background-color 0.1s ease, border-color 0.1s ease, filter 0.1s ease, transform 0.1s ease;
}

.conversation-scenario:hover {
    background: rgb(238 250 255 / 94%);
    border-color: rgb(41 182 246 / 66%);
}

.conversation-scenario.is-selected {
    background: rgb(220 244 255 / 96%);
    border-color: #29b6f6;
}

.conversation-scenario.is-completed:not(.is-selected) {
    background: rgb(240 251 246 / 94%);
}

.conversation-scenario__choice {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    min-height: 108px;
    padding: 11px 12px;
}

.conversation-scenario__choice input,
.conversation-teacher input {
    height: 1px;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    width: 1px;
}

.conversation-scenario__top {
    align-items: flex-start;
    display: flex;
    gap: 8px;
    justify-content: space-between;
}

.conversation-scenario__top strong {
    color: #174ea6;
    font-size: 16px;
    font-weight: 900;
    line-height: 1.18;
}

.conversation-scenario__number {
    background: rgb(205 239 255 / 92%);
    border: 1px solid rgb(41 182 246 / 42%);
    border-radius: 8px;
    color: #174ea6;
    flex: 0 0 auto;
    font-size: 10px;
    font-weight: 900;
    line-height: 1;
    padding: 5px 7px;
}

.conversation-scenario__description {
    color: #557386;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.34;
    margin-top: 7px;
}

.conversation-scenario__action {
    border-top: 1px solid rgb(119 199 255 / 42%);
    display: none;
    padding: 9px;
}

.conversation-scenario.is-selected .conversation-scenario__action {
    display: block;
}

.conversation-primary-button {
    align-items: center;
    background: #20c91c;
    border: 3px solid #08a50e;
    border-radius: 16px;
    box-shadow: 0 1px 0 rgb(0 118 44 / 24%), inset 0 1px 0 rgb(255 255 255 / 32%);
    box-sizing: border-box;
    color: #fff;
    cursor: pointer;
    display: flex;
    font: inherit;
    font-size: 16px;
    font-weight: 900;
    justify-content: center;
    line-height: 1;
    min-height: 50px;
    padding: 0 16px;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    width: 100%;
}

.conversation-primary-button:active {
    filter: brightness(0.96);
    transform: translateY(1px) scale(0.99);
}

.conversation-teacher-modal .app-modal__box {
    gap: 12px;
    max-height: calc(100svh - 24px);
    max-width: 540px;
    padding: 14px;
}

.conversation-teacher-modal {
    align-items: center;
    padding: 12px 8px;
}

.conversation-teacher-modal .app-modal__head {
    flex: 0 0 auto;
    gap: 6px;
    padding: 2px 50px 2px 2px;
}

.conversation-teacher-modal .app-modal__title {
    font-size: 23px;
    line-height: 1.12;
}

.conversation-teacher-modal .app-modal__subtitle {
    color: #557386;
    font-size: 14px;
    line-height: 1.35;
}

.conversation-teacher-list {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.conversation-teacher {
    background: #fff;
    border: 2px solid rgb(182 213 255 / 82%);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    position: relative;
    transition: border-color 0.12s ease, box-shadow 0.12s ease, filter 0.1s ease, transform 0.1s ease;
}

.conversation-teacher:hover {
    border-color: #29b6f6;
    box-shadow: 0 4px 10px rgb(23 78 166 / 12%);
}

.conversation-teacher.is-selected {
    background: #fff;
    border-color: #29b6f6;
    box-shadow: 0 0 0 3px rgb(41 182 246 / 15%);
}

.conversation-teacher__portrait {
    background-color: #d9f2ff;
    border-bottom: 1px solid rgb(119 199 255 / 52%);
    height: auto;
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
}

.conversation-teacher[data-teacher-position$="100%"] .conversation-teacher__portrait {
    background-position-y: 80% !important;
}

.conversation-teacher__state {
    background: #174ea6;
    border: 2px solid #fff;
    border-radius: 7px;
    box-shadow: 0 1px 4px rgb(0 43 70 / 20%);
    color: #fff;
    display: none;
    font-size: 10px;
    font-weight: 900;
    line-height: 1;
    padding: 5px 7px;
    position: absolute;
    right: 7px;
    text-transform: uppercase;
    top: 7px;
}

.conversation-teacher.is-selected .conversation-teacher__state {
    display: block;
}

.conversation-teacher__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
    padding: 10px 11px 12px;
}

.conversation-teacher__body strong {
    color: #174ea6;
    font-size: 18px;
    font-weight: 900;
    line-height: 1.1;
}

.conversation-teacher__title {
    color: #008f83;
    font-size: 13px;
    font-weight: 900;
    line-height: 1.25;
    margin-top: 4px;
}

.conversation-teacher__description {
    color: #557386;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.34;
    margin-top: 7px;
}

@media (max-width: 420px) {
    .conversation-current-teacher {
        grid-template-columns: 68px minmax(0, 1fr) auto;
        gap: 10px;
        min-height: 86px;
        padding: 8px 10px 8px 8px;
    }

    .conversation-current-teacher__portrait {
        height: 68px;
        width: 68px;
    }

    .conversation-current-teacher__action > span:first-child {
        display: none;
    }

    .conversation-current-teacher__arrow {
        height: 45px;
        width: 45px;
    }

    .conversation-teacher-modal .app-modal__box {
        border-radius: 14px;
        padding: 12px;
    }

    .conversation-teacher-modal .app-modal__title {
        font-size: 21px;
    }

    .conversation-teacher-modal .app-modal__subtitle {
        font-size: 13px;
    }

    .conversation-teacher-list {
        gap: 8px;
    }

    .conversation-teacher__body {
        padding: 9px 9px 11px;
    }

    .conversation-teacher__body strong {
        font-size: 17px;
    }

    .conversation-teacher__title {
        font-size: 12px;
    }

    .conversation-teacher__description {
        font-size: 12px;
        line-height: 1.3;
    }
}

@media (max-width: 340px) {
    .conversation-teacher-list {
        grid-template-columns: 1fr;
    }

    .conversation-teacher {
        display: grid;
        grid-template-columns: 104px minmax(0, 1fr);
        min-height: 130px;
    }

    .conversation-teacher__portrait {
        aspect-ratio: auto;
        background-size: auto 200%;
        border-bottom: 0;
        border-right: 1px solid rgb(119 199 255 / 52%);
        height: 100%;
        min-height: 130px;
    }

    .conversation-teacher[data-teacher-position$="100%"] .conversation-teacher__portrait {
        background-position-y: 100% !important;
    }

    .conversation-teacher__body {
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .conversation-picker *,
    .conversation-teacher-modal * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
