*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

body {
  background: #000;
  color: #e5e5e5;
  font-family: "OCR-B", "OCR B", "Share Tech Mono", monospace;
  -webkit-font-smoothing: none;
}

.viewport {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  padding: max(18px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  overflow: hidden;
}

.site-header {
  margin-bottom: 8px;
  flex-shrink: 0;
}

.site-header-box {
  display: inline-block;
  border: 1px solid #444;
  border-radius: 2px;
  background: #050505;
  overflow: hidden;
}

.site-header-text {
  display: inline-block;
  padding: 4px 8px;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #f5f5f5;
}

.panels {
  display: flex;
  align-items: stretch;
  gap: 8px;
  flex: 1 1 0;
  min-height: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
}

.panels::-webkit-scrollbar {
  height: 6px;
}

.panels::-webkit-scrollbar-track {
  background: #111;
}

.panels::-webkit-scrollbar-thumb {
  background: #555;
}

.panel {
  min-width: 220px;
  background: #050505;
  border: 1px solid #444;
  border-radius: 2px;
  padding: 8px 10px 10px 10px;
  box-shadow: 0 0 0 1px #050505, 0 0 18px rgba(0, 0, 0, 0.8);
  position: relative;
}

#category-panel,
#items-panel {
  width: max-content;
  max-width: 400px;
}

.panel-brands {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  max-width: 260px;
}

.panel-brands .panel-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 12px;
  -webkit-overflow-scrolling: touch;
}

.panel-brands .panel-content::-webkit-scrollbar {
  width: 10px;
}

.panel-brands .panel-content::-webkit-scrollbar-track {
  background: #111;
  margin: 4px 0;
}

.panel-brands .panel-content::-webkit-scrollbar-thumb {
  background: #fff;
  border-radius: 0;
}

.panel-brands .panel-content::-webkit-scrollbar-thumb:hover {
  background: #e0e0e0;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
      rgba(255, 255, 255, 0.05) 1px,
      transparent 1px
    );
  background-size: 100% 14px;
  mix-blend-mode: soft-light;
  opacity: 0.4;
  pointer-events: none;
}

.panel-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  margin-bottom: 4px;
  color: #aaaaaa;
}

.panel-header-line {
  border-bottom: 1px dotted #666;
  margin-bottom: 6px;
}

.panel-subtitle {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 2px;
  color: #888;
}

.panel-content {
  font-size: 11px;
  line-height: 1.5;
}

.panel-back {
  display: inline-block;
  margin-bottom: 4px;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.panel-back button {
  border: none;
  background: transparent;
  color: #8a8a8a;
  font: inherit;
  padding: 0;
  cursor: pointer;
}

.panel-back button:hover,
.panel-back button:focus-visible {
  outline: none;
  color: #000;
  background: #fff;
}

.list,
.list-section {
  margin: 0;
  padding: 0;
  list-style: none;
}

.list-section-label {
  margin-top: 6px;
  margin-bottom: 2px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #777;
}

.list-item {
  display: flex;
  justify-content: space-between;
  gap: 4px;
  padding: 1px 0;
}

.link {
  display: inline-block;
  width: 100%;
  text-decoration: none;
  color: #e0e0e0;
  background: transparent;
  border: none;
  padding: 1px 0;
  text-align: left;
  font: inherit;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.link:hover,
.link:focus-visible {
  outline: none;
  color: #000;
  background: #ffffff;
}

.link-muted {
  color: #8a8a8a;
}

.link-muted:hover,
.link-muted:focus-visible {
  color: #000;
  background: #ffffff;
}

.tag {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #888;
}

.chip {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #999;
  margin-bottom: 4px;
}

.item-row {
  margin-bottom: 3px;
}

.item-row-with-image {
  display: flex;
  gap: 6px;
  align-items: flex-start;
}

.item-thumb-wrap {
  flex: 0 0 56px;
  max-width: 56px;
  border-radius: 2px;
  overflow: hidden;
  border: 1px solid #333;
  background: #111;
}

.item-thumb-wrap img {
  display: block;
  width: 100%;
  height: auto;
}

.item-main {
  flex: 1 1 auto;
}

.item-name {
  display: inline-block;
  margin-right: 4px;
}

.item-meta {
  font-size: 9px;
  color: #777;
}

.item-actions {
  margin-top: 1px;
}

.external-link {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.external-link::after {
  content: " ⟶";
}

.site-footer {
  flex-shrink: 0;
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px solid #333;
  font-family: "OCR-B", "OCR B", "Share Tech Mono", monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #777;
}

.site-footer-line {
  margin-bottom: 2px;
}

.site-footer-email {
  color: #888;
  text-decoration: none;
}

.site-footer-email:hover,
.site-footer-email:focus-visible {
  color: #ccc;
  outline: none;
}

@media (max-width: 640px) {
  .viewport {
    padding: 12px;
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }

  .site-header-text {
    font-size: 12px;
  }

  .panel {
    min-width: 200px;
    padding: 10px 12px 12px;
  }

  .panel-title {
    font-size: 10px;
  }

  .panel-content {
    font-size: 12px;
  }

  .list-section-label {
    font-size: 11px;
  }

  .link {
    min-height: 44px;
    padding: 12px 0;
    -webkit-tap-highlight-color: transparent;
  }

  .link:active {
    background: #333;
    color: #fff;
  }

  .panel-back button {
    min-height: 44px;
    padding: 10px 0;
    -webkit-tap-highlight-color: transparent;
  }

  .panel-back button:active {
    color: #fff;
    background: #333;
  }

  .site-footer-email {
    display: inline-block;
    padding: 6px 0;
    min-height: 44px;
    line-height: 32px;
    -webkit-tap-highlight-color: transparent;
  }

  .site-footer-email:active {
    color: #fff;
  }

  .chip {
    font-size: 10px;
  }

  .external-link {
    font-size: 10px;
  }

  .item-meta {
    font-size: 10px;
  }

  .item-thumb-wrap {
    flex: 0 0 48px;
    max-width: 48px;
  }

  .site-footer {
    font-size: 11px;
  }
}

@media (max-width: 380px) {
  .viewport {
    padding: 10px;
    padding-left: max(10px, env(safe-area-inset-left));
    padding-right: max(10px, env(safe-area-inset-right));
  }

  .panel {
    min-width: 180px;
  }
}

