:root {
  color-scheme: light;
  font-family: "Yu Gothic UI", "Meiryo", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f5f7fb;
  color: #1f2937;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
}

h1 {
  margin-top: 0;
}

.card {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  border: 1px solid #e5e7eb;
}

.grid {
  display: grid;
  gap: 12px;
}

label {
  display: grid;
  gap: 6px;
  font-weight: 600;
}

.field-group {
  display: grid;
  gap: 6px;
}

.field-title {
  font-weight: 600;
}

.segmented-control {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(90px, 1fr));
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  overflow: hidden;
  width: fit-content;
}

.segmented-control input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented-control label {
  margin: 0;
  padding: 8px 16px;
  text-align: center;
  cursor: pointer;
  background: #ffffff;
  color: #374151;
  font-weight: 600;
}

.segmented-control label + input + label,
.segmented-control label + label {
  border-left: 1px solid #e5e7eb;
}

#type-write:checked + label,
#type-read:checked + label {
  background: #2563eb;
  color: #ffffff;
}

input,
select,
textarea,
button {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
}

button {
  width: fit-content;
  padding: 10px 14px;
  border: 1px solid #2563eb;
  border-radius: 8px;
  background: #2563eb;
  color: #fff;
  cursor: pointer;
}

button:hover {
  opacity: 0.9;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.table-scroll {
  max-height: 360px;
  overflow-y: auto;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

.table-scroll table {
  margin-top: 0;
}

.table-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 1;
}

th,
td {
  border: 1px solid #e5e7eb;
  padding: 8px;
  text-align: left;
  vertical-align: top;
}

th {
  background: #f9fafb;
}

.empty {
  color: #6b7280;
  margin: 8px 0;
}

.hidden {
  display: none;
}

.inline-actions {
  margin-bottom: 10px;
}

.info {
  margin: 8px 0;
  color: #374151;
}

.viewer {
  width: 100%;
  min-height: 420px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
}

.result-area {
  margin-top: 12px;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
  gap: 8px;
  margin: 10px 0 14px;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.footer-note {
  padding-top: 0;
  padding-bottom: 20px;
}

.footer-note a {
  color: #2563eb;
  text-decoration: none;
}

.footer-note a:hover {
  text-decoration: underline;
}
