/* css/5-features.css */

/* ============================================================
   DESIGN TOKEN MIGRATION - TODO
   
   STATUS: Not started
   - Many hard-coded hex colors remain (50+ instances)
   - Many hard-coded rgba overlays remain
   - TODO: Replace all hex/rgba with tokens from css/1-base.css
   
   Use tokens from css/1-base.css instead of hard-coded values.
   Allowed exceptions: literal 1px borders, calc() with tokens
   ============================================================ */

/* =================================================================== */
/* 0. SIDEBAR - EVENT LIST SORT CONTROLS
/* =================================================================== */

/* Sidebar — Event List Sort Controls */
.sidebar-sort-controls {
    padding: 12px var(--spacing-xl);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    flex-wrap: nowrap;
    overflow: visible; /* Allow anchored popovers to float above */
}

/* Desktop: two-zone toolbar row under the search input */
.sidebar-events-toolbar-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-width: 0;
}

/* Desktop: Theme lens (quiet disclosure under search) */
.sidebar-theme-lens {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-top: 0;
    position: relative; /* anchor for popover */
}

/* Atomic theme control (text-like, not a chip) */
.sidebar-theme-control {
    max-width: 100%;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    background: transparent;
    border: none;
    padding: 4px 0;
    color: var(--color-text-secondary);
    font-size: 0.9em;
    cursor: pointer;
    letter-spacing: var(--letter-spacing-ui, 0.02em);
    text-align: left;
}

.sidebar-theme-control:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

.sidebar-theme-control-label {
    flex: 0 1 auto;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-theme-control-clear {
    flex: 0 0 auto;
    color: var(--color-text-muted);
    padding: 0 2px;
    line-height: 1;
    border-radius: 6px;
}

.sidebar-theme-control-clear:hover {
    color: var(--color-text-primary);
    background: var(--color-bg-tertiary);
}

.sidebar-theme-control-caret {
    opacity: 0.7;
}

.sidebar-theme-lens-disclosure {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 25;
    width: 240px;
    max-height: 320px;
    overflow-y: auto;
    overflow-x: hidden;
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
    background: var(--color-bg-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.sidebar-theme-lens-disclosure.is-open {
    display: block;
}

.sidebar-theme-lens-list {
    display: flex;
    flex-direction: column;
}

.sidebar-theme-lens-item {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    background: transparent;
    border: none;
    border-top: 1px solid var(--color-border-lighter);
    text-align: left;
    cursor: pointer;
    color: var(--color-text-primary);
}

.sidebar-theme-lens-item:first-child {
    border-top: none;
}

.sidebar-theme-lens-item:hover:not(.is-disabled) {
    background: var(--color-bg-tertiary);
}

.sidebar-theme-lens-item.is-disabled {
    opacity: 0.42;
    cursor: default;
    pointer-events: none;
}

.sidebar-theme-lens-item.is-muted {
    opacity: 0.72;
}

.sidebar-theme-lens-item-check {
    opacity: 0;
    color: var(--color-text-secondary);
}

.sidebar-theme-lens-item.is-selected .sidebar-theme-lens-item-check {
    opacity: 1;
}

/* Desktop refinement pass: sidebar search divider (desktop-only) */
@media (min-width: 1024px) and (hover: hover) and (pointer: fine) {
    .sidebar-sort-controls {
        border-bottom: 1px solid var(--color-border-light);
    }

    /* Prevent double borders between search row and expanded filter panel */
    .sidebar-filter-panel.is-open {
        border-top: 0;
    }
}

.sidebar-sort-controls > span {
    margin: 0;
    white-space: nowrap;
    font-weight: 300;
    font-size: 0.9em;
    color: var(--color-text-muted);
}

.sidebar-sort-controls #sort-select {
    margin: 0;
    padding: 8px 24px 8px 10px;
    font-size: 0.85em;
    min-width: 0;
    width: auto;
    background-size: 12px;
    background-position: right 6px center;
}

/* Sidebar — Inline Expanding Filter/Sort Panel (pushes list down) */
.sidebar-filter-panel {
    padding: 0;
    margin-top: 0;
    display: grid;
    grid-template-rows: minmax(0, 0fr);
    opacity: 0;
    border-top: 0;
    border-bottom: 0;
    position: relative;
    transition: grid-template-rows var(--transition-fast), opacity var(--transition-fast), border-color var(--transition-fast);
}

.sidebar-filter-panel.is-open {
    padding: 0 15px;
    margin-top: 4px;
    grid-template-rows: minmax(0, 1fr);
    opacity: 1;
    border-top: 1px solid var(--color-border-light);
    border-bottom: 1px solid var(--color-border-light);
    box-shadow: var(--shadow-xs);
}

/* Collapsed-only spacing tweak:
   When the view-controls panel is collapsed, tighten the rhythm between the search row and the first event.
   Expanded state intentionally preserves the existing spacing. */
.sidebar #sidebarFilterPanel:not(.is-open) + .sidebar-content {
    padding-top: var(--spacing-lg);
}

.sidebar #sidebarFilterPanel.is-open + .sidebar-content {
    padding-top: var(--spacing-xl);
}

.sidebar #sidebarFilterPanel:not(.is-open) + .sidebar-content.yrh-event-year-list,
.sidebar #sidebarFilterPanel.is-open + .sidebar-content.yrh-event-year-list {
    padding-top: 0;
}

.sidebar #sidebarFilterPanel:not(.is-open) + .sidebar-content.yrh-event-year-list .yrh-event-year-section:first-child .yrh-event-year-header {
    padding-top: calc(var(--spacing-xl) + var(--spacing-4));
}

.sidebar #sidebarFilterPanel.is-open + .sidebar-content.yrh-event-year-list .yrh-event-year-section:first-child .yrh-event-year-header {
    padding-top: calc(var(--spacing-2xl) + var(--spacing-4));
}

/* Caret / anchor indicator */
.sidebar-filter-panel::before {
    content: '';
    position: absolute;
    top: -5px;
    left: var(--sidebar-panel-caret-left, 50%);
    transform: translateX(-50%) rotate(45deg);
    width: 10px;
    height: 10px;
    background: var(--color-bg-primary);
    border-left: 1px solid var(--color-border-light);
    border-top: 1px solid var(--color-border-light);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-fast);
}

.sidebar-filter-panel.is-open::before {
    opacity: 1;
}

.sidebar-filter-panel-inner {
    overflow: hidden;
    min-height: 0;
    padding: 10px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar-filter-panel-title {
    font-size: 0.85em;
    font-weight: 400;
    color: var(--color-text-muted);
}

.sidebar-filter-panel-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-filter-panel-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.sidebar-filter-panel-clear {
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    font-size: 0.8em;
    color: var(--color-text-muted);
    transition: color var(--transition-fast);
}

.sidebar-filter-panel-clear:hover {
    color: var(--color-text-primary);
}

.sidebar-filter-panel-clear:focus {
    outline: none;
    box-shadow: var(--shadow-focus);
    border-radius: var(--radius-sm);
}

.sidebar-filter-panel-subtitle {
    font-size: 0.8em;
    font-weight: 400;
    color: var(--color-text-muted);
}

.sidebar-filter-panel-hint {
    font-size: 0.85em;
    color: var(--color-text-muted);
}

/* Segmented sort control */
.sidebar-filter-panel-segmented {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--color-bg-primary);
}

/* Timeline Details Layout (VIEW tab) -------------------------------------------------- */
.timeline-details-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}
.timeline-details-left {
    flex: 0 0 45%;
    min-width: 0;
}
.timeline-details-right {
    flex: 0 0 55%;
    min-width: 0;
}

/* Themes vertical stack */
.timeline-theme-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}
.timeline-theme-item .edc-connected-tag,
.timeline-theme-item .edc-connected-tag:hover {
    display: block;
    width: 100%;
    text-align: left;
}

/* Photo composition block */
.timeline-photo-block {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-md, 8px);
    overflow: hidden;
    background: var(--color-bg-secondary, #f6f6f6);
    position: relative;
}
.timeline-photo-block img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.timeline-photo-block .timeline-photo-block-actions {
    margin-top: 10px;
    display: flex;
    gap: 8px;
    align-items: center;
}

/* 1 image */
.timeline-photo-block .tdb-single { height: 100%; }

/* 2 images */
.timeline-photo-block .tdb-two { display: flex; height: 100%; gap: 4px; }
.timeline-photo-block .tdb-two-col { flex: 1; overflow: hidden; }

/* 3 images */
.timeline-photo-block .tdb-three { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 4px; height: 100%; }
.timeline-photo-block .tdb-three-left { grid-row: 1 / 3; overflow: hidden; }
.timeline-photo-block .tdb-three-right .tdb-three-top,
.timeline-photo-block .tdb-three-right .tdb-three-bottom { overflow: hidden; }

/* 4+ images grid */
.timeline-photo-block .tdb-grid { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 4px; height: 100%; }
.timeline-photo-block .tdb-tile { overflow: hidden; position: relative; }
.timeline-photo-block .tdb-tile-more .tdb-more-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,0.45) 100%);
    font-size: 1.1em;
}

/* Ensure no empty scaffolding on mobile: stack columns */
@media (max-width: 768px) {
    .timeline-details-layout { flex-direction: column; gap: 12px; }
    .timeline-details-left, .timeline-details-right { flex: 1 1 100%; }
    .timeline-photo-block { width: 100%; aspect-ratio: 1 / 1; }
}


.sidebar-filter-segment {
    border: 0;
    background: none;
    padding: 8px 10px;
    font-family: var(--font-family-base);
    font-size: 0.85em;
    color: var(--color-text-primary);
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.sidebar-filter-segment + .sidebar-filter-segment {
    border-left: 1px solid var(--color-border-light);
}

.sidebar-filter-segment.is-selected {
    background: var(--color-bg-secondary);
}

.sidebar-filter-segment:focus {
    outline: none;
    box-shadow: inset 0 0 0 2px var(--color-primary);
}

/* Checkbox group for attributes */
.sidebar-filter-checkbox-group {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px 12px;
    padding: 4px 3px;
}

.sidebar-filter-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88em;
    color: var(--color-text-primary);
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.sidebar-filter-checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    flex-shrink: 0;
}

.sidebar-filter-checkbox-label[data-break-before="true"] {
    flex-basis: 100%;
}

.sidebar-filter-checkbox-label:hover {
    color: var(--color-text-primary);
}

/* Filters (chips) */
.sidebar-filter-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 3px;
}

.sidebar-filter-chip-row.is-sort-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
}

.sidebar-filter-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 28px;
    padding: 0 9px;
    border-radius: 999px;
    border: 1px solid var(--color-border-light);
    background: var(--color-brand-primary-10, #e3f2fd);
    color: var(--color-text-primary);
    font-size: 0.8em;
    font-family: var(--font-family-base);
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.sidebar-filter-chip:hover {
    background: var(--color-surface-4);
    border-color: var(--color-border-strong, var(--color-border-medium));
}

.sidebar-filter-chip[aria-pressed="true"] {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

.sidebar-filter-chip:focus {
    outline: none;
    box-shadow: var(--shadow-focus);
}

.sidebar-filter-panel-clear-top {
    position: absolute;
    top: 12px;
    right: 20px;
    z-index: 1;
    background: none;
    border: none;
    color: var(--color-text-muted);
    font-size: 0.8em;
    cursor: pointer;
    padding: 0;
    font-family: var(--font-family-base);
}

.sidebar-filter-panel-clear-top:hover:not(:disabled) {
    color: var(--color-primary);
    text-decoration: underline;
}

.sidebar-filter-panel-clear-top:focus {
    outline: none;
    box-shadow: var(--shadow-focus);
    border-radius: var(--radius-sm);
}

.sidebar-filter-panel-clear-top:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Tags: blue pill box container with scroll */
.sidebar-filter-tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    border: 1px solid var(--color-border-medium);
    border-radius: 10px;
    background: var(--color-bg-secondary);
    padding: 10px;
    max-height: 92px; /* ~2 rows of chips + scroll */
    overflow-y: auto;
}

/* Prevent the view-controls panel from feeling permanent: cap growth so the event list remains visible */
.sidebar-filter-panel.is-open {
    max-height: min(340px, 55vh);
}

.sidebar-filter-tag-chip {
    border: 1px solid var(--color-border-light);
    background: var(--color-bg-primary);
    color: var(--color-text-primary);
    border-radius: var(--radius-md);
    padding: 6px 10px;
    font-size: 0.9em;
    font-family: var(--font-family-base);
    cursor: pointer;
    transition: border-color var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast);
}

.sidebar-filter-tag-chip[aria-pressed="true"] {
    border-color: var(--color-primary);
    background: var(--color-bg-secondary);
}

.sidebar-filter-tag-chip:focus {
    outline: none;
    box-shadow: var(--shadow-focus);
}

.sidebar-sort-controls .search-input-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.sidebar-sort-controls #search-events {
    flex: 1;
    width: 100%;
    padding: 10px 32px 10px 12px;
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
    font-size: 0.95em;
    font-family: var(--font-family-base);
    background: var(--color-bg-primary);
    color: var(--color-text-primary);
    min-width: 0;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.sidebar-sort-controls #search-events::placeholder {
    color: var(--color-text-muted);
    opacity: 0.6;
}

.sidebar-sort-controls #search-events:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: var(--shadow-focus);
}

.sidebar-sort-controls .search-clear-btn {
    position: absolute;
    right: 8px;
    cursor: pointer;
    font-size: 1.1em;
    color: var(--color-text-muted);
    line-height: 1;
    padding: 0;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    user-select: none;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.sidebar-sort-controls .search-clear-btn:hover {
    background-color: rgba(0, 0, 0, 0.08);
    color: var(--color-text-primary);
}

/* Sidebar: empty message (used by theme lens empty-state) */
.sidebar-empty-message {
    text-align: center;
    color: var(--color-text-muted);
    padding: 20px;
    margin: 0;
    font-size: 0.95em;
}

/* Sidebar sort control (text-label popover, mirrors theme control) */
.sidebar-sort-menu-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
}

.sidebar-sort-control {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    padding: 4px 0;
    color: var(--color-text-secondary);
    font-size: 0.9em;
    cursor: pointer;
    letter-spacing: var(--letter-spacing-ui, 0.02em);
    white-space: nowrap;
}

.sidebar-sort-control:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

.sidebar-sort-control-label {
    white-space: nowrap;
}

.sidebar-sort-control-caret {
    opacity: 0.7;
}

.sidebar-sort-menu {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    background: var(--color-bg-primary);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 25;
    width: 160px;
    overflow: hidden;
    padding: 5px 0;
}

.sidebar-sort-menu.is-open {
    display: block;
}

.sidebar-sort-menu-item {
    display: flex;
    width: 100%;
    background: none;
    border: none;
    padding: 10px 15px;
    text-align: left;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 500;
    align-items: center;
    justify-content: space-between;
}

.sidebar-sort-menu-item:hover {
    background-color: var(--color-bg-secondary);
}

.sidebar-sort-menu-check {
    visibility: hidden;
    color: var(--color-text-muted);
}

.sidebar-sort-menu-item[aria-checked="true"] .sidebar-sort-menu-check {
    visibility: visible;
}

/* =================================================================== */
/* 0.5 FILTER POPOVER (ANCHORED TO SIDEBAR FILTER ICON)
/* =================================================================== */

.filter-popover {
    display: none;
    position: fixed;
    z-index: var(--z-modal-bulk-upload);
    width: 320px;
    max-height: 70vh;
    background: var(--color-bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    overflow: visible;
    --arrow-left: 50%;
}

/* Arrow pointer - default position (top edge, pointing up) */
.filter-popover::before,
.filter-popover::after {
    content: '';
    position: absolute;
    left: var(--arrow-left);
    transform: translateX(-50%);
    width: 0;
    height: 0;
    pointer-events: none;
}

/* Border triangle (outer layer for subtle outline) - overlaps popover by 1px */
.filter-popover::before {
    top: -10px;
    border-left: 11px solid transparent;
    border-right: 11px solid transparent;
    border-bottom: 11px solid var(--color-border-lighter);
}

/* Fill triangle (inner layer matching popover background) - overlaps popover by 1px */
.filter-popover::after {
    top: -9px;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid var(--color-bg-primary);
}

/* Arrow when popover is above anchor - overlaps popover by 1px */
.filter-popover.is-above::before {
    top: auto;
    bottom: -10px;
    border-bottom: none;
    border-top: 11px solid var(--color-border-lighter);
}

.filter-popover.is-above::after {
    top: auto;
    bottom: -9px;
    border-bottom: none;
    border-top: 10px solid var(--color-bg-primary);
}

.filter-popover.show {
    display: flex;
    flex-direction: column;
}

.filter-popover-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    padding-bottom: 0;
    position: relative;
}

/* Seam cover strip - masks any hairline gap between arrow and popover body */
.filter-popover-content::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 2px;
    background: var(--color-bg-primary);
    z-index: 1;
}

/* Seam cover when popover is above (arrow on bottom) */
.filter-popover.is-above .filter-popover-content::before {
    top: auto;
    bottom: 0;
}

/* Compact header for popover */
.filter-popover .profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--color-border-light);
    position: relative;
}

.filter-popover .profile-header h2 {
    margin: 0;
    font-size: 1.1em;
    font-weight: 500;
}

/* Close button in header */
.filter-popover-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--color-text-tertiary);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.filter-popover-close:hover {
    background-color: rgba(0, 0, 0, 0.08);
    color: var(--color-text-primary);
}

.filter-popover-close:active {
    transform: scale(0.95);
}

/* Footer with action buttons */
.filter-popover-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 24px;
    border-top: 1px solid var(--color-border-light);
    background: var(--color-bg-primary);
}

.filter-popover-footer .btn {
    flex: 0 0 auto;
    min-width: 80px;
    padding: 8px 16px;
    font-size: 0.9em;
}

/* Mobile adjustments */
@media (max-width: 640px) {
    .filter-popover {
        width: 90vw;
        max-width: 360px;
        max-width: 1080px;
    }
}

/* =================================================================== */
/* 1. AUTH MODAL
/* =================================================================== */

#auth-error {
    color: var(--color-danger);
    text-align: center;
    min-height: 20px;
    margin-top: 15px;
    font-weight: 600;
}

#auth-toggle-link {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
}
#auth-toggle-link:hover {
    text-decoration: underline;
}

/* =================================================================== */
/* 2. ACCOUNT MODAL
/* =================================================================== */

.account-pic-uploader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

#modal-account-preview {
    width: 100px;  
    height: 100px;
    cursor: pointer;
    transition: all 0.2s ease;
}

#modal-account-preview:hover {
    opacity: 0.8;
    box-shadow: 0 0 0 4px var(--color-primary);
}

#account-pic-input {
    display: none;
}

#account-success {
    color: green; 
    text-align: center; 
    min-height: 20px;
}

/* =================================================================== */
/* 2B. TIMELINE PHOTO UPLOAD (Details Tab)
/* =================================================================== */

.timeline-photo-section {
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--color-border-light);
}

.timeline-photo-header {
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--color-text-muted);
    margin: 0 0 var(--spacing-sm) 0;
    text-transform: lowercase;
}

.timeline-photo-uploader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
}

.timeline-photo-preview {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.timeline-photo-preview:hover {
    opacity: 0.85;
    border-color: var(--color-primary);
}

.timeline-photo-initial {
    color: white;
    font-size: 28px;
    font-weight: 600;
    text-transform: uppercase;
    user-select: none;
}

.timeline-photo-uploader input[type="file"] {
    display: none;
}

.timeline-photo-remove-btn {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    padding: var(--spacing-xs) var(--spacing-sm);
}

.timeline-photo-remove-btn:hover {
    color: var(--color-danger);
}

/* Timeline Picker Photo Styles */
.timeline-picker-item-color.has-photo {
    padding: 0;
    overflow: hidden;
}

.timeline-picker-item-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* Timeline Header Photo - Base styles (overridden by modal-specific rules in 4-modals.css) */
.c-modal-header-with-photo {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.timeline-info-photo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
    overflow: hidden;
}

.timeline-info-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.timeline-info-photo--initial {
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    font-weight: 600;
    text-transform: uppercase;
}

/* Timeline title in header with photo should remain single line */
.c-modal-header-with-photo .c-modal-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1 1 auto;
    min-width: 0;
}

/* Timeline Info Details Tab Photo Display - DEPRECATED, now in header */


/* =================================================================== */
/* 5. EVENT & TIMELINE MODALS
/* =================================================================== */

/* --- Timeline Manager Modal --- */
.timeline-header-item {
    background: var(--color-primary);
    border-radius: 12px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: opacity 0.2s;
    width: 100%;
    box-sizing: border-box;
    padding: 10px 16px;
}

.timeline-header-item:hover {
    opacity: 0.9;
}

/* Flex row that holds title + actions */
.timeline-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
}

.timeline-header-inner.is-inactive {
    opacity: 0.7;
}

/* Left side (text) */
.timeline-header-title {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.timeline-header-name {
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.timeline-header-visibility {
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.9);
    white-space: nowrap;
}

/* Right side (icons) */
.timeline-header-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-shrink: 0;
}

.timeline-header-actions button {
    background: transparent;
    border: none;
    cursor: pointer;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    font-size: 18px;
}

.timeline-header-actions .timeline-edit-btn {
    font-size: 18px;
}

#timelinesList {
    min-height: calc((50px + 10px) * 4);
    max-height: 400px; 
    overflow-y: auto; 
    margin-bottom: 20px;
}

.details-date {
    font-size: 1.1em;
    color: var(--color-text-secondary);
    margin-bottom: 20px;
    font-weight: 600;
}

.details-notes {
    font-size: 1em;
    line-height: 1.6;
    color: var(--color-text-primary);
    max-height: 40vh; 
    overflow-y: auto;
    background: var(--color-bg-secondary);
    padding: 15px;
    border-radius: 8px;
    white-space: pre-wrap; 
}

.details-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.details-tag-item {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    background: #e3f2fd;
    border-radius: 12px;
    font-size: 0.8em;
    color: var(--color-text-muted);
    font-weight: 500;

html.yrh-tier-desktop[data-layout-input="touch"] .sidebar-sort-controls {
    padding: 16px var(--yrh-shell-inline-gutter, 28px) 14px;
    gap: 12px;
    border-bottom: 1px solid var(--color-border-lightest);
}

html.yrh-tier-desktop[data-layout-input="touch"] .sidebar-events-toolbar-row {
    gap: 16px;
    align-items: center;
}

html.yrh-tier-desktop[data-layout-input="touch"] .sidebar-sort-controls .search-input-wrapper {
    min-height: 44px;
}

html.yrh-tier-desktop[data-layout-input="touch"] .sidebar-sort-controls #search-events {
    min-height: 44px;
    padding: 11px 36px 11px 14px;
    border-radius: 12px;
    font-size: 1rem;
}

html.yrh-tier-desktop[data-layout-input="touch"] .sidebar-sort-controls .search-clear-btn {
    right: 10px;
    width: 30px;
    height: 30px;
}

html.yrh-tier-desktop[data-layout-input="touch"] .sidebar-theme-control,
html.yrh-tier-desktop[data-layout-input="touch"] .sidebar-sort-control {
    padding: 6px 0;
    font-size: 0.95rem;
}

html.yrh-tier-desktop[data-layout-input="touch"] .sidebar-theme-lens-disclosure {
    width: min(280px, calc(100vw - 48px));
    max-height: 360px;
}

html.yrh-tier-desktop[data-layout-input="touch"] .sidebar-sort-menu {
    width: 176px;
}
    white-space: nowrap;
}

/* =================================================================== */
/* 6. FILTER MODAL
/* =================================================================== */

#filterModal .modal-content {
    max-width: 450px;
}

/* Make modal buttons stretch */
#filterModal .modal-buttons div {
    display: flex;
    flex: 1;
}

/* Special layout for "Clear All" */
.modal-buttons.space-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#clearFiltersBtn {
    flex: 0 1 auto; /* Don't grow, just fit content */
    background: none;
    border: none;
    color: var(--color-danger);
    padding: 10px;
    font-weight: 600;
    font-size: 0.9em;
}
#clearFiltersBtn:hover {
    background: #fdf0f0;
}

/* Date filter inputs */
.date-filter-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

.form-group-inline {
    flex: 1;
}

.form-group-inline label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.9em;
    font-weight: 600;
    color: var(--color-text-secondary);
}

.form-group-inline input[type="date"] {
    width: 100%;
    padding: 10px 8px;
    border: 2px solid var(--color-border-medium);
    border-radius: 10px;
    font-size: 0.9em;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* =================================================================== */
/* 7. FILTER MODAL PILLBOX
/* =================================================================== */

.tag-pillbox {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
    padding: 12px;
    border: 2px solid var(--color-border-medium);
    border-radius: 10px;
    min-height: 50px; /* Give it some empty space */
    background-color: var(--color-bg-secondary); /* Light bg to show it's a container */
}

/* If the pillbox is empty, show a message */
.tag-pillbox:empty::after {
    content: "No tags selected";
    color: var(--color-text-muted);
    font-style: italic;
    font-size: 0.9em;
}

/* We can reuse the .tag and .tag-remove-btn styles from 3-components.css */
/* This just makes the tags in the pillbox match the ones in the event modal */
.tag-pillbox .tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 7px 10px 7px 14px;
    background: #e3f2fd;
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: 0.85em;
    color: var(--color-text-muted);
    font-weight: 500;
    transition: border-color 0.15s, background 0.15s;
}

.tag-pillbox .tag:hover {
    background: #bbdefb;
    border-color: rgba(33, 150, 243, 0.3);
}

.tag-pillbox .tag .tag-remove-btn {
    background: none;
    border: none;
    color: #555;
    font-weight: bold;
    margin-left: 8px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    font-size: 1.1em;
    opacity: 0.6;
    transition: opacity 0.15s;
}

.tag-pillbox .tag .tag-remove-btn:hover {
    opacity: 1;
}

/* --- Filter Modal Header & Button Styles --- */

/* Re-use profile-header for flex layout */
#filterModal .profile-header {
    margin-bottom: 25px; /* Add margin back */
}

/* Style the new "Clear" button in the header */
#filterModal #clearFiltersBtn {
    flex: 0 1 auto; /* Don't grow */
    background: none;
    border: none;
    color: #f44336;
    padding: 10px;
    font-weight: 600;
    font-size: 0.9em;
    margin-top: -10px; /* Align with header text */
    cursor: pointer;
}
#filterModal #clearFiltersBtn:hover {
    background: #fdf0f0;
}

/* Make the "Apply" button align to the right */
#filter-modal-buttons {
    justify-content: flex-end;
}
#filter-modal-buttons div {
    display: flex;
    flex: 0 1 150px; /* Give apply button a fixed-ish width */
}

/* Attachment filter checkboxes */
.attachment-filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.filter-checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 0.9em;
    color: var(--color-text-primary);
    padding: 6px 10px;
    border: 1px solid var(--color-border-light);
    border-radius: 6px;
    transition: all 0.2s;
}

.filter-checkbox-label:hover {
    background: var(--color-bg-secondary);
    border-color: var(--color-border-medium);
}

.filter-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
    margin: 0;
    padding: 0;
    cursor: pointer;
    accent-color: var(--color-primary);
    flex-shrink: 0;
    vertical-align: middle;
}

.filter-checkbox-label span {
    line-height: 18px;
    display: inline-block;
    vertical-align: middle;
}

.filter-checkbox-label input[type="checkbox"]:checked + span {
    color: var(--color-primary);
    font-weight: 500;
}


/* =================================================================== */

/* =================================================================== */
/* EVENT PICTURES AND DOCUMENTS MODALS */
/* =================================================================== */

/* Pictures Grid */
.event-pictures-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    padding: 20px 0;
}

.event-picture-thumb {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background: var(--color-bg-tertiary);
}

.event-picture-thumb:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Empty state color override for event modals */
.c-event-empty {
    color: #888;
}

/* Documents List */
.event-documents-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 400px;
    overflow-y: auto;
}

.event-document-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: var(--color-bg-secondary);
    transition: all 0.2s ease;
}

.event-document-item:hover {
    background: var(--color-bg-tertiary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.event-document-icon {
    font-size: 1.5em;
    min-width: 30px;
    text-align: center;
}

.event-document-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.event-document-name {
    font-weight: 500;
    color: var(--color-text-primary);
    word-break: break-word;
}

.event-document-meta {
    font-size: 0.85em;
    color: var(--color-text-muted);
}

.event-document-actions {
    display: flex;
    gap: 8px;
}

.event-document-actions a {
    padding: 6px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.85em;
    transition: all 0.2s ease;
}

.event-document-actions a.open-link {
    background: var(--color-primary);
    color: white;
}

.event-document-actions a.open-link:hover {
    background: #5568d3;
}

/* Lightbox */
#pictureLightboxModal.modal {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: #000;
    z-index: calc(var(--z-modal-image-preview, 1090) + 60) !important;
    display: none;
    padding: 0;
    overflow: hidden;
    cursor: default;
    align-items: stretch;
    justify-content: stretch;
}

#pictureLightboxModal.modal.show {
    display: flex;
}

#pictureLightboxModal .picture-lightbox__stage {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    overflow: hidden;
    overscroll-behavior: contain;
    touch-action: none;
    cursor: zoom-in;
}

#pictureLightboxModal .picture-lightbox__img {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    object-fit: contain;
    max-width: 100vw;
    max-height: 100vh;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
    transform-origin: center center;
    will-change: transform;
}

#pictureLightboxModal .picture-lightbox__stage.picture-lightbox__stage--zoomed {
    cursor: grab;
}

#pictureLightboxModal .picture-lightbox__stage.picture-lightbox__stage--dragging {
    cursor: grabbing;
}

#pictureLightboxModal .picture-lightbox__close {
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 12px);
    right: 12px;
    width: 44px;
    height: 44px;
    border-radius: 22px;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.72);
    font-size: 28px;
    line-height: 44px;
    text-align: center;
    padding: 0;
    z-index: 2;
}

#pictureLightboxModal .picture-lightbox__caption {
    position: fixed;
    left: 16px;
    right: 72px;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 18px);
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    font-weight: var(--font-weight-medium, 500);
    line-height: 1.3;
    text-shadow: 0 1px 3px var(--color-overlay-dark-30);
    z-index: 2;
}

#pictureLightboxModal.picture-lightbox--chrome-hidden .picture-lightbox__close {
    opacity: 0;
    pointer-events: none;
}

#pictureLightboxModal.picture-lightbox--chrome-hidden .picture-lightbox__caption {
    opacity: 0;
    pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ATTACHMENT EVENT PICKER - Custom Two-Line Dropdown
   Namespaced with .am-event-picker-* to avoid conflicts
   ═══════════════════════════════════════════════════════════════════════════ */

/* Wrapper container */
.am-event-picker-wrapper {
    position: relative;
    width: 100%;
}

/* Collapsed field (closed state) */
.am-event-picker-collapsed {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--color-border-light);
    border-radius: 8px;
    background: var(--color-bg-secondary);
    color: var(--color-text-primary);
    font-size: 0.95em;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.am-event-picker-collapsed:hover {
    border-color: var(--color-primary);
}

.am-event-picker-collapsed:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(91, 111, 223, 0.15);
}

/* Placeholder text when no event selected */
.am-event-picker-placeholder {
    color: var(--color-text-muted);
}

/* Dropdown arrow */
.am-event-picker-arrow {
    color: var(--color-text-muted);
    font-size: 0.7em;
    user-select: none;
    transition: transform 0.2s;
}

/* Dropdown panel (open state) */
.am-event-picker-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: var(--z-modal-base);
    background: var(--color-bg-primary);
    border: 1px solid var(--color-border-light);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    max-height: 300px;
}

/* Search input inside dropdown */
.am-event-picker-search {
    width: 100%;
    padding: 10px 14px;
    border: none;
    border-bottom: 1px solid var(--color-border-light);
    border-radius: 8px 8px 0 0;
    background: var(--color-bg-secondary);
    color: var(--color-text-primary);
    font-size: 0.9em;
    outline: none;
    flex-shrink: 0;
    direction: ltr;
    text-align: left;
}

.am-event-picker-search::placeholder {
    color: var(--color-text-muted);
}

.am-event-picker-search:focus {
    background: var(--color-bg-primary);
}

/* Event list container */
.am-event-picker-list {
    max-height: 200px;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Individual event item */
.am-event-picker-item {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid var(--color-border-light);
    transition: background 0.15s;
}

.am-event-picker-item:last-child {
    border-bottom: none;
}

.am-event-picker-item:hover {
    background: var(--color-bg-secondary);
}

/* Selected event item */
.am-event-picker-item-selected {
    background: rgba(102, 126, 234, 0.1);
    border-left: 3px solid var(--color-primary);
}

.am-event-picker-item-selected:hover {
    background: rgba(102, 126, 234, 0.15);
}

/* Event info container (two-line layout) */
.am-event-picker-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Event name (primary line) */
.am-event-picker-name {
    font-weight: 500;
    color: var(--color-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.95em;
}

/* Event date (secondary line) */
.am-event-picker-meta {
    font-size: 0.8em;
    color: var(--color-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* No results message */
.am-event-picker-no-results {
    padding: 16px;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.9em;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .am-event-picker-dropdown {
        max-height: 250px;
    }
    
    .am-event-picker-list {
        max-height: 160px;
    }
    
    .am-event-picker-item {
        padding: 12px 14px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   VERTICAL EVENT PILLS - Selected Events Display
   Namespaced with .am-event-pill-* to avoid conflicts
   ═══════════════════════════════════════════════════════════════════════════ */

/* Pills container with scroll - polished for premium feel */
.am-event-pills-container {
    max-height: 200px;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 8px 10px;
    border: 1px solid var(--color-border-light);
    border-radius: 6px;
    background: var(--color-bg-secondary);
    min-height: 40px;
    align-self: flex-start;
    max-width: 100%;
}

/* Empty state */
.am-event-pills-container:empty::before {
    content: 'No events selected';
    color: var(--color-text-muted);
    font-size: 0.85em;
    font-style: italic;
    display: block;
    text-align: left;
    padding: 6px 2px;
}

/* Custom scrollbar - refined */
.am-event-pills-container::-webkit-scrollbar {
    width: 5px;
}

.am-event-pills-container::-webkit-scrollbar-track {
    background: transparent;
}

.am-event-pills-container::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.am-event-pills-container::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Pill row - tighter spacing for connected feel */
.am-event-pill-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
}

/* Individual pill - increased breathing room */
.am-event-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 7px 10px 7px 14px;
    background: #e3f2fd;
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: 0.85em;
    color: var(--color-text-muted);
    font-weight: 500;
    max-width: 220px;
    flex-shrink: 1;
    min-width: 0;
    transition: border-color 0.15s, background 0.15s;
}

.am-event-pill:hover {
    background: #bbdefb;
    border-color: rgba(33, 150, 243, 0.3);
}

/* Pill text - cleaner spacing */
.am-event-pill-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
    line-height: 1.3;
}

/* Pill remove button - refined interaction */
.am-event-pill-remove {
    background: none;
    border: none;
    color: #555;
    font-size: 1.1em;
    cursor: pointer;
    padding: 0 2px;
    line-height: 1;
    opacity: 0.5;
    transition: opacity 0.15s ease;
    flex-shrink: 0;
    margin-left: -2px;
}

.am-event-pill-remove:hover {
    opacity: 1;
}

.am-event-pill-remove:focus {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 1px;
    opacity: 1;
    border-radius: 2px;
}

/* Privacy indicator - refined hierarchy */
.am-event-pill-privacy {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #6b7280;
    font-size: 0.75em;
    flex-shrink: 0;
    white-space: nowrap;
    line-height: 1.2;
}

.am-event-pill-privacy-icon {
    font-size: 1.1em;
    line-height: 1;
    opacity: 0.9;
}

.am-event-pill-privacy-text {
    font-size: 1em;
    font-weight: 500;
}

/* Responsive: hide text on narrow screens */
@media (max-width: 400px) {
    .am-event-pill-privacy-text {
        display: none;
    }
    
    .am-event-pill {
        max-width: 180px;
    }
    
    .am-event-pills-container {
        padding: 6px 8px;
    }
}

/* =================================================================== */
/* GROUP LIFECYCLE - BANNERS
/* =================================================================== */


/* =================================================================== */
/* GROUP ACTIVITY LOG
/* =================================================================== */

.activity-log-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0;
}

.activity-log-entry {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius-md);
    background: var(--color-bg-secondary);
    align-items: flex-start;
    transition: background var(--transition-fast);
}

.activity-log-entry:hover {
    background: var(--color-bg-tertiary);
}

.activity-icon {
    font-size: 1.25em;
    line-height: 1;
    flex-shrink: 0;
    width: 24px;
    text-align: center;
}

.activity-content {
    flex: 1;
    min-width: 0;
}

.activity-description {
    font-size: 0.95em;
    color: var(--color-text-primary);
    margin-bottom: 4px;
    word-wrap: break-word;
}

.activity-time {
    font-size: 0.8em;
    color: var(--color-text-secondary);
}

.activity-section-content {
    margin-top: 12px;
}

/* Global event attachment upload queue indicator */
.yrh-event-attachment-upload-indicator {
    position: fixed;
    left: 50%;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 14px);
    transform: translateX(-50%) translateY(12px);
    max-width: min(92vw, 420px);
    padding: 9px 14px;
    border-radius: 999px;
    border: 1px solid rgba(40, 40, 40, 0.14);
    background: rgba(255, 255, 255, 0.96);
    color: var(--color-text-primary);
    font-size: 0.86em;
    font-weight: 500;
    line-height: 1.25;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    pointer-events: none;
    z-index: calc(var(--z-modal-base, 1000) + 90);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.yrh-event-attachment-upload-indicator.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* =================================================================== */
/* EVENT DETAILS CARD - DOCUMENTS TAB (Create/Edit Mode)               */
/* =================================================================== */

.edc-documents-tab {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.edc-documents-header {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* Removed: .edc-add-documents-btn filled-button styles 
   (now uses outlined Timeline control style from 4-modals.css) */

.edc-documents-count {
    font-size: 0.85em;
    color: var(--color-text-muted);
}

.edc-documents-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.edc-document-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border, #e0e0e0);
    border-radius: 8px;
    transition: background 0.15s ease;
}

.edc-document-item:hover {
    background: var(--color-bg-tertiary);
}

.edc-document-icon {
    font-size: 1.5em;
    flex-shrink: 0;
    width: 32px;
    text-align: center;
}

.edc-document-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.edc-document-name {
    font-weight: 500;
    color: var(--color-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.edc-document-size {
    font-size: 0.8em;
    color: var(--color-text-muted);
}

.edc-document-remove-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--color-border, #e0e0e0);
    border-radius: 4px;
    color: var(--color-text-muted);
    font-size: 1.2em;
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.edc-document-remove-btn:hover {
    background: var(--color-error, #e53e3e);
    border-color: var(--color-error, #e53e3e);
    color: white;
}

/* Photos tab styling (same pattern) */
.edc-photos-tab {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.edc-photos-header {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* Removed: .edc-add-photos-btn filled-button styles 
   (now uses outlined Timeline control style from 4-modals.css) */

.edc-photos-count {
    font-size: 0.85em;
    color: var(--color-text-muted);
}

.edc-photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
    max-width: 100%;
}

.edc-photo-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    background: var(--color-bg-secondary);
}

.yrh-artifact-note-indicator {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--color-text-muted);
    opacity: 0.6;
    pointer-events: none;
}

.yrh-artifact-note-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--color-text-muted);
    opacity: 0.6;
    vertical-align: middle;
}

.edc-photo-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.edc-photo-remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1em;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.edc-photo-item:hover .edc-photo-remove-btn {
    opacity: 1;
}

.edc-photo-remove-btn:hover {
    background: var(--color-error, #e53e3e);
}

/* Staged photo/document badge for create mode */
.edc-photo-staged-badge {
    position: absolute;
    bottom: 4px;
    left: 4px;
    padding: 2px 6px;
    background: rgba(99, 102, 241, 0.9);
    color: white;
    font-size: 0.65em;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.edc-photo-staged {
    border: 2px dashed var(--color-primary, #667eea);
}

.edc-document-staged {
    border: 2px dashed var(--color-primary, #667eea);
    background: var(--color-bg-secondary);
}

/* =================================================================== */
/* EVENT DETAILS CARD - ARTIFACTS + REFLECTIONS (Pivot 2026-02-15)      */
/* =================================================================== */

.edc-artifacts-tab {
    position: relative;
}

.edc-artifacts-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    position: relative;
    z-index: 6;
}

.edc-artifacts-add-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.edc-artifacts-add-btn {
    white-space: nowrap;
}

.edc-artifacts-add-btn[disabled],
.edc-artifacts-add-btn[aria-disabled="true"] {
    opacity: 0.45;
    cursor: default;
}

.edc-artifacts-edit-btn {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--color-text-muted);
    border-radius: 0;
    padding: 6px 2px;
    font-size: 0.9em;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
    text-transform: lowercase;
    transition: color 0.18s ease, opacity 0.18s ease;
}

.edc-artifacts-edit-btn:hover {
    color: var(--color-text-primary);
}

.edc-artifacts-edit-btn.is-active {
    color: var(--color-text-primary);
}

.edc-artifacts-edit-btn[disabled],
.edc-artifacts-edit-btn[aria-disabled="true"] {
    opacity: 0.45;
    cursor: default;
    pointer-events: none;
}

.edc-artifacts-add-backdrop {
    position: absolute;
    inset: 0;
    background: transparent;
    z-index: 5;
}

.edc-artifacts-add-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 160px;
    background: var(--color-bg-primary);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md, 10px);
    box-shadow: var(--shadow-lg);
    padding: 6px 0;
    z-index: 7;
    overflow: hidden;
}

.edc-artifacts-add-menu-item {
    width: 100%;
    appearance: none;
    border: 0;
    background: transparent;
    text-align: left;
    padding: 10px 12px;
    font-size: 0.9em;
    font-weight: 500;
    color: var(--color-text-primary);
    cursor: pointer;
}

.edc-artifacts-add-menu-item:hover {
    background: var(--color-bg-secondary);
}

.edc-artifacts-add-menu-item--disabled,
.edc-artifacts-add-menu-item[disabled],
.edc-artifacts-add-menu-item[aria-disabled="true"] {
    color: var(--color-text-tertiary, rgba(0, 0, 0, 0.45));
    background: transparent;
    cursor: not-allowed;
    opacity: 0.6;
}

.edc-artifacts-add-menu-item--disabled:hover,
.edc-artifacts-add-menu-item[disabled]:hover,
.edc-artifacts-add-menu-item[aria-disabled="true"]:hover {
    background: transparent;
}

.edc-artifacts-unified-grid {
    margin-top: 2px;
}

.yrh-artifact-tile--edit-mode {
    position: relative;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.44);
    filter: saturate(0.98);
}

.yrh-artifact-tile--edit-mode::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(248, 244, 238, 0.22) 0%, rgba(239, 233, 224, 0.3) 100%);
    pointer-events: none;
    z-index: 1;
}

.yrh-artifact-tile--edit-mode::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 2px dashed rgba(92, 83, 72, 0.56);
    pointer-events: none;
    z-index: 2;
    box-sizing: border-box;
}

.yrh-artifact-tile--edit-mode .yrh-artifact-note-indicator {
    right: 8px;
    z-index: 3;
}

.edc-artifact-doc-tile {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    background: var(--color-bg-secondary);
    border: 0;
    padding: 0;
    display: block;
    cursor: pointer;
}

.edc-artifact-doc-tile-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

/* PDFs: archival “document sheet” (no pill, no filename, no gray card) */
.edc-artifact-doc-tile .yrh-pdf-sheet {
    position: absolute;
    inset: var(--spacing-10, 10px);
    background: var(--color-surface-1, #ffffff);
    border-radius: 6px;
    box-shadow: var(--shadow-xs);
    border: 1px solid var(--color-border-lightest);
    overflow: hidden;
}

.edc-artifact-doc-tile .yrh-pdf-sheet-embed,
.edc-artifact-doc-tile .yrh-pdf-sheet-img {
    display: block;
    width: 100%;
    height: 100%;
}

.edc-artifact-doc-tile .yrh-pdf-sheet-embed {
    border: 0;
    background: var(--color-surface-1, #ffffff);
    pointer-events: none; /* keep tile click behavior consistent */
    object-fit: contain;
}

.edc-artifact-doc-tile .yrh-pdf-caption {
    flex: 0 0 auto;
    min-height: 16px;
    padding: 0 2px;
    font-size: 12px;
    color: var(--color-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.edc-artifact-doc-tile .yrh-pdf-caption:empty {
    display: none;
}

.edc-artifact-doc-tile .yrh-pdf-unavailable {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    font-size: 12px;
    opacity: 0.7;
    text-align: center;
    padding: 12px;
}

.edc-artifact-video-tile {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(241, 234, 224, 0.95) 0%, rgba(217, 206, 193, 0.92) 100%);
    border: 0;
    padding: 0;
    display: block;
    cursor: pointer;
}

.yrh-artifact-video-thumb {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(241, 234, 224, 0.96) 0%, rgba(217, 206, 193, 0.94) 100%);
}

.yrh-artifact-video-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.01);
}

.yrh-artifact-video-image.is-hidden,
.yrh-artifact-video-fallback.is-hidden {
    display: none;
}

.yrh-artifact-video-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px;
    background:
        radial-gradient(circle at top, rgba(255, 251, 246, 0.86) 0%, rgba(246, 238, 228, 0.28) 42%, transparent 72%),
        linear-gradient(180deg, rgba(241, 234, 224, 0.94) 0%, rgba(216, 205, 192, 0.9) 100%);
    color: rgba(72, 61, 52, 0.82);
    text-align: center;
}

.yrh-artifact-video-fallback-glyph,
.yrh-artifact-audio-glyph {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255, 252, 248, 0.58);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 10px 24px rgba(97, 82, 66, 0.08);
}

.yrh-artifact-video-fallback-glyph svg,
.yrh-artifact-audio-glyph svg {
    width: 18px;
    height: 18px;
    color: rgba(88, 74, 61, 0.9);
}

.yrh-artifact-video-fallback-label,
.yrh-artifact-audio-label {
    font-size: 0.76rem;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: 0.01em;
    text-transform: lowercase;
}

.yrh-artifact-video-badge {
    position: absolute;
    left: 10px;
    bottom: 10px;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(42, 32, 24, 0.34);
    color: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.42);
    backdrop-filter: blur(12px) saturate(1.08);
    -webkit-backdrop-filter: blur(12px) saturate(1.08);
    box-shadow: 0 14px 30px rgba(28, 21, 16, 0.24);
    z-index: 3;
    pointer-events: none;
}

.yrh-artifact-video-thumb:not(.is-ready) .yrh-artifact-video-badge {
    display: none;
}

.yrh-artifact-video-badge svg {
    width: 24px;
    height: 24px;
    margin-left: 2px;
}

.yrh-artifact-video-thumb .yrh-artifact-note-indicator,
.yrh-artifact-audio-thumb .yrh-artifact-note-indicator {
    z-index: 3;
}

.yrh-artifact-audio-tile {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    background:
        radial-gradient(circle at top, rgba(255, 252, 247, 0.88) 0%, rgba(244, 237, 228, 0.2) 38%, transparent 72%),
        linear-gradient(180deg, rgba(244, 239, 233, 0.98) 0%, rgba(228, 219, 209, 0.96) 100%);
    border: 0;
    padding: 0;
    display: block;
    cursor: pointer;
}

.yrh-artifact-audio-thumb {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: space-between;
    gap: 10px;
    padding: 14px;
    color: rgba(75, 66, 58, 0.82);
    text-align: left;
}

.yrh-artifact-audio-kicker {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(112, 96, 81, 0.62);
}

.yrh-artifact-audio-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
}

.yrh-artifact-audio-waveform {
    display: inline-flex;
    align-items: flex-end;
    gap: 6px;
    height: 34px;
    flex: 0 0 auto;
}

.yrh-artifact-audio-waveform span {
    width: 5px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(151, 126, 104, 0.78) 0%, rgba(126, 103, 84, 0.48) 100%);
}

.yrh-artifact-audio-waveform span:nth-child(1) { height: 14px; }
.yrh-artifact-audio-waveform span:nth-child(2) { height: 22px; }
.yrh-artifact-audio-waveform span:nth-child(3) { height: 32px; }
.yrh-artifact-audio-waveform span:nth-child(4) { height: 20px; }
.yrh-artifact-audio-waveform span:nth-child(5) { height: 12px; }

.yrh-artifact-audio-copy {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.yrh-artifact-audio-title {
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.25;
    color: rgba(66, 54, 44, 0.92);
    display: -webkit-box;
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.yrh-artifact-audio-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 500;
    color: rgba(110, 95, 81, 0.78);
}

.yrh-artifact-audio-meta span {
    display: inline-flex;
    align-items: center;
}

.yrh-artifact-audio-meta span:not(:last-child)::after {
    content: '•';
    margin-left: 6px;
    color: rgba(123, 107, 92, 0.48);
}

.yrh-artifact-audio-meta--empty span:not(:last-child)::after {
    content: '';
}

.edc-doc-meta {
    font-size: 0.8em;
    color: var(--color-text-muted);
}

.edc-doc-progress-bar {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    background: var(--color-primary);
}

.edc-artifacts-filter-row {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 10px;
}

.edc-segmented {
    display: inline-flex;
    gap: 2px;
    padding: 2px;
    border: 1px solid var(--color-border, #e0e0e0);
    background: var(--color-bg-secondary);
    border-radius: 10px;
    max-width: 100%;
}

.edc-segmented-btn {
    appearance: none;
    border: none;
    background: transparent;
    color: var(--color-text-muted);
    font-size: 0.85em;
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
}

.edc-segmented-btn.is-active {
    background: var(--color-bg-primary, #fff);
    color: var(--color-text-primary);
    border: 1px solid var(--color-border, #e0e0e0);
}

.edc-artifacts-section {
    margin-bottom: 14px;
}

.edc-artifacts-section-title {
    font-size: 0.8em;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: lowercase;
    margin: 4px 0 8px 0;
}

.edc-reflections-list {
    display: block;
}

/* Reflections (Event Details Card) — thread layout + chat-style composer
   Scoped to the reflections tab only; no backend behavior changes. */
#event-details-card-overlay[data-active-tab="notes"] .event-card.event-card--modal .event-card-body--modal {
    display: grid;
    grid-template-rows: minmax(0, 1fr);
    min-height: 0;
    overflow: hidden;
}

.edc-reflections-tab {
    display: flex;
    flex-direction: column;
    flex: 1 1 0;
    min-height: 0;
    overflow: hidden;
}

/* Single unified journal container (reflections tab only) */
.edc-reflections-journal {
    flex: 1 1 0;
    min-height: 0;
    display: flex;
    flex-direction: column;

    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.10);
    border-radius: 16px;
    overflow: hidden;
    height: auto;
}

#event-details-card-overlay[data-active-tab="notes"] .edc-reflections-tab {
    display: grid;
    grid-template-rows: minmax(0, 1fr);
    flex: 1 1 auto;
    min-height: 0;
}

#event-details-card-overlay[data-active-tab="notes"] .edc-reflections-journal {
    display: grid;
    grid-template-rows: minmax(0, 1fr);
    flex: 1 1 auto;
    min-height: 0;
}

.edc-reflections-entries {
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    /* White document surface (committed, non-editable content) */
    background: #fff;
    padding: 22px;
}

/* iPhone/touch: suppress selection/callout during long-press interactions */
@media (hover: none) and (pointer: coarse) {
    .edc-reflections-entries,
    .edc-reflection-entry,
    .edc-reflection-meta-row,
    .edc-reflection-meta,
    .edc-reflection-text,
    .edc-reflection-delete {
        user-select: none;
        -webkit-user-select: none;
        -webkit-touch-callout: none;
    }
}

/* Desktop-only scrollbar refinement */
@media (hover: hover) and (pointer: fine) {
    .edc-reflections-entries {
        scrollbar-width: thin;
        scrollbar-color: rgba(0, 0, 0, 0.18) transparent;
    }

    .edc-reflections-entries::-webkit-scrollbar {
        width: 6px;
    }

    .edc-reflections-entries::-webkit-scrollbar-track {
        background: transparent;
    }

    .edc-reflections-entries::-webkit-scrollbar-thumb {
        background-color: rgba(0, 0, 0, 0.12);
        border-radius: 999px;
    }

    .edc-reflections-entries:hover::-webkit-scrollbar-thumb {
        background-color: rgba(0, 0, 0, 0.18);
    }
}

.edc-reflection-entry {
    position: relative;
    width: 100%;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
}

.edc-reflection-entry--can-delete {
    padding-right: 0;
}

.edc-reflection-delete {
    position: absolute;
    top: -2px;
    right: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    padding: 0;
    border: none;
    background: transparent;
    color: rgba(0, 0, 0, 0.16);
    font-size: 0.72em;
    font-weight: 500;
    letter-spacing: 0.01em;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 140ms ease, color 140ms ease;
}

.edc-reflection-delete:focus-visible {
    opacity: 1;
    pointer-events: auto;
    color: rgba(0, 0, 0, 0.36);
    outline: none;
}

@media (hover: hover) and (pointer: fine) {
    .edc-reflection-entry--can-delete:hover .edc-reflection-delete {
        opacity: 1;
        pointer-events: auto;
    }

    .edc-reflection-delete:hover,
    .edc-reflection-delete:focus-visible {
        color: rgba(0, 0, 0, 0.34);
    }
}

@media (hover: none) and (pointer: coarse) {
    .edc-reflection-delete {
        display: none;
    }
}

.edc-reflections-entry-divider {
    width: 100%;
    height: 1px;
    background: rgba(0, 0, 0, 0.08);
    border: none;
    margin: 16px 0;
}

.edc-reflection-meta {
    font-size: 0.78em;
    color: var(--color-text-muted);
    margin-bottom: 10px;
}

/* Long-press arming state: suppress selection/callout only while pressing */
.edc-reflections-entries.is-longpress-arming,
.edc-reflections-entries.is-longpress-arming * {
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

.edc-reflection-text {
    color: var(--color-text-primary);
    line-height: 1.4;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.edc-reflections-readonly {
    margin-top: 10px;
    font-size: 0.85em;
    color: var(--color-text-muted);
}

.edc-reflections-composer {
    flex: 0 0 auto;
    background: transparent;
    padding: 12px 20px 4px;
    margin-top: 4px;
}

.edc-reflections-composer-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.edc-reflections-composer-row--native {
    align-items: center;
}

.edc-reflections-composer-row--action {
    align-items: center;
}

.edc-reflection-add-trigger,
.edc-native-reflection-trigger {
    width: 100%;
    min-width: 0;
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    flex: 1 1 0;
    border: none;
    background: transparent;
    color: var(--color-text-muted);
    font-family: var(--font-family-base);
    font-size: 0.84rem;
    line-height: 1.35;
    text-align: left;
    padding: 0;
    margin: 0;
    cursor: pointer;
}

.edc-reflection-add-trigger__plus {
    font-size: 0.92rem;
    line-height: 1;
    opacity: 0.72;
}

.edc-reflection-add-trigger__label {
    font-weight: 400;
}

.edc-reflection-add-trigger:hover,
.edc-native-reflection-trigger:hover {
    color: var(--color-text-primary);
}

.edc-reflection-add-trigger:focus-visible,
.edc-native-reflection-trigger:focus-visible {
    outline: none;
    color: var(--color-text-primary);
}

textarea.edc-reflections-composer-input {
    width: 100%;
    display: block;
    border: none !important;
    background: transparent !important;
    outline: none !important;
    /* leave room for the inline save action on the right */
    padding: 0 !important;
    margin: 0;
    max-height: 120px;
    color: var(--color-text-primary);
    caret-color: currentColor;
    resize: none;
    line-height: 1.35;
    font-family: var(--font-family-base);
    /* Desktop: match About description typography */
    font-size: 0.88rem;
    min-height: 44px;
    flex: 1 1 0;
    min-width: 0;
}

/* Touch devices: keep 16px to prevent iOS focus-zoom. */
@media (hover: none) and (pointer: coarse) {
    textarea.edc-reflections-composer-input {
        font-size: 16px;
    }
}

textarea.edc-reflections-composer-input::placeholder {
    color: var(--color-text-muted);
    opacity: 0.75;
}

.edc-native-reflection-trigger {
    min-height: 28px;
}

.edc-native-reflection-trigger:focus-visible {
    outline: none;
}

.edc-native-reflection-trigger:disabled {
    opacity: 0.55;
    cursor: default;
}

@media (hover: none) and (pointer: coarse) {
    .edc-reflection-add-trigger,
    .edc-native-reflection-trigger {
        font-size: 16px;
    }

    .you-reflections-tab .edc-reflections-composer {
        padding-bottom: calc(10px + env(safe-area-inset-bottom));
    }
}

.edc-reflections-save-btn {
    border: none;
    background: transparent;
    padding: 0;
    color: var(--color-text-muted);
    font-size: 0.95em;
    text-transform: lowercase;

    opacity: 0;
    transition: opacity 120ms ease;
    line-height: 1.35;
    margin-top: 1px;
    cursor: pointer;
}

.edc-reflections-save-label {
    display: inline;
}

.edc-reflections-save-icon {
    display: none;
    color: rgba(0, 0, 0, 0.45);
}

.edc-reflections-composer.is-has-text .edc-reflections-save-btn {
    opacity: 1;
}

.edc-reflections-save-btn:disabled {
    opacity: 0;
    cursor: default;
    pointer-events: none;
}

.edc-reflections-save-btn:hover:enabled {
    color: var(--color-text-primary);
}

/* Legacy reflections composer styles (used outside the EDC reflections tab). */
.edc-reflection-composer {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.edc-reflection-composer-actions {
    display: flex;
    justify-content: flex-end;
}

.edc-description-value {
    white-space: pre-wrap;
    word-wrap: break-word;
}

.edc-description-textarea {
    min-height: 84px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ABOUT TAB — Pivoted Layout (2026-02-16)
   ═══════════════════════════════════════════════════════════════════════════ */

.edc-about-view {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* About tab — narrative vertical stack (view mode only)
   Keeps edit mode layout untouched. */
.edc-about-view--narrative {
    gap: 24px;
}

.edc-about-view--narrative .event-about-content {
    gap: 11px;
}

.edc-about-date-line {
    color: var(--color-text-muted, #666);
    font-size: 0.9rem;
    line-height: 1.35;
}

.edc-about-meta-line {
    color: var(--color-text-muted, #666);
    font-size: 0.9rem;
    line-height: 1.35;
}

/* About tab: duration should match themes tone (italic + lighter). */
.edc-about-duration-line {
    font-size: 0.82rem;
    letter-spacing: 0.015em;
    font-style: italic;
    opacity: 0.82;
}

/* About tab: metadata line positioned below description, right-aligned. */
.edc-about-meta-right {
    width: 100%;
    text-align: right;
}

/* Timeline About: make metadata lighter + italic to match Event About tone. */
.tlm-about-meta {
    font-style: italic;
    font-weight: 400;
    opacity: 0.82;
}

.edc-about-themes-line {
    color: var(--color-text-muted, #666);
    font-size: 0.82rem;
    letter-spacing: 0.015em;
    font-style: italic;
    opacity: 0.82;
    margin-top: 0;
    margin-bottom: 2px;
}

/* Keep the compact vertical rhythm when themes are the only meta line. */
.edc-about-meta-right > .edc-about-themes-line:first-child {
    margin-top: -6px;
}

.edc-about-themes-edit {
    color: var(--color-text-muted, #666);
    font-size: 0.9rem;
    line-height: 1.35;
    display: inline;
    cursor: pointer;
    user-select: none;
}

/* Edit mode helper row under the "themes" label */
.edc-themes-helper-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--color-text-muted, #666);
    font-size: 0.82rem;
    line-height: 1.2;
}

.edc-themes-helper-row.is-maxed .edc-themes-helper-right {
    font-weight: 600;
}

.edc-about-themes-placeholder {
    color: var(--color-text-muted, #666);
    font-style: italic;
}

.edc-about-theme-token {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.edc-about-theme-remove {
    border: none;
    background: transparent;
    color: var(--color-text-muted, #666);
    font-size: 16px;
    line-height: 1;
    padding: 0;
    cursor: pointer;
}

.edc-about-dot {
    color: var(--color-text-muted, #666);
}

.edc-about-description-placeholder {
    color: var(--color-text-muted, #666);
    font-style: italic;
}


.edc-about-thumbs-wrap {
    /* About tab — Thumb rail
       Guarantees symmetric breathing around circles and prevents iPhone overflow.
       NOTE: rail height is fixed and includes padding (box-sizing: border-box). */
    --edc-about-thumb-size: 40px;
    --edc-about-thumb-rail-pad: 7px;
    --edc-about-thumb-rail-height: calc(var(--edc-about-thumb-size) + (var(--edc-about-thumb-rail-pad) * 2));

    margin-top: 6px; /* consistent gap from description (avoid “hugging”) */
    margin-bottom: 4px; /* small bottom breathing room before footer area */
    display: flex;
    justify-content: flex-start;
    align-items: center;
    box-sizing: border-box;
    padding-top: var(--edc-about-thumb-rail-pad);
    padding-bottom: var(--edc-about-thumb-rail-pad);
    height: var(--edc-about-thumb-rail-height);
    max-height: var(--edc-about-thumb-rail-height);
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.edc-about-thumbs {
    display: flex;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    cursor: pointer;
    min-width: max-content;
}

.edc-about-thumb {
    width: var(--edc-about-thumb-size);
    height: var(--edc-about-thumb-size);
    max-width: var(--edc-about-thumb-size);
    max-height: var(--edc-about-thumb-size);
    border-radius: 999px;
    overflow: hidden;
    background: var(--color-bg-secondary, #f6f6f6);
    border: 1px solid var(--color-border-light, #e5e7eb);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.edc-about-thumb + .edc-about-thumb {
    margin-left: calc(var(--edc-about-thumb-size) * -0.25);
}

.edc-about-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.edc-about-thumb--more {
    background: var(--color-bg-secondary, #f3f4f6);
    color: var(--color-text-muted, #666);
    font-size: 0.8rem;
    font-weight: 600;
}

@media (min-width: 769px) {
    .edc-about-thumbs-wrap {
        --edc-about-thumb-size: 46px;
        --edc-about-thumb-rail-pad: 8px;
    }
}

/* Ensure empty tile for 3-photo balanced grid blends in */
.event-photo-block .edb-tile-empty {
    background: var(--color-bg-secondary, #f6f6f6);
}

.event-about-content {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.edc-about-view:not(.edc-about-view--narrative) .event-about-content::after {
    content: '';
    display: block;
    height: 24px;
    flex-shrink: 0;
}

.event-about-top {
    width: 100%;
}

.event-about-bottom {
    width: 100%;
    margin-top: 2px;
}

/* Event about layout: metadata spine + dominant photo block */
.event-details-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.event-details-left {
    flex: 0 0 42%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.event-details-right {
    flex: 1;
    min-width: 0;
}

.event-details-layout--no-photo .event-details-left {
    flex: 1 1 100%;
}

.edc-about-date-stack {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.edc-about-duration-sentence {
    color: var(--color-text-muted, #666);
    font-size: 0.9em;
    line-height: 1.35;
}

.edc-about-view .event-card-detail-row {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

/* Themes stacked vertically */
.event-theme-list {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 11px;
}

.event-theme-item {
    width: auto;
    max-width: 100%;
}

.edc-theme-slot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 0.82rem;
    font-weight: 500;
    line-height: 1.3;
    white-space: nowrap;
    user-select: none;
}

.edc-theme-slot-text {
    overflow: hidden;
    text-overflow: ellipsis;
}

.event-theme-item .edc-theme-slot,
.event-theme-item .edc-theme-slot:hover {
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    text-align: left;
}

.event-theme-item button.edc-theme-slot {
    cursor: pointer;
}

.event-theme-item span.edc-theme-slot {
    cursor: default;
}

.edc-theme-slot-remove {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    line-height: 1;
    color: var(--color-text-muted, #666);
}

.edc-theme-slot-remove:hover {
    background: var(--color-bg-secondary, #f3f4f6);
}

.edc-theme-slot--filled {
    background: var(--color-bg-primary, #fff);
    color: var(--color-text-primary, #111);
    border: 1px solid var(--color-border-light, #e5e7eb);
}

.edc-theme-slot--empty {
    background: var(--color-bg-secondary, #f3f4f6);
    color: var(--color-text-muted, #666);
    border: 1px solid var(--color-border-light, #e5e7eb);
    font-weight: 500;
}

/* ThemePicker tray: keep existing flow, but only show when slots are tapped */
.edc-about-themes-picker {
    margin-top: 4px;
}

.edc-about-themes-picker.is-closed {
    max-height: 0;
    overflow: hidden;
}

.edc-about-themes-picker.is-open {
    max-height: 420px;
    overflow: auto;
}

/* Event edit/create: ThemePicker tray should have padding and an adaptive
   height target (2 rows desktop, 3 rows on iPhone via override). */
#event-details-card-overlay .edc-about-themes-picker .tag-picker-tray {
    --edc-theme-tray-rows: 2;
    --edc-theme-tray-pad-top: 12px;
    --edc-theme-tray-pad-side: 12px;
    --edc-theme-tray-pad-bottom: 18px;
    --edc-theme-tray-gap: 8px;
    --edc-theme-tray-row: 32px;

    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: var(--edc-theme-tray-gap);
    padding: var(--edc-theme-tray-pad-top) var(--edc-theme-tray-pad-side) var(--edc-theme-tray-pad-bottom);
    box-sizing: border-box;
    border-radius: 8px;

    height: auto;
    min-height: 0;
    max-height: calc(
        var(--edc-theme-tray-pad-top) +
        var(--edc-theme-tray-pad-bottom) +
        (var(--edc-theme-tray-row) * var(--edc-theme-tray-rows)) +
        (var(--edc-theme-tray-gap) * (var(--edc-theme-tray-rows) - 1))
    );

    overflow-y: auto;
    -webkit-overflow-scrolling: touch;

    /* Ensure tray styling matches desktop even if TagPicker base CSS
       isn't applied (common when iOS caches a subset of stylesheets). */
    background: var(--color-bg-primary, #fff);
    border: 1px solid var(--color-border-light, #ddd);
}

/* Hide ThemePicker chips row so we don't show "no themes" */
.edc-about-themes-picker .tag-picker-chips {
    display: none;
}

/* When 3 themes are selected, ThemePicker disables unselected pills.
   Ensure they look and behave disabled across iPhone Safari + desktop. */
.edc-about-themes-picker .tag-picker-pill:disabled {
    opacity: 0.45;
    cursor: default;
    pointer-events: none;
}

/* EDC ThemePicker pills: fully specify the pill look here so it matches desktop
   even if the global TagPicker styles from 4-modals.css are not applied. */
#event-details-card-overlay .edc-about-themes-picker .tag-picker-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: var(--color-bg-tertiary, #f0f0f0);
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 0.85em;
    color: var(--color-text-secondary, #555);
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, border-color 0.15s, color 0.15s;

    /* iOS Safari: prevent native button styling from overriding radius/colors */
    -webkit-appearance: none;
    appearance: none;
    -webkit-text-fill-color: currentColor;
}

#event-details-card-overlay .edc-about-themes-picker .tag-picker-pill:hover {
    background: var(--color-brand-primary-10, #f0f2ff);
    border-color: var(--color-brand-primary-30, #c5caff);
}

#event-details-card-overlay .edc-about-themes-picker .tag-picker-pill.is-focused {
    outline: 2px solid var(--color-primary, #5c6bc0);
    outline-offset: 1px;
}

#event-details-card-overlay .edc-about-themes-picker .tag-picker-pill.is-selected {
    background: var(--color-primary, #5c6bc0);
    border-color: var(--color-primary, #5c6bc0);
    color: var(--color-text-inverse, #fff);
    -webkit-text-fill-color: currentColor;
}

/* Theme selection should stay consistently blue (no purple shift on hover/press).
   The global TagPicker uses --color-primary-dark for selected:hover, which is
   purple in our token set. Override for the event edit themes picker only. */
.edc-about-themes-picker .tag-picker-pill.is-selected,
.edc-about-themes-picker .tag-picker-pill.is-selected:hover,
.edc-about-themes-picker .tag-picker-pill.is-selected:active {
    background: var(--color-primary);
    border-color: var(--color-primary);
}

/* EDC: keep primary footer action sizing stable */
#event-details-card-overlay .c-modal-footer-actions .btn.btn-primary {
    min-width: 120px;
    justify-content: center;
    white-space: nowrap;
}

/* You modal: match event edit save button sizing on tablet/desktop sticky footer */
#youModal .you-modal-sticky-footer .c-modal-footer-actions .btn.btn-primary {
    min-width: 120px;
    justify-content: center;
    white-space: nowrap;
}

/* Sidebar EDC: stable save button sizing too */
#eventDetailsSidebar .event-card-save-btn {
    min-width: 120px;
    justify-content: center;
    white-space: nowrap;
}

/* Dominant photo composition block */
.event-photo-block {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-md, 8px);
    overflow: hidden;
    background: var(--color-bg-secondary, #f6f6f6);
    position: relative;
    cursor: pointer;
}

.event-photo-block img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.event-photo-block .edb-single {
    height: 100%;
}

.event-photo-block .edb-two {
    display: flex;
    height: 100%;
    gap: 4px;
}

.event-photo-block .edb-two-col {
    flex: 1;
    overflow: hidden;
}

.event-photo-block .edb-three {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4px;
    height: 100%;
}

.event-photo-block .edb-three-left {
    overflow: hidden;
}

.event-photo-block .edb-three-right {
    display: grid;
    grid-template-rows: 1fr 1fr;
    gap: 4px;
}

.event-photo-block .edb-three-top,
.event-photo-block .edb-three-bottom {
    overflow: hidden;
}

.event-photo-block .edb-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 4px;
    height: 100%;
}

.event-photo-block .edb-tile {
    overflow: hidden;
    position: relative;
}

.event-photo-block .edb-tile-more .edb-more-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.45) 100%);
    font-size: 1.1em;
}

/* Description — card panel */
.edc-about-description-panel {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.edc-about-description-card {
    background: var(--color-bg-primary, #fff);
    border: 1px solid var(--border-subtle, var(--color-border-light, #e5e7eb));
    border-radius: 10px;
    padding: 18px;
    min-height: 60px;
    font-size: 0.88rem;
    line-height: 1.5;
    color: var(--color-text-primary, #111);
}

.edc-about-description-card--view {
    background: var(--color-bg-primary, #fff);
    height: clamp(240px, 30vh, 260px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    margin-top: 2px;
}

.edc-about-description-card .event-card-empty-value,
.edc-about-description-card .edc-description-value.event-card-empty-value {
    font-style: italic;
}

.edc-about-description-card .edc-description-textarea::placeholder {
    font-style: italic;
}

.edc-about-description-card .edc-description-textarea::-webkit-input-placeholder {
    font-style: italic;
}

.edc-about-description-card .edc-description-textarea {
    border: none;
    outline: none;
    padding: 0;
    margin: 0;
    background: transparent;
    width: 100%;
    box-sizing: border-box;
    font: inherit;
    resize: none;
    height: 100%;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.edc-about-description-card--fixed {
    background: var(--color-bg-secondary, #f3f4f6);
    height: clamp(240px, 30vh, 260px);
    overflow: hidden;
    margin-top: 2px;
}

.edc-about-description-card--tap-launch {
    cursor: pointer;
}

.edc-about-description-card--tap-launch:focus-visible {
    outline: 2px solid rgba(17, 24, 39, 0.18);
    outline-offset: 2px;
}

.edc-about-description-card--tap-launch .edc-description-textarea[data-edc-ios-trigger="true"] {
    pointer-events: none;
}

/* Edit/Create mode only: keep a small gap above the sticky footer */
.edc-about-view:not(.edc-about-view--narrative) .edc-about-description-card--fixed {
    margin-bottom: 12px;
}

.yrh-narration-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 2px;
}

.yrh-narration-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.yrh-narration-label {
    color: var(--color-text-muted, #666);
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.yrh-narration-player,
.yrh-narration-recorder,
.yrh-narration-empty {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px 18px;
    border-radius: 14px;
    border: 1px solid var(--border-subtle, var(--color-border-light, #e5e7eb));
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 249, 250, 0.94) 100%),
        var(--color-bg-primary, #fff);
    box-shadow: 0 10px 24px rgba(17, 24, 39, 0.05);
}

.yrh-narration-empty {
    border: 1px solid var(--border-subtle, var(--color-border-light, #e5e7eb));
    border-radius: 10px;
    padding: 18px;
    background: var(--color-bg-primary, #fff);
    box-shadow: none;
}

.yrh-narration-empty--edit {
    background: var(--color-bg-secondary, #f3f4f6);
    border-color: rgba(15, 23, 42, 0.08);
}

.yrh-narration-empty-trigger {
    width: 100%;
    text-align: left;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    transition: background-color 0.14s ease, border-color 0.14s ease;
}

.yrh-narration-empty-trigger:hover,
.yrh-narration-empty-trigger:focus-visible {
    background: #fafafa;
    border-color: rgba(17, 24, 39, 0.12);
    box-shadow: none;
}

.yrh-narration-empty-trigger:active {
    background: #f6f6f6;
    border-color: rgba(17, 24, 39, 0.14);
}

.yrh-narration-empty--edit:hover,
.yrh-narration-empty--edit:focus-visible {
    background: #eceff3;
    border-color: rgba(15, 23, 42, 0.1);
}

.yrh-narration-empty--edit:active {
    background: #e7ebf0;
    border-color: rgba(15, 23, 42, 0.12);
}

.yrh-narration-recorder--live {
    border-color: rgba(183, 28, 28, 0.18);
    background:
        linear-gradient(180deg, rgba(255, 250, 250, 0.98) 0%, rgba(253, 242, 242, 0.96) 100%),
        var(--color-bg-primary, #fff);
}

.yrh-narration-status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.yrh-narration-player--readonly {
    padding: 14px 16px;
}

.yrh-narration-status-text {
    color: var(--color-text-primary, #111);
    font-size: 0.96rem;
    font-weight: 600;
    line-height: 1.3;
}

.yrh-narration-status-text {
    flex: 1 1 auto;
    text-transform: lowercase;
}

.yrh-narration-meta {
    display: flex;
    align-items: center;
    gap: 6px;
}

.yrh-narration-meta-text {
    flex: 1 1 auto;
    min-width: 0;
}

.yrh-narration-meta,
.yrh-narration-meta-text,
.yrh-narration-elapsed,
.yrh-narration-empty-text {
    color: var(--color-text-muted, #666);
    font-size: 0.84rem;
    line-height: 1.45;
}

.yrh-narration-empty-text {
    margin: 0;
}

.yrh-narration-empty-text--placeholder {
    font-style: italic;
    color: var(--color-text-secondary, #7b8088);
}

.event-card-detail-row--narration {
    margin-top: -4px;
}

.yrh-narration-elapsed {
    flex: 0 0 auto;
    font-variant-numeric: tabular-nums;
}

.yrh-narration-live-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: #c62828;
    box-shadow: 0 0 0 0 rgba(198, 40, 40, 0.28);
    animation: yrhNarrationPulse 1.5s ease-out infinite;
}

.yrh-narration-audio {
    width: 100%;
    min-width: 0;
}

.yrh-narration-download-icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 4px;
    border-radius: 50%;
    color: #b8bec8;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.15s ease;
}

.yrh-narration-download-icon svg {
    display: block;
    pointer-events: none;
}

.yrh-narration-download-icon:hover,
.yrh-narration-download-icon:active {
    color: var(--color-text-secondary, #6b7280);
}

.yrh-narration-download-icon:focus-visible {
    outline: 2px solid rgba(31, 79, 130, 0.22);
    outline-offset: 2px;
    border-radius: 50%;
}

.yrh-narration-download-icon--loading {
    pointer-events: none;
    animation: yrhDownloadPulse 0.8s ease-in-out infinite;
}

@keyframes yrhDownloadPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.yrh-narration-actions,
.yrh-narration-recorder-actions {
    display: flex;
    flex-wrap: wrap;
    row-gap: 10px;
    align-items: flex-start;
    justify-content: flex-start;
}

.yrh-narration-actions {
    margin-top: -2px;
    column-gap: 36px;
    row-gap: 12px;
}

.yrh-narration-recorder-actions {
    column-gap: 40px;
}

.yrh-narration-action {
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 44px;
    padding: 12px 6px 12px 0;
    border: none;
    border-radius: 0;
    background: transparent;
    color: var(--color-text-secondary, #6b7280);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.2;
    cursor: pointer;
    transition: color 0.16s ease, opacity 0.16s ease, text-decoration-color 0.16s ease;
}

.yrh-narration-action:hover {
    color: var(--color-text-primary, #111827);
    text-decoration: none;
}

.yrh-narration-action:disabled {
    cursor: default;
    opacity: 0.58;
    text-decoration: none;
}

.yrh-narration-action:active {
    text-decoration: none;
}

.yrh-narration-action:focus-visible {
    outline: 2px solid rgba(31, 79, 130, 0.22);
    outline-offset: 3px;
    border-radius: 4px;
}

.yrh-narration-action--primary {
    color: var(--color-text-primary, #111827);
}

.yrh-narration-action--primary:hover {
    color: var(--color-text-primary, #111827);
}

.yrh-narration-action--secondary {
    color: var(--color-text-secondary, #6b7280);
}

.yrh-narration-action--secondary:hover {
    color: var(--color-text-primary, #111827);
}

.yrh-narration-action--danger {
    color: #8f1d1d;
}

.yrh-narration-action--danger:hover {
    color: #7f1717;
}

.yrh-narration-action--quiet,
.yrh-narration-action--quiet-danger {
    min-height: 44px;
    padding: 12px 6px 12px 0;
}

.yrh-narration-action--quiet {
    color: var(--color-text-secondary, #6b7280);
}

.yrh-narration-action--quiet:hover,
.yrh-narration-action--quiet:focus-visible {
    background: transparent;
    color: var(--color-text-primary, #111827);
    text-decoration: none;
}

.yrh-narration-action--quiet-danger {
    color: #8f1d1d;
}

.yrh-narration-action--quiet-danger:hover,
.yrh-narration-action--quiet-danger:focus-visible {
    background: transparent;
    color: #7f1717;
    text-decoration: none;
}

.yrh-narration-message {
    padding: 4px 0 0;
    font-size: 0.78rem;
    line-height: 1.4;
}

.yrh-narration-message--error {
    color: #b91c1c;
}

@keyframes yrhNarrationPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(198, 40, 40, 0.28);
    }

    70% {
        box-shadow: 0 0 0 9px rgba(198, 40, 40, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(198, 40, 40, 0);
    }
}

@keyframes yrhNarrationWave {
    0%,
    100% {
        transform: scaleY(0.72);
        opacity: 0.72;
    }

    50% {
        transform: scaleY(1.08);
        opacity: 1;
    }
}

@media (min-width: 769px) {
    .edc-about-description-card--view,
    .edc-about-description-card--fixed {
        height: clamp(260px, 24vh, 300px);
    }
}

@media (min-width: 769px) {
    .event-about-top {
        align-items: flex-start;
        gap: 20px;
    }

    .event-details-right {
        flex: 0 0 clamp(220px, 30%, 268px);
        width: clamp(220px, 30%, 268px);
        max-height: 268px;
        align-self: flex-start;
    }

    .event-photo-block {
        width: 100%;
        height: 100%;
        max-height: 268px;
        aspect-ratio: 1 / 1;
        overflow: hidden;
    }
}

@media (max-width: 768px) {
    .edc-about-view:not(.edc-about-view--narrative) {
        gap: 0;
        height: 100%;
        min-height: 100%;
    }

    .edc-about-view:not(.edc-about-view--narrative) .event-about-content {
        display: flex;
        flex-direction: column;
        gap: 20px;
        flex: 1 1 auto;
        min-height: 100%;
    }

    .event-about-top {
        display: flex;
        align-items: flex-start;
        gap: 17px;
        flex: 0 0 auto;
    }

    .event-about-bottom {
        margin-top: 0;
        flex: 1 1 auto;
        display: flex;
        flex-direction: column;
        min-height: 0;
    }

    .event-details-layout {
        flex-direction: row;
        align-items: flex-start;
        gap: 17px;
    }

    .event-details-left {
        flex: 1 1 auto;
        min-width: 0;
        gap: 20px;
    }

    .event-details-right {
        flex: 0 0 168px;
        width: 168px;
        align-self: flex-start;
    }

    .event-details-layout--no-photo .event-details-left {
        flex: 1 1 100%;
        width: 100%;
    }

    .event-photo-block {
        width: 100%;
        aspect-ratio: 1 / 1;
    }

    .event-theme-list {
        gap: 11px;
    }

    .event-theme-item {
        width: auto;
        max-width: 100%;
    }

    .event-theme-item .edc-theme-slot,
    .event-theme-item .edc-theme-slot:hover {
        display: inline-flex;
        width: auto;
        max-width: min(220px, 72%);
        padding: 8px 10px;
        border-radius: 11px;
    }

    .edc-about-view .event-card-detail-row {
        gap: 10px;
    }

    .edc-about-description-panel {
        gap: 10px;
        flex: 1 1 auto;
        display: flex;
        flex-direction: column;
        min-height: 0;
    }

    .event-about-bottom .edc-about-description-card {
        flex: 1 1 auto;
        display: flex;
        flex-direction: column;
        min-height: 0;
    }

    .event-about-bottom .edc-description-textarea {
        flex: 1 1 auto;
        min-height: 100%;
    }

    .yrh-narration-player,
    .yrh-narration-recorder,
    .yrh-narration-empty {
        padding: 15px 16px;
    }

    .yrh-narration-status-row {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .yrh-narration-actions,
    .yrh-narration-recorder-actions {
        row-gap: 8px;
    }

    .yrh-narration-actions {
        column-gap: 32px;
    }

    .yrh-narration-recorder-actions {
        column-gap: 36px;
    }

    .yrh-narration-action {
        flex: 0 0 auto;
        justify-content: flex-start;
    }
}

@media (max-width: 359px) {
    .event-details-layout {
        flex-direction: column;
        gap: 12px;
    }

    .event-details-left,
    .event-details-right,
    .event-details-layout--no-photo .event-details-left {
        flex: 1 1 100%;
        width: 100%;
    }

    .event-photo-block {
        width: 100%;
        aspect-ratio: 1 / 1;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   YOU PAGE — Reflections & Artifacts (personal, not event/timeline-scoped)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── You Reflections tab specifics ── */
.you-reflections-tab {
    height: 100%;
}

.you-reflections-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
}

.you-reflections-empty-icon {
    font-size: 2.4em;
    margin-bottom: 12px;
    opacity: 0.7;
}

.you-reflections-empty-text {
    font-size: 1em;
    color: var(--color-text-secondary);
    margin: 0 0 6px;
}

.you-reflections-empty-hint {
    font-size: 0.85em;
    color: var(--color-text-muted);
    margin: 0;
    max-width: 280px;
    line-height: 1.45;
}

/* ── You Artifacts tab specifics ── */
.you-artifacts-tab {
    position: relative;
}

.you-artifacts-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
}

.you-artifacts-empty-icon {
    font-size: 2.4em;
    margin-bottom: 12px;
    opacity: 0.7;
}

.you-artifacts-empty-text {
    font-size: 1em;
    color: var(--color-text-secondary);
    margin: 0 0 6px;
}

.you-artifacts-empty-hint {
    font-size: 0.85em;
    color: var(--color-text-muted);
    margin: 0;
    max-width: 280px;
    line-height: 1.45;
}

.you-artifacts-loading {
    padding: 48px 24px;
    text-align: center;
    font-size: 0.9em;
    color: var(--color-text-muted);
}

/* ========================================================================== */
/* SIGNED-OUT LANDING (simple page overlay) */
/* ========================================================================== */

/* Default: show overlay. Auth state toggles via html.yrh-has-auth-user.
   Boot-pending gate hides everything except the splash. */
.landing-overlay {
    position: relative;
    z-index: calc(var(--z-modal-base) - 1);
    background: var(--color-bg-primary);
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 100vh;
}

html.yrh-has-auth-user .landing-overlay,
html.yrh-auth-boot-pending .landing-overlay {
    display: none !important;
}

html:not(.yrh-has-auth-user):not(.yrh-auth-boot-pending):not(.yrh-explore-route) body {
    background: var(--color-bg-primary);
}

html:not(.yrh-has-auth-user):not(.yrh-auth-boot-pending):not(.yrh-explore-route) body > :not(#signed-out-landing) {
    display: none !important;
}

html.yrh-explore-route #signed-out-landing {
    display: none !important;
}

[data-yrh-viewer-disabled="true"] {
    opacity: 0.52;
    cursor: not-allowed !important;
}

button[data-yrh-viewer-disabled="true"],
[role="button"][data-yrh-viewer-disabled="true"] {
    pointer-events: none !important;
}

.landing-logo {
    position: absolute;
    top: 0;
    left: 0;
    padding: calc(var(--spacing-xl) + env(safe-area-inset-top, 0px)) var(--spacing-xl);
}

.landing-logo-img {
    height: clamp(40px, 5vw, 56px);
    width: auto;
    display: block;
}

.landing-center {
    min-height: calc(var(--vh, 1vh) * 100);
    width: min(1080px, calc(100vw - 48px));
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    margin: 0 auto;
    padding: calc(env(safe-area-inset-top, 0px) + 28px) 0 calc(env(safe-area-inset-bottom, 0px) + 48px);
    gap: clamp(24px, 4vh, 40px);
    text-align: left;
}

.landing-about-shell {
    display: flex;
    flex-direction: column;
    gap: clamp(24px, 4vh, 40px);
    width: 100%;
}

.landing-about-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.landing-about-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.landing-about-brand-name {
    color: var(--color-text-primary);
    font-size: clamp(1.05rem, 1.3vw, 1.2rem);
    font-weight: var(--font-weight-semibold);
    letter-spacing: var(--letter-spacing-ui);
}

.landing-about-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.landing-about-header-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    font: inherit;
}

.landing-about-header-action:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 3px;
    border-radius: 999px;
}

.landing-auth-topbar {
    display: none;
}

#signed-out-landing.landing-auth-active .landing-auth-topbar {
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 24px);
    right: calc(env(safe-area-inset-right, 0px) + clamp(32px, 4vw, 48px));
    z-index: 2100;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

@media (max-width: 1024px) {
    #signed-out-landing.landing-auth-active .landing-auth-topbar {
        top: calc(env(safe-area-inset-top, 0px) + 16px);
        right: calc(env(safe-area-inset-right, 0px) + 16px);
    }
}

#signed-out-landing.landing-auth-active .landing-about-header {
    display: none;
}

#signed-out-landing.landing-auth-active .signup-back-header {
    display: none !important;
}

.landing-about-main {
    display: flex;
    flex-direction: column;
    gap: clamp(20px, 3.5vh, 32px);
}

.landing-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(20px, 3vw, 30px);
    padding: clamp(24px, 4vw, 40px);
    border: 1px solid var(--color-border-lighter);
    border-radius: 28px;
    background: linear-gradient(180deg, var(--color-bg-primary) 0%, var(--color-bg-secondary) 100%);
}

.landing-hero-content {
    display: grid;
    gap: 18px;
    align-content: start;
}

.landing-hero-title {
    margin: 0;
    max-width: 13ch;
    color: var(--color-text-primary);
    font-size: clamp(40px, 6vw, 68px);
    font-weight: var(--font-weight-bold);
    letter-spacing: var(--letter-spacing-normal);
    line-height: 1.02;
}

.landing-hero-copy {
    margin: 0;
    max-width: 62ch;
    color: var(--color-text-secondary);
    font-size: clamp(1rem, 1.5vw, 1.125rem);
    line-height: 1.6;
}

.landing-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.landing-hero-actions .btn {
    min-height: 52px;
    padding-inline: 18px;
}

.landing-hero-media {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.landing-video-card {
    margin: 0;
    width: min(100%, 230px);
    display: grid;
    gap: 6px;
    padding: 6px;
    border: 1px solid var(--color-border-lightest);
    border-radius: 22px;
    background: var(--color-bg-primary);
    box-shadow: 0 4px 12px rgba(17, 24, 39, 0.05);
}

.landing-video-preview-button {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: 1px solid var(--color-border-lightest);
    border-radius: 16px;
    background: var(--color-bg-secondary);
    cursor: pointer;
    overflow: hidden;
}

.landing-video-preview-button:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 3px;
}

.landing-video-preview-poster {
    display: block;
    width: 100%;
    aspect-ratio: 9 / 16;
    object-fit: cover;
    background: var(--color-bg-secondary);
}

.landing-video-play-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(255, 255, 255, 0.48);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    box-shadow: 0 8px 18px rgba(15, 20, 30, 0.18);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    color: rgba(255, 255, 255, 0.96);
    pointer-events: none;
}

.landing-video-play-icon {
    width: 0;
    height: 0;
    margin-left: 1px;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 12px solid currentColor;
}

.landing-video-modal {
    position: fixed;
    inset: 0;
    z-index: 2200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(16px, 4vw, 28px);
}

.landing-video-modal.is-hidden {
    display: none;
}

.landing-video-modal-backdrop {
    position: absolute;
    inset: 0;
    padding: 0;
    border: 0;
    background: rgba(15, 20, 30, 0.68);
    cursor: pointer;
}

.landing-video-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 396px);
    padding: 9px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 18px;
    background: rgba(15, 20, 30, 0.2);
    box-shadow: 0 14px 34px rgba(10, 14, 20, 0.28);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.landing-video-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 2;
    width: 28px;
    height: 28px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.84);
    font-size: 0.98rem;
    font-weight: 400;
    line-height: 1;
    opacity: 0.18;
    transform: scale(0.96);
    transition: opacity 180ms ease, background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
    cursor: pointer;
}

.landing-video-modal.landing-video-modal-user-active .landing-video-modal-close,
.landing-video-modal-close:focus-visible {
    opacity: 1;
    transform: scale(1);
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(15, 20, 30, 0.3);
    color: rgba(255, 255, 255, 0.98);
}

.landing-video-modal-close:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 3px;
}

.landing-video-modal-video {
    display: block;
    width: 100%;
    aspect-ratio: 9 / 16;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 14px;
    background: #000000;
}

body.landing-video-modal-open {
    overflow: hidden;
}

@media (min-width: 1025px) {
    .landing-hero {
        grid-template-columns: minmax(0, 1fr) minmax(220px, 270px);
        align-items: start;
    }

    .landing-hero-copy {
        max-width: 44ch;
    }

    .landing-video-card {
        width: min(100%, 230px);
    }
}

.landing-about-section {
    display: grid;
    gap: 14px;
    padding: clamp(20px, 3vw, 28px);
    border: 1px solid var(--color-border-lighter);
    border-radius: 24px;
    background: var(--color-bg-primary);
}

.landing-about-section h2 {
    margin: 0;
    color: var(--color-text-primary);
    font-size: clamp(1.2rem, 2.2vw, 1.45rem);
    font-weight: var(--font-weight-semibold);
}

.landing-about-section p {
    margin: 0;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

.landing-how-it-works-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 14px;
}

.landing-how-it-works-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 14px;
    align-items: flex-start;
    padding: 18px;
    border: 1px solid var(--color-border-lighter);
    border-radius: 18px;
    background: var(--color-bg-secondary);
}

.landing-how-it-works-step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--color-border-light);
    border-radius: 999px;
    background: var(--color-bg-primary);
    color: var(--color-text-primary);
    font-weight: var(--font-weight-semibold);
}

.landing-how-it-works-copy h3 {
    margin: 0 0 6px;
    color: var(--color-text-primary);
    font-size: 1rem;
    font-weight: var(--font-weight-semibold);
}

.landing-auth-shell {
    width: 100%;
    max-width: var(--yrh-auth-panel-max-width, 550px);
    margin: 0 auto;
}

/* iPhone auth: render the signed-out flow as a calm full-screen page instead of a card. */
#signed-out-landing.landing-auth-iphone-screen {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
}

body.yrh-keyboard-active #signed-out-landing.landing-auth-iphone-screen {
    padding-bottom: calc(var(--yrh-keyboard-height, 0px) + env(safe-area-inset-bottom, 0px));
}

#signed-out-landing.landing-auth-iphone-screen .landing-logo,
#signed-out-landing.landing-auth-iphone-screen .landing-tagline {
    display: none;
}

#signed-out-landing.landing-auth-iphone-screen .landing-center {
    min-height: 100vh;
    padding: 0;
    gap: 0;
    align-items: stretch;
    justify-content: flex-start;
    text-align: left;
}

#signed-out-landing.landing-auth-iphone-screen #authModal {
    max-width: none;
}

#signed-out-landing.landing-auth-iphone-screen #authModal .modal-content {
    margin-top: 0;
    max-height: none;
    min-height: 100vh;
    border-radius: 0;
    border: none;
    box-shadow: none;
    background: var(--color-bg-primary);
    overflow: visible;
}

/* Narrow iPhone auth repair: keep the existing shell geometry and give only
   the inner form body keyboard-time scrolling/clearance. */
#signed-out-landing.landing-auth-iphone-keyboard #authModal .c-modal-body[data-auth-scroll-owner] {
    min-height: 0;
}

body.yrh-keyboard-active #signed-out-landing.landing-auth-iphone-keyboard #authModal .c-modal-body[data-auth-scroll-owner] {
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    padding-bottom: calc(var(--yrh-keyboard-height, 0px) + env(safe-area-inset-bottom, 0px) + 24px);
    scroll-padding-bottom: calc(var(--yrh-keyboard-height, 0px) + env(safe-area-inset-bottom, 0px) + 24px);
    scrollbar-width: none;
    -ms-overflow-style: none;
}

body.yrh-keyboard-active #signed-out-landing.landing-auth-iphone-keyboard #authModal .c-modal-body[data-auth-scroll-owner]::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

body.yrh-keyboard-active #signed-out-landing.landing-auth-iphone-keyboard #authModal .c-modal-footer,
body.yrh-keyboard-active #signed-out-landing.landing-auth-iphone-keyboard #authModal .c-modal-footer-meta {
    flex: 0 0 auto;
}

#signed-out-landing.landing-auth-iphone-screen #authModal .c-modal-header {
    padding: calc(22px + env(safe-area-inset-top, 0px)) 20px 12px;
    border-bottom: none;
    background: transparent;
}

#signed-out-landing.landing-auth-iphone-screen #authModal .c-auth-brand {
    display: flex;
}

#signed-out-landing.landing-auth-iphone-screen #authModal .c-auth-brand-logo {
    height: 46px;
}

#signed-out-landing.landing-auth-iphone-screen #authModal .c-auth-brand-tagline {
    font-size: 0.98rem;
}

#signed-out-landing.landing-auth-iphone-screen #authModal .c-modal-title {
    font-size: clamp(1.9rem, 6vw, 2.35rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.05;
}

#signed-out-landing.landing-auth-iphone-screen #authModal .c-modal-body {
    flex: 0 0 auto;
    min-height: auto;
    overflow: visible;
    padding: 0 20px 14px;
}

#signed-out-landing.landing-auth-iphone-screen #authModal .form-group {
    margin-bottom: 18px;
}

#signed-out-landing.landing-auth-iphone-screen #authModal .form-group label:not(.c-auth-radio-label):not(.c-auth-checkbox-label) {
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text-secondary);
}

#signed-out-landing.landing-auth-iphone-screen #authModal .form-group input:not([type="radio"]):not([type="checkbox"]),
#signed-out-landing.landing-auth-iphone-screen #authModal .form-group select,
#signed-out-landing.landing-auth-iphone-screen #authModal #signup-birthdate .edc-select,
#signed-out-landing.landing-auth-iphone-screen #authModal #signup-birthdate .edc-input {
    min-height: 52px;
    padding: 14px 16px;
    border: 1px solid var(--color-border-light);
    border-radius: 14px;
    background: var(--color-bg-secondary);
    font-size: 1rem;
}

#signed-out-landing.landing-auth-iphone-screen #authModal #forgot-password-section {
    margin: -2px 0 8px;
}

#signed-out-landing.landing-auth-iphone-screen #authModal #forgot-password-section .c-link-primary {
    color: var(--color-text-secondary);
    font-size: 0.95rem;
}

#signed-out-landing.landing-auth-iphone-screen #authModal #auth-error-inline {
    min-height: 0;
    margin: 0 0 12px;
    line-height: 1.4;
}

#signed-out-landing.landing-auth-iphone-screen #authModal #auth-error {
    margin: 8px 0 0;
    min-height: 0;
    line-height: 1.45;
}

#signed-out-landing.landing-auth-iphone-screen #authModal #signup-birthdate {
    padding: 16px;
    border: 1px solid var(--color-border-light);
    border-radius: 18px;
    background: var(--color-bg-secondary);
}

#signed-out-landing.landing-auth-iphone-screen #authModal #signup-birthdate .edc-date-inputs {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.85fr) minmax(0, 1fr);
    gap: 10px;
    align-items: stretch;
}

#signed-out-landing.landing-auth-iphone-screen #authModal #signup-birthdate .edc-select,
#signed-out-landing.landing-auth-iphone-screen #authModal #signup-birthdate .edc-input {
    width: 100%;
    min-width: 0;
    background: var(--color-bg-primary);
}

#signed-out-landing.landing-auth-iphone-screen #authModal #signup-legal-consent .c-legal-agreement-box {
    margin: 0;
    padding: 16px;
    border-width: 1px;
    border-radius: 18px;
}

#signed-out-landing.landing-auth-iphone-screen #authModal .c-auth-helper-with-margin {
    margin-top: 10px;
    line-height: 1.45;
}

#signed-out-landing.landing-auth-iphone-screen #authModal .c-modal-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 0 20px calc(36px + env(safe-area-inset-bottom, 0px));
    border-top: none;
    background: transparent;
}

#signed-out-landing.landing-auth-iphone-screen #authModal .c-modal-footer-meta {
    order: 2;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-align: center;
}

#signed-out-landing.landing-auth-iphone-screen #authModal .c-modal-footer-actions {
    order: 1;
    width: 100%;
}

#signed-out-landing.landing-auth-iphone-screen #authModal .c-modal-footer-actions > div {
    width: 100%;
}

#signed-out-landing.landing-auth-iphone-screen #authModal .c-modal-footer-actions .btn {
    width: 100%;
    min-height: 54px;
    border-radius: 16px;
    font-size: 1rem;
    font-weight: 600;
}

#signed-out-landing.landing-auth-iphone-screen #authModal #auth-toggle-link {
    display: inline-block;
    padding: 8px 12px;
    color: var(--color-text-secondary);
    font-size: 0.95rem;
}

#signed-out-landing.landing-auth-iphone-screen #authModal #forgot-password-section {
    margin: 18px 0 0;
    justify-content: center;
}

#signed-out-landing.landing-auth-iphone-screen #authModal[data-auth-mode="login"] .c-modal-header {
    padding-bottom: 8px;
}

#signed-out-landing.landing-auth-iphone-screen #authModal[data-auth-mode="login"] .c-modal-body {
    padding-bottom: 6px;
}

#signed-out-landing.landing-auth-iphone-screen #authModal[data-auth-mode="login"] .form-group {
    margin-bottom: 14px;
}

#signed-out-landing.landing-auth-iphone-screen #authModal[data-auth-mode="login"] .c-modal-footer {
    flex: 1 1 auto;
    min-height: 0;
    gap: 8px;
    padding-bottom: calc(36px + env(safe-area-inset-bottom, 0px));
}

#signed-out-landing.landing-auth-iphone-screen #authModal[data-auth-mode="login"] .c-modal-footer-meta {
    flex: 1 1 auto;
    min-height: 0;
}

#signed-out-landing.landing-auth-iphone-screen #authModal[data-auth-mode="login"] #forgot-password-section {
    order: 1;
    margin-top: 18px;
}

#signed-out-landing.landing-auth-iphone-screen #authModal[data-auth-mode="login"] #auth-toggle-link {
    order: 2;
    margin-top: auto;
    padding-top: 12px;
}

@media (max-width: 360px) {
    #signed-out-landing.landing-auth-iphone-screen #authModal .c-modal-header,
    #signed-out-landing.landing-auth-iphone-screen #authModal .c-modal-body,
    #signed-out-landing.landing-auth-iphone-screen #authModal .c-modal-footer {
        padding-left: 16px;
        padding-right: 16px;
    }

    #signed-out-landing.landing-auth-iphone-screen #authModal #signup-birthdate .edc-date-inputs {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Signed-out auth is a view (inline section), not a modal overlay */
#signed-out-landing #authModal {
    width: 100%;
    max-width: var(--yrh-auth-panel-max-width, 550px);
}

#signed-out-landing #authModal:not(.show) {
    display: none;
}

#signed-out-landing #authModal.show {
    display: block;
}

#signed-out-landing #authModal .modal-content {
    width: 100%;
    margin-top: var(--spacing-xl);
    /* Strip card/modal chrome on the landing page */
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    max-height: none;
    overflow: visible;
}

#signed-out-landing #authModal .c-modal-header {
    border-bottom: none;
    padding-left: 0;
    padding-right: 0;
}

#signed-out-landing #authModal .c-modal-body {
    padding-left: 0;
    padding-right: 0;
}

html.yrh-tier-tablet #signed-out-landing .landing-center {
    max-width: min(920px, calc(100vw - 72px));
    margin: 0 auto;
    padding: clamp(112px, 14vh, 168px) clamp(32px, 6vw, 64px) clamp(48px, 8vh, 80px);
    gap: clamp(24px, 4vh, 40px);
    align-items: stretch;
}

html.yrh-tier-tablet #signed-out-landing .landing-tagline {
    align-self: center;
    max-width: 12ch;
    font-size: clamp(40px, 6vw, 64px);
}

html.yrh-tier-tablet #signed-out-landing #authModal {
    max-width: min(550px, calc(100vw - 72px));
}

html.yrh-tier-tablet #signed-out-landing #authModal .modal-content {
    display: flex;
    flex-direction: column;
    margin-top: 0;
    background: var(--panel-surface, var(--color-bg-primary));
    border: 1px solid var(--panel-border-subtle, var(--color-border-light));
    border-radius: clamp(24px, 3vw, 30px);
    box-shadow: var(--panel-shadow, var(--shadow-xl));
    max-height: var(--yrh-primary-modal-height, min(820px, calc(100dvh - 72px)));
    overflow: hidden;
}

html.yrh-tier-tablet #signed-out-landing #authModal .c-modal-header {
    padding: clamp(28px, 4vw, 36px) var(--yrh-shell-inline-gutter, 32px) 18px;
    border-bottom: 1px solid var(--panel-border-subtle, var(--color-border-light));
    background: var(--panel-surface, var(--color-bg-primary));
}

html.yrh-tier-tablet #signed-out-landing #authModal .c-modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 0 var(--yrh-shell-inline-gutter, 32px) 24px;
    scrollbar-gutter: stable;
}

html.yrh-tier-tablet #signed-out-landing #authModal .c-modal-footer {
    border-top: 1px solid var(--panel-border-subtle, var(--color-border-light));
    background: var(--panel-surface, var(--color-bg-primary));
    padding: 0 var(--yrh-shell-inline-gutter, 32px) var(--yrh-shell-inline-gutter, 32px);
}

html.yrh-tier-tablet body.yrh-keyboard-active #signed-out-landing #authModal .c-modal-body {
    padding-bottom: calc(var(--yrh-keyboard-height, 0px) + env(safe-area-inset-bottom, 0px) + 24px);
    scroll-padding-bottom: calc(var(--yrh-keyboard-height, 0px) + env(safe-area-inset-bottom, 0px) + 24px);
}

html.yrh-tier-tablet #signed-out-landing #authModal .form-group input:not([type="radio"]):not([type="checkbox"]),
html.yrh-tier-tablet #signed-out-landing #authModal .form-group select,
html.yrh-tier-tablet #signed-out-landing #authModal #signup-birthdate .edc-select,
html.yrh-tier-tablet #signed-out-landing #authModal #signup-birthdate .edc-input {
    font-size: 16px;
}

html.yrh-shell-tablet[data-layout-input="touch"] #signed-out-landing #authModal .c-modal-footer-shell {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
}

html.yrh-shell-tablet[data-layout-input="touch"] #signed-out-landing #authModal .c-modal-footer-actions {
    order: 1;
    width: 100%;
    justify-content: stretch;
}

html.yrh-shell-tablet[data-layout-input="touch"] #signed-out-landing #authModal .c-modal-footer-actions > div {
    width: 100%;
}

html.yrh-shell-tablet[data-layout-input="touch"] #signed-out-landing #authModal .c-modal-footer-actions .btn {
    width: 100%;
    min-height: 54px;
    border-radius: 16px;
}

html.yrh-shell-tablet[data-layout-input="touch"] #signed-out-landing #authModal .c-modal-footer-actions .btn.btn-primary {
    text-decoration: none;
    -webkit-appearance: none;
    appearance: none;
}

html.yrh-shell-tablet[data-layout-input="touch"] #signed-out-landing #authModal .c-modal-footer-meta {
    order: 2;
    width: 100%;
    align-items: center;
    gap: 6px;
    text-align: center;
}

html.yrh-shell-tablet[data-layout-input="touch"] #signed-out-landing #authModal .c-modal-footer-meta a {
    color: var(--color-text-secondary);
    font-size: 0.95rem;
}

html.yrh-shell-tablet[data-layout-input="touch"] #signed-out-landing #authModal #auth-toggle-link {
    order: 2;
    margin-top: 0;
    padding: 0;
}

html.yrh-shell-tablet[data-layout-input="touch"] #signed-out-landing #authModal #forgot-password-section {
    order: 1;
    width: 100%;
    margin-top: 0;
    justify-content: center;
}

html.yrh-shell-desktop[data-layout-input="touch"]:not(.yrh-shell-tablet) #signed-out-landing .landing-center {
    max-width: min(1080px, calc(100vw - 96px));
    margin: 0 auto;
    padding: clamp(84px, 11vh, 132px) clamp(28px, 5vw, 56px) clamp(40px, 6vh, 64px);
    gap: clamp(28px, 4vh, 40px);
    align-items: stretch;
}

html.yrh-shell-desktop[data-layout-input="touch"]:not(.yrh-shell-tablet) #signed-out-landing .landing-tagline {
    align-self: center;
    max-width: 13ch;
    font-size: clamp(42px, 5.2vw, 60px);
}

html.yrh-shell-desktop[data-layout-input="touch"]:not(.yrh-shell-tablet) #signed-out-landing #authModal {
    max-width: var(--yrh-auth-panel-max-width, min(860px, calc(100vw - 96px)));
}

html.yrh-shell-desktop[data-layout-input="touch"]:not(.yrh-shell-tablet) #signed-out-landing #authModal .modal-content {
    min-height: clamp(560px, 68vh, 720px);
    border-radius: clamp(24px, 3vw, 32px);
}

html.yrh-shell-desktop[data-layout-input="touch"]:not(.yrh-shell-tablet) #signed-out-landing #authModal .c-modal-header {
    padding: clamp(30px, 4vw, 40px) var(--yrh-shell-inline-gutter, 32px) 20px;
}

html.yrh-shell-desktop[data-layout-input="touch"]:not(.yrh-shell-tablet) #signed-out-landing #authModal .c-modal-body {
    padding: 0 var(--yrh-shell-inline-gutter, 32px) 28px;
}

html.yrh-shell-desktop[data-layout-input="touch"]:not(.yrh-shell-tablet) #signed-out-landing #authModal .c-modal-footer {
    padding: 0 var(--yrh-shell-inline-gutter, 32px) clamp(24px, 3vw, 32px);
}

html.yrh-shell-desktop[data-layout-input="touch"]:not(.yrh-shell-tablet) #signed-out-landing #authModal[data-auth-mode="forgot-password"] .c-auth-dedicated-card {
    padding: 28px;
    border-radius: 26px;
}

html.yrh-tier-desktop[data-layout-input="pointer"] #signed-out-landing[data-auth-mode="login"] .landing-logo,
html.yrh-tier-desktop[data-layout-input="pointer"] #signed-out-landing[data-auth-mode="signup"] .landing-logo,
html.yrh-tier-desktop[data-layout-input="pointer"] #signed-out-landing[data-auth-mode="login"] .landing-tagline,
html.yrh-tier-desktop[data-layout-input="pointer"] #signed-out-landing[data-auth-mode="signup"] .landing-tagline {
    display: none;
}

html.yrh-tier-desktop[data-layout-input="pointer"] #signed-out-landing[data-auth-mode="login"] .landing-center,
html.yrh-tier-desktop[data-layout-input="pointer"] #signed-out-landing[data-auth-mode="signup"] .landing-center {
    max-width: min(640px, calc(100vw - 80px));
    margin: 0 auto;
    padding: 32px 40px 36px;
    gap: 0;
    justify-content: center;
}

html.yrh-tier-desktop[data-layout-input="pointer"] #signed-out-landing[data-auth-mode="login"] #authModal,
html.yrh-tier-desktop[data-layout-input="pointer"] #signed-out-landing[data-auth-mode="signup"] #authModal {
    max-width: 560px;
}

html.yrh-tier-desktop[data-layout-input="pointer"] #signed-out-landing[data-auth-mode="login"] #authModal .modal-content,
html.yrh-tier-desktop[data-layout-input="pointer"] #signed-out-landing[data-auth-mode="signup"] #authModal .modal-content {
    margin-top: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

html.yrh-tier-desktop[data-layout-input="pointer"] #signed-out-landing[data-auth-mode="login"] #authModal .c-modal-header,
html.yrh-tier-desktop[data-layout-input="pointer"] #signed-out-landing[data-auth-mode="signup"] #authModal .c-modal-header {
    display: flex;
    justify-content: center;
    padding: 0 0 22px;
}

html.yrh-tier-desktop[data-layout-input="pointer"] #signed-out-landing[data-auth-mode="login"] #authModal .c-auth-brand,
html.yrh-tier-desktop[data-layout-input="pointer"] #signed-out-landing[data-auth-mode="signup"] #authModal .c-auth-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    text-align: center;
}

html.yrh-tier-desktop[data-layout-input="pointer"] #signed-out-landing[data-auth-mode="login"] #authModal .c-auth-brand-logo,
html.yrh-tier-desktop[data-layout-input="pointer"] #signed-out-landing[data-auth-mode="signup"] #authModal .c-auth-brand-logo {
    height: 88px;
}

html.yrh-tier-desktop[data-layout-input="pointer"] #signed-out-landing[data-auth-mode="login"] #authModal .c-auth-brand-copy,
html.yrh-tier-desktop[data-layout-input="pointer"] #signed-out-landing[data-auth-mode="signup"] #authModal .c-auth-brand-copy {
    align-items: center;
    gap: 0;
}

html.yrh-tier-desktop[data-layout-input="pointer"] #signed-out-landing[data-auth-mode="login"] #authModal .c-auth-brand-name,
html.yrh-tier-desktop[data-layout-input="pointer"] #signed-out-landing[data-auth-mode="signup"] #authModal .c-auth-brand-name {
    display: none;
}

html.yrh-tier-desktop[data-layout-input="pointer"] #signed-out-landing[data-auth-mode="login"] #authModal .c-auth-brand-tagline,
html.yrh-tier-desktop[data-layout-input="pointer"] #signed-out-landing[data-auth-mode="signup"] #authModal .c-auth-brand-tagline {
    max-width: 18ch;
    color: var(--color-text-secondary);
    font-size: 17px;
    line-height: 1.35;
}

html.yrh-tier-desktop[data-layout-input="pointer"] #signed-out-landing[data-auth-mode="login"] #authModal .c-modal-body,
html.yrh-tier-desktop[data-layout-input="pointer"] #signed-out-landing[data-auth-mode="signup"] #authModal .c-modal-body {
    flex: 0 0 auto;
    min-height: auto;
    overflow: visible;
    padding: 0 0 18px;
}

html.yrh-tier-desktop[data-layout-input="pointer"] #signed-out-landing[data-auth-mode="login"] #authModal #auth-primary-panel,
html.yrh-tier-desktop[data-layout-input="pointer"] #signed-out-landing[data-auth-mode="signup"] #authModal #auth-primary-panel {
    padding: 18px;
    border: 1px solid var(--color-border-light);
    border-radius: 24px;
    background: var(--color-bg-primary);
}

html.yrh-tier-desktop[data-layout-input="pointer"] #signed-out-landing[data-auth-mode="login"] #authModal .form-group,
html.yrh-tier-desktop[data-layout-input="pointer"] #signed-out-landing[data-auth-mode="signup"] #authModal .form-group {
    margin-bottom: 12px;
}

html.yrh-tier-desktop[data-layout-input="pointer"] #signed-out-landing[data-auth-mode="login"] #authModal .form-group input:not([type="radio"]):not([type="checkbox"]),
html.yrh-tier-desktop[data-layout-input="pointer"] #signed-out-landing[data-auth-mode="signup"] #authModal .form-group input:not([type="radio"]):not([type="checkbox"]),
html.yrh-tier-desktop[data-layout-input="pointer"] #signed-out-landing[data-auth-mode="login"] #authModal .form-group select,
html.yrh-tier-desktop[data-layout-input="pointer"] #signed-out-landing[data-auth-mode="signup"] #authModal .form-group select,
html.yrh-tier-desktop[data-layout-input="pointer"] #signed-out-landing[data-auth-mode="login"] #authModal #signup-birthdate .edc-select,
html.yrh-tier-desktop[data-layout-input="pointer"] #signed-out-landing[data-auth-mode="signup"] #authModal #signup-birthdate .edc-select,
html.yrh-tier-desktop[data-layout-input="pointer"] #signed-out-landing[data-auth-mode="login"] #authModal #signup-birthdate .edc-input,
html.yrh-tier-desktop[data-layout-input="pointer"] #signed-out-landing[data-auth-mode="signup"] #authModal #signup-birthdate .edc-input {
    min-height: 56px;
    padding: 0 16px;
    border: 1px solid var(--color-border-light);
    border-radius: 16px;
    background: var(--color-bg-secondary);
    font-size: 17px;
}

html.yrh-tier-desktop[data-layout-input="pointer"] #signed-out-landing[data-auth-mode="login"] #authModal #auth-error-inline,
html.yrh-tier-desktop[data-layout-input="pointer"] #signed-out-landing[data-auth-mode="signup"] #authModal #auth-error-inline {
    min-height: 0;
    margin: 0 0 12px;
    line-height: 1.4;
}

html.yrh-tier-desktop[data-layout-input="pointer"] #signed-out-landing[data-auth-mode="login"] #authModal .c-auth-password-group {
    margin-bottom: 0;
}

html.yrh-tier-desktop[data-layout-input="pointer"] #signed-out-landing[data-auth-mode="login"] #authModal #auth-error-inline:empty,
html.yrh-tier-desktop[data-layout-input="pointer"] #signed-out-landing[data-auth-mode="login"] #authModal #auth-error:empty {
    display: none;
}

html.yrh-tier-desktop[data-layout-input="pointer"] #signed-out-landing[data-auth-mode="login"] #authModal .c-modal-footer,
html.yrh-tier-desktop[data-layout-input="pointer"] #signed-out-landing[data-auth-mode="signup"] #authModal .c-modal-footer {
    padding: 0;
}

html.yrh-tier-desktop[data-layout-input="pointer"] #signed-out-landing[data-auth-mode="login"] #authModal .c-modal-footer-shell,
html.yrh-tier-desktop[data-layout-input="pointer"] #signed-out-landing[data-auth-mode="signup"] #authModal .c-modal-footer-shell {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
}

html.yrh-tier-desktop[data-layout-input="pointer"] #signed-out-landing[data-auth-mode="login"] #authModal .c-modal-footer-shell {
    gap: 18px;
}

html.yrh-tier-desktop[data-layout-input="pointer"] #signed-out-landing[data-auth-mode="signup"] #authModal .c-modal-footer {
    padding-bottom: 16px;
}

html.yrh-tier-desktop[data-layout-input="pointer"] #signed-out-landing[data-auth-mode="signup"] #authModal .c-modal-footer-shell {
    gap: 18px;
}

html.yrh-tier-desktop[data-layout-input="pointer"] #signed-out-landing[data-auth-mode="login"] #authModal .c-modal-footer-actions,
html.yrh-tier-desktop[data-layout-input="pointer"] #signed-out-landing[data-auth-mode="signup"] #authModal .c-modal-footer-actions {
    order: 1;
    width: 100%;
    justify-content: stretch;
}

html.yrh-tier-desktop[data-layout-input="pointer"] #signed-out-landing[data-auth-mode="login"] #authModal .c-modal-footer-actions > div,
html.yrh-tier-desktop[data-layout-input="pointer"] #signed-out-landing[data-auth-mode="signup"] #authModal .c-modal-footer-actions > div {
    width: 100%;
}

html.yrh-tier-desktop[data-layout-input="pointer"] #signed-out-landing[data-auth-mode="login"] #authModal .c-modal-footer-actions .btn,
html.yrh-tier-desktop[data-layout-input="pointer"] #signed-out-landing[data-auth-mode="signup"] #authModal .c-modal-footer-actions .btn {
    width: 100%;
    min-height: 56px;
    border-radius: 18px;
}

html.yrh-tier-desktop[data-layout-input="pointer"] #signed-out-landing[data-auth-mode="login"] #authModal .c-modal-footer-meta,
html.yrh-tier-desktop[data-layout-input="pointer"] #signed-out-landing[data-auth-mode="signup"] #authModal .c-modal-footer-meta {
    order: 2;
    width: 100%;
    align-items: center;
    gap: 8px;
    text-align: center;
}

html.yrh-tier-desktop[data-layout-input="pointer"] #signed-out-landing[data-auth-mode="login"] #authModal .c-modal-footer-meta {
    padding-top: 12px;
    gap: 10px;
}

html.yrh-tier-desktop[data-layout-input="pointer"] #signed-out-landing[data-auth-mode="signup"] #authModal .c-modal-footer-meta {
    padding-top: 6px;
}

html.yrh-tier-desktop[data-layout-input="pointer"] #signed-out-landing[data-auth-mode="login"] #authModal .c-modal-footer-meta a,
html.yrh-tier-desktop[data-layout-input="pointer"] #signed-out-landing[data-auth-mode="signup"] #authModal .c-modal-footer-meta a {
    color: var(--color-text-secondary);
    font-size: 0.95rem;
}

html.yrh-tier-desktop[data-layout-input="pointer"] #signed-out-landing[data-auth-mode="login"] #authModal #forgot-password-section,
html.yrh-tier-desktop[data-layout-input="pointer"] #signed-out-landing[data-auth-mode="signup"] #authModal #forgot-password-section {
    order: 1;
    width: 100%;
    justify-content: center;
    margin: 0;
}

html.yrh-tier-desktop[data-layout-input="pointer"] #signed-out-landing[data-auth-mode="login"] #authModal #auth-toggle-link,
html.yrh-tier-desktop[data-layout-input="pointer"] #signed-out-landing[data-auth-mode="signup"] #authModal #auth-toggle-link {
    order: 2;
    margin-top: 0;
    padding: 0;
}

html.yrh-tier-desktop[data-layout-input="pointer"] #signed-out-landing[data-auth-mode="login"] #authModal #auth-toggle-link {
    margin-top: 16px;
}

html.yrh-tier-desktop[data-layout-input="pointer"] #signed-out-landing[data-auth-mode="forgot-password"] .landing-logo,
html.yrh-tier-desktop[data-layout-input="pointer"] #signed-out-landing[data-auth-mode="forgot-password"] .landing-tagline {
    display: none;
}

html.yrh-tier-desktop[data-layout-input="pointer"] #signed-out-landing[data-auth-mode="forgot-password"] .landing-center {
    max-width: min(640px, calc(100vw - 80px));
    margin: 0 auto;
    padding: 32px 40px 36px;
    gap: 0;
    justify-content: center;
}

html.yrh-tier-desktop[data-layout-input="pointer"] #signed-out-landing[data-auth-mode="forgot-password"] #authModal {
    max-width: 560px;
}

html.yrh-tier-desktop[data-layout-input="pointer"] #signed-out-landing[data-auth-mode="forgot-password"] #authModal .modal-content {
    margin-top: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

html.yrh-tier-desktop[data-layout-input="pointer"] #signed-out-landing[data-auth-mode="forgot-password"] #authModal .c-modal-body {
    flex: 0 0 auto;
    min-height: auto;
    overflow: visible;
    padding: 0 0 18px;
}

html.yrh-tier-desktop[data-layout-input="pointer"] #signed-out-landing[data-auth-mode="forgot-password"] #authModal .c-modal-footer {
    padding-top: 6px;
}

html.yrh-tier-desktop[data-layout-input="pointer"] #signed-out-landing[data-auth-mode="forgot-password"] #authModal .c-modal-footer-shell {
    gap: 18px;
}

html.yrh-tier-desktop[data-layout-input="pointer"] #signed-out-landing[data-auth-mode="forgot-password"] #authModal .c-modal-footer-meta {
    padding-top: 2px;
}

html.yrh-tier-desktop[data-layout-input="pointer"] #signed-out-landing[data-auth-mode="forgot-password"] #authModal .c-auth-dedicated-card {
    padding: 18px;
    border-radius: 24px;
}

html.yrh-tier-desktop[data-layout-input="pointer"] #signed-out-landing[data-auth-mode="forgot-password"] #authModal .c-auth-dedicated-field input:not([type="radio"]):not([type="checkbox"]) {
    min-height: 56px;
    padding: 0 16px;
    border: 1px solid var(--color-border-light);
    border-radius: 16px;
    background: var(--color-bg-secondary);
    font-size: 17px;
}

#signed-out-landing #authModal .c-modal-footer {
    border-top: none;
    background: transparent;
    padding-left: 0;
    padding-right: 0;
}

#signed-out-landing #authModal .c-modal-footer-shell {
    width: 100%;
}

#signed-out-landing[data-auth-mode="forgot-password"] .landing-logo,
#signed-out-landing[data-auth-mode="forgot-password"] .landing-tagline {
    display: none;
}

#signed-out-landing #authModal[data-auth-mode="forgot-password"] .c-modal-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    padding-bottom: 22px;
}

#signed-out-landing #authModal[data-auth-mode="forgot-password"] .c-auth-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    text-align: center;
}

#signed-out-landing #authModal[data-auth-mode="forgot-password"] .c-auth-brand-logo {
    height: 88px;
}

#signed-out-landing #authModal[data-auth-mode="forgot-password"] .c-auth-brand-copy {
    display: none;
}

#signed-out-landing #authModal[data-auth-mode="forgot-password"] .c-auth-title-stack {
    display: flex;
    align-items: center;
    text-align: center;
    max-width: 32ch;
}

#signed-out-landing #authModal[data-auth-mode="forgot-password"] .c-modal-title,
#signed-out-landing #authModal[data-auth-mode="forgot-password"] .c-auth-subtitle {
    text-align: center;
}

#signed-out-landing #authModal[data-auth-mode="forgot-password"] .c-auth-subtitle {
    max-width: 32ch;
}

#signed-out-landing #authModal[data-auth-mode="forgot-password"] .c-modal-body {
    padding-top: 0;
}

#signed-out-landing #authModal[data-auth-mode="forgot-password"] .c-modal-footer {
    padding-top: 10px;
}

#signed-out-landing #authModal[data-auth-mode="forgot-password"] .c-modal-footer-shell {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
}

#signed-out-landing #authModal[data-auth-mode="forgot-password"] .c-modal-footer-actions {
    order: 1;
    width: 100%;
    justify-content: stretch;
}

#signed-out-landing #authModal[data-auth-mode="forgot-password"] .c-modal-footer-actions > div {
    width: 100%;
}

#signed-out-landing #authModal[data-auth-mode="forgot-password"] .c-modal-footer-actions .btn {
    width: 100%;
    min-height: 56px;
    border-radius: 18px;
}

#signed-out-landing #authModal[data-auth-mode="forgot-password"] .c-modal-footer-meta {
    order: 2;
    width: 100%;
    align-items: center;
    gap: 8px;
    text-align: center;
}

#signed-out-landing #authModal[data-auth-mode="forgot-password"] .c-modal-footer-meta a {
    font-size: 0.95rem;
}

#signed-out-landing #authModal[data-auth-mode="forgot-password"] .c-auth-dedicated-panel {
    gap: 14px;
}

#signed-out-landing #authModal[data-auth-mode="forgot-password"] #forgot-password-form-panel {
    gap: 12px;
}

.landing-tagline {
    margin: 0;
    color: var(--color-text-primary);
    font-weight: var(--font-weight-bold);
    letter-spacing: var(--letter-spacing-normal);
    line-height: 1.05;
    font-size: clamp(34px, 5vw, 56px);
}

.landing-tagline span {
    display: block;
}

@media (max-width: 767px) {
    #signed-out-landing {
        position: relative;
        inset: auto;
        overflow: visible;
        min-height: 100vh;
    }

    #signed-out-landing .landing-center {
        width: 100%;
        min-height: 0;
        padding: calc(env(safe-area-inset-top, 0px) + 16px) 20px calc(env(safe-area-inset-bottom, 0px) + 32px);
        gap: 20px;
    }

    #signed-out-landing .landing-about-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    #signed-out-landing .landing-about-brand {
        justify-content: flex-start;
    }

    #signed-out-landing .landing-about-actions {
        width: 100%;
        justify-content: flex-start;
    }

    #signed-out-landing .landing-hero-title {
        max-width: none;
        font-size: clamp(30px, 9vw, 42px);
    }

    #signed-out-landing .landing-hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    #signed-out-landing .landing-hero-actions .btn {
        width: 100%;
    }

    #signed-out-landing .landing-video-card {
        width: min(100%, 216px);
    }

    #signed-out-landing .landing-video-modal-dialog {
        width: min(100%, 350px);
    }

    #signed-out-landing .landing-video-modal-close {
        top: 16px;
        right: 16px;
    }

    #signed-out-landing #authModal {
        max-width: none;
        display: flex;
        flex: 1 1 auto;
        width: 100%;
        min-height: 0;
    }

    #signed-out-landing #authModal.show {
        display: flex;
    }

    #signed-out-landing #authModal .modal-content {
        margin-top: 2px;
        display: flex;
        flex: 1 1 auto;
        min-height: 0;
    }

    #signed-out-landing #authModal .c-modal-header {
        display: none;
    }

    #signed-out-landing #authModal .c-modal-body {
        flex: 0 0 auto;
        padding-bottom: 0;
        overflow: visible;
    }

    #signed-out-landing #authModal .c-modal-body .form-group {
        margin-bottom: 12px;
    }

    #signed-out-landing #authModal .c-modal-footer {
        flex: 0 0 auto;
        min-height: auto;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 8px;
        padding-top: 0;
        padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
        margin-top: 0;
    }

    #signed-out-landing #authModal .c-modal-footer-shell {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    #signed-out-landing #authModal .c-modal-footer-actions {
        order: 1;
        width: 100%;
        justify-content: stretch;
    }

    #signed-out-landing #authModal .c-modal-footer-actions > div {
        width: 100%;
    }

    #signed-out-landing #authModal .c-modal-footer-actions .btn {
        width: 100%;
        min-height: 54px;
        border-radius: 16px;
    }

    #signed-out-landing #authModal .c-modal-footer-meta {
        order: 2;
        flex: 0 0 auto;
        min-height: auto;
        display: flex;
        flex-direction: column;
        width: 100%;
        align-items: center;
        gap: 6px;
        text-align: center;
    }

    #signed-out-landing #authModal #auth-toggle-link {
        order: 2;
        margin-top: 0;
        padding: 0;
        font-size: 0.95rem;
    }

    #signed-out-landing #authModal #forgot-password-section {
        order: 1;
        margin-top: 0;
        justify-content: center;
        width: 100%;
    }

    #signed-out-landing #authModal[data-auth-mode="forgot-password"] .c-modal-header {
        display: flex;
        padding: 0 20px 18px;
    }

    #signed-out-landing #authModal[data-auth-mode="forgot-password"] .c-modal-body {
        padding-bottom: 8px;
    }

    #signed-out-landing #authModal[data-auth-mode="forgot-password"] .c-auth-dedicated-card {
        padding: 20px;
        border-radius: 20px;
    }

    #signed-out-landing #authModal[data-auth-mode="forgot-password"] .c-auth-dedicated-copy,
    #signed-out-landing #authModal[data-auth-mode="forgot-password"] .c-auth-dedicated-note,
    #signed-out-landing #authModal[data-auth-mode="forgot-password"] .c-auth-dedicated-status {
        font-size: 0.95rem;
    }

    /* --- Signup-mode overrides (do NOT affect login) --- */

    /* Back header — hidden on login, shown on signup */
    #signed-out-landing .signup-back-header {
        display: none;
    }

    #signed-out-landing[data-signup-active] .signup-back-header,
    #signed-out-landing[data-auth-mode="forgot-password"] .signup-back-header {
        display: flex;
        align-items: center;
        padding: calc(env(safe-area-inset-top, 0px) + 8px) 4px 0;
        min-height: 44px;
        flex-shrink: 0;
    }

    #signed-out-landing[data-signup-active] .signup-back-header .iphone-back-btn,
    #signed-out-landing[data-auth-mode="forgot-password"] .signup-back-header .iphone-back-btn {
        display: flex;
        align-items: center;
        background: none;
        border: none;
        cursor: pointer;
        padding: 10px 14px;
        margin: 0;
        color: var(--color-text-tertiary, #9aa0a6);
        font-size: 0;
        line-height: 1;
        -webkit-tap-highlight-color: transparent;
        border-radius: 8px;
        min-height: 44px;
        min-width: 44px;
    }

    #signed-out-landing[data-signup-active] .signup-back-header .iphone-back-btn svg,
    #signed-out-landing[data-auth-mode="forgot-password"] .signup-back-header .iphone-back-btn svg {
        width: 10px;
        height: 18px;
        flex-shrink: 0;
    }

    #signed-out-landing[data-signup-active] .signup-back-header .iphone-back-btn:active,
    #signed-out-landing[data-auth-mode="forgot-password"] .signup-back-header .iphone-back-btn:active {
        opacity: 0.5;
    }

    /* Reduce logo top padding on signup (no safe-area — header handles it) */
    #signed-out-landing[data-signup-active] .landing-logo {
        padding-top: 8px;
    }

    #signed-out-landing[data-signup-active] #signup-birthdate .edc-date-inputs {
        display: grid;
        grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.85fr) minmax(0, 1fr);
        gap: 10px;
        align-items: stretch;
    }

    #signed-out-landing[data-signup-active] #signup-birthdate .edc-select,
    #signed-out-landing[data-signup-active] #signup-birthdate .edc-input,
    #signed-out-landing[data-signup-active] #signup-birthdate .edc-date-year {
        width: 100%;
        min-width: 0;
    }

    /* Preserve the original signup composition — no sticky/footer push-down. */
    #signed-out-landing[data-signup-active] #authModal .c-modal-footer {
        gap: 8px;
        padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    }

    #signed-out-landing[data-signup-active] #authModal #auth-toggle-link {
        margin-top: 0;
        padding-bottom: 0;
    }
}

.landing-signup-sheet {
    width: min(460px, 100%);
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border-lighter);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    padding: 18px 18px;
    cursor: pointer;
    user-select: none;
}

.landing-signup-sheet:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 3px;
}

.landing-signup-sheet-label {
    color: var(--color-text-secondary);
    font-size: 1.05em;
    font-weight: 600;
    text-transform: lowercase;
    letter-spacing: var(--letter-spacing-ui);
}
