/* Thumbnail-first catalog on the blank board.
   Tokens and type come from chrome.css (Polished / Overshoot). */

body.lobby {
  min-height: 100dvh;
}

.shell {
  width: min(100%, 1080px);
  margin: 0 auto;
  padding: 48px 24px 56px;
  opacity: 0;
  transform: translateY(8px);
}

.shell.in {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.mast {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 22px;
  margin-bottom: 28px;
}

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

.mast h1 {
  margin: 0;
  font-size: var(--t-title);
  font-weight: var(--w-medium);
  line-height: 1.3;
  color: var(--l-1);
}

.mast .pill {
  margin-left: 0;
}

.models {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.model-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px 3px 7px;
  border-radius: var(--r-pill);
  background: #efefed;
  font-size: var(--t-micro);
  font-weight: var(--w-medium);
  color: var(--l-3);
}

.model-chip.on {
  color: var(--l-1);
}

.model-chip .mark {
  width: 12px;
  height: 12px;
  margin: 0;
}

.model-chip .mark-fallback {
  width: 12px;
  height: 12px;
  margin: 0;
}

.model-chip.on .mark-fallback {
  border-color: var(--l-1);
}

.deck-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.deck-bar h2 {
  margin: 0;
  font-size: var(--t-title);
  font-weight: var(--w-medium);
  color: var(--l-1);
}

.find {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  width: min(100%, 240px);
  color: var(--l-3);
}

.find svg {
  flex: none;
}

.find input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  padding: 0;
  font-size: var(--t-body);
  color: var(--l-1);
  appearance: none;
}

.find input::placeholder {
  color: var(--l-3);
}

.find input[type="search"]::-webkit-search-decoration,
.find input[type="search"]::-webkit-search-cancel-button {
  appearance: none;
}

.deck {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.pack-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 18px;
}

.card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
  padding: 12px;
  border-radius: var(--r-lg);
  background: var(--l-surface);
  box-shadow: 0 8px 26px rgba(17, 17, 17, 0.07);
  color: var(--l-2);
  cursor: pointer;
  animation: rise-in 0.62s cubic-bezier(0.16, 1, 0.3, 1);
  transition:
    color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.pack-grid > :nth-child(1) {
  animation-delay: 0.05s;
}
.pack-grid > :nth-child(2) {
  animation-delay: 0.12s;
}
.pack-grid > :nth-child(3) {
  animation-delay: 0.19s;
}

.card:hover,
.card.on {
  color: var(--l-1);
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(17, 17, 17, 0.1);
}

.card .plate {
  aspect-ratio: 16 / 10;
  margin: 0 0 12px;
}

.card .plate img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  gap: 4px;
  min-width: 0;
}

.card-foot {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex: none;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--l-hair);
}

.card-go {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 11px 0 12px;
  border-radius: var(--r-pill);
  background: #f3f3f1;
  color: var(--l-1);
  font-size: var(--t-meta);
  font-weight: var(--w-medium);
  text-decoration: none;
  transition:
    background 0.18s ease,
    color 0.18s ease;
}

.card-go svg {
  display: block;
}

.card:hover .card-go {
  background: var(--l-1);
  color: #fff;
}

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

.card-name {
  flex: 1;
  min-width: 0;
  font-size: var(--t-title);
  font-weight: var(--w-medium);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card .pill {
  margin-left: 0;
  flex: none;
}

.card-blurb {
  font-size: var(--t-body);
  line-height: 1.45;
  color: var(--l-2);
}

.card:hover .card-blurb,
.card.on .card-blurb {
  color: var(--l-1);
}

.card mark {
  background: transparent;
  color: var(--l-1);
  font-weight: var(--w-medium);
}

.deck-empty {
  margin: 0;
  padding: 72px 8px;
  text-align: center;
  font-size: var(--t-label);
  color: var(--l-3);
}

.deck-foot {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 22px;
  padding-top: 12px;
  border-top: 1px solid var(--l-hair);
  font-size: var(--t-meta);
  color: var(--l-3);
}

.deck-foot .push {
  margin-left: auto;
}

.deck-foot .hint {
  margin: 0;
}

.kbd {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--l-hair);
  background: #f1f1ef;
  border-radius: var(--r-xs);
  padding: 1px 5px;
  font-size: var(--t-micro);
  font-weight: var(--w-medium);
  color: var(--l-2);
}

@media (max-width: 800px) {
  .shell {
    padding: 28px 16px 40px;
  }

  .mast {
    flex-wrap: wrap;
  }

  .models {
    margin-left: 0;
    width: 100%;
    justify-content: flex-start;
  }

  .deck-bar {
    flex-wrap: wrap;
  }

  .find {
    margin-left: 0;
    width: 100%;
  }

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

@media (prefers-reduced-motion: reduce) {
  .shell,
  .card,
  .card:hover,
  .card.on {
    opacity: 1;
    transform: none;
    transition: none;
    animation: none;
  }
}
