/* V12 · Keep the report, move complete-report delivery to LINE. */
body.report-v12 {
  --line-green: #087b44;
  --line-green-hover: #096a3d;
  --line-green-edge: #55b47f;
}

body.report-v12 .primary.line-button,
body.report-v12 .report-story-shell .report-offer > .primary.line-button,
body.report-v12 .report-story-shell .chapter-lock-overlay .chapter-unlock.primary.line-button,
body.report-v12 .report-cover > .primary.line-button,
body.report-v12 .report-purchase-bar .primary.line-button {
  min-height: 3.25rem;
  padding: .8rem 1rem;
  border: 1px solid var(--line-green-edge);
  border-radius: 6px;
  background: linear-gradient(115deg, #0b8850, var(--line-green));
  box-shadow: 0 3px 0 #07522f, 0 5px 18px #073b251c;
  color: #fff;
  font: 600 1rem/1.5 var(--sans);
  letter-spacing: 0;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  text-decoration: none;
}

body.report-v12 .primary.line-button:hover:not(:disabled),
body.report-v12 .report-story-shell .report-offer > .primary.line-button:hover,
body.report-v12 .report-story-shell .chapter-lock-overlay .chapter-unlock.primary.line-button:hover,
body.report-v12 .report-cover > .primary.line-button:hover,
body.report-v12 .report-purchase-bar .primary.line-button:hover {
  background: var(--line-green-hover);
  border-color: #80c59c;
  transform: none;
}

body.report-v12 .line-button:focus-visible,
body.report-v12 .line-copy-button:focus-visible,
body.report-v12 .line-fallback a:focus-visible {
  outline: 3px solid #e9c886;
  outline-offset: 4px;
}

body.report-v12 .line-button .icon { width: 1.25rem; height: 1.25rem; }
body.report-v12 .report-story-shell .chapter-lock-overlay > small { font-size: .875rem; line-height: 1.6; }

body.report-v12 .report-story-shell .report-offer.line-offer {
  padding: 1.5rem 1.25rem;
  text-align: left;
}

body.report-v12 .line-offer-badge {
  display: inline-flex;
  align-items: center;
  padding: .35rem .7rem;
  margin-bottom: .85rem;
  border: 1px solid #70a98a;
  border-radius: 5px;
  background: #e3efe5;
  color: #17613d;
  font-size: .875rem;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: .02em;
}

body.report-v12 .report-story-shell .line-offer > h2 {
  margin: 0 0 .65rem;
  font-size: 1.6rem;
  line-height: 1.5;
}

body.report-v12 .report-story-shell .line-offer > p:not(.fine-print) {
  font-size: 1rem;
  line-height: 1.8;
  color: #65506d;
  margin-bottom: 1rem;
}

body.report-v12 .line-offer .report-includes {
  gap: .5rem;
  margin: 1rem 0;
  justify-content: flex-start;
}

body.report-v12 .line-offer .report-includes span {
  font-size: .875rem;
  line-height: 1.6;
  padding: .35rem .55rem;
}

body.report-v12 .line-steps {
  display: grid;
  gap: .8rem;
  margin: 1rem 0 1.2rem;
  padding: 0 0 0 1.4rem;
  list-style: decimal;
  text-align: left;
  font-size: .875rem;
}

body.report-v12 .line-steps li { min-width: 0; padding-left: .25rem; }
body.report-v12 .line-steps li::marker { color: #a97b39; font-weight: 600; }
body.report-v12 .line-steps strong {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.6;
  color: inherit;
}
body.report-v12 .line-steps span {
  display: block;
  margin-top: .15rem;
  font-size: .875rem;
  line-height: 1.7;
  color: inherit;
  opacity: .87;
  overflow-wrap: anywhere;
}

body.report-v12 .report-story-shell .line-offer > .fine-print {
  margin-top: .9rem;
  color: #78617c;
  font-size: .8125rem;
  line-height: 1.75;
  text-align: center;
}

body.report-v12 .report-story-shell.has-purchase-bar {
  padding-bottom: calc(8rem + env(safe-area-inset-bottom, 0px));
}

body.report-v12 .report-purchase-bar.line-purchase-bar {
  gap: .75rem;
  padding: .75rem 1rem calc(.75rem + env(safe-area-inset-bottom, 0px));
  align-items: center;
}

body.report-v12 .line-purchase-bar > div { min-width: 0; flex: 1 1 42%; }
body.report-v12 .line-purchase-bar small {
  font-size: .8125rem;
  line-height: 1.6;
  color: #cfb5d5;
}
body.report-v12 .line-purchase-bar strong {
  display: block;
  margin: .15rem 0 0;
  color: #f2ddb7;
  font: 500 1rem/1.5 var(--sans);
  white-space: normal;
  overflow-wrap: anywhere;
}
body.report-v12 .line-purchase-bar > .primary.line-button { flex: 1 1 54%; min-width: 0; }
body.report-v12.modal-open .line-purchase-bar { visibility: hidden; }

/* Keep the dialog's actions visible while the QR and message area scroll. */
body.report-v12 .modal-backdrop { padding: .75rem; }
body.report-v12 .modal {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 35rem;
  max-height: calc(100dvh - 1.5rem);
  padding: 1.5rem 1.25rem 1rem;
  overflow: hidden;
  border-color: #aa8a61;
}
body.report-v12 .modal > h2 {
  flex: 0 0 auto;
  margin-bottom: 1rem;
  padding-right: 2.5rem;
  font-size: 1.5rem;
  line-height: 1.45;
}
body.report-v12 .modal-close { width: 2.5rem; height: 2.5rem; top: .65rem; right: .65rem; }
body.report-v12 .modal-body {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  font-size: 1rem;
  line-height: 1.75;
  color: #d9c9df;
}
body.report-v12 .line-handoff-intro { margin-bottom: 1rem; }
body.report-v12 .line-handoff-intro p { font-size: 1rem; line-height: 1.75; }
body.report-v12 .line-handoff-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
  margin: 1rem 0;
}
body.report-v12 .line-qr-card {
  justify-self: center;
  width: min(100%, 13.5rem);
  padding: .8rem;
  background: #fff;
  border-radius: 9px;
  border: 1px solid #d5c5a8;
  text-align: center;
  color: #3a4a40;
}
body.report-v12 .line-qr-card img {
  width: 11.5rem;
  height: auto;
  max-width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  margin: 0 auto;
}
body.report-v12 .line-qr-card small {
  display: block;
  margin-top: .6rem;
  font-size: .8125rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
body.report-v12 .line-instructions { min-width: 0; }
body.report-v12 .line-instructions .line-steps { margin: 0; }
body.report-v12 .line-message-field { margin: 1.15rem 0 .75rem; }
body.report-v12 .line-message-field label {
  display: block;
  margin-bottom: .5rem;
  color: #efdec7;
  font-size: .875rem;
  line-height: 1.6;
}
body.report-v12 .line-message-field textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 9rem;
  resize: vertical;
  margin-top: .5rem;
  padding: .8rem;
  border: 1px solid #9d82a7;
  border-radius: 7px;
  background: #170f24;
  color: #f0e7f4;
  font: 400 1rem/1.7 var(--sans);
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
body.report-v12 .secondary.line-copy-button {
  width: 100%;
  min-height: 3rem;
  padding: .65rem 1rem;
  color: #f1dfc5;
  border-color: #bda077;
  font-size: .875rem;
}
body.report-v12 #line-copy-status,
body.report-v12 .line-handoff-status {
  min-height: 1.4em;
  margin-top: .55rem;
  font-size: .875rem;
  line-height: 1.65;
  color: #bde1c8;
  overflow-wrap: anywhere;
}
body.report-v12 .line-fallback {
  margin-top: .85rem;
  padding: .75rem 0;
  border-top: 1px solid #ac91b333;
  font-size: .875rem;
  line-height: 1.7;
}
body.report-v12 .line-fallback summary { cursor: pointer; color: #d4c1dd; }
body.report-v12 .line-fallback a {
  display: block;
  margin-top: .7rem;
  color: #e6d1ab;
  text-decoration: underline;
  text-underline-offset: 3px;
  word-break: break-all;
  user-select: text;
}
body.report-v12 .modal-footer {
  flex: 0 0 auto;
  margin-top: 1rem;
  padding-top: .9rem;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  border-top: 1px solid #ac91b340;
  gap: .5rem;
}
body.report-v12 .modal-footer > .text-button { min-height: 2.5rem; font-size: .875rem; }
body.report-v12 .modal-footer > .fine-print { font-size: .8125rem; }

@media (min-width: 560px) {
  body.report-v12 .line-handoff-layout { grid-template-columns: 13.5rem minmax(0, 1fr); }
}

@media (max-width: 359px) {
  body.report-v12 .report-story-shell .report-offer.line-offer { padding: 1.25rem 1rem; }
  body.report-v12 .report-story-shell .line-offer > h2 { font-size: 1.45rem; }
  body.report-v12 .report-purchase-bar.line-purchase-bar { gap: .6rem; padding-left: .75rem; padding-right: .75rem; }
  body.report-v12 .line-purchase-bar > .primary.line-button { padding-left: .65rem; padding-right: .65rem; }
  body.report-v12 .modal { padding-left: 1rem; padding-right: 1rem; }
  body.report-v12 .modal > h2 { font-size: 1.35rem; }
}

html[lang="th"] body.report-v12 .line-button,
html[lang="th"] body.report-v12 .line-steps,
html[lang="th"] body.report-v12 .line-purchase-bar strong { letter-spacing: 0; }
html[lang="th"] body.report-v12 .report-purchase-bar .primary.line-button,
html[lang="th"] body.report-v12 .report-story-shell .chapter-lock-overlay .chapter-unlock.primary.line-button { font-size: 1rem; }

@media (prefers-reduced-motion: reduce) {
  body.report-v12 .line-button { transition: none; }
  body.report-v12 .modal-body { scroll-behavior: auto; }
}

body.report-v12 .line-qr-disclosure { margin: .8rem 0; font-size: .875rem; }
body.report-v12 .line-qr-disclosure > summary { cursor: pointer; padding: .7rem 0; color: #ead3a9; line-height: 1.7; }
body.report-v12 .line-qr-disclosure .line-qr-card { margin: .6rem auto 1rem; }
body.report-v12 .modal-footer .line-copy-button { margin: 0 0 .6rem; flex-shrink: 0; }

/* QR-first report receipt. Keep these overrides inside this dialog. */
body.report-v12 .line-receipt-modal {
  max-width: 33rem;
  max-height: calc(100dvh - 1.5rem);
  padding: 1.4rem 1.4rem 1.1rem;
  border: 1px solid #3a294a;
  border-radius: 1.8rem;
  background: #241830;
  color: #fff3d7;
  box-shadow: 0 1.5rem 5rem #0007;
}

body.report-v12 .line-receipt-modal > h2 {
  margin: 0 0 1.2rem;
  padding-right: 2rem;
  font: 500 1.8rem/1.35 var(--sans);
  color: #fff3d7;
  letter-spacing: 0;
}

body.report-v12 .line-receipt-modal > .modal-body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 0;
  scrollbar-gutter: auto;
  overflow-x: hidden;
  overflow-y: auto;
  color: #fff3d7;
  text-align: center;
}

body.report-v12 .line-receipt-modal .line-receipt-qr {
  display: block;
  width: min(62vw, 250px);
  max-width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  margin: 0 auto 1.1rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #fff;
}

body.report-v12 .line-receipt-modal .line-receipt-help {
  margin: 0 auto 1rem;
  font: 400 1rem/1.7 var(--sans);
  color: #fff3d7;
  text-align: left;
  overflow-wrap: anywhere;
}

body.report-v12 .line-receipt-modal .line-receipt-code {
  margin: 0;
  text-align: center;
}

body.report-v12 .line-receipt-modal .line-receipt-code small {
  display: block;
  margin-bottom: .35rem;
  color: #fff3d7;
  font: 400 1rem/1.5 var(--sans);
}

body.report-v12 .line-receipt-modal .line-receipt-code strong {
  display: block;
  color: #e7bf70;
  font: 700 2rem/1.3 var(--sans);
  font-variant-numeric: tabular-nums;
  letter-spacing: .1em;
  overflow-wrap: anywhere;
  user-select: all;
}

body.report-v12 .line-receipt-modal .line-copy-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  margin: .35rem auto 0;
  padding: .45rem .75rem;
  border: 0;
  border-radius: .4rem;
  background: transparent;
  color: #e7bf70;
  box-shadow: none;
  font: 400 1rem/1.5 var(--sans);
  text-align: center;
  white-space: normal;
}

body.report-v12 .line-receipt-modal #line-copy-status.line-receipt-note {
  margin: .25rem 0 0;
  color: #c9b9d0;
  font: 400 .875rem/1.55 var(--sans);
  text-align: center;
}

body.report-v12 .line-receipt-modal .line-manual-copy[hidden] { display: none; }
body.report-v12 .line-receipt-modal .line-manual-copy {
  margin-top: .9rem;
  text-align: left;
}
body.report-v12 .line-receipt-modal .line-manual-copy label {
  display: block;
  margin-bottom: .4rem;
  color: #eddbc4;
  font-size: .875rem;
  line-height: 1.6;
}
body.report-v12 .line-receipt-modal .line-manual-copy textarea {
  display: block;
  width: 100%;
  min-height: 8rem;
  margin: 0;
  padding: .75rem;
  border: 1px solid #a98aba;
  border-radius: .5rem;
  background: #170f24;
  color: #f7edf9;
  font: 400 1rem/1.6 var(--sans);
  resize: vertical;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

body.report-v12 .line-receipt-modal > .modal-footer {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: stretch;
  gap: .35rem;
  margin-top: .55rem;
  padding-top: 0;
  border-top: 0;
  background: #241830;
}
body.report-v12 .line-receipt-modal .modal-footer > .line-receipt-close {
  align-self: flex-end;
  width: auto;
  min-height: 2.75rem;
  padding: .45rem .65rem;
  color: #e7bf70;
  font: 400 1rem/1.5 var(--sans);
}
body.report-v12 .line-receipt-modal .modal-footer > .line-open-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 3.25rem;
  padding: .8rem 1rem;
  border: 1px solid #e7bf70;
  border-radius: .9rem;
  background: #e7bf70;
  color: #1a1023;
  box-shadow: none;
  font: 500 1.125rem/1.5 var(--sans);
  letter-spacing: 0;
  text-align: center;
  text-decoration: none;
  white-space: normal;
}
body.report-v12 .line-receipt-modal .modal-footer > .line-open-button:hover {
  background: #f0ce8c;
  border-color: #f0ce8c;
  transform: none;
}
body.report-v12 .line-receipt-modal :is(.line-copy-button, .line-receipt-close):hover {
  color: #ffdc91;
  background: #ffffff08;
}
body.report-v12 .line-receipt-modal :is(button, a, textarea):focus-visible {
  outline: 3px solid #ffe0a1;
  outline-offset: 3px;
}

/* The longer receipt CTA gets the full width of the sticky bar. */
body.report-v12 .report-purchase-bar.line-purchase-bar {
  display: block;
}
body.report-v12 .line-purchase-bar > .primary.line-button {
  display: block;
  width: 100%;
  min-height: 3.25rem;
  padding: .8rem 1rem;
  font-size: 1rem;
  line-height: 1.5;
}

@media (max-width: 359px), (max-height: 700px) {
  body.report-v12 .line-receipt-modal {
    padding: 1rem 1.05rem .85rem;
    border-radius: 1.4rem;
  }
  body.report-v12 .line-receipt-modal > h2 {
    margin-bottom: .85rem;
    font-size: 1.5rem;
  }
  body.report-v12 .line-receipt-modal .line-receipt-qr {
    width: min(60vw, 210px);
    margin-bottom: .85rem;
  }
  body.report-v12 .line-receipt-modal .line-receipt-help { margin-bottom: .7rem; }
  body.report-v12 .line-receipt-modal .line-receipt-code strong { font-size: 1.875rem; }
}
