/* Result page: the 4:5 card and the full profile (from the prototype). */

.gcard{--tint:#F5EADB;--accent:#8A5A3B;--deep:#3B2A22;position:relative;width:400px;height:500px;margin:6px auto 0;border-radius:28px;background:var(--tint);color:var(--deep);padding:12px;box-shadow:0 22px 44px -22px rgba(45,35,66,.55)}
.gframe{height:100%;border:3px solid var(--accent);border-radius:20px;padding:12px 14px 10px;display:flex;flex-direction:column;background:radial-gradient(120% 70% at 50% 34%,rgba(255,255,255,.75),rgba(255,255,255,0) 60%)}
.ghead{display:flex;justify-content:space-between;align-items:flex-start}
.gname{font-family:var(--display);font-weight:700;font-size:32px;line-height:.95;letter-spacing:-0.02em;margin:0}
.gtitle{font-family:var(--display);font-weight:600;font-size:15px;margin:3px 0 0;color:var(--accent)}
.gtag{margin:4px 0 0;font-size:12px;font-weight:700;line-height:1.25;color:var(--deep);opacity:.85}
.gno{font-family:var(--display);font-weight:600;font-size:13px;text-align:right;line-height:1.25}
.pill{display:inline-block;font-size:12px;font-weight:700;padding:3px 10px;border-radius:999px;background:#FFFFFF;color:var(--accent);font-family:var(--body)}
.gmid{flex:1;min-height:0;display:grid;grid-template-columns:1fr 160px;gap:10px;align-items:center;margin:2px 0 8px}
.gart{height:100%;min-height:0;display:flex;align-items:center;justify-content:center}
.gart img{width:100%;height:100%;object-fit:contain}
.gstats{display:grid;gap:7px}
.gstat{display:grid;grid-template-columns:16px 1fr auto;column-gap:6px;row-gap:4px;align-items:center;font-size:13px;font-weight:700;white-space:nowrap}
.gstat .sname{grid-column:2}
.gstat svg{width:15px;height:15px;fill:var(--accent)}
.gstat .n{grid-column:3;font-family:var(--display);font-weight:700;font-size:13px}
.gbar{grid-column:1 / -1;height:7px;border-radius:999px;background:rgba(255,255,255,.9);overflow:hidden}
.gbar span{display:block;height:100%;width:0;background:var(--accent);border-radius:999px}
.gsuper{display:flex;align-items:flex-start;gap:6px;background:#FFFFFF;border-radius:10px;padding:6px 8px;font-size:13px;line-height:1.25;margin-top:2px}
.gsuper svg{width:15px;height:15px;flex:0 0 auto;fill:#F4B400;margin-top:1px}
.gsuper b{font-weight:700}
.glockhead{display:flex;justify-content:space-between;align-items:baseline;font-size:12px;font-weight:700;margin:8px 0 5px}
/* more traits: one row of small locked tiles */
.gtiles{display:grid;grid-template-columns:repeat(5,1fr);gap:5px}
.gtiles-3{grid-template-columns:repeat(3,1fr)}
.gtile{position:relative;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:3px;width:100%;height:54px;padding:4px 3px;border:0;border-radius:10px;background:#2D2342;color:#FFFFFF;font-family:var(--body);cursor:pointer}
.gtile svg{width:16px;height:16px;display:block}
.gtile .glock{position:absolute;top:4px;right:4px}
.gtile .glock svg{width:9px;height:9px;fill:rgba(255,255,255,.55)}
.gtile .gq{font-family:var(--display);font-weight:700;font-size:15px;line-height:1;letter-spacing:.12em;color:#FFC94D;text-shadow:0 0 8px rgba(255,201,77,.6)}
.gtile .cat{font-size:11px;font-weight:700;text-align:center;line-height:1.05;white-space:nowrap}
button.gtile:hover{background:#3B2F57}
div.gtile{cursor:default}
/* opened tiles (when a paid test is done): white tile, flag icons in green / red */
.gtile.open{background:#FFFFFF;color:var(--deep);cursor:default}
.gtile.open svg{fill:var(--accent)}
.gtile.open.flag-green svg{fill:#2F9E5B}
.gtile.open.flag-red svg{fill:#D9473A}
.gfoot{display:flex;justify-content:space-between;font-size:12px;font-weight:700;margin-top:7px;opacity:.85}
/* On narrow screens result.js scales the whole card with zoom, so the layout always matches the PNG. */

/* actions under the card */
.actions{max-width:400px;margin:18px auto 0;display:grid;gap:10px}
.actions-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.actions-row .secondary{padding:0 10px;font-size:17px}
.compare{max-width:400px;margin:14px auto 0;display:flex;align-items:center;gap:12px;background:var(--surface);border-radius:20px;padding:12px 14px}
.compare img{width:52px;height:52px;object-fit:contain;flex:0 0 auto}
.compare div{flex:1;font-size:15px;line-height:1.3}
.compare b{display:block;font-family:var(--display);font-weight:600;font-size:18px}
.compare .secondary{width:auto;min-height:44px;font-size:16px;padding:0 16px;flex:0 0 auto}
@media (max-width:420px){ .compare{flex-wrap:wrap} .compare div{flex:1 1 calc(100% - 64px)} .compare .secondary{width:100%;flex:1 1 100%} }

/* full profile */
.profile{max-width:560px;margin:38px auto 0}
.profile h2{font-family:var(--display);font-weight:700;font-size:30px;letter-spacing:-0.01em;margin:0 0 6px;line-height:1.1}
.profile h3{font-family:var(--display);font-weight:600;font-size:21px;margin:30px 0 10px}
.ptag{font-family:var(--display);font-weight:600;font-size:21px;margin:0 0 8px}
.profile p{margin:0 0 10px;max-width:60ch}
.closelines{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:10px}
.closelines:empty{display:none}
.closeline{display:inline-block;background:var(--surface);border:2px solid var(--line);border-radius:12px;padding:6px 12px;font-size:15px}
.pnote{font-size:15px;color:var(--muted)}
.friends-line{margin-top:30px !important;padding:14px 16px;border-radius:18px;background:var(--surface);font-weight:700}
.pscale{background:var(--surface);border-radius:18px;padding:14px 16px 12px;margin-bottom:10px}
.pscale-top{display:flex;justify-content:space-between;gap:12px;font-size:14px;color:var(--muted)}
.pscale-top .on{font-weight:700;color:var(--ink)}
.ptrack{position:relative;height:10px;border-radius:999px;background:var(--line);margin:9px 0 6px}
.ptrack .marker{position:absolute;top:50%;width:22px;height:22px;border-radius:50%;background:var(--surface);border:4px solid var(--ink);transform:translate(-50%,-50%)}
.pval{font-size:14px;font-weight:700}
.facts2{display:grid;gap:10px;margin:0;padding:0;list-style:none}
.facts2 li{background:var(--surface);border-radius:16px;padding:12px 14px}
.facts2 b{display:block;font-family:var(--display);font-weight:600;font-size:17px;margin-bottom:2px}

/* hidden traits / paid tests */
.unlock-wrap{scroll-margin-top:16px}
.unlock-intro{color:var(--muted)}
.unlock{display:grid;gap:8px;margin:10px 0 0;padding:0;list-style:none}
/* paid tests: dark rows like the old card rows */
.trow{display:flex;align-items:center;gap:12px;background:#2D2342;color:#FFFFFF;border:1px solid rgba(255,255,255,.08);border-radius:16px;padding:12px 12px 12px 14px}
.trow-text{flex:1;min-width:0}
.trow-head{display:flex;align-items:center;gap:8px}
.trow-head svg{width:16px;height:16px;fill:#FFC94D;flex:0 0 auto}
.trow-head b{font-family:var(--display);font-weight:600;font-size:17px;line-height:1.2}
.trow-q{font-family:var(--display);font-weight:700;font-size:17px;letter-spacing:.12em;color:#FFC94D;text-shadow:0 0 10px rgba(255,201,77,.6)}
.trow p{margin:3px 0 0;font-size:14px;line-height:1.35;color:#CFC8E2}
.trow .notify{background:transparent;border:2px solid #FFC94D;color:#FFC94D}
.trow-price{display:inline-block;margin-top:5px;font-size:12px;font-weight:700;color:#FFC94D}
@media (max-width:339px){ .trow{flex-wrap:wrap} .trow .notify{width:100%;justify-content:center} }
.bundle-btn{display:flex;align-items:center;justify-content:center;min-height:52px;margin-top:12px;border-radius:999px;background:var(--primary);color:var(--on-primary);font-family:var(--display);font-weight:600;font-size:18px;text-decoration:none}
.bundle-btn:hover{filter:brightness(1.08)}
.notify{flex:0 0 auto;display:inline-flex;align-items:center;min-height:44px;padding:0 14px;border-radius:999px;background:var(--primary);color:var(--on-primary);font-family:var(--display);font-weight:600;font-size:15px;text-decoration:none;white-space:nowrap;cursor:pointer}
.soon{font-size:14px;color:var(--muted);margin-top:10px}
.after{max-width:560px;margin:30px auto 0;display:grid;gap:10px}
.note{font-size:14px;color:var(--muted);text-align:center;margin:6px 0 0}
.empty{text-align:center;padding-top:30px}
.empty img{width:180px;height:180px;margin:0 auto}
.empty h1{font-family:var(--display);font-weight:700;font-size:34px;margin:6px 0}
.empty p{color:var(--muted);margin:0 0 20px}

@media (prefers-reduced-motion: no-preference){
  .reveal{animation:pop .6s cubic-bezier(.2,.9,.25,1.15) both}
  @keyframes pop{from{opacity:0;transform:translateY(24px) scale(.97)}to{opacity:1;transform:none}}
}

/* "press and hold to save" image over the page (phones without a share sheet) */
.imgsave{position:fixed;inset:0;z-index:20;background:rgba(27,23,38,.82);display:flex;align-items:center;justify-content:center;padding:16px}
.imgsave-in{max-width:420px;width:100%;max-height:100%;display:flex;flex-direction:column;align-items:center;gap:12px;overflow:auto}
.imgsave img{max-width:100%;max-height:70vh;width:auto;border-radius:16px;-webkit-touch-callout:default;user-select:auto}
.imgsave p{color:#FFFFFF;font-weight:700;margin:0;text-align:center}
.imgsave .secondary{max-width:240px}

/* paid tests: banner above the list, the bundle as the one main button */
.soon-banner{display:inline-block;margin:0 0 6px;padding:4px 12px;border-radius:999px;background:var(--surface);border:2px solid var(--line);font-size:14px;font-weight:700}
.bundle-btn{padding:10px 18px;text-align:center;line-height:1.25;font-size:16px}

/* duo with a friend */
.duo{max-width:400px;margin:14px auto 0;padding:16px;border-radius:20px;background:var(--surface);text-align:center}
.duo-pics{display:flex;justify-content:center;gap:18px}
.duo figure{margin:0}
.duo img{width:96px;height:96px;object-fit:contain;margin:0 auto}
.duo figcaption{font-size:13px;font-weight:700;color:var(--muted)}
.duo p{margin:8px 0 12px;font-family:var(--display);font-weight:600;font-size:18px;line-height:1.25}

/* in-app browsers */
.inapp{max-width:400px;margin:14px auto 0;padding:12px 14px;border-radius:16px;border:2px dashed var(--line);display:grid;gap:8px;font-size:15px}
.inapp p{margin:0}

/* help line, delete link */
.helpline{font-size:14px;color:var(--muted);margin-top:14px}
.helpline a{color:var(--ink);font-weight:700}
.link-btn{justify-self:center;text-decoration:underline;text-underline-offset:3px}
