@font-face {
  font-family: 'SaiK2Handwriting';
  src: url('/assets/fonts/saik2handwriting.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Walone';
  src: url('/assets/fonts/walone.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --maroon: #2a1614;
  --maroon-2: #3a1c19;
  --red: #b4242f;
  --red-deep: #8e1b22;
  --gold: #c79a4e;
  --gold-soft: #e7c77e;
  --cream: #fbf3e8;
  --pearl: #fffaf1;
  --paper: #fffcf6;
  --ink: #2a1614;
  --body: #4b3a33;
  --muted: #8f776c;
  --line: rgba(169, 130, 74, 0.28);
  --shadow: 0 28px 54px -32px rgba(42, 22, 20, 0.62);
  --display: "Playfair Display", "Walone", "Noto Sans Myanmar", Georgia, "Times New Roman", serif;
  --sans: "Hanken Grotesk", "Walone", "Noto Sans Myanmar", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mm: "Walone", "Noto Sans Myanmar", "Padauk", sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  background: var(--maroon);
}

body {
  min-height: 100vh;
  color: var(--ink);
  background: linear-gradient(180deg, var(--maroon) 0%, #1c0f0e 100%);
  font-family: var(--sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

img {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

.app-shell {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  margin: 0 auto;
  overflow: hidden;
  background: linear-gradient(180deg, var(--cream) 0%, #f7ecdb 100%);
  box-shadow: 0 0 80px rgba(0, 0, 0, 0.48);
}

.brand-lockup,
.quiz-topbar,
.result-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}

.brand-diamond,
.result-brand::before {
  width: 5px;
  height: 5px;
  background: var(--red);
  transform: rotate(45deg);
  content: "";
}

.wordmark {
  color: var(--red-deep);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.42em;
  line-height: 1;
  padding-left: 0.42em;
}

.home-screen {
  min-height: 100vh;
  padding: 0 0 40px;
  text-align: center;
  animation: fade-in 0.45s ease both;
}

.home-photo-stage {
  position: relative;
  height: clamp(360px, 46vh, 520px);
  overflow: hidden;
  background: #c3a184;
}

.home-photo-stage::before,
.home-photo-stage::after {
  position: absolute;
  content: "";
  pointer-events: none;
}

.home-photo-stage::before {
  top: 0;
  right: 0;
  left: 0;
  z-index: 1;
  height: 40%;
  background: linear-gradient(180deg, rgba(247, 236, 219, 0.78) 0%, rgba(247, 236, 219, 0.3) 50%, rgba(247, 236, 219, 0) 100%);
}

.home-photo-stage::after {
  right: 0;
  bottom: -3px;
  left: 0;
  z-index: 1;
  height: 38%;
  background: linear-gradient(180deg, rgba(251, 243, 232, 0) 0%, rgba(251, 243, 232, 0.6) 52%, var(--cream) 100%);
}

.home-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 10%;
}

.home-photo-lockup {
  position: absolute;
  top: 22px;
  right: 0;
  left: 0;
  z-index: 2;
  padding: 0 24px;
  text-align: center;
}

.home-content {
  position: relative;
  z-index: 3;
  margin-top: -30px;
  padding: 0 24px;
}

.campaign-pill {
  display: inline-block;
  margin-top: 11px;
  padding: 7px 15px;
  border: 1px solid rgba(138, 106, 58, 0.5);
  border-radius: 999px;
  color: #8a6a3a;
  background: rgba(251, 243, 232, 0.5);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.32em;
  line-height: 1;
}

.she-lockup {
  margin-top: 0;
}

.she-word {
  display: block;
  color: var(--red);
  font-family: var(--display);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.5em;
  line-height: 1;
  padding-left: 0.5em;
}

.she-blank {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}

.she-blank span {
  width: 88px;
  height: 2px;
  margin-bottom: 4px;
  background: linear-gradient(90deg, transparent, var(--gold));
}

.she-blank span:last-child {
  background: linear-gradient(90deg, var(--gold), transparent);
}

.she-blank em {
  color: var(--gold);
  font-family: var(--display);
  font-size: 40px;
  font-style: italic;
  line-height: 0.78;
}

.home-title {
  margin-top: 18px;
  color: var(--ink);
  font-family: "SaiK2Handwriting", var(--display);
  font-size: 34px;
  font-weight: normal;
  letter-spacing: 0;
  line-height: 1.12;
  text-wrap: balance;
}

.home-copy {
  max-width: 360px;
  margin: 13px auto 0;
  color: #6f5a50;
  font-size: 14.5px;
  line-height: 1.55;
  text-wrap: pretty;
}

.teaser-line {
  margin-top: 16px;
  color: #a07f54;
  font-size: 11.5px;
  letter-spacing: 0.04em;
}

.teaser-cards {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 30px;
}

.teaser-card {
  flex: 1;
  min-width: 0;
  min-height: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 15px 10px 14px;
  border-radius: 16px 16px 14px 14px;
  box-shadow: 0 15px 26px -15px rgba(42, 22, 20, 0.62);
  text-align: center;
}

.teaser-card span {
  color: rgba(251, 239, 217, 0.78);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.22em;
  line-height: 1;
}

.teaser-card b {
  margin-top: 6px;
  color: #fbefd9;
  font-family: var(--display);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.08;
}

.teaser-card-mood {
  background: linear-gradient(180deg, #c26a22, #8e3f14);
  transform: rotate(-3deg);
}

.teaser-card-fighter {
  position: relative;
  z-index: 2;
  background: linear-gradient(180deg, #9e1b2e, #5e0b17);
  box-shadow: 0 16px 30px -14px rgba(94, 11, 23, 0.75);
  transform: translateY(-8px);
}

.teaser-card-boss {
  background: linear-gradient(180deg, #3d4664, #232839);
  transform: rotate(3deg);
}

.primary-btn,
.secondary-btn {
  display: inline-flex;
  width: 100%;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.primary-btn {
  border: 0;
  color: #fbefd9;
  background: linear-gradient(180deg, var(--red), var(--red-deep));
  box-shadow: 0 18px 32px -14px rgba(142, 27, 34, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.secondary-btn {
  border: 1.5px solid rgba(142, 27, 34, 0.4);
  color: var(--red-deep);
  background: var(--paper);
}

.primary-btn:active,
.secondary-btn:active,
.icon-btn:active,
.option-btn:active {
  transform: translateY(1px);
}

.home-cta {
  margin-top: 20px;
}

.micro {
  margin-top: 14px;
  color: #9a8478;
  font-size: 12.5px;
}

.home-footer {
  margin-top: 34px;
  color: #9a8478;
  font-size: 12px;
  line-height: 1.62;
}

.home-footer > span {
  display: inline-block;
  width: 40%;
  height: 1px;
  vertical-align: middle;
  background: rgba(169, 130, 74, 0.3);
}

.home-footer b {
  display: inline-block;
  margin: 0 10px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 700;
}

.home-footer p {
  margin-top: 18px;
}

.quiz-screen {
  min-height: 100vh;
  padding: 18px 26px 36px;
  animation: fade-in 0.34s ease both;
}

.quiz-topbar {
  justify-content: space-between;
}

.icon-btn {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: flex-start;
  border: 0;
  color: var(--red-deep);
  background: transparent;
  cursor: pointer;
}

.icon-btn svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.topbar-spacer {
  width: 34px;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 28px;
  margin-bottom: 9px;
  color: #a07f54;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  line-height: 1;
}

.progress-track {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(169, 130, 74, 0.2);
}

.progress-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), var(--red));
  transition: width 0.4s cubic-bezier(0.4, 0, 0.1, 1);
}

.quiz-frame {
  margin-top: 30px;
  color: var(--gold);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.28em;
  text-align: center;
}

.q-text {
  min-height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 14px;
  color: var(--ink);
  font-family: var(--display);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.22;
  text-align: center;
  text-wrap: balance;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 18px;
}

.option-btn {
  display: flex;
  width: 100%;
  min-height: 64px;
  align-items: center;
  gap: 15px;
  padding: 17px 18px;
  border: 1.5px solid rgba(142, 27, 34, 0.16);
  border-radius: 18px;
  color: #3a2a24;
  background: #fffcf6;
  box-shadow: 0 7px 17px -13px rgba(80, 40, 30, 0.5);
  cursor: pointer;
  text-align: left;
}

.option-number {
  flex: none;
  display: inline-flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--gold);
  border-radius: 50%;
  color: #a07f54;
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
}

.option-label {
  color: #3a2a24;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.35;
}

.option-btn:hover {
  border-color: rgba(142, 27, 34, 0.45);
  background: #fff;
}

.result-page {
  background: linear-gradient(180deg, var(--maroon) 0%, #1c0f0e 100%);
}

.result-shell {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 0 40px;
  overflow: hidden;
  background: linear-gradient(180deg, var(--cream) 0%, #f7ecdb 100%);
  box-shadow: 0 0 80px rgba(0, 0, 0, 0.48);
}

.result-brand {
  padding: 4px 0 18px;
}

.result-topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  justify-content: space-between;
  min-height: 58px;
  padding: calc(11px + env(safe-area-inset-top)) 18px 12px;
  border-bottom: 1px solid rgba(169, 130, 74, 0.18);
  background: rgba(251, 243, 232, 0.9);
  box-shadow: 0 14px 28px -26px rgba(48, 24, 20, 0.65);
  backdrop-filter: blur(14px);
}

.result-topbar::before {
  content: none;
}

.result-wordmark-link {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
  text-decoration: none;
}

.result-topbar .wordmark {
  font-size: 11.5px;
  letter-spacing: 0.38em;
  padding-left: 0.38em;
}

.soft-top-cta {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  padding: 8px 13px;
  border: 1px solid rgba(142, 27, 34, 0.24);
  border-radius: 999px;
  appearance: none;
  color: var(--red-deep);
  background: rgba(255, 252, 246, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.68), 0 12px 24px -22px rgba(142, 27, 34, 0.9);
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}

.soft-top-cta:active {
  transform: translateY(1px);
}

.result-card-frame {
  margin: 12px 18px 0;
  padding: 3px;
  border-radius: 23px;
  background: linear-gradient(160deg, rgba(227, 197, 126, 0.92), rgba(227, 197, 126, 0.18) 38%, rgba(227, 197, 126, 0.1) 62%, rgba(227, 197, 126, 0.72));
  box-shadow: 0 40px 80px -30px rgba(20, 10, 8, 0.7);
}

.result-card {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: var(--paper);
}

.result-card::after {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: inherit;
  content: "";
  pointer-events: none;
}

.poster-img {
  display: block;
  width: 100%;
  height: auto;
  background: var(--maroon-2);
}

.result-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
  align-items: stretch;
  padding: 20px 20px 0;
}

.result-actions .primary-btn,
.result-actions .secondary-btn {
  min-width: 0;
  height: 58px;
  min-height: 58px;
  padding: 0 12px;
  font-size: 14.5px;
  line-height: 1.35;
}

.viewer-actions .primary-btn {
  min-height: 56px;
  font-size: 15.5px;
}

.viewer-actions {
  grid-template-columns: 1fr;
}

.save-note {
  padding: 11px 24px 0;
  color: #a08c7e;
  font-size: 11.5px;
  line-height: 1.45;
  text-align: center;
}

.result-salutation {
  padding: 34px 34px 0;
  color: var(--red-deep);
  font-family: var(--display);
  font-size: 18px;
  font-style: italic;
  line-height: 1.5;
  text-align: center;
  text-wrap: balance;
}

.reading-card {
  margin: 26px 18px 0;
  padding: 30px 26px;
  border: 1px solid rgba(169, 130, 74, 0.22);
  border-radius: 22px;
  background: #fffcf6;
}

.reading-mark {
  margin-bottom: 4px;
  color: var(--gold);
  font-size: 12px;
  text-align: center;
}

.reading-card p {
  margin-top: 16px;
  color: #4a3a33;
  font-size: 15px;
  line-height: 1.72;
  text-wrap: pretty;
}

.reading-card p:first-of-type {
  margin-top: 0;
}

.loop-panel {
  position: relative;
  margin: 26px 18px 0;
  padding: 36px 24px 30px;
  overflow: hidden;
  border: 1px solid rgba(199, 154, 78, 0.45);
  border-radius: 22px;
  background: radial-gradient(120% 110% at 50% -10%, #fbe6d2 0%, #f6d4b6 55%, #eec59e 100%);
  box-shadow: 0 22px 46px -26px rgba(180, 120, 60, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  text-align: center;
}

.loop-mark {
  position: absolute;
  top: 14px;
  left: 50%;
  color: var(--gold);
  font-size: 13px;
  transform: translateX(-50%);
}

.loop-panel h2 {
  padding-top: 6px;
  color: var(--red-deep);
  font-family: var(--display);
  font-size: 23px;
  font-style: italic;
  font-weight: 500;
  line-height: 1.35;
  text-wrap: balance;
}

.loop-panel p {
  max-width: 330px;
  margin: 12px auto 0;
  color: #6f5a50;
  font-size: 13.5px;
  line-height: 1.55;
  text-wrap: pretty;
}

.loop-panel .primary-btn {
  margin-top: 22px;
  min-height: 53px;
  font-size: 15px;
}

.loop-teasers {
  margin-top: 24px;
}

.loop-teasers .teaser-card {
  min-height: 64px;
  padding: 13px 8px 12px;
  border-radius: 14px 14px 12px 12px;
}

.loop-teasers .teaser-card b {
  font-size: 12.5px;
}

.loop-micro {
  display: block;
  margin-top: 12px;
  color: #9a8478;
  font-size: 12px;
}

.result-footer {
  padding: 26px 34px 0;
  color: #9a8478;
  font-size: 11.5px;
  line-height: 1.65;
  text-align: center;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 100;
  max-width: min(88vw, 380px);
  padding: 13px 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: #fff;
  background: rgba(35, 17, 15, 0.95);
  box-shadow: 0 18px 36px -24px rgba(0, 0, 0, 0.7);
  font-size: 13px;
  line-height: 1.4;
  opacity: 0;
  pointer-events: none;
  text-align: center;
  transform: translateX(-50%) translateY(12px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.result-loading {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 24px;
  text-align: center;
}

.result-loading h1 {
  margin-top: 12px;
  font-family: var(--display);
  font-size: 32px;
  line-height: 1.1;
}

.result-loading p {
  margin-top: 12px;
  color: var(--muted);
}

.mm,
[lang="my"] {
  font-family: var(--mm);
}

[lang="my"] .wordmark {
  font-family: var(--sans);
}

[lang="my"] .campaign-pill,
[lang="my"] .progress-meta,
[lang="my"] .quiz-frame,
[lang="my"] .teaser-line {
  letter-spacing: 0;
}

[lang="my"] .campaign-pill {
  font-size: 11px;
  line-height: 1.4;
}

[lang="my"] .q-text,
[lang="my"] .loop-panel h2 {
  font-family: var(--mm);
  font-style: normal;
  font-weight: 700;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

[lang="my"] .home-title {
  font-family: "SaiK2Handwriting", var(--display);
  font-weight: normal;
  font-size: 34px;
  line-height: 1.55;
}

[lang="my"] .home-copy,
[lang="my"] .loop-panel p,
[lang="my"] .result-footer,
[lang="my"] .save-note,
[lang="my"] .teaser-line {
  line-height: 1.8;
  overflow-wrap: anywhere;
}

[lang="my"] .primary-btn,
[lang="my"] .secondary-btn {
  min-height: 58px;
  padding-right: 18px;
  padding-left: 18px;
  line-height: 1.55;
  overflow-wrap: anywhere;
  white-space: normal;
}

[lang="my"] .progress-meta {
  font-size: 11.5px;
  line-height: 1.4;
}

[lang="my"] .quiz-frame {
  line-height: 1.7;
}

[lang="my"] .q-text {
  min-height: 128px;
  font-size: 23px;
  line-height: 1.55;
}

[lang="my"] .option-label {
  font-size: 14.5px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

[lang="my"] .reading-card p {
  font-size: 15.5px;
  line-height: 2;
  overflow-wrap: anywhere;
}

[lang="my"] .result-salutation {
  font-family: var(--mm);
  font-size: 17.5px;
  font-style: normal;
  font-weight: 600;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

[lang="my"] .loop-panel h2 {
  font-size: 21px;
  line-height: 1.6;
}

[lang="my"] .result-actions .primary-btn,
[lang="my"] .result-actions .secondary-btn {
  height: 58px;
  min-height: 58px;
  padding-right: 12px;
  padding-left: 12px;
  line-height: 1.35;
}

.fade-up {
  animation: fade-up 0.42s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@media (max-width: 360px) {
  .home-screen {
    padding-bottom: 34px;
  }

  .home-photo-stage {
    height: 340px;
  }

  .home-photo {
    object-position: 50% 10%;
  }

  .home-content {
    margin-top: -28px;
    padding-left: 18px;
    padding-right: 18px;
  }

  .home-title {
    font-size: 29px;
  }

  .home-copy {
    font-size: 14.5px;
  }

  .campaign-pill {
    max-width: calc(100% - 32px);
    font-size: 9px;
    letter-spacing: 0.26em;
  }

  .teaser-cards {
    gap: 8px;
  }

  .teaser-card {
    min-height: 66px;
    padding: 13px 7px 12px;
  }

  .teaser-card b {
    font-size: 12.5px;
  }

  .quiz-screen {
    padding-left: 18px;
    padding-right: 18px;
  }

  .q-text {
    font-size: 24px;
  }

  .result-topbar {
    padding-right: 14px;
    padding-left: 14px;
  }

  .result-topbar .wordmark {
    font-size: 11px;
    letter-spacing: 0.3em;
    padding-left: 0.3em;
  }

  .soft-top-cta {
    min-height: 32px;
    padding-right: 11px;
    padding-left: 11px;
    font-size: 11.5px;
  }

  .result-actions {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .reading-card,
  .loop-panel {
    padding-left: 22px;
    padding-right: 22px;
  }
}

@media (max-width: 480px) and (max-height: 760px) {
  .home-photo-stage {
    height: clamp(285px, 38vh, 320px);
  }

  .home-content {
    margin-top: -24px;
  }

  [lang="my"] .home-title {
    font-size: 30px;
    line-height: 1.45;
  }

  .home-copy {
    margin-top: 10px;
    font-size: 13.5px;
    line-height: 1.5;
  }

  .home-cta {
    margin-top: 16px;
  }

  .teaser-cards {
    margin-top: 22px;
  }

  .quiz-screen {
    padding-top: 14px;
    padding-bottom: 24px;
  }

  .progress-meta {
    margin-top: 20px;
  }

  .quiz-frame {
    margin-top: 22px;
  }

  [lang="my"] .q-text {
    min-height: auto;
    padding-top: 10px;
    font-size: 21px;
    line-height: 1.45;
  }

  .options {
    gap: 10px;
    margin-top: 14px;
  }

  .option-btn {
    min-height: 58px;
    gap: 12px;
    padding: 13px 15px;
  }

  .option-number {
    width: 28px;
    height: 28px;
  }

  [lang="my"] .option-label {
    font-size: 13.6px;
    line-height: 1.5;
  }
}

@media (max-width: 480px) and (max-height: 700px) {
  .home-photo-stage {
    height: 260px;
  }

  .home-copy {
    font-size: 13px;
    line-height: 1.46;
  }
}
