@import url("/shared/styles/tokens.css");
@font-face {
  font-family: "Flowmery";
  src: url("/assets/fonts/Flowmery-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

body.game-body.template-shell {
  --template-accent-bg: var(--game-accent, #8e9380);
  --game-bg: var(--template-accent-bg);
  --game-title-color: var(--game-title-on-accent, #ffffff);
  --game-subtitle-color: var(--game-subtitle-on-accent, rgba(255, 255, 255, 0.86));
  background: var(--template-accent-bg);
  overflow-x: hidden;
}

body.game-body.template-shell .pwa-shell {
  max-width: none;
  width: 100%;
  margin: 0;
  display: block;
}

body.game-body.template-shell .container {
  width: 100%;
  max-width: none;
  margin: 0;
  padding-top: 0;
  padding-left: 0;
  padding-right: 0;
  padding-bottom: 108px;
}

body.game-body.template-shell .page-header {
  height: auto;
  overflow: visible;
  display: block;
  margin: 0 0 2px;
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;
  padding: 0;
}

body.game-body.template-shell .page-header .page-header__media {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  height: clamp(144px, 22vh, 196px);
  overflow: hidden;
}

body.game-body.template-shell .page-header .page-header__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 58%, var(--template-accent-bg) 100%);
  pointer-events: none;
}

body.game-body.template-shell .page-header .page-header__media img {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center var(--hero-focus-y, 45%);
  transform: none;
  border-radius: 0;
}

body.game-body.template-shell .page-header .page-header__text {
  position: static;
  margin: 10px auto 0;
  width: 100%;
  display: grid;
  gap: 2px;
  transform: none;
  text-align: center;
  align-items: center;
  padding: 0 16px;
}

body.game-body.template-shell .page-header .template-game-title {
  margin: 0;
  font-size: clamp(1.45rem, 7.2vw, 2.45rem);
  line-height: 1.05;
  max-width: 92vw;
  margin-left: auto;
  margin-right: auto;
  text-wrap: balance;
  overflow-wrap: anywhere;
  font-family: "Raleway", "Helvetica Neue", Arial, sans-serif;
  font-weight: 800;
  letter-spacing: 0.07em;
  color: var(--game-title-color);
  -webkit-text-stroke: 1.1px rgba(0, 0, 0, 0.9);
  paint-order: stroke fill;
  text-shadow:
    1px 0 0 rgba(0, 0, 0, 0.88),
    -1px 0 0 rgba(0, 0, 0, 0.88),
    0 1px 0 rgba(0, 0, 0, 0.88),
    0 -1px 0 rgba(0, 0, 0, 0.88),
    0 3px 14px rgba(0, 0, 0, 0.46);
  font-style: normal;
  text-transform: uppercase;
  font-stretch: normal;
}

body.game-body.template-shell .page-header .page-header__title {
  margin: 0;
  font-size: clamp(1.45rem, 7.2vw, 2.45rem);
  line-height: 1.05;
  max-width: 92vw;
  margin-left: auto;
  margin-right: auto;
  text-wrap: balance;
  overflow-wrap: anywhere;
  font-family: "Raleway", "Helvetica Neue", Arial, sans-serif;
  font-weight: 800;
  letter-spacing: 0.07em;
  color: var(--game-title-color);
  -webkit-text-stroke: 1.1px rgba(0, 0, 0, 0.9);
  paint-order: stroke fill;
  text-shadow:
    1px 0 0 rgba(0, 0, 0, 0.88),
    -1px 0 0 rgba(0, 0, 0, 0.88),
    0 1px 0 rgba(0, 0, 0, 0.88),
    0 -1px 0 rgba(0, 0, 0, 0.88),
    0 3px 14px rgba(0, 0, 0, 0.46);
  font-style: normal;
  text-transform: uppercase;
  font-stretch: normal;
}

body.game-body.template-shell .page-header .page-header__subtitle {
  margin: 0;
  color: #ffffff;
  font-size: clamp(0.64rem, 2.05vw, 0.78rem);
  line-height: 1.25;
  letter-spacing: 0.045em;
  font-weight: 700;
  text-transform: uppercase;
  -webkit-text-stroke: 0.7px rgba(0, 0, 0, 0.88);
  paint-order: stroke fill;
  text-shadow:
    1px 0 0 rgba(0, 0, 0, 0.78),
    -1px 0 0 rgba(0, 0, 0, 0.78),
    0 1px 0 rgba(0, 0, 0, 0.78),
    0 -1px 0 rgba(0, 0, 0, 0.78),
    0 2px 10px rgba(0, 0, 0, 0.42);
}

body.game-body.template-shell .page-header .page-header__subtitle.template-couple-name-line {
  font-family: "Flowmery", "Times New Roman", serif !important;
  font-size: clamp(1.42rem, 6.2vw, 2.34rem);
  line-height: 1.1;
  letter-spacing: 0.01em;
  color: var(--game-title-color);
  -webkit-text-stroke: 1px rgba(0, 0, 0, 0.9);
  paint-order: stroke fill;
  text-shadow:
    1px 0 0 rgba(0, 0, 0, 0.88),
    -1px 0 0 rgba(0, 0, 0, 0.88),
    0 1px 0 rgba(0, 0, 0, 0.88),
    0 -1px 0 rgba(0, 0, 0, 0.88),
    0 3px 14px rgba(0, 0, 0, 0.46);
  text-transform: none;
  font-weight: 400;
  transform: none;
}

body.game-body.template-shell .page-header .page-header__eyebrow {
  display: none;
}

body.game-body.template-shell .hero-safe-guide {
  display: none;
}

body.game-body.template-shell .hero-safe-guide__line {
  display: none;
}

body.game-body.template-shell .hero-safe-guide__hint {
  display: none;
}

body.game-body.template-shell .container > .card {
  width: 95vw;
  max-width: none;
  margin-left: calc(50% - 47.5vw);
  background: color-mix(in srgb, var(--game-card-bg, #ffffff) 94%, transparent);
  color: var(--game-card-text, var(--game-fg, #0f172a));
}

body.game-body.template-shell .container > .card :is(h1, h2, h3, h4, p, span, label, td, th) {
  color: var(--game-card-text, var(--game-fg, #0f172a));
}

body.game-body.template-shell #game-card {
  display: block;
  align-items: initial;
  gap: 0;
  overflow: hidden;
  min-height: 0;
}

body.game-body.template-shell #game-root {
  display: block;
  width: 100%;
  max-width: 100%;
}

body.game-body.template-shell #game-root > * {
  display: block;
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
}

body.game-body.template-shell #game-root > * + * {
  margin-top: 12px;
}

body.game-body.template-shell #game-root .card,
body.game-body.template-shell #game-root .puzzle-card,
body.game-body.template-shell #game-root .leaderboard-card,
body.game-body.template-shell #game-root .quiz-panel,
body.game-body.template-shell #game-root .player-panel {
  display: block;
  width: 100%;
  max-width: 100%;
}

body.game-body.template-shell #game-cta-card {
  width: 100%;
  max-width: 100%;
  margin: 12px 0 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

body.game-body.template-shell #game-cta-card .actions {
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

body.game-body.template-shell #game-cta-card .template-game-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  min-width: 160px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid color-mix(in srgb, var(--game-accent, #0d9488) 72%, #0f172a 28%);
  background: linear-gradient(
    135deg,
    var(--game-accent, #0d9488),
    var(--game-accent-secondary, #0f766e)
  );
  color: var(--game-cta-contrast, #ffffff);
  text-decoration: none;
  font-family: "Cormorant Garamond", "Times New Roman", serif;
  font-size: 1.02rem;
  line-height: 1;
  letter-spacing: 0.02em;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 10px 20px rgba(15, 23, 42, 0.22);
  cursor: pointer;
}

body.game-body.template-shell #game-cta-card .template-game-cta:hover,
body.game-body.template-shell #game-cta-card .template-game-cta:focus-visible {
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--game-accent, #0d9488) 88%, #000000 12%),
    color-mix(in srgb, var(--game-accent-secondary, #0f766e) 88%, #000000 12%)
  );
}

body.game-body.template-shell .quiz-footer,
body.game-body.template-shell .actions .back-link,
body.game-body.template-shell > .back-link {
  display: none !important;
}

body.game-body.template-shell a[data-home-link]:not(.template-bottom-nav__item) {
  display: none !important;
}

.template-bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100vw;
  z-index: var(--z-nav);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 10px max(14px, env(safe-area-inset-left)) calc(10px + env(safe-area-inset-bottom))
    max(14px, env(safe-area-inset-right));
  background: color-mix(in srgb, var(--game-card-bg, #ffffff) 94%, transparent);
  border-top: 1px solid var(--game-border, rgba(15, 23, 42, 0.16));
  box-shadow: 0 -10px 22px rgba(15, 23, 42, 0.16);
}

.template-bottom-nav__item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #000000;
  text-decoration: none;
}

.template-bottom-nav__item[aria-current="page"] {
  color: #000000;
}

.template-bottom-nav__icon {
  width: 42px;
  height: 42px;
  stroke: currentColor;
}

.template-bottom-nav__icon * {
  stroke: currentColor;
  fill: none;
}

.template-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;
}

@media (max-height: 780px) {
  body.game-body.template-shell .container {
    padding-bottom: 96px;
  }

  body.game-body.template-shell .page-header {
    margin-bottom: 0;
  }

  body.game-body.template-shell .page-header .page-header__media {
    height: clamp(94px, 15vh, 128px);
  }

  body.game-body.template-shell .page-header .page-header__text {
    margin-top: 2px;
    gap: 0;
    padding: 0 12px;
  }

  body.game-body.template-shell .page-header .template-game-title,
  body.game-body.template-shell .page-header .page-header__title {
    font-size: clamp(1.2rem, 5.8vw, 1.8rem);
    line-height: 1.03;
  }

  body.game-body.template-shell .page-header .page-header__subtitle {
    font-size: clamp(0.6rem, 1.8vw, 0.72rem);
    line-height: 1.18;
  }

  body.game-body.template-shell .page-header .page-header__subtitle.template-couple-name-line {
    font-size: clamp(1.15rem, 5vw, 1.72rem);
    line-height: 1.04;
  }

  body.game-body.template-shell .container > .card,
  body.game-body.template-shell #game-cta-card {
    margin-bottom: 8px;
  }
}
