/* Nền tảng: reset, chữ, nút "đồ chơi". Màn hình cụ thể ở screens.css (bước sau). */
*, *::before, *::after { box-sizing: border-box; }

html, body { height: 100%; margin: 0; }

body {
  background: var(--c-bg);
  color: var(--c-ink);
  font-family: var(--font);
  font-size: var(--fs-md);
  font-weight: var(--fw-bold);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  -webkit-user-select: none;
  user-select: none;
  overscroll-behavior: none;
  touch-action: manipulation;
}

#app { min-height: 100%; }

h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: var(--fw-black); line-height: var(--lh-tight); }

img, svg { display: block; max-width: 100%; }

button { font: inherit; color: inherit; }

/* Focus rõ cho bàn phím và công nghệ hỗ trợ. */
:focus-visible { outline: 4px solid var(--c-sky-deep); outline-offset: 3px; border-radius: var(--r-xs); }
:focus:not(:focus-visible) { outline: none; }
[tabindex="-1"]:focus { outline: none; }   /* tiêu đề nhận focus bằng mã khi sang màn mới */

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Trang phụ huynh (Giới thiệu, Chính sách...) cho phép chọn và sao chép chữ. */
.selectable, .selectable * { -webkit-user-select: text; user-select: text; }

/* ---- Màn khởi động tạm ---- */
.boot {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: var(--safe-t) var(--safe-r) var(--safe-b) var(--safe-l);
  text-align: center;
}
.boot__text { font-size: var(--fs-3xl); font-weight: var(--fw-black); }
.boot__sub  { margin-top: var(--s-2); color: var(--c-ink-2); }
.boot__langs { display: flex; gap: var(--s-3); justify-content: center; margin-top: var(--s-5); }
.boot__warn { max-width: 36ch; margin: var(--s-5) auto 0; padding: var(--s-3) var(--s-4); border-radius: var(--r-sm); background: var(--c-oops-soft); font-size: var(--fs-sm); }

/* ---- Nút: khối nhựa có viền đáy dày, lún xuống khi chạm ---- */
.btn {
  --btn-bg: var(--c-violet);
  --btn-edge: var(--c-violet-deep);
  --btn-ink: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-3);
  min-width: var(--tap);
  min-height: var(--tap);
  padding: 0 var(--s-6);
  border: 0;
  border-radius: var(--r-pill);
  background: var(--btn-bg);
  color: var(--btn-ink);
  font-size: var(--fs-lg);
  font-weight: var(--fw-black);
  line-height: 1;
  box-shadow: 0 var(--edge) 0 var(--btn-edge);
  cursor: pointer;
  transition: transform var(--dur-1) var(--ease-out), box-shadow var(--dur-1) var(--ease-out);
}
.btn:active:not([disabled]) { transform: translateY(var(--edge)); box-shadow: 0 0 0 var(--btn-edge); }
.btn[disabled] { opacity: .45; cursor: default; }

.btn--sun   { --btn-bg: var(--c-sun);    --btn-edge: var(--c-sun-deep);    --btn-ink: var(--c-ink); }
.btn--sky   { --btn-bg: var(--c-sky);    --btn-edge: var(--c-sky-deep);    --btn-ink: var(--c-ink); }
.btn--coral { --btn-bg: var(--c-coral);  --btn-edge: var(--c-coral-deep);  --btn-ink: var(--c-ink); }
.btn--teal  { --btn-bg: var(--c-teal);   --btn-edge: var(--c-teal-deep);   --btn-ink: var(--c-ink); }
.btn--plain { --btn-bg: var(--c-surface); --btn-edge: var(--c-line);       --btn-ink: var(--c-ink); }
.btn--accent { --btn-bg: var(--accent, var(--c-violet)); --btn-edge: var(--accent-deep, var(--c-violet-deep)); --btn-ink: var(--accent-ink, #fff); }

.btn--round { width: var(--tap); padding: 0; }
.btn--lg    { min-height: 5rem; padding: 0 var(--s-7); font-size: var(--fs-xl); }
.btn--adult { min-height: var(--tap-adult); font-size: var(--fs-md); }

.btn svg { width: 1.5em; height: 1.5em; flex: none; }
