/* Cửa hàng "Chợ Đen Vũ Trụ" (trang thử ẩn, GĐ-A). Nền vũ trụ như các trạm công cụ nhưng ấm hơn: mái bạt vá, đèn dây, gỗ, khói. Không viền khung:
   chọn = chữ + chấm trăng, nút chính là hành tinh. Điện thoại trước. */
:root {
  --nen: #0b0714; --chu: #fff7f0; --mo: rgb(255 247 240 / .66); --cam: #ffb46b; --hong: #f9a8cc; --go: #6b4328; --go-toi: #3a2314;
  --f-tieu-de: 'Bricolage Grotesque', 'Be Vietnam Pro', system-ui, sans-serif; --f-than: 'Be Vietnam Pro', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--nen); }
body {
  margin: 0; min-height: 100vh; color: var(--chu); font: 400 16px/1.5 var(--f-than); -webkit-tap-highlight-color: transparent;
  background:
    radial-gradient(1.5px 1.5px at 12% 18%, #fff, transparent), radial-gradient(1px 1px at 36% 8%, #fff, transparent), radial-gradient(1.5px 1.5px at 71% 14%, #ffe2c4, transparent),
    radial-gradient(1px 1px at 88% 30%, #fff, transparent), radial-gradient(1px 1px at 22% 52%, #fff, transparent), radial-gradient(1.5px 1.5px at 62% 64%, #ffe2c4, transparent),
    radial-gradient(1px 1px at 8% 80%, #fff, transparent), radial-gradient(1px 1px at 92% 74%, #fff, transparent),
    radial-gradient(ellipse 55% 34% at 72% 8%, rgb(162 58 138 / .22), transparent 70%), radial-gradient(ellipse 50% 30% at 18% 38%, rgb(106 58 176 / .18), transparent 70%),
    radial-gradient(ellipse 120% 60% at 50% 0%, #2a1836 0%, #150d22 46%, #0a0712 100%) #0a0712;
  background-attachment: fixed;
}
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid #ffe2c4; outline-offset: 3px; border-radius: 8px; }

/* ---- thanh trên */
.ch-bar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 10px; padding: calc(10px + env(safe-area-inset-top, 0px)) 14px 8px 14px; background: linear-gradient(#0a0712ee, #0a071200); }
.ch-ve { display: inline-flex; flex: none; white-space: nowrap; align-items: center; gap: 6px; height: 52px; padding: 0 16px 0 12px; border-radius: 999px; color: #1a0f22; font: 700 .95rem/1 var(--f-than); text-decoration: none;
  background: linear-gradient(180deg, #ffe9d2, #ffb46b); box-shadow: 0 0 0 4px rgb(255 180 107 / .22), 0 0 26px rgb(255 160 90 / .6), inset 0 -4px 8px rgb(150 60 10 / .25); }
.ch-ve svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.ch-vi { margin-left: auto; font: 600 1.05rem/1 var(--f-tieu-de); color: #ffe9b8; text-shadow: 0 0 14px rgb(255 190 90 / .6); padding: 10px 14px; }
.ch-vi b { font-weight: 800; font-variant-numeric: tabular-nums; }
.ch-vi.nhay { animation: chNhay .7s ease; }
.ch-loa { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: var(--chu); background: rgb(255 226 196 / .08); }
.ch-loa svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ch-loa[aria-pressed="false"] .ch-song { display: none; }
.ch-loa[aria-pressed="false"] { opacity: .55; }

main { max-width: 1080px; margin: 0 auto; padding: 0 14px 90px; }
.ch-xemthu { margin: 0 0 6px; text-align: center; font-size: .8rem; color: var(--mo); }

/* ---- khoang hàng: chủ cửa hàng đứng nhỏ giữa, ~10 hộp hàng nhỏ lơ lửng quanh ông, mỗi hộp một kho (cô Ari 05/10). Nền KHÔNG phải tranh: tinh vân + sao + bệ bay. */
.ch-canh { position: relative; height: clamp(580px, 152vw, 720px); margin: 0 -14px; overflow: hidden; isolation: isolate;
  background:
    radial-gradient(1.5px 1.5px at 12% 14%, #fff, transparent), radial-gradient(1px 1px at 33% 24%, #ffe2c4, transparent), radial-gradient(1.5px 1.5px at 58% 9%, #fff, transparent),
    radial-gradient(1px 1px at 81% 20%, #fff, transparent), radial-gradient(1px 1px at 7% 52%, #ffe2c4, transparent), radial-gradient(1.5px 1.5px at 92% 58%, #fff, transparent),
    radial-gradient(1px 1px at 40% 76%, #fff, transparent), radial-gradient(1px 1px at 70% 88%, #ffe2c4, transparent), radial-gradient(1px 1px at 20% 92%, #fff, transparent),
    radial-gradient(ellipse 60% 40% at 24% 30%, rgb(106 58 176 / .34), transparent 70%), radial-gradient(ellipse 55% 36% at 80% 62%, rgb(190 70 130 / .26), transparent 70%),
    radial-gradient(ellipse 70% 50% at 50% 100%, rgb(255 150 80 / .2), transparent 70%), linear-gradient(#150d26, #0b0714); }
.ch-bang { position: absolute; z-index: 4; left: 50%; top: 14px; transform: translateX(-50%); padding: 7px 20px 8px; border-radius: 10px; white-space: nowrap; text-align: center;
  font: 800 1.02rem/1 var(--f-tieu-de); letter-spacing: .1em; text-transform: uppercase; color: #ffe9d2; background: rgb(20 10 34 / .62); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  box-shadow: 0 0 0 1px rgb(255 226 196 / .32), 0 6px 14px rgb(0 0 0 / .4); text-shadow: 0 0 10px rgb(255 160 90 / .7); }
.ch-bang small { display: block; margin-top: 4px; font: 600 .6rem/1 var(--f-than); letter-spacing: .24em; color: #ffcf8a; text-shadow: none; }
.ch-be { position: absolute; z-index: 2; left: 50%; bottom: 4%; width: min(56vw, 260px); height: 34px; transform: translateX(-50%); border-radius: 50%;
  background: radial-gradient(ellipse at 50% 40%, rgb(255 190 110 / .5), rgb(255 120 80 / .18) 55%, transparent 72%); box-shadow: 0 0 40px 10px rgb(255 150 90 / .18); animation: chLap 3.4s ease-in-out infinite; }
.ch-canh .ch-lao { position: absolute; z-index: 8; left: 50%; bottom: 6%; transform: translateX(-50%); width: clamp(132px, 36vw, 204px); display: block; }
.ch-lao .nv-bong { bottom: calc(100% - 6px); left: 50%; right: auto; transform: translate(-50%, 8px) scale(.92); width: max-content; max-width: min(52vw, 230px); font-size: .8rem; z-index: 8; }
.ch-lao .nv-bong.hien { transform: translate(-50%, 0) scale(1); }
.ch-lao .nv-bong::after { left: 50%; right: auto; transform: translateX(-50%) rotate(45deg); }
.ch-lao .nvc { filter: drop-shadow(0 8px 12px rgb(0 0 0 / .55)); }

/* hộp hàng lơ lửng: thân hộp 3D nhẹ (nắp + thân + đèn báo), tia sáng và bóng toả xuống bên dưới; mỗi hộp lắc lư một nhịp riêng */
.ch-hops { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.ch-kho { position: absolute; left: var(--x); top: var(--y); transform: translateX(-50%); width: 88px; display: grid; justify-items: center; gap: 1px; padding: 2px 0 4px; pointer-events: auto; color: var(--chu); text-align: center;
  animation: chTroi var(--chay, 6s) ease-in-out infinite; animation-delay: var(--tre, 0s); }
@keyframes chTroi { 0%, 100% { translate: 0 0; rotate: -1.6deg; } 50% { translate: 0 calc(var(--bien, 6px) * -1); rotate: 1.6deg; } }
.ch-th { position: relative; width: 58px; height: 58px; display: block; transition: transform .25s cubic-bezier(.3, 1.6, .5, 1); }
.ch-kho:active .ch-th { transform: scale(.92); }
@media (hover: hover) { .ch-kho:hover .ch-th { transform: translateY(-3px) scale(1.06); } }
.ch-th-than { position: absolute; left: 0; right: 0; bottom: 0; height: 40px; border-radius: 8px 8px 11px 11px; overflow: hidden;
  background: linear-gradient(180deg, color-mix(in srgb, var(--mau) 70%, #fff) 0, var(--mau) 38%, color-mix(in srgb, var(--mau) 42%, #1a0f2a) 100%);
  box-shadow: 0 0 0 2px #1a1228, 0 0 0 3px rgb(255 226 196 / .35), inset 0 -8px 10px rgb(0 0 0 / .22), 0 0 18px color-mix(in srgb, var(--mau) 60%, transparent); }
.ch-th-than::before, .ch-th-than::after { content: ""; position: absolute; top: 0; bottom: 0; width: 7px; background: repeating-linear-gradient(-45deg, #ffcf3a 0 4px, #2a2433 4px 8px); opacity: .85; }
.ch-th-than::before { left: 0; } .ch-th-than::after { right: 0; }
.ch-th-bt { position: absolute; inset: 0; display: grid; place-items: center; }
.ch-th-bt svg.bt { width: 54%; height: 54%; fill: none; stroke: rgb(24 12 40 / .85); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 1px 0 rgb(255 255 255 / .4)); }
.ch-th-den { position: absolute; right: 9px; top: 5px; width: 6px; height: 6px; border-radius: 50%; background: #ff6b5a; box-shadow: 0 0 6px rgb(255 107 90 / .8); }
.ch-th-nap { position: absolute; left: -3px; right: -3px; top: 6px; height: 15px; border-radius: 8px 8px 3px 3px; transform-origin: 8% 100%; transition: transform .5s cubic-bezier(.3, 1.4, .5, 1); z-index: 2;
  background: repeating-linear-gradient(-45deg, #ffd24a 0 7px, #2a2433 7px 14px); box-shadow: 0 0 0 2px #1a1228, 0 3px 5px rgb(0 0 0 / .35); }
.ch-th-tia { position: absolute; left: 14%; right: 14%; top: 2px; height: 28px; opacity: 0; pointer-events: none; transition: opacity .4s;
  background: linear-gradient(to top, color-mix(in srgb, var(--mau) 80%, #fff), transparent); clip-path: polygon(15% 100%, 85% 100%, 100% 0, 0 0); filter: blur(1px); }
.ch-th-bong { position: absolute; left: 12%; right: 12%; bottom: -12px; height: 8px; border-radius: 50%; background: radial-gradient(ellipse, rgb(0 0 0 / .5), transparent 70%); filter: blur(2px); }
.ch-kho.mo .ch-th-nap { transform: translateY(-9px) rotate(-26deg); }
.ch-kho.mo .ch-th-tia { opacity: .9; }
.ch-kho.mo .ch-th-den { background: #7dffb8; box-shadow: 0 0 8px 2px rgb(125 255 184 / .7); }
.ch-kho.mo .ch-th { transform: translateY(-4px) scale(1.1); }
.ch-kho.trong .ch-th { opacity: .5; filter: saturate(.5); }
.ch-kho-ten { display: block; margin-top: 3px; font: 700 .72rem/1.15 var(--f-than); text-shadow: 0 1px 6px #000, 0 0 10px rgb(0 0 0 / .8); }
.ch-kho-dem { font-size: .66rem; color: rgb(255 247 240 / .7); text-shadow: 0 1px 6px #000; }
.ch-kho.mo .ch-kho-ten { color: #ffe9b8; }

.ch-goiy { margin: 10px 4px 24px; text-align: center; font-size: .86rem; color: var(--mo); }
.ch-goiy[hidden] { display: none; }

/* ngăn kéo xổ ra dưới cảnh: tên kho + thẻ món */
.ch-kho-mo { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .55s cubic-bezier(.3, 1, .4, 1); scroll-margin-top: 92px; }
.ch-kho-mo.mo { grid-template-rows: 1fr; }
.ch-kho-trong { min-height: 0; overflow: hidden; border-radius: 22px; background: linear-gradient(#1d1830, #130d22); }
.ch-kho-mo.mo .ch-kho-trong { box-shadow: 0 0 0 1px color-mix(in srgb, var(--mau) 55%, transparent), 0 0 26px color-mix(in srgb, var(--mau) 24%, transparent); margin-bottom: 40px; }
.ch-kho-dau { display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 12px; padding: 12px 14px 8px; }
.ch-kho-cuabt { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--mau) 60%, #fff) 0, var(--mau) 45%, #150d22 100%); box-shadow: 0 0 0 2px #0a0712, 0 0 0 3px rgb(255 226 196 / .3); }
.ch-kho-cuabt svg.bt { width: 56%; height: 56%; fill: none; stroke: rgb(24 12 40 / .85); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ch-kho-chu { display: grid; gap: 1px; min-width: 0; }
.ch-kho-so { font: 700 .66rem/1 var(--f-than); letter-spacing: .22em; color: var(--mau); }
.ch-kho-tenmo { font: 800 1.12rem/1.2 var(--f-tieu-de); }
.ch-kho-demmo { font-size: .82rem; color: var(--mo); }
.ch-kho-dong { width: 44px; height: 44px; border-radius: 50%; color: var(--chu); background: rgb(255 226 196 / .1); font-size: 1rem; }
.ch-kho-luoi { padding: 6px 14px 20px; }
.ch-kho-mo.mo .ch-the { animation: chBat .5s cubic-bezier(.3, 1.4, .5, 1) both; animation-delay: var(--tre, 0ms); }
@keyframes chBat { from { opacity: 0; transform: translateY(20px) scale(.9); } to { opacity: 1; transform: none; } }
@media (min-width: 700px) { .ch-kho { width: 120px; } .ch-th { width: 72px; height: 72px; } .ch-th-than { height: 50px; } .ch-kho-ten { font-size: .82rem; } .ch-kho-dem { font-size: .74rem; } }

/* ---- bộ lọc */
.ch-loc { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 6px 0 4px; }
.ch-nhomloc { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; }
.ch-nhomloc > b { flex: none; width: 4.6rem; font: 700 .7rem/1 var(--f-than); letter-spacing: .14em; text-transform: uppercase; color: var(--cam); }
.ch-c { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 10px; border-radius: 999px; font-size: .88rem; color: var(--mo); }
.ch-c i { width: 10px; height: 10px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, var(--mau, #bfa9c9) 55%, #2a1a14); opacity: .55; }
.ch-c[aria-pressed="true"] { color: #fff7f0; }
.ch-c[aria-pressed="true"] i { opacity: 1; box-shadow: 0 0 9px 2px var(--mau, #ffb46b); }
.ch-tim { display: flex; gap: 10px; align-items: end; padding-top: 6px; }
.ch-tim input { flex: 1; min-width: 0; height: 46px; padding: 0 4px; font-size: 1rem; color: var(--chu); background: none; border: 0; border-bottom: 1.5px solid rgb(255 226 196 / .35); border-radius: 0; }
.ch-tim input::placeholder { color: var(--mo); }
.ch-tim input:focus { outline: 0; border-bottom-color: var(--cam); }
.ch-tim select { height: 46px; font-size: .92rem; color: var(--chu); background: none; border: 0; border-bottom: 1.5px solid rgb(255 226 196 / .35); border-radius: 0; padding: 0 4px; }
.ch-tim select option { background: #1a1030; }
.ch-dem { margin: 6px 2px 0; font-size: .82rem; color: var(--mo); }

/* ---- lưới thẻ món */
/* (lưới thẻ đã đổi thành kệ nhiều tầng, xem khối cuối tệp) */
.ch-the { position: relative; display: block; text-align: left; padding: 0; transition: transform .25s cubic-bezier(.3, 1.5, .5, 1); }
.ch-the:active { transform: scale(.96); }
@media (hover: hover) { .ch-the:hover { transform: translateY(-4px); } }
.ch-anh { position: relative; aspect-ratio: 1; border-radius: 26px; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(circle at 50% 38%, color-mix(in srgb, var(--mau) 62%, #fff) 0, var(--mau) 46%, color-mix(in srgb, var(--mau) 45%, #150d22) 100%);
  box-shadow: 0 10px 22px rgb(0 0 0 / .35); }
.ch-anh img { width: 82%; height: 82%; object-fit: contain; filter: drop-shadow(0 6px 8px rgb(0 0 0 / .35)); }
.ch-anh svg.bt { width: 54%; height: 54%; fill: none; stroke: rgb(30 14 40 / .78); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 2px 0 rgb(255 255 255 / .35)); }
.ch-the[data-tt="chua_mo"] .ch-anh { filter: saturate(.55) brightness(.7); }
.ch-the[data-tt="trung_bay"] .ch-anh { filter: saturate(.8) brightness(.9); }
.ch-the .ch-dau { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; background: rgb(20 10 30 / .72); color: #ffe9b8; }
.ch-the .ch-dau svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ch-moi { position: absolute; left: 8px; top: 8px; padding: 3px 9px; border-radius: 999px; font: 700 .68rem/1 var(--f-than); color: #2a0f1a; background: #ffd27f; letter-spacing: .06em; }
.ch-ten { margin: 8px 2px 0; font: 600 .9rem/1.25 var(--f-than); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.5em; }
.ch-gia { margin: 2px 2px 0; font: 700 .95rem/1.2 var(--f-tieu-de); color: #ffe9b8; }
.ch-gia.phu { font: 500 .78rem/1.3 var(--f-than); color: var(--mo); }
.ch-rong { grid-column: 1 / -1; text-align: center; color: var(--mo); padding: 26px 0; }

/* ---- ngăn kéo chi tiết món */
.ch-ngankeo { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; background: rgb(8 4 16 / .62); }
.ch-ngankeo[hidden] { display: none; }
.ch-scrim { position: absolute; inset: 0; }
.ch-nk { position: relative; width: min(100%, 560px); max-height: 90vh; overflow: auto; padding: 18px 18px calc(22px + env(safe-area-inset-bottom, 0px)); border-radius: 30px 30px 0 0; background: linear-gradient(#2a1840, #170d27 60%); box-shadow: 0 -16px 50px rgb(0 0 0 / .6);
  animation: chTruot .32s cubic-bezier(.3, 1.2, .5, 1); }
.ch-nk .ch-anh { width: min(58vw, 240px); margin: 6px auto 12px; }
.ch-nk h2 { margin: 0; text-align: center; font: 800 1.3rem/1.2 var(--f-tieu-de); }
.ch-hiem { margin: 4px 0 0; text-align: center; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; color: var(--mau, #bfa9c9); }
.ch-nk p { margin: 10px 0 0; color: var(--mo); text-align: center; }
.ch-nk .ch-gia { text-align: center; font-size: 1.5rem; margin-top: 12px; }
.ch-lydo { margin: 12px auto 0; max-width: 420px; text-align: center; font-size: .92rem; color: #ffd9a8; }
.ch-hang { display: flex; gap: 12px; justify-content: center; margin-top: 14px; }
.ch-hang1 { margin-top: 18px; }
/* nút chính = hành tinh; "Để sau" cùng cỡ (luật cửa hàng) */
.ch-nut { flex: 1 1 0; max-width: 190px; min-height: 54px; padding: 0 18px; border-radius: 999px; font: 700 1rem/1 var(--f-than); transition: transform .2s cubic-bezier(.3, 1.6, .5, 1); }
.ch-nut:active { transform: scale(.94); }
.ch-nut.chinh { color: #2a1208; background: radial-gradient(circle at 34% 24%, #fff0d8, #ffb46b 46%, #e2792a 100%); box-shadow: 0 0 0 4px rgb(255 180 107 / .2), 0 8px 26px rgb(255 150 70 / .45), inset 0 -6px 10px rgb(150 60 10 / .3); }
.ch-nut.phu { color: var(--chu); background: rgb(255 226 196 / .1); text-decoration: none; }
.ch-nut[disabled] { opacity: .45; pointer-events: none; }
.ch-nut.tim { flex: none; width: 54px; max-width: none; padding: 0; font-size: 1.3rem; background: rgb(255 226 196 / .1); }
.ch-nut.tim[aria-pressed="true"] { color: #ff8fb5; box-shadow: 0 0 16px rgb(255 120 170 / .5); }

/* ---- hộp xác nhận mua */
.ch-hop { width: min(92vw, 420px); padding: 22px 20px; border: 0; border-radius: 28px; color: var(--chu); background: linear-gradient(#2a1840, #170d27); box-shadow: 0 24px 70px rgb(0 0 0 / .7); }
.ch-hop::backdrop { background: rgb(8 4 16 / .7); }
.ch-hop h2 { margin: 0 0 4px; text-align: center; font: 800 1.2rem/1.2 var(--f-tieu-de); }
.ch-hop .ch-anh { width: 120px; margin: 10px auto; }
.ch-hop .ch-so { text-align: center; font: 600 1.05rem/1.5 var(--f-than); color: #ffe9b8; }
.ch-hop .ch-khong { margin: 10px 0 0; text-align: center; font-weight: 800; color: #fff7f0; }
.ch-hop .ch-diu { margin: 8px 0 0; text-align: center; font-size: .88rem; color: var(--mo); }
.ch-hop ul { margin: 8px 0 0; padding: 0 0 0 1.1rem; color: var(--mo); font-size: .9rem; }

@keyframes chLap { 0%, 100% { opacity: .75; } 50% { opacity: 1; } }
@keyframes chKhoi { 0% { opacity: 0; transform: translateY(0) scale(.6); } 20% { opacity: .65; } 100% { opacity: 0; transform: translateY(-80px) scale(1.7); } }
@keyframes chTruot { from { transform: translateY(100%); } to { transform: none; } }
@keyframes chNhay { 0%, 100% { transform: none; } 30% { transform: scale(1.25); } }
@media (prefers-reduced-motion: reduce) { .ch-kho, .ch-th-nap, .ch-be, .ch-kho-mo, .ch-kho-mo.mo .ch-the, .ch-q[aria-pressed="true"] i, .ch-nk, .ch-vi.nhay { animation: none; } .ch-the { transition: none; } }

/* Món ước (Task 6) */
.ch-uoc-nut { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 999px; color: var(--chu); background: rgb(255 226 196 / .1); font: 700 .95rem/1 var(--f-than); }
.ch-uoc-nut span { color: #ff8fb5; font-size: 1.15rem; }
.ch-uoc-nut[data-n="0"] b { opacity: .55; }
.ch-nk > h2 { margin-bottom: 8px; }
.ch-uoc-ds { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.ch-uoc-muc { display: grid; grid-template-columns: 64px 1fr 44px; gap: 12px; align-items: center; padding: 10px; border-radius: 20px; background: rgb(255 226 196 / .07); }
.ch-uoc-muc .ch-anh { width: 64px; margin: 0; }
.ch-uoc-ten { display: block; max-width: 100%; text-align: left; font: 700 1rem/1.25 var(--f-tieu-de); color: var(--chu); }
.ch-tiendo { height: 8px; margin: 8px 0 6px; border-radius: 99px; background: rgb(255 226 196 / .14); overflow: hidden; }
.ch-tiendo i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #ffb46b, #ffe9b8); }
.ch-uoc-chu { margin: 0 !important; text-align: left !important; font-size: .86rem; }
.ch-uoc-bo { width: 44px; height: 44px; border-radius: 50%; font-size: 1.3rem; color: #ff8fb5; background: rgb(255 226 196 / .08); }
.ch-uoc-rong { margin: 18px 6px !important; }

/* Phòng Thử Sau Rèm (Task 7) */
.ch-vao-phong { display: block; width: calc(100% - 28px); max-width: 520px; margin: 14px auto 0; min-height: 56px; border-radius: 999px; font: 800 1.05rem/1 var(--f-than); color: #2a1208; background: radial-gradient(circle at 34% 24%, #ffd9e8, #ff8fb5 50%, #c8467a 100%); box-shadow: 0 0 0 4px rgb(255 143 181 / .2), 0 8px 26px rgb(255 100 150 / .4); }
.ch-vao-phong:active { transform: scale(.97); }
body.ch-trong-phong { overflow: hidden; }
.ch-phong { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; background: radial-gradient(120% 70% at 50% 30%, #3a1d52, #0a0712 75%); color: var(--chu); }
.ch-phong[hidden] { display: none; }
.ch-rem { position: absolute; top: 0; bottom: 0; width: 51%; z-index: 8; pointer-events: none; transition: transform 1.1s cubic-bezier(.6, 0, .2, 1);
  background: repeating-linear-gradient(90deg, #4d0f2b 0 16px, #7a1a40 16px 30px, #5e1432 30px 44px); box-shadow: inset 0 -30px 40px rgb(0 0 0 / .5); }
.ch-rem.trai { left: 0; } .ch-rem.phai { right: 0; }
.ch-phong.mo .ch-rem.trai { transform: translateX(-100%); } .ch-phong.mo .ch-rem.phai { transform: translateX(100%); }
.ch-phong-dau { position: relative; z-index: 9; display: flex; align-items: center; gap: 10px; padding: 10px 14px calc(6px + env(safe-area-inset-top, 0px)); }
.ch-phong-dau h2 { margin: 0; font: 800 1.05rem/1.2 var(--f-tieu-de); }
.ch-ra { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 14px 0 8px; border-radius: 999px; color: var(--chu); background: rgb(255 226 196 / .1); font: 700 .92rem/1 var(--f-than); }
.ch-ra svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ch-san3d { position: relative; flex: 1 1 0; min-height: 210px; }
.ch-nv3d { position: absolute; inset: 0; }
/* hàng nút chọn dáng nhân vật: điện thoại nằm TRÊN ĐẦU sân 3D (vuốt ngang, không đè chân nhân vật và Lão Kính); từ 900 px xếp dọc sát mép trái */
.ch-dang { position: absolute; left: 0; right: 0; top: 0; z-index: 6; display: flex; gap: 6px; overflow-x: auto; padding: 4px 14px; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 26px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 26px), transparent); }
.ch-dang[hidden] { display: none; }
.ch-dang::-webkit-scrollbar { display: none; }
.ch-dang-nut { flex: none; min-height: 44px; padding: 0 14px; border-radius: 999px; color: var(--chu); background: rgb(20 10 34 / .62); box-shadow: inset 0 0 0 1px rgb(255 226 196 / .2); font: 700 .84rem/1 var(--f-than); white-space: nowrap; }
.ch-dang-nut[aria-pressed="true"] { color: #2a1208; background: #ffb46b; box-shadow: none; }
@media (min-width: 900px) { .ch-dang { right: auto; left: 14px; top: 16px; flex-direction: column; align-items: flex-start; overflow: visible; padding: 0; -webkit-mask-image: none; mask-image: none; } }
.ch-tai3d[hidden] { display: none; }
.ch-tai3d { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; color: var(--mo); }
.ch-phong-lao { position: absolute; right: 4px; bottom: 0; width: min(30vw, 120px); z-index: 7; }
.ch-phong-lao .ch-lao { position: static; width: 100%; }
.ch-phong-lao .nv-bong { max-width: min(62vw, 240px); font-size: .86rem; }
.ch-thu-luu { margin: 0; padding: 4px 16px 8px; text-align: center; font-size: .8rem; color: var(--mo); }
.ch-phong-duoi { flex: 0 1 auto; max-height: 56vh; overflow: auto; padding: 8px 14px calc(14px + env(safe-area-inset-bottom, 0px)); border-radius: 26px 26px 0 0; background: linear-gradient(#2a1840, #170d27 70%); box-shadow: 0 -12px 40px rgb(0 0 0 / .5); }
.ch-dang-thu { display: flex; gap: 8px; min-height: 8px; overflow-x: auto; padding-bottom: 4px; }
.ch-thu-o { flex: none; white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; border-radius: 999px; background: rgb(255 226 196 / .12); font-size: .86rem; }
.ch-thu-o .gia { color: #ffe9b8; font-weight: 700; }
.ch-thao { width: 32px; height: 32px; border-radius: 50%; color: var(--chu); background: rgb(255 226 196 / .12); }
.ch-thu-nhan, .ch-thu-diu { margin: 8px 2px 0; font-size: .84rem; color: #ffd9a8; }
.ch-thu-tab { display: flex; gap: 6px; overflow-x: auto; padding: 10px 0 4px; }
.ch-tab { flex: none; min-height: 40px; padding: 0 14px; border-radius: 999px; color: var(--chu); background: rgb(255 226 196 / .08); font: 700 .88rem/1 var(--f-than); }
.ch-tab[aria-selected="true"] { color: #2a1208; background: #ffb46b; }
.ch-tab small { margin-left: 6px; font-size: .74rem; font-weight: 600; opacity: .7; }
/* lưới HÌNH món trong phòng thử (cô Ari 10/10/2026): ô vuông hình + tên + giá / trạng thái; cuộn trong bảng dưới, không che nhân vật */
/* điện thoại: MỘT hàng hình vuốt ngang (bảng dưới thấp, không che nhân vật); từ 900 px: lưới nhiều hàng cuộn riêng, nút Mua cả bộ luôn thấy */
.ch-thu-chon { display: grid; grid-auto-flow: column; grid-auto-columns: 104px; gap: 8px; padding: 4px 0 8px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; align-items: start; }
.ch-chon-o { scroll-snap-align: start; }
.ch-chon-o { display: grid; gap: 4px; align-content: start; min-width: 0; }
.ch-chon { display: grid; gap: 3px; min-width: 0; padding: 6px 6px 8px; border-radius: 16px; text-align: center; color: var(--chu); background: rgb(255 226 196 / .08); }
.ch-chon .h { display: grid; place-items: center; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: radial-gradient(circle at 50% 38%, rgb(255 226 196 / .16), rgb(255 226 196 / .04) 72%); }
.ch-chon .h img { width: 100%; height: 100%; object-fit: contain; display: block; }
.ch-chon .h svg { width: 46%; height: 46%; }
.ch-chon .h.khong { padding: 6px; background: rgb(255 226 196 / .06); box-shadow: inset 0 0 0 1px rgb(255 226 196 / .16); }
.ch-chon .ht { font-size: .78rem; font-weight: 700; line-height: 1.35; padding-top: 2px; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.ch-chon .t { font-size: .78rem; font-weight: 700; line-height: 1.35; min-height: 2.7em; padding-top: 2px; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ch-chon .g { font-size: .76rem; font-weight: 700; color: #ffe9b8; }
.ch-chon .g.co { color: #a8f0c6; } .ch-chon .g.thieu { color: #ffc9a3; } .ch-chon .g.khoa, .ch-chon .g.trung { color: var(--mo); font-weight: 600; }
.ch-chon-o[data-tt="chua_mo"] .h img, .ch-chon-o[data-tt="trung_bay"] .h img { opacity: .72; }
.ch-chon[aria-pressed="true"] { box-shadow: inset 0 0 0 2px #ffb46b; background: rgb(255 180 107 / .16); }
.ch-chon-mua { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 8px; border-radius: 999px; font: 800 .82rem/1.1 var(--f-than); color: #2a1208; background: linear-gradient(#ffd08a, #ffa95c); text-decoration: none; text-align: center; }
@media (hover: hover) { .ch-chon:hover { background: rgb(255 226 196 / .14); } }
@media (min-width: 900px) { .ch-thu-chon { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); overflow: hidden auto; scroll-snap-type: none; flex: 1 1 0; min-height: 180px; padding-right: 4px; } .ch-phong-duoi { display: flex; flex-direction: column; overflow: hidden; } .ch-phong-duoi > * { flex: none; } .ch-phong-duoi > .ch-thu-chon { flex: 1 1 0; } }
.ch-thu-tong { margin: 4px 2px 0; font-weight: 700; color: #ffe9b8; }
.ch-phong-duoi .ch-hang { margin-top: 10px; }
.ch-bo-ds { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ch-bo { display: inline-flex; border-radius: 999px; background: rgb(255 226 196 / .1); overflow: hidden; }
.ch-bo-mo { min-height: 40px; padding: 0 6px 0 14px; color: var(--chu); font: 700 .84rem/1 var(--f-than); }
.ch-bo-xoa { width: 40px; color: var(--mo); }
@media (prefers-reduced-motion: reduce) { .ch-rem { transition: none; } }
@media (min-width: 900px) { .ch-dang-thu { flex-wrap: wrap; overflow: visible; } .ch-thu-o { flex: none; } .ch-phong { display: grid; grid-template-columns: minmax(0, 1fr) min(460px, 40vw); grid-template-rows: auto minmax(0, 1fr); } .ch-phong-dau { grid-column: 1 / -1; } .ch-san3d { min-height: 0; } .ch-thu-luu { display: none; } .ch-phong-duoi { max-height: none; border-radius: 26px 0 0 0; } }

/* bộ lọc gọn: ô tìm + sắp xếp luôn hiện, chip lọc nằm sau một nút bấm để dãy kho lên ngay dưới cảnh */
.ch-loc-nut { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 44px; padding: 0 4px; color: var(--mo); font-size: .88rem; text-align: left; }
.ch-loc-nut::after { content: "▾"; margin-left: auto; transition: transform .25s; }
.ch-loc-nut[aria-expanded="true"]::after { transform: rotate(180deg); }
.ch-loc-nut b { font-weight: 700; color: var(--cam); }
.ch-loc-chip { display: grid; gap: 4px; padding-bottom: 6px; }
.ch-loc-chip[hidden] { display: none; }

/* mép cảnh mờ dần vào nền trang (không lộ khung hình chữ nhật trên màn hình rộng) */
.ch-canh { -webkit-mask: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); mask: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); }

.ch-vi-dn { color: #1a0f22; font: 700 .9rem/1 var(--f-than); text-decoration: none; padding: 10px 14px; border-radius: 999px; background: linear-gradient(#ffe9d2, #ffb46b); }
a.ch-nut { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.ch-xemthu a, .ch-thu-diu a { color: #ffd9a8; }

/* ô chạm tối thiểu 44px (luật dự án) và giảm chuyển động đủ: tắt cả chuyển tiếp, không chỉ hoạt hình */
.ch-c, .ch-tab, .ch-bo-mo, .ch-bo-xoa, .ch-vi-dn, .ch-uoc-ten { min-height: 44px; }
.ch-thao { width: 44px; height: 44px; }
.ch-bo-xoa { min-width: 44px; }
.ch-vi-dn { display: inline-flex; align-items: center; }
@media (prefers-reduced-motion: reduce) { .ch-kho-mo, .ch-th, .ch-th-nap, .ch-nut, .ch-loc-nut::after, .ch-kho-mo.mo .ch-the { transition: none !important; animation: none !important; } }

/* ======== KHO NGOÀI VŨ TRỤ (cô Ari 05/10 tối) ======== */
/* tường kho phía sau: tấm panel đứng, dầm trần có đèn, sàn lưới thoai thoải; sao vẫn lộ qua các khe */
.ch-canh::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    linear-gradient(180deg, rgb(255 226 196 / .09) 0 2px, transparent 2px 100%) 0 0 / 100% 46px no-repeat,
    radial-gradient(circle at 50% 100%, rgb(255 214 150 / .9) 0 2px, transparent 3px) 0 15px / 96px 46px repeat-x,
    repeating-linear-gradient(90deg, transparent 0 94px, rgb(255 226 196 / .07) 94px 96px),
    linear-gradient(rgb(30 20 52 / .5), rgb(14 8 26 / .15) 60%, transparent); }
.ch-canh::after { content: ""; position: absolute; left: -10%; right: -10%; bottom: 0; height: 34%; z-index: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgb(255 190 130 / .16) 0 1px, transparent 1px 26px), repeating-linear-gradient(90deg, rgb(255 190 130 / .14) 0 1px, transparent 1px 40px);
  transform: perspective(260px) rotateX(58deg); transform-origin: 50% 100%;
  -webkit-mask: linear-gradient(to top, #000, transparent 92%); mask: linear-gradient(to top, #000, transparent 92%); }


/* ---- kệ nhiều tầng: tấm lưng lỗ treo, hai trụ vằn vàng đen như hộp hàng, mỗi tầng một tấm ván có dải đèn màu kho */
.ch-kho-trong { position: relative; }
.ch-kho-trong::before { content: ""; display: block; height: 7px; background: repeating-linear-gradient(-45deg, #ffcf3a 0 8px, #2a2433 8px 16px); opacity: .85; }
.ch-kho-luoi { display: block; position: relative; margin: 4px 8px 12px; padding: 14px 18px 8px; border-radius: 12px;
  background: radial-gradient(circle at 1px 1px, rgb(255 226 196 / .09) 1px, transparent 1.5px) 0 0 / 14px 14px, linear-gradient(#171128, #0d0818);
  box-shadow: inset 0 0 0 1px rgb(255 226 196 / .08), inset 0 12px 26px rgb(0 0 0 / .45); }
.ch-kho-luoi::before, .ch-kho-luoi::after { content: ""; position: absolute; top: 0; bottom: 0; width: 9px; opacity: .85;
  background: repeating-linear-gradient(-45deg, #ffcf3a 0 5px, #2a2433 5px 10px); box-shadow: inset 0 0 0 1px rgb(0 0 0 / .4); }
.ch-kho-luoi::before { left: 0; border-radius: 12px 0 0 12px; }
.ch-kho-luoi::after { right: 0; border-radius: 0 12px 12px 0; }
.ch-ke-tang { --g: 10px; position: relative; container-type: inline-size; display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 0 var(--g); align-items: start; margin-bottom: 16px; }
.ch-ke-tang::after { content: ""; position: absolute; left: -12px; right: -12px; z-index: 2; pointer-events: none; height: 10px; border-radius: 2px;
  top: calc((100cqw - (var(--n, 3) - 1) * var(--g)) / var(--n, 3) * .82 - 1px);
  background: linear-gradient(#6b5a86 0, #46386000 0), linear-gradient(#5d4c78 0, #3a2d4d 45%, #1c1430 100%); border-bottom: 2px solid color-mix(in srgb, var(--mau, #ffb46b) 85%, #fff);
  box-shadow: 0 7px 12px -4px color-mix(in srgb, var(--mau, #ffb46b) 65%, transparent), 0 -1px 0 rgb(255 255 255 / .16); }
.ch-ke-tang .ch-the { display: flex; flex-direction: column; min-width: 0; z-index: 1; }
.ch-ke-tang .ch-anh { width: 82%; margin: 0 auto; border-radius: 12px; box-shadow: inset 0 -6px 8px rgb(0 0 0 / .22), 0 2px 3px rgb(0 0 0 / .4); }
.ch-ke-tang .ch-dau { top: 4px; right: 4px; width: 20px; height: 20px; }
.ch-ke-tang .ch-dau svg { width: 12px; height: 12px; }
.ch-ke-tang .ch-moi { left: 4px; top: 4px; padding: 2px 6px; font-size: .56rem; }
.ch-ke-tang .ch-ten { margin: 16px 1px 0; font-size: .7rem; line-height: 1.2; min-height: 2.4em; text-align: center; }
.ch-ke-tang .ch-gia { margin: 3px 1px 0; font-size: .76rem; text-align: center; }
.ch-ke-tang .ch-gia.phu { font-size: .66rem; }
.ch-chan { display: block; height: 1px; }
@media (min-width: 820px) { .ch-ke-tang .ch-ten { font-size: .76rem; } .ch-ke-tang .ch-gia { font-size: .82rem; } }

/* ---- sửa theo rà soát web thật 05/10 tối (điện thoại 390) */
.ch-bar { background: rgb(10 7 18 / .94); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.ch-vi a { white-space: nowrap; }
/* màn hẹp (rà UI 11/10): nút "Quay về" không xuống hai dòng, cả thanh vẫn vừa 390; dưới 360 mới cho xuống dòng */
@media (max-width: 430px) { .ch-bar { gap: 6px; padding-left: 10px; padding-right: 10px; } .ch-ve { padding: 0 12px 0 8px; } .ch-vi { padding: 10px 4px; } }
@media (max-width: 379px) { .ch-ve { white-space: normal; flex: 0 1 auto; font-size: .85rem; } .ch-vi-dn { padding: 10px 9px; font-size: .82rem; } .ch-bar { gap: 4px; padding-left: 6px; padding-right: 6px; } .ch-bar .ch-uoc-nut { padding-left: 8px; padding-right: 8px; } }
.ch-lao .nv-bong { max-width: min(40vw, 170px); }
.ch-vi-dn { white-space: nowrap; }
.ch-xemthu a { display: inline-block; padding: 14px 4px; margin: -14px 0; }

/* ---- Lão Kính chạy lại, đồ tập chạm được (cô Ari 06/10) */
.ch-bang { pointer-events: auto; cursor: pointer; }
.ch-vi { cursor: default; }
.ch-lao .nv-bong.duoi { bottom: auto; top: calc(100% - 6px); }
.ch-lao .nv-bong.duoi::after { bottom: auto; top: -8px; }
.ch-canh .ch-lao { will-change: translate, scale; }

/* ---- thùng hàng do ChatGPT vẽ (cô Ari 06/10): hình thật thay thùng CSS; thiếu hình thì vẫn dùng thùng CSS */
.ch-th-anh { position: absolute; left: 50%; bottom: -4px; width: 84px; height: 84px; translate: -50% 0; object-fit: contain; pointer-events: none; z-index: 3;
  filter: drop-shadow(0 8px 7px rgb(0 0 0 / .55)); transition: filter .3s, scale .3s cubic-bezier(.3, 1.6, .5, 1); }
.ch-th.co-hinh { width: 84px; height: 66px; }
.ch-th.co-hinh .ch-th-nap, .ch-th.co-hinh .ch-th-than, .ch-th.co-hinh .ch-th-tia { visibility: hidden; }
.ch-th.co-hinh .ch-th-bong { bottom: -8px; left: 6%; right: 6%; }
@media (hover: hover) { .ch-kho:hover .ch-th-anh { scale: 1.07; } }
.ch-kho.mo .ch-th-anh { scale: 1.1; filter: drop-shadow(0 0 14px color-mix(in srgb, var(--mau) 85%, transparent)) drop-shadow(0 8px 7px rgb(0 0 0 / .55)) brightness(1.12); }
.ch-kho.trong .ch-th-anh { filter: saturate(.55) brightness(.8) drop-shadow(0 8px 7px rgb(0 0 0 / .5)); }
@media (min-width: 700px) { .ch-th-anh { width: 120px; height: 120px; } .ch-th.co-hinh { width: 120px; height: 92px; } }

/* ---- nền là bên trong con tàu lang bạc của ông chuyên thu gom vật phẩm vũ trụ (cô Ari 06/10), ChatGPT vẽ; thay tường và sàn lưới vẽ bằng CSS ở trên */
.ch-canh::before { background: linear-gradient(rgb(10 6 20 / .22), rgb(10 6 20 / .08) 45%, rgb(10 6 20 / .3)), url('nen-tau/tau-doc.webp?v=07c4a99e') center bottom / cover no-repeat; }
.ch-canh::after { display: none; }
@media (min-width: 700px) { .ch-canh::before { background: linear-gradient(rgb(10 6 20 / .22), rgb(10 6 20 / .08) 45%, rgb(10 6 20 / .3)), url('nen-tau/tau-ngang.webp?v=07c4a99e') center bottom / cover no-repeat; } }


/* Tủ kính huy chương (Mùa 1, 06/10/2026): chỉ hiện khi mùa bật và đã đăng nhập; chưa có thì bóng mờ + dấu hỏi */
.ch-tu { display: flex; align-items: center; gap: 14px; margin: 8px auto 4px; padding: 10px 14px; max-width: 420px; border-radius: 16px;
  background: linear-gradient(160deg, rgba(160, 130, 210, .16), rgba(30, 18, 52, .5)); box-shadow: inset 0 0 0 1px rgba(255, 226, 196, .22), 0 6px 18px rgba(0, 0, 0, .3); }
.ch-tu[hidden] { display: none; }
.ch-tu-kinh { position: relative; flex: 0 0 64px; height: 64px; border-radius: 12px; background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18);
  display: grid; place-items: center; overflow: hidden; }
.ch-tu-kinh::after { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, rgba(255, 255, 255, .28), rgba(255, 255, 255, 0) 38%); pointer-events: none; }
.ch-tu-hc { width: 48px; height: 48px; filter: grayscale(1) brightness(.5) contrast(.9); opacity: .55; transition: filter .4s, opacity .4s; }
.ch-tu-hc svg { width: 100%; height: 100%; display: block; }
.ch-tu-dau { position: absolute; font: 800 1.5rem/1 var(--f-than, system-ui); color: rgba(255, 233, 210, .85); text-shadow: 0 0 8px rgba(0, 0, 0, .6); }
.ch-tu.co .ch-tu-dau { display: none; }
.ch-tu.co .ch-tu-hc { filter: drop-shadow(0 0 8px rgba(255, 214, 120, .65)); opacity: 1; }
.ch-tu-chu { margin: 0; font: 600 .9rem/1.4 var(--f-than, system-ui); color: #ffe9d2; }

/* ---- Jarvis, chú robot đầu to phụ việc cho ông chủ (cô Ari 06/10/2026: bỏ hết chuồn chuồn và bọ bay, thay bằng DUY NHẤT một con robot). Không thuộc hệ thống nhân vật.
   Lơ lửng cạnh Lão Kính; chạm vào thì hiện một câu chữ (không tiếng). */
.ch-jarvis { position: absolute; z-index: 6; left: 41%; bottom: 27%; width: min(24vw, 96px); animation: chJarvisTroi 5.8s ease-in-out infinite; }
.ch-jarvis .nvc { --nv-r: 100%; }
.ch-jarvis .nv-ten { margin-top: 0; padding: 1px 8px; font-size: .66rem; }
.ch-jarvis .nv-bong { left: auto; right: -6%; transform: translate(0, 8px) scale(.92); width: max-content; max-width: min(62vw, 230px); font-size: .86rem; padding: 8px 13px; }
.ch-jarvis .nv-bong.hien { transform: translate(0, 0) scale(1); }
.ch-jarvis .nv-bong::after { left: auto; right: 30px; transform: rotate(45deg); }
/* cô Ari 07/10/2026: "Jarvis che chatbox của ông Kính": lời của Lão LUÔN nằm trên Jarvis (z-index của khung Lão 8 > Jarvis 6) và khi Lão đang nói thì bong bóng của Jarvis tạm ẩn, nhường chỗ */
.ch-canh:has(.ch-lao .nv-bong.hien) .ch-jarvis .nv-bong { opacity: 0; visibility: hidden; transition: none; }
@keyframes chJarvisTroi { 0%, 100% { translate: 0 0; rotate: -2deg; } 50% { translate: 5px -10px; rotate: 2deg; } }
@media (prefers-reduced-motion: reduce) { .ch-jarvis { animation: none; } }

.ch-nguon { margin: 18px 12px 28px; text-align: center; font-size: .68rem; line-height: 1.4; color: rgb(255 233 210 / .55); }
.ch-ghinguon { margin: 4px 0 0; font-size: .68rem; line-height: 1.35; opacity: .6; }
.ch-ghinguon a { color: inherit; text-decoration: underline; padding: 6px 0; }
.ch-nguon a { color: inherit; text-decoration: underline; padding: 10px 2px; }

/* Lão Kính 3D (lao-3d.js): canvas trong suốt phủ khung ông, hình 2D ẩn khi mô hình sẵn sàng (lỗi / máy yếu thì lớp .co-3d không có và vẫn thấy hình 2D) */
.nvc .lao-3d { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; display: block; }
.nvc.co-3d .nv-than { visibility: hidden; }
/* chờ 3D: không hiện hình 2D (khỏi nháy hai bản), chỉ một quầng sáng nhẹ; 3D xong mờ dần lên */
.ch-lao .nvc.cho-3d .nv-than { visibility: hidden; }
.ch-lao .nvc.cho-3d::before { content: ""; position: absolute; left: 18%; right: 18%; top: 22%; bottom: 8%; border-radius: 50%; background: radial-gradient(ellipse at center, rgb(255 210 150 / .22), rgb(255 210 150 / 0) 70%); animation: choLao 1.6s ease-in-out infinite; pointer-events: none; }
@keyframes choLao { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
.nvc .lao-3d { opacity: 0; transition: opacity .45s ease; }
.nvc.co-3d .lao-3d { opacity: 1; }
/* Lão 3D di chuyển mượt (cô Ari 06/10: "bị lỗi khi di chuyển qua lại bị mất khung hình"): bóng đổ bằng filter trên lớp chứa canvas WebGL buộc vẽ lại cả lớp mỗi khung hình khi ông chạy (rớt khung). Bỏ filter khi có 3D;
   canvas có sẵn ánh sáng, và một đĩa bóng nhẹ dưới chân thay cho bóng đổ. */
.ch-lao .nvc.co-3d { filter: none; }
.ch-lao .nvc.co-3d::after { content: ""; position: absolute; left: 22%; right: 22%; bottom: 2%; height: 9%; border-radius: 50%; background: radial-gradient(ellipse at center, rgb(0 0 0 / .42), rgb(0 0 0 / 0) 70%); pointer-events: none; z-index: 0; }
.ch-lao .nvc.co-3d .lao-3d { will-change: transform; }

/* nút hình bong bóng chat "Kể chuyện đi ông" (cô Ari 07/10/2026): cạnh Lão Kính, không che ông / bong bóng lời / Jarvis */
.ch-ke-chuyen { position: absolute; z-index: 9; left: calc(50% + clamp(58px, 8vw, 104px)); bottom: 1.5%; min-height: 44px; min-width: 44px; max-width: 150px; padding: 8px 14px; border: 0; border-radius: 20px 20px 20px 6px;
  background: rgb(255 247 240 / .96); color: #2a1830; font: 700 .82rem/1.2 var(--f-than, system-ui); text-align: center; cursor: pointer; box-shadow: 0 6px 18px rgb(0 0 0 / .45), 0 0 0 2px rgb(255 180 107 / .55); -webkit-tap-highlight-color: transparent; }
.ch-ke-dai { bottom: calc(1.5% + 54px); border-radius: 20px 20px 6px 20px; font-size: .76rem; background: rgb(42 24 48 / .92); color: #ffe2c4; }
.ch-ke-chuyen:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.ch-ke-chuyen:active { scale: .95; }
.ch-ke-chuyen.dang { background: #ffe2c4; box-shadow: 0 6px 18px rgb(0 0 0 / .45), 0 0 0 3px #ffb46b; }
@media (prefers-reduced-motion: reduce) { .ch-ke-chuyen:active { scale: 1; } }
/* điện thoại (11/10 trưa): hai nút kể chuyện che tên "Tủ Kính Di Sản" / "Hàng Lạ Ngoài Chợ" => xuống dải trống sát đáy cảnh, một dòng, hai bên Lão */
@media (max-width: 599px) {
  .ch-ke-chuyen { bottom: 4px; left: auto; right: 6px; max-width: none; padding: 6px 11px; font-size: .74rem; white-space: nowrap; }
  .ch-ke-dai { left: 6px; right: auto; font-size: .72rem; }
}
/* chuyện dài chia 2 phần (11/10 tối): lời mời cuối phần 1 nằm trong khung trình kể chuyện; nút chọn phần 2 ẩn tới khi nghe xong phần 1 */
.kc .kc-chip[hidden], .ch-cd-moi[hidden], .ch-cd-hang[hidden] { display: none; }
.ch-cd-moi { margin-top: 12px; padding: 12px 14px; border-radius: 18px; background: rgb(255 226 196 / .1); border: 1px solid rgb(255 226 196 / .28); }
.ch-cd-moi p { margin: 0; font-size: 14.5px; line-height: 1.45; color: #fff7f0; }
.ch-cd-hang { display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; margin-top: 10px; }
.kc .kc-nut.ch-cd-tiep { background: linear-gradient(180deg, #ffe9d2, #ffb46b); border-color: transparent; color: #1a0f22; }
/* nhãn kỷ niệm (món của mùa đã đóng mà mình đang có): thay cho chữ "Đã có" */
.ch-gia.phu.ch-ky-niem { color: #ffd9ae; font-weight: 600; }
/* giữ chỗ trước cho thứ hiện sau (12/10, CLS điện thoại 0,12 về dưới 0,05): ví chờ máy chủ trả lời mới hiện, nút Đăng nhập không làm thanh đầu cao thêm, bộ lọc và nút Vào Phòng Thử có sẵn chỗ */
.ch-vi.cho { visibility: hidden; }
.ch-vi.khach { padding-top: 0; padding-bottom: 0; }
.ch-cho-phong { display: flow-root; min-height: 70px; }
.ch-loc { min-height: 140px; }
