:root {
  --ui: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  --paper: #f6f8f8;
  --line: #d8e0e2;
  --accent: #a74724;
  --display: var(--ui);
}
.mast-inner {
  height: 52px;
  gap: 32px;
}
.identity img#brand {
  width: 122px;
  height: 48px;
  object-fit: contain;
}
.mast nav {
  gap: 19px;
}
.nav {
  font-size: 13px;
}
.dataset {
  font-variant-numeric: tabular-nums;
  background: #1a3441;
  border-radius: 4px;
  padding: 5px 9px;
}
.heading {
  align-items: center;
  padding: 18px 0 12px;
}
.heading h1 {
  font: 700 clamp(24px, 2.5vw, 34px) / 1.1 var(--ui);
  letter-spacing: -0.045em;
  margin: 0 0 4px;
}
.heading .action {
  min-height: 34px;
  padding: 7px 12px;
}
.version-link {
  padding: 0;
  color: var(--muted);
  font-size: 12px;
}
.version-link:hover,
.footer-data:hover {
  text-decoration: underline;
}
.footer-data {
  color: var(--muted);
  font-size: 12px;
}
.viewline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  margin: 0 0 8px;
}
.viewtabs {
  display: flex;
  align-items: stretch;
  gap: 4px;
}
.viewtabs button,
.quiet {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 600;
  color: #4d616f;
  border-radius: 4px;
}
.viewtabs button.active {
  color: #173e49;
  box-shadow: inset 0 -2px #267275;
  background: #e7eff0;
}
.viewtabs small {
  color: #60707a;
}
.viewtabs .icon,
.quiet .icon {
  width: 15px;
  height: 15px;
}
.quiet:hover {
  background: #e8eded;
}
.toolrow {
  margin: 7px 0;
  min-height: 28px;
}
.segment button {
  padding: 4px 10px;
}
.rank-key {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  font-size: 11px;
  color: #4c616d;
}
.rank-key i {
  width: 8px;
  height: 8px;
  background: #36856a;
  border-radius: 50%;
}
.rank-key div {
  width: 31px;
  height: 5px;
  border-radius: 3px;
  background: linear-gradient(90deg, #559775, #c3b15d, #d79855, #bc6267);
}
.comp-table .corner {
  padding: 12px;
}
.corner-title {
  font: 600 16px var(--ui);
}
.corner .icon {
  margin-bottom: 8px;
}
.ship-card {
  height: 166px;
}
.ship-link {
  padding: 11px 12px;
}
.ship-meta {
  padding-right: 55px;
}
.ship-name {
  margin-top: 5px;
  font: 650 clamp(15px, 1.75vw, 23px) / 1.03 var(--ui);
  letter-spacing: -0.045em;
  max-width: 100%;
}
.country {
  font-size: 11px;
}
.ship-art {
  object-fit: contain;
}
.ship-card .ship-art {
  height: 52%;
  bottom: 6px;
  object-fit: contain;
}
.ship-tools {
  position: absolute;
  top: 6px;
  right: 5px;
  display: flex;
  gap: 2px;
  z-index: 1;
}
.ship-tools .remove,
.fav-star {
  position: static;
  display: grid;
  place-items: center;
  padding: 0;
  width: 25px;
  height: 25px;
  border: 1px solid #b9c7c9;
  border-radius: 50%;
  background: #f8faf9ee;
  color: #41565f;
}
.ship-tools .icon,
.fav-star .icon {
  width: 14px;
  height: 14px;
}
.fav-star.marked {
  color: #9b5920;
  background: #ffefd3;
  border-color: #c89859;
}
.fav-star.marked .icon {
  fill: #f2be61;
}
.build-chip {
  position: absolute;
  bottom: 5px;
  left: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
  border-radius: 4px;
  border: 1px solid #b9c7c9;
  padding: 2px 6px;
  background: #f8faf9e8;
  color: #314e58;
  font-size: 10px;
  font-weight: 650;
  z-index: 1;
}
.build-chip .icon {
  width: 12px;
  height: 12px;
}
.scroller {
  max-height: max(320px, calc(100dvh - 195px));
  scrollbar-gutter: stable;
}
.comp-table td,
.comp-table th {
  padding: 7px 12px;
}
.comp-table .ship-cell {
  padding: 0;
}
.comp-table .band th {
  padding: 5px 12px;
}
.value {
  font-weight: 600;
}
.value[class*='tone-'] {
  background: var(--tone-bg);
  color: var(--tone-ink);
  border-radius: 4px;
  padding: 2px 5px;
}
.track i[class*='tone-'] {
  background: var(--tone-ink);
}
.tone-green {
  --tone-ink: #17634c;
  --tone-bg: #deefe7;
}
.tone-yellow {
  --tone-ink: #695718;
  --tone-bg: #f5efce;
}
.tone-orange {
  --tone-ink: #894d23;
  --tone-bg: #f8e8d7;
}
.tone-red {
  --tone-ink: #934448;
  --tone-bg: #f5e3e3;
}
.tile {
  position: relative;
}
.tile > .fav-star {
  position: absolute;
  z-index: 1;
  right: 7px;
  top: 7px;
}
.tile-name {
  font: 650 19px/1.1 var(--ui);
  letter-spacing: -0.035em;
}
.tile-img .ship-art {
  height: 90%;
  bottom: 2%;
}
.detail-image .ship-art {
  height: 93%;
}
.detail-actions {
  display: flex;
  gap: 7px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 9px;
}
.detail-actions .outline {
  padding: 5px 9px;
  min-height: 28px;
  font-size: 12px;
}
.gear-glyph {
  object-fit: contain;
  width: 19px;
  height: 19px;
  background: #263d4b;
  border-radius: 4px;
  vertical-align: middle;
  margin-right: 4px;
}
.chip > .icon,
.trait-brief summary > .icon {
  width: 15px;
  height: 15px;
  margin-right: 3px;
}
.quick-range,
.sel-line input {
  width: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 5px;
  margin-top: 4px;
}
.quick-range {
  font-size: 11px;
  color: #465c65;
}
.sel-line input {
  font-size: 16px;
  padding: 9px;
}
.stealth-stat {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  margin: 10px 0;
  padding: 8px;
  background: #e7efed;
  border-radius: 5px;
}
.stealth-stat button {
  font-size: 12px;
  text-decoration: underline;
}
.trait-brief {
  margin: 10px 0;
}
.trait-brief h3 {
  font-size: 15px;
}
.trait-brief summary {
  cursor: pointer;
  font-weight: 600;
}
.trait-brief details {
  border-top: 1px solid var(--line);
  padding: 4px 0;
}
.trait-brief p {
  margin: 5px 0;
  font-weight: 400;
}
.panel-body {
  min-height: 160px;
}
.history-list {
  display: grid;
  gap: 6px;
}
.history-row {
  display: flex;
  align-items: center;
  gap: 5px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 4px 8px;
}
.history-open {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 12px;
  align-items: center;
  text-align: left;
  padding: 4px;
}
.history-open > span:last-child {
  min-width: 0;
}
.history-open small,
.history-open strong {
  display: block;
  overflow-wrap: anywhere;
}
.history-open small {
  color: var(--muted);
  font-size: 12px;
}
.history-img {
  width: 80px;
  flex: none;
  height: 45px;
  position: relative;
  background: #e6eceb;
  border-radius: 4px;
}
.history-img .ship-art {
  height: 90%;
  bottom: 3%;
}
.shelf-tabs {
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
}
.dlg-head h2 {
  font: 650 22px/1.15 var(--ui);
}
#harborDialog {
  width: min(1100px, 96vw);
  max-height: 94dvh;
}
#soloSea {
  overflow: auto;
}
.dlg-scroll {
  min-height: 0;
}
.trait-brief details,
.fgroup {
  scroll-margin-top: 8px;
}
footer {
  padding-bottom: env(safe-area-inset-bottom);
}
.tile-metrics {
  align-items: center;
}
@media (min-width: 611px) {
  .heading:has(.version-link) .version-link {
    display: none;
  }
  .heading {
    padding-top: 17px;
  }
  main,
  .mast-inner,
  footer {
    padding-inline: clamp(14px, 3vw, 58px);
  }
}
@media (max-width: 610px) {
  .mast-inner {
    padding-inline: 8px;
    gap: 7px;
    height: 43px;
  }
  .mast nav {
    gap: 5px;
  }
  .nav {
    font-size: 11px;
    gap: 3px;
  }
  .nav .icon {
    width: 13px;
    height: 13px;
  }
  .identity img#brand {
    width: 88px;
    height: 39px;
  }
  .dataset {
    display: none;
  }
  .heading {
    padding: 11px 0 7px;
  }
  .heading h1 {
    font-size: 24px;
  }
  .toolrow {
    justify-content: flex-start;
  }
  .rank-key {
    display: none;
  }
  .viewtabs button,
  .quiet {
    font-size: 12px;
    padding: 6px;
  }
  .viewline {
    margin-bottom: 5px;
  }
  .ship-card {
    height: 122px;
  }
  .ship-link {
    padding: 7px;
  }
  .ship-name {
    font-size: 16px;
  }
  .ship-tools {
    right: 3px;
    top: 3px;
    gap: 1px;
  }
  .ship-tools .remove,
  .ship-tools .fav-star {
    width: 19px;
    height: 19px;
  }
  .ship-tools .icon {
    width: 10px;
    height: 10px;
  }
  .ship-meta {
    padding-right: 31px;
    font-size: 9px;
  }
  .country {
    font-size: 10px;
  }
  .corner-title {
    font-size: 12px;
  }
  .build-chip {
    left: 4px;
    font-size: 9px;
    bottom: 4px;
  }
  .value {
    font-size: 12px;
  }
  .comp-table th,
  .comp-table td {
    padding: 6px;
  }
  .comp-table .band th {
    padding: 4px 6px;
  }
  .segment button {
    font-size: 11px;
  }
  .scroller {
    max-height: calc(100dvh - 172px);
  }
}
@media (orientation: landscape) and (max-height: 950px) {
  .mast-inner {
    height: 44px;
  }
  .identity img#brand {
    height: 40px;
  }
  .ship-card {
    height: 140px;
  }
  .scroller {
    max-height: max(170px, calc(100dvh - 190px));
  }
}
@media (orientation: landscape) and (max-height: 550px) {
  .mast-inner {
    height: 32px;
  }
  .identity img#brand {
    width: 83px;
    height: 31px;
  }
  .heading {
    padding: 5px 0;
    align-items: center;
  }
  .heading h1 {
    font-size: 19px;
    margin: 0;
  }
  .heading .action {
    min-height: 26px;
    font-size: 11px;
    padding: 4px 8px;
  }
  .heading .subtle,
  .heading .version-link {
    display: none;
  }
  .viewtabs button,
  .quiet {
    font-size: 11px;
    padding: 3px 7px;
  }
  .viewline {
    margin-bottom: 1px;
  }
  .toolrow {
    margin: 2px 0;
    min-height: 22px;
  }
  .segment button {
    font-size: 10px;
    padding: 2px 6px;
  }
  .ship-card {
    height: 76px;
  }
  .ship-link {
    padding: 4px 6px;
  }
  .ship-name {
    font-size: 13px;
    max-width: 86%;
    margin-top: 1px;
  }
  .country {
    display: none;
  }
  .ship-meta {
    font-size: 9px;
  }
  .ship-tools .remove,
  .ship-tools .fav-star {
    width: 18px;
    height: 18px;
  }
  .ship-tools .icon {
    width: 10px;
    height: 10px;
  }
  .ship-tools {
    top: 2px;
    right: 2px;
  }
  .ship-card .ship-art {
    height: 46%;
    bottom: 2px;
  }
  .build-chip {
    left: 3px;
    bottom: 2px;
    font-size: 9px;
  }
  .comp-table td,
  .comp-table th {
    padding: 4px 7px;
  }
  .comp-table .corner .icon {
    display: none;
  }
  .corner-title {
    font-size: 12px;
  }
  .comp-table thead th,
  .comp-table thead th:not(.corner) {
    position: sticky;
    top: 0;
  }
  .scroller {
    max-height: max(145px, calc(100dvh - 125px));
  }
  .dlg-head,
  .dlg-foot {
    padding: 6px 13px;
  }
  dialog {
    max-height: 94dvh;
  }
  .value {
    font-size: 12px;
  }
  main,
  footer,
  .mast-inner {
    padding-left: max(10px, env(safe-area-inset-left));
    padding-right: max(10px, env(safe-area-inset-right));
  }
}

.pick-actions{display:flex;align-items:center;justify-content:space-between;margin-bottom:7px}.pick-actions .icon{width:14px;height:14px;margin-right:5px}
