/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Noto Sans Georgian", Arial, sans-serif;
    background: #ffffff;
    color: white;
}

/* Shared helpers */
.hidden {
    display: none;
}

/* NAVBAR */
.navbar {
    width: 100%;
    background-color: #8b0000;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 15px 30px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.navbar-main {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.language-switcher {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    font-size: 0.95rem;
}

.language-switcher select {
    padding: 5px 8px;
    border-radius: 4px;
    border: none;
    outline: none;
    background: white;
    color: #000;
}

.mini-header {
    width: 100%;
    background-color: #8b0000;
    display: flex;
    justify-content: center;
    padding: 12px 30px;
}

.page-actions {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.home-link {
    color: white;
    text-decoration: none;
    padding: 6px 0;
    border: none;
    background: transparent;
}

.home-link:hover,
.home-link:focus,
.page-actions a:hover,
.page-actions a:focus {
    color: #ff9999 !important;
    background: transparent;
}

.navbar .logo {
    width: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #8b0000;
}

.navbar .logo img {
    max-width: 100%;
    height: auto;
    display: block;
}

.navbar nav {
    display: flex;
    justify-content: space-around;
    flex: 1;
    margin-left: 30px;
}

.navbar nav a {
    margin-left: 20px;
    text-decoration: none;
    color: white;
    transition: 0.3s;
    flex: 1;
    text-align: center;
}

.navbar nav a:visited,
.page-actions a:visited,
.home-link:visited {
    color: white;
}

.home-link:hover,
.navbar nav a:hover {
    color: #ff9999;
}

.search-container {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 360px;
    background: white;
    border-radius: 2px;
    overflow: hidden;
}

.search-container input {
    flex: 1;
    min-width: 0;
    border: none;
    padding: 6px 10px;
    outline: none;
}

.search-container button {
    flex: 0 0 auto;
    border: none;
    background: transparent;
    padding: 6px 10px;
    cursor: pointer;
}

/* MAIN CONTENT */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px;
    text-align: left;
}

.home-content {
    color: #8b0000;
}

.hero-copy {
    text-align: center;
    margin: 40px auto 60px;
    display: block;
    background: #8b0000;
    color: white;
    padding: 30px 40px;
    max-width: 700px;
}

.hero-copy p {
    margin: 0.6rem 0;
    font-size: 1.15rem;
    line-height: 1.6;
    font-weight: 700;
    font-style: italic;
}

.home-content h2,
.home-content p,
.home-content h3,
.home-content li {
    color: inherit;
}

.info-card {
    margin: 0 auto 48px;
    padding: 0 10px;
    max-width: 900px;
}

.info-card h2 {
    font-size: 2.2rem;
    margin-bottom: 16px;
    text-align: left;
    border-bottom: 2px solid #8b0000;
    padding-bottom: 10px;
    width: 100%;
}

.info-card p {
    margin-bottom: 1.1rem;
    line-height: 1.8;
    text-align: left;
}

.feature-box,
.step-card {
    background: #fff7f7;
    border: 1px solid rgba(139, 0, 0, 0.15);
    padding: 22px 24px;
    margin: 18px 0;
}

.feature-box h3,
.step-card h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.step-badge {
    display: inline-block;
    background: #8b0000;
    color: #ffffff;
    font-weight: 700;
    padding: 6px 12px;
    margin-bottom: 14px;
    font-size: 0.92rem;
    letter-spacing: 0.02em;
}

.memory-list,
.scan-steps {
    padding-left: 22px;
    margin: 10px 0 4px;
}

.memory-list li,
.scan-steps li {
    margin-bottom: 10px;
    line-height: 1.7;
}

.compact-list li {
    margin-bottom: 6px;
}

.section-logo {
    display: flex;
    justify-content: center;
    margin-top: 50px;
    margin-bottom: 40px;
}

.section-logo img {
    width: 500px;
    height: auto;
}

.page-footer {
    background: #8b0000;
    color: white;
    padding: 30px 20px;
}

.footer-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    max-width: 1000px;
    margin: 0 auto;
    justify-content: flex-start;
}

.footer-about,
.footer-contact {
    flex: 1 1 320px;
    min-width: 240px;
    width: 100%;
    text-align: left;
}

.footer-about h3,
.footer-contact h3 {
    margin-bottom: 16px;
    font-size: 1.25rem;
    color: #ffffff;
}

.footer-about p,
.footer-contact p {
    margin-bottom: 12px;
    line-height: 1.7;
    color: #f3f3f3;
}

.footer-about a,
.footer-contact a {
    color: #ffcccc;
    text-decoration: none;
}

.footer-about a:hover,
.footer-contact a:hover {
    color: #ffffff;
}

.footer-social {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 10px;
}

.footer-social a {
    font-weight: 600;
}

.footer-bottom {
    margin-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 12px;
    text-align: center;
    color: #f0f0f0;
    font-size: 0.95rem;
}

/* FORM */
.form-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 0 15px 40px;
}

.form-logo {
    display: flex;
    justify-content: center;
    margin: 50px auto;
    width: 400px;
    max-width: 400px;
}

.form-logo img {
    width: 100%;
    height: auto;
    display: block;
    max-width: 400px;
}

.form-box {
    background: #1a1a1a;
    padding: 30px;
    border-radius: 10px;
    width: 350px;
    max-width: 90%;
    margin: 0 auto;
}

.form-box h2 {
    margin-bottom: 20px;
}

.form-box input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: none;
    border-radius: 5px;
}

.form-box button {
    width: 100%;
    padding: 12px;
    background: #8b0000;
    border: none;
    color: white;
    border-radius: 5px;
    cursor: pointer;
}

.form-box button:hover {
    background: #a30000;
}

.form-box p {
    margin-top: 10px;
    font-size: 14px;
}

.form-box a,
.form-box a:visited,
.form-box a:active,
.form-box a:focus {
    color: white;
    text-decoration: none;
}

.form-box a:hover {
    color: #ff5555;
}

.verification-section {
    margin-top: 15px;
}

.form-message {
    margin-top: 15px;
    font-size: 14px;
    line-height: 1.5;
    min-height: 22px;
    text-align: center;
}

#verificationCode {
    margin-bottom: 15px;
}

.qr-gif-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.qr-gif {
    width: 300px;
    height: auto;
}

/* ALIVE PROFILE */
.alive-navbar {
    padding: 15px 30px;
}

.alive-navbar-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    width: 100%;
    gap: 1rem;
}

.alive-navbar-left {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.alive-navbar-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.alive-navbar-right {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.alive-logo {
    width: 150px;
    height: auto;
    display: block;
}

.alive-page-title {
    color: white;
    font-size: 1.5rem;
    margin: 0;
}

.alive-dashboard {
    max-width: 1200px;
}

.profile-basic,
.alive-profile-box,
.alive-inline-form-box {
    background: #1a1a1a;
    border-radius: 10px;
    color: white;
}

.profile-basic {
    padding: 20px;
    max-width: 500px;
    margin: 20px auto;
    text-align: center;
}

.alive-profile-box {
    padding: 35px;
    max-width: 1100px;
    margin: 30px auto;
    text-align: left;
}

.alive-profile-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.alive-profile-left {
    flex: 1 1 500px;
}

.alive-profile-left h2 {
    margin-bottom: 14px;
}

.alive-profile-bio {
    line-height: 1.7;
    color: #f0f0f0;
    max-width: 700px;
}

.alive-profile-right {
    flex: 0 0 auto;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
}

.alive-add-btn,
.alive-approve-btn,
.dead-submit-btn,
.dead-add-memory-btn {
    background: #8b0000;
    color: white;
    border: none;
    cursor: pointer;
}

.alive-add-btn,
.alive-action-btn,
.alive-approve-btn,
.alive-reject-btn {
    border-radius: 6px;
}

.alive-add-btn {
    padding: 14px 22px;
    font-size: 15px;
    font-weight: 600;
}

.alive-add-btn:hover,
.alive-approve-btn:hover,
.dead-submit-btn:hover,
.dead-add-memory-btn:hover {
    background: #a30000;
}

.alive-sections-wrapper {
    margin-top: 20px;
}

.alive-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.alive-tab {
    background: transparent;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 12px 18px;
    cursor: pointer;
    border-radius: 6px;
    font-weight: 600;
}

.alive-tab.active {
    background: #8b0000;
    border-color: #8b0000;
}

.alive-tab-panel {
    display: none;
}

.alive-tab-panel.active {
    display: block;
}

.alive-table {
    width: 100%;
}

.alive-table-head,
.alive-table-row {
    display: grid;
    gap: 16px;
    align-items: center;
    padding: 14px 12px;
}

.alive-table-head {
    background: rgba(255, 255, 255, 0.08);
    font-weight: 700;
    border-radius: 8px;
}

.alive-table-row {
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.alive-ancestors-grid {
    grid-template-columns: 2fr 1fr 1.2fr;
}

.alive-requests-grid {
    grid-template-columns: 1.2fr 1.2fr 0.8fr 1.2fr 1fr;
}

.alive-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.alive-action-btn {
    display: inline-block;
    background: #8b0000;
    color: white !important;
    text-decoration: none;
    padding: 10px 14px;
    font-size: 14px;
}

.alive-action-btn.secondary {
    background: #333333;
}

.alive-empty-state {
    padding: 24px 8px;
    color: #dddddd;
}

.alive-inline-form-box {
    padding: 30px;
    max-width: 1100px;
    margin: 25px auto 40px;
}

.alive-inline-form-box h3 {
    margin-bottom: 22px;
}

.alive-ancestor-form {
    width: 100%;
}

.alive-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.alive-field {
    display: flex;
    flex-direction: column;
}

.alive-field label {
    margin-bottom: 8px;
}

.alive-field input,
.alive-field textarea {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 6px;
    outline: none;
}

.alive-field-full {
    grid-column: 1 / -1;
}

.alive-form-actions {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
}

.alive-price-info {
    width: 100%;
    max-width: 520px;
    font-size: 14px;
    font-weight: bold;
    line-height: 1.6;
    text-align: center;
    color: white;
    padding: 12px 16px;
    box-sizing: border-box;
}

.alive-price-info strong {
    color: #111;
}


.alive-mobile-label {
    display: none;
    margin-bottom: 6px;
    color: #bbbbbb;
    font-size: 13px;
    font-weight: 700;
}

.alive-request-card {
    align-items: start;
}

.alive-request-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.alive-request-actions {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.alive-request-preview {
    width: 100%;
    max-width: 180px;
    border-radius: 8px;
    display: block;
}

.alive-request-audio {
    width: 100%;
    max-width: 220px;
}

.alive-file-link {
    color: #ffcccc;
    text-decoration: none;
}

.alive-approve-btn,
.alive-reject-btn {
    width: 100%;
    padding: 12px 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
}

.alive-reject-btn {
    background: #444444;
    color: white;
    margin-top: 8px;
}

.alive-reject-btn:hover {
    background: #666666;
}

/* DEAD PROFILE */
.profile-full {
    max-width: 900px;
    margin: 20px auto;
    padding: 20px;
    background: #1a1a1a;
    border-radius: 10px;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.profile-pic {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-info h2 {
    margin-bottom: 10px;
}

.profile-uploads {
    margin-top: 30px;
}

.uploads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.upload-item {
    background: #2a2a2a;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

.dead-page-wrap {
    max-width: 1100px;
    margin: 24px auto;
    padding: 0 16px 40px;
}

.dead-main-box {
    background: #fff;
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

.dead-top-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 24px;
}

.dead-profile-header {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    flex: 1;
}

.dead-profile-pic {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    object-fit: cover;
    cursor: pointer;
    border: 4px solid #f1f1f1;
    flex-shrink: 0;
}

.dead-profile-info h2 {
    margin: 0 0 10px;
    font-size: 30px;
    line-height: 1.2;
    color: #b22222;
}
.dead-profile-info .dead-dates {
    margin: 0 0 10px;
    font-size: 20px;
    font-weight: bold;
    color: black;
}
.dead-bornplace {
    margin: 0 0 12px;
    font-size: 16px;
    color: #666;
}

.dead-bio {
    margin: 0;
    font-size: 16px;
    color: #222;
    line-height: 1.6;
    white-space: pre-wrap;
}

.dead-add-memory-btn {
    border-radius: 14px;
    padding: 14px 22px;
    font-size: 15px;
    font-weight: 700;
    min-width: 160px;
    transition: 0.2s ease;
}

.dead-upload-panel {
    margin-top: 20px;
    padding: 20px;
    border-radius: 20px;
    background: #faf7f7;
    border: 1px solid #eadede;
}

.dead-upload-panel h3 {
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 22px;
    color: #b22222;
}

.dead-field-group {
    margin-bottom: 16px;
}

.dead-audio-title-group {
    margin-top: 14px;
}

.dead-field-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: #222;
}

.dead-field-group input[type="text"],
.dead-field-group input[type="file"],
.dead-field-group textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #d7d7d7;
    font-size: 15px;
    font-family: inherit;
    background: #fff;
    color: #111;
}

.dead-field-group textarea {
    min-height: 140px;
    resize: vertical;
}

.dead-option-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}

.dead-option-card {
    border: 1px solid #ddd;
    border-radius: 18px;
    padding: 16px;
    background: #fff;
    cursor: pointer;
    transition: 0.2s ease;
}

.dead-option-card.active {
    border-color: #b22222;
    box-shadow: 0 0 0 2px rgba(178, 34, 34, 0.12);
}

.dead-option-card-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #111;
}
.dead-option-card-desc {
    font-size: 14px;
    line-height: 1.5;
    color: #666;
}

.dead-content-title {
    margin: 30px 0 16px;
    font-size: 24px;
    color: #b22222;
}

.dead-content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
}

.dead-memory-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 18px;
    padding: 14px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
}

.dead-memory-card img,
.dead-memory-card video {
    width: 100%;
    border-radius: 14px;
    display: block;
    object-fit: cover;
    max-height: 280px;
}

.dead-memory-card audio {
    width: 100%;
    margin-top: 8px;
}

.dead-memory-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 10px;
    color: #111;
}

.dead-memory-text {
    margin: 0;
    color: #333;
    line-height: 1.6;
    white-space: pre-wrap;

    max-height: 220px;        
    overflow-y: auto;         
    padding-right: 6px;
}
.dead-memory-text::-webkit-scrollbar {
    width: 6px;
}

.dead-memory-text::-webkit-scrollbar-thumb {
    background: #bbb;
    border-radius: 10px;
}

.dead-memory-text::-webkit-scrollbar-thumb:hover {
    background: #888;
}
.dead-recorder-box {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 16px;
    padding: 16px;
}
.dead-delete-btn {
    margin-top: 10px;
    background: #222;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 10px;
    cursor: pointer;
}

.dead-delete-btn:hover {
    background: #b22222;
}


.dead-recorder-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.dead-recorder-btn {
    border: none;
    border-radius: 12px;
    padding: 12px 16px;
    font-weight: 700;
    cursor: pointer;
}

.dead-recorder-btn.start {
    background: #b22222;
    color: #fff;
}

.dead-recorder-btn.stop {
    background: #222;
    color: #fff;
}

.dead-submit-row {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
}

.dead-submit-btn {
    border-radius: 14px;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 700;
}

.dead-empty-state {
    color: #333;
    padding: 12px 0 24px;
}

/* NEW DEAD PROFILE ADMIN + MODAL UI */
.dead-actions-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 220px;
    align-items: stretch;
}

.dead-qr-box {
    background: #faf7f7;
    border: 1px solid #eadede;
    border-radius: 18px;
    padding: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 180px;
}

.dead-qr-image {
    width: 160px;
    height: 160px;
    object-fit: contain;
    display: block;
}

.dead-qr-empty {
    color: #666;
    text-align: center;
    font-size: 14px;
}

.dead-secondary-btn {
    background: #ffffff;
    color: #8b0000;
    border: 1px solid #8b0000;
    border-radius: 14px;
    padding: 14px 22px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s ease;
}

.dead-secondary-btn:hover {
    background: #fff5f5;
}

.dead-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 2000;
}

.dead-modal-card {
    background: #fff;
    width: 100%;
    max-width: 560px;
    border-radius: 22px;
    padding: 24px;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
}

.dead-modal-card h3 {
    color: #b22222;
    margin-bottom: 12px;
    font-size: 24px;
}

.dead-modal-text {
    color: #333;
    line-height: 1.7;
    margin-bottom: 12px;
}

.dead-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: #f3f3f3;
    color: #222;
    font-size: 22px;
    cursor: pointer;
}

.dead-plan-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 18px 0;
}

.dead-plan-btn {
    border: 1px solid #ddd;
    border-radius: 14px;
    padding: 14px 10px;
    background: #fff;
    color: #111;
    font-weight: 700;
    cursor: pointer;
}

.dead-plan-btn.active {
    border-color: #b22222;
    color: #b22222;
    box-shadow: 0 0 0 2px rgba(178, 34, 34, 0.10);
}

.dead-price-box {
    background: #faf7f7;
    border: 1px solid #eadede;
    border-radius: 14px;
    padding: 14px;
    color: #333;
    font-weight: 600;
}

.dead-modal-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 18px;
}
.dead-modal.hidden {
    display: none !important;
}

@media (max-width: 900px) {
    .alive-navbar {
        padding: 12px 16px;
    }

    .alive-navbar-inner {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .alive-navbar-left,
    .alive-navbar-center,
    .alive-navbar-right {
        justify-content: center;
    }

    .alive-logo {
        width: 120px;
    }

    .alive-page-title {
        font-size: 1.25rem;
        text-align: center;
    }

    .alive-dashboard {
        padding: 16px;
    }

    .alive-profile-box {
        padding: 20px 16px;
        margin: 20px auto;
    }

    .alive-profile-top {
        flex-direction: column;
        gap: 20px;
        margin-bottom: 22px;
    }

    .alive-profile-left,
    .alive-profile-right {
        width: 100%;
    }

    .alive-profile-right,
    .alive-form-actions {
        justify-content: stretch;
    }

    .alive-add-btn,
    .alive-form-actions .alive-add-btn,
    .alive-action-btn {
        width: 100%;
        text-align: center;
    }

    .alive-tabs {
        flex-direction: column;
        gap: 10px;
    }

    .alive-tab {
        width: 100%;
        text-align: center;
    }

    .alive-table-head {
        display: none;
    }

    .alive-table-row {
        display: block;
        padding: 14px;
        margin-bottom: 12px;
        background: rgba(255, 255, 255, 0.05);
        border-radius: 8px;
        border-bottom: none;
    }

    .alive-table-row > div {
        margin-bottom: 10px;
    }

    .alive-table-row > div:last-child {
        margin-bottom: 0;
    }

    .alive-ancestors-grid,
    .alive-requests-grid,
    .alive-form-grid,
    .dead-option-list,
    .dead-content-grid {
        grid-template-columns: 1fr;
    }
    .dead-actions-column {
        min-width: unset;
        width: 100%;
    }

    .dead-plan-list {
        grid-template-columns: 1fr;
    }
    .alive-actions {
        flex-direction: column;
        gap: 8px;
    }

    .alive-inline-form-box {
        padding: 20px 16px;
        margin: 20px auto 30px;
    }

    .alive-field-full {
        grid-column: auto;
    }

    .alive-mobile-label {
        display: block;
    }

    .alive-request-actions {
        margin-top: 6px;
    }

    .alive-request-preview,
    .alive-request-audio {
        max-width: 100%;
        width: 100%;
    }

    .dead-top-row {
        flex-direction: column;
        align-items: stretch;
    }

    .dead-profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .dead-add-memory-btn {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        align-items: stretch;
        position: static;
    }

    .navbar-main {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .navbar .logo {
        margin: 0 auto;
        width: 160px;
        justify-content: center;
        text-align: center;
        flex: unset;
        align-self: center;
    }

    .navbar nav {
        margin-left: 0;
        flex-direction: column;
        align-items: center;
    }

    .navbar nav a {
        text-align: center;
        padding: 10px 0;
        flex: unset;
    }

    .nav-actions {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .search-container {
        max-width: 100%;
        width: 100%;
        min-width: 240px;
    }

    .language-switcher {
        justify-content: center;
    }

    .container {
        padding: 20px;
    }

    .hero-copy {
        padding: 24px 20px;
        margin: 25px auto 40px;
    }

    .info-card h2 {
        font-size: 1.7rem;
    }

    .feature-box,
    .step-card {
        padding: 18px;
    }
}

@media (max-width: 700px) {
    .footer-grid {
        flex-direction: column;
        gap: 12px;
    }

    .footer-bottom {
        text-align: left;
        margin-top: 12px;
    }
}

@media (max-width: 600px) {
    .dead-main-box {
        padding: 18px;
        border-radius: 18px;
    }

    .dead-profile-pic {
        width: 110px;
        height: 110px;
    }

    .dead-profile-info h2 {
        font-size: 24px;
    }
}

.support-nav-btn {
    background: white;
    color: #8b0000;
    border: none;
    border-radius: 8px;
    padding: 8px 14px;
    font-weight: 700;
    cursor: pointer;
}

.support-nav-btn:hover {
    background: #fff0f0;
}

.donate-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3000;
    padding: 20px;
}

.donate-modal.hidden {
    display: none;
}

.donate-card {
    background: white;
    color: #222;
    max-width: 520px;
    width: 100%;
    border-radius: 20px;
    padding: 26px;
    position: relative;
}

.donate-card h2 {
    color: #8b0000;
    margin-bottom: 12px;
}

.donate-card p {
    line-height: 1.7;
    margin-bottom: 16px;
}

.donate-card input,
.donate-card textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 12px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-family: inherit;
}

.donate-close {
    position: absolute;
    right: 14px;
    top: 12px;
    border: none;
    background: transparent;
    font-size: 28px;
    cursor: pointer;
}

.donate-checkbox {
    display: flex;
    gap: 8px;
    color: #333;
    font-size: 14px;
    margin: 10px 0 16px;
}

.donate-submit {
    width: 100%;
    background: #8b0000;
    color: white;
    border: none;
    padding: 13px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
}

.journey-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-bottom: 50px;
}

.journey-card {
    background: #fff7f7;
    border: 1px solid rgba(139, 0, 0, 0.15);
    padding: 24px;
    text-align: center;
    border-radius: 18px;
    color: #8b0000;
}

.journey-icon {
    font-size: 34px;
    margin-bottom: 10px;
}

.journey-card h3 {
    font-size: 16px;
    margin-bottom: 10px;
}

.journey-card p {
    font-size: 28px;
    font-weight: 800;
}

.supporters-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-top: 20px;
}

.supporter-card {
    background: #fff7f7;
    border: 1px solid rgba(139, 0, 0, 0.15);
    border-radius: 16px;
    padding: 20px;
    color: #8b0000;
}

.supporter-card h3 {
    margin-bottom: 10px;
}

.supporter-card p {
    color: #333;
    line-height: 1.6;
}

.supporter-card span {
    display: inline-block;
    margin-top: 10px;
    background: #8b0000;
    color: white;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 13px;
}

.empty-supporters {
    color: #8b0000;
}

@media (max-width: 768px) {
    .journey-grid,
    .supporters-grid {
        grid-template-columns: 1fr;
    }

    .support-nav-btn {
        width: 100%;
        margin-top: 8px;
    }
}
.support-nav-btn {
    background: white;
    color: #8b0000;
    border: none;
    border-radius: 8px;
    padding: 8px 14px;
    font-weight: 700;
    cursor: pointer;
}

.support-nav-btn:hover {
    background: #fff0f0;
}

.donate-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3000;
    padding: 16px;
}

.donate-modal.hidden {
    display: none !important;
}

.donate-card {
    background: white;
    color: #222;
    width: 100%;
    max-width: 520px;
    border-radius: 20px;
    padding: 26px;
    position: relative;
    box-sizing: border-box;
}

.donate-card h2 {
    color: #8b0000;
    margin-bottom: 12px;
    padding-right: 35px;
}

.donate-card p {
    line-height: 1.7;
    margin-bottom: 16px;
}

.donate-card input[type="text"],
.donate-card textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 12px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-family: inherit;
    box-sizing: border-box;
}

.donate-close {
    position: absolute;
    right: 14px;
    top: 12px;
    border: none;
    background: transparent;
    font-size: 28px;
    cursor: pointer;
    color: #222;
}

.donate-checkbox {
    display: grid;
    grid-template-columns: 18px 1fr;
    column-gap: 10px;
    align-items: start;
    width: 100%;
    color: #333;
    font-size: 14px;
    line-height: 1.5;
    margin: 10px 0 16px;
}

.donate-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 2px 0 0 0;
}

.donate-checkbox label {
    display: block;
    min-width: 0;
    white-space: normal;
    overflow-wrap: break-word;
    word-break: normal;
}

.donate-submit {
    width: 100%;
    background: #8b0000;
    color: white;
    border: none;
    padding: 13px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
}

@media (max-width: 600px) {
    .donate-modal {
        align-items: center;
        padding: 12px;
    }

    .donate-card {
        max-width: none;
        width: 100%;
        padding: 20px;
    }

    .donate-checkbox {
        font-size: 13px;
        grid-template-columns: 18px 1fr;
    }
}
.dead-location-link {
    display: inline-block;
    text-align: center;
    text-decoration: none;
    background: #8b0000;
    color: white !important;
    border-radius: 14px;
    padding: 14px 22px;
    font-size: 15px;
    font-weight: 700;
}

.dead-location-link:hover {
    background: #a30000;
}

/* Legal / policy pages */
.legal-content [data-lang="en"] {
    display: none;
}

.legal-section ul {
    color: inherit;
}

.legal-section li {
    margin-bottom: 10px;
    line-height: 1.7;
}

.footer-legal-links {
    line-height: 1.8;
}

/* Matyan memorial post, slideshow, and share updates */
.dead-facebook-share-btn,
.dead-slideshow-open-btn {
    text-align: center;
    text-decoration: none;
    display: inline-block;
}

.dead-facebook-share-btn {
    background: #1877f2;
    color: #fff;
    border-color: #1877f2;
}

.dead-facebook-share-btn:hover {
    background: #0f62cf;
    color: #fff;
}

.dead-field-group input[type="url"] {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #d7d7d7;
    font-size: 15px;
    font-family: inherit;
    background: #fff;
    color: #111;
}

.dead-memory-post {
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow: hidden;
    min-width: 0;
}

.dead-memory-post-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
}

.dead-memory-post-head > div {
    min-width: 0;
}

.dead-memory-uploader {
    margin: -4px 0 0;
    color: #777;
    font-size: 13px;
    line-height: 1.4;
}

.dead-memory-media-wrap {
    width: 100%;
}

.dead-memory-description {
    margin: 0;
    color: #333;
    line-height: 1.65;
    white-space: normal;
    font-size: 15px;
    overflow-wrap: anywhere;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-height: 4.95em;
}

.dead-memory-title,
.dead-memory-uploader {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.dead-memory-card video {
    background: #000;
}

body.slideshow-open {
    overflow: hidden;
}

.dead-slideshow-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.dead-slideshow-modal.hidden {
    display: none !important;
}

.dead-slideshow-shell {
    width: min(1100px, 100%);
    height: min(760px, 92vh);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dead-slideshow-content {
    width: 100%;
    height: 100%;
    background: #111;
    border-radius: 22px;
    overflow: hidden;
    display: grid;
    grid-template-rows: 1fr auto;
    box-shadow: 0 24px 70px rgba(0,0,0,0.35);
}

.dead-slideshow-media {
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.dead-slideshow-media img,
.dead-slideshow-media video {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.dead-slideshow-media audio {
    width: min(680px, 86%);
}

.dead-slideshow-text-only {
    color: #fff;
    line-height: 1.7;
    font-size: 20px;
    max-width: 760px;
    padding: 28px;
    white-space: pre-wrap;
    text-align: center;
}

.dead-slideshow-caption {
    background: #fff;
    color: #111;
    padding: 16px 22px;
    max-height: 34vh;
    overflow-y: auto;
}

.dead-slideshow-caption h3 {
    margin: 0 0 6px;
    color: #8b0000;
    font-size: 20px;
}

.dead-slideshow-caption p {
    margin: 0 0 8px;
    line-height: 1.55;
    white-space: pre-wrap;
}

.dead-slideshow-uploader,
.dead-slideshow-counter {
    color: #777;
    font-size: 13px;
}

.dead-slideshow-close,
.dead-slideshow-nav {
    position: absolute;
    z-index: 2;
    border: none;
    cursor: pointer;
    color: #fff;
    background: rgba(255,255,255,0.18);
    backdrop-filter: blur(8px);
}

.dead-slideshow-close {
    top: 12px;
    right: 12px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 28px;
    line-height: 1;
}

.dead-slideshow-nav {
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 62px;
    border-radius: 16px;
    font-size: 46px;
    line-height: 0.8;
}

.dead-slideshow-prev {
    left: 12px;
}

.dead-slideshow-next {
    right: 12px;
}

.dead-slideshow-close:hover,
.dead-slideshow-nav:hover {
    background: rgba(255,255,255,0.28);
}

@media (max-width: 700px) {
    .dead-facebook-share-btn,
    .dead-slideshow-open-btn,
    .dead-secondary-btn,
    .dead-add-memory-btn {
        width: 100%;
        box-sizing: border-box;
    }

    .dead-memory-post-head {
        flex-direction: column;
        align-items: stretch;
    }

    .dead-delete-btn {
        width: 100%;
        margin-top: 0;
    }

    .dead-slideshow-modal {
        padding: 0;
    }

    .dead-slideshow-shell {
        width: 100%;
        height: 100dvh;
    }

    .dead-slideshow-content {
        border-radius: 0;
    }

    .dead-slideshow-caption {
        padding: 14px 16px 22px;
        max-height: 42vh;
    }

    .dead-slideshow-nav {
        top: auto;
        bottom: 12px;
        transform: none;
        width: 44px;
        height: 44px;
        border-radius: 50%;
        font-size: 34px;
    }

    .dead-slideshow-prev {
        left: 14px;
    }

    .dead-slideshow-next {
        right: 14px;
    }

    .dead-slideshow-close {
        top: 10px;
        right: 10px;
    }

    .dead-slideshow-text-only {
        font-size: 17px;
        padding: 22px;
    }
}

.alive-request-title {
    margin: 8px 0 4px;
    font-weight: 700;
    color: #111;
}

.alive-request-description {
    margin: 0;
    color: #444;
    line-height: 1.55;
    white-space: pre-wrap;
    font-size: 14px;
}

/* =========================================================
   REFINEMENT LAYER — delicate polish on top of the original
   design. Same palette (#8b0000 + white), same layout.
   Appended at the end so it can be reviewed or removed easily.
   ========================================================= */

/* --- Base rendering --- */
html {
    scroll-behavior: smooth;
}

body {
    color: #241b1b; /* fixes latent white-on-white text for unstyled elements */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

::selection {
    background: rgba(139, 0, 0, 0.14);
    color: #4d0000;
}

/* Subtle, refined page scrollbar (WebKit) */
body::-webkit-scrollbar {
    width: 10px;
}
body::-webkit-scrollbar-thumb {
    background: #c9b3b3;
    border-radius: 8px;
    border: 2px solid #ffffff;
}
body::-webkit-scrollbar-thumb:hover {
    background: #a98d8d;
}

/* --- Navbar: soft depth instead of flat block --- */
.navbar {
    background: linear-gradient(180deg, #920404 0%, #7d0000 100%);
    box-shadow: 0 2px 14px rgba(77, 0, 0, 0.28);
}

.navbar nav a {
    position: relative;
    padding: 8px 0;
    transition: color 0.22s ease;
}

.navbar nav a::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    border-radius: 2px;
    background: #ffb3b3;
    transition: width 0.24s ease;
}

.navbar nav a:hover::after,
.navbar nav a:focus-visible::after {
    width: 26px;
}

.language-switcher select {
    padding: 6px 10px;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: box-shadow 0.2s ease;
}

.language-switcher select:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
}

.support-nav-btn {
    transition: background 0.2s ease, transform 0.18s ease, box-shadow 0.18s ease;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}

.support-nav-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
}

/* --- Hero: same red block, gentler presence --- */
.hero-copy {
    background: linear-gradient(160deg, #970606 0%, #7a0000 100%);
    border-radius: 18px;
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.14),
        0 16px 40px rgba(102, 0, 0, 0.22);
    animation: matyanFadeUp 0.7s ease both;
}

.hero-copy p {
    letter-spacing: 0.012em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}

@keyframes matyanFadeUp {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Section titles: delicate hairline + short accent instead of a heavy full rule --- */
.info-card h2 {
    position: relative;
    border-bottom: 1px solid rgba(139, 0, 0, 0.22);
    letter-spacing: 0.01em;
}

.info-card h2::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 64px;
    height: 3px;
    border-radius: 3px;
    background: #8b0000;
}

/* --- Cards: soft corners, gentle lift --- */
.feature-box,
.step-card {
    border-radius: 16px;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.feature-box:hover,
.step-card:hover,
.journey-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(139, 0, 0, 0.10);
}

.journey-card {
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.dead-memory-card {
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.dead-memory-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.08);
}

/* --- Auth form card: fix inherited text color + refine --- */
.form-box {
    color: #ffffff;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: 0 22px 55px rgba(26, 0, 0, 0.28);
}

.form-box input {
    background: #f7f4f4;
    color: #1c1c1c;
    border: 1px solid transparent;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.form-box input::placeholder {
    color: #8a8080;
}

/* --- Inputs: consistent, delicate focus ring everywhere --- */
.form-box input:focus,
.donate-card input:focus,
.donate-card textarea:focus,
.alive-field input:focus,
.alive-field textarea:focus,
.dead-field-group input[type="text"]:focus,
.dead-field-group textarea:focus {
    outline: none;
    border-color: #b22222;
    box-shadow: 0 0 0 3px rgba(178, 34, 34, 0.14);
}

/* --- Buttons: unified gentle motion --- */
.form-box button,
.donate-submit,
.alive-add-btn,
.alive-action-btn,
.alive-approve-btn,
.alive-reject-btn,
.dead-submit-btn,
.dead-add-memory-btn,
.dead-secondary-btn,
.dead-recorder-btn,
.dead-plan-btn,
.dead-delete-btn {
    transition: background 0.2s ease, transform 0.16s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.form-box button:hover,
.donate-submit:hover,
.alive-add-btn:hover,
.alive-approve-btn:hover,
.dead-submit-btn:hover,
.dead-add-memory-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(139, 0, 0, 0.28);
}

.form-box button:active,
.donate-submit:active,
.alive-add-btn:active,
.alive-approve-btn:active,
.dead-submit-btn:active,
.dead-add-memory-btn:active {
    transform: translateY(0);
    box-shadow: 0 3px 10px rgba(139, 0, 0, 0.22);
}

/* Visible keyboard focus, in brand color */
a:focus-visible,
button:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #b22222;
    outline-offset: 2px;
    border-radius: 4px;
}

.navbar a:focus-visible,
.navbar button:focus-visible,
.navbar select:focus-visible {
    outline-color: #ffd6d6;
}

/* --- Modals: gentle entrance + softened backdrop --- */
.donate-modal,
.dead-modal {
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.donate-card,
.dead-modal-card {
    animation: matyanModalIn 0.24s ease both;
}

@keyframes matyanModalIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.donate-close,
.dead-modal-close {
    transition: background 0.18s ease, color 0.18s ease;
}

.donate-close:hover,
.dead-modal-close:hover {
    color: #8b0000;
    background: #f7eaea;
}

/* --- Footer: quiet link transitions --- */
.footer-about a,
.footer-contact a {
    transition: color 0.2s ease;
    text-underline-offset: 3px;
}

.footer-about a:hover,
.footer-contact a:hover {
    text-decoration: underline;
}

/* --- Responsive image safety (prevents overflow on small phones) --- */
.section-logo img {
    width: min(500px, 92%);
}

.form-logo {
    width: min(400px, 84vw);
}

.qr-gif {
    max-width: 92%;
}

/* --- Accessibility: respect reduced motion --- */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
