:root {
  color-scheme: dark;
  --ink: #f7f7f2;
  --muted: #9898a4;
  --line: #2c2c34;
  --panel: #17171c;
  --panel-2: #222229;
  --black: #09090b;
  --yellow: #f5d547;
  --yellow-dark: #d8b727;
  --pink: #ef6d89;
  --cyan: #66d3dd;
  --green: #67d59e;
  --red: #f06b66;
  --phone-width: 430px;
  --game-gutter: 12px;
  --game-header-height: 55px;
  --game-nav-height: 84px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  background: #000;
  color: var(--ink);
}

body {
  display: flex;
  justify-content: center;
  letter-spacing: 0;
  overflow: hidden;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
  border: 0;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

button:disabled {
  cursor: default;
  opacity: 0.45;
}

button:focus:not(:focus-visible) {
  outline: none;
}

button:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.is-hidden {
  display: none !important;
}

.phone-frame {
  position: relative;
  width: min(100vw, var(--phone-width));
  height: 100dvh;
  min-height: 520px;
  overflow: hidden;
  background: var(--black);
  border-inline: 1px solid #1f1f24;
}

.app-shell {
  display: grid;
  grid-template-rows: var(--game-header-height) minmax(0, 1fr) auto;
  width: 100%;
  height: 100%;
  background: var(--black);
}

.age-gate {
  position: absolute;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: end center;
  padding: 24px 18px calc(32px + env(safe-area-inset-bottom));
  background: #09090b url("./assets/goddess-01-luna.png") center 10% / auto 76% no-repeat;
}

.age-gate::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(9, 9, 11, 0.05) 30%, rgba(9, 9, 11, 0.94) 74%);
}

.age-panel {
  position: relative;
  width: 100%;
  padding: 18px;
  border: 1px solid #35353d;
  border-radius: 8px;
  background: rgba(17, 17, 21, 0.95);
  text-align: center;
}

.age-panel p,
.age-panel h1,
.age-panel span {
  display: block;
  margin: 0;
}

.age-panel p {
  color: var(--yellow);
  font-size: 11px;
  font-weight: 900;
}

.age-panel h1 {
  margin-top: 6px;
  font-size: 26px;
}

.age-panel span {
  margin: 8px 0 16px;
  color: #b7b7c0;
  font-size: 12px;
}

.main-button {
  min-height: 48px;
  width: 100%;
  border-radius: 8px;
  background: var(--yellow);
  color: #17150b;
  font-weight: 900;
  box-shadow: inset 0 -3px 0 var(--yellow-dark);
}

.main-button:active,
.feed-button:active {
  transform: translateY(1px);
  box-shadow: none;
}

.topbar {
  display: none;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  padding: calc(8px + env(safe-area-inset-top)) 12px 7px;
  border-bottom: 1px solid #202027;
  background: #0e0e11;
}

.profile-button {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 190px;
  padding: 0;
  background: transparent;
  text-align: left;
}

.profile-button > span:last-child {
  display: grid;
  min-width: 0;
}

.profile-button strong,
.profile-button small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-button strong {
  font-size: 13px;
}

.profile-button small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.avatar {
  display: grid;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 2px solid var(--yellow);
  border-radius: 50%;
  background: var(--pink);
  color: #fff;
  font-weight: 900;
}

.top-actions {
  display: flex;
  gap: 7px;
}

.square-button {
  position: relative;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid #33333c;
  border-radius: 8px;
  background: #1a1a20;
}

.square-button i {
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border-radius: 5px;
  font-style: normal;
  font-size: 11px;
  font-weight: 900;
}

.calendar-icon {
  background: var(--cyan);
  color: #082f35;
}

.pass-icon {
  background: var(--yellow);
  color: #211d08;
}

.square-button b,
.bottom-nav b {
  position: absolute;
  top: 2px;
  right: 2px;
  display: none;
  width: 7px;
  height: 7px;
  border: 1px solid #111;
  border-radius: 50%;
  background: #ff4d5e;
}

.square-button b.is-visible,
.bottom-nav b.is-visible {
  display: block;
  animation: notice-pulse 1.8s ease-in-out infinite;
}

.resource-strip {
  display: grid;
  grid-row: 1;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 8px;
  min-height: var(--game-header-height);
  padding: 7px var(--game-gutter);
  border-bottom: 1px solid #202027;
  background: #100d17;
}

.resource-strip > div,
.resource-strip button {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 36px;
  gap: 6px;
  padding: 4px 9px;
  border: 0;
  border-radius: 6px;
  background: #1a1721;
}

.resource-strip > div:first-of-type {
  grid-column: 2;
  min-width: 76px;
}

.resource-strip > div:nth-of-type(2) {
  grid-column: 3;
  min-width: 62px;
}

.resource-strip strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
}

.resource-strip button {
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
  padding-inline: 9px;
  color: #bdbdc6;
  font-size: 10px;
}

.corn-icon {
  display: inline-block;
  width: 13px;
  height: 19px;
  flex: 0 0 13px;
  border-radius: 50% 50% 42% 42%;
  background: var(--yellow);
  transform: rotate(-20deg);
  box-shadow: inset 4px 0 0 #e3ad25;
}

.star-icon {
  color: #f5bd4e;
  font-style: normal;
  font-size: 18px;
}

.wallet-icon {
  position: relative;
  display: block;
  width: 16px;
  height: 12px;
  border: 1.5px solid #bdbdc6;
  border-radius: 3px;
}

.wallet-icon::after {
  content: "";
  position: absolute;
  right: -2px;
  top: 3px;
  width: 5px;
  height: 4px;
  border-radius: 2px;
  background: #bdbdc6;
}

.game-viewport {
  position: relative;
  min-height: 0;
  overflow: hidden;
}

.tab-panel {
  position: absolute;
  inset: 0;
  display: none;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.tab-panel::-webkit-scrollbar {
  display: none;
}

.tab-panel.is-active {
  display: block;
}

.home-panel {
  padding: 0 var(--game-gutter) 10px;
  background: #0e0a15;
}

.home-hud {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 58px 1fr 58px;
  align-items: center;
  min-height: 126px;
}

.hud-badge {
  width: 58px;
  min-height: 76px;
  border: 1px solid #302a3b;
  border-radius: 6px;
  background: #191520;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.018);
}

.pass-badge {
  display: grid;
  place-content: center;
  color: var(--yellow);
  font-weight: 900;
}

.pass-badge span {
  font-size: 8px;
}

.pass-badge small {
  font-size: 15px;
}

.dmd-balance {
  text-align: center;
}

.dmd-balance strong,
.dmd-balance span {
  display: block;
}

.dmd-balance strong {
  font-size: 38px;
  line-height: 1;
}

.dmd-balance span {
  margin-top: 4px;
  color: var(--yellow);
  font-size: 10px;
  font-weight: 900;
}

.gift-badge {
  align-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.gift-badge i {
  position: relative;
  display: block;
  width: 20px;
  height: 16px;
  border-radius: 3px;
  background: var(--pink);
}

.gift-badge i::before,
.gift-badge i::after {
  content: "";
  position: absolute;
  top: -6px;
  width: 9px;
  height: 8px;
  border: 2px solid var(--pink);
  border-radius: 8px 8px 0 8px;
}

.gift-badge i::before {
  left: 0;
}

.gift-badge i::after {
  right: 0;
  transform: scaleX(-1);
}

.gift-badge span {
  font-size: 11px;
  font-weight: 900;
}

.hero-zone {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: clamp(430px, 56vh, 518px);
  min-height: 430px;
  margin-top: 0;
  touch-action: pan-y;
  user-select: none;
}

.hero-card {
  position: relative;
  width: min(46vw, 198px);
  height: min(33vh, 300px);
  min-height: 286px;
  overflow: hidden;
  border: 2px solid #332d3d;
  border-radius: 6px;
  background: #211d27;
  transform: rotate(-1deg);
  box-shadow: 6px 6px 0 #17121d;
  will-change: transform, opacity;
}

.hero-card.is-swiping {
  transform: translateX(var(--swipe-x, 0)) rotate(-1deg);
  transition: none;
}

.hero-card.snap-back {
  animation: card-snap-back 220ms ease-out;
}

.hero-card.card-out-left {
  animation: card-out-left 160ms ease-in forwards;
}

.hero-card.card-out-right {
  animation: card-out-right 160ms ease-in forwards;
}

.hero-card.card-in-left {
  animation: card-in-left 260ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.hero-card.card-in-right {
  animation: card-in-right 260ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.hero-card.is-feeding img {
  animation: feed-bounce 420ms ease-out;
}

.hero-card.is-leveling {
  animation: level-up 700ms ease-out;
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 0 5px rgba(255, 255, 255, 0.03);
}

.hero-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  pointer-events: none;
  user-select: none;
}

.feed-fx-layer {
  position: absolute;
  z-index: 7;
  inset: 12% 8% 58px;
  overflow: hidden;
  pointer-events: none;
}

.feed-fx {
  position: absolute;
  bottom: 13%;
  padding: 5px 7px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 5px;
  background: rgba(12, 12, 15, 0.84);
  font-size: 10px;
  font-weight: 950;
  white-space: nowrap;
  animation: feed-float 820ms ease-out forwards;
}

.dmd-fx {
  left: 8%;
  color: var(--green);
}

.egg-fx {
  left: 50%;
  color: var(--pink);
  animation-delay: 60ms;
}

.cost-fx {
  right: 4%;
  color: var(--yellow);
  animation-delay: 110ms;
}

.value-pop {
  animation: value-pop 420ms ease-out;
}

.hero-card-head {
  position: absolute;
  z-index: 3;
  top: 9px;
  left: 9px;
  right: 9px;
  display: flex;
  justify-content: space-between;
  transform: rotate(1deg);
}

.rarity-pill {
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(8, 8, 10, 0.8);
  color: var(--yellow);
  font-size: 9px;
  font-weight: 900;
}

.info-button {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  background: rgba(8, 8, 10, 0.74);
  font-family: Georgia, serif;
  font-weight: 900;
}

.hero-card-name {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: 47px;
  display: none;
  padding: 42px 13px 10px;
  background: linear-gradient(180deg, transparent, rgba(8, 8, 10, 0.94));
  text-align: center;
  transform: rotate(1deg);
}

.hero-card-name strong {
  font-size: 15px;
}

.hero-card-name small {
  margin-top: 3px;
  color: #bcbcc5;
  font-size: 10px;
}

.feed-button {
  position: absolute;
  z-index: 4;
  left: 50%;
  right: auto;
  bottom: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 126px;
  min-height: 44px;
  gap: 5px;
  padding: 0 7px;
  border-radius: 5px;
  background: #f6f3ed;
  color: #17131b;
  font-weight: 900;
  transform: translateX(-50%) rotate(1deg);
  box-shadow: inset 0 -3px 0 #c6c0b8;
}

.feed-button span {
  font-size: 10px;
}

.feed-button strong {
  font-size: 8px;
}

.feed-button:active {
  transform: translateX(-50%) translateY(1px) rotate(1deg);
}

.hero-card.is-staked .feed-button {
  background: #33333a;
  color: #9a9aa3;
  box-shadow: none;
}

.carousel-arrow {
  position: absolute;
  z-index: 5;
  top: 46%;
  display: none;
  width: 34px;
  height: 48px;
  place-items: center;
  background: transparent;
  color: #d4d4dc;
  font-size: 34px;
}

.carousel-arrow.prev {
  left: -4px;
}

.carousel-arrow.next {
  right: -4px;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 5px;
  min-height: 8px;
  margin-top: 2px;
}

.carousel-dots button {
  width: 7px;
  height: 7px;
  padding: 0;
  border-radius: 999px;
  background: #383840;
}

.carousel-dots button.is-active {
  background: var(--yellow);
}

.reset-clock {
  margin: 5px 0 11px;
  color: #858590;
  font-size: 10px;
  text-align: center;
}

.reset-clock strong {
  color: #c8c8d0;
}

.progress-dock {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 46px 54px;
  align-items: center;
  gap: 7px;
  min-height: 96px;
  margin-inline: 19px;
  padding: 10px 9px;
  border: 1px solid #322b3c;
  border-radius: 7px;
  background: #191520;
}

.level-medal {
  display: grid;
  width: 50px;
  height: 50px;
  place-content: center;
  border: 2px solid var(--yellow);
  border-radius: 50%;
  text-align: center;
}

.level-medal small,
.breed-count small {
  color: #8f8f99;
  font-size: 9px;
  font-weight: 800;
}

.level-medal strong {
  font-size: 18px;
  line-height: 0.95;
}

.level-progress {
  min-width: 0;
}

.progress-copy {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 8px;
  font-size: 9px;
}

.progress-copy span {
  color: #aaaab3;
}

.progress-copy b {
  color: var(--green);
  white-space: nowrap;
}

.progress-track {
  position: relative;
  height: 7px;
  border-radius: 999px;
  background: #303038;
}

.progress-track i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--cyan);
  transition: width 180ms ease;
}

.egg-marker {
  position: absolute;
  top: 50%;
  left: calc(var(--progress, 0%) - 6px);
  width: 12px;
  height: 15px;
  border: 2px solid #fff;
  border-radius: 50% 50% 45% 45%;
  background: var(--pink);
  transform: translateY(-50%);
  transition: left 180ms ease;
}

.breed-count {
  display: grid;
  min-height: 48px;
  place-content: center;
  padding: 0 3px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: inherit;
  text-align: center;
}

.breed-count:active,
.breed-count:focus-visible {
  border-color: #6b5362;
  background: #2a2029;
}

.breed-count strong {
  margin-top: 2px;
  font-size: 13px;
}

.stake-button {
  min-height: 48px;
  padding: 0 4px;
  border-radius: 7px;
  background: #2b2b33;
  color: #c9c9d1;
  font-size: 10px;
  font-weight: 900;
}

.stake-button.is-active {
  background: var(--green);
  color: #10281d;
}

.upgrade-button {
  width: 100%;
  min-height: 42px;
  margin-top: 8px;
  border-radius: 7px;
  background: var(--pink);
  color: #fff;
  font-weight: 900;
}

.home-tip {
  display: none;
  margin: 8px 0 0;
  color: #777782;
  font-size: 9px;
  text-align: center;
}

.screen-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 8px var(--game-gutter);
}

.screen-head small,
.screen-head h1 {
  display: block;
  margin: 0;
}

.screen-head small {
  color: var(--yellow);
  font-size: 9px;
  font-weight: 900;
}

.screen-head h1 {
  margin-top: 2px;
  font-size: 17px;
}

.screen-head > span {
  max-width: 145px;
  color: #91919b;
  font-size: 10px;
  text-align: right;
}

.segmented {
  display: grid;
  padding: 2px;
  border: 1px solid #303038;
  border-radius: 8px;
  background: #17171c;
}

.segmented button {
  min-height: 32px;
  border-radius: 5px;
  background: transparent;
  color: #8d8d97;
  font-size: 11px;
  font-weight: 800;
}

.segmented button.is-active {
  background: #33333b;
  color: #fff;
}

.egg-type-tabs {
  grid-template-columns: 1fr 1fr;
  margin: 0 var(--game-gutter) 8px;
}

.egg-type-tabs b {
  margin-left: 3px;
  color: var(--yellow);
}

.love-egg-status {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  align-items: center;
  gap: 8px;
  margin: 0 12px 9px;
  padding: 8px;
  border: 1px solid #573342;
  border-radius: 8px;
  background: #271821;
}

.love-egg-status div {
  display: grid;
}

.love-egg-status span {
  color: #ae909b;
  font-size: 9px;
}

.love-egg-status strong {
  margin-top: 2px;
  font-size: 11px;
}

.love-egg-status button {
  min-height: 34px;
  padding-inline: 12px;
  border-radius: 6px;
  background: var(--pink);
  font-size: 10px;
  font-weight: 900;
}

.egg-field-shell {
  margin: 0 8px;
  padding: 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.egg-field-shell > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 30px;
  margin: 0 4px 6px;
}

.field-mode {
  display: flex;
  gap: 4px;
}

.field-mode button {
  min-width: 38px;
  min-height: 25px;
  border-radius: 5px;
  background: #27272e;
  color: #8e8e98;
  font-size: 10px;
  font-weight: 900;
}

.field-mode button.is-active {
  background: var(--yellow);
  color: #17150b;
}

.egg-field-shell > header > span {
  color: #8f8f99;
  font-size: 9px;
}

.egg-field-shell > header > span.has-items {
  color: var(--yellow);
  font-weight: 900;
}

.egg-board {
  display: grid;
  gap: 8px;
  aspect-ratio: 1;
  touch-action: none;
  user-select: none;
}

.egg-board.size-5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.egg-board.size-7 {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.egg-cell {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 0;
  place-items: center;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
}

.egg-cell.is-dragging {
  z-index: 2;
  opacity: 0.5;
  transform: scale(1.06);
}

.egg-cell.is-drop-target {
  border-color: var(--yellow);
  background: #39331c;
  box-shadow: inset 0 0 0 1px var(--yellow);
}

.egg-cell.is-move-target {
  border-color: var(--cyan);
  background: #193136;
  box-shadow: inset 0 0 0 1px var(--cyan);
}

.egg-cell.is-invalid-target,
.egg-cell.invalid-drop {
  border-color: var(--red);
  background: #3a2021;
}

.egg-cell.just-moved .egg {
  animation: egg-settle 420ms ease-out;
}

.egg-cell.just-merged .egg {
  animation: egg-merge 520ms cubic-bezier(0.2, 0.9, 0.25, 1.2);
}

.egg-cell.invalid-drop {
  animation: invalid-shake 340ms ease-out;
}

.egg-cell.is-locked {
  border-color: #27222f;
  border-style: dashed;
  color: #52525b;
  font-size: 11px;
}

.egg {
  position: relative;
  display: grid;
  width: 76%;
  aspect-ratio: 0.78;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.46);
  border-radius: 52% 52% 46% 46%;
  background: var(--egg-color, #fff);
  color: #16161b;
  font-size: 11px;
  font-weight: 950;
  box-shadow: inset -5px -7px 0 rgba(0, 0, 0, 0.1), 0 3px 8px rgba(0, 0, 0, 0.25);
}

.egg-board.size-7 .egg {
  width: 76%;
  border-width: 1px;
  font-size: 7px;
}

.egg.love-egg::after {
  content: "♥";
  position: absolute;
  bottom: 12%;
  color: #a91449;
  font-size: 7px;
}

.egg-level-1 { --egg-color: #f4f2eb; }
.egg-level-2 { --egg-color: #c4f1df; }
.egg-level-3 { --egg-color: #77dfbe; }
.egg-level-4 { --egg-color: #75d8ef; }
.egg-level-5 { --egg-color: #7e9cf4; }
.egg-level-6 { --egg-color: #aa83ed; }
.egg-level-7 { --egg-color: #dc78d0; }
.egg-level-8 { --egg-color: #f47791; }
.egg-level-9 { --egg-color: #f36d5b; }
.egg-level-10 { --egg-color: #f7a443; }
.egg-level-11 { --egg-color: #f1d947; }
.egg-level-12 { --egg-color: #ffe999; }

.egg-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  padding: 10px var(--game-gutter) 16px;
}

.egg-footer button {
  display: grid;
  grid-template-columns: 32px 1fr;
  grid-template-rows: 1fr 1fr;
  min-height: 58px;
  padding: 6px 8px;
  border: 1px solid #303038;
  border-radius: 6px;
  background: #191520;
  text-align: left;
}

.egg-footer i {
  grid-row: 1 / 3;
  display: grid;
  align-self: center;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: #34343c;
  color: var(--yellow);
  font-style: normal;
  font-weight: 900;
}

.egg-footer span {
  align-self: end;
  font-size: 10px;
  font-weight: 900;
}

.egg-footer small {
  color: #858590;
  font-size: 9px;
}

.market-tabs,
.task-category-tabs {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  padding: 0 var(--game-gutter) 8px;
  scrollbar-width: none;
}

.market-tabs::-webkit-scrollbar,
.task-category-tabs::-webkit-scrollbar {
  display: none;
}

.market-tabs button,
.task-category-tabs button {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid #303038;
  border-radius: 5px;
  background: #19191f;
  color: #85858f;
  font-size: 9px;
  font-weight: 900;
}

.market-tabs button.is-active,
.task-category-tabs button.is-active {
  border-color: var(--yellow);
  background: var(--yellow);
  color: #17150b;
}

.refresh-button {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid #32323a;
  border-radius: 50%;
  background: #1d1d23;
  font-size: 21px;
}

.market-cycle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 var(--game-gutter) 7px;
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid #303038;
  border-radius: 6px;
  background: #19191f;
  font-size: 9px;
}

.market-cycle span {
  color: var(--yellow);
  font-weight: 900;
}

.market-cycle strong {
  margin-left: auto;
}

.market-cycle small {
  color: #7f7f89;
  font-size: 9px;
}

.market-listing {
  position: relative;
  margin: 0 var(--game-gutter);
  padding: 4px 8px 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
  text-align: center;
}

.market-portrait {
  width: min(58vw, 250px);
  height: min(43vh, 390px);
  min-height: 310px;
  margin: 0 auto;
  overflow: hidden;
  border: 2px solid #332d3d;
  border-radius: 6px;
  background: #211d27;
  box-shadow: 6px 6px 0 #17121d;
}

.market-portrait img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.listing-level,
.listing-token {
  position: absolute;
  top: 12px;
  display: grid;
  min-width: 54px;
  padding: 6px 8px;
  border-radius: 6px;
  background: rgba(10, 10, 13, 0.84);
}

.listing-level {
  left: calc(50% - min(29vw, 125px) + 8px);
}

.listing-token {
  right: calc(50% - min(29vw, 125px) + 8px);
}

.listing-level span,
.listing-token span {
  color: #9e9ea8;
  font-size: 7px;
}

.listing-level strong,
.listing-token strong {
  font-size: 13px;
}

.market-listing h2 {
  margin: 11px 0 2px;
  font-size: 16px;
}

.market-listing p,
.market-note {
  margin: 0;
  color: #898993;
  font-size: 9px;
}

.bid-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  padding: 8px var(--game-gutter);
}

.bid-actions button {
  display: grid;
  grid-template-columns: 25px 1fr;
  grid-template-rows: 1fr 1fr;
  min-height: 56px;
  align-items: center;
  padding: 6px 8px;
  border-radius: 5px;
  background: var(--yellow);
  color: #19170c;
  text-align: left;
}

.bid-actions button:last-child {
  background: #f0a94b;
}

.bid-actions i {
  grid-row: 1 / 3;
}

.bid-actions span {
  align-self: end;
  font-size: 9px;
}

.bid-actions strong {
  align-self: start;
  font-size: 11px;
}

.sell-button {
  width: calc(100% - 24px);
  min-height: 48px;
  margin: 9px 12px;
  border-radius: 8px;
  background: var(--yellow);
  color: #18160b;
  font-weight: 900;
}

.market-note {
  padding: 0 16px 18px;
  text-align: center;
}

.pairing-card,
.breeding-stats-card,
.breeding-invite,
.active-breeding,
.heart-track,
.custom-social {
  margin: 0 var(--game-gutter) 9px;
  padding: 11px;
  border: 1px solid #303038;
  border-radius: 6px;
  background: #191520;
}

.pairing-card {
  position: relative;
  min-height: 292px;
  overflow: hidden;
  border-color: #28232e;
  background: #17131d;
}

.pairing-card::before {
  display: none;
}

.pairing-card::after {
  display: none;
}

.pairing-intro {
  position: absolute;
  z-index: 3;
  top: 20px;
  left: 14px;
  width: 176px;
}

.pairing-intro > small {
  color: #f4f0f5;
  font-family: Impact, "Arial Narrow", sans-serif;
  font-size: 20px;
  letter-spacing: 0;
}

.pairing-intro h2 {
  margin: 9px 0 4px;
  color: #f1edf2;
  font-size: 13px;
}

.pairing-intro p {
  margin: 0;
  color: #928d99;
  font-size: 10px;
  line-height: 1.55;
}

.pairing-intro div {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
}

.pairing-intro span,
.pairing-intro b {
  padding: 5px 7px;
  border-radius: 4px;
  background: #24202b;
  font-size: 9px;
}

.pairing-intro b {
  color: #aaa5af;
}

.pairing-portraits {
  position: static;
  display: block;
}

.pairing-portraits > i {
  display: none;
}

.pairing-portraits article {
  position: relative;
  display: grid;
  height: 268px;
  overflow: hidden;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.pairing-portraits > article:first-child {
  position: absolute;
  top: 6px;
  right: -5px;
  width: 216px;
}

.pairing-portraits img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.pairing-portraits article > span:last-child {
  position: absolute;
  left: 34px;
  right: 28px;
  bottom: 8px;
  padding: 5px;
  border-radius: 4px;
  background: rgba(9, 9, 11, 0.8);
  font-size: 9px;
  text-align: center;
}

.partner-slot > span {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 2px dashed #565660;
  border-radius: 50%;
  color: #7e7e88;
  font-size: 24px;
}

.partner-slot {
  display: none !important;
}

.partner-slot.has-partner {
  position: absolute;
  z-index: 2;
  top: 6px;
  right: -5px;
  display: grid !important;
  width: 216px;
}

.partner-slot small {
  color: #777781;
  font-size: 9px;
}

.partner-slot.has-partner img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.partner-slot.has-partner > span {
  display: block;
  width: auto;
  height: auto;
  border: 0;
  border-radius: 4px;
  color: #f0edf2;
  font-size: 8px;
}

.pairing-card > .main-button {
  position: absolute;
  left: 14px;
  bottom: 14px;
  width: auto;
  display: grid;
  min-width: 174px;
  min-height: 40px;
  max-width: 184px;
  padding: 0 10px;
  border-radius: 5px;
  font-size: 10px;
}

.pairing-card > .main-button span {
  font-size: 9px;
}

.pairing-card > .main-button strong {
  font-size: 12px;
}

.breeding-stats-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  padding: 0;
  overflow: hidden;
}

.breeding-stats-card div {
  display: grid;
  min-height: 60px;
  align-content: center;
  gap: 5px;
  padding: 10px 13px;
  background: #1c1822;
}

.breeding-stats-card span {
  color: #74717c;
  font-size: 9px;
  font-weight: 800;
}

.breeding-stats-card strong {
  color: #ece9ef;
  font-size: 13px;
}

.breeding-invite {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 9px;
  border-color: #76542b;
  background: #251c16;
}

.breeding-invite img {
  width: 52px;
  height: 62px;
  object-fit: contain;
}

.breeding-invite div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.breeding-invite small {
  color: var(--yellow);
  font-size: 8px;
  font-weight: 900;
}

.breeding-invite strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.breeding-invite span {
  color: #aaa3ad;
  font-size: 9px;
}

.breeding-invite > button {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #352b28;
  color: #aaa3ad;
}

.share-button {
  width: 100%;
  min-height: 40px;
  margin-top: 7px;
  border: 1px solid #3c3c45;
  border-radius: 5px;
  background: #24242b;
  font-size: 11px;
  font-weight: 900;
}

.active-breeding {
  border-color: #5b3445;
  background: #251820;
}

.active-breeding header,
.heart-track header,
.custom-social header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
}

.active-breeding h2,
.heart-track h2 {
  margin: 1px 0 0;
  font-size: 15px;
}

.active-breeding small,
.heart-track small,
.custom-social small {
  color: var(--pink);
  font-size: 9px;
  font-weight: 900;
}

.active-breeding header button {
  padding: 6px 9px;
  border-radius: 5px;
  background: #3b2a32;
  color: #c7aeb8;
  font-size: 9px;
}

.breeding-live-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-top: 1px solid #49303b;
  font-size: 11px;
}

.active-breeding .main-button {
  margin-top: 6px;
}

.matching-actions {
  display: grid;
  gap: 7px;
}

.matching-actions .main-button,
.matching-actions .share-button,
.matching-actions .test-partner-button {
  margin-top: 0;
}

.test-partner-button {
  width: 100%;
  min-height: 40px;
  border: 1px solid #554934;
  border-radius: 5px;
  background: #2b261d;
  color: #e3c780;
  font-size: 10px;
  font-weight: 900;
}

.breeding-room-code {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 8px;
  padding: 8px 9px;
  border: 1px solid #49303b;
  border-radius: 5px;
  background: #1b151a;
}

.breeding-room-code span {
  color: #8e7a83;
  font-size: 9px;
}

.breeding-room-code strong {
  overflow: hidden;
  color: #e8dbe1;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.heart-track header strong {
  color: var(--pink);
}

.heart-track header i {
  font-style: normal;
}

.heart-milestones {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.heart-milestones button {
  display: grid;
  min-height: 65px;
  place-content: center;
  border: 1px solid #36363e;
  border-radius: 5px;
  background: #222228;
  text-align: center;
}

.heart-milestones button.is-claimable {
  border-color: var(--pink);
}

.heart-milestones b {
  color: var(--pink);
  font-size: 11px;
}

.heart-milestones span {
  margin-top: 3px;
  font-size: 9px;
}

.heart-milestones small {
  margin-top: 4px;
  color: #777781;
  font-size: 8px;
}

.custom-social header span {
  color: #74747e;
  font-size: 9px;
}

.custom-social > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.custom-social button {
  display: grid;
  grid-template-columns: 34px 1fr;
  grid-template-rows: 1fr 1fr;
  min-height: 52px;
  align-items: center;
  padding: 6px;
  border-radius: 5px;
  background: #25252c;
  text-align: left;
}

.custom-social b {
  grid-row: 1 / 3;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: var(--cyan);
  color: #10282a;
  font-size: 10px;
}

.custom-social button:last-child b {
  background: var(--pink);
  color: #fff;
}

.custom-social span {
  align-self: end;
  font-size: 9px;
  font-weight: 900;
}

.custom-social button small {
  align-self: start;
  color: #777781;
  font-size: 9px;
}

.task-view-tabs {
  grid-template-columns: 1fr 1fr;
  margin: var(--game-gutter);
}

.task-content {
  padding: 0 12px 18px;
}

.starter-banner {
  padding: 14px;
  border: 1px solid #3b3b43;
  border-radius: 6px;
  background: #191520;
}

.starter-banner header {
  display: flex;
  align-items: end;
  justify-content: space-between;
}

.starter-banner h2,
.starter-banner p {
  margin: 0;
}

.starter-banner h2 {
  font-size: 18px;
}

.starter-banner p {
  color: #8a8a94;
  font-size: 9px;
}

.starter-banner header strong {
  color: var(--yellow);
  font-size: 11px;
}

.starter-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(46px, 1fr));
  gap: 6px;
  overflow-x: auto;
  margin-top: 12px;
  padding-bottom: 3px;
}

.starter-days button {
  display: grid;
  min-height: 90px;
  place-content: center;
  border: 1px solid #34343c;
  border-radius: 7px;
  background: #24242a;
  text-align: center;
}

.starter-days button.is-today {
  border-color: var(--yellow);
}

.starter-days button.is-claimed {
  opacity: 0.5;
}

.starter-days b {
  color: #8d8d97;
  font-size: 9px;
}

.starter-days strong {
  margin-top: 8px;
  color: var(--yellow);
  font-size: 14px;
}

.starter-days span {
  margin-top: 3px;
  font-size: 9px;
}

.starter-help {
  margin-top: 10px !important;
  text-align: center;
}

.task-list {
  display: grid;
  gap: 7px;
}

.task-row,
.achievement-row,
.rank-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 58px;
  padding: 8px;
  border: 1px solid #303038;
  border-radius: 6px;
  background: #191520;
}

.task-row > i,
.achievement-row > i,
.rank-row > i {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  background: #303038;
  color: var(--yellow);
  font-style: normal;
  font-size: 10px;
  font-weight: 900;
}

.task-row div,
.achievement-row div,
.rank-row div {
  display: grid;
  min-width: 0;
}

.task-row strong,
.achievement-row strong,
.rank-row strong {
  font-size: 11px;
}

.task-row small,
.achievement-row small,
.rank-row small {
  margin-top: 2px;
  color: #81818b;
  font-size: 9px;
}

.task-row button {
  min-height: 31px;
  padding: 0 9px;
  border-radius: 6px;
  background: var(--yellow);
  color: #17150b;
  font-size: 9px;
  font-weight: 900;
}

.task-row button.is-done {
  background: #2a2a31;
  color: #6f6f78;
}

.rank-row.is-player {
  border-color: var(--yellow);
}

.bottom-nav {
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  min-height: calc(var(--game-nav-height) + env(safe-area-inset-bottom));
  padding: 7px 5px calc(5px + env(safe-area-inset-bottom));
  border-top: 1px solid #2e2837;
  background: #100d17;
}

.bottom-nav button {
  position: relative;
  display: grid;
  min-width: 0;
  place-content: center;
  gap: 5px;
  border-radius: 6px;
  background: transparent;
  color: #74747e;
  transition: color 140ms ease, background 140ms ease, transform 100ms ease;
}

.bottom-nav button.is-active {
  background: #211c18;
  color: var(--yellow);
}

.bottom-nav button:active {
  transform: translateY(1px);
}

.bottom-nav button:focus-visible {
  outline: none;
}

.bottom-nav button:focus-visible i {
  box-shadow: 0 0 0 2px var(--cyan);
}

.bottom-nav i {
  display: grid;
  width: 31px;
  height: 31px;
  margin: 0 auto;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-style: normal;
  font-size: 11px;
  font-weight: 900;
}

.bottom-nav span {
  font-size: 10px;
  font-weight: 800;
}

.bottom-nav b {
  top: 3px;
  right: calc(50% - 22px);
}

.modal-backdrop {
  position: absolute;
  z-index: 80;
  inset: 0;
  display: flex;
  align-items: end;
  background: rgba(0, 0, 0, 0.72);
  animation: backdrop-in 160ms ease-out;
}

.modal-sheet {
  width: 100%;
  max-height: 82%;
  overflow-y: auto;
  padding: 16px 14px calc(18px + env(safe-area-inset-bottom));
  border-top: 1px solid #3a3a43;
  background: #15151a;
  box-shadow: 0 -18px 50px rgba(0, 0, 0, 0.45);
  animation: sheet-in 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.modal-sheet > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-sheet h2,
.modal-sheet small {
  display: block;
  margin: 0;
}

.modal-sheet h2 {
  margin-top: 2px;
  font-size: 20px;
}

.modal-sheet small {
  color: var(--yellow);
  font-size: 9px;
  font-weight: 900;
}

.modal-sheet > header > button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: #2a2a31;
  font-size: 21px;
}

.event-sheet {
  max-height: 94%;
  padding-top: 13px;
  background: #100d17;
}

.event-tabs {
  grid-template-columns: 1fr 1fr;
  margin: 12px 0 10px;
}

.event-view {
  padding-bottom: 8px;
}

.event-feature {
  position: relative;
  min-height: 138px;
  overflow: hidden;
  padding: 14px 124px 14px 14px;
  border: 1px solid #49402a;
  border-radius: 6px;
  background: #1d1920;
}

.event-feature::after {
  content: "★";
  position: absolute;
  right: 21px;
  top: 8px;
  color: var(--yellow);
  font-family: Georgia, serif;
  font-size: 76px;
  line-height: 1;
  opacity: 0.92;
  transform: rotate(9deg);
}

.event-feature small,
.event-feature h3,
.event-feature p {
  display: block;
  margin: 0;
}

.event-feature small {
  color: var(--yellow);
  font-size: 8px;
  font-weight: 900;
}

.event-feature h3 {
  margin-top: 3px;
  font-size: 19px;
}

.event-feature p {
  margin-top: 5px;
  color: #9b96a2;
  font-size: 9px;
  line-height: 1.45;
}

.event-feature button {
  min-height: 34px;
  margin-top: 10px;
  padding: 0 13px;
  border-radius: 5px;
  background: var(--yellow);
  color: #18140a;
  font-size: 9px;
  font-weight: 900;
}

.event-timer {
  position: absolute;
  z-index: 2;
  top: 84px;
  right: 12px;
  display: grid;
  width: 100px;
  text-align: center;
}

.event-timer span {
  color: #8b8592;
  font-size: 8px;
}

.event-timer strong {
  margin-top: 2px;
  font-size: 10px;
}

.event-list {
  display: grid;
  gap: 7px;
  margin-top: 8px;
}

.activity-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 78px;
  padding: 9px;
  border: 1px solid #302a39;
  border-radius: 6px;
  background: #191520;
}

.activity-card > i {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 50%;
  background: var(--event-color, var(--yellow));
  color: #17131b;
  font-style: normal;
  font-size: 15px;
  font-weight: 950;
}

.activity-card > div {
  display: grid;
  min-width: 0;
}

.activity-card strong,
.activity-card span,
.activity-card small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-card strong {
  font-size: 11px;
}

.activity-card span {
  margin-top: 2px;
  color: #8f8997;
  font-size: 9px;
}

.activity-card small {
  margin-top: 5px;
  color: var(--event-color, var(--yellow));
  font-size: 8px;
  font-weight: 850;
}

.activity-card button {
  min-width: 64px;
  min-height: 32px;
  padding: 0 8px;
  border-radius: 5px;
  background: var(--event-color, var(--yellow));
  color: #17131b;
  font-size: 9px;
  font-weight: 900;
}

.activity-card button:disabled {
  background: #2a2630;
  color: #77717e;
  opacity: 1;
}

.activity-progress {
  position: relative;
  height: 5px;
  margin-top: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #302b35;
}

.activity-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--event-color, var(--yellow));
}

.league-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 9px;
  border: 1px solid #352f3e;
  border-radius: 6px;
  background: #191520;
}

.league-summary > div {
  display: grid;
  min-width: 0;
  padding: 6px;
  border-left: 1px solid #322c3b;
}

.league-summary > div:first-child {
  border-left: 0;
}

.league-summary small,
.league-summary span {
  overflow: hidden;
  color: #87818d;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.league-summary strong {
  margin: 3px 0;
  color: var(--yellow);
  font-size: 13px;
}

.tournament-tactics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 8px;
}

.tournament-tactics button {
  display: grid;
  min-height: 48px;
  padding: 6px;
  border: 1px solid #322c3a;
  border-radius: 5px;
  background: #191520;
  color: #8a8490;
  text-align: left;
}

.tournament-tactics button.is-active {
  border-color: var(--yellow);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(245, 213, 71, 0.18);
}

.tournament-tactics b {
  font-size: 9px;
}

.tournament-tactics i {
  color: var(--yellow);
  font-style: normal;
}

.tournament-tactics span {
  margin-top: 3px;
  color: #77717e;
  font-size: 7px;
}

.tournament-arena {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px minmax(0, 1fr);
  align-items: center;
  gap: 4px;
  min-height: 206px;
  margin-top: 8px;
  padding: 8px;
  border-block: 1px solid #332d3b;
  background: #151119;
}

.arena-player {
  position: relative;
  display: grid;
  height: 184px;
  overflow: hidden;
  border: 1px solid #3a3343;
  border-radius: 5px;
  background: #211c27;
}

.arena-player img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.arena-player > div {
  position: absolute;
  left: 5px;
  right: 5px;
  bottom: 5px;
  display: grid;
  padding: 6px;
  border-radius: 4px;
  background: rgba(9, 7, 12, 0.86);
}

.arena-player small {
  color: var(--yellow);
  font-size: 7px;
  font-weight: 900;
}

.arena-player strong {
  overflow: hidden;
  margin-top: 1px;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.arena-player span {
  margin-top: 2px;
  color: #918b98;
  font-size: 8px;
}

.arena-opponent.is-empty img {
  visibility: hidden;
}

.arena-opponent.is-empty::before {
  content: "?";
  position: absolute;
  inset: 0 0 44px;
  display: grid;
  place-items: center;
  color: #554d5e;
  font-size: 44px;
  font-weight: 900;
}

.versus-mark {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  text-align: center;
}

.versus-mark b {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 2px solid var(--pink);
  border-radius: 50%;
  background: #1a151e;
  color: #fff;
  font-size: 12px;
}

.versus-mark span {
  position: absolute;
  top: 47px;
  width: 72px;
  color: #8e8794;
  font-size: 7px;
}

.tournament-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: 8px;
}

.tournament-actions button {
  min-height: 42px;
  border-radius: 5px;
  background: #2a2530;
  font-size: 10px;
  font-weight: 900;
}

.tournament-actions .main-button {
  background: var(--yellow);
  color: #17130a;
}

.match-report,
.tournament-rewards,
.event-leaderboard {
  margin-top: 8px;
  padding: 10px;
  border: 1px solid #332d3b;
  border-radius: 6px;
  background: #191520;
}

.match-report {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
}

.match-report strong {
  color: var(--yellow);
  font-size: 12px;
}

.match-report span,
.match-report small {
  color: #8e8794;
  font-size: 8px;
}

.match-report b {
  color: var(--green);
  font-size: 17px;
}

.match-report.is-loss b {
  color: var(--pink);
}

.tournament-arena.match-win {
  animation: arena-win 700ms ease-out;
}

.tournament-arena.match-loss {
  animation: arena-loss 700ms ease-out;
}

.tournament-rewards header,
.event-leaderboard header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.tournament-rewards header strong,
.event-leaderboard header strong {
  font-size: 11px;
}

.tournament-rewards header span,
.event-leaderboard header span {
  color: #85808c;
  font-size: 8px;
}

.tournament-rewards > div {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.tournament-rewards button {
  display: grid;
  min-height: 56px;
  place-content: center;
  border: 1px solid #38313f;
  border-radius: 5px;
  background: #211c27;
  text-align: center;
}

.tournament-rewards button.is-ready {
  border-color: var(--yellow);
}

.tournament-rewards b {
  color: var(--yellow);
  font-size: 10px;
}

.tournament-rewards span {
  margin-top: 3px;
  font-size: 8px;
}

.leader-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  border-top: 1px solid #2b2632;
  font-size: 9px;
}

.leader-row:first-child {
  border-top: 0;
}

.leader-row i {
  color: var(--yellow);
  font-style: normal;
  font-weight: 900;
}

.leader-row span {
  color: #aaa4af;
}

.leader-row.is-player {
  color: var(--yellow);
}

.event-task-preview {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 12px;
  border: 1px solid #3a3342;
  border-radius: 6px;
  background: #191520;
}

.event-task-preview > i {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 50%;
  background: var(--yellow);
  color: #17130a;
  font-style: normal;
  font-size: 17px;
}

.event-task-preview div {
  display: grid;
}

.event-task-preview strong {
  font-size: 11px;
}

.event-task-preview small {
  margin-top: 3px;
  color: #89838f;
  font-size: 8px;
}

.event-task-preview button {
  min-height: 34px;
  padding: 0 11px;
  border-radius: 5px;
  background: var(--yellow);
  color: #17130a;
  font-size: 9px;
  font-weight: 900;
}

.modal-intro {
  color: #8b8b95;
  font-size: 10px;
}

.turbo-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border: 1px solid #303038;
  border-radius: 8px;
  background: #1d1d23;
}

.turbo-control > span {
  font-size: 11px;
  font-weight: 900;
}

.turbo-control > div {
  display: flex;
  gap: 4px;
}

.turbo-control button {
  min-width: 35px;
  min-height: 29px;
  border-radius: 5px;
  background: #303038;
  color: #898993;
  font-size: 9px;
  font-weight: 900;
}

.turbo-control button.is-active {
  background: var(--yellow);
  color: #17150b;
}

.daily-pass-button {
  width: 100%;
  min-height: 39px;
  margin-top: 8px;
  border-radius: 7px;
  background: #2b2b32;
  font-size: 10px;
  font-weight: 900;
}

.pass-list {
  display: grid;
  gap: 7px;
  margin-top: 8px;
}

.pass-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  min-height: 63px;
  padding: 10px;
  border: 1px solid #34343c;
  border-radius: 8px;
  background: #202026;
  text-align: left;
}

.pass-card div {
  display: grid;
}

.pass-card strong {
  font-size: 12px;
}

.pass-card span {
  margin-top: 3px;
  color: #888892;
  font-size: 9px;
}

.pass-card b {
  color: var(--yellow);
  font-size: 12px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin: 13px 0;
}

.detail-grid div {
  display: grid;
  padding: 10px;
  border-radius: 7px;
  background: #24242a;
}

.detail-grid span {
  color: #85858f;
  font-size: 9px;
}

.detail-grid strong {
  margin-top: 3px;
  font-size: 12px;
}

.merge-preview {
  margin: 13px 0;
  padding: 13px;
  border: 1px solid #34343c;
  border-radius: 8px;
  background: #202026;
  font-size: 11px;
  line-height: 1.7;
}

.fortune-wheel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: 10px;
}

.fortune-wheel span {
  grid-column: 1 / -1;
  color: #8b8b95;
  font-size: 9px;
  text-align: center;
}

.fortune-wheel button {
  min-height: 38px;
  border-radius: 7px;
  background: #2a2a31;
  font-size: 9px;
  font-weight: 900;
}

.toast {
  position: absolute;
  z-index: 120;
  left: 50%;
  bottom: calc(78px + env(safe-area-inset-bottom));
  width: max-content;
  max-width: calc(100% - 34px);
  padding: 9px 12px;
  border: 1px solid #41414a;
  border-radius: 7px;
  background: rgba(27, 27, 32, 0.97);
  color: #f1f1f4;
  font-size: 10px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@keyframes notice-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.35); }
}

@keyframes arena-win {
  0%, 100% { box-shadow: none; }
  40% { box-shadow: inset 0 0 0 2px var(--green), 0 0 24px rgba(103, 213, 158, 0.28); }
}

@keyframes arena-loss {
  0%, 100% { box-shadow: none; }
  40% { box-shadow: inset 0 0 0 2px var(--pink), 0 0 20px rgba(239, 109, 137, 0.24); }
}

@keyframes card-snap-back {
  0% { transform: translateX(var(--swipe-x, 0)) rotate(-1deg); }
  100% { transform: translateX(0) rotate(-1deg); }
}

@keyframes card-out-left {
  to { opacity: 0; transform: translateX(-44px) rotate(-3deg); }
}

@keyframes card-out-right {
  to { opacity: 0; transform: translateX(44px) rotate(1deg); }
}

@keyframes card-in-left {
  from { opacity: 0; transform: translateX(-42px) rotate(-3deg); }
  to { opacity: 1; transform: translateX(0) rotate(-1deg); }
}

@keyframes card-in-right {
  from { opacity: 0; transform: translateX(42px) rotate(1deg); }
  to { opacity: 1; transform: translateX(0) rotate(-1deg); }
}

@keyframes feed-bounce {
  0%, 100% { transform: scale(1); }
  42% { transform: scale(1.025); }
}

@keyframes level-up {
  0%, 100% { box-shadow: 7px 7px 0 #18181c; }
  35% { box-shadow: 0 0 0 3px var(--yellow), 0 0 26px rgba(245, 213, 71, 0.72); }
}

@keyframes feed-float {
  0% { opacity: 0; transform: translateY(18px) scale(0.88); }
  22% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-58px) scale(1); }
}

@keyframes value-pop {
  0%, 100% { transform: scale(1); }
  45% { color: var(--yellow); transform: scale(1.13); }
}

@keyframes egg-settle {
  0% { opacity: 0.25; transform: translateY(-12px) scale(0.8); }
  65% { transform: translateY(2px) scale(1.06); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes egg-merge {
  0% { opacity: 0.2; transform: scale(0.5); }
  60% { transform: scale(1.18); filter: brightness(1.4); }
  100% { opacity: 1; transform: scale(1); filter: none; }
}

@keyframes invalid-shake {
  0%, 100% { transform: translateX(0); }
  30% { transform: translateX(-4px); }
  65% { transform: translateX(4px); }
}

@keyframes backdrop-in {
  from { background: rgba(0, 0, 0, 0); }
}

@keyframes sheet-in {
  from { transform: translateY(24px); opacity: 0; }
}

.rarity-uncommon { border-color: #68d59f !important; }
.rarity-rare { border-color: #65bedb !important; }
.rarity-epic { border-color: #c87adb !important; }
.rarity-legendary { border-color: #f0b94e !important; }

@media (max-height: 760px) {
  .hero-zone {
    height: 45vh;
    min-height: 270px;
  }

  .home-hud {
    min-height: 44px;
  }

  .progress-dock {
    min-height: 56px;
  }

  .market-portrait {
    min-height: 230px;
  }
}

@media (max-width: 350px) {
  .topbar,
  .resource-strip,
  .home-panel,
  .screen-head,
  .task-content {
    padding-inline: 9px;
  }

  .hero-card {
    width: min(46vw, 161px);
    min-height: 260px;
  }

  .progress-dock {
    grid-template-columns: 40px minmax(0, 1fr) 40px 45px;
    gap: 4px;
    margin-inline: 4px;
    padding: 5px;
  }

  .level-medal {
    width: 39px;
    height: 39px;
  }

  .egg-type-tabs,
  .egg-field-shell,
  .market-cycle,
  .pairing-card,
  .active-breeding,
  .heart-track,
  .custom-social,
  .market-listing,
  .task-view-tabs {
    margin-inline: 9px;
  }

  .egg-footer,
  .bid-actions,
  .market-tabs,
  .task-category-tabs {
    padding-inline: 9px;
  }

  .pairing-portraits article {
    height: 145px;
  }
}

@media (min-width: 431px) {
  .phone-frame {
    box-shadow: 0 0 70px rgba(0, 0, 0, 0.85);
  }
}

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