html, body {
  height:100%;
  margin:0;
  padding:0;
  background:#0e0e18;
  color:#eee;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  overflow-y:auto;
  overflow-x:hidden;
}

.app{
  min-height:100dvh;
  display:flex;
  flex-direction:column;
}

/* Top/Middle/Bottom layout */
.row--T{
  height:10dvh;
  flex:0 0 auto;
}

.row--M{
  height:80dvh;
  flex:0 0 auto;
}

.row--B{
  flex:0 0 auto;
}

.container{
  height:100%;
  box-sizing:border-box;
  padding:4px;
}

/* Header */
.container--header{
  background:linear-gradient(135deg,#1a002f,#3a0f5c);
  border-bottom:1px solid rgba(255,255,255,.12);
}

.header{
  background:linear-gradient(135deg,#1a002f,#3a0f5c);
  height:56px;
  padding:4px 8px;
  box-sizing:border-box;
  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:center;
}

.header__center{
  justify-self:center;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:2px;
}

.header__title{
  margin:0;
  font-size:16px;
  font-weight:400;
  color:#f2e9ff;
  line-height:1;
}

.header__subtitle{
  margin:0;
  font-size:12px;
  line-height:1;
  color:#c9c2d8;
  white-space:nowrap;
}

.header__back{
  justify-self:end;
  display:inline-flex;
  align-items:center;
  padding:4px 8px;
  font-size:14px;
  line-height:1;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  color:#fff;
  text-decoration:none;
  border-radius:6px;
  border:1px solid rgba(255,255,255,.4);
  background:rgba(255,255,255,.08);
  max-height:40px;
  box-sizing:border-box;
}

.header p{ display:none !important; }
.back-button{ display:none !important; }

/* Middle */
.container--daily{
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:auto;
  -webkit-overflow-scrolling:touch;
}

.selection{
  display:grid;
  gap:6px;
  padding:6px;
  box-sizing:border-box;
  overflow:hidden;
}

.selection__card{
  background:linear-gradient(135deg,#5a2a82,#1a002f);
  border-radius:6px;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  user-select:none;
  font-size:0;
  min-width:0;
  min-height:0;
  overflow:hidden;
}

.selection__card.is-selected{
  box-shadow:0 0 14px gold;
  background:linear-gradient(135deg,#5a2a82,#1a002f);
  pointer-events:none;
}

/* Bottom */
.container--result{
  background:rgba(255,255,255,.03);
  border-top:1px solid rgba(255,255,255,.08);
  padding:0 4px 12px 4px;
  overflow:visible;
}

.final1__row{
  display:flex;
  justify-content:center;
  gap:12px;
  width:100%;
  flex-wrap:nowrap;
  padding-top:12px;
}

/* FIX: do NOT crop cards */
.final1__card{
  width:150px;                 /* smaller so it fits nicely */
  aspect-ratio:231/397;        /* match real card image ratio */
  background-size:contain;     /* NEVER crop */
  background-repeat:no-repeat;
  background-position:center;
  border-radius:12px;
  box-shadow:0 0 30px gold;
  flex:0 0 auto;
}

@media (max-width: 420px){
  .final1__card{
    width:min(28vw, 140px);    /* 3 cards fit on one row */
    border-radius:10px;
    box-shadow:0 0 22px gold;
    aspect-ratio:231/397;
    background-size:contain;
    background-repeat:no-repeat;
    background-position:center;
  }
}

.interpret{
  max-width:700px;
  margin:18px auto 0 auto;
  line-height:1.6;
  color:#eee;
  background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.08);
  border-radius:12px;
  padding:14px;
  box-sizing:border-box;
}

.interpret > :first-child{ margin-top:0 !important; }

.load{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  color:#c9c2d8;
  font-size:13px;
  padding:12px 0;
}

.load__spin{
  width:28px;
  height:28px;
  border:4px solid rgba(255,255,255,.18);
  border-top-color:rgba(255,255,255,.85);
  border-radius:50%;
  animation:spin .9s linear infinite;
}

@keyframes spin{ to{ transform:rotate(360deg); } }

/* Save reading */
.save-reading{
  margin-top:16px;
  padding-top:12px;
  border-top:1px solid rgba(255,255,255,.12);
}

.save-reading__title{
  font-size:14px;
  margin-bottom:6px;
  color:#d8cfff;
}

.save-reading__email{
  width:100%;
  padding:8px;
  border-radius:6px;
  border:1px solid rgba(255,255,255,.2);
  background:#111;
  color:#fff;
  box-sizing:border-box;
}

.save-reading__btn{
  margin-top:8px;
  padding:8px 14px;
  border-radius:6px;
  border:1px solid rgba(255,255,255,.4);
  background:rgba(255,255,255,.08);
  color:#fff;
  cursor:pointer;
}

/* PAY GATE */
.pay-gate{
  text-align:center;
  max-width:700px;
  margin:0 auto;
  padding:16px;
  border-radius:14px;
  background:linear-gradient(135deg, rgba(90,42,130,.35), rgba(26,0,47,.35));
  border:1px solid rgba(255,255,255,.12);
  box-shadow:0 14px 40px rgba(0,0,0,.35);
}

.pay-gate__lock{
  font-size:26px;
  line-height:1;
  text-align:center;
  margin:6px 0 10px 0;
}

.pay-gate__title{
  margin:0 0 10px 0;
  font-size:18px;
  font-weight:500;
  color:#f2e9ff;
  text-align:center;
}

.pay-gate__p{
  margin:0 0 10px 0;
  color:#d8d2e6;
  line-height:1.55;
  font-size:14px;
}

.pay-gate__price{
  display:inline-block;
  padding:2px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.18);
  background:rgba(255,255,255,.06);
  color:#fff;
  font-weight:600;
  white-space:nowrap;
}

.pay-gate__cta{
  display:flex;
  justify-content:center;
  margin-top:10px;
}

.pay-now{
  width:min(420px, 100%);
  padding:12px 14px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.35);
  background:linear-gradient(135deg, rgba(255,215,0,.20), rgba(255,255,255,.06));
  color:#fff;
  font-size:16px;
  font-weight:600;
  cursor:pointer;
  box-shadow:0 0 18px rgba(255,215,0,.20);
}

.pay-now:active{ transform:translateY(1px); }

.pay-gate__divider{
  height:1px;
  background:rgba(255,255,255,.12);
  margin:14px 0;
}

.pay-gate__smalltitle{
  margin:0 0 8px 0;
  font-size:13px;
  color:#d8cfff;
}

.pay-gate__row{
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:center;
}

.pay-email{
  flex:1;
  padding:10px 10px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.18);
  background:#111;
  color:#fff;
  box-sizing:border-box;
}

.pay-later{
  padding:10px 12px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.28);
  background:rgba(255,255,255,.08);
  color:#fff;
  cursor:pointer;
  white-space:nowrap;
}

.pay-gate__note{
  margin:8px 0 0 0;
  font-size:12px;
  color:#bfb6d3;
  line-height:1.4;
}

.pay-gate__trust{
  margin:12px 0 0 0;
  text-align:center;
  color:#f2e9ff;
  font-size:13px;
  opacity:.95;
}

/* INTENTION MODAL */
.modal-overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.5);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:9999;
}

.modal select{
  display:block;
  margin:0 auto;
  width:100%;
  max-width:260px;
  padding:8px;
  border-radius:8px;
  border:1px solid rgba(255,255,255,.25);
  background:#111;
  color:#fff;
  box-sizing:border-box;
  text-align-last:center;
}

.modal{
  width:min(92vw,420px);
  background:linear-gradient(135deg,#1a002f,#2d0a47);
  border:1px solid rgba(255,255,255,.15);
  border-radius:14px;
  padding:18px;
  box-sizing:border-box;
  color:#eee;
}

.modal h2{
  margin:0 0 8px 0;
  font-size:18px;
  font-weight:500;
  text-align:center;
}

.modal p{
  margin:0 0 12px 0;
  font-size:14px;
  color:#cfc7dd;
  text-align:center;
  line-height:1.5;
}

.modal textarea{
  width:100%;
  min-height:60px;
  max-height:120px;
  resize:vertical;
  padding:8px;
  border-radius:8px;
  border:1px solid rgba(255,255,255,.25);
  background:#111;
  color:#fff;
  box-sizing:border-box;
}

.modal__actions{
  display:flex;
  gap:10px;
  margin-top:14px;
}

.modal__btn{
  flex:1;
  padding:8px 12px;
  border-radius:8px;
  border:1px solid rgba(255,255,255,.4);
  background:rgba(255,255,255,.08);
  color:#fff;
  cursor:pointer;
}

@media (max-width: 420px){
  .final1__row.final1__row--three{
    width:100%;
    padding:12px 8px 0 8px;
    box-sizing:border-box;
    gap:10px;
  }

  .final1__row.final1__row--three .final1__card{
    width:auto;
    flex:1 1 0;
    min-width:0;
    max-width:120px;
    box-shadow:0 0 22px gold;
    border-radius:10px;
    aspect-ratio:231/397;
    background-size:contain;
    background-repeat:no-repeat;
    background-position:center;
  }
}
/* Celtic Cross cards: match new card ratio, never crop */
.celtic__card{
  aspect-ratio:231/397;
  background-size:contain;
  background-repeat:no-repeat;
  background-position:center;
}

