/* ── Hebra Cemetery — frontend styles ───────────────────────────────────── */

/* Search form */
.hebra-search-wrap {
    font-family: inherit;
}

.hebra-search-header {
    margin-bottom: 16px;
}

.hebra-search-title {
    font-size: 22px;
    font-weight: 700;
    color: #c9a84c;
    margin: 0 0 6px 0;
    padding: 0;
    letter-spacing: 0.02em;
}

.hebra-search-instructions {
    font-size: 14px;
    color: #7a7268;
    margin: 0;
    line-height: 1.5;
}

.hebra-search-form {
    background: #f7f4ee;
    border: 1px solid #ede8df;
    border-radius: 14px;
    padding: 24px 28px 20px;
    margin-bottom: 20px;
}

.hebra-fields {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

@media (max-width: 640px) {
    .hebra-fields { grid-template-columns: 1fr; margin-bottom: 12px; }
}

.hebra-field label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 6px;
    color: #7a7268;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.hebra-field input,
.hebra-field select {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #ddd8ce;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    color: #3a3530;
    box-sizing: border-box;
    transition: border-color 0.15s, box-shadow 0.15s;
    -webkit-appearance: none;
    appearance: none;
}

.hebra-field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 32px;
}

.hebra-field input:focus,
.hebra-field select:focus {
    border-color: #c9a84c;
    outline: none;
    box-shadow: 0 0 0 3px rgba(201,168,76,0.15);
}

.hebra-form-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.hebra-btn {
    padding: 9px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background 0.15s, transform 0.1s;
}
.hebra-btn:active { transform: scale(0.98); }

.hebra-btn-search {
    background: #c9a84c;
    color: #fff;
    letter-spacing: 0.02em;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.hebra-btn-search:hover { background: #a07828; }

/* Spinning Star of David in search button */
@keyframes hebra-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
.hebra-star-spin {
    animation: hebra-spin 5s linear infinite;
    flex-shrink: 0;
    display: block;
}

.hebra-btn-clear {
    background: transparent;
    color: #8a8278;
    border: 1px solid #ddd8ce;
}
.hebra-btn-clear:hover { background: #ede8df; color: #4a4540; }

/* Grid ref chip */
.hs-grid-ref-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fdf8ee;
    border: 2px solid #c9a84c;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 700;
    color: #a8862e;
    padding: 6px 14px;
    min-height: 40px;
    min-width: 56px;
}

/* Status */
.hebra-status {
    min-height: 22px;
    font-size: 13px;
    color: #7a7268;
    margin-bottom: 10px;
}

.hebra-hint {
    color: #a8a098;
    font-style: italic;
    margin: 0;
    font-size: 14px;
}

/* No results */
.hebra-no-results {
    padding: 32px;
    text-align: center;
    color: #a8a098;
}
.hebra-no-results p { margin: 4px 0; }

/* Loading spinner */
.hebra-loading {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid #ddd8ce;
    border-top-color: #c9a84c;
    border-radius: 50%;
    animation: hs-spin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}
@keyframes hs-spin { to { transform: rotate(360deg); } }

/* Pagination */
.hebra-pagination {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-top: 18px;
    flex-wrap: wrap;
}
.hebra-page-btn {
    padding: 6px 12px;
    border: 1px solid #ddd8ce;
    border-radius: 7px;
    background: #fff;
    color: #4a4540;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.hebra-page-btn:hover { background: #f7f4ee; border-color: #c9a84c; color: #a8862e; }
.hebra-page-btn.active { background: #c9a84c; border-color: #c9a84c; color: #fff; font-weight: 700; }

.hs-page-ellipsis { padding: 6px 4px; color: #b8a88a; font-size: 13px; }

/* ── Results table ───────────────────────────────────────────────── */

.hs-table-wrap {
    width: 100%;
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
    border: 1px solid #ede8df;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.hs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    min-width: 0;
    table-layout: fixed;
}

/* ── Unreadable graves section ──────────────────────────────────── */
.hs-unreadable-section {
    margin-top: 28px;
}
.hs-unreadable-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
    color: #92400e;
    margin: 0 0 4px;
}
.hs-unreadable-count {
    font-weight: 500;
    color: #a8862e;
    font-size: 13px;
}
.hs-unreadable-note {
    font-size: 12px;
    color: #9a9188;
    margin: 0 0 12px;
}
.hs-unreadable-section .hs-table-wrap {
    border-color: #f3d9a6;
    background: #fffaf0;
}

/* ── Header ─────────────────────────────────────────────────────── */
.hs-th {
    background: #f7f4ee;
    padding: 11px 10px;
    text-align: left;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #8a8278;
    border-bottom: 1px solid #ede8df;
    border-left: none !important;
    border-right: none !important;
    white-space: normal;
    word-break: break-word;
    vertical-align: bottom;
    cursor: pointer;
    user-select: none;
    transition: background 0.1s, color 0.1s;
    position: relative;
    line-height: 1.3;
}
.hs-th:hover { background: #f0ead8; color: #a8862e; }
.hs-th-photo { cursor: default; }
.hs-th-photo:hover { background: #f7f4ee; color: #8a8278; }
.hs-th-view  { cursor: default; }
.hs-th-view:hover  { background: #f7f4ee; }

/* ── Sort arrows ─────────────────────────────────────────────────── */
.hs-sort-arrow {
    display: inline-block;
    margin-left: 3px;
    opacity: 0.3;
    vertical-align: middle;
    flex-shrink: 0;
    transition: opacity 0.15s;
}
.hs-th:hover .hs-sort-arrow { opacity: 0.6; }
.hs-sort-asc,
.hs-sort-desc { color: #c9a84c; opacity: 1 !important; }

/* ── Rows ────────────────────────────────────────────────────────── */
.hs-row {
    cursor: pointer;
    transition: background 0.12s;
    border-bottom: 1px solid #f3efe8;
}
.hs-row:last-child { border-bottom: none; }
.hs-row:hover { background: #fdf8f0; }
.hs-row:hover .hs-name-link { color: #7a6020; }

/* ── Cells ───────────────────────────────────────────────────────── */
.hs-td {
    padding: 11px 10px;
    vertical-align: middle;
    color: #4a4540;
    border-left: none !important;
    border-right: none !important;
}

/* Name cell */
.hs-td-name { width: 13%; min-width: 120px; }
.hs-th-name { width: 13%; min-width: 120px; white-space: nowrap; }
.hs-name-link {
    font-weight: 600;
    color: #c9a84c;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.1s;
}
.hs-name-link:hover { color: #7a6020; text-decoration: none; }
.hs-view-link, .hs-view-link:visited, .hs-view-link:focus { text-decoration: none !important; }
.hs-gender { display: none; }
.hs-heb {
    display: block;
    font-size: 11px;
    color: #b8a88a;
    direction: rtl;
    margin-top: 3px;
}

/* Gender */
.hs-td-gender { font-size: 11px; color: #8a8278; width: 48px; }
.hs-th-gender { width: 48px; }

/* Date / age / grid cells */
.hs-td-dod, .hs-td-dob { color: #4a4540; width: 120px; min-width: 100px; font-size: 12px; white-space: nowrap; }
.hs-th-dob, .hs-th-dod { white-space: nowrap; width: 120px; min-width: 100px; }
.hs-heb-date {
    font-size: 11px;
    color: #c9a84c;
    direction: rtl;
    margin-top: 3px;
    line-height: 1.3;
}
.hs-td-age  { text-align: center; color: #8a8278; width: 40px; font-size: 12px; }
.hs-th-age  { width: 40px; white-space: nowrap; }
.hs-td-grid { font-weight: 700; color: #c9a84c; text-align: center; width: 55px; font-size: 13px; letter-spacing: 0.02em; }
.hs-th-grid { width: 55px; white-space: nowrap; }
.hs-td-gravenum { text-align: center; color: #8a8278; width: 52px; font-size: 12px; }
.hs-th-gravenum { width: 52px; white-space: nowrap; }

/* Gender text */
.hs-gender-text {
    display: block;
    font-size: 10px;
    color: #b8a88a;
    margin-top: 2px;
}

/* Photo thumbnail */
.hs-td-photo { width: 44px; padding: 6px 6px; }
.hs-th-photo { width: 44px; cursor: default; }
.hs-thumb {
    width: 34px;
    height: 34px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
    border: 1px solid #ede8df;
}
.hs-no-photo { display:block; width:34px; height:34px; }

/* View button */
.hs-td-view { width: 34px; text-align: center; padding: 4px 2px; }
.hs-th-view { width: 34px; }
.hs-view-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    font-size: 13px;
    font-weight: 700;
    color: #c9a84c;
    border: 1.5px solid #e8d898;
    border-radius: 50%;
    text-decoration: none !important;
    background: #fdf8ee;
    transition: background 0.12s, color 0.12s, border-color 0.12s, transform 0.12s;
}
.hs-view-link:hover {
    background: #c9a84c;
    color: #fff;
    border-color: #c9a84c;
    transform: scale(1.12);
    text-decoration: none !important;
}

/* Zebra stripe — very subtle */
.hs-row:nth-child(even) { background: #faf7f2; }
.hs-row:nth-child(even):hover { background: #fdf8f0; }


/* ── Animations ─────────────────────────────────────────────────── */

/* Fade + slide rows in when results load */
@keyframes hs-row-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.hs-row {
    animation: hs-row-in 0.28s ease both;
}
/* Stagger each row */
.hs-row:nth-child(1)  { animation-delay: 0.03s; }
.hs-row:nth-child(2)  { animation-delay: 0.07s; }
.hs-row:nth-child(3)  { animation-delay: 0.11s; }
.hs-row:nth-child(4)  { animation-delay: 0.15s; }
.hs-row:nth-child(5)  { animation-delay: 0.19s; }
.hs-row:nth-child(6)  { animation-delay: 0.23s; }
.hs-row:nth-child(7)  { animation-delay: 0.27s; }
.hs-row:nth-child(8)  { animation-delay: 0.31s; }
.hs-row:nth-child(9)  { animation-delay: 0.35s; }
.hs-row:nth-child(10) { animation-delay: 0.38s; }
.hs-row:nth-child(n+11) { animation-delay: 0.40s; }

/* Table wrap fades in as a whole */
@keyframes hs-wrap-in {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
.hs-table-wrap {
    animation: hs-wrap-in 0.22s ease both;
}

/* Status message fades in */
@keyframes hs-status-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.hebra-status {
    animation: hs-status-in 0.3s ease both;
}

/* Sort arrow spins when active column changes */
@keyframes hs-arrow-pop {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.6); }
    100% { transform: scale(1); }
}
.hs-sort-asc, .hs-sort-desc {
    animation: hs-arrow-pop 0.22s ease both;
}

/* View button — pulse ring on hover */
.hs-view-link::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 2px solid #c9a84c;
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 0.2s, transform 0.2s;
}
.hs-view-link { position: relative; }
.hs-view-link:hover::after {
    opacity: 0.4;
    transform: scale(1.2);
}

/* Name link underline slides in on hover */
.hs-name-link {
    background-image: linear-gradient(#c9a84c, #c9a84c);
    background-repeat: no-repeat;
    background-size: 0% 1.5px;
    background-position: left bottom;
    transition: color 0.1s, background-size 0.22s ease;
}
.hs-row:hover .hs-name-link {
    background-size: 100% 1.5px;
    text-decoration: none;
}

/* Grid ref badge bounces slightly on hover */
.hs-td-grid {
    transition: transform 0.15s ease;
}
.hs-row:hover .hs-td-grid {
    transform: scale(1.08);
}

/* Photo thumbnail scales on row hover */
.hs-thumb {
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.hs-row:hover .hs-thumb {
    transform: scale(1.08);
    box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}

/* Search form slides in on load */
@keyframes hs-form-in {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.hebra-search-form {
    animation: hs-form-in 0.3s ease both;
}

/* Pagination buttons animate in */
@keyframes hs-page-in {
    from { opacity: 0; transform: scale(0.88); }
    to   { opacity: 1; transform: scale(1); }
}
.hebra-page-btn {
    animation: hs-page-in 0.2s ease both;
}

/* Reduce motion — respect system preference */
@media (prefers-reduced-motion: reduce) {
    .hs-row, .hs-table-wrap, .hebra-status,
    .hebra-search-form, .hebra-page-btn,
    .hs-sort-asc, .hs-sort-desc,
    .hs-name-link, .hs-thumb,
    .hs-view-link::after { animation: none !important; transition: none !important; }
}

/* ── Mobile table ───────────────────────────────────────────────── */
@media (max-width: 767px) {
    .hs-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .hs-table { min-width: 0; font-size: 12px; }
    .hs-th, .hs-td { padding: 6px 4px; }
    /* Hide less-critical columns on small screens */
    .hs-th-gravenum,.hs-td-gravenum,
    .hs-th-age,     .hs-td-age,
    .hs-th-photo,   .hs-td-photo,
    .hs-th-dob,     .hs-td-dob { display: none; }
    .hs-name-link { font-size: 13px; }
    .hs-view-link { padding: 4px 8px; font-size: 11px; }
    /* Mobile column sizing */
    .hs-td-name, .hs-th-name { width: 35%; min-width: 100px; }
    .hs-td-dod,  .hs-th-dod  { width: 90px; min-width: 80px; font-size: 11px; }
}
@media (max-width: 480px) {
    .hs-th-grid,    .hs-td-grid,
    .hs-th-gender,  .hs-td-gender { display: none; }
    .hs-table { min-width: 0; }
}

.hs-page-ellipsis { padding: 6px 4px; color: #aaa; }

/* Grid ref chip in search form */
.hs-grid-ref-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fdf6e3;
    border: 2px solid #c9a84c;
    border-radius: 6px;
    font-size: 20px;
    font-weight: 700;
    color: #a8862e;
    padding: 6px 14px;
    min-height: 42px;
    min-width: 60px;
}

/* No results */
.hebra-no-results {
    padding: 32px;
    text-align: center;
    color: #888;
    border: 2px dashed #ddd;
    border-radius: 8px;
}

/* Pagination */
.hebra-pagination {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-top: 28px;
    flex-wrap: wrap;
}

.hebra-page-btn {
    padding: 6px 14px;
    border: 1px solid #ccc;
    background: #fff;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.12s;
}
.hebra-page-btn:hover { background: #f0ede6; }
.hebra-page-btn.active {
    background: #2c4a2e;
    color: #fff;
    border-color: #2c4a2e;
}

/* Loading spinner */
.hebra-loading {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid #ccc;
    border-top-color: #2c4a2e;
    border-radius: 50%;
    animation: hebra-spin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}
@keyframes hebra-spin { to { transform: rotate(360deg); } }


/* ── Single grave record ──────────────────────────────────────────────── */

.hebra-single-grave {
    max-width: 860px;
    margin: 32px auto;
    padding: 0 20px;
}

.grave-header {
    border-bottom: 2px solid #2c4a2e;
    padding-bottom: 16px;
    margin-bottom: 28px;
}

.grave-name {
    font-size: 30px;
    font-weight: 700;
    color: #2c4a2e;
    margin: 0 0 6px;
}

.grave-hebrew-name {
    font-size: 22px;
    color: #555;
    direction: rtl;
    margin: 0;
}

.grave-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

@media (max-width: 640px) {
    .grave-body { grid-template-columns: 1fr; }
}

.grave-detail-group {
    margin-bottom: 24px;
}

.grave-detail-group h2 {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #888;
    font-weight: 600;
    margin: 0 0 10px;
    border-bottom: 1px solid #eee;
    padding-bottom: 6px;
}

.grave-detail-group dl {
    margin: 0;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 4px 14px;
}

.grave-detail-group dt {
    font-weight: 600;
    color: #444;
    font-size: 14px;
    white-space: nowrap;
}
.grave-detail-group dd {
    margin: 0;
    font-size: 15px;
    color: #222;
}

/* Gallery */
.grave-photos h2 {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #888;
    font-weight: 600;
    margin: 0 0 14px;
    border-bottom: 1px solid #eee;
    padding-bottom: 6px;
}

.grave-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}

.grave-photo-link {
    display: block;
    border-radius: 6px;
    overflow: hidden;
    line-height: 0;
}

.grave-photo {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
    transition: opacity 0.15s;
}
.grave-photo-link:hover .grave-photo { opacity: 0.85; }

/* Lightbox overlay — pure CSS, no library needed */
.hebra-lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.88);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    cursor: zoom-out;
}

.hebra-lightbox-img {
    max-width: 92vw;
    max-height: 90vh;
    border-radius: 4px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.5);
    cursor: default;
}

.hebra-lightbox-close {
    position: fixed;
    top: 18px;
    right: 24px;
    font-size: 36px;
    color: #fff;
    cursor: pointer;
    line-height: 1;
    opacity: 0.8;
}
.hebra-lightbox-close:hover { opacity: 1; }

.hebra-lightbox-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    font-size: 40px;
    color: #fff;
    cursor: pointer;
    opacity: 0.7;
    padding: 12px;
    user-select: none;
}
.hebra-lightbox-nav:hover { opacity: 1; }
.hebra-lightbox-prev { left: 12px; }
.hebra-lightbox-next { right: 12px; }

/* Back link */
.grave-back {
    margin-top: 36px;
    padding-top: 16px;
    border-top: 1px solid #eee;
}
.grave-back a {
    color: #2c4a2e;
    font-size: 14px;
    text-decoration: none;
    font-weight: 600;
}
.grave-back a:hover { text-decoration: underline; }


/* ── Editor map link ─────────────────────────────────────────────────────── */
.gef-map-link {
    display: inline-flex;
    align-items: center;
    margin-top: 8px;
    font-size: 12px;
    color: #c9a84c;
    text-decoration: none;
    gap: 4px;
    opacity: 0.85;
    transition: opacity 0.15s;
}
.gef-map-link:hover { opacity: 1; color: #a07828; }

/* ── Inline gridded map popup cells ─────────────────────────────────────── */
.hebra-gcell:hover { background: rgba(201,168,76,.25) !important; }

/* ── Gridded map popup overlay alignment ─────────────────────────────────── */
#hebra-grid-map-wrap { user-select: none; }
#hebra-grid-overlay-wrap { pointer-events: none; }
#hebra-grid-overlay-wrap .hebra-gcell { pointer-events: all; }
.hebra-gcell:hover  { background: rgba(201,168,76,.30) !important; }
.hebra-gcell.active { background: rgba(201,168,76,.65) !important; }

/* ── Photo star (main photo selector) ───────────────────────────────────── */
.gef-photo-star, .hf-photo-star {
    position: absolute;
    bottom: 4px;
    left: 4px;
    width: 22px;
    height: 22px;
    background: rgba(0,0,0,.55);
    color: #888;
    border: none;
    border-radius: 50%;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    transition: background .15s, color .15s;
}
.gef-photo-star:hover, .hf-photo-star:hover { background: rgba(0,0,0,.8); color: #c9a84c; }
.gef-photo-main .gef-photo-star,
.hf-photo-main .hf-photo-star {
    background: #c9a84c;
    color: #fff;
}
/* Gold ring on main photo */
.gef-photo-main, .hf-photo-main {
    box-shadow: 0 0 0 2.5px #c9a84c;
}

/* ── Single grave — main photo display ──────────────────────────────────── */
.sg-main-photo-wrap {
    position: relative;
    margin-bottom: 16px;
    border-radius: 10px;
    overflow: hidden;
    line-height: 0;
}
.sg-main-photo {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
    display: block;
    border-radius: 10px;
}
.sg-main-photo-link { display: block; }
.sg-main-photo-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0,0,0,.55);
    color: #c9a84c;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 4px;
    backdrop-filter: blur(4px);
}
.sg-extra-gallery {
    margin-top: 12px;
}

/* ── Pagination bar with per-page selector ───────────────────────────────── */
.hebra-pagination-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 10px;
    margin-top: 12px;
}
.hebra-pagination-bar .hebra-pagination {
    flex: 1 1 auto;
    min-width: 0;
    justify-content: flex-start;
    margin-top: 0;
}
.hebra-per-page {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    color: #7a7268;
    white-space: nowrap;
    flex: 0 0 auto;
}
@media (max-width: 480px) {
    .hebra-pagination-bar { gap: 6px; }
    .hebra-pagination-bar .hebra-pagination { gap: 4px; }
    .hebra-pagination-bar .hebra-page-btn { padding: 5px 9px; font-size: 12px; }
    .hebra-per-page { font-size: 12px; gap: 4px; }
    .hebra-per-page select { padding: 3px 5px; font-size: 12px; }
}
.hebra-per-page select {
    padding: 4px 8px;
    border: 1.5px solid #c9a84c;
    border-radius: 6px;
    background: #fff;
    color: #4a3d20;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    outline: none;
}
.hebra-per-page select:focus { box-shadow: 0 0 0 2px rgba(201,168,76,.25); }

/* ── Completeness score bar ─────────────────────────────────────── */
.hs-th-score { width:70px; text-align:center; }
.hs-td-score { width:70px; }
.hs-score-wrap {
    position:relative; width:52px; height:14px;
    background:#e5e7eb; border-radius:7px; overflow:hidden;
    cursor:default;
}
.hs-score-bar {
    position:absolute; left:0; top:0; bottom:0;
    border-radius:7px; transition:width .3s;
}
.hs-score-label {
    position:absolute; inset:0;
    display:flex; align-items:center; justify-content:center;
    font-size:9px; font-weight:700; color:#fff;
    text-shadow:0 1px 2px rgba(0,0,0,.4);
    pointer-events:none;
}

/* ── Hebrew field label row ── */
.hebra-field-hint {
    font-size: 11px;
    font-weight: 400;
    color: #b0a888;
    letter-spacing: 0;
    text-transform: none;
    margin-left: 4px;
}
.hebra-field input[dir="rtl"] {
    text-align: right;
    font-size: 15px;
    letter-spacing: 0.02em;
}
.hebra-field-hebrew { position: relative; }
.hebra-field-hebrew label {
    display: flex;
    align-items: center;
    gap: 6px;
}

.hebra-kbd-toggle {
    margin-left: auto;
    background: none;
    border: 1px solid #d8cdb0;
    border-radius: 5px;
    padding: 1px 6px;
    font-size: 13px;
    cursor: pointer;
    color: #8a7a50;
    line-height: 1.4;
    transition: background .12s, border-color .12s;
}
.hebra-kbd-toggle:hover { background: #fef8e6; border-color: #c9a84c; color: #a07828; }

/* ── Hebrew keyboard popup ── */
.hebra-kbd {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 99999;
    background: #fff;
    border: 1.5px solid #d8cdb0;
    border-radius: 12px;
    box-shadow: 0 8px 28px rgba(0,0,0,.18);
    padding: 12px;
    min-width: 280px;
    max-width: 340px;
    user-select: none;
}
.hebra-kbd-inner {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 5px;
    direction: rtl;
    margin-bottom: 8px;
}
.hebra-kbd-key {
    background: #fef8e6;
    border: 1px solid #ddd5b8;
    border-radius: 6px;
    font-size: 17px;
    line-height: 1;
    padding: 7px 4px;
    cursor: pointer;
    text-align: center;
    color: #2a1f0e;
    transition: background .1s, border-color .1s;
    font-family: 'Times New Roman', serif;
}
.hebra-kbd-key:hover { background: #f5e9c8; border-color: #c9a84c; }
.hebra-kbd-key:active { background: #ecd98a; }
.hebra-kbd-actions {
    display: flex;
    gap: 6px;
    direction: ltr;
}
.hebra-kbd-space {
    flex: 1;
    font-size: 12px;
    padding: 7px;
    font-family: inherit;
}
.hebra-kbd-del {
    font-size: 15px;
    padding: 7px 12px;
}
.hebra-kbd-close {
    background: #c9a84c;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 7px 14px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background .12s;
}
.hebra-kbd-close:hover { background: #a8862e; }
