.wreck-section-links { display: flex; flex-wrap: wrap; justify-content: end; gap: 8px 16px; }
.wreck-model { margin: 32px 0 20px; scroll-margin-top: 10px; }
.wreck-model-heading { display: flex; justify-content: space-between; align-items: end; gap: 12px; margin-bottom: 12px; }
.wreck-model-heading h3 { font-size: clamp(1.65rem, 3vw, 2.85rem); line-height: 1.16; color: #f3e9d7; }
.wreck-model-heading p { margin-top: 6px; color: #bed1da; line-height: 1.5; }
.wreck-model-toggles, .wreck-model-zones, .wreck-model-angles, .wreck-model-zoom, .wreck-model-items {
  display: flex; align-items: center; flex-wrap: wrap; gap: 5px;
}
.wreck-model button { -webkit-tap-highlight-color: transparent; }
.wreck-model-toggles button, .wreck-model-zones button, .wreck-model-angles button, .wreck-model-zoom button, .wreck-model-items button {
  min-height: 44px; padding: 4px 10px; border: 1px solid #506d7a; border-radius: 7px;
  background: #192f3b; color: #e1ebed; font-size: .88rem; white-space: nowrap;
}
.wreck-model button[aria-pressed="true"] { background: #efddbc; border-color: #efddbc; color: #26353c; font-weight: 700; }
.wreck-model button:disabled { opacity: .42; cursor: default; }
.wreck-model-layout { display: grid; grid-template-columns: minmax(0, 2.9fr) minmax(230px, 1fr); gap: 12px; align-items: stretch; }
.wreck-model-visual { min-width: 0; overflow: hidden; border: 1px solid #4c6571; border-radius: 12px; background: #142832; }
.wreck-model-zones, .wreck-model-controls { padding: 8px; }
.wreck-model-zones { border-bottom: 1px solid #4c6571; }
.wreck-model-stage { position: relative; height: clamp(320px, 32vw, 485px); background: #071a26; isolation: isolate; overflow: hidden; }
.wreck-model-stage[data-ready="true"] { touch-action: none; cursor: grab; -webkit-user-select: none; user-select: none; }
.wreck-model-stage[data-ready="true"]:active { cursor: grabbing; }
.wreck-model-stage canvas, .wreck-model-fallback, .wreck-model-pins, .wreck-model-pane-titles, .wreck-model-keys {
  position: absolute; inset: 0; width: 100%; height: 100%;
}
.wreck-model-stage canvas { outline-offset: -4px; touch-action: none; }
.wreck-model-fallback { display: grid; grid-template-columns: 1fr 1fr; pointer-events: none; }
.wreck-model-fallback img { width: 100%; height: 100%; object-fit: contain; min-height: 0; min-width: 0; }
.wreck-model-stage[data-layout="stack"] .wreck-model-fallback { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; }
.wreck-model-stage[data-layout="single"] .wreck-model-fallback { grid-template-columns: 1fr; }
.wreck-model-stage[data-layout="single"] .wreck-model-fallback img:first-child, .wreck-model-stage[data-ready="true"] .wreck-model-fallback { display: none; }
.wreck-model-pane-titles, .wreck-model-pins, .wreck-model-keys { pointer-events: none; }
.wreck-model-pane-titles { z-index: 1; }
.wreck-model-pane-titles span { position: absolute; top: 8px; left: 8px; border-radius: 4px; padding: 4px 7px; color: #f6ecd4; background: #10222cdc; font-size: .825rem; font-weight: 650; }
.wreck-model-stage[data-layout="side"] .wreck-model-pane-titles::after {
  content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: #668b9a80;
}
.wreck-model-stage[data-layout="side"] #wreck-recent-pane { left: calc(50% + 8px); }
.wreck-model-stage[data-layout="stack"] #wreck-recent-pane { top: calc(50% + 8px); }
.wreck-model-stage[data-layout="stack"] .wreck-model-pane-titles::after {
  content: ""; position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: #668b9a80;
}
.wreck-model-stage[data-layout="single"] #wreck-historic-pane, .wreck-model-stage[data-layout="single"] #wreck-ruler-historic { display: none; }
.wreck-model-pins { z-index: 2; }
.wreck-model-pins .pin {
  position: absolute; transform: translate(-50%, calc(-100% - 5px)); min-height: 32px; min-width: 46px;
  pointer-events: auto; padding: 3px 7px; white-space: nowrap; border: 1px solid #f0d7a1;
  border-radius: 6px; background: #142936e8; color: #fff2d4; font-size: .825rem; font-weight: 700;
  box-shadow: 0 0 0 3px #14293654;
}
.wreck-model-pins .pin::before { content: ""; position: absolute; width: 1px; height: 6px; background: #f0d7a1; left: 50%; top: 100%; }
.wreck-model-pins .pin::after { content: ""; position: absolute; inset: -6px 0; }
.wreck-model-keys span {
  position: absolute; right: 11px; bottom: 7px; min-width: 16px; padding-top: 3px;
  border-top: 1px solid #f2e4c8; color: #fff2da; text-shadow: 0 1px 3px #060d14; font-size: .76rem; text-align: center;
}
.wreck-model-stage[data-layout="side"] #wreck-ruler-historic { right: calc(50% + 11px); }
.wreck-model-stage[data-layout="stack"] #wreck-ruler-historic { bottom: calc(50% + 7px); }
.wreck-model-status { z-index: 3; position: absolute; bottom: 10px; left: 10px; right: 10px; width: fit-content; max-width: calc(100% - 20px); margin-inline: auto; padding: 7px 10px; border-radius: 6px; background: #122732eb; font-size: .9rem; }
.wreck-model-controls { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px; border-top: 1px solid #4c6571; }
.wreck-model-controls p { color: #c0d1d5; font-size: .8rem; }
.wreck-model-zoom button { min-width: 38px; }
.wreck-model-guide { min-width: 0; padding: 14px; border-radius: 12px; background: #f2eee4; color: var(--ink); }
.wreck-model-guide h4 { margin: 0 0 5px; font-size: 1.35rem; line-height: 1.23; }
.wreck-model-guide p { line-height: 1.55; font-size: .938rem; }
.wreck-model-extra-photo { display: inline-block; margin-top: 5px; color: #365765; font-size: .85rem; text-underline-offset: 3px; }
.wreck-model-photo {
  display: grid; width: 100%; margin-top: 10px; overflow: hidden; text-align: left; padding: 0; color: var(--ink);
  background: #e9e0d1; border: 1px solid #bab3a4; border-radius: 8px;
}
.wreck-model-photo img { width: 100%; aspect-ratio: 1.39; object-fit: contain; background: #0b1822; }
.wreck-model-photo-copy { padding: 6px 7px; display: grid; gap: 2px; font-size: .875rem; }
.wreck-model-photo-copy small { font-size: .76rem; color: #3d4d51; overflow-wrap: anywhere; }
.wreck-model-items { margin-top: 8px; }
.wreck-model-items button { background: #e6ddcc; color: #334650; border-color: #ab9e85; min-height: 42px; }
.wreck-model-items button[aria-pressed="true"] { background: #d3ad77; border-color: #a88c61; }
.wreck-model-sources { margin-top: 10px; padding: 9px 11px; border: 1px solid #405965; border-radius: 9px; color: #c5d4d8; background: #162d38; }
.wreck-model-sources summary { cursor: pointer; font-size: .9rem; font-weight: 650; color: #e6ded0; }
.wreck-model-sources p { margin-top: 7px; font-size: .92rem; line-height: 1.6; }
.wreck-model-references { margin: 8px 0 0; padding-left: 21px; font-size: .875rem; line-height: 1.68; }
@media (max-width: 920px) {
  .wreck-model-layout { grid-template-columns: minmax(0,1fr); }
  .wreck-model-guide { display: grid; grid-template-columns: minmax(0,1fr) minmax(210px, .68fr); align-items: start; column-gap: 11px; }
  .wreck-model-photo { grid-column: 2; grid-row: 1 / span 2; margin-top: 0; }
  .wreck-model-items { align-self: start; }
}
@media (max-width: 570px) {
  .wreck-section-links { justify-content: start; }
  .wreck-model-heading { flex-direction: column; align-items: start; }
  .wreck-model-stage { height: 365px; }
  .wreck-model-guide { grid-template-columns: minmax(0, 1fr); }
  .wreck-model-photo { grid-area: auto; margin-top: 10px; }
  .wreck-model-controls p { width: 100%; order: 1; }
}
