:root {
  color-scheme: light;
  --app-bg: #f5f6ff;
  --app-surface: rgb(255 255 255 / 92%);
  --app-surface-solid: #ffffff;
  --app-surface-soft: #f7f7ff;
  --app-ink: #18213d;
  --app-muted: #68708b;
  --app-line: #e5e7f3;
  --app-primary: #6252f5;
  --app-primary-strong: #4f3ee8;
  --app-green: #168f5c;
  --app-shadow: 0 1.6rem 4.5rem rgb(75 61 155 / 14%);
  --app-shadow-card: 0 0.75rem 1.8rem rgb(47 43 89 / 10%);
  color: var(--app-ink);
  background: var(--app-bg);
  font-family: ui-rounded, "SF Pro Rounded", "Nunito", "Arial Rounded MT Bold",
    system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

button,
input {
  font: inherit;
}

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

body {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  padding: max(5.2rem, calc(env(safe-area-inset-top) + 4.5rem))
    clamp(0.65rem, 3vw, 2rem)
    max(1rem, env(safe-area-inset-bottom));
  overflow-x: hidden;
  color: var(--app-ink);
  background:
    radial-gradient(circle at 8% 8%, rgb(255 200 61 / 32%) 0 9rem, transparent 9.1rem),
    radial-gradient(circle at 96% 12%, rgb(240 82 164 / 20%) 0 10rem, transparent 10.1rem),
    radial-gradient(circle at 90% 92%, rgb(66 211 173 / 22%) 0 12rem, transparent 12.1rem),
    linear-gradient(145deg, #fff9f3 0%, var(--app-bg) 42%, #f1f8ff 100%);
}

body::before {
  position: fixed;
  z-index: -2;
  inset: 0;
  opacity: 0.34;
  background-image: radial-gradient(circle, rgb(98 82 245 / 28%) 1.3px, transparent 1.4px);
  background-size: 1.5rem 1.5rem;
  content: "";
  pointer-events: none;
  mask-image: linear-gradient(to bottom, black, transparent 42%, black);
}

body::after {
  position: fixed;
  z-index: -1;
  right: -4rem;
  bottom: 10%;
  width: 11rem;
  height: 11rem;
  border: 2rem solid rgb(98 82 245 / 7%);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

body.home-view {
  height: 100dvh;
  min-height: 0;
  padding: max(4.6rem, calc(env(safe-area-inset-top) + 4rem)) 0.75rem
    max(4.6rem, calc(env(safe-area-inset-top) + 4rem));
  overflow-y: auto;
}

body.home-view .app-header {
  position: absolute;
  inset: 0 0 auto;
  height: 0;
}

body.settings-view {
  align-items: start;
  height: auto;
  min-height: 100dvh;
  overflow-y: auto;
}

body.ranking-view {
  align-items: start;
  height: auto;
  min-height: 100dvh;
  overflow-y: auto;
}

main {
  position: relative;
  z-index: 1;
  min-width: 0;
  width: min(100%, 46rem);
  padding: clamp(1.25rem, 5vw, 3rem);
  border: 1px solid rgb(255 255 255 / 78%);
  border-radius: 2rem;
  background: var(--app-surface);
  box-shadow: var(--app-shadow), inset 0 1px 0 white;
  backdrop-filter: blur(1.25rem) saturate(1.12);
  text-align: center;
  animation: surface-in 360ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

main::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgb(98 82 245 / 4%);
  content: "";
  pointer-events: none;
}

body.home-view main {
  width: min(100%, 42rem);
  max-height: calc(100dvh - 5.35rem);
  padding: clamp(1.2rem, 4dvh, 2.5rem);
}

main.memory-active {
  width: min(100%, 68rem);
  padding: clamp(1rem, 3vw, 2.25rem);
}

main.penalty-active {
  width: min(100%, 68rem);
  padding: clamp(0.85rem, 2.4vw, 1.6rem);
}

main.meteor-active {
  width: min(100%, 70rem);
  padding: clamp(0.85rem, 2.4vw, 1.6rem);
}

main.ranking-active {
  width: min(100%, 54rem);
  padding: clamp(1rem, 3vw, 2rem);
}

h1,
h2,
h3,
p {
  text-wrap: balance;
}

h1 {
  margin: 0;
  background: linear-gradient(115deg, #4f3ee8 3%, #bd3f9d 55%, #ff6b6b 98%);
  background-clip: text;
  color: transparent;
  font-size: clamp(2.35rem, 9vw, 4.6rem);
  font-weight: 950;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  margin: 0 0 1.15rem;
  padding: 0.35rem 0.8rem;
  border: 1px solid rgb(98 82 245 / 14%);
  border-radius: 999px;
  background: #f0efff;
  color: var(--app-primary-strong);
  font-size: 0.7rem;
  font-weight: 950;
  letter-spacing: 0.09em;
}

.screen-question {
  margin: clamp(1rem, 3dvh, 1.75rem) 0 0.85rem;
  color: var(--app-muted);
  font-size: clamp(1.05rem, 3.8vw, 1.35rem);
  font-weight: 800;
}

.screen-title {
  margin: 0;
  color: var(--app-ink);
  font-size: clamp(1.8rem, 7vw, 2.75rem);
  font-weight: 950;
  letter-spacing: -0.04em;
}

.screen-intro {
  margin: 0.55rem 0 1.4rem;
  color: var(--app-muted);
  font-size: clamp(1rem, 3.6vw, 1.2rem);
  font-weight: 650;
}

.player-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(0.65rem, 2vw, 1rem);
}

.player-button {
  position: relative;
  min-height: clamp(6.6rem, 20dvh, 8rem);
  padding: clamp(0.65rem, 2dvh, 1rem);
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 70%);
  border-radius: 1.5rem;
  color: white;
  font-size: clamp(1.1rem, 4vw, 1.4rem);
  font-weight: 950;
  text-shadow: 0 2px 0 rgb(42 30 80 / 22%);
  box-shadow: 0 0.8rem 1.6rem rgb(49 46 129 / 18%),
    inset 0 1px 0 rgb(255 255 255 / 60%);
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.player-button[data-player="Mateo"],
.active-profile[data-player="Mateo"] {
  background: linear-gradient(
    135deg,
    #ff5b4d 0%,
    #f59e0b 24%,
    #22c55e 48%,
    #3b82f6 72%,
    #8b5cf6 100%
  );
}

.player-button[data-player="Jaime"],
.active-profile[data-player="Jaime"] {
  background: linear-gradient(135deg, #35b9f0, #6252f5 55%, #9b3ed8);
}

.player-button::after {
  position: absolute;
  top: -60%;
  left: -50%;
  width: 45%;
  height: 220%;
  background: linear-gradient(90deg, transparent, rgb(255 255 255 / 38%), transparent);
  content: "";
  pointer-events: none;
  transform: rotate(24deg);
  transition: left 420ms ease;
}

.player-button:hover {
  transform: translateY(-0.2rem) scale(1.01);
  filter: saturate(1.08);
  box-shadow: 0 1rem 2rem rgb(49 46 129 / 23%),
    inset 0 1px 0 rgb(255 255 255 / 70%);
}

.player-button:hover::after {
  left: 120%;
}

.player-button:active {
  transform: translateY(0.12rem) scale(0.99);
}

.player-animal {
  display: block;
  margin-bottom: 0.3rem;
  font-size: clamp(2.65rem, 10vw, 3.7rem);
  line-height: 1;
  filter: drop-shadow(0 0.3rem 0.25rem rgb(42 30 80 / 18%));
}

.top-control {
  position: fixed;
  z-index: 120;
  top: max(0.8rem, env(safe-area-inset-top));
  display: grid;
  place-items: center;
  width: 3.5rem;
  min-height: 2.9rem;
  aspect-ratio: 1;
  padding: 0;
  border: 1px solid rgb(98 82 245 / 16%);
  border-radius: 0.95rem;
  background: rgb(255 255 255 / 84%);
  color: var(--app-ink);
  box-shadow: 0 0.55rem 1.5rem rgb(46 43 91 / 10%);
  backdrop-filter: blur(1rem);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.home-button {
  left: max(0.8rem, env(safe-area-inset-left));
}

.settings-button {
  right: max(0.8rem, env(safe-area-inset-right));
}

.top-control:hover {
  transform: translateY(-0.1rem);
  box-shadow: 0 0.7rem 1.7rem rgb(46 43 91 / 16%);
}

.top-control-icon {
  width: 1.75rem;
  height: 1.75rem;
  stroke-width: 2.4;
}

.active-profile {
  appearance: none;
  position: fixed;
  z-index: 119;
  top: max(0.8rem, env(safe-area-inset-top));
  left: 50%;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.9rem;
  max-width: calc(100% - 9rem);
  padding: 0.32rem 0.85rem 0.32rem 0.38rem;
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 72%);
  border-radius: 999px;
  color: white;
  box-shadow: 0 0.55rem 1.5rem rgb(46 43 91 / 16%),
    inset 0 1px 0 rgb(255 255 255 / 32%);
  font-size: 1rem;
  font-weight: 950;
  text-shadow: 0 1px 2px rgb(42 30 80 / 28%);
  transform: translateX(-50%);
  cursor: pointer;
}

.active-profile-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 2.15rem;
  aspect-ratio: 1;
  border: 1px solid rgb(255 255 255 / 58%);
  border-radius: 50%;
  background: rgb(255 255 255 / 82%);
  font-size: 1.35rem;
  line-height: 1;
  text-shadow: none;
}

.active-profile-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.games-list {
  display: grid;
  gap: 0.85rem;
}

.game-card {
  position: relative;
  display: grid;
  grid-template-columns: 5rem minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 1rem;
  align-items: center;
  width: 100%;
  min-height: 8rem;
  padding: 1rem;
  overflow: hidden;
  border: 1px solid #f4b718;
  border-radius: 1.35rem;
  background:
    radial-gradient(circle at 100% 0%, rgb(239 68 68 / 12%) 0 5rem, transparent 5.1rem),
    linear-gradient(145deg, #fff9db, #fff5e6);
  color: var(--app-ink);
  box-shadow: var(--app-shadow-card);
  text-align: left;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.game-card::after {
  position: absolute;
  right: 1rem;
  bottom: 0.7rem;
  color: #d97706;
  content: "›";
  font-size: 1.8rem;
  font-weight: 950;
}

.game-card:hover {
  transform: translateY(-0.2rem);
  box-shadow: 0 1rem 2.2rem rgb(47 43 89 / 16%);
}

.penalty-game-card {
  border-color: #38a169;
  background:
    radial-gradient(circle at 100% 0%, rgb(59 130 246 / 17%) 0 5rem, transparent 5.1rem),
    linear-gradient(145deg, #e8fff3, #e4f4ff);
}

.penalty-game-card::after {
  color: #168f5c;
}

.meteor-game-card {
  border-color: #f97316;
  background:
    radial-gradient(circle at 100% 0%, rgb(239 68 68 / 22%) 0 5rem, transparent 5.1rem),
    linear-gradient(145deg, #fff0db, #ffe8ec);
}

.meteor-game-card::after {
  color: #d9480f;
}

.game-icon {
  display: grid;
  grid-row: 1 / 3;
  place-items: center;
  width: 5rem;
  aspect-ratio: 1;
  border: 1px solid rgb(255 255 255 / 72%);
  border-radius: 1.2rem;
  background: linear-gradient(145deg, #ef4444, #f59e0b);
  font-size: 2.8rem;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 42%);
}

.penalty-game-icon {
  background: linear-gradient(145deg, #1fcb78, #1573d1);
}

.meteor-game-icon {
  background: linear-gradient(145deg, #ffcf45, #f05a28 50%, #5b21b6);
}

.arcade-ranking-button {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.8rem;
  width: 100%;
  min-height: 4.7rem;
  margin-top: 0.85rem;
  padding: 0.7rem 0.9rem;
  overflow: hidden;
  border: 1px solid #7c3aed;
  border-radius: 1.2rem;
  background:
    radial-gradient(circle at 88% 18%, rgb(255 230 82 / 26%) 0 3rem, transparent 3.1rem),
    linear-gradient(135deg, #211353, #51258d 55%, #8c2f8c);
  color: white;
  box-shadow: 0 0.65rem 1.4rem rgb(55 30 105 / 22%), inset 0 1px 0 rgb(255 255 255 / 18%);
  text-align: left;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.arcade-ranking-button::before {
  position: absolute;
  inset: 0;
  opacity: 0.2;
  background-image: radial-gradient(circle, white 1px, transparent 1.2px);
  background-size: 1.35rem 1.35rem;
  content: "";
  pointer-events: none;
}

.arcade-ranking-button:hover {
  transform: translateY(-0.16rem);
  box-shadow: 0 0.85rem 1.8rem rgb(55 30 105 / 30%), inset 0 1px 0 rgb(255 255 255 / 22%);
}

.arcade-ranking-button > * {
  position: relative;
  z-index: 1;
}

.arcade-ranking-icon {
  display: grid;
  place-items: center;
  width: 3.25rem;
  aspect-ratio: 1;
  border: 1px solid rgb(255 255 255 / 32%);
  border-radius: 1rem;
  background: rgb(255 255 255 / 12%);
  font-size: 1.9rem;
}

.arcade-ranking-button strong,
.arcade-ranking-button small {
  display: block;
}

.arcade-ranking-button strong {
  color: #fff8ba;
  font-size: clamp(1rem, 3.8vw, 1.25rem);
  font-weight: 950;
  letter-spacing: -0.02em;
}

.arcade-ranking-button small {
  margin-top: 0.12rem;
  color: #e8ddff;
  font-size: 0.7rem;
  font-weight: 700;
}

.arcade-ranking-arrow {
  color: #ffe75a;
  font-size: 1.8rem;
  font-weight: 950;
}

.game-name {
  align-self: end;
  padding-right: 1rem;
  font-size: clamp(1.2rem, 4.5vw, 1.6rem);
  font-weight: 950;
  letter-spacing: -0.025em;
}

.game-description {
  align-self: start;
  margin-top: 0.15rem;
  padding-right: 1.5rem;
  color: var(--app-muted);
  font-size: 0.9rem;
  font-weight: 650;
}

.back-button,
.intro-back-button {
  margin-top: 1.25rem;
  padding: 0.75rem 1.05rem;
  border: 1px solid var(--app-line);
  border-radius: 999px;
  background: var(--app-surface-solid);
  color: var(--app-muted);
  font-weight: 850;
  cursor: pointer;
}

.action-button {
  min-height: 2.9rem;
  padding: 0.75rem 1.15rem;
  border: 0;
  border-radius: 999px;
  background: var(--app-green);
  color: white;
  box-shadow: 0 0.24rem 0 #0a6540;
  font-weight: 900;
  cursor: pointer;
}

.action-button.secondary {
  border: 1px solid var(--app-line);
  background: var(--app-surface-solid);
  color: var(--app-ink);
  box-shadow: 0 0.2rem 0 #d6d8e7;
}

.action-button:disabled {
  opacity: 0.58;
  cursor: wait;
}

.settings-panel {
  width: min(100%, 42rem);
  margin: 0 auto;
}

.theme-options {
  display: grid;
  gap: 0.65rem;
}

.theme-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  width: 100%;
  padding: 0.85rem;
  border: 2px solid var(--app-line);
  border-radius: 1rem;
  background: var(--app-surface-solid);
  color: var(--app-ink);
  text-align: left;
  cursor: pointer;
}

.theme-option[aria-pressed="true"],
.instructor-option[aria-pressed="true"] {
  border-color: var(--app-primary);
  background: #f0efff;
  box-shadow: 0 0 0 3px rgb(98 82 245 / 12%);
}

.theme-icon {
  font-size: 1.55rem;
}

.theme-name {
  display: block;
  font-weight: 900;
}

.theme-description {
  display: block;
  margin-top: 0.12rem;
  color: var(--app-muted);
  font-size: 0.8rem;
  font-weight: 650;
}

.option-check {
  display: grid;
  place-items: center;
  width: 1.45rem;
  aspect-ratio: 1;
  border-radius: 50%;
  color: white;
  font-size: 0.9rem;
  font-weight: 950;
}

[aria-pressed="true"] > .option-check {
  background: #16a34a;
}

[aria-pressed="true"] > .option-check::before {
  content: "✓";
}

.setting-card {
  margin: 1.25rem 0;
  padding: 1rem;
  border: 1px solid #c8c2ff;
  border-radius: 1.15rem;
  background: #f6f4ff;
  text-align: left;
}

.setting-card h3 {
  margin: 0;
  color: var(--app-ink);
  font-size: 1.08rem;
  font-weight: 950;
}

.setting-card p {
  margin: 0.3rem 0 0.9rem;
  color: var(--app-muted);
  font-size: 0.84rem;
  font-weight: 650;
  line-height: 1.4;
}

.instructor-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
}

.instructor-option {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 0.4rem;
  min-width: 0;
  padding: 0.7rem 0.25rem;
  border: 2px solid var(--app-line);
  border-radius: 1rem;
  background: var(--app-surface-solid);
  color: var(--app-ink);
  font-size: clamp(0.68rem, 2.7vw, 0.86rem);
  font-weight: 900;
  cursor: pointer;
}

.instructor-option img {
  width: clamp(3.35rem, 17vw, 4.75rem);
  height: clamp(5rem, 23vw, 6.5rem);
  object-fit: contain;
  filter: drop-shadow(0 0.3rem 0.2rem rgb(41 37 36 / 14%));
}

.instructor-option .option-check {
  position: absolute;
  top: 0.45rem;
  right: 0.5rem;
}

.setting-card-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.8rem;
  align-items: center;
}

.setting-card-heading.simple {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
}

.setting-card-heading p {
  margin-bottom: 0;
}

.setting-card-icon {
  font-size: 2rem;
  line-height: 1;
}

.pause-setting-state {
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  font-size: 0.78rem;
  font-weight: 950;
}

.pause-setting-state[data-active="true"] {
  background: #ffe4e6;
  color: #be123c;
}

.pause-toggle-button {
  width: 100%;
  margin-top: 0.9rem;
  background: var(--app-primary);
  box-shadow: 0 0.24rem 0 #4032be;
}

.pause-toggle-button[aria-pressed="true"] {
  background: #e11d48;
  box-shadow: 0 0.24rem 0 #9f1239;
}

.timer-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: end;
  margin-top: 0.9rem;
}

.timer-controls label {
  grid-column: 1 / -1;
  color: var(--app-ink);
  font-size: 0.86rem;
  font-weight: 900;
}

.timer-controls input {
  min-width: 0;
  height: 2.9rem;
  padding: 0.65rem 0.75rem;
  border: 2px solid var(--app-line);
  border-radius: 0.8rem;
  background: var(--app-surface-solid);
  color: var(--app-ink);
  font-weight: 900;
}

.timer-controls .secondary {
  grid-column: 1 / -1;
}

.setting-status {
  min-height: 1.35em;
  margin: 0.65rem 0 0 !important;
  color: #166534 !important;
  font-size: 0.8rem !important;
  font-weight: 800 !important;
  text-align: center;
}

.access-lock-button {
  width: 100%;
  margin-top: 0.75rem;
}

.settings-back {
  margin-top: 0.25rem;
}

.memory-intro-screen {
  text-align: center;
}

.instructor-message {
  display: grid;
  grid-template-columns: clamp(6.25rem, 20vw, 9rem) minmax(0, 1fr);
  align-items: end;
  gap: 0.75rem;
  margin: 1.25rem 0;
}

.instructor-message-image {
  width: 100%;
  height: auto;
  max-height: 13rem;
  object-fit: contain;
  filter: drop-shadow(0 0.45rem 0.35rem rgb(41 37 36 / 16%));
}

.instructor-bubble {
  position: relative;
  padding: 1rem 1.1rem;
  border: 2px solid #e7c34f;
  border-radius: 1.25rem 1.25rem 1.25rem 0.4rem;
  background: #fff8d9;
  color: #40350b;
  box-shadow: 0.35rem 0.4rem 0 #f2cb42;
  text-align: left;
}

.instructor-bubble::before {
  position: absolute;
  bottom: -2px;
  left: -0.7rem;
  width: 1.15rem;
  height: 1.15rem;
  border-bottom: 2px solid #e7c34f;
  border-left: 2px solid #e7c34f;
  background: #fff8d9;
  content: "";
  transform: skew(-24deg);
}

.instructor-name {
  display: inline-block;
  margin-bottom: 0.45rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: #f6dc6b;
  font-size: 0.82rem;
  font-weight: 950;
}

.instructor-bubble p {
  margin: 0;
  font-size: clamp(0.88rem, 3.2vw, 1rem);
  font-weight: 650;
  line-height: 1.48;
}

.instructor-bubble .age-note {
  margin-top: 0.65rem;
  color: #6b5207;
  font-weight: 900;
}

.start-memory-button {
  min-width: min(100%, 15rem);
}

.photo-credits {
  width: min(100%, 36rem);
  margin: 1.2rem auto 0;
  color: var(--app-muted);
  font-size: 0.72rem;
  line-height: 1.45;
  text-align: left;
}

.photo-credits summary {
  text-align: center;
  cursor: pointer;
}

.photo-credits p {
  margin: 0.7rem 0 0.35rem;
}

.photo-credits ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.25rem 1rem;
  margin: 0.35rem 0 0;
  padding-left: 1.2rem;
}

.photo-credits a {
  color: var(--app-primary-strong);
}

.penalty-intro-screen {
  text-align: center;
}

.penalty-intro-badge {
  display: inline-flex;
  margin-bottom: 0.7rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: #dff8ea;
  color: #087345;
  font-size: 0.74rem;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.penalty-odds {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  margin: 1rem auto;
}

.penalty-odds div {
  display: grid;
  gap: 0.12rem;
  padding: 0.72rem 0.4rem;
  border: 1px solid var(--app-line);
  border-radius: 1rem;
  background: var(--app-surface-soft);
}

.penalty-odds strong {
  color: #0d8050;
  font-size: clamp(1.25rem, 5vw, 1.75rem);
  font-weight: 950;
}

.penalty-odds span {
  color: var(--app-muted);
  font-size: 0.72rem;
  font-weight: 850;
}

.penalty-mini-pitch {
  position: relative;
  width: min(100%, 25rem);
  aspect-ratio: 2.35;
  margin: 0.8rem auto;
  overflow: hidden;
  border: 0.35rem solid #effff6;
  border-radius: 1.25rem;
  background:
    linear-gradient(90deg, transparent 49.5%, rgb(255 255 255 / 72%) 49.5% 50.5%, transparent 50.5%),
    repeating-linear-gradient(90deg, #24a862 0 3.5rem, #209c59 3.5rem 7rem);
  box-shadow: 0 0.55rem 1.4rem rgb(16 83 52 / 18%);
}

.mini-goal {
  position: absolute;
  top: 0.55rem;
  left: 50%;
  width: 48%;
  height: 47%;
  border: 0.22rem solid white;
  border-bottom-width: 0.32rem;
  background:
    linear-gradient(rgb(255 255 255 / 36%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 36%) 1px, transparent 1px);
  background-size: 0.75rem 0.75rem;
  transform: translateX(-50%);
}

.mini-keeper,
.mini-player {
  position: absolute;
  display: grid;
  place-items: center;
  left: 50%;
  border-radius: 50% 50% 0.4rem 0.4rem;
  color: white;
  font-weight: 950;
  transform: translateX(-50%);
}

.mini-keeper {
  top: 2.45rem;
  width: 2rem;
  height: 2.45rem;
  background: #f15b29;
}

.mini-player {
  bottom: 0.45rem;
  width: 1.85rem;
  height: 2.25rem;
  background: #175dcc;
}

.mini-ball {
  position: absolute;
  right: 42%;
  bottom: 0.5rem;
  font-size: 1rem;
  filter: hue-rotate(170deg);
}

.penalty-player-ready {
  margin: 0.9rem 0;
  color: var(--app-muted);
  font-weight: 750;
}

.start-penalty-button {
  min-width: min(100%, 15rem);
}

.penalty-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
  text-align: left;
}

.penalty-kicker-label {
  margin: 0 0 0.12rem;
  color: #0c8050;
  font-size: 0.7rem;
  font-weight: 950;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.penalty-title {
  margin: 0;
  color: var(--app-ink);
  font-size: clamp(1.35rem, 5.5vw, 2.2rem);
  font-weight: 950;
  letter-spacing: -0.04em;
}

.penalty-player-badge {
  flex: 0 0 auto;
  padding: 0.48rem 0.72rem;
  border-radius: 999px;
  background: #1768d4;
  color: white;
  font-size: 0.86rem;
  font-weight: 950;
}

.penalty-scoreboard {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.35rem;
  margin-bottom: 0.55rem;
}

.penalty-scoreboard span {
  padding: 0.35rem 0.2rem;
  border: 1px solid var(--app-line);
  border-radius: 0.65rem;
  background: var(--app-surface-soft);
  color: var(--app-muted);
  font-size: clamp(0.62rem, 2.4vw, 0.8rem);
  font-weight: 800;
}

.penalty-scoreboard strong {
  color: var(--app-ink);
  font-size: 1.08em;
}

.penalty-stadium {
  position: relative;
  isolation: isolate;
  width: min(100%, 57rem);
  aspect-ratio: 16 / 9.2;
  margin: 0 auto;
  overflow: hidden;
  border: 0.35rem solid #e8f4ff;
  border-radius: clamp(0.9rem, 3vw, 1.5rem);
  background: #25a862;
  box-shadow: 0 0.7rem 1.8rem rgb(20 72 67 / 24%);
}

.penalty-sky {
  position: absolute;
  z-index: -5;
  inset: 0 0 53%;
  overflow: hidden;
  background: linear-gradient(#1689ee, #78c9ff);
}

.stadium-cloud {
  position: absolute;
  width: 11%;
  height: 14%;
  border-radius: 999px;
  background: rgb(255 255 255 / 88%);
  box-shadow:
    0.8rem -0.35rem 0 0.2rem rgb(255 255 255 / 88%),
    1.65rem 0 0 -0.05rem rgb(255 255 255 / 88%);
}

.cloud-one {
  top: 18%;
  left: 8%;
}

.cloud-two {
  top: 11%;
  right: 15%;
  transform: scale(0.75);
}

.stadium-crowd {
  position: absolute;
  z-index: -4;
  top: 31%;
  left: -2%;
  width: 104%;
  height: 17%;
  border-top: 0.35rem solid #eaf2fb;
  border-bottom: 0.35rem solid #d9e2ec;
  background:
    radial-gradient(circle, #ffd166 0 2px, transparent 2.5px) 0 0 / 13px 11px,
    radial-gradient(circle, #ef476f 0 2px, transparent 2.5px) 6px 4px / 15px 12px,
    linear-gradient(#334155, #172033);
  transform: perspective(14rem) rotateX(-3deg);
}

.penalty-pitch {
  position: absolute;
  z-index: -3;
  inset: 46% -9% -16%;
  background:
    linear-gradient(90deg, transparent 49.75%, rgb(255 255 255 / 66%) 49.75% 50.25%, transparent 50.25%),
    repeating-linear-gradient(90deg, #24aa63 0 11%, #1f9d5a 11% 22%);
  transform: perspective(28rem) rotateX(12deg);
  transform-origin: top;
}

.penalty-pitch::before {
  position: absolute;
  top: 3%;
  left: 19%;
  width: 62%;
  height: 72%;
  border: clamp(1px, 0.35vw, 3px) solid rgb(255 255 255 / 78%);
  border-top: 0;
  content: "";
  clip-path: polygon(10% 0, 90% 0, 100% 100%, 0 100%);
}

.penalty-pitch::after {
  position: absolute;
  top: 46%;
  left: 50%;
  width: 18%;
  aspect-ratio: 2;
  border: clamp(1px, 0.35vw, 3px) solid rgb(255 255 255 / 72%);
  border-bottom: 0;
  border-radius: 50% 50% 0 0;
  content: "";
  transform: translateX(-50%);
}

.football-goal {
  position: absolute;
  z-index: 2;
  top: 24%;
  left: 10%;
  width: 80%;
  height: 37%;
  border: clamp(4px, 0.75vw, 8px) solid white;
  border-bottom-width: clamp(5px, 0.9vw, 10px);
  border-radius: 0.2rem 0.2rem 0 0;
  filter: drop-shadow(0 0.22rem 0.16rem rgb(20 50 70 / 28%));
}

.goal-net {
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(rgb(255 255 255 / 58%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 58%) 1px, transparent 1px);
  background-size: clamp(0.7rem, 2.1vw, 1.45rem) clamp(0.7rem, 2.1vw, 1.45rem);
  box-shadow: inset 0 0 1.4rem rgb(14 44 88 / 12%);
}

.goal-target {
  position: absolute;
  z-index: 6;
  top: 8%;
  width: 22%;
  height: 74%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: crosshair;
}

.goal-target span {
  display: grid;
  place-items: center;
  width: clamp(2.15rem, 6vw, 3.8rem);
  aspect-ratio: 1;
  margin: auto;
  border: 2px dashed rgb(255 255 255 / 82%);
  border-radius: 50%;
  background: rgb(9 71 123 / 20%);
  color: white;
  font-size: clamp(1.15rem, 3.8vw, 2rem);
  font-weight: 950;
  text-shadow: 0 0.1rem 0.25rem rgb(0 41 80 / 55%);
  transition: transform 150ms ease, background 150ms ease;
}

.goal-target:hover span,
.goal-target:focus-visible span {
  background: rgb(255 207 50 / 55%);
  transform: scale(1.1);
}

.goal-target:disabled {
  cursor: default;
  opacity: 0;
}

.target-left {
  left: 5%;
}

.target-center {
  left: 39%;
}

.target-right {
  right: 5%;
}

.penalty-keeper {
  position: absolute;
  z-index: 4;
  bottom: -1%;
  left: 50%;
  width: clamp(2.8rem, 8.2vw, 5rem);
  height: 78%;
  transform: translateX(-50%);
  transform-origin: 50% 82%;
}

.keeper-head,
.kicker-head {
  position: absolute;
  z-index: 3;
  top: 0;
  left: 50%;
  width: 31%;
  aspect-ratio: 0.86;
  border: 0.12rem solid #542d1f;
  border-radius: 48% 48% 44% 44%;
  background:
    linear-gradient(#35221d 0 24%, transparent 25%),
    #c88150;
  transform: translateX(-50%);
}

.keeper-shirt {
  position: absolute;
  z-index: 2;
  top: 24%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 53%;
  height: 41%;
  border: 0.13rem solid #672810;
  border-radius: 0.55rem 0.55rem 0.25rem 0.25rem;
  background: linear-gradient(135deg, #ff7b35, #e54816);
  color: white;
  font-size: clamp(0.7rem, 2.4vw, 1.45rem);
  text-shadow: 0 0.08rem 0 #8c2609;
  transform: translateX(-50%);
}

.keeper-arms {
  position: absolute;
  z-index: 1;
  top: 31%;
  left: 50%;
  width: 112%;
  height: 15%;
  border: 0.13rem solid #672810;
  border-radius: 999px;
  background: #ff6a26;
  transform: translateX(-50%);
}

.keeper-arms::before,
.keeper-arms::after {
  position: absolute;
  top: 50%;
  width: 19%;
  aspect-ratio: 1;
  border-radius: 40%;
  background: #ffe55b;
  content: "";
  transform: translateY(-50%);
}

.keeper-arms::before {
  left: -10%;
}

.keeper-arms::after {
  right: -10%;
}

.keeper-legs {
  position: absolute;
  z-index: 1;
  top: 62%;
  left: 50%;
  width: 48%;
  height: 35%;
  border-radius: 0 0 0.35rem 0.35rem;
  background:
    linear-gradient(72deg, transparent 43%, #18223f 44% 55%, transparent 56%),
    linear-gradient(108deg, transparent 43%, #18223f 44% 55%, transparent 56%);
  transform: translateX(-50%);
}

.penalty-keeper[data-dive="left"] {
  animation: keeper-dive-left 900ms cubic-bezier(.2,.75,.25,1) both;
}

.penalty-keeper[data-dive="center"] {
  animation: keeper-dive-center 800ms cubic-bezier(.2,.75,.25,1) both;
}

.penalty-keeper[data-dive="right"] {
  animation: keeper-dive-right 900ms cubic-bezier(.2,.75,.25,1) both;
}

.penalty-kicker-player {
  position: absolute;
  z-index: 5;
  top: 70%;
  left: 45%;
  width: clamp(2.8rem, 8.5vw, 5.5rem);
  height: 27%;
  transform: translateX(-50%);
  transform-origin: 50% 100%;
}

.kicker-head {
  width: 29%;
}

.kicker-shirt {
  position: absolute;
  z-index: 2;
  top: 23%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 53%;
  height: 44%;
  border: 0.13rem solid #0e3b91;
  border-radius: 0.45rem 0.45rem 0.2rem 0.2rem;
  background: linear-gradient(135deg, #2379ed, #124eb6);
  color: white;
  font-size: clamp(0.82rem, 2.7vw, 1.6rem);
  text-shadow: 0 0.08rem 0 #082d77;
  transform: translateX(-50%);
}

.kicker-arm {
  position: absolute;
  z-index: 1;
  top: 31%;
  width: 14%;
  height: 40%;
  border: 0.1rem solid #553020;
  border-radius: 999px;
  background: #c88150;
  transform-origin: 50% 0;
}

.kicker-arm-left {
  left: 15%;
  transform: rotate(16deg);
}

.kicker-arm-right {
  right: 15%;
  transform: rotate(-16deg);
}

.kicker-leg {
  position: absolute;
  z-index: 1;
  top: 62%;
  width: 17%;
  height: 37%;
  border-radius: 0 0 999px 999px;
  background: linear-gradient(#eff6ff 0 60%, #16254a 61%);
  transform-origin: 50% 0;
}

.kicker-leg-left {
  left: 29%;
}

.kicker-leg-right {
  right: 29%;
}

.penalty-kicker-player.is-kicking {
  animation: kicker-run 540ms ease-in-out both;
}

.penalty-kicker-player.is-kicking .kicker-leg-right {
  animation: kicking-leg 520ms ease-in-out both;
}

.penalty-ball {
  position: absolute;
  z-index: 8;
  top: 86%;
  left: 53%;
  width: clamp(1.35rem, 4.2vw, 2.7rem);
  aspect-ratio: 1;
  overflow: visible;
  filter: drop-shadow(0 0.2rem 0.13rem rgb(5 28 49 / 42%));
  transform: translate(-50%, -50%);
  transform-origin: center;
}

.penalty-stadium[data-result="goal"] .goal-net {
  animation: goal-net-burst 650ms 520ms ease-out;
}

.penalty-stadium[data-result="goal"] {
  box-shadow: 0 0 0 0.3rem #ffd541, 0 0.9rem 2.2rem rgb(20 72 67 / 32%);
}

.penalty-stadium[data-result="miss"] {
  animation: penalty-post-shake 240ms 760ms linear;
}

.penalty-message {
  min-height: 1.5em;
  margin: 0.7rem 0 0.55rem;
  color: #0a7446;
  font-size: clamp(0.88rem, 3vw, 1.08rem);
  font-weight: 950;
}

.penalty-actions {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

.penalty-actions .action-button {
  min-height: 2.55rem;
  padding-block: 0.55rem;
}

.memory-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
  text-align: left;
}

.memory-kicker {
  margin: 0 0 0.22rem;
  color: #b42318;
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.memory-title {
  margin: 0;
  color: var(--app-ink);
  font-size: clamp(1.55rem, 6vw, 2.35rem);
  font-weight: 950;
  letter-spacing: -0.04em;
}

.level-badge {
  flex: 0 0 auto;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-weight: 950;
}

.memory-stats {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  margin-bottom: 0.85rem;
  color: var(--app-muted);
  font-size: 0.92rem;
  font-weight: 800;
}

.memory-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(0.35rem, 1.25vw, 0.7rem);
  width: min(100%, 50rem);
  margin: 0 auto;
}

.memory-card {
  position: relative;
  min-width: 0;
  aspect-ratio: 0.72;
  padding: 0;
  border: 0;
  border-radius: clamp(0.65rem, 2.5vw, 1rem);
  background: transparent;
  perspective: 60rem;
  cursor: pointer;
}

.memory-card-inner {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transition: transform 320ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.memory-card.revealed .memory-card-inner,
.memory-card.matched .memory-card-inner {
  transform: rotateY(180deg);
}

.memory-card-face {
  position: absolute;
  display: grid;
  place-items: center;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
  backface-visibility: hidden;
}

.memory-card-back {
  border: 2px solid #f2c744;
  background:
    radial-gradient(circle at 30% 25%, rgb(255 255 255 / 25%) 0 1.8rem, transparent 1.9rem),
    linear-gradient(145deg, #ef4444, #c81e3a 55%, #8b1428);
  color: #ffe461;
  box-shadow: 0 0.35rem 0 #92152a, var(--app-shadow-card);
  font-size: clamp(1.9rem, 8vw, 3rem);
}

.memory-card-front {
  grid-template-rows: minmax(0, 1fr) auto;
  border: 2px solid #f3c842;
  background: #fff8df;
  color: #671a1a;
  box-shadow: 0 0.35rem 0 #d9aa27, var(--app-shadow-card);
  transform: rotateY(180deg);
}

.memory-card-front img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  object-position: center top;
}

.memory-card-name {
  display: grid;
  min-height: 2.25em;
  width: 100%;
  padding: 0.3rem 0.2rem 0.35rem;
  overflow: hidden;
  background: linear-gradient(90deg, #b91c1c, #e1283c);
  color: white;
  font-size: clamp(0.58rem, 2.4vw, 0.82rem);
  font-weight: 950;
  line-height: 1.05;
  place-items: center;
  text-align: center;
  text-overflow: clip;
  white-space: normal;
}

.memory-card.matched .memory-card-front {
  border-color: #2bb878;
  box-shadow: 0 0.35rem 0 #168955, 0 0 0 4px rgb(43 184 120 / 15%);
}

#memory-message {
  min-height: 1.4em;
  margin: 0.85rem 0 0;
  color: #166534;
  font-weight: 900;
}

.memory-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
  margin-top: 0.75rem;
}

.icon-action {
  width: 3rem;
  padding: 0;
  font-size: 1.15rem;
}

.finish-button {
  min-width: 11rem;
}

.memory-complete {
  display: grid;
  grid-column: 1 / -1;
  place-items: center;
  min-height: clamp(14rem, 52vw, 21rem);
  padding: 1.5rem;
  border: 2px solid #f2c744;
  border-radius: 1.5rem;
  background: linear-gradient(145deg, #fff8cf, #fff3e8);
  color: #8b1e24;
  box-shadow: var(--app-shadow-card);
}

.memory-complete span {
  display: block;
  font-size: clamp(5rem, 24vw, 9rem);
  line-height: 1;
}

.memory-complete strong {
  display: block;
  margin-top: 0.65rem;
  font-size: clamp(1.3rem, 5vw, 2rem);
}

.confirm-dialog {
  width: min(calc(100% - 1.5rem), 29rem);
  padding: 0;
  border: 1px solid var(--app-line);
  border-radius: 1.5rem;
  background: var(--app-surface-solid);
  color: var(--app-ink);
  box-shadow: 0 1.75rem 5rem rgb(32 29 71 / 32%);
}

.confirm-dialog::backdrop {
  background: rgb(24 33 61 / 48%);
  backdrop-filter: blur(4px);
}

.confirm-content {
  padding: clamp(1.25rem, 6vw, 2rem);
  text-align: center;
}

.confirm-icon {
  display: grid;
  place-items: center;
  width: 4.5rem;
  aspect-ratio: 1;
  margin: 0 auto 0.8rem;
  border-radius: 1.25rem;
  background: #f0efff;
  font-size: 2.35rem;
}

.confirm-content h2 {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 950;
}

.confirm-content p {
  margin: 0.7rem 0 1rem;
  color: var(--app-muted);
  line-height: 1.45;
}

.confirm-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.pause-code-input {
  width: min(100%, 12rem);
  padding: 0.8rem 1rem;
  border: 2px solid var(--app-line);
  border-radius: 0.9rem;
  background: var(--app-surface-solid);
  color: var(--app-ink);
  font-size: 1.6rem;
  font-weight: 950;
  letter-spacing: 0.35em;
  text-align: center;
}

#pause-code-error {
  min-height: 1.4em;
  margin: 0.6rem 0;
  color: #be123c;
  font-size: 0.9rem;
  font-weight: 850;
}

body.pause-active {
  overflow: hidden;
}

#pause-screen {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: max(1.25rem, env(safe-area-inset-top))
    max(1.25rem, env(safe-area-inset-right))
    max(1.25rem, env(safe-area-inset-bottom))
    max(1.25rem, env(safe-area-inset-left));
  background:
    radial-gradient(circle at 12% 18%, rgb(255 255 255 / 45%) 0 7rem, transparent 7.1rem),
    radial-gradient(circle at 88% 82%, rgb(255 255 255 / 35%) 0 9rem, transparent 9.1rem),
    linear-gradient(145deg, #8dd7ff, #c8b6ff 48%, #ffb6d9);
}

.pause-message {
  width: min(100%, 42rem);
  margin: 0;
  padding: clamp(2rem, 8vw, 4rem);
  border: 2px solid rgb(255 255 255 / 72%);
  border-radius: clamp(1.75rem, 6vw, 3rem);
  background: rgb(255 255 255 / 90%);
  color: #202442;
  box-shadow: 0 1.5rem 4rem rgb(43 53 103 / 24%), inset 0 1px 0 white;
  font-size: clamp(1.65rem, 7vw, 3.2rem);
  font-weight: 950;
  letter-spacing: -0.035em;
  line-height: 1.18;
  text-align: center;
}

body.pause-active .home-button {
  visibility: hidden;
}

body.pause-active .settings-button {
  z-index: 1100;
}

.access-gate {
  position: fixed;
  z-index: 10000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: max(1rem, env(safe-area-inset-top))
    max(1rem, env(safe-area-inset-right))
    max(1rem, env(safe-area-inset-bottom))
    max(1rem, env(safe-area-inset-left));
  overflow: auto;
  background:
    radial-gradient(circle at 12% 15%, rgb(255 200 61 / 42%) 0 9rem, transparent 9.1rem),
    radial-gradient(circle at 88% 80%, rgb(66 211 173 / 30%) 0 11rem, transparent 11.1rem),
    linear-gradient(145deg, #f5f2ff, #fff8ed);
}

.access-gate[hidden] {
  display: none;
}

body.access-locked {
  overflow: hidden;
}

body.access-locked > :not(.access-gate):not(script) {
  visibility: hidden;
}

.access-gate-card {
  width: min(100%, 28rem);
  padding: clamp(1.35rem, 6vw, 2.25rem);
  border: 2px solid rgb(98 82 245 / 18%);
  border-radius: 2rem;
  background: rgb(255 255 255 / 94%);
  box-shadow: 0 1.75rem 5rem rgb(61 48 135 / 20%);
  color: #18213d;
  text-align: center;
}

.access-gate-icon {
  display: grid;
  place-items: center;
  width: 5.5rem;
  aspect-ratio: 1;
  margin: 0 auto 1rem;
  border-radius: 1.6rem;
  background: linear-gradient(145deg, #ebe8ff, #fff1c7);
  font-size: 3rem;
}

.access-gate-card h1 {
  margin: 0;
  color: #18213d;
  font-size: clamp(1.8rem, 8vw, 2.65rem);
  line-height: 1.02;
}

.access-gate-card p {
  margin: 0.85rem 0 1.2rem;
  color: #68708b;
  font-weight: 650;
  line-height: 1.45;
}

.access-gate-card label {
  display: block;
  margin-bottom: 0.5rem;
  color: #333b59;
  font-weight: 900;
}

#access-code-input {
  width: min(100%, 13rem);
  padding: 0.85rem 1rem;
  border: 2px solid #c9c5ff;
  border-radius: 1rem;
  background: white;
  color: #18213d;
  font-size: 1.7rem;
  font-weight: 950;
  letter-spacing: 0.4em;
  text-align: center;
}

#access-gate-error {
  min-height: 1.5em;
  margin: 0.65rem 0;
  color: #be123c;
  font-size: 0.9rem;
  font-weight: 850;
}

#access-gate-submit {
  width: 100%;
}

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

button:focus-visible,
input:focus-visible,
summary:focus-visible,
a:focus-visible {
  outline: 4px solid #fbbf24;
  outline-offset: 3px;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --app-bg: #111426;
  --app-surface: rgb(26 30 55 / 92%);
  --app-surface-solid: #1a1e37;
  --app-surface-soft: #222744;
  --app-ink: #f7f7ff;
  --app-muted: #b3bad3;
  --app-line: #343a5b;
  --app-primary: #9488ff;
  --app-primary-strong: #b4adff;
}

html[data-theme="dark"] body {
  background:
    radial-gradient(circle at 8% 8%, rgb(255 200 61 / 13%) 0 9rem, transparent 9.1rem),
    radial-gradient(circle at 96% 12%, rgb(240 82 164 / 12%) 0 10rem, transparent 10.1rem),
    radial-gradient(circle at 90% 92%, rgb(66 211 173 / 10%) 0 12rem, transparent 12.1rem),
    linear-gradient(145deg, #171326 0%, #111426 48%, #111b2e 100%);
}

html[data-theme="dark"] main {
  border-color: rgb(148 136 255 / 13%);
  box-shadow: 0 1.6rem 4.5rem rgb(0 0 0 / 30%),
    inset 0 1px 0 rgb(255 255 255 / 5%);
}

html[data-theme="dark"] .eyebrow,
html[data-theme="dark"] .theme-option[aria-pressed="true"],
html[data-theme="dark"] .instructor-option[aria-pressed="true"],
html[data-theme="dark"] .confirm-icon {
  border-color: rgb(148 136 255 / 18%);
  background: #292650;
  color: #c4beff;
}

html[data-theme="dark"] .top-control,
html[data-theme="dark"] .theme-option,
html[data-theme="dark"] .instructor-option,
html[data-theme="dark"] .action-button.secondary,
html[data-theme="dark"] .back-button,
html[data-theme="dark"] .intro-back-button {
  border-color: var(--app-line);
  background: rgb(26 30 55 / 90%);
  color: var(--app-ink);
}

html[data-theme="dark"] .setting-card {
  border-color: #454a71;
  background: #222744;
}

html[data-theme="dark"] .setting-status,
html[data-theme="dark"] #memory-message {
  color: #8ce9c6 !important;
}

html[data-theme="dark"] .game-card {
  border-color: #7c6528;
  background:
    radial-gradient(circle at 100% 0%, rgb(239 68 68 / 12%) 0 5rem, transparent 5.1rem),
    linear-gradient(145deg, #312a17, #2a201e);
}

html[data-theme="dark"] .penalty-game-card {
  border-color: #2d7759;
  background:
    radial-gradient(circle at 100% 0%, rgb(59 130 246 / 15%) 0 5rem, transparent 5.1rem),
    linear-gradient(145deg, #173329, #172c3c);
}

html[data-theme="dark"] .penalty-intro-badge {
  background: #173d2e;
  color: #8ce9c6;
}

html[data-theme="dark"] .penalty-odds strong,
html[data-theme="dark"] .penalty-message,
html[data-theme="dark"] .penalty-kicker-label {
  color: #8ce9c6;
}

html[data-theme="dark"] .instructor-bubble {
  border-color: #756628;
  background: #302915;
  color: #fff1b8;
  box-shadow: 0.35rem 0.4rem 0 #5f4f17;
}

html[data-theme="dark"] .instructor-bubble::before {
  border-color: #756628;
  background: #302915;
}

html[data-theme="dark"] .instructor-name {
  background: #504313;
  color: #ffe8a3;
}

html[data-theme="dark"] .instructor-bubble .age-note {
  color: #f9df84;
}

html[data-theme="dark"] .memory-complete {
  border-color: #735e24;
  background: linear-gradient(145deg, #312a17, #2b201d);
  color: #ffd66b;
}

html[data-theme="dark"] .photo-credits a {
  color: #c4beff;
}

html[data-theme="dark"] .confirm-dialog {
  border-color: var(--app-line);
  background: var(--app-surface-solid);
}

html[data-theme="dark"] .access-gate {
  background:
    radial-gradient(circle at 12% 15%, rgb(255 200 61 / 12%) 0 9rem, transparent 9.1rem),
    radial-gradient(circle at 88% 80%, rgb(66 211 173 / 12%) 0 11rem, transparent 11.1rem),
    linear-gradient(145deg, #171326, #111b2e);
}

html[data-theme="dark"] .access-gate-card {
  border-color: #3e4164;
  background: #1a1e37;
  color: #f7f7ff;
}

html[data-theme="dark"] .access-gate-card h1,
html[data-theme="dark"] .access-gate-card label {
  color: #f7f7ff;
}

html[data-theme="dark"] .access-gate-card p {
  color: #b3bad3;
}

.meteor-intro-screen {
  text-align: center;
}

.meteor-intro-badge {
  display: inline-flex;
  margin-bottom: 0.7rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: #fff0d6;
  color: #b83d08;
  font-size: 0.74rem;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.meteor-how-to {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  margin: 1rem 0;
}

.meteor-how-to div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.45rem;
  min-height: 3.4rem;
  padding: 0.55rem;
  border: 1px solid #fed7aa;
  border-radius: 1rem;
  background: #fff8ed;
  color: #8c3411;
  text-align: left;
}

.meteor-how-to strong {
  display: grid;
  place-items: center;
  width: 2rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #f97316;
  color: white;
  font-size: 1rem;
  font-weight: 950;
}

.meteor-how-to span {
  font-size: 0.76rem;
  font-weight: 850;
  line-height: 1.2;
}

.meteor-intro-scene {
  position: relative;
  display: flex;
  align-items: end;
  width: min(100%, 29rem);
  min-height: 8.5rem;
  margin: 0.75rem auto;
  padding: 1rem 1.35rem;
  overflow: hidden;
  border: 0.35rem solid #fff2dd;
  border-radius: 1.35rem;
  background:
    radial-gradient(circle at 76% 18%, #ffec78 0 1.6rem, transparent 1.65rem),
    linear-gradient(#45217b 0%, #b34c79 57%, #416b42 58% 100%);
  box-shadow: 0 0.7rem 1.6rem rgb(89 38 71 / 18%);
}

.meteor-intro-scene::before {
  position: absolute;
  inset: 0 0 42%;
  opacity: 0.58;
  background-image: radial-gradient(circle, white 1px, transparent 1.4px);
  background-size: 2.3rem 1.7rem;
  content: "";
}

.meteor-intro-house,
.meteor-intro-defense,
.meteor-intro-rock {
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 0.25rem 0.25rem rgb(24 10 45 / 32%));
}

.meteor-intro-house {
  margin-right: auto;
  font-size: 4.2rem;
}

.meteor-intro-defense {
  margin: 0 1rem 0.2rem;
  font-size: 2rem;
  white-space: nowrap;
}

.meteor-intro-rock {
  align-self: start;
  font-size: 3.5rem;
  transform: rotate(-20deg);
}

.meteor-player-ready {
  margin: 0.9rem 0;
  color: var(--app-muted);
  font-weight: 750;
}

.start-meteor-button {
  min-width: min(100%, 15rem);
  background: linear-gradient(135deg, #e94c16, #bc2814);
  box-shadow: 0 0.24rem 0 #7c1d0f;
}

.meteor-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
  text-align: left;
}

.meteor-kicker {
  margin: 0 0 0.12rem;
  color: #b94718;
  font-size: 0.65rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.meteor-title {
  margin: 0;
  color: var(--app-ink);
  font-size: clamp(1.4rem, 5vw, 2.15rem);
  font-weight: 950;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.meteor-level-badge {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: baseline;
  gap: 0.3rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid #fdba74;
  border-radius: 999px;
  background: #fff5e9;
  color: #a5360e;
  font-size: 0.86rem;
  font-weight: 850;
}

.meteor-level-badge strong {
  font-size: 1.15rem;
  font-weight: 950;
}

.meteor-meters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  margin-bottom: 0.45rem;
}

.meteor-meter-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 3.25rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid;
  border-radius: 1rem;
  font-weight: 850;
}

.meteor-meter-card span {
  font-size: clamp(0.72rem, 2.7vw, 0.9rem);
}

.meteor-meter-card strong {
  font-size: clamp(1.25rem, 4vw, 1.65rem);
  font-weight: 950;
}

.meteor-meter-card.danger {
  border-color: #fdba74;
  background: #fff3e4;
  color: #b13d12;
}

.meteor-meter-card.shield {
  border-color: #93c5fd;
  background: #eff7ff;
  color: #1760aa;
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.meteor-meter-card.shield.is-enough {
  border-color: #6ee7b7;
  background: #e9fff5;
  color: #08734a;
}

.meteor-defense-track {
  position: relative;
  height: 0.65rem;
  margin: 0.15rem 0 0;
  overflow: visible;
  border-radius: 999px;
  background: #e8eaf2;
  box-shadow: inset 0 1px 2px rgb(43 48 77 / 16%);
}

.meteor-defense-fill {
  position: absolute;
  inset: 0 auto 0 0;
  min-width: 0.4rem;
  border-radius: inherit;
  background: linear-gradient(90deg, #38a4ff, #24c881);
  transition: width 220ms ease;
}

.meteor-force-marker {
  position: absolute;
  top: -0.23rem;
  width: 0.22rem;
  height: 1.12rem;
  border-radius: 999px;
  background: #d83b19;
  box-shadow: 0 0 0 2px var(--app-surface-solid);
  transform: translateX(-50%);
}

.meteor-equation {
  margin: 0.35rem 0 0.55rem;
  color: var(--app-muted);
  font-size: 0.72rem;
  font-weight: 850;
}

.meteor-world {
  position: relative;
  isolation: isolate;
  width: 100%;
  height: clamp(17rem, 34vw, 22rem);
  overflow: hidden;
  border: 0.35rem solid #fbe2ca;
  border-radius: 1.35rem;
  background:
    radial-gradient(circle at 82% 16%, #ffd464 0 2rem, transparent 2.05rem),
    linear-gradient(#211b55 0%, #6d347b 40%, #e38366 67%, #558b43 68% 100%);
  box-shadow: 0 0.7rem 1.7rem rgb(70 42 78 / 18%);
}

.meteor-stars {
  position: absolute;
  inset: 0 0 34%;
  opacity: 0.62;
  background-image:
    radial-gradient(circle at 20% 25%, white 0 1.2px, transparent 1.6px),
    radial-gradient(circle at 72% 40%, #fff5b8 0 1.2px, transparent 1.7px),
    radial-gradient(circle at 45% 66%, white 0 1px, transparent 1.5px);
  background-size: 7rem 5rem, 8rem 6.5rem, 5rem 5.5rem;
}

.meteor-cloud {
  position: absolute;
  z-index: 1;
  width: 5.4rem;
  height: 1.3rem;
  border-radius: 999px;
  background: rgb(255 219 212 / 48%);
}

.meteor-cloud::before,
.meteor-cloud::after {
  position: absolute;
  bottom: 0;
  border-radius: 50%;
  background: inherit;
  content: "";
}

.meteor-cloud::before {
  left: 0.8rem;
  width: 2.1rem;
  height: 2.1rem;
}

.meteor-cloud::after {
  right: 0.7rem;
  width: 2.7rem;
  height: 2.7rem;
}

.meteor-cloud-one {
  top: 19%;
  left: 36%;
}

.meteor-cloud-two {
  top: 34%;
  left: 61%;
  opacity: 0.65;
  transform: scale(0.72);
}

.falling-meteor {
  position: absolute;
  z-index: 8;
  top: -12%;
  right: 5%;
  opacity: 0.92;
  font-size: clamp(3.8rem, 9vw, 6.5rem);
  line-height: 1;
  filter: drop-shadow(0 0 1rem rgb(255 87 34 / 90%));
  transform: rotate(-24deg);
}

.meteor-impact {
  position: absolute;
  z-index: 7;
  right: 8%;
  bottom: 13%;
  width: 1rem;
  aspect-ratio: 1;
  opacity: 0;
  border-radius: 50%;
  background: white;
  box-shadow: 0 0 0 1rem #ffd54f, 0 0 0 2.5rem rgb(255 87 34 / 58%);
}

.meteor-shockwave {
  position: absolute;
  z-index: 6;
  right: 7%;
  bottom: 8%;
  width: 2rem;
  height: 58%;
  opacity: 0;
  border: 0.4rem solid rgb(255 244 184 / 92%);
  border-radius: 50%;
  transform: translateX(50%) scale(0.1);
}

.meteor-ground {
  position: absolute;
  z-index: 0;
  inset: auto 0 0;
  height: 32%;
  background:
    radial-gradient(ellipse at 86% 22%, #3e512e 0 2.8rem, transparent 2.9rem),
    repeating-linear-gradient(100deg, #416e37 0 3.2rem, #47783c 3.2rem 6.4rem);
  box-shadow: inset 0 0.4rem 0 rgb(32 65 36 / 24%);
}

.meteor-house {
  position: absolute;
  z-index: 4;
  bottom: 18%;
  left: 5%;
  width: clamp(7.6rem, 18vw, 12rem);
  height: clamp(8.5rem, 20vw, 13.5rem);
  transform-origin: 50% 100%;
}

.house-wall {
  position: absolute;
  inset: 39% 7% 0;
  overflow: hidden;
  border: 0.22rem solid #663b34;
  border-radius: 0.25rem 0.25rem 0.55rem 0.55rem;
  background:
    repeating-linear-gradient(0deg, transparent 0 1.35rem, rgb(142 69 54 / 18%) 1.35rem 1.45rem),
    #f1a66f;
  box-shadow: inset 0 0 0 0.28rem rgb(255 218 170 / 28%),
    0 0.6rem 0.8rem rgb(35 22 32 / 22%);
  transform-origin: 50% 100%;
}

.house-roof {
  position: absolute;
  z-index: 2;
  top: 6%;
  left: 50%;
  width: 79%;
  aspect-ratio: 1;
  border: 0.25rem solid #622b2b;
  border-radius: 0.45rem 0.45rem 0.2rem 0.45rem;
  background: repeating-linear-gradient(90deg, #b63e32 0 1.2rem, #c84a38 1.2rem 2.4rem);
  box-shadow: 0.5rem 0.5rem 0.75rem rgb(44 24 36 / 22%);
  transform: translateX(-50%) rotate(45deg);
  transform-origin: 65% 65%;
}

.house-chimney {
  position: absolute;
  z-index: 1;
  top: 4%;
  right: 17%;
  width: 15%;
  height: 33%;
  border: 0.2rem solid #67362e;
  border-radius: 0.2rem;
  background: #a95645;
}

.house-door {
  position: absolute;
  right: 14%;
  bottom: 0;
  width: 27%;
  height: 55%;
  border: 0.18rem solid #57382e;
  border-bottom: 0;
  border-radius: 0.35rem 0.35rem 0 0;
  background: #73513b;
}

.house-door::after {
  position: absolute;
  top: 48%;
  left: 17%;
  width: 0.34rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #ffd966;
  content: "";
}

.house-window {
  position: absolute;
  top: 22%;
  left: 13%;
  width: 31%;
  aspect-ratio: 1;
  border: 0.22rem solid #fff2c7;
  background:
    linear-gradient(90deg, transparent 45%, white 45% 55%, transparent 55%),
    linear-gradient(transparent 45%, white 45% 55%, transparent 55%),
    #65c9ee;
  box-shadow: 0 0 0 0.14rem #67473d;
}

.house-crack {
  position: absolute;
  z-index: 3;
  top: 14%;
  left: 48%;
  width: 22%;
  height: 55%;
  opacity: 0;
  border-left: 0.25rem solid #4a2926;
  transform: skewX(-22deg) rotate(18deg);
}

.house-crack::before,
.house-crack::after {
  position: absolute;
  left: -0.2rem;
  width: 1rem;
  border-top: 0.22rem solid #4a2926;
  content: "";
  transform-origin: left;
}

.house-crack::before {
  top: 28%;
  transform: rotate(-38deg);
}

.house-crack::after {
  top: 62%;
  transform: rotate(34deg);
}

.defense-slots {
  position: absolute;
  z-index: 5;
  right: 22%;
  bottom: 16%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: clamp(0.25rem, 1vw, 0.65rem);
  width: 49%;
}

.defense-slot {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: clamp(4.5rem, 10vw, 6.8rem);
  padding: 0.2rem;
  border: 0;
  border-radius: 0.8rem;
  background: transparent;
  color: white;
  text-shadow: 0 2px 3px rgb(31 17 33 / 65%);
  cursor: pointer;
}

.defense-slot:not(.is-empty):hover {
  background: rgb(255 255 255 / 12%);
}

.defense-slot.is-empty {
  align-self: end;
  min-height: 3.6rem;
  border: 0.14rem dashed rgb(255 255 255 / 42%);
  color: rgb(255 255 255 / 66%);
  text-shadow: none;
}

.defense-slot.is-empty span {
  font-size: 1.25rem;
  line-height: 1;
}

.defense-slot.is-empty small {
  font-size: 0.58rem;
  font-weight: 850;
}

.defense-slot-icon {
  font-size: clamp(2.3rem, 7vw, 4.4rem);
  line-height: 1;
  filter: drop-shadow(0 0.35rem 0.25rem rgb(28 19 28 / 42%));
}

.defense-slot strong {
  position: absolute;
  top: 0;
  right: 3%;
  display: grid;
  place-items: center;
  min-width: 2rem;
  min-height: 1.55rem;
  padding: 0.15rem 0.35rem;
  border: 2px solid white;
  border-radius: 999px;
  background: #087d51;
  color: white;
  font-size: 0.7rem;
  font-weight: 950;
  text-shadow: none;
  box-shadow: 0 0.2rem 0.4rem rgb(17 43 34 / 30%);
}

.meteor-world[data-result="ready"] .meteor-house {
  animation: house-build 620ms cubic-bezier(0.18, 0.8, 0.2, 1) both;
}

.meteor-world[data-result="striking"] {
  animation: meteor-world-shake 460ms 1.1s linear both;
}

.meteor-world[data-result="striking"] .falling-meteor {
  animation: meteor-fall 1.22s cubic-bezier(0.55, 0.06, 0.82, 0.48) both;
}

.meteor-world[data-result="striking"] .meteor-impact {
  animation: meteor-flash 460ms 1.14s ease-out both;
}

.meteor-world[data-result="striking"] .meteor-shockwave {
  animation: meteor-wave 520ms 1.12s ease-out both;
}

.meteor-world[data-result="striking"] .defense-slot:not(.is-empty) {
  animation: defense-rattle 460ms 1.15s linear both;
}

.meteor-world[data-result="survived"] .meteor-house {
  animation: house-survives 760ms ease-out both;
}

.meteor-world[data-result="survived"]::after {
  position: absolute;
  z-index: 9;
  top: 8%;
  left: 6%;
  padding: 0.45rem 0.7rem;
  border: 2px solid white;
  border-radius: 999px;
  background: #119a64;
  color: white;
  content: "¡CASA A SALVO!";
  font-size: clamp(0.72rem, 2.6vw, 0.95rem);
  font-weight: 950;
  box-shadow: 0 0.4rem 1rem rgb(8 77 48 / 28%);
  animation: result-pop 460ms ease-out both;
}

.meteor-world[data-result="broken"] .house-crack {
  opacity: 1;
}

.meteor-world[data-result="broken"] .house-roof {
  transform: translateX(-35%) translateY(46%) rotate(70deg);
  transition: transform 580ms cubic-bezier(0.55, 0.05, 0.9, 0.45);
}

.meteor-world[data-result="broken"] .house-wall {
  transform: translateY(20%) skewX(-10deg) scaleY(0.78);
  filter: saturate(0.65);
  transition: transform 580ms cubic-bezier(0.55, 0.05, 0.9, 0.45), filter 300ms;
}

.meteor-world[data-result="broken"]::after {
  position: absolute;
  z-index: 9;
  top: 8%;
  left: 6%;
  padding: 0.45rem 0.7rem;
  border: 2px solid white;
  border-radius: 999px;
  background: #c53c25;
  color: white;
  content: "HAY QUE REFORZAR";
  font-size: clamp(0.68rem, 2.6vw, 0.92rem);
  font-weight: 950;
  box-shadow: 0 0.4rem 1rem rgb(91 29 18 / 30%);
  animation: result-pop 460ms ease-out both;
}

.meteor-inventory-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  margin: 0.75rem 0 0.45rem;
  text-align: left;
}

.meteor-inventory-heading h3,
.meteor-inventory-heading p {
  margin: 0;
}

.meteor-inventory-heading h3 {
  color: var(--app-ink);
  font-size: clamp(0.95rem, 3.5vw, 1.15rem);
  font-weight: 950;
}

.meteor-inventory-heading p {
  margin-top: 0.12rem;
  color: var(--app-muted);
  font-size: 0.64rem;
  font-weight: 700;
}

.meteor-inventory-heading > span {
  flex: 0 0 auto;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  background: #e8f4ff;
  color: #1760aa;
  font-size: 0.75rem;
  font-weight: 950;
}

.meteor-inventory {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 0.4rem;
}

.meteor-item {
  position: relative;
  display: grid;
  grid-template-rows: auto auto;
  place-items: center;
  min-width: 0;
  min-height: 5.35rem;
  padding: 0.38rem 0.15rem 0.3rem;
  border: 1px solid var(--app-line);
  border-radius: 0.9rem;
  background: var(--app-surface-soft);
  color: var(--app-ink);
  cursor: pointer;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}

.meteor-item:hover:not(:disabled) {
  z-index: 1;
  border-color: #60a5fa;
  transform: translateY(-0.12rem);
}

.meteor-item[aria-pressed="true"] {
  border-color: #27a56f;
  background: #e9fff5;
  box-shadow: inset 0 0 0 1px #27a56f;
}

.meteor-item:disabled:not([aria-pressed="true"]) {
  opacity: 0.45;
  cursor: not-allowed;
}

.meteor-item-icon {
  font-size: clamp(1.65rem, 4.5vw, 2.35rem);
  line-height: 1;
}

.meteor-item-name {
  overflow: hidden;
  width: 100%;
  color: var(--app-ink);
  font-size: 0.59rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meteor-item strong {
  position: absolute;
  top: 0.2rem;
  right: 0.2rem;
  min-width: 1.55rem;
  padding: 0.11rem 0.22rem;
  border-radius: 999px;
  background: #1760aa;
  color: white;
  font-size: 0.56rem;
  font-weight: 950;
}

.meteor-item[aria-pressed="true"] strong {
  background: #08734a;
}

.meteor-message {
  min-height: 1.5rem;
  margin: 0.65rem 0 0;
  color: var(--app-ink);
  font-size: clamp(0.78rem, 2.7vw, 0.96rem);
  font-weight: 850;
}

.meteor-actions {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  margin-top: 0.55rem;
}

.meteor-actions .action-button {
  width: 100%;
  min-height: 2.75rem;
  margin: 0;
  padding-inline: 0.65rem;
  font-size: clamp(0.68rem, 2.6vw, 0.84rem);
}

.meteor-launch-button,
.meteor-next-button {
  background: linear-gradient(135deg, #e94c16, #b92318);
  box-shadow: 0 0.24rem 0 #7b1b11;
}

.meteor-next-button {
  background: linear-gradient(135deg, #159b62, #08734a);
  box-shadow: 0 0.24rem 0 #075436;
}

.meteor-launch-button:disabled {
  background: #aab0bd;
  box-shadow: 0 0.2rem 0 #777d89;
  cursor: not-allowed;
}

html[data-theme="dark"] .meteor-game-card {
  border-color: #9b4b30;
  background:
    radial-gradient(circle at 100% 0%, rgb(239 68 68 / 20%) 0 5rem, transparent 5.1rem),
    linear-gradient(145deg, #39241e, #312039);
}

html[data-theme="dark"] .meteor-intro-badge,
html[data-theme="dark"] .meteor-level-badge {
  border-color: #6e4432;
  background: #3b281f;
  color: #ffb184;
}

html[data-theme="dark"] .meteor-how-to div,
html[data-theme="dark"] .meteor-meter-card.danger {
  border-color: #624034;
  background: #35251f;
  color: #ffb184;
}

html[data-theme="dark"] .meteor-meter-card.shield,
html[data-theme="dark"] .meteor-inventory-heading > span {
  border-color: #334f6e;
  background: #1d3047;
  color: #9ed1ff;
}

html[data-theme="dark"] .meteor-meter-card.shield.is-enough,
html[data-theme="dark"] .meteor-item[aria-pressed="true"] {
  border-color: #287958;
  background: #18382d;
  color: #8ce6bd;
}

html[data-theme="dark"] .meteor-defense-track {
  background: #32364b;
}

html[data-theme="dark"] .meteor-force-marker {
  box-shadow: 0 0 0 2px #1a1e37;
}

@keyframes house-build {
  0% {
    opacity: 0;
    transform: translateY(65%) scaleY(0.25);
  }

  65% {
    opacity: 1;
    transform: translateY(-3%) scaleY(1.03);
  }

  100% {
    opacity: 1;
    transform: none;
  }
}

@keyframes meteor-fall {
  0% {
    top: -12%;
    right: 5%;
    opacity: 1;
    transform: rotate(-24deg) scale(1);
  }

  88% {
    top: 61%;
    right: 7%;
    opacity: 1;
    transform: rotate(-24deg) scale(0.72);
  }

  100% {
    top: 64%;
    right: 7%;
    opacity: 0;
    transform: rotate(-24deg) scale(0.45);
  }
}

@keyframes meteor-flash {
  0% {
    opacity: 0;
    transform: scale(0.2);
  }

  22% {
    opacity: 1;
    transform: scale(1);
  }

  100% {
    opacity: 0;
    transform: scale(2.5);
  }
}

@keyframes meteor-wave {
  0% {
    opacity: 0.9;
    transform: translateX(50%) scale(0.1);
  }

  100% {
    right: 78%;
    opacity: 0;
    transform: translateX(50%) scale(1.25);
  }
}

@keyframes meteor-world-shake {
  0%, 100% { transform: translate(0); }
  15% { transform: translate(-0.35rem, 0.16rem); }
  30% { transform: translate(0.3rem, -0.12rem); }
  46% { transform: translate(-0.2rem, 0.1rem); }
  64% { transform: translate(0.16rem, -0.08rem); }
  82% { transform: translate(-0.08rem, 0.04rem); }
}

@keyframes defense-rattle {
  0%, 100% { transform: rotate(0); }
  22% { transform: rotate(-7deg) translateX(-0.18rem); }
  45% { transform: rotate(6deg) translateX(0.14rem); }
  68% { transform: rotate(-4deg); }
}

@keyframes house-survives {
  0%, 100% { filter: none; transform: none; }
  35% { filter: brightness(1.35) drop-shadow(0 0 1rem #7cf1ba); transform: scale(1.035); }
}

@keyframes result-pop {
  0% { opacity: 0; transform: translateY(-0.6rem) scale(0.75); }
  70% { opacity: 1; transform: translateY(0) scale(1.06); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.arcade-ranking-screen {
  text-align: left;
}

.arcade-ranking-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.arcade-ranking-header h2,
.arcade-ranking-header p {
  margin: 0;
}

.arcade-ranking-header h2 {
  color: var(--app-ink);
  font-size: clamp(1.85rem, 7vw, 3rem);
  font-weight: 950;
  letter-spacing: -0.045em;
  line-height: 1;
}

.arcade-ranking-header > div > p:last-child {
  max-width: 34rem;
  margin-top: 0.45rem;
  color: var(--app-muted);
  font-size: clamp(0.8rem, 2.7vw, 0.95rem);
  font-weight: 700;
}

.arcade-kicker {
  margin-bottom: 0.35rem !important;
  color: #7c3aed;
  font-size: 0.7rem;
  font-weight: 950;
  letter-spacing: 0.11em;
}

.arcade-cabinet-icon {
  display: grid;
  place-items: center;
  width: clamp(4rem, 11vw, 5.5rem);
  aspect-ratio: 1;
  border: 2px solid #8b5cf6;
  border-radius: 1.3rem;
  background: linear-gradient(145deg, #27165c, #6d28a6);
  font-size: clamp(2rem, 6vw, 3rem);
  box-shadow: 0 0.65rem 1.4rem rgb(71 38 130 / 24%), inset 0 1px 0 rgb(255 255 255 / 22%);
  transform: rotate(3deg);
}

.ranking-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.42rem;
  margin-bottom: 0.65rem;
  padding: 0.35rem;
  border: 1px solid var(--app-line);
  border-radius: 1.1rem;
  background: var(--app-surface-soft);
}

.ranking-tabs button {
  min-width: 0;
  min-height: 2.75rem;
  padding: 0.5rem 0.35rem;
  border: 0;
  border-radius: 0.82rem;
  background: transparent;
  color: var(--app-muted);
  font-size: clamp(0.66rem, 2.7vw, 0.85rem);
  font-weight: 900;
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

.ranking-tabs button:hover {
  color: var(--app-ink);
}

.ranking-tabs button[aria-selected="true"] {
  background: linear-gradient(135deg, #5b36d9, #8c2f98);
  color: white;
  box-shadow: 0 0.28rem 0 #39258d, 0 0.45rem 0.8rem rgb(70 41 139 / 22%);
}

.ranking-machine {
  position: relative;
  overflow: hidden;
  padding: clamp(0.75rem, 2.5vw, 1.15rem);
  border: 0.35rem solid #342173;
  border-radius: 1.45rem;
  background:
    radial-gradient(circle at 87% 4%, rgb(255 222 64 / 14%) 0 6rem, transparent 6.1rem),
    linear-gradient(160deg, #151231, #21164b 60%, #36164a);
  color: white;
  box-shadow: 0 0.9rem 2rem rgb(37 26 79 / 28%), inset 0 0 0 2px #6d46bd;
}

.ranking-machine::before {
  position: absolute;
  inset: 0;
  opacity: 0.13;
  background-image: linear-gradient(rgb(255 255 255 / 45%) 1px, transparent 1px);
  background-size: 100% 4px;
  content: "";
  pointer-events: none;
}

.ranking-machine-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.2rem 0.15rem 0.65rem;
  border-bottom: 1px solid rgb(174 148 255 / 28%);
}

.ranking-machine-top > div {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #7fffd1;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.7rem;
  font-weight: 950;
  letter-spacing: 0.09em;
}

.ranking-live-light {
  width: 0.55rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #35efaf;
  box-shadow: 0 0 0.65rem #35efaf;
  animation: ranking-light 1.5s ease-in-out infinite;
}

.ranking-machine-top > strong {
  color: #fff07a;
  font-size: clamp(0.78rem, 3vw, 1rem);
  font-weight: 950;
  text-align: right;
}

.ranking-rule {
  position: relative;
  z-index: 1;
  margin: 0.6rem 0;
  color: #c9bdf0;
  font-size: clamp(0.65rem, 2.5vw, 0.78rem);
  font-weight: 700;
}

.ranking-list {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ranking-list li {
  display: grid;
  grid-template-columns: 2.1rem 2.9rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.55rem;
  min-height: 3.25rem;
  padding: 0.4rem 0.65rem;
  border: 1px solid rgb(164 138 245 / 18%);
  border-radius: 0.8rem;
  background: rgb(255 255 255 / 5%);
}

.ranking-list li:nth-child(-n + 3):not(.ranking-empty) {
  border-color: rgb(255 226 93 / 38%);
  background: linear-gradient(90deg, rgb(255 222 72 / 13%), rgb(255 255 255 / 5%));
}

.ranking-list li.is-current-player {
  box-shadow: inset 0 0 0 1px #55e9bc;
}

.ranking-position {
  display: grid;
  place-items: center;
  color: #aaa1cf;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.9rem;
  font-weight: 950;
}

.ranking-list li:nth-child(-n + 3) .ranking-position {
  font-size: 1.35rem;
}

.ranking-initials {
  display: grid;
  place-items: center;
  min-height: 2.1rem;
  border: 1px solid rgb(255 255 255 / 35%);
  border-radius: 0.58rem;
  background: linear-gradient(135deg, #f05b40, #8b5cf6);
  color: white;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.75rem;
  font-weight: 950;
  letter-spacing: 0.05em;
  text-shadow: 0 1px 2px rgb(38 20 70 / 40%);
}

.ranking-initials[data-player="Jaime"] {
  background: linear-gradient(135deg, #19a9e7, #623ed8);
}

.ranking-result {
  display: grid;
  min-width: 0;
}

.ranking-result strong {
  overflow: hidden;
  color: white;
  font-size: 0.82rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-result small {
  overflow: hidden;
  margin-top: 0.08rem;
  color: #aaa1cf;
  font-size: 0.62rem;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-score {
  color: #fff07a;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: clamp(0.85rem, 3.4vw, 1.05rem);
  font-weight: 950;
  text-align: right;
  text-shadow: 0 0 0.65rem rgb(255 231 90 / 32%);
}

.ranking-list .ranking-empty {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 0.08rem 0.65rem;
  min-height: 6.5rem;
  color: white;
  text-align: left;
}

.ranking-empty > span {
  grid-row: 1 / 3;
  align-self: center;
  font-size: 2.5rem;
}

.ranking-empty strong {
  align-self: end;
  color: #fff07a;
  font-size: 1rem;
  font-weight: 950;
}

.ranking-empty small {
  align-self: start;
  color: #aaa1cf;
  font-weight: 700;
}

.ranking-status {
  position: relative;
  z-index: 1;
  min-height: 1rem;
  margin: 0.55rem 0 0;
  color: #8fe9c9;
  font-size: 0.65rem;
  font-weight: 750;
  text-align: center;
}

.ranking-score-help {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.7rem;
  margin-top: 0.85rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--app-line);
  border-radius: 1rem;
  background: var(--app-surface-soft);
}

.ranking-score-help > span {
  font-size: 1.65rem;
}

.ranking-score-help p,
.ranking-score-help strong {
  display: block;
  margin: 0;
}

.ranking-score-help p {
  color: var(--app-muted);
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.38;
}

.ranking-score-help strong {
  margin-bottom: 0.1rem;
  color: var(--app-ink);
  font-size: 0.78rem;
  font-weight: 950;
}

.ranking-back {
  display: block;
  margin-top: 0.85rem;
}

.arcade-record-toast {
  position: fixed;
  z-index: 300;
  top: max(4.5rem, calc(env(safe-area-inset-top) + 4rem));
  left: 50%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.65rem;
  width: min(calc(100% - 1.5rem), 23rem);
  padding: 0.65rem 0.8rem;
  border: 2px solid #fff2a4;
  border-radius: 1rem;
  background: linear-gradient(135deg, #39206d, #71318b);
  color: white;
  box-shadow: 0 1rem 2.2rem rgb(35 20 72 / 38%), inset 0 1px 0 rgb(255 255 255 / 22%);
  transform: translateX(-50%);
  animation: arcade-toast-in 360ms cubic-bezier(0.18, 0.82, 0.2, 1.2) both;
}

.arcade-record-toast[data-state="error"] {
  border-color: #ffc0ad;
  background: linear-gradient(135deg, #6f2525, #9e352a);
}

.arcade-toast-icon {
  display: grid;
  place-items: center;
  width: 2.75rem;
  aspect-ratio: 1;
  border-radius: 0.8rem;
  background: rgb(255 255 255 / 14%);
  font-size: 1.65rem;
}

.arcade-record-toast strong,
.arcade-record-toast small {
  display: block;
}

.arcade-record-toast strong {
  color: #fff28a;
  font-size: 0.9rem;
  font-weight: 950;
}

.arcade-record-toast small {
  margin-top: 0.1rem;
  color: #eee7ff;
  font-size: 0.68rem;
  font-weight: 700;
}

html[data-theme="dark"] .ranking-tabs,
html[data-theme="dark"] .ranking-score-help {
  border-color: #343852;
  background: #1c2037;
}

@keyframes ranking-light {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

@keyframes arcade-toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(-1rem) scale(0.94); }
  to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

@media (min-width: 44rem) {
  .memory-board[data-card-count="12"] {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .memory-board[data-card-count="8"] {
    max-width: 38rem;
  }
}

@media (max-width: 42rem) {
  body {
    padding-inline: 0.65rem;
  }

  main,
  main.memory-active {
    padding: 1.05rem;
    border-radius: 1.55rem;
  }

  main.penalty-active {
    padding: 0.75rem;
  }

  main.meteor-active {
    padding: 0.75rem;
  }

  main.ranking-active {
    padding: 0.8rem;
  }

  .top-control {
    width: 3.25rem;
    min-height: 3rem;
    border-radius: 0.85rem;
  }

  .active-profile {
    min-height: 3rem;
    max-width: calc(100% - 8rem);
    padding: 0.3rem 0.7rem 0.3rem 0.35rem;
    font-size: 0.95rem;
  }

  .active-profile-icon {
    width: 2rem;
    font-size: 1.25rem;
  }

  .game-card {
    grid-template-columns: 4.2rem minmax(0, 1fr);
    min-height: 6.5rem;
    padding: 0.8rem;
  }

  .game-icon {
    width: 4.2rem;
    font-size: 2.25rem;
  }

  .penalty-stadium {
    aspect-ratio: 1.38;
  }

  .penalty-sky {
    bottom: 55%;
  }

  .stadium-crowd {
    top: 32%;
    height: 15%;
  }

  .football-goal {
    top: 24%;
    left: 5%;
    width: 90%;
    height: 36%;
  }

  .penalty-kicker-player {
    top: 72%;
  }

  .penalty-ball {
    top: 88%;
  }

  .meteor-world {
    height: clamp(16.5rem, 67vw, 20rem);
  }

  .meteor-house {
    bottom: 16%;
    left: 2%;
    width: clamp(6.8rem, 29vw, 9rem);
    height: clamp(7.7rem, 32vw, 10rem);
  }

  .defense-slots {
    right: 19%;
    bottom: 14%;
    width: 53%;
  }

  .meteor-inventory {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .meteor-item {
    min-height: 4.4rem;
  }

  .meteor-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .meteor-actions .meteor-launch-button,
  .meteor-actions .meteor-next-button {
    grid-column: 1 / -1;
  }

  .instructor-message {
    grid-template-columns: 5.2rem minmax(0, 1fr);
  }

  .instructor-message-image {
    max-height: 10rem;
  }

  .memory-header {
    gap: 0.6rem;
  }

  .memory-kicker {
    font-size: 0.58rem;
  }

  .level-badge {
    padding: 0.45rem 0.7rem;
    font-size: 0.85rem;
  }
}

@media (max-width: 23rem) {
  body.home-view main {
    padding: 1rem 0.85rem;
  }

  .eyebrow {
    margin-bottom: 0.7rem;
    font-size: 0.62rem;
  }

  h1 {
    font-size: clamp(2rem, 11vw, 2.5rem);
  }

  .player-button {
    min-height: 6.25rem;
    padding-inline: 0.35rem;
  }

  .player-animal {
    font-size: 2.5rem;
  }

  .top-control {
    width: 3.1rem;
    min-height: 3.1rem;
  }

  .active-profile {
    width: 3.1rem;
    min-height: 3.1rem;
    padding: 0;
    justify-content: center;
  }

  .active-profile-name {
    display: none;
  }

  .instructor-options {
    gap: 0.3rem;
  }

  .penalty-actions {
    display: grid;
  }

  .penalty-scoreboard span {
    font-size: 0.56rem;
  }

  .meteor-how-to {
    gap: 0.3rem;
  }

  .meteor-how-to div {
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 0.45rem 0.2rem;
    text-align: center;
  }

  .meteor-how-to strong {
    width: 1.7rem;
  }

  .meteor-how-to span {
    font-size: 0.64rem;
  }

  .meteor-intro-house {
    font-size: 3.5rem;
  }

  .meteor-intro-defense {
    margin-inline: 0.35rem;
    font-size: 1.55rem;
  }

  .meteor-intro-rock {
    font-size: 2.85rem;
  }

  .meteor-meter-card {
    padding-inline: 0.5rem;
  }

  .meteor-title {
    font-size: 1.28rem;
  }

  .meteor-level-badge {
    padding: 0.45rem 0.6rem;
    font-size: 0.72rem;
  }

  .meteor-inventory-heading p {
    max-width: 15rem;
  }

  .arcade-ranking-header {
    gap: 0.6rem;
  }

  .arcade-cabinet-icon {
    width: 4rem;
  }

  .ranking-list li {
    grid-template-columns: 1.7rem 2.45rem minmax(0, 1fr) auto;
    gap: 0.35rem;
    padding-inline: 0.42rem;
  }

  .ranking-initials {
    min-height: 1.9rem;
    font-size: 0.67rem;
  }

  .ranking-score {
    font-size: 0.78rem;
  }

  .instructor-option {
    padding-inline: 0.12rem;
  }

  .setting-card-heading {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .pause-setting-state {
    grid-column: 2;
    justify-self: start;
  }

  .timer-controls {
    grid-template-columns: 1fr;
  }

  .timer-controls label,
  .timer-controls .secondary {
    grid-column: auto;
  }

  .instructor-message {
    grid-template-columns: 4.6rem minmax(0, 1fr);
    gap: 0.45rem;
  }

  .instructor-bubble {
    padding: 0.8rem;
  }

  .memory-board {
    gap: 0.3rem;
  }

  .memory-card-name {
    padding-inline: 0.08rem;
    font-size: 0.54rem;
  }

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

@media (hover: none) {
  .player-button:hover,
  .game-card:hover,
  .top-control:hover,
  .arcade-ranking-button:hover,
  .meteor-item:hover:not(:disabled) {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  main,
  .player-button,
  .game-card,
  .top-control,
  .memory-card-inner {
    animation: none;
    transition: none;
  }

  .penalty-keeper,
  .penalty-kicker-player,
  .kicker-leg,
  .goal-net,
  .penalty-stadium {
    animation-duration: 1ms !important;
  }

  .meteor-house,
  .falling-meteor,
  .meteor-impact,
  .meteor-shockwave,
  .defense-slot,
  .meteor-world {
    animation-duration: 1ms !important;
    animation-delay: 0ms !important;
    transition-duration: 1ms !important;
  }

  .arcade-ranking-button,
  .arcade-record-toast,
  .ranking-live-light,
  .ranking-tabs button {
    animation: none !important;
    transition: none !important;
  }
}

@keyframes keeper-dive-left {
  0% {
    transform: translateX(-50%) rotate(0);
  }

  70%,
  100% {
    transform: translateX(-285%) translateY(-12%) rotate(-68deg) scaleX(1.12);
  }
}

@keyframes keeper-dive-right {
  0% {
    transform: translateX(-50%) rotate(0);
  }

  70%,
  100% {
    transform: translateX(185%) translateY(-12%) rotate(68deg) scaleX(1.12);
  }
}

@keyframes keeper-dive-center {
  0% {
    transform: translateX(-50%) translateY(0) scale(1);
  }

  60%,
  100% {
    transform: translateX(-50%) translateY(-25%) scale(1.12);
  }
}

@keyframes kicker-run {
  0% {
    transform: translateX(-50%) translate(0, 0) rotate(0);
  }

  55% {
    transform: translateX(-50%) translate(8%, -8%) rotate(4deg);
  }

  100% {
    transform: translateX(-50%) translate(10%, -3%) rotate(-3deg);
  }
}

@keyframes kicking-leg {
  0% {
    transform: rotate(0);
  }

  45% {
    transform: rotate(42deg);
  }

  100% {
    transform: rotate(-52deg);
  }
}

@keyframes goal-net-burst {
  0%,
  100% {
    transform: scale(1);
  }

  55% {
    transform: scaleX(1.025) scaleY(1.08);
  }
}

@keyframes penalty-post-shake {
  0%,
  100% {
    transform: translateX(0);
  }

  30% {
    transform: translateX(-0.3rem);
  }

  70% {
    transform: translateX(0.3rem);
  }
}

@keyframes surface-in {
  from {
    opacity: 0;
    transform: translateY(0.6rem) scale(0.99);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.games-hub-link {
  left: max(0.8rem, env(safe-area-inset-left));
  display: inline-flex;
  width: 11rem;
  height: 3.5rem;
  min-height: 3.5rem;
  aspect-ratio: auto;
  padding: 0 0.9rem;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
  text-decoration: none;
}

body.access-locked .games-hub-link {
  visibility: hidden;
}

body.gameplay-view .games-hub-link,
body.settings-view .games-hub-link {
  display: none;
}

body:not(.home-view):not(.gameplay-view):not(.settings-view) .home-button {
  left: calc(max(0.8rem, env(safe-area-inset-left)) + 11.5rem);
}

@media (max-width: 42rem) {
  .games-hub-link {
    width: 3.25rem;
    height: 3.25rem;
    min-height: 3.25rem;
    padding: 0;
  }

  .games-hub-link span {
    display: none;
  }

  body:not(.home-view):not(.gameplay-view):not(.settings-view) .home-button {
    left: calc(max(0.8rem, env(safe-area-inset-left)) + 3.75rem);
  }
}

@media (max-width: 23rem) {
  .games-hub-link {
    width: 3.1rem;
    height: 3.1rem;
    min-height: 3.1rem;
  }

  body:not(.home-view):not(.gameplay-view):not(.settings-view) .home-button {
    left: calc(max(0.8rem, env(safe-area-inset-left)) + 3.6rem);
  }
}
