/*
 * Plain CSS fallbacks for Android WebViews that ignore @layer (Tailwind v4 output).
 * Keep rules unlayered — they apply when utility classes inside @layer do not.
 */

.flex {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
}

.inline-flex {
  display: -webkit-inline-box;
  display: -webkit-inline-flex;
  display: inline-flex;
}

.flex-col {
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
  flex-direction: column;
}

.flex-row {
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -webkit-flex-direction: row;
  flex-direction: row;
}

.flex-1 {
  -webkit-box-flex: 1;
  -webkit-flex: 1 1 0%;
  flex: 1 1 0%;
}

.flex-shrink-0 {
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
}

.items-center {
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
}

.justify-center {
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
}

.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.w-full {
  width: 100%;
  box-sizing: border-box;
}

.w-16 {
  width: 4rem;
}

.w-20 {
  width: 5rem;
}

.w-24 {
  width: 6rem;
}

.w-32 {
  width: 8rem;
}

.h-20 {
  height: 5rem;
}

.h-24 {
  height: 6rem;
}

.h-32 {
  height: 8rem;
}

.h-auto {
  height: auto;
}

.h-full {
  height: 100%;
}

.min-h-screen {
  min-height: 100vh;
  min-height: -webkit-fill-available;
}

.h-screen {
  height: 100vh;
  height: -webkit-fill-available;
}

.max-w-md {
  max-width: 28rem;
}

.max-w-2xl {
  max-width: 42rem;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

.mb-2 {
  margin-bottom: 0.5rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mb-8 {
  margin-bottom: 2rem;
}

.mt-8 {
  margin-top: 2rem;
}

.mt-16 {
  margin-top: 4rem;
}

.p-6 {
  padding: 1.5rem;
  box-sizing: border-box;
}

.px-3 {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
  box-sizing: border-box;
}

.px-8 {
  padding-left: 2rem;
  padding-right: 2rem;
  box-sizing: border-box;
}

.py-3 {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.py-5 {
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}

.gap-3 {
  gap: 0.75rem;
}

.gap-4 {
  gap: 1rem;
}

.space-y-4 > :not([hidden]) ~ :not([hidden]) {
  margin-top: 1rem;
}

.space-y-8 > :not([hidden]) ~ :not([hidden]) {
  margin-top: 2rem;
}

.relative {
  position: relative;
}

.overflow-hidden {
  overflow: hidden;
}

.object-contain {
  object-fit: contain;
}

.rounded-xl {
  border-radius: 0.75rem;
}

.rounded-full {
  border-radius: 9999px;
}

.whitespace-nowrap {
  white-space: nowrap;
}

.font-light {
  font-weight: 300;
}

.font-medium {
  font-weight: 500;
}

.text-sm {
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.text-lg {
  font-size: 1.125rem;
  line-height: 1.75rem;
}

.text-xl {
  font-size: 1.25rem;
  line-height: 1.75rem;
}

.text-3xl {
  font-size: 1.875rem;
  line-height: 2.25rem;
}

.text-white {
  color: #ffffff;
}

.text-gray-300 {
  color: #d1d5db;
}

.text-gray-400 {
  color: #9ca3af;
}

.text-gray-500 {
  color: #6b7280;
}

.fixed {
  position: fixed;
}

.relative {
  position: relative;
}

.absolute {
  position: absolute;
}

.inset-0 {
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}

.top-0 {
  top: 0;
}

.left-0 {
  left: 0;
}

.right-0 {
  right: 0;
}

.bottom-0 {
  bottom: 0;
}

.z-10 {
  z-index: 10;
}

.z-50 {
  z-index: 50;
}

.flex-1 {
  -webkit-box-flex: 1;
  -webkit-flex: 1 1 0%;
  flex: 1 1 0%;
}

.flex-shrink-0 {
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
}

.items-start {
  -webkit-box-align: start;
  -webkit-align-items: flex-start;
  align-items: flex-start;
}

.justify-between {
  -webkit-box-pack: justify;
  -webkit-justify-content: space-between;
  justify-content: space-between;
}

.overflow-y-auto {
  overflow-y: auto;
}

.overflow-x-hidden {
  overflow-x: hidden;
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pb-20 {
  padding-bottom: 5rem;
}

/* Auth / onboarding shells */
.legacy-screen-shell {
  box-sizing: border-box;
  min-height: 100vh;
  min-height: -webkit-fill-available;
  width: 100%;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  padding: 1.5rem;
  background: linear-gradient(180deg, #0f0a15 0%, #1a0f2e 50%, #0f0a15 100%);
}

.legacy-screen-inner {
  box-sizing: border-box;
  width: 100%;
  max-width: 28rem;
  margin-left: auto;
  margin-right: auto;
}

.legacy-stack > * + * {
  margin-top: 1rem;
}

.legacy-stack-lg > * + * {
  margin-top: 2rem;
}

.legacy-btn-block {
  display: block;
  width: 100%;
  box-sizing: border-box;
  border: none;
  cursor: pointer;
  font: inherit;
}

.legacy-btn-primary {
  display: block;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 9999px;
  padding: 1.25rem 2rem;
  background: linear-gradient(180deg, #dee2ea 0%, #c5cbd6 100%);
  color: #1a0f2e;
  font-size: 1.125rem;
  font-weight: 500;
  cursor: pointer;
}

.legacy-btn-secondary {
  display: block;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #9ca3af;
  border-radius: 9999px;
  padding: 1.25rem 2rem;
  background: rgba(31, 41, 55, 0.5);
  color: #e5e7eb;
  font-size: 1.125rem;
  font-weight: 500;
  cursor: pointer;
}

.legacy-btn-row {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  gap: 0.75rem;
}

.legacy-path-card {
  display: block;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #581c87;
  border-radius: 0.75rem;
  padding: 1.5rem;
  background: linear-gradient(180deg, #dee2ea 0%, #c5cbd6 100%);
  color: #1a0f2e;
  cursor: pointer;
  text-align: left;
}

.legacy-path-card-dark {
  display: block;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #9ca3af;
  border-radius: 0.75rem;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  cursor: pointer;
  text-align: left;
}

.legacy-path-card-row {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  gap: 1rem;
}

.legacy-welcome-title-row {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

.legacy-welcome-moon {
  width: 48px;
  height: 48px;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
  margin-right: -4px;
}

.legacy-welcome-moon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.legacy-welcome-word {
  margin: 0;
  color: #ffffff;
  font-weight: 300;
  font-size: 1.75rem;
  line-height: 1;
  letter-spacing: 0.08em;
  white-space: nowrap;
}
