.file-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.file-grid li {
  font-family: var(--mono);
  font-size: 0.8rem;
  padding: 0.28rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface2);
}

.file-grid li.is-match {
  border-color: color-mix(in srgb, var(--ok) 55%, var(--line));
  background: color-mix(in srgb, var(--ok) 18%, var(--surface));
  color: var(--ok);
  font-weight: 650;
}

.file-grid li.is-hidden {
  opacity: 0.65;
  font-style: italic;
}

.pattern-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: end;
  margin-bottom: 0.75rem;
}

.pattern-row label {
  flex: 1;
  min-width: 12rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.88rem;
}

.pattern-row input {
  font-family: var(--mono);
  font-size: 0.95rem;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.expand-box {
  font-family: var(--mono);
  font-size: 0.85rem;
  padding: 0.75rem 0.85rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #1a222c;
  color: #e8eef4;
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 3.2rem;
  line-height: 1.45;
}

.expand-box .muted { color: #7a8a9a; }
.expand-box .warn { color: #f0c674; }
.expand-box .ok { color: #7dcea0; }

.preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.65rem;
}

.preset-row button {
  font-family: var(--mono);
  font-size: 0.75rem;
  padding: 0.28rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  cursor: pointer;
}

.preset-row button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.cheat-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.cheat-table th,
.cheat-table td {
  text-align: left;
  padding: 0.4rem 0.45rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.cheat-table code {
  font-size: 0.85em;
}

.hint-list {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.hint-list li { margin: 0.35rem 0; }

.match-meta {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0.5rem 0 0;
}
