:root {
  --brand: #008787;
  --primary:#008587;
  --primary-text:#007a87;
  --primary-dark:#006a6c;
  --brand-dark: #006f6f;
  --accent: #F293BE;
  --text: #333333;
  --muted: #6f7477;
  --line: #dbe8e8;
  --surface: #ffffff;
  --soft: #E9F5F7;
  --cream: #FFFEF1;
  --success: #EBF4EB;
  --shadow: 0 24px 70px rgba(0, 80, 84, .14);
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-heading: 'Poppins', sans-serif;
  --grad-cta:linear-gradient(to right,#007d8a 0%,#006878 100%);
  --grad-cta-hover:linear-gradient(to right,#f96095 0%,#fd7c5e 100%);
  --radius-pill:999px;
}

* { box-sizing: border-box; }
html { color-scheme: light; }

body {
  margin: 0;
  min-height: 100svh;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(circle at 85% 10%, rgba(100, 180, 180, .20), transparent 30rem),
    radial-gradient(circle at 10% 90%, rgba(242, 147, 190, .12), transparent 28rem),
    linear-gradient(135deg, #fbffff, var(--soft));
}

button, input, a { font: inherit; }
button:focus-visible, input:focus-visible, summary:focus-visible, a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.copy h1 .accent{color:var(--primary-text)}

.logo {
  width: 344px;
  max-width: 72vw;
  height: auto;
  display: block;
  margin: 0 0 30px;
}

.layout {
  min-height: 100svh;
  width: min(1120px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(280px, 440px) minmax(320px, 1fr);
  gap: clamp(28px, 6vw, 82px);
  align-items: center;
  padding: clamp(20px, 5vw, 56px);
}

.copy { max-width: 48ch; position: relative; }

.layout.is-summary {
  align-items: start;
}

.layout.is-summary .copy,
.layout.is-summary .phone-wrap {
  align-self: start;
}

.label, .progress, .small {
  margin: 0;
  color: var(--brand-dark);
  font-size: .82rem;
  letter-spacing: .04em;
}

.label { margin-bottom: 14px; }

h1 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.2;
  letter-spacing: 0;
  font-weight: 800;
  color: #0c1117;
  max-width: 14ch;
}

.copy > p:not(.label) {
  margin-top: 22px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

.intro-rule {
  margin-top: 24px;
  padding: 16px;
  border-radius: 24px;
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(0, 135, 135, .16);
  box-shadow: 0 16px 36px rgba(0, 80, 84, .08);
}

.intro-rule p { margin: 0 0 6px; color: var(--muted); }
.intro-rule strong { font-weight: 600; color: var(--brand-dark); }

.phone-wrap { display: grid; place-items: center; }

.phone {
  width: min(400px, 100%);
  min-height: 760px;
  position: relative;
  overflow: hidden;
  border-radius: 42px;
  border: 9px solid #17393C;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.phone::before {
  content: "";
  position: absolute;
  z-index: 3;
  top: 8px;
  left: 50%;
  translate: -50%;
  width: 108px;
  height: 26px;
  border-radius: 0 0 18px 18px;
  background: #17393C;
}

.status {
  height: 52px;
  padding: 15px 24px 0;
  display: flex;
  justify-content: space-between;
  font-size: .8rem;
  color: #17393C;
  font-weight: 500;
}

.status span:last-child { font-size: .56rem; letter-spacing: 2px; }

.topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.82);
}

.icon-btn {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 14px;
  background: var(--soft);
  color: var(--brand-dark);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.icon-btn:disabled { opacity: .35; cursor: default; }
.top-title { margin: 2px 0 0; font-weight: 500; }

.screen {
  padding: 22px 18px;
  animation: screenIn .28s ease both;
}

.progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dots { display: flex; gap: 5px; }

.dots span {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--line);
  transition: background .25s ease, transform .25s ease;
}

.dots span.done {
  background: var(--brand);
  transform: scale(1.05);
}

.screen h2 {
  margin: 8px 0 18px;
  font-size: 1.55rem;
  line-height: 1.15;
  letter-spacing: -.025em;
  font-weight: 600;
}

.message-card {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 18px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(0, 80, 84, .08);
  animation: cardIn .32s ease both;
}

.message-card.email { border-radius: 22px; }

.message-card.shake {
  animation: shake .34s ease both;
}

.sender {
  margin: 0 0 10px;
  color: var(--brand-dark);
  font-weight: 500;
  overflow-wrap: anywhere;
}

.subject { margin: 0 0 8px; font-size: .94rem; color: var(--muted); }

.message-text {
  margin: 0;
  line-height: 1.55;
  font-size: 1.05rem;
}

.watch {
  display: inline;
  border: 0;
  padding: 2px 5px;
  border-radius: 9px;
  color: var(--brand-dark);
  background: rgba(0, 135, 135, .08);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  transition: background .2s ease, box-shadow .2s ease, transform .2s ease;
}

.watch:hover { background: rgba(0, 135, 135, .14); }

.watch.found,
.mark-risk {
  background: rgba(0, 135, 135, .12);
  box-shadow: 0 0 0 3px rgba(0, 135, 135, .12);
}

.mark-safe {
  padding: 2px 5px;
  border-radius: 9px;
  background: rgba(0, 135, 135, .12);
  box-shadow: 0 0 0 3px rgba(0, 135, 135, .10);
}

.hint { margin: 18px 0 10px; color: var(--muted); line-height: 1.5; }

.notice {
  margin: 12px 0 0;
  padding: 12px 14px;
  border-radius: 18px;
  background: var(--success);
  border: 1px solid #cfe3cf;
  line-height: 1.45;
  animation: noticeIn .28s ease both;
}

.actions {
  display: grid;
  gap: 10px;
  margin-top: 20px;
  animation: softRise .24s ease both;
}

.btn {
  min-height: 52px;
  border-radius: 18px;
  border: 1px solid var(--line);
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(0, 80, 84, .10);
}

.btn-primary { border-color: var(--brand); background: var(--brand); color: #fff; }
.btn-secondary { background: #fff; color: var(--text); }
.btn.full { width: 100%; margin-top: 18px; }

.plain { color: var(--muted); line-height: 1.6; margin: 0; }
.scanned { background: linear-gradient(180deg, #fff, #fbffff); }

.reveal {
  margin-top: 16px;
  display: grid;
  gap: 9px;
}

.reveal p {
  margin: 0;
  line-height: 1.5;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(0, 135, 135, .08);
  border: 1px solid rgba(0, 135, 135, .20);
  box-shadow: 0 10px 20px rgba(0, 80, 84, .045);
  animation: revealIn .32s ease both;
}

.reveal p:nth-child(1) { animation-delay: .04s; }
.reveal p:nth-child(2) { animation-delay: .10s; }
.reveal p:nth-child(3) { animation-delay: .16s; }

.reveal p:hover {
  background: rgba(0, 135, 135, .13);
  transform: translateY(-1px);
}

.reveal strong,
.action-note strong,
.master-rule strong { font-weight: 600; }

.action-note,
.master-rule,
.share {
  margin-top: 16px;
  border-radius: 22px;
  background: var(--cream);
  border: 1px solid #eee7ad;
  padding: 15px;
  animation: softRise .28s ease both;
}

.action-note.info { background: var(--success); border-color: #cfe3cf; }

.note-title { margin: 0 0 6px; color: var(--brand-dark); font-weight: 600; }

.action-note p:last-child,
.master-rule p:last-child { margin: 0; line-height: 1.55; }

.confidence {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.confidence p { margin: 0 0 10px; color: var(--muted); }

.mini-actions,
.pattern-options,
.share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mini-btn,
.pattern-btn {
  min-height: 40px;
  padding: 8px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font-weight: 400;
  transition: background .18s ease, transform .18s ease;
}

.mini-btn:hover,
.pattern-btn:hover { transform: translateY(-1px); }

.mini-btn.selected,
.pattern-btn.selected {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.pattern-result { margin-top: 16px; }

.score {
  padding: 18px;
  border-radius: 28px;
  background: var(--soft);
  border: 1px solid var(--line);
}

.score span {
  display: block;
  font-size: 2.4rem;
  line-height: 1;
  font-weight: 600;
  color: var(--brand-dark);
}

.score p { margin: 8px 0 0; color: var(--muted); }

.score-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.score-grid div {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 12px;
  background: #fff;
}

.score-grid strong {
  display: block;
  font-size: 1.45rem;
  color: var(--brand-dark);
  font-weight: 600;
}

.score-grid span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.35;
}

.faq { margin-top: 16px; display: grid; gap: 10px; }

details {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 13px 14px;
  background: #fff;
}

summary { cursor: pointer; font-weight: 500; }

details p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

/* ============ NEWSLETTER ============ */
.newsletter-section{
  background:#fff;
  padding:80px 20px;
  border-top:1px solid rgba(0,0,0,.06);
}
.newsletter-inner{
  max-width:600px;margin:0 auto;text-align:center;
}
.newsletter-inner h2{
	margin-bottom:12px;
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    font-weight: 700;
	}
.newsletter-inner > p{
  color:#4a5568;font-size:16px;max-width:44ch;margin:0 auto 36px;line-height:1.6;
}
#newsletter .nl-label {
  display: block;
  width: 100%;
  text-align: left;
}

.nl-label {
    font-family: Poppins, sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: rgb(55, 65, 81);
    letter-spacing: 0.1px;
}

.nl-input {
    width: 100%;
    box-sizing: border-box;
    font-family: Roboto, sans-serif;
    font-size: 15px;
    color: rgb(26, 26, 46);
    appearance: none;
    padding: 13px 16px;
    background: rgb(248, 250, 251);
    border-width: 1.5px;
    border-style: solid;
    border-color: rgb(226, 232, 240);
    border-image: none;
    border-radius: 10px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.nl-submit {
    width: 100%;
    font-family: Poppins, sans-serif;
    font-weight: 700;
    font-size: 16px;
    color: rgb(255, 255, 255);
    cursor: pointer;
    letter-spacing: 0.2px;
    padding: 15px 24px;
    background: var(--grad-cta);
    border-width: medium;
    border-style: none;
    border-color: currentcolor;
    border-image: none;
    border-radius: var(--radius-pill);
    transition: opacity 0.2s, transform 0.2s, box-shadow 0.2s;
}


.nl-checkbox {
    appearance: none;
    width: 20px;
    height: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-radius: 5px;
    border-width: 2px;
    border-style: solid;
    border-color: rgb(203, 213, 225);
    border-image: none;
    background: rgb(255, 255, 255);
    transition: border-color 0.2s, background 0.2s;
}

.nl-checkbox:checked::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 2px;
    width: 6px;
    height: 10px;
    transform: rotate(45deg);
    border-width: medium 2px 2px medium;
    border-style: none solid solid none;
    border-color: currentcolor rgb(255, 255, 255) rgb(255, 255, 255) currentcolor;
    border-image: none;
    border-top: medium none currentcolor;
    border-left: medium none currentcolor;
	box-sizing: border-box;
    margin: 0px;
    padding: 0px;
}


.nl-checkbox-wrap {
    flex-shrink: 0;
    margin-top: 1px;
}

.nl-checkbox:checked {
    background: var(--primary);
    border-color: var(--primary-text);
}


.newsletter {
  margin-top: 18px;
  padding: 16px;
  border-radius: 24px;
  background: var(--cream);
  border: 1px solid #eee7ad;
}

.newsletter p,
.share p { margin: 0 0 10px; line-height: 1.5; }
.newsletter p:not(.note-title), .share-status { color: var(--muted); }

.newsletter label {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.newsletter span { color: var(--muted); font-size: .9rem; }

.newsletter input {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 10px 13px;
}
.nl-form .nl-label {
  display: block;
  width: 100%;
  text-align: left;
}
/* ide */
.share .btn {
  flex: 1 1 140px;
}

.share-status {
  min-height: 1.2em;
  margin: 10px 0 0;
  font-size: .9rem;
}

@keyframes screenIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(10px) scale(.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes noticeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes revealIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes softRise {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-5px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}

@media (max-width: 840px) {
  .layout { grid-template-columns: 1fr; align-items: start; padding: 18px; }
  h1 { font-size: clamp(2rem, 10vw, 3.5rem); }
  .copy { max-width: none; }
  .logo { width: 260px; max-width: 72vw; margin-bottom: 24px; }
  .phone { border: 0; border-radius: 30px; min-height: auto; }
  .phone::before { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

.score-badge {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 20px;
  background: var(--success);
  border: 1px solid #cfe3cf;
  color: var(--brand-dark);
  font-weight: 600;
  line-height: 1.45;
  animation: softRise .28s ease both;
}

.score-badge.needs-repeat {
  background: var(--cream);
  border-color: #eee7ad;
}


.post-game-actions {
  position: absolute;
  left: 0;
  top: calc(100% + 22px);
  width: min(440px, 100%);
  padding: 16px;
  border-radius: 28px;
  background: rgba(255, 255, 255, .74);
  border: 1px solid rgba(0, 135, 135, .14);
  box-shadow: 0 20px 52px rgba(0, 80, 84, .10);
  backdrop-filter: blur(18px);
  display: grid;
  gap: 12px;
  animation: softRise .28s ease both;
}

.post-game-actions[hidden] {
  display: none;
}

.post-game-head {
  padding: 2px 2px 4px;
}

.post-game-eyebrow {
  margin: 0 0 4px;
  color: var(--brand-dark);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.post-game-head h2 {
  margin: 0;
  font-family: var(--font-heading);
  color: #0c1117;
  font-size: 1.35rem;
  line-height: 1.2;
  letter-spacing: -.02em;
}

.post-game-head p:not(.post-game-eyebrow) {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.5;
}

.post-game-actions .newsletter,
.post-game-actions .share,
.restart-panel {
  margin-top: 0;
  border-radius: 22px;
  box-shadow: none;
}

.post-game-actions .newsletter {
  background: var(--cream);
  border-color: #eee7ad;
}

.post-game-actions .share,
.restart-panel {
  background: #fff;
  border: 1px solid rgba(0, 135, 135, .13);
}

.restart-panel {
  padding: 16px;
  animation: softRise .28s ease both;
}

.restart-nudge {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.5;
}

.restart-nudge.is-perfect {
  color: var(--brand-dark);
  font-weight: 500;
}

.restart-panel .btn.full {
  margin-top: 0;
}

@media (max-width: 840px) {
  .post-game-actions {
    position: static;
    width: 100%;
    margin-top: 22px;
  }
}


/* Cleaner end summary */
.summary-panel {
  margin: 16px 0 18px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
}

.summary-line {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: baseline;
  padding: 10px 0;
  color: var(--muted);
  line-height: 1.35;
}

.summary-line + .summary-line {
  border-top: 1px solid rgba(0, 135, 135, .12);
}

.summary-line strong {
  color: var(--brand);
  font-size: 1.1rem;
  white-space: nowrap;
}

.remember-panel {
  margin-top: 14px;
  padding: 18px 20px;
  border: 1px solid rgba(0, 135, 135, .16);
  border-radius: 24px;
  background: rgba(0, 135, 135, .06);
}

.remember-panel ul {
  margin: 10px 0 0;
  padding-left: 18px;
}

.remember-panel li {
  margin: 8px 0;
  line-height: 1.45;
}

#screen-end .score {
  margin-bottom: 12px;
}

#screen-end .score-badge {
  margin: 12px 0 0;
}


/* Post-training CTA - cleaner marketing follow-up */
.post-game-head h2 {
  letter-spacing: -.03em;
}

.post-game-head p {
  color: var(--muted);
}

.post-newsletter,
.post-share,
.restart-panel {
  border-radius: 24px;
}

.post-newsletter {
  background: var(--cream);
}

.post-newsletter p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.post-newsletter .note-title,
.post-share .note-title {
  margin-top: 0;
  color: var(--primary-text);
}

.post-newsletter label {
  margin-top: 18px;
}

.post-share p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.post-share .share-actions {
  margin-top: 18px;
}

.post-share .share-actions .btn {
  justify-content: center;
}

@media (max-width: 840px) {
  .post-newsletter,
  .post-share,
  .restart-panel {
    border-radius: 22px;
  }
}


/* After game: replace hero with CTA panel */
body.post-game-mode .seo-subtitle,
body.post-game-mode .intro-rule {
  display: none;
}

body.post-game-mode .post-game-actions[hidden] {
  display: block !important;
}

body.post-game-mode .copy {
  align-self: start;
}

body.post-game-mode .post-game-actions {
  margin-top: 24px;
}


/* Phone post-game CTA */
.phone-post-game {
  margin-top: 18px;
}

.phone-post-game[hidden] {
  display: none !important;
}

.phone-post-game .post-game-head {
  margin-bottom: 14px;
}

.phone-post-game .post-game-head h2 {
  font-size: 1.35rem;
  letter-spacing: -.03em;
}

.phone-post-game .post-game-head p {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.5;
}

.phone-post-game .post-newsletter,
.phone-post-game .post-share,
.phone-post-game .restart-panel {
  margin-top: 14px;
}

.phone-post-game .post-newsletter p,
.phone-post-game .post-share p {
  line-height: 1.5;
}

.phone-post-game .share-actions {
  grid-template-columns: 1fr 1fr;
}


/* Cancel previous left-column post-game swap experiment */
body.post-game-mode .seo-subtitle,
body.post-game-mode .intro-rule {
  display: block;
}

body.post-game-mode .post-game-actions[hidden] {
  display: none !important;
}


/* Ensure phone post-game CTA is visible on end screen */
#screen-end #post-game-actions:not([hidden]) {
  display: block;
}

#screen-end .phone-post-game {
  margin-top: 18px;
}

#screen-end .phone-post-game .post-game-head,
#screen-end .phone-post-game .post-newsletter,
#screen-end .phone-post-game .post-share,
#screen-end .phone-post-game .restart-panel {
  width: 100%;
}


/* Final fix: post-game actions live inside phone result screen */
#screen-end #post-game-actions.phone-post-game {
  position: static;
  inset: auto;
  width: 100%;
  margin-top: 18px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  display: grid;
  gap: 14px;
}

#screen-end #post-game-actions.phone-post-game[hidden] {
  display: none !important;
}

#screen-end #post-game-actions.phone-post-game .post-game-head,
#screen-end #post-game-actions.phone-post-game .post-newsletter,
#screen-end #post-game-actions.phone-post-game .post-share,
#screen-end #post-game-actions.phone-post-game .restart-panel {
  position: static;
  width: 100%;
}

#screen-end #post-game-actions.phone-post-game .post-newsletter,
#screen-end #post-game-actions.phone-post-game .post-share,
#screen-end #post-game-actions.phone-post-game .restart-panel {
  margin-top: 0;
}

#screen-end #post-game-actions.phone-post-game .share-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

#screen-end #post-game-actions.phone-post-game .share-actions .btn {
  width: 100%;
  justify-content: center;
}

/* Allow longer result content to be reachable inside the phone */
.phone {
  overflow-y: auto;
  overflow-x: hidden;
  max-height: min(860px, calc(100vh - 48px));
  scrollbar-width: thin;
}

.phone::before {
  position: sticky;
}

.phone .status {
  position: sticky;
  top: 0;
  z-index: 4;
  background: var(--surface);
}

.phone .topbar {
  position: sticky;
  top: 52px;
  z-index: 4;
  background: var(--surface);
}


/* Three-column post-game layout */
.post-game-wrap[hidden] {
  display: none !important;
}
/*
#post-game-wrap,
#post-game-actions {
  display: grid !important;
  visibility: visible !important;
  opacity: 1 !important;
}
*/
.post-game-wrap {
  display: grid;
  place-items: start center;
}

.side-post-game {
  position: static;
  width: min(400px, 100%);
  padding: 22px 18px;
  border-radius: 42px;
  border: 9px solid #17393C;
  background: var(--surface);
  box-shadow: var(--shadow);
  display: grid;
  gap: 14px;
  max-height: min(860px, calc(100vh - 48px));
  overflow-y: auto;
  scrollbar-width: thin;
}

.side-post-game[hidden] {
  display: none !important;
}

.side-post-game .post-game-head h2 {
  font-size: 1.55rem;
  line-height: 1.15;
}

.side-post-game .post-game-head p,
.side-post-game .post-newsletter p,
.side-post-game .post-share p {
  line-height: 1.5;
}

.side-post-game .post-newsletter,
.side-post-game .post-share,
.side-post-game .restart-panel {
  width: 100%;
  margin-top: 0;
}

.side-post-game .share-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.side-post-game .share-actions .btn {
  width: 100%;
  justify-content: center;
}

/* Keep the main game phone clean; post-game CTA is no longer inside it */
.phone {
  overflow: hidden;
  max-height: none;
}

.phone::before {
  position: absolute;
}

.phone .status,
.phone .topbar {
  position: static;
}

/* On desktop, show: copy | game phone | post-game phone */
body.post-game-mode .layout {
  max-width: 1320px;
  grid-template-columns: minmax(260px, 380px) minmax(320px, 400px) minmax(320px, 400px);
  gap: clamp(22px, 3vw, 42px);
  align-items: start;
}

@media (max-width: 1180px) {
  body.post-game-mode .layout {
    grid-template-columns: 1fr;
  }

  .post-game-wrap {
    place-items: center;
  }
}


/* Final: post-game panel is a third column, not an internally scrolling phone */
.side-post-game {
  max-height: none !important;
  overflow: visible !important;
  overflow-y: visible !important;
  scrollbar-width: auto !important;
}

.post-game-wrap {
  align-self: start;
}

/* Keep game phone itself fixed/clean */
.phone {
  overflow: hidden !important;
  max-height: none !important;
}


/* Variant A: post-game CTA as a clean third-column card, not a phone */
.post-game-wrap[hidden] {
  display: none !important;
}

.post-game-wrap {
  display: block;
  align-self: start;
}

.post-game-card {
  position: sticky;
  top: 32px;
  width: min(430px, 100%);
  padding: 32px;
  border: 1px solid rgba(0, 135, 135, .16);
  border-radius: 32px;
  background: rgba(255, 255, 255, .84);
  box-shadow: 0 20px 60px rgba(0, 80, 84, .12);
  backdrop-filter: blur(18px);
  display: grid;
  gap: 20px;
  overflow: visible !important;
  max-height: none !important;
}

.post-game-card[hidden] {
  display: none !important;
}

.post-game-card .post-game-head {
  padding-bottom: 4px;
}

.post-game-card .post-game-eyebrow {
  margin: 0 0 8px;
  color: var(--brand-dark);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.post-game-card .post-game-head h2 {
  max-width: 12ch;
  margin: 0;
  font-size: clamp(1.7rem, 2.2vw, 2.15rem);
  line-height: 1.08;
  letter-spacing: -.045em;
}

.post-game-card .post-game-head p,
.post-game-card .post-newsletter p,
.post-game-card .post-share p {
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.55;
}

.post-game-card .note-title {
  margin: 0 0 8px;
  color: var(--primary-text);
  font-weight: 700;
}

.post-game-card .post-newsletter {
  padding: 22px;
  border: 1px solid #eee7ad;
  border-radius: 24px;
  background: var(--cream);
}

.post-game-card .post-newsletter label {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.post-game-card .post-newsletter input {
  width: 100%;
}

.post-game-card .post-share {
  padding-top: 2px;
}

.post-game-card .share-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.post-game-card .share-actions .btn {
  flex: 1 1 150px;
  justify-content: center;
}

.post-game-card .restart-panel {
  padding-top: 16px;
  border-top: 1px solid rgba(0, 135, 135, .14);
}

body.post-game-mode .layout {
  max-width: 1360px;
  grid-template-columns: minmax(260px, 380px) minmax(320px, 400px) minmax(320px, 430px);
  gap: clamp(24px, 3vw, 48px);
  align-items: start;
}

@media (max-width: 1180px) {
  body.post-game-mode .layout {
    grid-template-columns: 1fr;
  }

  .post-game-card {
    position: static;
    width: min(640px, 100%);
    margin: 0 auto;
  }
}


/* Robust 3-column placement when post-game panel is visible */
.layout.has-post-game,
.layout.is-summary:has(#post-game-wrap:not([hidden])) {
  width: min(1360px, 100%);
  max-width: 1360px;
  grid-template-columns: minmax(260px, 380px) minmax(320px, 400px) minmax(320px, 430px);
  gap: clamp(24px, 3vw, 48px);
  align-items: start;
}

.layout.has-post-game .post-game-wrap,
.layout.is-summary:has(#post-game-wrap:not([hidden])) .post-game-wrap {
  grid-column: 3;
  grid-row: 1;
  align-self: start;
}

.layout.has-post-game .phone-wrap,
.layout.is-summary:has(#post-game-wrap:not([hidden])) .phone-wrap {
  grid-column: 2;
  grid-row: 1;
}

.layout.has-post-game .copy,
.layout.is-summary:has(#post-game-wrap:not([hidden])) .copy {
  grid-column: 1;
  grid-row: 1;
}

/* Prevent older 2-column or row-flow rules from pushing the CTA below */
.post-game-wrap {
  min-width: 0;
}

@media (max-width: 1180px) {
  .layout.has-post-game,
  .layout.is-summary:has(#post-game-wrap:not([hidden])) {
    grid-template-columns: 1fr;
    max-width: 720px;
  }

  .layout.has-post-game .copy,
  .layout.has-post-game .phone-wrap,
  .layout.has-post-game .post-game-wrap,
  .layout.is-summary:has(#post-game-wrap:not([hidden])) .copy,
  .layout.is-summary:has(#post-game-wrap:not([hidden])) .phone-wrap,
  .layout.is-summary:has(#post-game-wrap:not([hidden])) .post-game-wrap {
    grid-column: auto;
    grid-row: auto;
  }
}


/* Post-game cleanup: only copy link remains */
.post-game-card .share-actions {
  grid-template-columns: 1fr;
}

.post-game-card .share-actions .btn {
  flex: 1 1 100%;
  width: 100%;
}

.post-game-card .restart-panel {
  display: none !important;
}


/* WCAG refinements */
.screen:focus {
  outline: none;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
summary:focus-visible,
[tabindex="-1"]:focus-visible {
  outline: 3px solid #005f73;
  outline-offset: 3px;
}

.dots[aria-hidden="true"] {
  pointer-events: none;
}

.form-status,
.share-status {
  min-height: 1.4em;
  margin-top: 10px;
  color: var(--brand-dark);
  font-weight: 600;
}

.small,
.progress,
.post-game-eyebrow,
label span {
  color: #006a6c;
}

.summary-line span,
.plain,
.post-game-card .post-game-head p,
.post-game-card .post-newsletter p,
.post-game-card .post-share p,
.remember-panel li {
  color: #45494f;
}

.btn:disabled,
button:disabled {
  opacity: .55;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}


/* Fix: do not draw focus rectangle around whole game screens */
.screen:focus,
.screen:focus-visible,
[tabindex="-1"]:focus,
[tabindex="-1"]:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

/* Keep WCAG focus only on interactive elements */
button:focus-visible,
a:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid #005f73;
  outline-offset: 3px;
}

.form-hint{font-size:.85rem;line-height:1.45;color:var(--muted);margin:.35rem 0 .75rem}
.nl-consent{display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 20px 0px 24px;
    padding: 16px;
    background: rgb(248, 250, 251);
    border-radius: 10px;
    border-width: 1.5px;
    border-style: solid;
    border-color: rgb(226, 232, 240);
    border-image: none;}
.nl-consent input[type="checkbox"]{width:1.1rem;height:1.1rem;flex:0 0 auto;margin-top:.15rem}
.nl-consent-text{font-size: 13px;color: rgb(74, 85, 104);line-height: 1.55;}
.nl-consent-text a{color: var(--primary-text); text-decoration: underline;}


.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
