/* =========================================================
   Leiterlispiel · Spiel-UI (ergaenzt shared/base.css)
   ========================================================= */
.lede { font-size: 1.12rem; color: var(--ink-soft); max-width: 720px; margin: 0 0 1.8rem; }
.howto__list { margin: 0.4rem 0 0.4rem; padding-left: 1.2rem; color: var(--ink-soft); }
.howto__list li { margin-bottom: 0.5rem; }
.start-meta { color: var(--muted); font-size: 0.9rem; margin-top: 0.9rem; }
.action-bar { margin-top: 1.4rem; display: flex; flex-wrap: wrap; gap: 0.7rem; }
.action-bar--center { justify-content: center; }
.ll-muted { color: var(--muted); font-size: 0.9rem; font-weight: 500; }

/* ---------- Start ---------- */
.ll-modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; margin-bottom: 1.4rem; }
.ll-mode { display: flex; flex-direction: column; gap: 0.75rem; }
.ll-mode h3 { margin: 0; }
.ll-mode p { margin: 0 0 0.2rem; font-size: 0.95rem; }
.ll-field { display: flex; flex-direction: column; gap: 4px; font-size: 0.82rem; font-weight: 600; color: var(--ink-soft); }
.ll-field input, .ll-local-row input, .ll-share input {
  font: inherit; font-size: 1rem; font-weight: 500; color: var(--ink);
  padding: 11px 14px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--gray-50); min-height: 44px; width: 100%;
}
.ll-field input:focus, .ll-local-row input:focus, .ll-share input:focus { outline: 2px solid var(--accent); outline-offset: 0; background: #fff; }
.ll-code-input { text-transform: uppercase; letter-spacing: 0.3em; font-weight: 700 !important; }
.ll-divider { display: flex; align-items: center; gap: 0.7rem; color: var(--muted); font-size: 0.8rem; margin: 0.4rem 0; }
.ll-divider::before, .ll-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.ll-local-list { display: flex; flex-direction: column; gap: 0.5rem; }
.ll-local-row { display: flex; align-items: center; gap: 0.5rem; }
.ll-local-row .ll-swatch { flex: 0 0 18px; }
.ll-local-row button { flex: 0 0 44px; height: 44px; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 1.1rem; color: var(--ink-soft); }
.ll-local-row button:hover { border-color: var(--ink); color: var(--ink); }
.ll-local-actions { display: flex; }
.ll-swatch { width: 18px; height: 18px; border-radius: 50%; display: inline-block; box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgba(0,0,0,0.12); }

/* ---------- Lobby ---------- */
.ll-lobby { max-width: 620px; }
.ll-lobby h3 { margin-top: 1.4rem; }
.ll-lobby__code { display: flex; flex-direction: column; gap: 2px; margin-bottom: 1rem; }
.ll-lobby__label { font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 700; color: var(--muted); }
.ll-code { font-size: 3rem; font-weight: 800; letter-spacing: 0.25em; color: var(--deep-blue); line-height: 1.1; }
.ll-share { display: flex; gap: 0.5rem; }
.ll-share input { font-size: 0.85rem; }
.ll-player-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.45rem; }
.ll-player-list li { display: flex; align-items: center; gap: 0.7rem; padding: 0.55rem 0.8rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; font-weight: 600; }
.ll-player-list .ll-tag { margin-left: auto; font-size: 0.72rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.ll-player-list li.is-turn { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.ll-player-list li.is-off { opacity: 0.55; }
.ll-pos { margin-left: auto; font-variant-numeric: tabular-nums; font-size: 0.9rem; color: var(--ink-soft); font-weight: 700; }

/* ---------- Spiel-Layout ---------- */
.ll-game { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 1.6rem; max-width: 1280px; margin: 0 auto; padding: 1.4rem 1.4rem 3rem; align-items: start; }
.ll-board-wrap { width: 100%; max-width: calc(100vh - 110px); min-width: 280px; justify-self: center; }
.ll-board { position: relative; width: 100%; aspect-ratio: 1 / 1; border: 3px solid var(--ink); border-radius: 6px; background: #fff; overflow: hidden; }
.ll-cells { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); grid-template-rows: repeat(10, minmax(0, 1fr)); }
.ll-cell { position: relative; border-right: 1px solid #DCDCD8; border-bottom: 1px solid #DCDCD8; background: #fff; container-type: size; }
.ll-cell--alt { background: #F3F3F1; }
.ll-cell--quiz { background: #FFF1E8; }
.ll-cell--goal { background: var(--ink); }
.ll-cell__n { position: absolute; left: 6%; top: 3%; font-size: clamp(9px, 20cqw, 15px); font-weight: 700; color: var(--ink); line-height: 1.1; }
.ll-cell--goal .ll-cell__n { color: #fff; }
.ll-cell__tag { position: absolute; left: 5%; right: 5%; bottom: 5%; border-radius: 5px; text-align: center; font-size: clamp(8px, 17cqw, 13px); font-weight: 800; line-height: 1.3; padding: 1px 0; z-index: 3; }
.ll-cell__tag--up { background: #FDE6DA; color: #9A3A0C; box-shadow: 0 0 0 1px var(--accent); }
.ll-cell__tag--down { background: #2E2E2E; color: #fff; }
.ll-cell__quiz { position: absolute; left: 50%; top: 54%; transform: translate(-50%, -50%); width: 46%; aspect-ratio: 1; border-radius: 50%; background: #B4400F; color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: clamp(10px, 26cqw, 22px); }
.ll-cell__start, .ll-cell__goal { position: absolute; left: 0; right: 0; bottom: 8%; text-align: center; font-weight: 800; font-size: clamp(8px, 15cqw, 12px); text-transform: uppercase; letter-spacing: 0.04em; }
.ll-cell__goal { color: #fff; text-transform: none; letter-spacing: 0; line-height: 1.1; }
.ll-overlay { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }
.ll-tokens { position: absolute; inset: 0; pointer-events: none; z-index: 4; }
.ll-token {
  position: absolute; width: 4.4%; aspect-ratio: 1; border-radius: 50%;
  transform: translate(-50%, -50%);
  border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,0.35);
  color: #fff; font-weight: 800; font-size: clamp(8px, 1.5vw, 13px);
  display: flex; align-items: center; justify-content: center;
  transition: left 0.17s ease, top 0.17s ease;
}
.ll-token.is-glide { transition: left 0.8s cubic-bezier(.5,0,.3,1), top 0.8s cubic-bezier(.5,0,.3,1); }
.ll-token.is-turn { box-shadow: 0 0 0 3px var(--accent), 0 2px 8px rgba(0,0,0,0.4); z-index: 2; }

/* ---------- Panel ---------- */
.ll-panel { display: flex; flex-direction: column; gap: 1rem; }
.ll-panel__head { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.ll-panel__head:empty { display: none; }
.ll-turn { padding: 1.1rem 1.2rem; }
.ll-turn__text { font-weight: 700; font-size: 1.05rem; margin-bottom: 0.8rem; line-height: 1.35; }
.ll-dice-row { display: flex; align-items: center; gap: 1rem; }
.ll-dice-row .btn { flex: 1; }
.ll-die {
  flex: 0 0 64px; height: 64px; border-radius: 14px; background: #fff; border: 2px solid var(--ink);
  display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); padding: 9px; gap: 2px;
}
.ll-die i { display: block; border-radius: 50%; background: transparent; margin: 2px; }
.ll-die i.on { background: var(--ink); }
.ll-die.is-rolling { animation: llShake 0.12s linear infinite; }
@keyframes llShake { 0% { transform: rotate(-8deg); } 50% { transform: rotate(8deg); } 100% { transform: rotate(-8deg); } }

.ll-event { padding: 1.1rem 1.2rem; animation: llIn 0.25s ease; }
.ll-event h4 { margin: 0.2rem 0 0.4rem; font-size: 1.1rem; }
.ll-event p { margin: 0 0 0.7rem; font-size: 0.95rem; }
.ll-event__kicker { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.ll-event--up { background: #FFF6F1; border-color: var(--accent); }
.ll-event--up .ll-event__kicker { color: #9A3A0C; }
.ll-event--down { background: #F3F3F1; border-color: #2E2E2E; }
.ll-event--down .ll-event__kicker { color: #2E2E2E; }
.ll-event--quiz .ll-event__kicker { color: #9A3A0C; }
.ll-reflect { font-size: 0.88rem !important; color: var(--muted) !important; font-style: italic; }
.ll-options { display: flex; flex-direction: column; gap: 0.5rem; margin: 0.6rem 0 0.8rem; }
.ll-option { text-align: left; font: inherit; font-size: 0.95rem; font-weight: 600; padding: 0.75rem 0.9rem; min-height: 44px; border: 1.5px solid var(--line); border-radius: var(--radius); background: #fff; color: var(--ink); cursor: pointer; display: flex; gap: 0.6rem; }
.ll-option:hover:not(:disabled) { border-color: var(--ink); }
.ll-option:disabled { cursor: default; }
.ll-option b { color: var(--muted); }
.ll-option.is-right { border-color: var(--success); background: var(--success-soft); }
.ll-option.is-wrong { border-color: var(--error); background: var(--error-soft); }
.ll-result { font-weight: 700; margin-bottom: 0.3rem !important; }
.ll-result--ok { color: var(--success) !important; }
.ll-result--no { color: var(--error) !important; }
@keyframes llIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.ll-legend { border: 1px solid var(--line); border-radius: var(--radius); padding: 0.7rem 0.9rem; background: #fff; }
.ll-legend summary { cursor: pointer; font-weight: 700; font-size: 0.92rem; }
.ll-legend h5 { margin: 0.9rem 0 0.4rem; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.ll-legend__item { font-size: 0.86rem; margin-bottom: 0.55rem; line-height: 1.45; color: var(--ink-soft); }
.ll-legend__item strong { color: var(--ink); }
.ll-log { font-size: 0.85rem; color: var(--muted); display: flex; flex-direction: column; gap: 0.25rem; }
.ll-log div:first-child { color: var(--ink-soft); font-weight: 600; }

/* ---------- Gewonnen ---------- */
.ll-win { position: fixed; inset: 0; background: rgba(20,20,19,0.55); display: flex; align-items: center; justify-content: center; padding: 1.2rem; z-index: 50; animation: llIn 0.3s ease; }
.ll-win__card { background: #fff; border-radius: var(--radius-lg); padding: 2.2rem 2rem 1.6rem; max-width: 520px; width: 100%; text-align: center; box-shadow: var(--shadow-lg); }
.ll-win__card h2 { margin: 0.1rem 0 0.4rem; font-size: 2rem; }
.ll-win__dot { width: 56px; height: 56px; border-radius: 50%; background: var(--accent); margin: 0 auto 1rem; }
.ll-win__cta { margin-top: 1.2rem; }

@media (max-width: 960px) {
  .ll-game { grid-template-columns: minmax(0, 1fr); padding: 0.8rem 0.8rem 2.4rem; }
  .ll-board-wrap { max-width: 640px; }
}
@media (max-width: 720px) {
  .ll-modes { grid-template-columns: minmax(0, 1fr); }
  .ll-code { font-size: 2.4rem; }
  .ll-share { flex-direction: column; }
}
