:root {
    --pad: 16px;
    --radius: 14px;
  }
  
  html, body {
    margin: 0;
    height: 100%;
  }
  
  body {
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial;
    background: #000;
    overflow: hidden;
  }
  
  .ui {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: end center;
    padding: calc(var(--pad) + env(safe-area-inset-bottom)) var(--pad)
             calc(var(--pad) + env(safe-area-inset-bottom)) var(--pad);
    pointer-events: none;
  }
  
  .card {
    width: min(520px, 100%);
    background: rgba(15, 18, 25, 0.75);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--radius);
    padding: 14px;
    color: #fff;
    backdrop-filter: blur(10px);
    pointer-events: auto;
    box-sizing: border-box;
  }
  
  .title {
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 6px;
  }
  
  .hint {
    opacity: 0.85;
    font-size: 14px;
    margin-bottom: 10px;
  }
  
  .btn {
    width: 100%;
    min-height: 48px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.10);
    color: #fff;
    font-weight: 650;
    font-size: 16px;
    -webkit-tap-highlight-color: transparent;
  }
  
  .btn:disabled {
    opacity: 0.55;
  }
  
  .status {
    margin-top: 10px;
    font-size: 13px;
    opacity: 0.9;
  }
  
  .tips {
    margin-top: 10px;
    font-size: 12px;
    opacity: 0.7;
    line-height: 1.35;
  }
  
  /* small phones portrait (e.g., older devices 320–360 CSS px) */
  @media (max-width: 380px) {
    .title { font-size: 16px; }
    .hint { font-size: 13px; }
    .btn { font-size: 15px; }
    .tips { font-size: 11px; }
  }
  
  /* typical phone portrait up to ~480px */
  @media (max-width: 480px) {
    .card { padding: 12px; }
    .btn { min-height: 46px; }
  }
  