:root { color-scheme: light; font-family: "Segoe UI", Arial, sans-serif; background: #fff; color: #25163d; }
* { box-sizing: border-box; }
body { min-height: 100vh; min-height: 100dvh; margin: 0; background: #fff; }
button { font: inherit; }
.config-loading .welcome-card { visibility: hidden; }
.app-mode { overflow: hidden; background: #fff; }
.app-mode .page-shell, .app-mode .dialog-backdrop { display: none; }
.installed-app { position: fixed; inset: 0; z-index: 100; width: 100%; height: 100vh; height: 100dvh; background: #fff; }
.installed-app[hidden], .installed-app iframe[hidden] { display: none; }
.installed-app iframe { position: relative; z-index: 1; display: block; width: 100%; height: 100%; border: 0; background: #fff; }
.app-loading { position: absolute; inset: 0; z-index: 2; display: grid; place-content: center; justify-items: center; gap: 18px; color: #5b21b6; background: #fff; font-weight: 700; }
.app-loading[hidden] { display: none; }
.app-loading img { object-fit: contain; filter: drop-shadow(0 12px 18px rgba(109, 40, 217, .2)); }
.page-shell { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: max(24px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom)); }
.welcome-card { width: min(100%, 620px); padding: clamp(32px, 7vw, 64px); text-align: center; background: rgba(255, 255, 255, .9); border: 1px solid rgba(109, 40, 217, .12); border-radius: 28px; box-shadow: 0 24px 70px rgba(70, 35, 120, .16); }
.brand-icon { max-width: min(220px, 70%); object-fit: contain; filter: drop-shadow(0 12px 18px rgba(109, 40, 217, .2)); }
.eyebrow { margin: 22px 0 8px; color: #6d28d9; font-weight: 800; letter-spacing: .18em; }
h1 { margin: 0; font-size: clamp(2rem, 6vw, 3.7rem); line-height: 1.35; }
.lead { margin: 20px auto 30px; max-width: 460px; color: #68547f; font-size: 1.05rem; line-height: 1.8; }
.action-stack { display: grid; gap: 12px; width: min(100%, 330px); margin: 0 auto; }
.order-button { display: grid; min-height: 54px; place-items: center; padding: 12px 24px; border-radius: 15px; color: #fff; background: #6d28d9; box-shadow: 0 10px 24px rgba(109, 40, 217, .28); font-weight: 700; text-decoration: none; }
.order-button:hover { background: #581cbb; }
.order-button[hidden] { display: none; }
.primary-button { min-height: 52px; padding: 12px 24px; border: 0; border-radius: 15px; color: #fff; background: #6d28d9; box-shadow: 0 10px 24px rgba(109, 40, 217, .28); cursor: pointer; font-weight: 700; }
.action-stack .primary-button { color: #5b21b6; background: #fff; border: 1px solid rgba(109, 40, 217, .3); box-shadow: none; }
.action-stack .primary-button:hover { background: #f7f2ff; }
.primary-button:hover { background: #581cbb; }
.primary-button:focus-visible, .close-button:focus-visible, .text-button:focus-visible, .order-button:focus-visible { outline: 3px solid #a78bfa; outline-offset: 3px; }
.dialog-backdrop { position: fixed; inset: 0; z-index: 10; display: grid; place-items: end center; padding: 20px max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); background: rgba(28, 18, 45, .62); backdrop-filter: blur(5px); }
.dialog-backdrop[hidden] { display: none; }
.install-dialog { position: relative; width: min(100%, 470px); padding: 30px 24px 20px; text-align: center; background: #fff; border-radius: 26px; box-shadow: 0 25px 80px rgba(0, 0, 0, .28); }
.close-button { position: absolute; inset: 12px 12px auto auto; width: 42px; height: 42px; border: 0; border-radius: 50%; background: #f1eaff; color: #5b21b6; cursor: pointer; font-size: 1.8rem; line-height: 1; }
.dialog-icon { max-width: 140px; object-fit: contain; margin-top: 6px; }
.install-dialog h2 { margin: 14px 0; font-size: 1.4rem; }
.install-help { color: #68547f; line-height: 1.8; }
.install-help ol { margin: 10px 0 20px; padding-left: 24px; text-align: left; }
.install-help strong { color: #25163d; }
.install-dialog .primary-button { width: 100%; margin-top: 6px; }
.text-button { margin-top: 12px; padding: 10px 18px; border: 0; color: #68547f; background: transparent; cursor: pointer; }
@media (min-width: 600px) { .dialog-backdrop { place-items: center; } }
@media (prefers-reduced-motion: no-preference) {
  .welcome-card { animation: arrive .55s ease-out both; }
  .install-dialog { animation: rise .3s ease-out both; }
  @keyframes arrive { from { opacity: 0; transform: translateY(14px); } }
  @keyframes rise { from { opacity: 0; transform: translateY(24px); } }
}
