*,
*::before,
*::after {
    box-sizing: border-box;
}


:root {
    --accent-color: #7A62C7;
    --accent-secondary-color: #a4b4e5e6;
    --accent-secondary-color: #8d87d4db;

    --accent-shadow: 5px 7px 0 0 rgba(122, 98, 199, 0.9);
    /*border-color: #7A62C7;*/

    /*box-shadow: 5px 7px 0 0 rgba(122, 98, 199, 0.9);*/
}

html,
body {
    /*min-height: 100vh;*/
    min-height: -webkit-fill-available;
    margin: 0;
    padding: 0;

    background-color: #f5efe0;
    background-image: radial-gradient(ellipse at 8% 18%, rgba(255, 255, 255, 26%), transparent 14.5%) ,radial-gradient(ellipse at 90% 59%, rgba(255, 255, 255, 45%), transparent 45%), repeating-linear-gradient(0deg, transparent, transparent 35px, rgba(120, 152, 200, 0.16) 36px)
    /*background-image: radial-gradient(ellipse at 20% 30%, rgba(255, 255, 255, 0.45), transparent 45%), repeating-linear-gradient(0deg, transparent, transparent 35px, rgba(120, 152, 200, 0.16) 36px);*/
    /*background-image: radial-gradient(ellipse at 20% 0%, rgba(255, 255, 255, 0.45), transparent 45%), repeating-linear-gradient(0deg, transparent, transparent 35px, rgba(120, 152, 200, 0.16) 36px);*/
}

body {
    background-color: #f5efe0;
    color: #26241f;
    font-family: "Nunito", "Jost", sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.post-wrapper {
    height: 100%;
    min-height: 100vh;
    background-color: #f5efe0;
    background-image: radial-gradient(ellipse at 20% 0%, rgba(255, 255, 255, 0.45), transparent 45%),
    repeating-linear-gradient(0deg, transparent, transparent 35px, rgba(120, 152, 200, 0.16) 36px);
}

.post-page {
    height: 100%;
    min-height: 100vh;
    position: relative;
    max-width: 820px;
    margin: 0 auto;
    padding: 48px 40px 60px;
}

.post-page::before {
    content: "";
    position: absolute;
    top: 8px;
    bottom: 8px;
    left: 0;
    width: 3px;
    background: rgba(214, 116, 106, 0.5);
}

.post-crumb {
    margin: 0 0 18px;
    font-size: 14px;
    font-weight: 600;
    color: #6b6455;
}

.post-crumb a {
    color: #7A62C7;
    text-decoration: none;
}

.post-crumb a:hover {
    text-decoration: underline;
}

.post-title {
    margin: 0 0 12px;
    font-size: 38px;
    line-height: 1.06;
    font-weight: 900;
    letter-spacing: 0.2px;
    color: #26241f;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    margin: 0 0 28px;
    font-size: 14px;
    font-weight: 600;
    color: #8a8271;
}

.post-meta .post-category {
    display: inline-flex;
    padding: 2px 12px;
    border-radius: 999px;
    background: #ece6ff;
    color: #5d49ad;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

.post-cover {
    margin: 0 0 28px;
    border: 3px solid #26241f;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 5px 7px 0 0 rgba(38, 36, 31, 0.9);
}

.post-cover img {
    display: block;
    width: 100%;
    max-height: 480px;
    object-fit: cover;
}

.post-prose {
    font-size: 17px;
    line-height: 1.7;
    color: #2c2a24;
}

.post-prose > *:first-child {
    margin-top: 0;
}

.post-prose h1,
.post-prose h2,
.post-prose h3 {
    font-weight: 900;
    line-height: 1.2;
    color: #26241f;
}

.post-prose h2 {
    margin: 34px 0 12px;
    font-size: 26px;
}

.post-prose h3 {
    margin: 26px 0 10px;
    font-size: 21px;
}

.post-prose p {
    margin: 16px 0;
}

.post-prose a {
    color: #7A62C7;
    text-decoration: none;
    border-bottom: 2px solid rgba(122, 98, 199, 0.35);
}

.post-prose a:hover {
    border-bottom-color: #7A62C7;
}

.post-prose ul,
.post-prose ol {
    padding-left: 24px;
}

.post-prose li {
    margin: 6px 0;
}

.post-prose blockquote {
    margin: 20px 0;
    padding: 12px 18px;
    border-left: 4px solid #e0a93b;
    background: #fffdf6;
    border-radius: 8px;
    color: #4a463c;
}

.post-prose pre,
.post-prose code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.post-prose pre {
    padding: 14px 16px;
    border-radius: 10px;
    background: #26241f;
    color: #f4ecd7;
    overflow-x: auto;
}

.post-block {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px dashed #d8cba9;
}

.post-builder {
    font-size: 17px;
    line-height: 1.7;
    color: #2c2a24;
}

.post-builder > *:first-child {
    margin-top: 0;
}

.post-footer {
    margin-top: 48px;
    padding-top: 20px;
    font-size: 14px;
    color: #8a8271;
}

.post-footer a {
    color: #7A62C7;
}

@media (max-width: 812px) {
    .post-page {
        padding: 28px 22px 46px;
    }

    .post-title {
        font-size: 30px;
    }

    .post-page::before {
        display: none;
    }
}

/* Shared UI components based on backend style */

.page-title {
    margin: 0 0 12px;
    font-size: 38px;
    line-height: 1.06;
    font-weight: 900;
    letter-spacing: 0.2px;
    color: #26241f;
}

.content-wrapper {
    min-height: 100vh;
    /*background-color: #f5efe0;*/
    /*background-image: radial-gradient(ellipse at 20% 0%, rgba(255, 255, 255, 0.45), transparent 45%),*/
    /*repeating-linear-gradient(0deg, transparent, transparent 35px, rgba(120, 152, 200, 0.16) 36px);*/
}

@media (max-width: 812px) {
    .content-wrapper {
        margin-top: 8px;
    }

    .content-wrapper .title {
        margin-top: 0;
    }
}

.content-container {
    position: relative;
    width: 100%;
    max-width: 820px;
    margin: 0 auto;
    padding: 0 40px 60px;
}

.content-container::before {
    content: "";
    position: absolute;
    top: 8px;
    bottom: 8px;
    left: 0;
    width: 3px;
    background: rgba(214, 116, 106, 0.5);
}

@media (max-width: 812px) {
    .content-container {
        padding: 28px 22px 46px;
        padding-top: 12px;
    }

    .content-container::before {
        display: none;
    }
}

/* Vocabulary Page Styles */
.user-words-header {

    /*position: fixed;*/
    /*top: 0;*/
    /*left: 0;*/
    /*right: 0;*/
    width: 100%;
    z-index: 14;

    /*padding-top: 14px;*/
    padding-bottom: 14px;
    padding-bottom: 30px;

    /*background-color: #f5efe0;*/
    /*background-image: radial-gradient(ellipse at 20% 0%, rgba(255, 255, 255, 0.45), transparent 45%), repeating-linear-gradient(0deg, transparent, transparent 35px, rgba(120, 152, 200, 0.16) 36px);*/
    /*border-bottom: 2px solid rgba(38, 36, 31, 0.14);*/

    display: flex;
}

.user-words-header-inner {
    width: 100%;
    max-width: 820px;
    margin: 0 auto;
    /*padding-left: 40px;*/
    /*padding-right: 40px;*/
}

.user-words-header-left {
    width: 100%;
}

.user-words-header-right {
    margin-left: auto;
}

.new-word-input-label {
    display: inline-flex;
    position: relative;
    width: 100%;
}

/*.new-word-input-label:before {*/
/*    content: '';*/
/*    width: 100%;*/
/*    height: 100%;*/

/*    position: absolute;*/
/*    left: -10px;*/
/*    top: -10px;*/

/*    border-radius: 10px;*/
/*    background-color: #ffdd58;*/
/*}*/

.new-word-input {
    z-index: 1;
    appearance: none;
    -webkit-appearance: none;
    display: flex;
    box-sizing: border-box;

    width: 100%;
    min-height: 80px;

    padding-top: 18px;
    padding-bottom: 18px;
    padding-left: 65px;
    padding-right: 96px;
    line-height: 20px;
    font-size: 20px;
    font-family: Jost;
    letter-spacing: 1.2px;
    border: none;
    background-color: #fffdf6;

    /*border: 3px solid #26241f;*/
    /*box-shadow: 5px 7px 0 0 #26241f;*/
    border: 4px solid #262420;
    box-shadow: 14px 10px 0 0 rgb(38 36 32);

    border-radius: 11px;
    transition: 0.2s ease;
}

.new-entity-input-wrapper {
    width: 100%;
}

@media (max-width: 500px) {
    .new-entity-input-wrapper {
        width: 100%;
    }

    .new-word-input-label {
        width: 100%;
    }

    .new-word-input {
        width: 100%;
    }
}

.new-word-input-button {
    position: absolute;
    right: 13px;
    top: 50%;
    height: 50px;
    width: 70px;
    transform: translateY(-50%);

    cursor: pointer;
    border: none;
    background-color: #997fcb;
    background-color: #ca90ff;

    color: white;
    font-weight: 800;
    font-size: 14px;
    border-radius: 6px;
    box-shadow: 2px 2px 4px -2px rgba(0, 0, 0, 0.4);
}

.new-word-input-button:hover {
    background-color: #9c5fd4;
}

.new-word-input:focus {
    outline: none;
    border-color: #7A62C7;
    /*box-shadow: 13px 10px 0 0 rgba(122, 98, 199, 0.9);*/
    box-shadow: 5px 6px 0 0 rgba(122, 98, 199, 0.9);

}



.new-word-input-label .new-input-left-icon {
    position: absolute;
    left: 18px;
    top: 54%;
    transform: translateY(-50%);
    scale: 1.2;
    z-index: 10;
}

.user-word--add-button {

}

.new-word-input-label .new-input-left-icon.base-emoji {
    transform: translateY(-44%);
}

.vocabulary-screen .page-title {
    padding-left: 30px;
    padding-right: 30px;
    text-align: center;
}

@media (max-width: 812px) {
    .vocabulary-screen .title {
        margin-bottom: 12px;
    }
}

.vocabulary-list {
    /*max-width: 700px;*/
    width: 100%;
    padding: 0;
    margin: 0 !important;
    /*margin-left: auto;*/
    /*margin-right: auto;*/
    /*margin-bottom: 0px;*/

    list-style-type: none;
    text-align: left;
}

@media (max-width: 1000px) {
    .user-words-header {
        /*padding-left: 14px;*/
        /*padding-right: 14px;*/
    }

    .user-words-header-right {
        display: none;
    }
}

@media (max-width: 812px) {
    .vocabulary-list {
        max-width: 100%;
    }
}

/* Exercises Page Styles */
.exercises-screen {
    min-height: 100vh;
    /*background-color: #f5efe0;*/
    /*background-image: radial-gradient(ellipse at 20% 0%, rgba(255, 255, 255, 0.45), transparent 45%),*/
    /*repeating-linear-gradient(0deg, transparent, transparent 35px, rgba(120, 152, 200, 0.16) 36px);*/
}

.exercises-screen .page-title {
    margin-top: 0;
    margin-bottom: 28px;
    text-align: left;
}

.exercises-wrapper {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    column-gap: 20px;
    row-gap: 24px;
    max-width: 820px;
    width: 100%;
    margin: 0 auto;
}

.exercises-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 24px 14px 20px 20px;
    min-height: 185px;
    border-radius: 14px;
    /*border: 3px solid #26241f;*/
    border: 5px solid #fffaf0;
    background-color: #faf6fd;
    box-shadow: 3px 4px 0 0 rgba(38, 36, 31, 0.9);
    text-decoration: none;
    cursor: pointer;
    transition: 0.2s ease;
}

.exercises-card:hover {
    /*box-shadow: none;*/
    /*transform: translateY(5px);*/
}

.exercise-card-locked {
    opacity: 0.6;
    pointer-events: none;
}

.exercises-card__small {
    position: relative;
    align-items: start;
    width: 100%;
    background-position: center;
    background-size: contain;
}

.exercises-card__big {
    width: 100%;
}

.exercises-title {
    position: relative;
    z-index: 2;
    align-self: flex-start;
    margin-top: 0;
    margin-bottom: 10px;
    padding: 5px 10px 5px;

    font-size: 22px;
    color: white;
    font-weight: 800;
    line-height: 1.2;
    border-radius: 10px;
    box-shadow: 0px 4px 0 0 #ded5ffe6 !important;

    background-color: #fff8e5 !important;
    color: #262420 !important;

    text-decoration: none;
    transition: 0.2s ease;
}

.exercises-card:hover .exercises-title {
    transform: translateY(4px);
}

.card-link--intensive .exercises-title {
    background-color: #7A62C7;
    box-shadow: 0px 4px 0 0 #5d49ad;
    color: #fff;
}

.card-link--sprint .exercises-title {
    background-color: #bbcfff;
    box-shadow: 0px 4px 0 0 rgb(148 170 225);
    color: #26241f;
}

.card-link--motor .exercises-title {
    background-color: #fff67a;
    box-shadow: 0px 4px 0 0 rgb(218 210 89);
    color: #26241f;
}

.card-link--cards-target,
.card-link--cards-target .exercises-title,
.card-link--cards-base,
.card-link--cards-base .exercises-title {
    background-color: #fcffd5;
    /*background-color: #fcc878;*/
    /*box-shadow: 0px 4px 0 0 rgb(213 165 92);*/
    /*color: #26241f;*/
}

.card-link--audio-pairs-base .exercises-title,
.card-link--audio-pairs-target .exercises-title {
    background-color: #7cff6b;
    box-shadow: 0px 4px 0 0 rgb(87 206 72);
    color: #26241f;
}

.exercises-subtitle {
    position: relative;
    z-index: 2;
    display: inline-flex;
    margin-top: 12px;
    margin: 0;
    padding: 5px 8px;
    border-radius: 999px;
    color: #5d49ad;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    background-color: #ece6ffab;
}

.exercises-subtitle-language {
    align-items: center;
    display: inline-flex;
}

.exercises-subtitle-language .icon {
    width: 24px;
    height: 23px;
}

.exercises-subtitle-separator {
    font-size: 20px;
    margin-left: 5px;
    margin-right: 3px;
}

.card-link--intensive {
    background-color: #ffcb3f;
    grid-column-start: 1;
    grid-column-end: 11;
}

.card-link--cards-base {
    grid-column-start: 1;
    grid-column-end: 4;
}

.card-link--cards-target {
    grid-column-start: 4;
    grid-column-end: 7;
}

.card-link--sprint {
    background-color: #bef1ff;
    grid-column-start: 7;
    grid-column-end: 11;
}

.card-link--audio-pairs-base {
    background-color: #c4beff;
    grid-column-start: 5;
    grid-column-end: 8;
}

.card-link--audio-pairs-target {
    background-color: #c4beff;
    grid-column-start: 8;
    grid-column-end: 11;
}

.card-link--motor {
    grid-column: 1 / 5;
    grid-row-start: 3;
}

@media (max-width: 812px) {
    .exercises-wrapper {
        column-gap: 10px;
        row-gap: 18px;
    }

    .card-link--intensive {
        grid-column-start: 1;
        grid-column-end: 11;
    }

    .card-link--cards-target {
        grid-row-start: 2;
        grid-column-start: 1;
        grid-column-end: 6;
    }

    .card-link--cards-base {
        grid-row-start: 2;
        grid-column-start: 6;
        grid-column-end: 11;
    }

    .card-link--sprint {
        grid-row-start: 3;
        order: unset;
        grid-column: 1 / -1;
        grid-column-start: 1;
        grid-column-end: 11;
    }

    .card-link--audio-pairs-base {
        grid-row-start: 4;
        grid-column-start: 6;
        grid-column-end: 11;
    }

    .card-link--audio-pairs-target {
        grid-row-start: 4;
        grid-column-start: 1;
        grid-column-end: 6;
    }

    .card-link--motor {
        grid-row-start: 5;
        grid-column: 1 / -1;
    }

    .exercises-screen {
        margin-top: 5px;
        padding-top: 5px;
    }

    .exercises-card {
        padding-top: 18px;
        padding-left: 24px;
        padding-bottom: 25px;
        min-height: 185px;
        text-align: left;
    }

    .exercises-title {
        margin-bottom: 12px;
    }
}

/* Card/Input styles matching backend */
.input-field {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #26241f;
    border-radius: 10px;
    background: #fffdf6;
    font-family: "Nunito", "Jost", sans-serif;
    font-size: 16px;
    color: #26241f;
    box-shadow: 3px 4px 0 0 rgba(38, 36, 31, 0.9);
    transition: all 0.2s ease;
}

.input-field:focus {
    outline: none;
    border-color: #7A62C7;
    box-shadow: 3px 4px 0 0 #7A62C7;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: 3px solid #26241f;
    border-radius: 10px;
    background: #fffdf6;
    color: #26241f;
    font-family: "Nunito", "Jost", sans-serif;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 3px 4px 0 0 rgba(38, 36, 31, 0.9);
    transition: all 0.15s ease;
    text-decoration: none;
}

.btn:hover {
    box-shadow: none;
    transform: translateY(3px);
}

.btn:active {
    box-shadow: none;
    transform: translateY(3px);
}

.btn-primary {
    background: #7A62C7;
    border-color: #5d49ad;
    color: white;
    box-shadow: 3px 4px 0 0 #5d49ad;
}

.btn-primary:hover {
    background: #5d49ad;
}

.btn-secondary {
    background: #fcc878;
    border-color: #e0a93b;
    color: #26241f;
    box-shadow: 3px 4px 0 0 #e0a93b;
}

.btn-secondary:hover {
    background: #e0a93b;
}

.btn .btn-icon {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    flex-shrink: 0;
}

/* Cards for vocabulary items */
.vocabulary-item {
    position: relative;
    padding: 20px;
    margin-bottom: 12px;
    border: 3px solid #26241f;
    border-radius: 14px;
    background: #fffdf6;
    box-shadow: 5px 7px 0 0 rgba(38, 36, 31, 0.9);
    transition: all 0.2s ease;
}

.vocabulary-item:hover {
    box-shadow: none;
    transform: translateY(5px);
}

/* Badge styles */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 12px;
    border-radius: 999px;
    background: #ece6ff;
    color: #5d49ad;
    font-size: 12px;
    font-weight: 800;
}

.badge-success {
    background: #d2e8e0;
    color: #2c2a24;
}

.badge-error {
    background: #dfd6d6;
    color: #2c2a24;
}

/* ---- word-card (backend sketchbook card) ---- */

.word-card {
    position: relative;
    margin: 6px 0;
    padding: 26px 24px 22px 24px;
    /*max-width: 620px;*/
    border: 0px solid var(--accent-secondary-color);
    border-radius: 14px;
    background-color: #fffdf6;
    box-shadow: 0px 0px 0 0 var(--accent-secondary-color);
    transform: rotate(-0.6deg);
    font-family: "Nunito", ui-sans-serif, system-ui, sans-serif;
    color: #26241f;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

@media (max-width: 812px ) {
    .word-card {
        position: relative;
        margin: 6px 0;
        padding: 22px 14px 14px 14px;
        }
}

.word-card.user-vocabulary-item {
    padding: 12px 24px 12px;
}

.word-card:hover {
    transform: rotate(-0.6deg) translateY(-3px);
    box-shadow: 6px 4px 0 0 rgba(38, 36, 31, 0.9);
}


@media (max-width: 812px) {
    .word-card {
        margin: 4px 0;
    }

    .word-card.user-vocabulary-item {
        padding-left: 8px;
        padding-right: 12px;
    }

    .word-card:hover {
        transform: rotate(-0.6deg) translateY(-3px);
        /*box-shadow: 5px 6px 0 0 rgba(38, 36, 31, 0.9);*/
        box-shadow: 5px 6px 0 0 #a4b4e5e6;
    }
}

.word-card-tape {
    display: none;
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%) rotate(-3deg);
    width: 92px;
    height: 30px;
    border-radius: 4px;
    border: 2.5px solid rgba(38, 36, 31, 0.9);
    background-color: #e0a93b;
    background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.35) 0 6px, transparent 6px 12px);
    opacity: 0.92;
    pointer-events: none;
}


.word-card-head {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 10px;

}

.word-card-word {
    font-size: 34px;
    line-height: 1.05;
    font-weight: 900;
    color: #26241f;
}

.word-card-transcription {
    font-size: 17px;
    font-weight: 600;
    color: #7A62C7;
}

.word-card-lang {
    margin-left: auto;
    padding: 3px 10px;
    border: 2px solid #26241f;
    border-radius: 999px;
    background: #dceddc;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    color: #1f7a63;
}

.word-card-direction {
    padding: 3px 10px;
    border: 2px dashed #7A62C7;
    border-radius: 999px;
    background: #fffdf6;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    color: #7A62C7;
}

.word-card-meanings {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.word-card-meaning {
    padding: 4px 12px;
    border-radius: 999px;
    background: #ece6ff;
    font-size: 14px;
    font-weight: 700;
    color: #5d49ad;
}

.word-card-meaning--muted {
    background: #f2ecdb;
    color: #8a8271;
}

.word-card-examples {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 2px dashed #d8cba9;
}

.word-card-sentence {
    margin: 6px 0;
    font-size: 15px;
    line-height: 1.5;
    color: #3d3a32;
}

.word-card-missing {
    padding: 6px 0;
    font-size: 15px;
    font-weight: 600;
    color: #a04a3c;
    text-decoration: line-through;
}

/* Actions row inside a word-card (pronounce / add / known buttons) */
.word-card-actions {
    display: flex;
    align-items: center;
    justify-content: end;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 2px dashed #d8cba9;
}


.title {
    display: block;
    width: 100%;
    margin: 30px 0 26px;

    font-size: 38px;
    font-weight: 900;
    line-height: 1.06;
    letter-spacing: 0.2px;
    color: #26241f;
    text-align: left;
}

@media (max-width: 812px) {
    .title {
        font-size: 30px;
    }
}


/* Normalize top offset of the first content across content pages */
.content-wrapper.page-top-18 {
    margin-top: 0;
    padding-top: 28px;
}

.content-wrapper.page-top-18 .content-container {
    padding-top: 0;
}

.content-wrapper.page-top-18 .title {
    margin-top: 20px;
}

@media(max-width: 812px) {
    .content-wrapper.page-top-18 {
        margin-top: 0;
        padding-top: 18px;
    }

    .content-wrapper.page-top-18 .content-container {
        padding-top: 0;
    }

    .content-wrapper.page-top-18 .title {
        margin-top: 0;
    }
}


.container {
    position: relative;
    width: 100%;
    max-width: 820px;
    margin: 0 auto;
    padding: 48px 40px 60px;
}

.meta {
    margin-top: 0px;
    margin-bottom: 10px;
    font-size: 20px;
    margin-bottom: 0;
    text-align: left;
}


