.micro-modules {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin: 0 0 34px
}

.micro-modules article {
    min-height: 220px;
    box-sizing: border-box;
    padding: 17px 18px;
    border-top: 2px solid #84b9c4;
    background: rgba(255, 255, 255, .34);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #84b9c4 transparent
}

.micro-modules article::-webkit-scrollbar { width: 4px }
.micro-modules article::-webkit-scrollbar-thumb { background: #84b9c4; border-radius: 99px }

.micro-modules strong {
    display: block;
    font: 500 22px/1.2 "Playfair Display", serif;
    letter-spacing: -.04em
}

.micro-modules span {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.6
}

.tools-module {
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 3
}

.tools-module strong { margin-bottom: 10px }

.tools-links {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-right: 5px;
    scrollbar-width: thin;
    scrollbar-color: #84b9c4 transparent
}

.tools-links::-webkit-scrollbar { width: 4px }
.tools-links::-webkit-scrollbar-thumb { background: #84b9c4; border-radius: 99px }

.tool-link {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 0;
    border-top: 1px solid rgba(37, 53, 69, .16);
    color: var(--ink);
    font: 10px/1.35 "DM Mono", monospace;
    text-decoration: none;
    transition: color .2s ease, transform .2s ease
}

.tool-link:hover {
    color: #3f8390;
    transform: translateX(3px)
}

.tool-link span {
    margin: 0;
    color: #66959d;
    font-size: 12px
}

/* Decorative visuals should never cover readable content. */
.notes .sky-postcard,
.about > .sky-postcard,
.works > .sky-postcard,
.about-mascot,
.notes-mascot {
    z-index: 2
}

/* The weather Polaroid is a phone-only accent; desktop keeps its original layout. */
.weather-photo { display: none }

/* Desktop home for the original Onmyoji Polaroid. */
.current-game-module { position: relative; overflow: hidden !important }
.current-game-module > :not(.onmyoji-source) { position: relative; z-index: 3 }
.current-game-module .onmyoji-source {
    position: absolute;
    z-index: 2;
    right: 10px;
    bottom: 7px;
    top: auto;
    width: 165px;
    margin: 0;
    padding: 5px 5px 20px;
    transform: rotate(5deg);
}
.current-game-module .onmyoji-source span {
    bottom: 5px;
    left: 8px;
    margin: 0;
    font: 9px/1.25 "DM Mono", monospace;
}

.notes .section-top,
.notes .note-stream,
.notes .micro-modules,
.notes .text-link,
.about .about-label,
.about .about-content,
.career .section-top,
.career .career-intro,
.career .timeline,
.works .section-top,
.works .work-grid,
.works .music-module {
    position: relative;
    z-index: 3
}

/* Keep floating photos visible above the widget backgrounds. */
.notes .note-widgets { z-index: auto }

/* Widget backgrounds stay behind artwork, while their text stays readable above it. */
.weather-widget > *,
.todo-widget > *,
/* Calendar layering: dates always remain readable above artwork and background. */
/* Do not create a widget-wide stacking context: only the date grid should
   rise above a floating postcard, rather than covering it with the card. */
.calendar-widget { isolation: auto }
.calendar-widget .image-orbit { z-index: 2 }
.calendar-widget .eyebrow,
.calendar-widget .calendar-toolbar,
.calendar-widget .calendar-today,
.calendar-widget .calendar-weekdays { position: relative; z-index: 4 }
.calendar-widget .calendar-days,
.calendar-widget .calendar-days span { position: relative; z-index: 6 }

.work-media-slot { z-index: 2 }
.work > div:not(.work-media-slot) { position: relative; z-index: 3 }

.about-facts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 25px 0
}

.about-facts span {
    padding: 10px 8px;
    border-top: 1px solid var(--line);
    font: 10px/1.5 "DM Mono", monospace;
    color: #58787e
}

.about-facts b {
    display: block;
    color: var(--ink);
    font-weight: 500
}

.credential-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: -25px 0 26px
}

.credential-strip span {
    padding: 4px 8px;
    border: 1px solid #9cc7ca;
    border-radius: 99px;
    color: #517e83;
    font: 9px "DM Mono", monospace;
    letter-spacing: .03em
}

.music-module {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 66px;
    padding: 36px;
    background: rgba(9, 37, 48, .19);
    border: 1px solid rgba(219, 243, 240, .3)
}

.music-copy h3 {
    margin: 0;
    font-size: clamp(29px, 3vw, 44px);
    line-height: 1;
    letter-spacing: -.06em
}

.music-copy h3 em {
    font-family: "Playfair Display", serif;
    font-weight: 500
}

.music-copy>p:last-child {
    max-width: 330px;
    font-size: 12px;
    line-height: 1.7
}

.player {
    display: flex;
    align-items: center;
    gap: 20px;
    border-left: 1px solid rgba(222, 247, 245, .35);
    padding-left: 30px
}

.vinyl {
    width: 92px;
    height: 92px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: repeating-radial-gradient(circle, #202e36 0 4px, #4a6770 5px 7px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, .25)
}

.vinyl:before {
    content: "";
    display: block;
    width: 28px;
    height: 28px;
    margin: 32px;
    border-radius: 50%;
    background: #b8dcd7
}

.vinyl i {
    display: block;
    width: 6px;
    height: 6px;
    margin: -49px auto;
    background: #263b44;
    border-radius: 50%
}

.track {
    flex: 1
}

.track p {
    margin: 0;
    font: 500 13px "DM Mono", monospace
}

.track span {
    display: block;
    margin: 6px 0;
    color: #d4ebea;
    font: 10px "DM Mono", monospace
}

.track input {
    width: 100%;
    accent-color: #d2f0eb
}

.track button {
    margin-top: 9px;
    border: 1px solid #d2f0eb;
    background: transparent;
    color: #fff;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer
}

.player.is-playing .vinyl {
    animation: spin 4s linear infinite
}

@media(max-width:760px) {

    .micro-modules,
    .about-facts {
        grid-template-columns: 1fr
    }

    .credential-strip {
        margin-top: 0
    }

    .music-module {
        grid-template-columns: 1fr;
        margin-top: 45px;
        padding: 25px
    }

    .player {
        border-left: 0;
        border-top: 1px solid rgba(222, 247, 245, .35);
        padding: 20px 0 0
    }

    .vinyl {
        width: 72px;
        height: 72px
    }

    .vinyl:before {
        width: 22px;
        height: 22px;
        margin: 25px
    }

    .vinyl i {
        margin: -37px auto
    }
}
