:root {
  --sand: #f2c987;
  --sand-dark: #e0ad5c;
  --ink: #2b2b2b;
  --ink-soft: #555;
  --paper: #f5f3ec;
  --card: #ffffff;
  --line: #e4dfd2;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; } /* a class's own display must not un-hide it */
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  font-family: "Lexend", system-ui, -apple-system, "Segoe UI", "Malgun Gothic", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
}
a { color: inherit; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

.top { position: sticky; top: 0; z-index: 10; background: var(--ink); color: #fff; }
.top-row { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; letter-spacing: .04em; }
.brand img { width: 40px; height: 40px; }
nav { display: flex; gap: 20px; margin-left: auto; }
nav a { text-decoration: none; font-size: 14px; opacity: .85; }
nav a:hover { opacity: 1; color: var(--sand); }
.lang { display: flex; border: 1px solid #555; border-radius: 6px; overflow: hidden; }
.lang button { background: none; border: 0; color: #bbb; padding: 4px 10px; font: inherit; font-size: 13px; cursor: pointer; }
.lang button.on { background: var(--sand); color: var(--ink); font-weight: 600; }

.hero { background: var(--ink); color: #fff; padding: 64px 0 72px; border-bottom: 6px solid var(--sand); }
.hero h1 { font-size: clamp(28px, 4.5vw, 46px); line-height: 1.15; margin: 0 0 14px; max-width: 760px; }
.hero p { font-size: 18px; color: #ccc; margin: 0 0 28px; max-width: 620px; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; }
.btn { background: var(--sand); color: var(--ink); text-decoration: none; padding: 12px 22px; border-radius: 8px; font-weight: 600; }
.btn:hover { background: var(--sand-dark); }
.btn.ghost { background: transparent; color: #fff; border: 1px solid #777; }
.btn.ghost:hover { border-color: var(--sand); color: var(--sand); }

main section { padding: 56px 0 8px; }
h2 { font-size: 28px; margin: 0 0 16px; }
h2::after { content: ""; display: block; width: 48px; height: 4px; background: var(--sand); margin-top: 8px; border-radius: 2px; }
.muted { color: var(--ink-soft); }
.small { font-size: 14px; }

.table-scroll { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: 10px; }
table { width: 100%; border-collapse: collapse; min-width: 640px; }
th { background: var(--sand); text-align: left; font-size: 13px; text-transform: uppercase; letter-spacing: .03em; padding: 12px 14px; }
td { padding: 12px 14px; border-top: 1px solid var(--line); font-size: 15px; }
td.etd .dow { display: block; font-size: 12px; font-weight: 400; color: var(--ink-soft); }
td.vessel { font-weight: 600; }
td.price { font-weight: 700; }
tr.next td { background: #fff8ea; }
.notes { margin: 14px 0 0; padding-left: 18px; color: var(--ink-soft); font-size: 14px; }
.empty { background: var(--card); padding: 16px; border-radius: 10px; }

.two { display: grid; grid-template-columns: 1fr 1.3fr; gap: 20px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 22px; }
.label { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); margin: 0 0 4px; display: block; }
.big { font-size: 20px; font-weight: 600; margin: 0; display: block; }
.links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.links a { font-size: 14px; text-decoration: none; border: 1px solid var(--line); padding: 6px 12px; border-radius: 6px; }
.links a:hover { border-color: var(--sand-dark); background: #fff8ea; }
.map, .embed { border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #ddd; }
.map iframe { width: 100%; height: 100%; min-height: 320px; border: 0; display: block; }
.embed iframe { width: 100%; height: 480px; border: 0; display: block; }

.contacts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.contact { text-decoration: none; }
.contact:nth-child(2) { text-align: right; }
.contact:hover { border-color: var(--sand-dark); }

.ship-card { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 20px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px 18px; margin: 0 0 12px; }
.ship-name { font-size: 18px; font-weight: 700; }
.ship-next { color: var(--ink-soft); }
.ship-next b { color: var(--ink); }
.ship-price { margin-left: auto; font-size: 18px; font-weight: 700; }

.ship-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.ship-tabs button { font: inherit; font-size: 14px; font-weight: 600; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; }
.ship-tabs button:hover { border-color: var(--sand-dark); }
.ship-tabs button.on { background: var(--sand); border-color: var(--sand-dark); }

footer { margin-top: 64px; background: var(--ink); color: #aaa; padding: 22px 0; font-size: 14px; }

@media (max-width: 800px) {
  nav { display: none; } /* phones: no section links (Musokhon) */
  .lang { margin-left: auto; }
  .two, .contacts { grid-template-columns: 1fr; }
  .contact:nth-child(2) { text-align: left; }
  .embed iframe { height: 380px; }
  .hero { padding: 44px 0 52px; }
  main section { padding-top: 44px; }
}

/* phones: each sailing becomes a small card instead of a sideways-scrolling row */
@media (max-width: 640px) {
  table { min-width: 0; }
  thead { display: none; }
  tbody tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 12px 14px; border-top: 1px solid var(--line); }
  tbody tr:first-child { border-top: 0; }
  tr.next { background: #fff8ea; }
  td { padding: 0; border: 0; font-size: 14px; }
  td.etd { font-weight: 600; }
  td.etd .dow { display: inline; margin-left: 6px; } /* phones: date and day on one line */
  td.price { grid-column: 2; grid-row: 1; text-align: right; font-size: 16px; }
  td.vessel { grid-column: 1; }
  td.transit { grid-column: 2; grid-row: 2; text-align: right; color: var(--ink-soft); }
  td.from, td.to { grid-column: 1 / -1; color: var(--ink-soft); }
  td.from::before, td.to::before { content: attr(data-label) ": "; }
  .ship-tabs button { padding: 7px 11px; font-size: 13px; }
}
