/* SK Siebzehn und Vier – SK Light Branding (Akzent #B1976B) – alles auf .sk17 begrenzt */
.sk17 {
    --sk-acc: #B1976B;
    --sk-acc2: #d8c3a1;
    --sk-glow: rgba(177, 151, 107, .45);
    --sk-bg: #ffffff;
    --sk-bg2: #f6f2ea;
    --sk-fg: #2b2a28;
    --sk-mut: #7a7468;
    --sk-line: #e7dfd0;
    --sk-win: #2f8f4e;
    --sk-lose: #c0392b;
    --cwset: 84px;
    --cw: min(var(--cwset), 23vw);
    box-sizing: border-box;
    max-width: 980px;
    margin: 0 auto;
    padding: 14px;
    background: var(--sk-bg);
    color: var(--sk-fg);
    border: 1px solid var(--sk-line);
    border-radius: 20px;
    box-shadow: 0 10px 34px rgba(60, 45, 20, .12);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.4;
    position: relative;
    -webkit-user-select: none;
    user-select: none;
}
.sk17.sk17-dark {
    --sk-bg: #1f1d1a;
    --sk-bg2: #2a2723;
    --sk-fg: #f1ece2;
    --sk-mut: #a89f8e;
    --sk-line: #3b362e;
    --sk-glow: rgba(177, 151, 107, .35);
    box-shadow: 0 10px 34px rgba(0, 0, 0, .45);
}
.sk17 *, .sk17 *::before, .sk17 *::after { box-sizing: border-box; }
.sk17 [hidden] { display: none !important; }

/* ---------- Kopfzeile ---------- */
.sk17 .sk17-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.sk17 .sk17-title { font-size: 1.25rem; font-weight: 700; letter-spacing: .2px; margin-right: auto;
    background: linear-gradient(90deg, var(--sk-acc), var(--sk-acc2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sk17 .sk17-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.sk17 .sk17-pill { background: var(--sk-bg2); border: 1px solid var(--sk-line); border-radius: 999px; padding: 4px 12px; font-size: .85rem; white-space: nowrap; }
.sk17 .sk17-pill b { color: var(--sk-acc); font-weight: 700; }
.sk17 .sk17-tools { display: flex; gap: 6px; }
.sk17 .sk17-ib { width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--sk-line); background: var(--sk-bg2); color: var(--sk-fg);
    font-size: 1.05rem; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: .15s; padding: 0; }
.sk17 .sk17-ib:hover { border-color: var(--sk-acc); box-shadow: 0 0 0 3px var(--sk-glow); }
.sk17 .sk17-ib.on { background: linear-gradient(135deg, var(--sk-acc), var(--sk-acc2)); color: #fff; border-color: transparent; }

/* ---------- Tisch ---------- */
.sk17 .sk17-table { position: relative; border-radius: 18px; padding: 14px 10px 16px; min-height: 470px; overflow: hidden;
    display: flex; flex-direction: column; gap: 10px; justify-content: space-between;
    box-shadow: inset 0 0 60px rgba(0, 0, 0, .35), inset 0 0 0 3px rgba(255, 255, 255, .08);
    color: #fff; }
.sk17 .sk17-deckpile { position: absolute; right: 12px; top: 12px; width: calc(var(--cw) * .62); aspect-ratio: 9 / 16; border-radius: 7px; z-index: 1;
    box-shadow: 1px 1px 0 rgba(255,255,255,.5), 3px 3px 0 rgba(0,0,0,.25), 5px 5px 0 rgba(255,255,255,.35), 7px 7px 10px rgba(0,0,0,.45);
    background-size: cover; background-position: center; background-color: #b1976b; }
.sk17 .sk17-zone { display: flex; justify-content: center; align-items: flex-start; gap: 14px 18px; flex-wrap: wrap; position: relative; z-index: 2; }
.sk17 .sk17-msg { align-self: center; z-index: 3; min-height: 34px; text-align: center; background: rgba(0, 0, 0, .55); color: #fff; padding: 6px 16px;
    border-radius: 999px; font-weight: 600; font-size: .95rem; max-width: 92%; backdrop-filter: blur(3px); }
.sk17 .sk17-msg.win { background: rgba(33, 120, 62, .85); }
.sk17 .sk17-msg.lose { background: rgba(160, 40, 30, .85); }
.sk17 .sk17-msg.info { background: rgba(177, 151, 107, .9); }

/* ---------- Sitz ---------- */
.sk17 .seat { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: calc(var(--cw) * 1.4); position: relative; }
.sk17 .seat .hand { --ov: .15; display: flex; justify-content: center; min-height: calc(var(--cw) * 1.7778); align-items: flex-start; padding: 0 6px; }
.sk17 .seat .hand:empty { visibility: hidden; }
.sk17 .seat .plate { background: rgba(0, 0, 0, .58); color: #fff; border-radius: 12px; padding: 4px 12px; display: flex; gap: 8px; align-items: center;
    font-size: .85rem; border: 1px solid rgba(255, 255, 255, .15); }
.sk17 .seat .plate b { font-weight: 700; }
.sk17 .seat .plate .ch { color: var(--sk-acc2); }
.sk17 .seat.me .plate { border-color: var(--sk-acc2); box-shadow: 0 0 14px var(--sk-glow); }
.sk17 .seat.act .plate { background: linear-gradient(135deg, var(--sk-acc), #8f7a52); box-shadow: 0 0 16px var(--sk-glow); }
.sk17 .seat.dealer .plate::before { content: "BANK"; font-size: .65rem; letter-spacing: 1px; background: var(--sk-acc); color: #fff; padding: 1px 6px; border-radius: 6px; }
.sk17 .seat .info { display: flex; gap: 6px; align-items: center; min-height: 24px; flex-wrap: wrap; justify-content: center; }
.sk17 .seat .info span { background: rgba(255, 255, 255, .92); color: #2b2a28; border-radius: 999px; padding: 1px 10px; font-size: .78rem; font-weight: 700; }
.sk17 .seat .info .sc.tot { background: var(--sk-lose); color: #fff; }
.sk17 .seat .info .sc.good { background: linear-gradient(135deg, var(--sk-acc), var(--sk-acc2)); color: #fff; }
.sk17 .seat .info .bt { background: rgba(0, 0, 0, .6); color: var(--sk-acc2); }
.sk17 .seat .info .rs.win { background: var(--sk-win); color: #fff; }
.sk17 .seat .info .rs.lose { background: var(--sk-lose); color: #fff; }
.sk17 .seat .info .rs.push { background: #6b7280; color: #fff; }
.sk17 .seat.out { opacity: .55; }

/* ---------- Karten ---------- */
.sk17 .c { width: var(--cw); aspect-ratio: 9 / 16; perspective: 700px; flex: 0 0 auto; position: relative; }
.sk17 .c + .c { margin-left: calc(var(--cw) * var(--ov) * -1); }
.sk17 .c .in { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .45s cubic-bezier(.3, .7, .3, 1); }
.sk17 .c.down .in { transform: rotateY(180deg); }
.sk17 .c .f { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 8px; overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, .45); }
.sk17 .c .bk { transform: rotateY(180deg); }
.sk17 .c img { width: 100%; height: 100%; display: block; object-fit: fill; pointer-events: none; -webkit-user-drag: none; }
.sk17 .c.new { animation: sk17deal .38s ease-out both; }
@keyframes sk17deal { from { transform: translate(90px, -70px) rotate(14deg) scale(.8); opacity: 0; } to { transform: none; opacity: 1; } }
.sk17 .fb { width: 100%; height: 100%; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    font-weight: 800; border: 1px solid #ccc; border-radius: 8px; font-size: calc(var(--cw) * .26); }
.sk17 .fb i { font-style: normal; font-size: calc(var(--cw) * .5); line-height: 1; }
.sk17 .fb.s-eichel { color: #6b4423; } .sk17 .fb.s-gras { color: #2f7d3a; } .sk17 .fb.s-herz { color: #c0392b; } .sk17 .fb.s-schellen { color: #c99a1d; }
.sk17 .fb.back { background: repeating-linear-gradient(45deg, #b1976b 0 8px, #d8c3a1 8px 16px); border-color: #fff; }

/* ---------- Steuerung ---------- */
.sk17 .sk17-ctl { margin-top: 12px; background: var(--sk-bg2); border: 1px solid var(--sk-line); border-radius: 16px; padding: 12px;
    display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; min-height: 64px; }
.sk17 .sk17-ctl .lbl { color: var(--sk-mut); font-size: .85rem; width: 100%; text-align: center; }
.sk17 .sk17-ctl .betv { font-weight: 800; font-size: 1.1rem; color: var(--sk-acc); min-width: 110px; text-align: center; }
.sk17 .btn { border: 0; border-radius: 14px; padding: 10px 20px; font: inherit; font-weight: 700; cursor: pointer; color: #fff;
    background: linear-gradient(135deg, var(--sk-acc), var(--sk-acc2)); box-shadow: 0 4px 16px var(--sk-glow); transition: transform .12s, box-shadow .12s, filter .12s; }
.sk17 .btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 6px 22px var(--sk-glow); filter: brightness(1.04); }
.sk17 .btn:active:not(:disabled) { transform: translateY(0); }
.sk17 .btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.sk17 .btn.ghost { background: var(--sk-bg); color: var(--sk-fg); border: 1px solid var(--sk-line); box-shadow: none; }
.sk17 .btn.ghost:hover:not(:disabled) { border-color: var(--sk-acc); box-shadow: 0 0 0 3px var(--sk-glow); }
.sk17 .btn.big { padding: 12px 26px; font-size: 1.02rem; }
.sk17 .jeton { width: 54px; height: 54px; border-radius: 50%; border: 3px dashed rgba(255, 255, 255, .85); font-weight: 800; color: #fff; cursor: pointer; font-size: .95rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .35), inset 0 0 0 3px rgba(0, 0, 0, .18); transition: transform .12s; padding: 0; }
.sk17 .jeton:hover:not(:disabled) { transform: translateY(-3px) scale(1.05); }
.sk17 .jeton:disabled { opacity: .35; cursor: not-allowed; }
.sk17 .jeton.j0 { background: #3b82c4; } .sk17 .jeton.j1 { background: #2f8f4e; } .sk17 .jeton.j2 { background: #c0392b; }
.sk17 .jeton.j3 { background: #2b2a28; } .sk17 .jeton.j4 { background: #8e44ad; } .sk17 .jeton.j5 { background: #B1976B; }

/* ---------- Fenster ---------- */
.sk17 .sk17-modal { position: absolute; inset: 0; z-index: 20; background: rgba(20, 15, 5, .55); border-radius: 20px; display: flex; align-items: flex-start;
    justify-content: center; padding: 14px; overflow: auto; backdrop-filter: blur(2px); }
.sk17 .sk17-box { background: var(--sk-bg); color: var(--sk-fg); border-radius: 18px; border: 1px solid var(--sk-line); width: 100%; max-width: 640px;
    box-shadow: 0 16px 50px rgba(0, 0, 0, .4); user-select: text; -webkit-user-select: text; }
.sk17 .sk17-box header { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--sk-line); }
.sk17 .sk17-box header h3 { margin: 0; font-size: 1.1rem; background: linear-gradient(90deg, var(--sk-acc), var(--sk-acc2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sk17 .sk17-box .body { padding: 14px 18px 18px; max-height: 70vh; overflow: auto; }
.sk17 .sk17-box .body ul { margin: 0 0 10px 18px; padding: 0; }
.sk17 .sk17-box .body li { margin: 4px 0; }
.sk17 .sk17-box h4 { margin: 16px 0 8px; font-size: .8rem; text-transform: uppercase; letter-spacing: 1px; color: var(--sk-acc); }
.sk17 .frow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--sk-line); }
.sk17 .frow label { flex: 1; font-size: .92rem; }
.sk17 .frow small { display: block; color: var(--sk-mut); font-size: .75rem; }
.sk17 .frow select, .sk17 .frow input[type=number], .sk17 .frow input[type=text] { font: inherit; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--sk-line);
    background: var(--sk-bg2); color: var(--sk-fg); max-width: 56%; min-width: 120px; }
.sk17 .frow input[type=number] { width: 120px; min-width: 0; }
.sk17 .frow input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--sk-acc); }
.sk17 .frow select:focus, .sk17 .frow input:focus { outline: 2px solid var(--sk-acc); outline-offset: 1px; }
.sk17 .bgs { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 0; }
.sk17 .bgs button { width: 64px; height: 44px; border-radius: 10px; border: 2px solid transparent; cursor: pointer; background-size: cover; background-position: center; position: relative; padding: 0; overflow: hidden; }
.sk17 .bgs button.on { border-color: var(--sk-acc); box-shadow: 0 0 0 3px var(--sk-glow); }
.sk17 .bgs button span { position: absolute; inset: auto 0 0 0; font-size: .6rem; background: rgba(0, 0, 0, .6); color: #fff; padding: 1px 2px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sk17 .stgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.sk17 .stgrid div { background: var(--sk-bg2); border: 1px solid var(--sk-line); border-radius: 14px; padding: 10px; text-align: center; }
.sk17 .stgrid b { display: block; font-size: 1.35rem; color: var(--sk-acc); }
.sk17 .stgrid span { font-size: .78rem; color: var(--sk-mut); }
.sk17 .modal-foot { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; margin-top: 14px; }

/* ---------- Tisch-Hintergründe ---------- */
.sk17 { --noise: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.sk17 .sk17-bg-filz-gruen { background: var(--noise), radial-gradient(ellipse at 50% 40%, #35875a 0%, #1f5c3a 55%, #123a24 100%); }
.sk17 .sk17-bg-filz-blau { background: var(--noise), radial-gradient(ellipse at 50% 40%, #3a6ea5 0%, #234a78 55%, #142d4d 100%); }
.sk17 .sk17-bg-filz-rot { background: var(--noise), radial-gradient(ellipse at 50% 40%, #9b2c3d 0%, #701c2b 55%, #440f1a 100%); }
.sk17 .sk17-bg-filz-grau { background: var(--noise), radial-gradient(ellipse at 50% 40%, #4a4f57 0%, #30343a 55%, #1c1f23 100%); }
.sk17 .sk17-bg-holz-dunkel { background: var(--noise),
    repeating-linear-gradient(90deg, transparent 0 150px, rgba(0, 0, 0, .4) 150px 152px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .035) 0 1px, rgba(0, 0, 0, .06) 1px 4px),
    linear-gradient(180deg, #6b4423 0%, #4d2e15 50%, #3a210e 100%); }
.sk17 .sk17-bg-holz-hell { background: var(--noise),
    repeating-linear-gradient(90deg, transparent 0 150px, rgba(90, 55, 20, .45) 150px 152px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .08) 0 1px, rgba(120, 80, 30, .09) 1px 4px),
    linear-gradient(180deg, #d9b27c 0%, #c79a60 50%, #b5874e 100%); }
.sk17 .sk17-bg-bayern { background:
    radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 40%, rgba(0, 20, 40, .55) 100%),
    url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44'%3E%3Crect width='44' height='44' fill='%23ffffff'/%3E%3Cpath d='M22 0 L44 22 L22 44 L0 22Z' fill='%230098d4'/%3E%3C/svg%3E"); }
.sk17 .sk17-bg-karo { background:
    radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 40%, rgba(60, 0, 0, .5) 100%),
    linear-gradient(90deg, rgba(190, 30, 45, .6) 50%, transparent 50%),
    linear-gradient(rgba(190, 30, 45, .6) 50%, transparent 50%);
    background-size: 100% 100%, 52px 52px, 52px 52px; background-color: #fff; }
.sk17 .sk17-bg-nacht { background:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, .5) 0 1px, transparent 2px),
    radial-gradient(circle at 70% 20%, rgba(255, 255, 255, .45) 0 1px, transparent 2px),
    radial-gradient(circle at 85% 70%, rgba(255, 255, 255, .5) 0 1px, transparent 2px),
    radial-gradient(circle at 35% 80%, rgba(255, 255, 255, .4) 0 1px, transparent 2px),
    radial-gradient(ellipse at 50% 30%, #1e2a4a 0%, #0f1730 60%, #070b18 100%); }
.sk17 .sk17-bg-gold { background: var(--noise), linear-gradient(135deg, #B1976B 0%, #d8c3a1 100%); }

/* ---------- Mobil ---------- */
@media (max-width: 560px) {
    .sk17 { padding: 10px; border-radius: 16px; --cw: min(var(--cwset), 17vw); }
    .sk17 .sk17-table { min-height: 420px; padding: 10px 6px 12px; }
    .sk17 .seat { min-width: calc(var(--cw) * 1.2); }
    .sk17 .jeton { width: 46px; height: 46px; font-size: .82rem; }
    .sk17 .btn { padding: 9px 14px; }
    .sk17 .sk17-deckpile { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .sk17 .c .in { transition: none; }
    .sk17 .c.new { animation: none; }
}
