.collection-content h3 { margin: 0; font-size: 16px; font-weight: 650; }
.collection-content p { margin: 0; }
.collection-content button { min-height: 44px; cursor: auto; }
.collection-content [hidden], .collection-status:empty { display: none; }
.collection-content button:focus-visible,
.collection-content input:focus-visible,
.collection-content select:focus-visible { outline: 2px solid currentColor; outline-offset: -3px; }
.collection-status { padding: 0 0 12px; }
.collection-tabs, .collection-actions, .collection-balance {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.collection-balance { justify-content: space-between; font-variant-numeric: tabular-nums; }
.collection-tabs { margin: 12px 0; }
.collection-tabs .btn[aria-pressed=true],
.collection-boxes .btn[aria-pressed=true] {
  border-color: var(--accent);
  background: var(--surface2);
}
.collection-boxes {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 8px;
}
.collection-boxes button {
  display: grid;
  grid-template-rows: auto 1fr auto;
  place-items: center;
  align-content: stretch;
  gap: 4px;
  min-width: 0;
  padding: 7px 5px;
  text-align: center;
  line-height: 1.25;
  white-space: normal;
}
.collection-boxes img { display: block; width: min(100%,150px); height: auto; user-select: none; align-self: end; }
.collection-boxes [data-box="regular"] img { translate: 0 1.875%; }
.collection-boxes [data-box="large"] img { translate: 0 1.25%; }
.collection-boxes span, .collection-details, .collection-market small { color: var(--muted); font-size: 13px; }
.collection-panel {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface2);
}
.collection-panel:only-child { margin-top: 0; }
.collection-panel > .btn { justify-self: start; }
.collection-panel label { font-size: 14px; }
.collection-panel select, .collection-panel input {
  box-sizing: border-box;
  min-height: 44px;
  width: 100%;
  min-width: 0;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: inherit;
  font: inherit;
}
.collection-actions { justify-content: flex-end; padding-top: 5px; }
.collection-odds-disclosure summary { min-height: 36px; align-content: center; }
.collection-odds {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 6px;
  margin: 0;
}
.collection-odds div { background: var(--surface); padding: 6px 4px; border-radius: 8px; text-align: center; }
.collection-odds dt { font-size: 12px; }
.collection-odds dd { margin: 0; font-weight: 750; font-variant-numeric: tabular-nums; }
.collection-content .collection-coin-heading { margin: 8px 0 4px; font-size: 13px; font-weight: 700; }
.collection-coin-odds { grid-template-columns: repeat(auto-fit,minmax(64px,1fr)); }
.collection-draw { position: relative; overflow: hidden; border-radius: 8px; background: var(--surface); }
.collection-draw::after {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--accent);
}
.collection-market-top { display: flex; justify-content: flex-end; }
.collection-woody { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); align-items: start; gap: 12px; }
.collection-woody > .collection-panel { margin: 0; }
.collection-woody .woody-portrait { max-width: 290px; }
.collection-draw-track { position: relative; display: flex; width: max-content; }
.collection-draw-card {
  width: min(250px,calc(100vw - 90px));
  min-height: 78px;
  display: grid;
  place-content: center;
  text-align: center;
  margin: 4px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.collection-draw-card[data-rarity="2"] { border-color: #427fa6; }
.collection-draw-card[data-rarity="3"] { border-color: #9564a8; }
.collection-draw-card[data-rarity="4"] { border-color: #bd8a38; }
.collection-draw-card small { color: var(--muted); }
.collection-market-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 50px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.collection-market small { display: block; }
.collection-reveal { min-height: 106px; }
.collection-reveal svg { display: block; width: 160px; max-width: 100%; margin-inline: auto; }
.collection-reveal .chest-lid {
  transform-origin: var(--chest-hinge);
  transition: transform 320ms ease-out;
}
.collection-reveal.is-open .chest-lid { transform: translateY(-13px) rotate(-17deg); }
@media (max-width: 480px) {
  .collection-boxes strong { font-size: 12px; }
  .collection-boxes span { font-size: 12px; }
  .collection-tabs { display: grid; grid-template-columns: 1fr 1fr 1.4fr; }
  .collection-tabs .btn { padding-inline: 5px; }
  .collection-woody { grid-template-columns: 1fr; }
  .collection-odds:not(.collection-coin-odds) { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .collection-reveal .chest-lid { transition: none; }
}
.collection-market-disclosure{margin:8px 0;border:1px solid var(--line);border-radius:12px;background:var(--surface2)}
.collection-market-disclosure summary{display:flex;align-items:center;gap:8px;min-height:44px;padding:6px 12px;cursor:pointer;font-weight:700;list-style:none}
.collection-market-disclosure summary::-webkit-details-marker{display:none}
.collection-market-filters{display:grid;gap:9px;padding:0 12px 12px}
.collection-market-filters fieldset{margin:0;padding:4px 0 0;border:0;min-width:0}
.collection-market-filters legend{padding:0;font-size:.85rem;font-weight:700}
.collection-filter-options{display:flex;flex-wrap:wrap;gap:5px}
.collection-filter-options .btn{min-height:36px;padding:5px 10px}
.collection-filter-options [aria-pressed=true]{color:var(--ink);background:var(--surface);border-color:currentColor}
@supports (appearance:base-select){
  .collection-panel select,.collection-panel select::picker(select){appearance:base-select}
  .collection-panel select::picker(select){background:var(--surface);color:var(--ink);border:1px solid var(--line);border-radius:12px;padding:4px}
  .collection-panel select option{min-height:38px;padding:5px 8px;border-radius:8px}
  .collection-panel select option:is(:hover,:focus-visible,:checked){background:var(--surface2)}
}
