*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body {
  /* direction comes from <html dir>, toggled by the i18n layer (rtl/ltr). */
  min-height: 100vh;
  display: flex;
  justify-content: center;
}

#app {
  width: 100%;
  max-width: 390px;
  min-height: 100vh;
  position: relative;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}

button {
  font-family: inherit;
  background: none;
  border: 0;
  color: inherit;
  cursor: pointer;
  padding: 0;
}

a { color: inherit; text-decoration: none; }

/* Small "+N GB" marker for purchased extra volume, shown on the sub cards and
   the detail usage card. Green to read as bonus quota. */
.extra-badge { color: var(--success); font-weight: 600; white-space: nowrap; }

/* Inline icon SVGs have no intrinsic size — without a default here they
   blow up to fill whatever button contains them. */
svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* The back-arrow glyph is authored pointing left (ltr "back"). Under rtl the
   reading direction flips, so "back" points right — mirror the icon to match. */
[dir="rtl"] .back-btn svg { transform: scaleX(-1); }

/* ---- Beta gate (Mini App limited to allowlisted accounts) ---- */
.beta-gate {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
  padding: 32px 28px calc(32px + env(safe-area-inset-bottom));
}
.beta-gate .beta-icon {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-full);
  background: var(--accent-soft, rgba(255, 106, 0, .14));
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}
.beta-gate .beta-icon svg { width: 32px; height: 32px; }
.beta-gate .beta-title { font-size: 19px; font-weight: 700; color: var(--text-primary); }
.beta-gate .beta-msg {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
  max-width: 320px;
}
.beta-gate .beta-support {
  margin-top: 8px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  font-size: 14px;
  padding: 12px 24px;
  border-radius: var(--radius-full);
}
