/* Giao diện Naruto Saga (website Nar), nạp sau site.css.
   Tông xanh đêm của các file CSS khác do scripts/web_recolor_nar.py đổi từ xanh ngọc bản Eloria; file này chỉ chứa phần riêng
   của Nar: cảnh làng Lá ban đêm, khối mực đặc viền vàng, biểu tượng Lá, hình Naruto ở chân menu.
   Bộ chọn thêm một [data-nl] so với site.css để thắng các luật !important ở đó. */
html:root[data-nl][data-nl][data-nl][data-nl] {
  --glass: rgb(5 17 23 / .9);
  --blur: none;
  --rim: linear-gradient(135deg, #ffe9ad, #c8983f 16%, rgb(214 168 82 / .34) 50%, #c8983f 84%, #ffe9ad);
  --nar-corner-tl: url('/ui/img/realm/gold-corner.webp') left -3px top -3px / 68px no-repeat;
  --nar-corner-br: url('/ui/img/realm/gold-corner-br.webp') right -3px bottom -3px / 68px no-repeat;
  --nar-leaf: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='%23e9c46e' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M33 36a3 3 0 0 0-6 0a6 6 0 0 0 12 0a10 10 0 0 0-20 0a15 15 0 0 0 30 0C49 26 51 17 57 10L36 27M21 44 8 54l18-5'/%3E%3C/svg%3E");
  --nar-leaf-faint: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='%23e9c46e' stroke-opacity='.1' stroke-width='2.400' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M33 36a3 3 0 0 0-6 0a6 6 0 0 0 12 0a10 10 0 0 0-20 0a15 15 0 0 0 30 0C49 26 51 17 57 10L36 27M21 44 8 54l18-5'/%3E%3C/svg%3E");
}

/* ---- nền: làng Lá ban đêm ở đầu trang, tối dần xuống dưới và sang trái ---- */
html:root[data-nl][data-nl][data-nl][data-nl] body { background: #040d12 !important; }
html:root[data-nl][data-nl][data-nl][data-nl] body .scene { background: #040d12 url('/ui/img/bg/ninja-village-night.webp') right top / max(100%, 1280px) auto no-repeat !important; }
/* Cành anh đào ở hai góc trên như mẫu (ảnh do scripts/web_nar_banners.py tách từ nền trận đấu làng Lá): nằm trong .scene,
   trên lớp phủ tối (::after) và dưới mọi khối, nên chỉ ló ra ở lề và khoảng trống, không che nội dung. */
html:root[data-nl][data-nl][data-nl][data-nl] body .scene::before { content: '' !important; position: absolute !important; inset: 0 !important; z-index: 3 !important; background: url('/ui/img/nar/sakura-l.webp') left -56px top -34px / 300px auto no-repeat, url('/ui/img/nar/sakura.webp') right -110px top 58px / 250px auto no-repeat !important; opacity: 1 !important; filter: none !important; transform: none !important; animation: none !important; pointer-events: none; }
html:root[data-nl][data-nl][data-nl][data-nl] body .scene::after { background: linear-gradient(90deg, rgb(4 13 18 / .92) 18%, rgb(4 13 18 / .5) 40%, rgb(4 13 18 / .06) 66%), linear-gradient(180deg, rgb(4 13 18 / .12), rgb(4 13 18 / .5) 15vw, #040d12 31vw) !important; }
@media (max-width: 760px) {
  html:root[data-nl][data-nl][data-nl][data-nl] body .scene { background: #040d12 url('/ui/img/bg/ninja-village-night-mobile.webp') center top / 100% auto no-repeat !important; }
  html:root[data-nl][data-nl][data-nl][data-nl] body .scene::after { background: linear-gradient(180deg, rgb(4 13 18 / .35), rgb(4 13 18 / .78) 60vw, #040d12 120vw) !important; }
  html:root[data-nl][data-nl][data-nl][data-nl] body .scene::before { background-size: 210px auto, 180px auto !important; background-position: left -60px top -30px, right -70px top 96px !important; }
}

/* ---- khối: mực đặc, viền vàng mảnh (viền vẽ bằng --rim) ---- */
html:root[data-nl][data-nl][data-nl][data-nl] body :is(.glass, .page-head, .sidebar, .appbar, .topbar, .float-card, .gm-section, .shop-card, .ct-news-card, .tn-tier, .ev-pkg, .ev-wheel-card, .leaderboard-panel, .kpi, .dl-card, .auth-card, .nl-panel, .nl-stat) { background: linear-gradient(160deg, rgb(255 233 173 / .07), transparent 26%), var(--glass) !important; box-shadow: inset 0 1px 0 rgb(255 233 173 / .22), 0 0 18px rgb(233 196 110 / .12), 0 10px 26px rgb(0 5 8 / .42) !important; }
html:root[data-nl][data-nl][data-nl][data-nl] body :is(.glass .glass, .glass--flat, .glass .kpi, .nl-tasks ul) { background: rgb(255 255 255 / .035) !important; box-shadow: inset 0 0 0 1px rgb(233 196 110 / .18) !important; }
html:root[data-nl][data-nl][data-nl][data-nl] body .btn { border-radius: 999px !important; }
/* Chữ trong nút và ô bấm: bản cũ thêm bóng dập nổi (nút vàng) và viền tối quanh chữ (nút tối) để đọc được trên kính mờ;
   trên khối mực đặc các bóng đó chỉ làm chữ nhoè, nhất là chữ 12px. Bỏ bóng, cỡ nhỏ nhất 13px. */
/* 8 lần [data-nl]: site.css gắn bóng chữ bằng bộ chọn dài (.btn:not()x3, :not([data-shell])…) kèm !important. */
html:root[data-nl][data-nl][data-nl][data-nl][data-nl][data-nl][data-nl][data-nl] body :is(.btn, .tab, [role=tab], .pill, .user-chip, .pay-chip, .nl-camp, #quick-group button), html:root[data-nl][data-nl][data-nl][data-nl][data-nl][data-nl][data-nl][data-nl] body :is(.btn, .tab, [role=tab], .pill, .user-chip, .pay-chip, .nl-camp, #quick-group button) :is(span, b, small, i) { text-shadow: none !important; }
html:root[data-nl][data-nl][data-nl][data-nl] body :is(.gc-code-actions, .shop-card) .btn { font-size: .875rem !important; }
/* Nút Nạp xu trong ô Xu là position: static ở màn hẹp nên viền ::before của nút bám ra cả ô; relative giữ viền theo nút. */
@media (max-width: 760px) { html:root[data-nl][data-nl][data-nl][data-nl] body .nl-stat--xu .btn.btn--primary { position: relative !important; } }

/* ---- thanh bên: biểu tượng Lá trên tên game, mục đang chọn viền vàng, Naruto ở chân menu ---- */
html:root[data-nl][data-nl][data-nl][data-nl] body .sidebar { background: var(--nar-corner-tl), linear-gradient(180deg, rgb(255 233 173 / .07), transparent 15%), rgb(4 14 19 / .93) !important; }
html:root[data-nl][data-nl][data-nl][data-nl] body .sidebar .brand--text::before { content: ''; display: block; width: 40px; height: 36px; margin: 0 auto 2px; background: var(--nar-leaf) center / contain no-repeat; }
html:root[data-nl][data-nl][data-nl][data-nl] body :is(.sidebar, main) .nl-brand small { text-transform: uppercase; letter-spacing: .14em; }
html:root[data-nl][data-nl][data-nl][data-nl] body :is(.sidebar nav a, .sidebar-links a, .more-grid a)[aria-current='page'] { background: linear-gradient(90deg, rgb(233 196 110 / .24), rgb(233 196 110 / .05)) !important; box-shadow: inset 0 0 0 1px rgb(233 196 110 / .82), 0 0 14px rgb(233 196 110 / .18) !important; color: #fff3cf !important; }
/* Viền ::before của thanh bên nằm lệch ra ngoài 1px (inset: -1px) nên thanh bên overflow: auto luôn tràn 1px và hiện thanh cuộn
   dày suốt mép phải dù menu vừa khít; kéo viền vào trong thì thanh cuộn chỉ hiện khi menu thật sự dài hơn màn. */
html:root[data-nl][data-nl][data-nl][data-nl][data-nl][data-nl][data-nl][data-nl] body .sidebar::before { inset: 0 !important; }
/* Hàng menu thấp lại (36 -> 28px) để chừa chỗ cho hình Naruto trên màn cao 1024px. */
html:root[data-nl][data-nl][data-nl][data-nl] body .sidebar :is(.sidebar-links a, .sidebar-feature-nav a) { min-height: 28px !important; padding-block: 2px !important; margin-block: 0 !important; }
html:root[data-nl][data-nl][data-nl][data-nl] body .sidebar .rail-title { margin: 6px 8px 1px !important; padding-block: 2px !important; }
/* Chiếm phần trống còn lại dưới menu (tối đa 280px): màn thấp thì tự thu nhỏ rồi biến mất, không đè lên menu. */
html:root[data-nl][data-nl][data-nl][data-nl] body .nar-mascot { flex: 1 1 0; min-height: 0; max-height: 280px; margin: auto 0 0; background: url('/ui/img/nar/hokage.webp') center bottom / contain no-repeat; pointer-events: none; }

/* ---- trang Tổng quan ---- */
html:root[data-nl][data-nl][data-nl][data-nl] body .nl-welcome::before { content: none !important; }
html:root[data-nl][data-nl][data-nl][data-nl] body .nl-stat { --stat-c: #ffd56a !important; --statg: rgb(255 196 84 / .3) !important; }
html:root[data-nl][data-nl][data-nl][data-nl] body .nl-feature { box-shadow: 0 0 0 1px rgb(0 0 0 / .4), 0 0 22px rgb(233 196 110 / .32) !important; }
html:root[data-nl][data-nl][data-nl][data-nl] body .nl-feature::before { background: linear-gradient(135deg, #fff1c4, #d2a44c 22%, rgb(214 168 82 / .5) 55%, #e9c46e 85%, #fff1c4) !important; }
html:root[data-nl][data-nl][data-nl][data-nl] body .nl-evt { border-color: rgb(226 184 96 / .8) !important; box-shadow: inset 0 1px 0 rgb(255 240 190 / .4), 0 0 14px rgb(233 196 110 / .22) !important; }
html:root[data-nl][data-nl][data-nl][data-nl] body :is(.nl-tasks, .nl-two .nl-panel) { background: var(--nar-corner-tl), var(--nar-corner-br), var(--nar-leaf-faint) right 26px center / 132px no-repeat, linear-gradient(160deg, rgb(255 233 173 / .07), transparent 26%), var(--glass) !important; }
/* Góc hoa văn vàng (ảnh có sẵn ui/img/realm/gold-corner*.webp) cho tranh sự kiện nổi bật: đặt trên lớp chữ vì ảnh phủ kín nền. */
html:root[data-nl][data-nl][data-nl][data-nl] body .nl-feature-copy::before { content: ''; position: absolute; inset: 0; background: var(--nar-corner-tl), var(--nar-corner-br); pointer-events: none; }
html:root[data-nl][data-nl][data-nl][data-nl] body .nl-two { position: relative; }
html:root[data-nl][data-nl][data-nl][data-nl] body .nl-two::after { content: ''; position: absolute; right: -16px; bottom: -20px; width: 78px; height: 78px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%23e8eef2'/%3E%3Cstop offset='.5' stop-color='%238fa0aa'/%3E%3Cstop offset='1' stop-color='%233d4a52'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath fill='url(%23g)' stroke='%231a2329' stroke-width='2' stroke-linejoin='round' d='M50 3 62 38 97 50 62 62 50 97 38 62 3 50 38 38Z'/%3E%3Cpath fill='none' stroke='%23fff' stroke-opacity='.35' stroke-width='1.500' d='M50 9 59 40M91 50 60 59M50 91 41 60M9 50 40 41'/%3E%3Ccircle cx='50' cy='50' r='9' fill='%230b171d' stroke='%23c9d3d9' stroke-width='3'/%3E%3C/svg%3E") center / contain no-repeat; transform: rotate(-16deg); filter: drop-shadow(0 4px 8px rgb(0 0 0 / .6)); pointer-events: none; }
