/* Mobile SPA — phone portrait, capped on wider viewports */
body { padding-bottom: 64px; }
.screen-stack {
  padding: 20px 16px;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
}
.screen-m { min-height: 0; }
.m-title { font-size: 22px; margin: 12px 0 6px; font-weight: 600; }
.m-sub { color: var(--muted); margin: 0 0 22px; font-size: 14px; line-height: 1.4; }

/* Registration form */
.lab { display: block; font-size: 13px; color: var(--muted); margin: 18px 0 6px;
       text-transform: uppercase; letter-spacing: 0.05em; }
input[type=tel] {
  width: 100%; font-size: 24px; padding: 14px 16px;
  border-radius: 10px; border: 1px solid var(--divider);
  letter-spacing: 0.15em; font-family: 'SF Mono', Menlo, Consolas, monospace;
  background: #fafafa;
}
input[type=tel]:focus { outline: none; border-color: var(--saffron); background: #fff; }
#btn-register { margin-top: 24px; }
.reg-msg { min-height: 26px; color: var(--error); font-size: 14px; margin-top: 14px; text-align: center; }

/* Home content */
.welcome { font-size: 20px; font-weight: 600; margin-bottom: 16px; }
.section-title { font-size: 14px; color: var(--muted); margin: 18px 0 10px; letter-spacing: 0.05em; text-transform: uppercase; }
.row { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border: 1px solid var(--divider); border-radius: 10px; margin-bottom: 10px; font-size: 16px; gap: 10px; }
.row .info { line-height: 1.35; }
.row .info .secondary-text { color: var(--muted); font-size: 13px; }
.empty { text-align: center; color: var(--muted); padding: 40px 0; font-size: 18px; }

/* Scanner / photo */
.scanner-frame {
  margin: 14px 0; background: #000; border-radius: 12px;
  aspect-ratio: 4 / 3; overflow: hidden; position: relative;
}
.scanner-frame video { width: 100%; height: 100%; object-fit: cover; }
.scan-msg { text-align: center; color: var(--muted); min-height: 24px; margin-bottom: 14px; }
.cam-msg { text-align: center; padding: 60px 16px 24px; font-size: 18px; }

/* Header tightened for narrow phones */
@media (max-width: 480px) {
  .header { padding: 10px 14px; }
  .header .logo { width: 38px; height: 38px; font-size: 19px; border-radius: 7px; }
  .header .title .main { font-size: 17px; }
  .header .title #screen-title { font-size: 13px; }
  .header .meta .time { font-size: 18px; }
  .header .meta { font-size: 12px; }
}

/* Tab bar */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0;
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  background: white; border-top: 1px solid var(--divider); z-index: 20;
}
.tabbar.hidden { display: none !important; }
.tab {
  background: none; border: 0; padding: 14px 0;
  font-size: 14px; color: var(--muted); cursor: pointer;
}
.tab.active { color: var(--saffron); font-weight: 600; }
.btn.full + .btn.full { margin-top: 8px; }
