/* casino/css/hush-market.css - THE GILT MARKET's sheet (casino/js/hush-market.js): Gilda's shop over the stage.
 *
 * The house's own tokens (casino/css/hush.css :root): the velvet, the gilt, the lamp gold, the bone. A sheet over the
 * whole page, above the drawers (z 40 and 45); landscape on every screen, so a phone held sideways gets a shorter
 * head, a scrolling row of tabs and smaller cards. Nothing here draws a look: every preview is a canvas painted by
 * casino/js/hush-themes.js. THE PREMIUM TILL (2026-10-08) is a sheet inside the panel, over the shelves.
 */
.hm-market {
  position: fixed; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center;
  padding: 18px; background: rgba(6, 3, 10, 0.72); backdrop-filter: blur(2px);
  font-family: var(--font); color: var(--parchment);
}
.hm-market[hidden] { display: none; }
.hm-panel {
  position: relative; width: min(1180px, 100%); height: min(760px, 100%); display: flex; flex-direction: column;
  border-radius: 18px; overflow: hidden;
  background:
    radial-gradient(ellipse at 50% -10%, rgba(255, 176, 96, 0.18), transparent 60%),
    linear-gradient(180deg, #3A1624 0%, #22101C 45%, #140A12 100%);
  border: 1px solid rgba(201, 162, 70, 0.75);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7), inset 0 0 0 4px rgba(20, 8, 16, 0.6), inset 0 0 0 5px rgba(201, 162, 70, 0.35);
}
.hm-market.is-busy .hm-grid { opacity: 0.7; pointer-events: none; }
/* only the shelves scroll: the head, the tabs and the fine print keep their size */
.hm-head, .hm-tabs, .hm-shut, .hm-fine { flex: 0 0 auto; }
.hm-grid, .hm-tabs { scrollbar-width: thin; scrollbar-color: rgba(201, 162, 70, 0.6) transparent; }

/* the head: the keeper (Gilda, or Tumbler while she is out), the name, the motto, who is in, the keeper's line, the purse
   and the way out. The portrait is taller than wide: every keeper's cut is 440 px tall. */
.hm-head { display: flex; align-items: flex-end; gap: 16px; padding: 14px 20px 10px; border-bottom: 1px solid rgba(201, 162, 70, 0.35); background: linear-gradient(180deg, rgba(20, 8, 16, 0.2), rgba(20, 8, 16, 0.55)); }
.hm-keeper { width: 116px; height: 150px; object-fit: contain; object-position: 50% 100%; flex: 0 0 116px; margin-bottom: -10px; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.6)); }
.hm-headwords { flex: 1 1 auto; min-width: 0; }
.hm-title { margin: 0; font-family: var(--title-font); font-size: 30px; letter-spacing: 0.12em; color: var(--gold); text-shadow: 0 2px 0 #2A0F1A, 0 0 18px rgba(245, 194, 66, 0.35); }
.hm-motto { margin: 2px 0 2px; font-family: var(--title-font); font-style: italic; font-size: 15px; color: var(--lamp-gold); }
.hm-behind { margin: 0 0 6px; font-size: 13px; letter-spacing: 0.04em; color: var(--muted); }
.hm-line { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 0; min-height: 34px; padding: 6px 12px; border-radius: 10px; background: rgba(12, 9, 20, 0.6); border: 1px solid rgba(201, 162, 70, 0.3); font-size: 14px; }
.hm-line-words { flex: 1 1 260px; }
.hm-line-words::before { content: attr(data-who) '  '; font-weight: bold; letter-spacing: 0.12em; color: var(--gilt); font-size: 13px; }
.hm-headright { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex: 0 0 auto; }
.hm-purse { margin: 0; padding: 6px 12px; border-radius: 999px; font-weight: bold; color: var(--gold); background: rgba(12, 9, 20, 0.7); border: 1px solid rgba(245, 194, 66, 0.55); white-space: nowrap; }
/* the currencies bar's own copy in the corner (casino/js/hush-purse-bar.js copy()): the strip carries its own frame */
.hm-purse--bar { padding: 0; border: 0; background: none; }

/* the tabs */
.hm-tabs { display: flex; gap: 6px; padding: 10px 20px 8px; overflow-x: auto; touch-action: pan-x; }
.hm-tab { flex: 0 0 auto; padding: 7px 12px; border-radius: 999px; border: 1px solid rgba(201, 162, 70, 0.45); background: rgba(12, 9, 20, 0.5); color: var(--bone); font: inherit; font-size: 13px; font-weight: bold; letter-spacing: 0.1em; cursor: pointer; }
.hm-tab:hover { border-color: var(--gold); color: var(--gold); }
.hm-tab.is-on { color: #1A0E08; background: linear-gradient(180deg, #FFE08A, var(--gold)); border-color: #FFE08A; }
.hm-shut { margin: 0 20px 8px; padding: 8px 12px; border-radius: 10px; color: #FFD7C2; background: rgba(140, 40, 40, 0.35); border: 1px solid rgba(255, 140, 120, 0.5); font-size: 13px; }

/* the shelves */
/* rows are as tall as their cards (a card clips its corners, so without max-content the rows would share the height) */
.hm-grid { flex: 1 1 auto; overflow-y: auto; touch-action: pan-y; overscroll-behavior: contain; display: grid; grid-auto-rows: max-content; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; padding: 6px 20px 16px; align-content: start; }
.hm-card { display: flex; flex-direction: column; border-radius: 14px; overflow: hidden; background: rgba(12, 9, 20, 0.62); border: 1px solid rgba(201, 162, 70, 0.3); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4); }
.hm-card.is-owned { border-color: rgba(127, 224, 214, 0.55); }
.hm-card.is-worn { border-color: var(--gold); box-shadow: 0 0 0 1px rgba(245, 194, 66, 0.4), 0 0 22px rgba(245, 194, 66, 0.22); }
.hm-card.is-money { background: linear-gradient(180deg, rgba(36, 26, 61, 0.75), rgba(12, 9, 20, 0.7)); border-color: rgba(201, 168, 245, 0.45); }
.hm-card.is-hidden { opacity: 0.8; border-style: dashed; }
/* a whole theme is a banner across the shelf: the scene on the left, its pieces and price on the right */
.hm-card--pack { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); grid-template-rows: 1fr auto; }
.hm-card--pack .hm-art { grid-row: 1 / span 2; align-self: start; }
.hm-card--pack .hm-meta { padding-top: 14px; }
.hm-art { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: #0B0814; }
.hm-art--small { width: 96px; height: 54px; border-radius: 6px; }
.hm-meta { padding: 10px 12px 4px; flex: 1 1 auto; }
.hm-set { margin: 0; font-size: 13px; letter-spacing: 0.16em; color: var(--lavender); }
.hm-name { margin: 2px 0 4px; font-family: var(--title-font); font-size: 18px; color: var(--parchment); }
.hm-desc { margin: 0 0 4px; font-size: 13px; line-height: 1.4; color: #E3D6C4; }
.hm-note { margin: 4px 0 0; font-size: 13px; color: var(--mint-teal); }
.hm-hidden { margin: 6px 0 0; font-size: 13px; font-weight: bold; letter-spacing: 0.08em; color: #FFB4A0; }
.hm-pieces { margin: 6px 0 2px; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px 12px; font-size: 13px; color: #D8CBB8; }
.hm-pieces li::before { content: '\25C7  '; color: var(--gilt); }
.hm-pieces li.is-owned { color: var(--mint-teal); }
.hm-pieces li.is-owned::before { content: '\2713  '; color: var(--mint-teal); }
.hm-foot, .hm-confirm { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 8px 12px 12px; }
.hm-confirm { background: rgba(245, 194, 66, 0.1); border-top: 1px solid rgba(245, 194, 66, 0.35); font-size: 13px; }
.hm-confirm span { flex: 1 1 100%; }
.hm-price { font-family: var(--title-font); font-weight: bold; font-size: 17px; color: var(--gold); margin-right: auto; }
.hm-price--money { color: var(--lavender); }
.hm-short { font-size: 13px; color: #FFB4A0; }
.hm-tag { margin-right: auto; padding: 3px 8px; border-radius: 6px; font-size: 13px; font-weight: bold; letter-spacing: 0.12em; }
.hm-tag--owned { color: #0E2420; background: var(--mint-teal); }
.hm-tag--trial { color: #241A3D; background: var(--lavender); }
.hm-tag--road { color: #2A1A08; background: linear-gradient(180deg, #FFE7A3, #E0A93A); }

/* buttons */
.hm-btn { padding: 7px 14px; border-radius: 9px; border: 1px solid rgba(201, 162, 70, 0.6); background: rgba(42, 15, 26, 0.9); color: var(--bone); font: inherit; font-size: 13px; font-weight: bold; letter-spacing: 0.12em; cursor: pointer; }
.hm-btn:hover { border-color: var(--gold); color: var(--gold); }
.hm-btn:focus-visible, .hm-tab:focus-visible, .hm-pick:focus-visible { outline: 2px solid var(--mint-teal); outline-offset: 2px; }
.hm-btn--gold { color: #1A0E08; background: linear-gradient(180deg, #FFE7A3, var(--gold) 60%, #B88A2A); border-color: #FFE08A; }
.hm-btn--gold:hover { color: #1A0E08; filter: brightness(1.08); }
.hm-btn--gold.is-dim { filter: grayscale(0.7) brightness(0.7); }
.hm-btn--soon { color: var(--lavender); border-color: rgba(201, 168, 245, 0.55); background: rgba(36, 26, 61, 0.8); }
.hm-btn--ghost { background: transparent; }
.hm-close { align-self: flex-end; }

/* THE PREMIUM TILL (2026-10-08): a sheet over the shelves with the look, the price, the terms and the box to tick; PAY
   sends the player to Stripe's own page */
.hm-btn--money { color: #170E26; background: linear-gradient(180deg, #E6D6FF, var(--lavender) 60%, #8C6CC8); border-color: #E6D6FF; }
.hm-btn--money:hover { color: #170E26; filter: brightness(1.08); }
.hm-btn:disabled { opacity: 0.45; cursor: not-allowed; filter: grayscale(0.6); }
.hm-till { position: absolute; inset: 0; z-index: 2; display: flex; align-items: flex-start; justify-content: center; overflow-y: auto; overscroll-behavior: contain; padding: 18px; background: rgba(8, 4, 12, 0.82); }
.hm-till[hidden] { display: none; }
.hm-till-card { width: min(560px, 100%); margin: auto 0; border-radius: 14px; overflow: hidden; background: linear-gradient(180deg, rgba(36, 26, 61, 0.96), rgba(16, 10, 24, 0.98)); border: 1px solid rgba(201, 168, 245, 0.6); box-shadow: 0 18px 50px rgba(0, 0, 0, 0.7); }
.hm-till-card > .hm-name, .hm-till-card > .hm-desc, .hm-till-card > p, .hm-till-card > ul, .hm-till-card > label { margin-left: 16px; margin-right: 16px; }
.hm-till-title { margin: 0; padding: 10px 16px; font-family: var(--title-font); font-size: 18px; letter-spacing: 0.14em; color: var(--lavender); background: rgba(12, 9, 20, 0.6); border-bottom: 1px solid rgba(201, 168, 245, 0.35); }
.hm-till-card .hm-name { margin-top: 10px; }
.hm-till-price { margin-top: 4px; margin-bottom: 6px; font-family: var(--title-font); font-weight: bold; font-size: 18px; color: var(--lavender); }
.hm-till-test { margin-top: 0; margin-bottom: 6px; padding: 6px 10px; border-radius: 8px; font-size: 13px; font-weight: bold; color: #241A3D; background: var(--mint-teal); }
.hm-till-terms { margin-top: 4px; margin-bottom: 8px; padding-left: 18px; font-size: 13px; line-height: 1.45; color: #E3D6C4; }
.hm-till-terms li { margin: 0 0 4px; }
.hm-till-agree { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 4px; padding: 8px 10px; border-radius: 10px; font-size: 13px; color: var(--parchment); background: rgba(12, 9, 20, 0.55); border: 1px solid rgba(201, 162, 70, 0.35); cursor: pointer; }
.hm-till-agree input { width: 20px; height: 20px; flex: 0 0 20px; margin: 0; accent-color: var(--gold); }

/* what you wear */
.hm-grid--wardrobe { grid-template-columns: 1fr; }
.hm-slot { display: grid; grid-template-columns: 240px 1fr; gap: 14px; align-items: center; padding: 10px 12px; border-radius: 12px; background: rgba(12, 9, 20, 0.55); border: 1px solid rgba(201, 162, 70, 0.25); }
.hm-slot-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.hm-pick { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px; border-radius: 10px; border: 1px solid rgba(201, 162, 70, 0.35); background: rgba(20, 8, 16, 0.6); color: var(--bone); font: inherit; font-size: 13px; cursor: pointer; min-width: 96px; min-height: 44px; justify-content: center; }
.hm-pick.is-on { border-color: var(--gold); box-shadow: 0 0 0 1px rgba(245, 194, 66, 0.5); color: var(--gold); }
.hm-empty { margin: 12px 0; font-style: italic; color: var(--muted); }
.hm-fine { margin: 0; padding: 8px 20px 12px; font-size: 13px; color: var(--muted); border-top: 1px solid rgba(201, 162, 70, 0.2); }

/* a phone held sideways: a shorter head, smaller cards, the whole sheet */
@media (max-height: 520px) {
  .hm-market { padding: 6px; }
  .hm-panel { border-radius: 12px; }
  .hm-head { padding: 6px 12px 6px; gap: 10px; align-items: center; }
  .hm-keeper { width: 46px; height: 60px; flex-basis: 46px; margin-bottom: 0; }
  .hm-behind { display: none; }
  .hm-title { font-size: 17px; display: inline; }
  .hm-motto { display: inline; margin: 0 0 0 10px; font-size: 13px; }
  .hm-line { font-size: 13px; min-height: 0; padding: 3px 8px; margin-top: 4px; }
  .hm-line-words { flex-basis: 200px; }
  .hm-line .hm-btn { padding: 6px 10px; }
  .hm-headright { flex-direction: row; align-items: center; }
  .hm-purse { font-size: 13px; padding: 5px 10px; }
  .hm-close { align-self: center; }
  .hm-tabs { padding: 5px 12px; }
  .hm-tab { padding: 7px 10px; font-size: 13px; }
  .hm-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; padding: 4px 12px 10px; }
  .hm-card--pack { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
  .hm-pieces { grid-template-columns: 1fr; }
  .hm-name { font-size: 15px; }
  .hm-desc { font-size: 13px; }
  .hm-slot { grid-template-columns: 1fr; }
  .hm-fine { padding: 4px 12px 5px; font-size: 13px; }
  .hm-btn { padding: 9px 12px; }
  .hm-till { padding: 6px; }
  .hm-till-card .hm-art { display: none; }
  .hm-till-terms { font-size: 13px; }
}
/* SILK'S STASH (2026-10-12): the same sheet in the Thieves' Guild's colours, the cellar's lamp green on soot black, and
   the price in Fame (or Notoriety) in the lamp's green */
/* THE EPIC SET in Silk's Stash (hush-wares.js `epic`, The Black Flag): a gilt edge and a slow glint, the one to work for */
.hm-card--pack.is-epic { border-color: rgba(245, 194, 66, 0.85); box-shadow: 0 0 0 1px rgba(245, 194, 66, 0.35), 0 0 22px rgba(245, 194, 66, 0.22); }
.hm-card--pack.is-epic .hm-set { color: #F5C242; font-weight: bold; }
@media (prefers-reduced-motion: no-preference) {
  .hm-card--pack.is-epic { animation: hm-epic 3.2s ease-in-out infinite; }
  @keyframes hm-epic { 50% { box-shadow: 0 0 0 1px rgba(245, 194, 66, 0.55), 0 0 30px rgba(245, 194, 66, 0.38); } }
}
.hm-market--stash .hm-panel {
  background:
    radial-gradient(ellipse at 50% -10%, rgba(168, 224, 95, 0.16), transparent 60%),
    linear-gradient(180deg, #17201A 0%, #101611 45%, #0A0D0B 100%);
  border-color: rgba(168, 224, 95, 0.65);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7), inset 0 0 0 4px rgba(8, 12, 9, 0.6), inset 0 0 0 5px rgba(168, 224, 95, 0.3);
}
.hm-market--stash .hm-head { border-bottom-color: rgba(168, 224, 95, 0.35); background: linear-gradient(180deg, rgba(8, 12, 9, 0.2), rgba(8, 12, 9, 0.6)); }
.hm-market--stash .hm-title { color: #C8F08A; text-shadow: 0 2px 0 #0B140C, 0 0 18px rgba(168, 224, 95, 0.35); }
.hm-market--stash .hm-motto { color: #E8D9FF; }
.hm-market--stash .hm-line { border-color: rgba(168, 224, 95, 0.35); }
.hm-market--stash .hm-line-words::before { color: #A8E05F; }
.hm-market--stash .hm-tab { border-color: rgba(168, 224, 95, 0.45); }
.hm-market--stash .hm-tab:hover { border-color: #A8E05F; color: #C8F08A; }
.hm-market--stash .hm-tab.is-on { color: #0B140C; background: linear-gradient(180deg, #D8F7A8, #A8E05F); border-color: #D8F7A8; }
.hm-market--stash .hm-card { border-color: rgba(168, 224, 95, 0.28); }
.hm-market--stash .hm-price { color: #C8F08A; }

@media (max-width: 560px) { .hm-card--pack { grid-template-columns: 1fr; } .hm-card--pack .hm-art { grid-row: auto; } }
@media (prefers-reduced-motion: reduce) { .hm-market { backdrop-filter: none; } }
