/* ISO map dialog */
.lvl-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0 12px;
}
.lvl-card {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--surface);
  cursor: pointer;
  font-size: 13px;
  color: var(--ink);
}
.lvl-card:hover {
  border-color: var(--ink-3);
}
.lvl-card[aria-pressed='true'] {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}
.lvl-card b {
  font-weight: 600;
}
.lc-n {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
}
.iso-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}
.iso-toolbar input[type='search'] {
  flex: 1 1 240px;
  padding: 6px 10px;
  border: 1px solid var(--rule);
  border-radius: 7px;
  background: var(--surface);
}
.iso-toolbar select {
  padding: 6px 8px;
  border: 1px solid var(--rule);
  border-radius: 7px;
  background: var(--surface);
}
.iso-toolbar .check {
  margin-top: 0;
}
.isotable {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.isotable thead th {
  position: sticky;
  top: 0;
  background: var(--surface);
  text-align: left;
  font-weight: 600;
  font-size: 12px;
  color: var(--ink-3);
  padding: 7px 8px;
  border-bottom: 1px solid var(--rule-strong);
  z-index: 1;
}
.isotable tr.grp th {
  text-align: left;
  padding: 16px 8px 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  border-bottom: 1px solid var(--rule-strong);
}
.isotable tr.grp small {
  margin-left: 8px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}
.isotable td {
  padding: 8px;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
.isotable td:first-child {
  width: 24%;
}
.isotable td:first-child b {
  display: block;
  font-weight: 600;
}
.isotable td:first-child .mono {
  display: block;
  font-size: 11.5px;
  overflow-wrap: anywhere;
}
.isotable td:nth-child(2) {
  width: 1%;
  white-space: nowrap;
}
.isotable td:nth-child(3) {
  width: 26%;
}
.isotable td:nth-child(3) .msgs {
  margin-top: 0;
}
.isotable td:last-child {
  color: var(--ink-2);
}
.isotable tr.ep-row {
  cursor: pointer;
}
.isotable tr.ep-row:hover td,
.isotable tr.ep-row:focus td {
  background: var(--surface-2);
}
.isotable tr.ep-row:focus {
  outline: none;
}
.isotable tr.ep-row:focus td:first-child {
  box-shadow: inset 3px 0 0 var(--pix);
}

.toast {
  position: fixed;
  bottom: 64px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--surface);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  z-index: 30;
  max-width: calc(100vw - 32px);
}

@media (max-width: 1366px) {
  .request {
    padding: 22px 22px 40px;
  }
  .exchange {
    padding: 20px 20px 40px;
  }
}

@media (max-width: 1180px) {
  .panes {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}
@media (max-width: 820px) {
  .app {
    height: auto;
    min-height: 100vh;
  }
  .panes {
    grid-template-columns: minmax(0, 1fr);
  }
  .pane {
    overflow: visible;
  }
  .request {
    border-right: 0;
    border-bottom: 1px solid var(--rule);
    padding: 18px 16px 28px;
  }
  .exchange {
    padding: 16px 16px 28px;
  }
  .req-head {
    flex-direction: column;
  }
  .kv {
    grid-template-columns: minmax(0, 1fr);
  }
  .values {
    position: sticky;
    bottom: 0;
    padding: 6px 16px;
  }
  .dlg-body .grid2 {
    grid-template-columns: minmax(0, 1fr);
  }
  .guide td:first-child,
  .guide.vals td:first-child {
    white-space: normal;
    word-break: break-all;
  }
  .guide th,
  .guide td {
    padding: 6px 5px;
  }
  .isofields thead {
    display: none;
  }
  .isofields tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2px 8px;
    padding: 8px 0;
    border-bottom: 1px solid var(--rule);
  }
  .isofields td {
    padding: 0;
    border: 0;
  }
  .isofields tr.sub {
    display: block;
  }
  .isofields td.iso-el,
  .isofields td:last-child {
    grid-column: 1 / -1;
  }
  .isotable thead {
    display: none;
  }
  .isotable tbody,
  .isotable tr,
  .isotable td,
  .isotable th {
    display: block;
    width: auto !important;
  }
  .isotable tr.ep-row {
    padding: 10px 0;
    border-bottom: 1px solid var(--rule);
  }
  .isotable td {
    border: 0;
    padding: 3px 0;
    white-space: normal !important;
  }
  .dlg-body {
    padding: 8px 16px 20px;
  }
  .ex-head select {
    margin-left: 0;
  }
}
@media (max-width: 480px) {
  .xcode {
    padding-left: calc(var(--d) * 1ch);
  }
  .xsrc {
    padding-left: calc(var(--d, 0) * 1ch + 1ch);
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}
