/* Nông Trại Vui Vẻ - giao diện game */

.ntvv-app, .ntvv-app *, .ntvv-app *::before, .ntvv-app *::after { box-sizing: border-box; }

.ntvv-app {
  --wood: #8a4f26;
  --wood-d: #6a3a19;
  --wood-l: #b5733f;
  --paper: #fff6dc;
  --paper-d: #f1deb0;
  --ink: #4a2f17;
  --gold: #ffb703;
  --leaf: #4caf50;
  --sky: #69c3ff;
  position: relative;
  max-width: 1000px;
  margin: 24px auto;
  font-family: ui-rounded, "Nunito", "Baloo 2", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.35;
  color: var(--ink);
  border-radius: 28px;
  overflow: hidden;
  background: var(--paper);
  border: 6px solid var(--wood);
  box-shadow: 0 0 0 3px var(--wood-d), 0 22px 50px rgba(40, 80, 30, .35);
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.ntvv-app button {
  appearance: none; -webkit-appearance: none;
  border: 0; background: none; padding: 0; margin: 0;
  font: inherit; color: inherit; cursor: pointer;
  text-transform: none; letter-spacing: normal; text-shadow: none;
}
.ntvv-app button:focus-visible, .ntvv-app a:focus-visible { outline: 3px solid #1d7fe0; outline-offset: 2px; }
.ntvv-app.is-busy .ntvv-field { cursor: progress; }
.ntvv-app [hidden] { display: none !important; }

/* ------------------------------------------------------------ HUD */
.ntvv-hud {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 18px;
  padding: 12px 18px;
  color: #fff6e0;
  background:
    repeating-linear-gradient(90deg, rgba(0,0,0,.06) 0 2px, transparent 2px 38px),
    linear-gradient(var(--wood-l), var(--wood));
  border-bottom: 5px solid var(--wood-d);
  position: relative; z-index: 6;
}
.ntvv-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ntvv-logo { font-size: 30px; filter: drop-shadow(0 2px 0 rgba(0,0,0,.25)); }
.ntvv-brand b { display: block; font-size: 20px; font-weight: 900; text-shadow: 0 2px 0 rgba(0,0,0,.3); }
.ntvv-brand small { display: block; opacity: .85; font-size: 13px; }
.ntvv-stats { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ntvv-chip {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 12px 5px 6px; border-radius: 999px;
  background: rgba(0,0,0,.28); box-shadow: inset 0 2px 0 rgba(0,0,0,.2);
}
.ntvv-lvbadge {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  font-weight: 900; font-size: 16px; color: #5a3200;
  background: radial-gradient(circle at 35% 30%, #fff1a8, #ffc928 60%, #e59a00);
  box-shadow: 0 2px 0 #a86a00, inset 0 -2px 0 rgba(0,0,0,.12);
}
.ntvv-xp { min-width: 130px; }
.ntvv-xp small { display: block; font-size: 12px; font-weight: 700; margin-bottom: 3px; }
.ntvv-bar { height: 8px; border-radius: 6px; background: rgba(0,0,0,.4); overflow: hidden; }
.ntvv-bar i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #8be34f, #e6f75a); transition: width .5s ease; }
.ntvv-coins { padding: 5px 14px 5px 8px; }
.ntvv-coins b { font-size: 18px; font-weight: 900; }
.ntvv-coin { width: 24px; height: 24px; flex: none; vertical-align: middle; }
.ntvv-daily {
  padding: 8px 14px; border-radius: 999px; font-weight: 900; font-size: 14px; color: #5a3200;
  background: linear-gradient(#ffe27a, var(--gold)); box-shadow: 0 3px 0 #b87800;
  animation: ntvv-bounce 1.6s ease-in-out infinite;
}
.ntvv-daily:active { transform: translateY(2px); box-shadow: 0 1px 0 #b87800; }

/* ------------------------------------------------------------ Thế giới */
.ntvv-world {
  position: relative; overflow: hidden;
  padding: 84px 16px 60px;
  background: linear-gradient(180deg, var(--sky1, #5db9fb) 0, var(--sky2, #c9eeff) 200px, var(--grass1, #8bd65f) 200px, var(--grass2, #5fb23d) 100%);
}
.ntvv-sky { position: absolute; inset: 0 0 auto 0; height: 200px; pointer-events: none; }
.ntvv-sun {
  position: absolute; top: 20px; right: 10%; width: 62px; height: 62px; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #fffbd0, #ffd93b 70%);
  box-shadow: 0 0 0 10px rgba(255, 231, 100, .35), 0 0 60px 24px rgba(255, 220, 80, .55);
  animation: ntvv-pulse 4s ease-in-out infinite;
}
.ntvv-cloud { position: absolute; left: -20%; width: 96px; height: 30px; background: #fff; border-radius: 30px; opacity: .95; animation: ntvv-drift 70s linear infinite; }
.ntvv-cloud::before, .ntvv-cloud::after { content: ""; position: absolute; background: #fff; border-radius: 50%; }
.ntvv-cloud::before { width: 44px; height: 44px; left: 14px; top: -22px; }
.ntvv-cloud::after { width: 32px; height: 32px; left: 46px; top: -14px; }
.ntvv-cloud.c1 { top: 26px; }
.ntvv-cloud.c2 { top: 70px; transform: scale(.75); animation-duration: 105s; animation-delay: -40s; opacity: .8; }
.ntvv-cloud.c3 { top: 44px; transform: scale(.55); animation-duration: 140s; animation-delay: -90s; opacity: .7; }
.ntvv-stars { display: none; position: absolute; inset: 0;
  background-image: radial-gradient(2px 2px at 12% 20%, #fff, transparent), radial-gradient(1.6px 1.6px at 30% 55%, #fff, transparent), radial-gradient(2px 2px at 48% 15%, #fff, transparent), radial-gradient(1.4px 1.4px at 66% 40%, #fff, transparent), radial-gradient(2px 2px at 82% 22%, #fff, transparent), radial-gradient(1.6px 1.6px at 92% 60%, #fff, transparent), radial-gradient(1.4px 1.4px at 22% 80%, #fff, transparent);
  animation: ntvv-twinkle 3s ease-in-out infinite; }
.ntvv-scenery { position: absolute; left: 0; top: 0; width: 100%; height: 200px; pointer-events: none; }

.is-night .ntvv-world { background: linear-gradient(180deg, #121f47 0, #2a3f7c 200px, #538039 200px, #3b6e26 100%); }
.is-night .ntvv-scenery { filter: brightness(.6) saturate(.9); }
.is-night .ntvv-stars { display: block; }
.is-night .ntvv-cloud { opacity: .25; }
.is-night .ntvv-sun { background: radial-gradient(circle at 40% 35%, #fff, #e9ecf8 70%); box-shadow: 0 0 0 8px rgba(255,255,255,.1), 0 0 40px 12px rgba(200,215,255,.35); }

/* ------------------------------------------------------------ Isometric 2.5D island */
.ntvv-iso { position: relative; z-index: 2; margin: 0 auto; width: 100%; min-height: 260px; }
.ntvv-stage { position: absolute; left: 0; top: 0; width: 0; height: 0; transform-origin: 0 0; }
.ntvv-terrain, .ntvv-decor, .ntvv-field, .ntvv-lake3d { position: absolute; left: 0; top: 0; pointer-events: none; }
.ntvv-terrain svg { position: absolute; left: 0; top: 0; display: block; overflow: visible; }
.ntvv-rip { transform-box: fill-box; transform-origin: center; animation: ntvv-rip 4s ease-out infinite; }
@keyframes ntvv-rip { 0% { transform: scale(.4); opacity: .9; } 100% { transform: scale(1.5); opacity: 0; } }
.ntvv-loading { position: absolute; left: 0; right: 0; top: 90px; text-align: center; color: #fff; font-weight: 800; text-shadow: 0 2px 0 rgba(0,0,0,.35); }

/* ---- con trỏ theo công cụ */
.ntvv-field.tool-water .ntvv-plot:not(.empty):not(.ripe):not(.wet) .ntvv-hit { cursor: copy; }
.ntvv-field.tool-shovel .ntvv-plot:not(.empty) .ntvv-hit { cursor: not-allowed; }

/* ---- ô đất (hình thoi phối cảnh) */
.ntvv-plot, .ntvv-wslot, .ntvv-buy { position: absolute; pointer-events: none; -webkit-tap-highlight-color: transparent; }
.ntvv-plot { width: 90.51px; height: 45.25px; animation: ntvv-plot-in .5s backwards; animation-delay: var(--d, 0s); }
.ntvv-wslot { width: 73.5px; height: 36.8px; }
.ntvv-hit { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: auto; cursor: pointer; clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.ntvv-tile { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.ntvv-tile .tt { fill: #8a5a2f; stroke: rgba(0,0,0,.28); stroke-width: 1; }
.ntvv-tile .tl { fill: #5a3819; }
.ntvv-tile .tr { fill: #6c431f; }
.ntvv-tile .pl { stroke: rgba(0,0,0,.17); stroke-width: 1.2; fill: none; }
.ntvv-hit:hover ~ .ntvv-tile .tt { fill: #a36d3c; }
.ntvv-plot.wet .tt { fill: #5d3a1c; }
.ntvv-plot.ripe .tt { stroke: #ffe27a; stroke-width: 2.6; animation: ntvv-rim 1.4s ease-in-out infinite; }
@keyframes ntvv-rim { 0%, 100% { stroke-opacity: .4; } 50% { stroke-opacity: 1; } }
@keyframes ntvv-plot-in { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
.ntvv-ring { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.ntvv-ring polygon { fill: rgba(255,255,255,.06); stroke: rgba(255,255,255,.3); stroke-width: 1.6; }
.ntvv-hit:hover + .ntvv-ring polygon { stroke: rgba(255,255,255,.9); fill: rgba(255,255,255,.18); }
.ntvv-wslot.ripe .ntvv-ring polygon { stroke: #ffe27a; stroke-width: 2.6; }

/* Billboards: stand upright and always face the camera */
.ntvv-bb { position: absolute; left: 50%; top: 50%; width: 0; height: 0; pointer-events: none; }
.ntvv-crop { position: absolute; left: calc(var(--cw, 96px) / -2); top: calc(var(--cw, 96px) * -.76); width: var(--cw, 96px); height: var(--cw, 96px); transform-origin: 50% 76%; animation: ntvv-pop .55s cubic-bezier(.3, 1.6, .5, 1); }
.ntvv-crop svg { display: block; width: 100%; height: 100%; overflow: visible; transform-origin: 50% 78%; animation: ntvv-sway var(--sway, 3s) ease-in-out infinite alternate; filter: drop-shadow(0 2px 0 rgba(0,0,0,.14)); }
.ntvv-tag { position: absolute; left: -30px; top: 6px; width: 60px; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.ntvv-time { padding: 1px 8px; border-radius: 10px; font-size: 12px; font-weight: 800; line-height: 1.3; color: #fff; background: rgba(0,0,0,.5); white-space: nowrap; }
.ntvv-meter { width: 100%; height: 7px; border-radius: 6px; background: rgba(0,0,0,.45); overflow: hidden; }
.ntvv-meter i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #7be04f, #e0f45e); transition: width 1s linear; }
.ntvv-drop { position: absolute; left: -42px; top: -52px; font-size: 18px; filter: drop-shadow(0 1px 0 rgba(0,0,0,.3)); }
.ntvv-spark-top { position: absolute; left: 12px; top: -80px; font-size: 22px; animation: ntvv-bounce 1s ease-in-out infinite; }
.ntvv-plus { position: absolute; left: -18px; top: -40px; width: 36px; text-align: center; font-size: 34px; font-weight: 900; line-height: 1; color: rgba(255,255,255,.92); text-shadow: 0 2px 0 rgba(0,0,0,.4); opacity: 0; transition: opacity .15s; }
.ntvv-field.tool-plant .ntvv-plot.empty:hover .ntvv-plus { opacity: 1; }
.ntvv-prop { position: absolute; width: 0; height: 0; pointer-events: none; }
.ntvv-prop svg { position: absolute; display: block; overflow: visible; }

/* Expand-land tile */
/* ---- ô mua thêm đất */
.ntvv-buy { width: 90.51px; height: 45.25px; }
.ntvv-buy .tb { fill: rgba(255,255,255,.18); stroke: rgba(255,255,255,.9); stroke-width: 2; stroke-dasharray: 6 5; }
.ntvv-buy .ntvv-hit:hover ~ .ntvv-tile .tb { fill: rgba(255,255,255,.35); }
.ntvv-buy-in { position: absolute; left: -46px; top: -50px; width: 92px; display: flex; flex-direction: column; align-items: center; gap: 1px; color: #fff; font-weight: 800; font-size: 12px; line-height: 1.15; text-align: center; text-shadow: 0 1px 0 rgba(0,0,0,.45), 0 0 6px rgba(0,0,0,.35); }
.ntvv-buy-in em { font-style: normal; font-size: 28px; line-height: 1; }
.ntvv-buy-in b { display: inline-flex; align-items: center; gap: 3px; font-size: 13px; }
.ntvv-buy-in .ntvv-coin { width: 16px; height: 16px; }
.ntvv-buy.poor .ntvv-buy-in b { opacity: .7; }

/* Floating text + particles (inside billboards) */
.ntvv-float {
  position: absolute; left: 0; top: -92px; z-index: 5; transform: translateX(-50%);
  font-weight: 900; font-size: 16px; color: #fff; white-space: nowrap; pointer-events: none; opacity: 0;
  text-shadow: 0 2px 0 rgba(0,0,0,.45), 0 0 6px rgba(0,0,0,.4);
  animation: ntvv-floatup 1.3s ease-out both;
}
.ntvv-float.k-xp { color: #b9f26b; }
.ntvv-float.k-cost { color: #ffd37a; }
.ntvv-float.k-water { color: #bfe6ff; }
.ntvv-bit { position: absolute; left: 0; top: -34px; width: 9px; height: 9px; border-radius: 50%; pointer-events: none; z-index: 4; animation: ntvv-burst .8s ease-out forwards; box-shadow: 0 0 0 2px rgba(255,255,255,.7); }
.ntvv-water-drop { position: absolute; top: -98px; width: 8px; height: 12px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: #7cc8ff; box-shadow: inset -2px -2px 0 rgba(0,0,0,.12); pointer-events: none; z-index: 4; animation: ntvv-rain 1s ease-in both; }

/* Thú nhỏ */
.ntvv-critters { position: absolute; left: 0; right: 0; bottom: 6px; height: 56px; z-index: 3; pointer-events: none; }
.ntvv-chicken { position: absolute; bottom: 0; width: 44px; animation: ntvv-walk 36s linear infinite; }
.ntvv-chicken svg { display: block; width: 100%; overflow: visible; }
.ntvv-chicken .hop { animation: ntvv-hop .5s ease-in-out infinite; transform-origin: 50% 100%; transform-box: fill-box; }
.ntvv-chicken.chick { width: 26px; animation-duration: 50s; animation-delay: -18s; }
.ntvv-bfly { position: absolute; bottom: 24px; font-size: 20px; animation: ntvv-flutter 16s ease-in-out infinite; }
.ntvv-bfly.b2 { animation-duration: 22s; animation-delay: -9s; font-size: 16px; }

/* Thông báo */
.ntvv-toasts { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); z-index: 8; display: flex; flex-direction: column; align-items: center; gap: 6px; width: calc(100% - 24px); max-width: 520px; pointer-events: none; }
.ntvv-toast {
  padding: 9px 16px; border-radius: 14px; font-weight: 800; font-size: 14px; text-align: center; color: var(--ink);
  background: var(--paper); border: 3px solid var(--wood); box-shadow: 0 4px 0 var(--wood-d), 0 8px 16px rgba(0,0,0,.2);
  animation: ntvv-toast-in .3s cubic-bezier(.3, 1.5, .5, 1) backwards;
}
.ntvv-toast.err { background: #ffe3dc; border-color: #c4402c; box-shadow: 0 4px 0 #8f2a1b, 0 8px 16px rgba(0,0,0,.2); }
.ntvv-toast.out { opacity: 0; transform: translateY(-8px); transition: .4s; }

/* ------------------------------------------------------------ Thanh công cụ */
.ntvv-toolbar {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
  padding: 14px 12px 6px; background: var(--paper);
}
.ntvv-tool {
  position: relative; display: flex; align-items: center; gap: 8px;
  padding: 9px 16px 9px 12px; border-radius: 16px; font-weight: 900; font-size: 15px;
  background: #fff; border: 3px solid var(--paper-d); box-shadow: 0 4px 0 var(--paper-d);
  transition: transform .12s, box-shadow .12s;
}
.ntvv-tool em { font-style: normal; font-size: 22px; line-height: 1; }
.ntvv-tool:hover { transform: translateY(-2px); }
.ntvv-tool:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--paper-d); }
.ntvv-tool.on { border-color: var(--gold); background: #fff3c4; box-shadow: 0 4px 0 #d99a00; }
.ntvv-tool.all { background: linear-gradient(#9be25f, #6cc43a); border-color: #4a9a22; color: #173a05; box-shadow: 0 4px 0 #3a7a18; }
.ntvv-tool u { text-decoration: none; position: absolute; top: -9px; right: -7px; min-width: 24px; height: 24px; padding: 0 6px; display: grid; place-items: center; border-radius: 12px; font-size: 13px; color: #fff; background: #e8403a; box-shadow: 0 2px 0 #9d211c; animation: ntvv-bounce 1.2s ease-in-out infinite; }
.ntvv-hint { padding: 6px 18px 14px; text-align: center; font-size: 14px; font-weight: 700; color: #7a5a38; background: var(--paper); min-height: 40px; }
.ntvv-hint b { color: var(--wood-d); }

/* ------------------------------------------------------------ Bảng cửa hàng */
.ntvv-panel { background: var(--paper); border-top: 5px solid var(--wood); }
.ntvv-tabs { display: flex; gap: 6px; padding: 12px 14px 0; background: var(--paper-d); flex-wrap: wrap; }
.ntvv-tab { padding: 10px 18px; border-radius: 14px 14px 0 0; font-weight: 900; font-size: 15px; color: #7a5a38; background: rgba(255,255,255,.45); }
.ntvv-tab.on { background: var(--paper); color: var(--ink); box-shadow: 0 -3px 0 var(--gold) inset; }
.ntvv-tabbody { padding: 16px 14px 20px; min-height: 180px; }

.ntvv-seeds { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.ntvv-card {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center;
  padding: 10px 8px 12px; border-radius: 18px; background: #fff; border: 3px solid var(--paper-d); box-shadow: 0 4px 0 var(--paper-d);
  transition: transform .12s;
}
.ntvv-card:hover { transform: translateY(-3px); }
.ntvv-card.on { border-color: var(--gold); background: #fff3c4; box-shadow: 0 4px 0 #d99a00, 0 0 0 4px rgba(255,183,3,.25); }
.ntvv-card.poor .ntvv-price { color: #c4402c; }
.ntvv-card-art { width: 84px; height: 84px; border-radius: 50%; background: radial-gradient(circle at 50% 70%, #d9f2b9, #b5e08a); }
.ntvv-card-art svg { width: 100%; height: 100%; }
.ntvv-card b { font-size: 16px; font-weight: 900; }
.ntvv-price { display: inline-flex; align-items: center; gap: 4px; font-weight: 900; font-size: 15px; }
.ntvv-price .ntvv-coin { width: 18px; height: 18px; }
.ntvv-card small { font-size: 12px; color: #7a5a38; font-weight: 700; }
.ntvv-card.locked { filter: grayscale(.85); opacity: .75; cursor: not-allowed; }
.ntvv-lock { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 15px; background: rgba(60, 40, 20, .5); color: #fff; font-weight: 900; font-size: 16px; }

.ntvv-empty { text-align: center; padding: 40px 10px; color: #7a5a38; font-weight: 700; }

.ntvv-barn { display: flex; flex-direction: column; gap: 8px; }
.ntvv-row { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 16px; background: #fff; border: 3px solid var(--paper-d); }
.ntvv-row-art { width: 54px; height: 54px; flex: none; border-radius: 50%; background: radial-gradient(circle at 50% 70%, #d9f2b9, #b5e08a); }
.ntvv-row-art svg { width: 100%; height: 100%; }
.ntvv-row-name { flex: 1; min-width: 0; }
.ntvv-row-name b { display: block; font-weight: 900; }
.ntvv-row-name small { color: #7a5a38; font-weight: 700; }
.ntvv-row-qty { font-weight: 900; font-size: 18px; }
.ntvv-barn-foot { margin-top: 14px; text-align: center; }

.ntvv-rank { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ntvv-rank li { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 16px; background: #fff; border: 3px solid var(--paper-d); font-weight: 800; }
.ntvv-rank li.me { border-color: var(--gold); background: #fff3c4; }
.ntvv-rk { width: 34px; text-align: center; font-size: 22px; font-weight: 900; }
.ntvv-rn { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ntvv-rm { font-size: 13px; color: #7a5a38; }

.ntvv-btn {
  display: inline-block; padding: 11px 22px; border-radius: 16px; font-weight: 900; font-size: 15px; text-decoration: none !important; text-align: center;
  color: #173a05 !important; background: linear-gradient(#9be25f, #6cc43a); box-shadow: 0 4px 0 #3a7a18; transition: transform .12s;
}
.ntvv-btn:hover { transform: translateY(-2px); }
.ntvv-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #3a7a18; }
.ntvv-btn.alt { color: #5a3200 !important; background: linear-gradient(#ffe27a, var(--gold)); box-shadow: 0 4px 0 #b87800; }
.ntvv-btn.sm { padding: 8px 14px; font-size: 14px; }

/* Cửa sổ lên cấp */
.ntvv-modal { position: absolute; inset: 0; z-index: 20; display: grid; place-items: center; padding: 16px; background: rgba(40, 25, 10, .55); animation: ntvv-fade .25s both; }
.ntvv-modal-card { max-width: 380px; width: 100%; padding: 22px 20px 20px; text-align: center; border-radius: 26px; background: var(--paper); border: 6px solid var(--wood); box-shadow: 0 0 0 3px var(--wood-d), 0 20px 40px rgba(0,0,0,.4); animation: ntvv-pop .5s cubic-bezier(.3, 1.6, .5, 1); }
.ntvv-modal-card h3 { margin: 4px 0 8px; font-size: 26px; font-weight: 900; color: var(--ink); }
.ntvv-modal-card p { margin: 0 0 10px; font-weight: 700; color: #7a5a38; }
.ntvv-star { font-size: 64px; line-height: 1; animation: ntvv-spin 2.4s ease-in-out infinite; filter: drop-shadow(0 4px 0 rgba(0,0,0,.2)); }
.ntvv-unlock { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.ntvv-unlock div { width: 90px; font-weight: 900; font-size: 13px; }
.ntvv-unlock svg { width: 80px; height: 80px; border-radius: 50%; background: radial-gradient(circle at 50% 70%, #d9f2b9, #b5e08a); }

/* Khách chưa đăng nhập */
.ntvv-login { padding: 50px 20px; text-align: center; background: linear-gradient(#c9eeff, #8bd65f); }
.ntvv-login-card { display: inline-block; max-width: 420px; padding: 26px 24px; border-radius: 26px; background: var(--paper); border: 5px solid var(--wood); box-shadow: 0 6px 0 var(--wood-d); }
.ntvv-login-ico { font-size: 54px; }
.ntvv-login h2 { margin: 6px 0; font-size: 26px; font-weight: 900; color: var(--ink); }
.ntvv-login p { margin: 0 0 16px; font-weight: 700; color: #7a5a38; }
.ntvv-login-btns { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }

/* Bảng xếp hạng dùng shortcode riêng */
.ntvv-lb-box { max-width: 420px; padding: 16px 18px; border-radius: 20px; background: #fff6dc; border: 4px solid #8a4f26; font-family: ui-rounded, "Nunito", system-ui, sans-serif; color: #4a2f17; }
.ntvv-lb-box h3 { margin: 0 0 10px; font-size: 20px; font-weight: 900; color: #4a2f17; }
.ntvv-lb-list { list-style: none; margin: 0; padding: 0; }
.ntvv-lb-list li { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 2px dashed #e5cf9c; font-weight: 800; }
.ntvv-lb-list li:last-child { border: 0; }
.ntvv-lb-rank { width: 28px; text-align: center; font-size: 18px; }
.ntvv-lb-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ntvv-lb-meta { font-size: 12px; color: #7a5a38; }

/* ------------------------------------------------------------ Chuyển động */
@keyframes ntvv-in { from { transform: translateZ(-34px); } to { transform: translateZ(10px); } }
@keyframes ntvv-pop { 0% { transform: scale(.4); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes ntvv-sway { from { transform: rotate(-2.2deg); } to { transform: rotate(2.2deg); } }
@keyframes ntvv-glow { 0%, 100% { box-shadow: inset 0 0 0 2px rgba(0,0,0,.12), 0 0 0 0 rgba(255,235,90,0); } 50% { box-shadow: inset 0 0 0 3px rgba(255,235,90,.9), 0 0 22px 8px rgba(255,235,90,.85); } }
@keyframes ntvv-bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes ntvv-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@keyframes ntvv-drift { from { left: -20%; } to { left: 110%; } }
@keyframes ntvv-twinkle { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
@keyframes ntvv-floatup { 0% { opacity: 0; transform: translate(-50%, 10px) scale(.7); } 15% { opacity: 1; transform: translate(-50%, 0) scale(1.1); } 100% { opacity: 0; transform: translate(-50%, -46px) scale(1); } }
@keyframes ntvv-burst { 0% { transform: translate(-50%, -50%) scale(1); opacity: 1; } 100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(.2); opacity: 0; } }
@keyframes ntvv-rain { 0% { transform: translateY(0); opacity: 0; } 20% { opacity: 1; } 100% { transform: translateY(70px); opacity: 0; } }
@keyframes ntvv-walk { 0% { left: 2%; transform: scaleX(1); } 49% { left: 88%; transform: scaleX(1); } 50% { left: 88%; transform: scaleX(-1); } 99% { left: 2%; transform: scaleX(-1); } 100% { left: 2%; transform: scaleX(1); } }
@keyframes ntvv-hop { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes ntvv-flutter { 0% { left: 8%; bottom: 20px; } 25% { left: 38%; bottom: 44px; } 50% { left: 70%; bottom: 26px; } 75% { left: 52%; bottom: 46px; } 100% { left: 8%; bottom: 20px; } }
@keyframes ntvv-toast-in { from { opacity: 0; transform: translateY(-14px) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes ntvv-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ntvv-spin { 0%, 100% { transform: rotate(-12deg) scale(1); } 50% { transform: rotate(12deg) scale(1.12); } }

@media (max-width: 640px) {
  .ntvv-app { margin: 12px 0; border-width: 4px; border-radius: 20px; }
  .ntvv-hud { padding: 10px 12px; }
  .ntvv-brand b { font-size: 17px; }
  .ntvv-world { padding: 56px 8px 56px; }
  .ntvv-scenery { height: 160px; }
  .ntvv-sky { height: 160px; }
  .ntvv-world { background: linear-gradient(180deg, var(--sky1, #5db9fb) 0, var(--sky2, #c9eeff) 160px, var(--grass1, #8bd65f) 160px, var(--grass2, #5fb23d) 100%); }
  .is-night .ntvv-world { background: linear-gradient(180deg, #121f47 0, #2a3f7c 160px, #538039 160px, #3b6e26 100%); }
  .ntvv-tool { padding: 8px 12px 8px 10px; font-size: 14px; }
  .ntvv-tool span { max-width: 74px; line-height: 1.1; }
  .ntvv-seeds { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .ntvv-app *, .ntvv-app *::before, .ntvv-app *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .ntvv-cloud { left: 30%; }
}

/* ======================================================================
   v2.0 - Học vui, vật nuôi, nhiệm vụ, vòng quay, âm thanh, đăng nhập
   ====================================================================== */

/* HUD */
.ntvv-avatar { width: 38px; height: 38px; border-radius: 50%; border: 3px solid #fff6e0; box-shadow: 0 2px 0 rgba(0,0,0,.3); object-fit: cover; flex: none; background: #fff; }
.ntvv-chip em { font-style: normal; font-size: 20px; line-height: 1; padding-left: 4px; }
.ntvv-pot b, .ntvv-fire b { font-size: 17px; font-weight: 900; padding-right: 4px; }
.ntvv-daily.spin { background: linear-gradient(#ffb6d6, #ff7ab0); color: #5a0a2e; box-shadow: 0 3px 0 #b8416f; }
.ntvv-tools2 { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.ntvv-mini {
  display: inline-grid; place-items: center; min-width: 38px; height: 38px; padding: 0 10px; border-radius: 12px;
  font-weight: 900; font-size: 15px; line-height: 1; color: #fff6e0 !important; text-decoration: none !important;
  background: rgba(0,0,0,.28); box-shadow: inset 0 2px 0 rgba(0,0,0,.2); transition: transform .12s, background .12s;
}
.ntvv-mini:hover { background: rgba(0,0,0,.4); transform: translateY(-1px); }
.ntvv-mini.off { opacity: .55; }
.ntvv-hud { flex-wrap: wrap; }

/* Tab: cuộn ngang trên điện thoại + chấm số */
.ntvv-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; }
.ntvv-tab { white-space: nowrap; flex: none; }
.ntvv-tab u, .ntvv-quests u { text-decoration: none; display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; margin-left: 4px; border-radius: 10px; font-size: 12px; color: #fff; background: #e8403a; vertical-align: 1px; }
.ntvv-tool u.ntvv-pot-n { text-decoration: none; position: absolute; top: -9px; right: -7px; min-width: 24px; height: 24px; padding: 0 6px; display: grid; place-items: center; border-radius: 12px; font-size: 13px; color: #fff; background: #8b5cf6; box-shadow: 0 2px 0 #4c2a9d; }

/* Thẻ hạt giống đặc biệt */
.ntvv-card-art.emo, .ntvv-pet-ico { display: grid; place-items: center; font-size: 44px; line-height: 1; }
.ntvv-card.potion { border-style: dashed; border-color: #c4a8ff; background: #f6f0ff; }
.ntvv-emoji { display: grid; place-items: center; width: 100%; height: 100%; font-size: 30px; line-height: 1; }
.ntvv-btn[disabled], .ntvv-btn.ghost { opacity: .45; cursor: not-allowed; filter: grayscale(.5); transform: none !important; box-shadow: 0 2px 0 rgba(0,0,0,.2); }

/* Vật nuôi */
.ntvv-pets-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.ntvv-pets-head p { margin: 0; font-weight: 700; color: #7a5a38; }
.ntvv-pets { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.ntvv-pet { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 10px 14px; text-align: center; border-radius: 18px; background: #fff; border: 3px solid var(--paper-d); box-shadow: 0 4px 0 var(--paper-d); }
.ntvv-pet.owned { background: linear-gradient(#fff, #f3fbe8); }
.ntvv-pet.ready { border-color: var(--gold); box-shadow: 0 4px 0 #d99a00, 0 0 0 4px rgba(255,183,3,.2); }
.ntvv-pet.locked { opacity: .75; filter: grayscale(.7); }
.ntvv-pet b { font-size: 16px; font-weight: 900; }
.ntvv-pet small { font-size: 12px; font-weight: 700; color: #7a5a38; }
.ntvv-pet-ico { width: 76px; height: 76px; border-radius: 50%; background: radial-gradient(circle at 50% 70%, #d9f2b9, #b5e08a); font-size: 42px; }
.ntvv-pet-ico span { display: inline-block; animation: ntvv-bounce 2.4s ease-in-out infinite; }
.ntvv-pet.ready .ntvv-pet-ico span { animation-duration: 1s; }
.ntvv-pet-st { font-weight: 900; }

/* Học vui */
.ntvv-learn { max-width: 720px; margin: 0 auto; }
.ntvv-learn-head { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin-bottom: 12px; border-radius: 20px; background: linear-gradient(135deg, #e6f6ff, #fff3d6); border: 3px solid #bfe3f7; }
.ntvv-learn-head h3 { margin: 0 0 2px; font-size: 22px; font-weight: 900; color: var(--ink); }
.ntvv-learn-head p { margin: 0; font-weight: 700; color: #7a5a38; font-size: 14px; }
.ntvv-learn-ico { font-size: 46px; line-height: 1; animation: ntvv-bounce 2.2s ease-in-out infinite; }
.ntvv-qstats { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 12px; font-size: 14px; font-weight: 700; color: #7a5a38; }
.ntvv-qstats b { color: var(--ink); }
.ntvv-qrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.ntvv-qrow > span { min-width: 74px; font-weight: 900; }
.ntvv-chipbtn { padding: 8px 16px; border-radius: 999px; font-weight: 900; font-size: 14px; color: #7a5a38; background: #fff; border: 3px solid var(--paper-d) !important; }
.ntvv-chipbtn.on { color: var(--ink); background: #fff3c4; border-color: var(--gold) !important; box-shadow: 0 3px 0 #d99a00; }
.ntvv-qgo { text-align: center; margin-top: 16px; }
.ntvv-qgo .ntvv-btn { font-size: 18px; padding: 13px 34px; }
.ntvv-qcard { padding: 16px 16px 14px; border-radius: 22px; background: #fff; border: 4px solid #bfe3f7; box-shadow: 0 5px 0 #9fcbe6; }
.ntvv-qtag { display: inline-block; padding: 4px 12px; margin-bottom: 8px; border-radius: 999px; font-size: 13px; font-weight: 900; color: #fff; background: #3b82f6; }
.ntvv-qtag.physics { background: #8b5cf6; }
.ntvv-qtext { margin: 0 0 14px; font-size: 21px; line-height: 1.35; font-weight: 900; color: var(--ink); -webkit-user-select: text; user-select: text; }
.ntvv-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ntvv-opt { display: flex; align-items: center; gap: 10px; padding: 12px 12px; border-radius: 16px; text-align: left; font-weight: 800; font-size: 16px; background: #fffdf2; border: 3px solid var(--paper-d) !important; box-shadow: 0 3px 0 var(--paper-d); transition: transform .12s; }
.ntvv-opt:not([disabled]):hover { transform: translateY(-2px); border-color: var(--gold) !important; background: #fff3c4; }
.ntvv-opt i { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-style: normal; font-weight: 900; color: #fff; background: var(--wood-l); }
.ntvv-opt.good { background: #dff8c9; border-color: #4caf50 !important; box-shadow: 0 3px 0 #3a8a3d; animation: ntvv-pop .4s both; }
.ntvv-opt.good i { background: #4caf50; }
.ntvv-opt.bad { background: #ffe0dc; border-color: #e8403a !important; box-shadow: 0 3px 0 #b02a24; animation: ntvv-shake .4s both; }
.ntvv-opt.bad i { background: #e8403a; }
.ntvv-opt.dim { opacity: .55; }
.ntvv-qres { margin-top: 14px; padding: 14px 16px; border-radius: 20px; animation: ntvv-pop .4s both; }
.ntvv-qres.ok { background: #e9f9d8; border: 3px solid #8bd65f; }
.ntvv-qres.no { background: #fff0e3; border: 3px solid #ffb27a; }
.ntvv-qres h4 { margin: 0 0 6px; font-size: 22px; font-weight: 900; }
.ntvv-qres p { margin: 0 0 6px; font-weight: 700; }
.ntvv-exp { color: #5a3a1a; }
.ntvv-rw { font-weight: 900 !important; color: #2f7d1d; }
.ntvv-cap { color: #a45a00; }
.ntvv-qnext { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
@keyframes ntvv-shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

/* Nhiệm vụ, đơn hàng, huy hiệu */
.ntvv-quests { max-width: 720px; margin: 0 auto; }
.ntvv-quests h4 { margin: 18px 0 8px; font-size: 18px; font-weight: 900; color: var(--ink); }
.ntvv-quests h4:first-child { margin-top: 0; }
.ntvv-sub { margin: -4px 0 8px; font-size: 13px; font-weight: 700; color: #7a5a38; }
.ntvv-quest, .ntvv-order { display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin-bottom: 8px; border-radius: 16px; background: #fff; border: 3px solid var(--paper-d); }
.ntvv-quest > em { font-style: normal; font-size: 28px; flex: none; }
.ntvv-quest.done { opacity: .7; background: #f1f8e9; }
.ntvv-quest-main, .ntvv-order-main { flex: 1; min-width: 0; }
.ntvv-quest-main b { display: block; font-weight: 900; margin-bottom: 4px; }
.ntvv-quest-main small, .ntvv-order-main small { display: block; font-size: 12px; font-weight: 700; color: #7a5a38; }
.ntvv-order-main b { display: block; font-weight: 900; }
.ntvv-order-main .rw { color: #a45a00; }
.ntvv-order.can { border-color: #8bd65f; background: #f4fce8; }
.ntvv-bar.sm { height: 7px; background: rgba(0,0,0,.14); margin-bottom: 3px; }
.ntvv-tick { font-weight: 900; color: #2f7d1d; }
.ntvv-bonus-btn { display: block; width: 100%; margin: 4px 0 8px; animation: ntvv-bounce 1.4s ease-in-out infinite; }
.ntvv-bonus.got { padding: 8px; text-align: center; font-weight: 900; color: #2f7d1d; }
.ntvv-badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.ntvv-badge { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; text-align: center; border-radius: 14px; background: #f1ece0; border: 3px solid var(--paper-d); filter: grayscale(1); opacity: .6; }
.ntvv-badge.got { filter: none; opacity: 1; background: #fff8d6; border-color: var(--gold); }
.ntvv-badge em { font-style: normal; font-size: 28px; line-height: 1; }
.ntvv-badge b { font-size: 12px; font-weight: 800; line-height: 1.2; }
.ntvv-badge small { font-size: 12px; font-weight: 900; color: #7a5a38; }

/* Cửa sổ: phủ toàn màn hình để luôn thấy giữa tầm mắt */
.ntvv-modal { position: fixed; z-index: 99999; overflow-y: auto; align-content: center; }
.ntvv-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin: 10px 0 8px; }
.ntvv-day { position: relative; padding: 6px 2px 4px; border-radius: 12px; background: #fff; border: 2px solid var(--paper-d); font-weight: 900; }
.ntvv-day small { display: block; font-size: 10px; color: #7a5a38; }
.ntvv-day em { font-style: normal; font-size: 20px; }
.ntvv-day u { position: absolute; top: -6px; right: -4px; text-decoration: none; font-size: 11px; width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: #4caf50; }
.ntvv-day.past { background: #f1f8e9; }
.ntvv-day.now { border-color: var(--gold); background: #fff3c4; animation: ntvv-bounce 1.2s ease-in-out infinite; }
.ntvv-spin-card { max-width: 340px; }
.ntvv-wheel { position: relative; width: 250px; height: 250px; margin: 6px auto 8px; }
.ntvv-wheel-rot { width: 100%; height: 100%; filter: drop-shadow(0 6px 0 rgba(0,0,0,.2)); }
.ntvv-wheel-svg { width: 100%; height: 100%; display: block; }
.ntvv-pointer { position: absolute; z-index: 2; left: 50%; top: -8px; margin-left: -13px; width: 0; height: 0; border-left: 13px solid transparent; border-right: 13px solid transparent; border-top: 26px solid #e8403a; filter: drop-shadow(0 2px 0 rgba(0,0,0,.3)); }
.ntvv-spin-res { min-height: 30px; font-size: 20px; font-weight: 900; color: var(--ink) !important; }
.ntvv-spin-res.pop { animation: ntvv-pop .5s both; }
.ntvv-spin-btns { display: flex; justify-content: center; gap: 10px; }

/* Khách chưa đăng nhập */
.ntvv-login-card { position: relative; max-width: 460px; }
.ntvv-guest-lang { position: absolute; top: 10px; right: 10px; color: #7a5a38 !important; background: var(--paper-d) !important; box-shadow: none !important; }
.ntvv-feats { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 0 0 16px; }
.ntvv-feats span { padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 900; color: #5a3a1a; background: #fff3c4; border: 2px solid #ffe08a; }
.ntvv-guest-lb { margin-top: 18px; text-align: left; }
.ntvv-guest-lb h4 { margin: 0 0 6px; text-align: center; font-weight: 900; color: var(--ink); }
.ntvv-guest-lb ol { list-style: none; margin: 0; padding: 0; }
.ntvv-guest-lb li { display: flex; gap: 10px; align-items: center; padding: 6px 10px; margin-bottom: 4px; border-radius: 12px; background: #fff; font-weight: 800; }
.ntvv-guest-lb li b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ntvv-guest-lb li small { color: #7a5a38; }

@media (max-width: 640px) {
  .ntvv-opts { grid-template-columns: 1fr; }
  .ntvv-qtext { font-size: 19px; }
  .ntvv-tools2 { margin-left: 0; }
  .ntvv-pets { grid-template-columns: repeat(2, 1fr); }
  .ntvv-badges { grid-template-columns: repeat(2, 1fr); }
  .ntvv-tab { padding: 10px 13px; font-size: 14px; }
}

/* Thanh công cụ: không để các nút đè nhau khi có nhãn dài (tiếng Việt) */
.ntvv-toolbar { flex-wrap: wrap; gap: 10px 12px; justify-content: center; }
.ntvv-tool { white-space: nowrap; flex: none; }
.ntvv-tool span { max-width: none; }

/* ======================================================================
   Bố cục gọn: máy tính = 2 cột (nông trại | bảng điều khiển cuộn riêng),
   điện thoại = 1 cột nhưng bảng không kéo trang quá dài.
   ====================================================================== */
.ntvv-tab { display: inline-flex; align-items: center; padding: 9px 12px; }
.ntvv-tab .tt { display: none; white-space: pre; }
.ntvv-tab.on .tt { display: inline; }
.ntvv-tab .ti { font-size: 18px; line-height: 1; }
.ntvv-tabs { gap: 4px; padding: 10px 10px 0; }
.ntvv-tabbody { max-height: 66vh; overflow-y: auto; overscroll-behavior: contain; padding: 14px 12px 18px; min-height: 0; }
.ntvv-hint { padding: 4px 14px 10px; min-height: 0; }
.ntvv-toolbar { padding: 10px 10px 4px; }
.ntvv-world { padding: 70px 12px 46px; }
.ntvv-hud { padding: 10px 16px; gap: 8px 14px; }
.ntvv-seeds { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 10px; }
.ntvv-card { padding: 8px 6px 10px; }
.ntvv-card-art { width: 66px; height: 66px; }
.ntvv-card b { font-size: 15px; }
.ntvv-pets { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.ntvv-badges { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }

@media (max-width: 640px) {
  .ntvv-hud { padding: 8px 10px; }
  .ntvv-brand small { display: none; }
  .ntvv-seeds { grid-template-columns: repeat(2, 1fr); }
  .ntvv-pets, .ntvv-badges { grid-template-columns: repeat(2, 1fr); }
}

/* Nhãn khóa gọn, không đè lên tên cây */
.ntvv-lock { inset: 6px 6px auto auto; width: auto; height: auto; padding: 3px 10px; border-radius: 999px; font-size: 13px; background: rgba(60, 40, 20, .78); }
.ntvv-tool u.ntvv-pot-n { top: -12px; right: -10px; }

/* ======================================================================
   Bố cục v2.2: đất trồng là chính, hạt giống & các mục khác nằm trong ngăn kéo
   ====================================================================== */
.ntvv-app { max-width: 1280px; }
.ntvv-world { padding: 48px 12px 150px; min-height: max(520px, calc(100vh - 150px)); display: flex; flex-direction: column; justify-content: center; }
.ntvv-critters { bottom: 150px; }
.ntvv-dock {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 7;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 22px 10px 10px; pointer-events: none;
  background: linear-gradient(rgba(20, 50, 10, 0), rgba(20, 50, 10, .62));
}
.ntvv-dock > * { pointer-events: auto; }
.ntvv-hint {
  max-width: 96%; padding: 5px 16px; border-radius: 999px; min-height: 0;
  font-size: 13px; background: rgba(255, 246, 220, .94); box-shadow: 0 3px 0 rgba(0,0,0,.18);
}
.ntvv-toolbar { padding: 0; background: none; }
.ntvv-menu { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.ntvv-menu-btn {
  position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 14px;
  font-weight: 900; font-size: 14px; color: #fff6e0;
  background: linear-gradient(var(--wood-l), var(--wood)); box-shadow: 0 3px 0 var(--wood-d), inset 0 2px 0 rgba(255,255,255,.22);
  transition: transform .12s;
}
.ntvv-menu-btn:hover { transform: translateY(-2px); }
.ntvv-menu-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--wood-d); }
.ntvv-menu-btn em { font-style: normal; font-size: 18px; line-height: 1; }
.ntvv-menu-btn small { max-width: 86px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 1px 8px; border-radius: 999px; font-size: 12px; background: rgba(0,0,0,.28); }
.ntvv-menu-btn.main { color: #5a3200; background: linear-gradient(#ffe27a, var(--gold)); box-shadow: 0 3px 0 #b87800, inset 0 2px 0 rgba(255,255,255,.4); }
.ntvv-menu-btn.main small { background: rgba(255,255,255,.55); }
.ntvv-menu-btn.on { outline: 3px solid #fff; outline-offset: 1px; }
.ntvv-menu-btn u { text-decoration: none; position: absolute; top: -8px; right: -6px; min-width: 22px; height: 22px; padding: 0 6px; display: grid; place-items: center; border-radius: 11px; font-size: 12px; color: #fff; background: #e8403a; box-shadow: 0 2px 0 #9d211c; }

/* Ngăn kéo */
.ntvv-drawer { position: absolute; inset: 0; z-index: 15; display: flex; justify-content: flex-end; }
.ntvv-backdrop { position: absolute; inset: 0; background: rgba(30, 20, 8, .45); animation: ntvv-fade .2s both; }
.ntvv-sheet {
  position: relative; width: min(540px, 100%); height: 100%; display: flex; flex-direction: column;
  background: var(--paper); border-left: 5px solid var(--wood); box-shadow: -10px 0 30px rgba(0,0,0,.35);
  animation: ntvv-slide .25s both;
}
.ntvv-sheet-head { flex: none; display: flex; align-items: flex-end; background: var(--paper-d); padding-right: 8px; }
.ntvv-sheet-head .ntvv-tabs { flex: 1; min-width: 0; padding: 10px 6px 0 10px; }
.ntvv-x { flex: none; width: 36px; height: 36px; margin: 8px 0; border-radius: 50%; font-weight: 900; color: #7a5a38; background: #fff; box-shadow: 0 2px 0 var(--paper-d); }
.ntvv-sheet .ntvv-tabbody { flex: 1 1 auto; min-height: 0; max-height: none; }
@keyframes ntvv-slide { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes ntvv-slideup { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }

@media (max-width: 720px) {
  .ntvv-world { padding: 44px 6px 168px; }
  .ntvv-critters { bottom: 166px; }
  .ntvv-drawer { align-items: flex-end; }
  .ntvv-sheet { width: 100%; height: 84%; border-left: 0; border-top: 5px solid var(--wood); border-radius: 22px 22px 0 0; animation-name: ntvv-slideup; }
  .ntvv-menu-btn { padding: 7px 10px; }
  .ntvv-menu-btn span { display: none; }
  .ntvv-menu-btn.main span { display: inline; }
  .ntvv-tool { padding: 7px 10px 7px 8px; font-size: 13px; }
}

/* Toàn màn hình */
.ntvv-app.is-full, .ntvv-app:fullscreen {
  position: fixed !important; inset: 0; z-index: 2147483000; max-width: none !important; width: 100% !important; height: 100vh; height: 100dvh; height: var(--ntvv-vh, 100dvh); margin: 0 !important; padding-bottom: env(safe-area-inset-bottom); box-sizing: border-box;
  border: 0; border-radius: 0; box-shadow: none; display: flex; flex-direction: column;
}
.ntvv-app.is-full .ntvv-world, .ntvv-app:fullscreen .ntvv-world { flex: 1 1 auto; min-height: 0; }
.ntvv-app.is-full .ntvv-hud, .ntvv-app:fullscreen .ntvv-hud { flex: none; }
html.ntvv-noscroll, html.ntvv-noscroll body { overflow: hidden !important; }

/* Nền/viền của nút: tăng độ ưu tiên để không bị quy tắc ".ntvv-app button" xóa mất */
.ntvv-app .ntvv-btn { background: linear-gradient(#9be25f, #6cc43a); }
.ntvv-app .ntvv-btn.alt, .ntvv-app .ntvv-daily { background: linear-gradient(#ffe27a, var(--gold)); }
.ntvv-app .ntvv-daily.spin { background: linear-gradient(#ffb6d6, #ff7ab0); }
.ntvv-app .ntvv-tool { background: #fff; border: 3px solid var(--paper-d); }
.ntvv-app .ntvv-tool.on { background: #fff3c4; border-color: var(--gold); }
.ntvv-app .ntvv-tool.all { background: linear-gradient(#9be25f, #6cc43a); border-color: #4a9a22; }
.ntvv-app .ntvv-menu-btn { background: linear-gradient(var(--wood-l), var(--wood)); }
.ntvv-app .ntvv-menu-btn.main { background: linear-gradient(#ffe27a, var(--gold)); }
.ntvv-app .ntvv-card { background: #fff; border: 3px solid var(--paper-d); }
.ntvv-app .ntvv-card.on { background: #fff3c4; border-color: var(--gold); }
.ntvv-app .ntvv-card.potion { background: #f6f0ff; border: 3px dashed #c4a8ff; }
.ntvv-app .ntvv-tab { background: rgba(255,255,255,.55); }
.ntvv-app .ntvv-tab.on { background: var(--paper); }
.ntvv-app .ntvv-chipbtn { background: #fff; border: 3px solid var(--paper-d); }
.ntvv-app .ntvv-chipbtn.on { background: #fff3c4; border-color: var(--gold); }
.ntvv-app .ntvv-opt { background: #fffdf2; }
.ntvv-app .ntvv-opt.good { background: #dff8c9; }
.ntvv-app .ntvv-opt.bad { background: #ffe0dc; }
.ntvv-app .ntvv-mini { background: rgba(0,0,0,.28); }
.ntvv-app .ntvv-x { background: #fff; }
.ntvv-app .ntvv-guest-lang { background: var(--paper-d); }

.ntvv-menu-btn u { top: -9px; right: -9px; }
@media (max-width: 720px) {
  .ntvv-brand { order: 1; flex: 1 1 auto; }
  .ntvv-tools2 { order: 2; margin-left: 0; gap: 4px; }
  .ntvv-stats { order: 3; width: 100%; gap: 8px; }
  .ntvv-mini { min-width: 34px; height: 34px; padding: 0 8px; }
}

/* ======================================================================
   v2.3: giao diện gọn - HUD tối giản, cột công cụ, nút thu hoạch nổi, thanh menu icon
   ====================================================================== */
.ntvv-world { padding: 48px 12px 96px; min-height: max(520px, calc(100vh - 150px)); }
.ntvv-critters { bottom: 100px; }
.ntvv-toasts { top: 58px; }

/* HUD */
.ntvv-app .ntvv-hud { flex-wrap: nowrap; padding: 8px 14px; gap: 12px; align-items: center; }
.ntvv-brand small { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ntvv-app .ntvv-stats { flex: 1 1 auto; justify-content: center; flex-wrap: nowrap; gap: 8px; }
.ntvv-app .ntvv-tools2 { position: relative; flex: none; margin-left: 0; gap: 6px; }
.ntvv-app .ntvv-mini { position: relative; font-size: 18px; }
.ntvv-app .ntvv-mini.on { background: rgba(0,0,0,.5); }
.ntvv-mini u { text-decoration: none; position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; display: grid; place-items: center; border-radius: 10px; font-size: 12px; color: #fff; background: #e8403a; box-shadow: 0 2px 0 #9d211c; }
.ntvv-mini.glow { animation: ntvv-bounce 1.6s ease-in-out infinite; }
.ntvv-pop { position: absolute; top: calc(100% + 14px); right: 0; z-index: 30; min-width: 240px; padding: 6px; border-radius: 16px; color: var(--ink); background: var(--paper); border: 3px solid var(--wood); box-shadow: 0 12px 30px rgba(0,0,0,.35); animation: ntvv-pop .25s both; }
.ntvv-app .ntvv-prow { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 10px; font-weight: 800; font-size: 14px; text-align: left; text-decoration: none !important; color: var(--ink) !important; background: transparent; }
.ntvv-app .ntvv-prow:hover { background: #fff3c4; }
.ntvv-prow em { font-style: normal; font-size: 18px; width: 24px; text-align: center; }
.ntvv-prow span { flex: 1; }
.ntvv-val { font-size: 12px; color: #7a5a38; }
.ntvv-sw { position: relative; width: 36px; height: 20px; border-radius: 10px; background: #cdbf9e; transition: background .15s; }
.ntvv-sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.3); transition: transform .15s; }
.ntvv-sw.on { background: #6cc43a; }
.ntvv-sw.on::after { transform: translateX(16px); }

/* Hint: một dòng nhỏ ở đầu khung */
.ntvv-hint { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 7; max-width: calc(100% - 24px); padding: 5px 16px; border-radius: 999px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; background: rgba(255,246,220,.94); box-shadow: 0 3px 0 rgba(0,0,0,.18); }

/* Cột công cụ bên trái */
.ntvv-rail { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); z-index: 7; display: flex; flex-direction: column; gap: 8px; padding: 8px; border-radius: 22px; background: rgba(40,25,10,.55); box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.ntvv-app .ntvv-rt { position: relative; width: 64px; height: 64px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-radius: 16px; font-weight: 900; font-size: 11px; color: var(--ink); background: rgba(255,246,220,.94); box-shadow: 0 3px 0 rgba(0,0,0,.25); transition: transform .12s; }
.ntvv-rt em { font-style: normal; font-size: 25px; line-height: 1; }
.ntvv-app .ntvv-rt:hover { transform: translateY(-2px); }
.ntvv-app .ntvv-rt.on { background: linear-gradient(#ffe27a, var(--gold)); box-shadow: 0 0 0 3px #fff, 0 3px 0 #b87800; }
.ntvv-rt u.ntvv-pot-n { text-decoration: none; position: absolute; top: -6px; right: -6px; min-width: 22px; height: 22px; padding: 0 6px; display: grid; place-items: center; border-radius: 11px; font-size: 12px; color: #fff; background: #8b5cf6; box-shadow: 0 2px 0 #4c2a9d; }

/* Nút Thu hoạch nổi ở góc phải */
.ntvv-harvwrap { position: absolute; right: 18px; bottom: 98px; z-index: 7; }
.ntvv-app .ntvv-harv { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; width: 88px; padding: 10px 6px 9px; border-radius: 22px; font-weight: 900; font-size: 12px; color: #173a05; background: linear-gradient(#b8ee83, #6cc43a); border: 3px solid #fff; box-shadow: 0 5px 0 #3a7a18, 0 10px 22px rgba(0,0,0,.3); }
.ntvv-harv em { font-style: normal; font-size: 32px; line-height: 1; }
.ntvv-harv:not(.ready) { filter: grayscale(.6); opacity: .8; }
.ntvv-harv.ready { animation: ntvv-bounce 1.4s ease-in-out infinite; }
.ntvv-harv u { text-decoration: none; position: absolute; top: -9px; right: -7px; min-width: 24px; height: 24px; padding: 0 6px; display: grid; place-items: center; border-radius: 12px; font-size: 13px; color: #fff; background: #e8403a; box-shadow: 0 2px 0 #9d211c; }

/* Thanh menu icon ở dưới */
.ntvv-bar2 { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); z-index: 7; display: flex; gap: 2px; padding: 6px; border-radius: 24px; background: linear-gradient(var(--wood-l), var(--wood)); border: 3px solid var(--wood-l); box-shadow: 0 5px 0 var(--wood-d), 0 10px 24px rgba(0,0,0,.35); }
.ntvv-app .ntvv-mb { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; width: 78px; height: 58px; padding: 4px; border-radius: 17px; font-weight: 800; font-size: 11px; color: #fff6e0; background: transparent; transition: background .12s; }
.ntvv-mb em { font-style: normal; font-size: 24px; line-height: 1.1; }
.ntvv-mb-art { display: block; width: 34px; height: 34px; border-radius: 50%; background: radial-gradient(circle at 50% 70%, #d9f2b9, #b5e08a); }
.ntvv-mb-art svg { display: block; width: 100%; height: 100%; }
.ntvv-app .ntvv-mb:hover { background: rgba(255,255,255,.16); }
.ntvv-app .ntvv-mb.on { background: rgba(255,255,255,.28); box-shadow: inset 0 0 0 2px #ffe27a; }
.ntvv-mb u { text-decoration: none; position: absolute; top: 0; right: 6px; min-width: 20px; height: 20px; padding: 0 5px; display: grid; place-items: center; border-radius: 10px; font-size: 11px; color: #fff; background: #e8403a; box-shadow: 0 2px 0 #9d211c; }

/* Cửa sổ quà tặng */
.ntvv-gift { display: flex; align-items: center; gap: 12px; margin: 8px 0; padding: 10px 12px; text-align: left; border-radius: 16px; background: #fff; border: 3px solid var(--paper-d); }
.ntvv-gift em { font-style: normal; font-size: 30px; }
.ntvv-gift > div { flex: 1; min-width: 0; }
.ntvv-gift b { display: block; font-weight: 900; }
.ntvv-gift small { color: #7a5a38; font-weight: 700; }
.ntvv-modal-card .ghost2 { margin-top: 6px; }

@media (max-width: 720px) {
  .ntvv-world { padding: 44px 6px 150px; }
  .ntvv-critters { bottom: 150px; }
  .ntvv-app .ntvv-hud { padding: 8px 10px; gap: 8px; }
  .ntvv-brand > div, .ntvv-avatar, .ntvv-logo { display: none; }
  .ntvv-app .ntvv-pot { display: none; }
  .ntvv-app .ntvv-stats { justify-content: flex-start; }
  .ntvv-hint { white-space: normal; text-align: center; width: calc(100% - 24px); border-radius: 16px; }
  .ntvv-rail { left: 8px; top: auto; bottom: 84px; transform: none; flex-direction: row; gap: 5px; padding: 5px; border-radius: 18px; }
  .ntvv-app .ntvv-rt { width: 54px; height: 54px; font-size: 10px; }
  .ntvv-rt em { font-size: 22px; }
  .ntvv-harvwrap { right: 8px; bottom: 84px; }
  .ntvv-app .ntvv-harv { width: 70px; padding: 7px 4px; border-radius: 18px; }
  .ntvv-harv em { font-size: 26px; }
  .ntvv-bar2 { left: 8px; right: 8px; bottom: 8px; transform: none; justify-content: space-between; }
  .ntvv-app .ntvv-mb { flex: 1 1 0; width: auto; min-width: 0; }
}

@media (max-width: 720px) {
  .ntvv-app .ntvv-stats { order: 1; flex: 1 1 auto; width: auto; min-width: 0; gap: 6px; justify-content: flex-start; }
  .ntvv-app .ntvv-tools2 { order: 2; }
  .ntvv-app .ntvv-brand { order: 0; flex: 0 0 auto; }
  .ntvv-app .ntvv-lv { flex: 1 1 auto; min-width: 0; }
  .ntvv-app .ntvv-xp small { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ntvv-app .ntvv-coins b { font-size: 16px; }
}
@media (max-width: 720px) {
  .ntvv-app .ntvv-lvbadge { flex: none; min-width: 30px; width: 30px; height: 30px; }
  .ntvv-app .ntvv-lv { flex: 0 1 auto; max-width: 175px; overflow: hidden; }
  .ntvv-app .ntvv-xp { min-width: 0; }
}


/* ======================================================================
   v2.4: Cửa hàng - hình nền (bg-*), giao diện (skin-*), nhà, thú cưng
   ====================================================================== */
.ntvv-scene-wrap { position: absolute; left: 0; top: 0; width: 100%; height: 200px; pointer-events: none; }

/* Ban đêm: cỏ tối đi theo màu hình nền */
.is-night .ntvv-world { background: linear-gradient(180deg, #121f47 0, #2a3f7c 200px, #538039 200px, #3b6e26 100%); }
.is-night .ntvv-world { background: linear-gradient(180deg, #121f47 0, #2a3f7c 200px, color-mix(in srgb, var(--grass1, #8bd65f) 58%, #000) 200px, color-mix(in srgb, var(--grass2, #5fb23d) 58%, #000) 100%); }

/* Hiệu ứng rơi nhẹ phủ lên cảnh */
.ntvv-world::after { content: ""; display: none; position: absolute; inset: -220px 0 0 0; z-index: 4; pointer-events: none; background-repeat: repeat; background-size: 220px 220px; animation: ntvv-fall 9s linear infinite; }
@keyframes ntvv-fall { to { transform: translate(40px, 220px); } }

/* --- Hình nền --- */
.ntvv-app.bg-spring { --sky1: #ffb8d4; --sky2: #fff0f6; --grass1: #b8e68f; --grass2: #8fd26b; --hill1: #c9efb0; --hill2: #aee48a; --hill3: #9bdc74; --tree-a: #ff9ec6; --tree-b: #ffc2dc; --tree-c: #ff86b8; --land1: #9ce07a; --land2: #7fcf5c; }
.ntvv-app.bg-spring .ntvv-world::after { display: block; background-image: radial-gradient(5px 3px at 20px 30px, #ffd1e3, transparent), radial-gradient(4px 3px at 120px 90px, #ffb8d4, transparent), radial-gradient(5px 3px at 70px 160px, #fff, transparent), radial-gradient(4px 3px at 180px 200px, #ffc2dc, transparent); }
.ntvv-app.bg-autumn { --sky1: #f2955a; --sky2: #ffe3b8; --grass1: #d9b04a; --grass2: #b58a2a; --hill1: #e5c36a; --hill2: #d3a94a; --hill3: #c29a36; --tree-a: #e8622a; --tree-b: #f28a2e; --tree-c: #cf4a1f; --land1: #d8b44f; --land2: #bf9533; }
.ntvv-app.bg-autumn .ntvv-world::after { display: block; background-image: radial-gradient(5px 3px at 30px 20px, #e8622a, transparent), radial-gradient(5px 3px at 140px 70px, #f5a623, transparent), radial-gradient(4px 3px at 80px 150px, #cf4a1f, transparent), radial-gradient(5px 3px at 190px 190px, #f28a2e, transparent); }
.ntvv-app.bg-snow { --sky1: #9dbfe0; --sky2: #f1f7fc; --grass1: #e9f3fa; --grass2: #c9deee; --hill1: #f4f9fd; --hill2: #e3eef7; --hill3: #d4e4f1; --tree-a: #3f8f5a; --tree-b: #56a86f; --tree-c: #2f7a4b; --land1: #f2f8fc; --land2: #d4e5f2; }
.ntvv-app.bg-snow .ntvv-world::after { display: block; background-image: radial-gradient(3px 3px at 20px 30px, #fff, transparent), radial-gradient(2.4px 2.4px at 120px 90px, #fff, transparent), radial-gradient(3px 3px at 70px 160px, #fff, transparent), radial-gradient(2px 2px at 180px 200px, #fff, transparent), radial-gradient(2.6px 2.6px at 160px 20px, #fff, transparent); }
.ntvv-app.bg-sunset { --sky1: #6b4aa5; --sky2: #ffb26b; --grass1: #6aa56a; --grass2: #3f7f4d; --hill1: #7bb77a; --hill2: #5a9a62; --hill3: #4a8a56; --tree-a: #3d8f5a; --tree-b: #4aa56a; --tree-c: #2f7a4b; --land1: #7cc36c; --land2: #5aa84f; }
.ntvv-app.bg-sunset .ntvv-sun { background: radial-gradient(circle at 40% 35%, #fff3c4, #ff8a3d 70%); box-shadow: 0 0 0 10px rgba(255, 140, 60, .35), 0 0 60px 24px rgba(255, 120, 60, .5); }
.ntvv-app.bg-candy { --sky1: #ff9ad5; --sky2: #c8f7ff; --grass1: #ffb8e1; --grass2: #ff8ecb; --hill1: #ffd0ea; --hill2: #ffb8e1; --hill3: #ffa3d8; --tree-a: #b57bff; --tree-b: #d19bff; --tree-c: #8f6bff; --land1: #ffbfe6; --land2: #ff9ad6; }
.ntvv-app.bg-candy .ntvv-world::after { display: block; background-image: radial-gradient(3px 3px at 30px 40px, #fff, transparent), radial-gradient(3px 3px at 130px 100px, #fff59a, transparent), radial-gradient(3px 3px at 80px 170px, #9af0ff, transparent), radial-gradient(3px 3px at 180px 210px, #fff, transparent); }

/* --- Giao diện (đổi màu khung gỗ và giấy) --- */
.ntvv-app.skin-berry { --wood: #c2456f; --wood-d: #8f2a4d; --wood-l: #e0709a; --paper: #fff0f5; --paper-d: #f8d3e1; --ink: #4a1f33; }
.ntvv-app.skin-ocean { --wood: #2f78b5; --wood-d: #1f5584; --wood-l: #58a3dc; --paper: #eef8ff; --paper-d: #cfe6f7; --ink: #17364f; }
.ntvv-app.skin-forest { --wood: #3f7d43; --wood-d: #2a5a2e; --wood-l: #66a86a; --paper: #f2fbe9; --paper-d: #d7ecbf; --ink: #22401f; }
.ntvv-app.skin-sunny { --wood: #d58a00; --wood-d: #a86600; --wood-l: #f5b83a; --paper: #fffbe3; --paper-d: #f6e8a8; --ink: #4d3500; }
.ntvv-app.skin-midnight { --wood: #5b3f9a; --wood-d: #3d2a73; --wood-l: #8466c9; --paper: #f4f0ff; --paper-d: #dcd2f5; --ink: #2f2150; }

/* --- Thú cưng đi dạo --- */
.ntvv-walker { position: absolute; left: 6%; bottom: var(--b, 20px); z-index: 3; font-size: 32px; line-height: 1; animation: ntvv-walk var(--t, 24s) linear infinite; animation-delay: var(--dl, 0s); filter: drop-shadow(0 4px 0 rgba(0,0,0,.18)); }
.ntvv-walker i { display: block; font-style: normal; animation: ntvv-hopw .7s ease-in-out infinite; }
@keyframes ntvv-walk { 0% { left: 6%; transform: scaleX(1); } 47% { left: 84%; transform: scaleX(1); } 50% { left: 84%; transform: scaleX(-1); } 97% { left: 6%; transform: scaleX(-1); } 100% { left: 6%; transform: scaleX(1); } }
@keyframes ntvv-hopw { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

/* --- Giao diện cửa hàng --- */
.ntvv-shopcats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.ntvv-shopitems { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.ntvv-item { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 8px 12px; text-align: center; border-radius: 18px; background: #fff; border: 3px solid var(--paper-d); box-shadow: 0 4px 0 var(--paper-d); }
.ntvv-item.on { border-color: var(--gold); background: #fff8d6; box-shadow: 0 4px 0 #d99a00; }
.ntvv-item.locked { opacity: .7; }
.ntvv-item b { font-size: 15px; font-weight: 900; }
.ntvv-item small { font-size: 12px; font-weight: 700; color: #7a5a38; }
.ntvv-prev { width: 100%; height: 78px; display: grid; place-items: center; border-radius: 12px; overflow: hidden; font-size: 44px; line-height: 1; }
.ntvv-prev svg { width: 100%; height: 100%; display: block; }
.ntvv-prev.pet { background: radial-gradient(circle at 50% 70%, #d9f2b9, #b5e08a); }
.ntvv-prev.skin { display: flex; padding: 0; }
.ntvv-prev.skin i { flex: 1; height: 100%; display: block; }
.ntvv-prev.skin em { flex: 0 0 34%; height: 100%; display: block; font-style: normal; }

/* ======================================================================
   v3.0: vật nuôi SVG to, xe, bạn bè & thăm nông trại, hồ cá, xếp hạng theo thời gian
   ====================================================================== */
.ntvv-walker svg, .ntvv-static svg { display: block; width: var(--w, 64px); height: auto; }
.ntvv-walker .ntvv-emo-art { display: block; font-size: calc(var(--w, 56px) * .8); line-height: 1; }
.ntvv-static { position: absolute; left: 3%; bottom: 40px; z-index: 3; filter: drop-shadow(0 4px 0 rgba(0,0,0,.15)); }
.ntvv-vehicle { position: absolute; left: -14%; bottom: 2px; z-index: 3; width: 124px; animation: ntvv-drive 44s linear infinite; filter: drop-shadow(0 4px 0 rgba(0,0,0,.18)); }
.ntvv-vehicle svg { display: block; width: 100%; height: auto; }
@keyframes ntvv-drive { 0% { left: -14%; transform: scaleX(1); } 46% { left: 96%; transform: scaleX(1); } 50% { left: 96%; transform: scaleX(-1); } 96% { left: -14%; transform: scaleX(-1); } 100% { left: -14%; transform: scaleX(1); } }
.ntvv-vehicle .wh { transform-box: fill-box; transform-origin: center; animation: ntvv-spin 1s linear infinite; }
@keyframes ntvv-spin { to { transform: rotate(360deg); } }
.ntvv-emo-art { font-size: 50px; line-height: 1; }

/* Thẻ vật nuôi to hơn */
.ntvv-pets { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.ntvv-pet-art { width: 100%; height: 108px; display: grid; place-items: center; border-radius: 16px; background: radial-gradient(circle at 50% 80%, #d9f2b9, #b5e08a); }
.ntvv-pet-art svg { width: 100%; height: 100%; display: block; }
.ntvv-pet.ready .ntvv-pet-art { box-shadow: 0 0 0 3px var(--gold); }
.ntvv-prev.pet svg { width: 100%; height: 100%; }
.ntvv-h4 { margin: 16px 0 8px; font-size: 17px; font-weight: 900; }

/* Môn học mới */
.ntvv-qtag.english { background: #e91e63; }
.ntvv-qtag.geo { background: #00897b; }
.ntvv-qtag.nature { background: #43a047; }
.ntvv-qtag.logic { background: #f57c00; }

/* Thăm nông trại bạn bè */
.ntvv-visitbar { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 8; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; max-width: calc(100% - 20px); padding: 8px 12px; border-radius: 20px; background: rgba(255,246,220,.97); box-shadow: 0 4px 0 rgba(0,0,0,.2); }
.ntvv-vb-title { font-weight: 800; color: var(--ink); }
.ntvv-vb-title small { color: #7a5a38; }
.ntvv-app .ntvv-vb { position: relative; padding: 7px 12px; border-radius: 14px; font-weight: 900; font-size: 14px; color: var(--ink); background: #fff; border: 3px solid var(--paper-d); }
.ntvv-app .ntvv-vb.on { background: #dff2ff; border-color: #5cc3f0; }
.ntvv-app .ntvv-vb.pest.on { background: #e3f6d0; border-color: #7ccf4d; }
.ntvv-app .ntvv-vb.back { color: #fff; background: var(--wood-l); border-color: var(--wood-d); }
.ntvv-app .ntvv-vb[disabled] { opacity: .45; }
.ntvv-vb u { text-decoration: none; margin-left: 4px; padding: 1px 7px; border-radius: 9px; font-size: 12px; color: #fff; background: #8b5cf6; }
.is-visit .ntvv-rail, .is-visit .ntvv-harvwrap, .is-visit .ntvv-bar2 { display: none; }
.is-visit .ntvv-hint { top: auto; bottom: 16px; }
.ntvv-bug { position: absolute; left: 50%; top: -4px; z-index: 5; margin-left: -14px; font-size: 28px; line-height: 1; cursor: pointer; animation: ntvv-wiggle 1s ease-in-out infinite; filter: drop-shadow(0 3px 0 rgba(0,0,0,.25)); }
@keyframes ntvv-wiggle { 0%, 100% { transform: rotate(-14deg); } 50% { transform: rotate(14deg); } }
.ntvv-plot.buggy .ntvv-crop { filter: saturate(.7); }

/* Bạn bè */
.ntvv-friends { max-width: 640px; margin: 0 auto; }
.ntvv-friends h4 { margin: 16px 0 8px; font-weight: 900; }
.ntvv-codebox { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; background: linear-gradient(135deg, #e6f6ff, #fff3d6); border: 3px solid #bfe3f7; }
.ntvv-codebox small { font-weight: 800; color: #7a5a38; }
.ntvv-codebox b { flex: 1; font-size: 24px; font-weight: 900; letter-spacing: 3px; color: var(--ink); }
.ntvv-addrow { display: flex; gap: 8px; margin: 10px 0 4px; }
.ntvv-addrow input { flex: 1; min-width: 0; padding: 10px 14px; border-radius: 14px; border: 3px solid var(--paper-d); font-size: 16px; font-weight: 800; text-transform: uppercase; background: #fff; color: var(--ink); }
.ntvv-frow { display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin-bottom: 8px; border-radius: 16px; background: #fff; border: 3px solid var(--paper-d); }
.ntvv-fava { flex: none; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; font-style: normal; font-weight: 900; color: #fff; background: var(--wood-l); }
.ntvv-fmain { flex: 1; min-width: 0; }
.ntvv-fmain b { display: block; font-weight: 900; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ntvv-fmain small { font-weight: 700; color: #7a5a38; }
.ntvv-x.sm { width: 30px; height: 30px; margin: 0; font-size: 13px; }
.ntvv-empty.sm { padding: 12px; font-size: 14px; }
.ntvv-app .ntvv-mini2 { width: 30px; height: 30px; margin-left: 4px; border-radius: 50%; font-size: 15px; background: #fff3c4; box-shadow: 0 2px 0 var(--paper-d); flex: none; }
.ntvv-rank li { align-items: center; }

/* Hồ cá */
.ntvv-pondwrap { max-width: 720px; margin: 0 auto; }
.ntvv-lake { position: relative; padding: 24px 14px 20px; border-radius: 26px; background: linear-gradient(#c9efa8, #a4da86); border: 4px solid #7fbf5e; }
.ntvv-reed { position: absolute; bottom: -2px; font-size: 32px; line-height: 1; }
.ntvv-reed.l { left: 8px; } .ntvv-reed.r { right: 8px; transform: scaleX(-1); }
.ntvv-lily { position: absolute; top: -8px; font-size: 24px; animation: ntvv-bounce 3s ease-in-out infinite; }
.ntvv-lily.a { left: 28%; } .ntvv-lily.b { right: 24%; animation-delay: -1.4s; }
.ntvv-water { display: grid; grid-template-columns: repeat(var(--cols, 2), 1fr); gap: 10px; padding: 14px; border-radius: 30px; background: linear-gradient(135deg, #63c8f2, #2f93d8 60%, #1f6fb8); box-shadow: inset 0 0 0 4px rgba(255,255,255,.35), inset 0 12px 30px rgba(0,60,120,.35); position: relative; overflow: hidden; }
.ntvv-water::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(100deg, transparent 0 22px, rgba(255,255,255,.1) 22px 26px); animation: ntvv-wave 6s linear infinite; }
@keyframes ntvv-wave { to { background-position: 52px 0; } }
.ntvv-app .ntvv-slot { position: relative; min-height: 104px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border-radius: 50% / 42%; font-weight: 800; color: #fff; background: rgba(255,255,255,.1); border: 2px dashed rgba(255,255,255,.4); overflow: hidden; }
.ntvv-app .ntvv-slot:not(.empty) { border-style: solid; background: rgba(255,255,255,.14); }
.ntvv-app .ntvv-slot:hover { background: rgba(255,255,255,.22); }
.ntvv-app .ntvv-slot.ripe { box-shadow: 0 0 0 3px #ffe27a, 0 0 18px rgba(255,226,122,.9); }
.ntvv-sl-plus { font-size: 30px; line-height: 1; opacity: .85; }
.ntvv-slot small { font-size: 11px; color: #e8f6ff; }
.ntvv-fish { animation: ntvv-swim 7s linear infinite; }
.ntvv-fish.small { width: 40px; } .ntvv-fish.mid { width: 60px; } .ntvv-fish.big { width: 84px; }
.ntvv-fish svg { display: block; width: 100%; height: auto; filter: drop-shadow(0 4px 2px rgba(0,40,90,.35)); }
@keyframes ntvv-swim { 0% { transform: translateX(-16px) scaleX(1); } 46% { transform: translateX(16px) scaleX(1); } 50% { transform: translateX(16px) scaleX(-1); } 96% { transform: translateX(-16px) scaleX(-1); } 100% { transform: translateX(-16px) scaleX(1); } }
.ntvv-sl-bar { width: 68%; height: 6px; border-radius: 3px; background: rgba(0,0,0,.3); overflow: hidden; }
.ntvv-sl-bar i { display: block; height: 100%; background: linear-gradient(#ffe27a, #ffb703); }
.ntvv-fed, .ntvv-ripe-b { position: absolute; top: 6px; right: 12px; font-size: 18px; }
.ntvv-ripe-b { animation: ntvv-bounce 1s ease-in-out infinite; }
.ntvv-pondbtns { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0 2px; }
.ntvv-card-art.fishc { width: 90px; height: 58px; border-radius: 12px; background: linear-gradient(#c8ecff, #7fc8f0); }
.ntvv-card-art.fishc svg { width: 100%; height: 100%; display: block; }

@media (max-width: 720px) {
  .ntvv-app .ntvv-mb span { display: none; }
  .ntvv-app .ntvv-mb.on span { display: block; }
  .ntvv-mb em { font-size: 22px; }
  .ntvv-visitbar { top: 6px; padding: 6px 8px; gap: 6px; }
  .ntvv-app .ntvv-vb { padding: 6px 9px; font-size: 13px; }
  .ntvv-pets { grid-template-columns: repeat(2, 1fr); }
  .ntvv-pet-art { height: 86px; }
}

.ntvv-critters { bottom: 86px; }
@media (max-width: 720px) { .ntvv-critters { bottom: 150px; } }

/* ======================================================================
   v4.1: vật nuôi đi bộ thật hơn, nhà tách khỏi cây trồng, đường và xe chạy ở mép phía trước
   ====================================================================== */
.ntvv-actor { position: absolute; left: 0; top: 0; width: 0; height: 0; transform-origin: 0 0; pointer-events: none; }
.ntvv-actor svg { position: absolute; display: block; overflow: visible; }
.ntvv-actor .ntvv-face { position: absolute; left: 0; top: 0; width: 0; height: 0; animation: none; }
.ntvv-sp { position: absolute; left: 0; top: 0; width: 0; height: 0; transform-origin: 0 0; }
.lg { transform-box: fill-box; transform-origin: 50% 0; }
.ntvv-actor.mv .lg.l0 { animation: ntvv-leg .56s ease-in-out infinite; }
.ntvv-actor.mv .lg.l1 { animation: ntvv-leg .56s ease-in-out infinite; animation-delay: -.28s; }
@keyframes ntvv-leg { 0%, 100% { transform: rotate(-22deg); } 50% { transform: rotate(22deg); } }
.ntvv-actor.mv .ntvv-sp { animation: ntvv-bob .56s ease-in-out infinite; }
@keyframes ntvv-bob { 0%, 50%, 100% { transform: translateY(0); } 25%, 75% { transform: translateY(-2.5px); } }
.ntvv-actor.gz .ntvv-sp { animation: ntvv-graze 3s ease-in-out infinite; transform-origin: 72px 70px; }
@keyframes ntvv-graze { 0%, 100% { transform: rotate(0); } 25%, 65% { transform: rotate(7deg); } }
.ntvv-drive3d .ntvv-face { animation: ntvv-vface 50s steps(1, end) infinite; }
@keyframes ntvv-vface { 0% { transform: scaleX(1); } 50% { transform: scaleX(-1); } }

/* ======================================================================
   v4.2: camera (phóng to / thu nhỏ / kéo) và chế độ mượt cho điện thoại, máy yếu
   ====================================================================== */
.ntvv-world { touch-action: none; }
.ntvv-iso { transform-origin: 50% 50%; }
.ntvv-zoom { position: absolute; right: 16px; top: 56px; z-index: 7; display: flex; flex-direction: column; gap: 6px; }
.ntvv-app .ntvv-zoom button { width: 40px; height: 40px; border-radius: 50%; font-size: 20px; font-weight: 900; line-height: 1; color: #fff6e0; background: rgba(40, 25, 10, .62); box-shadow: 0 3px 0 rgba(0,0,0,.3); }
.ntvv-app .ntvv-zoom button:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0,0,0,.3); }
.is-visit .ntvv-zoom { top: 120px; }

/* Xe chạy bằng thuộc tính translate (không gây tính lại bố cục) */
@keyframes ntvv-drive3d { 0% { translate: var(--x0) 0; } 46% { translate: var(--x1) 0; } 54% { translate: var(--x1) 0; } 100% { translate: var(--x0) 0; } }

/* Chế độ mượt: tắt hiệu ứng nặng, giữ chuyển động chính */
.ntvv-app.lite .ntvv-cloud, .ntvv-app.lite .ntvv-sun, .ntvv-app.lite .ntvv-stars, .ntvv-app.lite .ntvv-bfly,
.ntvv-app.lite .ntvv-crop svg, .ntvv-app.lite .ntvv-plot.ripe, .ntvv-app.lite .ntvv-wslot.ripe, .ntvv-app.lite .ntvv-lake3d,
.ntvv-app.lite .ntvv-water::before, .ntvv-app.lite .ntvv-fishsw, .ntvv-app.lite .ntvv-lily, .ntvv-app.lite .ntvv-spark-top,
.ntvv-app.lite .ntvv-ripe-b, .ntvv-app.lite .ntvv-mini.glow, .ntvv-app.lite .ntvv-harv.ready, .ntvv-app.lite .ntvv-bug,
.ntvv-app.lite .ntvv-actor.mv .ntvv-sp, .ntvv-app.lite .ntvv-drive3d .wh, .ntvv-app.lite .ntvv-actor.gz .ntvv-sp { animation: none !important; }
.ntvv-app.lite .ntvv-world::after { display: none !important; }
.ntvv-app.lite svg, .ntvv-app.lite .ntvv-fishb svg, .ntvv-app.lite .ntvv-star { filter: none !important; }
.ntvv-app.lite .ntvv-lake3d { background: linear-gradient(135deg, #5ec6f0, #2c8ed6 60%, #1b6bb5); box-shadow: 0 0 0 7px #ecd9a6, 0 0 0 11px #c9b26e; }
.ntvv-app.lite .ntvv-plot, .ntvv-app.lite .ntvv-buy { box-shadow: none; }
.ntvv-app.lite .ntvv-actor { transition: transform 90ms linear; }
.ntvv-app.is-drawer .ntvv-world *, .ntvv-app.is-drawer .ntvv-world *::before, .ntvv-app.is-drawer .ntvv-world *::after { animation-play-state: paused !important; }


/* ======================================================================
   v5.0: cảnh phối cảnh 2D (nhẹ, nét khi zoom) - đồ vật, hồ, xe
   ====================================================================== */
.ntvv-emo-prop { position: absolute; left: -18px; top: -36px; font-size: 32px; line-height: 1; }
.ntvv-fishsw { animation: ntvv-swimb 6s linear infinite; }
@keyframes ntvv-swimb { 0% { transform: translateX(-8px) scaleX(1); } 46% { transform: translateX(8px) scaleX(1); } 50% { transform: translateX(8px) scaleX(-1); } 96% { transform: translateX(-8px) scaleX(-1); } 100% { transform: translateX(-8px) scaleX(1); } }
.ntvv-fishb { position: absolute; }
.ntvv-fishb svg { display: block; width: 100%; height: auto; }
.ntvv-fedb { position: absolute; left: 16px; top: -40px; font-size: 16px; }
.ntvv-wslot.empty:hover .ntvv-plus { opacity: 1; }
.is-visit .ntvv-wslot .ntvv-hit { pointer-events: none; }
.ntvv-prev.house3d svg { width: 100%; height: 100%; }
.ntvv-drive3d { animation: ntvv-drive2d 50s linear infinite; }
@keyframes ntvv-drive2d { 0% { translate: 0 0; } 46% { translate: var(--dx) var(--dy); } 54% { translate: var(--dx) var(--dy); } 100% { translate: 0 0; } }
.ntvv-drive3d .ntvv-face { animation: ntvv-vface 50s steps(1, end) infinite; }

/* ---- Nấc thang "Ai là triệu phú" ---- */
.ntvv-qlevel { margin: 8px 0 6px; font-weight: 900; font-size: 16px; }
.ntvv-qlevel b.st1 { color: #1f9d55; } .ntvv-qlevel b.st2 { color: #e08a00; } .ntvv-qlevel b.st3 { color: #d93a3a; }
.ntvv-ladder { display: grid; grid-template-columns: repeat(15, 1fr); gap: 3px; margin: 6px 0 10px; }
.ntvv-rung { display: flex; align-items: center; justify-content: center; height: 26px; border-radius: 7px; font-style: normal; font-weight: 900; font-size: 11px; color: #7a5a38; background: #f3e7cf; border: 2px solid #e2cfa6; }
.ntvv-rung.t2 { background: #fff0d0; } .ntvv-rung.t3 { background: #ffe0d6; border-color: #f0b8a6; }
.ntvv-rung.done { color: #fff; background: #4caf50; border-color: #388e3c; }
.ntvv-rung.now { color: #3a2a00; background: #ffd23f; border-color: #d99a00; box-shadow: 0 0 0 2px #fff3c4, 0 3px 8px rgba(217, 154, 0, .55); transform: scale(1.12); }
.ntvv-rung.safe { font-size: 12px; }
.ntvv-safehint { margin: 0 0 10px; font-size: 13px; color: #7a5a38; }
.ntvv-lifes { display: flex; gap: 8px; margin: 0 0 10px; }
.ntvv-app .ntvv-life { padding: 6px 14px; border-radius: 999px; font-weight: 900; font-size: 14px; color: #3a2a00; background: #fff3c4; border: 3px solid var(--gold); box-shadow: 0 3px 0 #d99a00; }
.ntvv-app .ntvv-life:disabled { opacity: .45; box-shadow: none; filter: grayscale(.6); }
.ntvv-life small { font-weight: 700; font-size: 11px; }
.ntvv-opt.gone { opacity: .25; }
.ntvv-qtag.history { background: #a0663a; } .ntvv-qtag.science { background: #14a38b; } .ntvv-qtag.space { background: #4b3fb8; }
.ntvv-qtag.animals { background: #e07b1a; } .ntvv-qtag.sports { background: #2e9e4f; } .ntvv-qtag.arts { background: #d6458f; }
.ntvv-qtag.tech { background: #475569; } .ntvv-qtag.food { background: #d9534f; } .ntvv-qtag.geo { background: #0e86d4; }
@media (max-width: 520px) { .ntvv-rung { height: 22px; font-size: 10px; border-width: 1px; } }

.ntvv-app.is-full .ntvv-hud { padding-top: max(0px, env(safe-area-inset-top)); }
html.ntvv-noscroll, html.ntvv-noscroll body { overflow: hidden !important; position: relative; height: 100%; overscroll-behavior: none; }

.ntvv-app .ntvv-mini .ntvv-fsico { display: block; margin: auto; color: #fff; filter: drop-shadow(0 1px 0 rgba(0,0,0,.35)); transition: transform .15s; }
.ntvv-app .ntvv-mini:hover .ntvv-fsico { transform: scale(1.12); }
.ntvv-app .ntvv-mini[data-act="full"] { display: grid; place-items: center; min-width: 40px; height: 40px; padding: 0; }
@media (max-width: 720px) { .ntvv-app .ntvv-mini[data-act="full"] { min-width: 34px; height: 34px; } .ntvv-app .ntvv-mini .ntvv-fsico { width: 18px; height: 18px; } }
