/* Lehrzeug Belohnomat – werkzeugeigenes Design. Gemeinsames Design: /kern/kern.css */
.bm-grid { grid-template-columns: 340px minmax(0, 1fr); }
.bm-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.bm-scenes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.bm-scenes label { position: relative; }
.bm-scenes input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.bm-scenes span { display: flex; align-items: center; gap: 8px; padding: 10px; border-radius: 12px; border: 1.5px solid var(--line-2); background: var(--surface-2); font-size: 14px; font-weight: 600; cursor: pointer; }
.bm-scenes span .i { width: 22px; height: 22px; color: var(--ink-2); flex: none; }
.bm-scenes input:checked + span { border-color: var(--teal); background: var(--teal-soft); color: var(--teal-ink); box-shadow: inset 0 0 0 1px var(--teal); }
.bm-scenes input:checked + span .i { color: var(--teal-ink); }
.bm-scenes input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.bm-list { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 4px; }
.bm-list li { display: flex; justify-content: space-between; gap: 8px; padding: 6px 10px; border-radius: 10px; background: var(--surface-2); font-size: 14px; }
.bm-list b { color: var(--teal-ink); }
.bm-list small { color: var(--ink-2); flex: none; }
.bm-list .bm-none { color: var(--ink-2); background: none; padding-left: 0; }
textarea.input { resize: vertical; min-height: 5em; line-height: 1.4; }

.bm-main { padding: 16px; }
.bm-wrap { display: grid; gap: 12px; }
.bm-frame { position: relative; border-radius: 22px; overflow: hidden; background: #8FD0FF; box-shadow: 0 18px 40px -22px rgba(7, 27, 74, .55), inset 0 0 0 3px rgba(255, 255, 255, .5); }
.bm-stage { width: 100%; aspect-ratio: 1000 / 600; }
.bm-svg { width: 100%; height: 100%; display: block; }
.bm-sign { position: absolute; left: 14px; top: 12px; display: flex; flex-direction: column; padding: 8px 16px; border-radius: 14px; background: #B07A3F; color: #fff; border: 3px solid #8A5A2B; box-shadow: 0 6px 0 #8A5A2B, 0 12px 20px -10px rgba(0, 0, 0, .5); transform: rotate(-1.5deg); }
.bm-sign b { font-size: clamp(.95rem, 2.2vw, 1.5rem); line-height: 1.1; }
.bm-sign span { font-size: clamp(.72rem, 1.4vw, .95rem); opacity: .9; font-weight: 500; }
.bm-sign span:empty { display: none; }
.bm-clock { position: absolute; right: 14px; top: 12px; min-width: 120px; padding: 8px 14px 10px; border-radius: 16px; background: rgba(7, 27, 74, .78); color: #fff; text-align: center; }
.bm-count { display: block; font-size: clamp(1.4rem, 4vw, 2.6rem); font-weight: 700; line-height: 1.05; font-variant-numeric: tabular-nums; }
.bm-bar { display: block; height: 7px; border-radius: 4px; background: rgba(255, 255, 255, .22); overflow: hidden; margin-top: 6px; }
.bm-bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #12C7A3, #FFD23F); border-radius: 4px; transition: width .5s ease; }
.bm-status { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); margin: 0; padding: 6px 18px; border-radius: 99px; background: rgba(255, 255, 255, .92); color: var(--navy, #071B4A); font-weight: 700; font-size: clamp(.8rem, 1.6vw, 1.1rem); box-shadow: 0 6px 18px -8px rgba(7, 27, 74, .5); white-space: nowrap; }
.bm-goalbtn { position: absolute; left: 16px; top: 50%; translate: 0 -50%; animation: bmpulse 1.4s ease-in-out infinite; box-shadow: 0 14px 40px -10px rgba(0, 0, 0, .55); font-size: clamp(1rem, 2.4vw, 1.6rem); padding: 14px 28px; }
.bm-goalbtn[hidden] { display: none; }
@keyframes bmpulse { 50% { transform: scale(1.07); } }
.bm-floats { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.bm-float { position: absolute; left: 50%; top: 26%; translate: -50% 0; padding: 8px 22px; border-radius: 99px; background: #fff; color: #071B4A; font-weight: 700; font-size: clamp(1rem, 3vw, 2rem); box-shadow: 0 12px 30px -10px rgba(7, 27, 74, .6); white-space: nowrap; animation: bmfloat 2.1s ease-out forwards; }
@keyframes bmfloat { 0% { opacity: 0; transform: translateY(30px) scale(.7); } 15% { opacity: 1; transform: translateY(0) scale(1.08); } 70% { opacity: 1; } 100% { opacity: 0; transform: translateY(-50px) scale(1); } }
.bm-spark { position: absolute; width: 14px; height: 14px; border-radius: 3px; opacity: 0; animation: bmspark 1.6s ease-out forwards; }
@keyframes bmspark { 0% { opacity: 0; transform: scale(0) rotate(0); } 30% { opacity: 1; transform: scale(1.4) rotate(90deg); } 100% { opacity: 0; transform: scale(.4) rotate(260deg) translateY(40px); } }

.bm-boosts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.bm-boost { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 99px; border: 2px solid var(--line-2); background: var(--surface); font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; color: var(--ink); }
.bm-boost b { color: var(--teal-ink); font-size: 15px; }
.bm-boost kbd { font-size: 10px; padding: 0 4px; border-width: 1px; opacity: .6; }
.bm-boost:hover { border-color: var(--teal); background: var(--teal-soft); }
.bm-boost:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.bm-autorow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; color: var(--ink-2); }
.bm-autorow[hidden] { display: none; }
.bm-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.bm-spacer { flex: 1; }
.bm-keys { margin-top: 10px; }

/* Kapselautomat */
.bm-machwrap { position: absolute; inset: 0; z-index: 5; }
.bm-machwrap[hidden] { display: none; }
.bm-mach { position: absolute; inset: 0; }
.bm-x { position: absolute; right: 12px; top: 12px; background: rgba(255, 255, 255, .9); border-radius: 50%; }
.bm-crank { position: absolute; left: 66%; top: 62%; animation: bmpulse 1.4s ease-in-out infinite; }
.bm-crank[hidden] { display: none; }
.bm-prize { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; background: rgba(7, 27, 74, .55); }
.bm-prize[hidden] { display: none; }
.bm-prize-in { max-width: 640px; width: 100%; background: #fff; color: #071B4A; border-radius: 28px; padding: clamp(14px, 3vw, 30px); text-align: center; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .7); animation: bmprize .6s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes bmprize { from { opacity: 0; transform: scale(.4) rotate(-6deg); } to { opacity: 1; transform: none; } }
.bm-prize-ico { display: inline-grid; place-items: center; width: clamp(54px, 10vw, 96px); height: clamp(54px, 10vw, 96px); border-radius: 50%; background: #FFE9A8; color: #B87800; }
.bm-prize-ico .i { width: 56%; height: 56%; }
.bm-prize-k { margin: 8px 0 0; font-weight: 600; color: #4A5675; font-size: clamp(.85rem, 1.8vw, 1.1rem); }
.bm-prize h3 { margin: 4px 0 8px; font-size: clamp(1.3rem, 4.4vw, 2.8rem); line-height: 1.15; letter-spacing: -.01em; }
.bm-prize-why { margin: 0 0 12px; font-size: clamp(.8rem, 1.5vw, .95rem); color: #4A5675; }
.bm-prize-why:empty { display: none; }
.bm-prize .btn-row { justify-content: center; }

/* Szenen-Animationen */
.bm-spin { animation: bmspin 24s linear infinite; }
.bm-spin { transform-box: fill-box; transform-origin: center; }
@keyframes bmspin { to { transform: rotate(360deg); } }
.bm-drift { animation: bmdrift 26s ease-in-out infinite alternate; }
.bm-drift2 { animation: bmdrift 32s ease-in-out infinite alternate-reverse; }
@keyframes bmdrift { from { transform: translateX(-24px); } to { transform: translateX(34px); } }
.bm-twinkle { animation: bmtw 2.4s ease-in-out infinite; }
@keyframes bmtw { 50% { opacity: .25; } }
.bm-drop { animation: bmrain .8s linear infinite; }
@keyframes bmrain { from { transform: translateY(0); opacity: 0; } 20% { opacity: 1; } to { transform: translateY(330px); opacity: .1; } }
.bm-flame { animation: bmflame .18s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: top center; }
@keyframes bmflame { from { transform: scaleY(.8); } to { transform: scaleY(1.2); } }
.bm-shake { animation: bmshake .16s linear infinite; transform-box: fill-box; transform-origin: center; }
@keyframes bmshake { 0% { transform: translate(0, 0) rotate(0); } 25% { transform: translate(-6px, 4px) rotate(-3deg); } 50% { transform: translate(5px, -5px) rotate(2deg); } 75% { transform: translate(-4px, -3px) rotate(-2deg); } 100% { transform: translate(0, 0); } }

.bm-wrap.is-full { background: #050D22; padding: 12px; height: 100vh; grid-template-rows: 1fr auto auto auto; align-content: center; }
.bm-wrap.is-full .bm-frame { width: min(100%, calc((100vh - 170px) * 1000 / 600)); margin: 0 auto; }
.bm-wrap.is-full .bm-boost, .bm-wrap.is-full .bm-tools .btn-secondary, .bm-wrap.is-full .bm-tools .btn-ghost { background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .25); }
.bm-wrap.is-full .icon-btn, .bm-wrap.is-full .bm-autorow { color: #fff; }
.bm-wrap.is-full .bm-x { color: #071B4A; }
@media (prefers-reduced-motion: reduce) { .bm-svg *, .bm-goalbtn, .bm-crank, .bm-prize-in, .bm-float, .bm-spark { animation: none !important; } .bm-float { opacity: 1; } }
@media (max-width: 980px) { .bm-grid { grid-template-columns: minmax(0, 1fr); } .bm-main { order: -1; } }
@media (max-width: 520px) { .bm-clock { min-width: 84px; padding: 5px 9px 7px; } .bm-sign { padding: 5px 10px; } .bm-status { font-size: .75rem; padding: 4px 12px; } }
@media (max-width: 640px) { .bm-crank { left: 50%; top: auto; bottom: 2%; translate: -50% 0; } }

.bm-wrap.is-pseudo { position: fixed; inset: 0; z-index: 2000; }
html.bm-noscroll, html.bm-noscroll body { overflow: hidden; }
.bm-boost, .bm-tools .btn, .bm-crank, .bm-goalbtn { touch-action: manipulation; -webkit-tap-highlight-color: transparent; min-height: 44px; }
