/* Money Flow V1.1 — edge-to-edge image cards and compact all-at-once deck.
   Loaded after all previous styles. No card artwork/content modified. */

/* One glance: all 51 facedown cards in a responsive 9×6 matrix (13×4 on desktop). */
.deck-zone .back-scroll {
  overflow-x: visible;
  overflow-y: visible;
  max-width: 100%;
  width: 100%;
  padding: 8px 2px 6px;
  overscroll-behavior-x: auto;
}
.deck-zone .back-grid {
  width: 100%;
  max-width: 100%;
  display: grid;
  grid-auto-flow: row;
  grid-template-columns: repeat(13, minmax(0,1fr));
  grid-template-rows: none;
  grid-auto-rows: auto;
  grid-auto-columns: auto;
  gap: 9px 8px;
  justify-items: stretch;
}
.deck-zone .back-card {
  width: 100%;
  height: auto;
  min-width: 0;
  min-height: 0;
  aspect-ratio: 0.68;
  padding: 2px;
  border: 2px solid #b99057;
  border-radius: 8px;
  touch-action: manipulation;
}
.deck-zone .back-card:not(:disabled):active{
  transform: translateY(-3px) scale(1.03);
}
.deck-zone .back-card .back-mark {
  font-size: clamp(16px, 2.1vw, 28px);
}
.deck-zone .back-card.used{
  background: #d6b991;
  opacity: .17;
}
/* Remove oversized beige picture framing. The black original card IS the viewer. */
.picture-dialog {
  width: min(96vw, 600px);
  max-width: min(96vw, 600px);
  max-height: 93svh;
  overflow: visible;
  padding: 0;
  margin: auto;
  border: none;
  background: transparent;
}
.picture-folio{
  height: auto;
  max-height: 93svh;
  width: 100%;
  padding: 0;
  aspect-ratio: 0.683;
  overflow: hidden;
  border: 2px solid #bf9859;
  border-radius: 22px;
  display: block;
  background: #171316;
  box-shadow:
    inset 0 0 0 2px #fce3ab,
    0 0 0 2px #5e442e,
    0 10px 35px #000a,
    0 25px 70px #0009;
}
.picture-folio img{
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  padding: 0;
  border: none;
  border-radius: 19px;
  filter: none;
  background: #151318;
}
.picture-close{
  top: 11px;
  right: 11px;
  width: 43px;
  height: 43px;
  z-index: 6;
  border: 1.5px solid #bd8c4d;
  background: linear-gradient(150deg,#ffeed0,#e6bb7b);
  box-shadow: 0 3px 10px #0009;
  color: #3b2520;
}
@media (min-width: 601px) and (max-width: 900px) {
  .deck-zone .back-grid {
    grid-template-columns: repeat(11,minmax(0,1fr));
    gap: 8px;
  }
}
@media (max-width: 600px) {
  .deck-zone .back-scroll {
    padding: 7px 1px 5px;
    overflow: visible;
  }
  .deck-zone .back-grid {
    grid-template-columns: repeat(9,minmax(0,1fr));
    gap: 5px 4px;
  }
  .deck-zone .back-card {
    border-width: 1.5px;
    padding: 1px;
    border-radius: 5px;
    aspect-ratio: .69;
    box-shadow:
       inset 0 0 0 2px #e1b66e,
       inset 0 0 0 3px #59412f,
       0 2px 3px #3f271d75;
  }
  .deck-zone .back-card .back-mark {
    font-size: clamp(14px, 4.3vw, 19px);
  }
  .deck-zone {
    padding: 15px 12px 19px;
  }
  .deck-zone .deck-hint {
    margin: 9px 0 13px;
  }
  .picture-dialog{
    width: 95.5vw;
    max-width: 95.5vw;
  }
  .picture-folio{
    width: 100%;
    max-height: 90svh;
    border-radius: 15px;
    border-width: 2px;
  }
  .picture-folio img {border-radius: 13px}
  .picture-close {
    top: 8px;
    right: 8px;
    width: 39px;
    height: 39px;
  }
}
@media(max-width:360px){
  .deck-zone .back-grid {gap:4px 3px}
  .deck-zone .back-card .back-mark{font-size:14px}
}
