/* rlrpb layer on top of the existing desktop. Mobile first. */
:root {
    --serif: 'Instrument Serif', Georgia, serif;
    --pixel-soft: 'Silkscreen', monospace;
    --paper: #fbf8f3;
    --ink: #141212;
    --pink: #ff3b7c;
    --acid: #d9ff3b;
    --ios: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', Arial, sans-serif;
}

/* wallpaper: the warm pastel blur from the first rlrpb issue, plus film grain */
body::after {
    top: -20%; left: -20%; width: 140vw; height: 140dvh;
    background:
        radial-gradient(circle at 70% 25%, #ff9fc4 0%, transparent 34%),
        radial-gradient(circle at 18% 75%, #c7a6ff 0%, transparent 40%),
        radial-gradient(circle at 85% 85%, #b8f5c0 0%, transparent 30%),
        radial-gradient(circle at 25% 15%, #ffd49a 0%, transparent 32%),
        radial-gradient(circle at 50% 55%, #aee6f5 0%, transparent 38%);
    background-color: var(--paper);
    filter: blur(70px) saturate(1.25);
    -webkit-filter: blur(70px) saturate(1.25);
    animation: none;
}
body:not(.crt-mode)::before { opacity: .22; mix-blend-mode: multiply; }

/* iPhone-style badges: flat red pill, white number, no bounce */
.badge, .badge.red {
    top: -7px; right: -7px;
    min-width: 22px; width: auto; height: 22px; padding: 0 6px;
    border-radius: 11px;
    background: #ff3b30;
    color: #fff;
    font: 600 13px/22px var(--ios);
    text-align: center;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .18);
    animation: none !important;
    transform: none !important;
    display: flex; align-items: center; justify-content: center;
}

/* --- the rlrpb widget: issue cover on the home screen --- */
.rl-widget {
    grid-column: 1 / -1;
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    text-decoration: none; color: var(--ink);
}
.rlw-card {
    position: relative; display: block; width: 100%; height: 184px;
    background: var(--paper);
    border-radius: 22px;
    padding: 14px 16px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(40, 10, 50, .16), inset 0 0 0 1px rgba(255, 255, 255, .7);
    text-shadow: none;
    transition: transform .15s;
}
.rl-widget:active .rlw-card { transform: scale(.97); }
.rlw-icon { position: absolute; top: 8px; left: 10px; width: 42%; max-width: 170px; display: flex; flex-direction: column; align-items: center; }
.rlw-tag { width: 100%; transform: rotate(-5deg); }
.rlw-sticker {
    position: absolute; top: 14px; right: 14px; transform: rotate(8deg);
    background: var(--acid); border: 1.5px solid var(--ink);
    font: 10px var(--pixel-soft); padding: 4px 6px;
}
.rlw-text { position: absolute; left: 16px; right: 16px; bottom: 14px; display: block; }
.rlw-text small { display: block; font: 10px var(--font-ui); color: #6b6560; margin-bottom: 4px; }
.rlw-text b { display: block; font: 400 20px/1.05 var(--serif); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rlw-text em { color: var(--pink); }
/* same label style as the other desktop icons */
.rlw-name { font: 700 10px/1.4 var(--font-ui); color: var(--text-dark, #2d2d2d); margin-top: 2px; }

/* phones: the widget shrinks to one icon row, a slim strip, so page 1 keeps
   the same 3 x 3 rhythm as the rest of the home screen */
@media (max-width: 768px) {
    .rl-widget { align-self: center; }
    .rlw-card {
        height: 88px; padding: 0 14px 0 8px; border-radius: 18px;
        display: flex; align-items: center; gap: 10px;
    }
    .rlw-icon { position: static; width: 84px; flex: none; }
    .rlw-sticker { display: none; }
    .rlw-text { position: static; min-width: 0; }
    .rlw-text small { font-size: 9px; margin-bottom: 2px; }
    .rlw-text b { font-size: 16px; }
}

@media (min-width: 769px) {
    .rl-widget { width: 400px; }
    .rlw-card { height: 212px; }
    .rlw-text b { font-size: 23px; }
}

/* the drawn tag on the widget head */
.rlw-tag { width: 100%; transform: rotate(-5deg); }
