/* Blackjack layout v3 (2026-10-17): calm felt table that matches the muqing.ai homepage tile.
   Loaded after index-rules-v2.css and only overrides it (the Vue bundle has no source).
   Rows: top row (mq logo home link · bank · 中文/EN), dealer, felt print + status, player, action dock. */
:root {
  --ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --ui-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  --ink: #161718;
  --paper: #f5f5f7;
  --dim: rgba(245, 245, 247, .62);
  --line: rgba(245, 245, 247, .34);
  --felt: radial-gradient(120% 90% at 50% 44%, #00467f 0%, #02335f 36%, #041b35 68%, #02070f 100%);
  --top: calc(56px + env(safe-area-inset-top, 0px));
  /* one rem drives every card size: fit the width on phones, the height on laptops */
  font-size: clamp(8px, min(3.2vw, calc((100vh - 160px) / 45)), 20px);
  font-size: clamp(8px, min(3.2vw, calc((100dvh - 160px) / 45)), 20px);
}
body { background: var(--felt) fixed, #02070f; }
.animated-bg[data-v-2a47cc21] { display: none; }

/* ---------- Table grid ---------- */
main[data-v-6d2ceb70] {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: var(--top) auto minmax(4.5rem, 1fr) auto minmax(.5rem, .5fr) auto;
  grid-template-areas: "." "dealer" "felt" "you" "." "dock";
  justify-items: center;
  align-items: center;
  gap: 0;
  height: 100%;
  padding: 0 16px calc(14px + env(safe-area-inset-bottom, 0px));
}
section.player[data-v-6d2ceb70] { gap: 2.5rem; flex-wrap: nowrap; }
section.player.dealer[data-v-6d2ceb70] { grid-area: dealer; z-index: 0; padding-top: 3rem; }
section.player[data-v-6d2ceb70]:not(.dealer) { grid-area: you; flex-grow: 0; padding: 3.6rem 0 5rem; transition: scale .3s ease; }
@media (max-width: 700px) {
  section.player[data-v-6d2ceb70]:not(.dealer):has(> .hand:nth-child(2)) { scale: .78; }
  section.player[data-v-6d2ceb70]:not(.dealer):has(> .hand:nth-child(3)) { scale: .6; }
  section.player[data-v-6d2ceb70]:not(.dealer):has(> .hand:nth-child(4)) { scale: .48; }
}

/* ---------- Felt print + status line ---------- */
.felt { grid-area: felt; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .55rem; text-align: center; pointer-events: none; font-family: var(--ui); }
.felt p { margin: 0; }
.felt-print { font-size: clamp(10px, 1.1rem, 14px); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: rgba(245, 245, 247, .26); }
@media (max-width: 480px) { .felt-print { font-size: 10px; letter-spacing: .03em; } }
.status { min-height: 1.3em; font-size: clamp(15px, 1.6rem, 21px); font-weight: 600; letter-spacing: -.01em; color: var(--paper); }

/* ---------- Hands ---------- */
.hand[data-v-786162dc] { flex-wrap: nowrap; gap: 0; max-width: none; }
.hand[data-v-786162dc] > .card + .card { margin-left: -2.5rem; }
.hand[data-v-786162dc]:has(> .card:nth-child(6)) > .card + .card { margin-left: -4.5rem; }
.active-hand[data-v-786162dc] { scale: 1.1; }
.hand[data-v-786162dc] > h2.sr-only {
  position: absolute; top: -2.7rem; left: 0; width: auto; height: auto; margin: 0; clip: auto; overflow: visible;
  font: 500 clamp(12px, 1.25rem, 16px)/1 var(--ui); letter-spacing: 0; color: var(--dim);
}
section.player .hand[data-v-786162dc]:not(:first-child) > h2.sr-only { width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
.hand[data-v-786162dc]:not(:has(> .card)) > h2.sr-only { opacity: 0; }

/* hand total: white pill (bust red, 21 gold), no glow */
.hand-total[data-v-857e8d47] {
  --background-color: var(--paper);
  top: -3rem; right: 0; width: auto; height: auto; min-width: 2.4em; padding: .3em .65em;
  font: 600 clamp(12px, 1.3rem, 17px)/1.1 var(--ui); letter-spacing: 0; font-variation-settings: normal;
  border-radius: 980px; color: var(--ink);
}
.bust[data-v-857e8d47] { --background-color: #f33; color: #fff; }
.twenty-one[data-v-857e8d47] { --background-color: #ffd900; color: var(--ink); }
.bust[data-v-857e8d47], .twenty-one[data-v-857e8d47] { filter: none; }
.pop-enter-from[data-v-857e8d47], .pop-leave-to[data-v-857e8d47] { scale: .6; rotate: 0deg; opacity: 0; }

/* cards: same faces, system-font ranks, soft lift off the felt */
.card .card-rank { font-family: var(--ui); font-weight: 600; letter-spacing: -.06em; }
.card-corner[data-v-0d95ef50] { font-size: 1.95rem; }
.card-face[data-v-0d95ef50], .card-back[data-v-0d95ef50] { box-shadow: 0 .3rem 1rem rgba(0, 0, 0, .32); }

/* ---------- Top row left: only the homepage mq logo (the shared muqing.ai bar is hidden here) ---------- */
mc-back-pill { display: none !important; }
.home-logo {
  position: fixed; top: calc(12px + env(safe-area-inset-top, 0px)); left: 12px; z-index: 20;
  display: grid; place-items: center; height: 34px; padding: 0 6px; border-radius: 980px; transition: opacity .2s ease;
}
.home-logo img { display: block; width: 34px; height: auto; }
@media (hover: hover) { .home-logo:hover { opacity: .75; } }
.home-logo:focus-visible { outline: 2px solid var(--paper); outline-offset: 2px; }

/* ---------- Bank: centre of the reserved top row ---------- */
.bank[data-v-1a97959f] {
  position: fixed; top: calc(12px + env(safe-area-inset-top, 0px)); left: 50%; translate: -50% 0; z-index: 20;
  height: 34px; padding: 0 13px 0 6px; gap: 6px; border-radius: 980px;
  background: rgba(0, 0, 0, .28); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  font: 600 16px/1 var(--ui); font-variation-settings: normal; color: #ffd900;
}
.bank.is-increasing[data-v-1a97959f] { background: rgba(0, 0, 0, .45); }
#app:has(.title-screen) .bank[data-v-1a97959f] { opacity: 0; }
.bank .times[data-v-1a97959f] { display: none; }
.bank .chip[data-v-1a97959f] { height: 22px; }

/* ---------- Action dock ---------- */
[role=toolbar][data-v-6a794258] {
  grid-area: dock; display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  width: min(100%, 420px); margin: 0; font-family: var(--ui);
}
[role=toolbar][data-v-6a794258] .side-actions { min-height: 36px; gap: 8px; flex-wrap: wrap; }
[role=toolbar][data-v-6a794258] button {
  height: 50px; padding: 0 22px; border-radius: 980px;
  font: 600 17px/1 var(--ui); letter-spacing: -.01em; text-transform: none; font-variation-settings: normal;
  background: transparent; color: var(--paper); box-shadow: inset 0 0 0 1px var(--line); transform: none;
  transition: background-color .2s ease, opacity .2s ease;
}
[role=toolbar][data-v-6a794258] > button:last-child { background: var(--paper); color: var(--ink); box-shadow: none; }
@media (hover: hover) {
  [role=toolbar][data-v-6a794258] button:hover:not(:disabled) { background: rgba(245, 245, 247, .12); transform: none; }
  [role=toolbar][data-v-6a794258] > button:last-child:hover:not(:disabled) { background: #fff; }
}
[role=toolbar][data-v-6a794258] button:active:not(:disabled) { transform: scale(.98); }
[role=toolbar][data-v-6a794258] button:disabled { opacity: .35; }
[role=toolbar][data-v-6a794258] .side-actions button { height: 36px; padding: 0 16px; font-size: 15px; font-weight: 500; border-radius: 980px; }
[role=toolbar][data-v-6a794258] .side-actions button:disabled { display: none; }
.insurance span[data-v-6a794258] { font: 600 15px/1 var(--ui); font-variation-settings: normal; text-transform: none; letter-spacing: 0; color: var(--paper); }

/* ---------- Title / game-over screen: like the homepage tile ---------- */
.title-screen[data-v-b21ebabc] { background: var(--felt), #02070f; gap: 0; padding: var(--top) 16px 24px; }
.title-screen > svg[data-v-b21ebabc] { display: none; }
h1[data-v-b21ebabc] { font: 600 clamp(40px, 8vw, 80px)/1.05 var(--ui-display); letter-spacing: -.03em; text-transform: none; font-variation-settings: normal; color: var(--paper); }
.title-screen h1 > span { color: inherit; }
p[data-v-b21ebabc] { margin-top: 10px; font: 400 clamp(19px, 2.4vw, 28px)/1.3 var(--ui); letter-spacing: -.01em; text-transform: none; color: #a1a1a6; }
button[data-v-b21ebabc] {
  margin-top: 26px; padding: 12px 26px; border-radius: 980px;
  font: 500 17px/1 var(--ui); letter-spacing: -.01em; text-transform: none; font-variation-settings: normal;
  background: var(--paper); color: var(--ink);
}
@media (hover: hover) { button[data-v-b21ebabc]:hover:not(:disabled) { background: #fff; transform: none; } }
.progress-container[data-v-b21ebabc] { margin-top: 26px; height: 41px; }
progress[data-v-b21ebabc] { width: min(220px, 60vw); height: 4px; border-radius: 2px; opacity: 1; background-color: rgba(245, 245, 247, .18); }
progress[data-v-b21ebabc]::-webkit-progress-bar { background-color: rgba(245, 245, 247, .18); }
progress[data-v-b21ebabc]::-webkit-progress-value { background-color: var(--paper); }
progress[data-v-b21ebabc]::-moz-progress-bar { background-color: var(--paper); }
.title-screen[data-v-b21ebabc]::after {
  content: ""; position: relative; display: block; flex: none; margin-top: 8px;
  width: min(92vw, 680px, 60vh * 1.6); aspect-ratio: 16 / 10;
  background: url(/assets/shots/blackjack.svg?v=1) center / contain no-repeat;
}
