/* Trang hướng dẫn cài PetOS lên iPhone, iPad (ios.html). Dùng chung trang-chu.css (nav, wrap, btn, pill, block,
   phone-shot, card-shot, cta-band, faq, foot). Ảnh thật ở /anh/ios-*.webp; màn hình của iOS (Chia sẻ, Thêm vào MH chính,
   Cài đặt, bấm 3 lần nút sườn) vẽ bằng HTML ở lớp .ios-*, chữ đúng như iOS tiếng Việt. */
.page-head { padding: 40px 0 8px; }
.page-head h1 { font-size: clamp(30px, 4.8vw, 48px); font-weight: 800; margin-top: 14px; max-width: 22ch; text-wrap: balance; letter-spacing: -.02em; }
.page-head .lead { margin-top: 14px; }
.can { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.can li { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; font-size: 15px; box-shadow: var(--shadow); }
.can b { display: block; font-size: 13px; color: var(--muted); font-weight: 600; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.toc a {
  text-decoration: none; color: var(--text); font-weight: 600; font-size: 14px; padding: 8px 14px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line);
}
.toc a:hover { border-color: var(--brand); color: var(--brand-ink); }

/* phần: bố mẹ / máy bé / khoá máy */
.phan { padding: 48px 0 8px; }
.phan-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.phan-head h2 { font-size: clamp(24px, 3.2vw, 32px); max-width: none; }
.phan-head .pill.par { background: var(--ok-soft); color: var(--ok); }
.phan .sec-lead { margin-top: 10px; }

/* mỗi bước: số + chữ bên trái, ảnh bên phải (điện thoại: chữ trên, ảnh dưới) */
.buoc-list { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 18px; counter-reset: buoc; }
.buoc {
  display: grid; gap: 20px; background: var(--card); border-radius: 26px; padding: 22px; box-shadow: var(--shadow);
  align-items: center;
}
@media (min-width: 860px) { .buoc { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 32px 36px; gap: 40px; } }
.buoc-text { display: grid; gap: 10px; align-content: start; }
.so {
  width: 40px; height: 40px; border-radius: 12px; background: var(--fill); color: var(--on-fill);
  display: grid; place-items: center; font-weight: 800; font-size: 18px;
}
.buoc h3 { font-size: clamp(19px, 2vw, 22px); font-weight: 800; }
.buoc p, .buoc li { color: var(--muted); font-size: 16px; }
.buoc ul, .buoc ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.buoc b { color: var(--text); }
.meo { font-size: 14px !important; background: var(--bg2); border-radius: 12px; padding: 10px 12px; }
.anh { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; align-items: flex-start; }
.anh figure { margin: 0; display: grid; gap: 10px; justify-items: center; }
.anh figcaption { font-size: 13px; color: var(--muted); text-align: center; max-width: 230px; line-height: 1.4; }
.card-shot { width: min(300px, 100%); }
.phone-shot { width: 230px; }

/* ---------------- màn hình iOS vẽ lại ---------------- */
.ios {
  width: 230px; aspect-ratio: 390 / 844; border-radius: 27px; overflow: hidden; position: relative;
  font-family: -apple-system, "SF Pro Text", "Helvetica Neue", system-ui, sans-serif; color: #000; line-height: 1.3;
  background: #f2f2f7; font-size: 11px; display: flex; flex-direction: column;
}
/* chữ trong hình vẽ không theo cỡ, màu chữ của bước (.buoc p, .buoc b) */
.buoc .ios p, .buoc .ios b { font-size: inherit; color: inherit; }
.ios .gio { display: flex; justify-content: space-between; padding: 9px 20px 4px; font-weight: 600; font-size: 11px; flex: none; }
.ios .gio i { font-style: normal; letter-spacing: 1px; font-size: 9px; }

/* Safari: trang mờ phía sau, bảng Chia sẻ trượt lên */
.ios-trang { flex: 1; background: #fbf7f3 url(/anh/ios-be-safari.webp) top / 100% auto no-repeat; position: relative; }
.ios-trang.mo::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .28); }
.ios-thanh { flex: none; background: rgba(249, 249, 249, .96); padding: 7px 10px 14px; display: flex; align-items: center; gap: 7px; border-top: .5px solid #d8d8dc; }
.ios-dc { flex: 1; background: #e3e3e8; border-radius: 10px; padding: 7px 8px; text-align: center; font-size: 11px; color: #000; }
.ios-nut { width: 28px; height: 28px; border-radius: 50%; background: #e3e3e8; display: grid; place-items: center; color: #007aff; font-weight: 700; font-size: 12px; flex: none; }
.ios-nut.bat { outline: 2.5px solid var(--brand); outline-offset: 2px; }
.ios-sheet {
  position: absolute; left: 0; right: 0; bottom: 0; background: #f2f2f7; border-radius: 14px 14px 0 0; padding: 10px 10px 16px;
  box-shadow: 0 -6px 24px rgba(0, 0, 0, .2); z-index: 2;
}
.ios-sheet .tieu { display: flex; align-items: center; gap: 8px; padding: 2px 4px 10px; border-bottom: .5px solid #d1d1d6; margin-bottom: 8px; }
.ios-sheet .tieu img { width: 30px; height: 30px; border-radius: 7px; }
.ios-sheet .tieu small { display: block; color: #8e8e93; font-size: 9.5px; }
.ios-nhom { background: #fff; border-radius: 10px; overflow: hidden; margin-top: 8px; }
.ios-dong { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; border-bottom: .5px solid #e5e5ea; font-size: 11px; }
.ios-dong:last-child { border-bottom: 0; }
.ios-dong span:last-child { color: #3c3c43; font-size: 12px; }
.ios-dong.bat { background: var(--brand-soft); outline: 2.5px solid var(--brand); outline-offset: -2.5px; border-radius: 10px; font-weight: 600; color: #000; }

/* hộp Thêm vào MH chính */
.ios-them { background: #f2f2f7; flex: 1; display: flex; flex-direction: column; }
.ios-dau { display: flex; justify-content: space-between; align-items: center; padding: 6px 12px 10px; font-size: 11.5px; }
.ios-dau b { font-weight: 600; }
.ios-dau span { color: #007aff; }
.ios-dau .bat { font-weight: 700; padding: 3px 8px; border-radius: 8px; outline: 2.5px solid var(--brand); }
.ios-the { background: #fff; margin: 0 10px; border-radius: 10px; padding: 10px; display: flex; gap: 10px; align-items: center; }
.ios-the img { width: 46px; height: 46px; border-radius: 11px; }
.ios-the div { flex: 1; min-width: 0; }
.ios-the b { display: block; font-weight: 400; font-size: 12px; border-bottom: .5px solid #d1d1d6; padding-bottom: 6px; margin-bottom: 6px; }
.ios-the small { color: #8e8e93; font-size: 10px; }
.ios-cong { background: #fff; margin: 12px 10px 0; border-radius: 10px; padding: 9px 10px; display: flex; justify-content: space-between; align-items: center; }
.cong { width: 34px; height: 20px; border-radius: 999px; background: #34c759; position: relative; flex: none; }
.cong::after { content: ""; position: absolute; right: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
.cong.tat { background: #e9e9eb; }
.cong.tat::after { right: auto; left: 2px; }
.ios-chu { color: #6d6d72; font-size: 9.5px; padding: 6px 20px 0; }
.ios-ban-phim { margin-top: auto; height: 38%; background: #d1d3d9; display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; padding: 8px 3px; align-content: start; }
.ios-ban-phim i { height: 26px; background: #fff; border-radius: 4px; box-shadow: 0 1px 0 #898a8d; }

/* màn hình chính iOS */
.ios-home {
  background: linear-gradient(160deg, #7fb2e5 0%, #b59ee0 45%, #f0a6b9 100%); color: #fff;
}
.ios-home .gio { color: #fff; }
.ios-luoi { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px 8px; padding: 16px 14px; }
.ios-app { display: grid; justify-items: center; gap: 4px; font-size: 9px; text-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.ios-app i { width: 44px; height: 44px; border-radius: 11px; background: rgba(255, 255, 255, .55); display: grid; place-items: center; font-style: normal; font-size: 22px; }
.ios-app img { width: 44px; height: 44px; border-radius: 11px; display: block; }
.ios-app.bat img { outline: 3px solid #fff; outline-offset: 3px; box-shadow: 0 0 0 7px var(--brand); }
.ios-dock { margin: auto 10px 10px; background: rgba(255, 255, 255, .35); border-radius: 24px; padding: 10px; display: flex; justify-content: space-around; }
.ios-dock i { width: 44px; height: 44px; border-radius: 11px; background: rgba(255, 255, 255, .6); display: grid; place-items: center; font-style: normal; font-size: 22px; }

/* Cài đặt iOS */
.ios-cd { padding: 0 0 10px; }
.ios-cd .ve { color: #007aff; padding: 2px 12px 0; font-size: 11px; }
.ios-cd h4 { font-size: 19px; font-weight: 700; padding: 2px 14px 8px; margin: 0; }
.ios-cd .nhom-ten { color: #6d6d72; font-size: 9px; text-transform: uppercase; padding: 10px 24px 4px; }
.ios-cd .ios-nhom { margin: 0 10px; }
.ios-cd .ios-dong span:last-child { color: #c7c7cc; }

/* bấm 3 lần nút sườn: thanh Truy cập được hướng dẫn trên ảnh PetOS */
.ios-ga { background: #000 url(/anh/ios-be-man-hinh-chinh.webp) center 58% / 100% auto no-repeat; }
.ios-ga::before { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .5); }
.ios-ga .thanh-ga {
  position: relative; z-index: 1; margin: 30px 8px 0; background: rgba(250, 250, 250, .96); border-radius: 12px;
  display: flex; justify-content: space-between; align-items: center; gap: 4px; padding: 10px 8px; font-size: 10.5px; white-space: nowrap;
}
.ios-ga .thanh-ga span { color: #007aff; }
.ios-ga .thanh-ga b { font-size: 8.5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ios-ga .thanh-ga span { flex: none; }
.ios-ga .thanh-ga .bat { font-weight: 700; padding: 3px 6px; border-radius: 8px; outline: 2.5px solid var(--brand); }
.buoc .ios-ga .goi-y { position: relative; z-index: 1; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); text-align: center; font-size: 10.5px; margin: 14px 18px 0; line-height: 1.4; }
.nut-suon {
  position: absolute; right: -4px; top: 92px; width: 4px; height: 44px; border-radius: 0 3px 3px 0; background: var(--brand); z-index: 3;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 30%, transparent);
}
.ios-wrap { position: relative; }
.phone-shot.ve { padding: 7px; }
.ve-ghi { font-size: 12px; color: var(--muted); text-align: center; }

/* bản iPhone có gì */
.co-gi { display: grid; gap: 24px; margin-top: 24px; }
@media (min-width: 860px) { .co-gi { grid-template-columns: 1fr 1fr; } }
.co-gi .box { background: var(--card); border-radius: 22px; padding: 22px; box-shadow: var(--shadow); }
.co-gi h3 { margin-bottom: 10px; }
.co-gi .ticks { margin-top: 4px; }
.chua { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 10px; color: var(--muted); }
.chua li { position: relative; padding-left: 30px; }
.chua li::before {
  content: "–"; position: absolute; left: 0; top: 2px; width: 21px; height: 21px; border-radius: 50%;
  background: var(--line); color: var(--muted); display: grid; place-items: center; font-weight: 800; font-size: 13px;
}

/* ---------------- iPhone / iPad ---------------- */
body[data-may="iphone"] .chi-ipad, body[data-may="ipad"] .chi-iphone { display: none !important; }
.chon-may { display: inline-flex; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 3px; gap: 2px; flex: none; }
.chon-may button {
  font: inherit; font-weight: 700; font-size: 14px; border: 0; background: none; color: var(--muted); padding: 6px 12px;
  border-radius: 9px; cursor: pointer; min-height: 34px;
}
.chon-may button[aria-pressed="true"] { background: var(--card); color: var(--brand-ink); box-shadow: var(--shadow); }
.chon-may.to button { font-size: 16px; padding: 9px 18px; min-height: 44px; }
.nav .chon-may { margin-left: auto; }
.nav .btn { margin-left: 8px; }
/* điện thoại hẹp: thanh trên giữ nút iPhone/iPad, bỏ Đăng nhập (đã có nút Bắt đầu cuối trang) */
@media (max-width: 479px) { .nav .js-login { display: none; } }
.doi-may { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 22px; font-weight: 600; }

/* khung iPad: ảnh thật 820×1180 hoặc màn hình vẽ lại */
.tablet-shot {
  /* khung trong thẻ bước: điện thoại hẹp thì trừ lề trang (16) và lề thẻ (22) hai bên */
  width: min(340px, calc(100vw - 80px)); padding: 10px; border-radius: 28px; background: #241b29; box-shadow: var(--shadow-lg); flex: none;
}
.tablet-shot > img { display: block; width: 100%; height: auto; border-radius: 18px; }
.ios.ipad { width: 100%; aspect-ratio: 820 / 1180; border-radius: 18px; font-size: 10px; }
.ios.ipad .gio { padding: 7px 16px 3px; font-size: 9.5px; }
.ipad-thanh { flex: none; display: flex; align-items: center; gap: 6px; padding: 3px 10px 7px; background: #f9f9f9; border-bottom: .5px solid #d8d8dc; }
.ipad-thanh .ios-dc { padding: 5px 8px; font-size: 10px; }
.ipad-nut { color: #007aff; font-size: 12px; font-weight: 600; padding: 2px 4px; border-radius: 6px; flex: none; }
.ipad-nut.bat { outline: 2.5px solid var(--brand); outline-offset: 1px; background: var(--brand-soft); }
.ipad-trang { background-image: url(/anh/ios-ipad-be-safari.webp); }
.ipad-pop {
  position: absolute; top: 58px; right: 34px; width: 56%; background: #f2f2f7; border-radius: 12px; padding: 8px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .25); z-index: 2;
}
.ipad-pop::before {
  content: ""; position: absolute; top: -6px; right: 42px; width: 12px; height: 12px; background: #f2f2f7; transform: rotate(45deg);
}
.ipad-pop .tieu { display: flex; align-items: center; gap: 8px; padding: 2px 4px 8px; border-bottom: .5px solid #d1d1d6; }
.ipad-pop .tieu img { width: 26px; height: 26px; border-radius: 6px; }
.ipad-pop .tieu small { display: block; color: #8e8e93; font-size: 9px; }
.ipad-hop {
  position: absolute; left: 50%; top: 20%; transform: translateX(-50%); width: 72%; background: #f2f2f7; border-radius: 14px;
  padding: 10px 0 16px; z-index: 2; box-shadow: 0 10px 40px rgba(0, 0, 0, .3);
}
.ipad-luoi { grid-template-columns: repeat(6, 1fr); gap: 18px 6px; padding: 26px 22px; }
.ipad-luoi .ios-app i, .ipad-luoi .ios-app img { width: 38px; height: 38px; font-size: 19px; border-radius: 10px; }
.ipad-dock { margin: auto 50px 12px; border-radius: 20px; padding: 8px; }
.ipad-dock i { width: 38px; height: 38px; font-size: 19px; }
.ipad-cd { flex: 1; display: grid; grid-template-columns: 40% 1fr; min-height: 0; }
.ipad-ben { background: #ebebf0; border-right: .5px solid #d1d1d6; padding: 0 0 10px; }
.ipad-ben h4 { font-size: 17px; font-weight: 700; padding: 6px 12px 8px; margin: 0; }
.ipad-ben .ios-nhom { margin: 0 8px 10px; }
.ipad-ben .ios-dong { padding: 6px 8px; font-size: 9.5px; }
.ipad-ben .ios-dong.chon { background: #007aff; color: #fff; }
.ipad-phai h4 { font-size: 15px; }
.ipad-phai .ios-dong { font-size: 9.5px; padding: 6px 8px; }
.ipad-phai .ios-chu { padding: 6px 14px 0; font-size: 8.5px; }
.ios-ga.ipad-ga { background-image: url(/anh/ios-ipad-be-man-hinh-chinh.webp); background-position: top center; }
.ipad-ga .thanh-ga { width: 76%; margin: 26px auto 0; }
.nut-tren {
  position: absolute; top: -4px; right: 56px; width: 44px; height: 4px; border-radius: 3px 3px 0 0; background: var(--brand); z-index: 3;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 30%, transparent);
}

/* Truy cập được hướng dẫn: nút Tùy chọn góc dưới, bảng Tùy chọn (bật nút sườn / nút trên cùng để bé tắt màn hình được) */
.ga-nut-tuy-chon {
  position: absolute; left: 12px; bottom: 14px; z-index: 1; background: rgba(250, 250, 250, .96); color: #007aff;
  border-radius: 10px; padding: 6px 10px; font-size: 10.5px; font-weight: 600;
}
.ios-ga.ga-mo::before { background: rgba(0, 0, 0, .62); }
.ga-tuy-chon {
  position: absolute; left: 8px; right: 8px; bottom: 10px; z-index: 2; background: #f2f2f7; border-radius: 14px; padding: 8px 8px 10px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .35);
}
.ipad-ga .ga-tuy-chon { left: 18%; right: 18%; bottom: 18%; }
.ga-tieu { text-align: center; font-weight: 700; font-size: 11px; padding: 2px 0 8px; }
.ga-tuy-chon .ios-dong { padding: 6px 8px; font-size: 10px; }
.ga-tuy-chon .cong { width: 30px; height: 18px; }
.ga-tuy-chon .cong::after { width: 14px; height: 14px; }
.ga-xong { text-align: center; color: #007aff; font-weight: 600; font-size: 11px; padding-top: 8px; }
