/* The hosted demo's hub (web/hosted): the passcode gate, drawn as an iPhone lock screen, then the
   three pages. On top of phone.css. */
:root {
  --app: #8a1538;
  --app-press: #6f102c;
  --app-soft: rgb(138 21 56 / 0.1);
  --app-ring: rgb(138 21 56 / 0.35);
}

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

/* ---------- Locked: the lock screen's wallpaper, white status bar, no app header ---------- */
.phone.locked {
  color: #fff;
  background:
    radial-gradient(120% 70% at 85% 0%, rgb(214 64 104 / 0.55), transparent 60%),
    radial-gradient(110% 60% at 0% 100%, rgb(70 18 120 / 0.55), transparent 65%),
    linear-gradient(170deg, #5e0d27 0%, #2a0713 55%, #0d0a14 100%);
}
.phone.locked .statusbar { color: #fff; }
.phone.locked::after { background: rgb(255 255 255 / 0.85); }
.phone.locked .appbar { display: none; }
.phone.locked .content { padding: 0 24px; }
.phone.locked .spinner { border-color: rgb(255 255 255 / 0.2); border-top-color: #fff; }

.lock {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  padding: calc(28px + env(safe-area-inset-top)) 0 calc(24px + var(--home));
  text-align: center;
  animation: enter var(--dur) var(--ease) both;
}
@media (min-width: 480px) {
  .lock { padding-top: 6px; }
}
.lock-top { display: flex; flex-direction: column; align-items: center; }
.lock-glyph { width: 22px; height: 22px; opacity: 0.9; }
.lock-date { margin: 10px 0 0; font-size: 17px; font-weight: 600; opacity: 0.85; }
.lock-time {
  margin: -2px 0 0;
  font-size: 88px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 24px rgb(0 0 0 / 0.25);
}

.lock-entry {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
  margin: auto 0;
  padding-bottom: 40px;
}
.lock-entry h1 { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.lock-field {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  max-width: 300px;
  padding: 5px 5px 5px 16px;
  border-radius: 14px;
  background: rgb(255 255 255 / 0.16);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  backdrop-filter: blur(24px) saturate(1.4);
  box-shadow: inset 0 0 0 0.5px rgb(255 255 255 / 0.25);
  transition: box-shadow var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
[dir="rtl"] .lock-field { padding: 5px 16px 5px 5px; }
.lock-field:focus-within { background: rgb(255 255 255 / 0.22); box-shadow: inset 0 0 0 0.5px rgb(255 255 255 / 0.4), 0 0 0 3px rgb(255 255 255 / 0.25); }
.lock-field input {
  flex: 1;
  min-width: 0;
  height: 38px;
  padding: 0;
  border: 0;
  font: inherit;
  font-size: 18px;
  letter-spacing: 0.18em;
  color: #fff;
  caret-color: #fff;
  background: transparent;
  outline: none;
}
.lock-field input::selection { color: #fff; background: rgb(255 255 255 / 0.32); }
.lock-field button {
  display: grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  color: #2a0713;
  background: #fff;
  cursor: pointer;
  transition: opacity var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.lock-field button svg { width: 20px; height: 20px; }
[dir="rtl"] .lock-field button svg { transform: scaleX(-1); }
.lock-field button:disabled { opacity: 0.5; }
.lock-field button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.lock-field.shake { animation: shake 420ms var(--ease); }
@keyframes shake {
  20% { transform: translateX(-10px); }
  40% { transform: translateX(9px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(3px); }
}
.lock-error { margin: 0; max-width: 300px; font-size: 14px; font-weight: 550; color: #ffb4c4; }
.lock-help { margin: 0; font-size: 13px; opacity: 0.7; }

/* ---------- Unlocked: the three pages ---------- */
#open { gap: 14px; }
.hub-links {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius-card);
  background: var(--paper);
  box-shadow: var(--shadow-card);
}
.hub-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 14px 14px 16px;
  color: var(--ink);
  text-decoration: none;
  transition: background var(--dur-fast) var(--ease);
}
.hub-link + .hub-link { box-shadow: inset 0 0.5px 0 var(--line); }
.hub-tile {
  display: grid;
  place-items: center;
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(160deg, color-mix(in srgb, var(--tile) 78%, #fff), var(--tile) 60%);
  box-shadow: 0 6px 14px -6px color-mix(in srgb, var(--tile) 70%, transparent);
}
.hub-tile svg { width: 24px; height: 24px; }
.hub-link.chat { --tile: #8a1538; }
.hub-link.id { --tile: #14486b; }
.hub-link.pay { --tile: #0b6b4f; }
.hub-text { display: flex; flex: 1; flex-direction: column; gap: 1px; min-width: 0; }
.hub-text strong { font-size: 16px; font-weight: 650; letter-spacing: -0.01em; }
.hub-text span { color: var(--ink-2); font-size: 13px; }
.hub-text .hub-ar { align-self: flex-start; font-family: var(--font-ar); color: var(--ink-3); }
.hub-chev { flex: none; width: 18px; height: 18px; color: var(--ink-3); }
.hub-link:hover { background: var(--ground); }
.hub-link:active { background: var(--fill); }
.hub-link:focus-visible { outline: 2px solid var(--app-ring); outline-offset: -2px; }

.hub-note { margin: 0; color: var(--ink-3); font-size: 13px; text-align: center; }
.hub-note code { font-family: var(--mono); }
