.sleep-panel {
    width: 100%;
    max-width: 100%;
    padding: clamp(0.75rem, 2.5vw, 1.75rem);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 0.65rem;
    background: rgba(255,255,255,0.02);
}

.sleep-course-page,
.sleep-course-page * {
    box-sizing: border-box;
}

.sleep-course-page {
    width: 100%;
    max-width: 100%;
}

.sleep-home-title {
    border-top: 0 !important;
    font-family: "Source Sans Pro", Helvetica, sans-serif;
    font-size: 1.75rem;
    font-weight: 900;
    letter-spacing: 0.075em;
    line-height: 1.3;
    margin: 0 0 1.5rem 0;
    padding-top: 3.5rem !important;
}

#sleep-talk-heading {
    margin-top: 1rem;
}

.sleep-page-title {
    padding-top: 3.5rem;
}

.sleep-course-page .sleep-page-title {
    margin-bottom: 1.1rem;
}

.sleep-course-page .sleep-page-title p {
    margin-bottom: 0;
}

.sleep-course-actions {
    width: 100%;
    margin: 1rem 0 0;
    flex-direction: column;
    align-items: center;
    gap: clamp(0.55rem, 1.5vw, 0.85rem);
}

.sleep-course-actions li,
.sleep-course-actions li:first-child {
    width: min(100%, 32rem);
    max-width: 100%;
    padding: 0;
}

.sleep-course-actions li:last-child {
    margin-bottom: clamp(1.25rem, 3vw, 2rem);
}

.sleep-course-actions li > .button {
    display: flex;
    width: 100%;
    max-width: 100%;
    min-height: 3rem;
    height: auto;
    align-items: center;
    justify-content: center;
    padding: 0.75rem clamp(0.65rem, 2.5vw, 1.5rem);
    font-size: clamp(0.75rem, 1.4vw, 0.9rem);
    line-height: 1.3;
    overflow-wrap: anywhere;
    white-space: normal;
}

.sleep-course-actions .sleep-next-day-button:disabled {
    cursor: not-allowed;
}

.sleep-panel button {
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sleep-mode-toggle {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    width: 100%;
    max-width: 350px;
    margin: 0 auto 1.5rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
    overflow: hidden;
}

.sleep-language-toggle {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    width: 100%;
    max-width: 350px;
    margin: 0 auto 0.8rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
    overflow: hidden;
}

.sleep-language-button {
    flex: 1;
    background: transparent;
    color: inherit;
    border: none;
    padding: 0.45rem 0;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
}

.sleep-language-button:focus,
.sleep-language-button:active {
    outline: none !important;
    box-shadow: none !important;
}

.sleep-language-button.active {
    background: #ff6584;
    color: #111;
}

.sleep-language-button:not(.active) {
    background: #dcdcdc;
    color: #111;
}

.sleep-language-button:first-child {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-top-left-radius: 999px;
    border-bottom-left-radius: 999px;
}

.sleep-language-button:last-child {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-top-right-radius: 999px;
    border-bottom-right-radius: 999px;
}

.sleep-language-button + .sleep-language-button {
    border-left: none;
}

/* Base button style */
.sleep-mode-button {
    flex: 1;
    background: transparent;
    color: inherit;
    border: none;
    padding: 0.45rem 0;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
}

/* Remove focus outline */
.sleep-mode-button:focus,
.sleep-mode-button:active {
    outline: none !important;
    box-shadow: none !important;
}

/* Active and inactive colors */
.sleep-mode-button.active {
    background: #ff6584;
    color: #111;
}

.sleep-mode-button:not(.active) {
    background: #dcdcdc;
    color: #111;
}

.sleep-mode-section {
    display: none;
}

.sleep-mode-section.active {
    display: block;
}

.sleep-auth-panel {
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 0.65rem;
    padding: 1rem;
    margin-bottom: 1.25rem;
    background: rgba(255,255,255,0.03);
}

.sleep-auth-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
    gap: clamp(0.65rem, 2vw, 0.9rem);
}

.sleep-auth-columns[hidden] {
    display: none !important;
}

.sleep-auth-form {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding: 0.85rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(0,0,0,0.08);
}

.sleep-auth-form h4 {
    margin: 0 0 0.2rem;
    font-size: 1rem;
}

.sleep-auth-form label {
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 0.05rem;
}

.sleep-auth-form input,
.sleep-auth-form select {
    padding: 0.5rem 0.55rem;
    border-radius: 0.35rem;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.93);
    color: #111;
    line-height: 1.3;
}

.sleep-auth-form input::placeholder {
    color: #444;
}

.sleep-auth-button {
    margin-top: 0.35rem;
    border: none;
    border-radius: 0.4rem;
    padding: 0.55rem 0.9rem;
    background: #ff6584;
    color: #111;
    font-weight: 600;
    cursor: pointer;
    width: fit-content;
}

.sleep-register-notice {
    margin: 0.25rem 0 0;
    font-size: 0.78rem;
    line-height: 1.35;
    color: #333;
}

.sleep-register-notice span {
    display: block;
}

.sleep-register-notice span[lang="pl"] {
    margin-top: 0.15rem;
    opacity: 0.78;
}

.sleep-auth-status {
    margin: 0.75rem auto 0;
    width: 100%;
    max-width: 28rem;
    padding: 0.45rem 0.7rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(0,0,0,0.25);
    background: rgba(255,255,255,0.92);
    box-shadow: 0 3px 8px rgba(0,0,0,0.14);
    font-size: 1.08rem;
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
    color: #1a1a1a;
}

.sleep-auth-status.error {
    color: #7a1421;
    background: rgba(255,232,236,0.96);
    border-color: rgba(122,20,33,0.35);
}

.sleep-auth-status.success {
    color: #145a2d;
    background: rgba(226,255,236,0.96);
    border-color: rgba(20,90,45,0.35);
}

/* Shape adjustments */
.sleep-mode-button:first-child {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-top-left-radius: 999px;
    border-bottom-left-radius: 999px;
}

.sleep-mode-button:last-child {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-top-right-radius: 999px;
    border-bottom-right-radius: 999px;
}

/* Remove any unwanted inner border gap */
.sleep-mode-button + .sleep-mode-button {
    border-left: none;
}

.sleep-day-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.sleep-course-language-control {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem 0.8rem;
    margin-bottom: 1rem;
}

.sleep-course-language-buttons {
    display: inline-flex;
    gap: 0.5rem;
    background: transparent;
}

.sleep-course-language-label {
    color: #17212b;
    font-weight: 700;
    line-height: 1.2;
}

.sleep-course-language-button {
    min-width: 6.25rem;
    height: auto;
    min-height: 2.6rem;
    border: 2px solid #73797f;
    border-radius: 999px;
    box-sizing: border-box;
    background: #dcdcdc;
    box-shadow: none;
    color: #111 !important;
    line-height: 1.2;
    padding: 0.42rem 0.9rem;
    cursor: pointer;
    font-weight: 600;
}

.sleep-course-language-button:hover,
.sleep-course-language-button:focus,
.sleep-course-language-button:active {
    box-shadow: none;
    color: #111 !important;
}

.sleep-course-language-button.active {
    background: #ff6584;
}

.sleep-course-language-button:disabled {
    cursor: not-allowed;
    opacity: 0.58;
}

.sleep-course-language-note {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.35;
    opacity: 0.78;
}

.sleep-generate-button[hidden] {
    display: none !important;
}

.sleep-consent-panel {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    padding: 1rem;
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 0.65rem;
    background: rgba(255,255,255,0.035);
}

.sleep-consent-intro {
    margin: 0;
    font-weight: 700;
    line-height: 1.35;
}

.sleep-consent-translation {
    display: block;
    margin: 0.2rem 0 0;
    font-size: 0.9rem;
    line-height: 1.35;
    opacity: 0.8;
}

.sleep-consent-section {
    padding: 0.75rem;
    border-radius: 0.5rem;
    background: rgba(0,0,0,0.08);
}

.sleep-consent-section h5,
.sleep-consent-section h6 {
    margin: 0 0 0.25rem;
    letter-spacing: 0;
    text-transform: none;
}

.sleep-consent-section h5 {
    font-size: 1rem;
}

.sleep-consent-section h6 {
    margin-top: 0.55rem;
    font-size: 0.92rem;
    opacity: 0.88;
}

.sleep-consent-section p {
    margin: 0;
    line-height: 1.4;
}

.sleep-consent-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-top: 0.35rem;
}

.sleep-consent-confirmation {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 0.7rem;
    padding: 0.8rem;
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 0.5rem;
    cursor: pointer;
    background: rgba(0,0,0,0.08);
}

.sleep-consent-confirmation input[type="checkbox"] {
    -moz-appearance: auto;
    -webkit-appearance: checkbox;
    appearance: auto;
    display: block;
    float: none;
    width: 1.35rem;
    min-width: 1.35rem;
    height: 1.35rem;
    margin: 0.15rem 0 0;
    opacity: 1;
    position: static;
    z-index: auto;
    cursor: pointer;
    accent-color: #ff6584;
}

.sleep-consent-confirmation:has(input:checked) {
    border-color: rgba(255, 101, 132, 0.75);
    background: rgba(255, 101, 132, 0.1);
}

.sleep-consent-confirmation input[type="checkbox"]:focus-visible {
    outline: 3px solid rgba(24, 191, 239, 0.55);
    outline-offset: 2px;
}

.sleep-consent-confirmation-en {
    display: block;
    font-weight: 600;
    line-height: 1.35;
}

.sleep-consent-required,
.sleep-consent-recorded,
.sleep-consent-button-translation {
    margin: 0;
}

.sleep-consent-required {
    color: #ffb3bf;
    font-weight: 700;
}

.sleep-consent-recorded {
    color: #8ee6a8;
    font-weight: 700;
}

.sleep-consent-button-translation {
    font-size: 0.88rem;
    opacity: 0.8;
}

.sleep-consent-button-group {
    display: flex;
    width: fit-content;
    max-width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
}

.sleep-consent-submit {
    width: fit-content;
    min-height: 2.75rem;
    border: 0;
    border-radius: 0.45rem;
    padding: 0.65rem 1.1rem;
    background: #ff6584;
    color: #111;
    font-weight: 700;
    cursor: pointer;
}

.sleep-consent-withdraw {
    width: fit-content;
    min-height: 2.5rem;
    border: 1px solid rgba(255,255,255,0.35);
    border-radius: 0.45rem;
    padding: 0.55rem 0.9rem;
    background: transparent;
    color: inherit;
    font-weight: 600;
    cursor: pointer;
}

.sleep-consent-withdraw:disabled {
    cursor: not-allowed;
    opacity: 0.58;
}

.sleep-consent-submit:disabled {
    cursor: not-allowed;
    opacity: 0.58;
}

.sleep-day-button {
    border: 1px solid rgba(255,255,255,0.3);
    background: transparent;
    color: inherit;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.45rem;
}

.sleep-day-button.active {
    background: #ff6584;
    color: #111;
    border-color: #ff6584;
}

.sleep-day-button:disabled,
.sleep-day-button.locked {
    cursor: not-allowed;
    opacity: 0.52;
    background: rgba(0,0,0,0.08);
}

.sleep-day-button.completed:not(.active) {
    border-color: rgba(20,90,45,0.65);
}

.sleep-day-lock {
    width: 0.9rem;
    font-size: 0.8rem;
}

.sleep-question-list {
    display: flex;
    flex-direction: column;
    gap: clamp(0.7rem, 2vw, 1rem);
    margin-top: clamp(0.7rem, 2vw, 1rem);
}

.sleep-question-item,
.sleep-consent-panel,
.sleep-lesson-box,
.sleep-final-survey {
    width: 100%;
    max-width: 100%;
}

.sleep-day-heading-translation {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.82em;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1.35;
    text-transform: none;
    opacity: 0.78;
}

.sleep-habit-timeframe {
    margin: 0 0 0.25rem;
    padding: 0.75rem 0.9rem;
    border-left: 3px solid #ff6584;
    background: rgba(255, 101, 132, 0.08);
    line-height: 1.4;
}

.sleep-habit-timeframe-pl {
    display: block;
    margin-top: 0.3rem;
    font-size: 0.9em;
    opacity: 0.78;
}

.sleep-question-item label {
    font-weight: 600;
    display: block;
    margin-bottom: 0.15rem;
}

.sleep-question-item > label {
    font-size: calc(1em + 1px);
    line-height: 1.35;
}

.sleep-question-translation {
    display: block;
    margin-bottom: 0.45rem;
    font-size: 0.88rem;
    font-weight: 400;
    line-height: 1.35;
    opacity: 0.78;
}

.sleep-question-item textarea {
    width: 100%;
    min-height: 70px;
    padding: 0.6rem;
    border-radius: 0.4rem;
    border: 1px solid rgba(255,255,255,0.15);
    background: #f4f4f4;
    color: #000;
    line-height: 1.3;
    resize: vertical;
}

.sleep-question-item textarea::placeholder {
    color: #000;
}

.sleep-answer-meta {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.3rem;
    color: #4d4d4d;
    font-size: 0.8rem;
    line-height: 1.35;
}

.sleep-answer-counter {
    flex: 0 0 auto;
    font-variant-numeric: tabular-nums;
}

.sleep-answer-counter.limit {
    color: #8a5a00;
    font-weight: 700;
}

.sleep-answer-counter.error {
    color: #7a1421;
    font-weight: 700;
}

.sleep-summary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1.1rem;
    border-radius: 0.45rem;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.06);
    color: inherit;
    cursor: pointer;
    font-weight: 600;
    margin-bottom: 0.6rem;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.sleep-summary-button:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.35);
}

.sleep-final-note {
    margin: 0.25rem 0 0.75rem;
    font-size: 0.95rem;
    opacity: 0.85;
}

.sleep-final-survey[hidden] {
    display: none !important;
}

.sleep-final-survey {
    margin-top: 1.25rem;
    padding: clamp(0.75rem, 2.5vw, 1.25rem);
    border: 1px solid rgba(255, 101, 132, 0.45);
    border-radius: 0.65rem;
    background: rgba(255, 255, 255, 0.96);
    color: #1e1e1e;
}

.sleep-final-survey h5 {
    margin: 0;
    font-size: 1.05rem;
    letter-spacing: 0.02em;
}

.sleep-final-survey-heading-pl {
    margin: 0.15rem 0 0.65rem;
    font-size: 0.88rem;
    font-weight: 400;
    opacity: 0.78;
}

.sleep-final-survey-intro {
    margin: 0;
    font-weight: 600;
    line-height: 1.45;
}

.sleep-final-survey-intro-pl {
    margin: 0.2rem 0 1rem;
    font-size: 0.88rem;
    font-weight: 400;
    line-height: 1.4;
    opacity: 0.78;
}

.sleep-final-survey-form {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.sleep-final-survey-item {
    padding: 0.9rem;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 0.5rem;
    background: rgba(0, 0, 0, 0.025);
}

.sleep-final-survey-question {
    margin: 0 0 0.15rem;
    font-size: calc(1em + 1px);
    font-weight: 600;
    line-height: 1.35;
}

.sleep-final-survey-options {
    display: grid;
    grid-template-columns: repeat(5, minmax(2.75rem, 1fr));
    gap: 0.5rem;
    width: min(100%, 22rem);
    margin-top: 0.55rem;
}

.sleep-final-survey-language-options {
    grid-template-columns: repeat(2, minmax(6rem, 1fr));
    width: min(100%, 16rem);
}

.sleep-final-survey-option {
    position: relative;
    margin: 0;
    cursor: pointer;
}

.sleep-final-survey-option input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.sleep-final-survey-option span {
    display: flex;
    min-height: 2.75rem;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0, 0, 0, 0.28);
    border-radius: 0.45rem;
    background: #fff;
    color: #111;
    font-weight: 700;
    transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.sleep-final-survey-option input:checked + span {
    border-color: #ff6584;
    background: #ff6584;
}

.sleep-final-survey-option input:focus-visible + span {
    outline: 3px solid rgba(24, 191, 239, 0.5);
    outline-offset: 2px;
}

.sleep-final-survey-option input:disabled + span {
    cursor: not-allowed;
    opacity: 0.72;
}

.sleep-final-survey-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.2rem;
}

.sleep-final-survey-submit {
    border: 0;
    border-radius: 0.45rem;
    padding: 0.65rem 1rem;
    background: #ff6584;
    color: #111;
    font-weight: 700;
    cursor: pointer;
}

.sleep-final-survey-submit:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.sleep-final-survey-status {
    font-size: 0.9rem;
    line-height: 1.4;
}

.sleep-final-survey-status.error {
    color: #9c1730;
    font-weight: 600;
}

.sleep-final-survey-status.success {
    color: #145a2d;
    font-weight: 600;
}

.sleep-rating-item {
    padding: 0.75rem 0.6rem;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 0.45rem;
    background: rgba(255,255,255,0.02);
}

.sleep-rating-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.sleep-rating-option {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.55rem;
    border-radius: 0.35rem;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.04);
    cursor: pointer;
}

.sleep-rating-option input {
    margin: 0;
    accent-color: #ff6584;
    appearance: auto;
    -webkit-appearance: radio;
    -moz-appearance: radio;
    opacity: 1;
    position: static;
    float: none;
    width: auto;
    height: auto;
}

.sleep-rating-option span {
    font-weight: 700;
    font-size: 0.95rem;
}

.sleep-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(255,255,255,0.15);
    border-top-color: #18bfef;
    border-radius: 50%;
    animation: sleep-spin 0.9s linear infinite;
    display: none;
    margin-bottom: 0.75rem;
}

.sleep-spinner.active {
    display: inline-block;
}

@keyframes sleep-spin {
    to {
        transform: rotate(360deg);
    }
}

.sleep-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.sleep-translation-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.85rem;
}

.sleep-translation-actions[hidden],
.sleep-translation-box[hidden] {
    display: none !important;
}

.sleep-generate-button {
    background: #ff6584;
    color: #111;
    border: none;
    border-radius: 0.4rem;
    padding: 0.6rem 1.2rem;
    cursor: pointer;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sleep-translate-button {
    background: transparent;
    color: inherit;
    border: 1px solid currentColor;
    border-radius: 0.4rem;
    padding: 0.6rem 1.2rem;
    cursor: pointer;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sleep-translate-button:disabled {
    cursor: not-allowed;
    opacity: 0.48;
}

.sleep-generate-button:disabled,
.sleep-summary-button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    filter: grayscale(0.35);
    box-shadow: none;
}

.sleep-generate-button:disabled:hover,
.sleep-summary-button:disabled:hover {
    background: inherit;
    border-color: inherit;
}

input[type="text"],
textarea {
    color: #000;
}

input[type="text"]::placeholder,
textarea::placeholder {
    color: #000;
}

.sleep-lesson-box,
.sleep-lesson-box * {
    color: inherit;
    -webkit-tap-highlight-color: transparent;
    -moz-user-select: text;
    -webkit-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

.sleep-lesson-box a,
.sleep-lesson-box a:hover {
    color: inherit;
    text-decoration: underline;
}

.sleep-lesson-box:hover,
.sleep-lesson-box:hover * {
    color: inherit !important;
}

.sleep-lesson-box::selection,
.sleep-lesson-box *::selection {
    background: #9adff5;
    color: #111;
}

.sleep-status-text {
    font-size: 0.9rem;
    opacity: 0.8;
    display: inline;
    flex: 1 1 16rem;
}

.sleep-lesson-box {
    margin-top: 0.75rem;
    padding: 0.85rem 0.95rem;
    border-radius: 0.45rem;
    border: 1px solid rgba(0,0,0,0.2);
    background: rgba(255,255,255,0.92);
    color: #1e1e1e;
    font-size: 0.95rem;
    line-height: 1.45;
    white-space: normal;
    cursor: text;
}

.sleep-lesson-box strong {
    display: inline;
    margin: 0;
    font-weight: 700;
}

.sleep-lesson-box p {
    margin: 0;
}

.sleep-lesson-box p + p {
    margin-top: 1rem;
}

.sleep-translation-box {
    border-left: 3px solid #18bfef;
}

.sleep-translation-box h5 {
    margin: 0 0 0.75rem;
    font-size: 0.9rem;
    letter-spacing: 0;
}

.sleep-advice-typing {
    display: inline-flex;
    min-width: 2rem;
    align-items: baseline;
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1;
}

.sleep-advice-dot {
    opacity: 0.2;
    animation: sleep-advice-dot 1.2s infinite ease-in-out;
}

.sleep-advice-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.sleep-advice-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes sleep-advice-dot {
    0%, 60%, 100% {
        opacity: 0.2;
        transform: translateY(0);
    }
    30% {
        opacity: 1;
        transform: translateY(-0.12rem);
    }
}

.sleep-question-item textarea:disabled,
.sleep-rating-option input:disabled + span {
    cursor: not-allowed;
    opacity: 0.72;
}

@media (max-width: 900px) {
    .sleep-panel {
        padding: 1.25rem;
    }

    .sleep-auth-columns {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    #main > .sleep-course-page {
        padding-right: 1rem;
        padding-left: 1rem;
    }

    .sleep-page-title {
        padding-top: 1.5rem;
    }

    .sleep-course-page .sleep-page-title h1 {
        font-size: 2.35rem;
        line-height: 1.1;
    }

    .sleep-panel {
        padding: 0.75rem;
        border-radius: 0.5rem;
    }

    .sleep-auth-panel,
    .sleep-auth-form {
        padding: 0.75rem;
    }

    .sleep-auth-form input {
        font-size: 16px;
    }

    .sleep-question-item textarea {
        font-size: 13px;
    }

    .sleep-day-buttons {
        gap: 0.4rem;
    }

    .sleep-course-language-control {
        align-items: stretch;
        flex-direction: column;
    }

    .sleep-course-language-buttons {
        width: 100%;
    }

    .sleep-course-language-button {
        flex: 1;
        min-height: 2.6rem;
        min-width: 0;
    }

    .sleep-answer-meta {
        flex-direction: column;
        gap: 0.15rem;
    }

    .sleep-day-button {
        flex: 1 1 calc(50% - 0.5rem);
        min-width: 0;
        padding: 0.5rem 0.35rem;
        font-size: 0.85rem;
    }

    .sleep-day-button[data-day-id="day0-consent"],
    .sleep-day-button[data-day-id="day7-final"] {
        font-size: clamp(0.64rem, 2.9vw, 0.78rem);
        line-height: 1.15;
        overflow-wrap: anywhere;
        white-space: normal;
    }

    .sleep-actions,
    .sleep-translation-actions,
    .sleep-final-survey-actions {
        align-items: stretch;
        flex-direction: column;
        gap: 0.55rem;
    }

    .sleep-actions .sleep-status-text,
    .sleep-translation-actions .sleep-status-text {
        flex: 0 1 auto;
        width: 100%;
    }

    .sleep-actions + .sleep-lesson-box,
    .sleep-translation-actions + .sleep-translation-box {
        margin-top: 0.3rem;
    }

    .sleep-generate-button,
    .sleep-translate-button,
    .sleep-final-survey-submit,
    .sleep-auth-button {
        width: 100%;
        min-height: 2.75rem;
    }

    .sleep-consent-panel,
    .sleep-consent-section,
    .sleep-consent-confirmation {
        padding: 0.7rem;
    }

    .sleep-question-item > label,
    .sleep-question-translation,
    .sleep-consent-intro,
    .sleep-consent-section p,
    .sleep-consent-confirmation-en,
    .sleep-consent-translation,
    .sleep-final-survey-question,
    .sleep-final-survey-intro,
    .sleep-final-survey-intro-pl {
        font-size: clamp(1.008rem, calc(3.45vw + 3px), 1.108rem);
    }

    .sleep-consent-button-group {
        width: 100%;
        align-items: stretch;
    }

    .sleep-consent-button-group .sleep-consent-button-translation {
        text-align: center;
    }

    .sleep-consent-submit {
        width: 100%;
    }

    .sleep-consent-withdraw {
        width: 100%;
    }

    .sleep-consent-submit,
    .sleep-consent-withdraw {
        font-size: clamp(0.72rem, 3.2vw, 0.88rem);
        line-height: 1.2;
        overflow-wrap: anywhere;
        white-space: normal;
    }

    .sleep-lesson-box {
        padding: 0.75rem;
        font-size: calc(0.9rem + 3px);
        overflow-wrap: anywhere;
    }

    .sleep-final-survey-option span {
        font-size: calc(1rem + 3px);
    }

    .sleep-final-survey {
        padding: 0.75rem;
    }

    .sleep-final-survey-item {
        padding: 0.7rem;
    }

    .sleep-final-survey-options {
        width: 100%;
        gap: 0.35rem;
    }

    .sleep-final-survey-option span {
        min-height: 2.9rem;
    }
}
