/* เส้นทางมือใหม่ (client-debug/js/newbie.js, src/map/newbie.js): the tracker under the minimap and the window - a green
   trail on a dark forest, the same in every theme (#win-newbie / #nb-track over the RO theme's). Entries of the menus only
   with the path (<html class="nb-sys">). Linked by client/index.html and client-debug/index.html after style.css. */

html:not(.nb-sys) .nb-entry, html:not(.nb-sys) .mh-grid [data-w="!newbie"] { display: none !important; }

/* ---- the tracker ---- */
#nb-track { position: absolute; z-index: 6; top: 70px; left: 8px; width: 232px; box-sizing: border-box; padding: 8px 10px 9px; border-radius: 12px; cursor: pointer;
	font: 12.5px/1.35 system-ui, "Noto Sans Thai", sans-serif; color: #ecfff3; text-align: left; user-select: none;
	background: linear-gradient(160deg, rgba(22, 64, 48, 0.94), rgba(10, 32, 26, 0.94)); border: 1px solid rgba(120, 230, 170, 0.45);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35); animation: nb-in 0.4s ease-out both; }
#nb-track:hover { border-color: rgba(150, 255, 190, 0.8); }
#nb-track .nb-tk-top { display: flex; align-items: center; gap: 6px; }
#nb-track .nb-tk-top b { flex: 1; font-size: 12px; letter-spacing: 0.02em; color: #9ff5c3; }
#nb-track .nb-tk-n { font-size: 11.5px; font-weight: 700; color: #d7ffe6; background: rgba(255, 255, 255, 0.1); padding: 0 6px; border-radius: 8px; }
#nb-track .nb-tk-ic { font-size: 14px; line-height: 1; }
#nb-track .nb-tk-x { all: unset; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 6px; font-weight: 800; color: #bdf5d4; cursor: pointer; }
#nb-track .nb-tk-x:hover { background: rgba(255, 255, 255, 0.14); }
#nb-track .nb-tk-name { margin-top: 4px; font-size: 14px; font-weight: 800; color: #fff; }
#nb-track .nb-tk-goal { color: #c9eed8; }
#nb-track .nb-tk-claim { all: unset; display: block; margin-top: 7px; padding: 6px 0; border-radius: 9px; text-align: center; font-weight: 800; color: #3a2400; cursor: pointer;
	background: linear-gradient(180deg, #ffe58a, #ffb52e); box-shadow: 0 0 0 0 rgba(255, 210, 90, 0.7); animation: nb-glow 1.6s ease-in-out infinite; }
#nb-track.nb-fold { width: auto; display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px 5px 10px; border-radius: 16px; }
#nb-track.nb-fold .nb-tk-n { background: none; padding: 0; }
#nb-track .nb-tk-dot { width: 8px; height: 8px; border-radius: 50%; background: #ffc93b; box-shadow: 0 0 8px #ffc93b; }
.nb-bar { position: relative; height: 14px; margin-top: 6px; border-radius: 7px; overflow: hidden; background: rgba(0, 0, 0, 0.35); border: 1px solid rgba(120, 230, 170, 0.3); }
.nb-bar i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #2fbf71, #8ff0b4); transition: width 0.4s; }
.nb-bar span { position: relative; display: block; text-align: center; font-size: 10.5px; font-weight: 700; line-height: 12px; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7); }
@keyframes nb-in { from { opacity: 0; translate: 0 -6px; } to { opacity: 1; translate: 0 0; } } /* (translate: the phone's scale is its transform) */
@keyframes nb-glow { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 210, 90, 0.6); } 50% { box-shadow: 0 0 12px 3px rgba(255, 210, 90, 0.55); } }
/* the phone: on the left, under the top bar, smaller */
/* (under the windows - z-index 6, #windows 10; the phone HUD's own size --uik, 0.6 at least) */
html.mhud #nb-track { z-index: 5; top: calc(env(safe-area-inset-top, 0px) + 110px); left: 8px; right: auto; width: 210px; transform: scale(max(var(--uik, 1), 0.6)); transform-origin: 0 0; } /* (z 5: under the phone HUD's layer - its menu sheet covers it; the place: newbie.js newbiePlace) */
html.mhud #nb-track.nb-fold { width: auto; }
#nb-track .nb-tk-top b, #nb-track .nb-tk-name, #nb-track .nb-tk-goal { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- the window ---- */
#win-newbie .win-body { padding: 0; overflow: auto; background: linear-gradient(180deg, #123a2c, #0b231c 70%, #08190f); color: #eafff2; }
.nb { display: flex; flex-direction: column; font-size: 13px; line-height: 1.4; }
.nb-wait { padding: 20px; text-align: center; }
.nb-head { position: sticky; top: 0; z-index: 2; padding: 12px 14px 10px; background: linear-gradient(135deg, #1e6b4b, #12432f); border-bottom: 1px solid rgba(140, 240, 180, 0.3); }
.nb-hd-t { font-size: 17px; font-weight: 800; color: #fff; }
.nb-hd-s { margin-top: 4px; font-size: 11.5px; color: #c4ecd5; }
.nb-path { display: flex; gap: 3px; margin-top: 8px; }
.nb-path i { flex: 1; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.14); }
.nb-path i.on { background: #5be39a; }
.nb-path i.now { background: #ffd35a; box-shadow: 0 0 6px #ffd35a; }
.nb-list { list-style: none; margin: 0; padding: 10px 12px 14px 12px; display: grid; gap: 0; }
.nb-step { position: relative; display: flex; gap: 10px; padding: 8px 0 12px; }
.nb-step::before { content: ""; position: absolute; left: 14px; top: 36px; bottom: -4px; width: 2px; background: rgba(140, 240, 180, 0.25); }
.nb-step:last-child::before { display: none; }
.nb-num { flex: none; z-index: 1; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-weight: 800; font-size: 13px;
	background: #1d3f33; border: 2px solid rgba(140, 240, 180, 0.35); color: #9fd8b8; }
.nb-main { flex: 1; min-width: 0; }
.nb-name { font-weight: 800; font-size: 14px; color: #fff; }
.nb-goal { color: #b9e4cb; font-size: 12.5px; }
.nb-hint { margin-top: 6px; padding: 7px 9px; border-radius: 9px; background: rgba(255, 255, 255, 0.07); color: #e9fff1; font-size: 12.5px; }
.nb-rws { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.nb-rw { display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px 2px 3px; border-radius: 10px; background: rgba(0, 0, 0, 0.28); border: 1px solid rgba(255, 255, 255, 0.1); font-size: 11.5px; }
.nb-rw b { color: #ffe08a; font-weight: 700; }
.nb-rz { padding-left: 4px; color: #ffe08a; font-weight: 700; }
.nb-rz i { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; font-style: normal; font-weight: 900; font-size: 10.5px; color: #6b4300; background: radial-gradient(circle at 40% 35%, #fff2b8, #f2b632); }
#win-newbie .nb-claim { margin-top: 8px; width: 100%; height: 34px; font-weight: 800; font-size: 14px; border: 0; border-radius: 10px; color: #3a2400; text-shadow: none;
	background: linear-gradient(180deg, #ffe58a, #ffb52e); animation: nb-glow 1.6s ease-in-out infinite; }
.nb-ok .nb-num { background: #2fbf71; border-color: #8ff0b4; color: #05301b; }
.nb-ok::before { background: #2fbf71; }
.nb-ok .nb-name, .nb-ok .nb-goal { opacity: 0.75; }
.nb-ok .nb-rws { opacity: 0.55; }
.nb-cur .nb-num { background: #ffd35a; border-color: #fff1b8; color: #3a2400; box-shadow: 0 0 10px rgba(255, 211, 90, 0.7); }
.nb-cur .nb-main { padding: 8px 10px 10px; margin: -6px 0 0; border-radius: 12px; background: rgba(120, 230, 170, 0.1); border: 1px solid rgba(140, 240, 180, 0.4); }
.nb-lock { opacity: 0.55; }
.nb-just .nb-num { animation: nb-pop 0.6s cubic-bezier(0.2, 1.6, 0.4, 1); }
@keyframes nb-pop { from { transform: scale(0.4); } to { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { #nb-track, #nb-track .nb-tk-claim, #win-newbie .nb-claim, .nb-just .nb-num { animation: none !important; } }
html.mhud .win.win-newbie { --wk: max(var(--uik, 1), 0.85); transform: scale(max(var(--uik, 1), 0.85)); max-height: calc((100% - 88px - var(--mh-wb)) / max(var(--uik, 1), 0.85)) !important; }
