.lobby-tiles .tile-ring {
  width: 56px;
  height: 56px;
}

.lobby-tiles .tile-state {
  max-width: 100%;
  padding: 2px 0;
  font-size: .75rem;
  letter-spacing: 0;
}

.lobby-tiles .tile-name {
  position: relative;
  padding-inline: 3px;
  background: linear-gradient(90deg, transparent, var(--bg-deep) 10% 90%, transparent);
  color: var(--text);
  font-size: .75rem;
  letter-spacing: 0.03em;
}

@media (max-height: 700px) {
  .lobby-tiles .tile-ring { width: 54px; height: 54px; }
}


.lobby-inbox-count {
  position: absolute;
  top: 0;
  right: -7px;
  z-index: 2;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 40% 28%, rgba(255, 255, 255, 0.45), transparent 55%),
    var(--ruby);
  border: 2px solid var(--gold-deep);
  color: var(--text);
  font-family: var(--display);
  font-size: 0.75rem;
  line-height: 18px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 0 #000;
  box-shadow: inset 0 -2px 3px rgba(0, 0, 0, 0.35), 0 2px 4px rgba(0, 0, 0, 0.5);
}

.lobby-inbox-count[hidden] {
  display: none;
}

.sheet-panel.inbox-panel {
  width: 100%;
  max-width: 520px;
  height: calc(100% - var(--safe-top) - 24px);
  max-height: calc(100% - var(--safe-top) - 24px);
  gap: 12px;
  padding: 12px 16px calc(var(--safe-bottom) + 12px);
  visibility: hidden;
  transition: transform 250ms ease, visibility 0s linear 250ms;
}

.sheet.open .sheet-panel.inbox-panel {
  visibility: visible;
  transition: transform 250ms ease, visibility 0s;
}

.inbox-head {
  flex: none;
  min-height: 44px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.inbox-envelope {
  width: 22px;
  height: 22px;
  margin-right: auto;
}

.inbox-heading {
  font-size: 1.5rem;
  letter-spacing: 0.08em;
}

.inbox-close {
  position: relative;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 2px solid var(--gold-deep);
  border-radius: 50%;
  background: linear-gradient(180deg, var(--violet), var(--navy-deep));
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 3px 0 var(--bg-deep);
  transition: transform 80ms ease;
}

.inbox-close svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
}

.inbox-close:active,
.inbox-tab:active { transform: translateY(2px); }

.inbox-tabs {
  flex: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding-bottom: 4px;
}

.inbox-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 48px;
  padding: 4px;
  border: 2px solid var(--gold-deep);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--navy), var(--navy-deep));
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 3px 0 var(--bg-deep);
  transition: transform 80ms ease;
}

.inbox-tab.active {
  background: var(--gold-bevel);
  color: var(--gold-deep);
  border-color: var(--gold);
}

.inbox-tab-icon {
  flex: none;
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.inbox-tab-label {
  font-family: var(--display);
  font-size: 0.8rem;
  line-height: 1.1;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 0 #000;
}

.inbox-tab.active .inbox-tab-label { text-shadow: none; }

.inbox-tab-panel {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  gap: inherit;
}

.inbox-grid {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

.inbox-grid[hidden],
.inbox-empty[hidden] { display: none; }

.inbox-event-views {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}
.inbox-event-views[hidden] { display: none; }
.inbox-event-views .inbox-tab { flex: 1; }
.event-calendar-dates {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 3px;
  flex: none;
}
.event-calendar-date.inbox-tab {
  min-width: 44px;
  min-height: 54px;
  padding: 4px 0;
  flex-direction: column;
  gap: 0;
  font-size: 0.8rem;
}
.inbox-event-views .inbox-tab,
.event-calendar-date {
  font-family: var(--display);
  text-shadow: 0 1px 0 #000;
}
.inbox-event-views .active,
.event-calendar-date.active { text-shadow: none; }
.event-calendar-heading,
.event-calendar-title,
.event-calendar-time {
  font-family: var(--display);
  color: var(--gold-light);
  text-shadow: 0 1px 0 #000;
  text-transform: uppercase;
  letter-spacing: 0.035em;
}
.event-calendar-heading { margin: 14px 0 2px; font-size: 1.3rem; }
.event-calendar-title { margin: 0 0 4px; font-size: 1.1rem; }
.event-calendar-entry {
  flex: none;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 212, 90, 0.18);
}
.event-calendar-time { display: block; font-size: 0.9rem; }
.event-calendar-note { display: block; font-size: 0.82rem; color: var(--text); line-height: 1.4; }
@media (max-width: 370px) {
  .event-calendar-dates { grid-template-columns: repeat(4, minmax(44px, 1fr)); }
}

.inbox-tile {
  flex: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 20px;
  gap: 4px 8px;
  min-width: 0;
  min-height: 76px;
  padding: 12px 0;
  border: none;
  border-radius: 0;
  background: none;
  color: var(--text);
  text-align: left;
  animation: inbox-tile-in 260ms ease-out both;
  animation-delay: calc(var(--i, 0) * 40ms);
}

.inbox-tile + .inbox-tile { border-top: 1px solid rgba(255, 212, 90, 0.18); }

.inbox-tile::after {
  content: "›";
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: center;
  font-family: var(--display);
  font-size: 1.4rem;
  color: var(--muted);
  text-shadow: 0 1px 0 #000;
}

@keyframes inbox-tile-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.inbox-tile-face {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 3px 10px;
  align-items: center;
  min-width: 0;
}

.inbox-tile-art {
  grid-column: 1;
  grid-row: 1 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 24px;
  overflow: hidden;
}

.inbox-tile-art .inbox-glyph {
  color: var(--gold-light);
  font-family: var(--display);
  font-size: 1.35rem;
  line-height: 1;
  text-shadow: 0 1px 0 #000;
}

.inbox-photo { width: 22px; height: 24px; object-fit: cover; object-position: 50% 28%; }
.inbox-tile-art .wheel-icon { width: 22px; height: 22px; border-width: 1px; box-shadow: none; }
.inbox-tile-art .pearl { width: 22px; height: 22px; box-shadow: none; filter: none; }
.inbox-tile-art .chest { transform: scale(0.7); flex: none; }
.inbox-tile-art .atlas-button-icon { width: 24px; height: 24px; margin: 0; }
.inbox-tile-art .credits-coin { width: 22px; height: 22px; border-width: 1px; box-shadow: none; }
.inbox-tile-art .lobby-pig { width: 22px; height: 22px; filter: none; }
.inbox-tile-art .rush-mark { width: 22px; height: 22px; }
.inbox-tile-art .pass-mark { width: 22px; height: 15px; font-size: 9px; }

.inbox-art.inbox-star {
  display: block;
  width: 22px;
  height: 22px;
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  background: var(--gold-bevel);
}

.inbox-tile-kicker,
.inbox-tile-band,
.inbox-empty-band {
  font-family: var(--display);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-shadow: 0 1px 0 #000;
}

.inbox-tile-kicker {
  grid-column: 2;
  min-width: 0;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.2;
}

.inbox-tile-band {
  grid-column: 2;
  min-width: 0;
  color: var(--gold-light);
  font-size: 1.05rem;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.inbox-tile-face:not(:has(.inbox-tile-kicker)) .inbox-tile-band { grid-row: 1 / 3; }

.inbox-tile-art .inbox-symbol,
.inbox-tile-art .inbox-icon { width: 22px; height: 22px; }

.inbox-tile-timer {
  grid-column: 3;
  grid-row: 1 / 3;
  align-self: center;
  padding: 3px 5px;
  border: 1px solid var(--gold-deep);
  border-radius: 4px;
  background: var(--navy-deep);
  color: var(--text);
  font-family: var(--display);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.inbox-tile.urgent .inbox-tile-timer {
  position: relative;
  isolation: isolate;
  text-shadow: 0 1px 0 #000;
}

.inbox-tile.urgent .inbox-tile-timer::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: var(--ruby);
  animation: inbox-urgent 2.4s ease-in-out infinite;
}

@keyframes inbox-urgent {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.inbox-tile-caption {
  grid-column: 1;
  padding-left: 32px;
  color: var(--text);
  font-size: 0.8125rem;
  font-weight: 400;
  line-height: 1.35;
}

.inbox-caption-number {
  color: var(--gold-light);
  font-family: inherit;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.inbox-empty {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 20px 0;
}

.inbox-empty-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.inbox-empty-card .inbox-star { width: 64px; height: 64px; }
.inbox-empty-band { color: var(--gold-light); font-size: 1.1rem; }
.inbox-empty-text { color: var(--muted); font-size: 0.8125rem; font-weight: 400; text-align: center; }

@media (prefers-reduced-motion: reduce) {
  .sheet-panel.inbox-panel,
  .sheet.open .sheet-panel.inbox-panel { transition: none; }
  .inbox-tile { animation: none; }
  .inbox-tile.urgent .inbox-tile-timer::before { animation: none; }
  .inbox-close,
  .inbox-tab { transition: none; }
}


.lobby-rush {
  position: relative;
  flex: none;
  display: flex;
  align-items: center;
  gap: 7px;
  height: 46px;
  min-height: 44px;
  padding: 0 5px;
  border-radius: 14px;
  border: 2px solid #e9bf62;
  background:
    radial-gradient(ellipse at 50% 0, #c1237b44, transparent 70%),
    linear-gradient(#3b0f57, #1a0727 60%, #10041a);
  box-shadow: 0 0 0 1px #6a3d18, inset 0 1px 3px #fff5, 0 3px 8px #0008;
  color: #fff;
  font-family: var(--display);
  transition: transform 60ms ease-out;
}

.lobby-rush::after {
  content: "›";
  flex: none;
  margin: 0 2px 2px -2px;
  color: var(--gold-light);
  font-size: 1.5rem;
  line-height: 1;
  text-shadow: 0 1px 0 var(--gold-deep), 0 0 6px rgba(255, 212, 90, 0.55);
}

.lobby-rush:active {
  transform: scale(0.98);
  border-color: #fff1a8;
  box-shadow: 0 0 0 1px var(--gold-deep), inset 0 0 0 1px var(--gold), inset 0 2px 6px #000a, 0 0 12px rgba(255, 212, 90, 0.6);
}

.lobby-rush:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 2px;
}

.rush-level {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 50px;
  height: 34px;
  padding: 0 6px;
  border-radius: 9px;
  background: var(--gold-bevel);
  box-shadow: 0 0 0 1px var(--gold-deep), inset 0 1px 0 #fffbe0, 0 2px 4px #0008;
  color: #3a1600;
  line-height: 1;
  text-shadow: 0 1px 0 #fff3b8;
}

.rush-level-word {
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  margin-left: 0.12em;
}

.rush-level-number {
  margin-top: 1px;
  font-size: 1.15rem;
  font-variant-numeric: tabular-nums;
}

.rush-level-number.long {
  font-size: 0.95rem;
}

.rush-bar {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  height: 24px;
  overflow: hidden;
  border-radius: 999px;
  border: 2px solid var(--gold-dark);
  background: linear-gradient(#000, #1b0826 70%, #08020d);
  box-shadow: 0 0 0 1px var(--gold-deep), inset 0 2px 4px rgba(0, 0, 0, 0.8);
}

.rush-bar::after {
  content: "";
  position: absolute;
  inset: 0 0 50% 0;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.04));
  pointer-events: none;
}

.rush-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.5), transparent 55%),
    linear-gradient(90deg, #8c0e78, var(--magenta) 55%, var(--neon-pink) 85%, #ffb0f0);
  box-shadow: 0 0 10px var(--neon-pink);
  transition: width 400ms ease-out;
}

.rush-fill.almost::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 38%, rgba(255, 255, 255, 0.7) 50%, transparent 62%) no-repeat;
  background-size: 250% 100%;
  background-position: 125% 0;
  animation: fb-sweep 1.8s ease-in-out infinite;
  pointer-events: none;
}

.rush-xp {
  position: absolute;
  inset: 0;
  z-index: 1;
  padding: 0 8px;
  overflow: hidden;
  color: #fff;
  font-size: 0.72rem;
  line-height: 20px;
  letter-spacing: 0.04em;
  text-align: center;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 2px #000, 0 0 3px #000;
}

.rush-prize {
  position: relative;
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  height: 34px;
  padding: 0 7px;
  border-radius: 10px;
  border: 2px solid #c99b4c;
  background: linear-gradient(#5b1a7c, #2a0839 60%, #18041f);
  box-shadow: inset 0 1px 2px #fff4, 0 2px 4px #0008;
}

.rush-prize-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.rush-coins {
  max-width: 56px;
  overflow: hidden;
  color: var(--gold-light);
  font-size: 1rem;
  line-height: 1;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 0 var(--gold-deep), 0 1px 3px #000;
}

.rush-note {
  display: none;
  margin-top: 0;
  color: #ffc9f2;
  font-size: 0.6rem;
  line-height: 1;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.rush-prize.noted .rush-note {
  display: block;
}

.rush-pile {
  position: relative;
  flex: none;
  width: 19px;
  height: 15px;
  background: url("../art/offers/coin-stacks.webp") -10.3px -19.8px / 121.6px 81.1px no-repeat;
  filter: drop-shadow(0 0 3px rgba(255, 211, 77, 0.5));
}

.rush-tag {
  display: none;
  position: absolute;
  top: -9px;
  left: 50%;
  transform: translateX(-50%);
  padding: 1px 5px;
  border-radius: 999px;
  border: 1px solid #fff1a8;
  background: linear-gradient(#ff5ad8, #b0128a);
  color: #fff;
  font-size: 0.6rem;
  line-height: 1.1;
  letter-spacing: 0.08em;
  white-space: nowrap;
  box-shadow: 0 1px 3px #000a;
}

.rush-prize.milestone {
  padding-top: 3px;
  border-color: #fff1a8;
  background: var(--gold-bevel);
  box-shadow: 0 0 0 1px var(--gold-deep), inset 0 1px 0 #fffbe0, 0 0 10px rgba(255, 212, 90, 0.65);
}

.rush-prize.milestone .rush-tag {
  display: block;
}

.rush-prize.milestone .rush-coins {
  color: #3a1600;
  text-shadow: 0 1px 0 #fff3b8;
}

.rush-prize.milestone.noted {
  padding-top: 5px;
}

.rush-prize.milestone.noted .rush-coins {
  font-size: 0.88rem;
}

.rush-prize.milestone .rush-note {
  color: #5a1a00;
}

.lobby-rush.flare {
  animation: rush-flare 700ms ease-out;
}

.lobby-rush.flare .rush-fill {
  animation: fb-xp-gain 650ms ease-out;
}

@keyframes rush-flare {
  25% { box-shadow: 0 0 0 1px #6a3d18, inset 0 1px 3px #fff5, 0 3px 8px #0008, 0 0 18px 3px rgba(255, 79, 216, 0.85); }
}

