.calendar {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.calendar-nav {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.calendar-nav-btn {
    font-size: 1.2rem;
    color: var(--text-muted);
    display: inline-block;
    unicode-bidi: isolate;
    direction: ltr;
}

.calendar-nav-btn:hover {
    color: var(--schedule-accent);
    background-color: var(--schedule-accent-soft);
}

[dir="rtl"] .calendar-nav-btn {
    transform: scaleX(-1);
}

.calendar-month-label {
    flex: 1;
    text-align: center;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-main);
}

.calendar-today-row {
    display: flex;
    justify-content: center;
}

.calendar-today-btn {
    background-color: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.3rem 0.6rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.calendar-today-btn:hover {
    color: var(--schedule-accent);
    border-color: var(--schedule-accent);
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    text-align: center;
    font-size: 0.66rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 3px;
}

.cal-day {
    position: relative;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-elevated);
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.8rem;
    cursor: pointer;
    padding: 0;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.cal-day:hover {
    border-color: var(--schedule-accent);
}

.cal-day--pad {
    background-color: transparent;
    cursor: default;
    visibility: hidden;
}

.cal-day--today {
    border-color: var(--schedule-accent);
    color: var(--schedule-accent);
    font-weight: 700;
}

.cal-day--selected {
    background-color: var(--schedule-accent);
    border-color: var(--schedule-accent);
    color: #0b1120;
    font-weight: 700;
}

.cal-day-dot {
    display: none;
    position: absolute;
    bottom: 5px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: var(--schedule-accent);
}

.cal-day--has-events .cal-day-dot {
    display: block;
}

.cal-day--selected .cal-day-dot {
    background-color: #0b1120;
}

.cal-day--past.cal-day--has-events:not(.cal-day--selected) {
    color: var(--text-muted);
}

.cal-day--past:not(.cal-day--selected) .cal-day-dot {
    background-color: var(--text-muted);
}

.schedule-list {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    max-height: 460px;
    overflow-y: auto;
    padding-inline-end: 0.25rem;
}

.schedule-list::-webkit-scrollbar {
    width: 8px;
}

.schedule-list::-webkit-scrollbar-thumb {
    background-color: var(--border);
    border-radius: 8px;
}

.schedule-day-group {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.schedule-day-header {
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--schedule-accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--border-soft);
}

.schedule-card {
    background-color: var(--bg-elevated);
    border: 1px solid var(--border-soft);
    padding: 1rem 1.1rem;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    transition: background-color 0.15s ease;
    animation: fade-in 0.2s ease;
}

.schedule-card--past {
    opacity: 0.55;
}

.schedule-card:hover {
    background-color: var(--card-bg-hover);
}

.schedule-card.confirming-delete,
.schedule-card.editing {
    flex-direction: column;
    align-items: stretch;
    gap: 0.7rem;
}

.schedule-body {
    flex: 1;
    min-width: 0;
    overflow-wrap: break-word;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.schedule-body--btn {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font-family: inherit;
    color: inherit;
    text-align: start;
    cursor: pointer;
}

.schedule-body-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.schedule-body-chevron {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.3em;
    padding: 0.3rem 0.6rem;
    border-radius: 999px;
    background-color: var(--schedule-accent-soft);
    color: var(--schedule-accent);
    font-size: 0.7rem;
    font-weight: 700;
    white-space: nowrap;
}

/* Arrow chars like ‹/› are Unicode "mirrored" glyphs - inside an RTL-direction
   run the browser auto-flips them, which would cancel out the ‹/› swap above
   and point the arrow the wrong way. Isolating this span at ltr stops that. */
.schedule-body-chevron-arrow {
    display: inline-block;
    unicode-bidi: isolate;
    direction: ltr;
}

.schedule-badge-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.reminder-lead-note {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--idle);
    background-color: var(--idle-soft);
    padding: 0.25rem 0.55rem;
    border-radius: 5px;
    border: 1px solid color-mix(in srgb, var(--idle) 35%, transparent);
}

/* Place reminders get the green "place" hue so a glance separates them from
   the orange time-based badges above. */
.reminder-place-note {
    display: inline-flex;
    align-self: flex-start;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--entity-place);
    background-color: color-mix(in srgb, var(--entity-place) 14%, transparent);
    padding: 0.25rem 0.55rem;
    border-radius: 5px;
    border: 1px solid color-mix(in srgb, var(--entity-place) 35%, transparent);
}

.schedule-body-text {
    font-size: 0.92rem;
    line-height: 1.4;
    overflow-wrap: break-word;
}

.reminder-recur-note {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--idle);
    background-color: var(--idle-soft);
    padding: 0.25rem 0.55rem;
    border-radius: 5px;
    border: 1px solid color-mix(in srgb, var(--idle) 35%, transparent);
}

.btn-remove-reminder {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.85rem;
    line-height: 1;
    padding: 0.25rem;
    border-radius: var(--radius-sm);
    transition: color 0.15s ease, background-color 0.15s ease;
}

.btn-remove-reminder:hover {
    color: var(--idle);
    background-color: var(--idle-soft);
}

/* Two-level hierarchy on the Reminders screen: a section per reminder KIND,
   with date groups nested inside it. Each section's colour matches the badge
   colour used on its own cards, so the eye can pair header to card. */
.reminders-section {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.reminders-section + .reminders-section {
    margin-top: 1.5rem;
}

.reminders-section-header {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

/* Small colour chip instead of a full-width rule - the old bottom border made
   these look like the date headers they now contain. */
.reminders-section-header::before {
    content: '';
    width: 3px;
    height: 0.85em;
    border-radius: 2px;
    background-color: currentColor;
    flex-shrink: 0;
}

.reminders-section--time .reminders-section-header {
    color: var(--schedule-accent);
}

.reminders-section--place .reminders-section-header {
    color: var(--entity-place);
}

.reminders-section--idle .reminders-section-header {
    color: var(--idle);
}

.geo-always-banner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.55rem;
    margin-bottom: 1rem;
    padding: 0.75rem 0.85rem;
    border-radius: var(--radius-md);
    background-color: var(--idle-soft);
    border: 1px solid color-mix(in srgb, var(--idle) 35%, transparent);
}

.geo-always-banner p {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.4;
    color: var(--text-main);
}

.geo-always-banner-btn {
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    border: 1px solid var(--idle);
    background-color: var(--bg-elevated);
    color: var(--idle);
    cursor: pointer;
}

.geo-always-banner-btn:disabled {
    opacity: 0.6;
    cursor: default;
}

/* Nested date header: quieter than the section label above it. */
.reminders-section .schedule-day-header {
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 0.03em;
    border-bottom: none;
    padding-bottom: 0;
}

.btn-remind-add {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background-color: var(--idle-soft);
    border: 1px solid var(--idle);
    color: var(--idle);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1;
    padding: 0.5rem 0.85rem;
    border-radius: var(--radius-md);
    flex-shrink: 0;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.btn-remind-add:hover {
    background-color: var(--idle);
    color: #fff;
}

.schedule-time-badge {
    display: inline-flex;
    align-self: flex-start;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: var(--schedule-accent);
    background-color: var(--schedule-accent-soft);
    padding: 0.2rem 0.5rem;
    border-radius: 5px;
}

.schedule-text {
    font-size: 0.92rem;
    font-weight: 500;
}

.schedule-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* ---------------------------------------------------------------------------
   Reminder cards
   ---------------------------------------------------------------------------
   One row per reminder: a subject icon, the text with at most two lines of
   metadata, and exactly two controls - the safe primary action and a menu.
   Everything else lives behind the menu, so the card stays readable at a
   glance instead of turning into a strip of tiny buttons. */

.rem-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 0.95rem;
    background-color: var(--bg-elevated);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    animation: fade-in 0.2s ease both;
}

.rem-card + .rem-card {
    margin-top: 0.55rem;
}

.rem-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    font-size: 1.05rem;
    background-color: var(--schedule-accent-soft);
    flex-shrink: 0;
}

.rem-body {
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
    min-width: 0;
    text-align: start;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font-family: inherit;
    color: inherit;
    cursor: pointer;
}

.rem-body--static {
    cursor: default;
}

.rem-title {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-main);
    overflow-wrap: anywhere;
}

.rem-meta {
    font-size: 0.76rem;
    color: var(--text-muted);
    overflow-wrap: anywhere;
}

.rem-meta--sub {
    font-size: 0.72rem;
    opacity: 0.85;
    /* Plain text, so it wraps as a sentence - as a flex row the leading emoji
       broke onto a line of its own. */
    display: block;
}

.rem-card--not-armed {
    border-color: color-mix(in srgb, var(--warning) 45%, var(--border));
}

.rem-armed {
    display: block;
}

.rem-armed-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-inline-start: 0.4rem;
    vertical-align: 0.05em;
    border-radius: 50%;
    background-color: var(--success);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 18%, transparent);
}

.rem-place-label {
    min-width: 0;
    overflow-wrap: anywhere;
}

.rem-armed + .rem-armed {
    margin-top: 0.15rem;
}

.rem-armed--ok {
    color: var(--success);
}

.rem-armed--warn {
    color: var(--warning);
}

.rem-armed--danger {
    color: var(--danger);
}

.rem-armed--muted {
    color: var(--text-muted);
}

.rem-actions {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    flex-shrink: 0;
}

.rem-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 50%;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.rem-btn:hover {
    background-color: var(--card-bg-hover);
    color: var(--text-main);
}

/* The safe action reads as the affirmative one, and it is the only control on
   the card with a colour of its own. */
.rem-btn--done {
    border-color: var(--border);
    color: var(--success);
}

.rem-btn--done:hover {
    background-color: var(--success-soft);
    border-color: var(--success);
    color: var(--success);
}

.rem-btn--restore {
    border-color: var(--border);
    color: var(--schedule-accent);
    font-size: 1.15rem;
}

.rem-btn--restore:hover {
    background-color: var(--schedule-accent-soft);
    border-color: var(--schedule-accent);
}

.rem-card--idle .rem-icon {
    background-color: var(--idle-soft);
}

/* Confirm state replaces the row rather than stacking a dialog over it, the
   same way deleting a memory already behaves. */
.rem-card--confirming {
    grid-template-columns: 1fr;
    border-color: var(--danger);
}

.rem-confirm {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.rem-confirm-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-main);
}

.rem-confirm-body {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.rem-confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

/* ---------------------------------------------------------------------------
   Archive
   ---------------------------------------------------------------------------
   Visually a filing drawer, not a second reminders list: the whole section is
   inset, its cards are quieter, flatter and marked complete, and none of them
   carries a primary action. */

.rem-archive {
    margin-top: 1.85rem;
    border-top: 1px solid var(--border-soft);
    padding-top: 0.75rem;
}

.rem-archive-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.5rem 0.15rem;
    background: none;
    border: none;
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    cursor: pointer;
}

.rem-archive-toggle:hover {
    color: var(--text-main);
}

.rem-archive-chevron {
    display: inline-block;
    unicode-bidi: isolate;
    direction: ltr;
    transition: transform 0.18s ease;
    font-size: 0.9rem;
}

[dir="rtl"] .rem-archive-chevron {
    transform: scaleX(-1);
}

.rem-archive.is-open .rem-archive-chevron {
    transform: rotate(90deg);
}

[dir="rtl"] .rem-archive.is-open .rem-archive-chevron {
    transform: scaleX(-1) rotate(-90deg);
}

.rem-archive-label {
    flex: 1;
    text-align: start;
}

.rem-archive-count {
    font-variant-numeric: tabular-nums;
    background-color: var(--border-soft);
    color: var(--text-muted);
    border-radius: 999px;
    padding: 0.1rem 0.5rem;
    letter-spacing: 0;
}

.rem-archive-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-top: 0.6rem;
    padding: 0.55rem;
    border-radius: var(--radius-lg);
    /* The inset panel is what makes the archive read as a container the items
       have been filed into. */
    background-color: var(--card-bg);
    border: 1px solid var(--border-soft);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 3%);
}

.rem-card--archived {
    background-color: transparent;
    border-color: transparent;
    border-inline-start: 2px solid var(--success-soft);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    padding-block: 0.7rem;
    animation: archive-item-in 0.24s ease both;
}

.rem-card--archived + .rem-card--archived {
    margin-top: 0;
    border-top: 1px solid var(--border-soft);
}

.rem-card--archived .rem-title {
    font-weight: 500;
    color: var(--text-muted);
}

.rem-card--archived:hover .rem-title {
    color: var(--text-main);
}

.rem-card--archived .rem-icon {
    width: 1.75rem;
    height: 1.75rem;
    font-size: 0.8rem;
}

.rem-icon--done {
    background-color: var(--success-soft);
    color: var(--success);
    font-weight: 700;
}

@keyframes archive-item-in {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: none; }
}

.rem-archive-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.35rem;
    padding: 1.75rem 1rem;
}

.rem-archive-empty-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    font-size: 1.3rem;
    background-color: var(--border-soft);
    margin-bottom: 0.25rem;
}

.rem-archive-empty-title {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-main);
}

.rem-archive-empty-body {
    font-size: 0.78rem;
    color: var(--text-muted);
    max-width: 22rem;
}

/* Desktop has the room to breathe, and no gestures - so the row gets a little
   more padding and the menu button stops being the only affordance. */
@media (min-width: 640px) {
    .rem-card {
        padding: 1rem 1.1rem;
    }

    .rem-archive-list {
        padding: 0.75rem;
    }
}

/* ---------------------------------------------------------------------------
   Swipe tray + action sheet
   --------------------------------------------------------------------------- */

.card-swipe {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    /* Vertical panning stays with the scroller; horizontal is ours. */
    touch-action: pan-y;
}

.card-swipe + .card-swipe {
    margin-top: 0.55rem;
}

.card-swipe .rem-card {
    margin-top: 0;
}

.card-swipe-tray {
    position: absolute;
    inset-block: 0;
    inset-inline-end: 0;
    display: flex;
    align-items: stretch;
}

.card-swipe-surface {
    position: relative;
    background-color: var(--bg-elevated);
    will-change: transform;
}

.card-tray-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    width: 4.75rem;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.68rem;
    font-weight: 600;
    background-color: var(--schedule-accent-soft);
    color: var(--schedule-accent);
}

.card-tray-btn--edit {
    background-color: var(--idle-soft);
    color: var(--idle);
}

.card-tray-btn--restore {
    background-color: var(--success-soft);
    color: var(--success);
}

.card-tray-btn--delete {
    background-color: var(--danger-soft);
    color: var(--danger);
}

.action-sheet-backdrop {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.45);
    opacity: 0;
    transition: opacity 0.18s ease;
    z-index: 60;
}

.action-sheet-backdrop.is-open {
    opacity: 1;
}

.action-sheet {
    position: fixed;
    inset-inline: 0.75rem;
    bottom: 0.75rem;
    z-index: 61;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.4rem;
    background-color: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    transform: translateY(12px);
    opacity: 0;
    transition: transform 0.18s ease, opacity 0.18s ease;
}

.action-sheet.is-open {
    transform: none;
    opacity: 1;
}

@media (min-width: 640px) {
    .action-sheet {
        inset-inline: auto;
        inset-inline-end: 1.5rem;
        max-width: 20rem;
        width: 20rem;
    }
}

.action-sheet-btn {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.8rem 0.9rem;
    background: none;
    border: none;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.92rem;
    color: var(--text-main);
    cursor: pointer;
    text-align: start;
}

.action-sheet-btn:hover {
    background-color: var(--card-bg-hover);
}

.action-sheet-btn--danger {
    color: var(--danger);
}

.action-sheet-btn--cancel {
    justify-content: center;
    color: var(--text-muted);
    border-top: 1px solid var(--border-soft);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

/* The event time and the reminder time are different facts. The first is plain
   metadata; the second is a marked chip, so a glance separates "the thing
   happens at 18:00" from "MemoIt speaks up 15 minutes earlier". */
.rem-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.rem-when {
    color: var(--text-muted);
}

.rem-lead {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.05rem 0.4rem;
    border-radius: 999px;
    background-color: var(--schedule-accent-soft);
    color: var(--schedule-accent);
    font-weight: 600;
    font-size: 0.72rem;
    white-space: nowrap;
}

/* ---------------------------------------------------------------------------
   Reminder motion
   ---------------------------------------------------------------------------
   Every transition in the section is the same idea: something arrives from
   where it came from, and leaves towards where it is going. Nothing spins,
   nothing bounces. */

.rem-card {
    animation: rem-card-in 0.22s cubic-bezier(0.2, 0.8, 0.3, 1) both;
    transition: background-color 0.15s ease, border-color 0.15s ease, opacity 0.2s ease;
}

@keyframes rem-card-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}

/* Pressing the row gives it a little give, so a tap feels answered even before
   the editor opens. */
.rem-body:active {
    transform: scale(0.995);
}

.rem-btn:active {
    transform: scale(0.9);
}

.rem-btn {
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

/* Done/Restore confirm themselves for a moment before the row leaves. */
.rem-btn--done:active,
.rem-btn--restore:active {
    background-color: var(--success-soft);
}

.rem-card--confirming {
    animation: rem-confirm-in 0.18s ease both;
}

@keyframes rem-confirm-in {
    from { opacity: 0.4; transform: scale(0.99); }
    to { opacity: 1; transform: none; }
}

/* The archive drawer opens rather than appearing. */
.rem-archive-list {
    animation: rem-drawer-open 0.24s cubic-bezier(0.2, 0.8, 0.3, 1) both;
    transform-origin: top center;
}

@keyframes rem-drawer-open {
    from { opacity: 0; transform: translateY(-6px) scaleY(0.97); }
    to { opacity: 1; transform: none; }
}

.rem-archive-empty {
    animation: rem-empty-in 0.3s ease both;
}

.rem-archive-empty-mark {
    animation: rem-empty-mark 0.45s cubic-bezier(0.2, 0.8, 0.3, 1) both;
}

@keyframes rem-empty-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes rem-empty-mark {
    from { opacity: 0; transform: translateY(4px) scale(0.9); }
    to { opacity: 1; transform: none; }
}

/* Anyone who has asked their system to calm down gets none of it. */
@media (prefers-reduced-motion: reduce) {
    .rem-card,
    .rem-card--archived,
    .rem-archive-list,
    .rem-archive-empty,
    .rem-archive-empty-mark,
    .rem-card--confirming {
        animation: none;
    }

    .rem-body:active,
    .rem-btn:active {
        transform: none;
    }
}
