/* =============================================================
   Klassenkiste – Gestaltung der Tools Ampel, Fünf-Finger,
   Takttimer und Lautstärke-Barometer (Creme-Design, Beamer-tauglich)
   ============================================================= */
:root { --ampel-g: #2fa565; --ampel-y: #f2b705; --ampel-r: #e5484d; }
.fs-btn { font-size: .95rem; }

/* ---------- Verständnis-Ampel: Lehrkraft ---------- */
.ampel-bars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; background: #fff; border-radius: 24px; padding: 1.4rem; box-shadow: 0 10px 30px rgba(120,80,0,.08); }
.ampel-col { display: flex; flex-direction: column; align-items: center; gap: .5rem; text-align: center; }
.ampel-num { font-size: clamp(2.6rem, 7vw, 5rem); font-weight: 900; line-height: 1; }
.ampel-track { width: 70%; height: 220px; background: #f3ecdb; border-radius: 16px; display: flex; align-items: flex-end; overflow: hidden; }
.ampel-fill { width: 100%; border-radius: 16px 16px 0 0; transition: height .6s ease-out; min-height: 6px; }
.ampel-light { width: 3.4rem; height: 3.4rem; border-radius: 50%; box-shadow: 0 0 0 6px #fff, 0 0 0 9px #e6dcc6, 0 6px 16px rgba(0,0,0,.18); }
.ampel-label { font-weight: 800; font-size: clamp(1rem, 2vw, 1.35rem); }
.history-svg { width: 100%; height: 130px; display: block; }
.text-card.note-r { background: #ffe3e3; } .text-card.note-y { background: #fff4c7; }

/* ---------- Verständnis-Ampel: Handy ---------- */
.ampel-vote { display: grid; gap: .8rem; }
.ampel-btn {
  display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.3rem; border-radius: 22px; border: 4px solid transparent;
  font: inherit; font-size: 1.35rem; font-weight: 800; cursor: pointer; color: #fff; box-shadow: 0 5px 0 rgba(0,0,0,.18); text-align: left;
}
.ampel-btn.ampel-g { background: var(--ampel-g); } .ampel-btn.ampel-y { background: var(--ampel-y); color: var(--ink); } .ampel-btn.ampel-r { background: var(--ampel-r); }
.ampel-btn .ampel-emoji { font-size: 2.2rem; }
.ampel-btn.active { border-color: var(--ink); transform: scale(1.03); box-shadow: 0 0 0 5px #fff, 0 8px 20px rgba(0,0,0,.25); }
.ampel-btn.active::after { content: '✓'; margin-left: auto; font-size: 1.8rem; }
.ampel-vote:has(.active) .ampel-btn:not(.active) { opacity: .55; }

/* ---------- Fünf-Finger ---------- */
.hand-svg { width: 100%; height: auto; display: block; }
.finger.tap { cursor: pointer; }
.finger.tap:hover rect:first-child { filter: brightness(1.06); }
.hand-setup { display: grid; grid-template-columns: 220px 1fr; gap: 1.5rem; align-items: start; }
.finger-prompt { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: .5rem; margin-bottom: .7rem; }
.finger-prompt input { grid-column: 1 / -1; }
.finger-dot { width: 1rem; height: 1rem; border-radius: 50%; display: inline-block; box-shadow: 0 0 0 3px #fff, 0 0 0 4px #e6dcc6; }
.finger-head { display: flex; align-items: center; gap: .6rem; font-size: 1.3rem; margin: 0 0 .8rem; }
.hand-results { display: grid; grid-template-columns: minmax(240px, 380px) 1fr; gap: 1.5rem; align-items: start; }
.hand-big { background: #fff; border-radius: 24px; padding: 1rem; box-shadow: 0 10px 30px rgba(120,80,0,.08); }
.hand-vote { width: min(100%, 300px); margin: 0 auto; }
.finger-chips { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; }
.finger-chip { border: 2px solid #efe6d2; background: #fff; border-radius: 99px; padding: .35em .8em; font: inherit; font-size: .9rem; font-weight: 700; cursor: pointer; color: var(--ink); }
.finger-chip.done { background: var(--fc); border-color: var(--fc); color: #fff; }
.finger-chip.now { box-shadow: 0 0 0 3px var(--spark); }
.finger-card { text-align: left; margin: 0; }
.finger-card textarea { margin-top: 0; }

/* ---------- Takttimer ---------- */
.timer-methods .type-card .ic { font-size: 2.4rem; }
.timer-title { text-align: center; font-size: clamp(1.8rem, 4vw, 2.8rem); margin: .5rem 0 0; }
.pickers { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.2rem; }
.picker { background: #fff; border-radius: 26px; padding: 1rem 1.2rem; min-width: 190px; text-align: center; box-shadow: 0 10px 30px rgba(120,80,0,.08); border: 1px solid #f0e8d6; user-select: none; }
.picker-label { font-weight: 800; color: var(--muted); min-height: 2.6em; display: grid; place-items: center; }
.picker-btn { width: 3.4rem; height: 3.4rem; border-radius: 50%; border: none; font-size: 2rem; font-weight: 800; cursor: pointer; color: var(--ink);
  background: radial-gradient(circle at 36% 30%, #fff 0%, #f5f2ec 60%, #e4dfd5 100%); box-shadow: 0 0 0 5px var(--spark); margin: .5rem 0; }
.picker-btn:active { transform: scale(.92); }
.picker-value { font-size: 3.6rem; font-weight: 900; line-height: 1.1; cursor: ns-resize; touch-action: none; padding: .2rem 0; }
.picker-value small { font-size: 1.1rem; color: var(--muted); margin-left: .25rem; }
.phase-strip { display: flex; flex-wrap: wrap; gap: .35rem; justify-content: center; margin-top: .8rem; }
.phase-chip { width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; font-weight: 800;
  background: #fff; box-shadow: 0 0 0 3px #eadfc2; color: var(--muted); }
.phase-chip.short { width: 1.3rem; height: 1.3rem; font-size: 0; align-self: center; }
.phase-chip.done { box-shadow: 0 0 0 3px var(--spark); color: var(--ink); }
.phase-chip.now { background: var(--spark); color: var(--ink); box-shadow: 0 0 0 4px #fff, 0 0 0 7px var(--spark); }
.timer-stage { text-align: center; display: flex; flex-direction: column; align-items: center; gap: .6rem; }
.phase-name { font-size: clamp(2rem, 5.5vw, 4.2rem); font-weight: 900; line-height: 1.1; }
.ring-wrap { position: relative; width: min(46vh, 80vw, 520px); aspect-ratio: 1; }
.ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg { fill: #fff; stroke: #f0e6cf; stroke-width: 14; }
.ring-fg { fill: none; stroke: var(--spark); stroke-width: 14; stroke-linecap: round; transition: stroke-dashoffset .25s linear; }
.countdown { position: absolute; inset: 0; display: grid; place-items: center; font-size: clamp(3.5rem, 12vh, 9rem); font-weight: 900; font-variant-numeric: tabular-nums; }
.countdown.low { color: var(--bad); }
.phase-next { font-size: 1.3rem; color: var(--muted); }
.time-up { display: flex; align-items: center; gap: 1rem; font-size: 1.8rem; font-weight: 900; color: var(--bad); animation: pulse 1s infinite; flex-wrap: wrap; justify-content: center; }
.timer-controls { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; }
.timer-controls .btn { font-size: 1.15rem; padding: .7em 1.2em; }
.timer-options { display: flex; gap: 1.5rem; justify-content: center; flex-wrap: wrap; }

/* ---------- Lautstärke-Barometer ---------- */
.privacy-note-box { background: var(--spark-soft); border-radius: 14px; padding: .7rem 1rem; margin: 0; font-weight: 600; }
.noise-hud { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: .6rem; }
.money { font-size: clamp(2.2rem, 6vw, 4rem); font-weight: 900; font-variant-numeric: tabular-nums; line-height: 1; }
.big-money { font-size: clamp(3rem, 10vw, 6rem); margin: .3rem 0; }
.zone-chip { font-size: clamp(1.1rem, 2.4vw, 1.6rem); font-weight: 900; padding: .45em 1.1em; border-radius: 99px; background: #fff; box-shadow: 0 0 0 4px #eadfc2; }
.zone-chip.calm { box-shadow: 0 0 0 5px var(--ampel-g); } .zone-chip.mid { box-shadow: 0 0 0 5px var(--ampel-y); }
.zone-chip.loud { background: var(--bad); color: #fff; box-shadow: 0 0 0 5px #fff, 0 0 0 9px var(--bad); animation: pulse .8s infinite; }
.stage { position: relative; width: 100%; aspect-ratio: 16 / 9; max-height: 68vh; margin: 0 auto; border-radius: 28px; overflow: hidden;
  container-type: inline-size; box-shadow: 0 0 0 10px var(--spark), 0 18px 40px rgba(120,80,0,.25); background: #fff; }
.stage-bg { position: absolute; inset: 0; width: 100%; height: 100%; }
.slot { position: absolute; transform: translate(-50%, -50%) scale(0); transition: transform .5s cubic-bezier(.3,1.6,.5,1), filter .8s, opacity .8s; line-height: 1; user-select: none; }
.slot.ok, .slot.bad { transform: translate(-50%, -50%) scale(1); }
.slot.leaving { transform: translate(-50%, -50%) scale(1); animation: leave 1.4s ease-in forwards; }
@keyframes leave { 20% { transform: translate(-50%, -60%) scale(1.15) rotate(-8deg); } 100% { transform: translate(250%, -50%) scale(.8); opacity: 0; } }
.slot.burnt { filter: brightness(.3) sepia(1) saturate(2); }
.slot.burnt::after { content: '💨'; position: absolute; left: 30%; top: -70%; font-size: .7em; animation: smoke 1.6s infinite; }
@keyframes smoke { from { transform: translateY(0); opacity: .9; } to { transform: translateY(-60%); opacity: 0; } }
.slot.cold { filter: saturate(.2) hue-rotate(160deg) brightness(1.1); }
.slot.cold::after { content: '❄️'; position: absolute; right: -40%; top: -50%; font-size: .5em; }
.slot.wilted { transform: translate(-50%, -38%) scale(.9) rotate(38deg); filter: grayscale(.85) brightness(.85); }
.stage.chaos { animation: shake .4s infinite; }
.stage.chaos::before { content: ''; position: absolute; inset: 0; box-shadow: inset 0 0 80px rgba(229,72,77,.55); z-index: 2; pointer-events: none; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.stage-msg { position: absolute; left: 50%; bottom: 4%; transform: translateX(-50%); background: rgba(255,255,255,.92); border-radius: 99px;
  padding: .4em 1.2em; font-weight: 800; font-size: clamp(.9rem, 2.2cqw, 1.6rem); z-index: 3; white-space: nowrap; }
.stage-msg:empty { display: none; }
.coin-pop { position: absolute; transform: translate(-50%, -50%); font-weight: 900; font-size: clamp(.9rem, 2.2cqw, 1.6rem); color: #2f8a52; z-index: 3;
  animation: coin 1.5s ease-out forwards; white-space: nowrap; text-shadow: 0 1px 0 #fff; }
@keyframes coin { from { opacity: 1; transform: translate(-50%, -50%); } to { opacity: 0; transform: translate(-50%, -260%); } }
.meter-row { display: flex; gap: 1.2rem; align-items: center; flex-wrap: wrap; justify-content: center; }
.meter { position: relative; flex: 1; min-width: 220px; height: 22px; background: #fff; border-radius: 99px; box-shadow: inset 0 0 0 2px #efe6d2; overflow: hidden; }
.meter-fill { height: 100%; border-radius: 99px; transition: width .1s linear; }
.meter-fill.calm { background: var(--ampel-g); } .meter-fill.mid { background: var(--ampel-y); } .meter-fill.loud { background: var(--ampel-r); }
.meter-mark { position: absolute; top: 0; bottom: 0; width: 3px; background: var(--ink); opacity: .5; }
.meter-mark.loud { opacity: .9; }
.meter-slider { display: flex; align-items: center; gap: .5rem; margin: 0; font-weight: 700; }
.record-banner { background: var(--spark); border-radius: 99px; padding: .5em 1.2em; font-weight: 900; font-size: 1.3rem; display: inline-block; animation: pulse 1s 3; }
.score-table tr.me td { background: var(--spark-soft); }
.confetti { position: fixed; top: -2rem; font-size: 2rem; z-index: 200; animation: fall 3.5s linear forwards; pointer-events: none; }
@keyframes fall { to { transform: translateY(110vh) rotate(540deg); } }

/* ---------- Handy & schmale Bildschirme ---------- */
@media (max-width: 760px) {
  .hand-setup, .hand-results { grid-template-columns: 1fr; }
  .hand-mini { width: 160px; margin: 0 auto; }
  .ampel-bars { gap: .5rem; padding: 1rem .6rem; }
  .ampel-track { height: 150px; }
  .picker { min-width: 150px; }
}
/* Vollbild am Beamer: Kopfzeile schlank */
:fullscreen .host-bar { padding: .4rem 1rem; }
.gate-input { font-size: 2rem !important; text-align: center; letter-spacing: .3em; font-weight: 800 !important; }
