/* Logic Grid Detective */
.lg-help { margin-top: 14px; }
.lg-cases { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.lg-case { display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 58px; padding: 6px 2px; border-radius: 12px; border: 2px solid rgba(255,255,255,.18); background: rgba(255,255,255,.05); color: inherit; font: 800 16px system-ui, sans-serif; cursor: pointer; }
.lg-case small { font-size: 10px; font-weight: 600; white-space: nowrap; }
.lg-case:hover { border-color: #67e8f9; }
.lg-case.is-done { border-color: rgba(74,222,128,.6); }
.lg-wrap { width: 100%; max-width: 780px; margin: 0 auto; align-self: stretch; box-sizing: border-box; }
.lg-hud { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; font: 800 15px system-ui, sans-serif; }
.lg-title { flex: 1; min-width: 0; }
.lg-tb { display: flex; gap: 6px; flex-shrink: 0; }
.lg-tb button { background: rgba(15,23,42,.7); color: #fff; border: 1px solid rgba(255,255,255,.18); border-radius: 10px; padding: 6px 10px; font: 700 14px system-ui, sans-serif; cursor: pointer; }
.lg-story { margin: 0 0 8px; font-size: 14px; line-height: 1.45; opacity: .85; }
.lg-clues { margin: 0 0 12px; padding: 10px 12px 10px 34px; border-radius: 12px; background: #fffbeb; color: #1e293b; font: 600 15.5px/1.4 system-ui, sans-serif; }
.lg-clues li { padding: 3px 0; cursor: pointer; }
.lg-clues li.is-used { text-decoration: line-through; opacity: .45; }
.lg-grids { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.lg-grid { display: grid; grid-template-columns: auto repeat(var(--n), 50px); grid-auto-rows: minmax(44px, auto); gap: 2px; align-items: stretch; }
.lg-corner { display: grid; place-items: center; font-size: 11px; opacity: .7; text-transform: capitalize; }
.lg-head { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 1px; padding: 2px 0; font-size: 18px; line-height: 1; }
.lg-head small { font-size: 9.5px; font-weight: 700; max-width: 50px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-side { display: flex; align-items: center; justify-content: flex-end; padding: 0 6px; font: 700 13.5px system-ui, sans-serif; white-space: nowrap; text-transform: capitalize; }
.lg-em { font-size: 17px; }
.lg-cell { min-width: 0; padding: 0; border-radius: 6px; border: 1px solid rgba(255,255,255,.28); background: rgba(255,255,255,.06); color: #fff; font: 800 20px system-ui, sans-serif; cursor: pointer; }
.lg-cell:hover { background: rgba(103,232,249,.18); }
.lg-cell:focus-visible { outline: 3px solid #67e8f9; outline-offset: 1px; }
.lg-cell.is-no { color: #fca5a5; background: rgba(248,113,113,.1); }
.lg-cell.is-yes { color: #052e16; background: #4ade80; border-color: #4ade80; }
.lg-cell.is-flash { box-shadow: 0 0 0 3px #fde047; }
.lg-msg { min-height: 22px; margin: 10px 0; text-align: center; font-weight: 700; color: #fde047; }
.lg-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.lg-res { margin-top: 12px; padding: 14px; border-radius: 14px; background: rgba(15,23,42,.6); border: 1px solid rgba(255,255,255,.14); text-align: center; }
.lg-res h3 { margin: 0 0 4px; font-size: 22px; }
.lg-stars { font-size: 30px; letter-spacing: 3px; margin-bottom: 8px; }
.lg-ans { margin: 0 auto 12px; border-collapse: collapse; text-transform: capitalize; }
.lg-ans th, .lg-ans td { padding: 5px 10px; border: 1px solid rgba(255,255,255,.18); font-size: 14px; text-align: left; }
#lg-sheet { display: none; }
@media print {
  body.lg-printing > *:not(#lg-sheet) { display: none !important; }
  body.lg-printing { background: #fff !important; color: #000 !important; }
  body.lg-printing #lg-sheet { display: block; color: #000; font: 15px/1.4 system-ui, sans-serif; }
  #lg-sheet h1 { font-size: 20px; margin: 0 0 6px; }
  .lg-pt { border-collapse: collapse; margin: 12px 14px 0 0; display: inline-table; }
  .lg-pt th, .lg-pt td { border: 1px solid #000; padding: 4px 8px; min-width: 34px; height: 26px; text-transform: capitalize; font-size: 12px; }
}
@media (max-width: 560px) {
  .lg-cases { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lg-grid { grid-template-columns: auto repeat(var(--n), minmax(38px, 46px)); }
  .lg-side { font-size: 12.5px; padding: 0 4px; }
  .lg-head small { font-size: 8.5px; max-width: 42px; }
  .lg-clues { font-size: 14.5px; }
}
