:root {
  color-scheme: dark;
  --w: 812;
  --h: 375;
  --blue: #0f61a5;
  --blue-dark: #07172d;
  --panel: rgba(0, 0, 0, 0.7);
  --panel-soft: rgba(255, 255, 255, 0.12);
  --line: rgba(255, 255, 255, 0.28);
  --text: #fff;
  --muted: rgba(255, 255, 255, 0.78);
}

* {
  box-sizing: border-box;
}

html,
body,
#app {
  min-height: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: #050711;
  color: var(--text);
  font-family: Montserrat, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 0;
  color: inherit;
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

#app {
  width: min(100vw, calc(100vh * 812 / 375));
  aspect-ratio: 812 / 375;
  min-height: auto;
  max-height: 100vh;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(3, 7, 15, 0.38), rgba(3, 7, 15, 0.58)),
    url("assets/intro.jpg") center / cover no-repeat,
    #050711;
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.65);
  position: relative;
}

.toast-popup {
  position: absolute;
  left: 50%;
  top: 18px;
  z-index: 30;
  min-width: 190px;
  max-width: min(420px, calc(100% - 32px));
  transform: translateX(-50%);
  padding: 11px 16px;
  border-radius: 8px;
  background: rgba(7, 16, 31, 0.92);
  color: #fff;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4), inset 0 0 0 1px rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  pointer-events: none;
  animation: toast-in 160ms ease-out both;
}

.toast-popup.success {
  background: rgba(16, 92, 58, 0.94);
}

.toast-popup.error {
  background: rgba(118, 28, 34, 0.94);
}

.toast-popup.warning {
  background: rgba(141, 96, 16, 0.94);
}

.orientation-guard {
  display: none;
}

.orientation-card {
  width: min(320px, calc(100vw - 40px));
  min-height: 210px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 12px;
  padding: 28px 24px;
  border-radius: 8px;
  background: rgba(2, 7, 15, 0.92);
  box-shadow: inset 0 0 0 1px rgba(239, 184, 16, 0.42), 0 18px 46px rgba(0, 0, 0, 0.48);
  text-align: center;
  backdrop-filter: blur(10px);
}

.orientation-card strong {
  color: #efb810;
  font-size: 22px;
}

.orientation-card p {
  max-width: 240px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.rotate-device-icon {
  position: relative;
  width: 72px;
  height: 48px;
  display: block;
  border: 3px solid #efb810;
  border-radius: 10px;
  box-shadow: 0 0 18px rgba(239, 184, 16, 0.28);
  animation: rotate-device-nudge 1.5s ease-in-out infinite;
}

.rotate-device-icon::before,
.rotate-device-icon::after {
  content: "";
  position: absolute;
}

.rotate-device-icon::before {
  width: 6px;
  height: 6px;
  right: 7px;
  top: 50%;
  transform: translateY(-50%);
  border-radius: 50%;
  background: #efb810;
}

.rotate-device-icon::after {
  left: 50%;
  bottom: -22px;
  width: 34px;
  height: 18px;
  transform: translateX(-50%);
  border-bottom: 2px solid rgba(239, 184, 16, 0.84);
  border-radius: 50%;
}

@keyframes rotate-device-nudge {
  0%,
  100% {
    transform: rotate(0deg);
  }

  50% {
    transform: rotate(-9deg);
  }
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translate(-50%, -8px);
  }

  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.td-shell,
.login-screen {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.td-shell::before,
.login-screen::before {
  content: "";
  position: absolute;
  inset: -20% -12%;
  z-index: 0;
  background:
    radial-gradient(circle at 50% 78%, rgba(255, 176, 57, 0.12), transparent 24%),
    linear-gradient(120deg, rgba(255, 255, 255, 0.04), transparent 33%),
    repeating-linear-gradient(100deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 22px);
  transform: rotate(-6deg);
  pointer-events: none;
}

.td-topbar {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 6;
  height: 56px;
  display: grid;
  grid-template-columns: 44px minmax(150px, auto) auto auto 1fr;
  gap: 12px;
  align-items: center;
  padding: 0 14px;
  background:
    linear-gradient(90deg, rgba(5, 10, 24, 0.42), rgba(5, 10, 24, 0.18), rgba(5, 10, 24, 0.42)),
    url("assets/header.jpg") center / 100% 100% no-repeat,
    var(--blue-dark);
  box-shadow: 0 6px 6px rgba(0, 0, 0, 0.35);
}

.compact-topbar {
  grid-template-columns: 34px 1fr auto;
  justify-content: start;
  gap: 10px;
  padding: 0 34px;
}

.compact-back {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: transparent;
  color: #efb810;
}

.compact-back::before {
  content: "";
  width: 8px;
  height: 8px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

.compact-topbar h1 {
  margin: 0;
  color: #fff;
  font-size: 22px;
  line-height: 1;
}

.premium-pass-cta {
  justify-self: end;
  min-width: 236px;
  height: 34px;
  border-radius: 8px;
  padding: 0 16px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.12)),
    linear-gradient(135deg, #c07a00, #5b2aff);
  box-shadow: inset 0 0 0 1px rgba(239, 184, 16, 0.48), 0 8px 18px rgba(0, 0, 0, 0.24);
}

.icon-btn,
.top-tabs button {
  background: transparent;
}

.icon-btn {
  width: 24px;
  height: 24px;
  position: relative;
}

.hamburger {
  display: block;
  color: #fff;
  background: currentColor;
  -webkit-mask: url("https://api.iconify.design/mdi/menu.svg") center / contain no-repeat;
  mask: url("https://api.iconify.design/mdi/menu.svg") center / contain no-repeat;
}

.hamburger span {
  display: none;
}

.user-chip {
  min-width: 150px;
  height: 40px;
  display: flex;
  grid-template-columns: 24px 1fr;
  align-items: center;
  gap: 9px;
  padding: 0 8px;
  border-radius: 24px;
  background: transparent;
}

.user-chip strong {
  font-size: 14px;
  white-space: nowrap;
}

.user-icon,
.large-user,
.tool-icon {
  display: block;
  border: 2px solid #fff;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 34%, #fff 0 18%, transparent 19%),
    radial-gradient(circle at 50% 77%, #fff 0 32%, transparent 33%);
}

.user-icon {
  width: 24px;
  height: 24px;
}

.currency {
  min-width: 82px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 9px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
}

.currency b {
  font-size: 13px;
  font-weight: 500;
}

.coin-icon,
.diamond-icon {
  width: 17px;
  height: 17px;
  display: block;
}

.coin-icon {
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff3a6, #e8a718 70%);
}

.diamond-icon {
  transform: rotate(45deg);
  background: linear-gradient(135deg, #e7fbff, #57d7ff 65%);
}

.top-tabs {
  justify-self: end;
  display: flex;
  gap: 6px;
}

.top-tabs button {
  min-width: 40px;
  width: 40px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 18px;
  color: var(--muted);
  font-size: 13px;
}

.top-tabs button.active {
  color: #fff;
  background: linear-gradient(180deg, #1c76bd, #0f4f8e);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.tab-icon {
  position: relative;
  width: 22px;
  height: 22px;
  display: block;
  color: currentColor;
}

.tab-icon-home::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 8px;
  width: 16px;
  height: 11px;
  border: 2px solid currentColor;
  border-top: 0;
  border-radius: 2px;
}

.tab-icon-home::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 3px;
  width: 12px;
  height: 12px;
  border-left: 2px solid currentColor;
  border-top: 2px solid currentColor;
  transform: rotate(45deg);
}

.tab-icon-deck::before,
.tab-icon-deck::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 17px;
  border: 2px solid currentColor;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.04);
}

.tab-icon-deck::before {
  left: 3px;
  top: 4px;
  transform: rotate(-12deg);
}

.tab-icon-deck::after {
  right: 3px;
  top: 2px;
  transform: rotate(12deg);
}

.tab-icon-shop::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 6px;
  width: 15px;
  height: 9px;
  border: 2px solid currentColor;
  border-top: 0;
  transform: skewX(-12deg);
}

.tab-icon-shop::after {
  content: "";
  position: absolute;
  left: 6px;
  bottom: 3px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 9px 0 0 currentColor;
}

.tab-icon-market::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 5px;
  width: 18px;
  height: 5px;
  border-radius: 5px 5px 2px 2px;
  background:
    linear-gradient(90deg, currentColor 0 22%, transparent 23% 28%, currentColor 29% 50%, transparent 51% 56%, currentColor 57% 78%, transparent 79% 84%, currentColor 85%);
}

.tab-icon-market::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 11px;
  width: 14px;
  height: 8px;
  border: 2px solid currentColor;
  border-top: 0;
  border-radius: 1px 1px 3px 3px;
}

.tab-icon,
.menu-icon,
.inbox-card-icon {
  background: currentColor;
  border: 0;
  border-radius: 0;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}

.tab-icon::before,
.tab-icon::after,
.menu-icon::before,
.menu-icon::after,
.inbox-card-icon::before,
.inbox-card-icon::after {
  content: none;
}

.tab-icon-home {
  --icon: url("https://api.iconify.design/mdi/home.svg");
}

.tab-icon-deck {
  --icon: url("https://api.iconify.design/mdi/cards.svg");
}

.tab-icon-shop {
  --icon: url("https://api.iconify.design/fa6-solid/cart-shopping.svg");
}

.tab-icon-market {
  --icon: url("https://api.iconify.design/mdi/store.svg");
}

.profile-icon {
  --icon: url("https://api.iconify.design/iconamoon/profile.svg");
}

.inbox-icon,
.inbox-card-icon {
  --icon: url("https://api.iconify.design/material-symbols/inbox-rounded.svg");
}

.glossary-icon {
  --icon: url("https://api.iconify.design/solar/book-linear.svg");
}

.settings-icon {
  --icon: url("https://api.iconify.design/fa6-solid/gear.svg");
}

.logout-icon {
  --icon: url("https://api.iconify.design/mdi/logout.svg");
}

.guide-icon {
  --icon: url("https://api.iconify.design/material-symbols/info-rounded.svg");
}

.side-menu {
  position: absolute;
  z-index: 5;
  left: 0;
  top: 56px;
  bottom: 0;
  width: 282px;
  padding: 28px 20px 22px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 16px;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(12px);
}

.side-menu-main {
  display: grid;
  gap: 10px;
}

.side-menu button {
  width: 100%;
  height: 40px;
  display: grid;
  grid-template-columns: 20px 1fr;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  border-radius: 8px;
  background: rgba(15, 97, 165, 0.72);
  font-size: 14px;
  text-align: left;
}

.side-menu button:hover {
  background: rgba(28, 118, 189, 0.9);
}

.side-menu button.side-menu-secondary {
  width: calc(100% - 22px);
  justify-self: end;
  background: rgba(15, 97, 165, 0.46);
  font-size: 13px;
}

.game-guide-link {
  grid-row: 3;
}

.menu-icon {
  position: relative;
  width: 18px;
  height: 18px;
  display: block;
}

.profile-icon {
  border: 2px solid #fff;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 34%, #fff 0 15%, transparent 16%),
    radial-gradient(circle at 50% 78%, #fff 0 27%, transparent 28%);
}

.inbox-icon,
.inbox-card-icon {
  position: relative;
  display: block;
  border: 2px solid #fff;
  border-radius: 5px;
}

.inbox-card-icon {
  width: 24px;
  height: 24px;
  margin-bottom: 10px;
}

.inbox-icon::before,
.inbox-card-icon::before {
  content: "";
  position: absolute;
  left: 3px;
  right: 3px;
  top: 4px;
  height: 7px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg);
  transform-origin: center;
}

.glossary-icon {
  border: 2px solid #fff;
  border-radius: 4px;
}

.glossary-icon::before,
.glossary-icon::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  height: 2px;
  background: #fff;
}

.glossary-icon::before {
  top: 6px;
}

.glossary-icon::after {
  top: 11px;
}

.settings-icon {
  border: 2px dashed #fff;
  border-radius: 50%;
}

.settings-icon::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 2px solid #fff;
  border-radius: 50%;
}

.settings-icon::after {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: #fff;
}

.logout-icon {
  border: 2px solid #fff;
  border-left: 0;
  border-radius: 0 5px 5px 0;
}

.logout-icon::before {
  content: "";
  position: absolute;
  left: -3px;
  top: 7px;
  width: 11px;
  height: 2px;
  background: #fff;
}

.logout-icon::after {
  content: "";
  position: absolute;
  left: -4px;
  top: 4px;
  width: 6px;
  height: 6px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg);
}

.guide-icon {
  border: 2px solid #fff;
  border-radius: 50%;
}

.guide-icon::before {
  content: "?";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
}

@media (max-width: 900px) and (orientation: landscape) {
  .side-menu button {
    grid-template-columns: 18px 1fr;
  }

  .menu-icon {
    width: 16px;
    height: 16px;
  }
}

.tab-icon,
.menu-icon,
.inbox-card-icon {
  background: currentColor;
  border: 0;
  border-radius: 0;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}

.tab-icon::before,
.tab-icon::after,
.menu-icon::before,
.menu-icon::after,
.inbox-card-icon::before,
.inbox-card-icon::after {
  content: none;
}

.td-screen {
  position: absolute;
  inset: 56px 0 0 0;
}

.login-screen {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 16px;
  padding: 34px 20px 82px;
}

.login-particles {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0.86;
}

.td-logo {
  position: relative;
  z-index: 2;
  width: min(64vw, 500px);
  max-height: 150px;
  object-fit: contain;
  filter: drop-shadow(0 12px 22px rgba(0, 0, 0, 0.55));
}

.login-panel {
  position: relative;
  z-index: 2;
  width: min(470px, calc(100% - 28px));
  margin-top: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  border-radius: 0;
  background: transparent;
}

.login-panel input,
.search-box input {
  height: 46px;
  border: 0;
  border-radius: 6px;
  background: rgba(13, 19, 36, 0.94);
  color: #fff;
  padding: 0 13px;
  box-shadow: inset 0 0 0 1px rgba(46, 128, 196, 0.62), 0 4px 10px rgba(0, 0, 0, 0.25);
  font-size: 16px;
}

.login-panel input::placeholder {
  color: #aeb5c4;
}

.figma-button {
  justify-self: center;
  width: 150px;
  height: 45px;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(0, 0, 0, 0.08)),
    url("assets/button.jpg") center / 100% 100% no-repeat;
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.35);
}

.figma-button:disabled {
  cursor: wait;
  filter: grayscale(0.25) brightness(0.82);
}

.figma-button.secondary {
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.login-panel .figma-button {
  width: 100%;
  margin-top: 2px;
}

.login-error {
  margin: 0;
  color: #ffd2d2;
  font-size: 13px;
  text-align: center;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.65);
}

.login-actions {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding-top: 6px;
}

.login-actions button {
  background: transparent;
  font-size: 15px;
  line-height: 1.1;
}

.register-link {
  color: #ffd31d;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.register-link strong {
  color: inherit;
}

.forgot-link {
  color: #b8bdc8;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-links {
  position: absolute;
  z-index: 2;
  left: 24px;
  bottom: 28px;
  display: flex;
  gap: 12px;
  align-items: center;
}

.legal-links button,
.legal-links a {
  background: transparent;
  color: #fff;
  font-size: 12px;
  text-decoration: none;
}

.legal-links button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.home-page {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  align-items: start;
  justify-items: center;
  padding: clamp(16px, 4vh, 24px) clamp(230px, 29vw, 292px) 84px clamp(22px, 6vw, 72px);
}

.home-page.news-is-collapsed {
  padding-right: clamp(64px, 9vw, 92px);
  padding-left: clamp(64px, 9vw, 92px);
}

.homepage-stack {
  width: min(100%, 660px);
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  gap: clamp(12px, 2.8vh, 18px);
}

.campaign-card,
.home-section-card,
.bottom-card,
.news-card,
.news-side {
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px var(--line), 0 6px 14px rgba(0, 0, 0, 0.24);
  text-align: left;
}

.campaign-card {
  width: 100%;
  min-height: clamp(78px, 18vh, 98px);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 4px;
  padding: clamp(14px, 2.8vh, 20px) clamp(22px, 4vw, 34px);
  background:
    linear-gradient(90deg, rgba(3, 7, 15, 0.22), rgba(3, 7, 15, 0.58)),
    url("assets/campagna.png") center / cover no-repeat,
    #07101f;
}

.campaign-card small,
.home-section-card small,
.bottom-card small,
.news-card small {
  color: var(--muted);
  font-size: 11px;
}

.campaign-card strong,
.home-section-card strong,
.bottom-card strong {
  font-size: clamp(20px, 2.9vw, 27px);
}

.campaign-card span,
.home-section-card span {
  color: var(--muted);
  font-size: clamp(12px, 1.5vw, 14px);
}

.home-center-sections {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(12px, 2.6vw, 22px);
}

.home-section-card {
  min-height: clamp(74px, 16vh, 92px);
  display: grid;
  align-content: center;
  gap: 5px;
  padding: clamp(13px, 2.5vh, 18px) clamp(20px, 3.5vw, 30px);
  background: linear-gradient(180deg, rgba(28, 118, 189, 0.92), rgba(9, 44, 89, 0.92));
}

.events-card {
  background:
    linear-gradient(90deg, rgba(3, 7, 15, 0.16), rgba(3, 7, 15, 0.62)),
    url("assets/eventi.png") center / cover no-repeat,
    #07101f;
}

.rankings-card {
  background:
    linear-gradient(90deg, rgba(3, 7, 15, 0.62), rgba(3, 7, 15, 0.16)),
    url("assets/classifiche.png") center / cover no-repeat,
    #07101f;
}

.play-button {
  width: clamp(150px, 24vw, 220px);
  height: clamp(45px, 8vh, 58px);
  margin-top: clamp(14px, 4vh, 28px);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(0, 0, 0, 0.08)),
    url("assets/button.jpg") center / 100% 100% no-repeat;
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.35);
  font-size: clamp(20px, 3vw, 27px);
  font-weight: 700;
}

.news-carousel {
  position: absolute;
  right: clamp(16px, 3vw, 28px);
  top: clamp(76px, 18vh, 96px);
  bottom: clamp(88px, 17vh, 112px);
  width: clamp(196px, 24vw, 252px);
  display: grid;
  grid-template-rows: 38px 1fr;
  gap: 10px;
  transition: width 180ms ease, bottom 180ms ease;
}

.news-toggle {
  width: 100%;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 8px;
  padding: 0 12px;
  background:
    linear-gradient(180deg, rgba(3, 7, 15, 0.18), rgba(3, 7, 15, 0.48)),
    url("assets/profileBar.png") center / 100% 100% no-repeat,
    #07101f;
  box-shadow: inset 0 0 0 1px var(--line), 0 6px 14px rgba(0, 0, 0, 0.24);
  font-weight: 700;
}

.news-toggle span {
  font-size: 13px;
}

.news-toggle b {
  font-size: 18px;
  line-height: 1;
}

.news-is-collapsed .news-carousel {
  top: 50%;
  bottom: auto;
  width: 46px;
  height: 132px;
  transform: translateY(-50%);
  grid-template-rows: 1fr;
}

.news-is-collapsed .news-toggle {
  height: 100%;
  writing-mode: vertical-rl;
  justify-content: center;
  gap: 8px;
  padding: 10px 0;
}

.news-is-collapsed .news-toggle b {
  transform: rotate(90deg);
}

.news-is-collapsed .news-list {
  display: none;
}

.news-list {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 10px;
  overflow-y: auto;
  padding-right: 3px;
}

.news-preview-card,
.news-empty {
  width: 100%;
  min-height: 74px;
  border-radius: 8px;
  padding: 12px 14px;
  text-align: left;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.38), rgba(0, 0, 0, 0.08)),
    linear-gradient(135deg, rgba(23, 77, 148, 0.94), rgba(13, 29, 62, 0.96));
  box-shadow: inset 0 0 0 1px rgba(239, 184, 16, 0.38), 0 6px 14px rgba(0, 0, 0, 0.24);
}

.news-preview-card small,
.news-empty small {
  display: block;
  margin-bottom: 7px;
  color: #efb810;
  font-size: 11px;
  font-weight: 700;
}

.news-preview-card strong,
.news-empty strong {
  display: block;
  color: #fff;
  font-size: 13px;
  line-height: 1.22;
}

.news-preview-card:hover {
  transform: translateY(-1px);
  box-shadow: inset 0 0 0 1px rgba(239, 184, 16, 0.72), 0 10px 20px rgba(0, 0, 0, 0.3);
}

.news-card {
  position: relative;
  width: 100%;
  min-height: 0;
  padding: clamp(13px, 2vh, 18px) clamp(16px, 3vw, 26px);
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.08)),
    linear-gradient(135deg, #174d94, #0d1d3e);
}

.news-card span {
  display: block;
  margin-top: clamp(12px, 3vh, 24px);
  font-size: clamp(17px, 2.1vw, 22px);
}

.news-card p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.news-side {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 10px;
  background: linear-gradient(135deg, rgba(28, 118, 189, 0.82), rgba(255, 255, 255, 0.08));
  opacity: 0.72;
  overflow: hidden;
}

.news-side strong {
  display: block;
  font-size: 12px;
  line-height: 1.2;
}

.bottom-actions {
  position: absolute;
  left: clamp(16px, 3vw, 28px);
  bottom: clamp(14px, 3vh, 22px);
  display: flex;
  gap: 12px;
}

.bottom-card {
  width: clamp(132px, 18vw, 164px);
  min-height: 58px;
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 10px 12px;
  background:
    linear-gradient(90deg, rgba(3, 7, 15, 0.22), rgba(3, 7, 15, 0.58)),
    url("assets/box_info.png") center / cover no-repeat,
    #07101f;
}

.bottom-card strong {
  font-size: 13px;
}

@media (max-width: 680px) {
  .home-page {
    padding: 14px clamp(210px, 34vw, 240px) 84px 18px;
    justify-items: center;
  }

  .homepage-stack {
    width: 100%;
    min-width: 0;
  }

  .home-page.news-is-collapsed {
    padding-right: 70px;
    padding-left: 70px;
  }

  .home-center-sections {
    grid-template-columns: 1fr;
  }

  .bottom-actions {
    flex-direction: column;
  }
}

@media (max-height: 390px) and (orientation: landscape) {
  .home-page {
    padding-top: 12px;
    padding-right: clamp(210px, 28vw, 260px);
    padding-bottom: 72px;
  }

  .homepage-stack {
    gap: 8px;
  }

  .campaign-card,
  .home-section-card {
    min-height: 70px;
  }

  .play-button {
    margin-top: 10px;
  }

  .news-carousel {
    top: 68px;
    bottom: 76px;
    width: clamp(180px, 23vw, 220px);
  }

  .news-is-collapsed .news-carousel {
    top: 50%;
    bottom: auto;
    width: 44px;
    height: 118px;
  }

  .news-card span {
    margin-top: 8px;
  }
}

.shop-page {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 14px 0 16px;
  display: grid;
  grid-template-rows: minmax(0, 1fr) minmax(0, 0.98fr);
  grid-template-columns: 1fr 2fr 1fr;
  gap: 12px;
  overflow: hidden;
}

.shop-pack-grid,
.shop-skin-grid {
  grid-column: 2;
  min-height: 0;
  display: grid;
  gap: 14px;
}

.shop-pack-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.shop-card {
  min-width: 0;
  min-height: 0;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 6px;
  padding: 10px 16px 12px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22), 0 10px 24px rgba(0, 0, 0, 0.3);
  text-align: center;
}

.shop-card.normal {
  background: linear-gradient(135deg, rgba(0, 84, 45, 0.92), rgba(4, 33, 26, 0.95));
}

.shop-card.plus {
  background: linear-gradient(135deg, rgba(18, 43, 112, 0.92), rgba(73, 21, 93, 0.92));
}

.shop-card.special {
  background: linear-gradient(135deg, rgba(83, 34, 7, 0.95), rgba(44, 15, 4, 0.96));
}

.shop-card.skin {
  background: linear-gradient(135deg, rgba(117, 6, 54, 0.94), rgba(64, 20, 34, 0.95));
}

.shop-card.mosaic {
  background: linear-gradient(135deg, rgba(121, 58, 19, 0.9), rgba(35, 24, 91, 0.95), rgba(0, 111, 138, 0.78));
}

.shop-pack-art {
  width: clamp(54px, 9vw, 78px);
  aspect-ratio: 70 / 108;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 12px 14px rgba(0, 0, 0, 0.38));
}

.shop-pack-art img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.skin-card .shop-pack-art {
  width: clamp(60px, 10vw, 86px);
}

.shop-card-copy {
  display: grid;
  justify-items: center;
  gap: 4px;
}

.shop-card-copy strong {
  font-size: clamp(15px, 2.1vw, 20px);
}

.shop-card-copy small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.25;
}

.shop-tag-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
  margin-top: 2px;
}

.shop-tag-row span {
  min-height: 16px;
  border-radius: 999px;
  padding: 2px 7px;
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.88);
  font-size: 9px;
  line-height: 1.2;
}

.shop-price {
  position: relative;
  margin-top: 1px;
  color: #efb810;
  font-size: 14px;
}

.shop-price::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 5px;
  vertical-align: -1px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff3a6, #e8a718 70%);
}

.shop-price.gems::before {
  border-radius: 3px;
  background: linear-gradient(135deg, #f3d8ff, #9e44f0 52%, #4d1a9f);
  transform: rotate(45deg);
}

.shop-buy-button {
  width: 100%;
  height: 24px;
  border-radius: 7px;
  background: linear-gradient(90deg, #00a94f, #08bd65);
  font-size: 10px;
  font-weight: 800;
}

.shop-buy-button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  filter: grayscale(0.45);
}

.market-page {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 16px 24px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
}

.market-tabs {
  justify-self: center;
  display: flex;
  gap: 8px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  box-shadow: inset 0 0 0 1px rgba(239, 184, 16, 0.28);
}

.market-tabs button {
  min-width: 128px;
  height: 34px;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
  font-weight: 800;
}

.market-tabs button.active {
  color: #fff;
  background: linear-gradient(180deg, #1c76bd, #0f4f8e);
}

.market-panel {
  min-height: 0;
  width: min(760px, 100%);
  justify-self: center;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  border-radius: 8px;
  padding: 14px;
  background: rgba(0, 0, 0, 0.52);
  box-shadow: inset 0 0 0 1px rgba(239, 184, 16, 0.28), 0 12px 28px rgba(0, 0, 0, 0.28);
}

.market-panel header {
  display: grid;
  gap: 3px;
}

.market-panel header strong {
  font-size: 17px;
}

.market-panel header small {
  color: var(--muted);
  font-size: 12px;
}

.market-list,
.trade-offer-list {
  min-height: 0;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 8px;
  padding-right: 4px;
}

.market-row,
.trade-offer-row {
  min-height: 56px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(10, 24, 54, 0.8);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  text-align: left;
}

.trade-offer-row {
  grid-template-columns: 42px minmax(0, 1fr);
}

.market-row img,
.trade-offer-row img {
  width: 34px;
  height: 46px;
  border-radius: 5px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.08);
}

.market-row strong,
.trade-offer-row strong {
  display: block;
  font-size: 13px;
}

.market-row small,
.trade-offer-row small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.market-row button {
  min-width: 118px;
  height: 30px;
  border-radius: 7px;
  background: linear-gradient(90deg, #2f68ff, #b311ef);
  font-size: 11px;
  font-weight: 800;
}

.market-row button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.market-row button.market-remove-trade {
  background: linear-gradient(90deg, #7b1c2b, #d54d52);
}

.market-empty {
  min-height: 74px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.08);
  font-size: 13px;
  text-align: center;
  padding: 14px;
}

.market-loading {
  min-height: 118px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  border-radius: 8px;
  color: #fff;
  background: rgba(8, 18, 38, 0.78);
  border: 1px solid rgba(239, 184, 16, 0.26);
  text-align: center;
}

.market-loading strong {
  font-size: 13px;
}

.trade-offer-modal {
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  gap: 10px;
  position: relative;
  border-radius: 8px;
  padding: 24px;
  background: linear-gradient(180deg, rgba(18, 35, 80, 0.98), rgba(7, 13, 28, 0.98));
  box-shadow: inset 0 0 0 1px rgba(239, 184, 16, 0.48), 0 18px 44px rgba(0, 0, 0, 0.48);
}

.trade-offer-modal small {
  color: #efb810;
  font-size: 12px;
  font-weight: 800;
}

.trade-offer-modal h2,
.trade-offer-modal p {
  margin: 0;
}

.trade-offer-modal p {
  color: var(--muted);
  font-size: 13px;
}

.plus .shop-buy-button {
  background: linear-gradient(90deg, #2a6dff, #b21dff);
}

.special .shop-buy-button {
  background: linear-gradient(90deg, #ec7a00, #ff3b08);
}

.skin-card .shop-buy-button {
  background: linear-gradient(90deg, rgba(179, 0, 83, 0.96), rgba(201, 9, 76, 0.96));
  color: rgba(255, 255, 255, 0.72);
}

.mosaic .shop-buy-button {
  background: linear-gradient(90deg, #b56c24, #714bb7, #0396b3);
  color: rgba(255, 255, 255, 0.72);
}

@media (max-height: 390px) and (orientation: landscape) {
  .shop-page {
    height: 100%;
    grid-template-rows: auto auto;
    align-content: start;
    padding: 12px clamp(16px, 12vw, 120px) 24px;
    gap: 12px;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-padding-bottom: 24px;
  }

  .shop-pack-grid,
  .shop-skin-grid {
    grid-column: 1 / -1;
    min-height: auto;
  }

  .shop-card {
    min-height: 186px;
    align-content: start;
    gap: 5px;
    padding: 10px 14px 12px;
    overflow: visible;
  }

  .shop-pack-art {
    width: clamp(58px, 10vw, 74px);
  }

  .skin-card .shop-pack-art {
    width: clamp(62px, 11vw, 80px);
  }

  .shop-card-copy strong {
    font-size: clamp(15px, 2vw, 18px);
    line-height: 1.05;
  }

  .shop-card-copy small {
    font-size: 9px;
  }
}

@media (max-width: 700px) and (orientation: landscape) {
  .shop-page {
    grid-template-columns: 1fr;
    padding: 12px 18px 24px;
  }

  .shop-pack-grid,
  .shop-skin-grid {
    grid-column: 1;
  }

  .shop-pack-grid {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }

  .shop-skin-grid {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }

  .shop-card {
    min-height: 198px;
  }
}

@media (max-width: 540px) and (orientation: landscape) {
  .shop-pack-grid,
  .shop-skin-grid {
    grid-template-columns: 1fr;
  }

  .shop-card {
    min-height: 212px;
  }
}

.deck-page {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 16px 18px 16px 24px;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 18px;
}

.deck-library-panel,
.active-deck-panel {
  min-width: 0;
  min-height: 0;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.45);
  box-shadow: inset 0 0 0 1px var(--line), 0 12px 28px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(6px);
}

.deck-library-panel {
  display: grid;
  grid-template-rows: auto auto auto 1fr;
  gap: 10px;
  padding: 12px;
  overflow: hidden;
}

.deck-filter-toggle {
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 8px;
  padding: 0 12px;
  background: rgba(15, 97, 165, 0.76);
  font-weight: 700;
}

.deck-filter-toggle b {
  color: var(--muted);
  font-size: 12px;
}

.deck-tools {
  height: 0;
  opacity: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(260px, 0.9fr);
  gap: 12px;
  align-items: center;
  transition: height 160ms ease, opacity 160ms ease;
}

.deck-tools.open {
  height: 34px;
  opacity: 1;
}

.element-filter {
  display: flex;
  gap: 16px;
}

.element-filter button {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1c76bd, #0f4f8e);
  font-size: 12px;
}

.element-filter-button {
  padding: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24), 0 4px 10px rgba(0, 0, 0, 0.28);
}

.element-filter-button.active {
  box-shadow: inset 0 0 0 2px #efb810, 0 0 16px rgba(239, 184, 16, 0.5), 0 4px 10px rgba(0, 0, 0, 0.28);
  transform: translateY(-1px);
}

.element-filter-button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.element-filter-button span {
  font-weight: 700;
}

.deck-search-form {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto auto;
  gap: 8px;
  align-items: center;
}

.search-box {
  min-width: 0;
  height: 26px;
  display: grid;
  grid-template-columns: 18px 1fr;
  border-bottom: 1px solid #fff;
  align-items: center;
}

.search-box span {
  width: 11px;
  height: 11px;
  border: 1.5px solid #fff;
  border-radius: 50%;
  position: relative;
}

.search-box span::after {
  content: "";
  position: absolute;
  right: -4px;
  bottom: -3px;
  width: 5px;
  height: 1.5px;
  background: #fff;
  transform: rotate(45deg);
}

.search-box input {
  height: 24px;
  background: transparent;
  color: #fff;
  padding: 0;
  font-size: 11px;
}

.search-box input::placeholder {
  color: #fff;
  font-size: 11px;
}

.search-apply-button,
.search-clear-button {
  height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  background: rgba(15, 97, 165, 0.78);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.search-clear-button {
  background: rgba(255, 255, 255, 0.14);
}

.deck-rows {
  margin-top: 28px;
  display: grid;
  gap: 22px;
}

.deck-row {
  display: flex;
  gap: 16px;
}

.deck-card-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 86 / 122;
}

.deck-card {
  width: 100%;
  aspect-ratio: 86 / 122;
  padding: 0;
  background: transparent;
}

.deck-card-wrap .deck-card {
  height: 100%;
}

.deck-card-add {
  position: absolute;
  left: 8px;
  bottom: 8px;
  z-index: 3;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(239, 184, 16, 0.92);
  color: #07101f;
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.32), inset 0 0 0 1px rgba(255, 255, 255, 0.45);
  font-size: 22px;
  line-height: 1;
  font-weight: 800;
}

.deck-card-add:disabled {
  opacity: 0.38;
  cursor: not-allowed;
  filter: grayscale(0.35);
}

.deck-copy-badge {
  position: absolute;
  top: 7px;
  right: 7px;
  z-index: 4;
  min-width: 34px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 25px;
  padding: 0 9px;
  color: #07101f;
  background: rgba(239, 184, 16, 0.94);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.48), 0 5px 12px rgba(0, 0, 0, 0.35);
  font-size: 12px;
  font-weight: 900;
  pointer-events: none;
}

.deck-status {
  min-height: 16px;
  color: var(--muted);
  font-size: 12px;
}

.owned-card-grid {
  min-height: 0;
  overflow: auto;
  padding: 10px 12px 16px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 18px 14px;
  align-content: start;
}

.owned-empty-state {
  grid-column: 1 / -1;
  min-height: 96px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
  font-size: 13px;
  text-align: center;
  padding: 16px;
}

@media (max-width: 760px) {
  .owned-card-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 900px) and (orientation: landscape) {
  .deck-page {
    padding: 12px 14px;
    gap: 12px;
  }

  .deck-library-panel,
  .active-deck-panel {
    padding: 10px;
  }

  .deck-tools {
    grid-template-columns: minmax(210px, 0.78fr) minmax(270px, 1fr);
    gap: 8px;
  }

  .element-filter {
    gap: 7px;
    min-width: 0;
  }

  .element-filter button {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
  }

  .element-filter-button img {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
  }

  .deck-search-form {
    grid-template-columns: minmax(150px, 1fr) 52px 46px;
    gap: 6px;
  }

  .search-box {
    grid-template-columns: 15px minmax(0, 1fr);
  }

  .search-box span {
    width: 9px;
    height: 9px;
    border-width: 1.3px;
  }

  .search-box input,
  .search-box input::placeholder {
    font-size: 10px;
  }

  .search-apply-button,
  .search-clear-button {
    min-width: 0;
    height: 28px;
    padding: 0 8px;
    font-size: 10px;
  }

  .owned-card-grid {
    padding: 8px 10px 14px;
    gap: 14px 12px;
  }

  .deck-card-face .power {
    width: 22px;
    height: 22px;
    border-radius: 8px;
    font-size: 12px;
  }

  .deck-card-face .power.top {
    top: 5px;
  }

  .deck-card-face .power.left {
    left: 5px;
  }

  .deck-card-face .power.right {
    right: 5px;
  }

  .deck-card-face .power.bottom {
    bottom: 5px;
  }

  .deck-card-add {
    left: 5px;
    bottom: 5px;
    width: 22px;
    height: 22px;
    font-size: 16px;
  }

  .deck-copy-badge {
    top: 5px;
    right: 5px;
    min-width: 26px;
    height: 18px;
    padding: 0 6px;
    font-size: 9px;
  }

  .active-deck-panel header strong {
    font-size: 15px;
  }

  .active-deck-stack {
    gap: 12px;
  }

  .active-slot-grid {
    gap: 10px 8px;
  }
}

@media (max-width: 700px) and (orientation: landscape) {
  .deck-tools.open {
    height: 64px;
  }

  .deck-tools {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 6px;
  }

  .element-filter {
    justify-content: center;
  }

  .deck-search-form {
    grid-template-columns: minmax(130px, 1fr) 52px 46px;
  }

  .deck-card-face .power {
    width: 18px;
    height: 18px;
    border-radius: 7px;
    font-size: 10px;
  }

  .deck-card-face .power.top {
    top: 4px;
  }

  .deck-card-face .power.left {
    left: 4px;
  }

  .deck-card-face .power.right {
    right: 4px;
  }

  .deck-card-face .power.bottom {
    bottom: 4px;
  }

  .deck-card-add {
    width: 20px;
    height: 20px;
    font-size: 14px;
  }
}

.active-deck-panel {
  padding: 12px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 12px;
  overflow: hidden;
}

.active-deck-panel header {
  display: grid;
  gap: 2px;
}

.active-deck-panel header small,
.active-deck-group span {
  color: var(--muted);
  font-size: 11px;
}

.active-deck-panel header strong {
  font-size: 17px;
}

.active-deck-group {
  display: grid;
  align-content: start;
  gap: 8px;
}

.active-deck-stack {
  min-height: 0;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 2px 6px 8px 0;
}

.active-slot-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px 10px;
  align-content: flex-start;
}

.five-slots {
  --active-card-width: calc((100% - 20px) / 3);
}

.three-slots {
  --active-card-width: calc((100% - 20px) / 3);
}

.active-deck-slot {
  min-width: 0;
  flex: 0 1 var(--active-card-width);
  width: var(--active-card-width);
  aspect-ratio: 86 / 122;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.active-deck-slot.empty span {
  width: 42%;
  aspect-ratio: 86 / 122;
  border-radius: 6px;
  border: 1px dashed rgba(255, 255, 255, 0.45);
}

.active-deck-card {
  flex: 0 1 var(--active-card-width);
  width: var(--active-card-width);
  min-width: 0;
}

.active-deck-cta {
  width: 100%;
  height: 38px;
  font-size: 16px;
}

.game-card {
  position: relative;
  width: 70.85px;
  height: 100px;
  border: 1px solid var(--blue);
  border-radius: 8px;
  background: #132445;
  box-shadow: 0 4px 4px rgba(15, 97, 165, 0.25);
  overflow: visible;
}

.deck-card-face {
  width: 100%;
  height: 100%;
}

.active-card-face {
  width: 58px;
  height: 82px;
}

.card-art {
  position: absolute;
  inset: 0;
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 36%, rgba(255, 255, 255, 0.32), transparent 20%),
    linear-gradient(150deg, #203f87, #06152b 70%);
  background-position: center;
  background-size: cover;
  overflow: hidden;
}

.card-art img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: inherit;
}

.card-art::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.28));
  pointer-events: none;
}

.game-card.rare .card-art {
  background:
    radial-gradient(circle at 50% 36%, rgba(255, 255, 255, 0.34), transparent 20%),
    linear-gradient(150deg, #52287f, #06152b 70%);
}

.game-card.legend .card-art {
  background:
    radial-gradient(circle at 50% 36%, rgba(255, 255, 255, 0.36), transparent 20%),
    linear-gradient(150deg, #8a6618, #06152b 70%);
}

.power {
  position: absolute;
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #0f61a5;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.support-count {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(239, 184, 16, 0.9);
  color: #07101f;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.34), inset 0 0 0 1px rgba(255, 255, 255, 0.48);
  font-size: 13px;
  font-weight: 800;
}

.battle-card-face .support-count {
  width: 18px;
  height: 18px;
  font-size: 10px;
}

.deck-card-face .power {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: rgba(15, 97, 165, 0.82);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35), 0 4px 10px rgba(0, 0, 0, 0.28);
  font-size: 16px;
}

.info-card .power {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: rgba(15, 97, 165, 0.82);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35), 0 4px 10px rgba(0, 0, 0, 0.28);
  font-size: 17px;
}

.active-card-face .power {
  width: 22px;
  height: 22px;
  border-radius: 8px;
  background: rgba(15, 97, 165, 0.82);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.32), 0 3px 8px rgba(0, 0, 0, 0.25);
  font-size: 12px;
}

.power.top {
  left: 50%;
  top: -10px;
  transform: translateX(-50%);
}

.power.left {
  left: -10px;
  top: 50%;
  transform: translateY(-50%);
}

.power.right {
  right: -10px;
  top: 50%;
  transform: translateY(-50%);
}

.power.bottom {
  left: 50%;
  bottom: -10px;
  transform: translateX(-50%);
}

.deck-card-face .power.top,
.info-card .power.top,
.active-card-face .power.top {
  top: 7px;
}

.deck-card-face .power.left,
.info-card .power.left,
.active-card-face .power.left {
  left: 7px;
}

.deck-card-face .power.right,
.info-card .power.right,
.active-card-face .power.right {
  right: 7px;
}

.deck-card-face .power.bottom,
.info-card .power.bottom,
.active-card-face .power.bottom {
  bottom: 7px;
}

@media (max-width: 900px) and (orientation: landscape) {
  .deck-card-face .power {
    width: 22px;
    height: 22px;
    border-radius: 8px;
    font-size: 12px;
  }

  .deck-card-face .power.top {
    top: 5px;
  }

  .deck-card-face .power.left {
    left: 5px;
  }

  .deck-card-face .power.right {
    right: 5px;
  }

  .deck-card-face .power.bottom {
    bottom: 5px;
  }

  .active-card-face .power {
    width: 18px;
    height: 18px;
    border-radius: 7px;
    font-size: 10px;
  }

  .active-card-face .power.top {
    top: 4px;
  }

  .active-card-face .power.left {
    left: 4px;
  }

  .active-card-face .power.right {
    right: 4px;
  }

  .active-card-face .power.bottom {
    bottom: 4px;
  }

  .active-deck-panel header strong {
    font-size: 15px;
  }
}

@media (max-width: 700px) and (orientation: landscape) {
  .deck-card-face .power {
    width: 18px;
    height: 18px;
    border-radius: 7px;
    font-size: 10px;
  }

  .deck-card-face .power.top {
    top: 4px;
  }

  .deck-card-face .power.left {
    left: 4px;
  }

  .deck-card-face .power.right {
    right: 4px;
  }

  .deck-card-face .power.bottom {
    bottom: 4px;
  }

  .active-card-face .power {
    width: 16px;
    height: 16px;
    border-radius: 6px;
    font-size: 9px;
  }
}

.game-page {
  position: relative;
  width: 100%;
  height: 100%;
}

.user-cards {
  position: absolute;
  left: 8px;
  display: flex;
  gap: 18px;
}

.user-cards button {
  padding: 0;
  background: transparent;
}

.top-hand {
  top: 54px;
}

.bottom-hand {
  bottom: 20px;
}

.field-grid {
  position: absolute;
  left: 274px;
  top: 84px;
  width: 276px;
  height: 208px;
  display: grid;
  grid-template-columns: repeat(3, 90px);
  grid-auto-rows: 100px;
  gap: 8px;
}

.field-slot {
  padding: 0;
  background: rgba(0, 0, 0, 0.18);
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.field-slot.empty {
  border: 1px dashed rgba(255, 255, 255, 0.24);
}

.score-panel {
  position: absolute;
  right: 26px;
  top: 110px;
  width: 115px;
  display: grid;
  gap: 10px;
}

.score-panel div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 42px;
  padding: 0 12px;
  border-radius: 8px;
  background: var(--panel);
}

.score-panel span {
  color: var(--muted);
  font-size: 11px;
}

.score-panel b {
  font-size: 20px;
}

.coinflip {
  position: absolute;
  left: 585px;
  top: 234px;
  display: grid;
  justify-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}

.coinflip span {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff5ad, #d28c14);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.4);
}

.game-page {
  --battle-hand-card-width: 92px;
  --battle-hand-card-height: 126px;
  --battle-grid-card-width: 160px;
  --battle-grid-card-height: 220px;
  --battle-grid-gap: 12px;
  display: grid;
  grid-template-columns: minmax(186px, auto) minmax(520px, 1fr) minmax(186px, auto);
  gap: 18px;
  padding: 16px 22px;
  overflow: auto;
}

.battle-shell .td-topbar {
  display: none;
}

.battle-shell .td-screen {
  inset: 0;
}

.battle-hand {
  min-width: 0;
  max-height: 100%;
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(2, var(--battle-hand-card-width));
  gap: 12px;
  align-items: start;
  justify-content: center;
}

.battle-character-hand,
.battle-support-hand {
  display: grid;
  gap: 10px;
  align-content: start;
  justify-items: center;
}

.battle-card-button {
  width: var(--battle-hand-card-width);
  height: var(--battle-hand-card-height);
  padding: 0;
  border-radius: 8px;
  background: transparent;
}

.battle-card-button.player .game-card {
  border-color: #2f7cff;
  box-shadow: 0 0 0 1px rgba(47, 124, 255, 0.72), 0 4px 10px rgba(47, 124, 255, 0.22);
}

.battle-card-button.ai .battle-card-back {
  box-shadow: inset 0 0 0 2px #ff3355, 0 4px 10px rgba(255, 51, 85, 0.28);
}

.battle-card-button.selected {
  box-shadow: 0 0 0 2px #efb810, 0 0 12px rgba(239, 184, 16, 0.62);
}

.battle-card-face {
  width: var(--battle-hand-card-width);
  height: var(--battle-hand-card-height);
}

.battle-field-card {
  width: var(--battle-grid-card-width);
  height: var(--battle-grid-card-height);
}

.battle-card-back {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(3, 7, 15, 0.08), rgba(3, 7, 15, 0.42)),
    url("assets/card_back_ai.jpg") center / cover no-repeat,
    #07101f;
  box-shadow: inset 0 0 0 1px rgba(239, 184, 16, 0.34), 0 4px 10px rgba(0, 0, 0, 0.28);
}

.battle-center {
  min-width: 0;
  display: grid;
  grid-template-rows: 56px auto;
  gap: 14px;
  justify-items: center;
}

.battle-scoreboard {
  width: min(100%, 360px);
  min-height: 56px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  border-radius: 8px;
  padding: 0 12px;
  background: rgba(0, 0, 0, 0.58);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.battle-scoreboard div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.battle-scoreboard div:last-child {
  flex-direction: row-reverse;
}

.battle-scoreboard span {
  display: grid;
  gap: 1px;
  color: var(--muted);
  font-size: 10px;
}

.battle-scoreboard small {
  color: #efb810;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
}

.battle-scoreboard em {
  color: #ffb0bd;
  font-size: 8px;
  font-style: normal;
  font-weight: 700;
}

.battle-scoreboard div.active span {
  color: #fff;
}

.battle-scoreboard b {
  font-size: 18px;
}

.battle-scoreboard strong {
  color: #efb810;
  font-size: 11px;
  white-space: nowrap;
}

.battle-grid {
  display: grid;
  grid-template-columns: repeat(3, var(--battle-grid-card-width));
  grid-auto-rows: var(--battle-grid-card-height);
  gap: var(--battle-grid-gap);
}

.battle-slot {
  position: relative;
  width: var(--battle-grid-card-width);
  height: var(--battle-grid-card-height);
  padding: 0;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.26);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.battle-slot.element-field {
  background:
    radial-gradient(circle at 50% 18%, var(--field-glow, rgba(239, 184, 16, 0.24)), transparent 44%),
    rgba(0, 0, 0, 0.34);
  box-shadow: inset 0 0 0 1px var(--field-border, rgba(239, 184, 16, 0.44)), 0 0 14px var(--field-shadow, rgba(239, 184, 16, 0.14));
}

.battle-slot.element-fuoco {
  --field-glow: rgba(255, 84, 32, 0.32);
  --field-border: rgba(255, 105, 38, 0.62);
  --field-shadow: rgba(255, 84, 32, 0.2);
}

.battle-slot.element-acqua {
  --field-glow: rgba(32, 152, 255, 0.32);
  --field-border: rgba(65, 171, 255, 0.62);
  --field-shadow: rgba(32, 152, 255, 0.2);
}

.battle-slot.element-erba {
  --field-glow: rgba(59, 210, 109, 0.32);
  --field-border: rgba(82, 220, 125, 0.62);
  --field-shadow: rgba(59, 210, 109, 0.18);
}

.battle-slot.element-terra {
  --field-glow: rgba(181, 127, 65, 0.34);
  --field-border: rgba(202, 151, 85, 0.62);
  --field-shadow: rgba(181, 127, 65, 0.18);
}

.battle-slot.element-tuono {
  --field-glow: rgba(255, 222, 62, 0.34);
  --field-border: rgba(255, 222, 62, 0.66);
  --field-shadow: rgba(255, 222, 62, 0.18);
}

.battle-slot.element-luce {
  --field-glow: rgba(255, 246, 192, 0.36);
  --field-border: rgba(255, 246, 192, 0.68);
  --field-shadow: rgba(255, 246, 192, 0.16);
}

.battle-slot.element-buio {
  --field-glow: rgba(135, 74, 210, 0.34);
  --field-border: rgba(157, 92, 228, 0.64);
  --field-shadow: rgba(135, 74, 210, 0.18);
}

.battle-element-badge {
  position: absolute;
  top: 8px;
  left: 50%;
  z-index: 1;
  transform: translateX(-50%);
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(2, 7, 15, 0.72);
  color: #fff8d7;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px var(--field-border, rgba(239, 184, 16, 0.44));
}

.battle-element-badge.icon {
  width: 32px;
  height: 32px;
  padding: 5px;
  display: grid;
  place-items: center;
  border-radius: 50%;
}

.battle-element-badge img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.battle-slot.empty > span:not(.battle-element-badge) {
  position: relative;
  z-index: 0;
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 6px;
  border: 1px dashed rgba(255, 255, 255, 0.28);
}

.battle-slot.player {
  box-shadow: inset 0 0 0 2px #2f7cff, 0 0 14px rgba(47, 124, 255, 0.28);
}

.battle-slot.ai {
  box-shadow: inset 0 0 0 2px #ff3355, 0 0 14px rgba(255, 51, 85, 0.25);
}

.battle-slot.player .battle-field-card {
  border-color: #2f7cff;
  outline: 3px solid rgba(47, 124, 255, 0.86);
  outline-offset: -3px;
  box-shadow: 0 0 0 1px rgba(126, 178, 255, 0.75), 0 0 18px rgba(47, 124, 255, 0.42);
}

.battle-slot.ai .battle-field-card {
  border-color: #ff3355;
  outline: 3px solid rgba(255, 51, 85, 0.88);
  outline-offset: -3px;
  box-shadow: 0 0 0 1px rgba(255, 145, 160, 0.72), 0 0 18px rgba(255, 51, 85, 0.42);
}

.battle-slot.effect-element-boost {
  animation: rune-activation-pulse 1200ms ease-out both;
  --element-effect-strong: var(--field-border, rgba(239, 184, 16, 0.92));
  --element-effect-soft: var(--field-glow, rgba(239, 184, 16, 0.45));
  --element-effect-glow: var(--field-shadow, rgba(239, 184, 16, 0.3));
}

.battle-slot.effect-element-boost.element-fuoco {
  --element-effect-strong: rgba(255, 97, 26, 0.98);
  --element-effect-soft: rgba(255, 176, 44, 0.52);
  --element-effect-glow: rgba(255, 84, 32, 0.42);
}

.battle-slot.effect-element-boost.element-acqua {
  --element-effect-strong: rgba(78, 198, 255, 0.98);
  --element-effect-soft: rgba(32, 152, 255, 0.46);
  --element-effect-glow: rgba(32, 152, 255, 0.38);
}

.battle-slot.effect-element-boost.element-erba {
  --element-effect-strong: rgba(104, 255, 137, 0.98);
  --element-effect-soft: rgba(42, 205, 89, 0.46);
  --element-effect-glow: rgba(59, 210, 109, 0.36);
}

.battle-slot.effect-element-boost.element-terra {
  --element-effect-strong: rgba(229, 174, 95, 0.96);
  --element-effect-soft: rgba(148, 96, 54, 0.46);
  --element-effect-glow: rgba(181, 127, 65, 0.34);
}

.battle-slot.effect-element-boost.element-tuono {
  --element-effect-strong: rgba(255, 249, 128, 0.98);
  --element-effect-soft: rgba(255, 222, 62, 0.52);
  --element-effect-glow: rgba(255, 222, 62, 0.42);
}

.battle-slot.effect-element-boost.element-luce {
  --element-effect-strong: rgba(255, 255, 255, 0.98);
  --element-effect-soft: rgba(255, 246, 192, 0.58);
  --element-effect-glow: rgba(255, 246, 192, 0.4);
}

.battle-slot.effect-element-boost.element-buio {
  --element-effect-strong: rgba(157, 92, 228, 0.98);
  --element-effect-soft: rgba(36, 10, 72, 0.62);
  --element-effect-glow: rgba(135, 74, 210, 0.4);
}

.battle-slot.effect-element-boost .battle-field-card {
  animation: rune-card-awaken 1200ms ease-out both;
  box-shadow:
    0 0 0 2px var(--element-effect-strong),
    0 0 18px var(--element-effect-glow),
    0 0 34px var(--element-effect-soft);
}

.battle-slot.effect-element-boost .battle-field-card::before,
.battle-slot.effect-element-boost .battle-field-card::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border-radius: 12px;
}

.battle-slot.effect-element-boost .battle-field-card::before {
  inset: -9px;
  z-index: 5;
  border: 1px solid var(--element-effect-strong);
  background:
    linear-gradient(90deg, var(--element-effect-strong) 0 16px, transparent 16px calc(100% - 16px), var(--element-effect-strong) calc(100% - 16px) 100%) top / 100% 1px no-repeat,
    linear-gradient(90deg, var(--element-effect-strong) 0 16px, transparent 16px calc(100% - 16px), var(--element-effect-strong) calc(100% - 16px) 100%) bottom / 100% 1px no-repeat,
    linear-gradient(180deg, var(--element-effect-strong) 0 16px, transparent 16px calc(100% - 16px), var(--element-effect-strong) calc(100% - 16px) 100%) left / 1px 100% no-repeat,
    linear-gradient(180deg, var(--element-effect-strong) 0 16px, transparent 16px calc(100% - 16px), var(--element-effect-strong) calc(100% - 16px) 100%) right / 1px 100% no-repeat;
  box-shadow: 0 0 16px var(--element-effect-glow), inset 0 0 16px var(--element-effect-soft);
  animation: rune-card-border 1200ms ease-out both;
}

.battle-slot.effect-element-boost .battle-field-card::after {
  inset: -20px;
  z-index: 6;
  background:
    radial-gradient(circle at 50% 0%, var(--element-effect-strong) 0 3px, transparent 10px),
    radial-gradient(circle at 100% 50%, var(--element-effect-strong) 0 3px, transparent 10px),
    radial-gradient(circle at 50% 100%, var(--element-effect-strong) 0 3px, transparent 10px),
    radial-gradient(circle at 0% 50%, var(--element-effect-strong) 0 3px, transparent 10px),
    repeating-conic-gradient(from 45deg, transparent 0deg 14deg, var(--element-effect-soft) 15deg 18deg, transparent 19deg 44deg);
  filter: blur(0.2px);
  mix-blend-mode: screen;
  animation: rune-card-glyphs 1200ms ease-out both;
}

.battle-slot.effect-element-boost::before {
  content: "";
  position: absolute;
  inset: -12px;
  z-index: 4;
  border-radius: 16px;
  pointer-events: none;
  background:
    radial-gradient(circle, transparent 38%, var(--element-effect-soft) 39% 41%, transparent 42% 51%, var(--element-effect-strong) 52% 54%, transparent 55%),
    repeating-conic-gradient(from 0deg, transparent 0deg 18deg, var(--element-effect-soft) 19deg 21deg, transparent 22deg 45deg);
  filter: blur(0.2px);
  mix-blend-mode: screen;
  animation: ancient-rune-field 1200ms ease-out both;
}

.battle-slot.effect-element-boost.element-fuoco::before {
  --element-effect-strong: rgba(255, 97, 26, 0.98);
  --element-effect-soft: rgba(255, 176, 44, 0.52);
  --element-effect-glow: rgba(255, 84, 32, 0.42);
  animation: ancient-rune-field 1200ms ease-out both;
}

.battle-slot.effect-element-boost.element-acqua::before {
  --element-effect-strong: rgba(78, 198, 255, 0.98);
  --element-effect-soft: rgba(32, 152, 255, 0.46);
  --element-effect-glow: rgba(32, 152, 255, 0.38);
  animation: ancient-rune-field 1200ms ease-out both;
}

.battle-slot.effect-element-boost.element-erba::before {
  --element-effect-strong: rgba(104, 255, 137, 0.98);
  --element-effect-soft: rgba(42, 205, 89, 0.46);
  --element-effect-glow: rgba(59, 210, 109, 0.36);
  animation: ancient-rune-field 1200ms ease-out both;
}

.battle-slot.effect-element-boost.element-terra::before {
  --element-effect-strong: rgba(229, 174, 95, 0.96);
  --element-effect-soft: rgba(148, 96, 54, 0.46);
  --element-effect-glow: rgba(181, 127, 65, 0.34);
  animation: ancient-rune-field 1200ms ease-out both;
}

.battle-slot.effect-element-boost.element-tuono::before {
  --element-effect-strong: rgba(255, 249, 128, 0.98);
  --element-effect-soft: rgba(255, 222, 62, 0.52);
  --element-effect-glow: rgba(255, 222, 62, 0.42);
  animation: ancient-rune-field 1200ms ease-out both;
}

.battle-slot.effect-element-boost.element-luce::before {
  --element-effect-strong: rgba(255, 255, 255, 0.98);
  --element-effect-soft: rgba(255, 246, 192, 0.58);
  --element-effect-glow: rgba(255, 246, 192, 0.4);
  animation: ancient-rune-field 1200ms ease-out both;
}

.battle-slot.effect-element-boost.element-buio::before {
  --element-effect-strong: rgba(157, 92, 228, 0.98);
  --element-effect-soft: rgba(36, 10, 72, 0.62);
  --element-effect-glow: rgba(135, 74, 210, 0.4);
  animation: ancient-rune-field 1200ms ease-out both;
}

.battle-slot.effect-element-boost::after,
.battle-slot.effect-captured::after {
  content: "";
  position: absolute;
  inset: -5px;
  z-index: 5;
  border-radius: 12px;
  pointer-events: none;
}

.battle-slot.effect-element-boost::after {
  inset: -10px;
  border: 1px solid var(--element-effect-strong);
  background:
    linear-gradient(90deg, transparent 0 18%, var(--element-effect-soft) 20% 22%, transparent 24% 76%, var(--element-effect-soft) 78% 80%, transparent 82%),
    linear-gradient(0deg, transparent 0 18%, var(--element-effect-soft) 20% 22%, transparent 24% 76%, var(--element-effect-soft) 78% 80%, transparent 82%);
  box-shadow: 0 0 22px var(--element-effect-glow), inset 0 0 16px var(--element-effect-soft);
  animation: ancient-rune-frame 1200ms ease-out both;
}

.battle-slot.effect-element-boost.element-fuoco::after {
  background: radial-gradient(ellipse at 50% 80%, rgba(255, 120, 30, 0.56), transparent 60%);
}

.battle-slot.effect-element-boost.element-acqua::after {
  background: radial-gradient(circle, rgba(78, 198, 255, 0.42), transparent 60%);
}

.battle-slot.effect-element-boost.element-erba::after {
  background: radial-gradient(circle, rgba(92, 255, 137, 0.42), transparent 60%);
}

.battle-slot.effect-element-boost.element-terra::after {
  background: radial-gradient(ellipse at 50% 72%, rgba(181, 127, 65, 0.44), transparent 62%);
}

.battle-slot.effect-element-boost.element-tuono::after {
  background: radial-gradient(circle, rgba(255, 249, 128, 0.58), transparent 58%);
}

.battle-slot.effect-element-boost.element-luce::after {
  background: radial-gradient(circle, rgba(255, 255, 255, 0.62), transparent 60%);
}

.battle-slot.effect-element-boost.element-buio::after {
  background: radial-gradient(circle, rgba(135, 74, 210, 0.42), rgba(6, 2, 18, 0.36) 42%, transparent 64%);
}

.battle-slot.effect-captured {
  animation: captured-card-shake 660ms ease-out both;
}

.battle-slot.effect-captured::after {
  border: 2px solid var(--capture-color, #2f7cff);
  box-shadow: 0 0 22px var(--capture-glow, rgba(47, 124, 255, 0.58));
  animation: captured-card-ring 760ms ease-out both;
}

.battle-slot.player.effect-captured {
  --capture-color: #2f7cff;
  --capture-glow: rgba(47, 124, 255, 0.64);
}

.battle-slot.ai.effect-captured {
  --capture-color: #ff3355;
  --capture-glow: rgba(255, 51, 85, 0.62);
}

@keyframes rune-activation-pulse {
  0% {
    filter: brightness(1);
    transform: scale(1);
  }

  35% {
    filter: brightness(1.24) saturate(1.12);
    transform: scale(1.012);
  }

  100% {
    filter: brightness(1);
    transform: scale(1);
  }
}

@keyframes element-boost-ring {
  0% {
    opacity: 0;
    transform: scale(0.82);
  }

  28% {
    opacity: 1;
  }

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

@keyframes ancient-rune-field {
  0% {
    opacity: 0;
    transform: scale(0.84);
  }

  24% {
    opacity: 0.92;
    transform: scale(1);
  }

  72% {
    opacity: 0.68;
  }

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

@keyframes ancient-rune-frame {
  0% {
    opacity: 0;
    transform: scale(0.96);
    clip-path: inset(48% 48% 48% 48% round 12px);
  }

  20% {
    opacity: 1;
    clip-path: inset(0 0 0 0 round 12px);
  }

  76% {
    opacity: 0.74;
  }

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

@keyframes rune-card-awaken {
  0% {
    filter: brightness(1);
    transform: scale(1);
  }

  28% {
    filter: brightness(1.22) saturate(1.14);
    transform: scale(1.01);
  }

  64% {
    filter: brightness(1.1) saturate(1.08);
  }

  100% {
    filter: brightness(1);
    transform: scale(1);
  }
}

@keyframes rune-card-border {
  0% {
    opacity: 0;
    transform: scale(0.98);
    clip-path: inset(50% 50% 50% 50% round 10px);
  }

  22% {
    opacity: 1;
    clip-path: inset(0 0 0 0 round 10px);
  }

  74% {
    opacity: 0.74;
  }

  100% {
    opacity: 0;
    transform: scale(1.04);
    clip-path: inset(-6px -6px -6px -6px round 14px);
  }
}

@keyframes rune-card-glyphs {
  0% {
    opacity: 0;
    transform: scale(0.96);
  }

  26% {
    opacity: 1;
  }

  68% {
    opacity: 0.72;
  }

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

@keyframes captured-card-shake {
  0%,
  100% {
    transform: translateX(0) scale(1);
  }

  20% {
    transform: translateX(-4px) scale(1.02);
  }

  42% {
    transform: translateX(4px) scale(1.02);
  }

  64% {
    transform: translateX(-2px) scale(1.01);
  }
}

@keyframes captured-card-ring {
  0% {
    opacity: 0;
    transform: scale(0.94);
  }

  20% {
    opacity: 1;
  }

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

.battle-slot .battle-field-card {
  position: relative;
  z-index: 2;
  width: var(--battle-grid-card-width);
  height: var(--battle-grid-card-height);
}

.battle-field-card .power {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  font-size: 16px;
}

.battle-card-face .power {
  width: 22px;
  height: 22px;
  border-radius: 8px;
  font-size: 12px;
}

.battle-card-face .power.top,
.battle-field-card .power.top {
  top: 7px;
}

.battle-card-face .power.left,
.battle-field-card .power.left {
  left: 7px;
}

.battle-card-face .power.right,
.battle-field-card .power.right {
  right: 7px;
}

.battle-card-face .power.bottom,
.battle-field-card .power.bottom {
  bottom: 7px;
}

.battle-result-modal {
  width: 360px;
  min-height: 190px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 12px;
  border-radius: 8px;
  padding: 24px;
  background: rgba(0, 0, 0, 0.82);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16), 0 18px 40px rgba(0, 0, 0, 0.45);
  text-align: center;
}

.battle-result-modal small {
  color: var(--muted);
  font-size: 12px;
}

.battle-result-modal h2 {
  margin: 0;
  color: #efb810;
  font-size: 30px;
}

.battle-result-modal.defeat h2 {
  color: #ff4963;
}

.battle-result-modal p {
  margin: 0;
  color: var(--muted);
}

.battle-result-modal div {
  display: flex;
  gap: 12px;
}

.battle-result-modal .figma-button {
  width: 138px;
  height: 38px;
  font-size: 14px;
}

.battle-result-modal .figma-button.secondary {
  background: rgba(255, 255, 255, 0.12);
}

.battle-result-modal .figma-button.danger {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0.12)),
    linear-gradient(135deg, #8f1028, #d42b46);
  box-shadow: inset 0 0 0 1px rgba(255, 151, 164, 0.42), 0 8px 16px rgba(120, 8, 28, 0.24);
}

@media (max-width: 1024px) and (orientation: landscape) {
  .game-page {
    --battle-hand-card-height: clamp(58px, 17vh, 82px);
    --battle-hand-card-width: calc(var(--battle-hand-card-height) * 0.73);
    --battle-grid-card-height: clamp(88px, 27vh, 122px);
    --battle-grid-card-width: calc(var(--battle-grid-card-height) * 0.73);
    --battle-grid-gap: clamp(5px, 1.2vh, 8px);
    height: 100%;
    grid-template-columns: minmax(92px, 0.7fr) minmax(calc((var(--battle-grid-card-width) * 3) + (var(--battle-grid-gap) * 2)), auto) minmax(92px, 0.7fr);
    align-items: center;
    justify-items: center;
    gap: clamp(8px, 1.8vw, 16px);
    padding: clamp(6px, 1.6vh, 12px) clamp(8px, 1.8vw, 14px);
    overflow: hidden;
  }

  .battle-hand {
    width: 100%;
    max-height: calc(100vh - 18px);
    overflow: hidden auto;
    grid-template-columns: repeat(2, var(--battle-hand-card-width));
    gap: clamp(5px, 1.2vh, 8px);
    align-content: center;
    justify-content: center;
  }

  .battle-character-hand,
  .battle-support-hand {
    gap: clamp(5px, 1.2vh, 8px);
  }

  .battle-center {
    min-width: 0;
    grid-template-rows: 48px auto;
    gap: clamp(6px, 1.4vh, 10px);
    align-content: center;
  }

  .battle-scoreboard {
    width: min(100%, calc((var(--battle-grid-card-width) * 3) + (var(--battle-grid-gap) * 2)));
    min-height: 48px;
    gap: 6px;
    padding: 0 8px;
  }

  .battle-scoreboard strong {
    font-size: 10px;
  }

  .battle-grid {
    justify-content: center;
  }

  .battle-field-card .power {
    width: clamp(20px, 6.2vh, 26px);
    height: clamp(20px, 6.2vh, 26px);
    border-radius: 8px;
    font-size: clamp(11px, 3.2vh, 14px);
  }

  .battle-card-face .power {
    width: clamp(15px, 4.2vh, 19px);
    height: clamp(15px, 4.2vh, 19px);
    border-radius: 6px;
    font-size: clamp(8px, 2.4vh, 10px);
  }

  .battle-element-badge.icon {
    width: clamp(22px, 6vh, 28px);
    height: clamp(22px, 6vh, 28px);
    padding: 4px;
  }
}

@media (max-width: 700px) and (orientation: landscape) {
  .game-page {
    --battle-hand-card-height: clamp(48px, 16vh, 64px);
    --battle-hand-card-width: calc(var(--battle-hand-card-height) * 0.73);
    --battle-grid-card-height: clamp(74px, 25vh, 96px);
    --battle-grid-card-width: calc(var(--battle-grid-card-height) * 0.73);
    --battle-grid-gap: 5px;
    grid-template-columns: minmax(76px, 0.62fr) minmax(calc((var(--battle-grid-card-width) * 3) + (var(--battle-grid-gap) * 2)), auto) minmax(76px, 0.62fr);
    gap: 6px;
    padding: 5px 6px;
  }

  .battle-center {
    grid-template-rows: 42px auto;
    gap: 5px;
  }

  .battle-scoreboard {
    min-height: 42px;
    padding: 0 6px;
  }

  .battle-scoreboard span {
    font-size: 9px;
  }

  .battle-scoreboard b {
    font-size: 14px;
  }

  .battle-scoreboard small {
    font-size: 9px;
  }

  .battle-scoreboard em {
    font-size: 7px;
  }
}

@media (orientation: portrait) {
  .game-page {
    --battle-hand-card-height: clamp(64px, 11vh, 96px);
    --battle-hand-card-width: calc(var(--battle-hand-card-height) * 0.73);
    --battle-grid-card-height: clamp(104px, 17vh, 154px);
    --battle-grid-card-width: calc(var(--battle-grid-card-height) * 0.73);
    --battle-grid-gap: clamp(6px, 1.2vw, 10px);
    height: 100%;
    grid-template-columns: 1fr;
    grid-template-rows: var(--battle-hand-card-height) minmax(0, auto) var(--battle-hand-card-height);
    align-content: space-between;
    gap: clamp(8px, 1.6vh, 14px);
    padding: clamp(8px, 1.8vh, 14px) clamp(8px, 2.6vw, 16px);
    overflow: hidden;
  }

  .battle-hand {
    min-height: 0;
    max-height: none;
    overflow: hidden;
    grid-template-columns: minmax(0, 1fr) minmax(0, 36%);
    grid-auto-flow: column;
    gap: clamp(6px, 1.8vw, 10px);
    align-items: center;
    justify-content: start;
  }

  .battle-character-hand,
  .battle-support-hand {
    grid-auto-flow: column;
    grid-auto-columns: var(--battle-hand-card-width);
    grid-template-columns: none;
    justify-content: start;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px;
    scrollbar-width: thin;
  }

  .battle-center {
    min-height: 0;
    gap: clamp(8px, 1.4vh, 12px);
    align-content: center;
    overflow: hidden;
  }

  .battle-scoreboard {
    min-height: 48px;
  }

  .battle-grid {
    max-width: 100%;
    justify-content: center;
  }

  .ai-hand {
    order: 3;
  }

  .battle-center {
    order: 2;
  }

  .player-hand {
    order: 1;
  }
}

@media (max-width: 600px) and (orientation: portrait) {
  .game-page {
    --battle-hand-card-height: clamp(54px, 10vh, 74px);
    --battle-hand-card-width: calc(var(--battle-hand-card-height) * 0.73);
    --battle-grid-card-height: clamp(82px, 16vh, 112px);
    --battle-grid-card-width: calc(var(--battle-grid-card-height) * 0.73);
    --battle-grid-gap: 6px;
    padding: 8px;
    gap: 8px;
  }

  .battle-hand {
    grid-template-columns: minmax(0, 1fr) minmax(0, 34%);
    gap: 6px;
  }

  .battle-scoreboard {
    width: min(100%, 280px);
    min-height: 42px;
    gap: 6px;
    padding: 0 8px;
  }

  .battle-scoreboard strong {
    font-size: 10px;
  }

  .battle-field-card .power {
    width: 22px;
    height: 22px;
    border-radius: 8px;
    font-size: 12px;
  }

  .battle-card-face .power {
    width: 16px;
    height: 16px;
    border-radius: 6px;
    font-size: 9px;
  }

  .battle-element-badge.icon {
    width: 24px;
    height: 24px;
    padding: 4px;
  }
}

.center-state,
.menu-page {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.small-modal {
  width: 383px;
  height: 116px;
  border-radius: 8px;
  background: var(--panel);
  display: grid;
  place-items: center;
  gap: 8px;
}

.online-waiting-modal {
  width: min(460px, calc(100vw - 48px));
  min-height: 340px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 12px;
  border-radius: 8px;
  padding: 24px;
  background: rgba(12, 26, 54, 0.92);
  border: 1px solid rgba(239, 184, 16, 0.32);
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.38);
}

.online-waiting-modal > strong {
  color: #fff;
  font-size: 19px;
}

.online-waiting-modal p,
.online-waiting-modal > small {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.online-waiting-modal .figma-button {
  width: 132px;
  height: 38px;
  font-size: 14px;
}

.online-player-search {
  width: 100%;
  display: grid;
  gap: 8px;
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.online-player-search header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #efb810;
  font-size: 12px;
  font-weight: 800;
}

.online-player-search header b {
  min-width: 28px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(47, 104, 255, 0.35);
  color: #fff;
}

.online-player-search ul {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 7px;
  list-style: none;
}

.online-empty-queue {
  min-height: 46px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.18);
  font-size: 12px;
  text-align: center;
}

.online-player-search li {
  min-height: 34px;
  display: grid;
  grid-template-columns: 10px 1fr auto;
  align-items: center;
  gap: 9px;
  border-radius: 7px;
  padding: 0 10px;
  background: rgba(0, 0, 0, 0.18);
}

.online-player-search li span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00d477;
  box-shadow: 0 0 10px rgba(0, 212, 119, 0.7);
}

.online-player-search li strong {
  min-width: 0;
  color: #fff;
  font-size: 12px;
}

.online-player-search li small {
  color: var(--muted);
  font-size: 10px;
}

.loader {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(255, 255, 255, 0.22);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.modal-layer {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.7);
}

.match-modal {
  width: 416px;
  display: grid;
  grid-template-columns: repeat(3, 128px);
  gap: 16px;
  align-items: center;
  justify-content: center;
}

.match-option {
  height: 53px;
  border-radius: 8px;
  background: rgba(15, 97, 165, 0.8);
  font-size: 16px;
}

.match-option:disabled,
.match-option.is-disabled {
  opacity: 0.42;
  cursor: not-allowed;
  filter: grayscale(0.45);
}

.cancel-link {
  grid-column: 1 / -1;
  justify-self: center;
  margin-top: 2px;
  background: transparent;
  font-size: 14px;
}

.wide-modal {
  width: 640px;
  min-height: 284px;
  border-radius: 8px;
  background: var(--panel);
  padding: 32px;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  position: relative;
}

.wide-modal h2 {
  margin: 0 0 12px;
  font-size: 20px;
}

.wide-modal p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.credits-modal {
  width: min(620px, calc(100vw - 34px));
  max-height: calc(100vh - 34px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 14px;
  position: relative;
  border-radius: 8px;
  padding: 24px;
  background: linear-gradient(180deg, rgba(18, 35, 80, 0.98), rgba(7, 13, 28, 0.98));
  box-shadow: inset 0 0 0 1px rgba(239, 184, 16, 0.48), 0 18px 44px rgba(0, 0, 0, 0.48);
}

.credits-modal header {
  padding-right: 38px;
}

.credits-modal small,
.credits-modal h3 {
  color: #efb810;
}

.credits-modal h2,
.credits-modal h3,
.credits-modal p {
  margin: 0;
}

.credits-modal h2 {
  margin-top: 3px;
  font-size: 24px;
}

.credits-modal header p,
.credits-modal li,
.credits-modal section p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.42;
}

.credits-content {
  min-height: 0;
  overflow-y: auto;
  display: grid;
  gap: 12px;
  padding-right: 8px;
}

.credits-content section {
  display: grid;
  gap: 6px;
}

.credits-content ul {
  margin: 0;
  padding-left: 18px;
}

.credits-modal footer {
  color: rgba(255, 255, 255, 0.62);
  font-size: 11px;
}

.news-detail-modal {
  width: min(340px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow-y: auto;
  border-radius: 8px;
  padding: 18px 17px 20px;
  background:
    linear-gradient(180deg, rgba(21, 45, 104, 0.96), rgba(31, 63, 142, 0.96)),
    var(--panel);
  box-shadow: inset 0 0 0 1px rgba(239, 184, 16, 0.48), 0 18px 44px rgba(0, 0, 0, 0.48);
}

.news-detail-modal h2 {
  margin: 0;
  max-width: calc(100% - 34px);
  color: #ffc400;
  font-size: 21px;
  line-height: 1.08;
}

.news-detail-modal h3 {
  margin: 0;
  color: #ffd04a;
  font-size: 14px;
  line-height: 1.35;
}

.news-detail-modal time {
  color: rgba(255, 255, 255, 0.68);
  font-size: 11px;
}

.news-detail-modal img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px rgba(239, 184, 16, 0.38);
}

.news-detail-content {
  display: grid;
  gap: 12px;
}

.news-detail-content p {
  margin: 0;
  color: #fff;
  font-size: 12px;
  line-height: 1.42;
}

.news-detail-modal .figma-button {
  width: 84px;
  height: 34px;
  align-self: end;
  margin-top: 2px;
  font-size: 12px;
}

.offer-image {
  width: 300px;
  height: 200px;
  max-width: 100%;
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 44%, rgba(255, 255, 255, 0.28), transparent 20%),
    linear-gradient(135deg, #3b2d8c, #0d7faf);
}

.pack-opening-modal {
  width: min(760px, calc(100vw - 36px));
  min-height: 360px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 12px;
  position: relative;
  border-radius: 8px;
  padding: 28px 32px;
  background:
    radial-gradient(circle at 50% 42%, rgba(239, 184, 16, 0.2), transparent 34%),
    linear-gradient(180deg, rgba(18, 35, 80, 0.98), rgba(7, 13, 28, 0.98));
  box-shadow: inset 0 0 0 1px rgba(239, 184, 16, 0.56), 0 20px 50px rgba(0, 0, 0, 0.5);
}

.pack-opening-modal small {
  color: #efb810;
  font-size: 12px;
  font-weight: 800;
}

.pack-opening-modal h2 {
  margin: 0;
  font-size: 24px;
}

.pack-opening-animation {
  width: 126px;
  aspect-ratio: 70 / 108;
  display: grid;
  place-items: center;
  animation: packPulse 880ms ease-in-out infinite alternate;
  filter: drop-shadow(0 18px 28px rgba(239, 184, 16, 0.22));
}

.pack-opening-animation img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@keyframes packPulse {
  from {
    transform: translateY(0) scale(1) rotate(-1deg);
  }

  to {
    transform: translateY(-8px) scale(1.05) rotate(1deg);
  }
}

.pack-result-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 156px));
  justify-content: center;
  gap: 18px;
}

.pack-result-card {
  display: grid;
  place-items: center;
  animation: cardReveal 420ms ease both;
}

.pack-result-card:nth-child(2) {
  animation-delay: 110ms;
}

.pack-result-card:nth-child(3) {
  animation-delay: 220ms;
}

@keyframes cardReveal {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.92);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.pack-result-card .deck-card-face {
  width: 156px;
  height: 218px;
}

.pack-opening-modal .figma-button {
  width: 220px;
  height: 38px;
  font-size: 16px;
}

.pack-opening-error {
  max-width: 420px;
  margin: 0;
  color: #ffca4b;
  text-align: center;
  font-size: 13px;
}

.link-cta,
.close-cta {
  background: transparent;
  color: #fff;
  font-size: 14px;
  padding: 0;
}

.close-cta {
  position: absolute;
  left: 293px;
  bottom: 18px;
}

.card-info-modal {
  width: 900px;
  min-height: 318px;
  height: 450px;
  max-height: 500px;
  grid-template-columns: 1fr 2fr;
  align-items: stretch;
  overflow: hidden;
}

.info-card {
  width: min(100%, 246px);
  height: 348px;
  justify-self: center;
}

.info-card .power {
  display: none;
}

.card-detail-copy {
  min-height: 0;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 8px 14px 0;
}

.modal-close-icon {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.modal-close-icon::before,
.modal-close-icon::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  top: 15px;
  height: 2px;
  border-radius: 2px;
  background: #fff;
}

.modal-close-icon::before {
  transform: rotate(45deg);
}

.modal-close-icon::after {
  transform: rotate(-45deg);
}

.card-detail-copy h2 {
  margin-bottom: 4px;
}

.card-subtitle {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
}

.card-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.card-pill,
.card-power-grid div {
  min-height: 42px;
  display: grid;
  align-content: center;
  gap: 2px;
  border-radius: 8px;
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.card-pill small,
.card-power-grid small,
.card-text-block small {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.card-pill strong {
  font-size: 13px;
}

.card-power-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.card-power-grid strong {
  font-size: 18px;
}

.card-text-block {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
}

.card-text-block p {
  margin: 0;
}

.menu-card {
  width: 812px;
  height: 375px;
  padding: 32px 64px 40px 88px;
  background: rgba(0, 0, 0, 0.72);
  position: relative;
}

.guide-page {
  width: min(1080px, calc(100vw - 48px));
  height: calc(100vh - 92px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  border-radius: 8px;
  padding: 18px;
  background: rgba(0, 0, 0, 0.58);
  box-shadow: inset 0 0 0 1px rgba(239, 184, 16, 0.22);
  overflow: hidden;
}

.guide-hero {
  display: grid;
  gap: 4px;
  border-radius: 8px;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(15, 97, 165, 0.62), rgba(45, 14, 80, 0.62));
}

.guide-hero small {
  color: #efb810;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.guide-hero h2,
.guide-hero p {
  margin: 0;
}

.guide-hero h2 {
  font-size: 22px;
}

.guide-hero p {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  line-height: 1.4;
}

.guide-accordion {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 8px;
  overflow: auto;
  padding-right: 4px;
}

.guide-accordion details {
  border-radius: 8px;
  background: rgba(12, 34, 71, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.guide-accordion details[open] {
  border-color: rgba(239, 184, 16, 0.34);
  background: rgba(12, 34, 71, 0.9);
}

.guide-accordion summary {
  min-height: 44px;
  display: grid;
  grid-template-columns: 1fr 22px;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}

.guide-accordion summary::-webkit-details-marker {
  display: none;
}

.guide-accordion summary::after {
  content: "";
  width: 8px;
  height: 8px;
  justify-self: center;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 140ms ease;
}

.guide-accordion details[open] summary {
  color: #efb810;
}

.guide-accordion details[open] summary::after {
  transform: rotate(225deg);
}

.guide-accordion p {
  margin: 0;
  padding: 0 14px 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.42;
}

.glossary-page {
  width: min(1080px, calc(100vw - 48px));
  height: calc(100vh - 92px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  border-radius: 8px;
  padding: 18px;
  background: rgba(0, 0, 0, 0.58);
  box-shadow: inset 0 0 0 1px rgba(239, 184, 16, 0.22);
  overflow: hidden;
}

.glossary-accordion {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 10px;
  overflow: auto;
  padding-right: 4px;
}

.glossary-accordion details {
  border-radius: 8px;
  background: rgba(12, 34, 71, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.glossary-accordion details[open] {
  border-color: rgba(239, 184, 16, 0.34);
  background: rgba(12, 34, 71, 0.9);
}

.glossary-accordion summary {
  min-height: 46px;
  display: grid;
  grid-template-columns: 1fr 22px;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
  list-style: none;
}

.glossary-accordion summary::-webkit-details-marker {
  display: none;
}

.glossary-accordion summary::after {
  content: "";
  width: 8px;
  height: 8px;
  justify-self: center;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 140ms ease;
}

.glossary-accordion details[open] summary {
  color: #efb810;
}

.glossary-accordion details[open] summary::after {
  transform: rotate(225deg);
}

.glossary-list,
.glossary-row-list,
.combo-guide {
  max-height: 44vh;
  overflow: auto;
  display: grid;
  gap: 10px;
  padding: 0 14px 34px;
  scroll-padding-bottom: 34px;
}

.glossary-list,
.combo-guide {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.glossary-row-list {
  grid-template-columns: 1fr;
  padding-bottom: 42px;
}

.glossary-list article,
.glossary-row,
.combo-guide article,
.glossary-note {
  display: grid;
  gap: 6px;
  border-radius: 8px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.glossary-row {
  grid-template-columns: 1fr;
  align-items: start;
  gap: 8px;
}

.glossary-list strong,
.glossary-row strong,
.combo-guide strong,
.glossary-note strong {
  color: #fff;
  font-size: 13px;
}

.glossary-list p,
.glossary-row p,
.combo-guide p,
.glossary-note p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.42;
}

.glossary-owned-cards {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 6px;
}

.glossary-owned-cards button {
  max-width: 172px;
  min-height: 30px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 4px 10px 4px 5px;
  background: rgba(15, 97, 165, 0.58);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
}

.glossary-owned-cards img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
}

.glossary-owned-cards span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.glossary-card-empty {
  color: rgba(255, 255, 255, 0.48);
  font-size: 11px;
  font-weight: 700;
}

.glossary-list small {
  color: #efb810;
  font-size: 10px;
  font-weight: 800;
}

.glossary-note {
  margin: 0 14px 14px;
}

@media (max-width: 900px) and (orientation: landscape) {
  .guide-page {
    width: calc(100vw - 28px);
    height: calc(100vh - 78px);
    padding: 12px;
    gap: 10px;
  }

  .guide-hero {
    padding: 10px 12px;
  }

  .guide-hero h2 {
    font-size: 18px;
  }

  .guide-hero p {
    font-size: 11px;
  }

  .guide-accordion {
    gap: 8px;
  }

  .guide-accordion summary {
    min-height: 36px;
    padding: 0 11px;
    font-size: 12px;
  }

  .guide-accordion p {
    padding: 0 11px 11px;
    font-size: 10px;
  }

  .glossary-page {
    width: calc(100vw - 28px);
    height: calc(100vh - 78px);
    padding: 12px;
    gap: 10px;
  }

  .glossary-accordion summary {
    min-height: 38px;
    padding: 0 12px;
    font-size: 13px;
  }

  .glossary-list,
  .glossary-row-list,
  .combo-guide {
    max-height: 42vh;
    gap: 8px;
    padding: 0 10px 30px;
    scroll-padding-bottom: 30px;
  }

  .glossary-list article,
  .glossary-row,
  .combo-guide article,
  .glossary-note {
    padding: 9px;
  }

  .glossary-row {
    grid-template-columns: 1fr;
  }

  .glossary-list p,
  .glossary-row p,
  .combo-guide p,
  .glossary-note p {
    font-size: 10px;
  }

  .glossary-owned-cards button {
    max-width: 136px;
    min-height: 28px;
    font-size: 9px;
  }
}

.profile-page {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
}

.profile-layout {
  width: min(620px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.86fr);
  gap: 28px;
  align-items: stretch;
}

.profile-summary-box,
.ranked-summary-box {
  min-height: 238px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.62);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16), 0 14px 32px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(7px);
}

.profile-summary-box {
  display: grid;
  align-content: start;
  gap: 24px;
  padding: 28px 22px;
}

.profile-main-row {
  display: grid;
  grid-template-columns: 72px 1fr;
  align-items: center;
  gap: 16px;
}

.profile-avatar {
  width: 62px;
  height: 62px;
  display: block;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 34%, #f2f5ff 0 13%, transparent 14%),
    radial-gradient(circle at 50% 78%, #f2f5ff 0 26%, transparent 27%),
    radial-gradient(circle, rgba(28, 118, 189, 0.55), rgba(4, 11, 24, 0.96));
  box-shadow: inset 0 0 0 2px #2d7fe0, 0 0 0 4px rgba(255, 255, 255, 0.08);
}

.profile-name-block {
  min-width: 0;
}

.profile-name-block h2 {
  display: inline;
  margin: 0;
  font-size: 20px;
  font-weight: 500;
}

.profile-name-block small {
  margin-left: 6px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 13px;
}

.profile-name-block button {
  display: block;
  margin-top: 3px;
  padding: 0;
  background: transparent;
  color: #efb810;
  border-bottom: 1px solid currentColor;
  font-size: 12px;
}

.profile-cta-list {
  display: grid;
  justify-items: center;
  gap: 10px;
}

.profile-cta-list button {
  width: min(212px, 100%);
  height: 34px;
  border-radius: 7px;
  background:
    linear-gradient(90deg, rgba(21, 61, 139, 0.9), rgba(13, 37, 96, 0.9)),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.04) 0 8px, transparent 8px 16px);
  box-shadow: inset 0 0 0 1px rgba(59, 123, 255, 0.48), 0 6px 12px rgba(0, 0, 0, 0.22);
  font-size: 13px;
  font-weight: 700;
}

.ranked-summary-box {
  display: grid;
  justify-items: center;
  align-content: center;
  padding: 20px 18px;
}

.ranked-summary-box > small {
  margin-bottom: 12px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
}

.rank-medal {
  width: 112px;
  height: 112px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 17%, rgba(255, 255, 255, 0.18), transparent 20%),
    linear-gradient(180deg, #f2114d, #c7093e);
  box-shadow: inset 0 -10px 0 rgba(0, 0, 0, 0.16), 0 0 0 3px #080b12, 0 0 0 5px #b0093f;
}

.rank-medal strong {
  color: #07070b;
  font-size: 13px;
}

.rank-progress-row {
  width: 140px;
  display: flex;
  justify-content: space-between;
  margin-top: 14px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 10px;
}

.rank-progress-track {
  width: 140px;
  height: 5px;
  margin-top: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.rank-progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff1a62, #d20b4e);
}

.ranked-summary-box em {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 9px;
  font-style: normal;
}

.ranked-summary-box b {
  margin-top: 10px;
  font-size: 17px;
}

.ranked-summary-box p {
  margin: 2px 0 0;
  color: rgba(255, 255, 255, 0.42);
  font-size: 10px;
}

.profile-info {
  display: flex;
  gap: 24px;
  align-items: center;
}

.large-user {
  width: 89px;
  height: 75px;
}

.profile-info h2,
.settings-card h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.profile-info button {
  background: transparent;
  padding: 0;
  border-bottom: 1px solid #fff;
  font-size: 12px;
}

.profile-info p {
  margin: 12px 0 0;
}

.menu-buttons {
  position: absolute;
  left: 119px;
  bottom: 80px;
  display: flex;
  gap: 18px;
}

.menu-buttons button {
  width: 138px;
  height: 24px;
  border-radius: 24px;
  background: linear-gradient(180deg, #1c76bd, #0f4f8e);
  font-size: 13px;
}

.rank-box {
  position: absolute;
  right: 86px;
  bottom: 76px;
  display: grid;
  gap: 8px;
}

.rank-box small {
  color: var(--muted);
}

.rank-box strong {
  font-size: 20px;
}

.tool-icon {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  margin-bottom: 10px;
}

.settings-card {
  display: grid;
  place-items: center;
  align-content: center;
}

.settings-card .menu-buttons {
  position: static;
  margin-top: 48px;
}

.event-list {
  margin-top: 30px;
  display: grid;
  gap: 14px;
}

.event-list article {
  width: 520px;
  min-height: 54px;
  border-radius: 8px;
  background: rgba(15, 97, 165, 0.55);
  padding: 10px 18px;
}

.event-list strong,
.event-list small {
  display: block;
}

.event-list small {
  color: var(--muted);
}

.events-page {
  width: calc(100% - 28px);
  height: calc(100% - 22px);
  overflow: auto;
}

.rankings-page {
  width: min(736px, calc(100% - 64px));
  height: calc(100% - 84px);
  display: grid;
  align-content: start;
}

.rankings-board {
  display: grid;
  gap: 8px;
  border-radius: 8px;
  padding: 22px;
  background: linear-gradient(135deg, rgba(35, 12, 69, 0.95), rgba(80, 20, 104, 0.92));
  box-shadow: inset 0 0 0 1px rgba(239, 184, 16, 0.36), 0 18px 38px rgba(0, 0, 0, 0.34);
}

.ranking-row {
  min-height: 66px;
  display: grid;
  grid-template-columns: 34px 38px 1fr auto;
  align-items: center;
  gap: 12px;
  border-radius: 7px;
  padding: 10px 16px 10px 20px;
  background: rgba(34, 10, 69, 0.82);
  box-shadow: inset 0 0 0 1px rgba(239, 184, 16, 0.22);
}

.ranking-row.leader {
  min-height: 68px;
  background: linear-gradient(90deg, rgba(98, 63, 45, 0.9), rgba(93, 46, 66, 0.86));
  box-shadow: inset 0 0 0 1px rgba(239, 184, 16, 0.58);
}

.ranking-row.empty {
  grid-template-columns: 1fr;
}

.ranking-medal {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: #c7d2e7;
  font-size: 0;
}

.ranking-medal span {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid currentColor;
  color: currentColor;
  font-size: 9px;
  font-weight: 900;
}

.ranking-medal.gold {
  color: #efb810;
}

.ranking-medal.silver {
  color: #d5d7e3;
}

.ranking-medal.bronze {
  color: #ff7900;
}

.ranking-avatar {
  width: 36px;
  height: 36px;
  display: block;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 34%, #f2f5ff 0 12%, transparent 13%),
    radial-gradient(circle at 50% 78%, #f2f5ff 0 24%, transparent 25%),
    radial-gradient(circle, rgba(38, 105, 167, 0.55), rgba(7, 8, 18, 0.96));
  box-shadow: inset 0 0 0 2px rgba(239, 184, 16, 0.42), 0 0 0 3px rgba(0, 0, 0, 0.26);
}

.ranking-player {
  min-width: 0;
}

.ranking-player strong {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 15px;
}

.ranking-player strong b {
  width: 9px;
  height: 9px;
  display: inline-block;
  background: #efb810;
  clip-path: polygon(50% 0, 62% 35%, 100% 35%, 69% 56%, 82% 100%, 50% 73%, 18% 100%, 31% 56%, 0 35%, 38% 35%);
}

.ranking-player small {
  display: block;
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 10px;
}

.ranking-player em {
  margin-left: 8px;
  color: #00d477;
  font-style: normal;
  font-weight: 800;
}

.ranking-points {
  display: grid;
  justify-items: end;
  gap: 1px;
}

.ranking-points strong {
  color: #efb810;
  font-size: 20px;
  line-height: 1;
}

.ranking-points small {
  color: rgba(255, 255, 255, 0.58);
  font-size: 10px;
}

.events-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 2px;
}

.event-card {
  min-height: 217px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 12px;
  border-radius: 8px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(17, 42, 92, 0.96), rgba(27, 57, 127, 0.92));
  box-shadow: inset 0 0 0 1px rgba(239, 184, 16, 0.35), 0 14px 30px rgba(0, 0, 0, 0.28);
}

.event-card.empty {
  grid-column: 1 / -1;
}

.event-card header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: start;
}

.event-card strong {
  display: block;
  font-size: 16px;
}

.event-card strong span {
  color: #efb810;
}

.event-card b {
  color: #efb810;
  font-size: 14px;
}

.event-card small {
  display: block;
  margin-top: 2px;
  color: #efb810;
  font-size: 12px;
  font-weight: 800;
}

.event-card em {
  min-width: 38px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: 999px;
  background: rgba(15, 97, 165, 0.72);
  color: #cfe5ff;
  box-shadow: inset 0 0 0 1px rgba(105, 169, 255, 0.48);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.event-card em span {
  width: 12px;
  height: 12px;
  display: block;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 28%, transparent 0 25%, #cfe5ff 27% 43%, transparent 45%),
    radial-gradient(ellipse at 50% 82%, #cfe5ff 0 42%, transparent 44%);
}

.event-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  line-height: 1.42;
}

.event-card-footer {
  display: grid;
  gap: 10px;
}

.event-card mark {
  min-height: 26px;
  display: flex;
  align-items: center;
  border-radius: 6px;
  padding: 0 10px;
  background: rgba(116, 69, 142, 0.64);
  color: #ffd932;
  box-shadow: inset 0 0 0 1px rgba(239, 184, 16, 0.44);
  font-size: 11px;
  font-weight: 800;
}

.event-card mark::before {
  content: "";
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff3a7, #efb810 58%, #8f6408);
  box-shadow: 0 0 6px rgba(239, 184, 16, 0.5);
}

.event-card button {
  height: 25px;
  border-radius: 5px;
  background: linear-gradient(90deg, #2f68ff, #b311ef);
  font-size: 11px;
  font-weight: 800;
}

.campaign-page {
  width: min(700px, calc(100% - 96px));
  height: calc(100% - 72px);
  padding: 0;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
}

.campaign-page h2 {
  margin: 0;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
}

.campaign-status {
  position: absolute;
  right: 0;
  top: 0;
  display: grid;
  justify-items: end;
  gap: 2px;
}

.campaign-status span {
  color: var(--muted);
  font-size: 11px;
}

.campaign-status strong {
  color: #efb810;
  font-size: 26px;
}

.campaign-level-list {
  height: calc(100% - 54px);
  margin-top: 22px;
  display: grid;
  gap: 10px;
  overflow: auto;
  padding-right: 6px;
}

.campaign-level-card {
  min-height: 58px;
  display: grid;
  grid-template-columns: 1fr 118px;
  align-items: center;
  gap: 14px;
  border-radius: 8px;
  padding: 10px 14px;
  background: rgba(15, 97, 165, 0.38);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.campaign-level-card.completed {
  background: rgba(16, 92, 58, 0.46);
}

.campaign-level-card.active {
  background: rgba(15, 97, 165, 0.62);
  box-shadow: inset 0 0 0 1px rgba(239, 184, 16, 0.5), 0 0 18px rgba(239, 184, 16, 0.12);
}

.campaign-level-card.locked {
  filter: grayscale(0.45);
  opacity: 0.62;
}

.campaign-level-card.empty {
  grid-template-columns: 1fr;
}

.campaign-level-card small,
.campaign-level-card span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.campaign-level-card strong {
  display: block;
  margin: 2px 0;
  font-size: 15px;
}

.campaign-level-card button {
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(180deg, #1c76bd, #0f4f8e);
  font-size: 12px;
  font-weight: 800;
}

.campaign-level-card button:disabled {
  cursor: default;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.62);
}

.daily-pass-view {
  position: absolute;
  inset: 56px 0 0;
  display: grid;
  grid-template-rows: auto auto auto 1fr 1fr auto;
  gap: 10px;
  padding: 8px 16px 10px;
}

.daily-pass-progress {
  min-height: 88px;
  display: grid;
  align-content: center;
  gap: 4px;
  border-radius: 8px;
  padding: 18px 16px;
  background: rgba(5, 10, 24, 0.86);
  box-shadow: inset 0 0 0 1px rgba(239, 184, 16, 0.5);
}

.daily-pass-progress strong {
  font-size: 15px;
}

.daily-pass-progress span {
  color: var(--muted);
  font-size: 13px;
}

.daily-pass-progress em {
  color: #ffca4b;
  font-size: 11px;
  font-style: normal;
}

.daily-pass-track {
  width: 100%;
  height: 8px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.26);
}

.daily-pass-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #efb810, #7e37ff);
}

.daily-pass-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.daily-pass-pager button {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: #fff;
  color: #ef9900;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.daily-pass-pager button::before {
  content: "";
  display: block;
  width: 7px;
  height: 7px;
  margin: auto;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
}

.daily-pass-pager button:first-child::before {
  transform: rotate(225deg);
}

.daily-pass-pager button:disabled {
  opacity: 0.48;
}

.daily-pass-pager strong {
  font-size: 13px;
}

.daily-pass-levels,
.daily-pass-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.daily-pass-columns-1 {
  grid-template-columns: minmax(104px, 114px);
  justify-content: center;
}

.daily-pass-levels {
  align-items: end;
  padding: 0 44px;
}

.daily-pass-levels span {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  justify-self: center;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
  background: rgba(6, 14, 28, 0.68);
  box-shadow: inset 0 0 0 1px rgba(143, 173, 214, 0.48);
}

.daily-pass-grid {
  min-height: 0;
}

.daily-pass-reward {
  min-width: 0;
  min-height: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  border-radius: 7px;
  background: rgba(4, 9, 19, 0.54);
  box-shadow: inset 0 0 0 1px rgba(239, 184, 16, 0.46);
  backdrop-filter: blur(3px);
}

.daily-pass-reward.premium {
  box-shadow: inset 0 0 0 1px rgba(239, 184, 16, 0.55);
}

.daily-pass-reward.standard {
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.86);
}

.daily-pass-reward.standard:nth-child(7) {
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.86);
}

.daily-pass-reward.locked {
  opacity: 0.6;
}

.daily-pass-reward.locked .reward-icon::before {
  content: "";
  width: 14px;
  height: 11px;
  border: 2px solid rgba(255, 255, 255, 0.48);
  border-radius: 2px;
}

.daily-pass-reward.locked .reward-icon::after {
  content: "";
  position: absolute;
  top: -7px;
  left: 5px;
  width: 8px;
  height: 9px;
  border: 2px solid rgba(255, 255, 255, 0.48);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
}

.reward-icon {
  position: relative;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  color: #efb810;
}

.daily-pass-reward.unlocked .reward-icon::before {
  content: "";
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 35%, #fff3a6, #e8a718 68%),
    #efb810;
}

.daily-pass-reward strong {
  color: #efb810;
  font-size: 10px;
  line-height: 1;
}

.daily-pass-reward small {
  color: rgba(255, 255, 255, 0.76);
  font-size: 8px;
}

.daily-pass-legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.daily-pass-legend article {
  min-height: 56px;
  display: grid;
  align-content: center;
  gap: 6px;
  border-radius: 7px;
  padding: 0 14px;
  background: rgba(4, 9, 19, 0.7);
}

.daily-pass-legend article.premium {
  background: linear-gradient(90deg, rgba(95, 48, 14, 0.92), rgba(53, 23, 8, 0.72));
  box-shadow: inset 0 0 0 1px rgba(239, 184, 16, 0.72);
}

.daily-pass-legend article.standard {
  box-shadow: inset 0 0 0 1px rgba(143, 173, 214, 0.36);
}

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

.daily-pass-legend span {
  color: var(--muted);
  font-size: 11px;
}

@media (max-width: 900px) and (orientation: landscape), (max-height: 390px) and (orientation: landscape) {
  .premium-pass-cta {
    min-width: 188px;
    height: 34px;
    padding: 0 12px;
    font-size: 11px;
  }

  .compact-topbar h1 {
    font-size: 20px;
  }

  .daily-pass-view {
    inset: 20px 0 0;
    grid-template-rows: auto auto auto minmax(52px, 1fr) minmax(52px, 1fr) auto;
    gap: 6px;
    padding: 0 16px 8px;
    overflow: hidden;
  }

  .daily-pass-progress {
    min-height: 66px;
    gap: 2px;
    padding: 10px 14px;
  }

  .daily-pass-progress strong {
    font-size: 13px;
  }

  .daily-pass-progress span {
    font-size: 11px;
  }

  .daily-pass-progress em {
    font-size: 9px;
  }

  .daily-pass-track {
    height: 6px;
    margin-top: 6px;
  }

  .daily-pass-pager {
    gap: 8px;
  }

  .daily-pass-pager button {
    width: 22px;
    height: 22px;
  }

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

  .daily-pass-levels,
  .daily-pass-grid {
    gap: 5px;
  }

  .daily-pass-levels {
    padding: 0 34px;
  }

  .daily-pass-levels span {
    width: 22px;
    height: 22px;
    font-size: 11px;
  }

  .daily-pass-reward {
    gap: 2px;
    min-height: 52px;
    border-radius: 6px;
  }

  .reward-icon {
    width: 18px;
    height: 18px;
  }

  .daily-pass-reward.locked .reward-icon::before {
    width: 11px;
    height: 9px;
    border-width: 1.5px;
  }

  .daily-pass-reward.locked .reward-icon::after {
    top: -6px;
    left: 4px;
    width: 7px;
    height: 8px;
    border-width: 1.5px;
    border-bottom: 0;
  }

  .daily-pass-reward.unlocked .reward-icon::before {
    width: 13px;
    height: 13px;
  }

  .daily-pass-reward strong {
    font-size: 8px;
  }

  .daily-pass-reward small {
    font-size: 7px;
  }

  .daily-pass-legend {
    gap: 8px;
  }

  .daily-pass-legend article {
    min-height: 42px;
    gap: 3px;
    padding: 0 12px;
  }

  .daily-pass-legend strong {
    font-size: 10px;
  }

  .daily-pass-legend span {
    font-size: 9px;
  }
}

@media (max-width: 700px) and (orientation: landscape) {
  .premium-pass-cta {
    min-width: 166px;
    height: 30px;
    font-size: 10px;
  }

  .compact-topbar {
    padding: 0 24px;
  }

  .compact-topbar h1 {
    font-size: 18px;
  }

  .daily-pass-view {
    grid-template-rows: auto auto auto minmax(46px, 1fr) minmax(46px, 1fr) auto;
    gap: 5px;
    padding: 0 10px 6px;
  }

  .daily-pass-progress {
    min-height: 54px;
    padding: 8px 12px;
  }

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

  .daily-pass-track {
    height: 5px;
    margin-top: 4px;
  }

  .daily-pass-levels {
    padding: 0 24px;
  }

  .daily-pass-levels,
  .daily-pass-grid {
    gap: 4px;
  }

  .daily-pass-levels span {
    width: 20px;
    height: 20px;
    font-size: 10px;
  }

  .daily-pass-reward {
    min-height: 46px;
  }

  .daily-pass-legend article {
    min-height: 36px;
    padding: 0 10px;
  }
}

.feedback-modal {
  grid-template-columns: 1fr;
}

.feedback-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
}

.feedback-actions .figma-button {
  width: 132px;
}

.feedback-actions .figma-button.secondary {
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.feedback-field {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.feedback-field span {
  color: var(--muted);
  font-size: 12px;
}

.feedback-field textarea {
  width: 100%;
  min-height: 96px;
  resize: none;
  border: 0;
  border-radius: 8px;
  padding: 12px;
  color: #111;
}

@media (max-aspect-ratio: 812 / 375) {
  #app {
    width: 100vw;
    height: calc(100vw * 375 / 812);
  }
}

@media (orientation: portrait) {
  .orientation-guard {
    position: fixed;
    inset: 0;
    z-index: 999;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
      linear-gradient(180deg, rgba(2, 7, 15, 0.9), rgba(2, 7, 15, 0.96)),
      url("assets/intro.jpg") center / cover no-repeat,
      #050711;
  }

  .td-shell,
  .login-screen {
    pointer-events: none;
    filter: blur(2px) brightness(0.7);
  }
}
