:root {
  --sea: #072033;
  --sea-2: #0a4d68;
  --water: #088395;
  --foam: #f6f1e8;
  --sand: #e8dcc8;
  --ink: #152026;
  --muted: #5c6b73;
  --line: #d9cfc0;
  --card: #fffdf8;
  --accent: #f0763d;
  --accent-2: #c4511e;
  --ok: #1b7a4a;
  --ok-bg: #e7f6ee;
  --warn: #8a5a00;
  --warn-bg: #fff3d6;
  --err: #9b1c1c;
  --err-bg: #fdeaea;
  --tallink: #0054a6;
  --viking: #c8102e;
  --eckero: #0b3a70;
  --radius: 16px;
  --shadow: 0 8px 28px rgba(7, 32, 51, .08);
  --font: "Source Sans 3", "Segoe UI", sans-serif;
  --display: "Sora", "Source Sans 3", sans-serif;
  --tabbar: 64px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--foam);
  min-height: 100vh;
  padding-bottom: calc(var(--tabbar) + 72px + env(safe-area-inset-bottom));
  line-height: 1.45;
}
body.has-hero,
body.plain {
  background: var(--foam);
}
body.has-hero .top,
body.plain .top { background: var(--sea); }
.skip {
  position: absolute; left: -999px;
}
.skip:focus { left: 8px; top: 8px; background: #fff; padding: 8px; z-index: 20; }
a { color: var(--sea-2); }
h1, h2, h3, .name, .time, .brand .name {
  font-family: var(--display);
  letter-spacing: -.02em;
}
h1 { font-size: 1.7rem; line-height: 1.2; margin: .2rem 0 .6rem; color: var(--sea); }
h2 { font-size: 1.15rem; margin: 1.4rem 0 .6rem; color: var(--sea); }
.lead { font-size: 1.05rem; color: var(--muted); margin: 0 0 1rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; font-weight: 600; color: var(--accent-2); margin: 0 0 .3rem; }
.muted, .hint { color: var(--muted); font-size: .92rem; }
.hint { margin: .4rem 0 1rem; }
.demo-banner {
  background: #f0763d;
  color: #fff;
  font-size: .88rem;
  padding: .55rem 1rem;
  text-align: center;
}
.demo-banner strong { font-weight: 700; }
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .7rem 1rem;
  color: #fff;
}
.brand { display: flex; gap: .65rem; align-items: center; text-decoration: none; color: #fff; }
.brand .name { display: block; font-weight: 700; font-size: 1.02rem; white-space: nowrap; }
.brand .tag { display: block; font-size: .75rem; opacity: .8; font-family: var(--font); letter-spacing: 0; }
.top-nav { display: flex; gap: .5rem; align-items: center; }
.nav-link { color: #fff; text-decoration: none; font-weight: 600; position: relative; }
.avatar-link {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent); color: #fff; display: grid; place-items: center;
  font-weight: 700; text-decoration: none;
}
.main { width: min(720px, 100% - 1.6rem); margin: 0 auto; }
.hero, .sailing-hero {
  color: #fff;
  background: linear-gradient(180deg, var(--sea) 0%, #0c3d56 100%);
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: .5rem max(0.8rem, calc(50vw - 360px)) 1.5rem;
  box-sizing: border-box;
  border-radius: 0 0 24px 24px;
}
.hero h1, .sailing-hero h1, .sailing-hero .route-big { color: #fff; }
.hero .lead { color: #e8dcc8; }
.hero-actions, .actions-row, .cta-pair { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin: 1rem 0; }
.panel {
  background: var(--card);
  border-radius: calc(var(--radius) + 4px);
  padding: 1rem;
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  margin: 1rem 0;
  box-shadow: var(--shadow);
}
.filters { display: grid; gap: .8rem; }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--foam); border-radius: 999px; padding: 3px; }
.seg label {
  text-align: center; padding: .55rem .4rem; border-radius: 999px;
  font-weight: 600; font-size: .92rem; cursor: pointer;
}
.seg label.is-on { background: var(--sea); color: #fff; }
.seg input, .dates input { position: absolute; opacity: 0; pointer-events: none; }
.dates { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .2rem; }
.date-chip {
  flex: 0 0 auto; min-width: 4.2rem; text-align: center;
  border: 1px solid var(--line); border-radius: 12px; padding: .35rem .4rem;
  cursor: pointer; background: #fff;
}
.date-chip.is-on { border-color: var(--sea); background: var(--sea); color: #fff; }
.date-chip .d-lab { display: block; font-size: .72rem; font-weight: 600; }
.date-chip .d-num { font-size: .95rem; }
.section-title { margin-top: 1rem; }
.sailing-list, .offer-list, .simple-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .65rem; }
.sailing-card, .offer-card, .simple-list a {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: .7rem;
  align-items: center;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: .8rem;
}
.offer-card, .simple-list a { grid-template-columns: 1fr; }
.sailing-card.is-past { opacity: .62; }
.time-col .time, .clock .time { font-family: var(--display); font-size: 1.45rem; font-weight: 700; color: var(--sea); display: block; line-height: 1; }
.clock .time { font-size: 2rem; color: #fff; }
.time-col .time-lab, .clock .time-lab {
  display: block; font-size: .7rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--accent-2);
}
.clock .time-lab { color: #f4b183; }
.sailing-card.is-now { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.pill-now { background: var(--accent); }
.meet-line { font-size: .92rem; margin: .25rem 0 .15rem; color: var(--sea); font-weight: 600; }
.arrive-highlight { font-size: 1.15rem; margin: .35rem 0; }
.arrive-highlight strong { font-family: var(--display); font-size: 1.55rem; }
.sailing-hero .arrive-highlight, .sailing-hero > .muted { color: #e8dcc8; }
.sailing-hero .arrive-highlight strong { color: #fff; }
.hero .safety-line { font-size: .98rem; color: #e8dcc8; }
.time-col .arr, .info-col .muted { font-size: .8rem; color: var(--muted); display: block; }
.info-col strong { display: block; }
.seats-yes { color: var(--ok); font-weight: 700; font-size: .9rem; }
.seats-no { color: var(--muted); font-weight: 600; font-size: .88rem; }
.seats-col { text-align: right; }
.pill {
  display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .03em;
  padding: .15rem .45rem; border-radius: 999px; color: #fff; background: #445;
  margin-right: .3rem;
}
.op-tallink { background: var(--tallink); }
.op-viking { background: var(--viking); }
.op-eckero { background: var(--eckero); }
.verified-badge {
  display: inline-flex; align-items: center; gap: .25rem;
  background: var(--ok-bg); color: var(--ok);
  border: 1px solid #b7e0c8;
  font-size: .75rem; font-weight: 700;
  padding: .12rem .45rem; border-radius: 999px;
  vertical-align: middle;
}
.verified-badge::before { content: "✓"; }
.demo-tag {
  display: inline-block; font-size: .7rem; font-weight: 700;
  background: var(--sand); color: var(--sea); padding: .1rem .4rem; border-radius: 999px;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: .55rem 1rem; border-radius: 999px;
  border: 1px solid transparent; font-weight: 700; font-size: 1rem;
  font-family: inherit; cursor: pointer; text-decoration: none;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-2); }
.btn-ghost { background: transparent; border-color: currentColor; color: inherit; }
.hero .btn-ghost, .top .btn-ghost { color: #fff; border-color: rgba(255,255,255,.5); }
.btn-sm { min-height: 36px; padding: .3rem .8rem; font-size: .9rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.cta-note { color: var(--muted); font-size: .9rem; margin: 0; flex: 1; min-width: 16rem; }
.sailing-hero-row { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.terminals { opacity: .85; font-size: .92rem; }
.form label, label.check { display: block; font-weight: 600; margin: .7rem 0; }
.form input, .form select, .form textarea {
  width: 100%; margin-top: .25rem; font: inherit;
  padding: .65rem .7rem; border-radius: 10px; border: 1px solid var(--line);
  background: #fff; color: var(--ink);
}
label.check { display: flex; gap: .5rem; align-items: flex-start; font-weight: 500; }
label.check input { width: auto; margin-top: .25rem; }
.facts { display: grid; gap: .5rem; margin: .8rem 0 0; }
.facts > div { display: grid; grid-template-columns: 9rem 1fr; gap: .4rem; }
.facts dt { color: var(--muted); font-weight: 500; }
.facts dd { margin: 0; }
.price { font-weight: 700; color: var(--sea); }
.person { display: flex; gap: .75rem; align-items: center; }
.person-av {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--sea-2); color: #fff; display: grid; place-items: center;
  font-family: var(--display); font-weight: 700; font-size: 1.2rem;
}
.person.big .person-av { width: 64px; height: 64px; font-size: 1.5rem; }
.stars { color: #d4a017; letter-spacing: .05em; }
.offer-top { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.offer-meta { display: flex; flex-wrap: wrap; gap: .6rem 1rem; margin-top: .4rem; font-size: .92rem; }
.dest { font-weight: 700; margin: .25rem 0; }
.status-pill {
  display: inline-block; font-size: .78rem; font-weight: 700;
  padding: .15rem .5rem; border-radius: 999px; background: #eee;
}
.st-pending { background: var(--warn-bg); color: var(--warn); }
.st-accepted { background: var(--ok-bg); color: var(--ok); }
.st-completed { background: #e7eef6; color: var(--sea-2); }
.st-declined, .st-cancelled { background: var(--err-bg); color: var(--err); }
.notice, .notice.warn, .notice.ok {
  border-radius: 14px; padding: .85rem 1rem; margin: 1rem 0;
  background: #e7eef6; border: 1px solid #c9d8e8;
}
.notice.warn { background: var(--warn-bg); border-color: #efd89a; color: #4a3200; }
.notice.ok { background: var(--ok-bg); border-color: #b7e0c8; }
.flashes { width: min(720px, 100% - 1.6rem); margin: .4rem auto; display: grid; gap: .4rem; }
.flash { padding: .7rem 1rem; border-radius: 12px; font-weight: 600; }
.flash-ok { background: var(--ok-bg); color: var(--ok); }
.flash-err { background: var(--err-bg); color: var(--err); }
.empty { background: var(--foam); padding: 1rem; border-radius: 12px; color: var(--muted); }
.chat-log { display: grid; gap: .5rem; margin: .6rem 0; max-height: 50vh; overflow: auto; }
.bubble {
  background: var(--foam); border-radius: 14px 14px 14px 4px;
  padding: .55rem .7rem; max-width: 90%;
}
.bubble.mine { background: #d7ecf2; border-radius: 14px 14px 4px 14px; margin-left: auto; }
.bubble .who { display: block; font-size: .75rem; color: var(--muted); }
.bubble p { margin: .15rem 0 0; }
.chat-form { display: flex; gap: .4rem; }
.chat-form input { flex: 1; padding: .65rem .7rem; border-radius: 999px; border: 1px solid var(--line); font: inherit; }
.pay-card { background: linear-gradient(180deg, #fff, #f6f1e8); }
.method-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; margin: 1rem 0; }
.method-tab {
  text-align: center; padding: .7rem .4rem; border-radius: 12px;
  border: 1px solid var(--line); text-decoration: none; color: var(--ink);
  font-weight: 600; background: #fff; font-size: .92rem;
}
.method-tab.is-on { background: var(--sea); color: #fff; border-color: var(--sea); }
.control-code { text-align: center; }
.control-code .code {
  font-family: var(--display); font-size: 3rem; font-weight: 700;
  letter-spacing: .25em; color: var(--sea);
}
.steps { padding-left: 1.2rem; }
.steps li { margin: .6rem 0; }
.prose-list { padding-left: 1.15rem; }
.prose-list li { margin: .45rem 0; }
.star-pick { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: .2rem; font-size: 2rem; }
.star-pick input { position: absolute; opacity: 0; }
.star-pick label { color: #cfc6b6; cursor: pointer; }
.star-pick input:checked ~ label, .star-pick label:hover, .star-pick label:hover ~ label { color: #d4a017; }
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0;
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  background: #fff; border-top: 1px solid var(--line);
  padding: .25rem 0 calc(.25rem + env(safe-area-inset-bottom));
  z-index: 10;
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; gap: .1rem;
  text-decoration: none; color: var(--muted); font-size: .75rem; font-weight: 600;
  padding: .3rem; position: relative;
}
.tabbar a.is-on { color: var(--sea); }
.badge {
  display: inline-grid; place-items: center;
  min-width: 1.15rem; height: 1.15rem; padding: 0 .25rem;
  background: var(--accent); color: #fff; border-radius: 999px;
  font-size: .7rem; font-weight: 700;
}
.tabbar .badge { position: absolute; top: 0; right: calc(50% - 22px); }
.foot {
  width: min(720px, 100% - 1.6rem); margin: 1.5rem auto 0;
  font-size: .85rem; color: var(--muted);
  display: flex; flex-wrap: wrap; gap: .4rem 1rem;
}
.foot a { color: var(--muted); }
.foot p { width: 100%; margin: .3rem 0 0; }
.logout-form { margin: 1.5rem 0; }
.back { display: inline-block; margin: 0 0 .6rem; color: #e8dcc8; text-decoration: none; font-weight: 600; }
.main > .back, .main > h1, .main > .lead, .main > .eyebrow { }
.main > a.back { color: var(--sea-2); }
.sailing-hero .back { color: #e8dcc8; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
@media (min-width: 800px) {
  .tabbar { display: none; }
  body { padding-bottom: 40px; }
}

.price-break {
  display: grid; gap: .28rem; margin: .55rem 0 0;
  padding: .55rem .7rem; border-radius: 12px;
  background: #f6f1e8; border: 1px solid #eadfcb;
  font-size: .92rem;
}
.price-break > div { display: grid; grid-template-columns: 1fr auto; gap: .6rem; align-items: baseline; }
.price-break dt { margin: 0; color: var(--muted); font-weight: 500; }
.price-break dd { margin: 0; font-weight: 600; }
.price-break .is-total { margin-top: .2rem; padding-top: .35rem; border-top: 1px solid #eadfcb; }
.price-break .is-total dt, .price-break .is-total dd {
  font-weight: 700; color: var(--sea); font-size: 1.02rem;
}
.price-break .is-emphasis dt, .price-break .is-emphasis dd { font-weight: 700; color: var(--sea); }
.price-break-card { margin-top: .5rem; font-size: .86rem; }
.offer-card .price-break { pointer-events: none; }
.confirm-box {
  margin: 1rem 0 .6rem; padding: .85rem 1rem;
  border-radius: 14px; background: #e7eef6; border: 1px solid #c9d8e8;
}
.confirm-box h3 { margin: 0 0 .35rem; font-size: 1rem; }
.pay-card .receive { font-size: 1.05rem; margin: 0 0 .4rem; }
.pay-card .price-break { background: #fff; }
