/* logicgrid: styles for this game only (loaded after /css/core.css). */
.lg-layout { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.lg-story { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 10px; padding: 20px; }
.lg-story h2 { font-size: 24px; font-weight: 800; }
.lg-story h3 { font-family: var(--body); font-size: 16px; margin-top: 4px; }
.lg-tip { font-weight: 400; font-size: 13px; }
.lg-clues { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.lg-clue { all: unset; cursor: pointer; display: block; line-height: 1.45; padding: 2px 0; }
.lg-clue:focus-visible { outline: 3px solid var(--select); outline-offset: 2px; border-radius: 4px; }
.lg-clue[aria-pressed="true"] { text-decoration: line-through; color: var(--muted); }
.lg-gridwrap { flex: 999 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.lg-scroll { overflow-x: auto; }
.lg-grid { --cs: 32px; border-collapse: collapse; margin: 0 auto; }
.lg-grid th, .lg-grid td { padding: 0; }
.lg-catname { font-size: 13px; font-weight: 700; text-align: center; padding: 0 2px 4px; border-left: 2px solid var(--text); color: var(--muted); }
.lg-colitem { height: 96px; vertical-align: bottom; border-left: 1px solid var(--line); }
.lg-colitem:nth-child(3), .lg-grid tr:nth-child(2) th.end + th { border-left: 2px solid var(--text); }
.lg-colitem span { writing-mode: vertical-rl; transform: rotate(180deg); display: inline-block; max-height: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; padding: 4px 0; }
.lg-rowcat { width: 26px; border-top: 2px solid var(--text); }
.lg-rowcat span { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 13px; font-weight: 700; color: var(--muted); }
.lg-rowitem { text-align: right; font-size: 13px; font-weight: 600; padding: 0 8px 0 4px; white-space: nowrap; max-width: 110px; overflow: hidden; text-overflow: ellipsis; border-bottom: 1px solid var(--line); }
.lg-grid tr.end .lg-rowitem { border-bottom: 2px solid var(--text); }
.lg-cell { width: var(--cs); height: var(--cs); border: 1px solid var(--line); background: var(--surface); }
.lg-cell.end { border-right: 2px solid var(--text); }
.lg-grid tr.end .lg-cell { border-bottom: 2px solid var(--text); }
.lg-grid tr .lg-rowitem + .lg-cell, .lg-grid tr .lg-rowitem + td { border-left: 2px solid var(--text); }
.lg-cell button { width: 100%; height: 100%; border: 0; background: transparent; color: var(--text); font: inherit; font-weight: 800; font-size: calc(var(--cs) * .55); cursor: pointer; padding: 0; display: block; }
.lg-cell button:hover { background: var(--surface-2); }
.lg-cell button.no { color: var(--muted); font-weight: 400; }
.lg-cell button.yes { background: var(--match-bg); color: var(--match-ink); }
.lg-cell button.hinted { box-shadow: inset 0 0 0 3px var(--select); }
.lg-blank { width: var(--cs); }
.lg-tools { justify-content: center; }
.lg-tools .btn { min-height: 44px; padding: 0 16px; }
.lg-answers { padding: 14px; overflow-x: auto; }
.lg-answer-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.lg-answer-table th { text-align: left; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; padding: 4px 6px; }
.lg-answer-table td { padding: 6px; border-top: 1px solid var(--line); }
.lg-answer-table td:first-child { font-weight: 700; }
.lg-grid { box-shadow: var(--lift); border-radius: 10px; background: var(--surface); }
.lg-cell { background: var(--slot); }
.lg-cell button.yes { background: linear-gradient(180deg, #2AA374, #1B8A5E); color: #fff; box-shadow: inset 0 2px 0 rgba(255, 255, 255, .25), inset 0 -3px 0 rgba(0, 0, 0, .2); }
