:root {
  --uw-blue: #0c2340;
  --uw-blue-deep: #07182d;
  --uw-blue-light: #1e3a5f;
  --uw-green: #23ab67;
  --uw-green-light: #73e6ac;
  --uw-red: #e31837;
  --uw-gold: #ffd700;
  --uw-gold-light: #ffe66b;
  --uw-navy: #0c2340;
  --uw-white: #ffffff;
  --uw-bg: #f8f9fa;
  --uw-bg-soft: #eef2f6;
  --uw-grey-light: #eeeeee;
  --uw-grey-mid: #dddddd;
  --uw-grey: #cccccc;
  --uw-grey-dark: #666666;
  --uw-black: #000000;
  --shadow-lg: 0 28px 60px rgba(12, 35, 64, 0.18);
  --shadow-md: 0 12px 28px rgba(12, 35, 64, 0.12);
  --radius-xl: 32px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --top-safe: max(env(safe-area-inset-top), 14px);
  --bottom-safe: max(env(safe-area-inset-bottom), 14px);
  color-scheme: light;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Roboto", sans-serif;
  background:
    radial-gradient(circle at top right, rgba(255, 215, 0, 0.2), transparent 38%),
    radial-gradient(circle at bottom left, rgba(12, 35, 64, 0.1), transparent 30%),
    linear-gradient(180deg, #f8f9fa 0%, #eef2f6 50%, #e5ebf0 100%);
  color: var(--uw-black);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  background: none;
  cursor: pointer;
}

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

/* ── Ambient orbs ── */
.ambient {
  position: fixed;
  inset: auto;
  pointer-events: none;
  z-index: 0;
  filter: blur(28px);
}

.ambient-a {
  top: 8%;
  left: 2%;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(12, 35, 64, 0.1);
}

.ambient-b {
  right: 1%;
  bottom: 6%;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: rgba(255, 215, 0, 0.12);
}

/* ── App shell & frame ── */
.app-shell {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-frame {
  width: min(430px, 100%);
  height: min(920px, calc(100dvh - 24px));
  min-height: 720px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 249, 250, 0.98));
  border: 1px solid rgba(12, 35, 64, 0.16);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(16px);
}

/* ── Header ── */
.title-bar {
  min-height: 45px;
  padding: calc(var(--top-safe) + 10px) 18px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-badge {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(160deg, #1e3a5f 0%, #0c2340 58%, #07182d 100%);
  color: var(--uw-white);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.brand-logo {
  width: 176px;
  height: auto;
  display: block;
  flex: 0 0 auto;
}

.app-badge svg {
  width: 24px;
  height: 24px;
  fill: var(--uw-white);
}

.eyebrow {
  margin: 0 0 2px;
  color: var(--uw-blue);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.title-bar h1 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 400;
}

.icon-button {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(221, 221, 221, 0.8);
  color: var(--uw-blue);
  box-shadow: var(--shadow-md);
}

.icon-button.small {
  width: 34px;
  height: 34px;
  box-shadow: none;
}

.icon-button svg,
.quick-action svg,
.nav-item svg,
.media-icon svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* ── Gadget tabs ── */
.gadget-tabs {
  padding: 0 16px 10px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.tab-button {
  min-height: 38px;
  padding: 0 10px;
  border-radius: 12px;
  background: var(--uw-grey-light);
  color: var(--uw-blue);
  font-size: 0.84rem;
  font-weight: 400;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.tab-button.is-active {
  background: var(--uw-blue);
  color: var(--uw-white);
}

.tab-button:active {
  transform: translateY(1px);
}

/* ── Screen stack ── */
.screen-stack {
  flex: 1;
  position: relative;
  min-height: 0;
}

.screen {
  display: none;
  height: 100%;
  overflow-y: auto;
  padding: 0 16px calc(var(--bottom-safe) + 92px);
  scrollbar-width: none;
}

.screen::-webkit-scrollbar {
  display: none;
}

.screen.is-active {
  display: block;
}

.hero-card,
.panel-card,
.boarding-pass {
  margin-bottom: 14px;
}

/* ── Flight hero card ── */
.hero-card {
  padding: 22px 20px;
  border-radius: 24px;
  background:
    linear-gradient(150deg, rgba(255, 215, 0, 0.18), rgba(255, 255, 255, 0.9)),
    linear-gradient(135deg, #f8f9fa 0%, #eef2f6 100%);
  border: 1px solid rgba(12, 35, 64, 0.16);
  box-shadow: var(--shadow-md);
}

.flight-route-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 18px;
}

.airport-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.airport-block-right {
  text-align: right;
  align-items: flex-end;
}

.airport-iata {
  font-size: 2.4rem;
  font-weight: 300;
  line-height: 1;
  letter-spacing: 0.04em;
  color: var(--uw-black);
}

.airport-city {
  font-size: 0.75rem;
  color: var(--uw-grey-dark);
}

.flight-route-mid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.flight-number-label {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--uw-blue);
}

.route-plane-icon {
  width: 28px;
  height: 28px;
  fill: var(--uw-blue);
  opacity: 0.7;
}

.flight-duration-label {
  font-size: 0.7rem;
  color: var(--uw-grey-dark);
}

.flight-info-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
}

.flight-info-right {
  text-align: right;
}

.hero-label,
.hero-meta,
.small-note,
.control-row p,
.action-button small,
.steps-list,
.detail-row span {
  color: var(--uw-grey-dark);
}

.hero-label {
  display: block;
  margin: 0 0 4px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.flight-time {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
  color: var(--uw-black);
}

.hero-chips-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.hero-pill,
.panel-meta,
.status-chip,
.flight-status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 25px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.75rem;
}

.hero-pill {
  background: rgba(255, 255, 255, 0.82);
  color: var(--uw-blue);
  font-weight: 500;
}

.flight-status-chip.on-time {
  background: rgba(115, 230, 172, 0.25);
  color: var(--uw-green);
  font-weight: 500;
}

.flight-status-chip.delayed {
  background: rgba(255, 180, 50, 0.2);
  color: #b07a00;
  font-weight: 500;
}

.flight-status-chip.neutral {
  background: rgba(255, 215, 0, 0.22);
  color: #8a6a10;
  font-weight: 500;
}

/* ── Panel cards ── */
.panel-card {
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.93);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  border: 1px solid rgba(221, 221, 221, 0.8);
}

.panel-header {
  min-height: 45px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(180deg, #0c2340 0%, #07182d 100%);
  color: var(--uw-white);
  font-size: 1rem;
  font-weight: 300;
}

.panel-meta {
  background: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.92);
}

/* ── Quick actions grid ── */
.quick-grid {
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.quick-action {
  min-height: 96px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(246, 246, 246, 0.94), rgba(255, 255, 255, 1));
  border: 1px solid rgba(221, 221, 221, 0.9);
  color: var(--uw-black);
  text-align: left;
}

.quick-icon {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(12, 35, 64, 0.1);
  color: var(--uw-blue);
}

/* ── Table ── */
.table-wrap {
  padding: 0 0 6px;
}

.table-head,
.table-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(80px, 0.9fr) minmax(80px, 0.8fr);
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
}

.table-head {
  background: var(--uw-grey-mid);
  font-size: 0.76rem;
  font-weight: 500;
}

.table-row {
  min-height: 52px;
  border-bottom: 1px solid rgba(221, 221, 221, 0.75);
  font-size: 0.92rem;
}

.table-row strong {
  justify-self: end;
  font-size: 0.88rem;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  background: var(--uw-grey-light);
  color: var(--uw-blue);
}

.status-chip.is-positive {
  background: rgba(115, 230, 172, 0.22);
  color: var(--uw-green);
}

/* ── Boarding pass card ── */
.boarding-pass {
  border-radius: var(--radius-lg);
  overflow: visible;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.bp-upper {
  padding: 22px 22px 20px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: linear-gradient(145deg, #07182d 0%, #0c2340 52%, #1e3a5f 100%);
  color: var(--uw-white);
}

.bp-airline-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.bp-airline-name {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.8;
}

.bp-class-badge {
  padding: 3px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--uw-gold) 0%, #ffe66b 100%);
  color: #2a1800;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bp-passenger-name {
  margin: 0 0 20px;
  font-size: 1.15rem;
  font-weight: 400;
  opacity: 0.95;
  letter-spacing: 0.02em;
}

.bp-route-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 18px;
}

.bp-airport-block {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.bp-airport-right {
  align-items: flex-end;
  text-align: right;
}

.bp-iata {
  font-size: 3rem;
  font-weight: 300;
  line-height: 1;
  letter-spacing: 0.04em;
}

.bp-city-name {
  font-size: 0.72rem;
  opacity: 0.65;
}

.bp-arrow-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding-top: 8px;
  opacity: 0.7;
}

.bp-arrow-block svg {
  width: 22px;
  height: 22px;
  fill: var(--uw-white);
}

.bp-arrow-block span {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.bp-times-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.bp-times-right {
  text-align: right;
}

.bp-time-label {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.65;
  margin-bottom: 3px;
}

.bp-time-value {
  font-size: 1.35rem;
  font-weight: 300;
  letter-spacing: 0.05em;
}

/* Tear line */
.bp-tear {
  height: 28px;
  background: linear-gradient(145deg, #07182d 0%, #0c2340 52%, #1e3a5f 100%);
  position: relative;
  display: flex;
  align-items: center;
  overflow: visible;
}

.bp-tear::before {
  content: "";
  position: absolute;
  left: 24px;
  right: 24px;
  top: 50%;
  border-top: 2px dashed rgba(255, 255, 255, 0.25);
}

.bp-notch {
  position: absolute;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(248, 249, 250, 0.98), rgba(248, 249, 250, 0.98));
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
}

.bp-notch-l {
  left: -14px;
  box-shadow: inset -4px 0 8px rgba(0, 40, 80, 0.12);
}

.bp-notch-r {
  right: -14px;
  box-shadow: inset 4px 0 8px rgba(0, 40, 80, 0.12);
}

/* Boarding pass lower section */
.bp-lower {
  padding: 20px 22px;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  background: var(--uw-white);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
  border: 1px solid rgba(221, 221, 221, 0.6);
  border-top: 0;
  box-shadow: 0 8px 24px rgba(0, 42, 82, 0.1);
}

.bp-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 20px;
}

.bp-detail-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--uw-grey-dark);
  margin-bottom: 3px;
}

.bp-detail-value {
  font-size: 0.96rem;
  font-weight: 500;
  color: var(--uw-black);
}

.bp-qr {
  width: 96px;
  height: 96px;
  flex-shrink: 0;
  border: 1px solid rgba(221, 221, 221, 0.7);
  border-radius: 8px;
  padding: 5px;
  background: white;
}

.bp-qr svg {
  width: 100%;
  height: 100%;
}

/* ── Control rows (used on boarding & more screens) ── */
.control-list {
  padding: 6px 0;
}

.control-row {
  min-height: 68px;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(221, 221, 221, 0.75);
}

.control-row strong {
  font-weight: 500;
}

.control-row p {
  margin: 4px 0 0;
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--uw-grey-dark);
}

/* ── Loyalty hero ── */
.loyalty-hero {
  padding: 18px 14px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(221, 221, 221, 0.75);
}

.loyalty-tier {
  display: flex;
  align-items: center;
  gap: 12px;
}

.loyalty-icon {
  width: 32px;
  height: 32px;
  fill: var(--uw-gold);
  filter: drop-shadow(0 2px 4px rgba(255, 215, 0, 0.3));
}

.loyalty-tier-name {
  display: block;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--uw-black);
}

.loyalty-pts {
  display: block;
  font-size: 0.82rem;
  color: var(--uw-grey-dark);
  margin-top: 2px;
}

/* ── Toggle switch ── */
.switch {
  position: relative;
  width: 54px;
  height: 30px;
  flex: 0 0 auto;
}

.switch input {
  position: absolute;
  opacity: 0;
  inset: 0;
}

.switch span {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--uw-grey-mid);
  transition: background-color 0.2s ease;
}

.switch span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--uw-white);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease;
}

.switch input:checked + span {
  background: var(--uw-blue);
}

.switch input:checked + span::after {
  transform: translateX(24px);
}

/* ── Link & ghost buttons ── */
.link-button,
.ghost-button {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 12px;
  color: var(--uw-blue);
  background: rgba(12, 35, 64, 0.08);
  white-space: nowrap;
}

.ghost-button {
  border: 1px solid rgba(12, 35, 64, 0.2);
}

/* ── Details list ── */
.details-list {
  padding: 4px 0;
}

.detail-row {
  min-height: 56px;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(221, 221, 221, 0.75);
}

.detail-row strong {
  font-weight: 500;
  font-size: 0.9rem;
  text-align: right;
}

/* ── Support screen ── */
.support-card {
  padding-bottom: 16px;
}

.support-status {
  margin: 16px 16px 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(12, 35, 64, 0.08);
  color: var(--uw-blue);
  font-size: 0.92rem;
  line-height: 1.45;
}

.support-status[data-state="success"] {
  background: rgba(115, 230, 172, 0.22);
  color: var(--uw-green);
}

.support-status[data-state="error"] {
  background: rgba(241, 75, 75, 0.16);
  color: #b52727;
}

.support-form {
  padding: 16px;
}

.field-group {
  margin-bottom: 14px;
}

.field-group label {
  display: block;
  margin-bottom: 7px;
  font-size: 0.85rem;
  color: var(--uw-grey-dark);
}

.field-group input,
.field-group select {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid var(--uw-grey-mid);
  background: var(--uw-white);
  color: var(--uw-black);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  appearance: none;
}

.field-group select {
  background-image:
    linear-gradient(45deg, transparent 50%, var(--uw-blue) 50%),
    linear-gradient(135deg, var(--uw-blue) 50%, transparent 50%);
  background-position:
    calc(100% - 21px) calc(50% - 3px),
    calc(100% - 15px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.field-group input:focus,
.field-group select:focus {
  outline: none;
  border-color: var(--uw-blue);
  box-shadow: 0 0 0 4px rgba(255, 215, 0, 0.22);
}

.channel-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.media-button {
  min-height: 90px;
  padding: 14px 10px;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--uw-grey-light);
  color: var(--uw-blue);
  border: 1px solid rgba(221, 221, 221, 0.9);
  text-align: center;
}

.media-button.is-active {
  background: linear-gradient(180deg, #0c2340 0%, #07182d 100%);
  color: var(--uw-white);
}

.media-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.18);
}

.media-button:not(.is-active) .media-icon {
  background: rgba(12, 35, 64, 0.1);
}

.support-footer {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.small-note {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.5;
}

/* ── Action buttons ── */
.stack-actions {
  padding: 16px;
  display: grid;
  gap: 12px;
}

.action-button {
  min-height: 68px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(246, 246, 246, 1));
  border: 1px solid rgba(221, 221, 221, 0.8);
  text-align: left;
}

.action-button span {
  color: var(--uw-black);
  font-weight: 500;
}

.featured-action {
  border-color: rgba(227, 24, 55, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 247, 247, 1)),
    linear-gradient(90deg, rgba(227, 24, 55, 0.12), rgba(255, 215, 0, 0.12));
}

.featured-action span {
  color: var(--uw-red);
}

/* ── Steps list ── */
.steps-list {
  margin: 0;
  padding: 16px 16px 16px 34px;
  line-height: 1.8;
  color: var(--uw-grey-dark);
}

/* ── Bottom navigation ── */
.bottom-nav {
  position: sticky;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 10px 12px calc(var(--bottom-safe) + 6px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0.96));
  border-top: 1px solid rgba(221, 221, 221, 0.75);
  backdrop-filter: blur(18px);
}

.nav-item {
  min-height: 58px;
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: var(--uw-grey-dark);
  border-radius: 16px;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-item span {
  font-size: 0.78rem;
}

.nav-item.is-active {
  color: var(--uw-blue);
  background: rgba(12, 35, 64, 0.09);
}

/* ── Modal ── */
.modal-shell {
  position: fixed;
  inset: 0;
  z-index: 20;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 21, 40, 0.46);
  backdrop-filter: blur(6px);
}

.modal-card {
  position: absolute;
  inset: auto 16px calc(var(--bottom-safe) + 12px);
  height: min(72dvh, 640px);
  border-radius: 24px;
  overflow: hidden;
  background: var(--uw-white);
  box-shadow: var(--shadow-lg);
}

.modal-header {
  min-height: 52px;
}

#case-pop {
  width: 100%;
  height: calc(100% - 112px);
  border: 0;
  background: var(--uw-bg);
}

.modal-footer {
  padding: 12px 14px 16px;
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid rgba(221, 221, 221, 0.75);
}

/* ── Responsive ── */
@media (max-width: 540px) {
  .app-shell {
    padding: 0;
  }

  .app-frame {
    width: 100%;
    min-height: 100dvh;
    height: 100dvh;
    border-radius: 0;
    border: 0;
    box-shadow: none;
  }

  .modal-card {
    inset: auto 0 0;
    height: min(78dvh, 680px);
    border-radius: 24px 24px 0 0;
  }

  .bp-notch-l {
    left: -8px;
  }

  .bp-notch-r {
    right: -8px;
  }
}

@media (max-width: 380px) {
  .channel-group {
    grid-template-columns: 1fr;
  }

  .support-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .gadget-tabs {
    grid-template-columns: repeat(2, 1fr);
  }

  .bp-iata {
    font-size: 2.2rem;
  }

  .bp-lower {
    grid-template-columns: 1fr;
  }

  .bp-qr {
    width: 80px;
    height: 80px;
    margin: 0 auto;
  }
}

@media (display-mode: standalone) {
  body {
    background: linear-gradient(180deg, #eef7ff 0%, #e4f2fb 100%);
  }

  .app-shell {
    padding: 0;
  }

  .app-frame {
    width: 100%;
    height: 100dvh;
    min-height: 100dvh;
    border-radius: 0;
    border: 0;
    box-shadow: none;
  }
}

body.is-standalone .app-shell {
  padding: 0;
}

body.is-standalone .app-frame {
  width: 100%;
  height: 100dvh;
  min-height: 100dvh;
  border-radius: 0;
  border: 0;
  box-shadow: none;
}
