:root {
  --bg: #14100d;
  --panel: rgba(36, 42, 44, 0.92);
  --panel-strong: #20282b;
  --line: rgba(255, 205, 91, 0.24);
  --text: #f7ead2;
  --muted: #b9ad9b;
  --gold: #ffbf2f;
  --orange: #ff761b;
  --blue: #39c6ff;
  --green: #9ee05e;
  --danger: #ed4d3d;
  font-family: "Trebuchet MS", "Gill Sans", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 5%, rgba(255, 147, 29, 0.26), transparent 26rem),
    radial-gradient(circle at 80% 0%, rgba(57, 198, 255, 0.18), transparent 30rem),
    linear-gradient(135deg, #20110c 0%, #172226 52%, #11100e 100%);
}

a {
  color: inherit;
}

.hero {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 2rem;
  align-items: center;
  padding: 2.4rem clamp(1rem, 4vw, 4rem);
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0)),
    url("/web/assets/MapPaper.png") center/cover;
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.35);
}

.site-logo-link {
  grid-column: 2;
  justify-self: center;
  display: inline-flex;
  border-radius: 18px;
  line-height: 0;
}

.site-logo {
  width: min(560px, 42vw);
  max-height: 230px;
  object-fit: contain;
  filter: drop-shadow(0 12px 16px rgba(0, 0, 0, 0.5));
}

.hero h1 {
  margin: 0;
  color: var(--gold);
  font-size: clamp(2rem, 5vw, 4.8rem);
  letter-spacing: 0.04em;
  text-shadow: 0 4px 0 #5c2609, 0 0 18px rgba(255, 118, 27, 0.6);
}

.subhead {
  max-width: 48rem;
  color: #2c2114;
  font-weight: 800;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.2);
}

.eyebrow {
  margin: 0 0 0.35rem;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

.hero-nav-left {
  grid-column: 1;
  justify-self: start;
}

.hero-nav-right {
  grid-column: 3;
  justify-self: end;
}

.hero-nav a,
.button {
  padding: 0.7rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: linear-gradient(#3c4648, #202629);
  color: var(--text);
  text-decoration: none;
  font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 0.4rem 0.8rem rgba(0, 0, 0, 0.25);
}

.nav-button {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.nav-button img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.55));
}

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

.button.danger {
  border-color: rgba(255, 95, 95, 0.45);
  background: linear-gradient(#673030, #2b1515);
  color: #ffd9d9;
}

.button.active {
  border-color: rgba(255, 174, 39, 0.8);
  color: #fff7c8;
}

.steam-login-button {
  display: inline-flex;
  width: fit-content;
  margin-top: 0.8rem;
  line-height: 0;
  text-decoration: none;
}

.steam-login-button img {
  display: block;
  width: 180px;
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 0.45rem 0.6rem rgba(0, 0, 0, 0.35));
}

main {
  width: min(1440px, calc(100% - 2rem));
  margin: 1rem auto 4rem;
}

.legal-notice {
  width: min(1440px, calc(100% - 2rem));
  margin: -2rem auto 2rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(255, 205, 91, 0.18);
  color: rgba(247, 234, 210, 0.62);
  font-size: 0.82rem;
  line-height: 1.35;
  text-align: center;
}

.legal-notice p {
  margin: 0.18rem 0;
}

.home-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.82fr) minmax(360px, 1.6fr) minmax(220px, 0.82fr);
  gap: 1rem;
  align-items: start;
}

.panel {
  margin: 1rem 0;
  padding: clamp(1rem, 2vw, 1.5rem);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
  box-shadow: 0 1rem 2.4rem rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.home-main {
  text-align: center;
}

.home-main h1 {
  margin: 0 0 1rem;
  color: var(--gold);
  font-size: clamp(2.1rem, 4vw, 4.4rem);
  letter-spacing: 0.035em;
  text-shadow: 0 4px 0 #5c2609, 0 0 18px rgba(255, 118, 27, 0.48);
}

.home-main p {
  max-width: 54rem;
  margin: 0.45rem auto;
  color: #eadcc2;
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.42;
}

.trailer-copy {
  margin-top: 1.2rem !important;
  color: var(--green) !important;
}

.video-frame {
  position: relative;
  overflow: hidden;
  width: 100%;
  margin: 1rem auto;
  border: 1px solid rgba(255, 205, 91, 0.32);
  border-radius: 18px;
  background: #080b0c;
  box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.38);
}

.video-frame::before {
  display: block;
  padding-top: 56.25%;
  content: "";
}

.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.discord-link {
  display: inline-flex;
  margin-top: 0.4rem;
  padding: 0.85rem 1.2rem;
  border: 1px solid rgba(158, 224, 94, 0.45);
  border-radius: 999px;
  background: linear-gradient(#38532f, #172516);
  color: #d9ffb6;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 0.6rem 1rem rgba(0, 0, 0, 0.25);
}

.news-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.news-card {
  padding: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0.24));
}

.news-card img {
  width: 100%;
  max-height: 112px;
  margin-bottom: 0.6rem;
  border-radius: 12px;
  object-fit: contain;
  background: rgba(0, 0, 0, 0.18);
}

.news-card strong {
  display: block;
  color: white;
  font-size: 1.02rem;
}

.news-card p {
  margin: 0.35rem 0 0;
  color: var(--muted);
  line-height: 1.28;
}

.sale-price {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.55rem;
  min-height: 2rem;
  align-items: center;
  justify-content: center;
}

.sale-carousel {
  display: grid;
  gap: 0.7rem;
  min-height: 402px;
  align-content: start;
}

.sale-promo {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(4.25rem, auto) 1fr auto;
  align-items: center;
  height: 360px;
  min-height: 360px;
  padding: 1.05rem 0.85rem 1rem;
  border: 3px solid rgba(24, 84, 103, 0.8);
  border-radius: 18px;
  background-color: #168f83;
  background-position: center;
  background-size: cover;
  box-shadow: inset 0 0 0 2px rgba(79, 221, 255, 0.18), 0 1rem 1.5rem rgba(0, 0, 0, 0.3);
  text-align: center;
}

.sale-ribbon {
  display: inline-block;
  margin: -0.3rem auto 0.4rem;
  padding: 0.25rem 1.2rem;
  border-radius: 0 0 14px 14px;
  background: linear-gradient(#ffd545, #ff9d18);
  color: #5d2200;
  font-size: 1.25rem;
  font-weight: 900;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.48);
  transform: rotate(-1deg);
}

.sale-title {
  display: -webkit-box;
  min-height: 4.25rem;
  overflow: hidden;
  color: white;
  font-size: clamp(1.35rem, 2.5vw, 2.1rem);
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 3px 0 #22313a, 0 0 8px rgba(0, 0, 0, 0.65);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.sale-art {
  display: block;
  width: min(260px, 94%);
  height: 185px;
  max-height: 185px;
  margin: 0.35rem auto 0.2rem;
  object-fit: contain;
  filter: drop-shadow(0 1rem 0.65rem rgba(0, 0, 0, 0.42));
}

.sale-badge {
  position: absolute;
  left: 0.8rem;
  bottom: 3.2rem;
  display: grid;
  place-items: center;
  width: 5.1rem;
  height: 5.1rem;
  padding: 0.55rem;
  border-radius: 50%;
  background: radial-gradient(circle, #fffa69 0 24%, #ffcf2a 25% 45%, #f23035 46% 100%);
  color: white;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.05;
  text-align: center;
  text-shadow: 0 2px 0 #7d1518;
  transform: rotate(-13deg);
  box-shadow: 0 0 0 3px #ffea4b, 0 0.5rem 0.6rem rgba(0, 0, 0, 0.3);
}

.sale-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 2rem;
}

.sale-arrow,
.sale-dot {
  border: 0;
  cursor: pointer;
}

.sale-arrow {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: linear-gradient(#3c4648, #202629);
  color: white;
  font-size: 1.4rem;
  font-weight: 900;
}

.sale-dots {
  display: flex;
  gap: 0.35rem;
}

.sale-dot {
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.25);
}

.sale-dot.active {
  background: white;
}

.panel-title {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}

h2,
h3 {
  margin: 0;
  color: var(--gold);
  text-shadow: 0 2px 0 #632507;
}

input[type="search"] {
  width: min(24rem, 100%);
  padding: 0.8rem 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #111719;
  color: var(--text);
  font: inherit;
}

input,
select,
textarea {
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #111719;
  color: var(--text);
  font: inherit;
}

textarea {
  min-height: 8rem;
  resize: vertical;
}

.players-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 0.8rem;
}

.pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

.player-card,
.leader-row,
.alliance-card,
.structure-row,
.stat-card {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0.22));
}

.player-card {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  padding: 1rem;
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease;
}

.player-card:hover {
  transform: translateY(-3px);
  border-color: rgba(57, 198, 255, 0.6);
}

.player-card-copy,
.alliance-copy {
  min-width: 0;
}

.banner-preview {
  position: relative;
  flex: 0 0 auto;
  aspect-ratio: 4 / 5;
  filter: drop-shadow(0 9px 10px rgba(0, 0, 0, 0.45));
}

.banner-preview.small {
  width: 54px;
}

.banner-preview.tiny {
  width: 34px;
}

.banner-preview.micro {
  width: 24px;
}

.banner-preview.medium {
  width: 88px;
}

.banner-preview.large {
  width: 112px;
}

.banner-preview.editor {
  width: min(240px, 72vw);
}

.banner-preview.structure {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 8px 7px rgba(0, 0, 0, 0.48));
}

.name {
  color: white;
  font-size: 1.2rem;
  font-weight: 900;
}

.muted {
  color: var(--muted);
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.7rem;
}

.pill {
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  background: #151b1d;
  color: var(--green);
  font-size: 0.85rem;
  font-weight: 900;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.stat-grid.compact {
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
}

.stat-card {
  padding: 0.9rem;
}

.icon-stat {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 0.65rem;
  align-items: center;
  min-height: 78px;
}

.icon-stat img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  filter: drop-shadow(0 5px 5px rgba(0, 0, 0, 0.55));
}

.icon-stat img.valor-icon {
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
}

.dog-tag-stat-icon {
  position: relative;
  width: 31px;
  height: 47px;
  justify-self: center;
  border: 2px solid rgba(151, 230, 255, 0.9);
  border-radius: 14px 14px 11px 11px;
  background:
    radial-gradient(circle at 50% 13%, rgba(5, 33, 52, 0.85) 0 4px, transparent 4.5px),
    linear-gradient(145deg, #b9efff 0%, #5bb8da 42%, #2d789a 72%, #1b4f6f 100%);
  box-shadow:
    inset 0 0 10px rgba(255, 255, 255, 0.35),
    inset 0 -12px 12px rgba(5, 20, 34, 0.28),
    0 5px 5px rgba(0, 0, 0, 0.55);
  transform: rotate(-8deg);
}

.dog-tag-stat-icon::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -12px;
  width: 28px;
  height: 15px;
  transform: translateX(-50%);
  border-top: 3px dotted rgba(143, 221, 246, 0.85);
  border-radius: 999px;
}

.dog-tag-stat-icon::after {
  content: "";
  position: absolute;
  inset: 5px 7px auto;
  height: 1px;
  background: rgba(255, 255, 255, 0.45);
  box-shadow: 0 5px 0 rgba(255, 255, 255, 0.18), 0 10px 0 rgba(255, 255, 255, 0.12);
}

.badge-stat {
  grid-template-columns: 56px 1fr;
}

.stat-badge {
  position: relative;
  width: 56px;
  height: 56px;
  justify-self: center;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 5px 5px rgba(0, 0, 0, 0.55));
}

.stat-badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.stat-badge-value {
  position: absolute;
  left: 50%;
  top: 52%;
  transform: translate(-50%, -50%);
  color: #39fbff;
  font-size: 1.35rem;
  font-weight: 1000;
  letter-spacing: -0.06em;
  text-shadow:
    -2px -2px 0 #102126,
    2px -2px 0 #102126,
    -2px 2px 0 #102126,
    2px 2px 0 #102126,
    0 3px 5px rgba(0, 0, 0, 0.75);
}

.base-power-badge .stat-badge {
  width: 62px;
  height: 62px;
}

.base-power-badge .stat-badge-value {
  top: 61%;
  color: white;
  font-size: 1rem;
  letter-spacing: -0.04em;
  text-shadow:
    -2px -2px 0 #1e2528,
    2px -2px 0 #1e2528,
    -2px 2px 0 #1e2528,
    2px 2px 0 #1e2528,
    0 3px 5px rgba(0, 0, 0, 0.75);
}

.value-on-badge span {
  display: none;
}

.stat-copy {
  min-width: 0;
}

.stat-card strong {
  display: block;
  color: var(--blue);
  font-size: 0.8rem;
  text-transform: uppercase;
}

.stat-card span {
  display: block;
  margin-top: 0.2rem;
  color: white;
  font-size: 1.4rem;
  font-weight: 900;
}

.stat-copy.value-on-badge > span {
  display: none;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.base-canvas {
  position: relative;
  height: min(66vh, 680px);
  min-height: 520px;
  overflow-x: auto;
  overflow-y: hidden;
  border: 2px solid rgba(57, 198, 255, 0.45);
  border-radius: 22px;
  background: #173040;
  scrollbar-color: #39c6ff #111719;
}

.base-stage {
  position: relative;
  min-width: 100%;
  min-height: 100%;
  background:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px),
    radial-gradient(circle at 40% 20%, rgba(127, 205, 255, 0.42), rgba(38, 87, 113, 0.55) 40%, rgba(19, 38, 52, 0.95)),
    #173040;
  background-size: 42px 42px, 42px 42px, auto, auto;
}

.build-area-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.build-area-fill {
  fill: url(#grassPattern);
  opacity: 0.92;
}

.build-area-line {
  fill: rgba(57, 198, 255, 0.16);
  stroke: #19bfff;
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 7px rgba(57, 198, 255, 0.95));
}

.base-item {
  position: absolute;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  z-index: 2;
}

.base-item.hq {
  z-index: 3;
}

.base-item img {
  max-width: 100%;
  max-height: 100%;
  filter: drop-shadow(0 10px 8px rgba(0, 0, 0, 0.45));
}

.fallback-structure {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--orange);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.15);
}

.arrow {
  position: absolute;
  left: 50%;
  top: -10px;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 18px solid var(--blue);
  filter: drop-shadow(0 0 4px #001e2d);
  transform-origin: 50% 44px;
}

.base-label {
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translateX(-50%);
  padding: 0.15rem 0.35rem;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.72);
  color: white;
  font-size: 0.72rem;
  white-space: nowrap;
}

.structure-list,
.leaderboards,
.alliance-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.8rem;
  margin-top: 1rem;
}

.alliance-list {
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
}

.structure-row,
.alliance-card {
  padding: 0.85rem;
}

.alliance-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: center;
  min-height: 164px;
}

.leader-row {
  display: grid;
  grid-template-columns: 3rem 1fr auto;
  gap: 0.6rem;
  align-items: center;
  padding: 0.65rem 0.8rem;
  margin-bottom: 0.45rem;
}

.leader-copy {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}

.leader-line {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.leader-line .banner-preview {
  flex: 0 0 auto;
}

.leader-line span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank {
  color: var(--gold);
  font-weight: 900;
}

.score {
  color: var(--green);
  font-weight: 900;
}

.account-card {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0.24));
}

.banner-editor {
  display: grid;
  grid-template-columns: minmax(190px, 270px) minmax(0, 1fr);
  gap: 1.2rem;
  align-items: start;
}

.banner-management-card > .button,
.banner-management-card > button {
  justify-self: start;
}

.banner-preview-panel {
  position: sticky;
  top: 1rem;
  display: grid;
  justify-items: center;
  gap: 0.8rem;
  padding: 1rem;
  border: 1px solid rgba(57, 198, 255, 0.22);
  border-radius: 18px;
  background:
    radial-gradient(circle at center, rgba(57, 198, 255, 0.16), transparent 62%),
    rgba(0, 0, 0, 0.25);
}

.banner-picker-panel {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.picker-group {
  display: grid;
  gap: 0.55rem;
}

.picker-group h4 {
  margin: 0;
  color: var(--blue);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(74px, 1fr));
  gap: 0.55rem;
  max-height: 270px;
  overflow: auto;
  padding: 0.25rem;
}

.picker-option,
.color-option {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.34));
  color: var(--text);
  cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.picker-option {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 0.35rem;
  min-height: 76px;
  padding: 0.45rem;
}

.picker-option:hover,
.color-option:hover {
  transform: translateY(-2px);
  border-color: rgba(57, 198, 255, 0.6);
}

.picker-option.active,
.color-option.active {
  border-color: rgba(255, 174, 39, 0.92);
  box-shadow: 0 0 0 2px rgba(255, 174, 39, 0.18), 0 0 22px rgba(255, 174, 39, 0.24);
}

.picker-option img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  filter: drop-shadow(0 5px 5px rgba(0, 0, 0, 0.45));
}

.picker-option span {
  max-width: 100%;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.color-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(46px, 1fr));
  gap: 0.5rem;
  padding: 0.25rem;
}

.color-option {
  position: relative;
  min-height: 46px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.34), transparent 38%, rgba(0, 0, 0, 0.34)),
    var(--swatch);
}

.color-option span {
  position: absolute;
  inset: auto 0 0;
  overflow: hidden;
  padding: 0.12rem 0.18rem;
  background: rgba(0, 0, 0, 0.42);
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.55rem;
  font-weight: 900;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
}

.form-field {
  display: grid;
  gap: 0.3rem;
  color: var(--muted);
  font-weight: 900;
}

.chat-box {
  display: grid;
  gap: 0.45rem;
  max-height: 320px;
  overflow: auto;
  padding: 0.8rem;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.22);
}

.chat-line {
  display: grid;
  gap: 0.2rem;
  padding: 0.55rem 0.65rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
}

.chat-line.system {
  color: var(--green);
}

.inline-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.65rem;
}

.application-list,
.report-form {
  display: grid;
  gap: 0.7rem;
}

.application-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.7rem;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.18);
}

.hidden {
  display: none;
}

.admin-login-card,
.admin-panel,
.admin-subpanel {
  display: grid;
  gap: 0.8rem;
}

.admin-shell-header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
  margin-bottom: 1rem;
}

.admin-status {
  color: var(--green);
  font-weight: 900;
}

.admin-status.error {
  color: #ff7979;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.admin-panel {
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.18);
}

.admin-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
}

.admin-controls input {
  min-width: min(30rem, 100%);
}

.admin-options {
  margin-bottom: 0.4rem;
}

.check-field {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  color: var(--muted);
  font-weight: 900;
}

.admin-json {
  overflow: auto;
  max-height: 420px;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: #090d0f;
  color: #d6f6ff;
  white-space: pre-wrap;
}

.admin-table-wrap {
  overflow: auto;
  max-height: 520px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.admin-table th,
.admin-table td {
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #182225;
  color: var(--blue);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.admin-table tbody tr {
  cursor: pointer;
}

.admin-table tbody tr:hover {
  background: rgba(57, 198, 255, 0.08);
}

.admin-list-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(220px, 2fr) repeat(3, minmax(120px, auto)) auto;
  gap: 0.65rem;
  align-items: center;
  padding: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.admin-section-header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
  justify-content: space-between;
}

.admin-section-header h3 {
  margin: 0;
}

.admin-section-header input {
  min-width: min(28rem, 100%);
}

.admin-inventory-groups {
  display: grid;
  gap: 1rem;
  max-height: 620px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.15rem 0.35rem 0.15rem 0.15rem;
}

.admin-inventory-type-section {
  display: grid;
  gap: 0.65rem;
}

.admin-inventory-type-title {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  padding: 0.35rem 0.2rem 0;
}

.admin-inventory-type-title h4 {
  margin: 0;
  color: var(--orange);
  font-size: 1rem;
}

.admin-inventory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 0.8rem;
  padding: 0.15rem;
}

.admin-inventory-card {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 0.65rem;
  align-items: center;
  padding: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.admin-inventory-copy,
.admin-store-copy {
  display: grid;
  gap: 0.22rem;
  min-width: 0;
}

.admin-inventory-copy strong,
.admin-store-copy .name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-thumb-wrap {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: radial-gradient(circle, rgba(57, 198, 255, 0.16), rgba(0, 0, 0, 0.28));
}

.admin-thumb {
  max-width: 58px;
  max-height: 58px;
  object-fit: contain;
  filter: drop-shadow(0 6px 6px rgba(0, 0, 0, 0.45));
}

.admin-thumb-fallback {
  color: var(--muted);
  font-weight: 900;
}

.admin-quantity-row {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 0.55rem;
  align-items: end;
}

.admin-quantity-row .form-field {
  margin: 0;
}

.admin-quantity-row input {
  min-width: 0;
  width: 100%;
}

.admin-quantity-row .button {
  min-width: 54px;
  padding: 0.55rem 0.8rem;
}

.admin-list-row.store-row {
  grid-template-columns: 76px minmax(220px, 2fr) repeat(3, minmax(110px, auto)) auto;
}

.store-thumb {
  width: 70px;
  height: 70px;
}

.store-thumb .admin-thumb {
  max-width: 64px;
  max-height: 64px;
}

.admin-price-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.report-message {
  padding: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.22);
  color: var(--text);
  white-space: pre-wrap;
}

.admin-list.compact {
  display: grid;
  gap: 0.45rem;
  max-height: 260px;
  overflow: auto;
}

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

  .site-logo-link,
  .hero-nav {
    grid-column: 1;
    justify-self: center;
  }

  .hero-nav {
    justify-content: center;
  }

  .site-logo {
    width: min(360px, 86vw);
    margin: 0 auto;
  }

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

  .sale-carousel {
    min-height: 382px;
  }

  .sale-promo {
    height: 340px;
    min-height: 340px;
  }

  .sale-art {
    height: 165px;
    max-height: 165px;
  }

  .panel-title {
    align-items: stretch;
    flex-direction: column;
  }

  .base-canvas {
    min-height: 420px;
  }

  .player-card,
  .alliance-card {
    align-items: flex-start;
  }

  .alliance-list {
    grid-template-columns: 1fr;
  }

  .banner-preview.large {
    width: 96px;
  }

  .banner-editor,
  .inline-form,
  .application-row {
    grid-template-columns: 1fr;
  }

  .banner-preview-panel {
    position: static;
  }

  .picker-grid {
    grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  }

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

  .admin-list-row.store-row {
    grid-template-columns: 1fr;
  }
}
