:root {
  --paper: #f4f8fb;
  --ink: #12314d;
  --body: #17324a;
  --muted: #5d7388;
  --line: #b8cade;
  --card: #ffffff;
  --wash: #edf4f8;
  --accent: #0b63ce;
}
body {
  background: var(--paper);
  color: var(--body);
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
}
.site-header {
  background: var(--ink);
  color: #f4f8fb;
}
.site-header a { color: #f4f8fb; text-decoration: none; }
.site-header a.btn-light,
.site-header a.btn-light:hover,
.site-header a.btn-light:focus { color: var(--ink); }
.qsl-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 1.15rem;
  box-shadow: 0 12px 32px rgb(18 49 77 / 0.08);
}
.swatch {
  display: inline-block;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  vertical-align: middle;
}
.btn-accent { background: var(--accent); color: #fff; border: 0; }
.btn-accent:hover { background: #084fa6; color: #fff; }
.muted { color: var(--muted); }
h1, h2, .ink { color: var(--ink); }
.nav-pills .nav-link { color: var(--ink); }
.nav-pills .nav-link.active { background: var(--accent); }
.photo-slot {
  width: 4.5rem;
  height: 4.5rem;
  border: 1px dashed var(--line);
  border-radius: 0.6rem;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--wash);
  color: var(--muted);
  font-size: 0.75rem;
}
.photo-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.filament-gallery { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: flex-end; }
.filament-gallery img,
.filament-photo img { width: 4.5rem; height: 4.5rem; object-fit: cover; border-radius: 0.6rem; border: 1px solid var(--line); background: var(--wash); }
.filament-gallery img.is-cover { width: 7.5rem; height: 7.5rem; }
.filament-photo { display: flex; flex-direction: column; gap: 0.2rem; font-size: 0.8rem; color: var(--muted); }
#filament-color { width: 2.75rem; height: 2.4rem; padding: 0.15rem; border: 1px solid var(--line); background: #fff; border-radius: 0.4rem; }
@media (max-width: 640px) {
  .filament-table, .filament-table thead, .filament-table tbody, .filament-table tr, .filament-table td, .filament-table th { display: block; }
  .filament-table thead { display: none; }
  .filament-table tr { padding: 0.75rem 0; border-bottom: 1px solid var(--line); }
  .filament-table td { border: 0; padding: 0.15rem 0; }
  .filament-table td[data-label]::before { content: attr(data-label) ": "; font-weight: 600; }
}
.model-photo {
  display: block;
  max-width: 100%;
  max-height: 24rem;
  width: auto;
  height: auto;
  margin: 0 0 1rem;
  border-radius: 0.8rem;
  border: 1px solid var(--line);
  background: var(--wash);
}
.model-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr));
  gap: 0.75rem;
}
.model-photo-pick {
  display: block;
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
}
.model-photo-pick img {
  width: 100%;
  height: 7.5rem;
  object-fit: cover;
  border-radius: 0.6rem;
  border: 1px solid var(--line);
  background: var(--wash);
}
.catalog-cover {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--wash);
}
.catalog-sort { width: 10rem; max-width: 100%; }
.catalog-excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.catalog-cover-empty {
  background: linear-gradient(180deg, #f7fbfe, var(--wash));
}
.catalog-main {
  display: block;
  width: 100%;
  max-height: 32rem;
  object-fit: contain;
  background: var(--wash);
  border-radius: 0.8rem;
}
.catalog-thumbs {
  display: flex;
  gap: 0.5rem;
  margin: 0.6rem 0 1rem;
  overflow-x: auto;
}
.catalog-thumb {
  flex: 0 0 auto;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 0.55rem;
  background: transparent;
}
.catalog-thumb[aria-current="true"] { border-color: var(--accent); }
.catalog-thumb img {
  display: block;
  width: 4.75rem;
  height: 4.75rem;
  object-fit: cover;
  border-radius: 0.4rem;
  background: var(--wash);
}
.model-video {
  position: relative;
  width: 100%;
  max-width: 40rem;
  aspect-ratio: 16 / 9;
  margin: 0 0 1rem;
  border-radius: 0.8rem;
  overflow: hidden;
  background: #111;
}
.model-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.landing-wrap { max-width: 40rem; }
.landing-signed {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}
.landing-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.landing-body { overflow-wrap: anywhere; }
@media (max-width: 575.98px) {
  .landing-signed { align-items: stretch; }
  .landing-actions { width: 100%; }
  .landing-actions .btn { flex: 1 1 8rem; }
}
body.confirm-open { overflow: hidden; }
.confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 1080;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 0.75rem;
  padding-bottom: calc(0.75rem + env(safe-area-inset-bottom));
  background: rgb(18 49 77 / 0.45);
}
.confirm-modal.is-open { display: flex; }
.confirm-modal-card {
  width: min(100%, 24rem);
  max-height: calc(100% - 1.5rem);
  overflow: auto;
  background: var(--card);
  color: var(--body);
  border: 1px solid var(--line);
  border-radius: 1.15rem;
  box-shadow: 0 12px 32px rgb(18 49 77 / 0.18);
  padding: 1.15rem 1.15rem 1rem;
}
.confirm-modal-text { overflow-wrap: anywhere; }
.confirm-modal-actions {
  display: flex;
  flex-direction: column-reverse;
  gap: 0.5rem;
  margin-top: 1rem;
}
.confirm-modal-actions .btn {
  min-height: 2.75rem;
  width: 100%;
}
@media (min-width: 576px) {
  .confirm-modal { align-items: center; padding: 1.5rem; }
  .confirm-modal-actions { flex-direction: row; justify-content: flex-end; }
  .confirm-modal-actions .btn { width: auto; min-width: 7.5rem; }
}
.order-row {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
}
.order-row:first-child { padding-top: 0; }
.order-row:last-child { border-bottom: 0; padding-bottom: 0; }
.order-row-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
}
.order-row-id { font-weight: 600; overflow-wrap: anywhere; }
.order-row-status { flex: 0 0 auto; text-align: right; }
.order-row-meta { margin-top: 0.15rem; }
.order-models {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
  margin-top: 0.35rem;
  font-size: 0.875rem;
}
.order-model { overflow-wrap: anywhere; }
.filament-field { position: relative; }
.filament-field.is-ready .filament-native {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.filament-button,
.filament-option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  min-height: 2.75rem;
  border: 0;
  background: #fff;
  color: var(--body);
  text-align: left;
}
.filament-button {
  position: relative;
  padding: 0.375rem 2.2rem 0.375rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.375rem;
}
.filament-button::after {
  content: "";
  position: absolute;
  right: 0.9rem;
  top: 50%;
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  transform: translateY(-70%) rotate(45deg);
}
.filament-button:focus-visible,
.filament-option:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.filament-button .swatch,
.filament-option .swatch { flex: 0 0 auto; }
.filament-menu {
  position: absolute;
  z-index: 30;
  left: 0;
  right: 0;
  top: calc(100% + 0.25rem);
  max-height: min(18rem, 50vh);
  overflow: auto;
  margin: 0;
  padding: 0.3rem;
  list-style: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  box-shadow: 0 12px 32px rgb(18 49 77 / 0.14);
}
.filament-menu.is-up { top: auto; bottom: calc(100% + 0.25rem); }
.filament-option {
  border-radius: 0.55rem;
  padding: 0.35rem 0.7rem;
}
.filament-option[aria-selected="true"],
.filament-option.is-active { background: var(--wash); }
details.roster > summary {
  cursor: pointer;
  padding: 0.4rem 0.85rem;
}
details.roster > summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.roster-title { min-width: 0; overflow-wrap: anywhere; }
.roster-line {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
