/* ============================================================================
   DETAIL PAGES: /ships/{slug}/ and /bases/{slug}/
   One sheet for both, so a base and a corvette read as the same page. Both
   templates set pageCss: detail. Moved out of ships/ship.njk on 2026-11-11
   unchanged; the base page adds only its portal address and access states
   (in bases/base.njk).
   ============================================================================ */
/* The board's own buttons (.b), coin and the catalog's .wc card come from
   the design canvas, the same two sheets the catalog loads. */
@import url("/_preview/designs/canvas/gold.css");
@import url("/_preview/designs/canvas/ship.css");

/* ============================================================================
   SHIP DETAIL (/ships/{slug}/; canvas "Ship detail screen, redesigned",
   2026-11-10)
   Two columns from the top. Left: the photo with every angle in a labelled
   strip under it, the actions, About folded to two lines, the comments
   straight after it, then what it is fitted with, in groups. Right, with no
   frame and scrolling with the page: the name, the builder, the facts and the
   one gold button. Below 1024px that column drops in under the photo. On
   phones the comments show the two newest and open the rest as a sheet, and
   Obtain moves to a bar fixed to the bottom of the screen. Gold marks the
   builder's name and the Obtain button.
   ============================================================================ */

.sd {
  --sd-side: 340px;
  --sd-avatar: 34px;
  --sd-cmt-avatar: 36px;
  --sd-reply-avatar: 28px;
  --sd-glass: rgba(8, 11, 17, 0.62);
  --sd-about-lines: 2;
}
.sd-top,
.sd-body {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad);
}
.sd-top[hidden],
.sd-body[hidden],
.sd [hidden] { display: none !important; }

.sd-ic {
  width: 15px;
  height: 15px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sd-count { color: var(--text-muted); font-variant-numeric: tabular-nums; }
.sd-count:empty { display: none; }

/* ===== Two columns: everything to read on the left, the card on the right ===== */
.sx {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--sd-side);
  gap: 40px;
  align-items: start;
  margin-top: 16px;
}
.sx-main { display: flex; flex-direction: column; min-width: 0; }
.sx-side { align-self: stretch; min-width: 0; }
.sx-viewer { display: flex; flex-direction: column; gap: 6px; }

/* the view: the photo, clean; the viewer button and the count on it */
.hg-view {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--surface);
}
.hg-view::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, transparent 18%);
}
.hg-photo {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}
.hg-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hg-chip {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 10px;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--sd-glass);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.hg-chip-tr { right: 14px; top: 14px; width: 30px; padding: 0; justify-content: center; cursor: zoom-in; }
.hg-chip-tr:hover,
.hg-chip-br:hover { background: rgba(0, 0, 0, 0.8); }
.hg-chip-br { right: 14px; bottom: 14px; letter-spacing: 0; font-size: 12px; text-transform: none; cursor: zoom-in; }
.hg-chip-br .sd-ic { width: 13px; height: 13px; }

/* the strip: every angle with its label, the one in view lit; a video, when
   there is one, first. Six show at a time; the row scrolls sideways for the
   rest, and round arrows on its ends step the photo in view. */
.hg-rail { position: relative; }
.hg-strip {
  position: relative;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.hg-strip::-webkit-scrollbar { display: none; }
.hg-th {
  position: relative;
  flex: 0 0 calc((100% - 30px) / 6);
  aspect-ratio: 16 / 9;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: var(--surface);
  cursor: pointer;
}
.hg-th img { display: block; width: 100%; height: 100%; object-fit: cover; opacity: 0.72; transition: opacity .15s; }
.hg-th-label {
  position: absolute;
  left: 6px;
  right: 4px;
  bottom: 4px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  text-align: left;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95), 0 0 8px rgba(0, 0, 0, 0.7);
  pointer-events: none;
}
.hg-th:hover img,
.hg-th:focus-visible img,
.hg-th.is-on img { opacity: 1; }
.hg-th.is-on::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 1px rgba(var(--amber-rgb), 0.9), inset 0 -2px 0 rgba(var(--amber-rgb), 0.9);
}
/* the arrows: round, gold-edged, as on the catalog rows; each hides at its
   end of the photos */
.hg-step {
  position: absolute;
  z-index: 4;
  top: 50%;
  translate: 0 -50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--amber);
  background: color-mix(in srgb, var(--surface) 92%, #000);
  color: var(--amber-bright);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.55);
  cursor: pointer;
  transition: opacity .15s, background .15s, color .15s;
}
.hg-step:hover { background: color-mix(in srgb, var(--amber-deep) 70%, #000); color: var(--gold-cream); }
.hg-step.is-off { opacity: 0; pointer-events: none; }
.hg-step svg { width: 15px; height: 15px; }
.hg-step-prev { left: -18px; }
.hg-step-next { right: -18px; }
.hg-th-play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: var(--text);
}
.hg-th-play svg { width: 12px; height: 12px; margin-left: 2px; fill: currentColor; }
.hg-th-video img { opacity: 0.8; }

/* the video plays in the view, over the photo and its button */
.hg-view .ship-video-iframe { z-index: 3; }

/* the side column: the name, the builder, the facts as text, the buttons
   under them, straight on the page with no frame, so they run the column's
   full width and start level with the top of the photo. It scrolls with the
   page. */
.hg-pass {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.hg-id { display: flex; flex-direction: column; gap: 14px; }
.hg-eyebrow {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.hg-eyebrow:empty { display: none; }
.hg-name {
  margin: -6px 0 0;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--text);
  overflow-wrap: anywhere;
}
.hg-name small { margin-left: 4px; font-size: 15px; font-weight: 600; letter-spacing: 0; color: var(--text-muted); }

/* the version under the name: a small boxed button that opens the older
   versions; with only one version it is a plain tag (no arrow, no menu) */
.sd-ver { align-self: flex-start; margin-top: -4px; }
.sd-ver-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  background: none;
  border: 1px solid var(--border-strong);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  cursor: pointer;
}
.sd-ver-btn:hover:not(:disabled),
.sd-ver-btn[aria-expanded="true"] { border-color: rgba(var(--amber-rgb), 0.7); }
.sd-ver-btn:disabled { cursor: default; color: var(--text-muted); }
.sd-ver-chev { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sd-ver.is-single .sd-ver-chev { display: none; }
.sd-ver-btn[aria-expanded="true"] .sd-ver-chev { transform: rotate(180deg); }
.sd-ver-menu { left: 0; right: auto; min-width: 230px; max-height: 300px; overflow-y: auto; }
.sd-ver-day { margin-left: 8px; font-size: 12px; color: var(--text-muted); }
.sd-ver-item:focus-visible { outline: 1px solid rgba(var(--amber-rgb), 0.8); outline-offset: -1px; }
/* the version on Obtain and Download */
.sd-cta-ver { margin-left: -4px; font-weight: 500; opacity: .72; } /* the button's 10px gap, less 4: about a space */

/* how many have it and when it was listed, quietly under the builder */
.hg-sub { margin: -2px 0 0; font-size: 13px; color: var(--text-muted); }
.hg-sub b { font-weight: 600; color: var(--text); }

/* the facts as plain text, two to a row, kept tight: a quiet label over its
   value, between two rules; the size, the longest, runs the width */
.hg-spec {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
  margin: 0;
  padding: 14px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.hg-spec:empty { display: none; }
.hg-spec .sd-spec { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hg-spec .sd-spec.is-wide,
.hg-spec .sd-spec:last-child:nth-child(odd),
.hg-spec .sd-spec:nth-child(odd):has(+ .is-wide) { grid-column: 1 / -1; }
.hg-spec dt { font-size: 11px; line-height: 1.3; color: var(--text-muted); white-space: nowrap; }
.hg-spec dd {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.hg-act { padding-top: 20px; }
/* a quiet line over the buttons saying there is a video */
.hg-has-video {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
}
.hg-has-video:hover { color: var(--text); }
.hg-has-video .sd-ic { width: 12px; height: 12px; fill: currentColor; stroke: none; }
.hg-has-video[hidden] { display: none !important; }
.hg-go,
.sd-order-state,
.hg-act .ship-order-gate { display: flex; flex-direction: column; gap: 10px; }
.hg-pass.ship-order-gated .hg-go { display: none; }
.sd-cta { width: 100%; justify-content: center; }
.hg-go #shipOrderCta { min-height: 50px; font-size: 14px; }
.hg-dl { border-color: var(--border-strong); }

/* one line under the buttons; it opens how the corvette arrives */
.hg-how { font-size: 12px; color: var(--text-muted); }
.hg-how summary { list-style: none; text-align: center; cursor: pointer; line-height: 1.5; }
.hg-how summary::-webkit-details-marker { display: none; }
.hg-how-q { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.hg-how summary:hover .hg-how-q { text-decoration-color: rgba(var(--amber-rgb), 0.8); }
.hg-how[open] summary { margin-bottom: 12px; }
.hg-how .sd-steps { margin: 0; padding: 12px 0 0; border-top: 1px solid var(--border); }

.sd-order-title,
.hg-act .ship-order-gate-title {
  margin: 0;
  font-family: inherit;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}
.sd-order-body,
.hg-act .ship-order-gate-body { margin: 0; font-size: 14px; line-height: 1.5; color: var(--text-muted); }
.hg-act .ship-order-gate-alt { margin-top: 0; color: var(--text-muted); }

/* ===== Under the photo: the actions ===== */
.sx-acts { padding: 12px 0; border-bottom: 1px solid var(--border); }

/* ===== In the card: the builder, under the name ===== */
.sd-by {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  min-width: 0;
}
.sd-builder {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  text-decoration: none;
}
.sd-builder-avatar {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: var(--sd-avatar);
  height: var(--sd-avatar);
  overflow: hidden;
  border-radius: 50%;
  background: var(--card-hover);
  box-shadow: 0 0 0 1px var(--border-strong);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}
.sd-builder-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sd-bar-who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sd-builder-name {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  background: var(--gold-ink);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  /* lit, like the seal on the builder profile */
  filter: drop-shadow(0 0 6px rgba(var(--amber-rgb), 0.55));
}
.sd-builder:hover .sd-builder-name { text-decoration: underline; text-decoration-color: rgba(var(--amber-rgb), 0.6); }
.sd-builder-name .cat-card-verified { width: 13px; height: 13px; }
.sd-bar-role { font-size: 12px; color: var(--text-muted); }
.sd-bar-role:empty { display: none; }
.sd-collab { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 13px; color: var(--text-dim); }
.sd-collab-names { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.sd-collab-names a,
.sd-collab-names span { color: var(--text-muted); text-decoration: none; }
.sd-collab-names a:hover { color: var(--text); }
.sd-collab-names .ship-order-collab-sep { color: var(--text-dim); }

.sd-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: stretch;
  gap: 8px;
}
.sd-actions > .sd-pop { display: flex; }
/* Share, Edit and More sit at the far end */
.sd-actions > .sd-acts-end,
.sd-actions > .sd-acts-end[hidden] + #shipEditLink:not([hidden]),
.sd-actions > .sd-acts-end[hidden] + #shipEditLink[hidden] + #shipMore { margin-left: auto; }
.sd-cmt-jump { border-color: rgba(var(--amber-rgb), 0.55); }
.sd .charon-like { padding: 7px 14px 7px 10px; }
.sd-icon-btn { padding-left: 12px; padding-right: 12px; }
.sd-fav.is-active .sd-ic { fill: currentColor; }
.sd .sd-note {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-dim);
}
.sd-note a { color: var(--text-muted); }

/* ===== Menus under the actions: Collect, Share, More ===== */
.sd-pop { position: relative; }
.sd-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 100;
  min-width: 240px;
  max-width: 300px;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  box-shadow: var(--elev-card-hover);
  text-align: left;
}
.sd-more-menu { min-width: 200px; }
.ship-coll-menu-list { max-height: 260px; overflow-y: auto; }
.ship-coll-item,
.ship-coll-menu-new {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 10px;
  background: none;
  border: 0;
  border-radius: 4px;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}
.ship-coll-item:hover,
.ship-coll-menu-new:hover { background: var(--card-hover); }
.ship-coll-check { width: 14px; flex: none; color: var(--text); font-weight: 700; }
.ship-coll-item-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ship-coll-item-tag {
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
  border: 1px solid var(--border-strong);
  border-radius: 2px;
  padding: 1px 5px;
}
.ship-coll-empty { color: var(--text-dim); font-size: 13px; padding: 10px; }
.ship-coll-menu-new { margin-top: 4px; border-top: 1px solid var(--border); border-radius: 0; color: var(--text-muted); }
.ship-coll-toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  z-index: 1100;
  transform: translateX(-50%);
  padding: 12px 20px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  box-shadow: var(--elev-card-hover);
  color: var(--text);
  font-size: 14px;
}
.sd-share { width: 260px; padding: 16px; }
.sd-share .ship-share-qr { width: 160px; height: 160px; margin: 0 auto 12px; }

/* ===== Under the two columns: more from the builder ===== */
.sd-body { display: block; }
.sx-sec { display: flex; flex-direction: column; margin-top: 40px; }
.sx-sec > .dz-sec-title,
.sd-cmts .dz-sec-title { font-size: 22px; }
.sx-sec > .dz-sec-title { margin-bottom: 14px; }

/* About, folded to two lines with a fade; Read more opens it */
.sd-about {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 18px;
}
.sd-about.is-shut .sd-about-text { cursor: pointer; }
.sd-about-text { font-size: 15px; line-height: 1.65; }
.sd-about-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; font-size: 12.5px; color: var(--text-dim); }
.sd-about-foot:empty { display: none; }
.sd-lore-link { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--text); text-decoration: none; }
.sd-lore-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.sd-lore-link .sd-ic { color: var(--amber); }
.sd-lore-link em { font-style: normal; font-weight: 500; color: var(--text-dim); }
.sd-tags { display: inline-flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.sd-tags:empty { display: none; }
.sd-tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border: 1px solid var(--border-strong); font-size: 12px; color: var(--text-muted); }
.sd-about.is-shut .sd-about-text {
  max-height: calc(1.65em * var(--sd-about-lines));
  overflow: hidden;
  -webkit-mask-image: linear-gradient(#000 55%, transparent);
  mask-image: linear-gradient(#000 55%, transparent);
}
.sd-about .sd-prose p { margin: 0 0 12px; color: var(--text-muted); }
.sd-about .sd-prose p:first-child { color: var(--text); }
.sd-about .sd-prose p:last-child { margin-bottom: 0; }
/* the lore, once About is open: its own voice, behind a gold rule */
.sd-about-h {
  margin: 20px 0 10px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--amber);
  scroll-margin-top: 100px;
}
.sd-about .sd-lore { padding-left: 16px; border-left: 2px solid rgba(var(--amber-rgb), 0.7); border-radius: 0; }
.sd-about .sd-lore p,
.sd-about .sd-lore p:first-child { color: var(--text-muted); }

/* ===== Comments, straight after About ===== */
.sd-cmts-all { display: none; }
.sd-cmts { display: flex; flex-direction: column; gap: 16px; margin-top: 32px; scroll-margin-top: 80px; }
.sd-cmts-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.sd-cmts-head .dz-sec-title { display: inline-flex; align-items: baseline; margin: 0; white-space: nowrap; }
.sd-sheet-x { display: none; }
.sd-sort { display: inline-flex; border: 1px solid var(--border-strong); }
.sd-sort button {
  height: 32px;
  padding: 0 14px;
  border: 0;
  border-left: 1px solid var(--border);
  background: none;
  color: var(--text-muted);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.sd-sort button:first-child { border-left: 0; }
.sd-sort button:hover { color: var(--text); }
.sd-sort button.is-on { background: var(--card-hover); color: var(--text); box-shadow: inset 0 -2px 0 rgba(var(--amber-rgb), 0.75); }

.sd .ship-comments { margin: 0; display: flex; flex-direction: column; }
.sd .ship-comments-gate {
  margin: 0 0 8px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-left: 2px solid var(--border-strong);
  border-radius: 0;
  background: var(--surface);
  font-size: 14px;
}
.sd .ship-comment-form { margin: 0 0 8px; }
.sd-compose-in {
  box-sizing: border-box;
  width: 100%;
  min-height: 76px;
  padding: 12px 14px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  line-height: 1.5;
  resize: vertical;
}
.sd-compose-in::placeholder { color: var(--text-dim); }
.sd-compose-in:focus { outline: 0; border-image: var(--gold-line) 1; }
.sd .ship-comment-form-foot { margin-top: 10px; }
.sd .ship-comment-hint { font-size: 12px; color: var(--text-dim); }
.sd .ship-comment-status:empty { display: none; }

.sd .ship-comment-thread { border-bottom: 1px solid var(--border); padding: 4px 0 12px; }
.sd .ship-comment-thread:last-child { border-bottom: 0; }
.sd .ship-comment { gap: 14px; padding: 14px 0 0; border: 0; }
.sd .ship-comment-avatar {
  display: grid;
  place-items: center;
  width: var(--sd-cmt-avatar);
  height: var(--sd-cmt-avatar);
  border: 0;
  background: var(--card-hover);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}
.sd .ship-comment-head { gap: 4px 10px; }
.sd .ship-comment-author { color: var(--text); font-size: 13.5px; text-decoration: none; }
.sd .ship-comment-author:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.sd .ship-comment-author.is-builder {
  background: var(--gold-ink);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.sd .ship-comment-builder {
  padding: 1px 6px;
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.sd .ship-comment-text { margin-top: 4px; color: var(--text-muted); font-size: 14px; }
.sd .ship-comment-acts { display: flex; align-items: center; gap: 2px; margin: 6px 0 0 -10px; }
.sd .ship-comment-act,
.sd .ship-comment-fold {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  margin: 0;
  padding: 0 10px;
  border: 0;
  background: none;
  color: var(--text-muted);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}
.sd .ship-comment-act:hover,
.sd .ship-comment-fold:hover { background: var(--card-hover); color: var(--text); }
.sd .ship-comment-del { margin-left: 0; }
.sd .ship-comment-del:hover { color: #f3a4a4; }
.sd .ship-comment-fold { margin: 2px 0 0 40px; color: var(--text); font-weight: 600; }
.sd .ship-comment-fold[aria-expanded="true"] .sd-ic { transform: rotate(180deg); }
.sd .ship-comment-replies { margin: 4px 0 0 50px; padding-left: 16px; border-left: 1px solid var(--border-strong); }
.sd .ship-comment-reply { padding-top: 12px; }
.sd .ship-comment-reply .ship-comment-avatar { width: var(--sd-reply-avatar); height: var(--sd-reply-avatar); font-size: 10px; }
.sd .ship-reply-form { margin: 12px 0 0 50px; }
.sd-cmts-more { width: 100%; justify-content: center; margin-top: 12px; }

/* ===== Fitted with: the amenities in groups, then the builder's own words ===== */
.sx-fit { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.sx-grp { display: flex; flex-direction: column; gap: 9px; min-width: 0; padding: 14px 16px; border: 1px solid var(--border); background: var(--card); }
.sx-grp-h { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; color: var(--text); }
.sx-grp-h .sd-ic { width: 18px; height: 18px; color: var(--amber); }
.sx-grp-n { margin-left: auto; font-size: 12px; font-weight: 500; color: var(--text-dim); }
.sx-grp ul { display: flex; flex-direction: column; gap: 5px; margin: 0; padding: 0; list-style: none; }
.sx-grp li { font-size: 14px; line-height: 1.4; color: var(--text-muted); overflow-wrap: anywhere; }
.sx-grp li small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--text-dim); }
.sd-from { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; padding: 14px 16px; border: 1px solid var(--border); }
.sx-fit[hidden] + .sd-from { margin-top: 0; }
.sd-from-title { font-size: 13px; font-weight: 700; color: var(--text); }
.sd-from-list p { position: relative; margin: 0 0 8px; padding-left: 16px; font-size: 14px; line-height: 1.55; color: var(--text-muted); white-space: pre-line; }
.sd-from-list p::before { content: ""; position: absolute; left: 0; top: .78em; width: 7px; height: 1px; background: var(--amber); }
.sd-from-list p:last-child { margin-bottom: 0; }

.sd-steps { margin: 0; padding: 0; list-style: none; counter-reset: sd-step; }
.sd-steps li {
  position: relative;
  padding: 0 0 12px 30px;
  counter-increment: sd-step;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
  text-align: left;
}
.sd-steps li:last-child { padding-bottom: 0; }
.sd-steps li::before {
  content: counter(sd-step);
  position: absolute;
  left: 0;
  top: 0;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  color: var(--text);
  font-size: 10px;
  font-weight: 600;
}
.sd-steps b { color: var(--text); font-weight: 600; }

.sd-more { margin-top: 56px; padding-top: 40px; border-top: 1px solid var(--border); }
.sd-more-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.sd-more .dz-sec-title a { color: inherit; text-decoration: none; }
.sd-more .dz-sec-title a:hover { text-decoration: underline; }

/* ===== Tablet: one column; the card drops in under the photo ===== */
@media (max-width: 1024px) {
  .sx { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  .sx-main,
  .sx-side { display: contents; }
  .sx-viewer { order: 0; }
  .hg-pass { order: 1; margin-top: 22px; }
  .sx-acts { order: 2; }
  .sd-about { order: 3; }
  .sd-cmts { order: 4; }
  .sx-fit-sec { order: 5; }
  /* the card in two columns: who and what on the left, the buttons right */
  .hg-pass { display: grid; grid-template-columns: minmax(0, 1fr) var(--sd-side); column-gap: 40px; align-items: start; }
  .hg-act { padding-top: 0; }
  .sd-menu { right: auto; left: 0; }
  .sd-more-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ===== Phone: the card under the photo, its buttons on a bar at the foot of
   the screen; the comments show the two newest and open the rest as a sheet ===== */
@media (max-width: 720px) {
  .sx { margin-top: 12px; }
  .hg-th { flex: 0 0 28%; }
  .hg-step { width: 32px; height: 32px; }
  .hg-step-prev { left: -10px; }
  .hg-step-next { right: -10px; }
  .hg-chip-br { right: 10px; bottom: 10px; }

  /* the card loses its buttons (they ride the bar); the facts run as one line */
  .hg-pass { display: flex; margin-top: 4px; }
  .hg-pass-sec,
  .hg-pass-sec:last-child { padding: 12px 0 0; }
  .hg-id { gap: 10px; }
  .hg-name { font-size: 24px; }
  .hg-go { display: none; }
  .hg-act:not(:has(> :not([hidden]):not(.hg-go))) { display: none; }
  /* each fact carries its dot in its left margin; the line is pulled left by
     that margin and that strip is clipped, so a fact that starts a line
     shows no dot */
  .hg-spec { display: flex; flex-wrap: wrap; gap: 4px 0; margin-left: -17px; padding: 0; border: 0; clip-path: inset(0 0 0 17px); }
  .hg-spec .sd-spec { position: relative; display: block; margin-left: 17px; }
  .hg-spec .sd-spec::before { content: "\00b7"; position: absolute; left: -11px; top: 0; color: var(--text-dim); font-size: 13px; line-height: 1.3; }
  .hg-spec dt { display: none; }
  .hg-spec dd { display: inline; font-size: 13px; font-weight: 500; color: var(--text-muted); white-space: nowrap; }
  .hg-spec .sd-spec-parts dd { color: var(--text); font-weight: 600; }
  .hg-spec .sd-spec-parts dd::after { content: " parts"; font-weight: 500; color: var(--text-muted); }

  /* the actions as one row you swipe along; Comments comes second */
  .sx-acts { margin-top: 14px; border-top: 1px solid var(--border); }
  .sd-actions { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--pad) * -1); padding: 0 var(--pad); }
  .sd-actions::-webkit-scrollbar { display: none; }
  .sd-actions > * { flex: none; }
  .sd-actions > .sd-cmt-jump { order: -1; }
  .sd-actions > .charon-like { order: -2; }
  .sd-actions > .sd-acts-end,
  .sd-actions > .sd-acts-end[hidden] + #shipEditLink:not([hidden]),
  .sd-actions > .sd-acts-end[hidden] + #shipEditLink[hidden] + #shipMore { margin-left: 0; }

  /* comments, closed: the gate or the box, the two newest, then "All" */
  .sd-cmts { margin-top: 28px; }
  .sd-cmts:not(.is-open) .ship-comment-thread:nth-child(n+3),
  .sd-cmts:not(.is-open) .sd-cmts-more,
  .sd-cmts:not(.is-open) .sd-sort { display: none !important; }
  .sd-cmts:not(.is-open) .sd-cmts-all:not([hidden]) { display: inline-flex; align-self: flex-start; }
  .sd-cmts .dz-sec-title,
  .sx-sec > .dz-sec-title { font-size: 20px; }
  .sx-fit { grid-template-columns: 1fr; gap: 8px; }

  /* the comments, open, are a sheet */
  .sd-cmts.is-open {
    position: fixed;
    inset: 12vh 0 0;
    z-index: 1000;
    margin: 0;
    gap: 0;
    background: var(--surface);
    border-top: 1px solid var(--border-strong);
    box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.55), 0 -18px 40px rgba(0, 0, 0, 0.5);
  }
  .sd-cmts.is-open .sd-cmts-head {
    flex-wrap: wrap;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
  }
  .sd-cmts.is-open .dz-sec-title { font-size: 18px; }
  .sd-cmts.is-open .sd-sort { order: 3; }
  .sd-cmts.is-open .sd-sheet-x {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    margin-left: auto;
    padding: 0;
    border: 0;
    background: none;
    color: var(--text);
    cursor: pointer;
  }
  .sd-cmts.is-open .ship-comments { flex: 1; overflow-y: auto; padding: 12px 16px 24px; }
  .sd .ship-comment-replies { margin-left: 20px; }
  .sd .ship-comment-fold { margin-left: 30px; }
  .sd .ship-reply-form { margin-left: 0; }
  .sd-more { margin-top: 40px; }
}
@media (max-width: 720px) {
  /* the action row scrolls, so its menus rise from the bottom of the screen */
  /* z-index clears the fixed Obtain bar (.sd-obar, 950), which otherwise sat
     over the lower half of the sheet and hid Share's link field and Copy
     button. max-height + overflow let a tall sheet scroll inside itself
     instead of running off the screen with nothing to scroll. */
  .sd-menu {
    position: fixed; left: 16px; right: 16px; top: auto; max-width: none;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    z-index: 1000;
    max-height: calc(100vh - 120px);
    max-height: calc(100dvh - 120px);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  .sd-share { width: auto; }
}
@media (max-width: 480px) {
  .sd-more-grid { gap: 12px; }
}

/* ===== Phones: the Obtain bar, fixed to the foot of the screen =====
   Only while the card's gold button is on offer: not before the ship loads,
   not for a showcase piece or a request-only private ship (#shipOrderBuy
   hidden), not behind a members-only gate. */
.sd-obar { display: none; }
@media (max-width: 720px) {
  body:has(#shipHero:not([hidden])):not(:has(#shipOrderBuy[hidden])):not(:has(#order.ship-order-gated)) .sd-obar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 950;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px calc(14px + env(safe-area-inset-bottom, 0px));
    background: rgba(16, 26, 44, 0.97);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-strong);
    box-shadow: 0 -12px 30px rgba(0, 0, 0, 0.4);
  }
  body:has(#shipHero:not([hidden])):not(:has(#shipOrderBuy[hidden])):not(:has(#order.ship-order-gated)) .sd { padding-bottom: 84px; }
  body:has(#shipHero:not([hidden])):not(:has(#shipOrderBuy[hidden])):not(:has(#order.ship-order-gated)) .feedback-fab { bottom: 92px; }
  body:has(#shipHero:not([hidden])):not(:has(#shipOrderBuy[hidden])):not(:has(#order.ship-order-gated)) .ship-coll-toast { bottom: 96px; }
  .sd-obar-id { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
  .sd-obar-id b { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 14px; font-weight: 700; color: var(--text); }
  .sd-obar-id span { font-size: 12px; color: var(--text-muted); }
  .sd-obar .b-case { height: 46px; box-sizing: border-box; }
  .sd-obar-dl { width: 46px; padding: 0; justify-content: center; }
  .sd-obar-go { padding: 0 22px; font-size: 15px; }
}

/* ===== This branch: the board's pieces that live outside the hangar sheet ===== */
.sd .sd-crumb { max-width: var(--maxw); }
.sd-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--amber-bright);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
  text-decoration: underline;
  text-decoration-color: rgba(var(--amber-rgb), .55);
  text-underline-offset: 4px;
  cursor: pointer;
}
.sd-link:hover { color: var(--amber); text-decoration-color: var(--amber); }

/* section titles, as on the board */
.dz-sec-title { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -.01em; color: var(--text); }
.dz-sec-note { margin-left: 12px; font-size: 13px; font-weight: 500; letter-spacing: 0; color: var(--text-dim); }
.dz-sec-head { margin-bottom: 20px; }

/* the actions under the frame: quiet case buttons, a touch tighter */
.sd-actions .b-case { padding: 10px 14px; }
.sd-actions .sd-icon-btn { width: 42px; padding: 0; justify-content: center; }
.sd-actions .b .sd-count { font-weight: 500; }

/* the obol, dressed as the board's Like: a quiet case button with the coin */
.sd .charon-like {
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1;
}
.sd .charon-like-obol { width: 16px; height: 16px; color: var(--amber); }
.sd .charon-like-n { color: var(--text-muted); opacity: 1; font-weight: 500; }
.sd .charon-like:hover:not(:disabled) { border-color: var(--amber); color: var(--amber-bright); }
.sd .charon-like.is-liked .charon-like-n { color: var(--amber-bright); }
.sd .charon-like:disabled .charon-like-obol { opacity: .7; }

/* the builder's heads-up: no box and no red wash; only its title keeps the
   red, the words read as plain text under a quiet rule */
.sd .hg-go .ship-builder-note {
  margin: 4px 0 0;
  padding: 14px 0 0;
  border: 0;
  border-top: 1px solid var(--border);
  border-radius: 0;
  background: none;
}
.sd .hg-go .ship-builder-note-prose { color: var(--text); }

/* the viewer: every photo in a row under the big one, the one open lit */
#lightbox:has(.lightbox-strip:not([hidden])) { padding-bottom: 120px; box-sizing: border-box; }
#lightbox:has(.lightbox-strip:not([hidden])) .lightbox-stage,
#lightbox:has(.lightbox-strip:not([hidden])) .lightbox-img { max-height: calc(100vh - 200px); }
#lightbox:has(.lightbox-strip:not([hidden])) .lightbox-caption { bottom: 108px; }
/* the count sits beside the label in the caption (an older viewer's rule in
   main.css floats it off on its own) */
#lightbox .lightbox-counter { position: static; padding: 0; border: 0; background: none; font-size: inherit; letter-spacing: inherit; }
.lightbox-strip {
  position: absolute;
  left: 50%;
  bottom: 22px;
  translate: -50% 0;
  display: flex;
  gap: 6px;
  max-width: min(92vw, 1120px);
  overflow-x: auto;
  scrollbar-width: none;
  cursor: default;
}
.lightbox-strip::-webkit-scrollbar { display: none; }
.lightbox-strip[hidden] { display: none; }
.lightbox-th {
  position: relative;
  flex: 0 0 112px;
  aspect-ratio: 16 / 9;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: var(--surface);
  cursor: pointer;
}
.lightbox-th img { display: block; width: 100%; height: 100%; object-fit: cover; opacity: 0.55; transition: opacity .15s; }
.lightbox-th:hover img,
.lightbox-th:focus-visible img,
.lightbox-th.is-on img { opacity: 1; }
.lightbox-th.is-on::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 1px rgba(var(--amber-rgb), 0.9), inset 0 -2px 0 rgba(var(--amber-rgb), 0.9);
}
@media (max-width: 720px) {
  #lightbox:has(.lightbox-strip:not([hidden])) { padding-bottom: 96px; }
  #lightbox:has(.lightbox-strip:not([hidden])) .lightbox-caption { bottom: 84px; }
  .lightbox-strip { bottom: 16px; max-width: calc(100vw - 24px); }
  .lightbox-th { flex-basis: 84px; }
}
.hg-how-note { margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--border); font-size: 12.5px; line-height: 1.55; color: var(--text-muted); text-align: left; }
.hg-how-note a { color: var(--text); text-underline-offset: 3px; }
.ship-order-private-status { margin-top: 2px; }

/* the photo, when a ship has none */
.hg-photo-empty { display: grid; place-items: center; width: 100%; height: 100%; color: var(--text-dim); font-size: 13px; }

/* comments: "You" beside the box, as on the board */
.sd-compose { display: flex; gap: 14px; align-items: flex-start; }
.sd-compose[hidden] { display: none !important; }
.sd-compose-box { flex: 1; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.sd-av { width: 36px; height: 36px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--card-hover); color: var(--text); font-size: 11px; font-weight: 600; }
.sd .ship-comment-form { margin: 0 0 8px; }
.sd .ship-comment-form-foot { display: flex; align-items: center; gap: 16px; margin-top: 0; }
.sd .ship-comment-hint { margin-right: auto; }
.sd .ship-comments-gate { margin: 0; flex: 1; color: var(--text-muted); line-height: 1.55; }
.sd .ship-comments-gate strong { color: var(--text); }
.sd .ship-comment-ver { width: 12px; height: 12px; flex: none; color: var(--amber-bright); }
.sd .ship-comment-head { display: flex; align-items: center; flex-wrap: wrap; }
.sd .ship-comment { display: flex; }
.sd .ship-comment-body { flex: 1; min-width: 0; }
.sd .ship-comment-when { font-size: 12.5px; color: var(--text-dim); }
.sd .ship-comment-avatar { flex: none; border-radius: 50%; object-fit: cover; }
.sd .ship-reply-foot { display: flex; align-items: center; justify-content: flex-end; gap: 16px; margin-top: 10px; }
.sd .ship-reply-foot .ship-reply-status { margin-right: auto; font-size: 12.5px; color: var(--text-muted); }
.sd .ship-reply-text { box-sizing: border-box; width: 100%; padding: 10px 12px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: inherit; font-size: 14px; line-height: 1.5; resize: vertical; }
.sd .ship-reply-text:focus { outline: 0; border-color: var(--amber); }

/* the builder's own words fold to three lines */
.sd-from.is-shut .sd-from-list { max-height: calc(14px * 1.55 * 3 + 8px); overflow: hidden;
  -webkit-mask-image: linear-gradient(#000 50%, transparent); mask-image: linear-gradient(#000 50%, transparent); }
.sd-from-toggle { align-self: flex-start; }

/* the builder's heads-up in the card folds to three lines; the modal on
   Obtain always shows all of it */
.sd .ship-builder-note.is-shut .ship-builder-note-prose { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.sd .ship-builder-note.is-shut .ship-builder-note-chips { max-height: 64px; overflow: hidden; }
.sd-note-more { align-self: flex-start; margin-top: 8px; font-size: 12.5px; }

/* More from: the catalog's card, four across */
.sd-more-grid > .wc { min-width: 0; }
.sd .wc-led-bare .wc-body { gap: 4px; padding: 10px 12px; }
.sd .wc-led-bare .wc-specs { margin: 2px 0 0; border-top: 0; column-gap: 10px; }
.sd .wc-led-bare .wc-spec { padding: 0; border-left: 0; }
.sd-card-nophoto { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; background: var(--card); color: var(--text-dim); font-size: 12px; }
