/* «Нарисуй фильм» (0.32.1, draw-game.js): its entry in the «Игры» dialog, the card over the stage (a bottom sheet on a
   phone) with the white paper, the pens and the guesses. Built on hall-game.css (.hg-*); emphasis = the flat accent. */
.dg-entry { margin-top: 16px; padding-top: 4px; border-top: 1px solid var(--line); }
.dg-entry[hidden] { display: none; }
.dg-entry-btn { width: 100%; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; min-height: 56px; padding: 8px 12px; text-align: left; border-radius: 11px; border: 1px solid var(--line); background: rgba(255, 255, 255, .04); color: var(--text); font: inherit; cursor: pointer; }
.dg-entry-btn:hover { border-color: rgba(229, 160, 13, .6); }
.dg-entry-ico { font-size: 26px; line-height: 1; }
.dg-entry-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dg-entry-text small { color: var(--muted); font-size: 12px; line-height: 1.3; }
.dg-entry-go { font-size: 22px; color: var(--muted); }
.dg-turns { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dg-turns [data-turns="all"] { grid-column: 1 / -1; }
.dg-turns .hg-chip { grid-template-columns: 1fr; justify-items: center; text-align: center; }

.dg-card { width: min(980px, calc(100% - 20px)); background: rgb(16, 18, 24); } /* opaque: the lobby's text must not show through the paper's frame */
.dg-card .hg-head .hg-step:empty { display: none; }
.dg-card .hg-body { gap: 8px; }
.dg-lead { display: flex; align-items: center; gap: 10px; font-size: 15px; line-height: 1.35; }
.dg-wait { justify-content: center; padding: 22px 8px; font-size: 16px; text-align: center; }
.dg-ava { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; }
.dg-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.dg-choice { display: flex; align-items: center; gap: 10px; min-height: 64px; padding: 8px 10px; text-align: left; border-radius: 11px; border: 1px solid rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .05); color: var(--text); font: inherit; cursor: pointer; }
.dg-choice:hover:not(:disabled) { border-color: var(--accent); }
.dg-choice.mine { border-color: var(--accent); background: rgba(229, 160, 13, .14); }
.dg-choice:disabled { cursor: default; }
.dg-cposter { flex: none; width: 46px; aspect-ratio: 2 / 3; border-radius: 6px; overflow: hidden; background: #1a1d24; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.dg-cposter img { display: block; width: 100%; height: 100%; object-fit: cover; }
.dg-ctext { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; font-size: 14px; line-height: 1.25; }
.dg-ctext small { color: var(--muted); font-size: 12px; }

.dg-top { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; min-height: 30px; font-size: 14px; }
.dg-task b { font-size: 17px; }
.dg-task small { width: 100%; color: var(--muted); font-size: 12px; }
.dg-who { color: var(--muted); }
.dg-hints { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; }
.dg-hint { padding: 3px 9px; border-radius: 999px; background: rgba(229, 160, 13, .14); color: var(--text); font-size: 12.5px; font-weight: 600; }
.dg-mask { display: inline-flex; align-items: flex-end; flex-wrap: wrap; gap: 3px; font-weight: 700; }
.dg-mask i { display: inline-block; width: 11px; height: 2px; margin-bottom: 3px; border-radius: 1px; background: var(--text); }
.dg-mask .dg-gap { display: inline-block; width: 8px; }
.dg-stage { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.dg-left { display: flex; justify-content: center; min-width: 0; }
.dg-paper { position: relative; flex: none; border-radius: 10px; overflow: hidden; background: #fff; box-shadow: 0 0 0 1px rgba(255, 255, 255, .12), 0 6px 20px rgba(0, 0, 0, .35); }
.dg-canvas { display: block; width: 100%; height: 100%; touch-action: pan-y; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.dg-canvas.dg-pen { touch-action: none; cursor: crosshair; }
.dg-img { display: block; width: 100%; max-width: 640px; aspect-ratio: 4 / 3; border-radius: 10px; background: #fff; object-fit: contain; }
.dg-blank { display: flex; align-items: center; justify-content: center; color: #6b7280; font-size: 13px; }
.dg-side { display: flex; flex-direction: column; gap: 8px; min-width: 0; min-height: 0; }
.dg-guess { display: flex; gap: 8px; }
.dg-input { flex: 1; min-width: 0; min-height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, .06); color: var(--text); font: inherit; font-size: 16px; }
.dg-input:focus { outline: none; border-color: var(--accent); }
.dg-send { min-height: 44px; padding: 0 16px; border: 0; border-radius: 10px; background: var(--accent); color: #111; font: inherit; font-weight: 700; cursor: pointer; }
.dg-mine { padding: 10px 12px; border-radius: 10px; background: rgba(62, 207, 122, .14); border: 1px solid var(--ok); font-size: 14px; }
.dg-mine .hg-plus { font-size: 16px; }
.dg-feed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; max-height: 22vh; overflow-y: auto; overscroll-behavior: contain; font-size: 13.5px; line-height: 1.35; }
.dg-feed:empty { display: none; }
.dg-feed li { padding: 3px 8px; border-radius: 7px; background: rgba(255, 255, 255, .04); overflow-wrap: anywhere; }
.dg-feed li.me { background: rgba(229, 160, 13, .1); }
.dg-feed li b { color: var(--muted); font-weight: 600; margin-right: 4px; }
.dg-feed .dg-right { color: var(--ok); font-weight: 700; background: rgba(62, 207, 122, .1); }
.dg-feed .dg-close { color: var(--accent); }
.dg-plus { color: var(--ok); }

.dg-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 14px; }
.dg-swatches, .dg-acts { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; }
.dg-sw { width: 34px; height: 34px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .22); background: var(--sw, #fff); cursor: pointer; padding: 0; }
.dg-sw[aria-pressed="true"] { outline: 3px solid var(--accent); outline-offset: 2px; }
.dg-eraser { background: #fff; color: #111; font-size: 15px; line-height: 1; }
.dg-wd, .dg-act { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, .05); color: var(--text); font: inherit; font-size: 18px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.dg-wd i { display: block; width: var(--d); height: var(--d); border-radius: 50%; background: currentColor; }
.dg-wd[aria-pressed="true"] { border-color: var(--accent); background: rgba(229, 160, 13, .16); }
.dg-act:disabled { opacity: .35; cursor: default; }

.dg-strip { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; scroll-snap-type: x proximity; }
.dg-shot { flex: none; width: 168px; margin: 0; scroll-snap-align: start; display: flex; flex-direction: column; gap: 4px; }
.dg-shot img, .dg-shot .dg-blank { display: block; width: 168px; height: 126px; border-radius: 8px; background: #fff; object-fit: contain; }
.dg-shot figcaption { display: flex; flex-direction: column; gap: 1px; font-size: 12.5px; line-height: 1.3; min-width: 0; }
.dg-shot figcaption b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dg-shot figcaption span { color: var(--muted); }

body.dg-on.lobby-on .video-wrap { overflow: hidden; } /* the lobby does not scroll away under the game */
.dg-card.dg-wide .dg-stage { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 280px); align-items: start; }
.dg-card.dg-wide .dg-side { overflow: hidden; }
.dg-card.dg-wide .dg-feed { max-height: none; flex: 1; }
.dg-card.dg-wide.dg-measure .dg-side { display: none; }
.dg-card.dg-me .dg-feed { max-height: 64px; }
.dg-card.dg-me.dg-wide .dg-feed { max-height: none; }
@media (max-width: 760px) {
  .dg-card { width: 100%; }
  .dg-choices { grid-template-columns: 1fr; }
  .dg-choice { min-height: 56px; }
  .dg-sw { width: 40px; height: 40px; }
  .dg-wd, .dg-act { width: 44px; height: 44px; }
  .dg-swatches { display: grid; grid-template-columns: repeat(6, 44px); justify-items: center; gap: 4px; }
  .dg-feed { max-height: 18vh; }
}
@media (max-height: 560px) { .dg-feed { max-height: 64px; } .dg-wait { padding: 10px 8px; } }
