:root {
  --accent: #b64cff;
  --accent-2: #ff3cac;
  --gold: #ffd329;
  --green: #66dc42;
  --danger: #ff4c5e;
  --ink: #170e27;
  --muted: #817b8d;
  --line: #e9e6ee;
  --surface: #ffffff;
  --surface-soft: #f7f6fa;
  --shadow: 0 22px 70px rgba(25, 11, 45, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #f5f3f8;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: #f5f3f8;
}

button,
input,
select,
textarea {
  font: inherit;
}

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

button {
  border: 0;
  cursor: pointer;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent);
  outline-offset: 2px;
}

img {
  max-width: 100%;
}

.icon-button {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  background: transparent;
  color: inherit;
  transition: 160ms ease;
}

.icon-button:hover {
  background: rgba(127, 95, 157, 0.1);
}

.public-stage {
  min-height: 100vh;
  padding: 18px 20px 48px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 10%, rgba(146, 59, 255, 0.16), transparent 28%),
    radial-gradient(circle at 82% 78%, rgba(255, 52, 187, 0.1), transparent 30%),
    #07030f;
}

.public-stage::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.16;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
}

.public-toolbar {
  max-width: 1120px;
  min-height: 52px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: relative;
  z-index: 3;
}

.public-toolbar-copy {
  color: #c5b9d7;
  font-size: 13px;
  letter-spacing: 0.02em;
}

.public-toolbar-copy strong {
  color: #fff;
  display: block;
  font-size: 15px;
}

.admin-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 15px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  backdrop-filter: blur(16px);
  transition: 160ms ease;
}

.admin-link:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.14);
}

.phone-wrap {
  width: min(100%, 430px);
  margin: 0 auto;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 36px 80px rgba(0, 0, 0, 0.45));
}

.phone {
  min-height: 820px;
  border: 6px solid #171122;
  border-radius: 42px;
  overflow: hidden;
  position: relative;
  color: #fff;
  background:
    radial-gradient(circle at 85% 5%, rgba(163, 69, 255, 0.18), transparent 25%),
    linear-gradient(180deg, #130621 0%, #090511 75%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.07),
    0 0 0 1px rgba(138, 92, 181, 0.14);
}

.phone.overlay-active {
  height: min(820px, calc(100vh - 88px));
  min-height: 620px;
}

.phone::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: 36px;
  box-shadow: inset 0 0 60px rgba(105, 34, 154, 0.09);
}

.phone-notch {
  position: absolute;
  z-index: 20;
  width: 120px;
  height: 27px;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  background: #050308;
  border-radius: 0 0 18px 18px;
}

.phone-status {
  height: 36px;
  padding: 10px 24px 2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(255, 255, 255, 0.78);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.phone-header {
  height: 74px;
  padding: 10px 17px 14px;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  border-bottom: 1px solid rgba(189, 75, 255, 0.26);
  box-shadow: 0 2px 0 rgba(118, 35, 177, 0.12);
  background: rgba(18, 7, 31, 0.88);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 12;
}

.round-action {
  width: 39px;
  height: 39px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 18px rgba(255, 255, 255, 0.04);
  transition: 160ms ease;
}

.round-action:hover {
  transform: scale(1.04);
  border-color: rgba(255, 255, 255, 0.28);
}

.brand-mark {
  text-align: center;
  line-height: 0.82;
  letter-spacing: -0.03em;
  font-weight: 1000;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
}

.brand-mark span {
  display: block;
  font-size: 22px;
}

.brand-mark span:last-child {
  color: #ff63e6;
  text-shadow: 0 0 14px rgba(255, 67, 210, 0.55);
}

.phone-body {
  min-height: 646px;
  padding: 14px 13px 96px;
  position: relative;
  z-index: 2;
}

.home-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.village-button {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 10px;
  padding: 0 10px;
  color: rgba(255, 255, 255, 0.62);
  background: linear-gradient(#396a3c, #264729);
  border-bottom: 4px solid #1b321d;
  font-size: 13px;
  font-weight: 900;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  transition: 160ms ease;
}

.village-button.active {
  color: #fff;
  background: linear-gradient(#6bd638, #38981e);
  border-bottom-color: #216912;
  box-shadow: 0 0 20px rgba(100, 226, 51, 0.18);
}

.primary-cta {
  width: 100%;
  min-height: 52px;
  margin-top: 9px;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(#f14845, #c61f28);
  border-bottom: 5px solid #82121c;
  font-size: 15px;
  font-weight: 1000;
  letter-spacing: 0.01em;
  text-shadow: 0 2px 2px rgba(89, 0, 0, 0.45);
  box-shadow: 0 7px 16px rgba(229, 39, 54, 0.18);
}

.announcement {
  margin-top: 10px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(163, 93, 255, 0.28);
  border-radius: 11px;
  color: #e9ddff;
  background: linear-gradient(90deg, rgba(93, 43, 165, 0.3), rgba(255, 55, 193, 0.08));
}

.announcement-icon {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: rgba(169, 91, 255, 0.2);
}

.announcement strong {
  display: block;
  font-size: 11px;
}

.announcement span {
  display: block;
  margin-top: 2px;
  color: #a99cb8;
  font-size: 9px;
}

.hall-stack {
  margin-top: 10px;
  display: grid;
  gap: 10px;
}

.hall-card,
.favorite-card {
  width: 100%;
  height: 113px;
  padding: 0;
  overflow: hidden;
  position: relative;
  text-align: left;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 13px;
  background-position: center;
  background-size: cover;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22);
  isolation: isolate;
}

.favorite-card {
  border: 2px solid rgba(255, 202, 17, 0.74);
  background-color: #3d2106;
}

.hall-card::before,
.favorite-card::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.53) 58%, rgba(0, 0, 0, 0.15));
}

.favorite-card::before {
  background: linear-gradient(90deg, rgba(59, 29, 0, 0.94), rgba(74, 41, 0, 0.62), rgba(0, 0, 0, 0.24));
}

.hall-card:hover .card-arrow,
.favorite-card:hover .card-arrow {
  transform: translateX(2px);
}

.hall-copy {
  height: 100%;
  padding: 19px 17px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.eyebrow {
  display: block;
  color: #f2be36;
  font-size: 9px;
  font-weight: 1000;
  letter-spacing: 0.15em;
}

.hall-title {
  margin-top: 4px;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: 29px;
  font-style: italic;
  letter-spacing: 0.02em;
  line-height: 1;
  text-shadow: 0 3px 10px #000;
}

.hall-meta {
  width: max-content;
  margin-top: 7px;
  padding: 3px 8px;
  color: #c6becf;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.46);
  font-size: 9px;
  font-weight: 800;
}

.card-arrow {
  width: 36px;
  height: 36px;
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #1d1626;
  background: rgba(255, 255, 255, 0.93);
  font-size: 22px;
  font-weight: 900;
  transition: 160ms ease;
}

.favorite-card .card-arrow {
  background: var(--gold);
}

.phone-bottom-nav {
  position: absolute;
  z-index: 14;
  left: 0;
  right: 0;
  bottom: 0;
  min-height: 75px;
  padding: 8px 6px 10px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  border-top: 1px solid rgba(168, 84, 229, 0.24);
  background: rgba(11, 5, 19, 0.96);
  backdrop-filter: blur(18px);
}

.bottom-nav-item {
  min-width: 0;
  padding: 5px 2px;
  border-radius: 10px;
  color: #81778e;
  background: transparent;
  font-size: 9px;
  font-weight: 800;
  transition: 160ms ease;
}

.bottom-nav-item .nav-emoji {
  display: block;
  margin-bottom: 3px;
  font-size: 19px;
  filter: grayscale(0.5);
}

.bottom-nav-item.active {
  color: #fff;
  background: rgba(167, 72, 255, 0.14);
}

.bottom-nav-item.active .nav-emoji {
  filter: none;
}

.screen-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.back-button {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: 10px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.11);
  font-size: 20px;
}

.screen-heading {
  min-width: 0;
}

.screen-heading h1 {
  margin: 0;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: 23px;
  letter-spacing: 0.025em;
}

.screen-heading p {
  margin: 2px 0 0;
  color: #8f839c;
  font-size: 10px;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 13px;
}

.filter-chip {
  padding: 7px 10px;
  color: #968ca4;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 9px;
  font-weight: 900;
}

.filter-chip.active {
  color: #fff;
  border-color: color-mix(in srgb, var(--accent) 60%, white 10%);
  background: color-mix(in srgb, var(--accent) 26%, transparent);
  box-shadow: 0 0 18px color-mix(in srgb, var(--accent) 28%, transparent);
}

.base-grid {
  display: grid;
  gap: 11px;
}

.base-card {
  width: 100%;
  height: 184px;
  padding: 0;
  position: relative;
  overflow: hidden;
  color: #fff;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 14px;
  background-position: center;
  background-size: cover;
  box-shadow: 0 13px 30px rgba(0, 0, 0, 0.26);
}

.base-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(4, 1, 8, 0.95) 0%, rgba(8, 3, 15, 0.08) 68%);
}

.base-open-hit {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: transparent;
}

.base-card-content {
  position: absolute;
  z-index: 2;
  left: 15px;
  right: 15px;
  bottom: 13px;
}

.base-card-content,
.base-watermark,
.rating-pill {
  pointer-events: none;
}

.base-card-content strong {
  display: block;
  font-size: 17px;
}

.base-card-content span {
  display: block;
  margin-top: 2px;
  color: #de6cff;
  font-size: 11px;
  font-weight: 900;
  text-shadow: 0 0 10px rgba(201, 65, 255, 0.5);
}

.base-watermark {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) rotate(-7deg);
  color: rgba(255, 255, 255, 0.45);
  font-size: 13px;
  font-weight: 1000;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.favorite-toggle {
  width: 34px;
  height: 34px;
  position: absolute;
  z-index: 3;
  right: 11px;
  top: 11px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: rgba(8, 3, 14, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
}

.rating-pill {
  position: absolute;
  z-index: 3;
  left: 11px;
  top: 11px;
  padding: 5px 8px;
  border-radius: 999px;
  color: #fff3bf;
  background: rgba(8, 3, 14, 0.66);
  font-size: 9px;
  font-weight: 900;
  backdrop-filter: blur(8px);
}

.section-intro {
  margin: -2px 0 16px;
  color: #9c91a8;
  font-size: 11px;
  line-height: 1.55;
}

.army-list {
  display: grid;
  gap: 9px;
}

.army-filters {
  flex-wrap: nowrap;
}

.army-filters .filter-chip {
  flex: 1 1 auto;
  padding-inline: 8px;
  white-space: nowrap;
}

.army-row {
  width: 100%;
  min-height: 72px;
  padding: 10px 11px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto 20px;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 13px;
  background: linear-gradient(100deg, rgba(55, 30, 78, 0.72), rgba(23, 12, 34, 0.84));
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
  transition: 160ms ease;
}

.army-row:hover {
  transform: translateY(-1px);
  border-color: rgba(195, 94, 255, 0.42);
}

.army-row-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(184, 79, 255, 0.3), rgba(70, 33, 100, 0.42));
  border: 1px solid rgba(226, 177, 255, 0.14);
  font-size: 27px;
}

.army-row-copy {
  min-width: 0;
}

.army-row-copy > strong {
  display: block;
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.army-row-tags,
.army-guide-meta {
  margin-top: 7px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.army-tag,
.army-guide-hall {
  padding: 3px 7px;
  border-radius: 999px;
  color: #d9cfe3;
  background: rgba(255, 255, 255, 0.08);
  font-size: 8px;
  font-weight: 900;
}

.category-air { color: #b7d6ff; background: rgba(63, 124, 230, 0.23); }
.category-ground { color: #ffe49b; background: rgba(222, 165, 44, 0.2); }
.category-hybrid { color: #e2bdff; background: rgba(165, 75, 229, 0.23); }
.difficulty-easy { color: #caffba; background: rgba(72, 182, 73, 0.2); }
.difficulty-medium { color: #ffe29a; background: rgba(224, 164, 42, 0.2); }
.difficulty-hard { color: #ffb0bd; background: rgba(224, 54, 90, 0.2); }

.army-hall {
  color: #a99eb6;
  font-size: 9px;
  font-weight: 900;
  white-space: nowrap;
}

.army-row-arrow {
  color: #be59f6;
  font-size: 24px;
  line-height: 1;
}

.army-guide-header {
  height: 39px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  color: #a79aae;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.army-guide-header .back-button {
  width: 34px;
  height: 34px;
}

.army-guide-hero {
  padding: 20px 16px 18px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(195, 92, 255, 0.22);
  border-radius: 17px;
  background:
    radial-gradient(circle at 50% 18%, rgba(192, 72, 255, 0.3), transparent 36%),
    linear-gradient(155deg, rgba(64, 29, 91, 0.9), rgba(20, 10, 30, 0.94));
  text-align: center;
}

.army-guide-emoji {
  display: block;
  font-size: 58px;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.32));
}

.army-guide-hero h1 {
  margin: 8px 0 0;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: 27px;
  letter-spacing: 0.02em;
}

.army-guide-hero .army-guide-meta {
  justify-content: center;
}

.army-guide-hero > p {
  margin: 13px 0 0;
  color: #b2a7bc;
  font-size: 10px;
  line-height: 1.6;
}

.army-copy-area {
  margin-top: 10px;
}

.army-copy-area .copy-panel {
  margin-top: 0;
}

.army-link-missing {
  border-color: rgba(255, 190, 77, 0.3);
}

.army-link-missing p {
  margin: 0;
  padding: 12px;
  color: #b9abbf;
  font-size: 9px;
  line-height: 1.45;
  text-align: center;
}

.guide-stack {
  margin-top: 10px;
  display: grid;
  gap: 10px;
}

.guide-section {
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.045);
}

.guide-section.positive { border-color: rgba(70, 196, 91, 0.2); }
.guide-section.warning { border-color: rgba(255, 175, 54, 0.22); }

.guide-section h2 {
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: #f3ecf7;
  font-size: 11px;
  letter-spacing: 0.02em;
}

.guide-items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.guide-items.compact {
  grid-template-columns: 1fr;
}

.guide-unit {
  padding: 8px;
  border-radius: 9px;
  color: #c7bdcf;
  background: rgba(255, 255, 255, 0.045);
  font-size: 9px;
  line-height: 1.35;
}

.attack-steps,
.priority-list {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: steps;
}

.attack-steps li {
  min-height: 30px;
  padding: 3px 0 3px 35px;
  position: relative;
  color: #bcb1c5;
  font-size: 9px;
  line-height: 1.45;
  counter-increment: steps;
}

.attack-steps li::before {
  content: counter(steps);
  width: 23px;
  height: 23px;
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: rgba(173, 73, 235, 0.34);
  font-size: 9px;
  font-weight: 900;
}

.guide-bullets {
  margin: 0;
  padding-left: 17px;
  color: #b9d8b8;
  font-size: 9px;
  line-height: 1.7;
}

.guide-note {
  margin: 0;
  color: #e3c59e;
  font-size: 9px;
  line-height: 1.55;
}

.hero-tabs {
  margin: -1px -2px 12px;
  padding: 2px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.hero-tabs::-webkit-scrollbar { display: none; }

.hero-tab {
  min-width: max-content;
  padding: 8px 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  color: #9d92a7;
  background: rgba(255, 255, 255, 0.04);
  font-size: 9px;
  font-weight: 800;
}

.hero-tab.active {
  color: #fff;
  border-color: rgba(201, 97, 255, 0.48);
  background: rgba(167, 65, 226, 0.24);
  box-shadow: 0 0 18px rgba(174, 66, 239, 0.16);
}

.hero-profile {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.035);
}

.hero-profile-banner {
  min-height: 235px;
  padding: 31px 18px 22px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  background:
    radial-gradient(circle at 50% 20%, color-mix(in srgb, var(--hero-tone) 85%, white 8%), transparent 34%),
    linear-gradient(160deg, color-mix(in srgb, var(--hero-tone) 86%, #381520), color-mix(in srgb, var(--hero-tone) 42%, #150a20) 68%, #120919);
}

.hero-profile-glow {
  width: 230px;
  height: 100px;
  position: absolute;
  left: 50%;
  bottom: -54px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: color-mix(in srgb, var(--hero-tone) 70%, white 10%);
  filter: blur(35px);
  opacity: 0.55;
}

.hero-profile-icon {
  position: relative;
  z-index: 1;
  font-size: 82px;
  filter: drop-shadow(0 14px 18px rgba(0, 0, 0, 0.38));
}

.hero-profile-banner h2 {
  z-index: 1;
  margin: 12px 0 0;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: 27px;
  letter-spacing: 0.035em;
  text-shadow: 0 3px 12px rgba(0, 0, 0, 0.48);
}

.hero-profile-banner p {
  z-index: 1;
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 10px;
  font-weight: 800;
}

.hero-ability {
  margin: 12px;
  padding: 12px 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid color-mix(in srgb, var(--hero-tone) 48%, transparent);
  border-radius: 11px;
  background: color-mix(in srgb, var(--hero-tone) 17%, transparent);
}

.hero-ability span {
  color: #9f94a9;
  font-size: 9px;
}

.hero-ability strong {
  color: #fff;
  font-size: 11px;
}

.hero-detail-section {
  padding: 5px 14px 15px;
}

.hero-detail-section + .hero-detail-section {
  padding-top: 0;
}

.hero-detail-section h3 {
  margin: 0 0 8px;
  color: #f3ecf7;
  font-size: 11px;
}

.hero-detail-section > p {
  margin: 0;
  color: #a99eaf;
  font-size: 9px;
  line-height: 1.6;
}

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

.priority-list li {
  min-height: 37px;
  padding: 7px 9px;
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: center;
  gap: 9px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.045);
}

.priority-list li > span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: color-mix(in srgb, var(--hero-tone) 58%, #2a1835);
  font-size: 9px;
  font-weight: 900;
}

.priority-list p {
  margin: 0;
  color: #b9afc1;
  font-size: 9px;
  line-height: 1.35;
}

.tool-summary {
  margin-bottom: 12px;
  padding: 12px 14px;
  display: grid;
  gap: 3px;
  border: 1px solid rgba(179, 76, 255, 0.25);
  border-radius: 13px;
  background: linear-gradient(135deg, rgba(134, 45, 208, 0.2), rgba(52, 20, 84, 0.12));
}

.tool-summary strong {
  color: #f3dfff;
  font-size: 11px;
}

.tool-summary span {
  color: #9c8ba8;
  font-size: 8px;
  line-height: 1.45;
}

.tool-screen-intro {
  margin-bottom: 13px;
  color: #b5a9bf;
}

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

.tool-card {
  width: 100%;
  padding: 14px;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025));
  text-align: left;
  transition: 160ms ease;
}

.tool-card:hover {
  transform: translateY(-1px);
  border-color: rgba(192, 96, 255, 0.42);
  background: linear-gradient(120deg, rgba(183, 80, 255, 0.12), rgba(255, 255, 255, 0.035));
}

.tool-icon,
.tool-detail-icon {
  width: 46px;
  height: 46px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(190, 92, 255, 0.2);
  border-radius: 13px;
  background: rgba(169, 74, 255, 0.16);
  font-size: 23px;
}

.tool-card-copy {
  min-width: 0;
}

.tool-card h3 {
  margin: 0 0 3px;
  font-size: 13px;
}

.tool-card p {
  margin: 0;
  color: #9d91a7;
  font-size: 9px;
  line-height: 1.4;
}

.tool-card-action {
  margin-top: 7px;
  display: inline-block;
  color: #d982ff;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.tool-go {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: color-mix(in srgb, var(--accent) 50%, #2a1439);
}

.tool-detail-header {
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #a795b5;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.tool-detail-header .back-button {
  position: static;
  flex: 0 0 auto;
}

.tool-detail-title {
  margin-top: 8px;
  padding: 14px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid rgba(190, 92, 255, 0.25);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(133, 52, 200, 0.25), rgba(29, 11, 50, 0.72));
}

.tool-detail-title h1 {
  margin: 1px 0 5px;
  font-size: 17px;
  line-height: 1.1;
}

.tool-detail-title p {
  margin: 0;
  color: #b6a8c0;
  font-size: 9px;
  line-height: 1.5;
}

.tool-how-it-works {
  margin: 10px 0;
  padding: 10px 12px;
  border-left: 3px solid #b84cff;
  border-radius: 0 10px 10px 0;
  background: rgba(184, 76, 255, 0.08);
}

.tool-how-it-works strong {
  display: block;
  color: #e3c8f2;
  font-size: 9px;
}

.tool-how-it-works p {
  margin: 3px 0 0;
  color: #9c90a5;
  font-size: 8px;
  line-height: 1.45;
}

.tool-form {
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.035);
}

.tool-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.tool-field {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.tool-field.full {
  grid-column: 1 / -1;
}

.tool-field > span {
  color: #d9cfdf;
  font-size: 8px;
  font-weight: 850;
}

.tool-field input,
.tool-field select {
  width: 100%;
  height: 36px;
  min-width: 0;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9px;
  outline: none;
  color: #fff;
  background: #160c24;
  font: inherit;
  font-size: 10px;
}

.tool-field input:focus,
.tool-field select:focus {
  border-color: #bd58ff;
  box-shadow: 0 0 0 3px rgba(189, 88, 255, 0.12);
}

.tool-field small {
  color: #776b80;
  font-size: 7px;
  line-height: 1.35;
}

.tool-submit,
.tool-copy-button {
  width: 100%;
  min-height: 38px;
  margin-top: 13px;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, #9b3fe5, #e238c8);
  font-size: 10px;
  font-weight: 900;
  box-shadow: 0 9px 24px rgba(184, 54, 218, 0.2);
}

.tool-result {
  margin-top: 11px;
  padding: 14px;
  border: 1px solid rgba(81, 214, 153, 0.32);
  border-radius: 15px;
  background: linear-gradient(135deg, rgba(31, 129, 86, 0.18), rgba(21, 74, 55, 0.08));
}

.tool-result.warning {
  border-color: rgba(255, 173, 72, 0.36);
  background: linear-gradient(135deg, rgba(148, 83, 24, 0.2), rgba(69, 38, 17, 0.08));
}

.tool-result-label {
  display: block;
  color: #82e4b5;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tool-result.warning .tool-result-label {
  color: #ffc477;
}

.tool-result > strong {
  margin-top: 3px;
  display: block;
  color: #fff;
  font-size: 21px;
}

.tool-result > p {
  margin: 5px 0 0;
  color: #bdb2c4;
  font-size: 9px;
  line-height: 1.45;
}

.tool-result dl {
  margin: 11px 0 0;
  display: grid;
  gap: 6px;
}

.tool-result dl div {
  padding-top: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.tool-result dt {
  color: #887c91;
  font-size: 8px;
}

.tool-result dd {
  margin: 0;
  color: #e7dfea;
  font-size: 8px;
  font-weight: 800;
  text-align: right;
}

.army-builder-result,
.war-map-result {
  margin-top: 12px;
  display: grid;
  gap: 7px;
}

.army-builder-result section {
  padding: 10px;
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 9px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(6, 3, 13, 0.3);
}

.army-builder-result section > span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: rgba(181, 72, 239, 0.18);
  font-size: 15px;
}

.army-builder-result strong {
  display: block;
  color: #f5ecfa;
  font-size: 9px;
}

.army-builder-result p {
  margin: 3px 0 0;
  color: #b9acbf;
  font-size: 8px;
  line-height: 1.45;
}

.war-map-result {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.war-map-result section {
  min-width: 0;
  padding: 9px 6px;
  display: grid;
  place-items: center;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 11px;
  text-align: center;
  background: rgba(7, 3, 15, 0.34);
}

.war-map-result section > span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, #b142e9, #e83dad);
  box-shadow: 0 6px 14px rgba(177, 58, 220, 0.25);
  font-size: 11px;
  font-weight: 950;
}

.war-map-result section.backup > span {
  background: linear-gradient(135deg, #3478e7, #54b0ef);
}

.war-map-result section.cleanup > span {
  background: linear-gradient(135deg, #28a76c, #66d58f);
}

.war-map-result strong,
.war-map-result small {
  display: block;
}

.war-map-result strong {
  color: #f6edf9;
  font-size: 8px;
}

.war-map-result small {
  margin-top: 3px;
  color: #9f92a7;
  font-size: 6px;
  line-height: 1.35;
}

.tool-copy-button {
  min-height: 34px;
  margin-top: 10px;
  background: rgba(80, 201, 143, 0.18);
  border: 1px solid rgba(102, 222, 166, 0.28);
  box-shadow: none;
}

.menu-backdrop,
.modal-backdrop {
  position: absolute;
  z-index: 30;
  inset: 0;
  display: flex;
  background: rgba(3, 1, 7, 0.75);
  backdrop-filter: blur(4px);
  animation: fade-in 160ms ease;
}

.menu-backdrop {
  justify-content: flex-end;
}

.menu-panel {
  width: min(88%, 355px);
  height: auto;
  max-height: 100%;
  padding: 24px 18px 30px;
  align-self: flex-start;
  overflow: auto;
  overscroll-behavior: contain;
  border-left: 1px solid rgba(184, 81, 255, 0.26);
  border-bottom-left-radius: 20px;
  background: linear-gradient(#1a0a2e, #0f081e);
  box-shadow: -20px 0 55px rgba(0, 0, 0, 0.45);
  animation: slide-left 200ms ease;
}

.menu-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.menu-logo {
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: 24px;
  line-height: 0.9;
}

.menu-logo span {
  display: block;
  color: #ff60e5;
}

.menu-subtitle {
  margin-top: 8px;
  color: #8c8098;
  font-size: 10px;
}

.menu-close {
  width: 35px;
  height: 35px;
  border-radius: 10px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.menu-feature {
  margin-top: 18px;
  padding: 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, #2d1600, #5c3000);
  border: 1px solid rgba(255, 207, 55, 0.22);
}

.menu-feature.blue {
  background: linear-gradient(135deg, #0c1f4a, #1a3a8f);
  border-color: rgba(92, 146, 255, 0.28);
}

.menu-feature strong {
  font-size: 12px;
}

.menu-feature p {
  margin: 5px 0 11px;
  color: rgba(255, 255, 255, 0.66);
  font-size: 9px;
  line-height: 1.45;
}

.rating-row {
  display: flex;
  gap: 3px;
}

.rating-button {
  padding: 2px;
  color: #ffc928;
  background: transparent;
  font-size: 19px;
}

.share-button {
  width: 100%;
  padding: 9px;
  border-radius: 9px;
  color: #fff;
  background: linear-gradient(135deg, #1d4ed8, #3b82f6);
  font-size: 10px;
  font-weight: 900;
}

.menu-section-label {
  margin: 18px 2px 7px;
  color: #706579;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.menu-page {
  width: 100%;
  padding: 12px 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #eee8f4;
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  text-align: left;
  font-size: 11px;
}

.menu-page span:nth-child(2) {
  flex: 1;
}

.menu-footer {
  margin-top: 20px;
  color: #675d70;
  text-align: center;
  font-size: 9px;
}

.modal-backdrop {
  align-items: center;
  justify-content: center;
  padding: 17px;
}

.base-modal,
.page-modal {
  width: 100%;
  max-height: calc(100% - 24px);
  overflow: auto;
  border: 1px solid rgba(198, 95, 255, 0.3);
  border-radius: 20px;
  background: #12082a;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.65);
  animation: pop-in 190ms ease;
}

.modal-hero {
  height: 210px;
  position: relative;
  background-position: center;
  background-size: cover;
}

.modal-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #12082a, transparent 58%);
}

.modal-close {
  width: 34px;
  height: 34px;
  position: absolute;
  z-index: 2;
  right: 12px;
  top: 12px;
  border-radius: 50%;
  color: #fff;
  background: #db3346;
  font-weight: 900;
}

.modal-content {
  padding: 2px 17px 18px;
}

.modal-kicker {
  color: #c96cff;
  font-size: 9px;
  font-weight: 1000;
  letter-spacing: 0.13em;
}

.modal-content h2 {
  margin: 5px 0 7px;
  font-size: 20px;
}

.modal-description {
  margin: 0;
  color: #a69aae;
  font-size: 10px;
  line-height: 1.6;
}

.copy-panel {
  margin-top: 15px;
  overflow: hidden;
  border: 1px solid rgba(255, 95, 87, 0.44);
  border-radius: 12px;
}

.copy-panel-header {
  padding: 8px 10px;
  color: #ffcc8e;
  background: #2b1120;
  font-size: 9px;
  font-weight: 900;
  text-align: center;
}

.copy-button {
  width: 100%;
  min-height: 76px;
  padding: 17px 14px;
  color: #fff;
  background: linear-gradient(#f14d45, #bd1b2a);
  font-size: 13px;
  font-weight: 1000;
  line-height: 1.2;
}

.copy-button small {
  display: block;
  margin-top: 5px;
  color: #ffd76e;
  font-size: 8.5px;
}

.copy-button:disabled {
  cursor: wait;
  opacity: 0.76;
  filter: saturate(0.72);
}

.instant-button {
  width: 100%;
  min-height: 56px;
  margin-top: 9px;
  padding: 9px 12px;
  border-radius: 11px;
  color: #fff;
  background: linear-gradient(#65ca4f, #309b39);
  font-size: 10px;
  font-weight: 1000;
}

.page-modal {
  padding: 20px;
}

.page-modal h2 {
  margin: 0 0 10px;
}

.page-modal p {
  color: #aaa0b4;
  font-size: 11px;
  line-height: 1.7;
}

.empty-state {
  padding: 40px 24px;
  text-align: center;
  border: 1px dashed rgba(255, 255, 255, 0.13);
  border-radius: 15px;
  color: #84788f;
}

.empty-state strong {
  display: block;
  margin-bottom: 5px;
  color: #d7cfde;
  font-size: 13px;
}

#toast-root {
  position: fixed;
  z-index: 1000;
  right: 20px;
  bottom: 20px;
  display: grid;
  gap: 8px;
}

.toast {
  min-width: 240px;
  padding: 12px 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 13px;
  background: #20122f;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  font-size: 12px;
  font-weight: 700;
  animation: toast-in 200ms ease;
}

/* Admin */
.admin-app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  color: #1b1325;
  background: #f6f5f8;
}

.admin-sidebar {
  min-height: 100vh;
  position: sticky;
  top: 0;
  align-self: start;
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  color: #eee7f7;
  background:
    radial-gradient(circle at 0 0, rgba(194, 73, 255, 0.24), transparent 28%),
    #13091e;
}

.admin-brand {
  padding: 4px 8px 22px;
  display: flex;
  align-items: center;
  gap: 11px;
}

.admin-brand-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 8px 22px color-mix(in srgb, var(--accent) 28%, transparent);
  font-size: 18px;
}

.admin-brand-copy strong {
  display: block;
  font-size: 14px;
}

.admin-brand-copy span {
  color: #8b7e98;
  font-size: 10px;
}

.sidebar-label {
  margin: 12px 10px 7px;
  color: #675b74;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.sidebar-nav {
  display: grid;
  gap: 3px;
}

.sidebar-item {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 11px;
  color: #9d91a9;
  border-radius: 11px;
  background: transparent;
  text-align: left;
  font-size: 12px;
  font-weight: 650;
  transition: 160ms ease;
}

.sidebar-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.055);
}

.sidebar-item.active {
  color: #fff;
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 38%, #2b1839), rgba(255, 255, 255, 0.055));
  box-shadow: inset 3px 0 0 var(--accent);
}

.sidebar-item-icon {
  width: 20px;
  text-align: center;
  font-size: 15px;
}

.sidebar-item-count {
  margin-left: auto;
  min-width: 23px;
  height: 21px;
  padding: 0 7px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #a99bb4;
  background: rgba(255, 255, 255, 0.08);
  font-size: 9px;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 24px;
}

.sidebar-profile {
  padding: 11px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.profile-avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, #6d45f5, #d646d7);
  font-size: 11px;
  font-weight: 900;
}

.profile-copy {
  min-width: 0;
  flex: 1;
}

.profile-copy strong {
  display: block;
  overflow: hidden;
  color: #eee6f6;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-copy span {
  display: block;
  color: #73677f;
  font-size: 9px;
}

.admin-main {
  min-width: 0;
}

.admin-topbar {
  height: 72px;
  padding: 0 28px;
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid #ebe8ef;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
}

.admin-topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mobile-sidebar-toggle {
  display: none;
}

.admin-search {
  width: min(32vw, 340px);
  height: 40px;
  padding: 0 13px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid #e6e2ea;
  border-radius: 11px;
  background: #faf9fb;
}

.admin-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  color: #31283a;
  background: transparent;
  font-size: 11px;
}

.admin-search input::placeholder {
  color: #a39baa;
}

.admin-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.view-app-button,
.primary-button,
.secondary-button,
.danger-button {
  min-height: 39px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 11px;
  font-weight: 800;
  transition: 160ms ease;
}

.view-app-button,
.secondary-button {
  color: #443a4d;
  border: 1px solid #e4e0e8;
  background: #fff;
}

.view-app-button:hover,
.secondary-button:hover {
  border-color: #cfc7d7;
  transform: translateY(-1px);
}

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent-2) 82%, var(--accent)));
  box-shadow: 0 8px 20px color-mix(in srgb, var(--accent) 20%, transparent);
}

.primary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 11px 23px color-mix(in srgb, var(--accent) 26%, transparent);
}

.danger-button {
  color: #c32d3f;
  border: 1px solid #ffd8dd;
  background: #fff4f5;
}

.admin-content {
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  padding: 29px;
}

.page-title-row {
  margin-bottom: 23px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.page-title-row h1 {
  margin: 0;
  color: #23182e;
  font-size: 24px;
  letter-spacing: -0.035em;
}

.page-title-row p {
  margin: 5px 0 0;
  color: #8c8492;
  font-size: 11px;
}

.admin-actions-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.metric-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid #eae6ee;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 8px 26px rgba(39, 25, 52, 0.035);
}

.metric-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.metric-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: var(--metric-color);
  background: color-mix(in srgb, var(--metric-color) 11%, white);
  font-size: 16px;
}

.metric-trend {
  padding: 4px 7px;
  border-radius: 999px;
  color: #258546;
  background: #eaf8ee;
  font-size: 8px;
  font-weight: 900;
}

.metric-value {
  margin-top: 13px;
  font-size: 25px;
  font-weight: 850;
  letter-spacing: -0.04em;
}

.metric-label {
  margin-top: 3px;
  color: #8c8392;
  font-size: 10px;
}

.dashboard-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.8fr);
  gap: 14px;
}

.admin-card {
  border: 1px solid #eae6ee;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 8px 26px rgba(39, 25, 52, 0.035);
}

.card-head {
  min-height: 60px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  border-bottom: 1px solid #f0edf2;
}

.card-head h2 {
  margin: 0;
  font-size: 13px;
}

.card-head p {
  margin: 3px 0 0;
  color: #978f9d;
  font-size: 9px;
}

.chart-wrap {
  height: 260px;
  padding: 25px 20px 20px;
  display: flex;
  align-items: flex-end;
  gap: 16px;
}

.chart-column {
  height: 100%;
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 7px;
}

.chart-bar {
  width: min(28px, 72%);
  min-height: 8px;
  border-radius: 8px 8px 3px 3px;
  background: linear-gradient(to top, var(--accent), var(--accent-2));
  box-shadow: 0 8px 16px color-mix(in srgb, var(--accent) 16%, transparent);
  animation: bar-grow 500ms ease both;
  transform-origin: bottom;
}

.chart-label {
  color: #9a929f;
  font-size: 8px;
}

.activity-list {
  padding: 6px 18px 12px;
}

.activity-item {
  padding: 12px 0;
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #f2eff4;
}

.activity-item:last-child {
  border-bottom: 0;
}

.activity-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #f5f0fa;
  font-size: 14px;
}

.activity-copy strong {
  display: block;
  color: #3d3345;
  font-size: 10px;
}

.activity-copy span,
.activity-time {
  color: #99919f;
  font-size: 8px;
}

.quick-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.quick-action {
  min-height: 80px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 7px;
  color: #4b4154;
  border: 1px solid #eae6ee;
  border-radius: 13px;
  background: #fff;
  text-align: left;
  font-size: 10px;
  font-weight: 800;
}

.quick-action:hover {
  border-color: color-mix(in srgb, var(--accent) 32%, #eae6ee);
}

.release-readiness-card {
  margin-top: 14px;
}

.release-readiness-grid {
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.release-readiness-item {
  min-width: 0;
  padding: 12px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid #e9e4ed;
  border-radius: 12px;
  color: #45394d;
  background: #fbf9fc;
  text-align: left;
}

.release-readiness-item:hover {
  border-color: color-mix(in srgb, var(--accent) 34%, #e9e4ed);
}

.release-readiness-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #ffffff;
  background: #d38b13;
  font-size: 15px;
  font-weight: 1000;
}

.release-readiness-item.ready .release-readiness-icon {
  background: #22a55f;
}

.release-readiness-copy strong,
.release-readiness-copy span {
  display: block;
}

.release-readiness-copy strong {
  font-size: 10px;
}

.release-readiness-copy span,
.release-readiness-action {
  margin-top: 3px;
  color: #918897;
  font-size: 8px;
}

.release-readiness-action {
  color: var(--accent);
  font-weight: 900;
  white-space: nowrap;
}

.table-toolbar {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #f0edf2;
}

.toolbar-filter {
  display: flex;
  align-items: center;
  gap: 7px;
}

.toolbar-filter select,
.compact-search {
  height: 35px;
  padding: 0 10px;
  color: #514758;
  border: 1px solid #e5e1e8;
  border-radius: 9px;
  outline: 0;
  background: #fff;
  font-size: 10px;
}

.compact-search {
  width: 210px;
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 10px;
}

.admin-table th {
  padding: 11px 15px;
  color: #8a8290;
  background: #faf9fb;
  text-align: left;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
}

.admin-table td {
  padding: 12px 15px;
  border-top: 1px solid #f0edf2;
  color: #5b5261;
  vertical-align: middle;
  white-space: nowrap;
}

.admin-table tbody tr:hover {
  background: #fcfbfd;
}

.content-cell {
  min-width: 220px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.content-thumb {
  width: 42px;
  height: 34px;
  flex: 0 0 auto;
  overflow: hidden;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background-position: center;
  background-size: cover;
  font-size: 18px;
}

.content-copy strong {
  display: block;
  color: #312737;
  font-size: 10px;
}

.content-copy span {
  display: block;
  max-width: 190px;
  margin-top: 2px;
  overflow: hidden;
  color: #9b93a0;
  font-size: 8px;
  text-overflow: ellipsis;
}

.status-badge,
.type-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 8px;
  font-weight: 800;
}

.status-badge.published,
.status-badge.active {
  color: #267b43;
  background: #eaf8ee;
}

.status-badge.draft,
.status-badge.inactive {
  color: #8e6470;
  background: #f7edf0;
}

.type-badge {
  color: #735088;
  background: #f4ecf8;
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.table-action {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #756b7c;
  background: transparent;
}

.table-action:hover {
  color: #392d42;
  background: #f1eef4;
}

.table-action.delete:hover {
  color: #c73043;
  background: #fff0f2;
}

.toggle {
  width: 35px;
  height: 20px;
  padding: 2px;
  border-radius: 999px;
  background: #d7d1dc;
  transition: 160ms ease;
}

.toggle::after {
  content: "";
  width: 16px;
  height: 16px;
  display: block;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
  transition: 160ms ease;
}

.toggle.on {
  background: var(--accent);
}

.toggle.on::after {
  transform: translateX(15px);
}

.admin-empty {
  padding: 58px 20px;
  color: #968d9c;
  text-align: center;
}

.admin-empty span {
  display: block;
  margin-bottom: 8px;
  font-size: 26px;
}

.admin-empty strong {
  display: block;
  margin-bottom: 4px;
  color: #5a505f;
}

.editor-backdrop {
  position: fixed;
  z-index: 80;
  inset: 0;
  display: flex;
  justify-content: flex-end;
  background: rgba(28, 19, 36, 0.35);
  backdrop-filter: blur(2px);
  animation: fade-in 150ms ease;
}

.editor-drawer {
  width: min(100%, 470px);
  height: 100%;
  overflow-y: auto;
  background: #fff;
  box-shadow: -24px 0 60px rgba(29, 18, 38, 0.18);
  animation: slide-left 190ms ease;
}

.editor-head {
  min-height: 70px;
  padding: 0 20px;
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #ece8ef;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(15px);
}

.editor-head h2 {
  margin: 0;
  font-size: 16px;
}

.editor-head p {
  margin: 2px 0 0;
  color: #9a929f;
  font-size: 9px;
}

.editor-body {
  padding: 20px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-field {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.form-field.full {
  grid-column: 1 / -1;
}

.form-field label {
  color: #5c5262;
  font-size: 9px;
  font-weight: 800;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  min-height: 41px;
  padding: 10px 11px;
  color: #362d3d;
  border: 1px solid #e5e1e8;
  border-radius: 10px;
  outline: 0;
  background: #fff;
  font-size: 11px;
  transition: 150ms ease;
}

.form-field input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: 18px;
  flex: 0 0 auto;
  padding: 0;
  border-radius: 5px;
  accent-color: var(--accent);
  box-shadow: none;
}

.form-field textarea {
  min-height: 110px;
  resize: vertical;
  line-height: 1.55;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: color-mix(in srgb, var(--accent) 55%, #e5e1e8);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 10%, transparent);
}

.field-hint {
  color: #aaa2af;
  font-size: 8px;
}

.form-switch-row {
  min-height: 48px;
  padding: 0 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #e9e5ec;
  border-radius: 10px;
}

.form-switch-copy strong {
  display: block;
  font-size: 10px;
}

.form-switch-copy span {
  display: block;
  margin-top: 2px;
  color: #9c949f;
  font-size: 8px;
}

.editor-footer {
  padding: 15px 20px;
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid #ece8ef;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
}

.settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(310px, 0.7fr);
  gap: 14px;
}

.settings-section {
  padding: 20px;
}

.settings-section + .settings-section {
  border-top: 1px solid #eeebf1;
}

.section-title {
  margin-bottom: 16px;
}

.section-title h2 {
  margin: 0;
  font-size: 13px;
}

.section-title p {
  margin: 4px 0 0;
  color: #968e9b;
  font-size: 9px;
}

.theme-preview {
  min-height: 370px;
  padding: 22px;
  overflow: hidden;
  position: sticky;
  top: 92px;
  color: #fff;
  border-radius: 15px;
  background:
    radial-gradient(circle at 84% 4%, color-mix(in srgb, var(--accent) 32%, transparent), transparent 28%),
    #11071d;
}

.theme-preview-logo {
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: 28px;
  line-height: 0.85;
}

.theme-preview-logo span {
  display: block;
  color: var(--accent-2);
}

.theme-preview-card {
  height: 138px;
  margin-top: 30px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border: 1px solid color-mix(in srgb, var(--accent) 32%, transparent);
  border-radius: 14px;
  background:
    linear-gradient(0deg, rgba(0, 0, 0, 0.85), transparent),
    url("https://images.unsplash.com/photo-1634643468805-6f5d5f8f2670?w=800&h=400&fit=crop&auto=format") center/cover;
}

.theme-preview-card small {
  color: var(--gold);
  font-weight: 900;
  letter-spacing: 0.12em;
}

.theme-preview-card strong {
  margin-top: 4px;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: 25px;
}

.palette-row {
  display: flex;
  align-items: center;
  gap: 9px;
}

.color-field {
  min-width: 0;
  flex: 1;
  height: 42px;
  padding: 4px;
  border: 1px solid #e4e0e7;
  border-radius: 10px;
  background: #fff;
}

.color-field input[type="color"] {
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  cursor: pointer;
}

.data-actions {
  display: grid;
  gap: 8px;
}

.data-action {
  min-height: 54px;
  padding: 0 13px;
  display: flex;
  align-items: center;
  gap: 11px;
  color: #4e4555;
  border: 1px solid #e8e4eb;
  border-radius: 11px;
  background: #fff;
  text-align: left;
}

.data-action:hover {
  border-color: #d4ccd9;
}

.data-action-icon {
  width: 33px;
  height: 33px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #f2edf6;
}

.data-action-copy strong {
  display: block;
  font-size: 10px;
}

.data-action-copy span {
  display: block;
  margin-top: 2px;
  color: #978f9c;
  font-size: 8px;
}

.notice-card {
  padding: 16px;
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 11px;
  border-bottom: 1px solid #f0edf2;
}

.notice-card:last-child {
  border-bottom: 0;
}

.notice-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #784a92;
  background: #f4eaf9;
}

.notice-copy strong {
  display: block;
  font-size: 11px;
}

.notice-copy p {
  margin: 3px 0;
  color: #8f8695;
  font-size: 9px;
}

.notice-copy span {
  color: #aaa2ae;
  font-size: 8px;
}

.sidebar-mobile-backdrop {
  display: none;
}

@keyframes fade-in {
  from { opacity: 0; }
}

@keyframes slide-left {
  from { transform: translateX(28px); opacity: 0; }
}

@keyframes pop-in {
  from { transform: scale(0.97) translateY(8px); opacity: 0; }
}

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

@keyframes bar-grow {
  from { transform: scaleY(0); }
}

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

  .dashboard-grid,
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .quick-grid {
    grid-template-columns: 1fr 1fr;
  }

  .release-readiness-grid {
    grid-template-columns: 1fr;
  }

  .theme-preview {
    position: static;
  }
}

@media (max-width: 820px) {
  .admin-app {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    width: 250px;
    position: fixed;
    z-index: 60;
    left: 0;
    top: 0;
    bottom: 0;
    transform: translateX(-100%);
    transition: 180ms ease;
  }

  .admin-app.sidebar-open .admin-sidebar {
    transform: translateX(0);
  }

  .sidebar-mobile-backdrop {
    position: fixed;
    z-index: 50;
    inset: 0;
    display: block;
    visibility: hidden;
    opacity: 0;
    background: rgba(24, 15, 32, 0.4);
    transition: 180ms ease;
  }

  .admin-app.sidebar-open .sidebar-mobile-backdrop {
    visibility: visible;
    opacity: 1;
  }

  .mobile-sidebar-toggle {
    display: grid;
  }

  .admin-topbar {
    padding: 0 17px;
  }

  .admin-content {
    padding: 22px 17px;
  }

  .admin-search {
    width: min(44vw, 290px);
  }
}

@media (max-width: 620px) {
  .public-stage {
    padding: 0;
  }

  .public-toolbar {
    display: none;
  }

  .phone-wrap {
    width: 100%;
  }

  .phone {
    min-height: 100vh;
    border: 0;
    border-radius: 0;
  }

  .phone::after,
  .phone-notch {
    display: none;
  }

  .phone-bottom-nav {
    position: fixed;
  }

  .menu-backdrop,
  .modal-backdrop {
    position: fixed;
  }

  .admin-topbar {
    height: 64px;
  }

  .admin-search {
    width: 42px;
    padding: 0;
    justify-content: center;
  }

  .admin-search input {
    display: none;
  }

  .view-app-button span:last-child {
    display: none;
  }

  .page-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .metric-grid,
  .quick-grid {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-field.full {
    grid-column: auto;
  }

  .table-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar-filter {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .compact-search {
    width: 100%;
    grid-column: 1 / -1;
  }

  .editor-drawer {
    width: 100%;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }
}

/* Lightweight mobile motion: one-shot transform/opacity effects only. */
@keyframes clashbase-lite-rise {
  from { opacity: 0; transform: translate3d(0, 9px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes clashbase-lite-pop {
  from { opacity: 0; transform: translate3d(0, 7px, 0) scale(0.985); }
  to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes clashbase-lite-select {
  0% { transform: scale(0.9); }
  65% { transform: scale(1.06); }
  100% { transform: scale(1); }
}

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

/* Android/WebView performance mode: keep the UI responsive while scrolling. */
@media (max-width: 620px) {
  html {
    scroll-behavior: auto;
  }

  .phone::before {
    display: none;
  }

  .phone-header,
  .phone-bottom-nav,
  .home-controls {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .home-controls {
    position: fixed;
    z-index: 29;
    top: 74px;
    right: 0;
    left: 0;
    margin: 0;
    padding: 8px 13px 10px;
    border-width: 0 0 1px;
    border-radius: 0 0 14px 14px;
    background: #0b1f3d;
    box-shadow: 0 7px 16px rgba(1, 8, 21, 0.24);
    transform: translateZ(0);
  }

  .home-controls + .primary-cta {
    margin-top: 76px;
  }

  .phone-header,
  .phone-bottom-nav {
    transform: translateZ(0);
  }

  .phone-header,
  .phone-bottom-nav,
  .home-controls,
  .hall-card,
  .favorite-card {
    -webkit-font-smoothing: antialiased;
  }

  .brand-mark-logo,
  .village-button.active .village-game-icon,
  .primary-cta,
  .announcement,
  .hall-stack,
  .hall-card,
  .favorite-card,
  .base-grid > *,
  .army-list > *,
  .tool-list > *,
  .hero-profile,
  .hero-tabs {
    animation: none !important;
  }

  .village-button::after,
  .primary-cta::after {
    display: none;
  }

  .hall-card,
  .favorite-card {
    content-visibility: auto;
    contain: layout paint style;
    contain-intrinsic-size: 120px;
    box-shadow: 0 7px 16px rgba(0, 0, 0, 0.24);
    transition: transform 110ms ease, border-color 110ms ease;
  }

  .hall-card::after,
  .favorite-card::after {
    opacity: 0.38;
    transition: none;
  }

  .base-card,
  .army-row,
  .tool-card,
  .hero-tab,
  .hero-profile {
    transition-duration: 110ms;
  }

  .bottom-nav-item,
  .round-action,
  .card-arrow {
    will-change: auto;
  }

  .village-button,
  .primary-cta,
  .hall-card,
  .favorite-card,
  .bottom-nav-item,
  .round-action {
    touch-action: manipulation;
  }
}

@media (hover: none) and (pointer: coarse) {
  .hall-card:hover,
  .hall-card:focus-visible,
  .favorite-card:hover,
  .favorite-card:focus-visible,
  .base-card:hover,
  .army-row:hover,
  .tool-card:hover,
  .hero-tab:hover {
    filter: none;
  }
}

/* Loading, advertising and Remove Ads Forever flows */
.primary-cta.premium-cta {
  display: grid;
  place-items: center;
  gap: 2px;
}

.primary-cta.premium-cta small,
.instant-button small {
  display: block;
  color: rgba(255, 255, 255, 0.78);
  font-size: 8px;
  font-weight: 750;
}

.phone.has-ad-banner .phone-body {
  padding-bottom: 154px;
}

.ad-banner {
  height: 70px;
  padding: 8px 10px;
  position: absolute;
  z-index: 13;
  left: 0;
  right: 0;
  bottom: 75px;
  display: grid;
  grid-template-columns: auto 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(110deg, #171122, #2d1644 62%, #442166);
  box-shadow: 0 -8px 25px rgba(0, 0, 0, 0.26);
}

.ad-banner-badge {
  padding: 3px 4px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 4px;
  color: #bfb5c7;
  font-size: 6px;
  font-weight: 900;
}

.ad-banner-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.09);
  font-size: 19px;
}

.ad-banner-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.ad-banner-copy strong {
  overflow: hidden;
  color: #fff;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ad-banner-copy small {
  color: #ab9db4;
  font-size: 7px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ad-banner button {
  padding: 7px 8px;
  border: 1px solid rgba(213, 123, 255, 0.4);
  border-radius: 8px;
  color: #f3d7ff;
  background: rgba(184, 75, 255, 0.16);
  font-size: 7px;
  font-weight: 900;
}

.startup-screen {
  position: absolute;
  z-index: 70;
  inset: 0;
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  color: #fff;
  background: #090312;
}

.loading-screen {
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 38%, rgba(185, 68, 255, 0.38), transparent 28%),
    radial-gradient(circle at 50% 100%, rgba(44, 93, 255, 0.2), transparent 35%),
    linear-gradient(160deg, #110524, #08020e 70%);
}

.loading-screen::before {
  content: "";
  position: absolute;
  inset: -20%;
  opacity: 0.22;
  background-image:
    linear-gradient(60deg, transparent 48%, rgba(255, 255, 255, 0.1) 49%, transparent 50%),
    linear-gradient(-60deg, transparent 48%, rgba(255, 255, 255, 0.08) 49%, transparent 50%);
  background-size: 48px 48px;
  animation: loading-field 8s linear infinite;
}

.loading-runes {
  display: flex;
  align-items: center;
  gap: 18px;
  color: #bf65ff;
  font-size: 16px;
}

.loading-runes span:nth-child(2) {
  color: #ffd552;
  font-size: 25px;
}

.loading-shield {
  width: 100px;
  height: 112px;
  margin: 22px 0 14px;
  display: grid;
  place-items: center;
  border: 3px solid #ffd864;
  border-radius: 48% 48% 58% 58% / 35% 35% 70% 70%;
  background: linear-gradient(135deg, #6c2ac9, #291064);
  box-shadow: 0 0 45px rgba(189, 78, 255, 0.45), inset 0 0 26px rgba(255, 255, 255, 0.14);
  font-size: 48px;
  transform: perspective(240px) rotateX(-5deg);
}

.loading-brand {
  position: relative;
  z-index: 1;
  text-align: center;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: 40px;
  line-height: 0.8;
  letter-spacing: -0.035em;
  text-shadow: 0 4px 0 #210c34, 0 0 18px rgba(255, 255, 255, 0.24);
}

.loading-brand span,
.loading-brand strong {
  display: block;
}

.loading-brand strong {
  color: #ff54df;
}

.loading-screen p {
  margin: 25px 0 10px;
  color: #b9a8c7;
  font-size: 10px;
  font-weight: 800;
}

.loading-track {
  width: 210px;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.loading-track span {
  width: 45%;
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, #7d36df, #ff46d7, #ffd45d);
  box-shadow: 0 0 15px rgba(255, 76, 214, 0.55);
  animation: loading-progress 1.15s ease-in-out infinite;
}

.loading-screen > small {
  margin-top: 16px;
  color: #5f506d;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.app-open-screen {
  padding: 34px 24px;
  justify-content: flex-start;
  background:
    radial-gradient(circle at 50% 18%, rgba(122, 48, 226, 0.36), transparent 30%),
    linear-gradient(180deg, #0e061a, #09030f);
}

.ad-format-label {
  align-self: flex-start;
  padding: 5px 7px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 5px;
  color: #877a91;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.app-open-creative {
  width: 100%;
  margin-top: 45px;
  padding: 28px 22px;
  display: flex;
  align-items: center;
  flex-direction: column;
  border: 1px solid rgba(203, 116, 255, 0.28);
  border-radius: 24px;
  background: linear-gradient(155deg, rgba(111, 37, 177, 0.42), rgba(21, 9, 37, 0.9));
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.35);
  text-align: center;
}

.creative-orb {
  width: 100px;
  height: 100px;
  display: grid;
  place-items: center;
  border: 2px solid #d993ff;
  border-radius: 28px;
  background: linear-gradient(135deg, #8233ca, #3d1371);
  box-shadow: 0 0 40px rgba(182, 74, 255, 0.36);
  font-size: 48px;
  transform: rotate(-4deg);
}

.creative-kicker {
  margin-top: 22px;
  color: #d18cff;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.app-open-creative h2 {
  margin: 5px 0 8px;
  font-size: 24px;
}

.app-open-creative p {
  max-width: 290px;
  margin: 0;
  color: #b3a6bc;
  font-size: 10px;
  line-height: 1.55;
}

.creative-bonus {
  margin-top: 20px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 214, 91, 0.3);
  border-radius: 12px;
  background: rgba(255, 198, 52, 0.08);
  text-align: left;
}

.creative-bonus strong {
  color: #ffd45b;
  font-size: 25px;
}

.creative-bonus span {
  color: #d9cba5;
  font-size: 8px;
  font-weight: 800;
  line-height: 1.3;
}

.ad-continue-button {
  width: 100%;
  min-height: 48px;
  margin-top: auto;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, #8e3ce0, #e33acb);
  font-size: 11px;
  font-weight: 900;
}

.ad-remove-link {
  margin-top: 11px;
  color: #d790ff;
  background: transparent;
  font-size: 9px;
  font-weight: 850;
}

.rewarded-backdrop {
  position: absolute;
  z-index: 62;
  inset: 0;
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(3, 1, 8, 0.88);
  backdrop-filter: blur(8px);
}

.rewarded-dialog {
  width: 100%;
  padding: 20px;
  position: relative;
  border: 1px solid rgba(195, 102, 255, 0.34);
  border-radius: 22px;
  background: linear-gradient(160deg, #1d0d31, #0d0714);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.58);
}

.reward-close {
  width: 31px;
  height: 31px;
  position: absolute;
  right: 13px;
  top: 13px;
  border-radius: 50%;
  color: #b4a7bd;
  background: rgba(255, 255, 255, 0.08);
}

.rewarded-label {
  color: #947fa3;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.11em;
}

.reward-video {
  min-height: 270px;
  margin: 14px 0;
  padding: 22px;
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background:
    radial-gradient(circle at 50% 40%, rgba(152, 60, 226, 0.35), transparent 32%),
    #120820;
  text-align: center;
}

.reward-play-icon,
.reward-earned-icon {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(221, 169, 255, 0.7);
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, #8f37dc, #ca36bc);
  box-shadow: 0 0 35px rgba(189, 68, 255, 0.38);
  font-size: 26px;
}

.reward-earned-icon {
  border-color: #78e5ae;
  background: linear-gradient(135deg, #199865, #43c98b);
}

.reward-play-icon.pulse {
  animation: reward-pulse 900ms ease-in-out infinite alternate;
}

.reward-video strong {
  margin-top: 18px;
  font-size: 16px;
}

.reward-video p {
  margin: 6px 0 0;
  color: #a99caf;
  font-size: 9px;
  line-height: 1.5;
}

.reward-progress {
  width: 100%;
  height: 6px;
  margin-top: 20px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.reward-progress span {
  width: 100%;
  height: 100%;
  display: block;
  background: linear-gradient(90deg, #a643ec, #ff51cd, #ffd35e);
  transform-origin: left;
  animation: reward-progress 2.6s linear forwards;
}

.reward-primary {
  width: 100%;
  min-height: 44px;
  border-radius: 11px;
  color: #fff;
  background: linear-gradient(#f14d45, #bd1b2a);
  font-size: 10px;
  font-weight: 900;
}

.reward-primary.earned {
  background: linear-gradient(#62d08e, #249c5f);
}

.reward-primary:disabled {
  opacity: 0.58;
}

.reward-premium-link {
  width: 100%;
  margin-top: 10px;
  padding: 9px;
  color: #d58dff;
  background: transparent;
  font-size: 8px;
  font-weight: 850;
}

.admob-unit-id,
.rewarded-unit-id {
  max-width: 100%;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.58);
  font-size: 7px;
  font-weight: 750;
  letter-spacing: 0.02em;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rewarded-unit-id {
  display: block;
  margin: 4px 0 10px;
  color: #81778b;
}

.interstitial-screen {
  position: absolute;
  z-index: 69;
  inset: 0;
  padding: 34px 24px 25px;
  display: flex;
  align-items: stretch;
  flex-direction: column;
  color: #fff;
  background:
    radial-gradient(circle at 50% 35%, rgba(204, 76, 255, 0.3), transparent 33%),
    linear-gradient(165deg, #0f041d, #19052b 56%, #08030e);
}

.interstitial-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #bdaec8;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.interstitial-topline span:first-child {
  padding: 5px 7px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #f4d8ff;
  background: rgba(255, 255, 255, 0.08);
}

.interstitial-creative {
  min-height: 0;
  margin: 22px 0 14px;
  padding: 28px 24px;
  display: flex;
  align-items: center;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  border: 1px solid rgba(230, 160, 255, 0.22);
  border-radius: 22px;
  text-align: center;
  background:
    linear-gradient(rgba(8, 3, 17, 0.2), rgba(8, 3, 17, 0.82)),
    repeating-linear-gradient(60deg, rgba(201, 83, 255, 0.08) 0 1px, transparent 1px 28px);
  box-shadow: inset 0 0 50px rgba(161, 53, 255, 0.12);
}

.interstitial-kicker {
  color: #f4c6ff;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.interstitial-gem {
  width: 92px;
  height: 92px;
  margin: 24px 0 18px;
  display: grid;
  place-items: center;
  border: 4px solid #ffd866;
  border-radius: 28px;
  color: #ffe98d;
  background: linear-gradient(135deg, #a436e8, #4c1695);
  box-shadow: 0 0 45px rgba(198, 69, 255, 0.38), inset 0 0 20px rgba(255, 255, 255, 0.18);
  font-size: 39px;
  transform: rotate(45deg);
}

.interstitial-creative h2 {
  margin: 0;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: 38px;
  line-height: 0.94;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  text-shadow: 0 4px 0 #3b0b55;
}

.interstitial-creative p {
  max-width: 260px;
  margin: 15px 0;
  color: #c2b4cb;
  font-size: 9px;
  line-height: 1.55;
}

.interstitial-frequency {
  padding: 7px 10px;
  border-radius: 999px;
  color: #a8f5d0;
  background: rgba(47, 196, 128, 0.13);
  font-size: 8px;
  font-weight: 850;
}

.interstitial-continue {
  width: 100%;
  min-height: 48px;
  margin-top: 12px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, #a33dde, #ea3fae);
  box-shadow: 0 5px 18px rgba(189, 59, 221, 0.26);
  font-size: 11px;
  font-weight: 950;
}

.admob-config-status {
  grid-column: 1 / -1;
  padding: 14px 16px;
  display: grid;
  gap: 4px;
  border: 1px solid rgba(129, 83, 225, 0.18);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(122, 67, 226, 0.08), rgba(255, 70, 180, 0.05));
}

.admob-config-status strong {
  color: #4f2a83;
  font-size: 13px;
}

.admob-config-status span {
  overflow-wrap: anywhere;
  color: #675c73;
  font-size: 11px;
  font-weight: 750;
}

.admob-config-status small {
  color: #8a8193;
  font-size: 10px;
  line-height: 1.45;
}

.admob-test-center {
  grid-column: 1 / -1;
  padding: 16px;
  display: grid;
  gap: 13px;
  border: 1px solid rgba(72, 168, 109, 0.22);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(50, 197, 112, 0.08), rgba(79, 108, 230, 0.06));
}

.admob-test-center-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.admob-test-center-head > div {
  display: grid;
  gap: 3px;
}

.admob-test-center-head strong {
  color: #34303a;
  font-size: 13px;
}

.admob-test-center-head span:not(.admob-runtime-pill) {
  color: #817886;
  font-size: 10px;
}

.admob-runtime-pill {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.03em;
}

.admob-runtime-pill.connected {
  color: #13723c;
  border: 1px solid rgba(30, 170, 92, 0.25);
  background: rgba(46, 205, 113, 0.12);
}

.admob-runtime-pill.preview {
  color: #5d4d83;
  border: 1px solid rgba(117, 84, 201, 0.22);
  background: rgba(117, 84, 201, 0.09);
}

.admob-test-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.admob-test-actions button,
.admob-test-session {
  min-height: 38px;
  padding: 0 10px;
  border-radius: 9px;
  font-size: 10px;
  font-weight: 850;
}

.admob-test-actions button {
  color: #4d3d67;
  border: 1px solid rgba(109, 79, 170, 0.2);
  background: rgba(255, 255, 255, 0.84);
}

.admob-test-actions button:hover {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #7047cf, #d648aa);
  transform: translateY(-1px);
}

.admob-test-session {
  width: 100%;
  color: #316047;
  border: 1px dashed rgba(47, 146, 88, 0.3);
  background: rgba(47, 185, 101, 0.08);
}

.admob-test-session.active {
  color: #fff;
  border-style: solid;
  border-color: transparent;
  background: linear-gradient(135deg, #1d9f5b, #3dbe78);
}

.admob-test-center > small {
  color: #837989;
  font-size: 9px;
  line-height: 1.5;
}

.admob-platform-title {
  margin: 20px 0 10px;
  color: #41384a;
  font-size: 12px;
}

@media (max-width: 860px) {
  .admob-test-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .admob-test-center-head {
    display: grid;
  }

  .admob-runtime-pill {
    justify-self: start;
  }

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

.rewarded-copy-panel > p {
  margin: 9px 10px;
  color: #a99bad;
  font-size: 8px;
  line-height: 1.45;
  text-align: center;
}

.premium-copy-panel {
  border-color: rgba(89, 216, 143, 0.38);
}

.premium-copy-panel .copy-panel-header {
  color: #8ee9b8;
  background: rgba(24, 106, 70, 0.22);
}

.instant-button {
  display: grid;
  place-items: center;
  gap: 2px;
}

.premium-screen {
  position: absolute;
  z-index: 66;
  inset: 0;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 40px 22px 24px;
  color: #fff;
  background:
    radial-gradient(circle at 50% 34%, rgba(87, 55, 255, 0.56), transparent 35%),
    radial-gradient(circle at 50% 82%, rgba(29, 104, 255, 0.22), transparent 32%),
    linear-gradient(180deg, #11116e 0%, #3115c8 38%, #1e35d9 100%);
}

.premium-screen::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.premium-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.18;
  background-image:
    linear-gradient(60deg, transparent 47%, rgba(255, 255, 255, 0.15) 48%, transparent 49%),
    linear-gradient(-60deg, transparent 47%, rgba(255, 255, 255, 0.12) 48%, transparent 49%);
  background-size: 44px 44px;
}

.premium-screen > * {
  position: relative;
  z-index: 1;
}

.premium-close {
  width: 38px;
  height: 38px;
  position: absolute;
  z-index: 10;
  left: 14px;
  top: 14px;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(7, 3, 56, 0.4);
  font-size: 19px;
  pointer-events: auto;
}

.premium-close:hover {
  color: #fff;
  background: rgba(7, 3, 56, 0.72);
}

.premium-skyline {
  height: 76px;
  margin: -40px -22px 8px;
  opacity: 0.42;
  background:
    linear-gradient(rgba(4, 3, 47, 0.42), rgba(12, 8, 90, 0.2)),
    repeating-linear-gradient(90deg, #090742 0 24px, #14105e 24px 46px, #070635 46px 74px);
  clip-path: polygon(0 38%, 8% 24%, 16% 37%, 28% 10%, 38% 35%, 49% 16%, 60% 42%, 72% 12%, 84% 34%, 94% 18%, 100% 31%, 100% 100%, 0 100%);
  pointer-events: none;
}

.premium-heading {
  text-align: center;
  text-shadow: 0 3px 0 #0b074f, 0 0 15px rgba(255, 255, 255, 0.3);
}

.premium-heading > span {
  color: #ffec42;
  font-size: 15px;
  font-weight: 1000;
}

.premium-heading > div {
  margin-top: 1px;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: 34px;
  line-height: 0.9;
  letter-spacing: -0.025em;
  text-transform: uppercase;
}

.premium-heading strong {
  color: #ff62e7;
}

.premium-proof {
  margin: 17px 0 13px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.premium-proof span {
  padding: 8px 3px;
  border: 1px solid rgba(255, 223, 75, 0.42);
  border-radius: 8px;
  color: #d9dbff;
  background: rgba(10, 7, 86, 0.32);
  font-size: 6px;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
}

.premium-proof strong {
  display: block;
  margin-bottom: 2px;
  color: #ffe64d;
  font-size: 8px;
}

.premium-benefits {
  margin: 0;
  padding: 12px;
  display: grid;
  gap: 7px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  background: rgba(5, 4, 68, 0.25);
  list-style: none;
}

.premium-benefits li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 900;
  text-shadow: 0 2px 0 rgba(3, 1, 43, 0.65);
}

.premium-benefits li > span {
  width: 22px;
  height: 22px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 6px;
  color: #fff;
  background: #25c753;
  box-shadow: inset 0 -3px 0 #128535;
}

.premium-benefits strong {
  color: #ff3b61;
  text-decoration: underline;
}

.premium-benefits em {
  color: #ff75ec;
  font-style: normal;
}

.premium-tier-icons {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
}

.premium-tier-icons button {
  min-width: 0;
  padding: 7px 2px;
  display: grid;
  gap: 3px;
  place-items: center;
  border: 1px dashed rgba(74, 227, 255, 0.5);
  border-radius: 10px;
  color: rgba(93, 236, 255, 0.65);
  background: rgba(6, 14, 111, 0.2);
}

.premium-tier-icons button.active {
  color: #5dffd3;
  border-color: #5dffd3;
  background: rgba(59, 255, 196, 0.12);
  box-shadow: 0 0 16px rgba(75, 255, 209, 0.22);
}

.premium-tier-icons button > span {
  font-size: 20px;
}

.premium-tier-icons small {
  overflow: hidden;
  max-width: 100%;
  font-size: 6px;
  text-overflow: ellipsis;
}

.golden-tip-shield {
  width: 156px;
  height: 168px;
  margin: 17px auto 6px;
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  border: 7px solid #683a00;
  border-radius: 48% 48% 56% 56% / 35% 35% 66% 66%;
  color: #2c1600;
  background: linear-gradient(135deg, #fff69a, #ffc13d 52%, #e48c11 53%);
  box-shadow: 0 10px 0 #2d1800, 0 0 35px rgba(255, 223, 72, 0.38), inset 0 0 0 5px #ffdc5c;
  transform: perspective(300px) rotateX(-4deg);
}

.golden-tip-shield > span {
  font-size: 31px;
}

.golden-tip-shield strong {
  margin-top: 3px;
  color: #fff;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: 30px;
  letter-spacing: 0.02em;
  -webkit-text-stroke: 2px #3b2100;
  paint-order: stroke fill;
  text-shadow: 0 4px 0 #4b2a00;
}

.golden-tip-shield small {
  align-self: flex-end;
  margin-right: 22px;
  color: #fff3aa;
  font-size: 13px;
  font-weight: 1000;
  text-shadow: 0 2px 0 #724200;
}

.premium-slider-label {
  display: block;
  color: #d9deff;
  font-size: 7px;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.premium-slider {
  width: 76%;
  height: 18px;
  margin: 4px 12% 8px;
  accent-color: #9dff36;
}

.premium-buy {
  width: 100%;
  min-height: 67px;
  padding: 9px 14px;
  display: grid;
  place-items: center;
  border: 4px solid #111;
  border-radius: 16px;
  color: #0b1700;
  background: linear-gradient(#d5ff42, #78d907);
  box-shadow: 0 6px 0 #050900, inset 0 0 0 2px rgba(255, 255, 255, 0.48), 0 0 24px rgba(145, 255, 28, 0.32);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
}

.premium-buy strong {
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: 24px;
  letter-spacing: 0.015em;
}

.premium-buy span {
  font-size: 10px;
  font-weight: 950;
}

.premium-demo-note {
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 7px;
  text-align: center;
}

.premium-not-now {
  width: 100%;
  margin-top: 8px;
  padding: 7px;
  color: rgba(255, 255, 255, 0.72);
  background: transparent;
  font-size: 7px;
  font-weight: 850;
}

.premium-links {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: #60efef;
}

.premium-links button {
  padding: 2px;
  color: #60efef;
  background: transparent;
  font-size: 7px;
  font-weight: 800;
}

.premium-disclaimer {
  max-width: 310px;
  margin: 13px auto 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 9px;
  line-height: 1.4;
  text-align: center;
}

.premium-disclaimer a {
  color: #63e6ff;
  font-weight: 800;
  text-decoration: underline;
}

@keyframes loading-progress {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(230%); }
}

@keyframes loading-field {
  to { transform: translate3d(24px, 24px, 0); }
}

@keyframes reward-pulse {
  to { transform: scale(1.08); box-shadow: 0 0 55px rgba(189, 68, 255, 0.58); }
}

@keyframes reward-progress {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@media (max-width: 620px) {
  .ad-banner {
    position: fixed;
  }

  .startup-screen,
  .rewarded-backdrop,
  .interstitial-screen,
  .premium-screen {
    position: fixed;
  }

  .phone.overlay-active {
    height: 100dvh;
    min-height: 100dvh;
  }
}

/* ClashBase clarity refresh */
:root {
  --accent: #4f8cff;
  --accent-2: #ffb22e;
  --gold: #ffc94a;
  --green: #52d681;
  --ink: #16233a;
  --muted: #68768a;
  --line: #dce4ef;
  --surface-soft: #f3f6fa;
  background: #edf2f8;
}

body {
  background: #edf2f8;
}

.public-stage {
  background:
    radial-gradient(circle at 18% 8%, rgba(74, 144, 255, 0.3), transparent 31%),
    radial-gradient(circle at 82% 82%, rgba(255, 178, 46, 0.18), transparent 32%),
    linear-gradient(145deg, #071225 0%, #0b1c38 48%, #07101f 100%);
}

.public-stage::before {
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(108, 161, 226, 0.2) 1px, transparent 1px),
    linear-gradient(90deg, rgba(108, 161, 226, 0.2) 1px, transparent 1px);
  background-size: 52px 52px;
}

.public-toolbar-copy {
  color: #b9c8dc;
}

.public-toolbar-copy strong {
  color: #ffffff;
  letter-spacing: 0.01em;
}

.admin-link {
  border-color: rgba(137, 180, 235, 0.35);
  background: rgba(17, 43, 78, 0.84);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.phone-wrap {
  filter: drop-shadow(0 38px 90px rgba(0, 0, 0, 0.56));
}

.phone {
  border-color: #132a4d;
  color: #f8fbff;
  background:
    radial-gradient(circle at 85% 3%, rgba(79, 140, 255, 0.24), transparent 26%),
    linear-gradient(180deg, #0c1c38 0%, #081429 74%, #071020 100%);
  box-shadow:
    inset 0 0 0 1px rgba(133, 179, 235, 0.15),
    0 0 0 1px rgba(81, 135, 206, 0.28),
    0 28px 70px rgba(0, 0, 0, 0.42);
}

.phone::after {
  box-shadow: inset 0 0 70px rgba(36, 99, 168, 0.1);
}

.phone-status {
  color: #c7d4e6;
}

.phone-header {
  border-bottom-color: rgba(91, 154, 230, 0.44);
  background: linear-gradient(180deg, rgba(18, 43, 80, 0.98), rgba(11, 29, 58, 0.96));
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.round-action,
.back-button {
  color: #ffffff;
  border-color: rgba(137, 180, 235, 0.36);
  background: #17345e;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.round-action:hover,
.back-button:hover {
  border-color: #75adf1;
  background: #214879;
}

.brand-mark span:last-child {
  color: #ffc94a;
  text-shadow: 0 0 15px rgba(255, 196, 66, 0.46);
}

.phone-body {
  background:
    linear-gradient(rgba(99, 150, 218, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 150, 218, 0.035) 1px, transparent 1px);
  background-size: 32px 32px;
}

.home-controls {
  gap: 10px;
}

.village-button {
  min-height: 50px;
  color: #cfdaea;
  border: 1px solid #31557d;
  border-bottom: 4px solid #0b172a;
  background: linear-gradient(#183758, #102944);
  text-shadow: none;
  box-shadow: 0 7px 15px rgba(0, 0, 0, 0.16);
}

.village-button.active {
  color: #092218;
  border-color: #7ee3a1;
  border-bottom-color: #188448;
  background: linear-gradient(#79e5a0, #43c977);
  box-shadow: 0 0 0 2px rgba(86, 218, 133, 0.12), 0 8px 20px rgba(25, 161, 87, 0.25);
}

.primary-cta {
  min-height: 56px;
  color: #1c2635;
  border: 1px solid #ffe195;
  border-bottom: 5px solid #b96e09;
  background: linear-gradient(#ffd766, #ffad25);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
  box-shadow: 0 10px 22px rgba(225, 139, 17, 0.28);
}

.primary-cta:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.announcement {
  padding: 12px 13px;
  color: #f0f6ff;
  border-color: #365f91;
  background: linear-gradient(100deg, rgba(27, 71, 119, 0.82), rgba(17, 42, 75, 0.78));
  box-shadow: 0 9px 22px rgba(0, 0, 0, 0.16);
}

.announcement-icon {
  background: #22528a;
}

.announcement span {
  color: #b8c8dc;
  font-size: 10px;
}

.hall-stack,
.base-grid,
.army-list,
.tool-list {
  gap: 12px;
}

.hall-card,
.favorite-card,
.base-card {
  border-color: rgba(121, 171, 229, 0.48);
  box-shadow: 0 13px 30px rgba(0, 0, 0, 0.3), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.hall-card,
.favorite-card {
  height: 120px;
}

.hall-card::before {
  background: linear-gradient(90deg, rgba(5, 16, 32, 0.96), rgba(8, 25, 48, 0.72) 62%, rgba(7, 18, 34, 0.18));
}

.hall-copy {
  padding: 20px 18px;
}

.eyebrow {
  color: #ffd265;
  font-size: 10px;
}

.hall-meta {
  color: #e0e9f5;
  border-color: rgba(167, 199, 237, 0.34);
  background: rgba(4, 16, 31, 0.75);
  font-size: 10px;
}

.card-arrow {
  color: #11233c;
  background: #ffffff;
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.25);
}

.phone-bottom-nav {
  min-height: 79px;
  padding: 8px 7px 11px;
  gap: 5px;
  border-top-color: rgba(92, 145, 208, 0.46);
  background: rgba(9, 24, 48, 0.98);
  box-shadow: 0 -10px 24px rgba(0, 0, 0, 0.22);
}

.bottom-nav-item {
  color: #aebdd1;
  border: 1px solid transparent;
  font-size: 10px;
}

.bottom-nav-item .nav-emoji {
  font-size: 20px;
  filter: grayscale(0.25);
}

.bottom-nav-item.active {
  color: #ffffff;
  border-color: rgba(111, 170, 238, 0.38);
  background: linear-gradient(180deg, rgba(56, 112, 178, 0.72), rgba(27, 67, 113, 0.8));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09);
}

.screen-heading h1 {
  color: #ffffff;
}

.screen-heading p,
.section-intro,
.tool-screen-intro {
  color: #bcc9da;
  font-size: 11px;
}

.filter-chip,
.hero-tab {
  min-height: 34px;
  color: #c1cee0;
  border-color: #315174;
  background: #112743;
  font-size: 10px;
}

.filter-chip.active,
.hero-tab.active {
  color: #172338;
  border-color: #ffdc7d;
  background: linear-gradient(#ffd86c, #f5ad2c);
  box-shadow: 0 7px 18px rgba(225, 145, 27, 0.22);
}

.base-card::after {
  background: linear-gradient(0deg, rgba(4, 14, 29, 0.98) 0%, rgba(7, 22, 42, 0.18) 72%);
}

.base-card-content span {
  color: #ffd163;
  text-shadow: 0 0 10px rgba(255, 193, 66, 0.32);
}

.favorite-toggle,
.rating-pill {
  border-color: rgba(170, 202, 238, 0.36);
  background: rgba(7, 23, 43, 0.86);
}

.army-row,
.tool-card,
.guide-section,
.hero-profile,
.tool-form {
  border-color: #2d4f75;
  background: linear-gradient(120deg, rgba(24, 54, 91, 0.94), rgba(13, 34, 62, 0.94));
  box-shadow: 0 9px 22px rgba(0, 0, 0, 0.18);
}

.army-row:hover,
.tool-card:hover {
  border-color: #629ee5;
  background: linear-gradient(120deg, rgba(34, 75, 122, 0.96), rgba(17, 43, 76, 0.96));
}

.army-row-icon,
.tool-icon,
.tool-detail-icon {
  border-color: rgba(111, 169, 235, 0.44);
  background: linear-gradient(145deg, #28588e, #173b67);
}

.army-tag,
.army-guide-hall {
  color: #e5edf8;
  background: rgba(113, 159, 213, 0.18);
}

.army-hall,
.army-guide-hero > p,
.guide-unit-label,
.attack-steps li,
.hero-detail-section > p,
.priority-list p {
  color: #bac8d9;
}

.army-row-arrow,
.tool-card-action {
  color: #ffd064;
}

.army-guide-hero,
.tool-detail-title {
  border-color: rgba(89, 151, 224, 0.5);
  background:
    radial-gradient(circle at 50% 15%, rgba(79, 140, 255, 0.3), transparent 38%),
    linear-gradient(150deg, #173c69, #0b203e 74%);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

.tool-summary {
  border-color: #3e6eaa;
  background: linear-gradient(135deg, rgba(38, 91, 151, 0.72), rgba(17, 46, 85, 0.76));
}

.tool-summary strong {
  color: #ffffff;
  font-size: 12px;
}

.tool-summary span,
.tool-card p,
.tool-detail-title p,
.tool-how-it-works p {
  color: #b8c6d8;
  font-size: 10px;
}

.tool-card h3 {
  font-size: 14px;
}

.tool-go {
  color: #172338;
  background: #ffc94a;
}

.tool-how-it-works {
  border-left-color: #65a4ef;
  background: rgba(51, 104, 165, 0.18);
}

.tool-how-it-works strong,
.tool-field > span {
  color: #eef5ff;
  font-size: 10px;
}

.tool-field input,
.tool-field select {
  height: 42px;
  color: #ffffff;
  border-color: #3b628e;
  background: #0d213d;
  font-size: 11px;
}

.tool-field input:focus,
.tool-field select:focus {
  border-color: #6baaf1;
  box-shadow: 0 0 0 3px rgba(88, 158, 238, 0.18);
}

.tool-field small {
  color: #96a8bf;
  font-size: 8px;
}

.tool-submit,
.tool-copy-button {
  min-height: 43px;
  color: #16233a;
  background: linear-gradient(135deg, #ffd267, #f5a924);
  box-shadow: 0 9px 24px rgba(218, 139, 24, 0.24);
}

.hero-profile-banner {
  border-bottom: 1px solid rgba(138, 181, 232, 0.26);
}

.hero-ability {
  border-color: color-mix(in srgb, var(--hero-tone) 46%, #6e9dcc);
  background: color-mix(in srgb, var(--hero-tone) 18%, #132c4c);
}

.hero-ability span,
.tool-result dt {
  color: #aebfd3;
  font-size: 9px;
}

.priority-list li,
.guide-unit,
.army-builder-result section,
.war-map-result section {
  border: 1px solid rgba(106, 158, 216, 0.24);
  background: rgba(22, 52, 86, 0.72);
}

.tool-result {
  border-color: rgba(91, 218, 151, 0.5);
  background: linear-gradient(135deg, rgba(26, 113, 79, 0.38), rgba(13, 56, 49, 0.3));
}

.tool-result > p,
.army-builder-result p {
  color: #c2cfde;
  font-size: 10px;
}

.tool-result dd,
.army-builder-result strong,
.war-map-result strong {
  color: #f4f8ff;
  font-size: 9px;
}

@media (max-width: 620px) {
  .public-stage {
    background: #081429;
  }

  .phone {
    border-color: #0f2341;
  }
}

.base-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 15px;
}

.base-filter-chip {
  width: 100%;
  min-height: 53px;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-bottom-width: 4px;
  border-radius: 11px;
  color: #ffffff;
  font-size: 10px;
  font-weight: 950;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.42);
  white-space: nowrap;
  box-shadow: 0 7px 16px rgba(0, 0, 0, 0.23);
}

.base-filter-chip.farming {
  border-color: #8fec7a;
  border-bottom-color: #227b28;
  background: linear-gradient(#6fe05e, #35a93c);
}

.base-filter-chip.ranked {
  border-color: #75ccff;
  border-bottom-color: #0a559c;
  background: linear-gradient(#39b9ff, #137fd4);
}

.base-filter-chip.clan-war {
  border-color: #ff9292;
  border-bottom-color: #851d28;
  background: linear-gradient(#f36165, #c92f3c);
}

.base-filter-chip.active {
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow:
    0 0 0 2px #ffffff,
    0 0 0 4px rgba(255, 205, 76, 0.72),
    0 9px 20px rgba(0, 0, 0, 0.3);
}

.base-filter-chip:hover {
  color: #ffffff;
  filter: brightness(1.07);
}

.base-filter-icon {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 9px;
  background: rgba(7, 18, 34, 0.38);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 2px 5px rgba(0, 0, 0, 0.24);
}

.base-filter-icon img {
  display: block;
  max-width: none;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.38));
}

.base-filter-chip.farming .base-filter-icon img {
  width: 125px;
  height: 125px;
}

.base-filter-chip.ranked .base-filter-icon img {
  width: 70px;
  height: 70px;
}

.base-filter-chip.clan-war .base-filter-icon img {
  width: 66px;
  height: 66px;
}

@media (max-width: 380px) {
  .base-filters {
    gap: 6px;
  }

  .base-filter-chip {
    padding-inline: 5px;
    font-size: 9px;
  }

  .base-filter-icon {
    width: 27px;
    height: 27px;
  }

  .base-filter-chip.farming .base-filter-icon img {
    width: 112px;
    height: 112px;
  }

  .base-filter-chip.ranked .base-filter-icon img {
    width: 64px;
    height: 64px;
  }

  .base-filter-chip.clan-war .base-filter-icon img {
    width: 60px;
    height: 60px;
  }
}

/* Native app chrome: one Android status bar, fixed header/footer, and a clear ad dock. */
@media (max-width: 620px) {
  .phone-wrap {
    filter: none;
  }

  .phone-status,
  .phone-notch {
    display: none !important;
  }

  .phone-header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 30;
  }

  .phone-body {
    min-height: 100dvh;
    padding-top: 88px;
    padding-bottom: 102px;
  }

  .phone-bottom-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 31;
  }

  html.native-banner-visible .phone-body {
    padding-bottom: 174px;
  }
}

/* Official Supercell Fankit icon system. The initials remain visible if an asset fails. */
.game-icon {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: inherit;
  isolation: isolate;
}

.game-icon-fallback {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(145deg, #3978b5, #183b66);
  font-size: 9px;
  font-weight: 950;
  letter-spacing: -0.03em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
}

.game-icon img {
  width: 100%;
  height: 100%;
  z-index: 1;
  display: block;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.base-game-icon {
  width: 100%;
  height: 100%;
}

.village-game-icon {
  width: 38px;
  height: 38px;
  margin-block: 3px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 9px;
  background: rgba(8, 28, 50, 0.44);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.village-game-icon .game-icon-fallback {
  color: transparent;
  background: rgba(8, 28, 50, 0.72);
}

.base-filter-icon .base-game-icon img {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.base-game-icon .game-icon-fallback {
  background: linear-gradient(145deg, rgba(53, 113, 88, 0.9), rgba(14, 45, 68, 0.96));
}

.army-filters .filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.filter-game-icon,
.hero-tab-game-icon {
  width: 25px;
  height: 25px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 7px;
  background: #173b67;
}

.hero-tab-game-icon {
  border-radius: 50%;
}

.army-card-game-icon {
  width: 46px;
  height: 46px;
  border-radius: 11px;
}

.army-row-icon {
  padding: 0;
  overflow: hidden;
}

.army-guide-emoji {
  display: grid;
  place-items: center;
  font-size: 0;
}

.army-guide-game-icon {
  width: 96px;
  height: 96px;
  margin: 0 auto;
  border: 2px solid rgba(255, 223, 116, 0.72);
  border-radius: 24px;
  background: rgba(7, 21, 43, 0.7);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.36);
}

.guide-section-symbol {
  display: inline-grid;
  place-items: center;
}

.guide-heading-game-icon {
  width: 27px;
  height: 27px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 7px;
}

.guide-unit {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.guide-unit-game-icon {
  width: 35px;
  height: 35px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
}

.guide-unit-label {
  min-width: 0;
  color: #d9e4f1;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.3;
}

.hero-profile-icon {
  display: grid;
  place-items: center;
  font-size: 0;
}

.hero-profile-game-icon {
  width: 150px;
  height: 150px;
  border: 3px solid color-mix(in srgb, var(--hero-tone) 65%, white 35%);
  border-radius: 32px;
  background: rgba(8, 24, 47, 0.72);
  box-shadow: 0 15px 28px rgba(0, 0, 0, 0.4);
}

.hero-profile-game-icon[data-icon="minion prince"] img {
  transform: scale(1.12);
}

.tool-result-game-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.tool-unit-list {
  margin-top: 5px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.tool-unit-list > span {
  max-width: 100%;
  padding: 3px 7px 3px 3px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid rgba(117, 170, 226, 0.28);
  border-radius: 7px;
  color: #d4dfec;
  background: rgba(11, 32, 59, 0.7);
  font-size: 8px;
  font-weight: 750;
}

.tool-inline-game-icon {
  width: 23px;
  height: 23px;
  border-radius: 5px;
}

.official-content-thumb {
  background: #173b67;
}

.admin-game-icon {
  width: 34px;
  height: 34px;
  border-radius: 7px;
}

.tool-icon,
.tool-detail-icon {
  padding: 0;
  overflow: hidden;
}

.tool-card-game-icon,
.tool-detail-game-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
}

:is(.tool-card-game-icon, .tool-detail-game-icon, .admin-game-icon)[data-icon="farming"] img,
:is(.tool-card-game-icon, .tool-detail-game-icon, .admin-game-icon)[data-icon="ranked"] img,
:is(.tool-card-game-icon, .tool-detail-game-icon, .admin-game-icon)[data-icon="clan war"] img {
  max-width: none;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

:is(.tool-card-game-icon, .tool-detail-game-icon)[data-icon="farming"] img {
  width: 205px;
  height: 205px;
}

.admin-game-icon[data-icon="farming"] img {
  width: 158px;
  height: 158px;
}

:is(.tool-card-game-icon, .tool-detail-game-icon)[data-icon="ranked"] img {
  width: 110px;
  height: 110px;
}

.admin-game-icon[data-icon="ranked"] img {
  width: 85px;
  height: 85px;
}

:is(.tool-card-game-icon, .tool-detail-game-icon)[data-icon="clan war"] img {
  width: 105px;
  height: 105px;
}

.admin-game-icon[data-icon="clan war"] img {
  width: 81px;
  height: 81px;
}

.army-browser-bar {
  margin: 10px 0 12px;
  padding: 9px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid rgba(102, 169, 238, 0.28);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(20, 64, 108, 0.88), rgba(9, 34, 64, 0.94));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.army-hall-picker {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.army-hall-picker > span {
  color: #9fc7ef;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.army-hall-picker select {
  min-width: 122px;
  height: 32px;
  padding: 0 30px 0 10px;
  border: 1px solid rgba(255, 194, 61, 0.65);
  border-radius: 8px;
  color: #fff;
  background-color: #112f53;
  background-image:
    linear-gradient(45deg, transparent 50%, #ffc33d 50%),
    linear-gradient(135deg, #ffc33d 50%, transparent 50%);
  background-position:
    calc(100% - 14px) 13px,
    calc(100% - 9px) 13px;
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px;
  font: inherit;
  font-size: 10px;
  font-weight: 850;
  outline: none;
  appearance: none;
}

.army-hall-picker select:focus-visible {
  border-color: #ffe28a;
  box-shadow: 0 0 0 3px rgba(255, 195, 61, 0.18);
}

.army-plan-count {
  flex: 0 0 auto;
  color: #b8cee4;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.army-plan-count strong {
  margin-right: 2px;
  color: #ffc33d;
  font-size: 13px;
}

/* ClashBase supplied logo */
.app-logo {
  display: block;
  object-fit: contain;
  object-position: center;
  mix-blend-mode: screen;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.brand-mark {
  height: 58px;
  display: grid;
  place-items: center;
}

.brand-mark-logo {
  width: 58px;
  height: 58px;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.45));
}

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

.menu-brand-logo {
  width: 76px;
  height: 76px;
  flex: 0 0 76px;
  filter: drop-shadow(0 7px 13px rgba(0, 0, 0, 0.42));
}

.menu-logo {
  color: #ffffff;
  font-size: 20px;
  line-height: 1;
}

.menu-subtitle {
  max-width: 145px;
  margin-top: 5px;
  line-height: 1.35;
}

.loading-app-logo {
  width: 232px;
  height: 232px;
  margin: 4px 0 0;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 18px 34px rgba(0, 0, 0, 0.55));
  animation: brand-logo-enter 420ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.loading-screen p {
  margin: 7px 0 10px;
}

.creative-app-logo {
  width: 116px;
  height: 116px;
  margin: -8px 0 -2px;
  padding: 4px;
  border: 1px solid rgba(255, 198, 68, 0.58);
  border-radius: 18px;
  background: #030303;
  box-shadow: 0 13px 28px rgba(0, 0, 0, 0.42), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  mix-blend-mode: normal;
}

.premium-brand-logo {
  width: 112px;
  height: 112px;
  margin: -3px auto -10px;
  padding: 3px;
  border: 1px solid rgba(255, 226, 91, 0.72);
  border-radius: 15px;
  background: #030303;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.43), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  mix-blend-mode: normal;
}

.admin-brand-icon {
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(255, 196, 68, 0.52);
  background: #050505;
}

.admin-brand-logo {
  width: 48px;
  height: 48px;
  max-width: none;
  flex: 0 0 auto;
}

.theme-preview-logo {
  width: 92px;
  height: 92px;
}

.theme-preview-brand-logo {
  width: 92px;
  height: 92px;
  padding: 3px;
  border: 1px solid rgba(255, 199, 75, 0.5);
  border-radius: 14px;
  background: #030303;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.48);
  mix-blend-mode: normal;
}

@keyframes brand-logo-enter {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.84);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.admin-access-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  color: #f6f9ff;
  background:
    radial-gradient(circle at 50% 18%, rgba(52, 126, 255, 0.22), transparent 34%),
    linear-gradient(145deg, #07142b 0%, #0d2343 58%, #061225 100%);
}

.admin-access-card {
  width: min(440px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 34px;
  text-align: center;
  border: 1px solid rgba(110, 170, 255, 0.32);
  border-radius: 26px;
  background: rgba(7, 22, 46, 0.94);
  box-shadow: 0 26px 75px rgba(0, 0, 0, 0.48);
}

.admin-access-logo {
  width: 106px;
  height: 106px;
  overflow: hidden;
  border: 1px solid rgba(255, 193, 61, 0.48);
  border-radius: 24px;
  background: #030303;
}

.admin-access-logo img,
.admin-access-logo .admin-access-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.admin-access-kicker {
  color: #ffbf35;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.admin-access-card h1 {
  margin: 0;
  font-size: clamp(1.75rem, 6vw, 2.35rem);
}

.admin-access-card p,
.admin-access-card small {
  margin: 0;
  color: #aebdd5;
  line-height: 1.55;
}

.admin-access-error {
  width: 100%;
  padding: 12px 14px;
  color: #ffd9dc;
  border: 1px solid rgba(255, 92, 104, 0.42);
  border-radius: 12px;
  background: rgba(149, 24, 38, 0.26);
}

.admin-google-button,
.admin-signout-button {
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.admin-google-button {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  color: #10203b;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.24);
}

.admin-google-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.google-mark {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  color: #ffffff;
  border-radius: 50%;
  background: #4285f4;
}

.admin-back-link {
  color: #78b4ff;
  font-weight: 800;
  text-decoration: none;
}

.admin-access-loader {
  width: 42px;
  height: 42px;
  border: 4px solid rgba(111, 172, 255, 0.22);
  border-top-color: #ffbe36;
  border-radius: 50%;
  animation: admin-loading-spin 0.8s linear infinite;
}

.admin-sync-state {
  padding: 7px 10px;
  color: #a9bad2;
  border: 1px solid rgba(133, 164, 205, 0.24);
  border-radius: 999px;
  font-size: 0.73rem;
  font-weight: 800;
  white-space: nowrap;
}

.admin-sync-state.is-live {
  color: #6ce2a6;
  border-color: rgba(70, 211, 140, 0.36);
  background: rgba(24, 117, 75, 0.16);
}

.admin-signout-button {
  padding: 9px 12px;
  color: #dce9ff;
  border: 1px solid rgba(127, 166, 218, 0.3);
  border-radius: 10px;
  background: rgba(14, 39, 73, 0.82);
}

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

@media (max-width: 700px) {
  .admin-sync-state,
  .admin-signout-button {
    display: none;
  }

  .admin-access-shell {
    padding: 16px;
  }

  .admin-access-card {
    padding: 26px 20px;
  }
}

/* Home village polish: pinned selector, authentic scenery, and lightweight motion. */
.phone::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: -32%;
  pointer-events: none;
  opacity: 0.52;
  background:
    radial-gradient(circle at 22% 18%, rgba(62, 169, 255, 0.22), transparent 25%),
    radial-gradient(circle at 78% 62%, rgba(255, 188, 55, 0.15), transparent 24%),
    radial-gradient(circle at 50% 92%, rgba(71, 227, 153, 0.11), transparent 22%);
  animation: clashbase-ambient-drift 13s ease-in-out infinite alternate;
}

.brand-mark-logo {
  animation: clashbase-logo-float 4.8s ease-in-out infinite;
}

.home-controls {
  position: sticky;
  top: 78px;
  z-index: 24;
  margin: -6px -6px 0;
  padding: 8px 6px 10px;
  border: 1px solid rgba(111, 174, 240, 0.2);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(11, 31, 61, 0.97), rgba(8, 24, 48, 0.91));
  box-shadow: 0 10px 24px rgba(1, 8, 21, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
}

.village-button {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transform: translateZ(0);
  transition: transform 180ms ease, filter 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.village-button::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: -80%;
  bottom: -80%;
  left: -42%;
  width: 26%;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.38), transparent);
  transform: rotate(18deg);
}

.village-button.active::after {
  opacity: 1;
  animation: clashbase-selector-shine 3.8s ease-in-out infinite;
}

.village-button:hover,
.village-button:focus-visible {
  transform: translateY(-2px);
  filter: brightness(1.06);
}

.village-button:active,
.primary-cta:active,
.hall-card:active,
.favorite-card:active,
.army-row:active,
.tool-card:active {
  transform: translateY(1px) scale(0.985);
}

.village-button.active .village-game-icon {
  animation: clashbase-icon-bob 3.4s ease-in-out infinite;
}

.primary-cta {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  animation: clashbase-content-enter 420ms cubic-bezier(0.2, 0.75, 0.2, 1) both;
}

.primary-cta::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -70% auto -70% -45%;
  width: 30%;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: rotate(16deg);
  animation: clashbase-cta-shine 4.6s ease-in-out infinite 1.2s;
}

.announcement {
  animation: clashbase-content-enter 480ms cubic-bezier(0.2, 0.75, 0.2, 1) 70ms both;
}

.hall-stack {
  animation: clashbase-content-enter 520ms cubic-bezier(0.2, 0.75, 0.2, 1) 90ms both;
}

.hall-card,
.favorite-card {
  background-color: #071427;
  background-position: center 46%;
  background-size: cover;
  transform: translateZ(0);
  transition: transform 220ms cubic-bezier(0.2, 0.75, 0.2, 1), box-shadow 220ms ease, border-color 220ms ease, filter 220ms ease;
  animation: clashbase-card-enter 560ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.builder-hall-card {
  background-position: center 37%;
}

.main-hall-card[data-hall="17"] {
  background-position: center 70%;
}

.main-hall-card[data-hall="16"],
.main-hall-card[data-hall="15"] {
  background-position: center 60%;
}

.hall-card::after,
.favorite-card::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  opacity: 0.58;
  background:
    linear-gradient(115deg, transparent 18%, rgba(255, 255, 255, 0.12) 43%, transparent 55%),
    radial-gradient(circle at 88% 18%, rgba(255, 206, 84, 0.22), transparent 30%);
  background-size: 220% 100%, 100% 100%;
  background-position: 130% 0, 0 0;
  transition: opacity 220ms ease, background-position 650ms ease;
}

.hall-card > *,
.favorite-card > * {
  position: relative;
  z-index: 1;
}

.hall-card:hover,
.hall-card:focus-visible,
.favorite-card:hover,
.favorite-card:focus-visible {
  transform: translateY(-3px) scale(1.008);
  filter: saturate(1.08) brightness(1.04);
  border-color: rgba(255, 210, 91, 0.72);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.38), 0 0 22px rgba(69, 157, 255, 0.13);
}

.hall-card:hover::after,
.hall-card:focus-visible::after,
.favorite-card:hover::after,
.favorite-card:focus-visible::after {
  opacity: 0.92;
  background-position: -120% 0, 0 0;
}

.hall-card:hover .card-arrow,
.hall-card:focus-visible .card-arrow,
.favorite-card:hover .card-arrow,
.favorite-card:focus-visible .card-arrow {
  transform: translate(4px, -50%) scale(1.06);
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.34), 0 0 0 4px rgba(255, 211, 79, 0.12);
}

.hall-stack > :nth-child(2) { animation-delay: 50ms; }
.hall-stack > :nth-child(3) { animation-delay: 90ms; }
.hall-stack > :nth-child(4) { animation-delay: 130ms; }
.hall-stack > :nth-child(5) { animation-delay: 170ms; }
.hall-stack > :nth-child(6) { animation-delay: 210ms; }
.hall-stack > :nth-child(n + 7) { animation-delay: 250ms; }

.base-grid > *,
.army-list > *,
.tool-list > *,
.hero-profile,
.hero-tabs {
  animation: clashbase-card-enter 520ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.base-card,
.army-row,
.tool-card,
.hero-tab,
.hero-profile {
  transition: transform 190ms ease, filter 190ms ease, box-shadow 190ms ease, border-color 190ms ease;
}

.base-card:hover,
.army-row:hover,
.tool-card:hover,
.hero-tab:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

.bottom-nav-item,
.round-action,
.card-arrow {
  will-change: transform;
}

.bottom-nav-item:active,
.round-action:active {
  transform: scale(0.92);
}

@media (max-width: 620px) {
  .phone {
    overflow: clip;
  }

  .home-controls {
    top: 74px;
  }
}

@keyframes clashbase-ambient-drift {
  0% { transform: translate3d(-3%, -2%, 0) rotate(-2deg) scale(1); }
  100% { transform: translate3d(4%, 3%, 0) rotate(2deg) scale(1.06); }
}

@keyframes clashbase-logo-float {
  0%, 100% { transform: translateY(0) scale(1); filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.45)); }
  50% { transform: translateY(-3px) scale(1.025); filter: drop-shadow(0 7px 13px rgba(255, 189, 50, 0.24)); }
}

@keyframes clashbase-selector-shine {
  0%, 58% { transform: translateX(0) rotate(18deg); }
  82%, 100% { transform: translateX(760%) rotate(18deg); }
}

@keyframes clashbase-icon-bob {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-2px) scale(1.04); }
}

@keyframes clashbase-cta-shine {
  0%, 64% { transform: translateX(0) rotate(16deg); }
  88%, 100% { transform: translateX(540%) rotate(16deg); }
}

@keyframes clashbase-content-enter {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes clashbase-card-enter {
  from { opacity: 0; transform: translateY(18px) scale(0.975); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .phone::before,
  .brand-mark-logo,
  .village-button.active::after,
  .village-button.active .village-game-icon,
  .primary-cta,
  .primary-cta::after,
  .announcement,
  .hall-stack,
  .hall-card,
  .favorite-card,
  .base-grid > *,
  .army-list > *,
  .tool-list > *,
  .hero-profile,
  .hero-tabs {
    animation: none !important;
  }
}

/* Make the home premium action unmistakable and easier to read. */
.primary-cta.premium-cta {
  min-height: 70px;
  padding: 11px 15px 12px;
  border: 2px solid #ff8d98;
  border-bottom: 6px solid #780b18;
  border-radius: 13px;
  color: #ffffff;
  background: linear-gradient(180deg, #f84a52 0%, #d51e30 62%, #b51023 100%);
  text-shadow: 0 2px 2px rgba(82, 0, 8, 0.58);
  box-shadow: 0 0 0 2px rgba(255, 77, 91, 0.14), 0 10px 22px rgba(180, 12, 33, 0.38);
}

.primary-cta.premium-cta span {
  color: #ffffff;
  font-size: 15px;
  font-weight: 1000;
  line-height: 1.15;
}

.primary-cta.premium-cta small {
  color: #ffe59a;
  font-size: 9px;
  font-weight: 900;
  line-height: 1.25;
  text-shadow: 0 1px 1px rgba(82, 0, 8, 0.65);
}

/* Final mobile overrides must remain last so Android scrolling stays lightweight. */
@media (max-width: 620px) {
  html {
    scroll-behavior: auto;
  }

  .phone {
    overflow: clip;
  }

  .phone::before {
    display: none !important;
  }

  .phone-header,
  .phone-bottom-nav,
  .home-controls {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  .home-controls {
    position: fixed !important;
    z-index: 29;
    top: 74px;
    right: 0;
    left: 0;
    width: auto;
    margin: 0;
    padding: 8px 13px 10px;
    border-width: 0 0 1px;
    border-radius: 0 0 14px 14px;
    background: #0b1f3d;
    box-shadow: 0 7px 16px rgba(1, 8, 21, 0.24);
    transform: translateZ(0);
  }

  .home-controls + .primary-cta {
    margin-top: 76px;
  }

  .brand-mark-logo,
  .village-button.active .village-game-icon,
  .primary-cta,
  .announcement,
  .hall-stack,
  .hall-card,
  .favorite-card,
  .base-grid > *,
  .army-list > *,
  .tool-list > *,
  .hero-profile,
  .hero-tabs {
    animation: none !important;
  }

  .village-button::after,
  .primary-cta::after {
    display: none !important;
  }

  .hall-card,
  .favorite-card {
    content-visibility: auto;
    contain: layout paint style;
    contain-intrinsic-size: 120px;
    filter: none;
    box-shadow: 0 7px 16px rgba(0, 0, 0, 0.24);
    transition: transform 110ms ease, border-color 110ms ease;
  }

  .hall-card::after,
  .favorite-card::after {
    opacity: 0.38;
    transition: none;
  }

  .bottom-nav-item,
  .round-action,
  .card-arrow {
    will-change: auto;
  }
}

/* Re-enable only compositor-friendly effects after the final mobile safeguards. */
@media (max-width: 620px) and (prefers-reduced-motion: no-preference) {
  .primary-cta.premium-cta {
    animation: clashbase-lite-rise 300ms cubic-bezier(0.2, 0.75, 0.2, 1) both !important;
  }

  .announcement {
    animation: clashbase-lite-rise 320ms cubic-bezier(0.2, 0.75, 0.2, 1) 35ms both !important;
  }

  .hall-stack,
  .base-grid,
  .army-list,
  .tool-list,
  .hero-profile,
  .guide-stack {
    animation: clashbase-lite-rise 340ms cubic-bezier(0.2, 0.75, 0.2, 1) 55ms both !important;
  }

  .base-modal,
  .page-modal,
  .premium-screen,
  .menu-panel {
    transform-origin: center bottom;
    animation: clashbase-lite-pop 220ms cubic-bezier(0.16, 1, 0.3, 1) both !important;
  }

  .bottom-nav-item.active .nav-emoji,
  .village-button.active .village-game-icon {
    animation: clashbase-lite-select 190ms ease-out both !important;
  }

  .village-button,
  .primary-cta,
  .hall-card,
  .favorite-card,
  .base-card,
  .army-row,
  .tool-card,
  .hero-tab,
  .bottom-nav-item,
  .copy-button,
  .instant-button,
  .round-action,
  .card-arrow {
    transition: transform 110ms ease, opacity 110ms ease, border-color 110ms ease !important;
  }

  .village-button:active,
  .primary-cta:active,
  .hall-card:active,
  .favorite-card:active,
  .base-card:active,
  .army-row:active,
  .tool-card:active,
  .hero-tab:active,
  .copy-button:active,
  .instant-button:active {
    transform: translate3d(0, 1px, 0) scale(0.985);
  }
}

/* Continuous sheen reserved for the Remove Ads / instant-copy CTA. */
.phone .primary-cta.premium-cta.button-sweep-ready {
  overflow: hidden;
  isolation: isolate;
}

.phone .primary-cta.premium-cta > .button-light-sweep {
  width: 24%;
  position: absolute;
  z-index: 5;
  top: -45%;
  bottom: -45%;
  left: -42%;
  display: block;
  pointer-events: none;
  opacity: 0.2;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.92), transparent);
  transform: translate3d(0, 0, 0) skewX(-18deg);
}

@keyframes clashbase-button-sweep {
  0%, 60% { transform: translate3d(0, 0, 0) skewX(-18deg); }
  82%, 100% { transform: translate3d(600%, 0, 0) skewX(-18deg); }
}

@media (prefers-reduced-motion: no-preference) {
  .phone .primary-cta.premium-cta > .button-light-sweep {
    animation: clashbase-button-sweep 4.8s ease-in-out infinite;
    animation-delay: var(--button-sweep-delay, 0s);
  }
}

@media (prefers-reduced-motion: reduce) {
  .phone .primary-cta.premium-cta > .button-light-sweep {
    display: none;
  }
}

/* Public hosting mirrors the native app instead of showing a desktop preview shell. */
.public-stage.public-app-live {
  width: min(100%, 430px);
  min-height: 100dvh;
  margin: 0 auto;
  padding: 0;
  overflow: visible;
  background: #081429;
}

.public-stage.public-app-live::before {
  display: none;
}

.public-stage.public-app-live .phone-wrap {
  width: 100%;
  filter: none;
}

.public-stage.public-app-live .phone {
  min-height: 100dvh;
  border: 0;
  border-radius: 0;
  overflow: clip;
}

.public-stage.public-app-live .phone::after,
.public-stage.public-app-live .phone-notch,
.public-stage.public-app-live .phone-status {
  display: none !important;
}

@media (min-width: 621px) {
  .public-stage.public-app-live .phone-header,
  .public-stage.public-app-live .phone-bottom-nav,
  .public-stage.public-app-live .ad-banner {
    width: min(100%, 430px);
    right: auto;
    left: 50%;
    transform: translateX(-50%);
  }

  .public-stage.public-app-live .phone-header {
    position: fixed;
    top: 0;
    z-index: 30;
  }

  .public-stage.public-app-live .phone-body {
    min-height: 100dvh;
    padding-top: 88px;
    padding-bottom: 102px;
  }

  .public-stage.public-app-live .phone-bottom-nav {
    position: fixed;
    bottom: 0;
    z-index: 31;
  }

  .public-stage.public-app-live .ad-banner {
    position: fixed;
  }

  .public-stage.public-app-live .menu-backdrop,
  .public-stage.public-app-live .modal-backdrop,
  .public-stage.public-app-live .startup-screen,
  .public-stage.public-app-live .rewarded-backdrop,
  .public-stage.public-app-live .interstitial-screen,
  .public-stage.public-app-live .premium-screen {
    position: fixed;
    width: min(100%, 430px);
    right: auto;
    left: 50%;
    transform: translateX(-50%);
  }
}
