/* tram-vutru.css: trang trạm kiểu vũ trụ (làm lại trang Công cụ, 04/10/2026). Nạp SAU tools.css và vutru.css, chỉ khi TRANG_TONG = "vutru".
   Cách làm: tools.css vốn viết cho nền TỐI, rồi đợt 2 (26/09) khoác bộ SÁNG (khối "LỚP SÁNG"). Ở đây đổi bảng biến sang cam kem trên nền vũ trụ
   và ghi đè lại từng chỗ khoác sáng. Mã JS của từng công cụ dùng tên biến cũ (--accent, --text-primary…) nên GIỮ tên, đổi giá trị.
   GĐ1 làm kỹ cho 4 trạm mẫu (Nhịp thở, Nghỉ một chút, Đồng hồ thiền, Uống nước) và phần khung chung; các trạm còn lại làm ở GĐ2. */

:root {
  color-scheme: dark;
  /* token chung của khuôn (ari-tokens.css) đảo sang tối */
  --c-bg: #150d22; --c-bg-raise: #1b1229; --c-bg-sunk: #0a0712;
  --c-text: #fff7f0; --c-text-2: rgb(255 247 240 / .78); --c-text-3: rgb(255 247 240 / .6);
  --c-text-accent: #ffcf9f; --c-text-accent-sm: #ffd9b0; --c-text-on-brand: #1a0f22;
  --c-brand: #ffb46b; --c-brand-hover: #ffc88f; --c-brand-soft: rgb(255 180 107 / .18);
  --c-line: rgb(255 226 196 / .16); --c-line-soft: rgb(255 226 196 / .09); --c-line-strong: rgb(255 226 196 / .38);
  --c-focus: #ffb46b; --c-selection: rgb(255 180 107 / .35);
  --glass-thin-bg: rgb(21 13 34 / .55); --glass-thick-bg: rgb(21 13 34 / .88);
  --glass-edge: rgb(255 226 196 / .2);
  --sh-1: 0 4px 14px -6px rgb(0 0 0 / .5); --sh-2: 0 14px 34px -16px rgb(0 0 0 / .6);
  --sh-glow: 0 0 0 4px rgb(255 180 107 / .18), 0 10px 34px -8px rgb(255 180 107 / .5);
  /* biến cũ của tools.css */
  --canvas: transparent;
  --panel: rgb(21 13 34 / .55); --panel-2: rgb(255 226 196 / .06);
  --accent: #ffb46b; --accent-hover: #ffc88f; --accent-muted: #b98a5e;
  --accent-ink: #ffcf9f; --accent-ink-dam: #ffb46b;
  --text-secondary: rgb(255 247 240 / .78); --text-primary: #fff7f0; --chu-mo: rgb(255 247 240 / .62);
  --line: rgb(255 226 196 / .16); --vien-o: rgb(255 226 196 / .42);
  --danger: #ff9a8a; --ok: #8fe0b3;
  --nen-nut-am: rgb(10 7 18 / .72); --bg: #150d22;
  --kinh-nen: rgb(21 13 34 / .55); --kinh-vien: rgb(255 226 196 / .2); --kinh-vien-hong: rgb(255 180 107 / .5);
  --kinh-bong: 0 18px 40px -20px rgb(0 0 0 / .7), inset 0 0 0 1px rgb(255 226 196 / .04);
  --kinh-bong-noi: 0 0 0 1px rgb(255 180 107 / .25), 0 18px 44px -20px rgb(0 0 0 / .7), inset 0 0 36px -20px rgb(255 180 107 / .35);
}
html, body { background-color: var(--nen-4); }
body { color: var(--chu); }
::placeholder { color: rgb(255 247 240 / .45); opacity: 1; }

/* khung trang */
main { position: relative; z-index: 1; padding-top: calc(78px + env(safe-area-inset-top)); }
.wrap { padding-bottom: clamp(30px, 6vh, 60px); }
.vt-chan { position: relative; z-index: 1; padding: 0 20px calc(26px + env(safe-area-inset-bottom)); text-align: center; }
.vt-chan .disc { max-width: 64ch; margin: 0 auto; font-size: 12px; line-height: 1.6; color: var(--chu-nhat); }
:where(main) a { color: var(--accent-ink); }
.skip { background: var(--chu); color: #1a0f22; }
:focus-visible { outline-color: var(--nhan); }

/* đầu trang trạm */
.thero h1 { font-family: var(--f-hien); font-weight: 600; font-size: clamp(1.9rem, 4vw + .8rem, 3.2rem); letter-spacing: -.012em; text-shadow: 0 1px 8px rgb(0 0 0 / .45); }
.thero .kick { color: var(--nhan); font: 600 12px/1.2 var(--f-doc); letter-spacing: .14em; text-transform: uppercase; }
.thero .lede { color: var(--chu-mo); font-size: 1.02rem; }

/* huy hiệu điểm của trạm (diem-tram.js điền chữ) */
.dt { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 16px 0 2px; padding: 10px 14px; border-radius: 20px;
  border: 1px solid rgb(255 180 107 / .38); background: rgb(255 180 107 / .08); max-width: 560px; }
.dt[hidden] { display: none; }
.dt-diem { font: 700 15px/1.2 var(--f-hien); color: var(--nhan); white-space: nowrap; }
.dt-moc { flex: 1 1 170px; font-size: 13.5px; line-height: 1.4; color: var(--chu-mo); }
.dt-tt { padding: 3px 11px; border-radius: 99px; font: 600 12.5px/1.5 var(--f-doc); border: 1px solid rgb(255 226 196 / .35); color: var(--chu); white-space: nowrap; }
.dt-tt.chua { color: var(--chu-mo); }
.dt-tt.dang { border-color: var(--nhan); color: var(--nhan); }
.dt-tt.dat { background: linear-gradient(180deg, #ffe9d2, #ffb46b); border-color: transparent; color: #1a0f22; }
.dt-tt.canh { border-color: rgb(255 154 138 / .6); color: #ffb9ac; white-space: normal; }
.dt.khong { background: none; border-color: var(--duong); padding: 6px 12px; }
.dt-tt.khong { border: 0; padding: 0; color: var(--chu-nhat); font-weight: 500; }
.dt-thanh { flex: 1 0 100%; height: 6px; border-radius: 6px; background: rgb(255 226 196 / .14); overflow: hidden; }
.dt-thanh[hidden] { display: none; }
.dt-thanh i { display: block; height: 100%; width: 0; border-radius: 6px; background: linear-gradient(90deg, #ffe9d2, #ffb46b); transition: width .6s linear; }

/* thẻ kính + ô nhập + chip + nút (đảo lớp sáng) */
.card, .tdkhoi, .cmt3d-ben, .mecard { background: var(--kinh-nen); border-color: var(--kinh-vien); box-shadow: var(--kinh-bong); }
.card { -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
body.bpm-full .card, body.bpm-full .bpm-card { -webkit-backdrop-filter: none; backdrop-filter: none; }
input[type=text], input[type=number], input[type=time], input[type=date], input[type=email], input[type=search], input[type=tel], input[type=url], select, textarea, .inline-form input {
  background-color: rgb(10 7 18 / .55); border-color: var(--vien-o); color: var(--chu); box-shadow: none; }
input:focus, select:focus, textarea:focus { border-color: var(--nhan); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline-color: var(--nhan); }
select { background-image: linear-gradient(45deg, transparent 50%, var(--nhan) 50%), linear-gradient(135deg, var(--nhan) 50%, transparent 50%); }
.chip, .dots button, .beats i, .cal i, .formula, .meal, .tdm, .h3dkhung, .h3db { background-color: rgb(10 7 18 / .5); }
.chip, .dots button, .beats i { border-color: rgb(255 226 196 / .26); color: var(--text-secondary); }
.chip:hover { color: var(--chu); border-color: rgb(255 226 196 / .6); }
.chip[aria-pressed="true"], .dots button.on, .beats i.on, .h3db.on { background: linear-gradient(180deg, #ffe9d2, #ffb46b); color: #1a0f22; border-color: transparent; }
.btn { color: #1a0f22; background: linear-gradient(180deg, #ffe9d2, #ffb46b); box-shadow: 0 6px 22px rgb(255 180 107 / .32); }
@media (hover: hover) {
  .btn:hover { background: linear-gradient(180deg, #fff1e0, #ffc07d); box-shadow: 0 8px 28px rgb(255 180 107 / .5); }
  .btn.ghost:hover { background: rgb(255 226 196 / .1); border-color: var(--vien); box-shadow: none; }
}
.btn.ghost { background: none; color: var(--vien); border: 1.5px solid var(--vien); box-shadow: none; }
.btn[disabled], .btn[aria-disabled="true"] { background: rgb(255 226 196 / .06); color: rgb(255 247 240 / .38); border: 1px dashed rgb(255 226 196 / .24); box-shadow: none; }
.btn[disabled]:hover, .btn[aria-disabled="true"]:hover { background: rgb(255 226 196 / .06); }
.btn.small.warn { background: #b04e2c; border-color: #b04e2c; color: #fff; }
.note { background: rgb(255 180 107 / .07); border-color: var(--line); border-left-color: rgb(255 180 107 / .6); }
.note.warn { background: rgb(255 140 90 / .08); border-left-color: rgb(255 140 90 / .7); }
.err { background: rgb(255 110 110 / .1); border-color: rgb(255 110 110 / .34); color: #ffc9c9; }
.ok-line { color: #8fe0b3; }
.err-line, .lnk.warn:hover, .mini.warn:hover { color: #ffb08c; }
.lnk { color: var(--chu-mo); }
.lnk:hover { color: var(--nhan); }
.result { background: linear-gradient(150deg, rgb(255 180 107 / .16), rgb(255 180 107 / .03) 60%), var(--kinh-nen); border-color: rgb(255 180 107 / .45); box-shadow: var(--kinh-bong-noi); }
.result::before { background: var(--nhan); }
.result .row, .card .rows .row { border-bottom-color: rgb(255 226 196 / .12); }
.metric, .ma-box, .mini, .bpm-alt .alt, .bpm-count i { background: rgb(255 226 196 / .06); border-color: rgb(255 226 196 / .12); }
.bar i, .pbar { background: rgb(255 226 196 / .12); }
.crumb a:hover, .thero .kick, label .req, .result .big:not(.btn), .timer .state, .big-count, .stars, .meal .top span, .lnk:hover { color: var(--nhan); }
.first-note { border-color: rgb(255 180 107 / .35); background: rgb(255 180 107 / .07); }
.danger-box { border-color: rgb(255 140 90 / .4); background: rgb(255 140 90 / .08); }
.tdm span, .tdlich-thu span, .tdcuoi, .seq-t em, .bpm-unit, .bpm-stab, .bpm-exact, .bpm-alt .alt span, .bpm-count i, .bar span, .ends, .metric .unit, .metric .lab,
.h3dnhac, .mecard .lede, .sbar .txt, .sbar .who, .first-note p, .danger-box p { color: var(--chu-mo); }

/* phần giải thích gập lại: Giới thiệu & lưu ý, Về công cụ này, Câu hỏi thường gặp */
.gthich > summary { background: rgb(21 13 34 / .5); border: 1px solid var(--line); color: var(--chu); border-radius: 99px; }
.gt > summary { background: none; border: 0; border-radius: 0; color: var(--chu); }
.gthich .gthich-ic { border-color: var(--nhan); color: var(--nhan); }
.gt-noi, .gthich-noi { color: var(--chu-mo); }
.gt { background: rgb(21 13 34 / .45); border-color: var(--line); }
.gt summary h2 { color: var(--chu); font-size: 1.02rem; }
.loiich li::before { background: var(--nhan); }
.hoi details { border-color: var(--line); }
.formula { color: var(--chu-mo); }

/* thanh "lưu trên thiết bị này" */
.sbar { border-color: rgb(255 226 196 / .1); }
.sbar .sw:hover { color: var(--nhan); }

/* quả cầu thở: mặt trời nhỏ ấm */
.orb { background: radial-gradient(circle at 38% 32%, #fff3e0, #ffc88f 46%, #b85a2c 100%); box-shadow: 0 0 70px rgb(255 180 107 / .42), 0 0 140px rgb(255 140 90 / .18); }
.orb b { color: #2a1208; }
.timer .state { color: var(--nhan); }
.timer .clock, .clock { color: var(--chu); text-shadow: 0 0 40px rgb(255 180 107 / .28); }

/* nút tài khoản (tai-khoan.js chèn, khi Rewards mở) */
html body .vt-phai .ari-tk { background: rgb(10 7 18 / .55); border: 1.5px solid var(--vien); color: var(--vien); box-shadow: none; }
html body .vt-phai .ari-tk:hover { background: rgb(255 226 196 / .14); }

/* Uống nước */
html body[data-tool="uong-nuoc"] .un-vien { fill: rgb(255 226 196 / .06); stroke: rgb(255 226 196 / .6); }
html body[data-tool="uong-nuoc"] .un-vach { stroke: rgb(255 226 196 / .3); }
html body[data-tool="uong-nuoc"] .un-bong { stroke: rgb(255 255 255 / .55); }
html body[data-tool="uong-nuoc"] .un-pt { color: #9fd0f5; background: rgb(126 190 235 / .16); }
html body[data-tool="uong-nuoc"] .un-pt.dat { color: #8fe0b3; background: rgb(127 214 168 / .16); }
html body[data-tool="uong-nuoc"] .un-phu .lnk.hoi { color: #ffb08c; }
/* Đồng hồ thiền */
html body[data-tool="dong-ho-thien"] .dh-moc { stroke: rgb(255 247 240 / .5); }
html body[data-tool="dong-ho-thien"] .dh-bat { color: rgb(255 180 107 / .65); }
html body[data-tool="dong-ho-thien"] .dh-vong.ngan .dh-bat { color: #ffc88f; }
/* biểu đồ tuần dùng chung */
html body .ccbd .ccbd-luoi line { stroke: rgb(255 226 196 / .1); }
html body .ccbd .ccbd-day { stroke: rgb(255 226 196 / .28); }
html body .ccbd .ccbd-cot0 { fill: rgb(255 226 196 / .14); }
html body .ccbd .ccbd-muc-chu { fill: #ffc88f; }
html body .ccbd .ccbd-rgt { fill: var(--nhan); }
html body .ccbd .ccbd-rcu, html body .ccbd .p4 { stroke: rgb(255 247 240 / .6); }
html body .ccbd-chu .p4 { background: rgb(255 247 240 / .6); }
html body .cclich-o { background: rgb(255 226 196 / .06); border-color: rgb(255 226 196 / .14); }
html body .cclich-o.m1 { background: rgb(255 180 107 / .25); }
html body .cclich-o.m2 { background: rgb(255 180 107 / .5); }
html body .cclich-chu i { border-color: rgb(255 226 196 / .14); }
html body .cclich-chu i.m0 { background: rgb(255 226 196 / .06); }
html body .cclich-chu i.m1 { background: rgb(255 180 107 / .25); }
html body .cclich-chu i.m2 { background: rgb(255 180 107 / .5); }

/* trang viết tay (Dinh dưỡng AI, Nhận diện bài hát, Gắn nhạc) giữ phần thân cũ: ẩn những khối mà trang vũ trụ bỏ */
.crumb, .related, .cta-ari, .homefab { display: none !important; }

/* ================================================================ GĐ2: từng công cụ (đảo "LỚP SÁNG" của tools.css sang nền vũ trụ) */
.dt.khong { display: inline-flex; flex: 0 0 auto; width: fit-content; max-width: 100%; }
html body[data-tool="bmi"] .bmi-khac, html body[data-tool="bmi"] .bmi-gioi, html body[data-tool="chi-so-co-the"] .bmi-khac, html body[data-tool="chi-so-co-the"] .bmi-gioi, html body[data-tool="do-deo"] .dd-them, html body[data-tool="do-deo"] .dd-tuthe li,
html body[data-tool="san-sang"] .ss-dua, html body[data-tool="tim-lop"] .tl-dua { background: rgb(255 226 196 / .06); }
html body[data-tool="do-deo"] .dd-muc, html body[data-tool="san-sang"] .ss-muc, html body[data-tool="giu-tu-the"] .tt-o { background: rgb(255 226 196 / .07); border-color: rgb(255 226 196 / .24); }
html body[data-tool] .tt-san { background: radial-gradient(120% 100% at 22% 60%, rgb(255 180 107 / .2), rgb(21 13 34 / .6) 72%); }
html body[data-tool] .card .rows.tt-kyluc .row { background: linear-gradient(90deg, rgb(255 180 107 / .3) var(--p, 0%), rgb(255 226 196 / .05) var(--p, 0%)); }
html body[data-tool] .tt-hinh .tt-vien { fill: #2a1836; stroke: #2a1836; }
html body[data-tool] .tt-hinh .tt-bong { fill: #000; opacity: .35; }
html body[data-tool="bmi"] .bmi-gioi, html body[data-tool="chi-so-co-the"] .bmi-gioi { border: 1px solid rgb(255 226 196 / .14); }
html body[data-tool="do-deo"] details.dd-bai { background: rgb(255 226 196 / .05); }
html body[data-tool="do-deo"] details.dd-bai[open] { background: rgb(255 226 196 / .1); }
html body[data-tool="do-deo"] .dd-tien i, html body[data-tool="san-sang"] .ss-tien i, html body[data-tool="tim-lop"] .tl-tien i { background: rgb(255 226 196 / .14); }
html body[data-tool="san-sang"] .ss-the li.bo, html body[data-tool="tim-lop"] .tl-the li.bo { border-color: rgb(255 226 196 / .3); }
html body[data-tool="do-deo"] .dd-hinh .dd-than, html body[data-tool="do-deo"] .dd-hinh .dd-mo, html body[data-tool="do-deo"] .dd-hinh .dd-day,
html body[data-tool="do-deo"] .dd-hinh .dd-bong.on { stroke: #ffe2c4; }
html body[data-tool="do-deo"] .dd-hinh .dd-dau { fill: #ffe2c4; }
html body[data-tool="do-deo"] .dd-hinh .dd-nen, html body[data-tool="do-deo"] .dd-hinh .dd-ghe { stroke: rgb(255 226 196 / .26); }
html body[data-tool="do-deo"] .dd-hinh .dd-ghe { fill: rgb(255 226 196 / .05); }
html body[data-tool="do-deo"] .dd-hinh .dd-ref { stroke: rgb(255 226 196 / .38); }
html body[data-tool="san-sang"] .ss-dau { color: var(--chu-mo); }
html body[data-tool="do-deo"] .dd-bai.dau .dd-tt, html body[data-tool="do-deo"] .dd-xuong, html body[data-tool="do-deo"] .dd-canh, html body[data-tool="tim-lop"] .tl-dk { color: #ffc88f; }
html body[data-tool="do-deo"] .dd-len { color: #8fe0b3; }
html body[data-tool="gio-di-ngu"] .gn-du, html body[data-tool="gio-di-ngu"] .gn-ket.du { color: #8fe0b3; background: rgb(127 214 168 / .16); }
html body[data-tool="gio-di-ngu"] .gn-ket.thieu { color: #ffc88f; background: rgb(255 180 107 / .16); }
html body[data-tool="gio-di-ngu"] .gn-ket.nhieu { color: #9fd0f5; background: rgb(126 190 235 / .16); }
html body[data-tool="gio-di-ngu"] .gn-vach { stroke: rgb(255 226 196 / .4); }
html body[data-tool="nhat-ky-an"] .nk-tag { color: #ffc88f; background: rgb(255 180 107 / .14); }
html body[data-tool="nin-tho"] .result .nt-kyluc { color: #ffc88f; }
html body[data-tool="nin-tho"] .nt-chu-sao i { color: #ffc88f; }
html body[data-tool="nin-tho"] .nt-chu-sao s { color: rgb(255 226 196 / .28); }
html body .cc-dn { background: rgb(10 7 18 / .95); }
html body .cc-dn-so { color: var(--nhan); text-shadow: 0 0 60px rgb(255 180 107 / .4); }
.bpm-stage.full { background: var(--nen-3); }
.bpm-tap { border-color: rgb(255 180 107 / .5); }
.bpm-exit { border-color: rgb(255 226 196 / .24); }
.scale .pin { box-shadow: 0 0 0 3px rgb(21 13 34 / .9), 0 2px 6px rgb(0 0 0 / .4); }
.seq-n { background: rgb(255 226 196 / .08); }
.tdke { stroke: rgb(255 226 196 / .14); }
.tdcham.cuoi { fill: var(--nen-2); }
.tdlich .o { background: rgb(255 180 107 / .08); border-color: rgb(255 226 196 / .1); }
.tdlich .o.co { background: var(--accent); }
.cal i { border-color: rgb(255 226 196 / .14); }
.cal i.done, .cal.ngay button.done { background: rgb(255 180 107 / .85); color: #1a0f22; }
.cal i.today, .cal.ngay button.today { border-color: var(--nhan); }
.cal.ngay button { background: rgb(255 226 196 / .06); border-color: rgb(255 226 196 / .12); }
.tdm.dat { background: rgb(255 180 107 / .12); }
.sbar, .me-cols, .pass-box, .seq-row, .cmt3d-buoc { border-color: rgb(255 226 196 / .1); }
/* Gắn nhạc vào video (kiểu viết trong trang, nạp trước tệp này nên cần bộ chọn đủ mạnh) */
html body[data-tool="gan-nhac-vao-video"] .gn-o { background: rgb(255 226 196 / .05); border-color: rgb(255 226 196 / .35); }
html body[data-tool="gan-nhac-vao-video"] .gn-o:hover, html body[data-tool="gan-nhac-vao-video"] .gn-o.keo { background: rgb(255 180 107 / .1); border-color: var(--nhan); }
html body[data-tool="gan-nhac-vao-video"] .gn-o.co { background: rgb(127 214 168 / .1); border-color: rgb(143 224 179 / .55); }
html body[data-tool="gan-nhac-vao-video"] .gn-o.sai { border-color: rgb(255 154 138 / .65); }
html body[data-tool="gan-nhac-vao-video"] .gn-o .gn-keotha { color: var(--chu-mo); }
html body[data-tool="gan-nhac-vao-video"] .gn-kt pre { background: rgb(255 226 196 / .06); }
html body[data-tool="gan-nhac-vao-video"] .gn-thanh { background: rgb(255 226 196 / .12); }
html body[data-tool="gan-nhac-vao-video"] .gn-kt .row, html body[data-tool="gan-nhac-vao-video"] .gn-ct .row { border-bottom-color: rgb(255 226 196 / .14); }
html body[data-tool="gan-nhac-vao-video"] .gn-loinho, html body[data-tool="gan-nhac-vao-video"] .gn-loi h3 { color: #ffb9ac; }
html body[data-tool="gan-nhac-vao-video"] .gn-loinho b { color: #ffd2c8; }
html body[data-tool="gan-nhac-vao-video"] .gn-loinho { background: rgb(255 110 110 / .1); border-color: rgb(255 130 120 / .35); }
html body[data-tool="gan-nhac-vao-video"] .gn-loi { background: rgb(255 110 110 / .07); border-color: rgb(255 130 120 / .3); }
html body[data-tool="gan-nhac-vao-video"] .gn-lau { color: #ffc88f; }
/* Dinh dưỡng AI (gói NutriVision V4, QĐ-8: thân app giữ y nguyên): đảo cả khối sang tối bằng bộ lọc; ảnh, video, canvas đảo ngược lại cho đúng màu */
html body[data-tool="dinh-duong-ai"] .nv { background: transparent; filter: invert(.93) hue-rotate(180deg); }
html body[data-tool="dinh-duong-ai"] .nv img, html body[data-tool="dinh-duong-ai"] .nv video, html body[data-tool="dinh-duong-ai"] .nv canvas,
html body[data-tool="dinh-duong-ai"] .nv picture { filter: invert(1) hue-rotate(180deg); }

/* thẻ chuyển của trang gộp (Bảng tiến trình, Chỉ số cơ thể) */
.tt-the-chon, .cs-chon { padding: 12px 14px; }
.tt-the-chon .chips, .cs-chon .chips { margin-top: 0; }
.tt-pane > .card:first-child, .cs-pane > .card:first-child { margin-top: 14px; }

/* huy hiệu điểm không đẩy bề ngang trang (màn 375px, mốc dài) */
.cc-dau, .cc-chinh, .cc-phu { min-width: 0; }
.dt { box-sizing: border-box; max-width: 100%; }
.dt-moc { min-width: 0; }
@media (max-width: 420px) { .dt-tt { white-space: normal; } }
.cc-dau > .dt { flex: 1 1 100%; }
.cc-dau > .dt.khong { flex: 0 0 auto; }
.dt { clear: both; }   /* nút Nghe Ari nổi (float) bên trên: huy hiệu là hộp flex nên bị ép hẹp cạnh chúng nếu không clear */

/* ================================================================ Âm thanh thư giãn (cc/am-thanh-thu-gian.js), 05/10/2026
   Bầu trời: mỗi hành tinh một loại tiếng, trôi lơ lửng; phi hành gia tí hon bay bằng transform (vat-ly.js). Tấm kính trượt từ dưới lên.
   Nguồn của khối này: viec-dang-lam/am-thanh-thu-gian/kieu-att.css (chép vào cuối tram-vutru.css). */
.att { position: relative; display: grid; gap: 14px; padding-bottom: 96px; }
.att-phoi { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.att-phoi::-webkit-scrollbar { display: none; }
.att-phoi .chip { flex: 0 0 auto; min-height: 44px; padding: 0 16px; white-space: nowrap; }

.att-troi { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px 10px; padding: 18px 4px 34px;
  isolation: isolate; }
/* tinh vân mờ sau chòm hành tinh: lớp riêng có mặt nạ tròn để không lộ mép khung chữ nhật */
.att-troi::before { content: ""; position: absolute; inset: -6% -4%; z-index: -1; pointer-events: none;
  background: radial-gradient(42% 34% at 30% 26%, rgb(208 124 240 / .2), transparent 70%), radial-gradient(40% 32% at 72% 68%, rgb(63 199 201 / .16), transparent 70%), radial-gradient(30% 26% at 62% 18%, rgb(255 180 107 / .1), transparent 70%);
  -webkit-mask-image: radial-gradient(closest-side, #000 55%, transparent 100%); mask-image: radial-gradient(closest-side, #000 55%, transparent 100%); }
@media (min-width: 720px) { .att-troi { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 44px 18px; padding: 30px 12px 48px; } }
.att-ht { position: relative; display: grid; justify-items: center; align-content: start; gap: 6px; padding: 0; border: 0; background: none; color: var(--chu); font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.att-ht:nth-child(3n+2) { margin-top: 22px; }
@media (min-width: 720px) { .att-ht:nth-child(3n+2) { margin-top: 0; } .att-ht:nth-child(even) { margin-top: 34px; } }
.att-cau { position: relative; display: block; width: min(100%, 132px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, color-mix(in srgb, var(--mau) 82%, #fff), var(--mau) 46%, color-mix(in srgb, var(--mau) 40%, #0a0712) 100%);
  animation: att-troi var(--dai, 8s) ease-in-out var(--tre, 0s) infinite alternate; opacity: .72; filter: saturate(.8); transition: opacity .4s, filter .4s; }
.att-cau img { position: absolute; inset: -7%; width: 114%; height: 114%; object-fit: contain; }
.att-cau.co-hinh { background: none; }
.att-ht.co .att-cau { opacity: 1; filter: none; }
.att-ht:hover .att-cau, .att-ht:focus-visible .att-cau { opacity: 1; filter: none; }
.att-ht:focus-visible { outline: 0; }
.att-ht:focus-visible .att-ten { outline: 2px solid var(--c-focus); outline-offset: 4px; border-radius: 8px; }
.att-quang { position: absolute; top: 0; left: 50%; width: min(100%, 132px); aspect-ratio: 1; transform: translateX(-50%) scale(1.25); border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, color-mix(in srgb, var(--mau) 70%, transparent) 0%, transparent 68%); opacity: 0; transition: opacity .5s; }
.att-ht.co .att-quang { opacity: calc(.25 + var(--am, .6) * .35); }
.att-ht.phat .att-quang { opacity: calc(.35 + var(--am, .6) * .55); animation: att-dap 3.6s ease-in-out infinite; }
.att-ten { font-family: var(--f-hien); font-size: 14px; font-weight: 600; letter-spacing: .01em; line-height: 1.2; text-align: center; color: var(--chu-mo); }
.att-ht.co .att-ten { color: var(--chu); }
.att-so { position: absolute; top: -2px; right: calc(50% - min(50%, 66px)); min-width: 24px; height: 24px; padding: 0 6px; border-radius: 12px; display: grid; place-items: center;
  font-size: 12px; font-weight: 700; color: #1a0f22; background: linear-gradient(180deg, #ffe9d2, #ffb46b); box-shadow: 0 4px 12px -4px rgb(0 0 0 / .6); }
.att-so[hidden] { display: none; }
.att-ht.rung .att-cau { animation: att-rung .42s ease-out; }
@keyframes att-troi { from { transform: translate3d(0, -5px, 0) rotate(-2deg); } to { transform: translate3d(0, 6px, 0) rotate(2.5deg); } }
@keyframes att-dap { 0%, 100% { transform: translateX(-50%) scale(1.2); } 50% { transform: translateX(-50%) scale(1.42); } }
@keyframes att-rung { 0% { transform: scale(1); } 30% { transform: scale(.9) rotate(-5deg); } 65% { transform: scale(1.06) rotate(3deg); } 100% { transform: scale(1); } }

.att-phg { position: absolute; top: 0; left: 0; width: 64px; height: 64px; padding: 0; border: 0; background: none; cursor: pointer; z-index: 2; will-change: transform;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation; filter: drop-shadow(0 6px 14px rgb(0 0 0 / .55)); }
.att-phg img { display: block; width: 64px; height: 64px; transition: transform .3s var(--em); }
.att-phg.hich img { transform: scale(1.25); }
.att-phg:focus-visible { outline: 2px solid var(--c-focus); outline-offset: 2px; border-radius: 50%; }
.att-giam .att-cau, .att-giam .att-quang { animation: none !important; }

.att-nhac { min-height: 1.5em; margin: 0; text-align: center; font-size: 14px; color: var(--c-text-accent); }
.att-nhac:empty { display: none; }

.att-thanh { position: fixed; left: 50%; bottom: calc(12px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 20; width: min(calc(100% - 24px), 760px);
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 26px;
  background: rgb(21 13 34 / .86); border: 1px solid var(--kinh-vien); box-shadow: var(--kinh-bong); -webkit-backdrop-filter: blur(16px) saturate(1.3); backdrop-filter: blur(16px) saturate(1.3); }
.att-phat { width: 56px; height: 56px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center; color: #1a0f22;
  background: linear-gradient(180deg, #ffe9d2, #ffb46b); box-shadow: 0 8px 22px -8px rgb(255 180 107 / .7); transition: transform .2s var(--em); }
.att-phat:active { transform: scale(.94); }
.att-ic { width: 0; height: 0; margin-left: 4px; border-style: solid; border-width: 10px 0 10px 16px; border-color: transparent transparent transparent currentColor; }
.att-phat.dang .att-ic { width: 16px; height: 18px; margin: 0; border: 0; border-left: 5px solid currentColor; border-right: 5px solid currentColor; box-sizing: border-box; }
.att-giua { display: grid; gap: 2px; min-width: 0; }
.att-dem { font-size: 13px; font-weight: 600; color: var(--chu); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.att-chung { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 8px; font-size: 12px; color: var(--chu-mo); }
.att-phai { display: grid; gap: 6px; justify-items: end; }
.att-henbox { display: flex; align-items: center; gap: 6px; }
.att-hen { min-height: 44px; max-width: 150px; padding: 0 10px; border-radius: 14px; border: 1px solid var(--duong); background: rgb(10 7 18 / .6); color: var(--chu); font: inherit; font-size: 13px; }
.att-conlai { font-size: 13px; font-variant-numeric: tabular-nums; color: var(--c-text-accent); min-width: 3.2em; text-align: right; }
.att-conlai:empty { display: none; }
.att-tathet { min-height: 44px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--duong); background: none; color: var(--chu-mo); font: inherit; font-size: 13px; cursor: pointer; }
.att-tathet:disabled { opacity: .4; cursor: default; }
.att-tathet:not(:disabled):hover { color: var(--chu); border-color: rgb(255 226 196 / .5); }
@media (max-width: 520px) {
  .att-thanh { grid-template-columns: auto minmax(0, 1fr); row-gap: 8px; border-radius: 22px; }
  .att-phai { grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) auto; justify-items: stretch; align-items: center; }
  .att-hen { max-width: none; width: 100%; }
  .att { padding-bottom: 150px; }
}

.att-keo { -webkit-appearance: none; appearance: none; width: 100%; height: 44px; margin: 0; background: none; cursor: pointer; touch-action: pan-y; }
.att-keo::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: rgb(255 226 196 / .22); }
.att-keo::-moz-range-track { height: 6px; border-radius: 3px; background: rgb(255 226 196 / .22); }
.att-keo::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -8px; border-radius: 50%; border: 0; background: linear-gradient(180deg, #ffe9d2, #ffb46b); box-shadow: 0 2px 8px rgb(0 0 0 / .5); }
.att-keo::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; border: 0; background: linear-gradient(180deg, #ffe9d2, #ffb46b); box-shadow: 0 2px 8px rgb(0 0 0 / .5); }
.att-keo:disabled { opacity: .35; cursor: default; }
.att-keo:focus-visible { outline: 2px solid var(--c-focus); outline-offset: 2px; border-radius: 8px; }

.att-man { position: fixed; inset: 0; z-index: 30; background: rgb(5 3 10 / .55); }
.att-man[hidden], .att-tam[hidden] { display: none; }
.att-tam { position: fixed; left: 50%; bottom: 0; z-index: 31; width: min(100%, 560px); max-height: min(78vh, 620px); overflow-y: auto; transform: translateX(-50%);
  padding: 16px 16px calc(18px + env(safe-area-inset-bottom)); border-radius: 26px 26px 0 0; background: rgb(21 13 34 / .95); border: 1px solid var(--kinh-vien); border-bottom: 0;
  box-shadow: 0 -20px 50px -20px rgb(0 0 0 / .8); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); animation: att-len .32s var(--em); }
@keyframes att-len { from { transform: translate(-50%, 40px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
.att-tam-dau { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.att-tam-ten { margin: 0; font-family: var(--f-hien); font-size: 22px; font-weight: 700; color: var(--chu); }
.att-dong { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--duong); background: none; color: var(--chu); font-size: 24px; line-height: 1; cursor: pointer; }
.att-ds { display: grid; gap: 4px; }
.att-dong-tieng { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: center; gap: 12px; padding: 4px 0; border-top: 1px solid var(--c-line-soft); }
.att-chon { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 10px; min-height: 52px; padding: 4px 6px; border: 0; border-radius: 14px; background: none; color: var(--chu-mo); font: inherit; font-size: 15px; text-align: left; cursor: pointer; }
.att-chon[aria-pressed="true"] { color: var(--chu); }
.att-cham { grid-row: 1 / 3; width: 26px; height: 26px; border-radius: 50%; border: 2px solid rgb(255 226 196 / .4); transition: background .2s, border-color .2s, box-shadow .2s; }
.att-chon[aria-pressed="true"] .att-cham { border-color: transparent; background: linear-gradient(180deg, #ffe9d2, #ffb46b); box-shadow: 0 0 0 4px rgb(255 180 107 / .2); }
.att-chon.tai .att-cham { animation: att-nhap 1s ease-in-out infinite; }
@keyframes att-nhap { 50% { opacity: .35; } }
.att-chon-ten { font-weight: 600; }
.att-tt { grid-column: 2; font-size: 12px; color: var(--c-text-accent); }
.att-tt:empty { display: none; }
.att-chon.loi .att-tt { color: var(--danger); }
.att-chon:focus-visible, .att-dong:focus-visible, .att-phat:focus-visible, .att-tathet:focus-visible, .att-hen:focus-visible { outline: 2px solid var(--c-focus); outline-offset: 2px; }
.att-nen { display: none; }
@media (prefers-reduced-motion: reduce) { .att-cau, .att-quang, .att-tam, .att-chon.tai .att-cham { animation: none !important; } }

/* ---- đợt 2 (cô Ari 05/10): gợi ý theo nhu cầu + ngẫu nhiên, ông già canh giờ, phi hành gia ham ngủ ---- */
.att-nhu .chip[aria-pressed="true"] { background: rgb(255 180 107 / .16); color: var(--c-text-accent); border-color: rgb(255 180 107 / .6); }
.att-ngau { display: inline-flex; align-items: center; gap: 8px; background: linear-gradient(180deg, #ffe9d2, #ffb46b) !important; color: #1a0f22 !important; border-color: transparent !important; font-weight: 700; }
.att-xx { position: relative; width: 16px; height: 16px; border-radius: 4px; border: 2px solid currentColor; box-sizing: border-box; transform: rotate(-12deg); }
.att-xx::before, .att-xx::after { content: ""; position: absolute; width: 3px; height: 3px; border-radius: 50%; background: currentColor; }
.att-xx::before { top: 1.5px; left: 1.5px; }
.att-xx::after { right: 1.5px; bottom: 1.5px; }
.att-banphoi { margin-top: -6px; min-height: 52px; }
.att-banphoi .chip { background-color: rgb(10 7 18 / .35); }

.att-ong { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px; padding: 12px 14px; border-radius: 24px;
  background: var(--kinh-nen); border: 1px solid var(--kinh-vien); box-shadow: var(--kinh-bong); }
.att-ong-hinh { position: relative; width: 104px; height: 104px; flex: none; }
.att-ong-hinh img { position: relative; display: block; width: 104px; height: 104px; object-fit: contain; filter: saturate(.85) brightness(.82); transition: filter .8s; }
.att-ong-den { position: absolute; left: -4%; top: 16%; width: 54%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgb(255 205 130 / .7), transparent 68%); opacity: 0; transition: opacity .8s; }
.att-ong.canh .att-ong-hinh img { filter: none; }
.att-ong.canh .att-ong-den { opacity: 1; animation: att-den 3.2s ease-in-out infinite; }
.att-ong.xong .att-ong-hinh img { filter: saturate(.35) brightness(.5); }
@keyframes att-den { 50% { opacity: .55; transform: scale(1.12); } }
.att-ong-noi { display: grid; gap: 8px; min-width: 0; }
.att-ong-chu { margin: 0; font-size: 14px; line-height: 1.4; color: var(--chu); font-variant-numeric: tabular-nums; }
.att-ong.canh .att-ong-chu { color: var(--c-text-accent); font-weight: 600; }
.att-ong-phut { display: flex; flex-wrap: wrap; gap: 6px; }
.att-ong-phut .chip { min-height: 44px; min-width: 44px; padding: 0 12px; font-size: 13px; }

.att-phg-xoay { display: block; width: 64px; height: 64px; }
.att-phg.hich .att-phg-xoay img { transform: scale(1.25); }
.att-zzz { position: absolute; left: 70%; top: -14px; display: none; pointer-events: none; font-family: var(--f-hien); font-style: normal; font-weight: 700; color: #ffe9d2; text-shadow: 0 2px 6px rgb(0 0 0 / .7); }
.att-phg.ngu .att-zzz { display: block; }
.att-zzz i { position: absolute; left: 0; top: 0; font-style: normal; opacity: 0; animation: att-zzz 3s ease-out infinite; }
.att-zzz i:nth-child(1) { font-size: 12px; }
.att-zzz i:nth-child(2) { font-size: 15px; animation-delay: 1s; }
.att-zzz i:nth-child(3) { font-size: 19px; animation-delay: 2s; }
@keyframes att-zzz { 0% { opacity: 0; transform: translate(0, 6px); } 25% { opacity: 1; } 100% { opacity: 0; transform: translate(14px, -22px); } }
.att-giam .att-zzz i { animation: none; opacity: 1; }
.att-giam .att-zzz i:nth-child(2) { transform: translate(7px, -10px); }
.att-giam .att-zzz i:nth-child(3) { transform: translate(15px, -22px); }
@media (prefers-reduced-motion: reduce) { .att-ong.canh .att-ong-den { animation: none; } }

/* thanh điều khiển gọn một hàng trên điện thoại (hẹn giờ đã chuyển sang ông già) */
@media (max-width: 520px) {
  .att-thanh { grid-template-columns: auto minmax(0, 1fr) auto; row-gap: 0; }
  .att-phai { grid-column: auto; grid-template-columns: auto; justify-items: end; }
  .att { padding-bottom: 104px; }
  .att-tathet { padding: 0 10px; }
  .att-chung > span { display: none; }
  .att-chung { grid-template-columns: minmax(0, 1fr); }
}

/* ---- trang Beats (tools/beats.html) ---- */
.beats-ds { display: grid; gap: 14px; margin-top: 22px; }
@media (min-width: 720px) { .beats-ds { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; } }
.beats-the { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px; min-height: 96px; padding: 18px 18px; border-radius: 26px; text-decoration: none; color: var(--chu);
  background: var(--kinh-nen); border: 1px solid var(--kinh-vien); box-shadow: var(--kinh-bong); -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3);
  transition: transform .25s var(--em), border-color .25s, box-shadow .25s; }
.beats-the:hover { transform: translateY(-2px); border-color: var(--kinh-vien-hong); box-shadow: var(--kinh-bong-noi); }
.beats-the:active { transform: scale(.985); }
.beats-the:focus-visible { outline: 2px solid var(--c-focus); outline-offset: 3px; }
.beats-ic { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; color: #1a0f22; background: linear-gradient(180deg, #ffe9d2, #ffb46b); box-shadow: 0 10px 26px -10px rgb(255 180 107 / .7); }
.beats-ic svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.beats-chu { display: grid; gap: 4px; min-width: 0; }
.beats-chu b { font-family: var(--f-hien); font-size: 19px; font-weight: 700; line-height: 1.2; }
.beats-chu span { font-size: 14px; line-height: 1.45; color: var(--chu-mo); }
.beats-the .tram-mui { width: 22px; height: 22px; fill: none; stroke: var(--c-text-accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.beats-them { margin: 22px 0 0; text-align: center; font-size: 14px; }
.beats-them a { color: var(--c-text-accent); }

/* 16 hành tinh xếp 4 x 4 ở mọi cỡ màn hình (so le hàng chẵn cho giống chòm sao, không phải lưới bàn cờ) */
.att-troi { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px 8px; }
.att-ht:nth-child(3n+2) { margin-top: 0; }
.att-ht:nth-child(even) { margin-top: 18px; }
.att-ten { font-size: 13px; }
@media (min-width: 720px) {
  .att-troi { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px 18px; }
  .att-ht:nth-child(even) { margin-top: 34px; }
  .att-ten { font-size: 14px; }
}

/* tấm kính đang mở: trang phía sau không cuộn */
html:has(.att-mo) { overflow: hidden; }
