/* #162929 — Web app thật: khung điện thoại giữa màn hình. Toàn bộ lớp màn dùng lại đúng
   class + bảng màu của mockup (theme.css chép nguyên từ trang 145444); tệp này chỉ đổi
   cách đặt khung (mockup vẽ trong khung 390×844 thu nhỏ, app chạy tràn khung nhìn). */
html {
  background: #0a0a0b;
}
body {
  margin: 0;
  min-height: 100%;
}
#app {
  position: relative;
  width: 100%;
  max-width: 440px;
  min-height: 100vh;
  margin: 0 auto;
  background: var(--bg);
  color: var(--fg);
  font-family: "Inter", "Be Vietnam Pro", system-ui, sans-serif;
  box-shadow: 0 0 0 1px #1b1b1f;
}
.scr {
  position: relative;
  width: auto;
  height: auto;
  min-height: 100vh;
  transform: none;
  overflow: visible;
  background: var(--bg);
  color: var(--fg);
  font-size: 16px;
  line-height: 1.5;
}
/* nội dung dừng trên thanh điều hướng nổi */
.co-nav-pad {
  padding-bottom: 112px;
}
.nav {
  position: fixed;
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  bottom: 24px;
  width: min(300px, calc(100% - 48px));
  height: 62px;
  padding-bottom: 0;
  border: 0;
  z-index: 20;
}
.nav .add svg.i {
  stroke: #fff;
}
.cbox {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  right: auto;
  width: min(400px, calc(100% - 24px));
  bottom: 24px;
  z-index: 20;
}
a.post,
a.res,
a.m1-nt,
a.m1-qi,
a.m1-lk {
  display: block;
  color: inherit;
  text-decoration: none;
}
.top,
.back {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
}
.back .btn.p {
  padding: 6px 16px;
}
/* ô nhập thật thay cho chữ mẫu trong mockup */
input.ttl,
input.inp,
textarea.area {
  width: 100%;
  border: 0;
  background: none;
  color: var(--fg);
  font: inherit;
  outline: none;
}
input.ttl {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.35;
  border-bottom: 1px solid var(--bd);
  padding: 6px 0 10px;
}
textarea.area {
  min-height: 72px;
  resize: none;
}
.sbar .q input {
  flex: 1;
  border: 0;
  background: none;
  color: var(--fg);
  font: inherit;
  outline: none;
  min-width: 0;
}
.m1-sheet {
  /* mockup đặt tuyệt đối trong khung 390×844; app chạy tràn màn hình nên ghim vào đáy khung nhìn */
  position: fixed;
  left: 50%;
  right: auto;
  bottom: 12px;
  transform: translateX(-50%);
  width: min(414px, calc(100% - 24px));
  z-index: 30;
  /* #162954: khay nhiều ô nhập (Đăng tìm đội) cao hơn khung nhìn điện thoại ⇒ cuộn trong khay,
     phần đầu (ô nhập) không bị đẩy ra ngoài màn hình. */
  max-height: calc(100vh - 24px);
  overflow-y: auto;
}
.m1-dim {
  position: fixed;
  inset: 0;
  z-index: 29;
}
/* M1-13: ô mã 6 số là <input> thật (mockup vẽ <span>) — cùng cỡ với .code span */
.code input {
  width: 46px;
  height: 58px;
  border-radius: 16px;
  border: 2px solid #3a3a40;
  background: var(--card);
  color: var(--fg);
  text-align: center;
  font: 700 28px "Inter", "Be Vietnam Pro", sans-serif;
  outline: none;
}
.code input:focus {
  border-color: var(--ac);
  box-shadow: 0 0 0 3px #ff5a1f33;
}
#toast {
  position: fixed;
  left: 50%;
  bottom: 108px;
  transform: translateX(-50%);
  background: var(--fg);
  color: var(--bg);
  border-radius: 99px;
  padding: 9px 18px;
  font-size: 15px;
  font-weight: 600;
  z-index: 40;
  max-width: 82vw;
}
#toast[hidden] {
  display: none;
}
.empty-box {
  padding: 28px 16px;
  color: var(--mu);
  text-align: center;
}
/* thanh chọn ảnh: dùng lại .photos của mockup */
.photos input[type="file"] {
  display: none;
}
.photos .addp {
  cursor: pointer;
}
/* M1-12: khối đăng nhập email nằm dưới 2 nút SSO (mockup không có — chỉ hiện khi máy chủ bật). */
.login .dn {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}
.login .dn input {
  border: 1px solid var(--bd);
  border-radius: 99px;
  background: var(--card);
  color: var(--fg);
  font: inherit;
  padding: 13px 18px;
  outline: none;
}
.login .dn input:focus {
  border-color: var(--ac);
}

/* #162954 (QA lượt 2): dải chip lọc (.m3-ch ở /kenh, .m3-fil ở /tim-doi) dài theo số kênh/phụ bản nên
   đẩy cả trang rộng ra (390 px đã tràn khi có 6 phụ bản, 320 px tràn từ 3). Cho dải tự cuộn ngang.
   theme-m3.css chép nguyên mockup nên sửa bù ở đây, không sửa tệp theme. */
.m3-ch,
.m3-fil {
  overflow-x: auto;
  scrollbar-width: none;
}
.m3-ch::-webkit-scrollbar,
.m3-fil::-webkit-scrollbar {
  display: none;
}
@media (max-width: 360px) {
  /* bài Tìm đội: chỗ trống + nút Tham gia không đủ một hàng ở 320 px ⇒ nút xuống hàng dưới */
  .m3-lfg .ft {
    flex-wrap: wrap;
  }
}
