/* ==========================================================================
   THEME RETRO8X9X — phong cách blog Việt (2006–2008) cho JohnCMS 9
   Tất cả class theme mang tiền tố r8- để không xung đột Bootstrap 5
   ========================================================================== */

/* Base rules the module templates rely on (ported from default layout inline style) */
/* LIVE SEARCH AUTOCOMPLETE STYLES */
.live-search-container {
    position: relative;
    width: 100%;
}
.live-search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 9999;
    margin-top: 6px;
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 12px 28px -4px rgba(0, 0, 0, 0.2), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    max-height: 420px;
    overflow-y: auto;
    display: none;
    text-align: left;
}
.live-search-item {
    display: block;
    padding: 10px 14px;
    border-bottom: 1px solid #f1f5f9;
    text-decoration: none;
    color: #1e293b;
    transition: background 0.15s ease;
}
.live-search-item:hover, .live-search-item.active {
    background: #f8fafc;
    text-decoration: none;
}
.live-search-item:last-child {
    border-bottom: none;
}

/* MOBILE RESPONSIVE & HORIZONTAL OVERFLOW PREVENTION */
*, *::before, *::after {
    box-sizing: border-box;
}
img, video, iframe {
    max-width: 100%;
    height: auto;
}
pre, code {
    max-width: 100%;
    overflow-x: auto;
    word-break: break-word;
    white-space: pre-wrap;
}
table {
    max-width: 100%;
    overflow-x: auto;
}
.topic-thumbnail {
    width: 95px;
    height: 75px;
    object-fit: cover;
}
@media (max-width: 576px) {
    .topic-thumbnail {
        width: 72px !important;
        height: 56px !important;
    }
}

/* Override topic thumbnail according to retro prototype */
.r8-theme .topic-thumbnail {
    width: 110px;
    height: 90px;
    object-fit: cover;
    border: 1px solid #6cb6e0;
    border-radius: 3px;
    box-shadow: none;
}
@media (max-width: 640px) {
    .r8-theme .topic-thumbnail {
        width: 72px !important;
        height: 56px !important;
    }
}

:root {
    --r8-bg: #bfe3f6;
    --r8-site-bg: #f4fbff;
    --r8-box-bg: #ffffff;
    --r8-box-border: #6cb6e0;
    --r8-box-border-dark: #2b8fd0;
    --r8-title-top: #8fd3f5;
    --r8-title-mid: #2f95d6;
    --r8-title-bot: #1a78bd;
    --r8-text: #1d2b3a;
    --r8-muted: #5b6b7c;
    --r8-link: #0b4fa3;
    --r8-dark: #0b4fa3;
    --r8-link-hover: #e0127a;
    --r8-hot: #e0127a;
    --r8-pink: #ff4fa3;
    --r8-yellow: #ffe36e;
    --r8-green: #1f8a2e;
    --r8-orange: #e86a00;
    --r8-radius: 4px;
    --r8-font: Tahoma, Verdana, Geneva, "Segoe UI", Arial, sans-serif;
    --r8-font-fun: "Comic Sans MS", "Segoe Print", cursive;
}

/* Base style in retro theme */
html.r8-theme {
    color-scheme: light;
    max-width: 100%;
    overflow-x: hidden;
}

.r8-theme body {
    margin: 0;
    max-width: 100%;
    overflow-x: hidden;
    position: relative;
    color: var(--r8-text);
    font: 13px/1.55 var(--r8-font);
    background: var(--r8-bg) url("../images/retro-snow.svg") repeat !important;
}

.r8-theme body.dark {
    color: var(--r8-text) !important;
    background: var(--r8-bg) url("../images/retro-snow.svg") repeat !important;
}

.r8-theme *,
.r8-theme *::before,
.r8-theme *::after {
    box-sizing: border-box;
}

/* Site Frame */
.r8-site {
    max-width: 1000px;
    width: 100%;
    overflow-x: clip;
    margin: 0 auto;
    background: var(--r8-site-bg);
    border-left: 2px solid var(--r8-box-border);
    border-right: 2px solid var(--r8-box-border);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, .6);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.r8-banner {
    display: block;
    line-height: 0;
    background: #5fc0ef;
}

.r8-banner img {
    width: 100%;
    height: auto;
    display: block;
}

/* Top Horizontal Navigation */
.r8-topnav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    background: linear-gradient(#3aa0e0, #1569a8);
    border-top: 1px solid #b8e4fb;
    border-bottom: 3px solid var(--r8-yellow);
}

.r8-topnav a {
    color: #fff !important;
    font-weight: bold;
    padding: 7px 10px;
    border-right: 1px solid rgba(255, 255, 255, .25);
    text-shadow: 1px 1px 0 #0a4a7a;
    text-decoration: none;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.r8-topnav a:hover,
.r8-topnav a[aria-current="page"] {
    background: linear-gradient(#ffb3dc, #ff4fa3);
    color: #fff !important;
    text-decoration: none;
}

.r8-topnav a i {
    font-size: 13px;
    margin-right: 4px;
    color: rgba(255, 255, 255, .9);
}

.r8-topnav a .r8-new,
.r8-topnav a .r8-hot {
    margin-left: 4px;
    text-shadow: none;
}

/* Ticker (Marquee) */
.r8-ticker {
    overflow: hidden;
    white-space: nowrap;
    background: #fffbe0;
    border-bottom: 1px dashed var(--r8-box-border);
    padding: 4px 0;
    font-weight: bold;
    color: var(--r8-hot);
    font-size: 12px;
}

.r8-ticker__track {
    display: inline-block;
    padding-left: 32%;
    animation: r8-ticker 28s linear infinite;
}

.r8-ticker:hover .r8-ticker__track {
    animation-play-state: paused;
}

.r8-ticker__track span {
    margin-right: 40px;
}

@keyframes r8-ticker {
    to {
        transform: translateX(-100%);
    }
}

/* 3-Column Layout */
.r8-layout {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr) 190px;
    grid-template-areas: "left main right";
    gap: 6px;
    padding: 6px;
    flex: 1 0 auto;
}

.r8-col-left  { grid-area: left; }
.r8-col-main  { grid-area: main; min-width: 0; }
.r8-col-right { grid-area: right; }

/* Box Component */
.r8-box {
    background: var(--r8-box-bg);
    border: 1px solid var(--r8-box-border);
    border-radius: var(--r8-radius);
    margin-bottom: 6px;
    overflow: hidden;
    box-shadow: 1px 1px 0 #e3f3fc inset;
}

.r8-box__title {
    margin: 0;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: bold;
    text-align: center;
    color: #fff;
    text-shadow: 1px 1px 0 #0a4a7a;
    background: linear-gradient(var(--r8-title-top), var(--r8-title-mid) 50%, var(--r8-title-bot) 51%, #3aa0e0);
    border-bottom: 1px solid var(--r8-box-border-dark);
}

.r8-box__title a,
.r8-box__title a:visited {
    color: #ffffff !important;
    text-decoration: none;
}

.r8-box__title a:hover {
    color: #ffffdd !important;
    text-decoration: underline;
}

.r8-box__title::before,
.r8-box__title::after {
    content: "✦";
    color: var(--r8-yellow);
    margin: 0 6px;
}

.r8-box__more {
    float: right;
    color: #ffffff !important;
    font-size: 11px;
    font-weight: normal;
    text-decoration: none;
    margin-right: -2px;
    text-shadow: none;
}

.r8-box__more:hover {
    color: #ffffdd !important;
    text-decoration: underline;
}

.r8-box__body {
    padding: 6px 8px;
    font-size: 12.5px;
}

.r8-box__body > :first-child { margin-top: 0; }
.r8-box__body > :last-child { margin-bottom: 0; }

/* Sidebar link lists */
.r8-list {
    list-style: none;
    margin: 0;
    padding: 4px 6px;
}

.r8-list > li {
    padding: 2px 0 2px 16px;
    position: relative;
    border-bottom: 1px dotted #d6ecf8;
    font-size: 12px;
}

.r8-list > li:last-child {
    border-bottom: 0;
}

.r8-list > li::before {
    content: "❀";
    position: absolute;
    left: 0;
    top: 2px;
    color: var(--r8-pink);
    font-size: 11px;
}

.r8-list--note > li::before {
    content: "♫";
    color: var(--r8-title-mid);
}

.r8-list--star > li::before {
    content: "★";
    color: #f0a500;
}

/* Sidebar Forum Tree Menu (.r8-tree) */
.r8-tree {
    list-style: none;
    margin: 0;
    padding: 4px 6px;
}

.r8-tree ul {
    list-style: none;
    margin: 0;
    padding-left: 10px;
}

.r8-tree li {
    position: relative;
    padding: 2px 0;
    font-size: 12px;
    border-bottom: 1px dotted #e3f3fc;
}

.r8-tree li:last-child {
    border-bottom: 0;
}

.r8-tree__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
}

.r8-tree__link {
    color: var(--r8-dark);
    text-decoration: none;
    font-weight: bold;
    flex-grow: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.r8-tree__link:hover {
    color: var(--r8-pink);
    text-decoration: underline;
}

.r8-tree__sublink {
    color: #444;
    text-decoration: none;
    font-weight: normal;
    font-size: 11.5px;
    flex-grow: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.r8-tree__sublink::before {
    content: "» ";
    color: var(--r8-title-mid);
    font-weight: bold;
}

.r8-tree__sublink:hover {
    color: var(--r8-pink);
    text-decoration: underline;
}

.r8-tree__toggle {
    background: #f0f7fd;
    border: 1px solid #a9d4f0;
    color: #1a5aa8;
    font-family: monospace;
    font-size: 10px;
    line-height: 1;
    padding: 1px 4px;
    border-radius: 2px;
    cursor: pointer;
    flex-shrink: 0;
}

.r8-tree__toggle::before {
    content: "[-]";
}

.r8-tree__toggle.collapsed::before,
.r8-tree__toggle[aria-expanded="false"]::before {
    content: "[+]";
}

.r8-tree__toggle:hover {
    background: #d6ecf8;
}

.r8-tree__count {
    color: #888;
    font-size: 10.5px;
    font-weight: normal;
    margin-left: 4px;
}

/* Blinking badges */
.r8-new,
.r8-hot {
    display: inline-block;
    margin-left: 3px;
    padding: 0 3px;
    font: bold 9px/13px Verdana, sans-serif;
    color: #fff;
    border-radius: 2px;
    vertical-align: middle;
    animation: r8-blink 1s steps(2, start) infinite;
}

.r8-new { background: #e8201a; }
.r8-hot { background: linear-gradient(#ffa400, #ff5a00); }

@keyframes r8-blink {
    to { visibility: hidden; }
}

/* Retro Helpers */
.r8-rainbow {
    font-family: var(--r8-font-fun);
    font-weight: bold;
    background: linear-gradient(90deg, #e8201a, #ff8a00, #e6c200, #1f8a2e, #1a78bd, #7b2fd0, #e0127a);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.r8-c-pink   { color: var(--r8-hot); }
.r8-c-green  { color: var(--r8-green); }
.r8-c-orange { color: var(--r8-orange); }
.r8-c-blue   { color: var(--r8-title-bot); }
.r8-center   { text-align: center; }
.r8-muted    { color: var(--r8-muted); }
.r8-small    { font-size: 11px; }

/* Welcome Box & Clock */
.r8-welcome { text-align: center; }
.r8-welcome p { margin: 4px 0; }
.r8-clock { color: var(--r8-orange); font-weight: bold; }

/* "Thơ chế" box (homepage right column). Times New Roman: Georgia splits Vietnamese stacked marks. */
.r8-poem {
    margin: 0;
    padding: 6px 8px;
    font: italic 13px/1.6 "Times New Roman", Times, serif;
    color: #6b4e00;
    background: #fffbe0;
    border: 1px dashed #f0d98a;
    border-radius: 3px;
    text-align: center;
    overflow-wrap: anywhere;
}

.r8-poem__title {
    margin: 0 0 4px;
    font-weight: bold;
    color: var(--r8-hot);
    text-align: center;
}

/* Thumbnails: same frame as .thumb in 8x9x/assets/css/style.css:198-207 and :635 */
.r8-thumb {
    flex: 0 0 64px;
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 2px solid #fff;
    outline: 1px solid var(--r8-box-border);
    border-radius: 3px;
    background: linear-gradient(135deg, #ffd1ea, #bfe6fa);
    font-size: 30px;
    line-height: 1;
    text-decoration: none;
}
.r8-thumb:hover {
    text-decoration: none;
}
.r8-thumb--b { background: linear-gradient(135deg, #fff6a8, #b6f0b0); }
.r8-thumb--c { background: linear-gradient(135deg, #d9c8ff, #ffc8d6); }
.r8-thumb--d { background: linear-gradient(135deg, #b8ecff, #e2ffd0); }
.r8-thumb--img { background: #eef7fc; }
.r8-thumb--lg {
    flex: 0 0 110px;
    width: 110px;
    height: 90px;
    font-size: 44px;
}
@media (max-width: 640px) {
    .r8-thumb--lg {
        flex: 0 0 72px;
        width: 72px;
        height: 72px;
        font-size: 32px;
    }
}
.r8-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Category entries (.r8-entry) */
.r8-entry {
    display: flex;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px dotted var(--r8-box-border);
}
.r8-entry:last-child {
    border-bottom: 0;
}
.r8-entry--muted {
    opacity: 0.75;
}
/* Same as .entry h2 / .entry p in 8x9x/assets/css/style.css:217-218 */
.r8-entry h2,
.r8-entry h3 {
    margin: 0 0 3px;
    font-size: 14px;
    font-weight: bold;
    line-height: 1.55;
}
.r8-entry h2 a,
.r8-entry h3 a {
    color: var(--r8-link);
    text-decoration: none;
}
.r8-entry h2 a:hover,
.r8-entry h3 a:hover {
    color: var(--r8-link-hover);
    text-decoration: underline;
}
.r8-entry p,
.r8-entry__excerpt {
    margin: 4px 0 0;
    font-size: 13px;
    color: var(--r8-text);
    line-height: 1.55;
}
.r8-entry__excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
@media (max-width: 640px) {
    .r8-entry p,
    .r8-entry__excerpt {
        font-size: 14px;
    }
}
.r8-entry__excerpt--clamp3 {
    -webkit-line-clamp: 3;
}
.r8-entry__excerpt img,
.r8-entry__excerpt blockquote,
.r8-entry__excerpt .quote {
    display: none !important;
}
.r8-theme mark,
.r8-entry mark {
    background-color: #fff59d !important;
    padding: 0 2px;
}
.r8-meta {
    font-size: 11px;
    color: var(--r8-muted);
}
.r8-meta span + span::before {
    content: " | ";
}
.r8-tags {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}
.r8-tags a {
    display: inline-block;
    padding: 0 6px;
    border: 1px solid var(--r8-box-border);
    border-radius: 10px;
    font-size: 11px;
    background: #fff;
    color: var(--r8-muted);
    text-decoration: none;
}
.r8-tags a:hover {
    background: #f0f7fc;
    color: var(--r8-hot);
}

/* Forum Category Rows (.r8-forum-cat, .r8-forum-row) */
.r8-forum-cat {
    margin-bottom: 12px;
}
.r8-forum-cat__name {
    display: block;
    background: #dff0fb;
    padding: 5px 8px;
    font-size: 13px;
    font-weight: bold;
    color: var(--r8-title-bot);
    border-bottom: 1px dotted #b8e4fb;
    text-decoration: none;
}
.r8-forum-cat__name:hover {
    color: var(--r8-hot);
}
.r8-forum-cat__desc {
    padding: 4px 8px;
    font-size: 11px;
    color: var(--r8-muted);
    background: #fbfdff;
    border-bottom: 1px dotted #e1f1fb;
}
.r8-forum-head {
    display: flex;
    justify-content: space-between;
    background: #dff0fb;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: bold;
    color: #0a4a7a;
    border-bottom: 1px solid #b8e4fb;
}
.r8-forum-row {
    display: grid;
    grid-template-columns: 24px 1fr 80px;
    align-items: center;
    padding: 6px 8px;
    border-bottom: 1px dotted #d6ecf8;
    background: #ffffff;
    transition: background 0.15s;
}
.r8-forum-row:nth-child(even) {
    background: #f7fcff;
}
.r8-forum-row:hover {
    background: #fff0f8;
}
.r8-forum-row__icon {
    font-size: 14px;
    line-height: 1;
}
.r8-forum-row__main {
    min-width: 0;
    padding-right: 8px;
}
.r8-forum-row__name {
    display: inline-block;
    font-size: 13px;
    font-weight: bold;
    color: var(--r8-link);
    text-decoration: none;
}
.r8-forum-row__name:hover {
    color: var(--r8-hot);
    text-decoration: underline;
}
.r8-forum-row__desc {
    font-size: 11px;
    color: var(--r8-muted);
    margin-top: 1px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.r8-forum-row__subs {
    margin: 3px 0 0;
    padding: 0;
    list-style: none;
    font-size: 11px;
    color: var(--r8-muted);
}
.r8-forum-row__subs li {
    display: inline;
}
.r8-forum-row__subs li + li::before {
    content: ", ";
}
.r8-forum-row__subs a {
    color: var(--r8-link);
    text-decoration: none;
}
.r8-forum-row__subs a:hover {
    color: var(--r8-hot);
}
.r8-forum-row__count {
    text-align: center;
    border-left: 1px dotted #d6ecf8;
    font-size: 11px;
    color: var(--r8-muted);
    padding-left: 4px;
}
.r8-forum-row__count b {
    display: block;
    font-size: 13px;
    color: var(--r8-title-bot);
}

@media (max-width: 640px) {
    .r8-forum-head {
        display: none;
    }
    .r8-forum-row {
        grid-template-columns: 20px 1fr;
        padding: 5px 6px;
    }
    .r8-forum-row__count {
        grid-column: 2;
        border-left: none;
        text-align: left;
        padding-left: 0;
        margin-top: 2px;
    }
    .r8-forum-row__count b {
        display: inline;
        font-size: 11px;
    }
}

/* Posts grid: same as .posts / .post-card in 8x9x/assets/css/style.css:189-196 */
.r8-posts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px;
}
.r8-post-card {
    display: flex;
    gap: 8px;
    padding: 6px;
    color: inherit;
    text-decoration: none;
    background: #fbfeff;
    border: 1px solid #d6ecf8;
    border-radius: var(--r8-radius);
}
.r8-post-card:hover,
.r8-post-card:focus-visible {
    border-color: var(--r8-pink);
    background: #fff5fb;
    text-decoration: none;
}
.r8-post-card--muted {
    opacity: 0.75;
}
.r8-post-card > div {
    min-width: 0;
}
.r8-post-card h3 {
    margin: 0 0 2px;
    font-size: 12.5px;
    font-weight: bold;
    line-height: 1.35;
    color: var(--r8-link);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.r8-post-card:hover h3,
.r8-post-card:focus-visible h3 {
    color: var(--r8-link-hover);
    text-decoration: underline;
}
.r8-post-card p {
    margin: 0;
    font-size: 11.5px;
    line-height: 1.55;
    color: var(--r8-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Compact retro forum header (forum::header) */
.r8-theme .r8-col-main .full-mobile-width {
    font-size: 12px;
    border-color: #d6ecf8 !important;
}
.r8-theme .r8-col-main .search-in-nav input[type="search"] {
    border: 1px solid var(--r8-box-border) !important;
    border-radius: 3px !important;
    font-size: 12px !important;
    padding: 3px 8px !important;
    height: auto !important;
}

/* Retro Counter */
.r8-counter {
    display: inline-flex;
    gap: 2px;
    margin: 4px 0;
}

.r8-counter span {
    display: inline-block;
    min-width: 18px;
    padding: 2px 0;
    font: bold 16px/1 "Courier New", monospace;
    text-align: center;
    color: #7dff6a;
    background: #101418;
    border: 1px solid #3c4650;
    border-radius: 2px;
    text-shadow: 0 0 4px #4cff3a;
}

/* Quick links */
.r8-quick {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center;
}

.r8-quick li { margin: 2px 0; }
.r8-quick li::before { content: "» "; color: var(--r8-muted); }
.r8-quick a { font-weight: bold; font-size: 12px; }
.r8-quick li:nth-child(6n+1) a { color: #1f8a2e; }
.r8-quick li:nth-child(6n+2) a { color: #1a5fd0; }
.r8-quick li:nth-child(6n+3) a { color: #e0127a; }
.r8-quick li:nth-child(6n+4) a { color: #e86a00; }
.r8-quick li:nth-child(6n+5) a { color: #7b2fd0; }
.r8-quick li:nth-child(6n+6) a { color: #0a8c8c; }

/* Buttons & Inputs */
.r8-btn {
    display: inline-block;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    font: bold 12px/1.35 var(--r8-font);
    color: #fff;
    padding: 4px 12px;
    border: 1px solid #0d5f99;
    border-radius: 3px;
    background: linear-gradient(#7cc8f0, #2f95d6 50%, #1a78bd 51%, #3aa0e0);
    text-shadow: 1px 1px 0 #0a4a7a;
    text-decoration: none;
}

.r8-btn:hover {
    background: linear-gradient(#f05ea8, #db2777 50%, #b81560 51%, #db2777);
    border-color: #9e145b;
    color: #fff;
    text-decoration: none;
}

.r8-btn--small {
    padding: 2px 8px;
    font-size: 11px;
}

.r8-field {
    display: block;
    width: 100%;
    margin: 0 0 6px;
    padding: 4px 6px;
    font: 12px var(--r8-font);
    border: 1px inset #a9cde4;
    background: #fff;
}

/* Stats list */
.r8-stats {
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 12px;
}

.r8-stats li {
    display: flex;
    justify-content: space-between;
    padding: 2px 0;
    border-bottom: 1px dotted #d6ecf8;
}

.r8-stats li:last-child {
    border-bottom: 0;
}

.r8-stats b {
    color: var(--r8-hot);
}

/* Footer */
.r8-footer {
    text-align: center;
    padding: 10px 10px 42px;
    font-size: 11px;
    color: #fff;
    background: linear-gradient(#1a78bd, #0d4f82);
    border-top: 3px solid var(--r8-yellow);
    margin-top: auto;
}

.r8-footer a {
    color: var(--r8-yellow) !important;
}

.r8-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
    margin-top: 6px;
}

.r8-badge88 {
    width: 88px;
    height: 31px;
    display: grid;
    place-items: center;
    font: bold 9px/1.1 Verdana, sans-serif;
    text-align: center;
    color: #000;
    border: 1px outset #ccc;
    background: linear-gradient(#fff, #cfd8e0);
}

.r8-badge88--pink  { background: linear-gradient(#ffe0f0, #ff8ccc); }
.r8-badge88--green { background: linear-gradient(#e6ffd9, #7fd66a); }

/* Floating effects button & snow canvas */
.r8-fx-toggle {
    position: fixed;
    right: 8px;
    bottom: 8px;
    z-index: 1001;
    opacity: .9;
}

#r8-snow {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 999;
}

/* Mobile top bar and drawer */
.r8-mbar,
.r8-drawer-head {
    display: none;
}

/* ==========================================================================
   BOOTSTRAP 5 OVERRIDES UNDER .r8-theme
   ========================================================================== */

/* :where() keeps specificity low so .btn, .r8-btn, .dropdown-item, .nav-link... keep their own colors */
:where(.r8-theme) a {
    color: var(--r8-link);
    text-decoration: none;
}

:where(.r8-theme) a:hover {
    color: var(--r8-link-hover);
    text-decoration: underline;
}

:where(.r8-theme) a.btn:hover,
:where(.r8-theme) a.r8-btn:hover,
:where(.r8-theme) a.dropdown-item:hover,
:where(.r8-theme) a.nav-link:hover,
:where(.r8-theme) a.page-link:hover {
    text-decoration: none;
}

.r8-theme .card {
    border: 1px solid var(--r8-box-border) !important;
    border-radius: var(--r8-radius) !important;
    background: #ffffff !important;
    box-shadow: 1px 1px 0 #e3f3fc inset !important;
    margin-bottom: 8px;
}

.r8-theme .card-header {
    background: linear-gradient(var(--r8-title-top), var(--r8-title-mid) 50%, var(--r8-title-bot) 51%, #3aa0e0) !important;
    color: #ffffff !important;
    font-weight: bold !important;
    text-align: center;
    font-size: 13px !important;
    text-shadow: 1px 1px 0 #0a4a7a;
    border-bottom: 1px solid var(--r8-box-border-dark) !important;
    padding: 5px 10px !important;
}

.r8-theme .card-header .badge.bg-white,
.r8-theme .card-header > span.badge {
    background: transparent !important;
    color: inherit !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    font-size: inherit !important;
    font-weight: inherit !important;
}

/* Decorative stars only on single-line plain headers */
.r8-theme .card-header:not(.d-flex):not(:has(h1, h2, h3, div, input, form, button))::before,
.r8-theme .card-header:not(.d-flex):not(:has(h1, h2, h3, div, input, form, button))::after {
    content: "✦";
    color: var(--r8-yellow);
    margin: 0 6px;
}

.r8-theme .card-body {
    padding: 8px 10px !important;
    background: #ffffff !important;
    color: var(--r8-text) !important;
}

.r8-theme .btn-primary,
.r8-theme .btn-success {
    cursor: pointer;
    font-weight: bold !important;
    color: #ffffff !important;
    border: 1px solid #0d5f99 !important;
    border-radius: 3px !important;
    background: linear-gradient(#7cc8f0, #2f95d6 50%, #1a78bd 51%, #3aa0e0) !important;
    text-shadow: 1px 1px 0 #0a4a7a;
    font-size: 12.5px !important;
    padding: 4px 12px !important;
}

.r8-theme .btn-primary:hover,
.r8-theme .btn-success:hover {
    background: linear-gradient(#f05ea8, #db2777 50%, #b81560 51%, #db2777) !important;
    border-color: #9e145b !important;
    color: #ffffff !important;
    text-decoration: none !important;
}

.r8-theme .btn-secondary {
    border: 1px solid #7f9db9 !important;
    border-radius: 3px !important;
    background: linear-gradient(#ffffff, #e1e5eb) !important;
    color: #333 !important;
    font-size: 12.5px !important;
}

.r8-theme .form-control,
.r8-theme .form-select {
    border: 1px inset #a9cde4 !important;
    border-radius: 2px !important;
    background-color: #ffffff !important;
    color: var(--r8-text) !important;
    font-size: 13px !important;
    padding: 4px 8px !important;
}

.r8-theme .form-select {
    padding: 4px 28px 4px 8px !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    background-position: right 8px center !important;
}

.r8-theme .form-select::picker-icon {
    display: none;
}

.r8-theme .form-control:focus,
.r8-theme .form-select:focus {
    border-color: var(--r8-title-mid) !important;
    box-shadow: 0 0 3px rgba(47, 149, 214, 0.6) !important;
    outline: none !important;
}

.r8-theme .pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    justify-content: center;
    margin: 8px 0;
}

.r8-theme .pagination .page-link {
    min-width: 26px;
    padding: 2px 8px;
    text-align: center;
    font-weight: bold;
    font-size: 12px;
    border: 1px solid var(--r8-box-border) !important;
    border-radius: 3px !important;
    background: #ffffff !important;
    color: var(--r8-link) !important;
}

.r8-theme .pagination .page-item.active .page-link {
    background: linear-gradient(180deg, #4fa9e2 0%, #1a78bd 50%, #0d5f99 100%) !important;
    color: #ffffff !important;
    border-color: #0b4fa3 !important;
}

.r8-theme .breadcrumb {
    list-style: none;
    margin: 0 0 6px;
    padding: 5px 8px;
    font-size: 12px;
    background: #ffffff !important;
    border: 1px dashed var(--r8-box-border) !important;
    border-radius: var(--r8-radius) !important;
}

.r8-theme .breadcrumb-item {
    display: inline-flex;
    align-items: center;
}

.r8-theme .breadcrumb-item + .breadcrumb-item::before {
    content: " » " !important;
    color: var(--r8-muted) !important;
    padding: 0 5px !important;
}

.r8-theme .breadcrumb-item a {
    color: var(--r8-link);
    text-decoration: none;
}

.r8-theme .breadcrumb-item a:hover {
    color: var(--r8-link-hover);
    text-decoration: underline;
}

.r8-theme .list-group-item {
    padding: 5px 8px !important;
    position: relative;
    border: 0 !important;
    border-bottom: 1px dotted #d6ecf8 !important;
    background: transparent !important;
    color: var(--r8-text);
    font-size: 12.5px;
}

.r8-theme .badge.bg-danger {
    background-color: #e8201a !important;
    border-radius: 2px !important;
    vertical-align: middle;
}

.r8-theme .alert {
    border-radius: 4px !important;
    border: 1px solid var(--r8-box-border) !important;
    background: #f0f8ff !important;
    color: var(--r8-text) !important;
    font-size: 13px;
    padding: 8px 12px;
}

.r8-theme .table {
    font-size: 12.5px;
    border-color: #d6ecf8;
}

.r8-theme .table thead th {
    background: linear-gradient(var(--r8-title-top), var(--r8-title-mid)) !important;
    color: #ffffff !important;
    text-shadow: 1px 1px 0 #0a4a7a;
    font-weight: bold;
    border-color: var(--r8-box-border) !important;
}

.r8-theme .nav-tabs .nav-link {
    font-weight: bold;
    font-size: 12px;
    color: var(--r8-link);
    border: 1px solid var(--r8-box-border);
    border-bottom: 0;
    margin-right: 2px;
    border-radius: 4px 4px 0 0;
    background: #e3f3fc;
}

.r8-theme .nav-tabs .nav-link.active {
    background: #ffffff !important;
    color: var(--r8-hot) !important;
    border-bottom-color: #ffffff !important;
}

/* ==========================================================================
   MODULE PAGES (login, registration, online, profile, mail, ...)
   The layout wraps non-retro module output into .r8-box.r8-page, the rules
   below adapt the shared Bootstrap / app.css markup to the retro look.
   ========================================================================== */
.r8-page__body {
    padding: 10px 12px;
    font-size: 13px;
}

.r8-page__body::after {
    content: "";
    display: table;
    clear: both;
}

.r8-page__body h1,
.r8-page__body h2,
.r8-page__body h3,
.r8-page__body h4,
.r8-page__body h5 {
    color: var(--r8-title-bot);
    font-weight: bold;
    line-height: 1.3;
}

.r8-page__body h1, .r8-page__body h2 { font-size: 16px; }
.r8-page__body h3 { font-size: 14.5px; }
.r8-page__body h4, .r8-page__body h5 { font-size: 13.5px; }

/* Form headings duplicate the box title: render them as a dotted sub-header */
.r8-page__body > form > h4:first-child,
.r8-page__body > form > h3:first-child {
    margin: 0 0 10px;
    padding-bottom: 4px;
    border-bottom: 1px dotted var(--r8-box-border);
    color: var(--r8-hot);
}

.r8-theme .form-group {
    margin-bottom: 10px;
}

.r8-theme .form-group > label,
.r8-theme .form-label {
    display: inline-block;
    margin-bottom: 3px;
    font-size: 12px;
    font-weight: bold;
    color: #0a4a7a;
}

.r8-theme .form-text,
.r8-theme .form-group .small,
.r8-theme .invalid-feedback {
    font-size: 11px;
}

.r8-theme .form-check-label {
    font-size: 12.5px;
}

.r8-theme .form-check-input:checked {
    background-color: var(--r8-title-mid);
    border-color: var(--r8-title-bot);
}

.r8-theme .form-control.is-invalid,
.r8-theme .form-select.is-invalid {
    border-color: #dc3545 !important;
}

.r8-theme .btn {
    border-radius: 3px;
    font-size: 12.5px;
}

.r8-theme .btn-sm {
    font-size: 11.5px;
    padding: 2px 8px;
}

.r8-theme .btn-link {
    color: var(--r8-link);
    font-size: 12px;
    text-decoration: none;
}

.r8-theme .btn-link:hover {
    color: var(--r8-link-hover);
    text-decoration: underline;
}

/* Outline / light buttons -> silver "Windows XP" buttons, active state pink like the topnav */
.r8-theme .btn-outline-secondary,
.r8-theme .btn-outline-primary,
.r8-theme .btn-outline-dark,
.r8-theme .btn-outline-info,
.r8-theme .btn-light {
    color: #1d3b5c;
    border: 1px solid #7f9db9;
    background: linear-gradient(#ffffff, #e1e5eb);
    box-shadow: none;
}

.r8-theme .btn-outline-secondary:hover,
.r8-theme .btn-outline-primary:hover,
.r8-theme .btn-outline-dark:hover,
.r8-theme .btn-outline-info:hover,
.r8-theme .btn-light:hover {
    color: var(--r8-link);
    border-color: var(--r8-title-mid);
    background: linear-gradient(#f4fbff, #d9eefc);
}

.r8-theme .btn-outline-secondary.active,
.r8-theme .btn-outline-primary.active,
.r8-theme .btn-outline-dark.active,
.r8-theme .btn-outline-info.active,
.r8-theme .btn-light.active {
    color: #fff;
    border-color: #b30d60;
    background: linear-gradient(#ffb3dc, #ff4fa3);
    text-shadow: 1px 1px 0 #b30d60;
}

.r8-theme .btn-outline-success {
    color: var(--r8-green);
    border-color: #6fbf73;
    background: linear-gradient(#ffffff, #e6f6e6);
}

.r8-theme .btn-outline-danger {
    color: #c0201a;
    border-color: #e59a97;
    background: linear-gradient(#ffffff, #fbe6e5);
}

.r8-theme .btn-outline-success:hover,
.r8-theme .btn-outline-danger:hover {
    color: #fff;
}

.r8-theme .btn-outline-success:hover { background: var(--r8-green); }
.r8-theme .btn-outline-danger:hover { background: #c0201a; }

.r8-theme .nav-pills .nav-link {
    color: var(--r8-link);
    font-size: 12px;
    border-radius: 3px;
}

.r8-theme .nav-pills .nav-link.active {
    color: #fff;
    background: linear-gradient(#ffb3dc, #ff4fa3);
}

.r8-theme .dropdown-menu {
    font-size: 12.5px;
    border: 1px solid var(--r8-box-border);
    border-radius: var(--r8-radius);
    box-shadow: 2px 2px 0 rgba(43, 143, 208, .15);
}

.r8-theme .dropdown-item {
    color: var(--r8-text);
}

.r8-theme .dropdown-item:hover,
.r8-theme .dropdown-item:focus {
    color: var(--r8-hot);
    background: #fff0f8;
}

.r8-theme .list-group {
    border: 1px solid var(--r8-box-border);
    border-radius: var(--r8-radius);
    background: #fff;
}

.r8-theme .list-group-item:last-child {
    border-bottom: 0 !important;
}

.r8-theme .list-group-item-action:hover {
    background: #fff0f8 !important;
}

.r8-theme .modal-content {
    border: 1px solid var(--r8-box-border-dark);
    border-radius: var(--r8-radius);
    font-size: 13px;
}

.r8-theme .modal-header {
    padding: 6px 10px;
    color: #fff;
    text-shadow: 1px 1px 0 #0a4a7a;
    background: linear-gradient(var(--r8-title-top), var(--r8-title-mid) 50%, var(--r8-title-bot) 51%, #3aa0e0);
}

.r8-theme .modal-header .modal-title {
    font-size: 13px;
    font-weight: bold;
}

/* Alert variants keep their meaning (the base .alert rule paints everything blue) */
.r8-theme .alert-danger {
    background: #fff0f0 !important;
    border-color: #f1aeb5 !important;
    color: #9b1c1c !important;
}

.r8-theme .alert-success {
    background: #effbef !important;
    border-color: #a3d9a5 !important;
    color: #1d6b27 !important;
}

.r8-theme .alert-warning {
    background: #fffbe0 !important;
    border-color: #f0d98a !important;
    color: #7a5a00 !important;
}

.r8-theme .alert-secondary {
    background: #f6f8fa !important;
    border-color: #ccd5de !important;
}

/* Online / user lists (.user-row from app.css uses negative margins for the default layout) */
.r8-theme .user-row {
    margin: 0;
    padding: 7px 4px;
    border-bottom: 1px dotted #b8d9ee !important;
}

.r8-theme .user-row:nth-child(even) {
    background: #f7fcff;
}

.r8-theme .user-row:hover {
    background: #fff0f8;
}

.r8-theme .user-row:last-of-type {
    border-bottom: 0 !important;
}

.r8-theme .user-row .user-login {
    font-weight: bold;
    color: var(--r8-link);
}

.r8-theme .user-row .avatar-image {
    border: 1px solid var(--r8-box-border);
}

.r8-theme .post-footer {
    font-size: 11px;
    border-color: #d6ecf8 !important;
}

/* Legacy JohnCMS list classes still used by some modules */
.r8-theme .phdr {
    margin: 0 0 6px;
    padding: 4px 8px;
    font-weight: bold;
    color: #fff;
    text-shadow: 1px 1px 0 #0a4a7a;
    background: linear-gradient(var(--r8-title-top), var(--r8-title-mid) 50%, var(--r8-title-bot) 51%, #3aa0e0);
    border-radius: 3px;
}

.r8-theme .phdr a {
    color: #fff;
}

.r8-theme .list1,
.r8-theme .list2,
.r8-theme .menu,
.r8-theme .gmenu,
.r8-theme .rmenu,
.r8-theme .bmenu,
.r8-theme .topmenu {
    padding: 5px 8px;
    border-bottom: 1px dotted #d6ecf8;
}

.r8-theme .list2 { background: #f7fcff; }
.r8-theme .gmenu { background: #effbef; }
.r8-theme .rmenu { background: #fff0f0; }
.r8-theme .bmenu,
.r8-theme .topmenu { background: #dff0fb; font-weight: bold; }

/* BBCode [download] button (ported from the default layout inline style) */
.btn-download-wrap {
    text-align: center;
    margin: 14px 0;
}

.r8-theme .btn-download-box {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 20px !important;
    font: bold 13px var(--r8-font);
    color: #fff !important;
    text-decoration: none !important;
    text-shadow: 1px 1px 0 #145a1e;
    border: 1px solid #1b6e26;
    border-radius: 3px !important;
    background: linear-gradient(#8fe08f, #34a853 50%, #1f8a2e 51%, #3cb04a) !important;
}

.r8-theme .btn-download-box:hover,
.r8-theme .btn-download-box:focus {
    color: #fff !important;
    border-color: #b30d60;
    background: linear-gradient(#ffb3dc, #ff4fa3 50%, #e0127a 51%, #ff4fa3) !important;
}

/* The CKEditor partial renders two "Insert download" triggers and the smiley picker adds a third one:
   keep only the trigger above the editor. The smiley picker button stays where no editor exists. */
.r8-theme div:has(> [class*="js-btn-download-trigger-"].btn-outline-success) {
    display: none !important;
}

.r8-theme form:has([class*="js-btn-download-trigger-"]) .smiley-picker-container button[onclick*="js-btn-download-trigger"] {
    display: none !important;
}

/* Live search dropdown in retro colors */
.r8-theme .live-search-dropdown {
    min-width: 260px;
    border: 1px solid var(--r8-box-border-dark);
    border-radius: var(--r8-radius);
    box-shadow: 2px 3px 0 rgba(43, 143, 208, .2);
    font-size: 12px;
}

.r8-theme .r8-ls-head {
    display: flex;
    justify-content: space-between;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: bold;
    color: #fff;
    text-shadow: 1px 1px 0 #0a4a7a;
    background: linear-gradient(var(--r8-title-top), var(--r8-title-mid) 50%, var(--r8-title-bot) 51%, #3aa0e0);
}

.r8-theme .live-search-item {
    padding: 6px 10px;
    border-bottom: 1px dotted #d6ecf8;
    color: var(--r8-text);
}

.r8-theme .live-search-item:hover,
.r8-theme .live-search-item.active {
    background: #fff0f8;
}

.r8-theme .r8-ls-row {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.r8-theme .r8-ls-badge {
    flex: 0 0 auto;
    padding: 0 5px;
    font: bold 9.5px/15px Verdana, sans-serif;
    color: #fff;
    border-radius: 2px;
    background: var(--r8-title-mid);
}

.r8-theme .r8-ls-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: bold;
    color: var(--r8-link);
}

.r8-theme .r8-ls-preview,
.r8-theme .r8-ls-empty {
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
    color: var(--r8-muted);
}

.r8-theme .r8-ls-empty {
    padding: 8px;
    text-align: center;
}

/* Homepage "today" box (solar + lunar date, ported data from the nostalgia theme) */
.r8-today {
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 12.5px;
}

.r8-today li {
    padding: 4px 6px;
    border-bottom: 1px dotted #d6ecf8;
}

.r8-today li:nth-child(even) {
    background: #f7fcff;
}

.r8-today li:last-child {
    border-bottom: 0;
}

.r8-today__label {
    display: inline-block;
    min-width: 84px;
    font-weight: bold;
    color: #0a4a7a;
}

.r8-today__quote {
    margin: 6px 0 0;
    padding: 5px 8px;
    font: italic 13px/1.5 "Times New Roman", Times, serif;
    color: #6b4e00;
    background: #fffbe0;
    border: 1px dashed #f0d98a;
    border-radius: 3px;
}

/* ==========================================================================
   MEDIA PLAYER COMPONENT (.r8-mp - Windows Media Player 9/10 Classic)
   ========================================================================== */
.r8-mp {
    max-width: 530px;
    margin: 0 auto;
    font: 11px/1.3 Tahoma, Verdana, sans-serif;
    color: #142a47;
    background: #dce6f2;
    border: 1px solid #6b87aa;
    box-shadow: inset 1px 1px 0 #fff, 0 2px 6px rgba(15, 35, 65, .2);
    overflow: hidden;
}

.r8-mp__screen {
    background: #000;
    border-bottom: 1px solid #4d627d;
}

.r8-mp__viz {
    display: block;
    width: 100%;
    height: 76px;
    cursor: pointer;
}

.r8-mp__statusbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    height: 22px;
    padding: 0 8px;
    background: #0d1219;
    border-top: 1px solid #1b2430;
    color: #829cbc;
}

.r8-mp__title {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.r8-mp__status {
    font-weight: bold;
    color: #7ad132;
}

.r8-mp__status::after {
    content: " — ";
    color: #5b7494;
    font-weight: normal;
}

.r8-mp__clock {
    flex: 0 0 auto;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    color: #829cbc;
}

.r8-mp__seek {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 6px;
    background: linear-gradient(180deg, #ffffff 0%, #edf2f8 55%, #dce5f0 100%);
    border-top: 1px solid #fff;
    border-bottom: 1px solid #c5d3e3;
}

.r8-mp__seekwrap {
    flex: 1;
    min-width: 0;
}

.r8-mp__nudge {
    flex: 0 0 auto;
    width: 24px;
    height: 14px;
    padding: 0;
    border-radius: 7px;
    border: 1px solid #96aabf;
    background: linear-gradient(180deg, #ffffff 0%, #e8eef6 55%, #cfdae7 100%);
    box-shadow: inset 0 1px 0 #fff;
    color: #3d5673;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.r8-mp__nudge:hover {
    border-color: #4f7fb5;
    background: linear-gradient(180deg, #fff, #dcebfa);
}

.r8-mp__nudge svg {
    width: 10px;
    height: 10px;
    fill: currentColor;
}

.r8-mp__controls {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 52px;
    padding: 4px 10px;
    background: linear-gradient(180deg, #fefeff 0%, #eaf0f8 30%, #c8d6e8 68%, #dde7f3 100%);
    border-top: 1px solid #fff;
    border-bottom: 1px solid #8da5c2;
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .65);
}

.r8-mp__btn {
    position: relative;
    flex: 0 0 auto;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.r8-mp__btn svg {
    display: block;
    fill: currentColor;
}

.r8-mp__btn--play {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: #355070;
    background: radial-gradient(circle at 38% 24%, #ffffff 0%, #edf3fa 46%, #bfcfe3 82%, #dae5f2 100%);
    border: 1px solid #7994b5;
    box-shadow: inset 0 2px 3px #fff, inset 0 -2px 3px rgba(88, 118, 155, .38), 0 0 0 2.5px #d2dfee, 0 0 0 3.5px #8ba4c2;
}

.r8-mp__btn--play:hover {
    color: #164f94;
    box-shadow: inset 0 2px 3px #fff, inset 0 -2px 3px rgba(55, 115, 195, .4), 0 0 0 2.5px #d2dfee, 0 0 0 3.5px #4d86c7;
}

.r8-mp__btn--play svg {
    width: 17px;
    height: 17px;
    margin-left: 2px;
}

.r8-mp.is-playing .r8-mp__btn--play svg {
    margin-left: 0;
}

.r8-mp__btn--stop,
.r8-mp__btn--mute {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    color: #355070;
    background: radial-gradient(circle at 38% 24%, #ffffff 0%, #eaf1f9 50%, #bdcfe3 88%, #d7e3f1 100%);
    border: 1px solid #7c96b7;
    box-shadow: inset 0 1px 2px #fff, 0 0 0 2px #d7e3f0, 0 0 0 3px #93acc9;
}

.r8-mp__btn--stop:hover,
.r8-mp__btn--mute:hover {
    color: #164f94;
}

.r8-mp__btn--stop svg { width: 10px; height: 10px; }
.r8-mp__btn--mute svg { width: 13px; height: 13px; }

.r8-mp__capsule {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px;
    border-radius: 15px;
    background: linear-gradient(180deg, #9eb4cf 0%, #e8eff8 100%);
    border: 1px solid #859fbd;
    box-shadow: 0 1px 0 #fff;
    flex: 0 0 auto;
}

.r8-mp__btn--cap {
    width: 23px;
    height: 23px;
    border-radius: 50%;
    color: #355070;
    background: radial-gradient(circle at 38% 24%, #ffffff 0%, #eaf1f9 50%, #bdcfe3 88%, #d7e3f1 100%);
    border: 1px solid #7d97b7;
    box-shadow: inset 0 1px 1px #fff;
}

.r8-mp__btn--cap:hover { color: #164f94; }
.r8-mp__btn--cap svg { width: 11px; height: 11px; }

.r8-mp__modes {
    display: flex;
    align-items: center;
    gap: 3px;
    margin-left: auto;
}

.r8-mp__btn--mini {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    color: #35557d;
    background: linear-gradient(180deg, #ffffff, #d5e2f2);
    border: 1px solid #8ea8c7;
}

.r8-mp__btn--mini:hover {
    border-color: #2e6db8;
    color: #0b4fa3;
}

.r8-mp__btn--mini svg { width: 12px; height: 12px; }

.r8-mp__btn--skin {
    height: 22px;
    padding: 0 6px;
    border-radius: 4px;
    font: bold 10px/20px Tahoma, Verdana, sans-serif;
    color: #214575;
    background: linear-gradient(180deg, #ffffff, #d5e2f2);
    border: 1px solid #8ea8c7;
    white-space: nowrap;
}

.r8-mp__btn--skin:hover {
    border-color: #2e6db8;
    color: #0b4fa3;
}

.r8-mp__btn[aria-pressed="true"] {
    color: #fff;
    border-color: #32700b;
    background: linear-gradient(180deg, #86d645, #4da116);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45);
}

.r8-mp__btn[data-mode="one"]::after {
    content: "1";
    position: absolute;
    right: -3px;
    bottom: -3px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    font: bold 8px/11px Verdana, sans-serif;
    color: #fff;
    background: #2f7d10;
}

.r8-mp .i-pause,
.r8-mp .i-mute {
    display: none;
}

.r8-mp.is-playing .i-play,
.r8-mp.is-muted .i-vol {
    display: none;
}

.r8-mp.is-playing .i-pause,
.r8-mp.is-muted .i-mute {
    display: block;
}

.r8-mp__vol {
    position: relative;
    width: 72px;
    height: 18px;
    display: flex;
    align-items: center;
    flex: 0 0 auto;
}

.r8-mp__volwedge {
    position: absolute;
    left: 0;
    right: 0;
    height: 7px;
    clip-path: polygon(0 100%, 100% 0, 100% 100%);
    background: linear-gradient(90deg, #52ad1c var(--v, 80%), #9db2cc var(--v, 80%));
    pointer-events: none;
}

.r8-mp input[type="range"] {
    --p: 0%;
    -webkit-appearance: none;
    appearance: none;
    display: block;
    width: 100%;
    height: 16px;
    margin: 0;
    background: transparent;
    cursor: pointer;
    position: relative;
    z-index: 1;
}

.r8-mp__progress::-webkit-slider-runnable-track {
    height: 6px;
    border: 1px solid #8ca0b8;
    border-radius: 3px;
    background: linear-gradient(90deg, #74cc30 var(--p), #e6edf5 var(--p));
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, .18);
}

.r8-mp__progress::-moz-range-track {
    height: 6px;
    border: 1px solid #8ca0b8;
    border-radius: 3px;
    background: linear-gradient(90deg, #74cc30 var(--p), #e6edf5 var(--p));
}

.r8-mp__volume::-webkit-slider-runnable-track {
    height: 7px;
    background: transparent;
    border: 0;
}

.r8-mp__volume::-moz-range-track {
    height: 7px;
    background: transparent;
    border: 0;
}

.r8-mp input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 11px;
    height: 15px;
    margin-top: -5px;
    border: 1px solid #3c7d12;
    border-radius: 2px;
    background: linear-gradient(180deg, #e1f8c8 0%, #86d645 38%, #54ab19 72%, #7cc942 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .85), 0 1px 2px rgba(0, 0, 0, .28);
}

.r8-mp input[type="range"]::-moz-range-thumb {
    width: 10px;
    height: 14px;
    border: 1px solid #3c7d12;
    border-radius: 2px;
    background: linear-gradient(180deg, #e1f8c8 0%, #86d645 38%, #54ab19 72%, #7cc942 100%);
}

.r8-mp__divider {
    height: 5px;
    background: linear-gradient(180deg, #b8cae0 0%, #dce6f2 50%, #a4b9d4 100%);
    border-bottom: 1px solid #879fbd;
}

.r8-mp__listhead {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 6px;
    background: #eef3f9;
    border-bottom: 1px solid #b6c7dc;
}

.r8-mp__search {
    flex: 1 1 auto;
    min-width: 0;
    height: 23px;
    padding: 2px 7px;
    font: 11.5px Tahoma, Verdana, sans-serif;
    color: #111;
    background: #fff;
    border: 1px solid #9cb1c9;
    border-radius: 2px;
    outline: none;
}

.r8-mp__search:focus {
    border-color: #316ac5;
}

.r8-mp__count {
    flex: 0 0 auto;
    font: 11px Tahoma, Verdana, sans-serif;
    color: #2f5580;
    white-space: nowrap;
}

.r8-mp__list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 160px;
    overflow-y: auto;
    background: #fff;
    counter-reset: track;
}

.r8-mp__list li {
    counter-increment: track;
}

.r8-mp__list li[hidden] {
    display: none;
}

.r8-mp__list button {
    display: flex;
    gap: 6px;
    width: 100%;
    padding: 3px 8px;
    cursor: pointer;
    text-align: left;
    color: #000;
    font: 11px Tahoma, Verdana, sans-serif;
    background: none;
    border: 0;
}

.r8-mp__list li:nth-child(even) button {
    background: #f3f6fa;
}

.r8-mp__list button::before {
    content: counter(track) ".";
    min-width: 16px;
    color: #666;
}

.r8-mp__list button:hover {
    background: #e3eefc;
}

.r8-mp__list button[aria-current="true"] {
    color: #fff;
    background: #316ac5;
}

.r8-mp__list button[aria-current="true"]::before,
.r8-mp__list button[aria-current="true"] .artist {
    color: #dfe9fb;
}

.r8-mp__list .artist {
    margin-left: auto;
    color: #555;
}

.r8-mp-note {
    margin: 6px 0 0;
    font-size: 11px;
    color: var(--r8-muted);
    text-align: center;
}

@media (max-width: 440px) {
    .r8-mp__controls { padding: 4px 6px; gap: 4px; }
    .r8-mp__vol { width: 52px; }
    .r8-mp__btn--skin { padding: 0 4px; font-size: 9.5px; }
}

/* ==========================================================================
   WMP 11 SKIN VARIANT (.r8-mp--wmp11 - Vista Aero Dark Chrome)
   ========================================================================== */
.r8-mp.r8-mp--wmp11 {
    background: linear-gradient(180deg, #1d2838 0%, #0f1621 55%, #111b29 100%);
    border-color: #415c7e;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .32), 0 4px 12px rgba(0, 0, 0, .45);
    color: #e4effc;
}

.r8-mp--wmp11 .r8-mp__screen {
    background: #02060c;
    border-bottom-color: #000;
}

.r8-mp--wmp11 .r8-mp__statusbar {
    background: linear-gradient(180deg, #122338, #08111c);
    border-top-color: #1e3552;
    color: #9ec8f5;
}

.r8-mp--wmp11 .r8-mp__status {
    color: #5bc0ff;
}

.r8-mp--wmp11 .r8-mp__clock {
    color: #bfe4ff;
}

.r8-mp--wmp11 .r8-mp__seek {
    background: linear-gradient(180deg, #1b2839, #101924);
    border-top-color: #2c415c;
    border-bottom-color: #090f17;
}

.r8-mp--wmp11 .r8-mp__nudge {
    border-color: #3c597d;
    background: linear-gradient(180deg, #2d425d, #182536);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18);
    color: #b7d7fa;
}

.r8-mp--wmp11 .r8-mp__progress::-webkit-slider-runnable-track {
    border-color: #2f4764;
    background: linear-gradient(90deg, #288ae8 var(--p), #070c12 var(--p));
}

.r8-mp--wmp11 .r8-mp__progress::-moz-range-track {
    border-color: #2f4764;
    background: linear-gradient(90deg, #288ae8 var(--p), #070c12 var(--p));
}

.r8-mp--wmp11 input[type="range"]::-webkit-slider-thumb {
    border-color: #a6dcff;
    border-radius: 50%;
    width: 13px;
    height: 13px;
    margin-top: -4px;
    background: radial-gradient(circle at 35% 30%, #ffffff 0%, #8cd0ff 42%, #1d75d8 85%, #0e468a 100%);
    box-shadow: 0 0 6px rgba(80, 175, 255, .75);
}

.r8-mp--wmp11 input[type="range"]::-moz-range-thumb {
    border-color: #a6dcff;
    border-radius: 50%;
    width: 12px;
    height: 12px;
    background: radial-gradient(circle at 35% 30%, #ffffff 0%, #8cd0ff 42%, #1d75d8 85%, #0e468a 100%);
}

.r8-mp--wmp11 .r8-mp__controls {
    background: linear-gradient(180deg, #253449 0%, #141f2e 48%, #0a1019 52%, #172334 100%);
    border-top-color: #3a5270;
    border-bottom-color: #070b11;
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .12);
}

.r8-mp--wmp11 .r8-mp__btn--play {
    color: #fff;
    border-color: #8fd1ff;
    background: radial-gradient(circle at 50% 20%, #ffffff 0%, #8cd3ff 24%, #2587e8 56%, #0c4892 92%, #073168 100%);
    box-shadow: inset 0 2px 3px rgba(255, 255, 255, .85), 0 0 10px rgba(64, 168, 255, .55);
}

.r8-mp--wmp11 .r8-mp__btn--stop,
.r8-mp--wmp11 .r8-mp__btn--mute {
    color: #d6e9ff;
    background: linear-gradient(180deg, #32455f, #182536);
    border-color: #4d6b8f;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2);
}

.r8-mp--wmp11 .r8-mp__capsule {
    background: #182536;
    border-color: #496588;
    box-shadow: none;
}

.r8-mp--wmp11 .r8-mp__btn--cap {
    color: #d6e9ff;
    background: linear-gradient(180deg, #2d4059, #152130);
    border-color: #3c5778;
    box-shadow: none;
}

.r8-mp--wmp11 .r8-mp__btn--cap:hover,
.r8-mp--wmp11 .r8-mp__btn--stop:hover,
.r8-mp--wmp11 .r8-mp__btn--mute:hover {
    color: #fff;
}

.r8-mp--wmp11 .r8-mp__volwedge {
    background: linear-gradient(90deg, #2a8bf2 var(--v, 80%), #21344a var(--v, 80%));
}

.r8-mp--wmp11 .r8-mp__btn--mini,
.r8-mp--wmp11 .r8-mp__btn--skin {
    color: #cfe4fc;
    background: linear-gradient(180deg, #27394f, #182536);
    border-color: #3f5b7d;
}

.r8-mp--wmp11 .r8-mp__btn[aria-pressed="true"] {
    color: #fff;
    border-color: #7cc4ff;
    background: linear-gradient(180deg, #3580d4, #1b5096);
}

.r8-mp--wmp11 .r8-mp__btn[data-mode="one"]::after {
    background: #1d75d8;
}

.r8-mp--wmp11 .r8-mp__divider {
    background: linear-gradient(180deg, #1b2a3d, #0d1520);
    border-bottom-color: #263a52;
}

.r8-mp--wmp11 .r8-mp__listhead {
    background: #121c2a;
    border-bottom-color: #263952;
}

.r8-mp--wmp11 .r8-mp__search {
    background: #0a1019;
    border-color: #365070;
    color: #e4effc;
}

.r8-mp--wmp11 .r8-mp__count {
    color: #9ec4ee;
}

.r8-mp--wmp11 .r8-mp__list {
    background: #0d141e;
}

.r8-mp--wmp11 .r8-mp__list button {
    color: #d6e4f5;
}

.r8-mp--wmp11 .r8-mp__list li:nth-child(even) button {
    background: #101926;
}

.r8-mp--wmp11 .r8-mp__list button::before,
.r8-mp--wmp11 .r8-mp__list .artist {
    color: #7e9ec4;
}

.r8-mp--wmp11 .r8-mp__list button:hover {
    background: #1b314d;
}

.r8-mp--wmp11 .r8-mp__list button[aria-current="true"] {
    color: #fff;
    background: linear-gradient(180deg, #2d73c4, #1b5194);
}

/* ==========================================================================
   RESPONSIVE DESIGN (375px -> 1100px)
   ========================================================================== */

@media (max-width: 900px) {
    .r8-layout {
        grid-template-columns: minmax(0, 1fr) 180px;
        grid-template-areas: "main right";
    }

    /* Sticky Mobile Bar */
    .r8-mbar {
        display: flex;
        align-items: center;
        gap: 10px;
        position: sticky;
        top: 0;
        z-index: 1990;
        height: 48px;
        padding: 0 10px;
        background: linear-gradient(#3aa0e0, #1569a8);
        border-bottom: 2px solid var(--r8-yellow);
        box-shadow: 0 2px 6px rgba(0, 0, 0, .2);
    }

    .r8-mbar__logo,
    .r8-drawer-head__logo {
        font: bold 20px/1 var(--r8-font-fun);
        color: #fff68a;
        text-shadow: 1px 1px 0 #1f6b26, -1px -1px 0 #1f6b26, 1px -1px 0 #1f6b26, -1px 1px 0 #1f6b26;
        text-decoration: none;
    }

    .r8-mbar__toggle {
        display: none;
    }

    .js .r8-mbar__toggle {
        display: inline-flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        width: 36px;
        height: 36px;
        padding: 0 7px;
        cursor: pointer;
        background: rgba(255, 255, 255, .12);
        border: 1px solid rgba(255, 255, 255, .5);
        border-radius: 4px;
    }

    .r8-mbar__toggle span {
        display: block;
        height: 2px;
        border-radius: 1px;
        background: #fff;
        transition: transform .3s ease, opacity .3s ease;
    }

    .r8-menu-open .r8-mbar__toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .r8-menu-open .r8-mbar__toggle span:nth-child(2) { opacity: 0; }
    .r8-menu-open .r8-mbar__toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

    /* Left column becomes off-canvas drawer */
    .js .r8-col-left {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 2010;
        width: 250px;
        max-width: 85vw;
        overflow-y: auto;
        overscroll-behavior: contain;
        padding: 0 6px 10px;
        background: var(--r8-bg) url("../images/retro-snow.svg") repeat;
        box-shadow: 2px 0 14px rgba(0, 0, 0, .35);
        transform: translateX(-105%);
        visibility: hidden;
        transition: transform .3s ease, visibility 0s linear .3s;
    }

    .js.r8-menu-open .r8-col-left {
        transform: none;
        visibility: visible;
        transition: transform .3s ease;
    }

    .js .r8-drawer-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        position: sticky;
        top: 0;
        z-index: 1;
        height: 48px;
        margin: 0 -6px 6px;
        padding: 0 6px 0 12px;
        background: linear-gradient(#3aa0e0, #1569a8);
        border-bottom: 2px solid var(--r8-yellow);
    }

    .r8-drawer-close {
        width: 36px;
        height: 36px;
        padding: 0;
        cursor: pointer;
        font: bold 26px/1 Arial, sans-serif;
        color: #fff;
        background: transparent;
        border: 0;
    }

    /* Modal / Drawer Overlay - Higher than cookie banner & snow button */
    .r8-overlay {
        position: fixed;
        inset: 0;
        z-index: 2000;
        background: rgba(0, 20, 40, .45);
        opacity: 0;
        visibility: hidden;
        transition: opacity .3s ease, visibility 0s linear .3s;
    }

    .r8-menu-open .r8-overlay {
        opacity: 1;
        visibility: visible;
        transition: opacity .3s ease;
    }

    html.r8-menu-open,
    html.r8-menu-open body {
        overflow: hidden !important;
    }
}

@media (max-width: 640px) {
    .r8-theme body {
        font-size: 13.5px;
    }

    .r8-site {
        border: 0 !important;
        box-shadow: none !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .r8-layout {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "main" "right";
        padding: 6px 4px;
    }

    .r8-col-main {
        max-width: 100% !important;
        min-width: 0 !important;
        word-break: break-word;
        overflow-wrap: anywhere;
    }

    .r8-theme .d-flex.justify-content-between {
        flex-wrap: wrap !important;
        gap: 6px;
    }

    .r8-theme .search-in-nav,
    .r8-theme .input-with-inner-btn {
        width: 100% !important;
        max-width: 100% !important;
    }

    .r8-theme img,
    .r8-theme table,
    .r8-theme pre,
    .r8-theme code {
        max-width: 100% !important;
        height: auto;
    }

    .r8-topnav {
        display: flex;
        flex-wrap: wrap;
        overflow-x: visible;
        white-space: normal;
        justify-content: center;
        padding: 0;
    }

    .r8-topnav::-webkit-scrollbar {
        display: none;
    }

    .r8-topnav a {
        flex: 1 1 auto;
        text-align: center;
        padding: 6px 8px;
        font-size: 11px;
        white-space: nowrap;
        justify-content: center;
        box-sizing: border-box;
    }

    .r8-list li {
        padding-top: 5px;
        padding-bottom: 5px;
    }

    .r8-mp__controls {
        gap: 4px;
    }

    .r8-mp__vol input {
        width: 56px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .r8-new,
    .r8-hot,
    .r8-ticker__track {
        animation: none !important;
    }
    .r8-col-left,
    .r8-overlay,
    .r8-mbar__toggle span {
        transition: none !important;
    }
    .r8-ticker__track {
        padding-left: 8px;
        white-space: normal;
    }
}

html.r8-no-fx .r8-new,
html.r8-no-fx .r8-hot,
html.r8-no-fx .r8-ticker__track {
    animation: none !important;
}

html.r8-no-fx .r8-ticker__track {
    padding-left: 8px;
    white-space: normal;
}


/* ==========================================================================
   MODULE PAGES – GLOBAL FIXES (STAGES L, M, N, O, Q2)
   ========================================================================== */

/* L1. Bootstrap grid adaptation based on center column container size */
.r8-theme .r8-col-main {
    container: r8main / inline-size;
}

/* 1. Ignore md/lg/xl/xxl spans while the centre column is narrower than 768px */
@container r8main (max-width: 767.98px) {
    .r8-theme .r8-col-main .row > :is([class*="col-md"], [class*="col-lg"], [class*="col-xl"], [class*="col-xxl"]),
    .r8-theme .r8-col-main :is([class*="row-cols-md-"], [class*="row-cols-lg-"], [class*="row-cols-xl-"], [class*="row-cols-xxl-"]) > * {
        flex: 0 0 auto;
        width: 100%;
    }

    .r8-theme .r8-col-main :is([class*="offset-md-"], [class*="offset-lg-"], [class*="offset-xl-"], [class*="offset-xxl-"]) {
        margin-left: 0;
    }
}

/* 2. Ignore sm spans while the centre column is narrower than 576px */
@container r8main (max-width: 575.98px) {
    .r8-theme .r8-col-main .row > [class*="col-sm"],
    .r8-theme .r8-col-main [class*="row-cols-sm-"] > * {
        flex: 0 0 auto;
        width: 100%;
    }
}

/* 3. Re-apply the xs spans the same element carries (same specificity, declared later) */
@container r8main (max-width: 767.98px) {
    .r8-theme .r8-col-main .row > .col-auto { flex: 0 0 auto; width: auto; }
    .r8-theme .r8-col-main .row > .col-1 { flex: 0 0 auto; width: 8.33333333%; }
    .r8-theme .r8-col-main .row > .col-2 { flex: 0 0 auto; width: 16.66666667%; }
    .r8-theme .r8-col-main .row > .col-3 { flex: 0 0 auto; width: 25%; }
    .r8-theme .r8-col-main .row > .col-4 { flex: 0 0 auto; width: 33.33333333%; }
    .r8-theme .r8-col-main .row > .col-5 { flex: 0 0 auto; width: 41.66666667%; }
    .r8-theme .r8-col-main .row > .col-6 { flex: 0 0 auto; width: 50%; }
    .r8-theme .r8-col-main .row > .col-7 { flex: 0 0 auto; width: 58.33333333%; }
    .r8-theme .r8-col-main .row > .col-8 { flex: 0 0 auto; width: 66.66666667%; }
    .r8-theme .r8-col-main .row > .col-9 { flex: 0 0 auto; width: 75%; }
    .r8-theme .r8-col-main .row > .col-10 { flex: 0 0 auto; width: 83.33333333%; }
    .r8-theme .r8-col-main .row > .col-11 { flex: 0 0 auto; width: 91.66666667%; }
    .r8-theme .r8-col-main .row > .col-12 { flex: 0 0 auto; width: 100%; }

    .r8-theme .r8-col-main .row-cols-auto > * { flex: 0 0 auto; width: auto; }
    .r8-theme .r8-col-main .row-cols-1 > * { flex: 0 0 auto; width: 100%; }
    .r8-theme .r8-col-main .row-cols-2 > * { flex: 0 0 auto; width: 50%; }
    .r8-theme .r8-col-main .row-cols-3 > * { flex: 0 0 auto; width: 33.33333333%; }
    .r8-theme .r8-col-main .row-cols-4 > * { flex: 0 0 auto; width: 25%; }
    .r8-theme .r8-col-main .row-cols-5 > * { flex: 0 0 auto; width: 20%; }
    .r8-theme .r8-col-main .row-cols-6 > * { flex: 0 0 auto; width: 16.66666667%; }
}

/* 4. Re-apply sm spans when the centre column is 576–767px wide */
@container r8main (min-width: 576px) and (max-width: 767.98px) {
    .r8-theme .r8-col-main .row > .col-sm-auto { flex: 0 0 auto; width: auto; }
    .r8-theme .r8-col-main .row > .col-sm-1 { flex: 0 0 auto; width: 8.33333333%; }
    .r8-theme .r8-col-main .row > .col-sm-2 { flex: 0 0 auto; width: 16.66666667%; }
    .r8-theme .r8-col-main .row > .col-sm-3 { flex: 0 0 auto; width: 25%; }
    .r8-theme .r8-col-main .row > .col-sm-4 { flex: 0 0 auto; width: 33.33333333%; }
    .r8-theme .r8-col-main .row > .col-sm-5 { flex: 0 0 auto; width: 41.66666667%; }
    .r8-theme .r8-col-main .row > .col-sm-6 { flex: 0 0 auto; width: 50%; }
    .r8-theme .r8-col-main .row > .col-sm-7 { flex: 0 0 auto; width: 58.33333333%; }
    .r8-theme .r8-col-main .row > .col-sm-8 { flex: 0 0 auto; width: 66.66666667%; }
    .r8-theme .r8-col-main .row > .col-sm-9 { flex: 0 0 auto; width: 75%; }
    .r8-theme .r8-col-main .row > .col-sm-10 { flex: 0 0 auto; width: 83.33333333%; }
    .r8-theme .r8-col-main .row > .col-sm-11 { flex: 0 0 auto; width: 91.66666667%; }
    .r8-theme .r8-col-main .row > .col-sm-12 { flex: 0 0 auto; width: 100%; }

    .r8-theme .r8-col-main .row-cols-sm-auto > * { flex: 0 0 auto; width: auto; }
    .r8-theme .r8-col-main .row-cols-sm-1 > * { flex: 0 0 auto; width: 100%; }
    .r8-theme .r8-col-main .row-cols-sm-2 > * { flex: 0 0 auto; width: 50%; }
    .r8-theme .r8-col-main .row-cols-sm-3 > * { flex: 0 0 auto; width: 33.33333333%; }
    .r8-theme .r8-col-main .row-cols-sm-4 > * { flex: 0 0 auto; width: 25%; }
    .r8-theme .r8-col-main .row-cols-sm-5 > * { flex: 0 0 auto; width: 20%; }
    .r8-theme .r8-col-main .row-cols-sm-6 > * { flex: 0 0 auto; width: 16.66666667%; }
}

/* L2. Colored cards & hero cards keep retro background */
.r8-theme .card:is(.bg-primary, .bg-info):not([class*="bg-opacity"]),
.r8-theme .card.text-white[style*="background"] {
    background: linear-gradient(180deg, #5fb6ea 0%, #2f95d6 55%, #1a78bd 100%) !important;
    border-color: var(--r8-box-border-dark) !important;
}

.r8-theme .card.bg-success:not([class*="bg-opacity"]) {
    background: linear-gradient(180deg, #6fcf7c 0%, #2e9e3e 55%, #1f8a2e 100%) !important;
    border-color: #17692a !important;
}

.r8-theme .card.bg-danger:not([class*="bg-opacity"]) {
    background: linear-gradient(180deg, #e24353 0%, #c62334 55%, #9e1524 100%) !important;
    border-color: #8c121e !important;
}

.r8-theme .card.bg-warning:not([class*="bg-opacity"]) {
    background: linear-gradient(180deg, #fffbe0 0%, #ffe36e 100%) !important;
    border-color: #e0b800 !important;
}

.r8-theme .card:is(.bg-secondary, .bg-dark):not([class*="bg-opacity"]) {
    background: linear-gradient(180deg, #a9bccf 0%, #5b6b7c 100%) !important;
    border-color: #44515e !important;
}

.r8-theme .card:is(.bg-primary, .bg-info, .bg-success, .bg-danger, .bg-secondary, .bg-dark):not([class*="bg-opacity"]),
.r8-theme .card.text-white[style*="background"] {
    color: #fff !important;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, .3);
}

.r8-theme .card:is(.bg-primary, .bg-info, .bg-success, .bg-danger, .bg-warning, .bg-secondary, .bg-dark):not([class*="bg-opacity"]) > .card-body,
.r8-theme .card.text-white[style*="background"] > .card-body {
    background: transparent !important;
    color: inherit !important;
}

/* Headings inside colored cards stay white */
.r8-theme .r8-col-main .card:is(.bg-primary, .bg-info, .bg-success, .bg-danger, .bg-secondary, .bg-dark):not([class*="bg-opacity"]) :is(h1, h2, h3, h4, h5, h6),
.r8-theme .r8-col-main .card.text-white[style*="background"] :is(h1, h2, h3, h4, h5, h6) {
    color: #fff !important;
}

.r8-theme .card-header :is(.text-muted, .text-secondary, .text-dark, .text-body) {
    color: rgba(255, 255, 255, .9) !important;
}

/* L3. Bootstrap 4 badge compatibility */
.r8-theme .badge-primary   { background: #1a78bd; color: #fff; }
.r8-theme .badge-info      { background: #1474b8; color: #fff; }
.r8-theme .badge-success   { background: var(--r8-green); color: #fff; }
.r8-theme .badge-danger    { background: #e8201a; color: #fff; }
.r8-theme .badge-warning   { background: var(--r8-yellow); color: #5a4500; }
.r8-theme .badge-light     { background: #f4fbff; color: var(--r8-text); border: 1px solid var(--r8-box-border); }
.r8-theme :is(.badge-dark, .badge-secondary) { background: #5b6b7c; color: #fff; }
.r8-theme .badge-pill      { border-radius: 2px; }

/* L5. Flatten modern UI utilities in the center column */
.r8-theme .r8-col-main :is(.rounded-3, .rounded-4, .rounded-5) { border-radius: var(--r8-radius) !important; }
.r8-theme .r8-col-main .rounded-pill { border-radius: 3px !important; }
.r8-theme .r8-col-main .rounded-start-pill { border-radius: 3px 0 0 3px !important; }
.r8-theme .r8-col-main .rounded-end-pill { border-radius: 0 3px 3px 0 !important; }
.r8-theme .r8-col-main :is(.shadow, .shadow-sm, .shadow-lg) { box-shadow: none !important; }
.r8-theme .r8-col-main :is(.container, .container-fluid, .container-sm, .container-md, .container-lg, .container-xl, .container-xxl) {
    max-width: none;
    padding-left: 0;
    padding-right: 0;
}
.r8-theme .r8-col-main .display-6 { font-size: 18px; line-height: 1.3; }
.r8-theme .r8-col-main .lead { font-size: 13px; }

/* No "lift on hover" in the retro look */
.r8-theme .r8-col-main :is(.story-card, .symbols-card, .char-item-btn, .btn-gradient-primary, .hover-shadow, .transition-hover):hover {
    transform: none !important;
}

/* Missing button styles */
.r8-theme .btn-danger {
    cursor: pointer;
    font-weight: bold !important;
    color: #ffffff !important;
    border: 1px solid #8c121e !important;
    border-radius: 3px !important;
    background: linear-gradient(180deg, #e85d6b 0%, #c92638 50%, #a61626 51%, #c42334 100%) !important;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, .35);
    font-size: 12.5px !important;
    padding: 4px 12px !important;
}
.r8-theme .btn-danger:hover {
    background: linear-gradient(180deg, #f07582 0%, #d93446 50%, #b81c2d 51%, #d63143 100%) !important;
    border-color: #7a0e19 !important;
    color: #ffffff !important;
    text-decoration: none !important;
}

.r8-theme .btn-warning {
    cursor: pointer;
    font-weight: bold !important;
    color: #5a4500 !important;
    border: 1px solid #e0b800 !important;
    border-radius: 3px !important;
    background: linear-gradient(#fffbe0, #ffe36e 50%, #ffd83d 51%, #ffe36e) !important;
    text-shadow: none;
    font-size: 12.5px !important;
    padding: 4px 12px !important;
}
.r8-theme .btn-warning:hover {
    background: linear-gradient(#f05ea8, #db2777 50%, #b81560 51%, #db2777) !important;
    border-color: #9e145b !important;
    color: #ffffff !important;
    text-decoration: none !important;
}

.r8-theme .btn-dark {
    cursor: pointer;
    font-weight: bold !important;
    color: #ffffff !important;
    border: 1px solid #0f3a60 !important;
    border-radius: 3px !important;
    background: linear-gradient(#3d6f99, #1d4e78 50%, #0f3a60 51%, #1d4e78) !important;
    text-shadow: 1px 1px 0 #0a2540;
    font-size: 12.5px !important;
    padding: 4px 12px !important;
}
.r8-theme .btn-dark:hover {
    background: linear-gradient(#f05ea8, #db2777 50%, #b81560 51%, #db2777) !important;
    border-color: #9e145b !important;
    color: #ffffff !important;
    text-decoration: none !important;
}

.r8-theme .btn-info {
    cursor: pointer;
    font-weight: bold !important;
    color: #ffffff !important;
    border: 1px solid #12629c !important;
    border-radius: 3px !important;
    background: linear-gradient(#4fa9e2, #1f7dc0 50%, #14639e 51%, #1f7dc0) !important;
    text-shadow: 1px 1px 0 #0a4a7a;
    font-size: 12.5px !important;
    padding: 4px 12px !important;
}
.r8-theme .btn-info:hover {
    background: linear-gradient(#f05ea8, #db2777 50%, #b81560 51%, #db2777) !important;
    border-color: #9e145b !important;
    color: #ffffff !important;
    text-decoration: none !important;
}

.r8-theme .btn-outline-light {
    border: 1px solid rgba(255, 255, 255, .7) !important;
    border-radius: 3px !important;
    background: rgba(255, 255, 255, .12) !important;
    color: #ffffff !important;
    font-weight: bold !important;
    font-size: 12.5px !important;
}
.r8-theme .btn-outline-light:hover {
    background: linear-gradient(#f05ea8, #db2777) !important;
    border-color: #9e145b !important;
    color: #ffffff !important;
}

.r8-theme .btn-outline-warning {
    border: 1px solid var(--r8-yellow) !important;
    border-radius: 3px !important;
    background: #fffdf0 !important;
    color: #5a4500 !important;
    font-weight: bold !important;
    font-size: 12.5px !important;
}
.r8-theme .btn-outline-warning:hover {
    background: linear-gradient(#ffb3dc, #ff4fa3) !important;
    border-color: #b30d60 !important;
    color: #ffffff !important;
}

/* Accordion (FAQ block) */
.r8-theme .r8-col-main .accordion-item { border: 1px solid var(--r8-box-border) !important; border-radius: var(--r8-radius) !important; margin-bottom: 4px !important; overflow: hidden; }
.r8-theme .r8-col-main .accordion-button { padding: 6px 10px; font: bold 12.5px/1.4 var(--r8-font); color: var(--r8-link) !important; background: linear-gradient(#ffffff, #e3f3fc); box-shadow: none; }
.r8-theme .r8-col-main .accordion-button:not(.collapsed) { color: var(--r8-hot) !important; background: linear-gradient(#ffffff, #ffe6f3); }
.r8-theme .r8-col-main .accordion-button:focus { box-shadow: none; }
.r8-theme .r8-col-main .accordion-body { padding: 6px 10px; font-size: 12.5px; }

/* L6. Remove nested frames when module has cards */
.r8-theme .r8-col-main > .r8-page:not(:has(> .r8-box__title)):has(.card) {
    border: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
}

.r8-theme .r8-col-main > .r8-page:not(:has(> .r8-box__title)):has(.card) > .r8-page__body {
    padding: 0;
}

/* ==========================================================================
   STAGE M — VIDEO DOWNLOADER (/tai-video/)
   ========================================================================== */
.r8-theme .video-downloader-container .card-body {
    padding: 12px 10px !important;
}

.r8-theme .video-downloader-container h1.display-6 {
    font-size: 18px !important;
    text-shadow: 1px 1px 0 #0a4a7a;
}

.r8-theme .video-downloader-container .card-body .badge {
    font-size: 11px;
}

.r8-theme .video-downloader-container .lead {
    font-size: 12px;
}

.r8-theme .video-downloader-container .vdl-search-group {
    background: #ffffff !important;
    border: 1px solid var(--r8-box-border-dark) !important;
    border-radius: 3px !important;
    padding: 2px !important;
    box-shadow: none !important;
}

.r8-theme .video-downloader-container .vdl-search-group .form-control {
    border: none !important;
    box-shadow: none !important;
    font-size: 13px !important;
}

.r8-theme .video-downloader-container .vdl-search-group button[onclick*="paste"] {
    border: 1px solid #7f9db9 !important;
    border-radius: 3px !important;
    background: linear-gradient(#ffffff, #e1e5eb) !important;
    color: #333 !important;
    font-weight: bold;
    font-size: 12px;
}

.r8-theme .video-downloader-container .vdl-search-group button[type="submit"] {
    padding: 3px 10px !important;
}

.r8-theme .video-downloader-container #platformTabs {
    gap: 5px !important;
}

.r8-theme .video-downloader-container #platformTabs .nav-link {
    color: #ffffff !important;
    font-weight: bold;
    font-size: 11px;
    padding: 2px 7px !important;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .6) !important;
    border-radius: 3px;
}

.r8-theme .video-downloader-container #platformTabs .nav-link.active,
.r8-theme .video-downloader-container #platformTabs .nav-link:hover {
    background: linear-gradient(180deg, #fff5cb 0%, #f5d379 100%) !important;
    border-color: #d49b24 !important;
    color: #7a0e19 !important;
}

@container r8main (min-width: 440px) {
    .r8-theme .video-downloader-container .row > .col-lg-3.col-md-6 {
        flex: 0 0 auto !important;
        width: 50% !important;
    }
}

.r8-theme .video-downloader-container .row > .col-lg-3.col-md-6 .card-body {
    padding: 8px 10px !important;
}

.r8-theme .video-downloader-container .feature-icon,
.r8-theme .video-downloader-container .row > .col-lg-3.col-md-6 .rounded-circle {
    width: 34px !important;
    height: 34px !important;
    font-size: 16px !important;
}

.r8-theme .video-downloader-container .row > .col-lg-3.col-md-6 h6 {
    font-size: 13px !important;
    color: var(--r8-title-bot) !important;
    font-weight: bold;
}

.r8-theme .video-downloader-container .row > .col-lg-3.col-md-6 p {
    font-size: 11.5px !important;
}

/* 3-step guide & FAQ headings styled as .r8-box__title */
.r8-theme .video-downloader-container .card:has(.step-badge),
.r8-theme .video-downloader-container .card:has(.accordion) {
    padding: 0 0 8px !important;
    border: 1px solid var(--r8-box-border) !important;
    border-radius: var(--r8-radius) !important;
}

.r8-theme .video-downloader-container .card > h5:first-child,
.r8-theme .video-downloader-container .card > .text-center:first-child h2 {
    margin: 0 0 8px !important;
    padding: 4px 8px !important;
    font-size: 12px !important;
    font-weight: bold !important;
    text-align: center !important;
    color: #fff !important;
    text-shadow: 1px 1px 0 #0a4a7a !important;
    background: linear-gradient(var(--r8-title-top), var(--r8-title-mid) 50%, var(--r8-title-bot) 51%, #3aa0e0) !important;
    border-bottom: 1px solid var(--r8-box-border-dark) !important;
}

.r8-theme .video-downloader-container .card > h5:first-child::before,
.r8-theme .video-downloader-container .card > h5:first-child::after,
.r8-theme .video-downloader-container .card > .text-center:first-child h2::before,
.r8-theme .video-downloader-container .card > .text-center:first-child h2::after {
    content: "✦";
    color: var(--r8-yellow);
    margin: 0 6px;
}

.r8-theme .video-downloader-container .card:has(.step-badge) > .row,
.r8-theme .video-downloader-container .card:has(.accordion) > .accordion,
.r8-theme .video-downloader-container .card:has(.accordion) > p {
    padding: 0 10px;
}

.r8-theme .video-downloader-container .step-badge {
    width: 28px !important;
    height: 28px !important;
    font-size: 13px !important;
    font-weight: bold;
}

.r8-theme .video-downloader-container #resultCard .badge {
    border-radius: 2px !important;
    font-size: 11px !important;
}

.r8-theme .video-downloader-container #recentHistorySection h5 {
    font-size: 13px !important;
    font-weight: bold !important;
    color: var(--r8-title-bot) !important;
    border-bottom: 1px dotted var(--r8-box-border);
    padding-bottom: 4px;
}

/* ==========================================================================
   STAGE N — SYMBOLS (/ki-tu/) AND SUBPAGES
   ========================================================================== */
.r8-theme .r8-col-main .symbols-nav-pill {
    background: linear-gradient(#ffffff, #e1e5eb) !important;
    border: 1px solid #7f9db9 !important;
    border-radius: 3px !important;
    font-weight: bold !important;
    font-size: 12px !important;
    color: #1d3b5c !important;
    padding: 3px 9px !important;
    box-shadow: none !important;
}

.r8-theme .r8-col-main .symbols-nav-pill.active,
.r8-theme .r8-col-main .symbols-nav-pill:hover {
    background: linear-gradient(180deg, #4fa9e2 0%, #1a78bd 50%, #0d5f99 100%) !important;
    color: #ffffff !important;
    border-color: #0b4fa3 !important;
}

.r8-theme .r8-col-main .symbols-hero-card {
    background: #ffffff !important;
    border: 1px solid var(--r8-box-border) !important;
    border-radius: 4px !important;
    box-shadow: none !important;
    padding: 30px 10px 10px !important;
    margin-bottom: 8px !important;
    position: relative;
}

.r8-theme .r8-col-main .symbols-hero-badge {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    border-radius: 0 !important;
    text-align: center !important;
    background: linear-gradient(var(--r8-title-top), var(--r8-title-mid) 50%, var(--r8-title-bot) 51%, #3aa0e0) !important;
    color: #ffffff !important;
    font-weight: bold !important;
    font-size: 12px !important;
    border-bottom: 1px solid var(--r8-box-border-dark) !important;
    box-shadow: none !important;
    padding: 4px 8px !important;
}

.r8-theme .r8-col-main .symbols-hero-badge::before,
.r8-theme .r8-col-main .symbols-hero-badge::after {
    content: "✦";
    color: var(--r8-yellow);
    margin: 0 6px;
}

.r8-theme .r8-col-main .symbols-card {
    border: 1px solid var(--r8-box-border) !important;
    border-radius: 4px !important;
    box-shadow: none !important;
    padding: 8px !important;
}

.r8-theme .r8-col-main .symbols-card:hover {
    border-color: var(--r8-pink) !important;
    box-shadow: none !important;
    transform: none !important;
}

.r8-theme .r8-col-main .btn-gradient-primary {
    background: linear-gradient(#7cc8f0, #2f95d6 50%, #1a78bd 51%, #3aa0e0) !important;
    border: 1px solid #0d5f99 !important;
    border-radius: 3px !important;
    color: #ffffff !important;
    font-weight: bold !important;
    font-size: 12.5px !important;
    padding: 4px 14px !important;
    box-shadow: none !important;
    transform: none !important;
}

.r8-theme .r8-col-main .btn-gradient-primary:hover {
    background: linear-gradient(#ffb3dc, #ff4fa3 50%, #e0127a 51%, #ff4fa3) !important;
    border-color: #b30d60 !important;
    color: #ffffff !important;
    transform: none !important;
}

.r8-theme .r8-col-main .symbols-input-lg,
.r8-theme .r8-col-main .symbols-select-box {
    border: 1px inset #a9cde4 !important;
    border-radius: 2px !important;
    font: 13px var(--r8-font) !important;
    padding: 4px 8px !important;
}

.r8-theme .r8-col-main .symbols-select-box {
    padding: 4px 28px 4px 8px !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    background-position: right 8px center !important;
}

.r8-theme .r8-col-main .symbols-select-box::picker-icon {
    display: none;
}

.r8-theme .r8-col-main .symbols-input-lg:focus,
.r8-theme .r8-col-main .symbols-select-box:focus {
    border-color: var(--r8-title-mid) !important;
    box-shadow: none !important;
    outline: none !important;
}

.r8-theme .r8-col-main .symbols-input-lg {
    text-align: center;
    font-weight: bold;
    font-size: 15px !important;
}

.r8-theme .r8-col-main .symbols-char-counter {
    border-radius: 2px !important;
    font-size: 11px !important;
}

.r8-theme .r8-col-main .char-item-btn {
    background: #f4fbff !important;
    border: 1px solid #a9cde4 !important;
    border-radius: 2px !important;
    min-height: 30px !important;
    padding: 3px 6px !important;
    box-shadow: none !important;
    transform: none !important;
}

.r8-theme .r8-col-main .char-item-btn:hover {
    background: #ffe6f3 !important;
    border-color: var(--r8-pink) !important;
    transform: none !important;
}

.r8-theme .r8-col-main .nickname-variant-box {
    border: none !important;
    border-bottom: 1px dotted #d6ecf8 !important;
    border-radius: 0 !important;
    padding: 4px 2px !important;
    margin: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
}

.r8-theme .r8-col-main .nickname-variant-box:nth-child(even) {
    background: #f8fcff !important;
}

.r8-theme .r8-col-main .nickname-variant-text {
    font-size: 14px !important;
}

.r8-theme .r8-col-main .btn-copy-sm {
    background: linear-gradient(#7cc8f0, #2f95d6 50%, #1a78bd 51%, #3aa0e0) !important;
    border: 1px solid #0d5f99 !important;
    color: #ffffff !important;
    font-size: 11px !important;
    border-radius: 3px !important;
    padding: 2px 6px !important;
}

.r8-theme .r8-col-main .btn-copy-sm:hover {
    background: linear-gradient(#ffb3dc, #ff4fa3) !important;
    border-color: #b30d60 !important;
}

.r8-theme .r8-col-main .vote-chip {
    border-radius: 2px !important;
    background: #eef7fd !important;
    font-size: 11px !important;
    color: var(--r8-muted) !important;
}

.r8-theme .symbols-toast {
    background: #1a78bd !important;
    border: 1px solid #0a4a7a !important;
    border-radius: 3px !important;
    font-weight: bold;
    font-size: 12px;
}

@container r8main (min-width: 520px) {
    .r8-theme .r8-col-main #variantResultsList > .col-md-6 {
        flex: 0 0 auto !important;
        width: 50% !important;
    }
    .r8-theme .r8-col-main #aestheticSuggestionsContainer > .suggestion-item-col {
        flex: 0 0 auto !important;
        width: 50% !important;
    }
    .r8-theme .r8-col-main .card:has(#gameNicknameTabs) .row > .col-md-4,
    .r8-theme .r8-col-main #pills-game-all .row > .col-md-4 {
        flex: 0 0 auto !important;
        width: 50% !important;
    }
}

/* ==========================================================================
   STAGE O — STORY PORTAL (/truyen/)
   ========================================================================== */
@container r8main (min-width: 540px) {
    .r8-theme .r8-col-main .row.row-cols-sm-3.row-cols-md-4 > * {
        flex: 0 0 auto !important;
        width: 25% !important;
    }
}

.r8-theme .r8-col-main .story-card {
    border: 1px solid var(--r8-box-border) !important;
    border-radius: 3px !important;
    box-shadow: none !important;
}

.r8-theme .r8-col-main .story-card:hover {
    border-color: var(--r8-pink) !important;
    transform: none !important;
    box-shadow: none !important;
}

.r8-theme .r8-col-main .story-card .card-title {
    font-size: 12px !important;
    font-weight: bold !important;
    color: var(--r8-link) !important;
}

.r8-theme .r8-col-main .story-card .small {
    font-size: 11px !important;
}

.r8-theme .r8-col-main .story-card .card-footer {
    font-size: 11px !important;
    border-top: 1px dotted #d6ecf8 !important;
    background: transparent !important;
}

.r8-theme .r8-col-main .story-card .position-absolute .badge {
    font: bold 10px Verdana, sans-serif !important;
    padding: 1px 4px !important;
    border-radius: 2px !important;
}

.r8-theme .r8-col-main .story-filter-btn {
    background: linear-gradient(#ffffff, #e1e5eb) !important;
    border: 1px solid #7f9db9 !important;
    border-radius: 3px !important;
    color: #333 !important;
    font-size: 11.5px !important;
    font-weight: bold;
    padding: 2px 8px !important;
}

.r8-theme .r8-col-main .story-filter-btn.active,
.r8-theme .r8-col-main .story-filter-btn:hover {
    background: linear-gradient(#ffb3dc, #ff4fa3) !important;
    border-color: #b30d60 !important;
    color: #ffffff !important;
}

.r8-theme .r8-col-main h2.h6 {
    font: bold 13px var(--r8-font) !important;
    color: var(--r8-title-bot) !important;
    border-bottom: 1px dotted var(--r8-box-border);
    padding-bottom: 3px;
}

.r8-theme .r8-col-main h2.h6 .badge {
    background: #eef7fd !important;
    color: var(--r8-muted) !important;
    border: 1px solid var(--r8-box-border);
    font-size: 11px;
}

.r8-theme .r8-col-main #continueReadingBar {
    border-radius: var(--r8-radius) !important;
    border: 1px solid var(--r8-box-border) !important;
    background: #f0f8ff !important;
    color: var(--r8-text) !important;
    font-size: 13px;
    padding: 8px 12px;
}

/* ==========================================================================
   STAGE Q2 — LUNAR CALENDAR (/lunar/) TOOL DENSITY
   ========================================================================== */
@container r8main (min-width: 440px) {
    .r8-theme .r8-col-main .row > .col-md-6.col-lg-4,
    .r8-theme .r8-col-main .row > .col-md-6.col-lg-3 {
        flex: 0 0 auto !important;
        width: 50% !important;
    }
}

.r8-theme .r8-col-main .row > .col-md-6.col-lg-4 .card-body,
.r8-theme .r8-col-main .row > .col-md-6.col-lg-3 .card-body {
    padding: 6px 8px !important;
}

.r8-theme .r8-col-main .row > .col-md-6.col-lg-4 .card-body i,
.r8-theme .r8-col-main .row > .col-md-6.col-lg-3 .card-body i {
    font-size: 20px !important;
}

.r8-theme .r8-col-main .row > .col-md-6.col-lg-4 .card-body h6,
.r8-theme .r8-col-main .row > .col-md-6.col-lg-3 .card-body h6 {
    font-size: 12.5px !important;
    font-weight: bold;
    margin-bottom: 2px !important;
}

.r8-theme .r8-col-main .row > .col-md-6.col-lg-4 .card-body p,
.r8-theme .r8-col-main .row > .col-md-6.col-lg-3 .card-body p {
    font-size: 11px !important;
    margin-bottom: 0 !important;
}

/* ==========================================================================
   STAGE R — USER LINKS
   ========================================================================== */
.r8-theme .r8-user {
    color: var(--r8-link);
    font-weight: bold;
}

.r8-theme a.r8-user:hover {
    color: var(--r8-link-hover);
    text-decoration: underline;
}

.r8-theme .r8-meta .r8-user {
    font-size: inherit;
    font-weight: normal;
    color: inherit;
}

/* Article meta keeps the author bold like the prototype ("bởi <b>Admin</b>", 8x9x/bai-viet.html:50);
   the rule above is meant for list rows. */
.r8-theme .r8-article .r8-meta .r8-user {
    font-weight: bold;
}

.r8-theme .r8-comment-header .r8-user {
    color: #0a4a7a;
}

/* Sidebar box titles are <div> (not headings): keep the h2 line-height. */
.r8-col-left .r8-box__title,
.r8-col-right .r8-box__title {
    line-height: 1.2;
}

/* ==========================================================================
   HEADER SEARCH BAR (below the ticker)
   ========================================================================== */
.r8-searchbar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin: 0;
    padding: 5px 8px;
    font-size: 12px;
    background: linear-gradient(#f4fbff, #dff1fc);
    border-bottom: 1px solid var(--r8-box-border);
}

.r8-searchbar__label {
    margin: 0;
    font-weight: bold;
    color: var(--r8-title-bot);
    white-space: nowrap;
}

.r8-searchbar__field {
    position: relative;
    display: flex;
    flex: 0 1 320px;
    min-width: 0;
}

.r8-searchbar__input {
    width: 100%;
    height: 24px;
    margin: 0;
    padding: 2px 6px;
    font: 12px var(--r8-font);
    color: var(--r8-text);
    background: #fff;
    border: 1px inset #a9cde4;
    border-radius: 0;
    -webkit-appearance: none;
    appearance: none;
}

.r8-searchbar__input:focus {
    outline: 1px dotted var(--r8-hot);
    outline-offset: 1px;
}

.r8-searchbar__scope {
    height: 24px;
    margin: 0;
    padding: 0 2px;
    font: 12px var(--r8-font);
    color: var(--r8-text);
    background: #fff;
    border: 1px solid #a9cde4;
    border-radius: 0;
}

.r8-searchbar .r8-btn {
    height: 24px;
    padding: 0 12px;
    line-height: 22px;
}

/* Suggestions: aligned to the input, below the sticky mobile bar (z-index 1990). */
.r8-searchbar .live-search-dropdown {
    min-width: 100%;
    margin-top: 2px;
    z-index: 1980;
}

@media (max-width: 640px) {
    .r8-searchbar {
        padding: 5px 6px;
    }

    .r8-searchbar__label {
        display: none;
    }

    .r8-searchbar__field {
        flex: 1 1 auto;
    }

    /* 16px avoids the iOS zoom-on-focus */
    .r8-searchbar__input {
        height: 30px;
        font-size: 16px;
    }

    .r8-searchbar__scope {
        height: 30px;
        font-size: 14px;
    }

    .r8-searchbar .r8-btn {
        height: 30px;
        line-height: 28px;
    }

    .r8-searchbar .live-search-dropdown {
        right: auto;
        width: calc(100vw - 12px);
    }
}

/* Live-search dropdowns must not be clipped by the box frame. */
.r8-box:has(.live-search-dropdown) {
    overflow: visible;
}

.r8-box:has(.live-search-dropdown) > .r8-box__title {
    border-radius: calc(var(--r8-radius) - 1px) calc(var(--r8-radius) - 1px) 0 0;
}

/* ==========================================================================
   GUESTBOOK ("Phòng Chat") – classic chat box
   ========================================================================== */
.r8-theme .r8-gb-form {
    /* CKEditor 5 reads these variables: square, light-blue toolbar, pink focus */
    --ck-border-radius: 0;
    --ck-color-toolbar-background: #e3f3fc;
    --ck-color-toolbar-border: #a9cde4;
    --ck-color-base-border: #a9cde4;
    --ck-font-face: Tahoma, Verdana, Geneva, sans-serif;
    --ck-font-size-base: 12px;
    --ck-color-focus-border: #ff4fa3;
    --ck-color-button-on-background: #ffd6ec;
    --ck-color-button-default-hover-background: #fff5fb;
    --ck-focus-ring: 1px dotted #ff4fa3;
    --ck-inner-shadow: none;
    --ck-drop-shadow: none;
    scroll-margin-top: 56px;
}

.r8-gb-form .r8-box__body {
    padding: 8px;
}

.r8-gb-form .r8-lbl,
.r8-gb-form .vue_app .form-group > label {
    display: block;
    margin: 0 0 2px;
    font-size: 11px;
    font-weight: bold;
    color: var(--r8-title-bot);
}

.r8-gb-form .r8-field--short {
    max-width: 240px;
}

.r8-gb-form .r8-field.is-invalid {
    border-color: #dc3545;
}

.r8-gb-form .ck.ck-editor__main > .ck-editor__editable {
    min-height: 80px;
    font: 13px/1.5 var(--r8-font);
    background: #fff;
}

.r8-gb-form .ck.ck-editor__main > .ck-editor__editable:not(.ck-focused) {
    border-color: #a9cde4;
    border-style: inset;
}

.r8-gb-ym-trigger {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    font: bold 11.5px/1.3 Tahoma, Verdana, sans-serif;
    color: var(--r8-title-bot);
    background: #fff;
    border: 1px solid var(--r8-box-border);
    border-radius: 3px;
    cursor: pointer;
}

.r8-gb-ym-trigger:hover,
.r8-gb-ym-trigger.active {
    background: var(--r8-title-mid);
    border-color: var(--r8-title-bot);
    color: #fff;
}

.r8-gb-smileys-box {
    margin: 0 0 6px;
    background: #f4fbff;
    border: 1px dashed var(--r8-box-border);
    border-radius: 3px;
}

.r8-gb-smileys-box[hidden] {
    display: none;
}

.r8-gb-smileys__grid {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    padding: 6px;
    max-height: 190px;
    overflow-y: auto;
}

.r8-gb-smileys__grid button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    min-height: 26px;
    width: auto;
    height: auto;
    padding: 3px 5px;
    cursor: pointer;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 3px;
}

.r8-gb-smileys__grid button:hover,
.r8-gb-smileys__grid button:focus-visible {
    background: #fff;
    border-color: var(--r8-box-border);
}

.r8-gb-smileys__grid img {
    max-width: none;
}

.r8-theme img[src*="/assets/emoticons/"] {
    image-rendering: auto;
    vertical-align: middle;
}

.r8-gb-ym-trigger img,
.r8-theme img[src*="/assets/emoticons/yahoo-hd/"],
.r8-gb-smileys__grid img[src*="/assets/emoticons/yahoo"] {
    image-rendering: auto;
    height: 20px;
    width: auto;
    max-width: none !important;
    vertical-align: middle;
}

.r8-gb-teenbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 6px 0;
    padding: 5px 7px;
    background: #eef8ff;
    border: 1px solid #cce6f7;
    border-radius: 3px;
    font-size: 11.5px;
}

.r8-gb-teen-opt {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    cursor: pointer;
    user-select: none;
}

.r8-gb-teenbar .r8-btn--small {
    margin-left: auto;
}

.r8-gb-captcha {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.r8-gb-captcha img {
    background: #fff;
    border: 1px solid var(--r8-box-border);
}

.r8-gb-captcha .r8-field {
    width: 120px;
    margin: 0;
}

.r8-gb-note {
    margin: 0 0 6px;
    font-size: 11px;
    color: var(--r8-muted);
}

.r8-gb-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.r8-gb-item {
    padding: 6px 8px;
    background: #fbfeff;
    border-bottom: 1px dotted #b8dff4;
}

.r8-gb-item:nth-child(even) {
    background: #fff5fb;
}

.r8-gb-item:last-child {
    border-bottom: 0;
}

.r8-gb-item__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 6px;
    font-size: 12px;
    line-height: 1.3;
}

.r8-gb-item__ava {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    padding: 1px;
    object-fit: cover;
    background: #fff;
    border: 1px solid var(--r8-box-border);
}

.r8-gb-item__nick,
.r8-gb-item__nick a {
    font-weight: bold;
    color: var(--r8-hot) !important;
}

.r8-gb-item__guest {
    font-weight: normal;
    font-style: italic;
    color: var(--r8-muted);
}

.r8-gb-item__rank {
    padding: 0 4px;
    font-size: 10px;
    font-weight: bold;
    color: #fff;
    background: var(--r8-green);
    border-radius: 2px;
}

.r8-gb-item__state {
    font-size: 9px;
    font-weight: bold;
    letter-spacing: .5px;
}

.r8-gb-item__state--on { color: var(--r8-green); }
.r8-gb-item__state--off { color: #9aa8b5; }

.r8-gb-item__time {
    font-size: 10px;
    color: var(--r8-muted);
}

.r8-gb-item__status {
    flex-basis: 100%;
    padding-left: 38px;
    font-size: 11px;
    font-style: italic;
    color: #7b2fd0;
}

.r8-gb-item__body {
    margin: 3px 0 0 38px;
    font-size: 13px;
    overflow-wrap: anywhere;
}

.r8-gb-item__body p {
    margin: 0 0 4px;
}

.r8-gb-item__body p:last-child {
    margin-bottom: 0;
}

.r8-gb-item__body img {
    max-width: 100%;
    height: auto;
}

.r8-gb-item__body table {
    border-collapse: collapse;
    font-size: 12px;
}

.r8-gb-item__body td,
.r8-gb-item__body th {
    padding: 2px 6px;
    border: 1px solid #b8dff4;
}

.r8-gb-item__reply {
    margin: 4px 0 0 38px;
    padding: 4px 6px;
    font-size: 12px;
    background: #fffbe0;
    border: 1px dashed #f0c419;
}

.r8-gb-item__reply b {
    color: var(--r8-green);
}

.r8-gb-item__foot {
    margin: 3px 0 0 38px;
    font-size: 11px;
    color: var(--r8-muted);
}

.r8-gb-item__foot a {
    margin-right: 4px;
    color: var(--r8-link);
}

.r8-gb-item__foot > a::before { content: "["; color: var(--r8-muted); }
.r8-gb-item__foot > a::after { content: "]"; color: var(--r8-muted); }

.r8-gb-item__ip {
    display: block;
    margin-top: 2px;
    font-size: 10px;
}

.r8-gb-pages {
    padding: 6px;
    text-align: center;
    border-top: 1px dotted #b8dff4;
}

.r8-gb-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 6px;
    font-size: 11px;
}

.r8-theme .r8-gb-clear {
    background: linear-gradient(#ff9e9e, #e53935 50%, #c62828 51%, #e53935);
    border-color: #8e1b1b;
}

@media (max-width: 640px) {
    .r8-gb-item__status,
    .r8-gb-item__body,
    .r8-gb-item__reply,
    .r8-gb-item__foot {
        margin-left: 0;
        padding-left: 0;
    }

    .r8-gb-item__reply {
        padding-left: 6px;
    }
}

/* Yahoo! Messenger BUZZ button, highlighted token & gentle shake */
.r8-theme .r8-gb-buzz-btn {
    background: linear-gradient(180deg, #ff8f5e 0%, #f04824 50%, #c9260a 51%, #e63b19 100%);
    border-color: #9e1b06;
    color: #fffef5;
}

.r8-theme .r8-gb-buzz-btn:hover:not(:disabled) {
    background: linear-gradient(180deg, #ffb08c 0%, #ff5a36 50%, #d92d10 51%, #f24a27 100%);
    border-color: #851605;
}

.r8-theme .r8-gb-buzz-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.r8-buzz-tag {
    display: inline-block;
    padding: 0 4px;
    font: bold 13px/1.2 var(--r8-font-fun);
    color: #d91424;
    background: #fff3d6;
    border: 1px dashed #e67e22;
    border-radius: 2px;
    letter-spacing: 0.5px;
}

@keyframes r8-buzz {
    0%, 100% { transform: translateX(0); }
    15% { transform: translateX(-5px) rotate(-0.4deg); }
    30% { transform: translateX(5px) rotate(0.4deg); }
    45% { transform: translateX(-4px); }
    60% { transform: translateX(4px); }
    75% { transform: translateX(-2px); }
}

.r8-gb.is-buzzing {
    animation: r8-buzz 0.45s ease-in-out;
}

@media (prefers-reduced-motion: reduce) {
    .r8-gb.is-buzzing {
        animation: none;
    }
}

html.r8-no-fx .r8-gb.is-buzzing {
    animation: none;
}

/* ==========================================================================
   BLOG YAHOO! 360 PROFILE (.r8-p360-*) & XP PROGRESS BAR
   ========================================================================== */
.r8-p360-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.r8-p360-ava {
    flex: 0 0 auto;
    width: 78px;
    height: 78px;
    padding: 3px;
    background: #ffffff;
    border: 1px solid var(--r8-box-border);
    border-radius: 3px;
}

.r8-p360-ava img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.r8-p360-info {
    flex: 1 1 auto;
    min-width: 0;
}

.r8-p360-name {
    font-size: 15px;
    color: var(--r8-link);
}

.r8-p360-meta {
    margin-top: 3px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}

.r8-p360-status {
    margin-top: 6px;
    padding: 4px 8px;
    background: #fffbe0;
    border: 1px dashed #ebd27c;
    border-radius: 3px;
    font-size: 12px;
    color: #5c4300;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
}

.r8-p360-actions {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.r8-p360-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}

.r8-p360-list {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 12px;
}

.r8-p360-list li {
    padding: 3px 0;
    border-bottom: 1px dotted #d6ecf8;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 4px;
}

.r8-p360-list li:last-child {
    border-bottom: none;
}

.r8-p360-photo {
    max-width: 100%;
    max-height: 220px;
    padding: 3px;
    background: #ffffff;
    border: 1px solid var(--r8-box-border);
    border-radius: 3px;
}

.r8-p360-entry {
    font-size: 12.5px;
    line-height: 1.6;
    background: #fbfeff;
    border: 1px dotted #cbe6f7;
    padding: 6px 8px;
    border-radius: 3px;
    overflow-wrap: anywhere;
}

.r8-xp-bar {
    height: 14px;
    background: #e9f2f9;
    border: 1px solid #7ea6c4;
    border-radius: 2px;
    padding: 2px;
    overflow: hidden;
}

.r8-xp-bar__fill {
    height: 100%;
    background: repeating-linear-gradient(
        90deg,
        #32b539 0px,
        #32b539 6px,
        #6fe075 6px,
        #6fe075 8px
    );
}

.r8-xp-bar__fill.is-neg {
    background: repeating-linear-gradient(
        90deg,
        #d63345 0px,
        #d63345 6px,
        #f27482 6px,
        #f27482 8px
    );
}

@media (max-width: 640px) {
    .r8-p360-head {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .r8-p360-meta,
    .r8-p360-actions {
        justify-content: center;
    }

    .r8-p360-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   YOUTUBE-STYLE CORNER MINI-PLAYER (.r8-mini-mp & .r8-mini-pill)
   ========================================================================== */
.r8-mini-mp {
    position: fixed;
    right: 12px;
    bottom: 42px;
    z-index: 1995;
    width: 300px;
    max-width: calc(100vw - 24px);
    background: linear-gradient(180deg, #f8fbff 0%, #dde8f5 52%, #c9d9ec 100%);
    border: 1px solid #5e80a8;
    border-radius: 5px;
    box-shadow: inset 0 1px 0 #fff, 0 6px 20px rgba(10, 25, 48, 0.35);
    font: 11px/1.3 Tahoma, Verdana, sans-serif;
    color: #142a47;
    overflow: hidden;
}

.r8-mini-mp__progress {
    height: 3px;
    background: #b7c8dd;
    overflow: hidden;
}

.r8-mini-mp__bar {
    display: block;
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #52ad1c, #8ce047);
    transition: width 0.25s linear;
}

.r8-mini-mp__row {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 6px 8px;
}

.r8-mini-mp__eq {
    display: inline-flex;
    align-items: flex-end;
    gap: 2px;
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
}

.r8-mini-mp__eq i {
    display: block;
    width: 3px;
    height: 4px;
    background: #4ca314;
    border-radius: 1px;
}

.r8-mini-mp.is-playing .r8-mini-mp__eq i {
    animation: r8MiniEq 0.7s ease-in-out infinite alternate;
}

.r8-mini-mp.is-playing .r8-mini-mp__eq i:nth-child(2) { animation-delay: 0.2s; }
.r8-mini-mp.is-playing .r8-mini-mp__eq i:nth-child(3) { animation-delay: 0.4s; }

@keyframes r8MiniEq {
    0% { height: 3px; }
    100% { height: 14px; }
}

.r8-mini-mp__info {
    flex: 1 1 auto;
    min-width: 0;
}

.r8-mini-mp__title {
    font-weight: bold;
    color: #0b3c78;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.r8-mini-mp__meta {
    font-size: 10px;
    color: #466180;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.r8-mini-mp__actions {
    display: flex;
    align-items: center;
    gap: 3px;
    flex: 0 0 auto;
}

.r8-mini-mp__btn {
    width: 24px;
    height: 24px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid #7994b5;
    background: radial-gradient(circle at 38% 24%, #ffffff 0%, #e8f0f9 55%, #bfcfe3 100%);
    color: #2c4a6e;
    font: bold 11px/22px Tahoma, sans-serif;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.r8-mini-mp__btn:hover {
    color: #0b4fa3;
    border-color: #2d6db8;
}

.r8-mini-mp__btn--play {
    width: 28px;
    height: 28px;
}

.r8-mini-mp__btn svg {
    width: 12px;
    height: 12px;
    fill: currentColor;
}

.r8-mini-mp__btn .i-pause { display: none; }
.r8-mini-mp.is-playing .r8-mini-mp__btn--play .i-play { display: none; }
.r8-mini-mp.is-playing .r8-mini-mp__btn--play .i-pause { display: block; }

.r8-mini-mp__btn--skin {
    border-radius: 4px;
    font-size: 9.5px;
    width: auto;
    padding: 0 5px;
}

/* WMP 11 variant for corner mini-player */
.r8-mini-mp.r8-mini-mp--wmp11 {
    background: linear-gradient(180deg, #253449 0%, #121c29 55%, #0c131d 100%);
    border-color: #4b6c94;
    color: #e4effc;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 6px 20px rgba(0, 0, 0, 0.55);
}

.r8-mini-mp--wmp11 .r8-mini-mp__progress { background: #0c141f; }
.r8-mini-mp--wmp11 .r8-mini-mp__bar { background: linear-gradient(90deg, #1d75d8, #6cc9ff); }
.r8-mini-mp--wmp11 .r8-mini-mp__eq i { background: #5bc0ff; }
.r8-mini-mp--wmp11 .r8-mini-mp__title { color: #8cd0ff; }
.r8-mini-mp--wmp11 .r8-mini-mp__meta { color: #9ab9dc; }
.r8-mini-mp--wmp11 .r8-mini-mp__btn {
    border-color: #496588;
    background: linear-gradient(180deg, #2e425c, #172334);
    color: #d6e9ff;
}
.r8-mini-mp--wmp11 .r8-mini-mp__btn--play {
    border-color: #8fd1ff;
    background: radial-gradient(circle at 50% 20%, #ffffff 0%, #8cd3ff 24%, #2587e8 60%, #0c4892 100%);
    color: #fff;
}

.r8-mini-pill {
    position: fixed;
    right: 12px;
    bottom: 42px;
    z-index: 1995;
    padding: 4px 10px;
    border-radius: 14px;
    border: 1px solid #6b88ab;
    background: linear-gradient(180deg, #ffffff 0%, #dce8f6 100%);
    color: #143d73;
    font: bold 11px/1.3 Tahoma, sans-serif;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
    cursor: pointer;
}

.r8-mini-pill:hover {
    border-color: #2c6db8;
    color: #0b4fa3;
}

/* ==========================================================================
   2-COLOR SKIN SWITCHER (XANH XP / BLOG 360 PLUS GIÁNG SINH & NĂM MỚI)
   ========================================================================== */
.r8-banner__noel,
.r8-ticker__noel {
    display: none !important;
}

html.r8-skin-noel .r8-banner__xp {
    display: none !important;
}

html.r8-skin-noel .r8-banner__noel {
    display: flex !important;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 1000 / 240;
    min-height: 205px;
    padding: 16px 190px 26px;
    background: #610d17 url("../images/noel-360-banner.jpg") center center / cover no-repeat;
    background-image: image-set(url("../images/noel-360-banner.webp") type("image/webp"), url("../images/noel-360-banner.jpg") type("image/jpeg"));
    text-decoration: none;
}

.r8-banner__fw {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    display: block;
}

.r8-banner__sparkles {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.r8-sp {
    position: absolute;
    font-style: normal;
    color: #fff3bd;
    text-shadow: 0 0 8px rgba(255, 224, 130, 0.95);
    animation: r8-twinkle 2.2s ease-in-out infinite;
}

.r8-sp--1 { top: 22%; left: 32%; font-size: 16px; animation-delay: 0s; }
.r8-sp--2 { top: 18%; left: 66%; font-size: 15px; animation-delay: 0.7s; color: #fff; }
.r8-sp--3 { top: 64%; left: 36%; font-size: 13px; animation-delay: 1.2s; }
.r8-sp--4 { top: 60%; left: 63%; font-size: 14px; animation-delay: 0.4s; }

html.r8-no-fx .r8-sp,
html.r8-fx-off .r8-sp {
    animation: none;
}

html.r8-no-fx .r8-banner__fw {
    display: none;
}

@keyframes r8-twinkle {
    0%, 100% { opacity: 0.35; transform: scale(0.85) rotate(0deg); }
    50% { opacity: 1; transform: scale(1.2) rotate(12deg); }
}

.r8-banner,
.r8-banner:hover,
.r8-banner:focus,
.r8-banner:active {
    text-decoration: none !important;
}

.r8-banner__center {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
}

.r8-banner__title {
    font: italic bold 48px/1.08 Georgia, "Palatino Linotype", "Book Antiqua", serif;
    background: linear-gradient(180deg, #ffffff 0%, #fff2be 52%, #f4c152 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 2px 2px rgba(68, 5, 12, 0.9)) drop-shadow(0 0 14px rgba(255, 220, 140, 0.55));
    letter-spacing: 0.6px;
}

.r8-banner__sub {
    display: inline-block;
    padding: 5px 18px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(138, 16, 30, 0.65), rgba(78, 7, 15, 0.78));
    border: 1px solid rgba(255, 226, 148, 0.65);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 3px 12px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(4px);
    font: bold 13px/1.3 Tahoma, Verdana, sans-serif;
    color: #fff6d9;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

@media (max-width: 720px) {
    html.r8-skin-noel .r8-banner__noel {
        min-height: 98px;
        aspect-ratio: 1000 / 245;
        padding: 8px 66px 14px;
        background-size: 100% 100%;
    }

    .r8-banner__center {
        gap: 4px;
    }

    .r8-banner__title {
        font-size: 21px;
    }

    .r8-banner__sub {
        font-size: 9.5px;
        padding: 2px 9px;
        white-space: nowrap;
    }

    .r8-sp--1 { left: 26%; font-size: 11px; }
    .r8-sp--2 { left: 72%; font-size: 11px; }
    .r8-sp--3, .r8-sp--4 { display: none; }
}

html.r8-skin-noel .r8-ticker__noel {
    display: inline !important;
}

.r8-color-switcher {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
}

.r8-color-btn {
    -webkit-appearance: none;
    appearance: none;
    padding: 5px 8px;
    font: bold 11.5px/1.25 Tahoma, Verdana, sans-serif;
    border-radius: 6px;
    border: 1px solid #8aa9cc;
    background: linear-gradient(180deg, #ffffff, #e2ecf8);
    color: #163d70;
    cursor: pointer;
    text-align: center;
    transition: box-shadow 0.15s ease, transform 0.1s ease;
}

.r8-color-btn[data-r8-color="noel-red"] {
    background: linear-gradient(180deg, #fff5f6, #fadce0);
    border-color: #d97782;
    color: #8f1624;
}

.r8-color-btn.active {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7), 0 0 7px rgba(40, 125, 220, 0.4);
    outline: 2px solid #287de0;
}

.r8-color-btn[data-r8-color="noel-red"].active {
    background: linear-gradient(180deg, #ea7680 0%, #cf3b49 48%, #a61c29 51%, #c42938 100%);
    border-color: #8c121e;
    color: #fff9df;
    outline-color: #f3c85c;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 2px 8px rgba(166, 28, 41, 0.35);
}

/* Dreamy Blog 360 Plus Ruby & Champagne Gold Holiday Theme */
html.r8-skin-noel-red {
    --r8-bg: #5c0a14;
    --r8-site-bg: rgba(255, 252, 250, 0.96);
    --r8-box-bg: #ffffff;
    --r8-box-border: #efc4c9;
    --r8-box-border-dark: #b82838;
    --r8-title-top: #ea7680;
    --r8-title-mid: #cf3b49;
    --r8-title-bot: #a61c29;
    --r8-text: #2a1d21;
    --r8-muted: #6e5960;
    --r8-link: #9c1a28;
    --r8-dark: #85121e;
    --r8-link-hover: #c97708;
    --r8-hot: #c91d2b;
    --r8-orange: #c97708;
    --r8-green: #1c7840;
}

html.r8-skin-noel-red body,
html.r8-skin-noel-red body.dark {
    background: #5c0a14 url("../images/noel-360-bg.jpg") center top / cover fixed no-repeat !important;
    background-image: image-set(url("../images/noel-360-bg.webp") type("image/webp"), url("../images/noel-360-bg.jpg") type("image/jpeg")) !important;
}

html.r8-skin-noel-red .r8-site {
    background: var(--r8-site-bg);
    border-left: 1px solid rgba(247, 219, 148, 0.72);
    border-right: 1px solid rgba(247, 219, 148, 0.72);
    box-shadow: 0 0 0 4px rgba(255, 238, 195, 0.25), 0 0 40px rgba(255, 190, 100, 0.28);
}

html.r8-skin-noel-red .r8-banner {
    background: #5c0a14;
}

/* Glossy Web 2.0 Two-Tone Ruby Navbar with Champagne Gold Active Tab */
html.r8-skin-noel-red .r8-topnav {
    background: linear-gradient(180deg, #df6a74 0%, #c63544 49%, #9c1724 51%, #bd2837 100%);
    border-top: 1px solid rgba(255, 224, 228, 0.65);
    border-bottom: 2px solid #f0c96b;
    box-shadow: 0 2px 8px rgba(92, 10, 20, 0.22);
}

html.r8-skin-noel-red .r8-topnav a {
    border-right-color: rgba(255, 220, 225, 0.25);
    text-shadow: 0 1px 1px rgba(72, 4, 12, 0.55);
}

html.r8-skin-noel-red .r8-topnav a:hover,
html.r8-skin-noel-red .r8-topnav a[aria-current="page"] {
    background: linear-gradient(180deg, #fff5cb 0%, #f5d379 50%, #e0ab3d 100%);
    color: #7a0e19 !important;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.65);
}

html.r8-skin-noel-red .r8-topnav a:hover i,
html.r8-skin-noel-red .r8-topnav a[aria-current="page"] i {
    color: #9c1724;
}

html.r8-skin-noel-red .r8-ticker {
    background: linear-gradient(180deg, #fffaf0, #fff3d6);
    border-bottom: 1px dashed #e6b85c;
    color: #9e1b27;
}

html.r8-skin-noel-red .r8-searchbar,
html.r8-skin-noel-red .r8-breadcrumb {
    background: #fff9f9;
    border-color: #f2cfd4;
}

html.r8-skin-noel-red .r8-box {
    border-radius: 8px;
    border-color: var(--r8-box-border);
    box-shadow: 0 3px 10px rgba(156, 23, 36, 0.08);
    overflow: hidden;
}

/* Glossy 360 Plus Glass Box Title */
html.r8-skin-noel-red .r8-box__title {
    background: linear-gradient(180deg, #eb7a84 0%, #d13d4b 48%, #a61c29 51%, #c42938 100%);
    border-bottom: 1px solid #961623;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
    border-radius: 7px 7px 0 0;
    color: #fffef7;
    text-shadow: 0 1px 2px rgba(70, 5, 12, 0.5);
}

html.r8-skin-noel-red .r8-box__title a,
html.r8-skin-noel-red .r8-box__title a:visited {
    color: #fffef7 !important;
}

html.r8-skin-noel-red .r8-box__title a:hover {
    color: #ffe699 !important;
}

html.r8-skin-noel-red .r8-today li:nth-child(even) {
    background: #fff6f7;
}

html.r8-skin-noel-red .r8-today__label {
    color: #9c1a28;
}

html.r8-skin-noel-red .r8-btn {
    background: linear-gradient(180deg, #ea7680 0%, #c63544 50%, #a61c29 51%, #bd2837 100%);
    border-color: #8c121e;
    text-shadow: 0 1px 1px rgba(70, 5, 12, 0.55);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

html.r8-skin-noel-red .r8-footer {
    background: linear-gradient(180deg, #b82534 0%, #80111d 100%);
    border-top: 2px solid #f0c96b;
}

/* Mobile topbar, slide-out drawer & subpage glossy ruby-gold consistency */
@media (max-width: 900px) {
    html.r8-skin-noel-red .r8-mbar,
    html.r8-skin-noel-red.js .r8-drawer-head {
        background: linear-gradient(180deg, #df6a74 0%, #c63544 49%, #9c1724 51%, #bd2837 100%);
        border-bottom: 2px solid #f0c96b;
        box-shadow: 0 2px 10px rgba(92, 10, 20, 0.35), inset 0 1px 0 rgba(255, 224, 228, 0.55);
    }

    html.r8-skin-noel-red .r8-mbar__logo,
    html.r8-skin-noel-red .r8-drawer-head__logo {
        color: #fff6cf;
        text-shadow: 0 1px 2px rgba(72, 4, 12, 0.85), 0 0 10px rgba(255, 222, 130, 0.45);
    }

    html.r8-skin-noel-red.js .r8-mbar__toggle {
        background: rgba(255, 255, 255, 0.16);
        border-color: rgba(255, 232, 175, 0.7);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
    }

    html.r8-skin-noel-red .r8-mbar__toggle span {
        background: #fff9df;
    }

    html.r8-skin-noel-red .r8-drawer-close {
        color: #fff6cf;
    }

    html.r8-skin-noel-red.js .r8-col-left {
        background: linear-gradient(180deg, #6e0f1c 0%, #4b0811 100%);
        box-shadow: 2px 0 18px rgba(48, 4, 10, 0.55);
    }

    html.r8-skin-noel-red .r8-overlay {
        background: rgba(48, 4, 10, 0.52);
    }
}

html.r8-skin-noel-red .card-header,
html.r8-skin-noel-red .modal-header,
html.r8-skin-noel-red .phdr,
html.r8-skin-noel-red .r8-ls-head,
html.r8-skin-noel-red .r8-col-main .symbols-hero-badge,
html.r8-skin-noel-red .video-downloader-container .card > h5:first-child,
html.r8-skin-noel-red .video-downloader-container .card > .text-center:first-child h2 {
    background: linear-gradient(180deg, #eb7a84 0%, #d13d4b 48%, #a61c29 51%, #c42938 100%) !important;
    border-bottom-color: #961623 !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
    color: #fffef7 !important;
    text-shadow: 0 1px 2px rgba(70, 5, 12, 0.5) !important;
}

html.r8-skin-noel-red .btn-primary,
html.r8-skin-noel-red .btn-success,
html.r8-skin-noel-red .r8-col-main .btn-gradient-primary,
html.r8-skin-noel-red .r8-col-main .btn-copy-sm {
    background: linear-gradient(180deg, #ea7680 0%, #c63544 50%, #a61c29 51%, #bd2837 100%) !important;
    border-color: #8c121e !important;
    text-shadow: 0 1px 1px rgba(70, 5, 12, 0.45) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
}

html.r8-skin-noel-red .btn-primary:hover,
html.r8-skin-noel-red .btn-success:hover,
html.r8-skin-noel-red .r8-btn:hover,
html.r8-skin-noel-red .r8-col-main .btn-copy-sm:hover {
    background: linear-gradient(180deg, #fff5cb 0%, #f5d379 50%, #e0ab3d 100%) !important;
    border-color: #b8821c !important;
    color: #7a0e19 !important;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.65) !important;
}

html.r8-skin-noel-red .badge-info,
html.r8-skin-noel-red .symbols-toast {
    background: #a61c29 !important;
    border-color: #8c121e !important;
}

html.r8-skin-noel-red .btn-danger,
html.r8-skin-noel-red .pagination .page-item.active .page-link,
html.r8-skin-noel-red .r8-col-main .symbols-nav-pill.active,
html.r8-skin-noel-red .r8-col-main .symbols-nav-pill:hover {
    background: linear-gradient(180deg, #ea7680 0%, #c63544 50%, #a61c29 51%, #bd2837 100%) !important;
    border-color: #8c121e !important;
    color: #fffef7 !important;
    text-shadow: 0 1px 1px rgba(70, 5, 12, 0.45) !important;
}

html.r8-skin-noel-red .r8-forum-toolbar {
    background: #fff4f5 !important;
    border-color: #ebb7be !important;
}

html.r8-skin-noel-red .r8-forum-head,
html.r8-skin-noel-red .r8-forum-cat__name {
    background: #fdebec;
    color: #8f1624;
    border-bottom-color: #f2cfd4;
}

html.r8-skin-noel-red .r8-forum-cat__desc {
    background: #fff9fa;
    border-bottom-color: #f3d5d9;
}

html.r8-skin-noel-red .r8-forum-row:nth-child(even) {
    background: #fff8f9;
}

html.r8-skin-noel-red .r8-forum-row:hover {
    background: #fff0f2;
}

html.r8-skin-noel-red .r8-forum-row__count {
    border-left-color: #f3d5d9;
}

html.r8-skin-noel-red .r8-forum-row__count b {
    color: #a61c29;
}

html.r8-skin-noel-red .alert {
    background: #fff4f5 !important;
    border-color: #efc4c9 !important;
}

html.r8-skin-noel-red .nav-tabs .nav-link {
    background: #fdebec;
    border-color: #efc4c9;
}

html.r8-skin-noel-red .nav-tabs .nav-link.active {
    background: #ffffff !important;
    color: #a61c29 !important;
}

html.r8-skin-noel-red .card:is(.bg-primary, .bg-info):not([class*="bg-opacity"]),
html.r8-skin-noel-red .card.text-white[style*="background"] {
    background: linear-gradient(135deg, #c63544 0%, #80111d 100%) !important;
    border-color: #961623 !important;
}

html.r8-skin-noel-red .r8-list > li,
html.r8-skin-noel-red .r8-tree li,
html.r8-skin-noel-red .list-group-item,
html.r8-skin-noel-red .live-search-item,
html.r8-skin-noel-red .r8-col-main .nickname-variant-box {
    border-bottom-color: #f3d5d9 !important;
}

html.r8-skin-noel-red .r8-list > li::before {
    color: #d94150;
}

html.r8-skin-noel-red .card {
    box-shadow: 0 3px 10px rgba(156, 23, 36, 0.08) !important;
}

html.r8-skin-noel-red .r8-col-main .vote-chip {
    background: #fff3f4 !important;
}

/* ==========================================================================
   YAHOO! 360 PINK SKIN (.r8-skin-pink360)
   ========================================================================== */
.r8-color-btn[data-r8-color="pink-360"] {
    background: linear-gradient(180deg, #fff5fa, #ffd6eb);
    border-color: #e37db2;
    color: #9e145b;
}

.r8-color-btn[data-r8-color="pink-360"].active {
    background: linear-gradient(180deg, #ff99cc 0%, #f0529c 50%, #c92272 51%, #e63b8c 100%);
    border-color: #9e145b;
    color: #ffffff;
    outline-color: #ff99cc;
}

html.r8-skin-pink360 {
    --r8-bg: #ffd6eb;
    --r8-site-bg: #fff9fc;
    --r8-box-bg: #ffffff;
    --r8-box-border: #f0a1cb;
    --r8-box-border-dark: #b81560;
    --r8-title-top: #ef5ea6;
    --r8-title-mid: #db2777;
    --r8-title-bot: #b81560;
    --r8-text: #38182a;
    --r8-muted: #7a5267;
    --r8-link: #b01865;
    --r8-dark: #8c0f4e;
    --r8-link-hover: #0b4fa3;
    --r8-hot: #d91670;
}

html.r8-skin-pink360 .r8-box__title,
html.r8-skin-pink360 .card-header,
html.r8-skin-pink360 .modal-header,
html.r8-skin-pink360 .phdr,
html.r8-skin-pink360 .r8-ls-head,
html.r8-skin-pink360 .table thead th,
html.r8-skin-pink360 .r8-col-main .symbols-hero-badge,
html.r8-skin-pink360 .video-downloader-container .card > h5:first-child,
html.r8-skin-pink360 .video-downloader-container .card > .text-center:first-child h2 {
    background: linear-gradient(180deg, #ef5ea6 0%, #db2777 48%, #b81560 51%, #d93282 100%) !important;
    border-bottom-color: #9e145b !important;
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(95, 8, 52, 0.55) !important;
}

html.r8-skin-pink360 .r8-topnav {
    background: linear-gradient(#f26bae, #c92272);
    border-top-color: #ffd1e8;
}

html.r8-skin-pink360 .r8-topnav a:hover,
html.r8-skin-pink360 .r8-topnav a[aria-current="page"] {
    background: linear-gradient(180deg, #fff5cb 0%, #f5d379 50%, #e6b44c 100%);
    color: #8c0f4e !important;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
}

html.r8-skin-pink360 .r8-topnav a:hover i,
html.r8-skin-pink360 .r8-topnav a[aria-current="page"] i {
    color: #b01865;
}

@media (max-width: 900px) {
    html.r8-skin-pink360 .r8-mbar,
    html.r8-skin-pink360.js .r8-drawer-head {
        background: linear-gradient(180deg, #f26bae 0%, #db2777 49%, #b81560 51%, #d93282 100%);
        border-bottom: 2px solid #ffd1e8;
        box-shadow: 0 2px 10px rgba(130, 12, 72, 0.3), inset 0 1px 0 rgba(255, 230, 242, 0.55);
    }

    html.r8-skin-pink360 .r8-mbar__logo,
    html.r8-skin-pink360 .r8-drawer-head__logo {
        color: #ffffff;
        text-shadow: 0 1px 2px rgba(95, 8, 52, 0.75);
    }

    html.r8-skin-pink360.js .r8-mbar__toggle {
        background: rgba(255, 255, 255, 0.18);
        border-color: rgba(255, 224, 240, 0.75);
    }

    html.r8-skin-pink360.js .r8-col-left {
        background: linear-gradient(180deg, #991353 0%, #6e0b3a 100%);
    }
}

html.r8-skin-pink360 .r8-btn,
html.r8-skin-pink360 .btn-primary,
html.r8-skin-pink360 .btn-success,
html.r8-skin-pink360 .btn-danger,
html.r8-skin-pink360 .pagination .page-item.active .page-link,
html.r8-skin-pink360 .r8-col-main .btn-gradient-primary,
html.r8-skin-pink360 .r8-col-main .btn-copy-sm,
html.r8-skin-pink360 .r8-col-main .symbols-nav-pill.active,
html.r8-skin-pink360 .r8-col-main .symbols-nav-pill:hover {
    background: linear-gradient(180deg, #ef5ea6 0%, #db2777 50%, #b81560 51%, #d93282 100%) !important;
    border-color: #9e145b !important;
    color: #ffffff !important;
    text-shadow: 0 1px 1px rgba(95, 8, 52, 0.45) !important;
}

html.r8-skin-pink360 .badge-info,
html.r8-skin-pink360 .symbols-toast {
    background: #c92272 !important;
    border-color: #9e145b !important;
}

html.r8-skin-pink360 .r8-forum-toolbar {
    background: #fff2f8 !important;
    border-color: #f0a1cb !important;
}

html.r8-skin-pink360 .r8-forum-head,
html.r8-skin-pink360 .r8-forum-cat__name {
    background: #ffe6f3;
    color: #9e145b;
    border-bottom-color: #f5b8d8;
}

html.r8-skin-pink360 .r8-forum-cat__desc {
    background: #fff9fc;
    border-bottom-color: #f5c6df;
}

html.r8-skin-pink360 .r8-forum-row:nth-child(even) {
    background: #fff7fb;
}

html.r8-skin-pink360 .r8-forum-row:hover {
    background: #ffe8f5;
}

html.r8-skin-pink360 .r8-forum-row__count {
    border-left-color: #f5c6df;
}

html.r8-skin-pink360 .r8-forum-row__count b {
    color: #c92272;
}

html.r8-skin-pink360 .alert {
    background: #fff2f8 !important;
    border-color: #f0a1cb !important;
}

html.r8-skin-pink360 .nav-tabs .nav-link {
    background: #ffe6f3;
    border-color: #f0a1cb;
}

html.r8-skin-pink360 .nav-tabs .nav-link.active {
    background: #ffffff !important;
    color: #c92272 !important;
}

html.r8-skin-pink360 .list-group-item {
    border-bottom-color: #f5c6df !important;
}

html.r8-skin-pink360 .card:is(.bg-primary, .bg-info):not([class*="bg-opacity"]),
html.r8-skin-pink360 .card.text-white[style*="background"] {
    background: linear-gradient(135deg, #ec4899 0%, #9d174d 100%) !important;
    border-color: #9e145b !important;
}

html.r8-skin-pink360 .r8-btn:hover,
html.r8-skin-pink360 .btn-primary:hover,
html.r8-skin-pink360 .btn-success:hover,
html.r8-skin-pink360 .btn-danger:hover {
    background: linear-gradient(180deg, #f472b6 0%, #e11d74 50%, #9d174d 51%, #be185d 100%) !important;
    border-color: #831843 !important;
    color: #ffffff !important;
}

html.r8-skin-pink360 .r8-onl__sum-item {
    background: linear-gradient(180deg, #fff9fc 0%, #ffe6f3 100%);
    border-color: #f0a1cb;
}

html.r8-skin-pink360 .r8-onl__cell {
    background: #fffafe;
    border-color: #f5c6df;
}

html.r8-skin-pink360 .r8-footer {
    background: linear-gradient(#d42c7c, #991353);
}

/* ==========================================================================
   WINAMP CLASSIC SKIN FOR MEDIA PLAYER (.r8-mp--winamp)
   ========================================================================== */
.r8-mp.r8-mp--winamp {
    background: linear-gradient(180deg, #3c4252 0%, #242834 55%, #1d202a 100%);
    border-color: #6b748a;
    color: #00ff66;
}

.r8-mp--winamp .r8-mp__screen {
    background: #06090c;
    border-bottom-color: #4f586e;
}

.r8-mp--winamp .r8-mp__statusbar {
    background: #0b1014;
    border-top-color: #252b38;
    color: #00ff66;
    font-family: "Courier New", monospace;
}

.r8-mp--winamp .r8-mp__status,
.r8-mp--winamp .r8-mp__clock {
    color: #8cffb0;
}

.r8-mp--winamp .r8-mp__list {
    background: #070b0e;
    border-color: #4f586e;
}

.r8-mp--winamp .r8-mp__list button {
    color: #00e65c;
    font-family: "Courier New", monospace;
}

.r8-mp--winamp .r8-mp__list button[aria-current="true"] {
    background: #143620;
    color: #ffffff;
}

.r8-mini-mp.r8-mini-mp--winamp {
    background: linear-gradient(180deg, #3c4252, #1d202a);
    border-color: #6b748a;
    color: #00ff66;
}

/* ==========================================================================
   MOUSE STAR TRAIL (.r8-star-trail)
   ========================================================================== */
@keyframes r8-star-fade {
    0% {
        opacity: 0.95;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(14px) scale(0.45);
    }
}

.r8-star-trail {
    position: fixed;
    pointer-events: none;
    z-index: 9998;
    font-size: 12px;
    line-height: 1;
    text-shadow: 0 0 4px rgba(255, 255, 255, 0.9);
    animation: r8-star-fade 0.52s ease-out forwards;
}

html.r8-no-fx .r8-star-trail {
    display: none;
}

/* Gunbound rank badge (.r8-gb-rank) */
.r8-gb-rank {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    vertical-align: middle;
    margin-left: 3px;
}

.r8-theme .r8-gb-rank img {
    width: 30px;
    height: 18px;
    display: inline-block;
    vertical-align: middle;
    image-rendering: auto;
}

.r8-gb-rank__name {
    font-size: 10.5px;
    font-weight: bold;
    color: #0b4fa3;
    background: #eef7fd;
    border: 1px solid #9ccae8;
    border-radius: 2px;
    padding: 0 4px;
    line-height: 1.35;
}

.r8-box--overflow-visible {
    overflow: visible !important;
    position: relative;
    z-index: 25;
}

.r8-box--overflow-visible > .r8-box__title {
    border-radius: var(--r8-radius) var(--r8-radius) 0 0;
}

.r8-p360-actions .dropdown-menu {
    z-index: 1050;
}

/* Staff nick colors (Admin / SMod / Mod) */
.r8-theme .r8-user--adm,
.r8-theme a.r8-user--adm {
    color: #d91b23 !important;
    font-weight: bold;
}

.r8-theme .r8-user--smod,
.r8-theme a.r8-user--smod {
    color: #7b2cbf !important;
    font-weight: bold;
}

.r8-theme .r8-user--mod,
.r8-theme a.r8-user--mod {
    color: #167c2e !important;
    font-weight: bold;
}

/* Retro BBCode extras */
.bbcode-glow-red {
    color: #c62828;
    text-shadow: 0 0 6px rgba(255, 59, 48, 0.75);
}

.bbcode-glow-green {
    color: #1b7f37;
    text-shadow: 0 0 6px rgba(40, 167, 69, 0.75);
}

.bbcode-glow-blue {
    color: #0b5ed7;
    text-shadow: 0 0 6px rgba(13, 110, 253, 0.75);
}

.bbcode-hr {
    margin: 8px 0;
    border: 0;
    border-bottom: 1px dashed #9ccae8;
}

.bbcode-hide {
    margin: 8px 0;
    padding: 8px 10px;
    border: 1px dashed #6cb6e0;
    background: #f4faff;
    border-radius: 3px;
}

.bbcode-hide--locked {
    color: #8a5300;
    background: #fff9e6;
    border-color: #f0c36d;
    font-size: 12px;
}

/* Magnific Popup Prev/Next arrows: keep near centered image on wide screens */
.mfp-wrap .mfp-arrow {
    width: 48px;
    height: 48px;
    margin-top: -24px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.58);
    opacity: 0.92;
    transition: background-color 0.15s ease;
}
.mfp-wrap .mfp-arrow:hover {
    background: rgba(0, 0, 0, 0.85);
    opacity: 1;
}
.mfp-wrap .mfp-arrow:before {
    display: none !important;
}
.mfp-wrap .mfp-arrow:after {
    top: 50% !important;
    left: 50% !important;
    right: auto !important;
    margin: 0 !important;
    border-top-width: 10px !important;
    border-bottom-width: 10px !important;
}
.mfp-wrap .mfp-arrow-left:after {
    border-right-width: 15px !important;
    transform: translate(-60%, -50%);
}
.mfp-wrap .mfp-arrow-right:after {
    border-left-width: 15px !important;
    transform: translate(-40%, -50%);
}
@media (min-width: 992px) {
    .mfp-wrap .mfp-arrow-left {
        left: max(18px, calc(50% - 430px));
    }
    .mfp-wrap .mfp-arrow-right {
        right: max(18px, calc(50% - 430px));
    }
}

/* Logged-in Sidebar User Card (.r8-ucard) */
.r8-ucard {
    padding: 8px;
    background: linear-gradient(180deg, #ffffff 0%, #f5fafe 100%);
    border-bottom: 1px solid var(--r8-box-border);
}

.r8-ucard__top {
    display: flex;
    align-items: center;
    gap: 8px;
}

.r8-ucard__ava-wrap {
    position: relative;
    flex-shrink: 0;
    display: block;
    width: 42px;
    height: 42px;
    padding: 2px;
    background: #fff;
    border: 1px solid var(--r8-box-border);
    border-radius: 7px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.r8-ucard__ava {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 5px;
    display: block;
}

.r8-ucard__dot {
    position: absolute;
    right: -2px;
    bottom: -2px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #22c55e;
    border: 2px solid #fff;
    box-shadow: 0 0 4px rgba(34, 197, 94, 0.7);
}

.r8-ucard__info {
    min-width: 0;
    flex: 1;
}

.r8-ucard__name {
    display: block;
    font-size: 13px;
    font-weight: bold;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none;
}

.r8-ucard__rank {
    margin-top: 3px;
    line-height: 1.1;
}

.r8-ucard__rank .r8-gb-rank {
    margin-left: 0;
    flex-wrap: wrap;
}

.r8-ucard__stt {
    position: relative;
    margin-top: 8px;
    padding: 5px 22px 5px 7px;
    background: #fffbe6;
    border: 1px dashed #e2b84f;
    border-radius: 6px;
    font-size: 11.5px;
    line-height: 1.35;
    color: #5a4310;
    font-style: italic;
    word-break: break-word;
}

.r8-ucard__stt::before {
    content: "";
    position: absolute;
    top: -6px;
    left: 16px;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 6px solid #e2b84f;
}

.r8-ucard__stt::after {
    content: "";
    position: absolute;
    top: -5px;
    left: 17px;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: 5px solid #fffbe6;
}

.r8-ucard__stt-edit {
    position: absolute;
    right: 5px;
    top: 4px;
    font-style: normal;
    font-size: 12px;
    line-height: 1;
    color: var(--r8-muted) !important;
    text-decoration: none !important;
    opacity: 0.75;
}

.r8-ucard__stt-edit:hover {
    opacity: 1;
    color: var(--r8-link) !important;
}

.r8-ucard__stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    margin-top: 7px;
    padding-top: 6px;
    border-top: 1px dotted var(--r8-box-border);
    text-align: center;
}

.r8-ucard__stat {
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid #e2eef8;
    border-radius: 4px;
    padding: 3px 2px;
    line-height: 1.15;
}

.r8-ucard__stat b {
    display: block;
    font-size: 12px;
    color: var(--r8-link);
}

.r8-ucard__stat span {
    display: block;
    font-size: 9.5px;
    color: var(--r8-muted);
}

html.r8-skin-noel-red .r8-ucard {
    background: linear-gradient(180deg, #ffffff 0%, #fff5f6 100%);
}

html.r8-skin-noel-red .r8-ucard__stt {
    background: #fff9e6;
    border-color: #e6b85c;
    color: #70390c;
}

html.r8-skin-noel-red .r8-ucard__stt::before {
    border-bottom-color: #e6b85c;
}

html.r8-skin-noel-red .r8-ucard__stt::after {
    border-bottom-color: #fff9e6;
}

html.r8-skin-noel-red .r8-ucard__stat {
    border-color: #f3d5d9;
}

html.r8-skin-noel-red .r8-gb-rank__name {
    color: #8f1624;
    background: #fff3f4;
    border-color: #e9b5bc;
}

/* Guestbook status pill */
.r8-gb-item__stt-pill {
    display: inline-block;
    margin-top: 2px;
    padding: 2px 7px;
    background: #fffbe6;
    border: 1px dashed #e2b84f;
    border-radius: 5px;
    font-size: 11px;
    font-style: italic;
    color: #5a4310;
}

/* Redesigned Right Sidebar Online & Stats Widget (.r8-onl) */
.r8-onl {
    padding: 7px 8px;
}

.r8-onl__summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
    margin-bottom: 6px;
}

.r8-onl__sum-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5px 4px;
    background: linear-gradient(180deg, #f3f9ff 0%, #e1f0fc 100%);
    border: 1px solid var(--r8-box-border);
    border-radius: 5px;
    text-align: center;
    line-height: 1.2;
}

.r8-onl__sum-lbl {
    font-size: 10px;
    color: var(--r8-muted);
    white-space: nowrap;
}

.r8-onl__sum-val {
    font-size: 13px;
    color: var(--r8-link);
    margin-top: 1px;
}

.r8-onl__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    margin-bottom: 2px;
    text-align: center;
}

.r8-onl__cell {
    background: #f8fcff;
    border: 1px solid #d6eaf8;
    border-radius: 5px;
    padding: 4px 2px;
    line-height: 1.15;
}

.r8-onl__cell b {
    display: block;
    font-size: 12.5px;
    color: var(--r8-link);
}

.r8-onl__cell span {
    display: block;
    font-size: 9.5px;
    color: var(--r8-muted);
    white-space: nowrap;
}

.r8-onl__cell--total b {
    color: #15803d;
}

.r8-onl__pulse {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22c55e;
    margin-right: 3px;
    vertical-align: 1px;
    box-shadow: 0 0 4px rgba(34, 197, 94, 0.8);
}

html.r8-skin-noel-red .r8-onl__sum-item {
    background: linear-gradient(180deg, #fff9f9 0%, #fdebec 100%);
    border-color: #efc4c9;
}

html.r8-skin-noel-red .r8-onl__cell {
    background: #fffafa;
    border-color: #f3d5d9;
}

@media (max-width: 640px) {
    .r8-onl__sum-item {
        flex-direction: row;
        justify-content: space-between;
        padding: 5px 8px;
    }

    .r8-onl__sum-lbl {
        font-size: 11px;
    }

    .r8-onl__sum-val {
        margin-top: 0;
        font-size: 13px;
    }
}

/* Lightweight Guestbook BBCode Editor (.r8-gb-editor) */
.r8-gb-bbbar {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
}

.r8-gb-bbbtn {
    padding: 2px 7px;
    font: 11.5px/1.3 Tahoma, Verdana, sans-serif;
    background: linear-gradient(180deg, #ffffff 0%, #e7eef6 100%);
    border: 1px solid #9db7d3;
    border-radius: 3px;
    color: #163d70;
    cursor: pointer;
}

.r8-gb-bbbtn:hover {
    background: linear-gradient(180deg, #fff5cb 0%, #f5d379 100%);
    border-color: #c89122;
    color: #7a0e19;
}

.r8-gb-textarea {
    font-size: 13px !important;
    line-height: 1.45;
    min-height: 88px;
    resize: vertical;
}

html.r8-skin-noel-red .r8-gb-bbbtn {
    background: linear-gradient(180deg, #fff9fa 0%, #fbe2e6 100%);
    border-color: #d98b95;
    color: #8f1624;
}

/* ==========================================================================
   CROSS-MODULE POLISH: FA->BI ICON SHIM, BADGES, SYMBOLS OVERFLOW, MOBILE
   ========================================================================== */
/* Map legacy FontAwesome <i> tags inside modules (e.g. lunar) to loaded bootstrap-icons */
.r8-theme :is(.fa, .fas, .far, .fab) {
    display: inline-block;
    font-family: "bootstrap-icons" !important;
    font-style: normal;
    font-weight: normal !important;
    font-variant: normal;
    text-transform: none;
    line-height: 1;
    vertical-align: -0.125em;
    -webkit-font-smoothing: antialiased;
}

.r8-theme .fa-search::before { content: "\f52a"; }
.r8-theme .fa-eye::before { content: "\f341"; }
.r8-theme .fa-quote-left::before { content: "\f6b0"; }
.r8-theme .fa-star::before { content: "\f586"; }
.r8-theme .fa-heart::before,
.r8-theme .fa-heartbeat::before { content: "\f415"; }
.r8-theme .fa-calendar-check::before { content: "\f1e2"; }
.r8-theme .fa-hand-pointer::before,
.r8-theme .fa-hand-paper::before { content: "\f403"; }
.r8-theme .fa-caret-down::before { content: "\f229"; }
.r8-theme .fa-caret-up::before { content: "\f235"; }
.r8-theme .fa-ruler-combined::before { content: "\f523"; }
.r8-theme .fa-book-open::before,
.r8-theme .fa-scroll::before,
.r8-theme .fa-file-text-o::before { content: "\f194"; }
.r8-theme .fa-magic::before { content: "\f675"; }
.r8-theme .fa-user::before { content: "\f4da"; }
.r8-theme .fa-user-circle::before,
.r8-theme .fa-user-tag::before { content: "\f4d7"; }
.r8-theme .fa-users::before { content: "\f4cf"; }
.r8-theme .fa-coins::before,
.r8-theme .fa-money::before,
.r8-theme .fa-money-bill-wave::before { content: "\f632"; }
.r8-theme .fa-gem::before { content: "\f3e6"; }
.r8-theme .fa-palette::before { content: "\f4b1"; }
.r8-theme .fa-shield-alt::before { content: "\f52f"; }
.r8-theme .fa-thumbs-up::before { content: "\f407"; }
.r8-theme .fa-check-circle::before { content: "\f26b"; }
.r8-theme .fa-check::before { content: "\f26e"; }
.r8-theme .fa-exclamation-triangle::before { content: "\f33b"; }
.r8-theme .fa-info-circle::before { content: "\f431"; }
.r8-theme .fa-home::before { content: "\f424"; }
.r8-theme .fa-yin-yang::before { content: "\f67e"; }
.r8-theme .fa-list-ul::before,
.r8-theme .fa-list::before { content: "\f478"; }
.r8-theme .fa-poll-h::before,
.r8-theme .fa-chart-line::before { content: "\f17e"; }
.r8-theme .fa-birthday-cake::before { content: "\f6ed"; }
.r8-theme .fa-briefcase::before { content: "\f1cc"; }
.r8-theme .fa-calculator::before { content: "\f1e0"; }
.r8-theme .fa-car::before { content: "\f7e1"; }
.r8-theme .fa-chevron-right::before { content: "\f285"; }
.r8-theme .fa-arrow-circle-right::before { content: "\f134"; }
.r8-theme .fa-arrow-right::before { content: "\f138"; }
.r8-theme .fa-ban::before { content: "\f6b6"; }
.r8-theme .fa-fingerprint::before { content: "\f671"; }
.r8-theme .fa-gift::before { content: "\f3ec"; }
.r8-theme .fa-lightbulb::before { content: "\f46b"; }
.r8-theme .fa-pencil-alt::before { content: "\f4cb"; }
.r8-theme .fa-plus-circle::before { content: "\f4fa"; }
.r8-theme .fa-random::before { content: "\f544"; }
.r8-theme .fa-cut::before { content: "\f528"; }
.r8-theme .fa-table::before { content: "\f5aa"; }
.r8-theme .fa-smile::before { content: "\f327"; }
.r8-theme .fa-brain::before { content: "\f46b"; }
.r8-theme .fa-leaf::before,
.r8-theme .fa-seedling::before { content: "\f586"; }
.r8-theme .fa-crown::before { content: "\f3e6"; }
.r8-theme .fa-balance-scale::before { content: "\f52f"; }
.r8-theme .fa-mars::before,
.r8-theme .fa-venus::before { content: "\f4da"; }
.r8-theme .fa-exchange::before { content: "\f544"; }
.r8-theme .fa-clone::before { content: "\f1c9"; }
.r8-theme .fa-comment-dots::before { content: "\f253"; }
.r8-theme .fa-deaf::before { content: "\f431"; }
.r8-theme .fa-dot-circle::before { content: "\f26b"; }

/* Ensure card-header icons and Bootstrap 5 .badge.bg-info have strong contrast */
.r8-theme .card-header :is(i, .bi, .fa, .fas) {
    color: #ffffff !important;
}

.r8-theme .badge.bg-info {
    background-color: #1474b8 !important;
    color: #ffffff !important;
}

html.r8-skin-noel-red .card.bg-danger:not([class*="bg-opacity"]) {
    background: linear-gradient(135deg, #d13d4b 0%, #8f1624 100%) !important;
    border-color: #8c121e !important;
}

html.r8-skin-noel-red .btn-dark {
    background: linear-gradient(180deg, #9c1a28 0%, #700d18 50%, #5c0a14 51%, #7a0e19 100%) !important;
    border-color: #4b0811 !important;
}

html.r8-skin-pink360 .card.bg-danger:not([class*="bg-opacity"]) {
    background: linear-gradient(135deg, #db2777 0%, #9e145b 100%) !important;
    border-color: #831843 !important;
}

html.r8-skin-pink360 .btn-dark {
    background: linear-gradient(180deg, #b01865 0%, #831843 50%, #6b0f35 51%, #8c0f4e 100%) !important;
    border-color: #500724 !important;
}

/* Prevent tall/wide ornate Unicode symbols from spilling out of /ki-tu/ cards */
.r8-theme .r8-col-main :is(.symbols-preview-text, .char-item-btn, .nickname-variant-box, .symbol-cell) {
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    line-height: 1.5;
}

/* Hide disabled admin smilies checkboxes for guests on /help/smilies/ and align icons */
html[data-r8-guest="1"] .r8-col-main .list-group-item .custom-control:has(input:disabled) {
    display: none !important;
}

.r8-theme .r8-col-main .list-group-item > div:has(> img[src*="/assets/emoticons/"]) {
    min-width: 42px;
    text-align: center;
    flex-shrink: 0;
}

/* Mobile floating button compactness and footer clearance */
@media (max-width: 640px) {
    .r8-fx-toggle {
        right: 6px;
        bottom: 6px;
        padding: 2px 7px !important;
        font-size: 10px !important;
        opacity: 0.85;
    }

    .r8-footer {
        padding-bottom: 54px;
    }
}
