:root {
  --sea: #10263a;
  --sea-deep: #0b1c2c;
  --gold: #c6a15b;
  --gold-deep: #a7843f;
  --foam: #f6f1e8;
  --ink: #1c2430;
  --muted: #5e6c7b;
  --line: #e6deD1;
  --card: #fffdf9;
  --danger: #9c3b2e;
  color-scheme: light;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--foam);
  color: var(--ink);
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  line-height: 1.5;
}

h1, h2, h3 {
  font-family: Palatino, "Palatino Linotype", Georgia, serif;
  font-weight: 600;
  line-height: 1.2;
}

a { color: inherit; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--sea);
  color: var(--foam);
}

.brand {
  font-family: Palatino, Georgia, serif;
  font-size: 1.35rem;
  text-decoration: none;
  letter-spacing: 0.01em;
}

.account, .header-actions, .login-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.login-form { flex-wrap: wrap; justify-content: flex-end; }

input, button {
  font: inherit;
}

input {
  border: 1px solid rgba(246, 241, 232, 0.35);
  background: transparent;
  color: var(--foam);
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  min-width: 9rem;
}

.app input, .app .text-button, main input {
  background: white;
  color: var(--ink);
  border-color: var(--line);
}

input::placeholder { color: rgba(246, 241, 232, 0.72); }
.app input::placeholder, main input::placeholder { color: var(--muted); }

button, .header-link {
  border: 0;
  border-radius: 999px;
  background: var(--gold);
  color: var(--sea-deep);
  padding: 0.45rem 0.9rem;
  text-decoration: none;
  cursor: pointer;
  font-weight: 600;
}

button:hover, .header-link:hover { background: #d7b56d; }
button:disabled { opacity: 0.65; cursor: wait; }
button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.login-error {
  flex-basis: 100%;
  margin: 0;
  text-align: right;
  color: #ffd0c8;
  font-size: 0.92rem;
}

.hero, .panel {
  width: min(1080px, calc(100% - 2rem));
  margin: 0 auto;
}

.hero { padding: 3.2rem 0 1.5rem; }

.eyebrow {
  margin: 0 0 0.4rem;
  color: var(--gold-deep);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 { margin: 0 0 0.8rem; font-size: clamp(2.1rem, 5vw, 3.6rem); }
.lede { max-width: 40rem; font-size: 1.15rem; color: var(--muted); }

.panel { padding: 1rem 0 2rem; }
.panel h2 { margin-bottom: 1rem; }

.video-grid, .card-grid, .offer-grid {
  display: grid;
  gap: 1rem;
}

.video-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.card-grid, .offer-grid { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

.video-card, .info-card, .offer-card, .sailing {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.video-card, .info-card { padding: 1rem; }
.video-card h3, .info-card h3, .offer-card h2 { margin: 0.4rem 0; }
.video-card p, .info-card p { margin: 0; color: var(--muted); }

.video-frame {
  display: grid;
  place-items: center;
  min-height: 140px;
  border-radius: 12px;
  background:
    linear-gradient(160deg, rgba(16, 38, 58, 0.15), rgba(198, 161, 91, 0.25)),
    var(--sea);
  color: var(--foam);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.offer-card {
  display: block;
  width: 100%;
  padding: 1rem 1rem 0.8rem;
  text-align: left;
  color: var(--ink);
  background: var(--card);
  border-radius: 16px;
}

.offer-card h2 { font-size: 1.35rem; }
.offer-code { margin: -0.2rem 0 0.6rem; color: var(--muted); font-size: 0.85rem; }

.offer-card dl { margin: 0.6rem 0 0; }
.offer-card dl div {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 0.4rem;
  padding: 0.18rem 0;
}
.offer-card dt { color: var(--muted); }
.offer-card dd { margin: 0; }

.app main {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.5rem 0 3rem;
}

.status { margin: 0 0 1rem; color: var(--muted); }
.banner {
  margin: 0 0 1rem;
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  background: #fff4d8;
}
.detail-meta { color: var(--muted); }
.shown { color: var(--muted); margin: 0 0 0.8rem; }

.list-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.75rem 0.9rem;
  margin: 0 0 0.8rem;
}

.list-toolbar[hidden] { display: none; }

.list-toolbar label,
.list-toolbar .list-toolbar-field {
  display: grid;
  flex: 0 0 auto;
  gap: 0.2rem;
  width: min(14rem, 100%);
  min-width: 0;
  max-width: 100%;
  color: var(--muted);
  font-size: 0.85rem;
}

.list-toolbar label:first-child { width: min(18rem, 100%); }

@media (max-width: 640px) {
  .list-toolbar label,
  .list-toolbar .list-toolbar-field,
  .list-toolbar label:first-child { width: 100%; }
}

.list-toolbar input,
.list-toolbar select {
  width: 100%;
  min-width: 0;
  background: white;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
}

.list-toolbar select { font: inherit; }

.list-toolbar .multi-filter,
.list-toolbar .length-filter {
  position: relative;
}

.multi-select {
  position: relative;
  width: 100%;
}

.multi-select-toggle {
  width: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  background: white;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.multi-select-toggle::after {
  content: '';
  width: 0.4rem;
  height: 0.4rem;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(45deg);
  flex: 0 0 auto;
  margin-top: -0.15rem;
}

.multi-select.is-open .multi-select-toggle {
  border-color: var(--sea);
}

.multi-select-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 0.3rem);
  left: 0;
  right: 0;
  max-height: 14rem;
  overflow: auto;
  background: white;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  box-shadow: 0 10px 24px rgba(16, 38, 58, 0.12);
  padding: 0.35rem;
}

.multi-select-option {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  width: 100%;
  margin: 0;
  padding: 0.4rem 0.5rem;
  border-radius: 0.55rem;
  color: var(--ink);
  font-size: 0.92rem;
  cursor: pointer;
}

.multi-select-option:hover {
  background: rgba(16, 38, 58, 0.05);
}

.multi-select-option input {
  width: auto;
  min-width: 0;
  margin: 0.15rem 0 0;
  accent-color: var(--sea);
  border: 0;
  border-radius: 0;
  padding: 0;
}

.multi-select-option span {
  min-width: 0;
  line-height: 1.35;
}

.length-range {
  width: 100%;
  background: white;
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 0.4rem 0.85rem 0.55rem;
}

.length-range-label {
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.3;
  margin-bottom: 0.15rem;
}

.length-range-sliders {
  position: relative;
  height: 1.35rem;
}

.length-range-sliders input[type="range"] {
  position: absolute;
  left: 0;
  right: 0;
  width: 100%;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  pointer-events: none;
  appearance: none;
  -webkit-appearance: none;
  height: 1.35rem;
}

.length-range-sliders .length-max {
  z-index: 2;
}

.length-range-sliders input[type="range"]::-webkit-slider-runnable-track {
  height: 0.25rem;
  background: var(--line);
  border-radius: 999px;
}

.length-range-sliders input[type="range"]::-moz-range-track {
  height: 0.25rem;
  background: var(--line);
  border-radius: 999px;
}

.length-range-sliders input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  pointer-events: auto;
  width: 1rem;
  height: 1rem;
  margin-top: -0.375rem;
  border: 2px solid var(--sea);
  border-radius: 50%;
  background: white;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(16, 38, 58, 0.18);
}

.length-range-sliders input[type="range"]::-moz-range-thumb {
  pointer-events: auto;
  width: 1rem;
  height: 1rem;
  border: 2px solid var(--sea);
  border-radius: 50%;
  background: white;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(16, 38, 58, 0.18);
}

.list-toolbar .quiet,
.list-toolbar > button {
  align-self: end;
  margin-bottom: 0.1rem;
}

.list-toolbar .toolbar-link {
  align-self: end;
  margin-bottom: 0.35rem;
  color: var(--sea);
  text-decoration: none;
  font-weight: 600;
}

.list-toolbar .toolbar-link:hover {
  text-decoration: underline;
}

.text-button {
  background: transparent;
  color: var(--sea);
  padding-left: 0;
}

.offer-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 17.5rem;
  gap: 1.25rem;
  align-items: start;
}

.offer-calendar {
  position: sticky;
  top: 1rem;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 2rem);
  overflow: hidden;
  padding: 0.75rem 0.65rem 0.65rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.offer-calendar-head { flex: none; }

.offer-calendar h2 {
  margin: 0;
  font-size: 1.15rem;
  text-align: center;
}

.offer-calendar .muted {
  margin: 0.2rem 0 0;
  font-size: 0.82rem;
  text-align: center;
}

.offer-day-note {
  margin: 0.55rem 0 0;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: pre-line;
}

.offer-months {
  flex: 1 1 auto;
  grid-template-columns: 1fr;
  gap: 0.55rem;
  min-height: 0;
  margin-top: 0.65rem;
  overflow: auto;
}

.offer-calendar .month {
  padding: 0.45rem 0.35rem 0.35rem;
  border-radius: 12px;
}

.offer-calendar .month h3 {
  margin-bottom: 0.25rem;
  font-size: 0.92rem;
}

.offer-calendar .weekdays span { font-size: 0.58rem; }

.offer-calendar .day {
  font-size: 0.68rem;
  border-radius: 6px;
}

.offer-calendar button.day.shared::after {
  right: 2px;
  bottom: 2px;
  width: 4px;
  height: 4px;
}

.sailing {
  display: grid;
  gap: 0.15rem 1.2rem;
  grid-template-columns: 1.3fr 1.2fr 0.8fr;
  margin-bottom: 0.7rem;
  padding: 0.9rem 1rem;
}

.sailing h3 { margin: 0; font-size: 1.15rem; }
.sailing p { margin: 0; }
.sailing-offer {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.95rem;
}
.sailing-offer a {
  color: var(--sea);
  text-decoration: none;
  font-weight: 600;
}
.sailing-offer a:hover { text-decoration: underline; }
.trip, .stops { grid-column: 1 / -1; }
.rooms { font-weight: 600; }
.muted { color: var(--muted); }
.empty { color: var(--muted); }

.header-lead {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
}

.portal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
}

.portal-nav a {
  color: var(--foam);
  font-weight: 600;
  text-decoration: none;
}

.portal-nav a[aria-current="page"] {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 0.28rem;
}

.choice-grid, .month-grid {
  display: grid;
  gap: 1rem;
}

.choice-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.month-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

a.choice-card {
  display: block;
  padding: 1.2rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  text-decoration: none;
}

a.choice-card:hover { border-color: var(--gold); }
a.choice-card h2 { margin: 0 0 0.45rem; font-size: 1.8rem; }
a.choice-card p { margin: 0; color: var(--muted); }

.screen-title { font-size: clamp(1.8rem, 4vw, 2.5rem); }
.cruise-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.4rem 0 1rem;
}

.cruise-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.8rem;
  margin-bottom: 1rem;
  padding: 1rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.cruise-form[hidden] { display: none; }

.cruise-form h2,
.form-actions,
.form-error { grid-column: 1 / -1; }

.cruise-form h2 { margin: 0; font-size: 1.45rem; }

.cruise-form label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.92rem;
  font-weight: 600;
}

.cruise-form input {
  width: 100%;
  min-width: 0;
  border-radius: 12px;
}

.form-actions, .cruise-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.form-error {
  margin: 0;
  color: var(--danger);
}

button.quiet {
  background: transparent;
  color: var(--sea);
}

button.quiet:hover { background: rgba(16, 38, 58, 0.06); }

button.danger {
  background: var(--danger);
  color: white;
}

button.danger:hover { background: #7d2e24; }

.day-heading { margin: 0 0 0.7rem; font-size: 1.45rem; }

.cruise-card, .month {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.cruise-card { margin-bottom: 0.7rem; padding: 1rem; }
.cruise-card h3 { margin: 0; font-size: 1.25rem; }
.cruise-card p { margin: 0.15rem 0; }
.cruise-actions { margin-top: 0.75rem; }

.ship-add {
  display: grid;
  grid-template-columns: minmax(200px, 320px) auto;
  gap: 0.8rem;
  align-items: end;
  margin: 0.4rem 0 1rem;
}

.ship-add label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.92rem;
  font-weight: 600;
}

.ship-add input {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  color: inherit;
  font: inherit;
}

.ship-add .form-actions { margin: 0; }
.ship-add .form-error { grid-column: 1 / -1; margin: 0; }

.ship-card label {
  display: grid;
  gap: 0.3rem;
  margin-top: 0.7rem;
  font-size: 0.92rem;
  font-weight: 600;
}

.ship-card textarea,
#casino-note {
  width: 100%;
  box-sizing: border-box;
  min-height: 5rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: inherit;
  font: inherit;
  resize: vertical;
}

.ship-card .form-actions { margin-top: 0.7rem; }
.ship-save-status { margin: 0.45rem 0 0; }

.casino-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.8rem;
  margin-bottom: 1rem;
  padding: 1rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.casino-form .wide,
.casino-entry { grid-column: 1 / -1; }

.casino-entry {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.8rem;
}

.casino-entry fieldset,
.casino-entry .form-actions,
.casino-entry > .muted,
.casino-entry .wide,
#casino-rule,
#casino-estimate,
#casino-form-error { grid-column: 1 / -1; }

#casino-view [hidden] { display: none !important; }

.casino-form label,
.casino-entry label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.92rem;
  font-weight: 600;
}

.casino-form input,
.casino-form select,
.casino-entry input,
.casino-entry select {
  width: 100%;
  min-width: 0;
  border-radius: 12px;
  background: white;
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 0.45rem 0.85rem;
}

.casino-form fieldset {
  border: 1px solid var(--line);
  border-radius: 12px;
  margin: 0;
}

.casino-form fieldset legend { font-weight: 600; }

.choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.choice-row label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
}

.choice-row input { width: auto; min-width: 0; }

.casino-preview {
  display: block;
  width: min(100%, 280px);
  margin-top: 0.7rem;
  border: 1px solid var(--line);
  border-radius: 12px;
}

#casino-summary { margin-top: 0.4rem; }
#casino-summary h2 { margin: 0.2rem 0 0.6rem; font-size: 1.45rem; }
#casino-machines { margin-bottom: 1rem; }

.month { padding: 0.8rem 0.7rem 0.7rem; }
.month h3 { margin: 0 0 0.45rem; font-size: 1.05rem; text-align: center; }

.weekdays, .days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.weekdays { margin-bottom: 0.2rem; }

.weekdays span {
  text-align: center;
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.day {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  min-width: 0;
  font-size: 0.82rem;
}

span.day.past { color: #8d97a1; }

button.day {
  padding: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font-weight: 600;
}

button.day:hover { background: #efe6d6; }

button.day.blocked {
  background: var(--sea);
  color: var(--foam);
}

button.day.blocked:hover { background: #1b3e5e; }

button.day.blocked.past {
  background: #6e8294;
  color: var(--foam);
}

button.day.blocked.past:hover { background: #5d7386; }

button.day.shared { position: relative; }

button.day.shared::after {
  content: "";
  position: absolute;
  right: 3px;
  bottom: 3px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
}

.day.today,
.day.looking,
button.day.picked {
  box-shadow: inset 0 0 0 2px var(--gold);
}

.outside { margin-top: 1.5rem; }
.outside h2 { margin-bottom: 0.3rem; font-size: 1.45rem; }

.site-footer {
  width: min(1080px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1rem 0 2rem;
  color: var(--muted);
  font-size: 0.92rem;
}

@media (max-width: 760px) {
  .site-header { align-items: flex-start; flex-wrap: wrap; }
  .account, .login-form { width: 100%; }
  .login-form input { flex: 1; min-width: 0; }
  .login-error { text-align: left; }
  .sailing { grid-template-columns: 1fr; }
  .offer-split { grid-template-columns: 1fr; }
  .offer-calendar {
    position: static;
    order: -1;
    max-height: 22rem;
  }
  .header-actions { margin-left: auto; }
  .header-lead, .portal-nav { width: 100%; }
}
