.puzzle-header { max-width: 49rem; margin-bottom: 1.5rem; }
.puzzle-header h1 { margin: .25rem 0 .5rem; }
.puzzle-header p { margin: 0; }
.puzzle-layout { display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(0, .82fr); gap: 1rem; align-items: start; max-width: 56rem; }
.puzzle-card { padding: clamp(1rem, 3vw, 1.65rem); background: var(--card); border: 1px solid var(--line); border-radius: 1rem; }
.puzzle-card h2 { font-size: 1.2rem; margin: 0 0 .5rem; }
.puzzle-clue { margin: 0; min-height: 1.5em; color: var(--text); overflow-wrap: anywhere; }
.puzzle-board { list-style: none; padding: 0; width: min(100%, 20rem); margin: 1.25rem auto; }
.puzzle-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .42rem; margin-bottom: .42rem; }
.puzzle-tile { position: relative; display: grid; place-items: center; aspect-ratio: 1.25; background: var(--bg); border: 1px solid var(--line); border-radius: .5rem; font-size: clamp(1rem, 4.5vw, 1.65rem); font-weight: 700; line-height: 1; }
.puzzle-tile small { position: absolute; bottom: 3px; right: 4px; font-size: .65rem; line-height: 1; }
.puzzle-tile[data-mark="exact"], .puzzle-legend .exact { background: #193f34; color: #a8f4d5; border-color: #459f82; }
.puzzle-tile[data-mark="present"], .puzzle-legend .present { background: #493817; color: #ffe0a0; border-color: #a27930; }
.puzzle-tile[data-mark="absent"], .puzzle-legend .absent { background: #262938; color: #e4e7f2; border-color: #596076; }
.puzzle-form label { display: block; margin-bottom: .4rem; font-weight: 600; }
.puzzle-field { display: flex; gap: .5rem; flex-wrap: wrap; }
.puzzle-field input { flex: 1 1 9rem; min-width: 0; min-height: 44px; border-radius: .65rem; padding: .55rem .75rem; border: 1px solid var(--line); background: var(--bg); color: var(--text); font: inherit; letter-spacing: .12em; }
.puzzle-card .btn { min-height: 44px; }
.puzzle-card .btn:disabled { opacity: .7; cursor: wait; }
.puzzle-status { margin: .6rem 0 0; color: var(--muted); min-height: 1.5em; }
.puzzle-status:empty { min-height: 0; margin: 0; }
.puzzle-card p + .btn { margin-top: .55rem; }
.puzzle-gate p { margin: 0; color: var(--muted); }
.puzzle-legend { list-style: none; padding: 0; margin: .9rem 0; }
.puzzle-legend li { display: flex; align-items: center; gap: .7rem; margin-bottom: .55rem; }
.puzzle-legend li span { display: inline-grid; place-items: center; width: 1.8rem; height: 1.8rem; border: 1px solid; border-radius: .4rem; font-weight: 700; }
.puzzle-note { color: var(--muted); margin: 0; }
.puzzle-card :focus-visible { outline: 2px solid #a994ff; outline-offset: 3px; }
@media (max-width: 720px) { .puzzle-layout { grid-template-columns: minmax(0, 1fr); } }

