#boat-visualizer {
  --boat-navy: #103653;
  --boat-blue: #0a7dab;
  --boat-line: #c7dce6;
  --boat-pale: #edf7fb;
  color: var(--boat-navy);
}

#boat-visualizer [hidden] { display: none !important; }
#boat-visualizer :is(button, input, select, a, [tabindex="0"]):focus-visible {
  outline: 3px solid #13a5d2;
  outline-offset: 3px;
}

.boat-builder {
  overflow: hidden;
  border: 1px solid var(--boat-line);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 18px 58px #123c5710;
}
.boat-builder-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 28px clamp(18px, 3vw, 38px) 22px;
  border-bottom: 1px solid var(--boat-line);
  background: linear-gradient(115deg, #f3fbfe 0%, #fff 58%, #e7f5fa 100%);
}
.boat-builder-heading .eyebrow { display: block; margin-bottom: 6px; color: #167ba8; }
.boat-builder-heading h2 { margin: 0 0 7px; font-size: clamp(27px, 3vw, 39px); line-height: 1.1; }
.boat-builder-heading p { margin: 0; color: #506d7e; }
.boat-builder-step { align-self: flex-start; flex: none; color: #82a6ba; font-weight: 800; letter-spacing: .11em; }
.boat-builder-layout { display: grid; grid-template-columns: minmax(250px, .8fr) minmax(0, 1.35fr); }
.boat-builder-controls {
  display: grid;
  align-content: start;
  gap: 17px;
  padding: clamp(18px, 3vw, 34px);
  border-right: 1px solid var(--boat-line);
}
.boat-builder-controls fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.boat-builder-controls legend,
.boat-field,
.boat-custom-color,
.boat-switch { color: #254b63; font-size: 14px; font-weight: 750; }
.boat-builder-controls legend { margin-bottom: 9px; }
.boat-vessel-buttons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.boat-vessel-buttons button {
  display: grid;
  place-items: center;
  gap: 4px;
  min-height: 65px;
  padding: 6px 4px;
  border: 1px solid var(--boat-line);
  border-radius: 9px;
  background: #fff;
  color: var(--boat-navy);
  font: inherit;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.1;
  text-align: center;
  cursor: pointer;
}
.boat-vessel-buttons button span { font-size: 19px; line-height: 1; }
.boat-vessel-buttons button:hover { background: var(--boat-pale); }
.boat-vessel-buttons button[aria-pressed="true"] { border-color: #1389bb; background: #e5f6fd; box-shadow: inset 0 0 0 1px #1389bb; }
.boat-field { display: grid; gap: 7px; }
.boat-field input,
.boat-field select {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid #a9c6d5;
  border-radius: 8px;
  background: #fff;
  color: #123d57;
  font: inherit;
  font-size: 15px;
  box-sizing: border-box;
}
.boat-size-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.boat-manufacture-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.boat-font-option { gap: 8px; }
.boat-font-option .boat-font-price { margin-left: auto; color: #086d99; font-size: 12px; white-space: nowrap; }
.boat-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.boat-swatch {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid #88aab9;
  border-radius: 50%;
  background: var(--swatch);
  box-shadow: inset 0 0 0 3px #fff;
  cursor: pointer;
}
.boat-swatch[aria-pressed="true"] { outline: 2px solid #087fab; outline-offset: 2px; }
.boat-custom-color { display: flex; align-items: center; gap: 8px; margin-top: 11px; }
.boat-custom-color input { width: 35px; height: 31px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.boat-switch { display: flex; align-items: center; gap: 9px; }
.boat-switch input { width: 19px; height: 19px; accent-color: #0d84b5; }
.boat-jetski-hint, .boat-boat-hint { margin: -3px 0 0; color: #587185; font-size: 12px; line-height: 1.45; }
.boat-validation { min-height: 0; margin: -6px 0 0; color: #ad3d3d; font-size: 12px; line-height: 1.35; }
.boat-validation:empty { display: none; }
.boat-order[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.boat-artwork-upload { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 10px; }
.boat-artwork-upload button { min-height: 37px; padding: 7px 11px; border: 1px solid #92bece; border-radius: 7px; background: #edf8fc; color: #0c5d85; font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.boat-artwork-upload button:hover { background: #d9f0f8; }
.boat-artwork-upload .boat-artwork-remove { border-color: #c9d9e1; background: #fff; color: #385b6e; }
.boat-artwork-upload .boat-flag-remove { border-color: #c9d9e1; background: #fff; color: #385b6e; }
.boat-file-name { min-width: 0; color: #294c62; font-size: 12px; overflow-wrap: anywhere; }
.boat-flag-file-name { min-width: 0; color: #294c62; font-size: 12px; overflow-wrap: anywhere; }
.boat-file-help, .boat-file-status { flex-basis: 100%; margin: 0; color: #5f7989; font-size: 11px; line-height: 1.4; }
.boat-flag-file-status { flex-basis: 100%; margin: 0; color: #5f7989; font-size: 11px; line-height: 1.4; }
.boat-file-status:not(:empty) { color: #0a6b8f; font-weight: 700; }
.boat-flag-file-status:not(:empty) { color: #0a6b8f; font-weight: 700; }
.boat-flag-settings { display: grid; gap: 11px; padding: 12px !important; border: 1px solid #d0e2ea !important; border-radius: 9px; background: #f7fbfd; }
.boat-flag-settings legend { padding: 0 4px; }
.boat-position-controls { display: grid; gap: 10px; padding: 12px !important; border: 1px solid #d0e2ea !important; border-radius: 9px; background: #f2f9fc; }
.boat-position-controls legend { padding: 0 4px; }
.boat-position-controls .boat-field { gap: 4px; font-size: 12px; }
.boat-position-controls input[type="range"] { width: 100%; min-height: 22px; padding: 0; border: 0; background: transparent; accent-color: #0885b6; cursor: pointer; }
.boat-preview-wrap { min-width: 0; padding: clamp(18px, 3vw, 34px); background: #f9fcfd; }
.boat-preview-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; color: #557489; font-size: 13px; font-weight: 700; }
.boat-zoom { min-height: 36px; padding: 6px 12px; border: 1px solid #a9c8d8; border-radius: 7px; background: #fff; color: #0a668f; font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; }
.boat-zoom:hover { background: #e9f7fc; }
.boat-preview {
  position: relative;
  container-type: inline-size;
  width: 100%;
  aspect-ratio: 1672 / 941;
  overflow: hidden;
  border: 1px solid #b2d3df;
  border-radius: 15px;
  background: #bddde6;
  box-shadow: 0 17px 39px #0b4b6930;
}
.boat-photo { display: block; width: 100%; height: 100%; object-fit: cover; user-select: none; -webkit-user-drag: none; }
.boat-number {
  position: absolute;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .18em;
  width: var(--boat-number-width, 39%);
  min-width: 0;
  color: var(--boat-number-color, #fff);
  font-family: Arial, Helvetica, sans-serif;
  font-size: var(--boat-number-font, 4cqw);
  font-weight: 900;
  letter-spacing: -.07em;
  line-height: 1;
  white-space: nowrap;
  text-shadow: 0 1px 1px #09283880;
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.boat-number:active, .boat-number.is-dragging { cursor: grabbing; }
.boat-flag-piece {
  position: absolute;
  z-index: 2;
  display: flex;
  width: var(--boat-flag-width, 12%);
  aspect-ratio: var(--boat-flag-ratio, 3 / 2);
  overflow: visible;
  border: 1px solid #143d5680;
  box-shadow: 0 2px 5px #081b2b77;
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.boat-flag-piece:active, .boat-flag-piece.is-dragging { cursor: grabbing; }
.boat-flag-piece::before { position: absolute; inset: -8px; border: 1px dashed transparent; border-radius: 4px; content: ""; }
.boat-flag-piece:is(:hover, :focus-visible, .is-dragging)::before { border-color: #e7faff; box-shadow: 0 0 0 2px #0b638880; }
.boat-flag-tricolor { display: flex; flex: 1; flex-direction: column; }
.boat-flag-tricolor i { display: block; flex: 1; background: #fff; }
.boat-flag-tricolor i:nth-child(2) { background: #2457a2; }
.boat-flag-tricolor i:nth-child(3) { background: #c73544; }
.boat-flag-artwork { display: block; width: 100%; height: 100%; object-fit: contain; pointer-events: none; user-select: none; -webkit-user-drag: none; }
.boat-number.has-artwork { aspect-ratio: var(--boat-artwork-ratio, 10); }
.boat-artwork { display: block; width: 100%; height: 100%; object-fit: contain; pointer-events: none; user-select: none; -webkit-user-drag: none; }
.boat-number::before { position: absolute; inset: -9px -5px; border: 1px dashed transparent; border-radius: 5px; content: ""; }
.boat-number:is(:hover, :focus-visible, .is-dragging)::before { border-color: #e7faff; background: #f1fcff18; box-shadow: 0 0 0 2px #0b638880; }
.boat-number-text { display: block; min-width: 0; overflow: hidden; text-overflow: clip; }
.boat-flag { display: flex; flex: 0 0 auto; flex-direction: column; width: 1em; height: .64em; border: 1px solid #18324394; box-shadow: 0 1px 2px #1237; }
.boat-flag i { flex: 1; display: block; background: #fff; }
.boat-flag i:nth-child(2) { background: #2457a2; }
.boat-flag i:nth-child(3) { background: #c73544; }
.boat-flag-inline-custom { display: block; width: 100%; height: 100%; object-fit: cover; }
.boat-scene-caption { position: absolute; right: 13px; bottom: 10px; padding: 5px 8px; border-radius: 4px; background: #0c35418c; color: #fff; font-size: clamp(9px, 1.25cqw, 12px); }
.boat-position-help { margin: 9px 1px 0; color: #546f81; font-size: 12px; line-height: 1.35; }
.boat-preview-details { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 15px 0 20px; }
.boat-preview-size { font-size: 21px; font-variant-numeric: tabular-nums; }
.boat-preview-summary { color: #5c7583; font-size: 13px; }
.boat-price { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 20px; border: 1px solid #c8dfe9; border-radius: 13px; background: #fff; }
.boat-price > div { display: grid; gap: 2px; }
.boat-price span { color: #5a7181; font-size: 12px; font-weight: 700; }
.boat-price strong { font-size: 24px; }
.boat-price small { max-width: 280px; color: #607c8b; font-size: 11px; line-height: 1.35; }
.boat-price .button { flex: none; }
.boat-tariffs { margin-top: 15px; padding: 18px; border: 1px solid #d0e2e9; border-radius: 12px; background: #fff; }
.boat-tariffs h3 { margin: 0 0 5px; font-size: 17px; }
.boat-tariffs p { margin: 0 0 12px; color: #5b7281; font-size: 12px; line-height: 1.45; }
.boat-tariffs-scroll { max-width: 100%; overflow-x: auto; }
.boat-tariffs table { width: 100%; min-width: 430px; border-collapse: collapse; font-size: 12px; text-align: left; }
.boat-tariffs th, .boat-tariffs td { padding: 10px 8px; border-bottom: 1px solid #e0edf2; }
.boat-tariffs thead th { color: #527184; font-size: 11px; }
.boat-tariffs tbody th { color: #183e53; font-weight: 750; }
.boat-tariffs td { white-space: nowrap; }
.boat-tariffs td button { padding: 6px 7px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: #067ba8; font: inherit; font-weight: 800; cursor: pointer; }
.boat-tariffs td button:hover, .boat-tariffs td button[aria-pressed="true"] { border-color: #90cadd; background: #eaf7fc; }
.boat-tariffs .boat-tariff-extra { margin: 11px 0 0; }
.boat-builder-note { margin: 0; padding: 0 clamp(18px, 3vw, 38px) 19px; color: #66808f; font-size: 12px; line-height: 1.45; }
.boat-dialog { width: min(1140px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 32px); padding: 14px; overflow: auto; border: 0; border-radius: 17px; background: #f9fcfd; box-shadow: 0 24px 90px #061c30aa; box-sizing: border-box; }
.boat-dialog::backdrop { background: #071d31b7; backdrop-filter: blur(6px); }
.boat-dialog-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 1px 3px 11px; }
.boat-dialog-bar strong { font-size: 17px; }
.boat-dialog-close { width: 36px; height: 36px; border: 1px solid #bad0da; border-radius: 50%; background: #fff; color: #143a50; font-size: 26px; line-height: 1; cursor: pointer; }
.boat-dialog-slot .boat-preview { width: 100%; }

@media (max-width: 880px) {
  .boat-builder-layout { grid-template-columns: 1fr; }
  .boat-builder-controls { border-right: 0; border-bottom: 1px solid var(--boat-line); }
  .boat-builder-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .boat-vessel-options, .boat-colors, .boat-jetski-hint, .boat-boat-hint, .boat-position-controls, .boat-flag-settings, .boat-manufacture-fields, .boat-font-option { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .boat-builder { border-radius: 15px; }
  .boat-builder-heading { padding: 21px 18px; }
  .boat-builder-step { display: none; }
  .boat-builder-controls { grid-template-columns: 1fr; gap: 15px; }
  .boat-vessel-options, .boat-colors, .boat-jetski-hint, .boat-boat-hint, .boat-position-controls, .boat-flag-settings, .boat-manufacture-fields, .boat-font-option { grid-column: auto; }
  .boat-manufacture-fields { grid-template-columns: 1fr; }
  .boat-price { align-items: stretch; flex-direction: column; }
  .boat-price .button { justify-content: center; }
  .boat-preview-wrap { padding: 17px; }
  .boat-scene-caption { right: 7px; bottom: 6px; }
}
