/* Wortschmiede – gemeinsames Design für Webseite, Overlay und Link-Seite. Alles unter .wsm, damit das Theme nicht hineinfunkt. */
.wsm, .wsm-modal {
  --wsm-bg: #18140f;
  --wsm-bg2: #241d16;
  --wsm-panel: #2b241c;
  --wsm-line: #4a3e31;
  --wsm-text: #f4e7cf;
  --wsm-muted: #b9a68a;
  --wsm-glut: #e5701f;
  --wsm-glut-hi: #ffb347;
  --wsm-kuehl: #2c7da0;
  --wsm-kuehl-hi: #8fd3f0;
  --wsm-russ: #3a3530;
  --wsm-empty: #211b15;
  --wsm-radius: 6px;
  --wsm-tile: clamp(44px, 14vw, 62px);
  --wsm-font: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --wsm-head: "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
}
.wsm-modal *, .wsm-modal *::before, .wsm-modal *::after { box-sizing: border-box; }
.wsm-modal button { font-family: inherit; cursor: pointer; }
.wsm {
  box-sizing: border-box;
  font-family: var(--wsm-font);
  color: var(--wsm-text);
  background: radial-gradient(120% 80% at 50% 0%, #3a2814 0%, var(--wsm-bg) 55%) var(--wsm-bg);
  border-radius: 14px;
  padding: 16px;
  width: 100%;
  max-width: none; /* wie die Inhaltsspalte der übrigen Seiten */
  margin: 0;
  line-height: 1.4;
  -webkit-tap-highlight-color: transparent;
}
.wsm *, .wsm *::before, .wsm *::after { box-sizing: border-box; }
.wsm button { font-family: inherit; cursor: pointer; }
.wsm a { color: var(--wsm-glut-hi); }
.wsm code, .wsm-dialog code { background: var(--wsm-panel); color: var(--wsm-text); padding: 1px 6px; border-radius: 4px; font-size: .9em; }

.wsm-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; border-bottom: 1px solid var(--wsm-line); padding-bottom: 10px; }
.wsm-title { font-family: var(--wsm-head); font-size: 1.6rem; font-weight: 700; letter-spacing: .04em; margin: 0; color: var(--wsm-text); display: flex; align-items: center; gap: 8px; }
.wsm-title .wsm-anvil { width: 30px; height: 22px; flex: none; }
.wsm-sub { color: var(--wsm-muted); font-size: .85rem; margin: 2px 0 0; }
.wsm-iconbtn { background: var(--wsm-panel); color: var(--wsm-text); border: 1px solid var(--wsm-line); border-radius: 50%; width: 38px; height: 38px; font-size: 1rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.wsm-iconbtn:hover, .wsm-iconbtn:focus-visible { border-color: var(--wsm-glut); outline: none; }
.wsm-tools { display: flex; gap: 6px; }

/* Brett */
.wsm-board { display: grid; grid-auto-rows: var(--wsm-tile); gap: 6px; justify-content: center; margin: 8px auto 14px; }
.wsm-row { display: grid; grid-template-columns: repeat(5, var(--wsm-tile)); gap: 6px; }
.wsm-row.wsm-shake { animation: wsm-shake .45s; }
.wsm-tile {
  position: relative; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: calc(var(--wsm-tile) * .5); text-transform: uppercase;
  background: var(--wsm-empty); border: 2px solid var(--wsm-line); border-radius: var(--wsm-radius);
  box-shadow: inset 0 -3px 0 rgba(0,0,0,.35);
  color: var(--wsm-text); user-select: none;
}
.wsm-tile.wsm-filled { border-color: #7a6650; animation: wsm-tap .12s; }
.wsm-tile.wsm-glut { background: linear-gradient(180deg, var(--wsm-glut-hi), var(--wsm-glut) 70%); border-color: var(--wsm-glut-hi); color: #2a1204; box-shadow: 0 0 14px rgba(255,140,40,.55), inset 0 -3px 0 rgba(0,0,0,.25); }
.wsm-tile.wsm-kuehl { background: var(--wsm-kuehl); border: 3px solid var(--wsm-kuehl-hi); color: #fff; }
.wsm-tile.wsm-russ { background: var(--wsm-russ); border-color: var(--wsm-russ); color: #9c9186; }
/* Zusatzzeichen für Farbschwache: ▲ richtig, ● andere Stelle */
.wsm-tile.wsm-glut::after, .wsm-tile.wsm-kuehl::after { position: absolute; top: 2px; right: 4px; font-size: calc(var(--wsm-tile) * .16); line-height: 1; }
.wsm-tile.wsm-glut::after { content: "▲"; color: #4a1d00; }
.wsm-tile.wsm-kuehl::after { content: "●"; color: var(--wsm-kuehl-hi); }
.wsm-tile.wsm-strike { animation: wsm-strike .5s ease-out both; }

/* Tastatur */
.wsm-keys { display: flex; flex-direction: column; gap: 6px; user-select: none; }
.wsm-krow { display: flex; gap: 4px; justify-content: center; }
.wsm-key {
  flex: 1 1 0; min-width: 0; max-width: 44px; height: 52px; padding: 0;
  background: #5a4b3b; color: var(--wsm-text); border: 0; border-radius: 5px;
  font-weight: 700; font-size: 1rem; box-shadow: inset 0 -3px 0 rgba(0,0,0,.3);
  touch-action: manipulation;
}
.wsm-key.wsm-wide { flex: 1.6 1 0; max-width: 72px; font-size: .78rem; }
.wsm-key:active { transform: translateY(1px); }
.wsm-key.wsm-glut { background: var(--wsm-glut); color: #2a1204; }
.wsm-key.wsm-kuehl { background: var(--wsm-kuehl); color: #fff; }
.wsm-key.wsm-russ { background: #2a2622; color: #6f665d; }

/* Meldungen und Dialoge */
.wsm-toast { position: relative; height: 0; }
.wsm-toast span { position: absolute; left: 50%; top: -6px; transform: translateX(-50%); background: var(--wsm-text); color: var(--wsm-bg); padding: 8px 14px; border-radius: 6px; font-weight: 700; white-space: nowrap; z-index: 5; box-shadow: 0 4px 16px rgba(0,0,0,.4); }
.wsm-modal { position: fixed; inset: 0; background: rgba(10,8,5,.72); display: flex; align-items: center; justify-content: center; z-index: 99999; padding: 16px; }
.wsm-modal[hidden] { display: none; }
.wsm-dialog { background: var(--wsm-bg2); border: 1px solid var(--wsm-line); border-radius: 12px; max-width: 420px; width: 100%; max-height: 90vh; overflow: auto; padding: 18px; position: relative; color: var(--wsm-text); font-family: var(--wsm-font); }
.wsm-dialog h2 { font-family: var(--wsm-head); margin: 0 0 10px; font-size: 1.35rem; color: var(--wsm-text); }
.wsm-dialog h3 { margin: 14px 0 6px; font-size: 1rem; color: var(--wsm-muted); text-transform: uppercase; letter-spacing: .06em; }
.wsm-dialog p, .wsm-dialog li { font-size: .95rem; }
.wsm-close { position: absolute; top: 10px; right: 10px; }
.wsm-example { display: flex; gap: 4px; margin: 6px 0 2px; --wsm-tile: 38px; }
.wsm-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; text-align: center; }
.wsm-stats b { display: block; font-size: 1.6rem; }
.wsm-stats small { color: var(--wsm-muted); font-size: .72rem; }
.wsm-dist { display: flex; flex-direction: column; gap: 4px; }
.wsm-dist div { display: flex; gap: 6px; align-items: center; font-size: .85rem; }
.wsm-dist span { background: var(--wsm-russ); padding: 1px 8px; text-align: right; min-width: 22px; border-radius: 3px; font-weight: 700; }
.wsm-dist span.wsm-now { background: var(--wsm-glut); color: #2a1204; }
.wsm-btn { background: var(--wsm-glut); color: #2a1204; border: 0; border-radius: 8px; padding: 11px 18px; font-weight: 800; font-size: 1rem; }
.wsm-btn.wsm-ghost { background: transparent; color: var(--wsm-text); border: 1px solid var(--wsm-line); }
.wsm-actions { display: flex; gap: 8px; align-items: center; justify-content: space-between; margin-top: 14px; flex-wrap: wrap; }
.wsm-next { font-size: .85rem; color: var(--wsm-muted); }
.wsm-next b { color: var(--wsm-text); font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.wsm-solution { font-size: 1.1rem; margin: 0 0 10px; }
.wsm-solution b { color: var(--wsm-glut-hi); letter-spacing: .1em; }

@keyframes wsm-tap { 50% { transform: scale(1.08); } }
@keyframes wsm-shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@keyframes wsm-strike {
  0% { transform: translateY(-10px) scale(1.12); filter: brightness(2.2); }
  45% { transform: translateY(0) scale(.96); }
  100% { transform: none; filter: none; }
}
@media (prefers-reduced-motion: reduce) { .wsm *, .wsm *::before { animation: none !important; } }
@media (max-width: 380px) { .wsm { padding: 10px; } .wsm-key { height: 48px; font-size: .9rem; } .wsm-krow { gap: 3px; } }

/* ---------- Twitch-Overlay ---------- */
.wsm.wsm-overlay { max-width: 460px; margin: 0; --wsm-tile: 66px; border: 2px solid var(--wsm-line); box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.wsm-overlay .wsm-head { margin-bottom: 8px; }
.wsm-overlay .wsm-board { margin: 6px auto 10px; }
.wsm-status { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--wsm-panel); border: 1px solid var(--wsm-line); border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; font-size: .95rem; min-height: 44px; }
.wsm-status b { color: var(--wsm-glut-hi); }
.wsm-timer { font-variant-numeric: tabular-nums; font-weight: 800; font-size: 1.3rem; color: var(--wsm-glut-hi); min-width: 2.4em; text-align: right; }
.wsm-bar { height: 4px; background: var(--wsm-russ); border-radius: 2px; overflow: hidden; margin: -4px 0 8px; }
.wsm-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--wsm-glut), var(--wsm-glut-hi)); width: 0; transition: width 1s linear; }
.wsm-votes { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 4px; min-height: 84px; }
.wsm-votes li { display: flex; justify-content: space-between; background: rgba(255,255,255,.04); border-radius: 5px; padding: 3px 10px; font-weight: 700; letter-spacing: .12em; }
.wsm-votes li em { font-style: normal; letter-spacing: 0; color: var(--wsm-muted); font-weight: 600; }
.wsm-mini-keys .wsm-key { height: 30px; font-size: .78rem; max-width: 34px; }
.wsm-mini-keys .wsm-krow { gap: 3px; }
.wsm-mini-keys { gap: 3px; margin-bottom: 8px; }
.wsm-rank { font-size: .85rem; }
.wsm-rank h3 { margin: 0 0 4px; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--wsm-muted); }
.wsm-mini-keys .wsm-key.wsm-wide { display: none; }
.wsm-rank ol { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: 1fr 1fr; column-gap: 18px; row-gap: 2px; }
.wsm-rank li { display: flex; justify-content: space-between; gap: 6px; white-space: nowrap; overflow: hidden; }
.wsm-rank li i { font-style: normal; color: var(--wsm-muted); margin-right: 4px; }
.wsm-rank li b { overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.wsm-rank li span { color: var(--wsm-glut-hi); font-weight: 700; }
.wsm-help { font-size: .82rem; color: var(--wsm-muted); text-align: center; margin-top: 6px; }
.wsm-help code { background: var(--wsm-panel); color: var(--wsm-text); padding: 1px 6px; border-radius: 4px; font-size: .9rem; }
.wsm-conn { width: 10px; height: 10px; border-radius: 50%; background: #8a3b2a; display: inline-block; }
.wsm-conn.wsm-on { background: #5fbf6a; box-shadow: 0 0 6px #5fbf6a; }
.wsm-reject { font-size: .8rem; color: var(--wsm-muted); min-height: 1.2em; text-align: center; }

/* ---------- Link-Seite für Streamer ---------- */
.wsm-form label { display: block; font-weight: 700; margin: 12px 0 4px; }
.wsm-form input, .wsm-form select { width: 100%; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--wsm-line); background: var(--wsm-empty); color: var(--wsm-text); font-size: 1rem; }
.wsm-form .wsm-out { display: flex; gap: 6px; margin-top: 6px; }
.wsm-form .wsm-out input { font-family: Consolas, monospace; font-size: .85rem; }
.wsm-steps { padding-left: 1.2em; }
.wsm-steps li { margin-bottom: 4px; }
.wsm-note { font-size: .85rem; color: var(--wsm-muted); }

/* ---------- Großes Hauptspiel 1920×1080 ---------- */
.wsm-body-gross { padding: 0 !important; margin: 0 !important; overflow: hidden !important; }
.wsm.wsm-gross {
  --wsm-tile: 124px;
  position: relative; width: 1920px; height: 1080px; max-width: none; margin: 0; padding: 44px 72px 48px;
  border: 0; border-radius: 0; box-shadow: none; transform-origin: 0 0; overflow: hidden;
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto 1fr; column-gap: 72px; row-gap: 22px;
  background:
    radial-gradient(60% 45% at 28% 100%, rgba(229,112,31,.30), transparent 70%),
    radial-gradient(70% 60% at 50% -10%, #3d2a16 0%, transparent 65%),
    linear-gradient(180deg, #1b1610 0%, #120e0a 100%);
}
.wsm.wsm-gross::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 160px; pointer-events: none;
  background: radial-gradient(40% 100% at 28% 100%, rgba(255,150,60,.22), transparent 70%);
  animation: wsm-ember 4s ease-in-out infinite alternate;
}
@keyframes wsm-ember { from { opacity: .55; } to { opacity: 1; } }
.wsm-gross .wsm-head { grid-column: 1 / -1; margin: 0; padding-bottom: 18px; border-bottom: 2px solid var(--wsm-line); align-items: flex-end; }
.wsm-gross .wsm-title { font-size: 76px; gap: 20px; line-height: 1; }
.wsm-gross .wsm-title .wsm-anvil { width: 92px; height: 68px; }
.wsm-gross .wsm-sub { font-size: 28px; margin-top: 10px; }
.wsm-gross .wsm-conn { width: 18px; height: 18px; vertical-align: 2px; }
.wsm-callout { text-align: right; font-size: 40px; font-weight: 800; line-height: 1.15; }
.wsm-callout code { font-size: 46px; padding: 4px 18px; border: 2px solid var(--wsm-glut); color: var(--wsm-glut-hi); background: rgba(229,112,31,.12); }
.wsm-callout small { display: block; font-size: 24px; font-weight: 500; color: var(--wsm-muted); margin-top: 8px; }

.wsm-col-main { display: flex; flex-direction: column; align-items: center; min-height: 0; }
.wsm-gross .wsm-board { gap: 12px; margin: 0 0 14px; }
.wsm-gross .wsm-row { gap: 12px; }
.wsm-gross .wsm-tile { border-width: 3px; border-radius: 10px; box-shadow: inset 0 -6px 0 rgba(0,0,0,.35); }
.wsm-gross .wsm-tile.wsm-kuehl { border-width: 5px; }
.wsm-gross .wsm-reject { font-size: 21px; min-height: 30px; margin: 10px 0 6px; text-align: left; }
.wsm-gross .wsm-mini-keys { gap: 6px; margin: 0; align-items: flex-start; }
.wsm-side-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 48px; flex: 1; min-height: 0; }
.wsm-side-grid > div { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.wsm-gross .wsm-mini-keys .wsm-krow { gap: 5px; justify-content: flex-start; }
.wsm-gross .wsm-mini-keys .wsm-key { width: 40px; max-width: 40px; flex: none; height: 46px; font-size: 20px; border-radius: 6px; }
.wsm-gross .wsm-mini-keys .wsm-krow:last-child { padding-left: 45px; }

.wsm-col-side { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.wsm-gross .wsm-status { font-size: 30px; padding: 18px 24px; min-height: 104px; border-radius: 14px; border-width: 2px; margin-bottom: 14px; }
.wsm-gross .wsm-timer { font-size: 64px; line-height: 1; }
.wsm-gross .wsm-bar { height: 10px; border-radius: 5px; margin: 0 0 18px; }
.wsm-label { margin: 6px 0 10px; font-size: 22px; text-transform: uppercase; letter-spacing: .12em; color: var(--wsm-muted); font-weight: 700; }
.wsm-gross .wsm-votes { gap: 8px; min-height: 0; height: 306px; margin: 0 0 12px; }
.wsm-gross .wsm-votes li { font-size: 34px; padding: 6px 18px; border-radius: 10px; letter-spacing: .18em; background: rgba(255,255,255,.05); align-items: center; }
.wsm-gross .wsm-votes li:first-child { background: rgba(229,112,31,.18); outline: 2px solid var(--wsm-glut); }
.wsm-gross .wsm-votes li em { font-size: 26px; }
.wsm-feed { list-style: none; margin: 0; padding: 0; height: 200px; overflow: hidden; display: flex; flex-direction: column; gap: 4px; font-size: 24px; color: var(--wsm-muted); }
.wsm-feed li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: wsm-feed .35s ease-out; }
.wsm-feed li:first-child { color: var(--wsm-text); }
.wsm-feed b { color: var(--wsm-text); }
@keyframes wsm-feed { from { opacity: 0; transform: translateX(-16px); } }
.wsm-gross .wsm-rank { font-size: 25px; margin-top: 4px; }
.wsm-gross .wsm-rank h3 { font-size: 22px; margin-bottom: 10px; letter-spacing: .12em; }
.wsm-gross .wsm-rank ol { grid-template-columns: 1fr; row-gap: 4px; }
.wsm-gross .wsm-votes li.wsm-novote { background: transparent; outline: 2px dashed var(--wsm-line); color: var(--wsm-muted); font-size: 26px; letter-spacing: 0; font-weight: 600; justify-content: center; }

/* ---------- Twitch-Anmeldung auf der Link-Seite ---------- */
.wsm-notice { padding: 10px 14px; border-radius: 8px; font-weight: 600; }
.wsm-notice-good { background: rgba(95,191,106,.15); border: 1px solid #5fbf6a; }
.wsm-notice-bad { background: rgba(229,80,50,.15); border: 1px solid #c8553b; }
.wsm-connected { background: var(--wsm-panel); border: 1px solid var(--wsm-line); border-radius: 8px; padding: 10px 14px; }
.wsm-actions-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 4px; }
.wsm a.wsm-btn.wsm-twitch { display: inline-block; text-decoration: none; background: #7c4dff; color: #fff; }
.wsm-ohne { margin: 12px 0; border: 1px dashed var(--wsm-line); border-radius: 8px; padding: 6px 12px; }
.wsm-ohne summary { cursor: pointer; font-weight: 700; color: var(--wsm-muted); }

/* ---------- Bits-Vorteile im Overlay ---------- */
.wsm-hints { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; padding: 6px 10px; border: 1px dashed var(--wsm-glut); border-radius: 8px; background: rgba(229,112,31,.08); }
.wsm-hints[hidden] { display: none; }
.wsm-hints-label { font-weight: 800; font-size: .85rem; color: var(--wsm-glut-hi); white-space: nowrap; }
.wsm-hints-tiles { display: flex; gap: 4px; }
.wsm-hints .wsm-tile { width: 30px; height: 30px; font-size: 16px; border-width: 1px; }
.wsm-hints .wsm-tile.wsm-glut::after { display: none; }
.wsm-bitsflash { color: var(--wsm-glut-hi) !important; font-weight: 700; }
.wsm-feed li.wsm-bitsfeed { color: var(--wsm-glut-hi); }
.wsm-callout small.wsm-bitshelp { color: var(--wsm-glut-hi); margin-top: 4px; }
.wsm-gross .wsm-hints { padding: 10px 18px; margin-bottom: 14px; border-width: 2px; }
.wsm-gross .wsm-hints-label { font-size: 22px; }
.wsm-gross .wsm-hints .wsm-tile { width: 52px; height: 52px; font-size: 28px; border-width: 2px; }

/* ---------- Bits-Einstellungen auf der Link-Seite ---------- */
.wsm-bits { border: 1px solid var(--wsm-line); border-radius: 10px; padding: 10px 14px 14px; margin: 14px 0 4px; }
.wsm-bits legend { font-weight: 800; padding: 0 6px; }
.wsm-bits-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px 16px; }
.wsm-bits-grid label { margin: 0; font-weight: 700; }
.wsm-bits-grid small { display: block; font-weight: 400; color: var(--wsm-muted); font-size: .8rem; margin: 2px 0 4px; }


/* ---------- Ablauf „Nur auf Befehl“: ein- und ausblenden ---------- */
.wsm.wsm-overlay { transition: opacity .7s ease; }
.wsm.wsm-overlay.wsm-versteckt { opacity: 0; pointer-events: none; }
