.modal.memory-modal, .modal.browse-memory-modal {
    height: auto;
}

.skeleton {
    animation: skeleton-loading 1s linear infinite alternate;
}

@keyframes skeleton-loading {
    0% {
        background-color: hsl(200, 20%, 80%);
    }
    100% {
        background-color: hsl(200, 20%, 95%);
    }
}


.modal.add-memory-modal {
    padding: 0;
    width: calc(100% - 128px);
    height: calc(100% - 64px);
    max-width: calc(100% - 128px);
    max-height: calc(100% - 64px);
}

@media screen and (max-width: 812px) {
    .modal.add-memory-modal {
        width: 100%;
        max-width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
        top: 0 !important;
        left: 0 !important;
        transform: none !important;
    }

    #add-memory-form,
    #add-memory-form .form-container,
    #add-memory-form .form-container form {
        flex-direction: column !important;
        overflow-y: auto !important;
        height: auto !important;
    }

    #add-memory-form .photos-column {
        width: 100% !important;
        height: auto !important;
        border-right: none !important;
        border-bottom: 1px solid #dedede;
        overflow: visible !important;
    }

    #add-memory-form .photos-column #upload-interface {
        height: auto !important;
        overflow: visible !important;
    }

    /* Right column: full width, no fixed height — scrolls with the page */
    #add-memory-form .form-container form > div:last-child {
        width: 100% !important;
        height: auto !important;
        overflow-y: visible !important;
    }
}

#dropContainer {
}

/* width */
#dropContainer::-webkit-scrollbar {
    width: 5px;
}

/* Track */
#dropContainer::-webkit-scrollbar-track {
    box-shadow: inset 0 0 5px grey;
    border-radius: 10px;
}

/* Handle */
#dropContainer::-webkit-scrollbar-thumb {
    background: #F37442;
    border-radius: 10px;
}

/* Handle on hover */
#dropContainer::-webkit-scrollbar-thumb:hover {
    background: #b30000;
}

.alert-msg {
    color: red;
    display: none;
    position: absolute;
    font-family: 'SFProText';
    font-size: 15px;
    top: 100%;
    left: 24px;
}

#drag_upload_file, .preview-image {
    margin-bottom: 16px;
    display: flex;
    width: 108px;
    height: 108px;
    position: relative;
    background-size: cover;
    background-position: center;
}

/*#drag_upload_file, .preview-image:first-child {
    margin-left: 24px;
}
#drag_upload_file, .preview-image:last-child {
    margin-right: 24px;
}*/

.preview-image img {
    width: 100%;
}

.preview-image span {
    position: absolute;
    cursor: pointer;
    right: 5px;
    top: 5px;
    background: #757575;
    border-radius: 100%;
    color: white;
    font-size: 16px;
    padding: 3px;
}

.drop-information {
    margin: 0;
    font-size: 10pt;
}

input[type="file"] {
    opacity: 0;
    position: absolute;
    width: 0;
    height: 0;
}

.custom-file-upload {
    cursor: pointer;
    position: relative;
}

#memory-content {
    height: 100%;
    min-height: 180px;
}

/* Improved Memory Content Editor Styles */
.memory-content-wrapper {
    display: flex;
    flex-direction: column;
}

.writing-tools-bar:hover {
    border-color: #d0d0d0;
}

.writing-tool-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#ai-help-button:hover {
    box-shadow: 0 4px 12px rgba(234, 121, 76, 0.35);
    transform: translateY(-1px);
}

#mic-btn:hover {
    background: #f5f5f5;
    border-color: #d0d0d0;
}

#mic-btn.mic-active {
    background: #ff4444;
    border-color: #ff4444;
    animation: pulse-mic 1.5s infinite;
}

#mic-btn.mic-active #mic-icon {
    color: white;
}

@keyframes pulse-mic {
    0% { box-shadow: 0 0 0 0 rgba(255, 68, 68, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(255, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 68, 68, 0); }
}

.prompt-chip:hover {
    background: #f5f5f5;
    border-color: #ea794c;
    color: #ea794c;
}

#editor-container {
    flex: 1;
    display: flex;
    flex-direction: column;
}

#editor-container:focus-within {
    border-color: #ea794c;
    box-shadow: 0 0 0 3px rgba(234, 121, 76, 0.1);
}


/* Progress bar states */
.progress-bar-container {
    position: relative;
}

#progress-bar-fill.complete {
    background: linear-gradient(90deg, #6bba1c 0%, #8fd14f 100%);
}

#progress-bar-fill.error {
    background: linear-gradient(90deg, #df361f 0%, #ff6b6b 100%);
}

/* Voice recording indicator */
.voice-recording-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

.voice-recording-indicator .recording-dot {
    width: 12px;
    height: 12px;
    background: #ff4444;
    border-radius: 50%;
    animation: blink 1s infinite;
}

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

/* TinyMCE custom styling */
.tox-tinymce {
    border: none !important;
    border-radius: 0 !important;
}

.tox .tox-toolbar__primary {
    background: #f8f9fa !important;
    border-bottom: 1px solid #e8e8e8 !important;
}

.tox .tox-edit-area__iframe {
    background: white !important;
}

/* Autosave indicator improvement */
#autosave-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
}

#autosave-indicator::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #6bba1c;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#autosave-indicator.saving::before {
    opacity: 1;
    animation: pulse-save 1s infinite;
}

@keyframes pulse-save {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

#create-memory .text-input {
    width: 100%;
    border: 1px solid #e2e2e2;
    border-radius: 8px;
    padding: 16px;
    box-sizing: border-box;
    font-family: 'SFPROTEXT';
    font-size: 18px;
    color: black;
    outline: none;
}

/* Memory Date Picker - Polished Styles */
.memory-date-section {
    margin-bottom: 4px;
}

.memory-date-row {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.memory-date-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.memory-date-label {
    font-family: 'SFPROTEXT';
    font-size: 13px;
    font-weight: 500;
    color: #555;
    letter-spacing: 0.02em;
}

.memory-date-inputs {
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border: 1px solid #e2e2e2;
    border-radius: 10px;
    padding: 4px 8px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.memory-date-inputs:focus-within {
    border-color: #ea794c;
    box-shadow: 0 0 0 3px rgba(234, 121, 76, 0.1);
    background: white;
}

#create-memory .memory-date-input {
    width: 40px;
    border: none;
    border-radius: 6px;
    padding: 10px 6px;
    box-sizing: border-box;
    font-family: 'SFPROTEXT';
    font-size: 16px;
    color: #333;
    outline: none;
    background: transparent;
    text-align: center;
    transition: background-color 0.2s ease;
}

#create-memory .memory-date-input:focus {
    background: rgba(234, 121, 76, 0.08);
}

#create-memory .memory-date-input::placeholder {
    color: #adb5bd;
    font-size: 14px;
}

#create-memory .memory-date-input.memory-date-year {
    width: 56px;
}

.memory-date-separator {
    font-family: 'SFPROTEXT';
    font-size: 16px;
    color: #adb5bd;
    padding: 0 2px;
    user-select: none;
}

.memory-date-to {
    font-family: 'SFPROTEXT';
    font-size: 14px;
    color: #757575;
    padding: 0 4px;
    flex-shrink: 0;
    margin-top: 28px;
}

/* Date Input Error/Success States */
.memory-date-inputs.error {
    border-color: #df361f;
    background: #fef2f2;
}

.memory-date-inputs.error:focus-within {
    box-shadow: 0 0 0 3px rgba(223, 54, 31, 0.1);
}

.memory-date-inputs.success {
    border-color: #6bba1c;
    background: #f0fdf4;
}

.memory-date-inputs.success:focus-within {
    box-shadow: 0 0 0 3px rgba(107, 186, 28, 0.1);
}

.memory-date-error {
    font-family: 'SFPROTEXT';
    font-size: 12px;
    color: #df361f;
}

.memory-date-optional {
    font-weight: 400;
    color: #9ca3af;
    font-size: 12px;
}

#create-memory .text-input.error {
    border: 1px solid #df361f;
}

#memory-save-panel {
    padding: 8px 0;
    position: relative;
    display: flex;
    width: 100%;
}

#autosave-indicator {
    color: #757575;
    font-family: 'SFPROTEXT';
    position: absolute;
    top: calc(100% - 7px);
    text-align: center;
    width: 100%;
    margin: 0;
}

#post-button, #edit-button {
    font-family: Montserrat;
    width: 270px;
    height: 40px;
    background: #E37B4F;
    border-radius: 5px;
    border-color: unset;
    border-width: unset;
    border-style: unset;
    color: white;
    cursor: pointer;
}

.memory-modal-header {
    color: #000000;
    font-family: 'SFPROTEXT';
    font-style: normal;
    font-weight: 600;
    font-size: 24px;
    margin-block: unset;
}

.add-more-photos {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin-top: 2%;
}

.add-more-photos-wording {
    font-family: 'SFPROTEXT';
    color: #F37442;
    font-weight: 500;
    cursor: pointer;
}

#memory-content-word-calc {
    color: #757575;
    font-family: 'SFPROTEXT';
}

.flex-line-3 {
    width: calc(33% - 5px);
    box-sizing: border-box;
    margin-bottom: 8px;
}

.flex-line-3:nth-child(3n + 2) {
    margin-left: 8px;
    margin-right: 8px;
}

.flex-line-5 {
    width: calc(20% - 4px);
    box-sizing: border-box;
    margin-bottom: 8px;
    margin-right: 5px;
}

.flex-line-5:nth-child(5n + 5) {
    margin-right: 0px;
}

.carousel-element {
    width: 100%;
    height: 100%;
    display: flex;
    position: absolute;
    top: 0;
    right: 0;
}

.carousel-element.with-transition {
    transition: right 1s;
}

.carousel-element.left {
    display: none;
    right: 100%;
}

.carousel-element.right {
    display: none;
    right: -100%;
}

.carousel {
    width: calc(100% - 490px);
    display: flex;
    position: relative;
    overflow: hidden;
}

.carousel-wrapper .right-column {
    width: 490px;
    height: 100%;
    background: white;
    margin: auto;
    margin-right: 0;
    display: flex;
    flex-direction: column;
    transform: scale(1);
    position: relative;
}

.photo-wrapper {
    margin-left: 8px;
}

.photo-wrapper:first-child {
    margin-left: 0;
}

.photo-wrapper:last-child {
    padding-right: 16px;
}

.photo-item {
    background-size: cover;
    background-position: center;
    height: 80px;
    border: 1px solid #dedede;
    box-sizing: border-box;
    border-radius: 4px;
    position: relative;
    cursor: pointer;
    width: 80px;
    overflow: hidden;
}

.photo-wrapper .photo-item .selection-overlay {
    background: rgba(43, 189, 247, 0.4);
    border: 1px solid #2bbdf7;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
}

.photo-wrapper.selected .photo-item .selection-overlay {
    display: flex;
}

.close-memory-btn {
    position: absolute;
    top: 24px;
    left: 24px;
    color: white;
    font-size: 18px;
    padding: 12px;
    background: black;
    border-radius: 24px;
    cursor: pointer;
    z-index: 1;
    font-family: 'SFPROTEXT';
}

.memory-list {
    margin-top: 10px;
}

.memory-list .memory-element {
    border: 1px solid #f3f3f3;
    box-shadow: 0px 4px 16px rgba(0, 0, 0, 0.13);
    box-sizing: border-box;
    border-radius: 8px;
    display: flex;
    margin-bottom: 16px;
    cursor: pointer;
    overflow: hidden;
}

.memory-list .memory-element .memory-element-image {
    width: 128px;
    min-height: 128px;
    background-size: cover;
    background-position: center;
}

.memory-list .memory-element .memory-element-image .memory-element-featured-label {
    position: absolute;
    bottom: 0;
    left: 0;
    font-size: 11px;
    font-family: 'SFProText';
    font-weight: 700;
    color: white;
    background: rgba(234, 121, 76, 0.92);
    backdrop-filter: blur(4px);
    border-radius: 0 6px 0 8px;
    padding: 4px 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    pointer-events: none;
}

.memory-list .memory-element .memory-element-details {
    padding: 12px;
    display: flex;
    width: calc(100% - 128px);
}

.memory-avatar {
    width: 20px;
    height: 20px;
    background-size: cover;
    background-position: center;
    margin: auto 0;
    margin-right: 4px;
}

.memory-username {
    color: #757575;
    font-weight: 400;
    font-size: 14px;
    margin: auto 0;
    font-family: 'SFPROTEXT';
}

.memory-marks-container {
    border-top: 1px solid #dedede;
    padding: 16px;
    font-family: 'Montserrat';
    font-size: 16px;
    color: black;
    height: 103px;
    position: fixed;
    bottom: 0;
    overflow: visible;
    box-sizing: border-box;
    width: 100%;
    background: white;
}

.memory-marks-container .marks-counter {
    display: flex;
    font-size: 20px;
    font-family: 'SFPROTEXT';
    border: 1px solid #dedede;
    border-radius: 20px;
    padding: 8px 12px;
    margin-left: 10px;
    position: relative;
    cursor: pointer;
}

.memory-marks-container .marks-counter:hover {
    background-color: #f4f4f4;
}

.memory-marks-container .marks-counter:first-child {
    margin-left: 0;
}

.memory-marks-container .marks-counter .mark-icon {
    width: 24px;
    height: 24px;
    background-size: cover;
    background-position: center;
    margin-right: 4px;
}

.memory-marks-container .marks-counter.inspiring .mark-icon {
    background-image: url('../assets/lightbulb.svg');
}

.memory-marks-container .marks-counter.inspiring.marked {
    border: 1px solid #ffc400;
    background-color: #ffebaa;
}

.memory-marks-container .marks-counter.heartwarming .mark-icon {
    background-image: url('../assets/cake.svg');
}

.memory-marks-container .marks-counter.heartwarming.marked {
    border: 1px solid #d7917b;
    background-color: #ffe3da;
}

.memory-marks-container .marks-counter.enjoyable .mark-icon {
    background-image: url('../assets/sentiment_very_satisfied.svg');
}

.memory-marks-container .marks-counter.enjoyable.marked {
    border: 1px solid #9de3f2;
    background-color: #dff9ff;
}

.memory-marks-container .marks-counter.solemn .mark-icon {
    background-image: url('../assets/military_tech.svg');
}

.memory-marks-container .marks-counter.solemn.marked {
    border: 1px solid #814bf4;
    background-color: #ebe3fc;
}

.memory-marks-container .tooltip {
    position: absolute;
    bottom: calc(100% + 4px);
    left: 0;
    background: white;
    padding: 12px;
    box-shadow: 0px 4px 16px rgba(0, 0, 0, 0.13);
    font-size: 16px;
    border-radius: 4px;
    display: none;
}

.memory-marks-container .marks-counter:hover .tooltip {
    display: block;
}

/* ── Marks Options Button ── */
.memory-marks-container #marks-options {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: background 0.15s;
    z-index: 2;
}
.memory-marks-container #marks-options:hover {
    background: rgba(0, 0, 0, 0.1);
}
.memory-marks-container #marks-options .marks-options-icon {
    font-size: 22px;
    color: #555;
    line-height: 1;
}

/* ── Marks Options Dropdown Menu ── */
.memory-marks-container #marks-options .marks-options-menu {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.14);
    padding: 6px 0;
    min-width: 200px;
    z-index: 10;
}
.memory-marks-container #marks-options.clicked .marks-options-menu {
    display: block;
}

/* ── Menu Items ── */
.marks-options-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: #1a1a1a;
    transition: background 0.12s;
    white-space: nowrap;
}
.marks-options-item:hover {
    background: #f5f5f5;
}
.marks-options-item .material-icons-outlined {
    font-size: 22px;
    color: #555;
}
.marks-options-item-danger span:last-child {
    color: #d32f2f;
}
.marks-options-item-danger .material-icons-outlined {
    color: #d32f2f;
}

/* ── Mobile: action sheet from bottom ── */
@media screen and (max-width: 812px) {
    .memory-marks-container #marks-options .marks-options-menu {
        position: fixed;
        bottom: 104px;
        right: 12px;
        left: auto;
        border-radius: 14px;
        min-width: 220px;
        animation: marksMenuFadeIn 0.15s ease;
    }
    @keyframes marksMenuFadeIn {
        from { opacity: 0; transform: translateY(8px); }
        to   { opacity: 1; transform: translateY(0); }
    }
}

/* ── Voice Read Button ── */
.voice-read-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    border: 1px solid #dedede;
    border-radius: 500px;
    background: transparent;
    font-family: 'Montserrat';
    font-size: 14px;
    font-weight: 500;
    color: #555;
    cursor: pointer;
    margin-bottom: 12px;
    transition: background 0.15s, border-color 0.15s;
}
.voice-read-btn:hover {
    background: #f4f4f4;
    border-color: #bbb;
}
.voice-read-btn.active {
    border-color: #ea794c;
    background: #fee8df;
    color: #ea794c;
}
.voice-read-btn .material-icons-outlined {
    font-size: 18px;
}
/* The Directions pill is an <a>: strip link defaults so it matches its
   sibling buttons in both the server-rendered and AJAX-injected carousel. */
a.voice-read-btn {
    text-decoration: none;
}

.mark-success-feedback,
.mark-failed-credits-feedback,
.memory-carousel .report-memory-feedback {
    width: 391px;
    height: auto;
    left: auto;
    top: auto;
    padding: 24px;
    color: black;
}

.mark-success-feedback .mark-tag {
    width: 108px;
    height: 108px;
    background-size: cover;
    margin: auto;
}

.mark-success-feedback.inspiring .mark-tag {
    background: url('../assets/inspiring_tag.svg');
}

.mark-success-feedback .mark-tag-name {
    display: none;
}

.mark-success-feedback.inspiring .mark-tag-name.inspiring {
    display: inline;
    color: #ffd755;
}

.mark-success-feedback.heartwarming .mark-tag {
    background: url('../assets/heartwarming_tag.svg');
}

.mark-success-feedback.heartwarming .mark-tag-name.heartwarming {
    display: inline;
    color: #d7917b;
}

.mark-success-feedback.enjoyable .mark-tag {
    background: url('../assets/enjoyable_tag.svg');
}

.mark-success-feedback.enjoyable .mark-tag-name.enjoyable {
    display: inline;
    color: #9ee3f2;
}

.mark-success-feedback.solemn .mark-tag {
    background: url('../assets/solemn_tag.svg');
}

.mark-success-feedback.solemn .mark-tag-name.solemn {
    display: inline;
    color: #814bf4;
}

.memory-carousel .content-area {
    padding: 24px;
    font-family: 'SFPROTEXT';
    font-size: 18px;
    overflow-y: auto;
    box-sizing: border-box;
    height: calc(100% - 208px);
}

.stage-circle {
    width: 16px;
    height: 16px;
    border: 0.1px solid;
    border-radius: 100%;
    display: flex;
}

.stage-circle > div {
    width: 5.5px;
    height: 5.5px;
    border-radius: 100%;
    margin: auto;
    display: flex;
}

.stage-circle .check-icon {
    display: none;
    margin: auto;
    color: white;
    font-size: 10px;
}

.stage-circle.active, .stage-circle.completed {
    border-color: #ea794c;
}

.stage-circle.active > div {
    background: #ea794c;
}

.stage-circle.inactive {
    border-color: #9ca3af;
}

.stage-circle.inactive > div {
    background: #dedede;
}

.stage-circle.completed > div {
    background: #ea794c;
    width: 100%;
    height: 100%;
}

.stage-circle.completed .check-icon {
    display: block;
}

.connecting-line {
    width: 36px;
    border: 1px solid #dedede;
    height: 0px;
    margin: auto 0;
}

.connecting-line.active {
    border-color: #ea794c;
    background: #ea794c;
}

.litepicker .container__footer .button-apply, .litepicker .container__footer .button-cancel {
    padding: 7px 12px 8px;
    font-size: 16px;
}

.litepicker .container__footer .preview-date-range {
    display: none !important;
}

.moment-display {
    width: 100%;
    height: 100%;
    background-size: auto 100%;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.moment-display .moment-overlay {
    background: linear-gradient(180.09deg, rgba(0, 0, 0, 0) 0.07%, #000000 99.92%);
    height: 100%;
    width: 100%;
    top: 0;
    left: 0;
    position: absolute;
    display: none;
}

.moment-display.expanded .moment-overlay {
    display: block;
}

.moment-display .moment-description-wrapper {
    position: absolute;
    bottom: 0;
    background: linear-gradient(180.02deg, rgba(0, 0, 0, 0) 0.02%, rgba(0, 0, 0, 0.75) 99.98%);
    color: white;
    padding: 18px 16px;
    width: 100%;
    box-sizing: border-box;
}

.moment-display.expanded .moment-description-wrapper {
    background: none;
}

.moment-display.expanded .moment-description-wrapper .moment-abstract {
    display: none;
}

.moment-display .moment-description-wrapper .moment-description {
    display: none;
}

.moment-display.expanded .moment-description-wrapper .moment-description {
    display: block;
}

.streak-fire-icon {
    background-image: url('/static/influencers/assets/streak-fire-gray.svg');
    background-size: cover;
    background-position: center;
    width: 28px;
    height: 28px;
    margin: auto;
    display: flex;
}

.streak-fire-icon .checked {
    background: #ea794c;
    border-radius: 100%;
    width: 22px;
    height: 22px;
    margin: auto;
    display: none;
}

.streak-progress.active1 > div:nth-child(1) .streak-fire-icon,
.streak-progress.active2 > div:nth-child(2) .streak-fire-icon,
.streak-progress.active3 > div:nth-child(3) .streak-fire-icon,
.streak-progress.active4 > div:nth-child(4) .streak-fire-icon {
    background-image: url('/static/influencers/assets/streak-fire-strong.svg');
}

.streak-progress.active2 > div:nth-child(1) .streak-fire-icon,
.streak-progress.active3 > div:nth-child(1) .streak-fire-icon,
.streak-progress.active4 > div:nth-child(1) .streak-fire-icon,
.streak-progress.active5 > div:nth-child(1) .streak-fire-icon,
.streak-progress.completed1 > div:nth-child(1) .streak-fire-icon,
.streak-progress.completed2 > div:nth-child(1) .streak-fire-icon,
.streak-progress.completed3 > div:nth-child(1) .streak-fire-icon,
.streak-progress.completed4 > div:nth-child(1) .streak-fire-icon,
.streak-progress.completed5 > div:nth-child(1) .streak-fire-icon,
.streak-progress.active3 > div:nth-child(2) .streak-fire-icon,
.streak-progress.active4 > div:nth-child(2) .streak-fire-icon,
.streak-progress.active5 > div:nth-child(2) .streak-fire-icon,
.streak-progress.completed2 > div:nth-child(2) .streak-fire-icon,
.streak-progress.completed3 > div:nth-child(2) .streak-fire-icon,
.streak-progress.completed4 > div:nth-child(2) .streak-fire-icon,
.streak-progress.completed5 > div:nth-child(2) .streak-fire-icon,
.streak-progress.active4 > div:nth-child(3) .streak-fire-icon,
.streak-progress.active5 > div:nth-child(3) .streak-fire-icon,
.streak-progress.completed3 > div:nth-child(3) .streak-fire-icon,
.streak-progress.completed4 > div:nth-child(3) .streak-fire-icon,
.streak-progress.completed5 > div:nth-child(3) .streak-fire-icon,
.streak-progress.active5 > div:nth-child(4) .streak-fire-icon,
.streak-progress.completed4 > div:nth-child(4) .streak-fire-icon,
.streak-progress.completed5 > div:nth-child(4) .streak-fire-icon {
    background: none;
}

.streak-progress.active2 > div:nth-child(1) .streak-fire-icon .checked,
.streak-progress.active3 > div:nth-child(1) .streak-fire-icon .checked,
.streak-progress.active4 > div:nth-child(1) .streak-fire-icon .checked,
.streak-progress.active5 > div:nth-child(1) .streak-fire-icon .checked,
.streak-progress.completed1 > div:nth-child(1) .streak-fire-icon .checked,
.streak-progress.completed2 > div:nth-child(1) .streak-fire-icon .checked,
.streak-progress.completed3 > div:nth-child(1) .streak-fire-icon .checked,
.streak-progress.completed4 > div:nth-child(1) .streak-fire-icon .checked,
.streak-progress.completed5 > div:nth-child(1) .streak-fire-icon .checked,
.streak-progress.active3 > div:nth-child(2) .streak-fire-icon .checked,
.streak-progress.active4 > div:nth-child(2) .streak-fire-icon .checked,
.streak-progress.active5 > div:nth-child(2) .streak-fire-icon .checked,
.streak-progress.completed2 > div:nth-child(2) .streak-fire-icon .checked,
.streak-progress.completed3 > div:nth-child(2) .streak-fire-icon .checked,
.streak-progress.completed4 > div:nth-child(2) .streak-fire-icon .checked,
.streak-progress.completed5 > div:nth-child(2) .streak-fire-icon .checked,
.streak-progress.active4 > div:nth-child(3) .streak-fire-icon .checked,
.streak-progress.active5 > div:nth-child(3) .streak-fire-icon .checked,
.streak-progress.completed3 > div:nth-child(3) .streak-fire-icon .checked,
.streak-progress.completed4 > div:nth-child(3) .streak-fire-icon .checked,
.streak-progress.completed5 > div:nth-child(3) .streak-fire-icon .checked,
.streak-progress.active5 > div:nth-child(4) .streak-fire-icon .checked,
.streak-progress.completed4 > div:nth-child(4) .streak-fire-icon .checked,
.streak-progress.completed5 > div:nth-child(4) .streak-fire-icon .checked {
    display: flex;
}

.streak-progress .streak-chest {
    background-image: url('/static/influencers/assets/streak-chest-gray.svg');
    background-size: cover;
    background-position: center;
    width: 25px;
    height: 20px;
    margin: 4px auto;
}

.streak-progress.active5 .streak-chest {
    background-image: url('/static/influencers/assets/streak-chest-orange.svg');
}

.streak-progress .connecting-line {
    width: calc(100% - 39px);
    height: 1px;
    background: #dedede;
    opacity: 0.5;
    margin: 20% auto;
}

.streak-progress.active2 > div:nth-child(1) .connecting-line,
.streak-progress.active3 > div:nth-child(1) .connecting-line,
.streak-progress.active4 > div:nth-child(1) .connecting-line,
.streak-progress.active5 > div:nth-child(1) .connecting-line,
.streak-progress.completed2 > div:nth-child(1) .connecting-line,
.streak-progress.completed3 > div:nth-child(1) .connecting-line,
.streak-progress.completed4 > div:nth-child(1) .connecting-line,
.streak-progress.completed5 > div:nth-child(1) .connecting-line,
.streak-progress.active3 > div:nth-child(2) .connecting-line,
.streak-progress.active4 > div:nth-child(2) .connecting-line,
.streak-progress.active5 > div:nth-child(2) .connecting-line,
.streak-progress.completed3 > div:nth-child(2) .connecting-line,
.streak-progress.completed4 > div:nth-child(2) .connecting-line,
.streak-progress.completed5 > div:nth-child(2) .connecting-line,
.streak-progress.active4 > div:nth-child(3) .connecting-line,
.streak-progress.active5 > div:nth-child(3) .connecting-line,
.streak-progress.completed4 > div:nth-child(3) .connecting-line,
.streak-progress.completed5 > div:nth-child(3) .connecting-line,
.streak-progress.active5 > div:nth-child(4) .connecting-line {
    opacity: 1;
    background: #ea794c;
}

#moment-streak-feedback .streak-warning {
    display: none;
}

#moment-streak-feedback .streak-warning .streak-loss-msg {
    display: none;
}

#moment-streak-feedback.streak-loss .streak-warning .streak-loss-msg {
    display: block;
}

#moment-streak-feedback.streak-loss .streak-warning .streak-active-msg {
    display: none;
}

#moment-streak-feedback.active-1 .streak-warning.active-1 {
    display: block;
}

#moment-streak-feedback.active-2 .streak-warning.active-2 {
    display: block;
}

#moment-streak-feedback.active-3 .streak-warning.active-3 {
    display: block;
}

#moment-streak-feedback.active-4 .streak-warning.active-4 {
    display: block;
}

#moment-streak-feedback.active-5 .streak-warning.active-5 {
    display: block;
}

.description-wrapper > .search-container {
    width: 100%;
}

.add-moment-btn-area {
    padding: 16px;
    width: 100%;
    box-sizing: border-box;
    bottom: 0;
}

.memory-liked {
    display: flex;
    color: #EA794C;
    font-size: 14px;
    font-family: SFPROTEXT;
    align-items: center;
    justify-content: space-between;
    position: relative;
    bottom: -15px;
}

/*.tooltip-container {*/
/*    position: relative;*/
/*    display: inline-block;*/
/*}*/



/*.tooltip-container:hover .tooltip {*/
/*    visibility: visible;*/
/*    opacity: 1;*/
/*}*/

.root-in-progress-tooltip-container:hover .tooltip {
    visibility: visible;
    opacity: 1;
}

.root-in-progress-tooltip-container .tooltip {
    visibility: hidden;
    width: 220px;
    background-color: #555;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px 0;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -110px;
    opacity: 0;
    transition: opacity 0.3s, visibility 0s 0.3s; /* Add a delay to visibility to match opacity */
}

.root-in-progress-tooltip-container .tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #555 transparent transparent transparent;
}

.ipfs-content-title {
    font-size: 24px;
    margin-bottom: 20px;
}

.ipfs-memory-content {
    font-size: 16px;
    margin-bottom: 20px;
}

.ipfs-links-list {
    list-style: none;
    padding: 0;
}

.ipfs-links-list li {
    background: #f5f5f5;
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.ipfs-links-list li:hover {
    background: #e0e0e0;
}

@media screen and (max-width: 812px) {
    .close-memory-btn {
        right: 24px;
        left: auto;
        top: 115px;
        font-size: 18px;
        padding: 6px;
        border-radius: 100%;
    }

    .carousel {
        width: 100%;
        height: 100%;
        position: absolute;
        top: 0;
        left: 0;
        background: rgb(0 0 0 / 50%);
        z-index: 1;
    }

    .carousel.mobile-hide {
        display: none;
    }

    .carousel-wrapper .right-column {
        width: 100%;
    }

    .memory-list {
        display: flex;
        flex-direction: column;
        min-height: 100vh;
    }

    .memory-list .memory-element:nth-child(2) {
        margin-left: 16px;
    }

    .memory-list .memory-element:last-child {
        margin-right: 16px;
    }

    .memory-list .memory-element {
        border-radius: 18px;
        border: 1px solid #dedede;
        margin-left: 6px;
        display: flex;
        flex-direction: row;
    }

    .memory-list .memory-element .memory-element-image {
        width: 128px;
        min-height: 128px;
        min-width: 128px;
        height: 128px;
    }

    .memory-list .memory-element .memory-element-image .memory-element-featured-label {
        font-size: 12px;
        padding: 5px 10px;
    }

    .memory-list .memory-element .memory-element-details {
        box-sizing: border-box;
    }

    .memory-avatar {
        width: 30px;
        height: 30px;
        margin: auto 0;
        margin-right: 6px;
        border-radius: 100%;
    }

    .memory-username {
        font-weight: 700;
    }

    .memory-carousel .content-area {
        /*height: calc(100% - 218px);*/
        max-height: calc(100% - 218px);
    }

    .mark-success-feedback,
    .mark-failed-credits-feedback,
    .memory-carousel .report-memory-feedback {
        width: 100%;
        left: 0;
        top: auto;
    }

    .memory-marks-container {
        height: 55px;
        padding: 12px 16px;
    }

    .memory-marks-container .marks-counter {
        padding: 6px;
        font-size: 14px;
    }

    .memory-marks-container .marks-counter .mark-icon {
        width: 14px;
        height: 14px;
    }

    .memory-marks-container #marks-options {
        top: calc(50% - 12px);
    }

    .modal .moments-form-container {
        min-height: none;
        position: relative;
        height: auto;
    }

    .modal .moments-form-container .moment-form-tab {
        height: auto;
    }

    .modal.fullscreen .moments-form-container {
        min-height: 100%;
        height: 100%;
    }

    .modal.fullscreen .moments-form-container .moment-form-tab {
        height: 100%;
    }

    .add-moment-btn-area {
        position: fixed;
    }

    .memory-liked {
        bottom: -5px;
    }

    .ipfs-modal-content{
        padding: 20px !important;
    }
}

/* ── Shared memory section (Related Memories, Collection, etc.) ── */

.memory-section {
    padding: 16px 0;
    border-top: 1px solid #dedede;
    margin-top: 16px;
}

.memory-section-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.memory-section-header-title {
    font-family: 'Montserrat';
    font-size: 18px;
    font-weight: 600;
    color: black;
}

.memory-section-header-title a {
    color: var(--ds-link, #B25531);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.memory-section-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.memory-section-scroll::-webkit-scrollbar {
    display: none;
}

.memory-section-scroll-inner {
    display: flex;
    gap: 12px;
    padding-bottom: 8px;
}

.memory-section-card {
    flex: 0 0 180px;
    width: 180px;
    border: 1px solid #dedede;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    background: white;
    box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.2s ease;
}

.memory-section-card:hover {
    box-shadow: 0px 4px 16px rgba(0, 0, 0, 0.13);
}

.memory-section-card-image {
    width: 100%;
    height: 140px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.memory-section-card-details {
    padding: 10px;
    font-family: 'SFPROTEXT';
}

.memory-section-card-title {
    font-family: 'Montserrat';
    font-size: 14px;
    font-weight: 600;
    color: black;
    line-height: 18px;
    margin-bottom: 8px;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.memory-section-card-user {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
}

.memory-section-card-avatar {
    width: 22px;
    height: 22px;
    border-radius: 100%;
    background-size: cover;
    background-position: center;
    margin-right: 6px;
    border: 1px solid #dedede;
    flex-shrink: 0;
}

.memory-section-card-username {
    font-size: 12px;
    color: #757575;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.memory-section-card-marks {
    display: flex;
    align-items: center;
    font-size: 12px;
    color: #757575;
}

@media (max-width: 768px) {
    .memory-section-card {
        flex: 0 0 140px;
        width: 140px;
    }
    .memory-section-card-image {
        height: 110px;
    }
    .memory-section-card-details {
        padding: 8px;
    }
    .memory-section-card-title {
        font-size: 13px;
        margin-bottom: 6px;
    }
    .memory-section-card-avatar {
        width: 18px;
        height: 18px;
    }
    .memory-section-card-username {
        font-size: 11px;
    }
    .memory-section-card-marks {
        font-size: 11px;
    }
}

.share-button {
    transition: color 0.2s ease;
}

.share-button:hover {
    color: #ea794c !important;
}

.share-modal-container {
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.share-modal {
    animation: slideUp 0.3s ease;
}

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

/* ==========================================
   Instagram Stories-like Moments Display
   ========================================== */

.moments-display-wrapper {
    background: rgba(0, 0, 0, 0.95) !important;
}

.moments-display-wrapper .moment-modal {
    background: transparent !important;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

.stories-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    position: relative;
    padding: 0 20px;
    box-sizing: border-box;
    gap: 12px;
    overflow: hidden;
}

/* Story Preview Stacks - Container for side previews */
.story-preview-stack {
    display: flex;
    flex-direction: row;
    gap: 12px;
    align-items: center;
    height: calc(100% - 40px);
    max-height: 700px;
    flex-shrink: 0;
    z-index: 5;
}

.story-preview-stack.prev {
    justify-content: flex-end;
}

.story-preview-stack.next {
    justify-content: flex-start;
}

/* Main Story Card */
.story-card {
    position: relative;
    width: 100%;
    max-width: 480px;
    height: calc(100% - 20px);
    max-height: 85vh;
    background: #1a1a1a;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
    z-index: 10;
    flex-shrink: 0;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.story-card .moment-viewer {
    height: 100% !important;
}

.story-card .moment-viewer > div:first-child {
    height: calc(100% - 70px) !important;
}

.story-card .memory-marks-container {
    position: relative;
    height: 70px !important;
    background: #1a1a1a;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: white;
}

.story-card .memory-marks-container .marks-counter {
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.story-card .memory-marks-container .marks-counter:hover {
    background: rgba(255, 255, 255, 0.2);
}

.story-card .memory-marks-container .marks-counter.inspiring.marked {
    border-color: #ffc400;
    background-color: rgba(255, 196, 0, 0.2);
    color: #ffd755;
}

.story-card .memory-marks-container .marks-counter.heartwarming.marked {
    border-color: #d7917b;
    background-color: rgba(215, 145, 123, 0.2);
    color: #ffe3da;
}

.story-card .memory-marks-container .marks-counter.enjoyable.marked {
    border-color: #9de3f2;
    background-color: rgba(157, 227, 242, 0.2);
    color: #dff9ff;
}

.story-card .memory-marks-container .marks-counter.solemn.marked {
    border-color: #814bf4;
    background-color: rgba(129, 75, 244, 0.2);
    color: #ebe3fc;
}

.story-card .memory-marks-container #marks-options {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.story-card .memory-marks-container .tooltip {
    background: #2a2a2a;
    color: white;
    box-shadow: 0px 4px 16px rgba(0, 0, 0, 0.4);
}

/* Side Previews - IG Stories Style */
.story-preview {
    position: relative;
    flex-shrink: 0;
    width: 140px;
    height: 250px;
    background: #1a1a1a;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    z-index: 5;
    opacity: 1;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                width 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.story-preview::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    pointer-events: none;
    transition: background 0.3s ease;
}

.story-preview:hover::after {
    background: rgba(0, 0, 0, 0.2);
}

.story-preview:hover {
    transform: scale(1.03);
}

/* Outer previews are smaller */
.story-preview.prev-2,
.story-preview.next-2 {
    width: 130px;
    height: 230px;
    opacity: 0.7;
}

/* Inner previews are larger */
.story-preview.prev-1,
.story-preview.next-1 {
    width: 170px;
    height: 300px;
    opacity: 0.9;
}

/* Animation states */
.story-preview.slide-out-left {
    animation: slideOutLeft 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.story-preview.slide-out-right {
    animation: slideOutRight 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.story-preview.slide-in-left {
    animation: slideInLeft 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.story-preview.slide-in-right {
    animation: slideInRight 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.story-preview.grow-to-center {
    animation: growToCenter 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.story-preview.shrink-from-center {
    animation: shrinkFromCenter 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes slideOutLeft {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(-100px); opacity: 0; }
}

@keyframes slideOutRight {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100px); opacity: 0; }
}

@keyframes slideInLeft {
    from { transform: translateX(100px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideInRight {
    from { transform: translateX(-100px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes growToCenter {
    from { transform: scale(0.5); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes shrinkFromCenter {
    from { transform: scale(1); opacity: 1; }
    to { transform: scale(0.5); opacity: 0; }
}

/* Main card animation */
.story-card.slide-left {
    animation: mainSlideLeft 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.story-card.slide-right {
    animation: mainSlideRight 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes mainSlideLeft {
    0% { transform: translateX(0); }
    50% { transform: translateX(-20px); }
    100% { transform: translateX(0); }
}

@keyframes mainSlideRight {
    0% { transform: translateX(0); }
    50% { transform: translateX(20px); }
    100% { transform: translateX(0); }
}

.story-preview-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
}

.story-preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 12px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.6) 0%, transparent 40%, transparent 60%, rgba(0,0,0,0.4) 100%);
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.story-preview-user {
    display: flex;
    align-items: center;
}

.story-preview-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    border: 2px solid transparent;
    background-clip: padding-box;
    margin-right: 8px;
    position: relative;
    flex-shrink: 0;
}

.story-preview-avatar::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 50%;
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    z-index: -1;
}

/* Smaller avatars for outer previews */
.story-preview.prev-2 .story-preview-avatar,
.story-preview.next-2 .story-preview-avatar {
    width: 22px;
    height: 22px;
    margin-right: 6px;
}

.story-preview.prev-2 .story-preview-avatar::before,
.story-preview.next-2 .story-preview-avatar::before {
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
}

.story-preview-username {
    color: white;
    font-family: 'SFPROTEXT';
    font-size: 11px;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80px;
}

.story-preview.prev-2 .story-preview-username,
.story-preview.next-2 .story-preview-username {
    font-size: 10px;
    max-width: 50px;
}

.story-preview.prev-2 .story-preview-overlay,
.story-preview.next-2 .story-preview-overlay {
    padding: 8px;
}

/* Progress bars inside story */
.story-progress-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 8px 12px;
    display: flex;
    gap: 4px;
    z-index: 20;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3), transparent);
}

.story-progress-bar {
    flex: 1;
    height: 3px;
    background: rgba(255, 255, 255, 0.35);
    border-radius: 3px;
    overflow: hidden;
}

.story-progress-bar .progress-fill {
    width: 0%;
    height: 100%;
    background: white;
    transition: width 1s linear;
}

/* Navigation Areas */
.story-nav-area {
    position: absolute;
    top: 65px;
    bottom: 70px;
    width: 40%;
    z-index: 15;
    cursor: pointer;
}

.story-nav-area.prev {
    left: 0;
}

.story-nav-area.next {
    right: 0;
}

/* Close Button */
.story-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 25;
    color: white;
    font-size: 20px;
    transition: background 0.2s;
}

.story-close-btn:hover {
    background: rgba(0, 0, 0, 0.7);
}

/* Story Header - User info */
.story-header {
    position: absolute;
    top: 20px;
    left: 16px;
    right: 60px;
    z-index: 20;
    display: flex;
    align-items: center;
}

.story-header-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    border: 2px solid #ea794c;
    margin-right: 10px;
}

.story-header-info {
    flex: 1;
}

.story-header-username {
    color: white;
    font-family: 'SFPROTEXT';
    font-size: 14px;
    font-weight: 600;
}

.story-header-time {
    color: rgba(255, 255, 255, 0.7);
    font-family: 'SFPROTEXT';
    font-size: 12px;
}

/* Mobile Specific Stories Styles */
@media screen and (max-width: 812px) {
    .stories-container {
        gap: 4px;
        padding: 0;
    }

    .story-preview-stack {
        display: none;
    }

    .story-card {
        max-width: 100%;
        width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
    }

    .story-card .memory-marks-container {
        height: 55px !important;
    }

    .story-card .moment-viewer > div:first-child {
        height: calc(100% - 55px) !important;
    }

    .story-progress-container {
        padding: 6px 10px;
    }

    .story-progress-bar {
        height: 2px;
    }

    .story-close-btn {
        width: 28px;
        height: 28px;
        top: 12px;
        right: 12px;
        font-size: 18px;
    }

    .story-nav-area {
        top: 50px;
        bottom: 55px;
    }
}

/* Tablet - show limited side previews */
@media screen and (min-width: 600px) and (max-width: 900px) {
    .stories-container {
        padding: 0 20px;
        gap: 12px;
    }

    .story-preview-stack {
        display: flex;
    }

    /* Only show inner previews on tablet */
    .story-preview.prev-2,
    .story-preview.next-2 {
        display: none !important;
    }

    .story-preview.prev-1,
    .story-preview.next-1 {
        width: 120px;
        height: 210px;
    }

    .story-card {
        max-width: 400px;
        max-height: 75vh;
    }
}

/* Large Tablet / Small Desktop */
@media screen and (min-width: 901px) and (max-width: 1200px) {
    .stories-container {
        padding: 0 30px;
        gap: 14px;
    }

    .story-preview.prev-2,
    .story-preview.next-2 {
        width: 100px;
        height: 175px;
    }

    .story-preview.prev-1,
    .story-preview.next-1 {
        width: 140px;
        height: 250px;
    }

    .story-card {
        max-width: 450px;
        max-height: 80vh;
    }
}

/* Desktop Story Form Wrapper Fix */
@media screen and (min-width: 813px) {
    #moment-form-wrapper {
        align-items: center;
        justify-content: center;
    }

    #moment-form-wrapper .modal.floating {
        position: relative;
        width: 420px;
        max-width: 90%;
        height: auto;
        max-height: 85vh;
        margin: auto;
        border-radius: 16px;
        overflow: visible;
        top: auto;
        left: auto;
        bottom: auto;
    }

    #moment-form-wrapper .modal.floating.fullscreen {
        width: 420px;
        height: auto;
        min-height: 500px;
        max-height: 85vh;
        overflow: auto;
    }

    #moment-form-wrapper .moments-form-container {
        height: auto;
        min-height: 100%;
    }

    #moment-form-wrapper .moments-form-container .moment-form-tab {
        height: auto;
        min-height: 400px;
    }

    #moment-form-wrapper .moments-form-container .add-moment-btn-area {
        position: relative;
    }

    #moment-form-wrapper .moment-loading {
        position: relative !important;
        min-height: 300px;
    }

    /* Desktop moments display - Stories layout */
    .moments-display-wrapper .moment-modal {
        width: 100%;
        height: 100%;
        max-width: 100%;
        max-height: 100%;
        top: 0;
        left: 0;
        border-radius: 0;
        padding: 0;
    }

    .story-card .moment-display {
        border-radius: 16px;
        overflow: hidden;
    }

    .story-card .moment-display img {
        border-radius: 0;
    }
}

/* Large Desktop - full IG experience */
@media screen and (min-width: 1201px) {
    .stories-container {
        padding: 0 60px;
        gap: 20px;
    }

    .story-preview.prev-2,
    .story-preview.next-2 {
        width: 130px;
        height: 230px;
    }

    .story-preview.prev-1,
    .story-preview.next-1 {
        width: 180px;
        height: 320px;
    }

    .story-card {
        max-width: 520px;
        max-height: 90vh;
    }
}

/* Extra Large Desktop - even bigger */
@media screen and (min-width: 1500px) {
    .stories-container {
        padding: 0 80px;
        gap: 24px;
    }

    .story-preview.prev-2,
    .story-preview.next-2 {
        width: 160px;
        height: 285px;
    }

    .story-preview.prev-1,
    .story-preview.next-1 {
        width: 220px;
        height: 390px;
    }

    .story-card {
        max-width: 580px;
        max-height: 92vh;
    }
}

/* Moment display inside story card adjustments */
.story-card .moment-display {
    background: #1a1a1a;
}

.story-card > div[style*="height: 100%"] > div:first-child {
    background: #1a1a1a !important;
}

/* Hide the old progress bars container */
.story-card .progress-bars-container {
    display: none !important;
}

/* Story card inner content */
.story-card .moment-viewer > div:first-child > div {
    background: #1a1a1a !important;
}

/* Make sure the image fills properly */
.story-card .moment-display > div:first-child {
    background: #1a1a1a;
}

/* Adjust user header position to account for progress bars */
.story-card .moment-display > div:nth-child(4) {
    top: 20px !important;
    padding-top: 24px !important;
}

/* Desktop side preview enhancements */
@media screen and (min-width: 813px) {
    .story-preview {
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    }

    .story-preview:hover {
        box-shadow: 0 15px 50px rgba(0, 0, 0, 0.5);
    }

    .story-preview:active {
        transform: scale(0.98);
    }

    /* Stack arrangement - prev side */
    .story-preview-stack.prev {
        flex-direction: row;
    }

    .story-preview-stack.next {
        flex-direction: row;
    }
}

/* Preview entrance animations */
.story-preview.fade-in {
    animation: previewFadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.story-preview.fade-out {
    animation: previewFadeOut 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes previewFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes previewFadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.9);
    }
}

/* Staggered appearance for previews */
.story-preview.prev-1.fade-in,
.story-preview.next-1.fade-in {
    animation-delay: 0.05s;
}

.story-preview.prev-2.fade-in,
.story-preview.next-2.fade-in {
    animation-delay: 0.1s;
}

/* Ensure marks container styles in story card */
.story-card .memory-marks-container {
    border-radius: 0 0 16px 16px;
}

@media screen and (max-width: 812px) {
    .story-card .memory-marks-container {
        border-radius: 0;
    }
}

/* ==========================================
   Mobile Memory Editor Styles
   ========================================== */

.mobile-prompt-chip {
    transition: all 0.2s ease;
}

.mobile-prompt-chip:hover,
.mobile-prompt-chip:active {
    background: #f5f5f5;
    border-color: #ea794c;
    color: #ea794c;
}

.mobile-editor-container:focus-within {
    border-color: #ea794c !important;
    box-shadow: 0 0 0 3px rgba(234, 121, 76, 0.1) !important;
}

#memory-content-mobile::placeholder {
    color: #9ca3af;
    font-style: italic;
}

.mobile-progress-bar {
    position: relative;
}

.mobile-progress-fill {
    transition: width 0.3s ease, background 0.3s ease;
}

/* Responsive adjustments for mobile writing tools */
@media screen and (max-width: 812px) {
    .writing-tools-bar {
        flex-direction: column;
        gap: 8px;
    }

    .writing-tools-bar > div:last-child {
        width: 100%;
        justify-content: flex-end;
    }

    #ai-help-button {
        flex: 1;
        justify-content: center;
    }

    .prompt-chip {
        font-size: 11px;
        padding: 5px 10px;
    }


    .progress-bar-container {
        height: 3px;
    }
}

/* ==========================================
   Moments Shortcuts Pagination (IG Style)
   ========================================== */

.moments-shortcuts-container {
    display: flex;
    align-items: center;
    position: relative;
    background: white;
    border-bottom: 1px solid #f3f3f3;
    padding: 0 8px;
}

.moments-shortcuts-wrapper {
    flex: 1;
    overflow: hidden;
}

.moments-shortcuts-track {
    display: flex;
    gap: 0;
    transition: transform 0.3s ease;
}

.moment-shortcut-item {
    flex-shrink: 0;
    width: 72px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.moment-shortcut-item.add-moment-item {
    width: 72px;
}

.moment-shortcut-item .shortcut-circle,
.moment-shortcut-item.shortcut-circle {
    border: 3px solid #ea794c;
    border-radius: 100%;
    margin: 0;
}

/* Navigation Buttons */
.moments-nav-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.moments-nav-btn:hover {
    background: #f5f5f5;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.moments-nav-btn:active {
    transform: scale(0.95);
}

.moments-nav-btn .material-icons-outlined {
    font-size: 20px;
    color: #333;
}

.moments-nav-btn.force-hide {
    opacity: 0;
    pointer-events: none;
}

.moments-nav-btn.prev {
    margin-right: 8px;
}

.moments-nav-btn.next {
    margin-left: 8px;
}

/* Mobile - hide nav buttons, enable swipe */
@media screen and (max-width: 600px) {
    .moments-shortcuts-container {
        padding: 0;
    }

    .moments-nav-btn {
        display: none;
    }

    .moments-shortcuts-wrapper {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        padding: 10px 16px;
    }

    .moments-shortcuts-wrapper::-webkit-scrollbar {
        display: none;
    }

    .moment-shortcut-item {
        width: auto;
        margin-right: 16px;
    }

    .moment-shortcut-item:last-child {
        margin-right: 0;
    }
}

/* Moment Streak Update - Desktop Polish */
.moment-streak-update {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 32px 24px;
    height: 100%;
    box-sizing: border-box;
}

.moment-streak-update > div {
    width: 100%;
    max-width: 340px;
}

.moment-streak-update .streak-progress {
    justify-content: center;
    padding: 24px 0;
    margin-bottom: 8px;
}

.moment-streak-update .streak-progress > div {
    flex-shrink: 0;
}

.moment-streak-update .streak-fire-icon {
    width: 32px;
    height: 38px;
    margin: 0 auto 4px;
}

.moment-streak-update .streak-fire-icon .checked {
    width: 24px;
    height: 24px;
}

.moment-streak-update .streak-chest {
    width: 28px;
    height: 24px;
}

.moment-streak-update .connecting-line {
    min-width: 28px;
}

.moment-streak-update .big-button {
    margin-top: 24px;
    max-width: 340px;
    width: 100%;
}

.moment-streak-update .streak-content {
    text-align: center;
}

.moment-streak-update .streak-message {
    font-family: 'Montserrat';
    color: #1a1a1a;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    line-height: 1.5;
    margin-top: 16px;
    margin-bottom: 8px;
}

.moment-streak-update .streak-message .highlight {
    color: #ea794c;
}

.moment-streak-update .streak-reward-icon {
    background-image: url('/static/influencers/assets/streak-chest-orange.svg');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    width: 100px;
    height: 86px;
    margin: 0 auto 16px;
}

/* Streak Progress - Refined Structure */
.streak-progress {
    display: flex;
    font-family: 'SFPROTEXT';
    font-size: 12px;
    color: #757575;
}

.streak-progress .streak-day {
    display: flex;
    width: 25%;
}

.streak-progress .streak-day-final {
    width: auto;
}

.streak-progress .streak-day-icon {
    width: 39px;
    text-align: center;
}

.streak-progress .streak-day-label {
    text-align: center;
    margin-top: 4px;
}

.streak-progress .streak-fire-icon .checked .material-icons-outlined {
    font-size: 15px;
    color: white;
    margin: auto;
}

/* Desktop refinements for moment-streak-update modal */
@media screen and (min-width: 601px) {
    .moment-streak-update {
        min-height: 320px;
        padding: 48px 24px;
    }

    .moment-streak-update .streak-progress {
        padding: 32px 0;
    }

    .moment-streak-update .streak-message {
        font-size: 20px;
        margin-top: 24px;
        margin-bottom: 16px;
    }

    .moment-streak-update .streak-day-icon {
        width: 44px;
    }

    .moment-streak-update .streak-fire-icon {
        width: 36px;
        height: 42px;
    }

    .moment-streak-update .streak-fire-icon .checked {
        width: 28px;
        height: 28px;
    }

    .moment-streak-update .streak-fire-icon .checked .material-icons-outlined {
        font-size: 18px;
    }

    .moment-streak-update .streak-chest {
        width: 32px;
        height: 26px;
    }

    .moment-streak-update .streak-day-label {
        font-size: 13px;
        margin-top: 6px;
    }

    .moment-streak-update .connecting-line {
        min-width: 32px;
        margin: 22% auto;
    }

    .moment-streak-update .big-button {
        margin-top: 32px;
        height: 48px;
        font-size: 16px;
    }

    .moment-streak-update .streak-reward-icon {
        width: 120px;
        height: 100px;
        margin-bottom: 24px;
    }
}

/* ==========================================
   Enhanced Drag-to-Reorder Photo Styles
   ========================================== */

.photo-entry {
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.photo-entry.dragging {
    opacity: 0.9;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2), 0 4px 8px rgba(0, 0, 0, 0.15) !important;
    transform: scale(1.02);
    z-index: 100 !important;
}

.drag-handle {
    cursor: grab;
    color: #9ca3af;
    transition: color 0.2s ease;
}

.drag-handle:hover {
    color: #ea794c;
}

.drag-handle:active {
    cursor: grabbing;
}

.drop-zone-indicator {
    height: 4px;
    background: linear-gradient(90deg, #ea794c 0%, #f5a574 100%);
    border-radius: 2px;
    margin: 4px 24px;
    opacity: 0;
    transition: opacity 0.2s ease, height 0.2s ease;
}

.drop-zone-indicator.active {
    opacity: 1;
    height: 4px;
}

.photos-list .photo-entry.drag-over {
    border-top: 3px solid #ea794c;
}

/* Photo Edit Button */
.photo-edit-btn {
    opacity: 0.7;
    transition: opacity 0.2s ease, color 0.2s ease;
}

.photo-edit-btn:hover {
    opacity: 1;
    color: #d66a3c !important;
}

/* ==========================================
   Photo Editor Modal Styles
   ========================================== */

.photo-editor-modal .modal {
    width: 90%;
    max-width: 800px;
    height: 80vh;
    max-height: 600px;
    padding: 0;
    overflow: hidden;
}

.photo-editor-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.photo-editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid #e8e8e8;
    background: #fafafa;
}

.photo-editor-header h3 {
    margin: 0;
    font-family: 'SFProText';
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.photo-editor-canvas-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a1a1a;
    overflow: hidden;
    padding: 16px;
}

.photo-editor-canvas-container img {
    max-width: 100%;
    max-height: 100%;
}

.photo-editor-tools {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 24px;
    background: #fafafa;
    border-top: 1px solid #e8e8e8;
}

.photo-editor-tool-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.photo-editor-tool-btn:hover {
    background: #f5f5f5;
    border-color: #ea794c;
}

.photo-editor-tool-btn:active {
    transform: scale(0.95);
}

.photo-editor-tool-btn .material-icons-outlined {
    font-size: 24px;
    color: #555;
}

.photo-editor-tool-btn:hover .material-icons-outlined {
    color: #ea794c;
}

.photo-editor-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid #e8e8e8;
    background: white;
}

.photo-editor-btn {
    padding: 10px 24px;
    border-radius: 8px;
    font-family: 'SFProText';
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.photo-editor-btn.cancel {
    background: transparent;
    border: 1px solid #e0e0e0;
    color: #555;
}

.photo-editor-btn.cancel:hover {
    background: #f5f5f5;
}

.photo-editor-btn.save {
    background: #ea794c;
    border: none;
    color: white;
}

.photo-editor-btn.save:hover {
    background: #d66a3c;
}

/* ==========================================
   Location Map Preview Styles
   ========================================== */

#location-map-preview {
    margin-top: 12px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e8e8e8;
}

.location-preview-toggle {
    margin-top: 12px;
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid #757575;
    border-radius: 8px;
    color: #303030;
    background: #fff;
    cursor: pointer;
    font: inherit;
}

.location-preview-toggle:focus-visible {
    outline: 3px solid #9b4a23;
    outline-offset: 3px;
}

.location-preview-status:empty {
    display: none;
}

.location-preview-status,
.location-preview-hint {
    margin: 8px 0 0;
    color: #555;
    font-size: 13px;
    line-height: 1.5;
}

.location-preview-hint {
    margin: 0;
    padding: 10px 12px;
}

#location-preview-map {
    width: 100%;
    height: 300px;
    background: #f0f0f0;
}

.location-preview-stage {
    position: relative;
}

.location-preview-crosshair {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    color: #111;
    font: 26px/1 sans-serif;
    text-shadow: 0 0 2px #fff, 0 0 4px #fff;
}

.location-picker-panel {
    padding: 12px;
}

.location-picker-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.location-picker-actions .location-preview-toggle {
    margin-top: 0;
}

.location-picker-coordinates {
    margin: 0 0 8px;
    font-size: 13px;
    color: #555;
    overflow-wrap: anywhere;
}

.location-picker-coordinates:empty {
    display: none;
}

.location-picker-confirm {
    background: #303030;
    border-color: #303030;
    color: #fff;
}

.location-picker-confirm:disabled {
    background: #eee;
    border-color: #aaa;
    color: #777;
    cursor: default;
}

/* ==========================================
   Flatpickr Calendar Date Picker Overrides
   ========================================== */

.flatpickr-calendar {
    font-family: 'SFProText', sans-serif !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15) !important;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
    background: #ea794c !important;
    border-color: #ea794c !important;
}

.flatpickr-day.inRange {
    background: rgba(234, 121, 76, 0.1) !important;
    border-color: transparent !important;
}

.flatpickr-day:hover {
    background: rgba(234, 121, 76, 0.15) !important;
}

.flatpickr-months .flatpickr-month {
    background: #fafafa !important;
}

.flatpickr-current-month .flatpickr-monthDropdown-months {
    font-weight: 600 !important;
}

/* Circa date toggle */
.circa-date-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.circa-date-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #ea794c;
    cursor: pointer;
}

.circa-date-toggle label {
    font-family: 'SFProText';
    font-size: 13px;
    color: #555;
    cursor: pointer;
}

/* ==========================================
   Video Embed Preview Styles
   ========================================== */

.video-input-section {
    margin-top: 16px;
}

.video-url-input-wrapper {
    position: relative;
}

.video-url-input {
    width: 100%;
    padding: 12px 16px;
    padding-left: 44px;
    border: 1px solid #e2e2e2;
    border-radius: 8px;
    font-family: 'SFProText';
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.video-url-input:focus {
    border-color: #ea794c;
    box-shadow: 0 0 0 3px rgba(234, 121, 76, 0.1);
}

.video-url-input-wrapper .material-icons-outlined {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #757575;
    font-size: 20px;
}

.video-embed-preview {
    margin-top: 12px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e8e8e8;
    background: #000;
}

.video-embed-preview iframe {
    width: 100%;
    aspect-ratio: 16/9;
    border: none;
}

.video-platform-hints {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.video-platform-hint {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: #f5f5f5;
    border-radius: 4px;
    font-family: 'SFProText';
    font-size: 11px;
    color: #757575;
}

/* ==========================================
   Enhanced AI Actions Styles
   ========================================== */

.ai-action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.ai-action-btn {
    padding: 8px 14px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    font-family: 'SFProText';
    font-size: 13px;
    color: #555;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ai-action-btn:hover {
    background: #fff;
    border-color: #ea794c;
    color: #ea794c;
}

.ai-action-btn.active {
    background: #ea794c;
    border-color: #ea794c;
    color: white;
}

.ai-action-btn .material-icons-outlined {
    font-size: 16px;
}

/* Language selector for translate action */
.translate-language-select {
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-family: 'SFProText';
    font-size: 13px;
    outline: none;
    cursor: pointer;
}

.translate-language-select:focus {
    border-color: #ea794c;
}

/* ===== Featured Memory UI (fm-*) ===== */

/* --- Form layout --- */
.fm-header {
    padding: 16px;
    border-bottom: 1px solid #f3f3f3;
    color: #757575;
    display: flex;
    align-items: center;
}
.fm-back-btn { cursor: pointer; }
.fm-body {
    padding: 16px;
    height: calc(100% - 140px);
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
}
.fm-title { margin-bottom: 16px; }
.fm-accent { color: #ea794c; }
.fm-subtitle {
    font-family: 'SFPROTEXT';
    font-size: 15px;
    line-height: 24px;
    color: #757575;
    margin-bottom: 8px;
}
.fm-footer {
    padding: 16px;
    width: 100%;
    box-sizing: border-box;
    border-top: 1px solid #f4f4f4;
}

/* --- Memory row (full-card selection) --- */
.fm-memory-row {
    display: flex;
    align-items: center;
    margin: 0 2px;
    margin-top: 16px;
    cursor: pointer;
    border-radius: 20px;
    border: 2px solid transparent;
    transition: border-color 0.2s;
    overflow: hidden;
}
.fm-memory-row.fm-selected {
    border-color: #ea794c;
}
.fm-memory-row.fm-selected .fm-memory-card {
    border-color: #ea794c;
}
.fm-check-indicator {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #c0c0c0;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 10px 0 4px;
    transition: background 0.2s, border-color 0.2s;
    box-sizing: border-box;
}
.fm-selected .fm-check-indicator {
    background: #ea794c;
    border-color: #ea794c;
}
.fm-check-icon {
    font-size: 14px !important;
    color: white;
    display: none;
}
.fm-selected .fm-check-icon { display: block; }

.fm-memory-card {
    display: flex;
    border: 1px solid #dedede;
    border-radius: 18px;
    box-sizing: border-box;
    box-shadow: 0px 4px 16px rgba(0, 0, 0, 0.10);
    overflow: hidden;
    flex: 1;
    transition: border-color 0.2s;
}
.fm-memory-thumbnail {
    background-size: cover;
    background-position: center;
    width: 105px;
    min-width: 105px;
    height: 105px;
}
.fm-memory-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 12px 10px 12px 12px;
    width: calc(100% - 105px);
    box-sizing: border-box;
}
.fm-memory-title {
    font-family: 'SFPROTEXT';
    font-size: 15px;
    font-weight: 600;
    color: black;
    line-height: 20px;
    margin-bottom: 10px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}
.fm-memory-author {
    display: flex;
    align-items: center;
}

/* --- Empty state --- */
.fm-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
    color: #757575;
    font-family: 'SFPROTEXT';
    font-size: 15px;
    gap: 12px;
    text-align: center;
}

/* --- Submit / Remove buttons --- */
.fm-submit-btn.fm-btn-disabled {
    opacity: 0.4;
    pointer-events: none;
}
.fm-submit-btn.fm-loading {
    opacity: 0.7;
    pointer-events: none;
}
.fm-remove-btn {
    text-align: center;
    font-family: 'SFPROTEXT';
    font-size: 14px;
    color: #999;
    margin-top: 12px;
    cursor: pointer;
    padding: 4px;
}
.fm-remove-btn:hover {
    color: #e04e2c;
    text-decoration: underline;
}

/* --- Loading state on form container --- */
.fm-form-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}
.fm-form-loading::after {
    content: '';
    width: 36px;
    height: 36px;
    border: 3px solid #f0f0f0;
    border-top-color: #ea794c;
    border-radius: 50%;
    animation: fm-spin 0.7s linear infinite;
}
@keyframes fm-spin {
    to { transform: rotate(360deg); }
}

/* --- Success screen --- */
.fm-success-inner { padding: 16px; }
.fm-success-image {
    background-size: cover;
    background-position: center;
    width: 100%;
    height: 197px;
    border-radius: 12px;
    animation: fm-scale-in 0.3s ease-out;
}
@keyframes fm-scale-in {
    from { transform: scale(0.96); opacity: 0; }
    to   { transform: scale(1);    opacity: 1; }
}
.fm-success-title {
    font-family: 'Montserrat';
    font-size: 22px;
    font-weight: 600;
    margin-top: 16px;
    line-height: 1.35;
}
.fm-success-note {
    font-family: 'SFPROTEXT';
    font-size: 13px;
    color: #757575;
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.fm-success-change {
    font-family: 'SFPROTEXT';
    font-size: 14px;
    color: #ea794c;
    margin-top: 14px;
    cursor: pointer;
    display: inline-block;
}
.fm-success-change:hover { text-decoration: underline; }

/* --- Hero section in block panel --- */
.fm-hero-section { padding: 8px 16px 0; }
.fm-hero-card {
    border: 1px solid #f0f0f0;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}
.fm-hero-header {
    display: flex;
    align-items: center;
    padding: 9px 14px;
    background: #fff8f5;
    border-bottom: 1px solid #f0e8e4;
}
.fm-star-icon {
    font-size: 16px !important;
    color: #ea794c;
    margin-right: 6px;
}
.fm-hero-label {
    font-family: 'SFPROTEXT';
    font-size: 11px;
    font-weight: 700;
    color: #ea794c;
    flex: 1;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}
.fm-hero-change-btn {
    font-family: 'SFPROTEXT';
    font-size: 12px;
    color: #757575;
    cursor: pointer;
    padding: 2px 10px;
    border: 1px solid #dedede;
    border-radius: 10px;
}
.fm-hero-change-btn:hover {
    border-color: #ea794c;
    color: #ea794c;
}
.fm-hero-image {
    width: 100%;
    height: 150px;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    transition: opacity 0.15s;
}
.fm-hero-image:hover { opacity: 0.92; }
.fm-hero-body { padding: 10px 14px 12px; }
.fm-hero-title {
    font-family: 'SFPROTEXT';
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* --- Hero CTA (owner, no featured memory set) --- */
.fm-hero-cta {
    display: flex;
    align-items: center;
    padding: 13px 14px;
    background: #fff8f5;
    border: 1px dashed #ea794c;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.15s;
}
.fm-hero-cta:hover { background: #fff1ea; }
.fm-hero-cta-title {
    font-family: 'SFPROTEXT';
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
}
.fm-hero-cta-subtitle {
    font-family: 'SFPROTEXT';
    font-size: 12px;
    color: #757575;
    margin-top: 2px;
}
/* ============================================================
   Metablox Labs — First-use banner
   ============================================================ */

.labs-first-use-banner {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #1a1a1a;
    color: #fff;
    border: 1px solid #f5a623;
    border-radius: 10px;
    padding: 10px 16px;
    font-size: 13px;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.labs-first-use-banner button {
    background: #f5a623;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 4px 10px;
    cursor: pointer;
    font-size: 12px;
    margin-left: 6px;
}

/* IPFS versioning button */
.ipfs-version-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding: 6px 14px;
    border: 1px solid #ea794c;
    border-radius: 500px;
    cursor: pointer;
    color: #ea794c;
    font-family: 'Montserrat';
    font-size: 13px;
    font-weight: 600;
}
.ipfs-version-btn .material-icons-outlined {
    font-size: 16px;
}
.lab-badge {
    font-size: 10px;
    background: #ea794c;
    color: #fff;
    border-radius: 4px;
    padding: 1px 5px;
    font-weight: 700;
    vertical-align: middle;
}

/* ─── Video Moments (vm-*) ─────────────────────────────────────────────── */

.vm-preview-video {
    user-drag: none;
    -webkit-user-drag: none;
    user-select: none;
}

.vm-play-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.25);
    cursor: pointer;
    z-index: 1;
}

.vm-video-indicator {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #ea794c;
    color: #fff;
    font-family: 'SFPROTEXT', sans-serif;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 3px;
    z-index: 2;
}

.vm-mute-toggle {
    position: absolute;
    bottom: 16px;
    right: 16px;
    width: 36px; height: 36px;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    color: #fff;
}

.vm-mute-toggle .material-icons-outlined {
    font-size: 20px;
}

.vm-progress-bar {
    position: absolute;
    bottom: 0; left: 0;
    width: 100%; height: 3px;
    background: rgba(255,255,255,0.3);
    z-index: 2;
}

.vm-progress-fill {
    height: 100%;
    width: 0%;
    background: #ea794c;
    transition: width 0.25s linear;
}

.vm-feed-video {
    user-drag: none;
    -webkit-user-drag: none;
    user-select: none;
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Memory detail reader — title, byline, actions and the phone layout
   (memory-carousel-content.html). Desktop keeps the 490px column with the
   thumbnail strip; phones (≤812px) get a page-like reader: one compact header,
   a swipeable full-width photo hero, the collection chip and title in the
   scrolling body, and a bottom marks bar that sits in the flex column instead
   of floating over the text. Colours come from the design tokens
   (seo/css/ds-tokens.css); the column is hardcoded white, so `.light` pins
   the light palette (design-system/AI_RULES.md §7).
   ═══════════════════════════════════════════════════════════════════════════ */

.memory-detail-title {
    font-family: 'Montserrat', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
    font-size: 36px;
    line-height: 48px;
    font-weight: 600;
    color: var(--ds-ink, #1A1A1A);
    margin: 0 0 24px;
    overflow-wrap: anywhere;
}

.memory-detail-byline {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    font-size: 18px;
    font-weight: 400;
    color: var(--ds-ink-soft, #6B6B6B);
    position: relative;
}

.memory-detail-author {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.memory-detail-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    background-color: var(--ds-surface, #F2F2F7);
    flex-shrink: 0;
}

.memory-detail-username {
    margin: 0;
    font-family: inherit;
    font-size: 18px;
    font-weight: 400;
    color: inherit;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.memory-detail-byline-sep {
    width: 1px;
    height: 20px;
    background: var(--ds-input-border, #D1D5DB);
    flex-shrink: 0;
}

.memory-detail-date {
    white-space: nowrap;
}

.memory-detail-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0 0 16px;
}

.memory-detail-actions .voice-read-btn {
    margin-bottom: 0;
    min-height: 40px;
    box-sizing: border-box;
}

.memory-root-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 16px;
    box-sizing: border-box;
    border-radius: 999px;
    border: 1px solid var(--ds-brand, #EA794C);
    background: #FEE8DF;
    color: var(--ds-ink, #1A1A1A); /* --ds-link is only 4.2:1 on this tint */
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
}

.memory-root-btn:focus-visible {
    outline: 2px solid var(--ds-focus, #EA794C);
    outline-offset: 2px;
}

.memory-root-btn.in-progress {
    background: var(--ds-surface, #F2F2F7);
    border-color: var(--ds-input-border, #D1D5DB);
    color: var(--ds-ink-soft, #6B6B6B);
    cursor: default;
}

.memory-root-btn img {
    width: 24px;
    height: 28px;
    flex-shrink: 0;
}

.memory-root-btn-label {
    margin: 0;
    font: inherit;
    color: inherit;
    white-space: nowrap;
}

/* Phone header: one row, a real 44px button, no more 60px of chrome. */
.memory-mobile-header {
    display: flex;
    align-items: center;
    min-height: 56px;
    padding: 4px 8px;
    box-sizing: border-box;
    border-bottom: 1px solid var(--ds-line, #E8E8E8);
    background: var(--ds-card, #FFFFFF);
    flex-shrink: 0;
}

.memory-mobile-back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 44px;
    padding: 0 12px 0 8px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    font-family: 'SFPROTEXT', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 17px;
    line-height: 20px;
    color: var(--ds-ink, #1A1A1A);
    cursor: pointer;
}

.memory-mobile-back .material-icons-outlined {
    font-size: 24px;
    color: var(--ds-ink-soft, #6B6B6B);
}

/* Collection chip: a one-line breadcrumb above the title (was a 4-line
   banner pinned in the header). Names may be long, so clamp at two lines. */
.memory-collections-info {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0 0 12px;
    font-family: 'SFPROTEXT', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 20px;
    color: var(--ds-ink-soft, #6B6B6B);
    min-width: 0;
}

.memory-collections-icon {
    font-size: 20px;
    line-height: 20px;
    color: var(--ds-brand, #EA794C);
    flex-shrink: 0;
}

.memory-collections-text {
    min-width: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.memory-collections-label {
    margin-right: 4px;
}

.memory-collections-info a {
    color: var(--ds-link, #B25531);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Photo hero (phones only; see the media query). */
.memory-hero {
    display: none;
    position: relative;
    background: var(--ds-surface, #F2F2F7);
}

.memory-hero-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.memory-hero-track::-webkit-scrollbar {
    display: none;
}

.memory-hero-slide {
    flex: 0 0 100%;
    width: 100%;
    aspect-ratio: 4 / 3;
    max-height: 52vh;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    display: block;
    margin: 0;
    padding: 0;
    border: 0;
    background: var(--ds-surface, #F2F2F7);
    cursor: zoom-in;
}

.memory-hero.is-moment .memory-hero-slide {
    aspect-ratio: 3 / 4;
    max-height: 64vh;
}

.memory-hero-slide:focus-visible {
    outline: 2px solid var(--ds-focus, #EA794C);
    outline-offset: -2px;
}

.memory-hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.memory-hero-count {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.6);
    color: #FFFFFF;
    font-family: 'SFPROTEXT', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 12px;
    line-height: 16px;
    font-weight: 600;
    pointer-events: none;
}

/* Full-screen viewer chrome on phones (the viewer itself is .carousel). */
.carousel-mobile-close,
.carousel-mobile-counter {
    display: none;
}

@media screen and (max-width: 812px) {
    .memory-carousel .carousel-wrapper .right-column {
        display: flex;
        flex-direction: column;
        height: 100%;
    }

    .memory-carousel .memory-thumbnail-strip {
        display: none;
    }

    .memory-hero {
        display: block;
    }

    /* The body is the only scroller: it fills the space between the header
       and the marks bar, so nothing is hidden under fixed chrome any more.
       adjustCarouselContentHeight() only runs on desktop, but keep the
       inline max-height inert here anyway. */
    .memory-carousel .content-area {
        flex: 1 1 auto;
        min-height: 0;
        height: auto;
        max-height: none !important;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        font-size: 17px;
    }

    .memory-detail-body {
        padding: 16px 16px 24px !important;
    }

    .memory-detail-title {
        font-size: 24px;
        line-height: 32px;
        margin-bottom: 12px;
    }

    .memory-detail-byline {
        gap: 10px;
        margin-bottom: 16px;
        font-size: 15px;
        line-height: 20px;
    }

    .memory-detail-avatar {
        width: 32px;
        height: 32px;
    }

    .memory-detail-username {
        font-size: 15px;
        font-weight: 500;
        color: var(--ds-ink, #1A1A1A);
    }

    .memory-detail-byline-sep {
        height: 16px;
    }

    .memory-detail-actions {
        margin-bottom: 20px;
    }

    /* Full-screen viewer: opaque media surface, a close button and a counter
       (before this the only way out was tapping the photo). */
    .carousel {
        background: #0A0A0A; /* bg.media: fixed dark photo surface (AI_RULES §3) */
    }

    .carousel-mobile-close {
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: calc(12px + env(safe-area-inset-top, 0px));
        right: 12px;
        width: 44px;
        height: 44px;
        padding: 0;
        border: 0;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.16);
        color: #FFFFFF;
        cursor: pointer;
        z-index: 2;
    }

    .carousel-mobile-close .material-icons-outlined {
        font-size: 26px;
    }

    .carousel-mobile-counter {
        display: block;
        position: absolute;
        left: 50%;
        bottom: calc(16px + env(safe-area-inset-bottom, 0px));
        transform: translateX(-50%);
        padding: 4px 12px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.16);
        color: #FFFFFF;
        font-family: 'SFPROTEXT', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
        font-size: 13px;
        line-height: 18px;
        pointer-events: none;
        z-index: 2;
    }

    .carousel-mobile-counter:empty {
        display: none;
    }

    /* Marks bar: in the flex column, four equal 44px pills + the menu. */
    .memory-marks-container {
        position: static;
        height: auto;
        padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
        flex-shrink: 0;
        display: flex;
        align-items: center;
        gap: 8px;
        border-top: 1px solid var(--ds-line, #E8E8E8);
    }

    .memory-marks-container form {
        flex: 1 1 auto;
        min-width: 0;
    }

    .memory-marks-container form > div {
        gap: 8px;
    }

    .memory-marks-container .marks-counter {
        flex: 1 1 0;
        justify-content: center;
        align-items: center;
        min-height: 44px;
        min-width: 0;
        margin-left: 0;
        padding: 0 8px;
        box-sizing: border-box;
        border-radius: 999px;
        font-size: 15px;
        line-height: 20px;
    }

    .memory-marks-container .marks-counter .mark-icon {
        width: 20px;
        height: 20px;
        margin-right: 6px;
        flex-shrink: 0;
    }

    .memory-marks-container #marks-options {
        position: static;
        order: 2; /* the menu is first in the DOM; keep it at the trailing edge */
        width: 44px;
        height: 44px;
        flex-shrink: 0;
    }

    .memory-marks-container #marks-options .marks-options-menu {
        bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    }

    /* Section headers ("More from <collection>"): two lines at most, the icon
       sits on the first line. */
    .memory-section-header {
        align-items: flex-start;
    }

    .memory-section-header > .material-icons-outlined {
        line-height: 24px;
    }

    .memory-section-header-title {
        flex: 1 1 auto;
        min-width: 0;
        font-size: 17px;
        line-height: 24px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* Related / collection cards: let titles wrap to two lines instead of
       cutting "Batman v Super…" at 13px. */
    .memory-section-card {
        flex: 0 0 156px;
        width: 156px;
    }

    .memory-section-card-image {
        height: 116px;
    }

    .memory-section-card-title {
        font-size: 14px;
        line-height: 18px;
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        min-height: 36px;
    }
}
