/* Palette from Massachusetts Maritime Academy's public website stylesheet. */
:root {
  color-scheme: light;
  --navy: #072040;
  --navy-deep: #01143e;
  --gold: #cfb888;
  --gold-ink: #6c6047;
  --blue: #78a1bb;
  --slate: #3e5461;
  --bg: #f4f6f8;
  --panel: #ffffff;
  --line: #d4dee6;
  --line-strong: #afc0cd;
  --text: #072040;
  --muted: #3e5461;
  --soft: #526879;
  --success: #215c43;
  --error: #a52937;
  --shadow: 0 12px 35px rgba(7, 32, 64, .10);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { height: 100%; min-width: 320px; background: var(--bg); scroll-behavior: smooth; }
body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  color: var(--text);
  font: 400 1rem/1.5 "Source Sans Pro", sans-serif;
  background: var(--bg);
}
button, input, select, textarea { color: inherit; font: inherit; }
button, select { cursor: pointer; }
a { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible, .course-card:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

.site-header {
  flex: 0 0 auto;
  position: relative;
  z-index: 20;
  top: 0;
  display: flex;
  min-height: 76px;
  padding: 12px clamp(17px, 3vw, 42px);
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 4px solid var(--gold);
  background: var(--navy);
  color: white;
}
.brand { display: inline-flex; min-width: max-content; align-items: center; gap: 12px; text-decoration: none; }
.brand__marks { display: flex; width: 75px; height: 43px; align-items: center; justify-content: center; gap: 3px; }
.brand__marks img { display: block; width: 36px; height: 36px; object-fit: contain; }
.brand__marks img:first-child { width: 39px; height: 39px; }
.header-actions { display: flex; min-width: 0; align-items: center; gap: 12px; }
.home-link { color: white; font-size: .875rem; text-decoration: none; }
.home-link:hover { color: var(--gold); }
.auth-control { position: relative; min-width: 0; }
.auth-open, .button, .icon-button {
  display: inline-flex;
  min-height: 37px;
  padding: 8px 12px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--panel);
  color: var(--navy);
  font-size: .875rem;
  font-weight: 600;
  transition: border-color .18s, background .18s, transform .18s;
}
.auth-open { display: block; max-width: 100%; overflow: hidden; border-color: var(--gold); background: var(--gold); white-space: nowrap; text-overflow: ellipsis; }
.auth-open:hover, .button:hover, .icon-button:hover { transform: translateY(-1px); border-color: var(--navy); background: #ebe0cc; }
.auth-open:hover { border-color: #ebe0cc; }
.auth-open--signed { border-color: var(--gold); background: transparent; color: white; font-size: .8125rem; }
.auth-open--signed:hover { color: var(--navy); }
.button--primary { border-color: var(--navy); background: var(--navy); color: white; }
.button--primary:hover { border-color: var(--navy-deep); background: var(--navy-deep); }
.button--quiet { border-color: transparent; background: transparent; color: var(--muted); }
.button--danger { color: var(--error); }
button:disabled, select:disabled { cursor: not-allowed; opacity: .55; transform: none; }

.auth-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 35;
  width: min(330px, calc(100vw - 30px));
  padding: 17px;
  border: 1px solid var(--line-strong);
  border-top: 4px solid var(--gold);
  border-radius: 10px;
  background: var(--panel);
  color: var(--text);
  box-shadow: var(--shadow);
}
.auth-panel[hidden] { display: none; }
.auth-panel h2 { margin: 0 0 6px; font: 700 1rem/1.2 "Montserrat", sans-serif; }
.auth-panel p { margin: 0 0 13px; color: var(--muted); font-size: .875rem; line-height: 1.5; }
.auth-panel label, .dialog-label { display: block; margin: 11px 0 5px; color: var(--navy); font-size: .875rem; font-weight: 600; }
.auth-panel input, .prereq-freeform, .prereq-picker, .search-input {
  width: 100%;
  min-height: 39px;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--panel);
  color: var(--text);
}
input::placeholder { color: var(--soft); opacity: 1; }
.auth-panel__actions { display: flex; margin-top: 12px; align-items: center; gap: 8px; }
.auth-panel__error { min-height: 16px; margin: 9px 0 0 !important; color: var(--error) !important; }

main { display: flex; width: min(2400px, 100%); min-height: 0; margin: 0 auto; padding: 0 clamp(17px, 3vw, 42px); flex-direction: column; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: "Montserrat", sans-serif; }
h1 { margin-bottom: 12px; color: var(--navy); font-size: clamp(2.35rem, 5vw, 4.2rem); font-weight: 700; letter-spacing: -.055em; line-height: 1.04; }
.summary-grid { display: grid; margin: 16px 0 12px; flex: 0 0 auto; gap: 10px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.summary-card { min-height: 75px; padding: 14px 16px; border: 1px solid var(--line); border-top: 3px solid var(--gold); border-radius: 10px; background: var(--panel); }
.summary-card strong { display: block; margin-bottom: 4px; color: var(--navy); font: 700 1.4rem/1.1 "Montserrat", sans-serif; letter-spacing: -.04em; }
.summary-card span { color: var(--muted); font-size: .875rem; }

.planner { display: flex; min-height: 0; flex-direction: column; }
.planner-stage { position: sticky; top: 0; display: flex; height: 100vh; height: 100dvh; min-height: 0; flex: 0 0 auto; flex-direction: column; }
.planner-stage:not(.is-pinned) .course-dropzone { overflow-y: hidden; }
.planner-tools { display: flex; min-height: 57px; margin: 5px 0 10px; padding: 8px 11px; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.planner-tools__left, .planner-tools__right { display: flex; min-width: 0; align-items: center; gap: 8px; }
.search-wrap { position: relative; width: min(300px, 34vw); }
.search-input { min-height: 36px; padding-left: 33px; font-size: .875rem; }
.search-icon { position: absolute; top: 8px; left: 11px; color: var(--soft); font-size: 1rem; pointer-events: none; }
.scroll-hint { color: var(--soft); font-size: .75rem; white-space: nowrap; }
.icon-button { width: 35px; min-height: 35px; padding: 0; font-size: 1rem; }
.save-status { display: inline-flex; min-height: 30px; padding: 6px 9px; align-items: center; gap: 6px; border-radius: 999px; background: #edf2f6; color: var(--muted); font-size: .75rem; white-space: nowrap; }
.save-status:before { width: 6px; height: 6px; border-radius: 50%; background: var(--soft); content: ""; }
.save-status[data-state=saved] { background: #eaf3ee; color: var(--success); }
.save-status[data-state=saved]:before { background: var(--success); }
.save-status[data-state=saving] { background: #f2ebde; color: var(--gold-ink); }
.save-status[data-state=saving]:before { background: var(--gold-ink); }
.save-status[data-state=error] { background: #fbeef0; color: var(--error); }
.save-status[data-state=error]:before { background: var(--error); }

.planner-viewport { width: 100%; min-height: 0; flex: 1; overflow-x: auto; overflow-y: hidden; padding: 2px 1px 17px; scrollbar-color: var(--blue) #e2e9ef; scrollbar-width: thin; }
.semester-grid { display: grid; height: 100%; min-height: 0; min-width: 3702px; align-items: stretch; gap: 10px; grid-template-columns: repeat(16, minmax(222px, 1fr)); }
.semester-column { display: flex; min-height: 0; min-width: 0; padding: 11px; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #eaf0f5; box-shadow: 0 6px 18px rgba(7, 32, 64, .04); scroll-margin-left: 18px; }
.semester-column__head { min-height: 75px; margin: -12px -12px 0; padding: 14px 15px 12px; flex: 0 0 auto; border-bottom: 3px solid var(--gold); border-radius: 10px 10px 0 0; background: var(--navy); color: white; }
.semester-column__year { display: block; margin-bottom: 5px; color: var(--gold); font-size: .75rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
.semester-column__title-row { display: flex; align-items: baseline; justify-content: space-between; gap: 5px; }
.semester-column h2 { margin: 0; font-size: 1rem; letter-spacing: -.035em; }
.semester-column__credits { color: white; font-size: .75rem; white-space: nowrap; }
.semester-column__sub { display: flex; margin-top: 6px; justify-content: space-between; color: #c8d9e4; font-size: .75rem; }
.term-label { display: flex; margin: 11px 2px 7px; flex: 0 0 auto; align-items: center; gap: 6px; color: var(--muted); font-size: .75rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }
.term-label:after { height: 1px; flex: 1; background: var(--line); content: ""; }
.term-label--winter { color: var(--gold-ink); }
.term-label--winter:after { background: var(--gold); }
.course-dropzone { min-height: 0; padding: 2px; flex: 1; overflow-x: hidden; overflow-y: auto; overscroll-behavior-y: auto; scrollbar-gutter: stable; scrollbar-width: thin; scrollbar-color: var(--blue) transparent; border: 1px dashed transparent; border-radius: 8px; transition: background .16s, border-color .16s; }
.course-dropzone:empty:after { display: grid; min-height: 48px; padding: 10px; border: 1px dashed var(--line-strong); border-radius: 7px; color: var(--soft); font-size: .875rem; text-align: center; place-items: center; content: "Drop a course here"; }
.course-dropzone.is-over { border-color: var(--navy); background: #d9e5ec; }
.semester-column.is-drop-target { outline: 2px solid var(--gold); outline-offset: -2px; }
.course-drag-handle { width: 32px; min-height: 36px; margin-left: auto; padding: 2px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 1.5rem; line-height: 1; cursor: grab; touch-action: none; }
.course-drag-handle:active { cursor: grabbing; }
.drag-preview { position: fixed; z-index: 100; max-width: 220px; padding: 10px 14px; border: 2px solid var(--gold); border-radius: 8px; background: var(--navy); color: white; box-shadow: var(--shadow); font-size: .875rem; pointer-events: none; }

.course-card {
  --course-accent: var(--navy);
  position: relative;
  display: grid;
  margin: 0 0 6px;
  padding: 7px 8px 6px;
  grid-template-columns: minmax(0, 1fr) 32px;
  column-gap: 4px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--course-accent);
  border-radius: 8px;
  background: var(--panel);
  cursor: pointer;
  transition: border-color .18s, transform .18s, background .18s, box-shadow .18s;
}
.course-card.is-dragging { opacity: .45; }
.course-card--major { --course-accent: var(--navy); }
.course-card--general-education { --course-accent: var(--slate); }
.course-card--support { --course-accent: #446b84; }
.course-card--sea-term { --course-accent: var(--gold-ink); border-left-color: var(--gold); background: #fdfbf7; }
.course-card--stcw { --course-accent: #46566a; }
.course-card--other { --course-accent: #446b84; }
.course-card[data-status=in-progress] { border-color: var(--blue); border-left-color: var(--blue); background: #e7eff5; }
.course-card[data-status=complete] { border-color: var(--gold); border-left-color: var(--gold); background: #f2ebde; }
.course-card__top { display: flex; margin-bottom: 3px; grid-column: 1 / -1; align-items: center; justify-content: space-between; gap: 6px; }
.course-code { color: var(--course-accent); font-size: .75rem; font-weight: 700; letter-spacing: .04em; }
.course-credit { color: var(--soft); font-size: .75rem; white-space: nowrap; }
.course-card h3 { margin: 0 0 4px; grid-column: 1 / -1; font-size: .875rem; font-weight: 600; letter-spacing: -.025em; line-height: 1.3; }
.course-tags { display: flex; min-width: 0; grid-column: 1; align-self: center; flex-wrap: wrap; gap: 3px; }
.course-tag { display: inline-flex; min-height: 18px; max-width: 100%; padding: 2px 6px; align-items: center; border: 1px solid #d9e5ec; border-radius: 999px; background: #f1f5f8; color: var(--muted); font-size: .75rem; line-height: 1.1; overflow-wrap: anywhere; }
.course-tag--grade { border-color: var(--gold); background: #f2ebde; color: var(--gold-ink); }
.course-tag--vessel { max-width: 100%; overflow-wrap: anywhere; }
.prereq-edit { min-height: 32px; padding: 4px 8px; border: 1px solid var(--gold); border-radius: 6px; background: #f2ebde; color: var(--navy); font-size: .875rem; white-space: nowrap; }
.prereq-edit:hover { border-color: var(--navy); background: #ebe0cc; }

.course-card__footer { display: flex; min-height: 36px; grid-column: 2; align-items: center; justify-content: space-between; gap: 8px; }
.course-card--sea-term .course-tags, .course-card--sea-term .course-card__footer { grid-column: 1 / -1; }
.course-card--sea-term .course-card__footer { margin-top: 4px; }
.itinerary-open { display: block; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 0; background: transparent; }
.itinerary-open img { display: block; width: 36px; height: 36px; object-fit: contain; }
.course-itinerary { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--gold); cursor: default; }
.course-itinerary > summary { min-height: 36px; padding: 7px 0; font: 700 .875rem/1.4 "Montserrat", sans-serif; cursor: pointer; }
.course-itinerary > summary:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.itinerary-help, .itinerary-empty, .itinerary-location, .itinerary-status { margin: 7px 0; color: var(--muted); font-size: .8125rem; line-height: 1.4; }
.itinerary-stops { display: grid; margin: 10px 0; padding: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; list-style: none; }
.itinerary-stop { min-width: 0; padding: 9px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--bg); }
.itinerary-stop__head { display: grid; margin-bottom: 8px; gap: 6px; }
.itinerary-stop__head strong { font-size: .875rem; }
.itinerary-stop__tools { display: flex; flex-wrap: wrap; gap: 4px; }
.itinerary-stop__tools button { min-height: 30px; padding: 3px 5px; border: 1px solid var(--line-strong); border-radius: 5px; background: var(--panel); font-size: .75rem; }
.itinerary-stop__tools button:hover { border-color: var(--navy); }
.itinerary-field { display: grid; min-width: 0; gap: 4px; color: var(--navy); font-size: .875rem; font-weight: 600; }
.itinerary-field input, .itinerary-field textarea { display: block; min-width: 0; width: 100%; max-width: 100%; min-height: 37px; padding: 6px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--panel); font-size: .875rem; font-weight: 400; }
.itinerary-field textarea { resize: vertical; }
.itinerary-port-notes { margin-top: 10px; }
.itinerary-find { width: 100%; min-height: 34px; margin-top: 6px; padding: 5px 7px; border: 1px solid var(--gold); border-radius: 6px; background: #f2ebde; color: var(--navy); font-size: .875rem; }
.itinerary-results { display: grid; max-height: 180px; margin-top: 5px; gap: 4px; overflow-y: auto; }
.itinerary-results:empty { display: none; }
.itinerary-results button { min-height: 36px; padding: 6px; border: 1px solid var(--line-strong); border-radius: 5px; background: var(--panel); font-size: .875rem; text-align: left; overflow-wrap: anywhere; }
.itinerary-results button:hover { border-color: var(--navy); background: #e7eff5; }
.itinerary-location { overflow-wrap: anywhere; }
.itinerary-dates, .itinerary-coordinate-fields { display: grid; margin-top: 8px; gap: 8px; }
.itinerary-coordinates { margin-top: 10px; color: var(--muted); font-size: .8125rem; }
.itinerary-coordinates summary { cursor: pointer; }
.itinerary-editor-actions { display: flex; flex-wrap: wrap; gap: 5px; }
.itinerary-editor-actions button { white-space: normal; }
.itinerary-status { min-height: 18px; margin-bottom: 0; }
.itinerary-status.is-error { color: var(--error); }
.itinerary-dialog { width: min(900px, calc(100vw - 24px)); max-height: 90vh; max-height: 90dvh; }
.itinerary-dialog .dialog-head h2 { overflow-wrap: anywhere; }
.itinerary-map-status { margin: 12px 0; color: var(--muted); font-size: .875rem; }
.itinerary-map { width: 100%; height: clamp(260px, 44vh, 440px); border: 1px solid var(--line-strong); border-radius: 9px; background: #d9e5ec; }
.itinerary-pin { border: 0; background: transparent; }
.itinerary-pin span { display: grid; width: 30px; height: 30px; border: 2px solid var(--navy); border-radius: 50%; background: var(--gold); color: var(--navy); box-shadow: 0 2px 7px #07204055; font: 700 .875rem/1 "Montserrat", sans-serif; place-items: center; }
.itinerary-map-stops { display: grid; margin: 14px 0 0; padding: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; list-style: none; }
.itinerary-map-stop { display: flex; width: 100%; min-height: 65px; padding: 9px; align-items: flex-start; gap: 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); text-align: left; }
.itinerary-map-stop:hover { border-color: var(--navy); }
.itinerary-map-stop:disabled { opacity: 1; }
.itinerary-map-number { display: grid; width: 27px; height: 27px; flex: 0 0 auto; border-radius: 50%; background: var(--navy); color: var(--gold); font-size: .875rem; font-weight: 700; place-items: center; }
.itinerary-map-stop strong { display: block; font-size: .875rem; overflow-wrap: anywhere; }
.itinerary-map-stop span span, .itinerary-map-stop small { display: block; margin-top: 3px; color: var(--muted); font-size: .8125rem; }
.itinerary-attribution { margin: 14px 0 0; color: var(--soft); font-size: .75rem; }
.itinerary-attribution a { text-underline-offset: 2px; }

.site-footer { display: flex; min-height: 0; margin-top: 2px; padding: 8px 0; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid var(--line); color: var(--soft); font-size: .875rem; }
.site-footer a { color: var(--navy); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; text-decoration-color: var(--gold-ink); }

dialog { width: min(490px, calc(100vw - 30px)); max-height: min(84vh, 700px); padding: 0; overflow-y: auto; border: 1px solid var(--line-strong); border-top: 4px solid var(--gold); border-radius: 12px; background: var(--panel); color: var(--text); box-shadow: 0 30px 100px rgba(1, 20, 62, .3); }
dialog::backdrop { background: rgba(1, 20, 62, .65); backdrop-filter: blur(4px); }
.dialog-shell { padding: 20px; }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.dialog-head h2 { margin: 0 0 5px; font-size: 1.06rem; letter-spacing: -.03em; }
.dialog-head p { margin: 0; color: var(--muted); font-size: .875rem; line-height: 1.5; }
.dialog-close { display: grid; width: 31px; height: 31px; padding: 0; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 7px; background: #edf2f6; color: var(--navy); font-size: 1rem; place-items: center; }
.prereq-add-row { display: flex; margin-top: 7px; gap: 7px; }
.prereq-picker { min-width: 0; flex: 1; font-size: .875rem; }
.prereq-freeform { font-size: .875rem; }
.prereq-list { display: flex; min-height: 58px; max-height: 205px; margin: 9px 0 0; padding: 8px; flex-wrap: wrap; align-content: flex-start; gap: 6px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; background: #f4f6f8; }
.prereq-list:empty:after { align-self: center; color: var(--soft); font-size: .875rem; content: "No prerequisites selected yet"; }
.prereq-chip { display: inline-flex; min-height: 26px; padding: 4px 7px; align-items: center; gap: 6px; border: 1px solid var(--gold); border-radius: 999px; background: #f2ebde; color: var(--navy); font-size: .875rem; }
.prereq-chip button { display: grid; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 50%; background: var(--navy); color: white; font-size: .875rem; place-items: center; }
.dialog-foot { display: flex; margin-top: 17px; align-items: center; justify-content: flex-end; gap: 7px; }
.course-unsaved-actions { flex-wrap: wrap; }
.dialog-help { margin: 10px 0 0; color: var(--soft); font-size: .75rem; line-height: 1.45; }
.move-warning-description { margin: 12px 0; color: var(--muted); font-size: .875rem; line-height: 1.5; }
.move-warning-list { display: grid; max-height: min(40vh, 300px); margin: 0; padding: 0; gap: 8px; overflow-y: auto; list-style: none; }
.move-warning-list li { padding: 11px; border: 1px solid var(--gold); border-radius: 8px; background: #f2ebde; font-size: .875rem; }
.move-warning-list strong { display: block; color: var(--navy); }
.move-warning-list p { margin: 4px 0 0; color: var(--muted); line-height: 1.45; }
.course-editor { width: min(660px, calc(100vw - 30px)); max-height: min(90vh, 920px); }
.course-editor-grid { display: grid; margin-top: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.course-editor-field { display: grid; min-width: 0; gap: 4px; color: var(--navy); font-size: .875rem; font-weight: 600; }
.course-editor-field input, .course-editor-field select, .course-editor-field textarea { width: 100%; min-width: 0; min-height: 38px; padding: 7px 9px; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--panel); font-weight: 400; }
.course-editor-field textarea { resize: vertical; }
.course-editor-wide { grid-column: 1 / -1; }
.course-vessel-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.course-itinerary-vessel { margin: 12px 0 16px; }
.course-vessel-link { grid-column: 1 / -1; font-size: .875rem; text-decoration-color: var(--gold); text-underline-offset: 3px; }
.course-modal-section { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.course-modal-section h3 { margin: 0 0 7px; font-size: .875rem; }
.course-modal-section p { margin: 0 0 9px; color: var(--muted); font-size: .875rem; }
.course-catalog-link { margin: 14px 0; font-size: .875rem; }
.course-catalog-link a { text-decoration-color: var(--gold); text-underline-offset: 3px; }
.course-taken-at { margin-top: 18px; }

@media (max-width: 780px) {
  .site-header { min-height: 68px; padding: 10px 15px; }
  .brand__marks { width: 64px; }
  .brand__marks img { width: 30px; height: 30px; }
  .brand__marks img:first-child { width: 34px; height: 34px; }
  .header-actions { min-width: 0; }
  .home-link { display: none; }
  main { padding: 0 15px; }
  h1 { font-size: clamp(2.4rem, 11vw, 3.8rem); }
  .summary-grid { gap: 7px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary-card { min-height: 67px; padding: 11px 12px; }
  .planner-tools { align-items: flex-start; flex-direction: column; }
  .planner-tools__left, .planner-tools__right { width: 100%; justify-content: space-between; }
  .search-wrap { width: auto; flex: 1; }
  .scroll-hint { display: none; }
  .semester-grid { min-width: 3622px; grid-template-columns: repeat(16, 217px); }
  .site-footer { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 420px) {
  .itinerary-stops { grid-template-columns: minmax(0, 1fr); }
  .itinerary-map-stops { grid-template-columns: minmax(0, 1fr); }
  .itinerary-dialog .dialog-shell { padding: 14px; }
  .itinerary-dialog .dialog-foot { flex-wrap: wrap; }
  .course-editor-grid { grid-template-columns: minmax(0, 1fr); }
  .course-vessel-fields { grid-template-columns: minmax(0, 1fr); }
  .brand { min-width: 0; gap: 8px; }
  .brand__marks { width: 39px; flex: 0 0 39px; }
  .brand__marks img:last-child { display: none; }
  .site-header { gap: 10px; }
  .auth-open { padding: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *:before, *:after { transition-duration: .01ms !important; }
}
@media (max-height: 540px) {
  .summary-grid { margin: 8px 0; }
  .summary-card { min-height: 0; padding: 8px 10px; }
  .site-footer { padding: 4px 0; font-size: .75rem; }
}
