/* Solitaire Korner: the HUD, toolbar and cards over the 3D table (game/main.js builds it all inside #sk). */
.sk:focus { outline: none; }
.sk:focus-visible { outline: 3px solid #ffd45a; outline-offset: -3px; }
.sk { position: relative; width: 100%; height: 100%; overflow: hidden; background: #1f6a45; font-family: 'Fredoka', 'Segoe UI', sans-serif; color: #fff; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; container-type: size; }
.sk-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: default; }
.sk button { font-family: inherit; }

/* ---------------------------------------------------------------- top strip */
.sk-top { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: center; gap: 10px; padding: 7px 10px 7px 14px; pointer-events: none; z-index: 3;
  background: linear-gradient(180deg, rgba(0,0,0,0.38), rgba(0,0,0,0)); }
.sk-name { pointer-events: auto; display: flex; align-items: center; gap: 8px; min-width: 0; flex: 0 1 auto; margin-right: auto; height: 32px; padding: 0 8px 0 13px; border-radius: 99px; cursor: pointer;
  border: 1px solid rgba(255,255,255,0.22); background: rgba(0,0,0,0.3); color: #fff; font-size: 14px; letter-spacing: 0.2px; white-space: nowrap; text-shadow: 0 1px 2px rgba(0,0,0,0.4); transition: background 0.15s; }
.sk-name:hover { background: rgba(255,255,255,0.16); }
.sk-name b { font-weight: 600; flex: 0 0 auto; }
.sk-name .d { font-weight: 500; opacity: 0.7; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.sk-name i { display: grid; place-items: center; flex: 0 0 auto; opacity: 0.85; }
.sk-name svg { width: 16px; height: 16px; fill: currentColor; }
.sk-stats { display: flex; gap: 6px; flex: 0 0 auto; }
.sk-stat { font-size: 13px; font-weight: 600; padding: 3px 10px; border-radius: 99px; background: rgba(0,0,0,0.28); border: 1px solid rgba(255,255,255,0.14); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sk-stat:empty { display: none; }
.sk-tr { display: flex; gap: 6px; pointer-events: auto; }
.sk-mini { width: 30px; height: 30px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.22); background: rgba(0,0,0,0.3); color: #fff; display: grid; place-items: center; cursor: pointer; padding: 0; }
.sk-mini svg { width: 17px; height: 17px; fill: currentColor; }
.sk-mini.off { opacity: 0.6; }
.sk-mini:hover { background: rgba(255,255,255,0.18); }

/* ---------------------------------------------------------------- toolbar */
.sk-bar { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); display: flex; gap: 10px; padding: 6px; border-radius: 18px; z-index: 3;
  background: rgba(10,14,22,0.5); border: 1px solid rgba(255,255,255,0.16); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 6px 22px rgba(0,0,0,0.3); }
.sk-tool { display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border-radius: 13px; border: 0; background: rgba(255,255,255,0.08); color: #fff; font-size: 15px; font-weight: 600; cursor: pointer; transition: background 0.15s, transform 0.1s, opacity 0.2s; }
.sk-tool .i { display: grid; place-items: center; }
.sk-tool svg { width: 19px; height: 19px; fill: currentColor; }
.sk-tool:hover { background: rgba(255,255,255,0.18); }
.sk-tool:active { transform: scale(0.95); }
.sk-tool:disabled { opacity: 0.38; cursor: default; }
.sk-tool.finish { display: none; background: linear-gradient(135deg, #ffd45a, #ffab3d); color: #3b2500; }
.sk-tool.finish.on { display: flex; animation: sk-pulse 1.4s ease-in-out infinite; }
.sk-tool.wait .i { animation: sk-spin 0.9s linear infinite; }
@keyframes sk-pulse { 50% { transform: scale(1.06); } }
@keyframes sk-spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- toast */
.sk-toast { position: absolute; left: 50%; bottom: 66px; transform: translate(-50%, 10px); max-width: min(92%, 520px); padding: 9px 16px; border-radius: 14px; z-index: 4;
  background: rgba(12,16,26,0.82); border: 1px solid rgba(255,255,255,0.16); font-size: 15px; font-weight: 500; text-align: center; line-height: 1.3;
  opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; }
.sk-toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------------------------------------------------------------- loading */
.sk-loading { position: absolute; inset: 0; z-index: 9; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  background: radial-gradient(circle at 50% 40%, #2c8a5b, #154a31 70%); transition: opacity 0.5s; }
.sk-loading.gone { opacity: 0; pointer-events: none; }
.sk-loading p { opacity: 0.8; font-size: 15px; }
.sk-loadbar { width: 180px; height: 6px; border-radius: 9px; background: rgba(255,255,255,0.18); overflow: hidden; }
.sk-loadbar i { display: block; height: 100%; width: 40%; border-radius: 9px; background: #ffd45a; animation: sk-load 1.1s ease-in-out infinite; }
@keyframes sk-load { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }
.sk-logo { font-family: 'Fredoka One', 'Fredoka', sans-serif; font-size: 40px; line-height: 1; text-shadow: 0 3px 0 rgba(0,0,0,0.25); display: flex; gap: 10px; }
.sk-logo .a { color: #fff; }
.sk-logo .b { color: #ffd45a; }

/* ---------------------------------------------------------------- screens */
.sk-screen { position: absolute; inset: 0; z-index: 6; display: none; align-items: center; justify-content: center; padding: 14px; background: rgba(4,10,8,0.45); }
.sk-screen.on { display: flex; animation: sk-fade 0.2s ease-out; }
@keyframes sk-fade { from { opacity: 0; } }
.sk-card { position: relative; width: min(600px, 100%); max-height: 100%; display: flex; flex-direction: column; gap: 16px; padding: 24px 26px 22px; border-radius: 22px;
  background: linear-gradient(160deg, rgba(30,38,52,0.97), rgba(18,22,32,0.98)); border: 1px solid rgba(255,255,255,0.14); box-shadow: 0 20px 60px rgba(0,0,0,0.5); animation: sk-pop 0.25s cubic-bezier(.2,1.4,.4,1); overflow-y: auto; overscroll-behavior: contain; }
@keyframes sk-pop { from { transform: scale(0.92); opacity: 0; } }
.sk-card h2 { font-family: 'Fredoka One', 'Fredoka', sans-serif; font-weight: 400; font-size: 26px; padding-right: 36px; }
.sk-card.win h2 { color: #ffd45a; font-size: 34px; text-align: center; padding: 0; }
.sk-card p { color: rgba(255,255,255,0.82); line-height: 1.45; }
.sk-x { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(255,255,255,0.1); color: #fff; cursor: pointer; display: grid; place-items: center; padding: 0; }
.sk-x svg { width: 18px; height: 18px; fill: currentColor; }
.sk-row { display: flex; flex-wrap: wrap; gap: 12px; }
.sk-card.win .sk-row { justify-content: center; }
.sk-btn { flex: 1 1 auto; min-height: 46px; padding: 0 18px; border-radius: 13px; border: 1px solid rgba(255,255,255,0.16); background: rgba(255,255,255,0.08); color: #fff; font-size: 16px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.sk-btn svg { width: 18px; height: 18px; fill: currentColor; vertical-align: -3px; }
.sk-btn span { display: inline-flex; align-items: center; gap: 6px; }
.sk-btn:hover { background: rgba(255,255,255,0.16); }
.sk-btn.go { background: linear-gradient(135deg, #ffd45a, #ffab3d); color: #3b2500; border-color: transparent; }
.sk-btn.go:hover { filter: brightness(1.06); }
.sk-btn.daily { background: linear-gradient(135deg, #37c9b8, #2a8fd6); border-color: transparent; }
.sk-btn.ghost { background: transparent; }
.sk-row.small .sk-btn { min-height: 40px; font-size: 14px; flex: 1 1 0; white-space: nowrap; }
.sk-sub { font-size: 14px; color: rgba(255,255,255,0.65) !important; }
.sk-menu { display: flex; flex-direction: column; gap: 18px; }
/* the three games */
.sk-games { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.sk-game { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 8px 12px; border-radius: 16px; cursor: pointer; text-align: center;
  border: 1.5px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.05); color: rgba(255,255,255,0.85); transition: background 0.15s, border-color 0.15s, transform 0.1s; }
.sk-game:hover { background: rgba(255,255,255,0.1); }
.sk-game:active { transform: scale(0.97); }
.sk-game.on { border-color: #ffd45a; background: rgba(255,212,90,0.12); color: #fff; }
.sk-game .gi { width: 46px; height: 46px; margin-bottom: 2px; }
.sk-game .gi svg { width: 100%; height: 100%; }
.sk-game .gi rect, .sk-game .gi .b { fill: #f7f2e6; stroke: #1b2230; stroke-width: 1.3; }
.sk-game .gi .c rect { fill: none; stroke: currentColor; stroke-width: 1.4; opacity: 0.75; }
.sk-game .gi .r { fill: #e0464f; }
.sk-game .gi .l path { fill: none; stroke: #f7f2e6; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sk-game b { font-size: 17px; font-weight: 600; }
.sk-game small { font-size: 12px; line-height: 1.3; color: rgba(255,255,255,0.6); }
.sk-game em { position: absolute; top: 8px; right: 8px; padding: 2px 7px; border-radius: 99px; font-style: normal; font-size: 10.5px; font-weight: 600; background: #ffd45a; color: #3b2500; }
.sk-game em.wait { background: rgba(255,255,255,0.16); color: #fff; }
/* its options */
.sk-opts { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; min-height: 38px; }
.sk-optg { display: flex; align-items: center; gap: 10px; }
.sk-chips { display: flex; gap: 10px; }
.sk-opts .lbl { font-size: 13px; color: rgba(255,255,255,0.6); }
.sk-play { display: flex; flex-direction: column; gap: 12px; }
.sk-btn.big { min-height: 52px; font-size: 18px; }
.sk-menu .sk-sub { margin-top: -6px; }
.sk-more { padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.08); }
.sk-chip { min-height: 36px; padding: 0 15px; border-radius: 99px; border: 1px solid rgba(255,255,255,0.2); background: transparent; color: #fff; font-size: 14px; font-weight: 600; cursor: pointer; }
.sk-chip.on { background: #ffd45a; color: #3b2500; border-color: #ffd45a; }
.sk-scroll { overflow: auto; min-height: 0; flex: 1 1 auto; -webkit-overflow-scrolling: touch; }
.sk-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.sk-table th, .sk-table td { padding: 7px 6px; text-align: center; border-bottom: 1px solid rgba(255,255,255,0.08); white-space: nowrap; }
.sk-table thead th { font-weight: 600; color: rgba(255,255,255,0.6); font-size: 12px; }
.sk-table tbody th { text-align: left; font-weight: 600; }
.sk-settings { display: flex; flex-direction: column; gap: 4px; }
.sk-tog, .sk-slide, .sk-pick { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 2px; border-bottom: 1px solid rgba(255,255,255,0.07); font-size: 15px; }
.sk-pick { flex-wrap: wrap; }
.sk-pick > div { display: flex; flex-wrap: wrap; gap: 6px; }
.sk-tog input { width: 22px; height: 22px; accent-color: #ffd45a; }
.sk-slide input { width: 46%; accent-color: #ffd45a; }
.sk-help { padding-left: 20px; display: flex; flex-direction: column; gap: 7px; line-height: 1.45; color: rgba(255,255,255,0.88); font-size: 15px; }
.sk-help.tips { color: rgba(255,255,255,0.7); font-size: 14px; }
.sk-help b { color: #ffd45a; }
.sk-results { display: flex; justify-content: center; gap: 12px; }
.sk-results > div { flex: 1; max-width: 150px; padding: 12px 8px; border-radius: 16px; background: rgba(255,255,255,0.07); text-align: center; }
.sk-results b { display: block; font-size: 28px; font-variant-numeric: tabular-nums; }
.sk-results span { font-size: 12px; color: rgba(255,255,255,0.6); }
.sk-badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.sk-badges span { padding: 5px 12px; border-radius: 99px; background: rgba(255,212,90,0.16); color: #ffd45a; font-size: 13px; font-weight: 600; }

/* ---------------------------------------------------------------- small boxes and phones */
@container (max-width: 640px) {
  .sk-name { font-size: 12px; height: 30px; padding: 0 6px 0 11px; gap: 6px; }
  .sk-bar { gap: 8px; }
  .sk-game small { display: none; }
  .sk-game { padding: 12px 6px 10px; }
  .sk-stat { font-size: 12px; padding: 2px 8px; }
  .sk-tool { padding: 0 11px; font-size: 14px; }
  .sk-card { padding: 20px 18px 18px; gap: 14px; }
  .sk-menu { gap: 16px; }
  .sk-card h2 { font-size: 22px; }
}
@container (max-width: 470px) {
  .sk-top { flex-wrap: wrap; row-gap: 4px; padding: 6px 8px 6px 10px; }
  .sk-name { flex: 0 1 auto; max-width: 100%; }
  .sk-stats { order: 3; flex: 1 1 100%; }
  .sk-tool { flex-direction: column; gap: 1px; height: 50px; padding: 0 10px; font-size: 11px; min-width: 56px; justify-content: center; }
  .sk-tool svg { width: 21px; height: 21px; }
  .sk-bar { gap: 6px; bottom: 6px; }
  .sk-games { gap: 8px; }
  .sk-game .gi { width: 36px; height: 36px; }
  .sk-game b { font-size: 15px; }
  .sk-game em { position: static; margin-top: 2px; }
  .sk-opts { gap: 10px 18px; }
  .sk-toast { bottom: 72px; font-size: 14px; }
  .sk-row.small .sk-btn { flex: 1 1 40%; }
  .sk-results b { font-size: 22px; }
}
@container (max-height: 430px) {
  .sk-tool { height: 34px; }
  .sk-game .gi { display: none; }
  .sk-menu { gap: 12px; }
  .sk-card { gap: 12px; padding-top: 18px; padding-bottom: 16px; }
  .sk-top { padding-top: 4px; padding-bottom: 4px; }
}
