:root {
  font-family: "Yu Gothic", Meiryo, system-ui, sans-serif;
  color: #16263e;
  background: #edf2f8;
  font-size: 16px;
  line-height: 1.65;
  --accent: #075fba;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: #075fba;
  text-underline-offset: 4px;
}
header {
  background: #13233c;
  color: #fff;
  padding: 18px max(24px, calc((100vw - 1180px) / 2));
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
header a {
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}
header span {
  font-size: 0.875rem;
  color: #cbd7e8;
}
main {
  max-width: 1180px;
  margin: 36px auto;
  padding: 0 24px;
}
h1 {
  font-size: 2rem;
  line-height: 1.3;
  margin: 8px 0 14px;
}
h2 {
  font-size: 1.25rem;
  margin: 0 0 14px;
}
p {
  margin: 10px 0 20px;
}
.eyebrow {
  font-size: 0.875rem;
  color: #075fba;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 30px;
}
.card,
.panel {
  background: #fff;
  border: 1px solid #d4dfec;
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 5px 20px #15294408;
}
.card {
  display: flex;
  flex-direction: column;
  border-top: 5px solid var(--accent);
}
.card p {
  flex: 1;
}
.card a,
.primary {
  background: var(--accent);
  color: white;
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 11px 18px;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
}
.workspace {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.options {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
  margin: 16px 0;
}
.options label {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
label {
  font-size: 0.9375rem;
  font-weight: 600;
}
textarea,
input,
select,
button {
  font: inherit;
}
textarea {
  width: 100%;
  min-height: 320px;
  resize: vertical;
  background: #f8fafd;
  border: 1px solid #b6c7db;
  border-radius: 8px;
  padding: 14px;
  color: #16263e;
  font-size: 1rem;
  line-height: 1.7;
}
input[type="number"] {
  width: 115px;
}
input,
select {
  padding: 7px;
  border: 1px solid #b6c7db;
  border-radius: 6px;
  background: white;
}
input[type="checkbox"] {
  width: 18px;
  height: 18px;
}
button {
  cursor: pointer;
  background: #fff;
  border: 1px solid #aabdd4;
  border-radius: 8px;
  padding: 9px 14px;
  color: #16263e;
}
button:hover {
  filter: brightness(0.96);
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
button.primary {
  color: #fff;
}
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0;
}
.file-label {
  display: block;
  border: 1px dashed #8fa9c7;
  padding: 12px;
  border-radius: 8px;
  margin: 14px 0;
  font-size: 0.875rem;
}
.file-label input {
  max-width: 100%;
  border: 0;
  padding: 0;
  margin-top: 6px;
  font-size: 0.875rem;
}
.hint {
  color: #4e627c;
  font-size: 0.875rem;
}
.notice {
  background: #e5effa;
  border-left: 4px solid #075fba;
  padding: 16px 18px;
  margin: 24px 0;
  font-size: 0.9375rem;
}
.status {
  font-weight: 700;
  min-height: 26px;
  color: #075fba;
}
.error {
  color: #a2242c;
  background: #fff0f0;
  border-radius: 8px;
  padding: 12px;
}
[hidden] {
  display: none !important;
}
.output {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 0.9375rem;
  margin: 0;
  max-height: 470px;
  overflow: auto;
}
.chunk {
  padding: 14px;
  background: #f5f8fc;
  border: 1px solid #d4dfec;
  border-radius: 8px;
  margin: 14px 0;
}
.chunk .toolbar {
  justify-content: space-between;
}
.chunk pre {
  max-height: 230px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
  font-size: 0.875rem;
}
.table-wrap {
  max-height: 350px;
  overflow: auto;
  margin: 15px 0;
}
table {
  border-collapse: collapse;
  font-size: 0.875rem;
  width: 100%;
}
td,
th {
  border: 1px solid #d4dfec;
  padding: 8px;
  text-align: left;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-width: 260px;
}
th {
  background: #eef4fb;
}
details {
  margin: 20px 0;
}
summary {
  cursor: pointer;
  font-weight: 700;
}
.diff-line {
  display: grid;
  grid-template-columns: 55px 1fr;
  border-bottom: 1px solid #e1e7ef;
  padding: 6px 10px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.diff-line.add {
  background: #e1f5ec;
  color: #174d37;
}
.diff-line.remove {
  background: #ffeded;
  color: #8e2525;
}
.diff-line span:first-child {
  font-weight: 700;
  font-size: 0.875rem;
}
.privacy {
  margin: 35px 0;
  padding: 22px;
  background: #dfe9f5;
  border-radius: 12px;
}
footer {
  max-width: 1180px;
  padding: 20px 24px 40px;
  margin: auto;
  font-size: 0.875rem;
  color: #4e627c;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
:focus-visible {
  outline: 3px solid #e29600;
  outline-offset: 3px;
}
@media (max-width: 800px) {
  .cards,
  .workspace {
    grid-template-columns: 1fr;
  }
  main {
    margin-top: 25px;
    padding: 0 16px;
  }
  .panel,
  .card {
    padding: 18px;
  }
  header {
    padding: 16px;
    align-items: flex-start;
  }
  header span {
    max-width: 150px;
    text-align: right;
  }
  h1 {
    font-size: 1.65rem;
  }
  textarea {
    min-height: 240px;
  }
  .diff-line {
    grid-template-columns: 45px 1fr;
  }
}
