/* Determinism lesson. All rules scoped under .dtm-* */
.dtm-sc { position: relative; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.dtm-note { font-size: 13px; color: var(--dim); text-align: center; max-width: 300px; min-height: 17px; }
.dtm-hero img { display: block; width: 280px; max-width: 100%; max-height: 34vh; object-fit: contain; margin: 0 auto; filter: drop-shadow(0 18px 30px rgba(123, 92, 253, .35)); }

/* ---------- the grid ---------- */
.dtm-board { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); grid-template-rows: repeat(var(--n), minmax(0, 1fr)); gap: 2px; width: min(270px, 38vh); aspect-ratio: 1; padding: 6px; border-radius: 14px; background: var(--surface); border: 2px solid var(--line-strong); touch-action: none; user-select: none; -webkit-user-select: none; }
.dtm-c { min-width: 0; min-height: 0; display: grid; place-items: center; border-radius: 3px; background: rgba(234, 227, 215, .07); font-style: normal; font-family: var(--mono); font-weight: 700; font-size: 16px; color: var(--text); transition: background .12s; }
.dtm-c.dtm-on { background: var(--violet-bright); box-shadow: 0 0 8px rgba(169, 155, 255, .55); }
.dtm-c.dtm-seed { background: var(--gold); box-shadow: 0 0 8px rgba(252, 192, 80, .6); }
.dtm-c.dtm-coin { outline: 2px solid var(--gold); outline-offset: -1px; }
.dtm-c.dtm-coin.dtm-on { background: var(--gold); }
.dtm-c.dtm-diff { outline: 2px solid var(--streak); outline-offset: -1px; }
.dtm-c.dtm-count { outline: 2px solid var(--gold); color: var(--gold); }
.dtm-c.dtm-count.dtm-on { color: #1A1446; }
.dtm-five { width: min(170px, 26vh); gap: 4px; }
.dtm-half { width: min(150px, 22vh); padding: 4px; gap: 1px; border-radius: 10px; }
.dtm-half .dtm-c { border-radius: 2px; transition: none; }
.dtm-tick { font-family: var(--mono); font-size: 13px; font-weight: 700; color: var(--dim); text-align: center; }
.dtm-pair { display: flex; gap: 12px; justify-content: center; width: 100%; }
.dtm-col { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.dtm-pair.dtm-match .dtm-half { border-color: var(--mint); box-shadow: 0 0 14px rgba(63, 214, 154, .35); }
.dtm-pair.dtm-match .dtm-tick { color: var(--mint); }

/* ---------- the law ---------- */
.dtm-law { width: 100%; max-width: 330px; display: flex; flex-direction: column; gap: 8px; }
.dtm-rule { display: grid; grid-template-columns: 46px 1fr; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 14px; background: var(--surface); border: 2px solid var(--line); font-size: 15px; line-height: 1.3; }
.dtm-rule b { color: var(--gold); }
.dtm-rule em { font-style: normal; font-weight: 700; color: var(--gold); }
.dtm-coinrule { border-color: var(--gold); }
.dtm-mini { display: grid; grid-template-columns: repeat(3, 14px); gap: 2px; }
.dtm-mini i { width: 14px; height: 14px; border-radius: 3px; background: rgba(234, 227, 215, .1); }
.dtm-mini i.dtm-on { background: var(--violet-bright); }
.dtm-mini i.dtm-mid { outline: 2px solid var(--gold); outline-offset: -1px; }
.dtm-law.dtm-small { max-width: 320px; gap: 4px; }
.dtm-law.dtm-small .dtm-rule { padding: 6px 10px; font-size: 13px; grid-template-columns: 40px 1fr; }
.dtm-law.dtm-small .dtm-mini { grid-template-columns: repeat(3, 11px); }
.dtm-law.dtm-small .dtm-mini i { width: 11px; height: 11px; }
.dtm-q { width: 100%; max-width: 64px; margin: 0 auto; display: block; }
.dtm-q rect { fill: rgba(234, 227, 215, .12); }
.dtm-q rect.dtm-qon { fill: var(--violet-bright); }

/* ---------- the name ---------- */
.dtm-eq { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; max-width: 300px; }
.dtm-eq span { width: 100%; padding: 12px; border-radius: 14px; background: var(--surface); border: 2px solid var(--line-strong); text-align: center; font-size: 17px; font-weight: 700; }
.dtm-eq i { font-style: normal; font-size: 22px; font-weight: 700; color: var(--dim); line-height: 1; }
.dtm-eq .dtm-one { border-color: var(--gold); color: var(--gold); }
.dtm-eq.dtm-two { flex-direction: row; gap: 10px; max-width: 340px; }
.dtm-w { flex: 1; display: flex; flex-direction: column; gap: 6px; padding: 16px 10px; border-radius: 16px; background: var(--surface); border: 2px solid var(--violet-bright); text-align: center; }
.dtm-w b { font-size: 16px; color: var(--violet-bright); }
.dtm-w span { font-size: 14px; }
.dtm-w.dtm-wc { border-color: var(--gold); }
.dtm-w.dtm-wc b { color: var(--gold); }



@media (max-height: 700px) {
  .dtm-hero img { width: 210px; max-height: 26vh; }
  .dtm-board { width: min(230px, 36vh); }
  .dtm-five { width: 140px; }
  .dtm-half { width: 138px; }
  .dtm-rule { padding: 7px 10px; font-size: 14px; }
  .dtm-eq span { padding: 9px; font-size: 15px; }
}
