/* Zeichnen & Raten – gemeinsam */
.dr-canvas { display: block; width: 100%; aspect-ratio: 4 / 3; background: #fff; border-radius: 14px; box-shadow: 0 8px 30px rgba(0,0,0,.35); }
.dr-canvas.drawing { touch-action: none; cursor: crosshair; }

/* ───────────── Fernseher ───────────── */
.dg-main { display: grid; grid-template-columns: minmax(0, 1fr) 26rem; gap: 1.5rem; padding: 0 1.5rem 1.5rem; min-height: 0; }
.dg-stage { display: grid; grid-template-rows: auto auto minmax(0, 1fr); gap: .8rem; min-height: 0; }
.dg-top { display: grid; grid-template-columns: auto 1fr; gap: 1.2rem; align-items: center; }
.dg-who { display: flex; align-items: center; gap: .6rem; font-size: 1.6rem; white-space: nowrap; }
.dg-who .avatar { font-size: 1.3rem; }
.dg-timer { margin-top: 0; }
.dg-mask { display: grid; justify-items: center; gap: .3rem; min-height: 3.6rem; }
.dg-mask-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-end; gap: .45rem; }
.dg-mask-row.ru { opacity: .85; }
.dg-mask-row.ru span { border-bottom-color: #b9c3ff; width: 1.6rem; height: 2.1rem; font-size: 1.5rem; }
.dg-mask-row.ru .dg-len { font-size: .95rem; }
.dg-solution-ru { font-size: .55em; color: #b9c3ff; font-weight: 500; }
.dg-mask span { width: 2.4rem; height: 3.2rem; border-bottom: .3rem solid var(--accent); display: grid; place-items: center; font-size: 2.3rem; font-weight: 700; text-transform: uppercase; }
.dg-mask i.sp { width: 1.4rem; }
.dg-len { font-style: normal; color: var(--muted); font-size: 1.1rem; margin-left: 1rem; align-self: center; }
.dg-solution { font-size: 3rem; font-weight: 700; color: var(--accent); letter-spacing: .04em; }
.dg-canvas-wrap { min-height: 0; display: grid; place-items: center; container-type: size; }
.dg-canvas-wrap .dr-canvas { width: min(100cqw, 133.33cqh); height: auto; border-radius: 22px; }
.dg-side { display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 1rem; min-height: 0; }
.dg-scores .score-row { grid-template-columns: 1.4rem auto 1fr 1.6rem auto auto; }
.score-row.done { background: rgba(61,220,132,.14); }
.dg-mark { text-align: center; }
.dg-feed-box { background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 1rem; display: grid; grid-template-rows: auto minmax(0, 1fr); min-height: 0; }
.dg-feed { overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; gap: .35rem; }
.feed-row { display: flex; align-items: center; gap: .5rem; font-size: 1.4rem; font-weight: 500; padding: .25rem .5rem; border-radius: 12px; animation: pop .3s ease-out; }
.feed-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-row.correct { background: rgba(61,220,132,.2); color: #b6ffd6; }
.feed-row.close { background: rgba(255,212,59,.16); color: #ffe58a; }
.feed-row.buzz { background: rgba(255,92,122,.22); color: #ffb3c1; font-weight: 700; justify-content: center; }
.feed-hint { color: var(--muted); font-size: 1.3rem; text-align: center; margin: auto 0; line-height: 1.4; }
.dg-canvas-wrap.flash-wrong .dr-canvas { animation: flashWrong .7s ease-out; }
@keyframes flashWrong { 0% { box-shadow: 0 0 0 12px #ff5c7a, 0 0 80px #ff5c7a; transform: translateX(-10px); } 20% { transform: translateX(10px); } 40% { transform: translateX(-6px); } 60% { transform: translateX(4px); } 100% { box-shadow: 0 8px 30px rgba(0,0,0,.35); transform: none; } }
.qp-overlay.corner { place-items: end end; padding: 1.5rem; background: transparent; }
.dg-reveal { width: 26rem; max-height: calc(100vh - 12rem); padding: 1.2rem 1.4rem; }
.dg-reveal .title { font-size: 2.6rem; color: var(--accent); }
.dg-reveal .res-row { font-size: 1.2rem; grid-template-columns: auto 1fr auto auto; }
.dg-choose { margin-top: 1rem; }
.dg-podium { max-height: 94vh; overflow: hidden; }
.podium.small .pod { width: 13rem; }
.podium.small .pod.p1 .pod-block { height: 8rem; }
.podium.small .pod.p2 .pod-block { height: 6rem; }
.podium.small .pod.p3 .pod-block { height: 4.5rem; }
.podium.small .avatar.xl { font-size: 2rem; }
.dg-gallery { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; margin-top: 1rem; max-height: 46vh; overflow: hidden; }
.dg-gallery .dg-frame { width: clamp(12rem, 18vw, 19rem); }
.dg-frame { margin: 0; background: var(--panel); border-radius: 16px; padding: .5rem; animation: pop .5s ease-out both; }
.dg-frame canvas { width: 100%; height: auto; border-radius: 10px; display: block; background: #fff; }
.dg-frame figcaption { font-size: 1rem; margin-top: .4rem; line-height: 1.35; }
.dg-frame.fav { box-shadow: 0 0 0 3px var(--accent), 0 0 30px rgba(255,212,59,.4); }

/* ───────────── Handy ───────────── */
.dr-main { padding-top: 10px !important; }
.dr-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 1.05rem; }
.dr-word { color: var(--accent); font-size: 1.3rem; }
.dr-time { font-weight: 700; font-size: 1.4rem; font-variant-numeric: tabular-nums; min-width: 2.2em; text-align: right; }
.dr-time.hurry { color: #ff8fa3; }
.dr-bar { height: 6px; background: var(--panel); border-radius: 999px; overflow: hidden; margin: 6px 0 8px; }
.dr-bar div { height: 100%; width: 100%; background: linear-gradient(90deg, #3ddc84, #ffd43b); transition: width .25s linear; }
.dr-canvas-wrap.small { width: 78%; margin: 0 auto 10px; }
.dr-palette { display: grid; grid-template-columns: repeat(10, 1fr); gap: 5px; margin-top: 10px; }
.dr-color { aspect-ratio: 1; border-radius: 50%; border: 3px solid rgba(255,255,255,.25); padding: 0; min-width: 0; }
.dr-color.sel { border-color: #fff; transform: scale(1.15); box-shadow: 0 0 0 2px var(--accent); }
.dr-tools { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-top: 8px; }
.dr-size, .dr-tool { height: 44px; border-radius: 12px; background: var(--panel-strong); display: grid; place-items: center; font-size: 1.3rem; padding: 0; }
.dr-size i { display: block; background: #fff; border-radius: 50%; }
.dr-size.sel, .dr-tool.sel { background: var(--accent); }
.dr-size.sel i { background: #1d1458; }
.dr-status { text-align: center; color: var(--muted); margin-top: 10px; }
.dr-mask { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin-bottom: 10px; }
.dr-mask span { flex: 1 1 0; max-width: 22px; min-width: 9px; height: 30px; border-bottom: 3px solid var(--accent); display: grid; place-items: center; font-weight: 700; font-size: 1.2rem; text-transform: uppercase; }
.dr-mask i.sp { width: 12px; }
.dr-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.dr-form input { min-width: 0; padding: 14px; border-radius: 14px; border: 2px solid var(--line); background: rgba(0,0,0,.25); color: var(--text); font: inherit; font-size: 1.15rem; }
.dr-form input:focus { outline: none; border-color: var(--accent); }
.dr-form .btn { margin-top: 0; width: auto; padding: 0 18px; }
.dr-feedback { text-align: center; margin-top: 10px; min-height: 1.4em; font-weight: 600; }
.dr-feedback.close { color: #ffe58a; }
.dr-feedback.wrong { color: var(--muted); }
.dr-success { text-align: center; background: rgba(61,220,132,.18); color: #b6ffd6; border-radius: 16px; padding: 14px; font-size: 1.2rem; }
.dr-word-alt { color: var(--muted); font-weight: 500; font-size: .9rem; }
.dr-lang-hint { text-align: center; font-size: .85rem; margin-top: 6px; }
.dr-choice small + small { margin-top: 2px; }
.dr-judge { margin-top: 10px; background: var(--panel); border-radius: 18px; padding: 10px; display: grid; gap: 10px; }
.dr-judge-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dr-judge-grid.many { grid-template-columns: 1fr 1fr 1fr; }
.dr-mark { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 104px; padding: 12px 6px 10px; border-radius: 18px; background: #2b8a3e; border: 3px solid #69db7c; color: #fff; font-weight: 700; font-size: 1.05rem; min-width: 0; box-shadow: 0 5px 0 rgba(0,0,0,.3); }
.dr-mark:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(0,0,0,.3); }
.dr-mark .avatar { width: 54px; height: 54px; font-size: 2rem; position: relative; z-index: 1; }
.dr-mark-name { position: relative; z-index: 1; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dr-mark-ok { position: absolute; top: 6px; right: 8px; font-size: 1.1rem; z-index: 1; }
.dr-mark-fill { position: absolute; inset: 0; background: #b2f2bb; transform: scaleX(0); transform-origin: left; opacity: .55; }
.dr-mark-undo { position: absolute; top: 6px; left: 8px; font-size: 1.2rem; z-index: 1; display: none; }
.dr-mark.pending { border-color: #fff; }
.dr-mark.pending .dr-mark-fill { animation: markFill 1.5s linear forwards; }
.dr-mark.pending .dr-mark-undo { display: block; }
.dr-mark.done { background: #2f9e44; border-color: #fff; }
.dr-mark:disabled:not(.done) { opacity: .45; }
@keyframes markFill { to { transform: scaleX(1); } }
@keyframes pulse { 50% { opacity: .75; } }
.dr-judge .dr-buzz { min-height: 58px; font-size: 1.2rem; margin: 0; }
.dr-buzz { background: #c92a2a; color: #fff; }
.small-btn { padding: 8px 12px; font-size: .95rem; }
.dr-voice { text-align: center; background: var(--panel); border-radius: 16px; padding: 14px; font-size: 1.1rem; line-height: 1.5; }
.dr-choices { display: grid; gap: 10px; width: 100%; margin: 6px 0; }
.dr-choice { display: grid; gap: 2px; padding: 16px; border-radius: 18px; font-size: 1.4rem; text-align: center; box-shadow: 0 6px 0 rgba(0,0,0,.25); }
.dr-choice small { font-size: .85rem; opacity: .85; }
.dr-choice.easy { background: #2f9e44; }
.dr-choice.medium { background: #e67700; }
.dr-choice.hard { background: #c92a2a; }
.dr-choice:active { transform: translateY(4px); box-shadow: 0 2px 0 rgba(0,0,0,.25); }
