.screen-home.tabbed .home-left {
  width: min(520px, 46vw);
}
.screen-home.tabbed .home-menu {
  width: 100%;
  gap: 10px;
}
.screen-home.tabbed .hub-subtitle {
  margin-bottom: 10px;
}

.home-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border-radius: 16px;
  background: rgba(10, 8, 16, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.home-tab {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 6px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  font: 900 11.5px/1 Arial, sans-serif;
  letter-spacing: 1.6px;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
}
.home-tab svg {
  width: 16px;
  height: 16px;
  flex: none;
  fill: currentColor;
}
.home-tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}
.home-tab.on {
  color: #2a1406;
  background: linear-gradient(180deg, #ffd27a, #ff9a4a);
  box-shadow: 0 0 18px rgba(255, 154, 74, 0.35);
}
.home-tab:focus-visible,
.home-subtab:focus-visible {
  outline: 2px solid #ffd27a;
  outline-offset: 2px;
}
.tab-dot {
  position: absolute;
  top: 6px;
  right: 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7ff2c0;
  box-shadow: 0 0 8px #7ff2c0;
}
.tab-dot[hidden] {
  display: none;
}

.home-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: homePanelIn 0.28s ease both;
}
.home-panel[hidden] {
  display: none;
}
@keyframes homePanelIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}
.home-subtabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.home-subtab {
  position: relative;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(12, 10, 18, 0.6);
  color: rgba(255, 255, 255, 0.62);
  font: 800 11px/1 Arial, sans-serif;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.home-subtab:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
}
.home-subtab.on {
  color: #ffd27a;
  border-color: rgba(255, 210, 122, 0.7);
  background: rgba(255, 170, 80, 0.12);
}
.home-subtab .tab-dot {
  top: -2px;
  right: -2px;
}

.screen-home.tabbed .home-panel .menu-tiles {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.screen-home.tabbed .home-panel .menu-tiles[hidden] {
  display: none;
}
.screen-home.tabbed .menu-tiles .menu-btn {
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 68px;
  padding: 10px 34px 10px 12px;
  text-align: left;
  border: 1px solid rgba(var(--tile), 0.24);
  background:
    linear-gradient(90deg, rgba(var(--tile), 0.14), rgba(var(--tile), 0) 70%),
    rgba(20, 16, 28, 0.82);
  box-shadow: none;
  animation: homePanelIn 0.3s ease both;
}
.screen-home.tabbed .menu-tiles .menu-btn:hover,
.screen-home.tabbed .menu-tiles .menu-btn:focus-visible,
.screen-home.tabbed .menu-tiles .menu-btn.pad-focus {
  transform: translateY(-2px);
  border-color: rgba(var(--tile), 0.75);
  background:
    linear-gradient(90deg, rgba(var(--tile), 0.26), rgba(var(--tile), 0.03) 75%),
    rgba(24, 18, 32, 0.9);
  box-shadow:
    0 8px 22px rgba(0, 0, 0, 0.35),
    0 0 20px rgba(var(--tile), 0.2),
    inset 3px 0 0 rgb(var(--tile));
}
.screen-home.tabbed .menu-tiles .menu-btn:nth-child(2) {
  animation-delay: 0.04s;
}
.screen-home.tabbed .menu-tiles .menu-btn:nth-child(3) {
  animation-delay: 0.08s;
}
.screen-home.tabbed .menu-tiles .menu-btn:nth-child(4) {
  animation-delay: 0.12s;
}
.screen-home.tabbed .menu-tiles .menu-icon {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 12px;
}
.screen-home.tabbed .menu-tiles .menu-icon svg {
  width: 21px;
  height: 21px;
}
.screen-home.tabbed .menu-tiles .menu-text {
  align-items: flex-start;
  gap: 3px;
  min-width: 0;
}
.screen-home.tabbed .menu-tiles .menu-text b {
  font-size: 12.5px;
  letter-spacing: 1.2px;
}
.screen-home.tabbed .menu-tiles .menu-text small {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  letter-spacing: 0;
  color: rgba(255, 255, 255, 0.55);
}
.screen-home.tabbed .menu-tiles .menu-badge {
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
}
.screen-home.tabbed .menu-tiles .menu-house-art,
.screen-home.tabbed .menu-tiles .menu-go {
  display: none;
}
.screen-home.tabbed .menu-tiles .menu-btn.menu-coop {
  opacity: 0.55;
}
.screen-home.tabbed .menu-tiles .menu-btn.menu-coop:hover {
  transform: none;
  box-shadow: none;
}
.screen-home.tabbed .menu-tiles [data-nav="house"] {
  --tile: 255, 140, 90;
}
.screen-home.tabbed .menu-tiles [data-nav="pyre"] {
  --tile: 255, 150, 60;
}
.screen-home.tabbed .menu-tiles [data-nav="board"] {
  --tile: 255, 196, 100;
}
.screen-home.tabbed .menu-tiles .menu-coop {
  --tile: 170, 170, 200;
}
.screen-home.tabbed .menu-tiles .menu-btn.nudge {
  animation: tileNudge 0.9s ease;
}
@keyframes tileNudge {
  30% {
    box-shadow: 0 0 0 3px rgba(var(--tile), 0.8), 0 0 30px rgba(var(--tile), 0.5);
  }
}
.screen-home.tabbed .menu-caption {
  cursor: default;
}
.screen-home.tabbed .menu-caption.hot {
  cursor: pointer;
}
.screen-home.tabbed .menu-caption.hot:hover span {
  text-decoration: underline;
}

.home-top-right {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}
.wallet-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 38px;
  padding: 3px 10px 3px 6px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(12, 10, 18, 0.7);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.wallet-btn:hover,
.wallet-btn[aria-expanded="true"] {
  border-color: rgba(255, 209, 102, 0.55);
}
.wallet-btn .stat-chip {
  border: 0;
  background: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding: 4px 6px;
}
.wallet-caret {
  margin-left: 2px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 11px;
}
.home-menu-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(12, 10, 18, 0.7);
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
}
.home-menu-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}
.home-menu-btn:hover,
.home-menu-btn[aria-expanded="true"] {
  color: #fff;
  border-color: rgba(255, 209, 102, 0.55);
}
.home-menu-btn .tab-dot {
  top: 2px;
  right: 2px;
  background: #7ec7ff;
  box-shadow: 0 0 8px #7ec7ff;
}

.home-pop {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 40;
  width: 300px;
  max-width: calc(100vw - 24px);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-radius: 16px;
  background: rgba(16, 13, 24, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  animation: homePanelIn 0.18s ease both;
}
.home-pop[hidden] {
  display: none;
}
.home-pop-h {
  margin: 2px 2px 0;
  color: rgba(255, 255, 255, 0.4);
  font: 900 9.5px/1 Arial, sans-serif;
  letter-spacing: 2.5px;
}
.home-pop-h[hidden] {
  display: none;
}
.wallet-pop .home-stats {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.wallet-pop .stat-chip {
  display: flex;
  justify-content: flex-end;
  width: 100%;
  padding: 9px 12px;
  border-radius: 12px;
  font-size: 14px;
}
.wallet-pop .stat-chip::before {
  order: -2;
  flex: 1;
  color: rgba(255, 255, 255, 0.62);
  font: 700 12px/1 Arial, sans-serif;
  letter-spacing: 0.3px;
}
.wallet-pop .stat-chip.coin::before {
  content: "Coins";
}
.wallet-pop .stat-chip.emblem::before {
  content: "Ash Emblems";
}
.wallet-pop .stat-chip.cinderite::before {
  content: "Cinderite";
}
.wallet-pop .stat-chip.crystal::before {
  content: "Deep Crystals";
}
.wallet-pop .stat-chip small {
  order: -1;
  flex: 1;
  font: 700 12px/1 Arial, sans-serif;
  letter-spacing: 0.3px;
  color: rgba(255, 255, 255, 0.62);
  text-transform: capitalize;
}
.wallet-pop .stat-chip:nth-child(5) {
  margin-top: 6px;
}
.menu-pop .account-chip {
  width: 100%;
  justify-content: flex-start;
}
.menu-pop .settings-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: auto;
  padding: 10px 12px;
  border-radius: 12px;
  justify-content: flex-start;
}
.settings-chip-label {
  color: #fff;
  font: 800 13px/1 Arial, sans-serif;
  letter-spacing: 0.5px;
}
.menu-pop .platform-chip {
  width: 100%;
  margin: 0;
}
.menu-pop-slot:empty {
  display: none;
}

@media (max-width: 760px) {
  .screen-home.tabbed .home-left {
    width: 100%;
  }
  .home-tab {
    flex-direction: column;
    gap: 4px;
    min-height: 48px;
    font-size: 10px;
    letter-spacing: 1px;
  }
  .screen-home.tabbed .menu-tiles .menu-btn {
    background:
      linear-gradient(90deg, rgba(var(--tile), 0.14), rgba(var(--tile), 0) 70%),
      rgba(18, 14, 26, 0.94);
    min-height: 62px;
    gap: 9px;
    padding: 9px 28px 9px 9px;
  }
  .screen-home.tabbed .menu-tiles .menu-icon {
    width: 34px;
    height: 34px;
  }
  .screen-home.tabbed .menu-tiles .menu-text b {
    font-size: 11px;
  }
  .screen-home.tabbed .menu-tiles .menu-text small {
    white-space: normal;
    font-size: 10.5px;
    line-height: 1.2;
  }
}
@media (max-height: 460px) {
  .home-tab {
    min-height: 32px;
    gap: 5px;
    font-size: 10px;
    letter-spacing: 0.6px;
  }
  .home-tab svg {
    width: 13px;
    height: 13px;
  }
  .screen-home.tabbed .menu-tiles .menu-btn {
    min-height: 48px;
    padding-top: 6px;
    padding-bottom: 6px;
  }
  .screen-home.tabbed .menu-tiles .menu-icon {
    width: 30px;
    height: 30px;
  }
}
