* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, "Segoe UI", "Noto Sans SC", sans-serif;
  background: #f5f5f5;
  display: flex;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem 1rem;
}

.container {
  max-width: 600px;
  width: 100%;
}

h1 {
  font-size: 2rem;
  font-weight: 700;
  color: #222;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.git-icon { line-height: 0; transition: opacity 0.15s; }
.git-icon:hover { opacity: 0.6; }

.subtitle {
  color: #666;
  margin-bottom: 1.5rem;
}

.inputs {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.input-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.input-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.input-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #444;
  white-space: nowrap;
}

.mode-select {
  font-size: 0.8rem;
  padding: 0.15rem 0.4rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fff;
  color: #444;
  cursor: pointer;
}

.file-btn {
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fff;
  color: #555;
  cursor: pointer;
  transition: background 0.15s;
}

.file-btn:hover { background: #eee; }
.file-input { display: none; }

.input-box, .input-fsm {
  font-family: "JetBrains Mono", "Fira Code", "Cascadia Code", monospace;
  font-size: 1rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  outline: none;
  transition: border-color 0.15s;
}

.input-fsm {
  font-size: 0.8125rem;
  line-height: 1.5;
  resize: vertical;
}

input:focus, textarea:focus { border-color: #4a90d9; box-shadow: 0 0 0 2px rgba(74,144,217,0.2); }

button {
  font-size: 1rem;
  padding: 0.6rem 1.5rem;
  border: none;
  border-radius: 6px;
  background: #4a90d9;
  color: #fff;
  cursor: pointer;
  transition: background 0.15s;
  width: 100%;
  margin-top: 0.5rem;
}

button:hover { background: #357abd; }
button:disabled { background: #999; cursor: not-allowed; }

.vlabel {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #444;
  margin: 0.5rem 0;
  cursor: pointer;
}

.vlabel input { width: auto; }

#result {
  margin-top: 1rem;
  font-size: 1.25rem;
  font-weight: 700;
  text-align: center;
  min-height: 2rem;
}

#result.eq  { color: #2e7d32; }
#result.neq { color: #c62828; }

#detail {
  margin-top: 1rem;
  padding: 1rem;
  background: #1e1e1e;
  color: #d4d4d4;
  font-family: "JetBrains Mono", "Fira Code", "Cascadia Code", monospace;
  font-size: 0.8125rem;
  line-height: 1.5;
  border-radius: 6px;
  overflow-x: auto;
  white-space: pre;
}
