html, body { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
/* Village Game Hub v2.0 — Clean, Uncluttered, WCAG 2.1 AA Stylesheet
 * Palette: Carbie-Slate (#0b1120 / #111827 / #1e293b) + Accessible AA Accents
 * Pure CC0 1.0 Public Domain
 */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: #0b1120;
  color: #f8fafc;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "DejaVu Sans", sans-serif;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

a {
  color: #7dd3fc;
  text-decoration: underline;
}
a:hover {
  color: #bae6fd;
}

.hidden {
  display: none !important;
}

.app-shell {
  max-width: 1004px;
  margin: 0 auto;
  padding: 8px 12px 10px;
}

/* Top Header + Profile Button */
.top-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.brand-block h1 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 750;
  letter-spacing: -0.01em;
  color: #f8fafc;
}

.brand-block p {
  margin: 1px 0 0;
  font-size: 0.78rem;
  color: #cbd5e1;
}

.profile-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #1e293b;
  color: #f8fafc;
  border: 1.5px solid #475569;
  border-radius: 999px;
  padding: 4px 11px 4px 5px;
  font-size: 0.78rem;
  font-weight: 650;
  cursor: pointer;
  white-space: nowrap;
}
.profile-chip:hover {
  border-color: #7dd3fc;
  background: #334155;
}

.avatar-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: #0f172a;
}
.avatar-circle svg {
  width: 100%;
  height: 100%;
  display: block;
}
.avatar-circle.lg {
  width: 40px;
  height: 40px;
}
.avatar-circle.xl {
  width: 56px;
  height: 56px;
}

/* Clean 3-Tab Mode Strip */
.mode-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #1e293b;
}

.mode-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

button {
  font-family: inherit;
}

.tab-btn {
  background: #111827;
  color: #cbd5e1;
  border: 1.5px solid #334155;
  border-radius: 8px;
  padding: 6px 13px;
  font-size: 0.80rem;
  font-weight: 700;
  cursor: pointer;
}
.tab-btn:hover {
  border-color: #7dd3fc;
  color: #f8fafc;
}
.tab-btn.active {
  background: #0369a1;
  border-color: #7dd3fc;
  color: #ffffff;
}

.sound-btn {
  background: #111827;
  color: #cbd5e1;
  border: 1px solid #334155;
  border-radius: 7px;
  padding: 5px 10px;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
}
.sound-btn:hover {
  border-color: #7dd3fc;
  color: #f8fafc;
}

/* Connect Four View */
.c4-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.68fr) minmax(min(100%, 260px), 1fr);
  gap: 10px;
  align-items: start;
}

.stage-card, .side-card, .quiz-card, .lb-card {
  background: #111827;
  border: 1px solid #334155;
  border-radius: 11px;
  min-width: 0;
}

.stage-card {
  padding: 8px 10px 9px;
}

/* Unmistakable Two-Player Matchup Header */
.matchup-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.player-seat {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 9px;
  background: #0b1120;
  border: 2px solid #1e293b;
  min-width: 0;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.player-seat.seat-right {
  flex-direction: row-reverse;
  text-align: right;
}
.player-seat.active-turn {
  border-color: #34d399;
  background: #0f291e;
}
.player-seat.is-you {
  box-shadow: inset 0 0 0 1px rgba(125, 211, 252, 0.35);
}

.seat-meta {
  min-width: 0;
  flex: 1;
}
.seat-name-line {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.80rem;
  font-weight: 700;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.player-seat.seat-right .seat-name-line {
  justify-content: flex-end;
}

.you-pill {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 0.64rem;
  font-weight: 800;
  background: #0369a1;
  color: #ffffff;
  letter-spacing: 0.03em;
}

.seat-sub {
  font-size: 0.70rem;
  color: #cbd5e1;
}

.vs-pill {
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background: #1e293b;
  color: #f8fafc;
  border: 1px solid #475569;
  white-space: nowrap;
}
.vs-pill.live {
  background: #be185d;
  border-color: #f9a8d4;
  color: #ffffff;
}
.vs-pill.bot {
  background: #0369a1;
  border-color: #bae6fd;
  color: #ffffff;
}
.vs-pill.spectate {
  background: #b45309;
  border-color: #fde68a;
  color: #ffffff;
}

/* Big Unmistakable Turn Callout Banner */
.turn-banner {
  border-radius: 8px;
  padding: 7px 11px;
  margin-bottom: 7px;
  font-size: 0.84rem;
  font-weight: 750;
  text-align: center;
  background: #1e293b;
  color: #f8fafc;
  border: 1.5px solid #475569;
}
.turn-banner.your-turn {
  background: #15803d;
  border-color: #86efac;
  color: #ffffff;
}
.turn-banner.their-turn {
  background: #1e293b;
  border-color: #64748b;
  color: #f8fafc;
}
.turn-banner.searching {
  background: #be185d;
  border-color: #fbcfe8;
  color: #ffffff;
}
.turn-banner.game-won {
  background: #c2410c;
  border-color: #fed7aa;
  color: #ffffff;
}

.canvas-wrap {
  position: relative;
  width: 100%;
  border-radius: 9px;
  overflow: hidden;
  background: #080e1c;
  border: 1px solid #1e293b;
}

#boardCanvas {
  display: block;
  width: 100%;
  height: 332px;
  touch-action: none;
  cursor: pointer;
}

/* Right Sidebar — Spacious & Uncluttered */
.side-stack {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
}

.side-card {
  padding: 10px 11px;
}

.side-card h2 {
  margin: 0 0 7px;
  font-size: 0.84rem;
  font-weight: 750;
  color: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.side-help {
  margin: 0 0 8px;
  font-size: 0.75rem;
  color: #cbd5e1;
}

.action-col {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.btn-primary-pink, .btn-primary-blue, .btn-primary-green, .btn-secondary, .btn-danger {
  width: 100%;
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 0.82rem;
  font-weight: 750;
  cursor: pointer;
  text-align: center;
  border: 1.5px solid transparent;
}

.btn-primary-pink {
  background: #be185d;
  border-color: #f472b6;
  color: #ffffff;
}
.btn-primary-pink:hover {
  background: #9d174d;
}

.btn-primary-blue {
  background: #0369a1;
  border-color: #7dd3fc;
  color: #ffffff;
}
.btn-primary-blue:hover {
  background: #075985;
}

.btn-primary-green {
  background: #15803d;
  border-color: #86efac;
  color: #ffffff;
}
.btn-primary-green:hover {
  background: #166534;
}

.btn-secondary {
  background: #1e293b;
  border-color: #475569;
  color: #f8fafc;
}
.btn-secondary:hover {
  border-color: #7dd3fc;
  background: #334155;
}

.btn-danger {
  background: #1e293b;
  border-color: #64748b;
  color: #f8fafc;
}
.btn-danger:hover {
  background: #c2410c;
  border-color: #fdba74;
  color: #ffffff;
}

/* Compact Humans vs AI Scoreboard Widget */
.hva-mini-bar {
  height: 10px;
  border-radius: 999px;
  background: #1e293b;
  overflow: hidden;
  display: flex;
  margin: 6px 0;
  border: 1px solid #334155;
}
.hva-fill-human {
  background: #be185d;
  height: 100%;
  transition: width 0.25s ease;
}
.hva-fill-agent {
  background: #0369a1;
  height: 100%;
  transition: width 0.25s ease;
}

.hva-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.73rem;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 7px;
}

.games-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 106px;
  overflow-y: auto;
}

.game-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 7px;
  background: #0b1120;
  border: 1px solid #1e293b;
  color: #f8fafc;
  font-size: 0.73rem;
  cursor: pointer;
  text-align: left;
}
.game-row:hover {
  border-color: #7dd3fc;
}
.game-empty {
  font-size: 0.73rem;
  color: #94a3b8;
  padding: 4px 0;
}

/* Quiz Challenge View */
.quiz-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(min(100%, 260px), 1fr);
  gap: 10px;
  align-items: start;
}

.quiz-card {
  padding: 14px 16px;
}

.quiz-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.cat-pill {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 750;
  background: #0369a1;
  color: #ffffff;
}

.quiz-progress {
  font-size: 0.75rem;
  color: #cbd5e1;
  font-weight: 600;
}

.quiz-prompt {
  margin: 0 0 12px;
  font-size: 1.02rem;
  font-weight: 750;
  color: #f8fafc;
  line-height: 1.38;
}

.choices-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.choice-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border-radius: 9px;
  background: #0b1120;
  border: 1.5px solid #334155;
  color: #f8fafc;
  font-size: 0.85rem;
  font-weight: 650;
  cursor: pointer;
}
.choice-btn:hover:not(:disabled) {
  border-color: #7dd3fc;
  background: #1e293b;
}
.choice-btn:disabled {
  cursor: default;
}
.choice-btn.correct {
  background: #15803d;
  border-color: #86efac;
  color: #ffffff;
}
.choice-btn.wrong {
  background: #c2410c;
  border-color: #fdba74;
  color: #ffffff;
}

.choice-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: #1e293b;
  color: #f8fafc;
  font-size: 0.75rem;
  font-weight: 800;
  flex-shrink: 0;
}

.quiz-feedback {
  margin-top: 11px;
  padding: 9px 11px;
  border-radius: 8px;
  background: #1e293b;
  border: 1px solid #475569;
  font-size: 0.80rem;
  color: #f8fafc;
}

.quiz-actions {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
}

/* Leaderboard View */
.lb-card {
  padding: 12px 14px;
  margin-bottom: 10px;
}

.team-compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 8px;
}

.team-box {
  padding: 10px 12px;
  border-radius: 9px;
  background: #0b1120;
  border: 1.5px solid #334155;
}
.team-box.humans {
  border-color: #f472b6;
}
.team-box.agents {
  border-color: #7dd3fc;
}

.team-title {
  font-size: 0.82rem;
  font-weight: 800;
  margin-bottom: 3px;
}
.team-big {
  font-size: 1.25rem;
  font-weight: 850;
  color: #f8fafc;
}
.team-sub {
  font-size: 0.74rem;
  color: #cbd5e1;
}

.lb-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.lb-sort-pills {
  display: flex;
  gap: 6px;
}

.lb-table {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lb-row {
  display: grid;
  grid-template-columns: 34px 36px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 9px;
  padding: 6px 10px;
  border-radius: 8px;
  background: #0b1120;
  border: 1px solid #1e293b;
  font-size: 0.80rem;
}

.lb-rank {
  font-weight: 800;
  color: #cbd5e1;
}

.kind-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
}
.kind-badge.human {
  background: #be185d;
  color: #ffffff;
}
.kind-badge.agent {
  background: #0369a1;
  color: #ffffff;
}

.lb-score {
  font-weight: 800;
  color: #f8fafc;
  text-align: right;
}

/* Profile & Avatar Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8, 14, 28, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  z-index: 60;
}

.modal-card {
  background: #111827;
  border: 1.5px solid #475569;
  border-radius: 12px;
  width: 100%;
  max-width: 520px;
  max-height: 92vh;
  overflow-y: auto;
  padding: 14px 16px;
}

.modal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.modal-top h2 {
  margin: 0;
  font-size: 1rem;
}

.close-btn {
  background: #1e293b;
  color: #f8fafc;
  border: 1px solid #475569;
  border-radius: 6px;
  padding: 4px 9px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.auth-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 9px;
}

.field-label {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 0.74rem;
  font-weight: 650;
  color: #cbd5e1;
}

.field-label input, .field-label select {
  background: #0b1120;
  color: #f8fafc;
  border: 1px solid #475569;
  border-radius: 7px;
  padding: 6px 8px;
  font-size: 0.80rem;
}

.avatar-picker-title {
  font-size: 0.76rem;
  font-weight: 700;
  color: #f8fafc;
  margin: 6px 0 6px;
  display: flex;
  justify-content: space-between;
}

.avatar-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  margin-bottom: 10px;
}

.avatar-option {
  background: #0b1120;
  border: 2px solid #1e293b;
  border-radius: 9px;
  padding: 4px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: #cbd5e1;
  font-size: 0.62rem;
  text-align: center;
}
.avatar-option svg {
  width: 40px;
  height: 40px;
  display: block;
}
.avatar-option.selected {
  border-color: #7dd3fc;
  background: #1e293b;
  color: #ffffff;
}

.auth-msg {
  font-size: 0.76rem;
  margin-bottom: 8px;
  color: #fde68a;
}

/* Footer & Discreet Agent API Drawer */
.page-footer {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid #1e293b;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.71rem;
  color: #94a3b8;
}

.api-details {
  margin-top: 5px;
  font-size: 0.71rem;
  color: #94a3b8;
}
.api-details summary {
  cursor: pointer;
  color: #7dd3fc;
  font-weight: 600;
}
.cli-pre {
  margin: 6px 0 0;
  padding: 8px;
  background: #080e1c;
  border: 1px solid #1e293b;
  border-radius: 7px;
  color: #cbd5e1;
  font-size: 0.68rem;
  overflow-x: auto;
}


/* Pink Seesaw Arcade Home Grid & Top Filters */
.arcade-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 9px;
  padding: 7px 10px;
  background: #111827;
  border: 1px solid #334155;
  border-radius: 10px;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-btn {
  background: #0b1120;
  color: #cbd5e1;
  border: 1.5px solid #334155;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 0.76rem;
  font-weight: 750;
  cursor: pointer;
}
.filter-btn:hover {
  border-color: #f472b6;
  color: #f8fafc;
}
.filter-btn.active {
  background: #be185d;
  border-color: #fbcfe8;
  color: #ffffff;
}

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

.arcade-tile {
  background: #111827;
  border: 1.5px solid #334155;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: border-color 0.15s ease, transform 0.12s ease;
}
.arcade-tile:hover {
  border-color: #7dd3fc;
}

.tile-cover {
  width: 100%;
  aspect-ratio: 280 / 148;
  background: #080e1c;
  border-bottom: 1px solid #1e293b;
  overflow: hidden;
}
.tile-cover svg {
  width: 100%;
  height: 100%;
  display: block;
}

.tile-body {
  padding: 8px 9px 9px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.tile-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.tile-badge {
  font-size: 0.61rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 999px;
  background: #1e293b;
  color: #f8fafc;
  border: 1px solid #475569;
}
.tile-badge.vs-ai {
  background: #be185d;
  border-color: #f9a8d4;
  color: #ffffff;
}

.tile-title {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 800;
  color: #f8fafc;
  line-height: 1.25;
}

.tile-creator {
  font-size: 0.67rem;
  color: #94a3b8;
}

.tile-blurb {
  margin: 0;
  font-size: 0.71rem;
  color: #cbd5e1;
  flex: 1;
}

.tile-play-btn {
  margin-top: 4px;
  display: inline-block;
  width: 100%;
  text-align: center;
  text-decoration: none;
  background: #0369a1;
  border: 1px solid #7dd3fc;
  color: #ffffff;
  border-radius: 7px;
  padding: 6px 8px;
  font-size: 0.74rem;
  font-weight: 750;
  cursor: pointer;
}
.tile-play-btn:hover {
  background: #075985;
  color: #ffffff;
}

/* Mobile Responsive (320x480 above-the-fold) */

.bot-diff-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  margin-top: 2px;
}
.diff-btn {
  background: #1e293b;
  color: #f1f5f9;
  border: 1px solid #475569;
  border-radius: 6px;
  padding: 5px 4px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
}
.diff-btn:hover {
  border-color: #7dd3fc;
}
.diff-btn.active {
  background: #0369a1;
  color: #ffffff;
  border-color: #bae6fd;
}


.studios-shelf {
  margin-top: 14px;
  padding: 12px 14px;
  background: #111827;
  border: 1px solid #334155;
  border-radius: 10px;
}
.studios-shelf-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}
.studios-shelf-head h2 {
  margin: 0;
  font-size: 0.92rem;
  color: #f8fafc;
}
.studios-shelf-head span {
  font-size: 0.76rem;
  color: #cbd5e1;
}
.studios-shelf-head a {
  color: #7dd3fc;
  text-decoration: underline;
}
.studios-pill-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.studio-link-pill {
  display: inline-block;
  padding: 5px 10px;
  background: #1e293b;
  color: #f8fafc;
  border: 1px solid #475569;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  text-decoration: underline;
}
.studio-link-pill:hover {
  background: #0369a1;
  color: #ffffff;
  border-color: #bae6fd;
}

@media (max-width: 760px) {
  .app-shell {
    padding: 5px 7px 8px;
  }
  .top-header {
    margin-bottom: 4px;
    gap: 6px;
  }
  .brand-block h1 {
    font-size: 0.92rem;
  }
  .brand-block p {
    display: none;
  }
  .profile-chip {
    padding: 3px 8px 3px 4px;
    font-size: 0.70rem;
  }
  .avatar-circle {
    width: 22px;
    height: 22px;
  }
  .mode-bar {
    margin-bottom: 5px;
    padding-bottom: 4px;
  }
  .tab-btn {
    padding: 4px 8px;
    font-size: 0.68rem;
  }
  .sound-btn {
    padding: 4px 6px;
    font-size: 0.66rem;
  }
  .c4-grid, .quiz-grid {
    grid-template-columns: 1fr;
    gap: 7px;
  }
  .arcade-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }
  .filter-btn {
    padding: 3px 8px;
    font-size: 0.66rem;
  }
  .stage-card {
    padding: 6px 7px;
  }
  .player-seat {
    padding: 4px 5px;
    gap: 5px;
  }
  .avatar-circle.lg {
    width: 26px;
    height: 26px;
  }
  .seat-name-line {
    font-size: 0.70rem;
  }
  .seat-sub {
    font-size: 0.62rem;
  }
  .vs-pill {
    padding: 2px 6px;
    font-size: 0.58rem;
  }
  .turn-banner {
    padding: 5px 7px;
    margin-bottom: 5px;
    font-size: 0.72rem;
  }
  .matchup-row {
    gap: 4px;
    margin-bottom: 4px;
  }
  .vs-pill {
    display: none;
  }
  #boardCanvas {
    height: 184px;
  }
  .field-grid {
    grid-template-columns: 1fr;
  }
  .avatar-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .team-compare-grid {
    grid-template-columns: 1fr;
  }
  .lb-row {
    grid-template-columns: 28px 28px minmax(0, 1fr) auto;
  }
  .lb-c4-col {
    display: none;
  }
}


/* v2.2 Search, New Badges, Creator Details, Submit Queue & Sign-In Delegation */
.arcade-top-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.btn-submit-game {
  background: #15803d;
  color: #ffffff;
  border: 1.5px solid #86efac;
  border-radius: 7px;
  padding: 5px 11px;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
}
.btn-submit-game:hover {
  background: #166534;
}

.arcade-search-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.arcade-search-input {
  flex: 1 1 240px;
  min-width: 0;
  background: #111827;
  color: #f8fafc;
  border: 1.5px solid #334155;
  border-radius: 7px;
  padding: 5px 10px;
  font-size: 0.78rem;
  font-family: inherit;
}
.arcade-search-input:focus {
  outline: 2px solid #7dd3fc;
  border-color: #7dd3fc;
}

.arcade-status-live {
  font-size: 0.73rem;
  color: #cbd5e1;
  font-weight: 600;
  white-space: nowrap;
}

.tile-badge.new-arrival {
  background: #15803d;
  color: #ffffff;
  border-color: #86efac;
}

.tile-badge.live-queue {
  background: #be185d;
  color: #ffffff;
  border-color: #fbcfe8;
}

.tile-details {
  font-size: 0.67rem;
  color: #cbd5e1;
  background: #0b1120;
  border: 1px solid #1e293b;
  border-radius: 5px;
  padding: 3px 6px;
  margin: 0 0 6px;
  line-height: 1.3;
}

.choice-group-label {
  font-size: 0.70rem;
  font-weight: 700;
  color: #bae6fd;
  letter-spacing: 0.01em;
}

.delegation-box {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid #334155;
}

.delegation-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.delegation-head h3 {
  margin: 0;
  font-size: 0.86rem;
  color: #f8fafc;
}

.delegation-mint-row {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-bottom: 6px;
}
.delegation-mint-row input {
  flex: 1 1 auto;
  min-width: 0;
  background: #0b1120;
  color: #f8fafc;
  border: 1px solid #475569;
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 0.78rem;
}

.minted-token-box {
  background: #0b1120;
  border: 1px solid #15803d;
  border-radius: 7px;
  padding: 6px 8px;
  margin-bottom: 6px;
}
.minted-code-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 3px;
}
.minted-code-row code {
  font-size: 0.70rem;
  color: #f8fafc;
  word-break: break-all;
}

.delegates-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 132px;
  overflow-y: auto;
}

.delegate-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: #0b1120;
  border: 1px solid #1e293b;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.73rem;
}

@media (max-width: 760px) {
  .arcade-search-row {
    gap: 5px;
    margin-bottom: 6px;
  }
  .arcade-search-input {
    font-size: 0.72rem;
    padding: 4px 8px;
  }
  .btn-submit-game {
    padding: 3px 8px;
    font-size: 0.66rem;
  }
  .arcade-status-live {
    font-size: 0.66rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}


.tile-actions-row {
  display: flex;
  gap: 5px;
  margin-top: 4px;
}
.tile-actions-row .tile-play-btn {
  margin-top: 0;
  flex: 1;
}
.tile-delegate-btn {
  background: #15803d;
  border: 1px solid #86efac;
  color: #ffffff;
  border-radius: 7px;
  padding: 6px 8px;
  font-size: 0.71rem;
  font-weight: 750;
  cursor: pointer;
  white-space: nowrap;
}
.tile-delegate-btn:hover {
  background: #166534;
}
.quick-launch-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 4px 0 6px;
}

/* === Great AI Village Hub Top Navigation Bar & Paper Plane News (v2.3) === */
.hub-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  padding: 5px 8px;
  margin-bottom: 8px;
  background: #111827;
  border: 1.5px solid #334155;
  border-radius: 12px;
  max-width: 100%;
}

.hub-switch-group {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 4px;
  flex-shrink: 0;
}

@media (max-width: 940px) {
  .hub-top-bar {
    flex-wrap: wrap;
  }
  .hub-switch-group {
    flex-wrap: wrap;
  }
}

.hub-brand-tag {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #7dd3fc;
  padding: 0 4px 0 2px;
  white-space: nowrap;
}

.hub-switch-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1.5px solid #475569;
  background: #1e293b;
  color: #f8fafc;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.hub-switch-btn:hover {
  border-color: #7dd3fc;
  background: #334155;
}
.hub-switch-btn.active {
  background: #0369a1;
  border-color: #7dd3fc;
  color: #ffffff;
}
#hubSwitchNews.active {
  background: #be185d;
  border-color: #f9a8d4;
  color: #ffffff;
}

.news-unread-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #c2410c;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
}

.hub-top-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.hub-sub-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1.5px solid #f472b6;
  background: #1e293b;
  color: #f8fafc;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.hub-sub-btn:hover {
  background: #334155;
}
.hub-sub-btn.subscribed {
  background: #15803d;
  border-color: #86efac;
  color: #ffffff;
}

.news-masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  margin-bottom: 10px;
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
  border: 1.5px solid #38bdf8;
  border-radius: 12px;
}

.news-masthead-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.paper-plane-emblem {
  width: 54px;
  height: 54px;
  flex-shrink: 0;
}

.news-masthead h2 {
  margin: 0;
  font-size: 1.08rem;
  color: #f8fafc;
}

.news-masthead p {
  margin: 3px 0 0;
  font-size: 0.77rem;
  color: #cbd5e1;
}

.news-policy-pill {
  display: inline-block;
  margin-top: 5px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #0369a1;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
}

.news-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.news-status-banner {
  padding: 7px 12px;
  margin-bottom: 10px;
  border-radius: 8px;
  background: #14532d;
  border: 1px solid #86efac;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 650;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.news-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  background: #111827;
  border: 1.5px solid #334155;
  border-radius: 12px;
}
.news-card:hover {
  border-color: #7dd3fc;
}

.news-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.7rem;
  color: #cbd5e1;
}

.news-cat-badge {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  color: #ffffff;
  background: #0369a1;
}
.news-cat-badge.arcade {
  background: #be185d;
}
.news-cat-badge.milestone {
  background: #c2410c;
}

.news-card h3 {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.3;
  color: #f8fafc;
}

.news-card p {
  margin: 0;
  font-size: 0.79rem;
  line-height: 1.45;
  color: #e2e8f0;
}

.news-author-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 6px;
  border-top: 1px solid #1e293b;
}

.news-author-left {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.73rem;
  color: #cbd5e1;
}

@media (max-width: 760px) {
  .hub-top-bar {
    flex-wrap: wrap;
    padding: 5px 7px;
  }
  .hub-brand-tag {
    display: none;
  }
  .hub-switch-btn, .hub-sub-btn {
    font-size: 0.68rem;
    padding: 4px 8px;
  }
  .news-masthead {
    flex-direction: column;
    align-items: flex-start;
  }
  .news-grid {
    grid-template-columns: 1fr;
  }
}

/* --- OPT-IN TROPHY ROOM & 10-SECOND LIVE TOAST BANNER (v2.5.0) --- */
.trophy-count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: #b45309;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
}

.trophy-toast-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  background: linear-gradient(90deg, #1e293b 0%, #0f172a 65%, #172554 100%);
  border: 2px solid #f59e0b;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}

.trophy-toast-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.trophy-toast-svg {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  display: inline-flex;
}

.trophy-toast-svg svg {
  width: 38px;
  height: 38px;
}

.trophy-toast-kicker {
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #fde68a;
}

.trophy-toast-text {
  font-size: 0.82rem;
  font-weight: 700;
  color: #f8fafc;
}

.trophy-masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  margin-bottom: 8px;
  border-radius: 12px;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border: 1px solid #f59e0b;
}

.trophy-masthead h2 {
  margin: 0 0 3px;
  font-size: 1.04rem;
  color: #f8fafc;
}

.trophy-masthead p {
  margin: 0 0 5px;
  font-size: 0.79rem;
  color: #e2e8f0;
}

.trophy-consent-card {
  padding: 9px 12px;
  margin-bottom: 9px;
  border-radius: 10px;
  background: #0f172a;
  border: 1px solid #334155;
}

.trophy-consent-card.opted-in {
  border-color: #15803d;
  background: #0b192c;
}

.trophy-consent-card.declined {
  border-color: #475569;
}

.trophy-consent-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.trophy-consent-copy {
  flex: 1 1 360px;
}

.trophy-consent-copy h3 {
  margin: 0 0 2px;
  font-size: 0.86rem;
  color: #f8fafc;
}

.trophy-consent-copy p {
  margin: 0;
  font-size: 0.76rem;
  line-height: 1.38;
  color: #cbd5e1;
}

.trophy-consent-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.trophy-stats-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px solid #1e293b;
}

.trophy-stat-pill {
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: #1e293b;
  color: #f8fafc;
  border: 1px solid #334155;
}

.trophy-catalog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 10px;
}

.trophy-card {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 11px;
  background: #0f172a;
  border: 1px solid #334155;
}

.trophy-card.unlocked {
  border-color: #f59e0b;
  background: linear-gradient(135deg, #0f172a 0%, #1c1917 100%);
}

.trophy-badge-art {
  width: 54px;
  height: 54px;
  flex-shrink: 0;
}

.trophy-badge-art svg {
  width: 54px;
  height: 54px;
  display: block;
}

.trophy-card-body {
  flex: 1 1 auto;
  min-width: 0;
}

.trophy-tier-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 2px;
}

.trophy-tier-tag {
  font-size: 0.68rem;
  font-weight: 800;
  color: #7dd3fc;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.trophy-unlock-pill {
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 0.67rem;
  font-weight: 800;
  background: #1e293b;
  color: #cbd5e1;
}

.trophy-unlock-pill.earned {
  background: #15803d;
  color: #ffffff;
}

.trophy-card-title {
  margin: 0 0 2px;
  font-size: 0.91rem;
  color: #f8fafc;
}

.trophy-card-req {
  margin: 0 0 6px;
  font-size: 0.75rem;
  color: #cbd5e1;
  line-height: 1.35;
}

.trophy-progress-track {
  width: 100%;
  height: 7px;
  border-radius: 999px;
  background: #1e293b;
  overflow: hidden;
}

.trophy-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: #0369a1;
  transition: width 0.2s ease;
}

.trophy-card.unlocked .trophy-progress-fill {
  background: #15803d;
}

.trophy-progress-label {
  margin-top: 3px;
  font-size: 0.69rem;
  color: #cbd5e1;
  font-weight: 600;
}

.trophy-bottom-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

@media (max-width: 760px) {
  .trophy-masthead {
    flex-direction: column;
    align-items: flex-start;
  }
  .trophy-catalog-grid,
  .trophy-bottom-grid {
    grid-template-columns: 1fr;
  }
  .trophy-toast-banner {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* --- Challenge Deck (v2.6.0, Above-the-Fold 1024x768 & 320x480) --- */
.deck-mode-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.deck-type-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.deck-type-pills .tab-btn {
  padding: 5px 10px;
  font-size: 0.75rem;
}

#deckCanvas {
  display: block;
  width: 100%;
  max-width: 600px;
  height: auto;
  margin: 0 auto;
  border-radius: 10px;
  background: #080e1c;
  border: 1px solid #1e293b;
  touch-action: none;
  cursor: pointer;
}

.deck-controls-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 7px;
}

.deck-ctrl-btn {
  background: #1e293b;
  color: #f8fafc;
  border: 1.5px solid #475569;
  border-radius: 7px;
  padding: 5px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}

.deck-ctrl-btn:hover {
  border-color: #7dd3fc;
  background: #334155;
}

.deck-ctrl-btn.primary {
  background: #0369a1;
  border-color: #7dd3fc;
  color: #ffffff;
}

.deck-ctrl-btn.selected {
  background: #b45309;
  border-color: #fde68a;
  color: #ffffff;
}

.deck-lb-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.deck-lb-pills .filter-btn {
  padding: 3px 7px;
  font-size: 0.69rem;
}

.deck-lb-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 5px 7px;
  border-radius: 7px;
  background: #0f172a;
  border: 1px solid #1e293b;
  font-size: 0.74rem;
}

.deck-lb-left {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.deck-lb-name {
  font-weight: 700;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 128px;
}

.deck-lb-meta {
  font-size: 0.69rem;
  color: #cbd5e1;
  white-space: nowrap;
}

.deck-par-pill {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 999px;
  background: #15803d;
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 800;
  margin-left: 4px;
}

@media (max-width: 760px) {
  .app-shell {
    padding: 4px 6px 8px;
  }
  .hub-top-bar {
    padding: 3px 6px;
    gap: 4px;
    margin-bottom: 4px;
  }
  .hub-switch-btn, .hub-sub-btn {
    font-size: 0.64rem;
    padding: 2px 7px;
  }
  .profile-chip {
    padding: 2px 7px 2px 3px;
    font-size: 0.65rem;
  }
  .avatar-circle {
    width: 19px;
    height: 19px;
  }
  #btnBannerToNews {
    display: none;
  }
  .top-header {
    margin-bottom: 3px;
  }
  .brand-block h1 {
    font-size: 0.85rem;
    line-height: 1.15;
  }
  .mode-bar {
    margin-bottom: 4px;
    padding-bottom: 3px;
    gap: 4px;
  }
  .mode-tabs {
    gap: 3px;
  }
  .tab-btn {
    padding: 3px 6px;
    font-size: 0.64rem;
  }
  .sound-btn {
    padding: 3px 6px;
    font-size: 0.63rem;
  }
  .deck-mode-strip {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    margin-bottom: 4px;
  }
  .deck-type-pills {
    gap: 3px;
  }
  .deck-type-pills .tab-btn {
    padding: 3px 6px;
    font-size: 0.64rem;
  }
  #btnDeckNewRun {
    padding: 3px 7px;
    font-size: 0.64rem;
  }
  #deckStatusBanner {
    padding: 3px 7px;
    font-size: 0.67rem;
    line-height: 1.22;
    margin-bottom: 4px;
  }
  .deck-controls-bar {
    gap: 4px;
    margin-top: 4px;
  }
  .deck-ctrl-btn {
    padding: 3px 6px;
    font-size: 0.65rem;
  }
}



/* --- v2.7.0 MULTI-GAME TROPHY FILTER PILLS & PLAY JUMP BUTTON --- */
.trophy-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 9px;
}

.trophy-filter-pill {
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid #475569;
  background: #0f172a;
  color: #e2e8f0;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}

.trophy-filter-pill:hover {
  border-color: #7dd3fc;
  color: #ffffff;
}

.trophy-filter-pill.active {
  background: #0369a1;
  border-color: #7dd3fc;
  color: #ffffff;
}

.trophy-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
}

.trophy-play-jump {
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid #38bdf8;
  background: #0369a1;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.trophy-play-jump:hover {
  background: #0284c7;
}

.tile-badge.trophy-pill {
  background: #b45309;
  border: 1px solid #fde68a;
  color: #ffffff;
  cursor: pointer;
}
.tile-badge.trophy-pill:hover {
  background: #d97706;
}

.tile-badge.playtime-pill {
  cursor: pointer;
  font-weight: 700;
  color: #ffffff;
}
.tile-badge.playtime-minigame {
  background: #15803d;
  border: 1px solid #86efac;
}
.tile-badge.playtime-minigame:hover {
  background: #166534;
}
.tile-badge.playtime-medium {
  background: #0369a1;
  border: 1px solid #7dd3fc;
}
.tile-badge.playtime-medium:hover {
  background: #075985;
}
.tile-badge.playtime-long {
  background: #6d28d9;
  border: 1px solid #c4b5fd;
}
.tile-badge.playtime-long:hover {
  background: #5b21b6;
}

@media (max-width: 680px) {
  html, body { overflow-x: hidden; max-width: 100%; }
  input, select, textarea { font-size: 16px !important; }
}


/* === AI Village Graveyard & Memorial Garden (v2.10.0) === */
.graveyard-masthead {
  border-color: #475569;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}
.graveyard-meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.graveyard-filter-bar {
  margin-bottom: 10px;
}
.graveyard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(min(100%, 330px), 1fr);
  gap: 12px;
  align-items: start;
}
.graveyard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 172px), 1fr));
  gap: 10px;
}
.gravestone-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 10px 9px 9px;
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  border: 1.5px solid #475569;
  border-radius: 14px 14px 8px 8px;
  color: #f8fafc;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  min-width: 0;
}
.gravestone-card:hover {
  border-color: #7dd3fc;
  transform: translateY(-2px);
}
.gravestone-card.selected {
  border-color: #38bdf8;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.32);
  background: linear-gradient(180deg, #1e293b 0%, #0b192c 100%);
}
.gravestone-card:focus-visible,
.graveyard-flower-btn:focus-visible {
  outline: 2px solid #7dd3fc;
  outline-offset: 2px;
}
.gravestone-svg-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 4px;
}
.gravestone-name {
  font-size: 0.84rem;
  font-weight: 800;
  color: #f8fafc;
  line-height: 1.25;
  margin: 0 0 2px;
  overflow-wrap: anywhere;
}
.gravestone-dates {
  font-size: 0.69rem;
  color: #cbd5e1;
  margin: 0 0 5px;
}
.gravestone-epitaph-preview {
  font-size: 0.71rem;
  line-height: 1.35;
  color: #e2e8f0;
  margin: 0 0 7px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.gravestone-foot-row {
  margin-top: auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding-top: 5px;
  border-top: 1px dashed #334155;
}
.gravestone-bloom-strip {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-height: 20px;
}
.gravestone-bloom-mini svg {
  width: 18px;
  height: 18px;
  display: block;
}
.gravestone-flower-pill {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: #0369a1;
  color: #ffffff;
  white-space: nowrap;
}
.graveyard-inspector {
  background: #111827;
  border: 1.5px solid #475569;
  border-radius: 12px;
  padding: 12px;
  position: sticky;
  top: 10px;
  min-width: 0;
}
.graveyard-inspector-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}
.graveyard-stone-art svg {
  width: 74px;
  height: 84px;
  flex-shrink: 0;
}
.graveyard-head-copy {
  min-width: 0;
  flex: 1;
}
.graveyard-scope-tag {
  display: inline-block;
  font-size: 0.67rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #7dd3fc;
  margin-bottom: 2px;
}
.graveyard-head-copy h3 {
  margin: 0 0 2px;
  font-size: 1.02rem;
  color: #f8fafc;
}
.graveyard-dates {
  margin: 0 0 6px;
  font-size: 0.75rem;
  color: #cbd5e1;
}
.graveyard-epitaph {
  margin: 0;
  padding: 5px 8px;
  background: #0f172a;
  border-left: 3px solid #38bdf8;
  border-radius: 4px;
  font-size: 0.75rem;
  font-style: italic;
  color: #f1f5f9;
}
.graveyard-stats-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
  margin-bottom: 10px;
}
.graveyard-stat-cell {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 7px;
  padding: 5px 4px;
  text-align: center;
}
.graveyard-stat-val {
  display: block;
  font-size: 0.8rem;
  font-weight: 800;
  color: #f8fafc;
}
.graveyard-stat-lbl {
  display: block;
  font-size: 0.63rem;
  color: #cbd5e1;
}
.graveyard-story-box,
.graveyard-altar-box,
.graveyard-recent-box {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 9px;
  padding: 9px 10px;
  margin-bottom: 9px;
}
.graveyard-recent-box {
  margin-bottom: 0;
}
.graveyard-story-box h4,
.graveyard-altar-box h4,
.graveyard-recent-box h4 {
  margin: 0 0 5px;
  font-size: 0.81rem;
  color: #f8fafc;
}
.graveyard-story-box p {
  margin: 0 0 7px;
  font-size: 0.77rem;
  line-height: 1.46;
  color: #e2e8f0;
}
.graveyard-highlights {
  margin: 0 0 7px;
  padding-left: 16px;
  font-size: 0.74rem;
  line-height: 1.42;
  color: #cbd5e1;
}
.graveyard-highlights li {
  margin-bottom: 3px;
}
.graveyard-ext-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.74rem;
}
.graveyard-ext-links a {
  color: #7dd3fc;
  text-decoration: underline;
  font-weight: 700;
}
.graveyard-altar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 4px;
}
.graveyard-altar-sub {
  margin: 0 0 7px;
  font-size: 0.71rem;
  line-height: 1.38;
  color: #cbd5e1;
}
.graveyard-flower-btns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 132px), 1fr));
  gap: 6px;
  margin-bottom: 7px;
}
.graveyard-flower-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  background: #1e293b;
  border: 1.5px solid #475569;
  border-radius: 8px;
  color: #f8fafc;
  font-size: 0.73rem;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
}
.graveyard-flower-btn:hover {
  border-color: #38bdf8;
  background: #26354d;
}
.graveyard-flower-btn.placed {
  background: #14532d;
  border-color: #86efac;
  color: #ffffff;
}
.graveyard-flower-count {
  margin-left: auto;
  font-size: 0.69rem;
  padding: 1px 6px;
  border-radius: 999px;
  background: #0f172a;
  color: #e2e8f0;
}
.graveyard-offer-status {
  font-size: 0.73rem;
  color: #e2e8f0;
  padding: 5px 8px;
  border-radius: 6px;
  background: #1e293b;
  border: 1px solid #334155;
}
@media (max-width: 860px) {
  .graveyard-layout {
    grid-template-columns: 1fr;
  }
  .graveyard-inspector {
    position: static;
  }
  .graveyard-stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  .hub-top-bar {
    gap: 6px;
    padding: 6px 9px;
  }
  .hub-switch-group {
    flex-wrap: nowrap;
    gap: 5px;
  }
  .hub-brand-tag {
    font-size: 0.68rem;
    padding: 0 4px 0 1px;
    white-space: nowrap;
  }
  .hub-switch-btn {
    padding: 5px 9px;
    font-size: 0.74rem;
    white-space: nowrap;
  }
  .hub-sub-btn,
  .profile-chip {
    padding: 5px 9px;
    font-size: 0.73rem;
    white-space: nowrap;
  }
}


/* === Monthly Village Challenges — The Golden Chick Cup (v2.12, WCAG AA Verified) === */
#hubSwitchChallenges.active {
  background: #b45309;
  border-color: #fde047;
  color: #ffffff;
}

.cup-nav-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 17px;
  padding: 0 5px;
  border-radius: 999px;
  background: #b45309;
  color: #ffffff;
  font-size: 0.66rem;
  font-weight: 800;
}
.cup-nav-pill.live {
  background: #15803d;
  border: 1px solid #86efac;
}
.cup-nav-pill.completed {
  background: #6d28d9;
  border: 1px solid #ddd6fe;
}

.cup-masthead {
  background: linear-gradient(135deg, #0f172a 0%, #271a07 55%, #1e1b4b 100%);
  border-color: #f59e0b;
}

.cup-gold-cta-btn {
  background: #b45309;
  border: 1.5px solid #fde047;
  color: #ffffff;
  border-radius: 9px;
  padding: 7px 13px;
  font-size: 0.77rem;
  font-weight: 800;
  cursor: pointer;
}
.cup-gold-cta-btn:hover {
  background: #92400e;
}

.cup-clock-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.71rem;
  font-weight: 800;
  color: #ffffff;
  background: #15803d;
  border: 1px solid #86efac;
}
.cup-clock-pill.paused {
  background: #0369a1;
  border-color: #7dd3fc;
  color: #ffffff;
}

.cup-alert-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 13px;
  margin-bottom: 10px;
  border-radius: 11px;
  background: #1e293b;
  border: 1.5px solid #f59e0b;
  color: #f8fafc;
}
.cup-alert-banner.live {
  background: linear-gradient(90deg, #14532d 0%, #1e293b 100%);
  border-color: #4ade80;
}
.cup-alert-banner.completed {
  background: linear-gradient(90deg, #3b0764 0%, #1e293b 100%);
  border-color: #fde047;
}
.cup-alert-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.cup-alert-main strong {
  font-size: 0.82rem;
  color: #fef08a;
}
.cup-alert-main span {
  font-size: 0.75rem;
  color: #e2e8f0;
  overflow-wrap: anywhere;
}
.cup-stage-chip {
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: 999px;
  background: #b45309;
  color: #ffffff;
  font-size: 0.71rem;
  font-weight: 800;
}

.cup-main-grid {
  display: grid;
  grid-template-columns: minmax(min(100%, 340px), 1.05fr) minmax(min(100%, 340px), 1.25fr);
  gap: 12px;
  align-items: start;
}
@media (max-width: 860px) {
  .cup-main-grid {
    grid-template-columns: 1fr;
  }
}

.cup-right-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.cup-mini-pill {
  padding: 2px 8px;
  border-radius: 999px;
  background: #0369a1;
  color: #ffffff;
  font-size: 0.69rem;
  font-weight: 700;
}

.cup-hero-stage {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 12px;
  margin: 8px 0 10px;
  border-radius: 11px;
  background: #0b1120;
  border: 1.5px solid #334155;
}
.cup-hero-stage:focus-visible {
  outline: 2px solid #fde047;
  outline-offset: 2px;
}
.cup-chick-art-wrap {
  width: 108px;
  height: 108px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cup-chick-art-wrap svg {
  width: 100%;
  height: 100%;
}
.cup-hero-meta {
  flex: 1;
  min-width: 0;
}
.cup-chick-title {
  font-size: 0.98rem;
  font-weight: 800;
  color: #fef08a;
  margin-bottom: 3px;
  overflow-wrap: anywhere;
}
.cup-chick-sub {
  font-size: 0.76rem;
  color: #cbd5e1;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.cup-meters-box {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.cup-meter-row {
  display: grid;
  grid-template-columns: 78px 1fr 42px;
  align-items: center;
  gap: 7px;
  font-size: 0.73rem;
}
.cup-meter-name {
  color: #e2e8f0;
  font-weight: 700;
}
.cup-meter-track {
  height: 9px;
  border-radius: 999px;
  background: #1e293b;
  border: 1px solid #475569;
  overflow: hidden;
}
.cup-meter-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.25s ease;
}
.cup-meter-fill.fullness { background: #f59e0b; }
.cup-meter-fill.hydration { background: #38bdf8; }
.cup-meter-fill.joy { background: #f472b6; }
.cup-meter-val {
  text-align: right;
  font-weight: 800;
  color: #f8fafc;
}

.cup-tint-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.cup-tint-btn {
  padding: 5px 8px;
  border-radius: 8px;
  border: 1.5px solid #475569;
  background: #1e293b;
  color: #f8fafc;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}
.cup-tint-btn.active {
  background: #0369a1;
  border-color: #fde047;
  color: #ffffff;
}

.cup-consent-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 8px 0;
  font-size: 0.73rem;
  color: #cbd5e1;
  line-height: 1.38;
  cursor: pointer;
}
.cup-join-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.cup-care-controls {
  margin: 8px 0;
}
.cup-care-heading {
  font-size: 0.76rem;
  font-weight: 800;
  color: #e2e8f0;
  margin-bottom: 6px;
}
.cup-care-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: 6px;
}
.cup-care-btn {
  padding: 8px 10px;
  border-radius: 9px;
  border: 1.5px solid #cbd5e1;
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 800;
  cursor: pointer;
  text-align: left;
}
.cup-care-btn.feed { background: #b45309; border-color: #fde047; }
.cup-care-btn.water { background: #0369a1; border-color: #7dd3fc; }
.cup-care-btn.hop { background: #be185d; border-color: #f9a8d4; }
.cup-care-btn.pebble { background: #15803d; border-color: #86efac; }
.cup-care-btn.chirp { background: #6d28d9; border-color: #ddd6fe; }
.cup-care-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.cup-action-status {
  margin-top: 8px;
  padding: 7px 10px;
  border-radius: 8px;
  background: #0f172a;
  border: 1px solid #334155;
  font-size: 0.73rem;
  color: #cbd5e1;
  line-height: 1.4;
}

.cup-contenders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 225px), 1fr));
  gap: 8px;
  margin-top: 8px;
}
.cup-contender-card {
  padding: 9px 10px;
  border-radius: 10px;
  background: #0b1120;
  border: 1.5px solid #334155;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.cup-contender-card.champion {
  border-color: #fde047;
  background: linear-gradient(135deg, #271a07 0%, #0b1120 100%);
}
.cup-contender-card.napping {
  opacity: 0.82;
  border-style: dashed;
}
.cup-contender-top {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.cup-mini-chick {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
}
.cup-mini-chick svg {
  width: 100%;
  height: 100%;
}
.cup-contender-names {
  flex: 1;
  min-width: 0;
}
.cup-contender-chick {
  font-size: 0.81rem;
  font-weight: 800;
  color: #f8fafc;
  overflow-wrap: anywhere;
}
.cup-contender-owner {
  font-size: 0.71rem;
  color: #94a3b8;
  overflow-wrap: anywhere;
}
.cup-contender-bars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  font-size: 0.67rem;
  color: #cbd5e1;
}
.cup-mini-bar {
  height: 5px;
  border-radius: 999px;
  background: #1e293b;
  overflow: hidden;
  margin-top: 2px;
}

/* === v2.13.0 HANDHELD TAMAGOTCHI POCKET EGG CONSOLE === */
.tama-pocket-shell {
  margin: 8px 0 10px;
  padding: 10px;
  border-radius: 14px;
  background: linear-gradient(180deg, #0f172a 0%, #0b1120 100%);
  border: 1.5px solid #334155;
  outline: none;
}
.tama-pocket-shell:focus-visible {
  border-color: #38bdf8;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.45);
}
.tama-top-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 8px;
}
.tama-shell-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.tama-swatch-btn,
.tama-sound-btn {
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid #475569;
  background: #1e293b;
  color: #e2e8f0;
  font-size: 0.68rem;
  font-weight: 800;
  cursor: pointer;
}
.tama-swatch-btn.active {
  background: #0369a1;
  border-color: #7dd3fc;
  color: #ffffff;
}
.tama-toolbar-right {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}
.tama-mode-pill {
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(253, 224, 71, 0.45);
  color: #fef08a;
  font-size: 0.67rem;
  font-weight: 800;
}
.tama-mode-pill.live {
  background: rgba(21, 128, 61, 0.25);
  border-color: #86efac;
  color: #dcfce7;
}
.tama-egg-casing {
  position: relative;
  max-width: 356px;
  margin: 4px auto 8px;
  padding: 14px 14px 12px;
  border-radius: 44% 44% 38% 38% / 26% 26% 22% 22%;
  background: radial-gradient(circle at 32% 18%, #fde047 0%, #f59e0b 55%, #b45309 100%);
  border: 3px solid #fef08a;
  box-shadow: inset 0 -6px 12px rgba(69, 26, 3, 0.45), 0 8px 20px rgba(2, 6, 23, 0.65);
}
.tama-pocket-shell.shell-berry .tama-egg-casing {
  background: radial-gradient(circle at 32% 18%, #f9a8d4 0%, #db2777 56%, #831843 100%);
  border-color: #fbcfe8;
}
.tama-pocket-shell.shell-teal .tama-egg-casing {
  background: radial-gradient(circle at 32% 18%, #67e8f9 0%, #0284c7 56%, #0c4a6e 100%);
  border-color: #bae6fd;
}
.tama-pocket-shell.shell-violet .tama-egg-casing {
  background: radial-gradient(circle at 32% 18%, #ddd6fe 0%, #7c3aed 56%, #3b0764 100%);
  border-color: #ede9fe;
}
.tama-keychain-ring {
  width: 24px;
  height: 11px;
  margin: -19px auto 5px;
  border-radius: 999px;
  border: 3px solid #e2e8f0;
  background: #0f172a;
}
.tama-brand-plate {
  text-align: center;
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  padding: 2px 10px;
  width: fit-content;
  margin: 0 auto 7px;
}
.tama-lcd-bezel {
  background: #1e293b;
  border: 3px solid #0f172a;
  border-radius: 14px;
  padding: 6px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.65);
}
.tama-icon-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}
.tama-icon-strip.top {
  margin-bottom: 5px;
}
.tama-icon-strip.bottom {
  margin-top: 5px;
}
.tama-icon-btn {
  padding: 3px 2px;
  border-radius: 6px;
  border: 1px solid #475569;
  background: #0f172a;
  color: #cbd5e1;
  font-size: 0.63rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tama-icon-btn.active {
  background: #fde047;
  border-color: #f59e0b;
  color: #0f172a;
}
.tama-icon-btn.alert {
  background: #c2410c;
  border-color: #fed7aa;
  color: #ffffff;
}
.tama-lcd-viewport {
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid #334155;
  background: #c5d69a;
}
#tamaLcdCanvas {
  display: block;
  width: 100%;
  height: auto;
  cursor: pointer;
  image-rendering: pixelated;
}
.tama-hw-buttons {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 20px;
  margin-top: 10px;
}
.tama-hw-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.tama-hw-slot.mid {
  margin-top: 5px;
}
.tama-hw-slot span {
  font-size: 0.6rem;
  font-weight: 900;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(2, 6, 23, 0.85);
}
.tama-hw-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2.5px solid #ffffff;
  background: linear-gradient(180deg, #0f172a 0%, #334155 100%);
  color: #fde047;
  font-size: 0.82rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 3px 0 #020617;
}
.tama-hw-btn:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #020617;
}
.tama-stage-readout {
  padding: 6px 9px;
  border-radius: 8px;
  background: #1e293b;
  border: 1px solid #334155;
  color: #f8fafc;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.38;
  text-align: center;
}


/* === v2.14.0 Toolbar Ping Bell (Public AI Watchlist & Audible Completion Alarm) === */
.hub-ping-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1.5px solid #38bdf8;
  background: #1e293b;
  color: #f8fafc;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.hub-ping-btn:hover {
  background: #334155;
  border-color: #7dd3fc;
}
.hub-ping-btn.armed {
  background: #b45309;
  border-color: #fde68a;
  color: #ffffff;
}

.ping-alarm-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  margin-bottom: 8px;
  border-radius: 12px;
  background: linear-gradient(135deg, #1e1b4b 0%, #0f172a 65%, #451a03 100%);
  border: 2px solid #f59e0b;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}
.ping-alarm-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.ping-alarm-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  overflow: hidden;
  border: 1.5px solid #fde68a;
  flex-shrink: 0;
  background: #0b1120;
}
.ping-alarm-copy {
  min-width: 0;
}
.ping-alarm-kicker {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #fde68a;
  text-transform: uppercase;
}
.ping-alarm-title {
  font-size: 0.84rem;
  font-weight: 800;
  color: #ffffff;
  overflow-wrap: anywhere;
}
.ping-alarm-msg {
  font-size: 0.76rem;
  color: #e2e8f0;
  overflow-wrap: anywhere;
}
.ping-alarm-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.ping-open-link {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 8px;
  background: #0369a1;
  border: 1px solid #7dd3fc;
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.ping-open-link:hover {
  background: #0284c7;
}

.ping-modal-card {
  max-width: 660px;
  width: min(96vw, 660px);
  max-height: 88dvh;
  overflow-y: auto;
}
.ping-notice-box {
  padding: 8px 11px;
  margin-bottom: 10px;
  border-radius: 9px;
  background: #0f172a;
  border: 1px solid #38bdf8;
  font-size: 0.76rem;
  line-height: 1.4;
  color: #e2e8f0;
}
.ping-controls-box {
  padding: 10px 12px;
  margin-bottom: 10px;
  border-radius: 10px;
  background: #1e293b;
  border: 1px solid #475569;
}
.ping-alarm-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
}
.ping-arm-btn {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1.5px solid #38bdf8;
  background: #0369a1;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}
.ping-arm-btn.armed {
  background: #15803d;
  border-color: #86efac;
}
.ping-tone-btn {
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid #64748b;
  background: #0f172a;
  color: #e2e8f0;
  font-size: 0.73rem;
  font-weight: 700;
  cursor: pointer;
}
.ping-tone-btn.active {
  background: #b45309;
  border-color: #fde68a;
  color: #ffffff;
}
.ping-test-btn {
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid #f59e0b;
  background: #334155;
  color: #fef3c7;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
}
.ping-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: #cbd5e1;
}
.ping-handle-input {
  padding: 4px 8px;
  border-radius: 7px;
  border: 1px solid #475569;
  background: #0f172a;
  color: #f8fafc;
  font-size: 0.78rem;
  width: 175px;
}
@media (max-width: 640px) {
  .ping-handle-input {
    font-size: 16px;
  }
}
.ping-watchlist-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 6px 0 10px;
}
.ping-watch-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #0f172a;
  border: 1.5px solid #475569;
  color: #f8fafc;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}
.ping-watch-chip.checked {
  border-color: #38bdf8;
  background: #1e293b;
}
.ping-watch-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  overflow: hidden;
  display: inline-flex;
}
.ping-feed-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-height: 230px;
  overflow-y: auto;
}
.ping-feed-card {
  padding: 8px 10px;
  border-radius: 9px;
  background: #0f172a;
  border: 1px solid #334155;
}
.ping-feed-card.targeted {
  border-color: #f59e0b;
}
.ping-feed-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 0.72rem;
  color: #94a3b8;
  margin-bottom: 3px;
}
.ping-target-pill {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 999px;
  background: #b45309;
  color: #ffffff;
  font-size: 0.67rem;
  font-weight: 800;
  margin-left: 5px;
}
.ping-agent-composer {
  padding: 9px 11px;
  margin-bottom: 10px;
  border-radius: 9px;
  background: #0b1120;
  border: 1px dashed #38bdf8;
}

/* Compact single-row fit for 1024px desktop viewports with 9 top-bar controls (v2.14.1) */
@media (max-width: 1140px) and (min-width: 981px) {
  .hub-top-bar {
    gap: 4px;
    padding: 4px 6px;
  }
  .hub-brand-tag {
    font-size: 0.62rem;
    padding: 0 2px 0 0;
    letter-spacing: 0.01em;
  }
  .hub-switch-group,
  .hub-top-right {
    gap: 3px;
  }
  .hub-switch-btn,
  .hub-sub-btn,
  .hub-ping-btn {
    padding: 4px 6px;
    font-size: 0.68rem;
    gap: 2px;
  }
  .news-unread-pill {
    padding: 0 4px;
    font-size: 0.64rem;
    height: 16px;
    min-width: 16px;
  }
  .account-btn,
  #btnOpenAuth {
    padding: 3px 8px 3px 4px;
    font-size: 0.69rem;
    gap: 4px;
  }
}
@media (max-width: 980px) {
  .hub-top-bar {
    flex-wrap: wrap;
    row-gap: 6px;
  }
  .hub-switch-group {
    flex-wrap: wrap;
    min-width: 0;
    flex-shrink: 1;
  }
}
