:root {
  color-scheme: dark;
  --ink: #f4fbff;
  --muted: #a4c1d1;
  --deep: #061522;
  --panel: rgba(8, 31, 48, 0.92);
  --panel-soft: rgba(12, 50, 72, 0.82);
  --cyan: #8df4f4;
  --blue: #2d9fe8;
  --coral: #ff7d45;
  --line: rgba(141, 244, 244, 0.18);
}

* { box-sizing: border-box; }

body {
  position: relative;
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: radial-gradient(circle at 84% -8%, rgba(38, 156, 226, 0.3) 0, transparent 30%), radial-gradient(circle at 4% 100%, rgba(244, 123, 36, 0.18) 0, transparent 28%), linear-gradient(135deg, #04111d 0%, #08263b 55%, #101d2d 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body::before, body::after { position: fixed; z-index: 0; top: 0; bottom: 0; width: clamp(38px, 5vw, 78px); content: ""; pointer-events: none; background: url("gothic-edge.svg") center top / 100% auto repeat-y; opacity: .48; filter: drop-shadow(0 0 10px rgba(0, 0, 0, .42)); }
body::before { left: 0; }
body::after { right: 0; transform: scaleX(-1); }

body.key-route-modal-open { overflow: hidden; }

button, input, select { font: inherit; }
button { cursor: pointer; }

.ocean-glow { position: fixed; border-radius: 50%; filter: blur(80px); opacity: .22; pointer-events: none; }
.ocean-glow-one { width: 340px; height: 340px; right: -80px; top: 80px; background: #36b9e7; }
.ocean-glow-two { width: 240px; height: 240px; left: -100px; bottom: 50px; background: #ff9a35; }

.shell { position: relative; z-index: 1; width: min(1440px, calc(100% - 48px)); margin: 0 auto; padding: 28px 0 26px; }
.masthead { display: flex; align-items: center; gap: 22px; margin-bottom: 24px; }
.brand-mark { display: block; width: 180px; height: 82px; overflow: hidden; padding: 4px 7px; border: 0; border-radius: 0; background: transparent; box-shadow: none; transform: none; }
.brand-mark img { width: 100%; height: 100%; display: block; object-fit: contain; object-position: center; }
.brand-copy { flex: 1; }
.connection-area { display: grid; gap: 5px; min-width: 250px; max-width: 330px; }
.connection-area .field-label { margin: 0; }
.connection-input { min-height: 38px; }
.connection-help { color: #76949e; font-size: 10px; line-height: 1.25; }
.eyebrow { display: block; color: var(--cyan); font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
h1, h2, h3, p { margin: 0; }
h1 { margin-top: 3px; font-size: clamp(28px, 4vw, 46px); line-height: 1; letter-spacing: -.055em; }
.brand-copy p { margin-top: 8px; color: #b8d3df; font-size: 14px; }

.button { border: 0; border-radius: 0; padding: 11px 16px; color: var(--ink); font-weight: 800; transition: transform .2s ease, filter .2s ease, background .2s ease; }
.button:hover { transform: translateY(-1px); filter: brightness(1.08); }
.button:disabled { cursor: not-allowed; opacity: .4; transform: none; }
.button-primary { color: #ffffff; background: linear-gradient(135deg, #f47b24, #ffb04e); box-shadow: 0 8px 18px rgba(244, 123, 36, 0.22); }
.button-outline { border: 1px solid rgba(141, 244, 244, .38); color: var(--ink); background: rgba(8, 43, 64, .78); }
.button-quiet { color: var(--blue); background: transparent; }
.button-wide { width: 100%; margin-top: 18px; }
.button-row { display: flex; gap: 8px; align-items: center; margin-top: 12px; }

.hero-card { display: block; min-height: 190px; padding: 30px 36px; overflow: hidden; color: #ffffff; border: 1px solid rgba(141, 244, 244, .2); border-radius: 0; background: linear-gradient(110deg, #061b2b 0%, #0a3d5b 62%, #09284a 100%); box-shadow: 0 25px 70px rgba(0, 0, 0, .3); }
.hero-card h2 { margin-top: 8px; max-width: 620px; font-size: clamp(30px, 5vw, 66px); line-height: .98; letter-spacing: -.075em; }
.hero-card p { max-width: 650px; margin-top: 14px; color: #c0dde3; font-size: 15px; line-height: 1.55; }

.workspace-grid { display: grid; grid-template-columns: 330px 1fr; gap: 18px; margin-top: 18px; }
.panel { border: 1px solid var(--line); border-radius: 0; background: var(--panel); box-shadow: 0 22px 60px rgba(0, 0, 0, .28); backdrop-filter: blur(16px); }
.control-panel { padding: 22px; }
.results-panel { min-width: 0; padding: 22px; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.panel-heading h3 { margin-top: 5px; font-size: 22px; letter-spacing: -.045em; }
.panel-heading.compact { margin-top: 20px; margin-bottom: 16px; }
.status-dot { width: 10px; height: 10px; margin-top: 6px; border-radius: 50%; background: #9bb0c2; box-shadow: 0 0 0 5px rgba(85,113,141,.12); }
.status-dot.connected { background: #2ab978; box-shadow: 0 0 0 5px rgba(42,185,120,.15); }

.field-label { display: block; margin: 14px 0 7px; color: #c1dbe5; font-size: 12px; font-weight: 800; }
.text-input, .file-input { width: 100%; min-height: 42px; border: 1px solid var(--line); border-radius: 0; outline: 0; color: var(--ink); background: rgba(3, 20, 33, .78); padding: 10px 11px; }
.text-input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(93,230,237,.12); }
.file-input { padding: 8px; color: var(--muted); font-size: 12px; }
.field-help { margin-top: 7px; color: #76949e; font-size: 11px; line-height: 1.45; }
.connection-gate { margin: 0 0 7px; color: var(--coral); }
.connection-gate.ready { color: #6ff4bd; }
.premium-note { margin: 0 0 12px; padding: 9px 10px; border-left: 3px solid var(--cyan); color: #b8d3df; background: rgba(141, 244, 244, .06); font-size: 10px; line-height: 1.45; }
.premium-note strong { color: var(--cyan); }
.spotify-playlist-picker { display: grid; gap: 9px; margin-top: 12px; }
.playlist-picker-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.playlist-picker-heading > span { display: grid; gap: 3px; }
.playlist-picker-heading strong { color: #c1dbe5; font-size: 12px; }
.playlist-picker-heading small { color: #76949e; font-size: 10px; line-height: 1.3; }
.text-button { padding: 0; border: 0; color: var(--cyan); background: transparent; font-size: 11px; font-weight: 800; }
.text-button:hover { color: #ffffff; text-decoration: underline; }
.playlist-options { display: grid; gap: 7px; max-height: 280px; overflow: auto; padding-right: 3px; }
.playlist-option { display: grid; grid-template-columns: 42px 1fr; gap: 9px; align-items: center; width: 100%; padding: 7px; border: 1px solid rgba(141, 244, 244, .14); border-radius: 0; color: var(--ink); background: rgba(3, 20, 33, .52); text-align: left; transition: border-color .2s ease, background .2s ease, transform .2s ease; }
.playlist-option:hover, .playlist-option.selected { border-color: var(--cyan); background: rgba(12, 58, 79, .72); transform: translateX(2px); }
.playlist-option:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.playlist-option img { width: 42px; height: 42px; object-fit: cover; border: 1px solid rgba(141, 244, 244, .2); }
.playlist-option > span { display: grid; gap: 3px; min-width: 0; }
.playlist-option strong { overflow: hidden; color: #f4fbff; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.playlist-option small { overflow: hidden; color: #91b5c4; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.playlist-empty { padding: 12px; border: 1px solid rgba(141, 244, 244, .12); color: #76949e; font-size: 11px; line-height: 1.4; }
.manual-link-toggle { width: 100%; margin-top: 11px; padding: 9px 0; border: 0; border-top: 1px solid var(--line); color: #91b5c4; background: transparent; font-size: 11px; font-weight: 800; text-align: left; }
.manual-link-toggle:hover:not(:disabled) { color: var(--cyan); }
.manual-link-toggle:disabled { cursor: not-allowed; opacity: .45; }
.manual-playlist-entry { margin-top: 2px; }
.demo-button { display: block; margin-top: 5px; padding-left: 0; }
.tribute-playlist-link { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 5px; padding: 10px; border: 1px solid rgba(255, 125, 69, .35); color: var(--ink); background: rgba(73, 44, 35, .35); text-decoration: none; }
.tribute-playlist-link:hover { border-color: var(--coral); background: rgba(92, 48, 34, .6); }
.tribute-playlist-link span:first-child { display: grid; gap: 3px; min-width: 0; }
.tribute-playlist-link strong { color: #ffd0b8; font-size: 11px; }
.tribute-playlist-link small { color: #b89a8d; font-size: 10px; line-height: 1.35; }
.tribute-playlist-link > span:last-child { color: var(--coral); font-size: 18px; font-weight: 800; }
.sample-link { color: var(--cyan); font-weight: 800; text-decoration: none; }
.sample-link:hover { text-decoration: underline; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.tide-picker { display: grid; gap: 8px; margin-top: 7px; }
.tide-option { display: grid; grid-template-columns: 76px minmax(0, 1fr) 30px; gap: 10px; align-items: center; width: 100%; padding: 9px 10px; border: 1px solid rgba(141, 244, 244, .16); border-radius: 0; color: var(--ink); background: rgba(3, 20, 33, .52); text-align: left; transition: border-color .2s ease, background .2s ease, transform .2s ease; cursor: pointer; }
.tide-option:hover { border-color: rgba(141, 244, 244, .5); background: rgba(12, 58, 79, .72); transform: translateX(2px); }
.tide-option:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.tide-option.active { border-color: var(--cyan); background: linear-gradient(100deg, rgba(31, 106, 123, .72), rgba(11, 44, 64, .82)); box-shadow: inset 3px 0 0 var(--cyan); }
.tide-option > span { display: grid; gap: 3px; min-width: 0; }
.tide-option strong { color: #f4fbff; font-size: 12px; }
.tide-option small { color: #91b5c4; font-size: 10px; line-height: 1.3; }
.tide-graph { width: 76px; height: 38px; overflow: visible; }
.tide-axis { fill: none; stroke: rgba(141, 244, 244, .2); stroke-width: 1; }
.tide-line { fill: none; stroke: var(--cyan); stroke-linecap: round; stroke-width: 3; }
.tide-option[data-mode="warm"] .tide-line { stroke: #5dc9ed; }
.tide-option[data-mode="rise"] .tide-line { stroke: var(--coral); }
.tide-option[data-mode="rolling"] .tide-line { stroke: #ffb04e; }
.tide-option[data-mode="circle"] .tide-line { stroke: #a98dff; }
.tide-option[data-mode="route"] .tide-line { stroke: var(--coral); }
.tide-option[data-mode="circle"] .tide-dot { fill: #a98dff; stroke: none; }
.tide-option[data-mode="route"] .tide-dot { fill: var(--coral); stroke: none; }
.tide-option[data-mode="route"] .tide-graph-crash .tide-line { stroke: var(--coral); }
.tide-option[data-mode="route"] .tide-graph-crash .tide-foam { stroke: var(--cyan); stroke-width: 1.5; fill: none; opacity: .8; }
.tide-grid-launch { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 1px solid rgba(141, 244, 244, .28); border-radius: 0; color: var(--cyan); background: rgba(3, 20, 33, .72); font-size: 16px; line-height: 1; }
.tide-grid-launch:hover, .tide-grid-launch:focus-visible { border-color: var(--coral); color: #ffffff; background: rgba(255, 125, 69, .35); outline: 0; box-shadow: 0 0 0 2px rgba(255, 125, 69, .18); }
.key-route-panel { margin-top: 12px; padding: 12px; border: 1px solid rgba(255, 125, 69, .38); background: rgba(44, 30, 31, .48); overflow: hidden; }
.key-route-inline { margin-top: 18px; padding: 18px; }
.key-route-inline .camelot-grid { margin-top: 16px; }
.key-route-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.key-route-heading > div { display: grid; gap: 3px; }
.key-route-heading strong { color: #f4fbff; font-size: 12px; }
.camelot-grid { display: grid; grid-template-columns: 26px repeat(12, minmax(0, 1fr)); gap: 3px; width: 100%; margin-top: 10px; }
.camelot-grid-vertical { grid-template-columns: minmax(0, 1fr); gap: 8px; }
.route-slot-row { display: grid; grid-template-columns: 68px minmax(0, 1fr); gap: 8px; align-items: start; padding: 7px; border: 1px solid rgba(141, 244, 244, .12); background: rgba(3, 20, 33, .32); }
.route-slot-content { min-width: 0; }
.route-slot-label { display: flex; align-items: center; min-height: 28px; color: #ffd0b8; font-size: 10px; }
.route-slot-label.next-slot-label { color: var(--cyan); text-shadow: 0 0 12px rgba(141, 244, 244, .72); }
.route-key-options { display: grid; grid-template-columns: repeat(6, minmax(34px, 1fr)); gap: 3px; }
.route-track-selection { margin-top: 6px; }
.route-track-select { width: min(100%, 360px); padding: 5px 6px; border: 1px solid rgba(141, 244, 244, .18); border-radius: 0; color: #a4c1d1; background: rgba(3, 20, 33, .9); font-size: 10px; }
.route-track-select:focus { border-color: var(--cyan); outline: 0; }
.route-track-empty { color: #76949e; font-size: 10px; }
.camelot-inventory { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 10px; padding-top: 9px; border-top: 1px solid rgba(141, 244, 244, .12); color: #91b5c4; font-size: 9px; }
.camelot-inventory-label { flex-basis: 100%; color: #76949e; font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.camelot-inventory-item { display: inline-flex; gap: 4px; padding: 3px 5px; border: 1px solid rgba(141, 244, 244, .16); background: rgba(8, 48, 69, .48); }
.camelot-inventory-item b { color: var(--cyan); }
.camelot-corner, .camelot-number, .track-slot-label { display: grid; place-items: center; color: #76949e; font-size: 9px; font-weight: 900; }
.camelot-row-label { display: grid; place-items: center; gap: 2px; color: #607e8a; font-size: 10px; font-weight: 900; opacity: .58; transition: color .2s ease, opacity .2s ease, text-shadow .2s ease; }
.camelot-row-label strong { font-size: 10px; }
.camelot-row-label small { color: #76949e; font-size: 8px; font-weight: 700; }
.camelot-row-label.unavailable { opacity: .38; }
.camelot-row-label.has-available { color: var(--cyan); opacity: .82; text-shadow: 0 0 10px rgba(141, 244, 244, .28); }
.camelot-row-label.available-low { opacity: .64; }
.camelot-row-label.available-medium { opacity: .82; }
.camelot-row-label.available-high { opacity: 1; text-shadow: 0 0 14px rgba(141, 244, 244, .5); }
.track-slot-label { color: #ffd0b8; font-size: 10px; }
.track-slot-label.next-slot-label { color: var(--cyan); text-shadow: 0 0 12px rgba(141, 244, 244, .72); }
.camelot-cell { position: relative; display: grid; place-items: center; min-width: 0; min-height: 28px; padding: 3px 1px; border: 1px solid rgba(141, 244, 244, .12); border-radius: 0; color: #76949e; background: rgba(3, 20, 33, .76); font-size: 8px; font-weight: 900; cursor: pointer; opacity: .5; transition: color .2s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease, opacity .2s ease, transform .2s ease; }
.camelot-cell:hover, .camelot-cell:focus-visible { border-color: var(--cyan); color: #ffffff; outline: 0; }
.camelot-cell.camelot-b { border-color: rgba(255, 125, 69, .22); color: #d6a28d; }
.camelot-cell.has-available { color: #a8c7d0; opacity: .74; border-color: rgba(141, 244, 244, .24); }
.camelot-cell.available-low { opacity: .66; box-shadow: inset 0 0 8px rgba(141, 244, 244, .04); }
.camelot-cell.available-medium { opacity: .84; box-shadow: inset 0 0 10px rgba(141, 244, 244, .08); }
.camelot-cell.available-high { opacity: 1; border-color: rgba(141, 244, 244, .44); background: linear-gradient(145deg, rgba(19, 86, 102, .54), rgba(3, 35, 50, .88)); box-shadow: inset 0 0 16px rgba(141, 244, 244, .14), 0 0 8px rgba(141, 244, 244, .08); }
.camelot-cell.next-slot { transform: translateY(-1px); border-color: var(--cyan); box-shadow: 0 0 0 1px rgba(141, 244, 244, .3), 0 0 16px rgba(141, 244, 244, .24); }
.camelot-cell.selected { border-color: var(--coral); color: #fff4eb; background: linear-gradient(145deg, rgba(255, 125, 69, .66), rgba(118, 52, 36, .82)); box-shadow: 0 0 0 1px rgba(255, 125, 69, .28); }
.camelot-cell.selected b { position: absolute; top: 2px; right: 3px; color: #fff; font-size: 7px; }
.key-route-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; min-height: 24px; margin-top: 10px; color: #91b5c4; font-size: 9px; line-height: 1.4; }
.key-route-empty-art { display: grid; grid-template-columns: minmax(0, 1fr) minmax(150px, 220px); gap: 10px; align-items: center; margin-top: 12px; padding: 6px 8px 8px; border: 1px solid rgba(141, 244, 244, .14); background: linear-gradient(145deg, rgba(4, 24, 38, .72), rgba(33, 36, 41, .48)); }
.key-route-empty-art svg { display: block; width: 100%; height: 68px; }
.crash-wave-shadow { fill: #02070d; opacity: .72; transform: translateY(8px); }
.crash-wave-body { fill: url(#crashWaveFill); }
.crash-wave-crest { fill: rgba(130, 228, 235, .56); stroke: rgba(221, 250, 245, .7); stroke-width: 1.5; }
.crash-wave-foam { fill: none; stroke: #e5fffb; stroke-linecap: round; stroke-width: 4; opacity: .72; }
.crash-wave-line { fill: none; stroke: #9af4f0; stroke-linecap: round; stroke-width: 2; opacity: .74; }
.key-route-empty-art > div { display: grid; gap: 4px; }
.key-route-empty-art strong { color: #f4fbff; font-size: 12px; }
.key-route-empty-art small { color: #abc7d2; font-size: 10px; line-height: 1.35; }
.route-summary-label { width: 100%; color: #ffd0b8; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; }
.route-chip { display: inline-flex; align-items: center; gap: 3px; padding: 3px 5px; border: 1px solid rgba(255, 125, 69, .42); border-radius: 0; color: #ffe1d1; background: rgba(73, 44, 35, .62); font-size: 9px; font-weight: 900; cursor: pointer; }
.route-chip b { color: var(--coral); }
.route-summary-more { color: #76949e; font-size: 9px; }
.key-route-modal[hidden] { display: none; }
.key-route-modal { position: fixed; z-index: 50; inset: 0; display: grid; place-items: center; padding: 24px; background: rgba(1, 8, 15, .82); backdrop-filter: blur(8px); }
.key-route-dialog { width: min(900px, 100%); max-height: min(850px, calc(100vh - 48px)); padding: 28px; border: 1px solid rgba(255, 125, 69, .52); background: linear-gradient(145deg, #0b2c42, #071a2a 72%); box-shadow: 0 28px 90px rgba(0, 0, 0, .6); overflow: auto; }
.key-route-dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.key-route-dialog-heading > div { max-width: 680px; }
.key-route-dialog-heading h3 { margin-top: 6px; color: #f4fbff; font-size: clamp(26px, 4vw, 42px); letter-spacing: -.055em; }
.key-route-dialog-heading p { margin-top: 10px; color: #abc7d2; font-size: 13px; line-height: 1.5; }
.key-route-guide { display: inline-flex; align-items: center; gap: 7px; color: #d6faff !important; font-size: 11px !important; }
.key-route-guide-swatch { display: inline-block; width: 18px; height: 12px; border: 1px solid var(--cyan); background: rgba(19, 86, 102, .7); box-shadow: 0 0 10px rgba(141, 244, 244, .42); }
.key-route-dialog .camelot-grid { margin-top: 26px; }
.key-route-dialog .camelot-grid { min-width: 650px; }
.key-route-dialog .camelot-cell { min-height: 58px; font-size: 12px; }
.key-route-dialog .camelot-cell small { font-size: 9px; }
.key-route-dialog-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 22px; }
.camelot-cell small { display: block; margin-top: 2px; color: #76949e; font-size: 7px; font-weight: 700; line-height: 1; }
.camelot-cell.camelot-b small { color: #bd8c79; }
.camelot-cell.selected small { color: #ffd0b8; }
.camelot-cell.unavailable { cursor: not-allowed; opacity: .38; }
.camelot-cell:disabled { cursor: not-allowed; }
.check-row { display: flex; gap: 8px; align-items: flex-start; margin-top: 14px; color: #c1dbe5; font-size: 12px; }
.check-row > span { display: grid; gap: 3px; }
.check-row strong { color: #c1dbe5; font-size: 12px; }
.check-row small { color: #76949e; font-size: 11px; line-height: 1.35; }
.tide-help { min-height: 31px; margin-top: 8px; }
input[type="checkbox"] { accent-color: var(--cyan); }
.rule { height: 1px; margin: 22px 0; background: var(--line); }

.results-heading { align-items: center; margin-bottom: 16px; }
.result-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.playback-status { align-self: center; max-width: 220px; color: #91b5c4; font-size: 10px; line-height: 1.3; text-align: right; }
.playback-status.error { color: #ffc09b; }
.notice { min-height: 42px; display: flex; align-items: center; padding: 10px 13px; border: 1px solid rgba(45, 159, 232, .32); border-radius: 0; color: #c9ecf5; background: rgba(7, 55, 79, .7); font-size: 12px; }
.notice.error { border-color: rgba(244, 123, 36, .55); color: #ffc09b; background: rgba(92, 40, 25, .42); }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0; }
.metric { padding: 12px 13px; border: 1px solid var(--line); border-radius: 0; background: var(--panel-soft); }
.metric span { display: block; color: var(--muted); font-size: 11px; }
.metric strong { display: block; margin-top: 5px; color: var(--ink); font-size: 18px; }
.track-table-wrap { overflow: auto; max-height: 590px; border: 1px solid var(--line); border-radius: 0; }
.track-table { width: 100%; border-collapse: collapse; min-width: 1120px; }
.track-table th { position: sticky; top: 0; z-index: 1; padding: 12px 14px; color: #ffffff; background: #09224d; font-size: 11px; letter-spacing: .08em; text-align: left; text-transform: uppercase; }
.track-table td { padding: 12px 14px; border-top: 1px solid rgba(141, 244, 244, .1); color: #c5dce5; font-size: 13px; }
.track-table td:first-child { width: 42px; color: #6f8ba5; }
.track-table td:nth-child(4) { color: var(--blue); font-weight: 800; }
.track-table td:nth-child(5) { color: var(--coral); font-weight: 800; }
.track-table tr:hover td { background: rgba(36, 120, 209, .08); }
.track-table tr[draggable="true"] { cursor: grab; }
.track-table tr.is-dragging { opacity: .45; }
.track-table tr.drag-over td { border-top: 2px solid var(--cyan); background: rgba(141, 244, 244, .1); }
.track-name-cell { min-width: 260px; }
.track-name-line { display: flex; align-items: center; gap: 8px; }
.track-name-line strong { color: #f4fbff; }
.drag-handle { width: 24px; padding: 2px 0; border: 1px solid rgba(141, 244, 244, .18); color: var(--cyan); background: rgba(3, 20, 33, .72); cursor: grab; font-size: 13px; line-height: 1; }
.drag-handle:focus-visible { border-color: var(--coral); outline: 2px solid var(--cyan); outline-offset: 2px; }
.alternate-track { display: grid; gap: 4px; margin-top: 7px; }
.alternate-track span { color: #76949e; font-size: 9px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.alternate-track-note { color: #76949e; font-size: 9px; }
.alternate-track-select { max-width: 240px; padding: 4px 5px; border: 1px solid rgba(141, 244, 244, .18); border-radius: 0; color: #a4c1d1; background: rgba(3, 20, 33, .9); font-size: 10px; }
.alternate-track-select:focus { border-color: var(--cyan); outline: 0; }
.metadata-cell { white-space: nowrap; }
.metadata-value { display: block; }
.metadata-source { display: block; margin-top: 3px; color: #76949e; font-size: 9px; font-weight: 600; letter-spacing: .02em; }
.metadata-source.missing { color: #ffb39a; }
.bpm-editor { display: grid; gap: 3px; min-width: 116px; }
.bpm-stepper { display: inline-flex; align-items: center; }
.bpm-stepper-button { width: 22px; height: 25px; padding: 0; border: 1px solid rgba(141, 244, 244, .2); color: var(--cyan); background: rgba(3, 20, 33, .84); font-size: 15px; line-height: 1; }
.bpm-stepper-button:hover { border-color: var(--cyan); color: #ffffff; background: rgba(12, 75, 91, .78); }
.bpm-input { width: 62px; height: 25px; padding: 3px 5px; border: 1px solid rgba(141, 244, 244, .2); border-right: 0; border-left: 0; border-radius: 0; color: #d9faff; background: rgba(3, 20, 33, .9); font-size: 11px; text-align: center; }
.bpm-input:focus { border-color: var(--cyan); outline: 0; }
.key-editor { min-width: 104px; }
.key-editor summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 76px; padding: 5px 7px; border: 1px solid rgba(255, 125, 69, .32); color: #ffd0b8; background: rgba(73, 44, 35, .36); cursor: pointer; list-style: none; }
.key-editor summary::-webkit-details-marker { display: none; }
.key-editor summary:hover { border-color: var(--coral); background: rgba(73, 44, 35, .58); }
.key-editor-value { font-weight: 900; }
.key-editor-caret { color: var(--cyan); font-size: 13px; }
.key-dial { display: grid; grid-template-columns: repeat(6, 1fr); gap: 3px; width: 174px; margin-top: 5px; padding: 5px; border: 1px solid rgba(255, 125, 69, .3); background: rgba(3, 20, 33, .97); box-shadow: 0 12px 24px rgba(0, 0, 0, .35); }
.key-choice { min-width: 0; padding: 4px 2px; border: 1px solid rgba(141, 244, 244, .18); color: #a4c1d1; background: rgba(8, 48, 69, .62); font-size: 9px; font-weight: 800; }
.key-choice:hover, .key-choice.selected { border-color: var(--cyan); color: #061522; background: var(--cyan); }
.spotify-store-link { color: #82f5b4; background: rgba(130, 245, 180, .06); }
.empty-row td { padding: 50px 14px; color: #7590a7; text-align: center; }
.move-cell { min-width: 172px; }
.move-controls { display: grid; grid-template-columns: minmax(52px, auto) 96px; align-items: center; gap: 6px; }
.move-badge { display: inline-block; min-width: 48px; padding: 3px 5px; color: #d9faff; font-size: 9px; font-weight: 900; letter-spacing: .04em; text-align: center; white-space: nowrap; }
.move-open { color: #ffffff; background: #2ab978; }
.move-up { color: #c6f8ff; background: rgba(45, 159, 232, .42); }
.move-down { color: #ffd5c5; background: rgba(244, 123, 36, .48); }
.move-relative { color: #f0e8ff; background: rgba(169, 141, 255, .48); }
.move-diagonal { color: #fff1c7; background: rgba(255, 176, 78, .5); }
.move-boost { color: #ffe0d2; background: rgba(255, 125, 69, .62); }
.move-advanced { color: #d8f7ec; background: rgba(42, 185, 120, .45); }
.move-same, .move-shift { color: #c1dbe5; background: rgba(118, 148, 158, .35); }
.role-select { width: 96px; padding: 5px 4px; border: 1px solid rgba(141, 244, 244, .18); border-radius: 0; color: #a4c1d1; background: rgba(3, 20, 33, .9); font-size: 10px; }
.role-select:focus { border-color: var(--cyan); outline: 0; }
.listen-cell { min-width: 188px; white-space: nowrap; }
.listen-with-waveform { display: inline-flex; align-items: center; gap: 5px; }
.listen-controls { display: inline-flex; align-items: center; gap: 4px; }
.listen-link { margin-left: 0; }
.track-waveform { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 2px; width: 74px; height: 28px; padding: 4px 5px; border: 1px solid rgba(141, 244, 244, .12); border-radius: 0; background: rgba(3, 20, 33, .58); opacity: .46; overflow: hidden; }
.track-waveform.is-scrubbable { cursor: ew-resize; appearance: none; color: inherit; }
.track-waveform.is-scrubbable::after { position: absolute; top: 2px; bottom: 2px; left: var(--wave-progress, 0%); width: 2px; content: ""; background: var(--coral); box-shadow: 0 0 7px rgba(255, 125, 69, .8); pointer-events: none; transform: translateX(-1px); }
.track-waveform:focus-visible { border-color: var(--coral); outline: 2px solid var(--cyan); outline-offset: 2px; }
.track-waveform i { position: relative; z-index: 1; display: block; width: 2px; height: var(--bar-height); min-height: 4px; background: #6d8798; transform-origin: center; }
.track-waveform.is-available { border-color: rgba(141, 244, 244, .32); opacity: .86; }
.track-waveform.is-available i { background: linear-gradient(to top, var(--blue), var(--cyan)); }
.track-waveform.is-playing { border-color: var(--coral); background: rgba(73, 44, 35, .5); }
.track-waveform.is-playing i { background: linear-gradient(to top, var(--coral), #ffd0a1); animation: waveform-pulse 1.1s ease-in-out infinite alternate; animation-delay: var(--wave-delay); }
@keyframes waveform-pulse { from { transform: scaleY(.72); } to { transform: scaleY(1.08); } }
.play-track-button { padding: 5px 7px; border: 1px solid rgba(141, 244, 244, .3); border-radius: 0; color: #d9faff; background: rgba(12, 75, 91, .7); font-size: 10px; font-weight: 900; }
.play-track-button:hover:not(:disabled) { border-color: var(--cyan); color: #ffffff; background: rgba(22, 116, 133, .8); }
.play-track-button:disabled { cursor: not-allowed; opacity: .4; }
.spotify-link { color: var(--cyan); font-weight: 800; text-decoration: none; white-space: nowrap; }
.spotify-link:hover { color: #ffffff; text-decoration: underline; }
.listen-unavailable { color: #76949e; font-size: 11px; }
.store-button { display: inline-flex; align-items: center; justify-content: center; min-height: 28px; padding: 6px 8px; border: 1px solid currentColor; font-size: 10px; font-weight: 900; line-height: 1; text-decoration: none; white-space: nowrap; transition: color .2s ease, background .2s ease, border-color .2s ease, transform .2s ease; }
.store-button:hover { color: #ffffff; border-color: currentColor; background: rgba(255, 255, 255, .12); text-decoration: none; transform: translateY(-1px); }
.store-button.store-fallback { min-height: 24px; padding: 4px 6px; border-color: currentColor; background: transparent; font-size: 9px; opacity: .56; }
.store-button.store-fallback:hover { opacity: 1; }
.beatport-link { color: var(--cyan); background: rgba(141, 244, 244, .06); }
.traxsource-link { color: var(--coral); background: rgba(255, 125, 69, .06); }
.bandcamp-link { color: #a4f4c4; background: rgba(164, 244, 196, .06); }
.voyage-map { margin-top: 14px; padding: 16px; border: 1px solid rgba(141, 244, 244, .2); background: linear-gradient(110deg, rgba(5, 28, 45, .92), rgba(9, 44, 62, .72)); }
.voyage-map-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.voyage-map h4 { margin-top: 5px; color: #f4fbff; font-size: 20px; letter-spacing: -.045em; }
.voyage-map-heading p { margin-top: 5px; color: #abc7d2; font-size: 11px; line-height: 1.4; }
.voyage-legend { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; color: #91b5c4; font-size: 10px; }
.voyage-legend span { display: inline-flex; align-items: center; gap: 4px; }
.legend-line { display: inline-block; width: 18px; height: 3px; }
.legend-bpm { background: var(--blue); }
.legend-energy { background: var(--coral); }
.legend-key { background: #a98dff; }
.voyage-chart-wrap { overflow-x: auto; margin-top: 12px; border: 1px solid rgba(141, 244, 244, .12); background: rgba(3, 19, 31, .7); }
.voyage-graph { display: block; width: 100%; min-width: 720px; height: 280px; }
.graph-background { fill: rgba(3, 19, 31, .4); }
.graph-grid-line { stroke: rgba(141, 244, 244, .1); stroke-width: 1; }
.graph-label { fill: #76949e; font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.graph-bpm-path { fill: none; stroke: var(--blue); stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.5; }
.graph-energy-path { fill: none; stroke: var(--coral); stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.5; }
.graph-key { fill: none; stroke: #a98dff; stroke-linecap: round; stroke-width: 2; }
.graph-key.graph-up, .graph-key.graph-diagonal { stroke: var(--cyan); }
.graph-key.graph-down { stroke: var(--coral); }
.graph-key.graph-boost { stroke: #ffb04e; stroke-width: 3; }
.graph-key.graph-relative { stroke: #a98dff; stroke-dasharray: 3 3; }
.graph-key.graph-same, .graph-key.graph-shift { stroke: #76949e; }
.graph-key-point { fill: #f4fbff; stroke: #a98dff; stroke-width: 1.5; }
.graph-empty { fill: #76949e; font-size: 14px; }
.voyage-graph-summary { margin-top: 8px; color: #91b5c4; font-size: 11px; line-height: 1.4; }
.transition-strip { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 14px; padding: 16px; border: 1px solid rgba(244, 123, 36, .35); border-radius: 0; background: linear-gradient(110deg, rgba(73, 44, 35, .5), rgba(8, 58, 81, .72)); }
.transition-strip p { margin-top: 5px; color: #abc7d2; font-size: 12px; line-height: 1.45; }
.waveform { display: inline-flex; align-items: flex-end; justify-content: flex-end; gap: 3px; width: 112px; height: 34px; flex: 0 0 auto; }
.waveform i { display: block; width: 7px; height: var(--wave-height); min-height: 4px; background: linear-gradient(to top, var(--coral), #ffb04e); }
.footer-note { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 14px; margin-top: 18px; color: #6d87a0; font-size: 11px; text-align: center; }
.creator-links { display: inline-flex; gap: 10px; }
.creator-links a { color: var(--cyan); text-decoration: none; }
.creator-links a:hover { color: #ffffff; text-decoration: underline; }
.account-shell { max-width: 980px; }
.account-masthead { margin-bottom: 30px; }
.account-card { max-width: 760px; margin: 0 auto; padding: 36px; }
.account-card-copy h2 { max-width: 560px; margin-top: 8px; color: #f4fbff; font-size: clamp(32px, 5vw, 58px); line-height: .98; letter-spacing: -.07em; }
.account-card-copy p { max-width: 600px; margin-top: 15px; color: #abc7d2; font-size: 14px; line-height: 1.6; }
.account-form { max-width: 470px; margin-top: 28px; }
.social-login-grid { display: grid; gap: 9px; }
.button-social { width: 100%; border: 1px solid rgba(244, 251, 255, .2); background: rgba(3, 20, 33, .72); text-align: center; }
.spotify-connect-button { color: #061b12; border-color: #1ed760; background: #1ed760; }
.spotify-connect-button:hover { color: #061b12; border-color: #5ff48f; background: #5ff48f; }
.offline-guide { display: grid; gap: 5px; margin-top: 11px; padding: 12px 13px; border-left: 3px solid #1ed760; color: #abc7d2; background: rgba(30, 215, 96, .07); font-size: 10px; line-height: 1.45; }
.offline-guide strong { color: #b9ffd0; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
.button-social:hover { border-color: var(--cyan); background: rgba(12, 58, 79, .78); }
.button-apple { color: #fff; }
.button-facebook { color: #dce8ff; }
.button-google { color: #fff; }
.account-divider { display: flex; align-items: center; gap: 12px; margin: 22px 0 4px; color: #76949e; font-size: 11px; text-transform: uppercase; letter-spacing: .12em; }
.account-divider::before, .account-divider::after { flex: 1; height: 1px; content: ""; background: var(--line); }
.account-notice { display: grid; gap: 7px; margin-top: 26px; padding: 14px 16px; border-left: 3px solid var(--coral); color: #c5e1e8; background: rgba(255, 125, 69, .08); font-size: 12px; line-height: 1.5; }
.account-notice strong { color: #ffd0b8; }
.account-signed-in { display: grid; grid-template-columns: auto 1fr auto; gap: 13px; align-items: center; margin-top: 28px; padding: 16px; border: 1px solid rgba(141, 244, 244, .2); background: rgba(3, 20, 33, .5); }
.account-signed-in strong { display: block; margin-top: 4px; color: #f4fbff; font-size: 13px; }
.account-user-badge { display: grid; width: 42px; height: 42px; place-items: center; color: #061522; background: var(--cyan); font-size: 18px; font-weight: 900; }
.account-sign-out { grid-column: 2 / -1; justify-self: start; }
.account-message { min-height: 18px; margin-top: 14px; color: #6ff4bd; font-size: 12px; line-height: 1.45; }
.account-message.is-error { color: #ffad91; }

.about-masthead { margin-bottom: 18px; }
.about-hero { display: block; min-height: 330px; padding: 42px 48px; overflow: hidden; background: linear-gradient(110deg, rgba(6, 27, 43, .96), rgba(10, 61, 91, .88) 62%, rgba(9, 40, 74, .92)); }
.about-start-button { display: inline-block; margin-top: 22px; text-decoration: none; }
.about-hero h2 { max-width: 720px; margin-top: 9px; color: #ffffff; font-size: clamp(40px, 7vw, 86px); line-height: .92; letter-spacing: -.08em; }
.about-hero p { max-width: 660px; margin-top: 18px; color: #c5e1e8; font-size: 16px; line-height: 1.6; }
.about-intro-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr); gap: 18px; margin-top: 18px; }
.about-story { padding: 28px; }
.about-story h3, .about-section-heading h3, .about-control h3, .about-boundary h3, .about-cta h3 { margin-top: 7px; color: #f4fbff; font-size: clamp(25px, 3vw, 42px); line-height: 1; letter-spacing: -.06em; }
.about-story p { max-width: 720px; margin-top: 15px; color: #abc7d2; font-size: 14px; line-height: 1.65; }
.about-stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
.about-stat { display: grid; align-content: center; min-height: 145px; padding: 20px; }
.about-stat strong { color: var(--cyan); font-size: 24px; letter-spacing: .08em; }
.about-stat span { margin-top: 7px; color: #abc7d2; font-size: 11px; line-height: 1.45; }
.about-section { margin-top: 52px; }
.about-section-heading { max-width: 760px; }
.about-section-heading p { margin-top: 12px; color: #abc7d2; font-size: 14px; line-height: 1.55; }
.about-feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 20px; }
.about-feature { min-height: 190px; padding: 22px; }
.feature-number { color: var(--coral); font-size: 11px; font-weight: 900; letter-spacing: .12em; }
.about-feature h4, .about-tide h4, .purchase-card h4 { margin-top: 18px; color: #f4fbff; font-size: 18px; letter-spacing: -.03em; }
.about-feature p, .about-tide p, .purchase-card p { margin-top: 9px; color: #91b5c4; font-size: 12px; line-height: 1.5; }
.about-harmonic-section { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr); gap: 30px; align-items: center; margin-top: 52px; padding: 30px; border-color: rgba(169, 141, 255, .38); background: linear-gradient(110deg, rgba(35, 29, 72, .62), rgba(8, 48, 69, .78)); }
.about-harmonic-copy h3 { margin-top: 7px; color: #f4fbff; font-size: clamp(25px, 3vw, 42px); line-height: 1; letter-spacing: -.06em; }
.about-harmonic-copy p { max-width: 760px; margin-top: 14px; color: #abc7d2; font-size: 14px; line-height: 1.6; }
.about-harmonic-points { display: grid; gap: 10px; }
.about-harmonic-points div { padding: 13px 15px; border-left: 3px solid #a98dff; background: rgba(3, 20, 33, .46); }
.about-harmonic-points strong { display: block; color: #dcd2ff; font-size: 10px; letter-spacing: .12em; }
.about-harmonic-points span { display: block; margin-top: 5px; color: #abc7d2; font-size: 12px; line-height: 1.4; }
.about-tides-section { padding-top: 2px; }
.about-tide-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 20px; }
.about-tide { min-height: 165px; padding: 18px; overflow: hidden; }
.about-tide-graph { display: block; width: 100%; height: 46px; overflow: visible; }
.about-tide-axis { fill: none; stroke: rgba(141, 244, 244, .2); stroke-width: 1; }
.about-tide-path { fill: none; stroke: var(--cyan); stroke-linecap: round; stroke-linejoin: round; stroke-width: 3; }
.tide-warm .about-tide-path { stroke: #5dc9ed; }
.tide-rise .about-tide-path { stroke: var(--coral); }
.tide-roll .about-tide-path { stroke: #ffb04e; }
.tide-circle .about-tide-path { stroke: #a98dff; }
.about-tide-dot { fill: #a98dff; }
.about-control { display: grid; grid-template-columns: minmax(0, 1fr) minmax(290px, .8fr); gap: 30px; align-items: center; margin-top: 52px; padding: 30px; border-color: rgba(255, 125, 69, .45); background: linear-gradient(110deg, rgba(73, 44, 35, .55), rgba(8, 58, 81, .72)); }
.about-control p, .about-boundary p, .about-cta p { max-width: 720px; margin-top: 13px; color: #abc7d2; font-size: 14px; line-height: 1.6; }
.about-role-list { display: grid; gap: 10px; }
.about-role-list span { padding: 11px 13px; border-left: 3px solid var(--coral); color: #c5e1e8; background: rgba(3, 20, 33, .45); font-size: 12px; line-height: 1.45; }
.about-role-list strong { display: inline-block; min-width: 72px; color: #ffd0b8; font-size: 10px; letter-spacing: .1em; }
.about-purchase-grid { display: grid; grid-template-columns: 1fr 28px 1fr 28px 1fr; gap: 10px; align-items: stretch; margin-top: 20px; }
.purchase-card { min-height: 170px; padding: 22px; }
.purchase-label { color: var(--cyan); font-size: 10px; font-weight: 900; letter-spacing: .14em; }
.purchase-label-beatport { color: #92d8ff; }
.purchase-label-traxsource { color: var(--coral); }
.purchase-arrow { display: grid; place-items: center; color: var(--coral); font-size: 22px; }
.about-boundary { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, .75fr); gap: 30px; align-items: center; margin-top: 52px; padding: 30px; }
.boundary-list { display: grid; gap: 9px; }
.boundary-list span { padding: 11px 13px; border-left: 3px solid rgba(141, 244, 244, .48); color: #abc7d2; background: rgba(3, 20, 33, .44); font-size: 12px; line-height: 1.4; }
.boundary-list span:last-child { border-color: var(--cyan); color: #e0fbff; }
.about-cta { margin-top: 52px; padding: 36px; text-align: center; background: linear-gradient(110deg, rgba(8, 50, 72, .94), rgba(11, 72, 91, .78)); }
.about-cta p { margin-right: auto; margin-left: auto; }
.about-cta .button { display: inline-block; margin-top: 22px; }

@media (min-width: 701px) and (max-width: 1100px) {
  .masthead { display: grid; grid-template-columns: 150px minmax(0, 1fr) 230px; align-items: center; gap: 14px; }
  .brand-mark { grid-column: 1; grid-row: 1 / span 2; width: 150px; height: 76px; }
  .brand-copy { grid-column: 2; grid-row: 1 / span 2; }
  .connection-area { grid-column: 3; grid-row: 1; min-width: 0; max-width: none; }
  .masthead > .button { grid-column: 3; grid-row: 2; width: 100%; }
}

@media (max-width: 900px) {
  body::before, body::after { width: 30px; opacity: .46; }
  .connection-area { flex: 1 1 250px; }
  .workspace-grid { grid-template-columns: 1fr; }
  .control-panel { order: 1; }
  .results-panel { order: 2; }
  .hero-card { min-height: 160px; }
  .about-hero { padding: 32px; }
  .about-feature-grid, .about-tide-grid { grid-template-columns: repeat(2, 1fr); }
  .about-control, .about-boundary, .about-harmonic-section { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  body::before, body::after { width: 20px; opacity: .28; }
  .shell { width: min(100% - 24px, 1440px); padding-top: 16px; }
  .masthead { flex-wrap: wrap; }
  .connection-area { flex-basis: 100%; max-width: none; }
  .masthead .button { width: 100%; }
  .hero-card { padding: 24px; }
  .about-hero { display: block; padding: 28px 22px; }
  .about-hero h2 { font-size: clamp(40px, 13vw, 64px); }
  .about-hero p { font-size: 14px; }
  .account-card { padding: 24px 20px; }
  .account-signed-in { grid-template-columns: auto 1fr; }
  .account-signed-in > .button-primary { grid-column: 1 / -1; width: 100%; text-align: center; }
  .about-intro-grid, .about-feature-grid, .about-tide-grid { grid-template-columns: 1fr; }
  .about-stat-grid { grid-template-columns: 1fr 1fr; }
  .about-story, .about-control, .about-boundary, .about-harmonic-section, .about-cta { padding: 22px; }
  .about-purchase-grid { grid-template-columns: 1fr; }
  .purchase-arrow { min-height: 26px; transform: rotate(90deg); }
  .results-heading { align-items: flex-start; flex-direction: column; }
  .result-actions { justify-content: flex-start; }
  .metrics { grid-template-columns: 1fr; }
  .transition-strip { align-items: stretch; flex-direction: column; gap: 12px; }
  .waveform { align-self: flex-end; width: min(100%, 154px); height: 26px; }
  .waveform i { flex: 1 1 0; max-width: 11px; }
  .key-route-modal { place-items: start center; padding: 10px; }
  .key-route-dialog { max-height: calc(100vh - 20px); padding: 18px; }
  .key-route-dialog-heading { gap: 12px; }
  .key-route-dialog-heading h3 { font-size: 30px; }
  .key-route-dialog-heading p { font-size: 12px; }
  .key-route-dialog .camelot-grid { margin-top: 20px; }
  .key-route-dialog .camelot-cell { min-height: 52px; }
  .key-route-dialog-actions { align-items: stretch; flex-direction: column; }
  .key-route-dialog-actions .button { width: 100%; }
}

@media (min-width: 561px) and (max-width: 700px) {
  .masthead { flex-wrap: wrap; }
  .connection-area { flex-basis: calc(100% - 164px); max-width: none; }
  .masthead > .button { flex: 0 0 150px; }
}
