:root {
  --bg: #f4f6f8;
  --paper: #ffffff;
  --ink: #182026;
  --accent: #0f766e;
  --editor-font-size: 14px;
  --editor-line-height: 1.6;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  font-family: "Hiragino Sans", "Noto Sans JP", sans-serif;
  background: linear-gradient(120deg, #eef8f8, var(--bg));
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 20px;
}

h1 { margin-bottom: 6px; }
.lead { margin-top: 0; }
h2 { margin-bottom: 6px; }

.panel, .grid > div {
  background: var(--paper);
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 3px 16px rgba(0, 0, 0, 0.06);
}

.panel { margin-bottom: 14px; }

.checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 10px 14px;
  margin: 14px 0;
}

.checks label {
  display: flex;
  align-items: center;
  gap: 7px;
}

.actions { display: flex; gap: 8px; flex-wrap: wrap; }

button {
  border: 0;
  border-radius: 8px;
  padding: 8px 12px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.editor {
  display: flex;
  min-height: 340px;
  border: 1px solid #c8d1da;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.lineNumbers {
  margin: 0;
  padding: 10px 8px;
  width: 48px;
  border-right: 1px solid #e4e9ee;
  background: #f9fbfc;
  color: #9aa6b2;
  font-size: var(--editor-font-size);
  line-height: var(--editor-line-height);
  text-align: right;
  white-space: pre;
  overflow: hidden;
  user-select: none;
}

textarea {
  width: 100%;
  min-height: 340px;
  resize: vertical;
  border: 0;
  border-radius: 0;
  padding: 10px;
  font-size: var(--editor-font-size);
  line-height: var(--editor-line-height);
  font-family: "Hiragino Sans", "Noto Sans JP", sans-serif;
  overflow-y: auto;
}

.stats {
  margin: 0 0 8px;
  color: #4d5b68;
  font-size: 0.92rem;
}

#input {
  white-space: pre-wrap;
  overflow-x: hidden;
}

#output {
  white-space: pre;
  overflow-x: auto;
  overflow-y: auto;
}

@media (max-width: 760px) {
  .checks { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr; }
}
