:root {
    --page-bg: #f8fafc;
    --surface: #ffffff;
    --ink: #172033;
    --muted: #64748b;
    --axis: #334155;
    --axis-soft: rgba(51, 65, 85, 0.14);
    --line: rgba(15, 23, 42, 0.14);
    --shadow: 0 14px 36px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    overflow: hidden;
}

body {
    background: var(--page-bg);
    color: var(--ink);
    font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body.has-lightbox {
    overflow: hidden;
}

body.info-page {
    overflow: hidden;
}

button {
    font: inherit;
    touch-action: manipulation;
}

.lucide {
    flex: 0 0 auto;
}

#timeline-app {
    display: grid;
    grid-template-rows: auto 1fr;
    width: 100vw;
    height: 100vh;
}

#timeline-app.info-app {
    overflow: hidden;
}

.timeline-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 72px;
    padding: 14px 22px;
    background: var(--surface);
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.05);
    z-index: 20;
}

.timeline-toolbar h1 {
    margin: 0;
    font-size: 22px;
    line-height: 1.1;
    letter-spacing: 0;
}

.timeline-toolbar p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.timeline-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.mobile-menu-button {
    display: none;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 8px;
    background: #f8fafc;
}

.view-selector {
    display: block;
    min-height: 36px;
}

.view-selector select {
    height: 34px;
    max-width: 220px;
    border: 1px solid rgba(15, 23, 42, 0.16);
    border-radius: 8px;
    padding: 0 8px;
    background: #ffffff;
    color: var(--ink);
    font: inherit;
    font-size: 13px;
    font-weight: 800;
}

.control-group span {
    padding: 0 4px;
    color: #475569;
    font-size: 12px;
    font-weight: 800;
}

.timeline-controls svg,
.timeline-search svg {
    display: block;
    width: 18px;
    height: 18px;
    stroke-width: 2.2;
}

.timeline-controls button,
.timeline-search button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(15, 23, 42, 0.16);
    border-radius: 8px;
    background: #ffffff;
    color: var(--ink);
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    touch-action: manipulation;
}

.timeline-controls button:hover,
.timeline-search button:hover {
    background: #f1f5f9;
}

.login-link,
.timeline-controls .icon-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    border: 1px solid rgba(15, 23, 42, 0.16);
    border-radius: 8px;
    padding: 0 12px;
    background: #ffffff;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    touch-action: manipulation;
}

.login-link:hover,
.timeline-controls .icon-link:hover {
    background: #f1f5f9;
    color: var(--ink);
}

.timeline-controls .recenter-button,
.timeline-controls .copy-settings-button,
.timeline-controls .compact-layout-button,
.timeline-controls .fullscreen-button,
.timeline-controls .timeline-view-button,
.timeline-controls .table-view-button,
.timeline-controls .photo-view-button,
.timeline-controls .info-link.icon-command-button,
.timeline-controls .print-link.icon-command-button,
.timeline-controls .login-link.icon-command-button,
.timeline-search .timeline-search-toggle.icon-command-button {
    width: 36px;
    min-width: 36px;
    padding: 0 12px;
    font-size: 18px;
    font-weight: 800;
}

.timeline-controls .icon-command-button,
.timeline-search .icon-command-button {
    padding: 0;
}

.timeline-controls .info-link.icon-command-button,
.timeline-controls .print-link.icon-command-button,
.timeline-controls .login-link.icon-command-button {
    justify-content: center;
    color: var(--ink);
    font-size: 18px;
}

.timeline-controls .timeline-home-link {
    min-width: auto;
    padding: 0 12px;
}

.timeline-controls .info-link.icon-command-button svg,
.timeline-controls .print-link.icon-command-button svg,
.timeline-controls .login-link.icon-command-button svg {
    width: 20px;
    height: 20px;
    stroke-width: 2.2;
}

.timeline-controls .compact-layout-button.is-active,
.timeline-controls .compact-layout-button[aria-pressed="true"],
.timeline-controls .fullscreen-button.is-active,
.timeline-controls .fullscreen-button[aria-pressed="true"],
.timeline-controls .timeline-view-button.is-active,
.timeline-controls .timeline-view-button[aria-pressed="true"],
.timeline-controls .table-view-button.is-active,
.timeline-controls .table-view-button[aria-pressed="true"],
.timeline-controls .photo-view-button.is-active,
.timeline-controls .photo-view-button[aria-pressed="true"] {
    border-color: #334155;
    background: #334155;
    color: #ffffff;
}

.timeline-controls .info-link.is-active {
    border-color: #334155;
    background: #334155;
    color: #ffffff;
}

.timeline-search {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
}

.timeline-search-panel {
    position: absolute;
    top: calc(100% + 8px);
    left: var(--search-panel-left, 0);
    z-index: 60;
    width: min(640px, calc(100vw - 32px));
    border: 1px solid rgba(15, 23, 42, 0.14);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow);
}

.timeline-search.is-open .timeline-search-toggle {
    border-color: #334155;
    background: #334155;
    color: #ffffff;
}

.timeline-search-form {
    padding: 10px;
}

.timeline-search-main {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) auto auto;
    gap: 8px;
    align-items: center;
}

.timeline-search-main input,
.timeline-search-advanced input,
.timeline-search-advanced select {
    width: 100%;
    min-height: 36px;
    border: 1px solid rgba(15, 23, 42, 0.16);
    border-radius: 8px;
    padding: 0 10px;
    background: #f8fafc;
    color: var(--ink);
    font: inherit;
    font-size: 13px;
}

.timeline-search-main .timeline-search-submit,
.timeline-search-main .timeline-search-advanced-toggle {
    width: auto;
    min-width: 0;
    padding: 0 12px;
    font-size: 13px;
    font-weight: 800;
}

.timeline-search-main .timeline-search-advanced-toggle[aria-expanded="true"] {
    border-color: #334155;
    background: #334155;
    color: #ffffff;
}

.timeline-search-advanced {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 10px;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    padding-top: 10px;
}

.timeline-search-advanced[hidden] {
    display: none;
}

.timeline-search.is-advanced-open .timeline-search-main .timeline-search-submit {
    display: none;
}

.timeline-search-advanced-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    padding-top: 10px;
}

.timeline-search .timeline-search-advanced-actions .timeline-search-submit-advanced {
    width: auto;
    height: 34px;
    padding: 0 12px;
    font-size: 13px;
    font-weight: 800;
}

.timeline-search-advanced label {
    display: grid;
    gap: 4px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.timeline-search-check {
    align-content: center;
    grid-template-columns: auto 1fr;
    align-items: center;
    text-transform: none !important;
}

.timeline-search-check input {
    width: auto;
    min-height: 0;
}

.timeline-search-results {
    max-height: min(56vh, 460px);
    overflow: auto;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    padding: 8px;
}

.timeline-search-status {
    margin: 0;
    padding: 8px;
    color: var(--muted);
    font-size: 13px;
}

.timeline-search-result-list {
    display: grid;
    gap: 6px;
}

.timeline-search .timeline-search-result {
    display: grid;
    grid-template-columns: 8px minmax(0, 1fr);
    gap: 10px;
    width: 100%;
    height: auto;
    min-height: 58px;
    justify-content: stretch;
    border-radius: 8px;
    padding: 8px;
    text-align: left;
}

.timeline-search-color {
    width: 8px;
    height: 100%;
    min-height: 38px;
    border-radius: 999px;
    background: var(--dark);
}

.timeline-search-result-text {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.timeline-search-result-text strong {
    overflow: hidden;
    color: var(--ink);
    font-size: 13px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.timeline-search-result-text span {
    overflow: hidden;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.timeline-search-badges {
    color: #475569 !important;
    font-size: 11px !important;
}

.timeline-data-table tr.is-search-target {
    animation: tableSearchPulse 2.2s ease;
}

@keyframes tableSearchPulse {
    0%,
    100% {
        background: transparent;
    }

    20%,
    75% {
        background: #fef3c7;
    }
}

#timeline-viewport {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    cursor: grab;
    user-select: none;
    touch-action: none;
    background:
        linear-gradient(90deg, rgba(15, 23, 42, 0.035) 1px, transparent 1px) 0 0 / 120px 100%,
        #fbfdff;
}

#timeline-viewport.is-dragging {
    cursor: grabbing;
}

.hover-date-guide {
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 24;
    width: 0;
    border-left: 2px solid rgba(51, 65, 85, 0.42);
    pointer-events: none;
}

.hover-date-guide[hidden],
.hover-date-readout[hidden] {
    display: none;
}

.hover-date-readout {
    position: absolute;
    top: 12px;
    left: 50%;
    z-index: 25;
    min-width: 92px;
    border: 1px solid rgba(15, 23, 42, 0.16);
    border-radius: 8px;
    padding: 7px 11px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--ink);
    font-size: 13px;
    font-weight: 800;
    text-align: center;
    transform: translateX(-50%);
    pointer-events: none;
    box-shadow: var(--shadow);
}

.info-shell {
    min-height: 0;
    overflow: auto;
    width: min(920px, calc(100% - 32px));
    margin: 0 auto;
    padding: 32px 0 56px;
}

.info-content {
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 8px;
    padding: 28px;
    background: #ffffff;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
}

.info-content p,
.info-content ul,
.info-content ol {
    color: #334155;
    font-size: 16px;
    line-height: 1.6;
}

.info-content a {
    color: #244c85;
    font-weight: 800;
}

.info-content .scripture-attribution {
    margin-top: 24px;
    border-top: 1px solid rgba(15, 23, 42, 0.12);
    padding-top: 14px;
    color: #64748b;
    font-size: 13px;
    line-height: 1.5;
}

.help-icon-token {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 28px;
    border: 1px solid rgba(15, 23, 42, 0.16);
    border-radius: 8px;
    padding: 2px 8px;
    background: #f8fafc;
    color: var(--ink);
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
    vertical-align: middle;
}

.help-icon-token svg {
    width: 16px;
    height: 16px;
    stroke-width: 2.2;
}

.feedback-panel {
    margin-top: 18px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 8px;
    padding: 24px;
    background: #ffffff;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
}

.feedback-panel h2 {
    margin: 0 0 8px;
    color: var(--ink);
    font-size: 22px;
    line-height: 1.2;
}

.feedback-panel p {
    margin: 0 0 16px;
    color: #475569;
    line-height: 1.5;
}

.feedback-alert {
    margin-bottom: 14px;
    border-radius: 8px;
    padding: 10px 12px;
    background: #fee2e2;
    color: #991b1b;
    font-size: 14px;
    font-weight: 800;
}

.feedback-alert.success {
    background: #dcfce7;
    color: #166534;
}

.feedback-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.feedback-form label {
    display: grid;
    gap: 7px;
    color: #475569;
    font-size: 13px;
    font-weight: 800;
}

.feedback-form input,
.feedback-form select,
.feedback-form textarea {
    width: 100%;
    border: 1px solid rgba(15, 23, 42, 0.16);
    border-radius: 8px;
    background: #ffffff;
    color: var(--ink);
    font: inherit;
}

.feedback-form input,
.feedback-form select {
    height: 42px;
    padding: 0 12px;
}

.feedback-form textarea {
    min-height: 132px;
    padding: 10px 12px;
    resize: vertical;
}

.feedback-form button {
    width: fit-content;
    min-height: 42px;
    border: 1px solid rgba(15, 23, 42, 0.16);
    border-radius: 8px;
    padding: 0 16px;
    background: #334155;
    color: #ffffff;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
}

.feedback-full {
    grid-column: 1 / -1;
}

.feedback-hidden {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.timeline-table-view,
.timeline-photo-view {
    min-height: 0;
    overflow: auto;
    padding: 18px;
    background: #f8fafc;
}

.timeline-table-shell {
    width: min(1500px, 100%);
    margin: 0 auto;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 8px;
    overflow: auto;
    background: #ffffff;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
}

.timeline-data-table {
    width: 100%;
    min-width: 980px;
    border-collapse: collapse;
}

.timeline-data-table th,
.timeline-data-table td {
    border-bottom: 1px solid rgba(15, 23, 42, 0.1);
    padding: 13px 14px;
    text-align: left;
    vertical-align: top;
}

.timeline-data-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f1f5f9;
    color: #334155;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.timeline-data-table td {
    color: #334155;
    font-size: 14px;
    line-height: 1.45;
}

.table-name-cell {
    min-width: 180px;
    color: var(--ink);
    font-weight: 800;
    white-space: pre-line;
}

.table-name-wrap {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.table-name-text {
    white-space: pre-line;
}

.table-event-edit-link {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: 1px solid rgba(15, 23, 42, 0.16);
    border-radius: 7px;
    background: #ffffff;
    color: #334155;
    text-decoration: none;
}

.table-event-edit-link svg {
    width: 15px;
    height: 15px;
    stroke-width: 2.1;
}

.table-event-edit-link:hover {
    border-color: rgba(36, 76, 133, 0.45);
    color: #244c85;
}

.table-description-cell {
    min-width: 280px;
    max-width: 520px;
}

.table-description-cell p,
.table-description-cell ul,
.table-description-cell ol {
    margin: 0 0 8px;
}

.table-description-cell p:last-child,
.table-description-cell ul:last-child,
.table-description-cell ol:last-child {
    margin-bottom: 0;
}

.table-description-cell a {
    color: #176fa5;
    font-weight: 800;
}

.table-date-note {
    margin-top: 7px;
    color: #64748b;
    font-size: 12px;
    line-height: 1.4;
}

.table-date-note p,
.table-date-note ul,
.table-date-note ol {
    margin: 0 0 6px;
}

.table-date-note p:last-child,
.table-date-note ul:last-child,
.table-date-note ol:last-child {
    margin-bottom: 0;
}

.table-empty-cell {
    color: var(--muted);
    font-size: 13px;
}

.table-image-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 170px;
}

.table-image-thumbs button {
    width: 70px;
    height: 52px;
    border: 1px solid rgba(15, 23, 42, 0.14);
    border-radius: 6px;
    padding: 3px;
    background: #0f172a;
    cursor: pointer;
}

.table-image-thumbs button:hover {
    border-color: #334155;
}

.table-image-thumbs img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.timeline-photo-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    width: min(1100px, 100%);
    margin: 0 auto;
    align-items: start;
}

.timeline-photo-frame {
    position: relative;
    display: grid;
    place-items: center;
    height: min(68vh, 680px);
    min-height: 420px;
    margin: 0;
    padding: 18px;
    overflow: hidden;
    border-radius: 8px;
    background: #020617;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12);
}

.timeline-photo-image {
    display: block;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    object-fit: contain;
    cursor: zoom-in;
}

.timeline-photo-shell > figcaption {
    width: 100%;
    margin: -4px 0 0;
    color: #334155;
    font-size: 14px;
    line-height: 1.45;
    text-align: left;
}

.timeline-photo-meta {
    position: relative;
    display: grid;
    gap: 10px;
    width: 100%;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 8px;
    padding: 18px 62px 18px 18px;
    background: #ffffff;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
}

.timeline-photo-edit {
    position: absolute;
    top: 16px;
    right: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(15, 23, 42, 0.14);
    border-radius: 8px;
    background: #ffffff;
    color: var(--ink);
    text-decoration: none;
}

.timeline-photo-edit:hover {
    background: #f1f5f9;
}

.timeline-photo-edit svg {
    width: 15px;
    height: 15px;
    stroke-width: 2.25;
}

.timeline-photo-meta h2 {
    margin: 0;
    color: var(--ink);
    font-size: 24px;
    line-height: 1.18;
    letter-spacing: 0;
    white-space: pre-line;
}

.timeline-photo-meta p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.timeline-photo-date-note {
    color: #475569;
    font-size: 13px;
    line-height: 1.45;
}

.timeline-photo-date-note p,
.timeline-photo-date-note ul,
.timeline-photo-date-note ol {
    margin: 0 0 6px;
}

.timeline-photo-date-note p:last-child,
.timeline-photo-date-note ul:last-child,
.timeline-photo-date-note ol:last-child {
    margin-bottom: 0;
}

.timeline-photo-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 6px;
}

.timeline-photo-see-button {
    min-height: 40px;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 0 14px;
    background: #334155;
    color: #ffffff;
    cursor: pointer;
    font: inherit;
    font-size: 14px;
    font-weight: 800;
}

.timeline-photo-count {
    white-space: nowrap;
}

.timeline-photo-thumbs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 4px 2px 10px;
}

.timeline-photo-thumbs button {
    flex: 0 0 auto;
    width: 86px;
    height: 64px;
    border: 2px solid transparent;
    border-radius: 6px;
    padding: 3px;
    background: #0f172a;
    cursor: pointer;
}

.timeline-photo-thumbs button.is-active {
    border-color: #334155;
}

.timeline-photo-thumbs img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.timeline-photo-empty {
    width: min(720px, 100%);
    margin: 0 auto;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 8px;
    padding: 24px;
    background: #ffffff;
    color: var(--muted);
    font-weight: 800;
    text-align: center;
}

#timeline-canvas {
    position: absolute;
    left: 0;
    top: 0;
    width: 1px;
    height: 1px;
    --readable-scale: 1;
    transform-origin: 0 0;
    will-change: transform;
}

#timeline-axis {
    position: absolute;
    height: 5px;
    border-radius: 999px;
    background: var(--axis);
    box-shadow: 0 0 0 3px var(--axis-soft);
    z-index: 12;
}

#timeline-dates {
    position: absolute;
    inset: 0;
}

.date-tick {
    position: absolute;
    top: 50%;
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: #334155;
    transform: translate(-50%, -50%);
}

.date-tick span {
    position: absolute;
    top: 16px;
    left: 50%;
    color: #475569;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    transform: translateX(-50%) scale(var(--readable-scale));
    transform-origin: top center;
}

#timeline-groups,
#timeline-guides,
#timeline-items {
    position: absolute;
    inset: 0;
}

#timeline-groups {
    z-index: 4;
}

#timeline-guides {
    z-index: 6;
    pointer-events: none;
}

#timeline-items {
    z-index: 10;
    pointer-events: none;
}

.group-box {
    position: absolute;
    overflow: hidden;
    pointer-events: none;
    border-radius: 8px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: var(--light);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55);
    opacity: 0.76;
}

.group-label {
    position: absolute;
    left: 12px;
    top: 9px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--dark);
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
    opacity: 0.72;
    pointer-events: auto;
    cursor: pointer;
    transform-origin: left top;
    will-change: transform;
}

.group-label:focus-visible,
.group-label:hover {
    outline: 2px solid rgba(15, 23, 42, 0.26);
    outline-offset: 3px;
    border-radius: 4px;
}

.group-box.is-share-target {
    z-index: 20;
    opacity: 0.88;
    animation: groupTargetPop 900ms ease-out 3;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55), 0 0 0 5px rgba(250, 204, 21, 0.28), 0 14px 34px rgba(15, 23, 42, 0.14);
}

@keyframes groupTargetPop {
    0% {
        filter: brightness(1);
    }

    35% {
        filter: brightness(1.12);
    }

    100% {
        filter: brightness(1);
    }
}

.group-edit-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border: 1px solid currentColor;
    border-radius: 5px;
    color: var(--dark);
    font-size: 12px;
    line-height: 1;
    text-decoration: none;
    pointer-events: auto;
}

.group-edit-link svg {
    width: 12px;
    height: 12px;
    stroke-width: 2.2;
}

.group-edit-link:hover {
    background: rgba(255, 255, 255, 0.58);
}

.timeline-item {
    position: absolute;
    min-width: 1px;
    z-index: 8;
    pointer-events: auto;
    cursor: pointer;
    outline: none;
}

.timeline-item:focus-visible .item-label,
.timeline-item:hover .item-label {
    outline: 2px solid rgba(15, 23, 42, 0.26);
    outline-offset: 3px;
}

.timeline-item.is-share-target {
    z-index: 30;
}

.timeline-item.is-share-target .item-label,
.timeline-item.is-share-target .item-bar {
    animation: shareTargetPop 900ms ease-out 3;
}

.timeline-item.is-share-target .item-label {
    border-radius: 6px;
    box-shadow: 0 0 0 5px rgba(250, 204, 21, 0.32), 0 12px 28px rgba(15, 23, 42, 0.18);
}

.timeline-item.is-share-target .item-bar {
    box-shadow: 0 0 0 5px rgba(250, 204, 21, 0.32), 0 12px 28px rgba(15, 23, 42, 0.18);
}

@keyframes shareTargetPop {
    0% {
        transform: scale(1);
        filter: brightness(1);
    }

    35% {
        transform: scale(1.08);
        filter: brightness(1.18);
    }

    100% {
        transform: scale(1);
        filter: brightness(1);
    }
}

.item-label {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    width: max-content;
    max-width: none;
    font-size: 12px;
    font-weight: 400;
    line-height: 15px;
    letter-spacing: 0;
    z-index: 2;
}

.item-label-icons {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    flex: 0 0 auto;
}

.item-label svg {
    width: 12px;
    height: 12px;
    stroke-width: 2.25;
}

.item-label-text {
    white-space: pre-line;
}

.item-bar {
    position: relative;
    display: block;
    height: 8px;
    min-width: 8px;
    border-radius: 999px;
    background: var(--dark);
    border: 1px solid rgba(15, 23, 42, 0.18);
    box-shadow: 0 1px 1px rgba(15, 23, 42, 0.16);
    z-index: 2;
}

.item-stem {
    position: absolute;
    width: 0;
    border-left: 2px dashed var(--light);
    opacity: 0.95;
}

.timeline-item.is-range .item-label {
    color: var(--dark);
    margin-bottom: 5px;
}

.timeline-item.is-point .item-label {
    min-height: 24px;
    padding: 4px 9px;
    border-radius: 8px;
    background: var(--dark);
    color: #ffffff;
    box-shadow: var(--shadow);
}

.timeline-item.is-point .item-bar {
    display: none;
}

.timeline-item.is-point.is-below .item-label {
    margin-top: 5px;
}

.timeline-lightbox[hidden] {
    display: none;
}

.timeline-lightbox {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    z-index: 100;
}

.timeline-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.46);
}

.timeline-lightbox-panel {
    position: relative;
    width: min(860px, calc(100vw - 48px));
    max-height: min(720px, calc(100vh - 48px));
    overflow: auto;
    border: 1px solid rgba(15, 23, 42, 0.14);
    border-radius: 8px;
    padding: 64px 26px 26px;
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
    outline: none;
}

.lightbox-close {
    position: absolute;
    top: 12px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(15, 23, 42, 0.14);
    border-radius: 8px;
    background: #ffffff;
    color: var(--ink);
    cursor: pointer;
    line-height: 1;
}

.lightbox-close svg,
.lightbox-copy-link svg,
.lightbox-edit svg {
    width: 16px;
    height: 16px;
    stroke-width: 2.25;
}

.lightbox-close:hover,
.lightbox-copy-link:hover {
    background: #f1f5f9;
}

.lightbox-edit {
    position: absolute;
    top: 12px;
    right: 100px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(15, 23, 42, 0.14);
    border-radius: 8px;
    background: #ffffff;
    color: var(--ink);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    text-decoration: none;
}

.lightbox-edit[hidden] {
    display: none;
}

.lightbox-edit:hover {
    background: #f1f5f9;
}

.lightbox-copy-link {
    position: absolute;
    top: 12px;
    right: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(15, 23, 42, 0.14);
    border-radius: 8px;
    background: #ffffff;
    color: var(--ink);
    cursor: pointer;
    line-height: 1;
}

.lightbox-copy-status {
    position: absolute;
    top: 18px;
    right: 144px;
    margin: 0;
    color: #166534;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.lightbox-copy-status[hidden] {
    display: none;
}

.lightbox-media-slot {
    margin: 0 0 18px;
    border-radius: 8px;
}

.lightbox-gallery-frame {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 430px;
    min-height: 240px;
    border-radius: 8px;
    overflow: hidden;
    background: #000000;
}

.lightbox-gallery-image {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    cursor: zoom-in;
}

.gallery-arrow {
    position: absolute;
    top: 50%;
    z-index: 2;
    width: 38px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.72);
    color: #ffffff;
    cursor: pointer;
    transform: translateY(-50%);
}

.gallery-prev {
    left: 10px;
}

.gallery-next {
    right: 10px;
}

.lightbox-gallery-caption {
    margin: 8px 0 10px;
    color: #475569;
    font-size: 13px;
    line-height: 1.4;
    text-align: left;
}

.lightbox-gallery-caption p,
.timeline-photo-shell > figcaption p,
.lightbox-description p {
    margin: 0 0 10px;
}

.lightbox-description ul,
.lightbox-description ol {
    margin: 0 0 10px 22px;
    padding: 0;
}

.lightbox-gallery-caption p:last-child,
.timeline-photo-shell > figcaption p:last-child,
.lightbox-description p:last-child,
.lightbox-description ul:last-child,
.lightbox-description ol:last-child {
    margin-bottom: 0;
}

.lightbox-gallery-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.lightbox-gallery-thumbs button {
    width: 76px;
    height: 56px;
    border: 2px solid transparent;
    border-radius: 6px;
    padding: 3px;
    overflow: hidden;
    background: #0f172a;
    cursor: pointer;
}

.lightbox-gallery-thumbs button.is-active {
    border-color: #334155;
}

.lightbox-gallery-thumbs img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    image-rendering: auto;
}

.lightbox-date {
    margin: 0 44px 8px 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.lightbox-date-note {
    margin: -2px 44px 12px 0;
    color: #475569;
    font-size: 13px;
    line-height: 1.45;
}

.lightbox-date-note p,
.lightbox-date-note ul,
.lightbox-date-note ol {
    margin: 0 0 7px;
}

.lightbox-date-note p:last-child,
.lightbox-date-note ul:last-child,
.lightbox-date-note ol:last-child {
    margin-bottom: 0;
}

.timeline-lightbox-panel h2 {
    margin: 0 44px 10px 0;
    color: var(--ink);
    font-size: 26px;
    line-height: 1.16;
    letter-spacing: 0;
    white-space: pre-line;
}

.lightbox-group {
    margin: 0 0 18px;
    color: #475569;
    font-size: 14px;
    font-weight: 800;
}

.lightbox-references {
    margin: 0 0 14px;
    padding: 10px 12px;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: #eff6ff;
}

.lightbox-references h3 {
    margin: 0 0 6px;
    color: #1e3a8a;
    font-size: 13px;
}

.lightbox-references ul {
    display: grid;
    gap: 4px;
    margin: 0;
    padding-left: 18px;
    color: #334155;
    font-size: 13px;
}

.bible-reference-link {
    display: inline;
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #176fa5;
    font: inherit;
    font-weight: 800;
    text-align: left;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
    cursor: pointer;
}

.bible-reference-link:hover,
.bible-reference-link:focus-visible {
    color: #0f4e78;
}

.bible-passage-popover {
    position: absolute;
    z-index: 4000;
    max-width: calc(100vw - 24px);
    max-height: min(520px, calc(100vh - 24px));
    overflow: auto;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 22px 60px rgba(15, 23, 42, 0.24);
}

.bible-passage-popover[hidden] {
    display: none;
}

.bible-passage-inner {
    position: relative;
    padding: 14px 16px 16px;
}

.bible-passage-inner h3 {
    margin: 0 34px 2px 0;
    color: #0f172a;
    font-size: 16px;
}

.bible-passage-translation,
.bible-passage-note {
    margin: 0 0 10px;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

.bible-passage-verses {
    display: grid;
    gap: 8px;
    color: #334155;
    font-size: 14px;
    line-height: 1.55;
}

.bible-passage-verses p {
    margin: 0;
}

.bible-passage-verses sup {
    color: #1d4ed8;
    font-size: 10px;
    font-weight: 900;
}

.bible-passage-close {
    position: absolute;
    top: 8px;
    right: 8px;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    min-height: 0;
    padding: 0;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #f8fafc;
    color: #334155;
    cursor: pointer;
}

.lightbox-description {
    color: #334155;
    font-size: 15px;
    line-height: 1.55;
}

.lightbox-description a {
    color: #176fa5;
    font-weight: 800;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.lightbox-description a:hover {
    color: #0f4e78;
}

.image-zoom-lightbox[hidden] {
    display: none;
}

.print-preview-page {
    overflow: hidden;
    min-height: 100vh;
    background: #e2e8f0;
}

.print-preview-toolbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.14);
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.print-preview-toolbar h1 {
    margin: 0;
    color: var(--ink);
    font-size: 20px;
    letter-spacing: 0;
}

.print-preview-toolbar p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.print-preview-controls,
.print-export-actions {
    display: flex;
    align-items: end;
    flex-wrap: wrap;
    gap: 10px;
}

.print-preview-controls label {
    display: grid;
    gap: 4px;
    color: #475569;
    font-size: 12px;
    font-weight: 800;
}

.print-preview-controls select,
.print-preview-controls button,
.print-export-actions button,
.print-preview-controls a {
    min-height: 38px;
    border: 1px solid rgba(15, 23, 42, 0.16);
    border-radius: 8px;
    padding: 0 12px;
    background: #ffffff;
    color: var(--ink);
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.print-preview-controls button,
.print-export-actions button,
.print-preview-controls a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.print-preview-controls button,
.print-export-actions button {
    background: #334155;
    color: #ffffff;
    cursor: pointer;
}

.print-preview-controls svg,
.print-export-actions svg {
    width: 16px;
    height: 16px;
}

.print-preview-wrap {
    height: calc(100vh - 72px);
    padding: 24px;
    overflow: auto;
}

.print-sheet {
    width: max-content;
    margin: 0 auto;
    padding: 24px;
    background: #ffffff;
    box-shadow: 0 18px 46px rgba(15, 23, 42, 0.2);
}

.print-timeline {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.16);
    background:
        linear-gradient(to right, rgba(148, 163, 184, 0.16) 1px, transparent 1px) 0 0 / 80px 100%,
        #ffffff;
}

.print-timeline h2 {
    position: absolute;
    left: 24px;
    top: 18px;
    z-index: 8;
    margin: 0;
    color: var(--ink);
    font-size: 22px;
    letter-spacing: 0;
}

.print-axis {
    position: absolute;
    left: 44px;
    right: 44px;
    height: 4px;
    border-radius: 999px;
    background: #334155;
}

.print-date-tick {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #334155;
    transform: translate(-50%, -50%);
}

.print-date-tick span {
    position: absolute;
    top: 14px;
    left: 50%;
    color: #475569;
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
    transform: translateX(-50%);
}

.print-group-box {
    position: absolute;
    border: 1px solid rgba(15, 23, 42, 0.16);
    border-radius: 8px;
    background: var(--light);
    opacity: 0.82;
}

.print-group-box span {
    position: absolute;
    left: 10px;
    top: 8px;
    color: var(--dark);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    white-space: nowrap;
}

.print-item {
    position: absolute;
    color: var(--dark);
    font-size: 10px;
    line-height: 1.12;
}

.print-item-label {
    font-weight: 800;
}

.print-item-date {
    margin-top: 2px;
    color: #64748b;
    font-size: 8px;
    font-weight: 700;
    white-space: nowrap;
}

.print-item-bar {
    height: 6px;
    margin-top: 3px;
    border-radius: 999px;
    background: var(--dark);
}

.print-item.is-point {
    min-height: 20px;
    border-radius: 7px;
    padding: 4px 7px;
    background: var(--dark);
    color: #ffffff;
}

.print-item.is-point .print-item-date {
    color: rgba(255, 255, 255, 0.82);
}

.print-preview-note {
    width: min(900px, 100%);
    margin: 16px auto 0;
    color: #475569;
    font-size: 13px;
    font-weight: 700;
}

@media print {
    @page {
        size: landscape;
        margin: 0.25in;
    }

    .print-preview-toolbar,
    .print-preview-note {
        display: none;
    }

    .print-preview-page {
        overflow: visible;
        background: #ffffff;
    }

    .print-preview-wrap {
        height: auto;
    }

    .print-preview-wrap,
    .print-sheet {
        margin: 0;
        padding: 0;
        overflow: visible;
        box-shadow: none;
    }

    .print-timeline {
        overflow: visible;
    }

    .print-sheet {
        width: max-content;
    }
}

.image-zoom-lightbox {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    z-index: 130;
}

.image-zoom-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.76);
}

.image-zoom-panel {
    position: relative;
    z-index: 1;
    display: grid;
    justify-items: center;
    width: min(1100px, 100%);
    max-height: calc(100vh - 48px);
    margin: 0;
}

.image-zoom-prev,
.image-zoom-next {
    position: absolute;
}

.image-zoom-panel img {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 130px);
    object-fit: contain;
    border-radius: 8px;
    background: #020617;
}

.timeline-tour[hidden] {
    display: none;
}

.timeline-tour {
    position: fixed;
    inset: 0;
    z-index: 140;
    pointer-events: none;
}

.timeline-tour-backdrop {
    position: absolute;
    inset: 0;
    background: transparent;
}

.timeline-tour.is-intro .timeline-tour-backdrop {
    background: rgba(15, 23, 42, 0.48);
}

.timeline-tour-highlight {
    position: absolute;
    border: 2px solid #ffffff;
    border-radius: 10px;
    box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.48), 0 0 0 6px rgba(255, 255, 255, 0.24);
    transition: left 160ms ease, top 160ms ease, width 160ms ease, height 160ms ease;
}

.timeline-tour-highlight[hidden] {
    display: none;
}

.timeline-tour-card {
    position: absolute;
    z-index: 2;
    width: min(360px, calc(100vw - 32px));
    margin: 0;
    border: 1px solid rgba(15, 23, 42, 0.14);
    border-radius: 8px;
    padding: 20px;
    background: #ffffff;
    color: var(--ink);
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
    pointer-events: auto;
}

.timeline-tour-card h2 {
    margin: 0 36px 8px 0;
    font-size: 22px;
    line-height: 1.2;
}

.timeline-tour-card p {
    margin: 0 0 14px;
    color: #475569;
    line-height: 1.5;
}

.timeline-tour-step {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.timeline-tour-close {
    position: absolute;
    top: 12px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid rgba(15, 23, 42, 0.14);
    border-radius: 8px;
    background: #ffffff;
    color: var(--ink);
    cursor: pointer;
}

.timeline-tour-close svg {
    width: 15px;
    height: 15px;
}

.timeline-tour-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.timeline-tour-actions button {
    min-height: 36px;
    border: 1px solid rgba(15, 23, 42, 0.16);
    border-radius: 8px;
    padding: 0 12px;
    background: #ffffff;
    color: var(--ink);
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
}

.timeline-tour-actions button:last-child {
    background: #334155;
    color: #ffffff;
}

.timeline-tour-actions button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.c-1 { --light: #ffe5e7; --dark: #b4232f; }
.c-2 { --light: #ffe5d0; --dark: #b84f12; }
.c-3 { --light: #fff7b8; --dark: #7c6f00; }
.c-4 { --light: #f1f7bf; --dark: #66740a; }
.c-5 { --light: #e3f9c9; --dark: #4d7c0f; }
.c-6 { --light: #d2f8df; --dark: #047a46; }
.c-7 { --light: #ccfbf1; --dark: #0f766e; }
.c-8 { --light: #d9f0ff; --dark: #0369a1; }
.c-9 { --light: #dbeafe; --dark: #1d4ed8; }
.c-10 { --light: #e0e7ff; --dark: #4338ca; }
.c-11 { --light: #e8ddff; --dark: #5b35b1; }
.c-12 { --light: #fae0ff; --dark: #a21caf; }
.c-13 { --light: #ffe4ef; --dark: #be123c; }
.c-14 { --light: #f0ddd6; --dark: #8b3f24; }
.c-15 { --light: #e9e2d7; --dark: #5f5443; }
.c-16 { --light: #e5e7eb; --dark: #4b5563; }

@media (max-width: 700px) {
    .timeline-toolbar {
        position: relative;
        align-items: center;
        justify-content: flex-start;
        gap: 8px;
        min-height: 54px;
        padding: 8px 12px;
    }

    .timeline-toolbar > div:first-child {
        flex: 1 1 auto;
        min-width: 0;
    }

    .timeline-toolbar h1 {
        font-size: 17px;
    }

    .timeline-toolbar p {
        display: none;
    }

    .mobile-menu-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 38px;
        border: 1px solid rgba(15, 23, 42, 0.16);
        border-radius: 8px;
        background: #ffffff;
        color: var(--ink);
        cursor: pointer;
        font-size: 22px;
        line-height: 1;
        touch-action: manipulation;
    }

    .timeline-search {
        position: static;
        order: 2;
        width: auto;
        margin-left: auto;
        flex-wrap: nowrap;
    }

    .mobile-menu-button {
        order: 3;
    }

    .timeline-controls {
        position: absolute;
        top: calc(100% + 6px);
        right: 10px;
        left: 10px;
        z-index: 40;
        display: none;
        justify-content: flex-start;
        gap: 8px;
        max-height: calc(100vh - 80px);
        overflow: auto;
        border: 1px solid rgba(15, 23, 42, 0.14);
        border-radius: 8px;
        padding: 10px;
        background: rgba(255, 255, 255, 0.96);
        box-shadow: var(--shadow);
    }

    .timeline-toolbar.is-menu-open .timeline-controls {
        display: flex;
    }

    .timeline-search-panel {
        position: absolute;
        top: calc(100% + 6px);
        right: 10px;
        left: 10px;
        z-index: 70;
        width: auto;
        max-height: calc(100vh - 72px);
        overflow: auto;
        margin-top: 0;
        box-shadow: var(--shadow);
    }

    .timeline-search-main,
    .timeline-search-advanced {
        grid-template-columns: 1fr;
    }

    .timeline-search-main .timeline-search-submit,
    .timeline-search-main .timeline-search-advanced-toggle,
    .timeline-search .timeline-search-advanced-actions .timeline-search-submit-advanced {
        width: 100%;
        min-height: 36px;
    }

    .timeline-search-main input,
    .timeline-search-advanced input,
    .timeline-search-advanced select {
        font-size: 16px;
    }

    .view-selector {
        width: 100%;
    }

    .view-selector select {
        max-width: none;
        flex: 1;
    }

    .fullscreen-button,
    .hover-date-guide,
    .hover-date-readout {
        display: none !important;
    }

    .timeline-lightbox {
        padding: 14px;
    }

    .timeline-lightbox-panel {
        width: 100%;
        max-height: calc(100vh - 28px);
        padding: 62px 18px 22px;
    }

    .timeline-lightbox-panel h2 {
        font-size: 22px;
    }

    .timeline-photo-view {
        padding: 12px;
    }

    .timeline-photo-shell {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .timeline-photo-frame {
        height: 52vh;
        min-height: 320px;
        padding: 12px;
    }

    .timeline-photo-image {
        width: 100%;
        height: 100%;
    }

    .timeline-photo-meta {
        padding: 56px 14px 14px;
    }

    .timeline-photo-edit {
        top: 14px;
        right: 14px;
    }

    .timeline-photo-meta h2 {
        font-size: 20px;
    }

    .timeline-photo-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .timeline-photo-see-button {
        width: 100%;
    }

    .lightbox-gallery-frame {
        height: 260px;
    }

    .feedback-form {
        grid-template-columns: 1fr;
    }
}
