:root {
  --bg: var(--tg-theme-bg-color, #f4f4f5);
  --text: var(--tg-theme-text-color, #18181b);
  --hint: var(--tg-theme-hint-color, #71717a);
  --accent: var(--tg-theme-button-color, #2481cc);
  --accent-text: var(--tg-theme-button-text-color, #ffffff);
  --card-bg: #ffffff;
}
* { box-sizing: border-box; margin: 0; }
body { background: var(--bg); color: var(--text);
  font-family: -apple-system, "Segoe UI", Roboto, sans-serif; }
.screen { max-width: 420px; margin: 0 auto; padding: 16px 16px 84px; }
.hidden { display: none !important; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 10px;
  background: var(--accent); color: var(--accent-text); font-size: 13px; }
.label { color: var(--hint); font-size: 13px; margin: 12px 0 4px; }
.cards { display: flex; gap: 6px; margin: 8px 0; }
.card { width: 44px; height: 62px; border-radius: 6px; background: var(--card-bg);
  color: #18181b; border: 1px solid #d4d4d8; display: flex; flex-direction: column;
  align-items: center; justify-content: center; font-weight: 700; font-size: 17px;
  box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.cards.big .card { width: 56px; height: 78px; font-size: 22px; }
.card .suit { font-size: 1.1em; line-height: 1; }
.card.red { color: #dc2626; }
#checklist { list-style: none; padding: 0; margin: 8px 0; }
#checklist li.combo { background: var(--card-bg); color: #18181b; border-radius: 8px;
  margin-bottom: 6px; padding: 10px 12px; }
#checklist li.combo .row { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.name { margin-right: auto; }
#checklist li.correct { background: #dcfce7; }
#checklist li.missed  { background: #fef9c3; }
#checklist li.wrong   { background: #fee2e2; }
.explain { font-size: 13px; color: #52525b; margin-top: 6px; }
.verdict { font-size: 12px; font-weight: 700; }
.order-mark { color: #ea580c; font-size: 12px; font-weight: 700; }
.handle { touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none;
  color: var(--hint); font-size: 20px; line-height: 1; padding: 2px 4px 2px 10px; }
li.dragging { position: relative; z-index: 10; box-shadow: 0 4px 14px rgba(0,0,0,.3); }
li.divider { border: 1px dashed var(--hint); border-radius: 8px; color: var(--hint);
  text-align: center; font-size: 12px; padding: 6px; margin-bottom: 6px; }
#true-order { font-size: 13px; margin-top: 8px; background: var(--card-bg);
  color: #18181b; border-radius: 8px; padding: 10px 12px; }
.btn { position: fixed; left: 16px; right: 16px; bottom: 16px; max-width: 388px;
  margin: 0 auto; padding: 14px; border: 0; border-radius: 10px;
  background: var(--accent); color: var(--accent-text); font-size: 16px; }
.btn:disabled { opacity: .6; }
#screen-error { text-align: center; padding-top: 40vh; }
