@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;900&family=Playfair+Display:wght@600;700&family=DM+Mono:wght@400;500&family=Outfit:wght@400;500;600&display=swap');

:root {
    --bg-app: #eef0f3;
    --bg-sidebar: #0d1a26;
    --text-primary: #1a2433;
    --text-secondary: #4a6070;
    --primary-color: #388c77;
    --primary-dark: #006c51;
    --primary-light: #94d2bd;
    --primary-text: #ffffff;
    --border-color: rgba(0, 0, 0, 0.1);
    --border-light: rgba(255, 255, 255, 0.1);
    --btn-bg: #ffffff;
    --btn-active-bg: rgba(56, 140, 119, 0.12);
    --shadow-soft: 0 4px 24px rgba(0, 0, 0, 0.1);
    --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.08);
    --kiosk-radius: 14px;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    /* Remove default tap highlight */
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-app);
    height: 100vh;
    overflow: hidden;
    user-select: none;
}

h1, h2, h3 {
    font-family: 'Playfair Display', 'Inter', serif;
}

/* --- Layout --- */
.app-container {
    display: block;
    width: 100vw;
    height: 100vh;
    position: relative;
    background: #eef0f3;
}

/* --- Top Bar --- */
.topbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 160px;
    height: 80px;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(12px);
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 2px 16px rgba(0,0,0,0.06);
}

.topbar-title {
    font-size: 1.3rem;
    padding-bottom: 0.25rem;
    font-weight: 700;
    color: var(--primary-dark);
    font-family: 'Playfair Display', serif;
    letter-spacing: 0.2px;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 1;
    min-width: 0;
}
.topbar-title.topbar-title-visible {
    opacity: 1;
}

/* --- Widgets (Unified) --- */
.info-card {
    display: flex;
    align-items: center;
    gap: 40px;
    font-size: 1.1rem;
    font-weight: 600;
    flex-shrink: 0;
}

.info-section {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Outfit', sans-serif;
}

.info-section .icon {
    font-size: 1.4rem;
    color: var(--primary-color);
    opacity: 0.8;
}

.divider {
    width: 1px;
    height: 36px;
    background-color: rgba(0,0,0,0.12);
}

.clock-weather-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1px;
    margin-left: auto;
}

.time-section {
    font-family: 'DM Mono', monospace;
    font-weight: 500;
    font-size: 1.35rem;
    color: var(--primary-dark);
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.weather-section {
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
    line-height: 1.2;
    opacity: 0.8;
}

/* ============================================
   SIDEBAR — Navigation
   ============================================ */
.sidebar {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 160px;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    z-index: 30;
    border-left: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: -2px 0 16px rgba(0, 0, 0, 0.07);
}

/* Brand / Logo area */
.sidebar-brand,
.logo-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 80px;
    gap: 4px;
    border-bottom: 1px solid rgba(0,0,0,0.07);
    flex-shrink: 0;
}

.logo-area h2 {
    display: none;
}

.sidebar-brand-icon {
    font-size: 2.2rem;
    line-height: 1;
}

.sidebar-brand-name {
    font-size: 0.75rem;
    font-weight: 900;
    color: rgba(255,255,255,0.5);
    letter-spacing: 3px;
    text-transform: uppercase;
}

/* Nav group */
.main-nav {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 20px 16px 0;
    gap: 10px;
}

/* Bottom section (back button) */
.sidebar-bottom {
    padding: 0 16px 28px;
}

/* ─── Nav Button ─────────────────────────────── */
.nav-btn {
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.07);
    color: #5a6e7f;
    width: 100%;
    height: 82px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    transition: background 0.2s ease, color 0.2s ease,
                border-color 0.2s ease, transform 0.1s ease;
    position: relative;
    overflow: hidden;
}

.nav-btn::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%) scaleY(0);
    width: 3px;
    height: 50%;
    background: var(--primary-color);
    border-radius: 0 3px 3px 0;
    transition: transform 0.2s ease;
}

.nav-btn:active {
    transform: scale(0.96);
    background: rgba(255, 255, 255, 0.06);
}

/* Active state */
.nav-btn.active {
    background: rgba(56, 140, 119, 0.1);
    border-color: rgba(56, 140, 119, 0.3);
    color: #006c51;
}

.nav-btn.active::before {
    transform: translateY(-50%) scaleY(1);
}

/* Disabled (back button) */
.nav-btn.disabled {
    opacity: 0.22;
    pointer-events: none;
    cursor: default;
}

/* Back button specific */
.back-btn {
    color: #7a8e9a;
}

.back-btn:not(.disabled) {
    background: rgba(56, 140, 119, 0.06);
    border-color: rgba(56, 140, 119, 0.15);
    color: #388c77;
}

.back-btn:not(.disabled):active {
    background: rgba(56, 140, 119, 0.12);
}

/* Icon & label inside button */
.nav-btn-icon {
    font-size: 2rem;
    line-height: 1;
    display: block;
    transition: transform 0.2s ease;
}

.nav-btn:hover .nav-btn-icon {
    transform: scale(1.12);
}

.nav-btn-label {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    display: block;
    line-height: 1;
}

/* Legacy .icon inside nav-btn (compatibility) */
.nav-btn .icon {
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.footer-area {
    display: none;
}

/* --- View Container (Common) --- */
.view-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

/* --- Map Container --- */
#map-container {
    /* Inherits view-container */
}

#map {
    width: 100%;
    height: 100%;
}

/* --- Corner Panel (Grave Details) --- */
.grave-panel {
    position: absolute;
    bottom: 30px;
    left: 30px;
    width: 380px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-top: 6px solid #388c77;
    border-radius: 18px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.14), 0 4px 16px rgba(0,0,0,0.06);
    z-index: 100;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.28s ease-out;
}

.close-panel-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0,0,0,0.06);
    color: #6a7a8a;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.15s;
    z-index: 2;
}

.close-panel-btn:active {
    background: rgba(0,0,0,0.12);
}


.panel-header {
    padding: 18px 20px 13px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.panel-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a2433;
    font-family: 'Playfair Display', serif;
    padding-right: 28px;
    line-height: 1.3;
}

.panel-subtitle {
    margin: 4px 0 0 0;
    font-size: 0.85rem;
    color: #388c77;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.panel-body {
    display: flex;
    gap: 16px;
    padding: 14px 20px;
    align-items: flex-start;
}

.panel-photo {
    width: 80px;
    height: 90px;
    background: #f0ece3;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 10px;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: #aaa;
    overflow: hidden;
}

.panel-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    flex: 1;
}

.info-row {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.info-row .label {
    font-size: 0.72rem;
    color: #8a9ab0;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-row .value {
    font-size: 1rem;
    color: #1a2433;
    font-weight: 700;
}

.panel-actions-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 16px 18px;
    margin-top: auto;
    flex-shrink: 0;
}

.panel-action {
    flex: 1;
    padding: 11px 10px;
    font-size: 0.88rem;
    background: linear-gradient(135deg, #388c77, #006c51);
    color: white;
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(56, 140, 119, 0.3);
    cursor: pointer;
    font-weight: 600;
    letter-spacing: 0.3px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
}

.panel-action:active {
    transform: scale(0.98);
    box-shadow: 0 2px 8px rgba(56, 140, 119, 0.2);
}

.panel-ver-mais {
    background: transparent;
    color: #006c51;
    border: 1.5px solid rgba(0,95,115,0.3);
    box-shadow: none;
}

.panel-ver-mais:active {
    background: rgba(0,95,115,0.06);
    box-shadow: none;
}

.panel-secondary-row {
    display: flex;
    flex-direction: row;
    gap: 8px;
}

.panel-qr-action {
    background: transparent;
    color: #006c51;
    border: 1.5px solid rgba(0,95,115,0.3);
    box-shadow: none;
    gap: 5px;
    font-size: 0.78rem;
    flex: 1;
}
.panel-qr-action i { font-size: 0.82rem; }
.panel-qr-action:active { background: rgba(0,95,115,0.06); box-shadow: none; }

.panel-secondary-row .panel-ver-mais {
    flex: 1;
    font-size: 0.78rem;
}


@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* --- Map Markers --- */
.kiosk-marker {
    display: flex;
    justify-content: center;
    position: relative;
    cursor: auto;
    /* It's us, not clickable */
}

.kiosk-marker div.pulse {
    position: absolute;
    width: 60px;
    height: 60px;
    background: rgba(0, 255, 0, 0.4);
    border-radius: 50%;
    bottom: 5px;
    /* Align with feet */
    left: 50%;
    transform: translateX(-50%);
    animation: pulse 2s infinite;
    z-index: -1;
}

@keyframes pulse {
    0% {
        transform: translateX(-50%) scale(0.5);
        opacity: 1;
    }

    100% {
        transform: translateX(-50%) scale(2);
        opacity: 0;
    }
}

/* --- Search View --- */
#search-view {
    background: #eef0f3;
    padding: 80px 0 0 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 20;
    right: 160px;
    overflow: hidden;
}

/* Hero Header */
.search-hero {
    text-align: center;
    padding: 20px 40px 14px;
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,0,0,0.07);
    flex-shrink: 0;
}

.search-hero-icon {
    font-size: 2rem;
    margin-bottom: 4px;
    opacity: 0.6;
}

.search-hero h1 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-dark);
    letter-spacing: -0.3px;
}

.search-hero-sub {
    margin: 5px 0 0;
    font-size: 0.95rem;
    color: #6a7a8a;
    font-weight: 500;
}

/* Search Input Area */
.search-input-area {
    padding: 20px 60px 0;
    flex-shrink: 0;
}

.search-input-row {
    display: flex;
    gap: 15px;
    align-items: stretch;
}

.search-input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1.5px solid rgba(0,0,0,0.1);
    border-radius: var(--kiosk-radius);
    padding: 10px 18px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    transition: all 0.2s ease;
}

.search-input-wrapper:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(56, 140, 119, 0.12), 0 2px 10px rgba(0,0,0,0.06);
}

.search-input-icon {
    font-size: 1.8rem;
    margin-right: 14px;
    color: #aaa;
    flex-shrink: 0;
}

.search-input-wrapper input {
    flex-grow: 1;
    border: none;
    font-size: 2rem;
    font-weight: 600;
    outline: none;
    background: transparent;
    font-family: 'Outfit', sans-serif;
    color: #000000;
    letter-spacing: 0.5px;
}

.search-input-wrapper input::placeholder {
    color: #aaa;
    font-weight: 500;
}

.search-clear-btn {
    background: rgba(0,0,0,0.06);
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    color: #6a7a8a;
    font-size: 0.85rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.15s;
}

.search-clear-btn:active {
    background: rgba(0,0,0,0.12);
}

.search-submit-btn {
    background: linear-gradient(135deg, #388c77, #006c51);
    color: #fff;
    border: none;
    border-radius: var(--kiosk-radius);
    padding: 0 28px;
    font-size: 1rem;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.8px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(56, 140, 119, 0.35);
    transition: all 0.15s;
    white-space: nowrap;
}

.search-submit-btn:active {
    transform: scale(0.97);
    box-shadow: 0 2px 6px rgba(56, 140, 119, 0.2);
}

/* Autocomplete Results Area (inline, between input and keyboard) */
.autocomplete-results-area {
    flex: 1;
    margin: 12px 60px;
    background: #ffffff;
    border-radius: var(--kiosk-radius);
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 4px 24px rgba(0,0,0,0.07);
    overflow-y: auto;
    min-height: 0;
    scrollbar-width: thin;
    scrollbar-color: #d0d0d0 transparent;
}

.autocomplete-results-area::-webkit-scrollbar {
    width: 5px;
}
.autocomplete-results-area::-webkit-scrollbar-track {
    background: transparent;
    margin: 8px 0;
}
.autocomplete-results-area::-webkit-scrollbar-thumb {
    background: #d0d0d0;
    border-radius: 99px;
}
.autocomplete-results-area::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

@keyframes dropdownSlide {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.autocomplete-item {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    cursor: pointer;
    transition: background 0.12s;
    border-bottom: 1px solid #f2f2f2;
    gap: 14px;
}

.autocomplete-item:last-child { border-bottom: none; }

.autocomplete-item:active { background: rgba(56, 140, 119,0.05); }

/* Avatar */
.result-avatar {
    width: 46px;
    height: 58px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: #f0ece3;
    display: flex;
    align-items: center;
    justify-content: center;
}

.result-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-photo-placeholder {
    width: 100%;
    height: 100%;
    background: #f0ece3;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b8b0a4;
}

.result-chevron {
    flex-shrink: 0;
    color: #ccc;
}

.autocomplete-item-info {
    flex-grow: 1;
    min-width: 0;
}

.autocomplete-item-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a2433;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.autocomplete-item-name .match {
    color: var(--primary-color);
    font-weight: 800;
}

.autocomplete-item-desc {
    font-size: 0.85rem;
    color: #888;
    font-weight: 500;
    margin-top: 3px;
}

.search-results-header {
    padding: 10px 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #aaa;
    background: #fafafa;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.autocomplete-empty {
    padding: 40px 20px;
    text-align: center;
    color: #bbb;
    font-size: 1rem;
    font-weight: 600;
}

.autocomplete-hint-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: 20px;
    color: #aaa;
}

.hint-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
    opacity: 0.5;
}

.hint-text {
    font-size: 1rem;
    font-weight: 600;
    color: #bbb;
    text-align: center;
}

/* Biography button in results */
.result-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.bio-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: rgba(56, 140, 119,0.08);
    border: 1px solid rgba(56, 140, 119,0.2);
    color: #388c77;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.12s;
    flex-shrink: 0;
    white-space: nowrap;
}
.bio-btn:active { background: rgba(56, 140, 119,0.18); }

/* Biography Full-Screen Page — Heaven Style */
.bio-page {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 26;
    display: none;
    flex-direction: column;
    background: #ffffff;
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.22,1,0.36,1);
}
.bio-page.bio-page-visible {
    opacity: 1;
    transform: translateX(0);
}
.page-map3d .bio-page {
    right: 170px;
}

.bio-page-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center top;
    filter: blur(40px) saturate(0.4) brightness(1.2);
    opacity: 0.25;
    pointer-events: none;
}

.bio-page-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    padding-top: 80px;
}

.bio-page-back {
    display: none;
}

.bio-page-hero {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 24px 36px 20px;
}

.bio-page-photo-wrap {
    width: 90px;
    height: 114px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    background: linear-gradient(135deg, #d8e8e8, #b0cccc);
    border: 3px solid rgba(255,255,255,0.9);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
}

.bio-photo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


.bio-page-hero-text { flex: 1; }

.bio-page-name {
    font-size: 1.7rem;
    font-weight: 700;
    color: #1a2433;
    font-family: 'Playfair Display', serif;
    line-height: 1.2;
}

.bio-page-dates {
    font-size: 1rem;
    color: #888;
    margin-top: 6px;
    font-style: italic;
    letter-spacing: 0.5px;
}

.bio-page-section {
    font-size: 0.85rem;
    color: #388c77;
    margin-top: 4px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.bio-page-meta {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.bio-meta-row {
    display: flex;
    gap: 8px;
    align-items: baseline;
    font-size: 0.85rem;
}

.bio-meta-label {
    color: #aaa;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.5px;
    min-width: 70px;
    flex-shrink: 0;
}

.bio-meta-value {
    color: #3a4a5a;
    font-weight: 500;
}

.bio-page-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 36px;
    margin: 4px 0 16px;
}
.bio-page-divider::before,
.bio-page-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(56, 140, 119,0.2), transparent);
}
.bio-page-divider span {
    font-size: 0.65rem;
    color: rgba(56, 140, 119,0.4);
    letter-spacing: 5px;
}

.bio-page-body {
    flex: 1;
    overflow-y: auto;
    padding: 0 36px 20px;
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
}
.bio-page-body::-webkit-scrollbar { width: 4px; }
.bio-page-body::-webkit-scrollbar-thumb { background: #ccc; border-radius: 99px; }

.bio-text {
    font-size: 1.05rem;
    color: #3a4a5a;
    line-height: 1.85;
    font-family: 'Playfair Display', serif;
    font-weight: 400;
    margin: 0;
}

.bio-empty {
    font-size: 1rem;
    color: #bbb;
    font-style: italic;
    text-align: center;
    margin: 40px 0;
}

.bio-loading {
    font-size: 1rem;
    color: #bbb;
    text-align: center;
    padding: 40px 0;
}

.bio-page-map-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0 36px 32px;
    padding: 18px;
    background: #388c77;
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.3px;
    box-shadow: 0 8px 24px rgba(56, 140, 119,0.3);
    transition: background 0.15s, transform 0.1s;
    flex-shrink: 0;
}
.bio-page-map-btn:active {
    background: #2f7764;
    transform: scale(0.98);
}

/* Keyboard Area */
.search-keyboard-area {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 40px;
    flex-shrink: 0;
}

.keyboard-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    width: 100%;
    max-width: 950px;
    margin: 0 auto;
    align-content: flex-end;
}

.key-btn {
    width: 72px;
    height: 64px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    font-size: 1.4rem;
    font-weight: 700;
    color: #1a2433;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08), 0 1px 0 rgba(0,0,0,0.06);
    transition: all 0.1s;
    flex-shrink: 0;
}

.key-btn:active {
    transform: translateY(1px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    background: #f4f6f8;
}

/* Wide keys for Space, Caps, Back */
.key-btn.wide-key {
    width: 110px;
}

.key-btn.space-key {
    width: 380px;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 2px;
}

.key-btn.special-key {
    background: #f0f3f6;
    color: #3a4a5a;
    border-color: rgba(0,0,0,0.08);
}

.key-btn.active-caps {
    background: linear-gradient(135deg, #388c77, #006c51);
    color: white;
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(56, 140, 119, 0.3);
}

.key-btn.accent-key {
    width: 60px;
    height: 56px;
    font-size: 1.2rem;
    background: #f8fafb;
    border-color: rgba(0,0,0,0.08);
}

/* --- Info View --- */
#info-view {
    background: #eef0f3;
    padding: 80px 0 0 0;
    display: flex;
    flex-direction: column;
    z-index: 20;
    right: 160px;
    overflow: hidden;
}

.info-scroll-area {
    flex: 1;
    overflow-y: auto;
    padding: 25px 50px 30px;
    min-height: 0;
}

/* Statistics Grid */
.info-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 25px;
}

.stat-card {
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: var(--kiosk-radius);
    padding: 20px 15px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 6px;
}

.stat-value {
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Info Card Blocks */
.info-cards {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.info-card-block {
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: var(--kiosk-radius);
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.info-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 22px;
    background: #f8fafb;
    border-bottom: 1px solid rgba(0,0,0,0.07);
}

.info-card-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 800;
    color: #000;
}

.info-card-header i {
    font-size: 1rem;
    color: #006c51;
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}

.info-card-body {
    padding: 18px 22px;
}

/* Schedule rows */
.schedule-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.schedule-row:last-child {
    border-bottom: none;
}

.schedule-day {
    font-weight: 700;
    font-size: 1.05rem;
    color: #333;
}

.schedule-time {
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--primary-color);
}

/* Contact rows */
.contact-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.contact-row:last-child {
    border-bottom: none;
}

.contact-label {
    font-weight: 700;
    font-size: 1rem;
    color: #666;
}

.contact-value {
    font-weight: 800;
    font-size: 1rem;
    color: #000;
}

/* How-to steps */
.how-to-step {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 1.05rem;
    font-weight: 500;
    color: #333;
}

.how-to-step:last-child {
    border-bottom: none;
}

.step-num {
    width: 34px;
    height: 34px;
    min-width: 34px;
    background: linear-gradient(135deg, #388c77, #006c51);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    border: none;
    box-shadow: 0 2px 8px rgba(56, 140, 119, 0.3);
}

/* Developer Credit */
.info-developer-credit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
    padding-top: 18px;
    font-size: 0.85rem;
    color: #94a3b8;
}
.info-developer-credit .dev-brand {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #64748b;
    font-weight: 600;
}
.info-developer-credit .dev-brand img {
    height: 16px;
    width: auto;
}

/* --- Map Legend --- */
.map-legend {
    position: absolute;
    top: 120px;
    right: 180px;
    background: rgba(255, 255, 255, 0.95);
    border: 3px solid #000;
    border-radius: 12px;
    padding: 15px 20px;
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.3);
    z-index: 50;
    min-width: 220px;
}

.map-legend h4 {
    margin: 0 0 12px 0;
    font-size: 1.1rem;
    font-weight: 800;
    color: #333;
    border-bottom: 2px solid #eee;
    padding-bottom: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.legend-item:last-child {
    margin-bottom: 0;
}

.legend-color {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    flex-shrink: 0;
    box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.2);
}

.legend-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
}

.legend-label small {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: #666;
    margin-top: 2px;
}

/* --- Zoom Controls --- */
.zoom-controls {
    position: absolute;
    bottom: 36px;
    right: 190px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    z-index: 60;
}

.zoom-divider {
    width: 30px;
    height: 1px;
    background: rgba(0,0,0,0.12);
    margin: 4px 0;
}

.zoom-btn {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 14px;
    font-size: 1.7rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
    transition: all 0.15s ease;
    color: #2a3a4a;
}

.zoom-btn:active {
    transform: scale(0.93);
    background: rgba(240, 244, 248, 0.95);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

/* --- Satellite Button --- */
.satellite-btn { color: #555; }
.satellite-btn i { font-size: 0.95rem; }
.satellite-btn.satellite-active {
    color: #047857;
    background: #ecfdf5;
    border-color: #047857;
}

/* --- Disabled state while map loads --- */
.zoom-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

/* --- User GPS Dot Marker --- */
.user-gps-dot {
    position: relative;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.gps-dot-inner {
    width: 14px;
    height: 14px;
    background: #2563eb;
    border: 2.5px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 1px 6px rgba(37,99,235,0.6);
    position: relative;
    z-index: 2;
}
.gps-pulse-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(37,99,235,0.25);
    animation: gps-pulse 1.8s ease-out infinite;
    z-index: 1;
}
@keyframes gps-pulse {
    0%   { transform: translate(-50%,-50%) scale(0.6); opacity: 1; }
    100% { transform: translate(-50%,-50%) scale(2.2); opacity: 0; }
}



/* --- 2D/3D Toggle Button --- */
.toggle-view-btn {
    font-size: 0.78rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.5px;
    color: #2563eb !important;
    border-color: rgba(37,99,235,0.3) !important;
}

.toggle-view-btn.is-2d {
    color: #d97706 !important;
    border-color: rgba(217,119,6,0.3) !important;
}

/* --- Cancel Navigation Button --- */
.cancel-nav-btn {
    position: absolute;
    bottom: 36px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    color: #b91c1c;
    border: 1.5px solid rgba(185, 28, 28, 0.2);
    border-radius: 50px;
    padding: 11px 24px;
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    cursor: pointer;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    font-family: 'Inter', sans-serif;
}

.cancel-nav-btn:active {
    transform: translateX(-50%) scale(0.97);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

/* --- Footprint Markers (Path Animation) --- */
.footprint-marker {
    font-size: 18px;
    pointer-events: none;
    filter: drop-shadow(0 1px 3px rgba(59, 130, 246, 0.5));
    line-height: 1;
    animation: footprintAppear 0.35s ease-out forwards;
    opacity: 0;
}

@keyframes footprintAppear {
    0% {
        opacity: 0;
    }

    60% {
        opacity: 0.9;
    }

    100% {
        opacity: 0.7;
    }
}

/* --- Walking Marker (Path Animation) --- */
.walking-marker {
    width: 52px;
    height: 52px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: default;
    pointer-events: none;
}

.walking-marker .marker-body {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 50%, #1d4ed8 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow:
        0 0 0 3px #ffffff,
        0 4px 12px rgba(37, 99, 235, 0.5),
        0 0 20px rgba(59, 130, 246, 0.3);
    animation: markerBounce 0.6s ease-in-out infinite;
    z-index: 2;
    position: relative;
}

.walking-marker .pulse-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 3px solid rgba(59, 130, 246, 0.6);
    animation: walkerPulse 1.5s ease-out infinite;
    z-index: 1;
}

.walking-marker .pulse-ring-2 {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid rgba(59, 130, 246, 0.4);
    animation: walkerPulse 1.5s ease-out 0.5s infinite;
    z-index: 1;
}

@keyframes markerBounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-4px);
    }
}

@keyframes walkerPulse {
    0% {
        width: 44px;
        height: 44px;
        opacity: 1;
    }

    100% {
        width: 90px;
        height: 90px;
        opacity: 0;
    }
}

/* --- Arrival Tooltip --- */
.arrival-tooltip {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    padding: 8px 18px;
    border-radius: 20px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    white-space: nowrap;
    box-shadow:
        0 0 0 3px rgba(255, 255, 255, 0.9),
        0 4px 16px rgba(34, 197, 94, 0.4);
    animation: tooltipAppear 0.4s ease-out forwards;
    z-index: 10;
    pointer-events: none;
}

.arrival-tooltip-icon {
    display: inline-flex;
    vertical-align: -2px;
    margin-right: 6px;
}

.arrival-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #16a34a;
}

@keyframes tooltipAppear {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(10px) scale(0.8);
    }

    100% {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
}

/* --- Destination Pulse (on arrival) --- */
.destination-marker {
    width: 30px;
    height: 30px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.destination-marker .dest-dot {
    width: 18px;
    height: 18px;
    background: #22c55e;
    border-radius: 50%;
    box-shadow:
        0 0 0 3px white,
        0 0 12px rgba(34, 197, 94, 0.6);
    z-index: 2;
    position: relative;
}

.destination-marker .dest-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(34, 197, 94, 0.3);
    animation: destPulse 1.2s ease-out infinite;
}

@keyframes destPulse {
    0% {
        width: 18px;
        height: 18px;
        opacity: 1;
    }

    100% {
        width: 60px;
        height: 60px;
        opacity: 0;
    }
}

/* ─── 3D Stone Cross Grave Marker ──────────────────────────────────── */
.grave-cross-marker {
    width: 54px;
    height: 76px;
    position: relative;
    pointer-events: none;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    filter: drop-shadow(0 8px 16px rgba(0,0,0,0.55));
    animation: crossFloat 3.2s ease-in-out infinite;
}

@keyframes crossFloat {
    0%, 100% { transform: translateY(0px);  }
    50%       { transform: translateY(-6px); }
}

.grave-cross-marker .cross-wrap {
    position: relative;
    width: 36px;
    height: 64px;
}

/* Vertical bar */
.grave-cross-marker .cross-v {
    position: absolute;
    width: 11px;
    top: 0;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg,
        #e2dbd1 0%, #c0b8ae 30%, #a09890 60%, #827a72 100%);
    border-radius: 3px 3px 1px 1px;
    box-shadow:
        inset -2px 0 3px rgba(0,0,0,0.28),
        inset  1px 0 2px rgba(255,255,255,0.22),
        inset  0 -2px 3px rgba(0,0,0,0.18);
}

/* Horizontal bar */
.grave-cross-marker .cross-h {
    position: absolute;
    height: 11px;
    left: 0;
    right: 0;
    top: 15px;
    background: linear-gradient(180deg,
        #d8d1c7 0%, #b4ada3 50%, #8c8580 100%);
    border-radius: 3px;
    box-shadow:
        inset  0 -2px 3px rgba(0,0,0,0.25),
        inset  0  1px 2px rgba(255,255,255,0.2);
}

/* Intersection cap (rounded knob at cross center) */
.grave-cross-marker .cross-knob {
    position: absolute;
    width: 13px;
    height: 13px;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    background: radial-gradient(circle at 35% 35%, #e0d9cf, #8c8580);
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.35);
    z-index: 2;
}

/* Base / pedestal */
.grave-cross-marker .cross-base {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 18px;
    background: linear-gradient(180deg,
        #a49c92 0%, #7e7670 55%, #5c5550 100%);
    border-radius: 4px 4px 3px 3px;
    box-shadow:
        0 3px 0 rgba(0,0,0,0.32),
        inset 0 1px 2px rgba(255,255,255,0.18);
}

/* Ground glow */
.grave-cross-marker .cross-glow {
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 34px;
    height: 9px;
    border-radius: 50%;
    filter: blur(5px);
    background: rgba(34, 197, 94, 0.55);
    animation: crossGlowPulse 1.6s ease-in-out infinite;
}

.grave-cross-marker.nav-dest .cross-glow {
    background: rgba(34, 197, 94, 0.75);
}

.grave-cross-marker.nav-dest .cross-v,
.grave-cross-marker.nav-dest .cross-h,
.grave-cross-marker.nav-dest .cross-base {
    background: linear-gradient(135deg, #6ee7b7 0%, #34d399 35%, #10b981 70%, #059669 100%);
    box-shadow:
        inset -2px 0 3px rgba(0,0,0,0.2),
        inset  1px 0 2px rgba(255,255,255,0.3),
        0 0 8px rgba(52, 211, 153, 0.45);
}

.grave-cross-marker.nav-dest .cross-knob {
    background: radial-gradient(circle at 35% 35%, #a7f3d0, #059669);
    box-shadow: 0 0 8px rgba(52,211,153,0.6);
}

@keyframes crossGlowPulse {
    0%, 100% { opacity: 0.55; transform: translateX(-50%) scaleX(1);   }
    50%       { opacity: 1;    transform: translateX(-50%) scaleX(1.35); }
}

/* ─── Interactive Tutorial (single box-shadow spotlight) ─────────── */
/* One transparent rectangle over the target; a huge box-shadow darkens
   everything around it. No bands = no seams/lines across the screen. */
.tutorial-spotlight {
    position: fixed;
    background: transparent;
    border-radius: 14px;
    z-index: 9998;
    pointer-events: none;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.6);
    transition: top 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                left 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                width 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Full-screen blocker: sits above everything (incl. sidebar) but below the
   tutorial panel, so nothing outside the panel can be clicked during the tour. */
.tutorial-blocker {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: transparent;
    pointer-events: auto;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Tutorial tooltip, badge, nav, and body styles moved to bottom of file (improved versions) */

/* ============================================
   HELP VIEW
   ============================================ */
#help-view {
    background: #eef0f3;
    padding: 80px 0 0 0;
    display: flex;
    flex-direction: column;
    z-index: 20;
    right: 160px;
    overflow: hidden;
}

/* --- Feature Cards --- */
.help-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 28px;
}

.help-feature-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 22px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.help-feature-card:active {
    transform: scale(0.97);
    background: #f0f9f9;
    border-color: #388c77;
}

.feature-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    color: #006c51;
}

.feature-card-icon svg {
    stroke: #006c51;
}

.help-feature-card h3 {
    margin: 0 0 6px;
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
}

.help-feature-card p {
    margin: 0;
    font-size: 0.82rem;
    color: #64748b;
    line-height: 1.4;
}

/* --- FAQ Section --- */
.help-faq {
    margin-bottom: 28px;
}

.help-faq-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 12px;
}

.faq-item {
    border-bottom: 1px solid #e8edf2;
    cursor: pointer;
    overflow: hidden;
    transition: background 0.2s;
}

.faq-item:first-of-type { border-top: 1px solid #e8edf2; }

.faq-item.open {
    background: #f8fffe;
}

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 4px;
    font-weight: 600;
    font-size: 0.97rem;
    color: #1e293b;
}

.faq-chevron {
    font-size: 0.7rem;
    color: #94a3b8;
    transition: transform 0.3s ease, color 0.3s;
    flex-shrink: 0;
}

.faq-item.open .faq-chevron {
    transform: rotate(90deg);
    color: #006c51;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1), padding 0.35s;
    padding: 0 4px;
}

.faq-item.open .faq-answer {
    max-height: 200px;
    padding: 0 4px 16px;
}

.faq-answer p {
    margin: 0;
    font-size: 0.92rem;
    color: #475569;
    line-height: 1.6;
}

/* --- Tutorial Button --- */
.help-start-tutorial-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 16px 24px;
    background: #006c51;
    color: white;
    border: none;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.18s ease, transform 0.12s ease;
    letter-spacing: 0.3px;
}

.help-start-tutorial-btn:active {
    background: #004a5a;
    transform: scale(0.98);
}

/* ============================================
   TUTORIAL - LEFT PANEL (Vertical Kiosk)
   ============================================ */
.tutorial-panel {
    position: fixed;
    top: 50%;
    left: 24px;
    transform: translateY(-50%);
    z-index: 10000;
    background: #ffffff;
    border: 1px solid #e9edf2;
    border-radius: 20px;
    width: 340px;
    max-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.18);
    animation: panelSlideIn 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: 'Inter', sans-serif;
    overflow: hidden;
}

@keyframes panelSlideIn {
    from {
        transform: translateY(-50%) translateX(-24px);
        opacity: 0;
    }

    to {
        transform: translateY(-50%) translateX(0);
        opacity: 1;
    }
}

/* --- Progress Bar (top of panel) --- */
.tutorial-panel-progress {
    height: 5px;
    background: #eef2f6;
    width: 100%;
    flex: 0 0 auto;
}

.tutorial-panel-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-light), var(--primary-color));
    border-radius: 0 4px 4px 0;
    transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Panel Content (Vertical Stack) --- */
.tutorial-panel-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 26px 26px 22px;
    gap: 0;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

/* --- Step Number (Top) --- */
.tutorial-panel-left {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 18px;
}

.tutorial-panel-step-num {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1;
    letter-spacing: -1px;
}

.tutorial-panel-step-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #a3adb9;
}

/* --- Center Content --- */
.tutorial-panel-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    margin-bottom: 22px;
}

.tutorial-panel-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: rgba(56, 140, 119, 0.1);
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 16px;
}

.tutorial-panel-text {
    width: 100%;
}

.tutorial-panel-text h3 {
    margin: 0 0 8px;
    font-size: 1.25rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.2px;
}

.tutorial-panel-text p {
    margin: 0;
    font-size: 0.98rem;
    color: #64748b;
    line-height: 1.55;
}

/* --- Navigation Buttons (Bottom) --- */
.tutorial-panel-right {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
}

.tutorial-panel-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: transform 0.12s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.tutorial-panel-btn.prev {
    background: #f1f5f9;
    color: #475569;
}

.tutorial-panel-btn.next {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    box-shadow: 0 6px 16px rgba(56, 140, 119, 0.35);
}

.tutorial-panel-btn.next.finish {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    box-shadow: 0 6px 16px rgba(22, 197, 94, 0.35);
}

.tutorial-panel-btn.close {
    background: #f1f5f9;
    color: #94a3b8;
    width: 46px;
    height: 46px;
    font-size: 1.05rem;
}

.tutorial-panel-btn:active {
    transform: scale(0.93);
}

.tutorial-panel-btn:disabled {
    opacity: 0.3;
    pointer-events: none;
    box-shadow: none;
}

/* --- Replay tutorial button (footer) --- */
.tutorial-panel-footer {
    padding: 14px 26px;
    border-top: 1px solid #eef2f6;
    flex: 0 0 auto;
    background: #fff;
}

.tutorial-panel-replay {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    background: transparent;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    color: var(--primary-dark);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.12s ease;
}

.tutorial-panel-replay:active {
    background: rgba(56, 140, 119, 0.08);
    border-color: var(--primary-color);
    transform: scale(0.98);
}


/* Erro ao carregar a biografia: mensagem amigável + nova tentativa */
.bio-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    margin: 40px auto;
    max-width: 420px;
    text-align: center;
}
.bio-error-text {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}
.bio-retry-btn {
    padding: 12px 28px;
    background: var(--btn-bg);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
}
.bio-retry-btn:active {
    background: var(--btn-active-bg);
}
