:root {
  color-scheme: dark;
}
body {
  font:
    14px system-ui,
    -apple-system,
    sans-serif;
  min-height: 100vh;
  margin: 0;
  display: grid;
  /* An auto column grows to the widest row's text (nowrap titles), so the
     panel's min(750px, 100%) resolved against it and overflowed on phones. */
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: 24px;
  box-sizing: border-box;
  background: #111;
  color: #eee;
}
/* #app is the grid item; it must span the column so main's 100% is the
   viewport, not the widest row. */
#app {
  width: 100%;
  min-width: 0;
  display: flex;
  justify-content: center;
}
main {
  position: relative;
  width: min(750px, 100%);
  height: 475px;
  display: flex;
  flex-direction: column;
  background: #1b1b1d;
  border: 1px solid #39393d;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 18px 55px #0008;
}
header {
  flex: none;
  padding: 18px 20px 12px;
}
h1 {
  font-size: 16px;
  margin: 0 0 12px;
}
input {
  background: #252528;
  color: inherit;
  border: 1px solid #4b4b50;
  border-radius: 8px;
  padding: 0.7rem;
  width: 100%;
  box-sizing: border-box;
}
.rows {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  margin: 0;
  padding: 0;
  list-style: none;
}
.rows li {
  min-height: 40px;
  box-sizing: border-box;
  padding: 7px 20px;
  display: flex;
  align-items: center;
  gap: 11px;
}
.rows li.selected {
  background: #34343a;
  outline: 1px solid #666;
}
.root-copy {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}
.root-copy strong,
.root-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.root-copy small {
  color: #aaa;
}
.root-accessory {
  color: #999;
  font-size: 12px;
}
.root-icon {
  width: 24px;
  text-align: center;
  font-size: 18px;
  display: grid;
  place-items: center;
}
.root-icon img {
  display: block;
  border-radius: 5px;
}
.empty {
  padding: 18px 20px;
  color: #aaa;
}
footer {
  flex: none;
  min-height: 42px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 16px;
  border-top: 1px solid #333;
  padding: 11px 20px;
  color: #aaa;
  font-size: 12px;
}
#status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: #aaa;
}
.status-spinner {
  width: 8px;
  height: 8px;
  flex: none;
  border: 1px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
#status[data-error="true"] {
  color: #ff8b8b;
}
#status[data-error="true"] .status-spinner {
  display: none;
}
.footer-hints {
  margin-left: auto;
  display: flex;
  gap: 16px;
  white-space: nowrap;
}
footer button {
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
}
.actions {
  position: absolute;
  z-index: 2;
  inset: 76px 12px 54px;
  padding: 18px;
  overflow: auto;
  background: color-mix(in srgb, #1b1b1d 94%, transparent);
  border: 1px solid #39393d;
  border-radius: 10px;
  box-shadow: 0 18px 45px #0008;
}
.actions li {
  padding: 10px;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #aaa;
  margin: 0 0 10px;
  font-size: 12px;
}
.breadcrumb-icon {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 5px;
  background: #34343a;
}
.breadcrumb-icon img {
  display: block;
  width: 20px;
  height: 20px;
}
.breadcrumb-separator {
  color: #666;
}
@media (max-width: 600px) {
  body {
    padding: 0;
  }
  main {
    width: 100%;
    height: 100vh;
    border: 0;
    border-radius: 0;
  }
  .actions {
    inset: 76px 8px 48px;
  }
}
@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
  }
  body {
    background: #f2f2f4;
    color: #171719;
  }
  main {
    background: #fff;
    border-color: #ddd;
  }
  .rows li.selected {
    background: #e8e8ed;
  }
  .root-copy small,
  .root-accessory,
  footer,
  #status,
  .breadcrumb {
    color: #666;
  }
  input {
    background: #f7f7f8;
    border-color: #bbb;
  }
  .actions {
    background: color-mix(in srgb, #fff 96%, transparent);
    border-color: #ddd;
    box-shadow: 0 18px 45px #0002;
  }
}
