/* Compact inline fortune card; the existing sidebar and drawer layout stay untouched. */
.csh-bag {
  --csh-bag-ink: #171f33;
  --csh-bag-wine: #721d35;
  --csh-bag-brass: #a56d38;
  position: relative;
  margin: clamp(14px, 2.4vw, 26px) 0 0;
  padding: clamp(13px, 2.2vw, 22px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(106px, 27%, 186px);
  grid-template-areas: "copy bag";
  gap: clamp(6px, 2.1vw, 20px);
  align-items: center;
  background: linear-gradient(132deg, #fcf8f2, #f8efe9);
  color: var(--csh-bag-ink);
  border: 1px solid #721d353d;
  border-radius: 17px;
  min-width: 0;
  box-sizing: border-box;
  /* Keep the anchor itself readable under the fixed theme header. */
  scroll-margin-top: 145px;
}
.csh-bag > .csh-bag-copy { grid-area: copy; min-width: 0; }
.csh-bag .csh-bag-copy > h2 {
  margin: 0 0 .28rem;
  color: var(--csh-bag-wine);
  font-size: clamp(1.42rem, 3.2vw, 2.3rem);
  line-height: 1.05;
  letter-spacing: -.025em;
  overflow-wrap: anywhere;
}
.csh-bag .csh-bag-intro { margin: 0 0 .63rem; font-size: .99rem; line-height: 1.34; }
.csh-bag .csh-bag-run, .csh-bag .csh-bag-picture {
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.csh-bag .csh-bag-run {
  border: 1px solid transparent;
  display: inline-flex;
  min-height: 39px;
  margin: 0;
  padding: .42rem .9rem;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-radius: 99px;
  background: var(--csh-bag-wine);
  color: #fffaf4;
  font-size: .91rem;
  font-weight: 700;
  line-height: 1.24;
  white-space: normal;
}
.csh-bag .csh-bag-run:hover { background: #57162a; color: #fff; }
.csh-bag .csh-bag-run:focus-visible, .csh-bag .csh-bag-picture:focus-visible {
  outline: 2px solid #245986;
  outline-offset: 3px;
}
.csh-bag .csh-bag-picture {
  grid-area: bag;
  width: 100%;
  display: grid;
  place-items: center;
  min-width: 0;
  aspect-ratio: 1;
  background: none;
  border: none;
  border-radius: 10px;
  padding: 0;
  margin: 0;
  position: relative;
  isolation: isolate;
}
.csh-bag .csh-bag-art {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  align-self: stretch;
  filter: drop-shadow(0 6px 6px #441c2d35);
  transform-origin: 50% 77%;
  transition: transform 170ms ease-out;
}
.csh-bag .csh-bag-picture:hover .csh-bag-art { transform: rotate(-1.5deg); }
.csh-bag .csh-bag-picture:active .csh-bag-art { transform: scale(.97); }
.csh-bag .csh-bag-picture .csh-item-flight {
  position: absolute;
  z-index: 1;
  top: 38%;
  left: 50%;
  display: grid;
  place-items: center;
  isolation: isolate;
  width: 1.2em;
  height: 1.2em;
  background: transparent;
  pointer-events: none;
  opacity: 0;
  transform-origin: center;
  font: 400 clamp(1.8rem, 5vw, 3.9rem)/1 "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
  filter: drop-shadow(0 3px 4px #46152738);
}
.csh-bag .csh-item-flight img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.csh-bag .csh-item-flight.csh-item-in-flight {
  animation: csh-bag-launch 550ms cubic-bezier(.15, .62, .2, 1) both;
}
.csh-bag .csh-item-flight[data-kind^="tarot-"] {
  width: 1.02em;
  height: 1.38em;
  padding: .2em .08em .06em;
  border: 3px double #d7ad6a;
  border-radius: .12em;
  color: #edce8f;
  background: #17213a;
  font-family: Georgia, serif;
  font-size: clamp(1.45rem, 4vw, 3.1rem);
}
.csh-bag .csh-item-flight[data-kind^="tarot-"]::before {
  content: "0";
  position: absolute;
  top: .22em;
  font: 700 .27em/1 Georgia, serif;
  letter-spacing: .12em;
}
.csh-bag .csh-item-flight[data-kind="tarot-death"]::before { content: "XIII"; }
.csh-bag .csh-bag-result { margin: .64rem 0 0; }
.csh-bag .csh-bag-result > .csh-item-name {
  display: block;
  margin: 0;
  color: var(--csh-bag-wine);
  font-size: 1.02rem;
  line-height: 1.28;
}
.csh-bag .csh-bag-result > .csh-item-name:empty { display: none; }
.csh-bag .csh-bag-result > .csh-item-text { margin: .19rem 0 0; font-size: .96rem; line-height: 1.36; }
.csh-bag .csh-bag-result[data-kind^="tarot-"] {
  padding-left: .55rem;
  border-left: 2px solid var(--csh-bag-brass);
}
.csh-bag .csh-bag-run:disabled, .csh-bag .csh-bag-picture:disabled { cursor: default; opacity: .7; }
@keyframes csh-bag-launch {
  0% { opacity: 0; transform: translate(-50%, 0) rotate(-17deg) scale(.5); }
  27% { opacity: 1; }
  77% { opacity: 1; transform: translate(-50%, -117%) rotate(9deg) scale(1.065); }
  100% { opacity: 1; transform: translate(-50%, -105%) rotate(5deg); }
}
@media (max-width: 540px) {
  .csh-bag { grid-template-columns: minmax(0, 1fr) clamp(78px, 28%, 120px); scroll-margin-top: 92px; }
  .csh-bag .csh-bag-copy > h2 { font-size: clamp(1.24rem, 5vw, 1.55rem); }
  .csh-bag .csh-bag-run { padding-inline: .62rem; }
}
@media (prefers-reduced-motion: reduce) {
  .csh-bag .csh-bag-art { transition: none; }
  .csh-bag .csh-item-flight.csh-item-in-flight {
    animation: none;
    opacity: 1;
    transform: translate(-50%, -97%) rotate(5deg);
  }
}
