/* The banner maker (/banner, views/crestPartial.jsx) as a game screen: the
   trophy-hall frame from public/achievements-hall.css. The editor's own
   tokens (public/crest.css) are pointed at their dark values inside the hall,
   so it reads the same in both themes. */

.crest-hall {
  --text: #f6e9cc;
  --papyrus-text: #f6e9cc;
  --surface-border: rgba(255, 220, 160, 0.16);
  --crest-accent: #ffd23a;
  --crest-tile: rgba(18, 14, 10, 0.62);
  --crest-tile-border: rgba(255, 220, 160, 0.16);
  --crest-selected: #ffd23a;
  --crest-ok: #7ee07e;
  --crest-err: #ff8a7a;
  --crest-hint: #ffd76a;
  --crest-map-bg: #4a4232;
  font-family: "Comfortaa", sans-serif;
}
.crest-hall.crest-page { display: block; }
.crest-hall .ach-hall-frame.crest-panel { max-width: 800px; padding: 16px 20px 22px; }
.crest-hall .crest-panel button { margin: 0; }

.crest-hall .crest-heading {
  font: 700 clamp(1.3rem, 1rem + 1.2vw, 1.8rem)/1.1 "Cinzel", serif;
  letter-spacing: 0.04em;
  color: #ffe9b0;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.6);
}
.crest-hall .crest-intro { color: #d4c39f; opacity: 1; font-size: 0.9rem; }
.crest-hall .crest-stage { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 4px 12px rgba(0, 0, 0, 0.35); }
.crest-hall .crest-preview-big { filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.55)); }

/* Tabs as the gold segmented control used on the leaderboard. */
.crest-hall .crest-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--crest-tile-border);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.45);
}
.crest-hall .crest-tab {
  justify-content: center;
  padding: 9px 6px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #d4c39f;
  font: 700 0.88rem/1 "Cinzel", serif;
  opacity: 1;
}
.crest-hall .crest-tab:hover { color: #fff; background: rgba(255, 255, 255, 0.05); }
.crest-hall .crest-tab.is-active {
  background: linear-gradient(180deg, #ffe48a 0%, #f0b52e 55%, #c98a12 100%);
  border-color: #7a5310;
  color: #3d2000;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 2px 0 #6b4410;
}
.crest-hall .crest-tab.is-active i { color: #3d2000; }

.crest-hall .crest-row-label {
  font: 700 0.78rem/1 "Cinzel", serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #d4c39f;
}

/* Buttons: wood for the secondary ones, gold for save/buy/log in. */
.crest-hall .btn-secondary {
  border-radius: 10px;
  border: 1px solid rgba(200, 150, 12, 0.55);
  background: linear-gradient(180deg, rgba(48, 44, 40, 0.92), rgba(22, 20, 18, 0.95));
  color: var(--text);
}
.crest-hall .btn-secondary:hover { border-color: rgba(230, 206, 106, 0.9); color: #fff; }
.crest-hall .btn-secondary i { color: var(--crest-accent); }
.crest-hall .cta.crest-save,
.crest-hall .cta.crest-buy-go,
.crest-hall .btn-primary {
  border: 2px solid #7a5310;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffe48a 0%, #f0b52e 55%, #c98a12 100%);
  color: #3d2000;
  font-family: "Cinzel", serif;
  font-weight: 800;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.5), 0 3px 0 #6b4410;
}
.crest-hall .cta.crest-save:disabled,
.crest-hall .cta.crest-buy-go:disabled { filter: grayscale(0.7) brightness(0.75); cursor: not-allowed; }
.crest-hall .crest-credit { color: #d4c39f; }

@media (max-width: 600px) {
  .crest-hall.ach-hall { padding: 16px 6px 28px; }
  .crest-hall .ach-hall-frame.crest-panel { padding: 12px 10px 16px; }
}

/* Phones: the big preview on top, then the three "where it shows" previews
   side by side instead of a tall stack; the login line keeps its icon. */
@media (max-width: 480px) {
  .crest-hall .crest-preview-big { width: 128px; height: 128px; }
  .crest-hall .crest-contexts {
    flex-basis: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .crest-hall .crest-ctx {
    flex-direction: column;
    justify-content: flex-start;
    gap: 6px;
    padding: 8px 4px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.3);
    text-align: center;
  }
  .crest-hall .crest-ctx-label { width: auto; font-size: 0.62rem; letter-spacing: 0.04em; }
  .crest-hall .crest-ctx-battle { font-size: 0.8rem; max-width: 100%; overflow: hidden; }
  .crest-hall .crest-ctx-battle strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .crest-hall .crest-login { gap: 8px 10px; }
  .crest-hall .crest-login span { flex: 1 1 180px; }
  .crest-hall .crest-tab { font-size: 0.76rem; gap: 4px; padding: 9px 4px; white-space: nowrap; }
  .crest-hall .crest-premium-tag { font-size: 0.55rem; padding: 1px 4px; }
}
