/* Original Moon Garden illustrated deck. Typography is HTML, never baked into art. */
.stage { padding-top: 40px; padding-bottom: 38px; }
.stage .status { margin-bottom: 36px; }
.cards { min-height: 256px; align-items: flex-start; max-width: 590px; }
.pick { max-width: 160px; aspect-ratio: 2 / 3; transition: transform .35s ease, opacity .35s ease, filter .35s ease, flex-grow .4s ease; }
.pick.chosen { max-width: 196px; flex-grow: 1.35; }
.cards:has(.chosen) .pick.dim { flex-grow: .68; }
.face { border-radius: 9px; }
.face.back { display: block; border: 1px solid #aa8749; box-shadow: 0 13px 24px #030b1780, 0 0 0 3px #a78b5333; background: #101a2b; }
.face.back::after { content: ""; position: absolute; inset: 2px; border: 1px solid #f3d89755; border-radius: 7px; pointer-events: none; }
.card-back-art { width: 100%; height: 100%; object-fit: fill; }
.face.front { display: block; padding: 0; background: #e9e0c8; color: #f2eadb; border: 1px solid #b79959; box-shadow: 0 13px 26px #030b1780; }
.card-front-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card-foil-frame { position: absolute; inset: 5px; border: 1px solid #e4c48099; border-radius: 3px; pointer-events: none; }
.face.front .num { position: absolute; top: 9px; left: 50%; transform: translateX(-50%); min-width: 28px; padding: 2px 7px; border: 1px solid #c4a56b; border-radius: 100px; color: #f5dfac; background: #101a2be6; font-size: 12px; line-height: 1.35; letter-spacing: .08em; z-index: 1; }
.face.front .glyph { display: none; }
.card-title-plaque { position: absolute; left: 8px; right: 8px; bottom: 10px; padding: 7px 3px 6px; text-align: center; background: #101a2bf0; border-top: 1px solid #e0bc78; border-bottom: 1px solid #e0bc78; }
.face.front .cname { display: block; color: #f6ecd7; font-size: 15px; font-weight: 500; line-height: 1.45; }
.face.front .ename { display: block; color: #e4c994; font-size: 8px; margin-top: 3px; letter-spacing: .055em; line-height: 1.3; }
.face.front.rev .num { transform: translateX(-50%) rotate(180deg); }
.face.front.rev .card-front-art { transform: rotate(180deg); }
.face.front.art-unavailable .glyph { display: block; position: absolute; left: 0; right: 0; top: 30%; text-align: center; color: #826332; }
.face.front.art-loading .glyph { display: block; position: absolute; left: 0; right: 0; top: 30%; text-align: center; color: #826332; }
.face.front.art-loading .card-front-art { opacity: 0; }
.face.front.art-unavailable .card-front-art { display: none; }
.result-overview { display: flex; align-items: center; gap: 26px; margin-top: 26px; }
.result-art-button, .detail-art-button { appearance: none; background: none; border: 0; padding: 0; cursor: zoom-in; color: inherit; font: inherit; }
.result-art-button { flex: none; width: 112px; }
.result-art-button img { width: 112px; height: 168px; border: 1px solid #a58a52; border-radius: 5px; }
.result-summary { min-width: 0; }
.result-overview .result-head { margin-top: 0; }
.result .result-head .cname { font-size: clamp(25px, 4vw, 38px); }
.result .keywords { margin-top: 17px; }
.art-reversed { transform: rotate(180deg); }
.art-zoom-label { display: block; color: #7c6134; font-family: var(--sans); font-size: 9px; text-align: center; margin-top: 8px; letter-spacing: .03em; }
.gallery { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 24px 20px; }
.g-card { padding: 0 0 14px; min-width: 0; }
.gallery-art-frame { display: block; position: relative; aspect-ratio: 2 / 3; border: 1px solid #b5965d; border-radius: 6px; overflow: hidden; background: #182338; transition: transform .25s ease; }
.gallery-art { width: 100%; height: 100%; object-fit: cover; }
.gallery-art-number { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); min-width: 27px; padding: 2px 6px; border: 1px solid #a58a52; border-radius: 100px; background: #101a2be6; color: #edce8b; font-family: var(--serif); font-size: 10px; }
.g-card:hover .gallery-art-frame, .g-card:focus-visible .gallery-art-frame { transform: translateY(-4px); }
.g-card .nm { margin-top: 11px; font-size: 14px; }
.gallery-en { display: block; font-family: Georgia, serif; font-size: 8px; color: var(--muted); letter-spacing: .055em; line-height: 1.5; margin-top: 3px; }
.g-detail { display: flex; align-items: flex-start; gap: 28px; }
.g-detail[hidden] { display: none; }
.detail-art-button { flex: none; width: 160px; }
.detail-art { width: 160px; height: 240px; border: 1px solid #b5965d; border-radius: 6px; }
.detail-art-button .art-zoom-label { color: var(--gold); }
.detail-copy { flex: 1; min-width: 0; }
.art-dialog { max-width: min(92vw, 540px); max-height: 94svh; padding: 16px; background: #101a2b; color: #f2efe8; border: 1px solid #b69b64; border-radius: 9px; }
.art-dialog::backdrop { background: #030813db; }
.art-dialog-close { display: flex; align-items: center; gap: 14px; min-height: 44px; margin: 0 0 14px auto; background: transparent; border: 0; color: #e4cb9f; padding: 3px 5px; font: inherit; font-size: 13px; cursor: pointer; }
.art-dialog-close span { font-size: 22px; line-height: 1; }
.art-dialog figure { margin: 0; }
.art-dialog figure img { width: auto; height: auto; max-height: 74svh; max-width: 100%; margin: 0 auto; border-radius: 5px; }
.art-dialog figcaption { padding: 14px 0 3px; text-align: center; font-family: var(--serif); font-size: 18px; }
@media(max-width: 700px) {
  .stage { padding: 32px 14px; }
  .cards { min-height: 188px; gap: 12px; }
  .pick { max-width: 120px; }
  .pick.chosen { max-width: 160px; }
  .face.front .num { top: 6px; font-size: 10px; padding: 1px 5px; min-width: 22px; }
  .card-title-plaque { left: 5px; right: 5px; bottom: 7px; padding: 5px 2px; }
  .face.front .cname { font-size: 12px; }
  .face.front .ename { font-size: 7px; line-height: 1.3; letter-spacing: 0; }
  .result-overview { gap: 16px; }
  .result-art-button { width: 82px; }
  .result-art-button img { width: 82px; height: 123px; }
  .result .result-head .cname { font-size: 24px; line-height: 1.55; }
  .result .keywords { margin-top: 12px; gap: 5px; }
  .result .keywords span { font-size: 11px; padding: 2px 6px; }
  .result .pos-badge { font-size: 11px; padding: 2px 10px; }
  .art-zoom-label { font-size: 8px; line-height: 1.5; }
  .gallery { gap: 22px 16px; }
  .g-detail { gap: 18px; }
  .detail-art-button, .detail-art { width: 108px; }
  .detail-art { height: 162px; }
  .g-detail h3 { font-size: 18px; }
}
@media(max-width: 380px) {
  .cards { min-height: 170px; gap: 9px; }
  .result-overview { gap: 13px; }
  .result-art-button, .result-art-button img { width: 67px; }
  .result-art-button img { height: 100.5px; }
  .result .result-head .cname { font-size: 21px; }
  .gallery { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 20px 13px; }
  .g-detail { flex-direction: column; }
  .detail-art-button { align-self: center; }
}
@media(prefers-reduced-motion: reduce) {
  .pick, .gallery-art-frame { transition: none !important; }
  .g-card:hover .gallery-art-frame, .g-card:focus-visible .gallery-art-frame { transform: none; }
}
