/* Solitaire (static/js/games/solitaire.js): a dark modern space table seen from above (.sot-*: a nebula, deep space,
   an aurora, a red planet, the Milky Way), the stock and the waste, the four foundations, the seven columns; the cards
   drawn by the js, their fronts (.sof-*) and backs (.sob-*) in the style chosen. Each player may choose all three. */

/* ---------- the tables: the sky and its light ---------- */
.sot-nebula { --sky: radial-gradient(ellipse 55% 60% at 18% 28%, rgba(150,70,255,.42), transparent 70%), radial-gradient(ellipse 50% 55% at 82% 72%, rgba(40,110,255,.38), transparent 70%),
    radial-gradient(ellipse 40% 35% at 62% 18%, rgba(255,60,170,.22), transparent 70%), linear-gradient(160deg, #0b0a24, #05060f);
  --edge: rgba(170,130,255,.5); --glow: rgba(140,90,255,.35); --slot: rgba(200,180,255,.32); --ink: rgba(225,215,255,.8); }
.sot-deep { --sky: radial-gradient(ellipse 70% 60% at 50% 45%, rgba(40,70,160,.28), transparent 75%), linear-gradient(170deg, #070a18, #020308);
  --edge: rgba(120,160,255,.4); --glow: rgba(80,120,255,.25); --slot: rgba(170,195,255,.28); --ink: rgba(205,220,255,.8); }
.sot-aurora { --sky: radial-gradient(ellipse 80% 26% at 32% 20%, rgba(40,255,180,.26), transparent 72%), radial-gradient(ellipse 70% 24% at 70% 34%, rgba(70,160,255,.24), transparent 72%),
    radial-gradient(ellipse 50% 18% at 50% 8%, rgba(190,90,255,.2), transparent 72%), linear-gradient(175deg, #041019, #03060c);
  --edge: rgba(80,255,190,.42); --glow: rgba(40,220,170,.28); --slot: rgba(150,255,215,.3); --ink: rgba(200,255,235,.8); }
.sot-mars { --sky: radial-gradient(ellipse 110% 55% at 50% 118%, rgba(255,100,40,.55), rgba(140,30,20,.32) 45%, transparent 72%), radial-gradient(ellipse 40% 30% at 85% 15%, rgba(255,160,90,.12), transparent 70%),
    linear-gradient(180deg, #0a060c, #120608);
  --edge: rgba(255,130,80,.45); --glow: rgba(255,90,40,.3); --slot: rgba(255,190,160,.3); --ink: rgba(255,220,200,.8); }
.sot-galaxy { --sky: linear-gradient(118deg, transparent 28%, rgba(170,160,255,.12) 40%, rgba(255,225,200,.22) 48%, rgba(255,240,220,.28) 50%, rgba(170,160,255,.14) 58%, transparent 72%),
    radial-gradient(ellipse 30% 22% at 50% 50%, rgba(255,220,180,.18), transparent 70%), linear-gradient(160deg, #080918, #03040a);
  --edge: rgba(255,225,180,.42); --glow: rgba(255,210,150,.22); --slot: rgba(255,235,210,.3); --ink: rgba(255,240,220,.8); }
/* the stars: three layers of small lights, some twinkling */
.so-felt, .so-lk { --stars:
    radial-gradient(1px 1px at 12% 22%, #fff, transparent), radial-gradient(1px 1px at 37% 64%, rgba(255,255,255,.85), transparent),
    radial-gradient(1.5px 1.5px at 71% 31%, #fff, transparent), radial-gradient(1px 1px at 88% 79%, rgba(255,255,255,.8), transparent),
    radial-gradient(1px 1px at 54% 12%, rgba(255,255,255,.7), transparent), radial-gradient(1.2px 1.2px at 23% 86%, #fff, transparent); }

/* ---------- the page: the table on one screen, nothing scrolls; the whole width ---------- */
html:has(body.game-solitaire[data-page="table"]) { overflow: hidden; }
body.game-solitaire[data-page="table"] .site-foot { display: none; }
body.game-solitaire[data-page="table"] .chat-fab { display: none !important; }
body.game-solitaire[data-page="table"] #table.page { max-width: none; height: calc(100dvh - var(--top)); box-sizing: border-box; overflow: hidden; padding: 10px 14px; }
body.game-fs .so-wrap { height: 100%; }
.so-wrap { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; gap: 8px; height: 100%; width: 100%; }

/* ---------- the bar above the table ---------- */
.so-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; padding: 6px 8px 6px 14px; border-radius: 16px;
  background: linear-gradient(160deg, rgba(22,20,52,.92), rgba(8,8,22,.94)); border: 1px solid rgba(255,255,255,.12); box-shadow: 0 10px 22px -14px rgba(0,0,0,.9); }
.so-info { min-width: 0; font-size: 12.5px; font-weight: 800; color: rgba(255,255,255,.75); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.so-tools { flex: none; display: flex; align-items: center; gap: 6px; }
.so-tool { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; padding: 0; border-radius: 12px; cursor: pointer;
  color: #f1ecff; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.16); }
.so-tool:hover { border-color: rgba(160,140,255,.7); }
.so-tool svg.i { width: 17px; height: 17px; }
.so-tool.hidden { display: none; }
.so-tool.so-leave:hover { border-color: rgba(255,90,78,.6); color: #ffb3ab; }
.so-mute .tv-snd-off { display: none; }
body.tv-muted .so-mute .tv-snd-off { display: inline; } body.tv-muted .so-mute .tv-snd-on { display: none; }

/* ---------- the table: the sky, a thin line of light round it ---------- */
.so-felt { position: relative; min-height: 0; border-radius: 22px; isolation: isolate; overflow: hidden; background: radial-gradient(ellipse 75% 70% at 50% 45%, transparent 55%, rgba(0,0,0,.55)), var(--sky);
  box-shadow: inset 0 0 0 1px var(--edge), inset 0 0 120px rgba(0,0,0,.75), inset 0 -40px 80px -30px rgba(0,0,0,.7), 0 0 34px -8px var(--glow), 0 26px 50px -18px rgba(0,0,0,.95); }
.so-felt::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: var(--stars); background-size: 230px 230px; opacity: .9; }
.so-felt::after { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: var(--stars); background-size: 140px 140px; background-position: 40px 70px;
  opacity: .45; animation: soTwinkle 4.5s ease-in-out infinite alternate; }
@keyframes soTwinkle { to { opacity: .9; } }
.so-felt > .so-banner { position: absolute; left: 50%; top: 40%; z-index: 600; transform: translateX(-50%); width: max-content; max-width: min(90%, 520px); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.so-felt > .so-banner.blank { display: none; }
.so-board { position: absolute; left: 18px; right: 18px; top: 16px; bottom: 14px; z-index: 2; touch-action: none; user-select: none; -webkit-user-select: none; }

/* the places: the stock (a ring: turn the waste over), the waste, the foundations (an A), the columns */
.so-slot { position: absolute; left: 0; top: 0; width: var(--cw); height: calc(var(--cw) * 1.41); border-radius: calc(var(--cw) * .11); box-sizing: border-box;
  border: 1.5px solid var(--slot); background: rgba(255,255,255,.03); box-shadow: inset 0 0 14px rgba(0,0,0,.35); display: grid; place-items: center; color: var(--slot);
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); }
.so-slot.f b { font: 800 calc(var(--cw) * .42) / 1 'Inter', system-ui, sans-serif; opacity: .8; }
.so-slot.s { cursor: pointer; }
.so-slot.s svg { width: 46%; height: 46%; stroke: var(--ink); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: .85; }
.so-slot.s.none svg { opacity: .25; } .so-slot.s.none { cursor: default; }
.so-slot.t { border-style: dashed; border-color: rgba(255,255,255,.1); background: transparent; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }

/* ---------- a card (front or back), placed on the table by the js ---------- */
.scard { position: relative; flex: none; width: var(--cw, 72px); height: calc(var(--cw, 72px) * 1.41); border-radius: calc(var(--cw, 72px) * .11); box-sizing: border-box;
  overflow: hidden; font-family: 'Inter', system-ui, sans-serif; background: var(--cb); color: var(--ck); border: 1px solid var(--cl);
  box-shadow: 0 4px 10px -3px rgba(0,0,0,.65), inset 0 1px 0 rgba(255,255,255,.12); }
.scard .sg { display: block; fill: currentColor; }
.scard .ix { position: absolute; left: 7%; top: 3.5%; display: flex; flex-direction: column; align-items: center; line-height: .9; }
.scard .ix b { font-size: calc(var(--cw, 72px) * .27); font-weight: 800; letter-spacing: -.04em; }
.scard .ix .sg { width: calc(var(--cw, 72px) * .19); height: calc(var(--cw, 72px) * .19); margin-top: 2px; }
.scard .ix.br { left: auto; top: auto; right: 7%; bottom: 3.5%; transform: rotate(180deg); opacity: .55; }
.scard .mid { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; }
.scard .mid.num { padding-top: 14%; gap: 2px; }
.scard .mid.num b { font-size: calc(var(--cw, 72px) * .44); font-weight: 800; line-height: .9; letter-spacing: -.05em; }
.scard .mid.num .sg { width: calc(var(--cw, 72px) * .3); height: calc(var(--cw, 72px) * .3); }
.scard .mid.ace .sg { width: calc(var(--cw, 72px) * .62); height: calc(var(--cw, 72px) * .62); margin-top: 12%; }
.scard .mid.court { padding-top: 12%; }
.scard .mid.court .emb { width: calc(var(--cw, 72px) * .34); height: calc(var(--cw, 72px) * .34); fill: currentColor; opacity: .9; }
.scard .mid.court b { font-size: calc(var(--cw, 72px) * .5); font-weight: 900; line-height: .9; letter-spacing: -.04em; }

/* the fronts: light, never plain white — pearl, warm ivory, silver frost, white with a holographic edge; black and red
   as on any deck; a soft shadow under each card and a fine shine on it */
.scard:not(.back) { --red: #c8102e; --blk: #161a33; }
.scard.s-h, .scard.s-d { color: var(--red); } .scard.s-s, .scard.s-c { color: var(--blk); }
.sof-pearl { --cb: radial-gradient(ellipse 90% 60% at 30% 10%, #ffffff, rgba(255,255,255,0) 70%), linear-gradient(165deg, #fbfbff, #eceef7 60%, #e2e5f1); --cl: rgba(30,35,80,.16); }
.sof-ivory { --cb: radial-gradient(ellipse 90% 60% at 30% 10%, #fffdf6, rgba(255,253,246,0) 70%), linear-gradient(165deg, #fdf8ec, #f2e9d6 62%, #e8dcc2); --cl: rgba(90,70,30,.2); }
.sof-silver { --cb: linear-gradient(120deg, rgba(255,255,255,.75) 0 18%, transparent 30%), linear-gradient(165deg, #f6f8fc, #e1e6f0 58%, #cfd6e4); --cl: rgba(40,55,90,.22); }
.sof-holo { --cb: linear-gradient(165deg, #ffffff, #eff1f8 65%, #e6e8f3); --cl: transparent; }
.sof-holo .scard:not(.back) { border: 2px solid transparent;
  background: var(--cb) padding-box, conic-gradient(from 210deg, #ff9de2, #9de0ff, #b8ffcf, #ffe9a0, #d2b0ff, #ff9de2) border-box; }
.scard:not(.back) { box-shadow: 0 6px 14px -4px rgba(0,0,0,.75), 0 1px 3px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.9), inset 0 -2px 6px rgba(20,25,60,.06); }
.scard:not(.back)::after { content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(125deg, rgba(255,255,255,.55), rgba(255,255,255,0) 32%); mix-blend-mode: soft-light; }
.scard .ix b, .scard .mid b { font-family: 'Inter', system-ui, sans-serif; }
.scard .mid.ace .sg { filter: drop-shadow(0 calc(var(--cw, 72px) * .03) calc(var(--cw, 72px) * .05) rgba(0,0,0,.28)); }
.scard .mid.num .sg, .scard .ix .sg { filter: drop-shadow(0 1px 1px rgba(0,0,0,.18)); }
/* the court cards: a fine frame in their colour round the emblem and the letter */
.scard .mid.court::before { content: ''; position: absolute; inset: 20% 18% 14%; border-radius: calc(var(--cw, 72px) * .06);
  border: 1.5px solid currentColor; opacity: .28; background: radial-gradient(ellipse at 50% 30%, rgba(255,255,255,.6), transparent 70%); }
.scard .mid.court .cs { position: absolute; right: 24%; bottom: 18%; width: calc(var(--cw, 72px) * .16); height: calc(var(--cw, 72px) * .16); }

/* the backs */
/* (a closed card: dark space in a dark violet edge, a faint glowing frame — clearly not one of the light fronts) */
.scard.back { border: 1.5px solid rgba(150,125,255,.55); box-shadow: 0 6px 14px -4px rgba(0,0,0,.8), 0 0 0 1px rgba(0,0,0,.5), inset 0 0 calc(var(--cw, 72px) * .25) rgba(0,0,0,.55); }
.scard.back i { position: absolute; inset: 7%; border-radius: calc(var(--cw, 72px) * .07); border: 1px solid rgba(190,170,255,.4);
  box-shadow: 0 0 6px rgba(150,120,255,.35), inset 0 0 6px rgba(150,120,255,.25); }
.sob-galaxy .scard.back { background: radial-gradient(circle at 50% 50%, #fff 0 2%, rgba(255,225,255,.85) 4%, transparent 11%),
    conic-gradient(from 20deg at 50% 50%, transparent, rgba(180,100,255,.55) 8%, transparent 22%, rgba(80,150,255,.45) 33%, transparent 47%, rgba(255,100,200,.5) 58%, transparent 72%, rgba(120,120,255,.45) 83%, transparent),
    radial-gradient(1px 1px at 20% 25%, #fff, transparent), radial-gradient(1px 1px at 75% 70%, #fff, transparent), radial-gradient(1px 1px at 65% 20%, #fff, transparent),
    radial-gradient(circle, #2c1b62, #090820 72%); }
.sob-nebula .scard.back { background: radial-gradient(ellipse at 30% 32%, rgba(255,80,180,.65), transparent 48%), radial-gradient(ellipse at 70% 70%, rgba(80,140,255,.65), transparent 52%),
    radial-gradient(1px 1px at 18% 70%, #fff, transparent), radial-gradient(1px 1px at 82% 22%, #fff, transparent), radial-gradient(1.4px 1.4px at 55% 48%, #fff, transparent), #0b0a22; }
.sob-orbit .scard.back { background: radial-gradient(circle at 68% 30%, #ffc56a 0 7%, #ff7a3d 9%, transparent 10%),
    repeating-radial-gradient(ellipse 60% 40% at 50% 55%, transparent 0 8%, rgba(120,200,255,.4) 8.5%, transparent 9.5%),
    radial-gradient(1px 1px at 22% 18%, #fff, transparent), radial-gradient(1px 1px at 80% 80%, #fff, transparent), linear-gradient(160deg, #0b1838, #050a1c); }
.sob-synth .scard.back { background: radial-gradient(circle at 50% 46%, #ffd34d 0 13%, #ff4fa0 17%, transparent 18%),
    repeating-linear-gradient(90deg, rgba(255,80,220,.55) 0 1px, transparent 1px 10%) bottom / 100% 40% no-repeat,
    repeating-linear-gradient(0deg, rgba(255,80,220,.55) 0 1px, transparent 1px 12%) bottom / 100% 40% no-repeat, linear-gradient(#140a33, #2c0b40 60%, #12051f); }

/* ---------- the cards on the table: placed by the js (transform), moving smoothly ---------- */
.so-board .sc { position: absolute; left: 0; top: 0; margin: 0; cursor: default; will-change: transform;
  transition: transform calc(.26s * var(--spd, 1)) cubic-bezier(.25,.8,.3,1), box-shadow .2s; }
.so-board .sc.up { cursor: grab; }
.so-board .sc.drag { transition: none; cursor: grabbing; box-shadow: 0 18px 26px -8px rgba(0,0,0,.8), 0 0 18px var(--glow, rgba(140,90,255,.35)); }
.so-board .sc.stk { cursor: pointer; overflow: visible; }
.so-board .sc { transition: transform calc(.26s * var(--spd, 1)) cubic-bezier(.25,.8,.3,1), translate .15s, box-shadow .2s; }
.so-board .sc.picked { translate: 0 -6px; box-shadow: 0 0 0 2px #ffd866, 0 0 18px rgba(255,216,102,.75), 0 12px 20px -6px rgba(0,0,0,.8) !important; }
.so-board .sc.nope { animation: soNope .32s ease; }
@keyframes soNope { 25% { margin-left: -5px; } 50% { margin-left: 5px; } 75% { margin-left: -3px; } }
/* a card turned face up: the turn itself is played from the page, round the card's own middle, right where it lies;
   here only its back, showing for the first half */
.scard .scard.fb { position: absolute; inset: -1.5px; width: auto; height: auto; z-index: 5; border-radius: inherit; animation: soFb calc(.48s * var(--spd, 1)) linear both; }
@keyframes soFb { 0%, 49.9% { opacity: 1; } 50%, 100% { opacity: 0; } }
/* the stock's count */
.so-board .sc.stk::after { content: attr(data-n); position: absolute; right: -6px; bottom: -8px; min-width: 22px; height: 20px; padding: 0 6px; box-sizing: border-box; border-radius: 10px;
  display: grid; place-items: center; font: 800 11px/1 'Inter', system-ui, sans-serif; color: #120b2e; background: linear-gradient(160deg, #c9b8ff, #8f7bff); box-shadow: 0 2px 8px rgba(0,0,0,.5); z-index: 2; }
.so-board .sc.stk[data-n=""]::after { display: none; }
/* the drop places light up while a card is dragged */
.so-drop { position: absolute; left: 0; top: 0; border-radius: calc(var(--cw) * .12); pointer-events: none; z-index: 1;
  box-shadow: 0 0 0 2px rgba(255,255,255,.7), 0 0 18px rgba(255,255,255,.3); opacity: 0; transition: opacity .15s; }
.so-drop.on { opacity: 1; }

/* ---------- the bar under the table: the time, the moves, undo, finish ---------- */
.so-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px 8px 16px; border-radius: 16px;
  background: linear-gradient(160deg, rgba(22,20,52,.92), rgba(8,8,22,.94)); border: 1px solid rgba(255,255,255,.12); }
.so-stats { display: flex; gap: 18px; min-width: 0; }
.so-stats span { display: grid; line-height: 1.1; }
.so-stats small { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: rgba(255,255,255,.55); }
.so-stats b { font: 900 17px/1.2 'Inter', system-ui, sans-serif; color: #fff; font-variant-numeric: tabular-nums; }
.so-acts { display: flex; gap: 8px; flex: none; }
.so-btn { position: relative; display: inline-flex; align-items: center; gap: 7px; height: 42px; padding: 0 16px 0 12px; border-radius: 13px; cursor: pointer;
  font: 800 13.5px 'Inter', system-ui, sans-serif; color: #f4f0ff; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.18); }
.so-btn svg.i { width: 18px; height: 18px; }
.so-btn em { font-style: normal; min-width: 20px; height: 20px; padding: 0 6px; box-sizing: border-box; border-radius: 10px; display: grid; place-items: center;
  font-size: 11px; color: #120b2e; background: linear-gradient(160deg, #c9b8ff, #8f7bff); }
.so-btn:disabled { opacity: .45; cursor: default; }
.so-btn:disabled em { background: rgba(255,255,255,.3); color: #fff; }
.so-btn.go { color: #2a1800; border-color: transparent; background: linear-gradient(180deg, #ffe58f 0%, #f6c84a 48%, #e3a61f 100%); box-shadow: 0 6px 18px -6px rgba(246,200,74,.85);
  animation: soGo 1.6s ease-in-out infinite; }
@keyframes soGo { 50% { box-shadow: 0 6px 26px -2px rgba(255,214,102,.95); } }
.so-btn.hidden { display: none; }

/* ---------- the end: won, or no move left ---------- */
.so-res { position: absolute; inset: 0; z-index: 900; display: grid; place-items: center; padding: 12px; background: rgba(4,4,14,.5); }
.so-res.hidden { display: none; }
.so-res-in { width: min(420px, 100%); box-sizing: border-box; padding: 22px 20px 18px; border-radius: 24px; text-align: center;
  background: linear-gradient(165deg, rgba(34,28,90,.97), rgba(10,9,30,.97)); border: 1px solid rgba(170,140,255,.4);
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.9), 0 0 50px -10px rgba(140,110,255,.35); animation: soIn .45s cubic-bezier(.3,1.4,.5,1) backwards; }
@keyframes soIn { from { transform: scale(.85) translateY(20px); opacity: 0; } }
.so-res-fan { position: relative; height: 92px; margin: -4px 0 8px; --cw: 54px; }
.so-res-fan .scard { position: absolute; left: 50%; top: 4px; transform-origin: 50% 120%; animation: soFan .6s cubic-bezier(.3,1.3,.5,1) backwards; }
@keyframes soFan { from { transform: translateX(-50%) rotate(0deg); opacity: 0; } }
.so-res-in h3 { margin: 0 0 6px; font-size: 22px; font-weight: 900; background: linear-gradient(90deg, #d9ccff, #8fd0ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.so-res-in p { margin: 0 0 12px; font-size: 13.5px; line-height: 1.45; color: rgba(255,255,255,.78); }
.so-res-chips { display: inline-flex; align-items: center; gap: 8px; margin: 2px 0 16px; padding: 8px 16px; border-radius: 14px; font: 900 20px/1 'Inter', system-ui, sans-serif;
  color: #ffe08a; background: rgba(255,216,102,.1); border: 1px solid rgba(255,216,102,.35); }
.so-coin { width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff1b8, #ffc94d 55%, #c9871b); box-shadow: inset 0 0 0 2px rgba(122,70,8,.35), 0 2px 4px rgba(0,0,0,.4); }
.so-res-acts { display: flex; gap: 10px; }
.so-res-acts .btn { flex: 1 1 0; }

/* ---------- the home: a fan of cards over a piece of sky ---------- */
.hero-so .so-art { position: relative; display: flex; justify-content: center; padding: 10px 0 14px; }
.so-homeart { position: relative; width: 300px; max-width: 100%; height: 132px; --cw: 70px; }
.so-homeart .scard { position: absolute; left: 50%; top: 10px; transform-origin: 50% 130%; animation: soHome .6s cubic-bezier(.3,1.3,.5,1) backwards; animation-delay: calc(var(--i) * 70ms); }
@keyframes soHome { from { transform: translateX(-50%) rotate(0deg) translateY(20px); opacity: 0; } }
.logo-so { width: 36px; height: 36px; flex: none; } .logo-so svg { width: 36px; height: 36px; display: block; filter: drop-shadow(0 3px 5px rgba(0,0,0,.45)); }

/* ---------- my look: a corner of the sky with a card of the front and one of the back chosen ---------- */
.so-lk { position: relative; display: block; width: 100%; height: 100%; min-height: 60px; border-radius: 10px; overflow: hidden; --cw: 30px; isolation: isolate;
  background: var(--sky); box-shadow: inset 0 0 0 1px var(--edge); }
.so-lk::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--stars); background-size: 120px 120px; }
.so-lk .scard { position: absolute; top: 50%; }
.so-lk .scard.a { left: 30%; transform: translate(-50%, -50%) rotate(-7deg); }
.so-lk .scard.b { left: 66%; transform: translate(-50%, -50%) rotate(6deg); }
.lkm-pv .so-lk { --cw: 34px; }

/* ---------- phones ---------- */
@media (max-width: 760px) {
  body.game-solitaire[data-page="table"] #table.page { padding: 6px 6px; }
  .so-felt { border-radius: 14px; }
  .so-board { left: 8px; right: 8px; top: 9px; bottom: 8px; }
  .so-top { padding: 4px 6px 4px 10px; border-radius: 12px; } .so-tool { width: 32px; height: 32px; border-radius: 10px; }
  .so-bar { padding: 6px 8px 6px 12px; border-radius: 12px; } .so-btn { height: 38px; padding: 0 12px 0 10px; font-size: 12.5px; }
  .so-stats { gap: 12px; } .so-stats b { font-size: 15px; }
  .so-board .sc.stk::after { right: -3px; bottom: -6px; min-width: 18px; height: 16px; font-size: 9.5px; padding: 0 4px; }
  .scard .ix b { font-size: calc(var(--cw, 72px) * .3); } .scard .ix .sg { width: calc(var(--cw, 72px) * .22); height: calc(var(--cw, 72px) * .22); }
}
@media (max-width: 420px) { .so-btn span { display: none; } .so-btn { padding: 0 10px; } .so-homeart { --cw: 60px; height: 112px; } }
@media (orientation: landscape) and (max-height: 520px) {
  .so-wrap { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto minmax(0, 1fr); }
  .so-top { grid-column: 1 / -1; padding: 3px 6px 3px 10px; } .so-info { font-size: 11px; }
  .so-bar { flex-direction: column; justify-content: center; padding: 8px; }
  .so-stats { flex-direction: column; gap: 6px; } .so-acts { flex-direction: column; }
  .so-btn span { display: none; } .so-btn { padding: 0 10px; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { .so-board .sc, .so-board .sc.flip, .scard .scard.fb, .so-btn.go, .so-homeart .scard, .so-res-in, .so-res-fan .scard, .so-felt::after { transition: none !important; animation: none !important; } }

/* (2026-10, c) the empty places a little brighter, as places waiting for cards; the empty stock an orbit with an arrow
   and a star (it breathes when it can be turned over), the empty waste a card's outline with a light */
.so-slot { border-color: rgba(255,255,255,.34); background: rgba(255,255,255,.045); box-shadow: inset 0 0 16px rgba(0,0,0,.35), 0 0 12px rgba(190,175,255,.08); }
.so-slot.t { border-color: rgba(255,255,255,.24); box-shadow: inset 0 0 10px rgba(255,255,255,.03); }
.so-slot.f b { color: rgba(255,255,255,.45); }
.so-slot svg { width: 62%; height: 62%; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.so-slot.s svg { width: 66%; height: 66%; stroke: none; opacity: 1; }
.so-slot.s .o1 { stroke: rgba(225,215,255,.8); stroke-width: 2; stroke-dasharray: 70 18; transform-origin: 24px 24px; }
.so-slot.s .ar { stroke: rgba(225,215,255,.9); stroke-width: 2.2; }
.so-slot.s .pl { fill: rgba(200,185,255,.55); }
.so-slot.s .st, .so-slot.w .st { fill: #ffe9a8; opacity: .85; }
.so-slot.s.none svg { opacity: .22; }
.so-slot.s.can { border-color: rgba(200,185,255,.7); animation: soCan 1.8s ease-in-out infinite; }
.so-slot.s.can .o1 { animation: soOrbit 3.2s linear infinite; }
@keyframes soCan { 50% { box-shadow: inset 0 0 16px rgba(0,0,0,.35), 0 0 20px rgba(190,170,255,.45); } }
@keyframes soOrbit { to { transform: rotate(360deg); } }
.so-slot.w svg rect { stroke: rgba(255,255,255,.32); stroke-width: 1.6; }
.so-slot.w svg rect.in { stroke-dasharray: 3 3; stroke: rgba(255,255,255,.2); }
.so-slot.w .st { opacity: .45; }
/* a card turned from the stock: lifted (a bigger shadow), turning quickly as it flies; the waste flying back onto the
   stock fades as it lands; the stock, turned over, settles with a small bounce */
.so-board .sc.fly { box-shadow: 0 18px 24px -8px rgba(0,0,0,.7) !important; }
.so-board .sc.flip.q .fb { animation-duration: calc(.36s * var(--spd, 1)); }
.so-board .sc.back-to { transition: transform calc(.4s * var(--spd, 1)) cubic-bezier(.4,.1,.3,1), opacity .2s calc(.25s * var(--spd, 1)); opacity: 0; }
.so-board .sc.stk.ready { animation: soReady calc(.8s * var(--spd, 1)) cubic-bezier(.3,1.6,.5,1); }
@keyframes soReady { 0% { scale: .9; } 35% { scale: 1.08; rotate: -3deg; } 60% { rotate: 2deg; } 100% { scale: 1; rotate: 0deg; } }
/* a hint: the card (or the stock) glows and breathes; its place shows golden */
.so-board .sc.hint, .so-slot.hint { animation: soHint 1s ease-in-out infinite; box-shadow: 0 0 0 2px #ffd866, 0 0 22px rgba(255,216,102,.85) !important; }
@keyframes soHint { 50% { box-shadow: 0 0 0 2px #fff1b8, 0 0 34px rgba(255,216,102,1); translate: 0 -3px; } }
.so-drop.hintto { box-shadow: 0 0 0 2px #ffd866, 0 0 22px rgba(255,216,102,.7); animation: soHint 1s ease-in-out infinite; }
.so-btn.hint em { background: linear-gradient(160deg, #fff1b8, #ffcf4d); }
/* every card open: a small golden pill on the table — they go up by themselves, one by one */
.so-pill { position: absolute; left: 50%; bottom: 18px; z-index: 650; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px 0 12px;
  border-radius: 999px; cursor: pointer; font: 800 13px 'Inter', system-ui, sans-serif; color: #241800; background: linear-gradient(160deg, #fff1b8, #ffcf4d 60%, #f0b42c);
  border: 1px solid rgba(255,255,255,.6); box-shadow: 0 8px 22px -6px rgba(0,0,0,.7), 0 0 22px rgba(255,207,77,.45); animation: soPill .5s cubic-bezier(.3,1.5,.5,1) backwards; }
.so-pill svg.i { width: 17px; height: 17px; }
.so-pill.hidden { display: none; }
@keyframes soPill { from { transform: translateX(-50%) translateY(16px) scale(.8); opacity: 0; } }
/* the win: the whole deck at play over the table */
.so-cele { position: absolute; inset: 0; z-index: 850; pointer-events: none; overflow: hidden; }
.so-cele .scard { position: absolute; left: 0; top: 0; transform-origin: 50% 120%; will-change: transform, opacity; }
/* the end window: a little picture, the words, the chips, two small buttons */
.so-res-in { width: min(380px, 100%); padding: 20px 18px 16px; }
.so-res-art { height: 74px; margin: -2px 0 6px; display: grid; place-items: center; }
.so-res-art svg { width: 130px; height: 74px; fill: none; }
.so-res-art ellipse { stroke: rgba(200,185,255,.55); stroke-width: 1.4; stroke-dasharray: 4 4; }
.so-res-art ellipse.e2 { stroke: rgba(200,185,255,.3); }
.so-res-art .pl { fill: url(#soGK); stroke: rgba(255,255,255,.35); }
.so-res-art .mo { fill: #c9b8ff; }
.so-res-art .st { fill: #ffe9a8; }
.so-res-in.stuck h3 { background: linear-gradient(90deg, #e6dcff, #b5c8ff); -webkit-background-clip: text; background-clip: text; }
.so-res-acts { display: flex; justify-content: center; gap: 8px; }
.so-rb { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 16px 0 12px; border-radius: 12px; cursor: pointer;
  font: 800 13px 'Inter', system-ui, sans-serif; color: #efeaff; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.18); }
.so-rb:hover { border-color: rgba(200,185,255,.6); }
.so-rb svg.i { width: 16px; height: 16px; }
.so-rb.go { color: #fff; border-color: transparent; background: linear-gradient(135deg, #7b5cff, #3fa0ff); box-shadow: 0 6px 16px -6px rgba(110,90,255,.9); }
@media (prefers-reduced-motion: reduce) { .so-slot.s.can, .so-slot.s.can .o1, .so-board .sc.hint, .so-slot.hint, .so-drop.hintto, .so-pill, .so-board .sc.stk.ready { animation: none !important; } }
.so-res-chips.neg { color: #ffb3b8; background: rgba(255,90,100,.14); border-color: rgba(255,90,100,.35); }
