/* Cards, profile, store and 404 pages. */

/* ---------- the cards page's head: a hand of five, one of each rarity ---------- */
.head-fan { display: flex; align-items: flex-end; padding: 0 30px 4px; }
.head-fan button { margin: 0 -14px; padding: 0; border: 0; background: transparent; cursor: pointer; transform-origin: 50% 120%; transition: transform 90ms steps(3, end); }
.head-fan button:nth-child(1) { transform: rotate(-12deg) translateY(6px); }
.head-fan button:nth-child(2) { transform: rotate(-6deg) translateY(1px); }
.head-fan button:nth-child(4) { transform: rotate(6deg) translateY(1px); }
.head-fan button:nth-child(5) { transform: rotate(12deg) translateY(6px); }
.head-fan button:hover, .head-fan button:focus-visible { transform: translateY(-10px); z-index: 1; outline: none; }
.head-fan button:focus-visible .mc-card { filter: drop-shadow(0 0 0 var(--accent)) drop-shadow(0 3px 0 rgba(0, 0, 0, .55)); }
@media (max-width: 760px) { .head-fan { display: none; } }

/* ---------- filters ---------- */
.filters { display: grid; grid-template-columns: minmax(0, 1.6fr) auto repeat(4, minmax(0, 1fr)); gap: 12px; align-items: end; padding: 14px 16px 16px; border-bottom: 2px solid var(--edge); }
.filters .seg { display: flex; height: 40px; padding: 3px; }
.filters .seg button { height: 30px; padding: 0 10px; }
@media (max-width: 1100px) {
  .filters { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .filters .f-q { grid-column: span 2; }
  .filters .f-kind { grid-column: span 2; }
}
@media (max-width: 640px) {
  .filters { grid-template-columns: 1fr 1fr; }
  .filters .f-q, .filters .f-kind { grid-column: 1 / -1; }
}
@media (max-width: 400px) { .filters .seg button { padding: 0 6px; font-size: 7px; } }

/* ---------- card grid ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(136px, 1fr)); gap: 10px; }
.card-tile { display: grid; justify-items: center; align-content: start; gap: 6px; padding: 14px 6px 12px; text-align: center; }
.card-tile:hover, .card-tile:focus-visible { --cc: var(--tier); border-color: var(--tier); box-shadow: inset 0 -4px 0 var(--tier); }
.card-tile b { font-family: var(--font-terminal); font-weight: 400; font-size: 21px; line-height: 1; min-height: 2em; display: flex; align-items: center; }
.card-tile.locked b { color: var(--ink-faint); }
.card-tile.locked .px { opacity: .5; }
.card-tile.is-new { animation: unlock-pop 300ms steps(3, end); }
@keyframes unlock-pop { 50% { transform: translateY(-4px); } }
@media (max-width: 420px) { .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.empty { display: grid; justify-items: center; gap: 12px; text-align: center; padding: 48px 0; font-family: var(--font-terminal); font-size: 24px; color: var(--ink-muted); }
.empty p { margin: 0; }

/* the card dialog's buttons, under the tooltip */
.cd-nav { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 18px; padding-top: 14px; border-top: 2px solid #223468; }
.cd-nav .meta { margin-right: auto; }

/* ---------- profile ---------- */
.profile-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--gap); margin-bottom: var(--gap); }
@media (max-width: 860px) { .profile-grid { grid-template-columns: 1fr; } }
.lookup form { display: flex; gap: 10px; align-items: flex-start; }
.lookup .input { height: 48px; font-size: 24px; }
.lookup .note { margin: 12px 0 0; color: var(--ink-muted); font-size: 14px; }
.lookup.off form { opacity: .5; pointer-events: none; }
.profile-head .panel-body { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.profile-head img.head { width: 64px; height: 64px; image-rendering: pixelated; background: var(--bg-deep); border: 2px solid var(--edge); }
.profile-head h2 { font-family: var(--font-terminal); font-size: 34px; line-height: 1; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; width: 100%; }
.stat-row .stat-value { color: var(--accent); }
.arena-pick { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.arena-pick .plate { height: 20px; width: auto; }
.arena-pick .meta b { font-family: var(--font-terminal); font-weight: 400; font-size: 20px; color: var(--ink); letter-spacing: 0; }
.meter { height: 14px; margin: 14px 0 8px; padding: 2px; background: var(--bg-deep); border: 2px solid var(--edge); }
.meter i { display: block; height: 100%; background: var(--accent); box-shadow: inset 0 2px 0 var(--accent-light); transition: width 200ms steps(8, end); }
.meter-label { font-family: var(--font-terminal); font-size: 21px; color: var(--ink-muted); }
.meter-label b { color: var(--ink); font-weight: 400; }

/* ---------- store and 404 ---------- */
.store-box { max-width: 600px; margin: 56px auto 0; }
.store-box .panel-body { display: grid; justify-items: center; gap: 16px; padding: 28px 24px; text-align: center; }
.store-box p { margin: 0; color: var(--ink-soft); }
.lost-card { filter: drop-shadow(0 4px 0 rgba(0, 0, 0, .55)); }
.lost-card { animation: lost 2.4s steps(1, end) infinite; }
@keyframes lost { 0%, 100% { transform: none; } 50% { transform: translateY(-4px); } }
.box-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.spinner { width: 32px; height: 32px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.spinner i { background: var(--accent); animation: spin-px 800ms steps(1, end) infinite; opacity: .25; }
.spinner i:nth-child(2) { animation-delay: .2s; }
.spinner i:nth-child(4) { animation-delay: .4s; }
.spinner i:nth-child(3) { animation-delay: .6s; }
@keyframes spin-px { 0%, 100% { opacity: .25; } 25% { opacity: 1; } }
.promise { width: 100%; display: grid; gap: 10px; margin: 0; padding: 14px 16px; text-align: left; list-style: none; background: var(--bg-deep); border: 2px solid var(--edge); clip-path: var(--clip-px1); box-shadow: var(--shadow-inset); }
.promise li { display: flex; align-items: flex-start; gap: 12px; font-size: 14px; color: var(--ink-soft); }
.promise li .px { flex: none; margin-top: 2px; }
.promise b { color: var(--ink); font-weight: 600; }
.account-bar { flex-basis: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.account-bar .note { margin: 0; color: var(--ink-muted); font-size: 14px; }
