/* Schach (spiele/schach/schach.js) – vorerst flaches Holzbrett mit runden Bildmarken */
.schach-seite { max-width: 1180px; margin: 0 auto; padding: 18px var(--rand, 20px) 40px; }
.schach-titel { margin: 0 0 14px; }
.schach { display: grid; grid-template-columns: minmax(0, min(78vh, 720px)) minmax(220px, 1fr); gap: 26px; align-items: start; }
@media (max-width: 820px) { .schach { grid-template-columns: 1fr; } }

.sc-brett-rahmen { padding: 14px; border-radius: 10px; background: linear-gradient(135deg, #5b3a22, #3b2414);
  box-shadow: 0 18px 40px rgb(0 0 0 / .45), inset 0 0 0 2px rgb(255 255 255 / .06); }
.sc-brett { display: grid; grid-template-columns: repeat(8, 1fr); aspect-ratio: 1; border-radius: 3px; overflow: hidden;
  touch-action: none; user-select: none; -webkit-user-select: none; }
.sc-feld { position: relative; border: 0; padding: 0; margin: 0; aspect-ratio: 1; cursor: pointer; display: grid; place-items: center; }
.sc-feld.hell { background: #e9d6b4; }
.sc-feld.dunkel { background: #a87a4f; }
.sc-feld:focus-visible { outline: 3px solid #2f7de1; outline-offset: -3px; z-index: 2; }
.sc-feld.letzter::before { content: ''; position: absolute; inset: 0; background: rgb(240 200 60 / .38); }
.sc-feld.gewaehlt::before { content: ''; position: absolute; inset: 0; background: rgb(90 170 90 / .5); }
.sc-feld.ziel::after { content: ''; position: absolute; width: 26%; height: 26%; border-radius: 50%; background: rgb(30 60 30 / .45); z-index: 3; pointer-events: none; }
.sc-feld.ziel-schlag::after { content: ''; position: absolute; inset: 5%; border-radius: 50%; border: 5px solid rgb(30 60 30 / .5); z-index: 3; pointer-events: none; }
.sc-feld.im-schach::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle, rgb(220 40 30 / .75), rgb(220 40 30 / 0) 70%); }

.sc-figur { position: relative; z-index: 2; width: 88%; height: 88%; border-radius: 50%; display: block;
  filter: drop-shadow(0 3px 4px rgb(0 0 0 / .45)); transition: filter .15s; will-change: transform; }
.sc-figur img { width: 100%; height: 100%; display: block; pointer-events: none; }
.sc-figur.schwebt { z-index: 20; filter: drop-shadow(0 12px 12px rgb(0 0 0 / .5)); transition: none; }
.sc-zeichen { position: absolute; right: -2%; bottom: -2%; width: 36%; height: 36%; border-radius: 50%; display: grid; place-items: center;
  font-size: clamp(9px, 2.1vmin, 17px); line-height: 1; pointer-events: none; }
.weiss .sc-zeichen { background: #f7eedb; color: #8a6418; box-shadow: 0 0 0 2px #c9a24b; }
.schwarz .sc-zeichen { background: #231c18; color: #d8d2c6; box-shadow: 0 0 0 2px #8f8a80; }
.sc-rang, .sc-linie { position: absolute; font: 600 clamp(8px, 1.4vmin, 12px)/1 system-ui, sans-serif; opacity: .7; pointer-events: none; z-index: 1; }
.sc-rang { left: 4%; top: 4%; }
.sc-linie { right: 5%; bottom: 3%; }
.hell .sc-rang, .hell .sc-linie { color: #8a5f38; }
.dunkel .sc-rang, .dunkel .sc-linie { color: #f2e2c4; }

.sc-leiste { display: flex; flex-direction: column; gap: 14px; }
.sc-stand { margin: 0; font-size: 1.05rem; min-height: 2.6em; }
.sc-wahl { display: grid; gap: 10px; }
.sc-wahl label { display: grid; gap: 4px; font-size: .9rem; }
.sc-wahl select, .sc-knoepfe button { font: inherit; padding: 7px 10px; border-radius: 6px; }
.sc-knoepfe { display: flex; flex-wrap: wrap; gap: 8px; }
.sc-knoepfe button { cursor: pointer; border: 1px solid rgb(128 128 128 / .5); background: rgb(128 128 128 / .12); color: inherit; }
.sc-knoepfe button:hover, .sc-knoepfe button:focus-visible { background: rgb(128 128 128 / .25); }
.sc-zuege { margin: 0; padding: 8px 8px 8px 2.6em; max-height: 260px; overflow: auto; font: .92rem/1.6 ui-monospace, Menlo, Consolas, monospace;
  border-radius: 6px; background: rgb(128 128 128 / .1); white-space: pre; }
.sc-zuege:empty { display: none; }
.sc-nachweis { margin: 0; font-size: .75rem; opacity: .75; }

.sc-umwandlung { border: 0; border-radius: 12px; padding: 18px 20px; background: #2a201a; color: #f3ead8; box-shadow: 0 20px 50px rgb(0 0 0 / .6); }
.sc-umwandlung::backdrop { background: rgb(0 0 0 / .5); }
.sc-umwandlung p { margin: 0 0 10px; text-align: center; }
.sc-umw-wahl { display: flex; gap: 10px; }
.sc-umw { width: 76px; height: 76px; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.sc-umw img { width: 100%; height: 100%; display: block; }
.sc-umw:focus-visible { outline: 3px solid #f1c27d; outline-offset: 3px; }
.sc-reihe { display: contents; }

/* 3D-Ansicht (schach3d.js) */
.sc-brett-rahmen { position: relative; }
.schach.mit-3d .sc-brett { display: none; }
.schach.mit-3d .sc-brett-rahmen { padding: 0; background: radial-gradient(ellipse at 50% 35%, #4a3a2c, #1c1612 75%); overflow: hidden; }
.sc-3d-huelle { aspect-ratio: 1 / 0.86; width: 100%; }
.sc-3d-leinwand { display: block; width: 100%; height: 100%; touch-action: none; cursor: pointer; }
.sc-3d-hinweis { position: absolute; left: 0; right: 0; top: 45%; margin: 0; text-align: center; color: #f2e2c4; pointer-events: none; }
.sc-3d-hinweis:empty { display: none; }
.sc-knoepfe button[aria-pressed="true"] { outline: 2px solid #c9a24b; }
.sc-3d-huelle { position: relative; }
.sc-3d-knoepfe { position: absolute; right: 12px; bottom: 12px; display: flex; gap: 6px; }
.sc-3d-knoepfe button { width: 40px; height: 40px; padding: 0; border-radius: 50%; border: 1px solid rgb(255 255 255 / .25);
  background: rgb(20 16 12 / .7); color: #f2e2c4; font-size: 20px; line-height: 1; cursor: pointer; }
.sc-3d-knoepfe button:hover { background: rgb(60 45 30 / .85); }
.sc-3d-tipp { position: absolute; left: 14px; bottom: 10px; right: 160px; margin: 0; font-size: .78rem; color: rgb(242 226 196 / .75); pointer-events: none; }
@media (max-width: 600px) { .sc-3d-tipp { display: none; } }
.sc-stand.blinkt { animation: sc-blinkt .9s ease; }
@keyframes sc-blinkt { 0%, 60% { color: #ffcf6a; transform: translateX(0); } 15% { transform: translateX(-4px); } 30% { transform: translateX(4px); } 45% { transform: translateX(-2px); } 100% { transform: none; } }
