@font-face { font-family: "Bwg Hand"; src: url("Z003-MediumItalic.otf") format("opentype"); font-display: swap; }
:root {
  --bwg-script: "Bwg Hand", "Apple Chancery", "Segoe Script", cursive;
}
.bwg, .bwg * { box-sizing: border-box; }
.bwg [hidden] { display: none !important; }
.bwg {
  --paper: #fcf8ee; --panel: #fffdfa; --text: #132d41; --line: #e2d9c6; --action: #1b4d51;
  --clear: system-ui, sans-serif; --classic: Georgia, serif; --mono: "Courier New", monospace;
  color: var(--text); background: var(--paper); border: 1px solid var(--line); border-radius: 22px;
  max-width: 1180px; margin: 24px auto; padding: clamp(16px, 3.5vw, 44px); font-family: var(--clear);
}
.bwg[data-brand="cool"] { --paper: #f0f3ff; --panel: #fafbff; --text: #17234b; --line: #d3dcf9; --action: #2648a6; }
.bwg-header { margin: 0 0 28px; }
.bwg-header h2 { color: inherit; margin: 0 0 8px; max-width: 18ch; font: 700 clamp(2.3rem, 5vw, 4.1rem)/.98 var(--classic); letter-spacing: -.035em; }
.bwg[data-brand="cool"] .bwg-header h2 { font-family: var(--clear); font-weight: 850; }
.bwg-header p { color: inherit; max-width: 63ch; line-height: 1.5; margin: 0; }
.bwg-workspace { display: grid; grid-template-columns: minmax(200px, 1fr) minmax(265px, 1.8fr); gap: 18px 26px; align-items: start; }
.bwg-gallery { grid-column: 1; grid-row: 1; }
.bwg-controls { grid-column: 1; grid-row: 2; border: 1px solid var(--line); border-radius: 14px; padding: 16px; background: var(--panel); }
.bwg-card { grid-column: 2; grid-row: 1 / span 2; }
.bwg h3 { margin: 0 0 10px; font: 750 1.05rem/1.3 var(--clear); color: inherit; }
.bwg-thumbs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.bwg button { font: 650 .85rem/1.25 var(--clear); color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 9px; cursor: pointer; margin: 0; box-shadow: none; }
.bwg button:focus-visible, .bwg input:focus-visible, .bwg textarea:focus-visible, .bwg select:focus-visible { outline: 3px solid #6797df; outline-offset: 3px; }
.bwg button[aria-pressed="true"] { border-color: var(--action); box-shadow: 0 0 0 2px var(--action); }
.bwg-thumb { display: grid; grid-template-rows: auto 1fr; text-align: left; min-width: 0; gap: 5px; }
.bwg-thumb img { display: block; width: 100%; aspect-ratio: 2.35; object-fit: cover; border-radius: 4px; background: var(--line); }
.bwg-thumb span { overflow-wrap: anywhere; }
.bwg-card {
  container-type: inline-size; display: flex; flex-direction: column; min-width: 0; min-height: 0;
  width: min(100%, 480px); margin: 0 auto; overflow: hidden; aspect-ratio: 210 / 297;
  color: white; background: var(--ink); box-shadow: 0 16px 36px #27212b33; border-radius: 12px;
}
.bwg-card-head { display: flex; flex-direction: column; justify-content: center; gap: 2cqw; flex: 0 0 24%; padding: 3cqw 6cqw; }
.bwg-card-head span:first-child { font-size: 2.6cqw; letter-spacing: .14em; font-weight: 800; text-transform: uppercase; color: var(--accent); }
.bwg-card-head strong { font: 700 8.3cqw/.96 var(--classic); overflow-wrap: anywhere; }
.bwg[data-brand="cool"] .bwg-card-head strong { font: 850 8.1cqw/.91 var(--clear); }
.bwg-card-head span:last-child { font-size: 3.3cqw; line-height: 1.05; }
.bwg .bwg-hero { display: block; width: 100%; height: 45%; object-fit: cover; border: 0; border-top: 2px solid var(--accent); }
.bwg-card-lower { display: flex; flex: 1 1 31%; min-height: 0; flex-direction: column; padding: 3.6cqw 6cqw 2.6cqw; gap: 1.6cqw; }
.bwg .bwg-card textarea, .bwg-print-dedication {
  --dedication-font: var(--clear); display: block; font-family: var(--dedication-font); font-size: 3.7cqw; line-height: 1.16; flex: 1; min-height: 0;
  padding: 2cqw; width: 100%; max-width: none; margin: 0; resize: none; overflow: auto; background: white; border: 2px solid transparent;
  border-radius: 4px; overflow-wrap: anywhere; box-shadow: none;
}
.bwg-card textarea::placeholder { color: #536075; opacity: 1; }
.bwg-card textarea:disabled { opacity: 1; color: #536075; }
.bwg-card-lower p { margin: 0; font-size: 3.2cqw; line-height: 1.1; color: var(--accent); font-weight: 700; }
.bwg-preview-mark { font-size: 2.2cqw; line-height: 1.1; color: white; letter-spacing: .025em; }
.bwg-print-dedication { display: none; white-space: pre-wrap; color: #172b42; }
.bwg-fonts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.bwg-fonts button { overflow-wrap: anywhere; }
.bwg .bwg-font-classic { font-family: var(--classic); }
.bwg .bwg-font-script { font-family: var(--bwg-script); font-size: 1rem; }
.bwg .bwg-font-mono { font-family: var(--mono); font-size: .79rem; }
.bwg-format { display: flex; flex-wrap: wrap; align-items: center; gap: 9px 13px; margin: 12px 0 0; }
.bwg-format label { display: inline-flex; gap: 5px; align-items: center; font-size: .88rem; margin: 0; }
.bwg-format select { color: var(--text); padding: 3px 4px; line-height: 1.25; background: white; border: 1px solid var(--line); border-radius: 5px; }
.bwg-format input[type="color"] { padding: 1px; border: 1px solid var(--line); width: 29px; height: 26px; background: white; }
.bwg input[type="checkbox"] { margin: 0; accent-color: var(--action); }
.bwg-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.bwg-actions label { display: inline-flex; align-items: center; gap: 6px; font-size: .86rem; }
.bwg .bwg-count { margin: 7px 0 10px; font-size: .8rem; }
.bwg-font-muted { opacity: .8; }
@media (max-width: 660px) {
  .bwg-workspace { display: flex; flex-direction: column; align-items: stretch; }
  .bwg-thumbs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bwg-thumb img { aspect-ratio: 2; }
  .bwg-card { width: min(100%, 400px); }
}
@page bwg-voucher { size: A4 portrait; margin: 0; }
.bwg-print-sheet { display: none; }
@media print {
  html.bwg-printing, html.bwg-printing body { margin: 0 !important; padding: 0 !important; background: white !important; }
  html.bwg-printing body > :not(.bwg-print-sheet) { display: none !important; }
  html.bwg-printing .bwg-print-sheet {
    page: bwg-voucher; display: block; width: 210mm; max-width: none; height: 297mm;
    margin: 0; padding: 0; border: 0; border-radius: 0; overflow: hidden;
  }
  .bwg-print-sheet .bwg-card {
    width: 100%; height: 100%; border-radius: 0; box-shadow: none;
    print-color-adjust: exact; -webkit-print-color-adjust: exact;
  }
  .bwg-print-sheet .bwg-card textarea { display: none !important; }
  .bwg-print-sheet .bwg-print-dedication { display: block; }
}
.bwg-home, .bwg-home * { box-sizing: border-box; }
.bwg-home {
  --night: #122a43; --gold: #f9d59c;
  position: relative; isolation: isolate; overflow: hidden; color: white; background: var(--night);
  border: 1px solid #e8c48d66; border-radius: 17px; font-family: system-ui, sans-serif;
  text-align: left; min-width: 0; width: 100%; margin: 0; box-shadow: 0 14px 34px #16283d40;
}
.bwg-home--cool { --night: #22234a; --gold: #ffd091; }
.bwg-home-art { margin: 0; width: 100%; aspect-ratio: 1.72; background: var(--night); overflow: hidden; }
.bwg-home-art img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 81%; }
.bwg-home-copy { padding: clamp(14px, 3vw, 24px); }
.bwg-home .bwg-home-kicker { color: var(--gold); margin: 0 0 5px; font-size: .73rem; font-weight: 750; letter-spacing: .13em; text-transform: uppercase; }
.bwg-home h2 { color: white; margin: 0 0 7px; font: 700 clamp(1.3rem, 2.65vw, 1.85rem)/1.08 Georgia, serif; overflow-wrap: anywhere; }
.bwg-home--cool h2 { font-family: system-ui, sans-serif; font-weight: 820; }
.bwg-home-copy p:not(.bwg-home-kicker) { color: #f1f3f8; margin: 0 0 13px; font-size: .91rem; line-height: 1.45; }
.bwg-home a.bwg-home-link { display: inline-flex; gap: .5em; align-items: center; padding: 8px 12px; border-radius: 7px; background: var(--gold); color: var(--night); font-size: .83rem; font-weight: 800; text-decoration: none; }
.bwg-home a.bwg-home-link:hover { text-decoration: underline; }
.bwg-home a.bwg-home-link:focus-visible { outline: 3px solid white; outline-offset: 3px; }
.ssm-aab-host.bwg-home-slot, .bc-feature-offer.bwg-home-slot { transform: none !important; rotate: none !important; }
.bwg-home-slot > :not(.bwg-home) { display: none !important; }
.bwg-home-editor { scroll-margin-top: 85px; }
.bwg-preview-stage { margin: 18px auto 0; width: min(94%, 415px); }
.bwg a.bwg-buy {
  display: inline-flex; gap: .45em; align-items: center; padding: 10px 12px; border-radius: 7px;
  color: white; background: var(--action); font-size: .9rem; font-weight: 750; text-decoration: none;
}
.bwg a.bwg-buy:focus-visible { outline: 3px solid #6797df; outline-offset: 3px; }
.bwg a.bwg-buy:hover { text-decoration: underline; }

.bwg-checkout-note { flex-basis: 100%; font-size: .79rem; margin: 0; }

/* These component sizes must win over the host themes' generic image and button rules. */
.bwg.bwg .bwg-header h2 {
  max-width: none; font-size: clamp(1.7rem, 3.2vw, 2.85rem) !important;
  line-height: 1.07 !important; margin: 0 0 10px !important;
}
.bwg.bwg h3 {
  font-size: 1.03rem !important; line-height: 1.25 !important; margin: 0 0 10px !important;
}
.bwg.bwg button {
  min-height: 36px !important; padding: 8px 10px !important;
  color: var(--text) !important; background: var(--panel) !important;
  border: 1px solid var(--line) !important; box-shadow: none !important;
  text-shadow: none !important; white-space: normal !important;
}
.bwg.bwg button[aria-pressed="true"] {
  border-color: var(--action) !important; box-shadow: 0 0 0 1px var(--action) !important;
}
.bwg.bwg button.bwg-thumb {
  display: grid !important; width: 100%; padding: 5px !important; text-align: left !important;
}
.bwg.bwg .bwg-thumb img {
  width: 100% !important; height: auto !important; aspect-ratio: 2.35; object-fit: cover;
}
.bwg.bwg .bwg-thumb span {
  padding: 1px 3px 4px; font-size: .79rem !important; line-height: 1.16;
  overflow-wrap: normal; hyphens: manual;
}
.bwg.bwg .bwg-card {
  display: grid; grid-template-rows: 24% minmax(0, 45%) minmax(0, 31%);
}
.bwg.bwg .bwg-hero {
  width: 100% !important; height: 100% !important; min-height: 0 !important;
  max-height: 100% !important; object-fit: cover; margin: 0 !important;
}
.bwg.bwg .bwg-card-lower { min-height: 0; }
.bwg.bwg .bwg-card textarea {
  min-height: 0 !important; padding: 2cqw !important; border: 0 !important;
}
.bwg.bwg [data-bwg-buy] { flex-basis: max-content; }

/* Desktop matches the existing Sunset Sailing editor's control and preview order. */
.bwg.bwg { --paper: #fcf6eb; --panel: #f7eedc; --text: #123048; --line: #dfc9ac; --action: #17364b; }
.bwg.bwg .bwg-header { margin-bottom: 20px; }
.bwg.bwg .bwg-header h2 { font-family: var(--clear); font-weight: 850; }
.bwg.bwg .bwg-header h3 { margin-bottom: 4px !important; }
.bwg.bwg .bwg-header p { max-width: none; }
.bwg.bwg .bwg-workspace {
  display: grid; grid-template-columns: minmax(195px, .90fr) clamp(46px, 7vw, 76px) minmax(215px, 1fr);
  gap: 12px; align-items: start;
}
.bwg.bwg .bwg-controls { grid-column: 1; grid-row: 1; margin-right: 4px; background: var(--panel); }
.bwg.bwg .bwg-gallery { grid-column: 2; grid-row: 1; align-self: stretch; }
.bwg.bwg .bwg-card { grid-column: 3; grid-row: 1; width: 100%; max-width: none; }
.bwg.bwg .bwg-thumbs { display: grid; grid-template-columns: minmax(0, 1fr); gap: 5px; }
.bwg.bwg button.bwg-thumb {
  position: relative; display: grid !important; grid-template-rows: 22% 52% 26%; gap: 0;
  overflow: hidden; aspect-ratio: 210 / 297; min-width: 0; min-height: 0 !important;
  padding: 0 !important; border-radius: 5px; color: white !important;
  border: 2px solid transparent !important; background: var(--mini-ink) !important;
}
.bwg.bwg button.bwg-thumb[aria-pressed=true] {
  border-color: #ef731c !important; box-shadow: 0 0 0 1px #ef731c !important;
}
.bwg.bwg .bwg-thumb img { display: block; width: 100% !important; height: 100% !important; margin: 0 !important; object-fit: cover; }
.bwg.bwg .bwg-thumb span {
  display: flex; align-items: center; padding: 0 3px; overflow: hidden;
  color: var(--mini-accent); font: 700 clamp(5px, .7vw, 9px)/1.02 Georgia, serif !important;
}
.bwg.bwg .bwg-thumb i { display: block; margin: 13% 10%; background: #fff; border-radius: 1px; }
.bwg.bwg .bwg-card textarea { text-align: center; }
.bwg.bwg .bwg-fonts button[aria-pressed=true] {
  color: white !important; background: var(--action) !important;
}
.bwg.bwg .bwg-fonts button:not([aria-pressed=true]) {
  color: #431d06 !important; border-color: #efad77 !important; background: #ffe2c6 !important;
}
.bwg.bwg .bwg-controls h3 { text-align: center; }
.bwg.bwg .bwg-actions { align-items: flex-start; }
@media (max-width: 720px) {
  .bwg.bwg .bwg-workspace { grid-template-columns: minmax(0, 1fr); }
  .bwg.bwg .bwg-gallery { grid-column: 1; grid-row: 1; }
  .bwg.bwg .bwg-thumbs { grid-template-columns: repeat(6,minmax(0,1fr)); gap: 4px; }
  .bwg.bwg .bwg-card { grid-column: 1; grid-row: 2; width: min(100%, 430px); }
  .bwg.bwg .bwg-controls { grid-column: 1; grid-row: 3; margin-right: 0; }
}
