/* Reference palette: orange canvas, peach panels, brown text, coral actions.
   Loaded after the legacy theme; existing grids and content order stay intact. */
   :root {
    --surface: #ffd09c;
    --surface-warm: #ffc58a;
    --surface-strong: #ff982b;
    --ink: #603407;
    --ink-soft: #75471f;
    --muted: #80532d;
    --line: #e88e35;
    --line-strong: #bb681b;
    --red: #ff494f;
    --red-deep: #c52c37;
    --frame-bg: #713b13;
    --frame-ink: #ffe2bd;
    --radius-lg: 6px;
    --radius-md: 5px;
    --radius-sm: 4px;
    --shadow: 0 2px 5px rgb(111 56 7 / 12%);
    --shadow-soft: 0 1px 3px rgb(111 56 7 / 10%);
    --font-body: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-display: var(--font-body);
}
body {
    background: #ff982b !important;
    color: var(--ink);
    font-weight: 400;
    line-height: 1.55;
}
body :is(h1, h2, h3, h4, h5, h6, .font-display, .section-title, .panel-title) {
    font-family: var(--font-body);
    font-weight: 600;
    letter-spacing: 0;
    text-shadow: none;
}
body :is(.fw-bold, .font-weight-bold, strong, b) { font-weight: 600 !important; }
body :is(.btn, .site-btn, .nav-link, .subtab-link, .home-news-title, .nro-feature-title, .home-news-author) {
    font-weight: 600 !important;
    text-shadow: none;
}
body :is(.panel-lead, .section-lead, .home-news-meta, label, .table tbody td) { font-weight: 400; }
body :is(.page-card, .page-card-alt, .home-news-item,
    .sidebar-widget, .feature-card, .forum-entry, .forum-tabs-container,
    main .card, main .card-body, main .pink-card, main .filter-card, main .container.color-main2) {
    background: var(--surface) !important;
    border: 1px solid var(--line) !important;
    border-radius: 5px !important;
    box-shadow: var(--shadow-soft) !important;
    color: var(--ink);
}
body :is(.home-news-item, .feature-card):hover {
    background: #ffd9ae !important;
    border-color: var(--line-strong) !important;
    transform: none;
}
body :is(.home-news-title, .nro-feature-title) { color: var(--ink) !important; font-size: 15px; }
body :is(.home-news-meta, .nro-feature-desc, .text-muted) { color: var(--muted) !important; }
body .sidebar-widget .widget-header {
    background: var(--surface) !important;
    color: var(--ink);
    border-bottom: 1px solid var(--line);
    font-size: 14px;
    font-weight: 600;
    text-align: left;
}
body .forum-nav-tabs { background: transparent; border-color: var(--line); }
body .forum-nav-tabs .nav-link { color: var(--ink-soft); }
body .forum-nav-tabs .nav-link.active {
    background: transparent !important;
    color: var(--ink) !important;
    box-shadow: inset 0 -2px var(--ink);
}
body :is(.subtab-link.active, .subtab-link:hover) { color: #9b2730; }
body :is(.btn, .site-btn, .nro-hero-btn-login, .nro-hero-btn-register, .nro-download-btn, .nro-btn-bxh, .nro-btn-zalo) {
    border-radius: 4px !important;
    border-width: 1px !important;
    box-shadow: var(--shadow-soft) !important;
    font-weight: 600 !important;
    text-shadow: none !important;
    transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease;
}
body :is(.nro-hero-btn-login, .btn-login-red, .nro-btn-bxh, .btn-primary) {
    background: #ff494f !important;
    border-color: #e83c43 !important;
    color: #fff !important;
}
body :is(.nro-hero-btn-register, .btn-register-peach, .user-menu-btn, .btn-light) {
    background: var(--surface-warm) !important;
    color: var(--ink) !important;
    border-color: var(--line) !important;
}
body :is(.nro-download-btn, .btn-dl-pc) { background: #6b3704 !important; border-color: #6b3704 !important; }
body .btn-dl-android { background: #008b32 !important; }
body .btn-dl-ios { background: #374151 !important; }
body .btn-dl-java { background: #c94c00 !important; }
body .btn-dl-playstore { background: #5536ed !important; }
body .nro-btn-zalo { background: #087cab !important; border-color: #076d97 !important; }
body :is(.nro-btn-bxh, .nro-btn-zalo, .nro-download-btn) { font-size: 14px !important; }
body .nro-hero-card { border: 1px solid var(--line); border-radius: 6px; box-shadow: var(--shadow); }
body .nro-feature-avatar { background: var(--surface-warm); border-color: var(--line); border-radius: 4px; box-shadow: none; }
body :is(.form-control, .form-select, input[type="text"], input[type="password"], input[type="number"], input[type="email"]) {
    background: #ffdeb7 !important;
    border: 1px solid #b97130 !important;
    border-radius: 4px !important;
    color: var(--ink) !important;
    font-weight: 400 !important;
}
body :is(.form-control, .form-select):focus {
    background: #ffe3c2 !important;
    border-color: #8d4a11 !important;
    box-shadow: 0 0 0 3px rgb(141 74 17 / 16%) !important;
}
body input::placeholder, body textarea::placeholder { color: #835a36; opacity: 1; }
body .site-page-banner h1 { color: var(--ink) !important; font-size: 26px; }
body :is(.bg-chocolate-header, .site-footer) {
    background: var(--frame-bg) !important;
    color: var(--frame-ink);
}
body .bg-chocolate-header { box-shadow: var(--shadow-soft); }
body #homeNotifyModal .modal-content {
    background: #faa442 !important;
    border: 3px solid #c2700a !important;
    border-radius: 18px !important;
    box-shadow: 0 12px 35px rgba(180, 83, 9, 0.45) !important;
}
body #homeNotifyModal .modal-header {
    background: #faa442!important;
    border-bottom: 2px solid #c2700a !important;
}
body #homeNotifyModal :is(h4) { color: #7c2d12 !important; font-weight: 700; }
body #homeNotifyModal :is(p) { color: #fff !important; font-weight: 600; }
body #homeNotifyModal .notice-summary { background: rgba(255,255,255,0.25) !important; border-color: rgba(255,255,255,0.5) !important; }
body #homeNotifyModal .modal-body { padding: 24px !important; }

/* Compact platform icons and clearer home content hierarchy. */
.nro-download-btn > i { width: 20px; font-size: 19px; text-align: center; flex-shrink: 0; }
body .nro-feature-list {
    padding: 6px 20px !important;
    background: var(--surface) !important;
    border: 1px solid var(--line) !important;
    border-radius: 6px !important;
    box-shadow: var(--shadow-soft);
}
body .nro-feature-list .nro-feature-item {
    padding: 20px 4px !important;
    margin: 0;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    gap: 16px;
    transform: none;
}
body .nro-feature-list .nro-feature-item + .nro-feature-item { border-top: 1px solid rgb(151 82 25 / 20%) !important; }
body .nro-feature-list .nro-feature-item:hover .nro-feature-title { color: #a24413 !important; }
body .nro-feature-list .nro-feature-avatar {
    width: 52px;
    height: 52px;
    margin: 0;
    padding: 6px;
    background: #ffc187;
    border: 0;
    border-radius: 10px;
    box-shadow: none;
}
.nro-feature-item .flex-grow-1 { min-width: 0; }
body .nro-feature-list .nro-feature-title { gap: 10px; margin-bottom: 5px; font-size: 16px; line-height: 1.4; }
body .nro-feature-list .nro-feature-desc { font-size: 13px; line-height: 1.6; color: #80512b; }
.feature-hot-badge { display: inline-flex; align-items: center; gap: 4px; color: #a3351c; background: transparent; border: 0; padding: 0; font-size: 10px; font-weight: 600; line-height: 1.3; letter-spacing: .3px; }
.feature-arrow { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; flex-shrink: 0; color: #9b5b28; background: #ffc187; border-radius: 50%; font-size: 10px; margin-left: auto; }
body .home-forum-section { background: transparent; }
.forum-section-title { display: flex; align-items: center; gap: 8px; color: var(--ink); font-size: 18px; }
.forum-section-title i { font-size: 18px; }
body .forum-subtabs-row { border-color: #d7802e !important; padding: 0 !important; }
.forum-subtabs-row > div { flex-wrap: wrap; column-gap: 24px !important; row-gap: 0; }
body .forum-subtabs-row .subtab-link { display: inline-block; padding: 12px 0 9px; margin: 0 !important; color: #754014; font-weight: 400 !important; border-bottom: 2px solid transparent; }
body .forum-subtabs-row .subtab-link.active { color: #6b3008; border-bottom-color: #6b3008; font-weight: 600 !important; }
body .home-news-item { align-items: flex-start; gap: 14px; padding: 18px !important; margin-bottom: 12px !important; }
body .home-news-avatar { flex-shrink: 0; margin: 0 !important; border: 1px solid #dd9a5c; background: #ffc38a; border-radius: 5px; }
.home-news-item .flex-grow-1 { min-width: 0; }
body .home-news-title { font-size: 16px; line-height: 1.45; overflow-wrap: anywhere; }
.home-news-byline { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; color: var(--muted); font-size: 12px; }
.post-admin-badge { padding: 2px 5px; border-radius: 3px; background: #b83637; color: #fff; font-size: 9px; line-height: 1.3; font-weight: 600; }
.post-view-count { display: inline-flex; align-items: center; gap: 5px; margin-left: 8px; }
body .home-news-summary { font-size: 13px; line-height: 1.65; margin-top: 8px !important; overflow-wrap: anywhere; }
@media (max-width: 480px) {
    .forum-section-title { font-size: 16px; }
    .forum-subtabs-row > div { column-gap: 18px !important; }
    body .home-news-item { gap: 10px; padding: 14px !important; }
    body .nro-feature-list { padding: 4px 14px !important; }
    body .nro-feature-list .nro-feature-item { gap: 12px; padding: 16px 0 !important; }
    body .nro-feature-list .nro-feature-avatar { width: 44px; height: 44px; }
    body .nro-feature-list .nro-feature-title { font-size: 15px; }
    .feature-arrow { width: 24px; height: 24px; }
}
:focus-visible { outline: 2px solid #643509; outline-offset: 3px; }

/* Native dialog supplies focus containment and an inert page underneath. */
body.auth-open { overflow: hidden; }
.auth-dialog {
    box-sizing: border-box;
    width: min(420px, calc(100% - 24px));
    max-height: calc(100dvh - 32px);
    margin: auto;
    padding: 24px;
    overflow-y: auto;
    background: var(--surface);
    color: var(--ink);
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    box-shadow: 0 16px 48px rgb(71 32 5 / 25%);
}
.auth-dialog[open] { animation: auth-appear .18s ease-out; }
.auth-dialog::backdrop { background: rgb(57 28 8 / 50%); backdrop-filter: blur(3px); }
.auth-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.auth-heading h2 { margin: 0; font-size: 20px; }
.auth-close { border: 0; background: transparent; color: var(--ink); font-size: 28px; line-height: 1; width: 36px; height: 36px; cursor: pointer; }
.auth-tabs { display: flex; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.auth-tabs button { flex: 1; padding: 10px; border: 0; background: transparent; color: var(--ink-soft); cursor: pointer; }
.auth-tabs [aria-selected="true"] { color: var(--ink); box-shadow: inset 0 -2px var(--ink); font-weight: 600; }
.auth-intro { color: var(--ink-soft); font-size: 13px; margin-bottom: 16px; }
.auth-dialog label { display: block; margin: 12px 0 6px; }
.auth-dialog .form-control { box-sizing: border-box; width: 100%; min-height: 42px; }
#auth-captcha { margin: 18px 0 12px; min-height: 65px; }
#auth-message { background: #ffdfc5; border-left: 3px solid #ac2933; color: #89222b; padding: 10px 12px; font-size: 13px; }
#auth-message.is-success { border-color: #31682c; color: #285624; }
.auth-submit { width: 100%; min-height: 42px; background: #c6323c; color: #fff; border: 1px solid #b02933; border-radius: 4px; font-weight: 600; cursor: pointer; }
.auth-submit:hover { background: #ac2933; }
.auth-dialog button:disabled { opacity: .65; cursor: wait; }
.auth-dialog [hidden] { display: none !important; }
@keyframes auth-appear { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 480px) { .auth-dialog { padding: 16px; } }
@media (prefers-reduced-motion: reduce) {
    .auth-dialog[open] { animation: none; }
    body a, body button { transition: none !important; }
}
