* {
  box-sizing: border-box;
}
body {
  margin: 0;
  color: #20374b;
  background: #f2f5f8;
  font-family: "Yu Gothic UI", "Meiryo", sans-serif;
  font-size: 15px;
  line-height: 1.7;
}
header {
  background: #173f62;
  color: white;
  padding: 26px 0 24px;
  border-bottom: 5px solid #79a9c3;
}
.wrap {
  max-width: 1140px;
  margin: auto;
  padding: 0 28px;
}
.head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.brand {
  font-size: 14px;
  color: #cde0eb;
}
h1 {
  font-size: 28px;
  margin: 3px 0 0;
  line-height: 1.4;
}
h2 {
  font-size: 20px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}
h3 {
  font-size: 15px;
  margin-top: 22px;
}
.tag {
  background: #e6f1f7;
  color: #214c69;
  padding: 4px 13px;
  border-radius: 4px;
  font-size: 13px;
}
.intro {
  margin: 26px 0 16px;
}
.apps {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.apps a {
  color: #245d85;
  background: white;
  text-decoration: none;
  border: 1px solid #c7d8e4;
  padding: 8px 13px;
  border-radius: 5px;
}
.panel {
  background: white;
  border: 1px solid #d3dde5;
  border-radius: 9px;
  padding: 26px 28px;
  margin: 18px 0;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}
.section-heading p {
  font-size: 13px;
  color: #617689;
  margin: 0;
}
.step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #245d85;
  color: white;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 16px;
}
.file-row {
  display: flex;
  align-items: end;
  gap: 18px;
  flex-wrap: wrap;
}
label {
  font-size: 13px;
  display: block;
  font-weight: 600;
}
select,
input[type="file"] {
  display: block;
  margin-top: 6px;
  font: inherit;
  padding: 10px;
  border: 1px solid #b7c9d7;
  border-radius: 5px;
  background: white;
  color: inherit;
}
input[type="file"] {
  min-width: 280px;
}
.file-label {
  flex: 1;
}
.file-label input {
  width: 100%;
}
button {
  font: inherit;
  border: 1px solid #b7c9d7;
  border-radius: 5px;
  padding: 10px 17px;
  background: white;
  color: #245d85;
  cursor: pointer;
  margin: 14px 8px 0 0;
  font-weight: 600;
}
button.primary {
  background: #245d85;
  color: white;
  border-color: #245d85;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
button:hover:not(:disabled),
.apps a:hover {
  filter: brightness(0.95);
}
:focus-visible {
  outline: 3px solid #e1a12f;
  outline-offset: 3px;
}
.muted {
  color: #6b7c8c;
  font-size: 13px;
}
summary {
  cursor: pointer;
  font-weight: 600;
  color: #245d85;
}
details > p {
  font-size: 13px;
}
.mapping {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 15px 0;
}
.mapping select {
  width: 100%;
  max-width: 100%;
}
.check {
  display: flex;
  align-items: start;
  gap: 8px;
  font-size: 14px;
  margin: 18px 0;
  font-weight: 400;
}
.check input {
  margin-top: 6px;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  font-size: 13px;
  white-space: nowrap;
}
th {
  background: #edf3f7;
  color: #3f5e75;
  font-weight: 600;
}
th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid #dfe6ec;
  max-width: 380px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.table-scroll {
  overflow: auto;
  margin: 16px 0;
}
.counts {
  display: flex;
  flex-wrap: wrap;
  border: 1px solid #d5e1e9;
  border-radius: 5px;
  margin: 0 0 20px;
}
.counts > div {
  padding: 14px 22px;
  flex: 1;
  min-width: 125px;
}
.counts dt {
  font-size: 13px;
  color: #617689;
}
.counts dd {
  font-size: 26px;
  font-weight: 700;
  margin: 4px 0 0;
  color: #245d85;
}
.notice {
  padding: 12px 16px;
  border-left: 3px solid #82a5bd;
  background: #f2f6f9;
  font-size: 13px;
}
.message {
  padding: 14px 18px;
  background: #e4f2eb;
  border: 1px solid #a2c5b5;
  border-radius: 5px;
}
.message.error {
  background: #fff0ed;
  border-color: #d4a298;
  color: #8a3423;
}
.geo-list {
  max-height: 300px;
  overflow: auto;
}
.geo-list label {
  font-weight: 400;
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #edf1f4;
}
.history-row {
  padding: 12px 0;
  border-bottom: 1px solid #dfe6ec;
}
footer {
  font-size: 12px;
  color: #6b7c8c;
  margin: 24px 0 36px;
}
.login {
  max-width: 450px;
  margin: 12vh auto;
}
.login input {
  display: block;
  width: 100%;
  padding: 12px;
  border: 1px solid #b7c9d7;
  margin: 10px 0;
  border-radius: 5px;
}
.login select {
  width: 100%;
}
[hidden] {
  display: none !important;
}
@media (max-width: 700px) {
  .wrap {
    padding: 0 16px;
  }
  .panel {
    padding: 20px 16px;
  }
  .section-heading {
    display: block;
  }
  .section-heading p {
    margin-top: 10px;
  }
  .mapping {
    grid-template-columns: 1fr;
  }
  .file-row {
    display: block;
  }
  .file-row label {
    margin-top: 16px;
  }
  .file-row select {
    width: 100%;
  }
  h1 {
    font-size: 24px;
  }
  .counts > div {
    min-width: 50%;
    padding: 12px 16px;
  }
  .head {
    gap: 10px;
  }
  .tag {
    white-space: nowrap;
  }
}

.mapping input,
.mapping textarea {
  display: block;
  width: 100%;
  font: inherit;
  padding: 9px;
  border: 1px solid #b7c9d7;
  border-radius: 5px;
  margin-top: 6px;
  color: inherit;
}
.memo-input {
  min-width: 200px;
  padding: 6px;
  border: 1px solid #b7c9d7;
  border-radius: 4px;
}
.memo-cell button {
  padding: 5px 10px;
  font-size: 12px;
}

.portal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 28px 0;
}
.portal-card {
  display: flex;
  flex-direction: column;
  min-height: 250px;
  padding: 28px;
  color: inherit;
  text-decoration: none;
  background: #fff;
  border: 1px solid #d3dde5;
  border-top: 4px solid #245d85;
  border-radius: 8px;
}
.portal-number {
  font-size: 13px;
  color: #617689;
  margin-bottom: 24px;
}
.portal-card h2 {
  font-size: 23px;
}
.portal-card p {
  color: #617689;
  font-size: 14px;
  margin: 16px 0 26px;
}
.portal-open {
  margin-top: auto;
  color: #245d85;
  font-weight: 600;
}
.portal-card:hover {
  border-color: #245d85;
  box-shadow: 0 4px 16px #173f6212;
}
.portal-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid #d3dde5;
  padding-top: 16px;
}
.portal-tools a {
  color: #245d85;
}
.portal-tools button {
  margin: 0;
}
@media (max-width: 700px) {
  .portal-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .portal-card {
    min-height: 190px;
    padding: 22px;
  }
  .portal-number {
    margin-bottom: 12px;
  }
  .portal-tools {
    align-items: flex-start;
    flex-wrap: wrap;
  }
}

.settings-panel > summary {
  font-size: 18px;
}
.route-group-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0;
  border-bottom: 1px solid #d3dde5;
  padding-bottom: 16px;
}
.route-group-tabs button {
  margin: 0;
}
.route-group-tabs button[aria-pressed="true"] {
  background: #245d85;
  color: white;
  border-color: #245d85;
}
.route-fieldset {
  border: 1px solid #d3dde5;
  border-radius: 6px;
  padding: 16px 20px;
  margin: 16px 0;
  min-width: 0;
}
.route-fieldset legend {
  color: #3f5e75;
  font-weight: 600;
  padding: 0 8px;
  font-size: 14px;
}
.route-fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.route-fields label {
  min-width: 0;
}
.route-fields input {
  display: block;
  width: 100%;
  min-width: 0;
  margin-top: 6px;
  padding: 10px;
  border: 1px solid #b7c9d7;
  border-radius: 5px;
  font: inherit;
  color: inherit;
  background: white;
}
@media (max-width: 700px) {
  .route-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .route-fieldset {
    padding: 12px;
  }
  .route-group-tabs button {
    flex: 1 1 auto;
    font-size: 13px;
    padding: 9px 10px;
  }
}
