/* ============================================================
   Tapliner guest app — check-in, cheers, and party stats
   Shares tokens/base styles with assets/styles.css; this file
   only adds the app-specific layout and components.
   ============================================================ */

.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: .8rem;
  min-height: 68px;
  padding: 0 20px;
  backdrop-filter: blur(18px);
  background: rgba(22, 20, 18, .78);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.app-header .brand { font-size: 1.1rem; }
.app-header .logo-mark { width: 38px; height: 38px; }
.app-back {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 50%;
  color: var(--warm-white);
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
}
.app-back svg { width: 18px; height: 18px; }

.app-shell {
  min-height: calc(100vh - 68px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.2rem 20px 3rem;
}
.app-shell-wide { align-items: flex-start; padding-top: 1.6rem; }
.app-shell-wide > * { width: 100%; max-width: 460px; margin: 0 auto; }

/* ---------- Screen toggling (index.html) ---------- */
.app-screen { display: none; width: 100%; }
.app-screen.active { display: flex; justify-content: center; }

.app-card {
  width: 100%;
  max-width: 420px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-xl);
  padding: clamp(1.6rem, 5vw, 2.4rem);
  text-align: center;
  box-shadow: var(--shadow);
}
.app-card-left { text-align: left; }
.app-card h1 {
  margin: 0 0 .7rem;
  font-size: clamp(1.7rem, 6vw, 2.1rem);
  letter-spacing: -.05em;
  line-height: 1.05;
  color: var(--warm-white);
}
.app-card p { margin: 0 0 1.3rem; color: rgba(255,250,243,.68); line-height: 1.6; }
.app-card-left p { max-width: none; }

.app-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 1.1rem;
  border-radius: 18px;
  background: rgba(236,207,156,.12);
  color: var(--sand);
}
.app-icon svg { width: 28px; height: 28px; }

.btn-block { width: 100%; }

.app-link {
  display: inline-block;
  margin-top: 1rem;
  font-size: .88rem;
  font-weight: 800;
  color: var(--sand);
}
.app-link:hover { text-decoration: underline; }
.app-link-ghost {
  display: block;
  width: 100%;
  margin-top: .9rem;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: .85rem;
  font-weight: 750;
  color: rgba(255,250,243,.55);
  cursor: pointer;
}
.app-link-ghost:hover { color: var(--warm-white); }

/* ---------- Tap chip ---------- */
.app-tap-chip {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: 1rem;
  padding: .5rem .85rem;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  font-size: .8rem;
  font-weight: 800;
  color: rgba(255,250,243,.8);
}
.app-tap-chip i {
  width: .55rem;
  height: .55rem;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ---------- Check-in form ---------- */
.app-card-left .eyebrow { color: var(--sand); }
.app-field { display: grid; gap: .45rem; margin-bottom: 1.05rem; }
.app-field label { color: rgba(255,250,243,.82); font-size: .88rem; font-weight: 850; }
.app-field input {
  width: 100%;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 15px;
  background: rgba(255,255,255,.06);
  color: var(--warm-white);
  padding: .9rem 1rem;
  font: inherit;
  outline: none;
  color-scheme: dark;
}
.app-field input:focus { border-color: rgba(236,207,156,.6); box-shadow: 0 0 0 4px rgba(236,207,156,.12); }
.app-hint { font-size: .8rem; color: rgba(255,250,243,.5); margin: .4rem 0 0; }
.req { color: #ff9a86; font-weight: 900; }

.app-checkbox {
  display: flex;
  align-items: center;
  gap: .65rem;
  margin: 0 0 1.05rem;
  font-size: .9rem;
  font-weight: 700;
  color: rgba(255,250,243,.85);
  cursor: pointer;
}
.app-checkbox input { width: 18px; height: 18px; accent-color: var(--amber); flex-shrink: 0; }

.app-fineprint { margin: 1rem 0 0; font-size: .78rem; color: rgba(255,250,243,.45); line-height: 1.5; text-align: center; }

/* ---------- Cheers screen ---------- */
.app-cheers-badge {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: var(--sand);
  color: var(--charcoal);
}
.app-cheers-badge svg { width: 26px; height: 26px; }

.app-stat-row, .app-stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .7rem;
  margin: 1.3rem 0 .5rem;
}
.app-stat-tile {
  border-radius: 16px;
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.08);
  padding: .95rem 1rem;
  display: grid;
  gap: .18rem;
}
.app-stat-tile span {
  font-size: 1.7rem;
  font-weight: 950;
  letter-spacing: -.05em;
  line-height: 1.05;
  color: var(--warm-white);
  font-variant-numeric: tabular-nums;
}
.app-stat-tile-text span { font-size: 1.05rem; letter-spacing: -.02em; line-height: 1.25; }
.app-stat-tile small {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-weight: 850;
  color: rgba(255,250,243,.5);
}

/* ---------- Party stats page ---------- */
.app-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .4rem .85rem;
  border-radius: 999px;
  background: rgba(236,207,156,.1);
  border: 1px solid rgba(236,207,156,.24);
  color: var(--sand);
  font-size: .74rem;
  font-weight: 850;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: .8rem;
}
.app-party-head { margin-bottom: 1.3rem; }
.app-party-head h1 {
  margin: 0;
  font-size: clamp(1.7rem, 6vw, 2.1rem);
  letter-spacing: -.05em;
  color: var(--warm-white);
}
.app-stat-grid { margin-bottom: 1.4rem; }

.app-panel {
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  padding: 1.2rem 1.15rem;
  margin-bottom: 1.1rem;
}
.app-panel-title {
  margin: 0 0 .9rem;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-weight: 900;
  color: var(--sand);
}

.app-leaderboard { display: grid; gap: .55rem; }
.app-lb-row { display: flex; align-items: center; gap: .7rem; padding: .3rem 0; }
.app-lb-rank { flex: 0 0 26px; font-weight: 950; font-size: .82rem; color: rgba(255,250,243,.4); font-variant-numeric: tabular-nums; }
.app-lb-main { flex: 1; min-width: 0; }
.app-lb-top { display: flex; justify-content: space-between; align-items: baseline; gap: .7rem; margin-bottom: .35rem; }
.app-lb-top strong { font-size: .92rem; letter-spacing: -.02em; color: var(--warm-white); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-lb-top span { font-size: .74rem; font-weight: 800; color: rgba(255,250,243,.5); white-space: nowrap; }
.app-lb-bar { height: 8px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; }
.app-lb-bar i { display: block; height: 100%; border-radius: 99px; }

.app-photo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.app-photo { border-radius: 14px; overflow: hidden; aspect-ratio: 1; }
.app-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

.app-empty { color: rgba(255,250,243,.45); font-size: .88rem; margin: 0; padding: .3rem 0; }

@media (max-width: 480px) {
  .app-header { padding: 0 16px; }
  .app-shell { padding: 1.6rem 16px 2.4rem; }
  .app-card { padding: 1.5rem 1.3rem; }
}
