:root { --bg: #e3eaea; --card: #f7f9f9; --soft: #e6eded; --line: #c3cfd0; --ink: #2a3135; --dim: #55626a; --good: #2f7560; --bad: #a6484f; }
* { box-sizing: border-box; margin: 0; }
html { color: var(--ink); background: var(--bg) radial-gradient(circle, #cfd9da 1.6px, transparent 2px) 0 0 / 24px 24px; font: 17px/1.45 "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif; }
body { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
main { flex: 1; width: 100%; max-width: 1160px; margin: 0 auto; padding: 20px; display: grid; gap: 18px 24px; grid-template-columns: minmax(0, 1fr) 440px; grid-template-rows: auto auto 1fr; align-content: start; }
footer { text-align: center; color: var(--dim); font-size: 13px; padding: 10px 20px 16px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
small { display: block; font-size: 14px; color: var(--dim); font-weight: 400; }
h1 { font-size: 32px; line-height: 1.1; } h2 { font-size: 21px; line-height: 1.2; overflow-wrap: anywhere; } h3 { font-size: 17px; display: flex; align-items: center; gap: 10px; }
.icon { width: 27px; height: 27px; image-rendering: pixelated; flex: none; }

/* ход смены */
.bar { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: end; gap: 20px; min-height: 48px; }
.steps { display: flex; gap: 8px; margin-top: 6px; }
.steps i { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 2px solid var(--line); }
.steps .now { border-color: var(--ink); border-width: 5px; } .steps .ok { background: var(--good); border-color: var(--good); } .steps .bad { background: var(--bad); border-color: var(--bad); border-radius: 4px; }
.sum { text-align: right; } .sum b { font-size: 24px; line-height: 1.1; font-variant-numeric: tabular-nums; }

/* дом */
.house { position: relative; align-self: start; grid-row: 2 / 4; }
#house { display: block; width: 100%; height: auto; image-rendering: pixelated; }
.tag { position: absolute; padding: 5px 8px; line-height: 1.15; font-size: 14px; pointer-events: none; }
.tag b { display: block; } .tag span { font-size: 13px; color: #4a555b; }
.tag.ring b, .tag.ring span { color: var(--good); font-weight: 700; } .tag.ok span { color: var(--good); font-weight: 600; } .tag.hurt span { color: var(--bad); font-weight: 600; }
.tag.lost b, .tag.lost span { color: #fff; font-weight: 600; }

/* сообщение */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 28px; padding: 24px; display: grid; gap: 14px; align-content: start; }
.card header { display: flex; gap: 14px; align-items: center; } .card header .icon { width: 36px; height: 36px; }
.lead { font-size: 19px; }
.talk { display: grid; gap: 8px; }
.say { background: var(--soft); border-radius: 4px 18px 18px 18px; padding: 12px 16px; font-size: 18px; overflow-wrap: anywhere; }
.clue { display: flex; gap: 14px; align-items: start; background: #fff; border: 2px solid var(--line); border-radius: 18px; padding: 10px 14px; }
.poster { width: 100%; height: auto; display: block; border-radius: 16px; }

/* шаги и кнопки */
.desk { display: grid; gap: 16px; align-content: start; }
.step { display: grid; gap: 10px; }
h3 i { font-style: normal; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 15px; flex: none; }
.pips { margin-left: auto; font-weight: 400; font-size: 14px; color: var(--dim); }
.hint { background: #d7e6e0; color: #1f4f41; border-radius: 16px; padding: 12px 16px; font-weight: 600; }
button { font: inherit; color: var(--ink); cursor: pointer; border: 0; }
button:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
button:disabled { cursor: default; }
.checks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; } .checks.two { grid-template-columns: 1fr 1fr; }
.check { background: #fff; border: 2px solid var(--line); border-radius: 20px; padding: 14px 8px; min-height: 124px; display: grid; gap: 6px; justify-items: center; align-content: center; text-align: center; line-height: 1.2; font-size: 15px; }
.check small { font-size: 13px; line-height: 1.2; }
.check:not(:disabled):hover { border-color: var(--ink); } .check:disabled { background: transparent; border-style: dashed; } .check:disabled .icon { opacity: .4; }
.check.plain { min-height: 56px; font-weight: 600; font-size: 16px; }
.decide { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.big { border-radius: 22px; min-height: 76px; padding: 12px 16px; color: #fff; font-weight: 700; font-size: 18px; line-height: 1.2; display: flex; align-items: center; justify-content: center; gap: 14px; text-align: left; }
.big small { color: inherit; font-size: 14px; }
.big:hover { filter: brightness(1.1); } .big:active { transform: translateY(2px); }
.no { background: var(--bad); } .yes { background: var(--good); } .go { background: var(--ink); width: 100%; }

/* разбор и итог */
.result { border-radius: 24px; padding: 20px; color: #fff; display: flex; gap: 16px; align-items: center; } .result .icon { width: 45px; height: 45px; }
.good { background: var(--good); } .fail { background: var(--bad); }
.why { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 14px 18px; }
.how { list-style: none; padding: 0; display: grid; gap: 10px; } .how li { display: flex; align-items: center; gap: 16px; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 14px 18px; } .how b { display: block; } .how span { color: var(--dim); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; } .stat { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 12px; text-align: center; } .stat b { font-size: 19px; } .stat small { font-size: 13px; line-height: 1.2; }
.note { color: var(--dim); min-height: 1.4em; }

@media (max-width: 900px) {
  main { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; padding: 12px; gap: 12px; }
  .house { grid-row: auto; } .bar { min-height: 0; } .bar:empty { display: none; }
  .steps { gap: 5px; } .steps i { width: 15px; height: 15px; } .steps .now { border-width: 4px; } .sum b { font-size: 20px; }
  .tag { font-size: 12px; padding: 2px 4px; line-height: 1.1; } .tag span { font-size: 11px; }
  .card { padding: 16px; border-radius: 22px; gap: 10px; } .say { font-size: 17px; padding: 10px 14px; }
  .check { min-height: 104px; padding: 10px 4px; font-size: 14px; } .check small { font-size: 12px; } .check.plain { min-height: 54px; }
  .big { padding: 10px 12px; gap: 10px; font-size: 17px; min-height: 68px; } .big small { font-size: 13px; }
  .final { position: sticky; bottom: 0; background: var(--bg); padding: 10px 0 12px; box-shadow: 0 -10px 14px var(--bg); z-index: 1; } .final h3 { display: none; }
  .hint { padding: 9px 14px; font-size: 15px; }
}
