body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
}

h1, h2 {
    color: #333;
}

a {
    color: blue;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.button {
    display: inline-block;
    padding: 10px 15px;
    background-color: #241715;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
}

.button:hover {
    background-color: #241715;
}

.button--sm {
    padding: 8px 12px;
}

@media (max-width: 600px) {
    body {
        padding: 10px;
    }
}

.bible-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.form-group {
    display: flex;
    align-items: center;
}

.dict-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    align-items: center;
    margin: 12px 0 8px;
}

.upload-form {
    display: flex;
    align-items: center;
}

.upload-form__input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.upload-feedback {
    margin: 0;
    font-weight: 600;
}

.upload-feedback--error {
    color: #a94442;
}

.upload-feedback--success {
    color: #2d7a3e;
}

.upload-help {
    margin: 8px 0 16px;
    padding: 12px;
    background: #f7f7f7;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
}

.upload-help__hint {
    font-size: 14px;
    color: #555;
    margin-top: 6px;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
}

h1, h2 {
    color: #333;
}

a {
    color: blue;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.button {
    display: inline-block;
    padding: 10px 15px;
    background-color: #241715;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
}

.button:hover {
    background-color: #241715;
}

@media (max-width: 600px) {
    body {
        padding: 10px;
    }
}
.bible-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.form-group {
    display: flex;
    align-items: center;
}

.form-group label {
    margin-right: 5px;
}

@media (max-width: 600px) {
    .form-group {
        flex-basis: 100%;
    }
}

.button-container {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 10px;
    flex-wrap: wrap;
}

.button-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.nav-button {
    padding: 8px 12px;
    font-size: 14px;
    text-decoration: none;
    color: #f7f0e9;
    background-color: #2f1f1c;
    border: 1px solid #3d2a26;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
}

.nav-button:hover,
.nav-button:focus-visible {
    background-color: #3c2924;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.nav-button--active {
    background-color: #4a342e;
    border-color: #6b473c;
    box-shadow: inset 0 0 0 1px #7d4b36, 0 2px 10px rgba(0, 0, 0, 0.25);
}

.toggle-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.toggle-button::after {
    content: '';
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #f5d0a6, #7d4b36 70%);
    box-shadow: 0 0 0 1px #2f1f1c;
}

.context-dropdown {
    position: relative;
}

.context-dropdown .nav-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.context-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 220px;
    background: #2f1f1c;
    border: 1px solid #3d2a26;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    padding: 8px;
    display: none;
    z-index: 10;
}

.context-dropdown.is-open .context-menu {
    display: grid;
    gap: 6px;
}

.context-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 6px;
    background: rgba(247, 240, 233, 0.04);
    color: #f7f0e9;
    cursor: pointer;
    transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.context-option:hover,
.context-option:focus-within {
    background: rgba(247, 240, 233, 0.08);
    box-shadow: inset 0 0 0 1px rgba(125, 75, 54, 0.35);
}

.context-option input[type="checkbox"] {
    accent-color: #d9aa6f;
    width: 16px;
    height: 16px;
}


.highlighted-word {
    position: relative;
    cursor: pointer;
    padding: 0 4px;
    border-radius: 6px;
    font-weight: 600;
}

.transliterated {
    position: relative;
}

.transliterated::after {
    content: attr(data-original);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #2f1f1c;
    color: #f7f0e9;
    padding: 5px;
    border-radius: 3px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    z-index: 2;
}

.transliterated:hover::after {
    opacity: 1;
    visibility: visible;
}

.heatmap-focus-word {
    color: #b21b12 !important;
    text-shadow: 0 0 0.5px rgba(0, 0, 0, 0.25);
}


.repeated {
    font-weight: 700;
}

.uncommon-word {
    position: relative;
    text-decoration: underline wavy #b21b12;
    text-decoration-thickness: 2px;
    text-underline-offset: 0.16em;
    box-shadow: inset 0 -2px 0 rgba(178, 27, 18, 0.18);
    border-radius: 2px;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font: inherit;
    cursor: pointer;
}

.uncommon-word::after {
    content: attr(data-uncommon-info);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 6px);
    transform: translateX(-50%);
    white-space: nowrap;
    background: #2f1f1c;
    color: #f7f0e9;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.18s ease, visibility 0.18s ease, transform 0.18s ease;
    z-index: 4;
}

.uncommon-word:hover::after,
.uncommon-word:focus-visible::after {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -2px);
}

.uncommon-word:focus-visible {
    outline: 2px solid rgba(178, 27, 18, 0.6);
    outline-offset: 3px;
}

.literary-hidden .repeated {
    color: inherit !important;
    text-shadow: none !important;
    font-weight: inherit;
}

.hide-bolded .highlighted-word:not(.repeated) {
    font-weight: 400;
    background: none !important;
    color: inherit !important;
    border: none !important;
    padding: 0;
}

.hide-bolded .highlighted-word:not(.repeated):not(.transliterated)::after {
    display: none;
}

.hide-repeats .repeated {
    color: inherit !important;
    background: none !important;
    border: none !important;
    text-shadow: none !important;
    font-weight: inherit;
}

.hide-repeats:not(.hide-bolded) .repeated.transliterated {
    font-weight: 600;
}

.hide-uncommon .uncommon-word {
    text-decoration: none !important;
    box-shadow: none !important;
}
.hide-uncommon .uncommon-word::after {
    display: none !important;
}

.hide-book-overview .unit-progress {
    display: none;
}

.hide-literary-units .unit-overlay-wrapper,
.hide-literary-units .bar-overlay,
.hide-literary-units .literary-bars {
    display: none !important;
}

@media (max-width: 640px) {
    .context-menu {
        left: 0;
        right: auto;
        width: min(90vw, 260px);
    }
}

.unit-progress {
    margin: 12px 0 16px;
}

.progress-pill {
    background: linear-gradient(135deg, rgba(47, 31, 28, 0.9), rgba(36, 23, 21, 0.9));
    border: 1px solid #3d2a26;
    color: #f7f0e9;
    border-radius: 12px;
    padding: 12px 14px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2);
}

.pill-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 8px;
}

.pill-unit {
    font-weight: 700;
    letter-spacing: 0.4px;
}

.pill-percent {
    font-size: 13px;
    color: #f0d8c4;
}

.progress-bar {
    position: relative;
    width: 100%;
    height: 10px;
    background: rgba(61, 42, 38, 0.7);
    border-radius: 999px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.35);
}

.progress-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    background: linear-gradient(90deg, #7d4b36, #d9aa6f);
    border-radius: 999px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.sparkline {
    display: flex;
    gap: 4px;
    margin-top: 10px;
}

.spark-segment {
    flex: 1;
    min-width: 4px;
    height: 8px;
    background: rgba(47, 31, 28, 0.6);
    border-radius: 2px;
    box-shadow: inset 0 0 0 1px rgba(61, 42, 38, 0.6);
    opacity: 0.6;
}

.spark-segment.is-complete {
    background: linear-gradient(180deg, #d9aa6f, #7d4b36);
    opacity: 1;
}

.legend-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid #3d2a26;
    background: rgba(36, 23, 21, 0.7);
    color: #f7f0e9;
    font-size: 12px;
    letter-spacing: 0.2px;
}

.legend-chip .chip-swatch {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: linear-gradient(135deg, #d9aa6f, #7d4b36);
    box-shadow: 0 0 0 1px rgba(61, 42, 38, 0.7);
}

.unit-overlay-wrapper {
    position: relative;
    margin-bottom: 16px;
}

.unit-overlay-shell {
    position: relative;
    padding: 16px 14px;
    border-radius: 10px;
    border-left: 6px solid transparent;
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.unit-overlay-wrapper.overlay-enabled .unit-overlay-shell {
    background: linear-gradient(90deg, rgba(36, 23, 21, 0.16), rgba(36, 23, 21, 0.05));
    border-color: #7d4b36;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 6px 16px rgba(0, 0, 0, 0.18);
}

.unit-overlay-shell::before {
    content: '';
    position: absolute;
    inset: 6px;
    border-radius: 8px;
    pointer-events: none;
    background: linear-gradient(135deg, rgba(125, 75, 54, 0.07), rgba(217, 170, 111, 0.05));
    opacity: 0;
    transition: opacity 0.2s ease;
}

.unit-overlay-wrapper.overlay-enabled .unit-overlay-shell::before {
    opacity: 1;
}
.unit-overlay-meta {
    margin-bottom: 12px;
    font-size: 14px;
}
.unit-overlay-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 6px;
}
.unit-chip {
    display: inline-block;
    padding: 4px 8px;
    border: 1px solid #7d4b36;
    border-radius: 8px;
    font-weight: 600;
    margin-right: 8px;
}
.unit-chip-range {
    color: #4b3a34;
    font-size: 13px;
}
.muted {
    color: #6b5d58;
}
.is-hidden {
    display: none;
}
.reading-shell {
    position: relative;
    padding-left: calc(var(--bar-offset, 16px) + 8px);
    padding-right: 8px;
}
.bar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    display: block;
    pointer-events: none;
    z-index: 0;
}
.bar-overlay-segment {
    position: absolute;
    width: 6px;
    border-radius: 6px;
    background: var(--bar-color, #7d4b36);
    box-shadow: 0 0 0 1px rgba(36, 23, 21, 0.12), 0 2px 6px rgba(0, 0, 0, 0.08);
}
.verse-list {
    position: relative;
    z-index: 1;
}
.verse-row {
    display: flex;
    gap: 6px;
    align-items: flex-start;
    padding: 4px 0;
}
.verse-text {
    flex: 1;
}
.verse-num {
    font-weight: 600;
    margin-right: 4px;
}
.literary-hidden #literary-context,
.literary-hidden .literary-bars,
.literary-hidden .bar-overlay {
    display: none !important;
}
.chapter-bar {
    margin: 10px 0 20px;
    padding: 10px;
    background: #f7f7f5;
    border: 1px solid #e0dfda;
    border-radius: 6px;
}

.chapter-range-label {
    font-size: 14px;
    color: #4a4741;
    margin-bottom: 8px;
}

.chapter-track {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chapter-endpoint {
    font-size: 12px;
    color: #7a776f;
}

.chapter-steps {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 8px;
}

.chapter-step {
    margin: 0;
}

.chapter-link {
    width: 100%;
    padding: 8px 10px;
    font-size: 13px;
    color: #3d3a34;
    background: #ebeae6;
    border: 1px solid #d8d6ce;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.chapter-link:hover {
    background: #e0ded7;
    color: #2f2c28;
}

.chapter-link:disabled,
.chapter-link[disabled] {
    cursor: not-allowed;
    background: #f3f2ee;
    color: #b0ada6;
    border-color: #e7e5dd;
}

.chapter-current {
    text-align: center;
    padding: 10px;
    background: #fff;
    color: #2d2a26;
    border: 1px solid #d8d6ce;
    border-radius: 6px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
    font-weight: 600;
}

.heatmap-page h1 {
    margin-bottom: 12px;
}

.heatmap-form {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.heatmap-form input[type="text"] {
    padding: 6px 8px;
    border: 1px solid #d8d6ce;
    border-radius: 4px;
}

.heatmap-wrapper {
    margin: 10px 0 18px;
    overflow-x: auto;
}

.heatmap-table {
    border-collapse: collapse;
    width: 100%;
    min-width: 720px;
}

.heatmap-table th,
.heatmap-table td {
    border: 1px solid #d8d6ce;
    padding: 6px 8px;
    text-align: left;
    background: #fdfcf9;
}

.heatmap-table th:first-child {
    white-space: nowrap;
}

.heatmap-row-table {
    border-collapse: collapse;
    width: 100%;
}

.heatmap-row-table td {
    padding: 0;
    border: 1px solid #e7e4dd;
    width: 32px;
    height: 32px;
}

.heatmap-cell {
    position: relative;
    text-align: center;
}

.heatmap-cell__link,
.heatmap-cell__count {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #241715;
    text-decoration: none;
    font-weight: 700;
}

.heatmap-cell__count--empty {
    font-weight: 400;
}

.heatmap-cell.is-clickable .heatmap-cell__link {
    cursor: pointer;
}

.heatmap-cell.is-clickable:hover {
    box-shadow: inset 0 0 0 2px rgba(36, 23, 21, 0.18);
}

.heatmap-cell::after {
    content: attr(data-chapter);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translate(-50%, -6px);
    background-color: #2f1f1c;
    color: #f7f0e9;
    padding: 4px 7px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    pointer-events: none;
    z-index: 2;
}

.heatmap-cell:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -12px);
}

@media (max-width: 720px) {
    .heatmap-table {
        min-width: 0;
    }
}

.phonetic-card-panel {
    margin-top: 6px;
    display: grid;
    gap: 8px;
}

.phonetic-card-panel.is-collapsed {
    display: none;
}

.phonetic-card-shell {
    margin-top: 6px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.phonetic-toggle {
    align-self: flex-start;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #d8d6ce;
    background: #fffaf5;
    color: #2f1f1c;
    font-size: 13px;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.phonetic-toggle:hover,
.phonetic-toggle:focus-visible {
    background: #f7f0e9;
    border-color: #cbb9ac;
}

.phonetic-card {
    background: #f7f0e9;
    border: 1px solid #d8d6ce;
    border-radius: 8px;
    padding: 8px 10px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 2px 6px rgba(0, 0, 0, 0.08);
}

.phonetic-card__header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    color: #2f1f1c;
}

.device-label {
    font-weight: 700;
}

.device-meta {
    font-size: 12px;
    color: #5a4a44;
}

.phonetic-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.phonetic-chip {
    padding: 4px 8px;
    border-radius: 6px;
    background: rgba(125, 75, 54, 0.12);
    border: 1px solid rgba(125, 75, 54, 0.25);
    color: #2f1f1c;
    font-size: 12px;
    letter-spacing: 0.2px;
    cursor: pointer;
}

.phonetic-note {
    margin: 6px 0 0;
    font-size: 13px;
    color: #4b3a34;
}

.phonetic-hit {
    text-decoration: underline dotted #7d4b36;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
    box-shadow: inset 0 -2px 0 rgba(125, 75, 54, 0.16);
    border-radius: 2px;
}

.phonetic-hit--alliteration {
    text-decoration-style: dotted;
    text-decoration-color: #7d4b36;
}

.phonetic-hit--assonance {
    text-decoration-style: wavy;
    text-decoration-color: #4a342e;
}

.phonetic-hit--paronomasia {
    box-shadow: inset 0 -2px 0 rgba(217, 170, 111, 0.6);
}

.phonetic-hit--parallelism {
    border-bottom: 2px dashed #6b473c;
}

.phonetic-hit--climactic {
    text-decoration-style: double;
    text-decoration-color: #d9aa6f;
}

.phonetic-hit--root {
    box-shadow: inset 0 -2px 0 rgba(36, 23, 21, 0.18);
}

.phonetic-chip:hover {
    background: rgba(125, 75, 54, 0.2);
}

.highlighted-word.phonetic-focus {
    background: rgba(217, 170, 111, 0.28) !important;
    box-shadow: 0 0 0 1px rgba(125, 75, 54, 0.25);
    border-radius: 4px;
    padding: 0 2px;
}

.hide-bolded .highlighted-word.phonetic-focus {
    background: rgba(217, 170, 111, 0.32) !important;
    box-shadow: 0 0 0 1px rgba(125, 75, 54, 0.4);
    padding: 0 2px;
}

.hide-phonetics .phonetic-card-panel {
    display: none;
}

.hide-phonetics .phonetic-card-shell {
    display: none;
}

.hide-phonetics .phonetic-hit:not(.uncommon-word) {
    text-decoration: none !important;
    box-shadow: none !important;
    border-bottom: none !important;
}

/* Keep uncommon underline visible even when phonetic styling is toggled or layered */
.uncommon-word.phonetic-hit {
    text-decoration: underline wavy #b21b12;
    text-decoration-thickness: 2px;
    text-underline-offset: 0.16em;
    box-shadow: inset 0 -2px 0 rgba(178, 27, 18, 0.18);
}

.hide-phonetics .uncommon-word.phonetic-hit {
    text-decoration: underline wavy #b21b12 !important;
    text-decoration-thickness: 2px !important;
    text-underline-offset: 0.16em !important;
    box-shadow: inset 0 -2px 0 rgba(178, 27, 18, 0.18) !important;
}

.hide-phonetics.hide-uncommon .uncommon-word.phonetic-hit {
    text-decoration: none !important;
    text-decoration-thickness: initial !important;
    text-underline-offset: initial !important;
    box-shadow: none !important;
}

.bulk-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.selection-count {
    font-size: 14px;
    color: #444;
}

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 1000;
}

.toast {
    background: #333;
    color: #fff;
    padding: 10px 12px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    min-width: 200px;
}

.toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.toast--success {
    background: #2d7a3e;
}

.toast--error {
    background: #b6413f;
}

/* ===== Word Context Menu Popup ===== */

.word-popup {
    position: absolute;
    z-index: 100;
    width: 320px;
    max-width: calc(100vw - 24px);
    background: #fffaf5;
    border: 1px solid #e0d8d0;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

.word-popup.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.word-popup__header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid #e8e0d8;
    background: #f7f0e9;
    border-radius: 12px 12px 0 0;
}

.word-popup__title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #2f1f1c;
    letter-spacing: 0.5px;
    font-family: monospace;
}

.word-popup__status {
    font-size: 12px;
    font-weight: 600;
    color: #888;
    margin-left: auto;
}

.word-popup__status--active {
    color: #2d7a3e;
}

.word-popup__close {
    background: none;
    border: none;
    font-size: 22px;
    line-height: 1;
    color: #6b5d58;
    cursor: pointer;
    padding: 0 4px;
    margin-left: 4px;
    transition: color 0.15s ease;
}

.word-popup__close:hover,
.word-popup__close:focus-visible {
    color: #2f1f1c;
}

.word-popup__info {
    padding: 12px 14px;
    border-bottom: 1px solid #e8e0d8;
}

.word-popup__lemma {
    font-size: 24px;
    font-weight: 600;
    color: #3d2a26;
    margin-bottom: 6px;
    line-height: 1.3;
}

.word-popup__details {
    font-size: 13px;
    color: #5a4a44;
    line-height: 1.5;
}

.word-popup__form {
    padding: 12px 14px;
    border-bottom: 1px solid #e8e0d8;
}

.word-popup__label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #6b5a54;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.word-popup__input {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid #d8d0c8;
    border-radius: 6px;
    background: #fff;
    color: #2f1f1c;
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.word-popup__input:focus {
    outline: none;
    border-color: #a08878;
    box-shadow: 0 0 0 3px rgba(125, 75, 54, 0.12);
}

.word-popup__input::placeholder {
    color: #a09890;
}

.word-popup__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 14px;
}

.word-popup__btn {
    flex: 1;
    min-width: 90px;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 6px;
    border: 1px solid #d8d0c8;
    background: #fff;
    color: #3d2a26;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.word-popup__btn:hover,
.word-popup__btn:focus-visible {
    background: #f7f0e9;
    border-color: #c0b8b0;
}

.word-popup__btn:active {
    transform: scale(0.98);
}

.word-popup__btn--primary {
    background: #4a7c3e;
    border-color: #3d6832;
    color: #fff;
}

.word-popup__btn--primary:hover,
.word-popup__btn--primary:focus-visible {
    background: #3d6832;
    border-color: #2d5026;
}

/* Responsive adjustments for word popup */
@media (max-width: 400px) {
    .word-popup {
        width: calc(100vw - 24px);
        left: 12px !important;
        right: 12px;
    }

    .word-popup__actions {
        flex-direction: column;
    }

    .word-popup__btn {
        min-width: 100%;
    }
}
