/* Herausforderungen: Duell, Gruppen, Team-Insel, Wochen-Challenge (passt zu site.css) */

.duel-page .container { max-width: 980px; }
.duel-hero { margin-bottom: clamp(24px, 4vw, 40px); }
.duel-hero-center { text-align: center; }
.duel-hero-center .section-lead { margin-inline: auto; }
.duel-title { font-size: clamp(40px, 8vw, 86px); margin: 0 0 16px; overflow-wrap: anywhere; }
.duel-h2 { font: 400 clamp(22px, 3.4vw, 30px)/1.05 var(--display); text-transform: uppercase; letter-spacing: .02em; margin: 0 0 14px; color: #fff; }
.small { font-size: 13.5px; }
.duel-timer { display: inline-flex; gap: 8px; margin: 18px 0 0; padding: 8px 14px; border-radius: 999px; background: rgba(0, 0, 0, .4);
  border: 1px solid var(--line-2); font-weight: 800; color: var(--gold); }

.duel-steps { list-style: none; margin: 26px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.duel-steps li { display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 10px; border-radius: 14px; background: rgba(0, 0, 0, .35); border: 1px solid var(--line); font-weight: 700; }
.duel-steps b { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--gold-grad); color: #000; border: 2px solid #000; font: 400 17px/1 var(--display); }

.duel-games { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); margin-bottom: 18px; }
.duel-game { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 22px 18px; border-radius: 22px; cursor: pointer; color: var(--text);
  background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .02)); border: 2px solid var(--line); transition: transform .25s var(--ease-spring), border-color .2s, box-shadow .2s; font: inherit; }
.duel-game img { width: 64px; height: 64px; border-radius: 16px; box-shadow: 0 0 0 2px #000, 4px 5px 0 #000; }
.duel-game b { font: 400 26px/1 var(--display); text-transform: uppercase; }
.duel-game span { color: var(--muted); font-size: 14.5px; }
.duel-game:hover { transform: translateY(-3px); }
.duel-game[aria-checked="true"] { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(var(--glow-rgb), .25), 0 18px 40px -16px rgba(var(--glow-rgb), .6); }

.duel-setup { display: grid; gap: 6px; margin-bottom: 26px; }
.duel-setup .btn-lg, .duel-join .btn-lg { width: 100%; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-btn { padding: 9px 14px; border-radius: 999px; border: 1.5px solid var(--line-2); background: rgba(0, 0, 0, .35); color: var(--text); font: 700 14.5px/1 var(--sans, inherit); cursor: pointer; }
.chip-btn[aria-checked="true"] { background: var(--gold-grad); color: #000; border-color: #000; }

.duel-more { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.duel-more-card { display: grid; gap: 6px; text-decoration: none; color: var(--text); text-align: left; cursor: pointer; font: inherit; }
.duel-more-card > span:first-child { font-size: 30px; }
.duel-more-card b { font-size: 17px; }
.duel-more-card span:last-child { color: var(--muted); font-size: 14.5px; }

.duel-join { max-width: 560px; margin: 0 auto 22px; display: grid; gap: 6px; }
.duel-board { margin-bottom: 22px; }
.duel-cols { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); align-items: start; }
.duel-cols .duel-join { margin: 0; max-width: none; }
.duel-report { text-align: center; }
.duel-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 22px 0 6px; }
.account-hint { text-align: center; }

.rank-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rank-list li { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; background: rgba(0, 0, 0, .3); border: 1px solid var(--line); }
.rank-list li.muted { display: block; text-align: center; }
.rank-list li.is-me { border-color: var(--gold); background: rgba(var(--accent-rgb), .1); }
.rank-list .rk { font-weight: 900; font-size: 18px; text-align: center; }
.rank-list .nm { overflow-wrap: anywhere; font-weight: 700; }
.rank-list b { font-variant-numeric: tabular-nums; color: var(--gold); white-space: nowrap; }
.title-chip, .me-chip { font-style: normal; font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 2px 7px; border-radius: 999px; vertical-align: 1px; }
.title-chip { background: rgba(var(--accent-rgb), .18); color: var(--gold); border: 1px solid rgba(var(--accent-rgb), .45); }
.me-chip { background: var(--gold); color: #000; }

.outcome-card { text-align: center; margin-bottom: 22px; }
.outcome-title { font: 400 clamp(24px, 4vw, 36px)/1.1 var(--display); text-transform: uppercase; margin: 0 0 18px; }
.outcome-title.win { color: var(--gold); }
.outcome-title.lose { color: #ff9aab; }
.outcome-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

.share-card { margin-bottom: 22px; }
.share-texts { display: grid; gap: 8px; margin-bottom: 14px; }
.share-text { text-align: left; padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--line-2); background: rgba(0, 0, 0, .3); color: var(--text); font: inherit; cursor: pointer; }
.share-text[aria-checked="true"] { border-color: var(--gold); background: rgba(var(--accent-rgb), .1); }
.share-text[aria-checked="true"]::before { content: "✔ "; color: var(--gold); font-weight: 900; }
.share-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.share-actions [data-wa] { --b-bg: linear-gradient(180deg, #4be37a, #1fae4f); --b-fg: #04210e; }
.share-url { margin: 12px 0 0; color: var(--muted); font-size: 13.5px; overflow-wrap: anywhere; }

.review-card { margin: 18px 0 0; text-align: left; }
.review-card summary { cursor: pointer; font-weight: 800; color: var(--gold); }
.quiz-review { margin: 14px 0 0; padding-left: 20px; display: grid; gap: 10px; }
.quiz-review li { display: grid; gap: 3px; }
.quiz-review li.ok b { color: var(--green, #5ee08a); }
.quiz-review li.bad b { color: #ff9aab; }
.quiz-review small { color: var(--muted); }

/* ── Runde ── */
.round-wrap { display: grid; place-items: center; }
.round { width: min(620px, 100%); }
.round-note { text-align: center; color: var(--gold); font-weight: 700; }
.round-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 14px; color: var(--muted); font-weight: 700; }
.round-head b { color: var(--gold); }

.quiz-timer { height: 8px; border-radius: 8px; background: rgba(255, 255, 255, .08); overflow: hidden; margin-bottom: 18px; }
.quiz-timer span { display: block; height: 100%; width: 100%; background: var(--gold-grad); transition: width .1s linear; }
.quiz-timer span.is-low { background: linear-gradient(90deg, #ff6b7d, #ff1f3d); }
.quiz-cat { color: var(--muted); margin: 0 0 6px; font-weight: 700; }
.quiz-q { font-size: clamp(20px, 3.4vw, 27px); line-height: 1.25; margin: 0 0 20px; }
.quiz-options { display: grid; gap: 10px; }
.quiz-opt { display: flex; align-items: center; gap: 14px; padding: 15px 16px; border-radius: 16px; border: 2px solid var(--line-2); background: rgba(0, 0, 0, .35);
  color: var(--text); font: 600 16.5px/1.3 var(--sans, inherit); text-align: left; cursor: pointer; transition: transform .15s, border-color .15s, background .15s; }
.quiz-opt b { display: grid; place-items: center; flex: 0 0 34px; height: 34px; border-radius: 10px; background: rgba(255, 255, 255, .08); font-weight: 900; }
.quiz-opt:hover:not(:disabled) { border-color: var(--gold); transform: translateX(3px); }
.quiz-opt.is-picked { border-color: var(--gold); background: rgba(var(--accent-rgb), .18); }
.quiz-opt.is-picked b { background: var(--gold-grad); color: #000; }

.block-score { display: flex; align-items: baseline; justify-content: center; gap: 10px; margin-bottom: 12px; }
.block-score span { color: var(--muted); font-weight: 700; }
.block-score b { font: 400 44px/1 var(--display); color: var(--gold); }
.block-score em { font-style: normal; font-weight: 800; color: #5ee08a; min-width: 6ch; }
.block-board { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 4px; padding: 10px; border-radius: 18px; background: #1b2136;
  border: 3px solid #000; box-shadow: 6px 7px 0 #000; aspect-ratio: 1; width: min(100%, 440px); margin: 0 auto 16px; touch-action: manipulation; }
.block-board i { border-radius: 6px; background: #262e4a; transition: background .12s; cursor: pointer; }
.block-board i.on { box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .25), inset 0 3px 0 rgba(255, 255, 255, .25); }
.block-board i.ghost { background: rgba(255, 214, 46, .55) !important; }
.block-board i.nope { background: rgba(255, 31, 61, .45) !important; }
.block-tray { display: flex; justify-content: center; gap: 14px; min-height: 110px; align-items: center; margin-bottom: 8px; }
.block-piece { display: grid; grid-template-columns: repeat(var(--w), 18px); grid-auto-rows: 18px; gap: 3px; padding: 10px; border-radius: 14px;
  border: 2px solid var(--line-2); background: rgba(0, 0, 0, .35); cursor: pointer; transition: transform .15s, border-color .15s; min-width: 64px; min-height: 64px; place-content: center; }
.block-piece i { border-radius: 4px; }
.block-piece.is-selected { border-color: var(--gold); transform: translateY(-4px); box-shadow: 0 10px 24px -10px rgba(var(--glow-rgb), .8); }
.block-piece.is-stuck { opacity: .45; }
.block-piece.is-used { visibility: hidden; }
.block-help { text-align: center; }
.round [data-giveup] { display: block; margin: 10px auto 0; }

.klick-score { text-align: center; margin-bottom: 10px; }
.klick-score b { display: block; font: 400 64px/1 var(--display); color: var(--gold); }
.klick-score span { color: var(--muted); font-weight: 700; }
.klick-field { position: relative; height: min(62vh, 440px); border-radius: 24px; border: 3px solid #000; box-shadow: 6px 7px 0 #000; overflow: hidden;
  background: radial-gradient(80% 70% at 50% 40%, #3b2f57, #120f1f); display: grid; place-items: center; touch-action: manipulation; user-select: none; }
.klick-ore { width: min(46vw, 210px); aspect-ratio: 1; border-radius: 28px; border: 4px solid #000; cursor: pointer;
  background: linear-gradient(135deg, #8f8a99 0 25%, #6f6a7a 25% 50%, #8f8a99 50% 75%, #6f6a7a 75%) 0 0 / 52px 52px;
  box-shadow: inset 0 -10px 0 rgba(0, 0, 0, .3), 7px 8px 0 #000; font-size: min(22vw, 96px); display: grid; place-items: center; }
.klick-ore:disabled { filter: grayscale(.6); cursor: default; }
.klick-count { position: absolute; inset: 0; display: grid; place-items: center; font: 400 96px/1 var(--display); color: #fff; -webkit-text-stroke: 3px #000; background: rgba(0, 0, 0, .45); pointer-events: none; }
.klick-bonus { position: absolute; translate: -50% -50%; width: 66px; height: 66px; border-radius: 50%; border: 3px solid #000; font-size: 34px; cursor: pointer;
  background: radial-gradient(circle at 35% 30%, #fff6a3, #ffd21f 45%, #ff9a0a); box-shadow: 0 0 30px rgba(255, 210, 31, .9); animation: bonus-pop .3s var(--ease-spring); }
.klick-bonus.is-hit { animation: bonus-hit .3s forwards; }
.klick-pop { position: absolute; translate: -50% -50%; font: 400 26px/1 var(--display); color: var(--gold); -webkit-text-stroke: 1.5px #000; pointer-events: none; animation: pop-up .6s forwards; }
@keyframes bonus-pop { from { scale: 0; } to { scale: 1; } }
@keyframes bonus-hit { to { scale: 1.6; opacity: 0; } }
@keyframes pop-up { to { translate: -50% -140%; opacity: 0; } }

/* ── Gruppe ── */
.vs-card { margin-bottom: 22px; }
.vs-row { display: grid; grid-template-columns: minmax(0, 180px) 1fr auto; gap: 12px; align-items: center; margin-bottom: 10px; font-weight: 700; }
.vs-row .bar { height: 16px; border-radius: 10px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.vs-row .bar span { display: block; height: 100%; background: var(--gold-grad); }
.vs-row.rest .bar span { background: linear-gradient(90deg, #8c7bff, #4fc3f7); }
.vs-row b { color: var(--gold); white-space: nowrap; }
.vs-verdict { margin: 6px 0 0; font-weight: 800; text-align: center; }

/* ── Insel ── */
.island-layout { display: grid; gap: 22px; grid-template-columns: 1.25fr 1fr; align-items: start; }
.island-card { padding: 12px; }
.island-art svg { display: block; width: 100%; height: auto; border-radius: 18px; border: 3px solid #000; }
.island-progress { padding: 12px 6px 4px; }
.island-progress .bar { height: 14px; border-radius: 10px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.island-progress .bar span { display: block; height: 100%; background: var(--gold-grad); transition: width .6s var(--ease-out); }
.island-side .duel-join { margin: 0 0 22px; max-width: none; }

/* ── Challenge ── */
.challenge-tabs { max-width: 560px; margin: 0 auto 22px; }
.challenge-tabs button { flex: 1; }
.awen-score { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 14px 16px; border-radius: 16px; margin-bottom: 8px;
  background: var(--gold-grad); color: #000; border: 2px solid #000; box-shadow: 0 4px 0 #000; }
.awen-score span { font-weight: 800; }
.awen-score b { font: 400 32px/1 var(--display); }

@media (max-width: 760px) {
  .island-layout { grid-template-columns: 1fr; }
  .vs-row { grid-template-columns: 1fr auto; }
  .vs-row .bar { grid-column: 1 / -1; order: 3; }
  .block-piece { grid-template-columns: repeat(var(--w), 14px); grid-auto-rows: 14px; }
}
