:root {
    --motd-ts-indigo: #171a3a;
    --motd-ts-indigo-soft: #272553;
    --motd-ts-plum: #39205f;
    --motd-ts-purple: #6f3fa0;
    --motd-ts-lavender: #ede4f4;
    --motd-ts-cream: #fbf7ee;
    --motd-ts-pearl: #fffdf8;
    --motd-ts-gold: #c69a45;
    --motd-ts-gold-light: #e1be72;
    --motd-ts-sapphire: #355c91;
    --motd-ts-ink: #3f3947;
    --motd-ts-muted: #5b5963;
}

.motd-ts-section,
.motd-ts-updates {
    box-sizing: border-box;
    color: var(--motd-ts-ink);
    font-family: "Plus Jakarta Sans", "Noto Sans", Arial, sans-serif;
}

.motd-ts-section *,
.motd-ts-updates * {
    box-sizing: border-box;
}

.motd-ts-section {
    padding: clamp(40px, 5vw, 72px) clamp(18px, 4vw, 52px);
    background:
        radial-gradient(circle at 50% 0%, rgba(225, 190, 114, .13), transparent 34%),
        linear-gradient(180deg, var(--motd-ts-pearl), var(--motd-ts-cream));
}

.motd-ts-section-head,
.motd-ts-updates-head {
    max-width: 760px;
    margin: 0 auto 30px;
    text-align: center;
}

.motd-ts-section-head > span,
.motd-ts-updates-head > span,
.motd-ts-eyebrow,
.motd-ts-oracle-meta > span {
    display: block;
    margin-bottom: 7px;
    color: #8a5f1c;
    font: 700 12px/1.4 "Plus Jakarta Sans", "Noto Sans", Arial, sans-serif;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.motd-ts-section-head h2,
.motd-ts-updates-head h2 {
    margin: 0 0 10px;
    color: var(--motd-ts-plum);
    font: 600 clamp(24px, 2.5vw, 32px)/1.16 "Cormorant Garamond", "EB Garamond", Georgia, serif;
    text-wrap: balance;
}

.motd-ts-section-head p,
.motd-ts-updates-head p {
    margin: 0;
    color: var(--motd-ts-muted);
    font-size: 16px;
    line-height: 1.65;
}

.motd-ts-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
    width: min(1320px, 100%);
    margin: 0 auto;
}

.motd-ts-slot {
    min-width: 0;
}

.motd-ts-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    border: 1px solid rgba(198, 154, 69, .42);
    border-radius: 16px;
    color: var(--motd-ts-ink);
    background: rgba(255, 253, 248, .98);
    box-shadow: 0 10px 28px rgba(23, 26, 58, .10);
}

.motd-ts-card::after {
    position: absolute;
    inset: 6px;
    z-index: 0;
    border: 1px solid rgba(225, 190, 114, .22);
    border-radius: 11px;
    content: "";
    pointer-events: none;
}

.motd-ts-media,
.motd-ts-symbol,
.motd-ts-number-portrait,
.motd-ts-moon-visual,
.motd-ts-journal-image {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 176px;
    min-height: 176px;
}

.motd-ts-media {
    overflow: hidden;
    background: linear-gradient(145deg, var(--motd-ts-indigo), var(--motd-ts-plum));
}

.motd-ts-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.motd-ts-media-button {
    display: block;
    padding: 0;
    border: 0;
    border-radius: 0;
    cursor: pointer;
}

.motd-ts-media-button:focus-visible {
    outline: 4px solid var(--motd-ts-sapphire);
    outline-offset: -4px;
}

.motd-ts-oracle-image {
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at 50% 40%, rgba(225, 190, 114, .20), transparent 44%),
        linear-gradient(145deg, #231641, #5b326d);
}

.motd-ts-oracle-image img {
    width: auto;
    max-width: 88%;
    height: 160px;
    object-fit: contain;
    filter: drop-shadow(0 7px 12px rgba(0, 0, 0, .28));
}

.motd-ts-oracle-meta {
    position: relative;
    z-index: 1;
    padding: 13px 17px 0;
    text-align: center;
}

.motd-ts-oracle-meta > span {
    margin-bottom: 2px;
}

.motd-ts-oracle-meta small {
    color: var(--motd-ts-muted);
    font-size: 12px;
    line-height: 1.35;
}

.motd-ts-lock {
    position: absolute;
    top: 11px;
    right: 11px;
    padding: 5px 8px;
    border: 1px solid rgba(255, 255, 255, .5);
    border-radius: 999px;
    color: #fff;
    background: rgba(23, 26, 58, .88);
    font: 700 10px/1.2 "Plus Jakarta Sans", Arial, sans-serif;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.motd-ts-copy {
    position: relative;
    z-index: 1;
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    padding: 18px 18px 21px;
    text-align: center;
}

.motd-ts-copy small {
    display: block;
    margin-top: 9px;
    color: var(--motd-ts-muted);
    font-size: 12px;
    line-height: 1.45;
}

.motd-ts-copy h3,
.motd-ts-update-copy h3 {
    margin: 0 0 9px;
    color: var(--motd-ts-plum);
    font: 600 clamp(18px, 1.35vw, 21px)/1.2 "Cormorant Garamond", "EB Garamond", Georgia, serif;
    overflow-wrap: anywhere;
    text-wrap: balance;
}

.motd-ts-copy p,
.motd-ts-update-copy p {
    margin: 0 0 12px;
    color: var(--motd-ts-ink);
    font-size: 14px;
    line-height: 1.55;
}

.motd-ts-member-note {
    color: #604b69;
    font-size: 13px;
}

.motd-ts-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    margin-top: auto;
    padding: 10px 17px;
    border: 1px solid var(--motd-ts-gold);
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--motd-ts-plum), var(--motd-ts-indigo));
    box-shadow: 0 5px 14px rgba(23, 26, 58, .16);
    font: 700 13px/1.2 "Plus Jakarta Sans", "Noto Sans", Arial, sans-serif;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.motd-ts-button:hover,
.motd-ts-button:focus-visible {
    color: var(--motd-ts-indigo);
    background: linear-gradient(135deg, #f3dfa9, var(--motd-ts-gold-light));
    box-shadow: 0 7px 18px rgba(138, 95, 28, .24);
    transform: translateY(-1px);
}

.motd-ts-button:focus-visible,
.motd-ts-text-link:focus-visible {
    outline: 3px solid rgba(53, 92, 145, .42);
    outline-offset: 3px;
}

.motd-ts-button:disabled {
    opacity: .65;
    cursor: wait;
}

.motd-ts-button-secondary {
    color: var(--motd-ts-plum);
    background: transparent;
}

.motd-ts-number-portrait {
    display: grid;
    place-items: center;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(23, 26, 58, .05), rgba(23, 26, 58, .58)),
        url("../img/seraphina-guided-number.webp") center 38% / cover no-repeat,
        linear-gradient(145deg, var(--motd-ts-indigo), var(--motd-ts-plum));
}

.motd-ts-number-portrait span {
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    padding: 6px;
    border: 3px solid var(--motd-ts-gold-light);
    border-radius: 50%;
    color: var(--motd-ts-plum);
    background: radial-gradient(circle, var(--motd-ts-pearl) 52%, #ead8aa 100%);
    box-shadow: 0 0 0 6px rgba(225, 190, 114, .22), 0 8px 22px rgba(23, 26, 58, .34);
    font: 600 27px/1 "Cormorant Garamond", "EB Garamond", Georgia, serif;
    text-align: center;
}

.motd-ts-moon-visual {
    display: grid;
    place-items: center;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 50%, rgba(237, 228, 244, .30), transparent 48%),
        linear-gradient(145deg, #39205f, #7d568d);
    isolation: isolate;
}

.motd-ts-moon-visual img {
    width: 148px;
    height: 148px;
    object-fit: contain;
    filter: drop-shadow(0 0 15px rgba(225, 190, 114, .25));
    mix-blend-mode: screen;
}

.motd-ts-symbol {
    display: grid;
    place-items: center;
    color: #f5d884;
    background: linear-gradient(145deg, var(--motd-ts-indigo), var(--motd-ts-plum));
    font-size: 72px;
    text-shadow: 0 0 22px rgba(245, 216, 132, .42);
}

.motd-ts-journal-image {
    display: grid;
    place-items: center;
    overflow: hidden;
    padding: 7px;
    background:
        radial-gradient(circle at 50% 35%, rgba(255, 253, 248, .98), rgba(237, 228, 244, .68)),
        linear-gradient(145deg, var(--motd-ts-lavender), var(--motd-ts-cream));
}

.motd-ts-journal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 9px;
}

.motd-ts-moon-sign {
    color: var(--motd-ts-sapphire);
    font-weight: 700;
}

.motd-ts-audio {
    width: 100%;
    height: 40px;
    margin: 2px 0 12px;
}

.motd-ts-status {
    display: block;
    min-height: 1.2em;
    margin-top: 8px;
    color: var(--motd-ts-plum);
    font-size: 12px;
}

.motd-ts-dialog[hidden] {
    display: none;
}

.motd-ts-dialog {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: grid;
    place-items: center;
    padding: 22px;
}

.motd-ts-dialog-shade {
    position: absolute;
    inset: 0;
    background: rgba(17, 12, 34, .80);
    backdrop-filter: blur(4px);
}

.motd-ts-dialog-panel {
    position: relative;
    z-index: 1;
    width: min(760px, 100%);
    max-height: min(84vh, 860px);
    overflow: auto;
    padding: clamp(27px, 5vw, 48px);
    border: 1px solid var(--motd-ts-gold);
    border-radius: 18px;
    color: var(--motd-ts-ink);
    background: var(--motd-ts-pearl);
    box-shadow: 0 24px 70px rgba(0, 0, 0, .38);
}

.motd-ts-dialog-panel h2,
.motd-ts-dialog-panel h3 {
    color: var(--motd-ts-plum);
    font-family: "Cormorant Garamond", "EB Garamond", Georgia, serif;
}

.motd-ts-dialog-panel h2 {
    margin: 0 0 16px;
    font-size: clamp(27px, 4vw, 39px);
    line-height: 1.13;
}

.motd-ts-dialog-panel h3 {
    margin: 24px 0 8px;
    font-size: 23px;
}

.motd-ts-dialog-panel p {
    color: var(--motd-ts-ink);
    font-size: 16px;
    line-height: 1.65;
}

.motd-ts-dialog-close {
    position: absolute;
    top: 13px;
    right: 13px;
    z-index: 2;
    display: grid;
    width: 44px;
    height: 44px;
    padding: 0;
    place-items: center;
    border: 1px solid rgba(57, 32, 95, .22);
    border-radius: 50%;
    color: var(--motd-ts-plum);
    background: var(--motd-ts-pearl);
    font: 400 29px/1 Arial, sans-serif;
    cursor: pointer;
}

.motd-ts-oracle-dialog {
    display: grid;
    grid-template-columns: minmax(170px, 240px) 1fr;
    gap: clamp(24px, 4vw, 42px);
    width: min(900px, 100%);
    align-items: center;
}

.motd-ts-dialog-card {
    display: grid;
    min-height: 350px;
    place-items: center;
    padding: 18px;
    border-radius: 14px;
    background:
        radial-gradient(circle, rgba(225, 190, 114, .18), transparent 50%),
        linear-gradient(145deg, #20143b, #533064);
}

.motd-ts-dialog-card img {
    width: 100%;
    max-height: 430px;
    object-fit: contain;
    filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .30));
}

.motd-ts-dialog-deck {
    margin: 0 0 5px;
    color: var(--motd-ts-muted);
    font-size: 13px;
}

.motd-ts-dialog-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.motd-ts-dialog-actions .motd-ts-button {
    margin-top: 0;
}

body.motd-ts-dialog-open {
    overflow: hidden;
}

.motd-ts-updates {
    padding: clamp(40px, 5vw, 72px) clamp(18px, 4vw, 52px);
    background: transparent;
}

.motd-ts-updates-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    width: min(1120px, 100%);
    margin: 0 auto;
}

.motd-ts-update-card {
    display: grid;
    grid-template-columns: 124px minmax(0, 1fr);
    min-height: 166px;
    overflow: hidden;
    border: 1px solid rgba(198, 154, 69, .38);
    border-radius: 15px;
    color: var(--motd-ts-ink);
    background: var(--motd-ts-pearl);
    box-shadow: 0 8px 24px rgba(23, 26, 58, .08);
}

.motd-ts-update-image {
    position: relative;
    min-height: 166px;
    overflow: hidden;
    background: linear-gradient(145deg, var(--motd-ts-indigo), var(--motd-ts-plum));
}

.motd-ts-update-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.motd-ts-update-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    padding: 17px;
}

.motd-ts-update-copy .motd-ts-eyebrow {
    font-size: 10px;
}

.motd-ts-update-copy h3 {
    font-size: clamp(17px, 1.25vw, 19px);
    line-height: 1.22;
}

.motd-ts-update-copy time {
    margin-top: auto;
    color: var(--motd-ts-muted);
    font-size: 12px;
}

.motd-ts-text-link {
    display: inline-block;
    margin-top: 7px;
    color: var(--motd-ts-plum);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.motd-ts-text-link:hover {
    color: var(--motd-ts-sapphire);
}

.motd-ts-updates-empty {
    max-width: 680px;
    margin: 0 auto;
    color: var(--motd-ts-muted);
    text-align: center;
}

@media (max-width: 1180px) {
    .motd-ts-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .motd-ts-updates-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .motd-ts-grid,
    .motd-ts-updates-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .motd-ts-oracle-dialog {
        display: block;
    }

    .motd-ts-dialog-card {
        width: min(260px, 100%);
        min-height: 250px;
        margin: 0 auto 24px;
    }
}

@media (max-width: 540px) {
    .motd-ts-grid,
    .motd-ts-updates-grid {
        grid-template-columns: 1fr;
    }

    .motd-ts-card {
        max-width: 390px;
        margin: 0 auto;
    }

    .motd-ts-update-card {
        grid-template-columns: 112px minmax(0, 1fr);
    }

    .motd-ts-dialog {
        padding: 12px;
    }

    .motd-ts-dialog-panel {
        padding: 52px 22px 28px;
    }

    .motd-ts-dialog-actions {
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    .motd-ts-button {
        transition: none;
    }

    .motd-ts-button:hover,
    .motd-ts-button:focus-visible {
        transform: none;
    }
}
