:root {
  --neutral: #0d0214;
  --surface: #2d1236;
  --surface-soft: #220d2c;
  --outline: #4a2155;
  --primary: #fbffab;
  --secondary: #ff007f;
  --secondary-dark: #ba005b;
  --tertiary: #00ffff;
  --success: #00ff88;
  --text: #ffffff;
  --text-soft: rgba(255, 255, 255, 0.72);
  --font-headline: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  --font-body: "Be Vietnam Pro", "Segoe UI", sans-serif;
  --viewport-bottom-offset: 0px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  overscroll-behavior-x: contain;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(circle at 18% 16%, rgba(255, 0, 127, 0.22) 0%, transparent 36%),
    radial-gradient(circle at 84% 82%, rgba(0, 255, 255, 0.13) 0%, transparent 40%),
    radial-gradient(circle at 50% -10%, #311340 0%, var(--neutral) 62%);
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.material-symbols-outlined {
  font-family: "Material Symbols Outlined";
  font-weight: 400;
  font-style: normal;
  font-size: 24px;
  display: inline-block;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-variation-settings: "FILL" 0, "wght" 500, "GRAD" 0, "opsz" 24;
}

body.platform-capacitor .native-ui-icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  vertical-align: -0.1em;
}

body.platform-capacitor .native-ui-icon-skull {
  background-image: url("icons/ui/skull.svg");
}

body.platform-capacitor .native-ui-icon-heart {
  background-image: url("icons/ui/heart-red.svg");
}

body.platform-capacitor .native-ui-icon-check {
  background-image: url("icons/ui/check-green.svg");
}

body.platform-capacitor .native-ui-icon-cross {
  background-image: url("icons/ui/cross-red.svg");
}

body.platform-capacitor .native-ui-icon-download {
  background-image: url("icons/ui/download.svg");
}

body.platform-capacitor .native-ui-icon-copy {
  background-image: url("icons/ui/copy.svg");
}

.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 18%, #3d1450 0%, var(--neutral) 62%);
  transition: opacity 260ms ease, visibility 260ms ease;
}

.splash-screen.is-hiding {
  opacity: 0;
  visibility: hidden;
}

.splash-card {
  width: min(420px, 92vw);
  padding: 22px;
  text-align: center;
  border-radius: 38px;
  background: linear-gradient(145deg, #2d1236 0%, #210c2a 100%);
  border: 4px solid var(--outline);
  box-shadow: 0 14px 0 #17081d, 0 0 34px rgba(255, 0, 127, 0.24);
}

.splash-emoji {
  width: 96px;
  height: 96px;
  margin: 0 auto 6px;
  border-radius: 999px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 18px rgba(255, 107, 155, 0.42);
}

.splash-emoji img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.splash-card h2 {
  margin: 6px 0 4px;
  font-family: var(--font-headline);
  font-size: 2.1rem;
  font-weight: 800;
  font-style: italic;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--primary);
  text-shadow: 0 0 12px rgba(243, 255, 0, 0.38);
}

.splash-card p {
  margin: 0;
  color: var(--text-soft);
  font-weight: 600;
}

#splash-subtitle::after {
  content: "";
  animation: splashDots 1.2s steps(4, end) infinite;
}

@keyframes splashDots {
  0% { content: ""; }
  25% { content: "."; }
  50% { content: ".."; }
  75% { content: "..."; }
  100% { content: ""; }
}

.app {
  width: 100%;
  max-width: 100%;
  margin: 0;
  min-height: 100dvh;
  padding: 0 0 calc(104px + env(safe-area-inset-bottom, 0px));
  overflow-x: clip;
}

.header {
  position: sticky;
  top: 0;
  z-index: 20;
  width: 100%;
  padding: 14px 24px;
  border-bottom: 1px solid rgba(255, 107, 155, 0.24);
  box-shadow: 0 1px 0 rgba(255, 107, 155, 0.16);
  background: rgba(23, 8, 29, 0.92);
  backdrop-filter: blur(8px);
}

.header-top {
  width: min(100%, 1720px);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.brand-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(255, 107, 155, 0.75);
  background: #2d1236;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.28) inset,
    0 0 10px rgba(255, 255, 255, 0.52),
    0 0 18px rgba(255, 255, 255, 0.42),
    0 0 8px rgba(255, 107, 155, 0.16);
  flex: 0 0 auto;
}

.brand-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.header h1 {
  margin: 0;
  font-family: var(--font-headline);
  font-size: clamp(1.46rem, 2vw, 1.82rem);
  font-style: italic;
  font-weight: 700;
  font-synthesis: none;
  letter-spacing: -0.03em;
  line-height: 1;
  text-transform: uppercase;
  color: #fbffab;
  text-shadow: 0 0 8px rgba(251, 255, 171, 0.6);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.header-actions {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.header-score {
  min-width: 72px;
  min-height: 34px;
  border-radius: 10px;
  padding: 4px 8px 5px;
  border: 1px solid rgba(255, 107, 155, 0.28);
  background: rgba(13, 2, 20, 0.95);
  font-family: var(--font-headline);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  align-self: center;
}

body[data-app-view="game"] .header-score {
  display: inline-flex;
}

body[data-app-view="home"] .header-score,
body[data-app-view="ranking"] .header-score {
  display: none;
}

.header-score-label {
  color: #ff6b9b;
  font-size: 0.42rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1;
}

.header-score-value {
  color: #fbffab;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1;
}

.header-cumulative {
  min-width: 82px;
}

.header-cumulative .header-score-value {
  font-size: 0.9rem;
  letter-spacing: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.16em;
  white-space: nowrap;
}

.header-cumulative-part {
  display: inline-flex;
  align-items: center;
  gap: 0.08em;
}

.header-cumulative-part .material-symbols-outlined {
  font-size: 0.7em;
  line-height: 1;
  font-variation-settings: "FILL" 1, "wght" 700, "GRAD" 0, "opsz" 20;
}

.header-cumulative-part-correct .material-symbols-outlined {
  color: #00f0b3;
}

.header-cumulative-part-wrong .material-symbols-outlined {
  color: #ff6b9b;
}

.lang-switcher {
  display: inline-flex;
  gap: 7px;
}

.lang-btn {
  min-width: 38px;
  min-height: 38px;
  border-radius: 999px;
  border: 2px solid rgba(255, 107, 155, 0.3);
  background: #2d1236;
  color: #fbffab;
  font-family: var(--font-headline);
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 120ms ease;
}

.lang-btn:hover {
  transform: translateY(-1px);
  color: #fbffab;
  border-color: rgba(251, 255, 171, 0.55);
}

.lang-btn.active {
  background: linear-gradient(145deg, var(--secondary) 0%, var(--secondary-dark) 100%);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 0 #8a0044;
}

.header-settings {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 2px solid rgba(255, 107, 155, 0.3);
  background: #2d1236;
  color: #fbffab;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.header-settings .material-symbols-outlined {
  font-size: 1.1rem;
}

.header-settings:hover {
  color: #fbffab;
  border-color: rgba(251, 255, 171, 0.55);
}

.landing-screen {
  width: min(100%, 1720px);
  margin: 0 auto;
  padding: 60px 14px 10px;
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh - 220px);
}

.landing-hero {
  text-align: center;
  padding-top: 12px;
}

.landing-logo-shell {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 26px;
}

.landing-logo-wrap {
  position: relative;
  z-index: 1;
  width: clamp(190px, 32vw, 256px);
  height: clamp(190px, 32vw, 256px);
  border-radius: 999px;
  padding: 6px;
  background: linear-gradient(145deg, #8a3dff 0%, #b12dff 62%, #ff5cab 100%);
  box-shadow: 0 0 48px rgba(138, 61, 255, 0.62), 0 0 82px rgba(166, 42, 255, 0.34), inset 0 0 20px rgba(255, 255, 255, 0.18);
  animation: logoFloat 3.2s ease-in-out infinite, logoGlow 2.5s ease-in-out infinite;
}

.landing-logo-inner {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  border: 4px solid rgba(255, 255, 255, 0.12);
  background: var(--neutral);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.landing-logo-inner img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transform: scale(1.33);
  transform-origin: center;
  max-width: none;
  max-height: none;
}

.online-chip {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  z-index: 6;
  min-height: 38px;
  padding: 0 20px;
  width: max-content;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  font-family: var(--font-headline);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: linear-gradient(90deg, #ff6b9b 0%, #ff4081 100%);
  box-shadow: 0 4px 0 #8a0044, 0 0 18px rgba(255, 107, 155, 0.6);
}

.landing-title {
  margin: 0;
  font-family: var(--font-headline);
  font-size: clamp(2.8rem, 8vw, 6rem);
  font-style: italic;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.landing-title .landing-title-highlight {
  color: #ff6b9b;
  text-shadow: 0 0 12px rgba(255, 107, 155, 0.8);
}

.landing-subtitle {
  margin: 14px auto 24px;
  max-width: 820px;
  color: rgb(251 255 171 / 0.8);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: -0.005em;
}

.play-btn {
  min-height: 84px;
  border-radius: 999px;
  border: 0;
  padding: 24px 50px;
  margin: 16px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: linear-gradient(145deg, #9d00ff 0%, #8e24aa 100%);
  box-shadow: 0 10px 0 #5e007d, 0 12px 26px rgba(157, 0, 255, 0.22);
  color: #fff;
  font-family: var(--font-headline);
  font-size: clamp(1.22rem, 3.3vw, 1.85rem);
  font-style: italic;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: transform 140ms ease, box-shadow 140ms ease, filter 140ms ease;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.play-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, transparent 0%, rgba(255, 255, 255, 0.2) 52%, transparent 100%);
  opacity: 0;
  transition: opacity 160ms ease;
}

.play-btn:hover::before {
  opacity: 1;
}

.play-label,
.play-emoji {
  position: relative;
  z-index: 1;
}

.play-emoji {
  font-size: 2rem;
  transition: transform 180ms ease;
  font-style: normal;
  line-height: 1;
}

.play-btn:hover .play-emoji {
  transform: translateX(6px);
}

.play-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 0 #5e007d, 0 25px 50px rgba(157, 0, 255, 0.4);
  filter: brightness(1.06);
}

.play-btn:active {
  transform: translateY(3px);
  box-shadow: 0 4px 0 #5e007d;
}

.landing-grid {
  margin-top: 48px;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  align-items: stretch;
}

.landing-card,
.ranking-shell {
  border-radius: 38px;
  padding: 36px 30px 30px 36px;
  border: 2px solid transparent;
  background:
    linear-gradient(145deg, rgba(56, 20, 68, 0.94) 0%, rgba(43, 17, 53, 0.96) 100%) padding-box,
    linear-gradient(135deg, rgba(255, 107, 155, 0.55) 0%, rgba(139, 46, 255, 0.45) 100%) border-box;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.landing-card:hover,
.ranking-shell:hover {
  transform: translateY(-2px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07);
}

.landing-card h3,
.ranking-shell .title {
  margin: 0;
  font-family: var(--font-headline);
  font-size: 2rem;
  font-style: italic;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.02em;
}

.landing-card-main h3 {
  margin-top: 12px;
  font-size: 2.5rem;
  line-height: 1.05;
  font-weight: 700;
  font-synthesis: none;
}

.landing-card-steps h3 {
  font-style: normal;
}

.landing-card-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.landing-card p {
  margin: 12px 0 0;
  color: rgb(251 255 171 / 0.8);
  line-height: 1.45;
}

.daily-challenges-subtitle {
  margin-top: 10px;
  font-size: 0.96rem;
}

.daily-challenges-list {
  width: 100%;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.daily-challenges-item {
  min-height: 40px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  font-weight: 600;
}

.daily-challenges-item.is-completed {
  border-color: rgba(0, 255, 136, 0.58);
  background: rgba(0, 255, 136, 0.12);
}

.daily-challenges-dot {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.42);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.7rem;
  flex: 0 0 auto;
}

.daily-challenges-item.is-completed .daily-challenges-dot {
  border-color: #00ff88;
  background: #00ff88;
  color: #17081d;
}

.daily-challenges-progress {
  margin-top: auto;
  padding-top: 14px;
  width: 100%;
  color: var(--primary);
  font-family: var(--font-headline);
  font-weight: 700;
  font-size: 0.85rem;
}

.landing-highlight {
  min-height: 30px;
  border-radius: 999px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  background: #fbffab;
  color: #17081d;
  box-shadow: 0 3px 0 #c5ca7c;
  font-family: var(--font-headline);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.card-bulb {
  font-size: 2.7rem;
  color: #ff8ab9;
  margin: 8px 0 20px 6px;
  font-variation-settings: "FILL" 1;
  text-shadow: 0 0 10px rgba(255, 138, 185, 0.45);
}

.steps-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: grid;
  gap: 14px;
}

.steps-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.steps-list span {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-headline);
  font-size: 0.8rem;
  font-weight: 800;
  flex: 0 0 auto;
}

.steps-list li:nth-child(1) span {
  background: #a76cf0;
  box-shadow: 0 3px 0 #6c44a3;
}

.steps-list li:nth-child(2) span {
  background: #ff80bd;
  box-shadow: 0 3px 0 #b55284;
}

.steps-list li:nth-child(3) span {
  background: #f7f7b6;
  color: #2a1832;
  box-shadow: 0 3px 0 #bdbd8a;
}

.steps-list p {
  margin: 2px 0 0;
  color: rgb(251 255 171 / 0.8);
  font-size: 0.94rem;
  font-weight: 500;
}

.trust-row {
  margin-top: auto;
  padding-top: 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  filter: grayscale(0.5);
  opacity: 0.72;
  transition: filter 180ms ease, opacity 180ms ease;
}

.trust-row:hover {
  filter: grayscale(0);
  opacity: 1;
}

.trust-pill {
  min-height: 40px;
  border-radius: 999px;
  padding: 17px 22px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(45, 18, 54, 0.55);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-family: var(--font-headline);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.trust-pill .material-symbols-outlined {
  font-size: 1.34rem;
}

.trust-pill:nth-child(1) .material-symbols-outlined {
  color: #fbffab;
}

.trust-pill:nth-child(2) .material-symbols-outlined {
  color: #9d00ff;
}

.trust-pill:nth-child(3) .material-symbols-outlined {
  color: #ff6b9b;
}

.game-view {
  width: min(540px, 100%);
  margin: 0 auto;
  padding: 26px 14px 0;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

body.game-result-visible .game-view {
  width: min(980px, 100%);
  padding-top: 20px;
}

.game-top {
  margin-bottom: 20px;
  position: relative;
  z-index: 6;
}

.game-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2px;
  margin-bottom: 8px;
}

.question-label {
  font-family: var(--font-headline);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
}

.timer-chip {
  min-height: 32px;
  border-radius: 999px;
  padding: 0 10px;
  border: 2px solid rgba(255, 107, 155, 0.2);
  background: #2d1236;
  color: #ff6b9b;
  font-family: var(--font-headline);
  font-size: 0.85rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
}

.progress-track {
  width: 100%;
  height: 16px;
  border-radius: 999px;
  border: 2px solid #2d1236;
  background: #2d1236;
  padding: 2px;
  overflow: hidden;
}

.progress-fill {
  width: 20%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--secondary) 0%, var(--primary) 100%);
  box-shadow: 0 0 12px rgba(255, 0, 127, 0.34);
  transition: width 180ms ease;
}

.hud-legacy {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.card-zone {
  min-height: 320px;
  margin-top: 38px;
  position: relative;
  z-index: 6;
}

.card {
  width: 100%;
  border-radius: 40px;
  border: 4px solid #2d1236;
  background: #2d1236;
  overflow: hidden;
  box-shadow: 0 0 14px rgba(255, 232, 245, 0.22), 0 0 28px rgba(255, 107, 155, 0.2), 0 18px 32px rgba(0, 0, 0, 0.36);
  touch-action: pan-y;
  transition: transform 140ms ease;
}

.card.is-dragging {
  transition: none;
}

.image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  background: #130818;
}

.image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  -webkit-user-drag: none;
  user-drag: none;
}

.image-wrap::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 44%;
  background: linear-gradient(180deg, transparent 0%, rgba(13, 2, 20, 0.94) 100%);
  pointer-events: none;
}

.image-loader {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(13, 2, 20, 0.68);
  z-index: 2;
}

.image-loader.is-visible {
  display: flex;
}

.spinner {
  width: 50px;
  height: 50px;
  border-radius: 999px;
  border: 5px solid rgba(255, 255, 255, 0.28);
  border-top-color: var(--secondary);
  animation: spin 0.85s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.person-theme {
  position: static;
  z-index: 3;
  margin: 0 0 10px;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 12px;
  background: var(--secondary);
  box-shadow: 0 4px 0 #8a0044;
  color: #fff;
  font-family: var(--font-headline);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
}

.swipe-overlay {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  opacity: 0;
  border-radius: 999px;
  border: 3px solid transparent;
  min-width: 250px;
  min-height: 114px;
  padding: 10px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-headline);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  pointer-events: none;
  z-index: 4;
  transition: all 100ms ease;
}

.swipe-overlay.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.swipe-overlay.is-left {
  background: rgba(45, 18, 54, 0.96);
  border-color: #ff6b9b;
  color: #ff6b9b;
  box-shadow: 0 0 20px rgba(255, 107, 155, 0.44), 0 0 34px rgba(255, 107, 155, 0.2);
}

.swipe-overlay.is-right {
  background: rgba(45, 18, 54, 0.96);
  border-color: #00ff88;
  color: #00ff88;
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.44), 0 0 34px rgba(0, 255, 136, 0.2);
}

.swipe-overlay-icon {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  font-variation-settings: "FILL" 1;
}

.swipe-overlay.is-left .swipe-overlay-icon {
  background: #ff6b9b;
  color: #fff;
}

.swipe-overlay.is-right .swipe-overlay-icon {
  background: #00ff88;
  color: #17081d;
}

.swipe-overlay-label {
  line-height: 1;
  font-size: 1.16rem;
}

.swipe-overlay-ms {
  font-size: 2.2rem;
  line-height: 1;
  font-variation-settings: "FILL" 1, "wght" 700, "GRAD" 0, "opsz" 24;
}

.card-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  padding: 0 0 29px 30px;
  background: transparent;
}

.card-info h2 {
  margin: 0;
  font-family: var(--font-headline);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.72);
}

.person-mini-bio {
  margin: 2px 0 0;
  max-width: min(90%, 620px);
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.3;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.72);
}

.photo-credit {
  display: none;
}

.photo-credit a {
  color: var(--primary);
  font-weight: 700;
}

.actions {
  margin-top: 34px;
  transform: translateY(10px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  position: relative;
  z-index: 6;
}

.ambient-skull {
  position: fixed;
  right: -220px;
  top: var(--ambient-top, 50dvh);
  width: clamp(132px, 24vw, 180px);
  height: clamp(132px, 24vw, 180px);
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  z-index: 4;
  filter: none;
  transform: translate3d(0, -50%, 0) scale(0.9);
  will-change: transform, opacity;
}

.ambient-skull img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: scale(0.82);
  filter: none;
  opacity: 0.82;
}

.ambient-skull.is-running {
  animation: ambientSkullCruise 4.9s cubic-bezier(0.16, 0.82, 0.24, 1) forwards;
}

.ambient-heart {
  position: fixed;
  left: -220px;
  top: var(--ambient-top, 50dvh);
  width: clamp(132px, 24vw, 180px);
  height: clamp(132px, 24vw, 180px);
  opacity: 0;
  pointer-events: none;
  z-index: 4;
  transform: translate3d(0, -50%, 0);
  will-change: transform, opacity;
}

.ambient-heart img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: scale(0.82);
  filter: none;
  opacity: 0.82;
}

.ambient-heart.is-running {
  animation: ambientSkullCruise 5.6s cubic-bezier(0.16, 0.82, 0.24, 1) forwards;
}

/* Ambient mascots disabled for now */
.ambient-skull,
.ambient-heart {
  display: none !important;
}

@keyframes ambientSkullCruise {
  0% {
    transform: translate3d(0, -50%, 0);
    opacity: 0;
  }
  12% {
    opacity: 0.9;
    transform: translate3d(-18vw, calc(-50% + var(--ambient-y-a, 0px)), 0);
  }
  28% {
    opacity: 0.84;
    transform: translate3d(-38vw, calc(-50% + var(--ambient-y-b, 0px)), 0);
  }
  44% {
    opacity: 0.68;
    transform: translate3d(var(--ambient-x-pause, -240px), calc(-50% + var(--ambient-y-c, 0px)), 0);
  }
  58% {
    opacity: 0.5;
    transform: translate3d(var(--ambient-x-pause, -240px), calc(-50% + var(--ambient-y-d, 0px)), 0);
  }
  68% {
    opacity: 0.56;
    transform: translate3d(calc(var(--ambient-x-pause, -240px) - 6vw), calc(-50% + var(--ambient-y-d, 0px)), 0);
  }
  86% {
    opacity: 0.78;
  }
  100% {
    transform: translate3d(var(--ambient-x-end, -1200px), calc(-50% + var(--ambient-y-end, 0px)), 0);
    opacity: 0;
  }
}

body.game-result-visible .ambient-skull,
body.game-result-visible .ambient-heart,
body[data-app-view="home"] .ambient-skull,
body[data-app-view="home"] .ambient-heart,
body[data-app-view="ranking"] .ambient-skull,
body[data-app-view="ranking"] .ambient-heart {
  display: none;
}

.btn {
  min-height: 160px;
  border-radius: 38px;
  border: 4px solid #2d1236;
  background: #2d1236;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #fff;
  font-family: var(--font-headline);
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
}

.action-icon {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  font-variation-settings: "FILL" 1;
}

.btn-dead {
  border-color: var(--secondary);
  color: var(--secondary);
  box-shadow: 0 0 20px rgba(255, 107, 155, 0.4), 0 0 40px rgba(255, 107, 155, 0.2);
}

.btn-dead .action-icon {
  width: 72px;
  height: 72px;
  background: #ff6b9b;
  color: #fff;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25);
}

.btn-alive {
  border-color: var(--success);
  color: var(--success);
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.4), 0 0 40px rgba(0, 255, 136, 0.2);
}

.btn-alive .action-icon {
  width: 72px;
  height: 72px;
  background: #00ff88;
  color: #130818;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25);
}

.btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

.btn:active {
  transform: translateY(3px);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.feedback {
  min-height: 24px;
  margin: 8px 0 0;
  text-align: center;
  font-family: var(--font-headline);
  font-weight: 700;
  color: var(--primary);
}

.result {
  width: 100%;
  border-radius: 38px;
  border: 4px solid var(--outline);
  background: var(--surface);
  box-shadow: 0 10px 0 #17081d;
  padding: 16px;
}

.result-v2 {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
  width: min(960px, 100%);
  margin: 0 auto;
}

.result-badge {
  width: max-content;
  margin: 4px auto 22px;
  min-height: 40px;
  border-radius: 999px;
  padding: 0 20px;
  background: linear-gradient(145deg, #ff6b9b 0%, #ba005b 100%);
  color: #fff;
  font-family: var(--font-headline);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 2px rgba(255, 107, 155, 0.22), 0 8px 20px rgba(255, 107, 155, 0.34);
  animation: resultBadgeBounce 1.5s ease-in-out infinite;
}

.result-title {
  margin: 0 0 16px;
  text-align: center;
  font-family: var(--font-headline);
  font-size: clamp(3rem, 8vw, 5.3rem);
  font-style: italic;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.96;
  text-transform: uppercase;
  white-space: nowrap;
  color: #fbffab;
  text-shadow: 0 0 10px rgba(251, 255, 171, 0.5), 0 0 20px rgba(251, 255, 171, 0.3);
}

.result-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  margin-bottom: 60px;
}

.result-main-card {
  border-radius: 42px;
  padding: 28px 26px 22px;
  border: 4px solid #4a2155;
  background: #2d1236;
  box-shadow: 0 10px 0 #17081d;
  position: relative;
  overflow: hidden;
}

.result-main-chip {
  min-height: 30px;
  border-radius: 999px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  background: #fbffab;
  color: #17081d;
  font-family: var(--font-headline);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Hidden for now per product decision. */
.result-main-chip {
  display: none;
}

.result-main-score {
  margin: 0 0 10px;
  font-family: var(--font-headline);
  font-size: clamp(5.1rem, 10vw, 8.6rem);
  line-height: 0.95;
  font-style: italic;
  font-weight: 800;
  color: #fbffab;
  text-shadow: 0 0 16px rgba(251, 255, 171, 0.4);
  display: inline-flex;
  align-items: baseline;
  gap: 0.16em;
}

.result-score-main {
  color: #fbffab;
}

.result-score-main {
  font-size: 1em;
}

.result-score-total {
  color: #ff6b9b;
  font-size: 0.28em;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.result-main-message {
  margin: 0;
  max-width: 430px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 700;
  font-size: 1.08rem;
  line-height: 1.25;
}

.result-main-card::after {
  content: "emoji_events";
  position: absolute;
  right: 18px;
  bottom: -8px;
  font-family: "Material Symbols Outlined";
  font-variation-settings: "FILL" 1, "wght" 700, "GRAD" 0, "opsz" 48;
  font-size: 9.2rem;
  line-height: 1;
  opacity: 0.12;
  color: #fbffab;
  pointer-events: none;
}

.result-side-cards {
  display: grid;
  gap: 14px;
}

.result-side-card {
  border-radius: 34px;
  padding: 18px 12px;
  color: #fff;
  text-align: center;
  box-shadow: 0 10px 0 rgba(0, 0, 0, 0.28);
  min-width: 0;
  overflow: hidden;
}

.result-side-card .material-symbols-outlined {
  font-size: 1.7rem;
  margin-bottom: 4px;
}

.result-side-card p {
  margin: 0;
  font-family: var(--font-headline);
  font-size: clamp(2.1rem, 5vw, 2.8rem);
  font-style: italic;
  font-weight: 800;
  line-height: 1;
}

#result-cumulative-value {
  display: block;
  text-align: center;
  white-space: nowrap;
}

.result-side-card small {
  display: block;
  margin-top: 4px;
  font-family: var(--font-headline);
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.82;
}

.result-cumulative-hint {
  margin-top: 2px;
  letter-spacing: 0.08em;
  opacity: 0.92;
}

.result-side-card-cyan {
  background: linear-gradient(145deg, #00f0ff 0%, #00a3ff 100%);
  color: #fff;
  box-shadow: 0 10px 0 #005687, 0 0 20px rgba(0, 240, 255, 0.45);
}

.result-side-card-pink {
  background: linear-gradient(145deg, #ff6b9b 0%, #ba005b 100%);
  color: #fff;
  box-shadow: 0 10px 0 #8a0044, 0 0 20px rgba(255, 107, 155, 0.45);
}

.result-verdict {
  margin-top: 0;
  padding-top: 0;
}

.result-verdict-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 4px 20px 20px;
}

.result-verdict-head h3 {
  margin: 0;
  color: #fbffab;
  font-family: var(--font-headline);
  font-size: 2.1rem;
  font-style: italic;
  font-weight: 800;
  text-transform: uppercase;
}

.result-fail-chip {
  min-height: 30px;
  border-radius: 999px;
  padding: 0 12px;
  border: 2px solid #ff6b9b;
  background: rgba(74, 33, 85, 0.65);
  color: #ff6b9b;
  font-family: var(--font-headline);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
}

.history-verdict {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 14px;
  max-height: none;
  overflow: visible;
}

.history-verdict li {
  min-height: 92px;
  border-radius: 22px;
  border: 3px solid #582567;
  background: #2d1236;
  padding: 16px 16px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.95rem;
  font-weight: 600;
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 14px;
  align-items: center;
}

.history-verdict li.is-correct {
  border-color: #5b2f66;
}

.history-verdict li.is-wrong {
  border-color: #6b2e67;
}

.result-entry-icon {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 2px solid #ff6b9b;
  color: #ff6b9b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-headline);
  font-size: 1.5rem;
  line-height: 1;
}

.history-verdict li.is-correct .result-entry-icon {
  border-color: #32da8e;
  color: #32da8e;
}

.result-entry-content {
  display: grid;
  gap: 4px;
}

.result-entry-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
}

.result-entry-sub {
  margin: 0;
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.76);
}

.result-entry-sub strong {
  color: #ff6b9b;
}

.result-entry-bio {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.62);
}

.result-entry-badge {
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-headline);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.result-entry-badge.is-dead {
  background: linear-gradient(145deg, #ff6b9b 0%, #ba005b 100%);
  color: #fff;
}

.result-entry-badge.is-alive {
  background: linear-gradient(145deg, #00f0b3 0%, #00b46f 100%);
  color: #062a1a;
}

.result-cta {
  margin-top: 18px;
  display: grid;
  gap: 15px;
}

.result-cta-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.result-ghost-btn {
  min-height: 62px;
  border-radius: 34px;
  border: 3px solid #4a2155;
  background: #2d1236;
  color: #fff;
  font-family: var(--font-headline);
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.result-ghost-btn:active {
  transform: translateY(4px);
}

.result-ghost-btn .material-symbols-outlined {
  font-size: 2.2rem;
}

@keyframes resultBadgeBounce {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-7px) scale(1.02);
  }
}

/* Result mode: hide question/timer/progress + gameplay controls. */
body.game-result-visible #game-view .game-top {
  display: none;
}

body.game-result-visible #game-view .actions,
body.game-result-visible #game-view .feedback {
  display: none;
}

.result-ghost-share {
  border-color: #ff6b9b;
  color: #ff6b9b;
  box-shadow: 0 6px 0 #8a0044, 0 0 14px rgba(255, 0, 127, 0.2);
}

.result-ghost-share:active {
  box-shadow: 0 2px 0 #8a0044, 0 0 10px rgba(255, 0, 127, 0.2);
}

.result-ghost-ranks {
  border-color: #00f0ff;
  color: #00f0ff;
  box-shadow: 0 6px 0 #005687, 0 0 14px rgba(0, 240, 255, 0.2);
}

.result-ghost-ranks:active {
  box-shadow: 0 2px 0 #005687, 0 0 10px rgba(0, 240, 255, 0.2);
}

.result-v2 .share-panel {
  margin-top: 0;
}

body.game-result-visible .btn-restart {
  margin-top: 10px;
}

body.game-result-visible .btn-restart {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  flex-direction: row;
  gap: 12px;
  border-radius: 999px;
  border: 3px solid #ff6b9b;
  box-shadow: 0 8px 0 #8a0044;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  padding: 8px 14px 8px 8px;
}

body.game-result-visible .btn-restart:active {
  transform: translateY(4px);
  box-shadow: 0 3px 0 #8a0044;
}

body.game-result-visible .btn-restart .btn-restart-accent .material-symbols-outlined {
  font-size: 1.9rem;
}

.share-modal {
  position: fixed;
  inset: 0;
  z-index: 10030;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow: auto;
}

.share-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 8, 14, 0.74);
}

.share-modal-card {
  position: relative;
  z-index: 1;
  width: min(560px, calc(100vw - 24px));
  max-height: min(86dvh, 760px);
  overflow: auto;
  border-radius: 28px;
  border: 4px solid #4a2155;
  background: #2d1236;
  box-shadow: 0 14px 0 #17081d;
  padding: 16px;
}

.share-modal-card .share-panel {
  margin-top: 0;
  border: 0;
  background: transparent;
  padding: 4px 0 0;
}

.share-modal-close {
  position: absolute;
  right: 10px;
  top: 8px;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 2px solid #4a2155;
  background: #17081d;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
}

.settings-modal {
  position: fixed;
  inset: 0;
  z-index: 10025;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.settings-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 8, 14, 0.74);
}

.settings-modal-sheet {
  position: relative;
  z-index: 1;
  width: min(680px, calc(100vw - 24px));
  max-height: min(88dvh, 760px);
  overflow: auto;
  border-radius: 28px;
  border: 3px solid var(--outline);
  background: #1f0e28;
  box-shadow: 0 14px 0 #17081d;
  padding: 14px;
}

.settings-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.settings-modal-head h2 {
  margin: 0;
  font-family: var(--font-headline);
  color: var(--primary);
  font-size: 1.5rem;
}

.settings-modal-close {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 2px solid var(--outline);
  background: #2d1236;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
}

.settings-list {
  display: grid;
  gap: 10px;
}

.settings-item {
  border-radius: 22px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.settings-item-copy h3 {
  margin: 0;
  font-family: var(--font-headline);
  color: #fff;
  font-size: 1rem;
}

.settings-item-copy p {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.9rem;
  line-height: 1.4;
}

.settings-action-btn {
  min-height: 44px;
  border-radius: 999px;
  border: 2px solid #ff6b9b;
  background: linear-gradient(145deg, #ff6b9b 0%, #ba005b 100%);
  color: #fff;
  font-family: var(--font-headline);
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0 16px;
  cursor: pointer;
  white-space: nowrap;
}

.settings-confirm {
  margin-top: 10px;
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(9, 8, 14, 0.45);
  padding: 10px;
}

.settings-confirm p {
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.87rem;
  line-height: 1.35;
}

.settings-confirm-actions {
  margin-top: 8px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.settings-confirm-btn {
  min-height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0 12px;
  font-family: var(--font-headline);
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
}

.settings-confirm-btn-cancel {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.settings-confirm-btn-apply {
  border-color: rgba(255, 107, 155, 0.65);
  background: linear-gradient(145deg, #ff6b9b 0%, #ba005b 100%);
  color: #fff;
}

.settings-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 32px;
}

.settings-switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.settings-switch-track {
  position: relative;
  width: 52px;
  height: 32px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  transition: background-color 160ms ease;
}

.settings-switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.32);
  transition: transform 160ms ease;
}

.settings-switch input:checked + .settings-switch-track {
  background: #32d74b;
}

.settings-switch input:checked + .settings-switch-track::after {
  transform: translateX(20px);
}

body.platform-capacitor .settings-modal-sheet {
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.4);
  background: rgba(21, 14, 31, 0.98);
}

body.platform-capacitor .settings-item {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 16px;
}

.result:not(.result-v2) h2 {
  margin: 0 0 8px;
  font-family: var(--font-headline);
  font-size: 2rem;
  font-style: italic;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--primary);
}

.result:not(.result-v2) #final-score {
  margin: 0 0 8px;
  font-weight: 700;
}

.cumulative-stats-panel {
  margin-bottom: 10px;
  border-radius: 24px;
  border: 4px solid var(--outline);
  background: #1f0d29;
  padding: 12px;
}

.cumulative-stats-panel h3 {
  margin: 0 0 5px;
  font-family: var(--font-headline);
  color: var(--primary);
}

.cumulative-stats-panel p {
  margin: 0;
  color: var(--text-soft);
}

.cumulative-stats-panel p + p {
  margin-top: 4px;
}

.history {
  margin: 0;
  padding-left: 18px;
  color: var(--text-soft);
}

.result:not(.result-v2) #history {
  max-height: 160px;
  overflow: auto;
}

.share-panel {
  margin-top: 10px;
  border-radius: 26px;
  border: 4px solid var(--outline);
  background: #1f0d29;
  padding: 12px;
}

.share-panel h3 {
  margin: 0 0 8px;
  font-family: var(--font-headline);
  color: var(--primary);
}

.share-buttons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.social-btn {
  min-height: 54px;
  border: 0;
  border-radius: 18px;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-family: var(--font-headline);
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.3);
  transition: transform 120ms ease, filter 120ms ease;
}

.social-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.07);
}

.social-btn-whatsapp {
  background: linear-gradient(145deg, #28d266 0%, #109846 100%);
}

.social-btn-x {
  background: linear-gradient(145deg, #2d3340 0%, #0f1420 100%);
}

.social-btn-instagram {
  background: linear-gradient(145deg, #fd5949 0%, #d6249f 50%, #285aeb 100%);
}

.social-btn svg {
  width: 16px;
  height: 16px;
  fill: currentcolor;
}

.share-secondary-actions {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.share-link-btn {
  min-height: 40px;
  border-radius: 999px;
  border: 3px solid var(--outline);
  background: #2d1236;
  color: #fff;
  font-family: var(--font-headline);
  font-size: 0.86rem;
  font-weight: 700;
  display: inline-grid;
  grid-template-columns: auto auto;
  align-items: center;
  justify-content: center;
  column-gap: 8px;
  line-height: 1;
  cursor: pointer;
}

.share-link-btn .share-link-icon {
  width: 1em;
  height: 1em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  line-height: 1;
  align-self: center;
  justify-self: center;
}

.share-link-btn > span:not(.share-link-icon) {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.btn-restart {
  margin-top: 12px;
  width: 100%;
  min-height: 72px;
  border-radius: 999px;
  border: 3px solid #ff6b9b;
  background: var(--primary);
  color: #130818;
  box-shadow: 0 8px 0 #c5ca7c;
  font-family: var(--font-headline);
  font-size: 1.2rem;
  font-style: italic;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 8px 14px 8px 8px;
  cursor: pointer;
}

.btn-restart-accent {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #ff2d91 0%, #a80077 45%, #6b2dff 100%);
  color: #fff;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.18), 0 5px 10px rgba(109, 0, 81, 0.35);
}

.btn-restart-accent .material-symbols-outlined {
  font-size: 1.9rem;
  line-height: 1;
  font-variation-settings: "FILL" 1, "wght" 700, "GRAD" 0, "opsz" 28;
}

.btn-restart-label {
  justify-self: center;
  white-space: nowrap;
}

.btn-restart:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 0 #c5ca7c, 0 0 18px rgba(255, 107, 155, 0.24);
}

.ranking-page {
  width: min(980px, 100%);
  margin: 0 auto;
  padding: 20px 14px 0;
}

.ranking-shell .title {
  color: var(--primary);
}

.ranking-shell .subtitle {
  margin: 8px 0 14px;
  color: var(--secondary);
  font-family: var(--font-headline);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ranking-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.ranking-list li {
  min-height: 58px;
  border-radius: 18px;
  border: 3px solid var(--outline);
  background: #17081d;
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
}

.ranking-list .rank {
  font-family: var(--font-headline);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--secondary);
  text-align: center;
}

.ranking-list .name {
  font-family: var(--font-headline);
  font-weight: 700;
}

.ranking-list .points {
  font-family: var(--font-headline);
  font-weight: 700;
  color: var(--primary);
}

.ranking-list li.is-me {
  border-color: var(--secondary);
  background: rgba(255, 0, 127, 0.15);
}

.credits-panel {
  width: min(540px, 100%);
  margin: 18px auto 0;
  padding: 10px 12px;
  font-size: 0.8rem;
}

body[data-app-view="home"] .credits-panel {
  display: none;
}

body.game-result-visible .credits-panel {
  display: none;
}

.credits-toggle {
  list-style: none;
  min-height: 36px;
  border-radius: 999px;
  width: 100%;
  justify-content: flex-start;
  border: 0;
  background: rgba(45, 18, 54, 0.72);
  color: rgba(251, 255, 171, 0.88);
  padding: 8px 14px;
  display: inline-flex;
  align-items: center;
  font-family: var(--font-headline);
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
}

.credits-toggle::-webkit-details-marker {
  display: none;
}

.credits-body {
  margin-top: 6px;
  padding: 8px 10px 10px;
  border-radius: 14px;
  background: rgba(45, 18, 54, 0.28);
}

.credits-note {
  margin: 0 0 8px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.78rem;
}

.credits-panel .history {
  font-size: 0.76rem;
}

.credits-panel a {
  color: rgba(251, 255, 171, 0.72);
  text-decoration: underline;
  text-decoration-color: rgba(251, 255, 171, 0.32);
  text-underline-offset: 2px;
}

.legal-links {
  width: min(100%, 1720px);
  margin: 28px auto 0;
  padding: 0 14px calc(190px + env(safe-area-inset-bottom, 0px));
  text-align: center;
  color: rgba(255, 255, 255, 0.54);
  font-size: 0.78rem;
  line-height: 1.55;
  position: relative;
  z-index: 3;
}

.legal-links a {
  color: rgb(251 255 171 / 0.8);
  text-decoration: none;
}

.legal-links a:hover {
  text-decoration: underline;
}

body.game-result-visible .legal-links {
  margin-top: 40px;
  padding-bottom: calc(210px + env(safe-area-inset-bottom, 0px));
}

.v2-bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: var(--viewport-bottom-offset);
  transform: translateZ(0);
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 10px 14px max(10px, env(safe-area-inset-bottom, 0px));
  border-top: 4px solid #2d1236;
  background: rgba(13, 2, 20, 0.94);
  backdrop-filter: blur(10px);
}

.v2-nav-item {
  min-height: 56px;
  width: 82px;
  justify-self: center;
  border: 0;
  border-radius: 24px;
  background: transparent;
  color: rgba(255, 0, 127, 0.66);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-family: var(--font-headline);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: transform 120ms ease, color 120ms ease;
  cursor: pointer;
}

.v2-nav-item .material-symbols-outlined {
  font-size: 1.24rem;
}

.v2-nav-item:hover {
  transform: translateY(-1px);
  color: rgba(243, 255, 0, 0.95);
}

.v2-nav-item.is-active {
  color: #fff;
  background: linear-gradient(145deg, var(--secondary) 0%, var(--secondary-dark) 100%);
  box-shadow: 0 4px 0 #8a0044;
  transform: scale(1.06);
}

.hidden {
  display: none;
}

.notification-layer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(92px + env(safe-area-inset-bottom, 0px));
  z-index: 10060;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.toast {
  max-width: min(580px, 92vw);
  min-height: 42px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.22);
  background: rgba(13, 2, 20, 0.94);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  font-family: var(--font-headline);
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast.is-hiding {
  opacity: 0;
  transform: translateY(8px);
}

.legal-modal {
  position: fixed;
  inset: 0;
  z-index: 10020;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(9, 15, 40, 0.78);
}

.legal-modal.is-open {
  display: flex;
}

.legal-modal-panel {
  width: min(760px, 100%);
  max-height: min(88dvh, 760px);
  overflow: hidden;
  border-radius: 28px;
  border: 3px solid var(--outline);
  background: #1f0e28;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
  padding: 14px;
}

.legal-modal-close {
  position: sticky;
  top: 0;
  float: right;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 2px solid var(--outline);
  background: #2d1236;
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
}

#legal-modal-title {
  margin: 0 50px 8px 0;
  font-family: var(--font-headline);
  font-size: 1.5rem;
  color: var(--primary);
}

.legal-modal-body {
  max-height: calc(min(88dvh, 760px) - 96px);
  overflow: auto;
}

.legal-modal-body h1,
.legal-modal-body h2,
.legal-modal-body h3 {
  margin: 10px 0 6px;
  font-family: var(--font-headline);
  color: var(--primary);
}

.legal-modal-body p,
.legal-modal-body li {
  color: rgba(255, 255, 255, 0.86);
}

.legal-modal-body a {
  color: var(--primary);
}

body.modal-open {
  overflow: hidden;
}

@keyframes logoFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes logoGlow {
  0%,
  100% {
    box-shadow: 0 0 42px rgba(130, 62, 255, 0.58), 0 0 78px rgba(130, 62, 255, 0.26), inset 0 0 16px rgba(255, 255, 255, 0.18);
  }
  50% {
    box-shadow: 0 0 62px rgba(176, 45, 255, 0.56), 0 0 98px rgba(255, 92, 171, 0.3), inset 0 0 22px rgba(255, 255, 255, 0.22);
  }
}

@media (max-width: 920px) {
  .landing-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .header {
    padding: 12px 10px;
  }

  .header-top {
    gap: 8px;
  }

  .brand-wrap {
    flex: 1 1 auto;
    min-width: 0;
  }

  .header-actions {
    gap: 5px;
  }

  .header h1 {
    font-size: 1.02rem;
    letter-spacing: -0.04em;
  }

  .landing-logo-wrap {
    width: 180px;
    height: 180px;
  }

  .landing-title {
    font-size: clamp(2.2rem, 12vw, 3.3rem);
    line-height: 0.98;
    padding: 0 6px;
  }

  .play-btn {
    width: min(100%, 640px);
    margin: 16px auto;
  }

  .card-info h2 {
    font-size: 1.7rem;
  }

  .person-mini-bio {
    max-width: 92%;
    font-size: 0.82rem;
    line-height: 1.28;
  }

  .btn {
    min-height: 132px;
  }

  .share-buttons {
    grid-template-columns: 1fr;
  }

  .settings-modal {
    align-items: flex-end;
    padding: 0;
  }

  .settings-modal-sheet {
    width: 100%;
    max-height: min(86dvh, 700px);
    border-radius: 20px 20px 0 0;
    border-bottom: 0;
    padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  }

  .settings-item {
    align-items: flex-start;
  }

  .settings-item-button {
    flex-direction: column;
  }

  .settings-action-btn {
    width: 100%;
  }

  .settings-confirm-actions {
    justify-content: stretch;
  }

  .settings-confirm-btn {
    flex: 1 1 auto;
  }

  .v2-nav-item {
    font-size: 0.58rem;
  }

  .v2-bottom-nav {
    left: 0;
    right: 0;
    bottom: var(--viewport-bottom-offset) !important;
    margin: 0;
    padding: 8px 10px max(8px, env(safe-area-inset-bottom, 0px));
    background: #0d0214;
    backdrop-filter: none;
  }

  .result-side-card {
    padding: 16px 10px;
  }

  .result-side-card p {
    font-size: clamp(1.6rem, 7vw, 2.2rem);
  }

  .result-cumulative-hint {
    font-size: 0.52rem;
    letter-spacing: 0.06em;
  }

  .btn-restart {
    min-height: 68px;
    gap: 10px;
    padding: 7px 12px 7px 7px;
  }

  .btn-restart-accent {
    width: 50px;
    height: 50px;
  }

  .btn-restart-label {
    font-size: 0.95rem;
    letter-spacing: 0.04em;
  }
}
