:root{
  --bg: linear-gradient(135deg, #c9ecff 0%, #fdddf3 55%, #e6ffe6 100%);
  --ink: #1e2430;
  --muted: #4a5365;

  --accent: #a12eff;
  --accent-2: #ffb54d;

  --card: #ffffff;
  --shadow: 0 10px 24px rgba(0,0,0,.08);

  --mobilew: 650px;
}

/* Base */
*{box-sizing:border-box}
html{
  min-height: 100%;
  background: var(--bg);
  background-attachment: scroll;
}
body{
  font-family: 'Quicksand', 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  color:var(--ink);
  background: var(--bg);
  min-height: 100vh;
  min-height: 100dvh;
}

.site-main{
  min-height: 100vh;
  min-height: 100dvh;
  display:flex;
  justify-content:center;
  padding: 0;
}

#app{
  width:100%;
  max-width: var(--mobilew);
  display:flex;
  flex-direction:column;
  min-height: 100vh;
  min-height: 100dvh;
}

.card{
  min-height: 100vh;
  min-height: 100dvh;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  padding: 16px;
  flex: 1;
  display:flex;
  flex-direction:column;
  align-items: center;
}
.card-flat{ background: transparent; box-shadow: none; padding: 0; }
.card > #app {
  width: 100%;
  max-width: var(--mobilew);
  margin: 0 auto;
}

/* Typography */
.title{margin: 0 0 8px 0; font-size: clamp(20px, 5vw, 26px);}
.q-title{margin: 6px 0 0 0; font-size: clamp(16px, 4.5vw, 22px);}
.kicker{color:var(--muted); margin: 0 0 4px 0; font-size: clamp(12px, 3vw, 14px);}
.copy p{margin: 0 0 20px 0; font-size: clamp(14px, 3.5vw, 16px);}
.actions{
  display:flex; 
  align-items:center; 
  gap:clamp(12px, 3vw, 18px); 
  flex-wrap:wrap; 
  margin-top:10px;
  justify-content: center;
}
.cta-sub{margin:0; color:var(--muted); font-size:clamp(12px, 3vw, 14px)}

.media{
  position: relative;
  width: 100%;
  max-width: 100%;
  border-radius: 12px;
  overflow:hidden;
  background: linear-gradient(135deg, #0f1b2d 0%, #2a2340 55%, #0b2f29 100%);
  margin: 8px 0 16px;
  outline: 1px dashed rgba(0,0,0,.05);
}
.media.landscape{ aspect-ratio: 16 / 9; }
.media img{ 
  position:absolute; 
  inset:0; 
  width:100%; 
  height:100%; 
  object-fit:cover; 
  display:block; 
}
.media[data-fallback="true"] img{ display:none; }

.landing .landing-hero{ 
  margin:0; 
  background: transparent; 
  border-radius:0; 
  box-shadow:none;
  outline:none; 
}

.options{
  display:grid; 
  grid-template-columns: 1fr; 
  gap:12px; 
  margin: 8px 0 4px;
  width: 100%;
}
.option-card{
  display:block;
  background: var(--card);
  border: 2px solid #e6eaf5;
  border-radius: 18px;
  padding: clamp(12px, 3vw, 14px);
  text-align:center;
  cursor:pointer;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
  box-shadow: var(--shadow);
  font-size: clamp(14px, 3.5vw, 16px);
}
.option-card:hover{ transform: translateY(-2px); }
.option-card.selected{ border-color: var(--accent); box-shadow: 0 8px 18px rgba(46,114,255,.18); }
.option-card span{ display:block; }

/* Buttons */
.btn{
  appearance:none; 
  border:0; 
  border-radius: clamp(8px, 4vw, 20px);
  padding: clamp(10px, 2vw, 14px) clamp(14px, 4vw, 18px);
  font-size: clamp(16px, 4vw, 20px); 
  line-height:1.2; 
  cursor:pointer;
  background:#e8eefc; 
  color:#0f274f; 
  box-shadow: var(--shadow);
  font-weight: bold;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.btn:hover{ transform: translateY(-1px); }
.btn.primary{
  background: #ffd900;
  color: #271a00;
}
.btn.secondary{ background: var(--accent-2); color: #271a00; }

.landing .btn.primary {
  padding: clamp(12px, 4vw, 14px) clamp(16px, 5vw, 28px);
}

/* Results */
.result-card{ 
  margin: 4px auto 0; 
  display: flex; 
  flex-direction: column; 
  gap: 4px; 
  text-align: center;
  width: fit-content;
  max-width: 100%;
  padding: 0 16px;
}
.result-card h3{ 
  font-size: clamp(18px, 4vw, 24px); 
  margin: 0; 
  line-height: 1.3;
}
.result-card p{ 
  margin: 0 0 16px 0; 
  color: var(--muted); 
  font-size: clamp(14px, 3.5vw, 18px); 
  line-height: 1.4;
}

/* Footer */
.site-footer{
  display:flex; 
  align-items:center; 
  justify-content:center;
  padding: 16px 16px 20px; 
  color:var(--muted); 
  font-size: clamp(11px, 3vw, 13px);
  text-align: center;
}

.visually-hidden{
  position: absolute !important; 
  height:1px; 
  width:1px; 
  overflow:hidden;
  clip: rect(1px,1px,1px,1px); 
  white-space:nowrap; 
  border:0; 
  padding:0; 
  margin:-1px;
}

@media print{
  .media, .actions, .kicker, .q-title, .options, .site-footer, .copy, .title { display:none !important; }
  body{ background:#fff; }
  .card{ box-shadow:none; border:1px solid #ccc; }
  .results .result-card { display:block !important; }
}

.screen.start {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.copy {
  text-align: center;
}
.media {
  margin-left: auto;
  margin-right: auto;
}
.actions {
  justify-content: center;
}

/* Landing page */
.landing-hero {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  max-width: var(--mobilew);
  margin: 0 auto;
  overflow: hidden;
}

.landing-hero img {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  height: 100%;
  width: auto;
  min-width: 100%;
  object-fit: contain;
  object-position: bottom;
  display: block;
  box-shadow: none;
  border: none;
}

.landing .site-footer {
  display: none;
}

.card:has(.landing) {
  padding: 0;
}

.landing .overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: clamp(20px, 8vw, 60px);
  display: flex;
  justify-content: center;
  align-items: flex-end;
  background: transparent;
}

/* Results page */
.results .media {
  width: 95%;
  max-width: 400px;
  height: auto;
  margin: 8px auto 12px auto;
  background: transparent;
  border-radius: 0;
  outline: none;
  overflow: visible;
}

.results .media img {
  position: static;
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* Mobile */
@media (max-width: 650px) {
  .landing-hero {
    max-width: 100vw;
    width: 100vw;    
  }
  
  .landing-hero img {
    width: 100vw;    
    height: 100vh;
    height: 100dvh;
    min-height: 100vh;
    min-height: 100dvh;
    object-fit: contain;
    object-position: bottom;
  }
  
  .card {
    padding: clamp(12px, 4vw, 16px);
  }
  

}
  

/* iOS Safari fixes */
@supports (-webkit-touch-callout: none) {
  body {
    background-attachment: scroll;
  }
  
  html {
    min-height: 100%;
    background: var(--bg);
  }
}