.rdg-marine-board {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  flex-direction: column;
  gap: 12px;
  padding: 3px 2px 1px;
  color: #e5edf8;
}

.rdg-marine-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 12px 16px;
  border: 1px solid rgba(45, 212, 191, .22);
  border-radius: 16px;
  background: linear-gradient(125deg, rgba(8, 31, 47, .97), rgba(8, 47, 73, .88) 55%, rgba(15, 52, 67, .78));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
}

.rdg-marine-head > div:first-child { min-width: 0; }
.rdg-marine-head > div:first-child > span {
  display: block;
  color: #67e8f9;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .08em;
}
.rdg-marine-head > div:first-child > strong {
  display: block;
  margin-top: 3px;
  color: #fff;
  font-size: clamp(25px, 2.15vw, 34px);
  line-height: 1.05;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rdg-marine-head > div:first-child > small {
  display: block;
  margin-top: 5px;
  color: #b8c9d9;
  font-size: 14px;
}

.rdg-marine-switch {
  display: grid;
  grid-template-columns: repeat(3, minmax(112px, 1fr));
  gap: 6px;
  padding: 5px;
  border: 1px solid rgba(125, 211, 252, .2);
  border-radius: 14px;
  background: rgba(2, 12, 27, .48);
}
.rdg-marine-switch button {
  display: flex;
  min-width: 0;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 13px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #b8c9d9;
  font: inherit;
  font-size: 15px;
  font-weight: 950;
  cursor: pointer;
}
.rdg-marine-switch button i { font-size: 20px; font-style: normal; }
.rdg-marine-switch button.active {
  background: linear-gradient(135deg, #0e7490, #0369a1);
  color: #fff;
  box-shadow: 0 4px 13px rgba(3, 105, 161, .28);
}

.rdg-marine-glance {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.rdg-marine-glance article {
  min-width: 0;
  padding: 14px 18px;
  border: 1px solid rgba(56, 189, 248, .22);
  border-left: 6px solid #38bdf8;
  border-radius: 15px;
  background: linear-gradient(110deg, rgba(7, 32, 53, .96), rgba(12, 42, 62, .78));
}
.rdg-marine-glance article.cruise { border-left-color: #2dd4bf; }
.rdg-marine-glance article.cruise.high {
  border-left-color: #fb7185;
  background: linear-gradient(110deg, rgba(64, 17, 31, .92), rgba(69, 26, 3, .55));
}
.rdg-marine-glance span {
  display: block;
  color: #9fb4c9;
  font-size: 14px;
  font-weight: 900;
}
.rdg-marine-glance strong {
  display: block;
  margin-top: 4px;
  color: #fff;
  font-size: clamp(25px, 2.25vw, 36px);
  line-height: 1.05;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rdg-marine-glance em {
  display: block;
  margin-top: 6px;
  color: #8ff4ff;
  font-size: 17px;
  font-style: normal;
  font-weight: 900;
}
.rdg-marine-glance article.cruise em { color: #99f6e4; }
.rdg-marine-glance article.cruise.high em { color: #fda4af; }

.rdg-marine-chart-grid {
  display: grid;
  flex: 1 1 auto;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: 12px;
  min-height: 0;
}
.rdg-marine-wave,
.rdg-marine-cruise-chart {
  display: flex;
  min-width: 0;
  min-height: 245px;
  flex-direction: column;
  padding: 14px 16px 12px;
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 15px;
  background: linear-gradient(180deg, rgba(15, 31, 51, .94), rgba(11, 24, 40, .84));
}
.rdg-marine-overview .rdg-marine-wave,
.rdg-marine-overview .rdg-marine-cruise-chart { min-height: 0; }
.rdg-marine-wave > header,
.rdg-marine-cruise-chart > header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.rdg-marine-wave > header strong,
.rdg-marine-cruise-chart > header strong { color: #fff; font-size: 18px; }
.rdg-marine-wave > header span,
.rdg-marine-cruise-chart > header span { color: #a8bacb; font-size: 13px; }
.rdg-marine-wave > header i {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin: 0 4px 0 8px;
  border-radius: 3px;
  vertical-align: -1px;
}
.rdg-marine-wave > header i.tsa { background: #38bdf8; }
.rdg-marine-wave > header i.hsb { background: #2dd4bf; }
.rdg-marine-terminal-key {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  white-space: nowrap;
}
.rdg-marine-terminal-key > b {
  display: inline-flex;
  align-items: center;
  color: #c7d6e5;
  font-size: inherit;
  font-weight: 850;
}
.rdg-marine-terminal-key > b em {
  margin-left: 5px;
  color: #fff;
  font-size: 1.08em;
  font-style: normal;
  font-weight: 950;
}

.rdg-marine-bars,
.rdg-cruise-bars {
  display: grid;
  flex: 1 1 auto;
  align-items: end;
  gap: 9px;
  min-height: 165px;
  margin-top: 10px;
}
.rdg-marine-bars { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.rdg-cruise-bars { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.rdg-marine-bar,
.rdg-cruise-bar {
  display: grid;
  grid-template-rows: 22px minmax(110px, 1fr) 24px;
  min-width: 0;
  height: 100%;
  align-items: end;
  text-align: center;
}
.rdg-marine-bar > b,
.rdg-cruise-bar > b { align-self: center; color: #fff; font-size: 17px; }
.rdg-marine-bar > div,
.rdg-cruise-bar > div {
  display: flex;
  height: 100%;
  min-height: 110px;
  flex-direction: column-reverse;
  justify-content: flex-start;
  border-radius: 9px 9px 3px 3px;
  background: rgba(148, 163, 184, .09);
  overflow: hidden;
}
.rdg-marine-bar > div i,
.rdg-cruise-bar > div i {
  display: block;
  width: 100%;
  min-height: 0;
}
.rdg-marine-bar > div i.tsa { background: linear-gradient(180deg, #38bdf8, #0284c7); }
.rdg-marine-bar > div i.hsb { background: linear-gradient(180deg, #2dd4bf, #0f766e); }
.rdg-cruise-bar > div i { background: linear-gradient(180deg, #2dd4bf, #0e7490); }
.rdg-cruise-bar.medium > div i { background: linear-gradient(180deg, #fbbf24, #b45309); }
.rdg-cruise-bar.high > div i { background: linear-gradient(180deg, #fb7185, #be123c); }
.rdg-marine-bar.now > div,
.rdg-cruise-bar.today > div { box-shadow: 0 0 0 2px rgba(103, 232, 249, .55); }
.rdg-marine-bar time,
.rdg-cruise-bar time {
  align-self: center;
  color: #dbe7f2;
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
}
.rdg-marine-decision {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  padding: 13px 16px;
  border: 1px solid rgba(56, 189, 248, .2);
  border-left: 6px solid #38bdf8;
  border-radius: 14px;
  background: linear-gradient(100deg, rgba(7, 32, 53, .94), rgba(12, 42, 62, .76));
}
.rdg-marine-decision > i { font-size: 30px; font-style: normal; }
.rdg-marine-decision > div { min-width: 0; }
.rdg-marine-decision span { display: block; color: #a8bacb; font-size: 14px; font-weight: 850; }
.rdg-marine-decision strong {
  display: block;
  margin-top: 2px;
  color: #f8fafc;
  font-size: clamp(21px, 1.8vw, 29px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rdg-marine-decision > em { color: #67e8f9; font-size: 16px; font-style: normal; font-weight: 950; white-space: nowrap; }
.rdg-marine-decision.high { border-left-color: #fb7185; background: linear-gradient(100deg, rgba(64, 17, 31, .92), rgba(69, 26, 3, .55)); }
.rdg-marine-decision.high > em { color: #fda4af; }

.rdg-ferry-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  min-height: 0;
  overflow: auto;
  padding: 0 2px 1px;
}
.rdg-ferry-row {
  display: grid;
  grid-template-columns: 98px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  min-width: 0;
  min-height: 72px;
  padding: 12px 14px;
  border: 1px solid rgba(148, 163, 184, .15);
  border-radius: 13px;
  background: linear-gradient(180deg, rgba(18, 36, 55, .9), rgba(15, 28, 45, .8));
  color: inherit;
  text-decoration: none;
}
.rdg-ferry-row:hover { border-color: rgba(103, 232, 249, .34); background: rgba(22, 50, 70, .9); }
.rdg-ferry-row time b { display: block; color: #fff; font-size: 26px; }
.rdg-ferry-row time span { display: block; margin-top: 2px; color: #67e8f9; font-size: 13px; font-weight: 900; }
.rdg-ferry-row > div { min-width: 0; }
.rdg-ferry-row > div strong { display: block; color: #f8fafc; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rdg-ferry-row > div span { display: block; margin-top: 4px; color: #a8bacb; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rdg-ferry-row > em { padding: 6px 8px; border-radius: 8px; background: rgba(14, 116, 144, .22); color: #a5f3fc; font-size: 13px; font-style: normal; font-weight: 950; white-space: nowrap; }
.rdg-ferry-row.delay { border-left: 5px solid #fb7185; }
.rdg-ferry-row.delay > em { background: rgba(190, 24, 93, .2); color: #fda4af; }

.rdg-cruise-days {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 10px;
  min-height: 0;
  overflow: auto;
  padding: 0 2px 1px;
}
.rdg-cruise-day { min-width: 0; padding: 12px; border: 1px solid rgba(148, 163, 184, .16); border-top: 5px solid #38bdf8; border-radius: 14px; background: linear-gradient(180deg, rgba(15, 31, 51, .94), rgba(11, 24, 40, .84)); }
.rdg-cruise-day.medium { border-top-color: #fbbf24; }
.rdg-cruise-day.high { border-top-color: #fb7185; box-shadow: 0 0 0 1px rgba(251, 113, 133, .12); }
.rdg-cruise-day > header { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 1px 2px 9px; margin-bottom: 8px; border-bottom: 1px solid rgba(148, 163, 184, .16); }
.rdg-cruise-day > header strong { color: #fff; font-size: 19px; }
.rdg-cruise-day > header span { color: #7dd3fc; font-size: 14px; font-weight: 950; }
.rdg-cruise-day.medium > header span { color: #fde68a; }
.rdg-cruise-day.high > header span { color: #fda4af; }
.rdg-cruise-call { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 9px; min-height: 62px; padding: 10px 9px; border-radius: 9px; background: rgba(30, 41, 59, .68); color: inherit; text-decoration: none; }
.rdg-cruise-call + .rdg-cruise-call { margin-top: 7px; }
.rdg-cruise-call strong { color: #f8fafc; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rdg-cruise-call time { color: #bae6fd; font-size: 15px; font-weight: 950; white-space: nowrap; }
.rdg-cruise-call span { grid-column: 1 / -1; color: #a8bacb; font-size: 13px; }

.rdg-marine-note { display: flex; justify-content: space-between; gap: 12px; color: #9fb0c2; font-size: 13px; }
.rdg-marine-note a { color: #67e8f9; text-decoration: none; }
.rdg-marine-note a:hover { text-decoration: underline; }
.rdg-marine-empty { display: flex; min-height: 260px; flex-direction: column; align-items: center; justify-content: center; gap: 8px; border: 1px dashed rgba(103, 232, 249, .2); border-radius: 15px; background: rgba(8, 25, 40, .45); color: #cbd5e1; }
.rdg-marine-empty b { font-size: 22px; }
.rdg-marine-empty span { color: #a8bacb; font-size: 15px; }

body.rdg-tesla-ui .rdg-flow-primary-tabs button[data-rdg-flow-view="marine"].active,
body.rdg-ai-reading-mode .rdg-flow-primary-tabs button[data-rdg-flow-view="marine"].active {
  border-color: rgba(45, 212, 191, .92) !important;
  background: linear-gradient(155deg, rgba(5, 66, 76, .99), rgba(3, 31, 49, .99)) !important;
  color: #2dd4bf !important;
  box-shadow: 0 0 0 2px rgba(20, 184, 166, .16), 0 0 22px rgba(20, 184, 166, .24), 0 9px 22px rgba(0, 0, 0, .36), inset 0 1px 0 rgba(153, 246, 228, .15) !important;
}
body.rdg-tesla-ui .rdg-flow-primary-tabs,
body.rdg-ai-reading-mode .rdg-flow-primary-tabs { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }

@media (max-width: 820px) {
  .rdg-marine-head { grid-template-columns: 1fr; }
  .rdg-marine-switch { width: 100%; }
  .rdg-marine-chart-grid { flex: 0 0 auto; grid-template-columns: 1fr; }
  .rdg-marine-wave, .rdg-marine-cruise-chart { min-height: 225px; }
}

@media (max-width: 700px) {
  .rdg-marine-glance, .rdg-ferry-list, .rdg-cruise-days { grid-template-columns: 1fr; }
  .rdg-marine-note { flex-direction: column; }
  .rdg-marine-decision { grid-template-columns: auto minmax(0, 1fr); }
  .rdg-marine-decision > em { grid-column: 2; }
}

@media (max-width: 620px) {
  .rdg-marine-switch { grid-template-columns: 1fr; }
  .rdg-marine-bars { gap: 5px; }
  .rdg-marine-bar time, .rdg-cruise-bar time { font-size: 12px; }
  .rdg-marine-wave > header span { display: none; }
  .rdg-marine-glance strong { font-size: 24px; }
}
