* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #f5f5ef;
  color: #192e29;
  font:
    16px/1.45 "Inter",
    system-ui,
    sans-serif;
}
header {
  background: #143b32;
  color: white;
  padding: 17px 5vw;
  display: flex;
  align-items: center;
  gap: 24px;
}
header span,
small {
  font-size: 0.79rem;
  letter-spacing: 0.06em;
}
main {
  max-width: 1350px;
  margin: auto;
  padding: 32px 4vw;
}
.heading,
.toolbar,
.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
h1 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  letter-spacing: -0.055em;
  margin: 0.15em 0;
}
h2,
h3,
p {
  margin: 0.35em 0;
}
.layout {
  display: grid;
  grid-template-columns: minmax(190px, 26%) 1fr;
  gap: 18px;
  margin: 20px 0;
}
aside,
#game,
dialog {
  background: white;
  border: 1px solid #cbd4ca;
  border-radius: 12px;
  padding: 18px;
}
button,
select {
  font: inherit;
  border: 1px solid #9baea4;
  border-radius: 6px;
  background: white;
  color: inherit;
  padding: 7px 11px;
  cursor: pointer;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
.primary,
nav button[aria-current="true"] {
  background: #175540;
  color: white;
}
nav button {
  width: 100%;
  text-align: left;
  margin-top: 6px;
  display: flex;
  justify-content: space-between;
}
table {
  border-collapse: collapse;
  width: 100%;
  margin: 13px 0;
  font-size: 0.91rem;
}
td,
th {
  padding: 9px 6px;
  border-bottom: 1px solid #dae1d9;
  text-align: left;
}
th {
  color: #52665d;
  font-size: 0.78rem;
}
dialog {
  width: min(900px, 94vw);
  max-height: 88vh;
  color: inherit;
}
dialog::backdrop {
  background: #143b3280;
}
label {
  display: block;
  margin: 12px 0;
}
select {
  max-width: 100%;
}
.scroll {
  overflow: auto;
}
#message:empty {
  display: none;
}
#message {
  background: #e4efd9;
  padding: 8px 12px;
  margin-top: 12px;
}
.conflict {
  color: #902c19;
}
details {
  margin: 12px 0;
}
.tag {
  font-size: 0.78rem;
  color: #586c61;
}
@media (max-width: 720px) {
  .layout {
    display: block;
  }
  nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3px;
  }
  #game {
    margin-top: 12px;
  }
  main {
    padding: 18px 3vw;
  }
}

.comparison th[scope="row"] {
  white-space: nowrap;
}
.comparison .changed-slot {
  background: #edf5eb;
}
.comparison .changed-slot th {
  border-left: 4px solid #347351;
  color: #143b32;
}
.crew-impact {
  padding: 0;
  list-style: none;
}
.crew-impact li + li {
  margin-top: 4px;
}
.dialog-actions {
  position: sticky;
  bottom: 0;
  background: white;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding: 10px 0 2px;
  border-top: 1px solid #cbd4ca;
}
