:root {
  color-scheme: dark;
  --background: #07111f;
  --surface: #0d1929;
  --surface-light: #132238;
  --line: #24364d;
  --text: #f2f6fb;
  --muted: #8fa3bb;
  --accent: #66e3bd;
  --accent-dark: #092e28;
  --warning: #ffd166;
  --danger: #ff7c86;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 75% 0%, #17395a 0, transparent 30rem),
    var(--background);
  font-family:
    Inter, Pretendard, "Noto Sans KR", system-ui, -apple-system, sans-serif;
}

button,
input,
select {
  font: inherit;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  padding: 0 max(24px, calc((100vw - 1240px) / 2));
  border-bottom: 1px solid #ffffff12;
  background: #07111fbb;
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand-mark {
  display: block;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
}

.source-label,
.eyebrow,
.board-caption {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.module-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.module-nav a {
  padding: 9px 12px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
}

.module-nav a:hover,
.module-nav a.active {
  color: var(--text);
  background: #ffffff0e;
}

.module-nav a.active {
  color: var(--accent);
}

main,
footer {
  width: min(1240px, calc(100% - 48px));
  margin-inline: auto;
}

.home-hero {
  padding: 72px 0 44px;
}

.home-hero h1 {
  max-width: 900px;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.service-card {
  position: relative;
  display: grid;
  min-height: 250px;
  padding: 26px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  color: var(--text);
  background:
    radial-gradient(circle at 100% 0%, var(--card-glow), transparent 48%),
    var(--surface);
  text-decoration: none;
  transition:
    border-color 160ms ease,
    transform 160ms ease,
    background-color 160ms ease;
}

.service-card:hover {
  border-color: var(--card-accent);
  transform: translateY(-3px);
}

.service-card--arrival {
  --card-accent: #66e3bd;
  --card-glow: #1e806544;
}

.service-card--departure {
  --card-accent: #77b9ff;
  --card-glow: #225f9f44;
}

.service-card--vfr {
  --card-accent: #ffc66d;
  --card-glow: #9a602344;
}

.service-card--calendar {
  --card-accent: #c49aff;
  --card-glow: #68439544;
}

.service-number {
  align-self: start;
  color: #657b93;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.service-icon {
  position: absolute;
  top: 20px;
  right: 24px;
  color: var(--card-accent);
  font-size: 54px;
  font-weight: 300;
  line-height: 1;
}

.service-copy {
  align-self: end;
  display: flex;
  flex-direction: column;
  max-width: 430px;
}

.service-kicker {
  margin-bottom: 8px;
  color: var(--card-accent);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.service-copy strong {
  margin-bottom: 12px;
  font-size: clamp(25px, 3vw, 34px);
  letter-spacing: -0.04em;
}

.service-copy > span:last-child {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.service-action {
  align-self: end;
  margin-top: 24px;
  color: #8296ad;
  font-size: 11px;
  font-weight: 800;
}

.hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  padding: 72px 0 44px;
}

body[data-board] .hero {
  align-items: center;
  padding: 42px 0 24px;
}

body[data-board] .hero h1 {
  max-width: 620px;
  font-size: clamp(30px, 4.2vw, 48px);
}

body[data-board] .hero-copy {
  max-width: 560px;
  margin-top: 12px;
  font-size: 15px;
}

body[data-board] .hero-status {
  padding: 10px 14px;
}

.eyebrow {
  margin: 0 0 14px;
}

h1 {
  max-width: 800px;
  margin: 0;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.07;
  letter-spacing: -0.055em;
}

.hero-copy {
  max-width: 620px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.hero-status {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 10px;
  padding: 12px 16px;
  border: 1px solid #66e3bd44;
  border-radius: 999px;
  color: #bcefe0;
  background: #092e2888;
  font-size: 13px;
  font-weight: 700;
}

.phase-badge {
  flex: 0 0 auto;
  padding: 11px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: #0d1929aa;
  font-size: 12px;
  font-weight: 800;
}

.pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px #66e3bd22;
}

.control-panel {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) minmax(180px, 1fr) auto;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #0d1929dd;
  box-shadow: 0 20px 60px #00000026;
}

.field {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field label,
.field-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

select,
input[type="date"],
.search-box {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--text);
  background: var(--surface-light);
}

.date-navigator {
  position: relative;
  display: grid;
  grid-template-columns: 46px minmax(150px, 1fr) 46px;
  min-height: 48px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-light);
}

.date-control-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px;
  gap: 8px;
}

.today-button {
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--accent);
  background: var(--surface-light);
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.today-button:hover {
  border-color: #66e3bd66;
  background: var(--accent-dark);
}

.today-button:disabled {
  border-color: #253449;
  color: #6f7f92;
  background: #111b2a;
  cursor: not-allowed;
  opacity: 0.88;
}

.today-button.is-current-date:disabled {
  border-color: #2b3b50;
  color: #8b99aa;
  background: #162234;
}

.date-arrow {
  position: relative;
  z-index: 3;
  border: 0;
  color: var(--accent);
  background: transparent;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
}

.date-arrow:hover {
  background: #ffffff0a;
}

.date-arrow:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.date-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 8px;
  border: 0;
  border-top: 0;
  border-bottom: 0;
  border-right: 1px solid var(--line);
  border-left: 1px solid var(--line);
  color: var(--text);
  background: transparent;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  transition:
    color 140ms ease,
    background-color 140ms ease;
}

.date-display::after {
  content: "📅";
  font-size: 13px;
  line-height: 1;
  opacity: 0.72;
}

.date-navigator:hover .date-display {
  color: var(--accent);
  background: #ffffff08;
}

select,
input[type="date"] {
  width: 100%;
  padding: 0 14px;
}

.calendar-popover {
  position: absolute;
  z-index: 20;
  top: 100%;
  right: auto;
  left: 0;
  transform: translateY(10px);
  width: min(330px, 100%);
  padding: 14px;
  border: 1px solid #66e3bd33;
  border-radius: 16px;
  background:
    radial-gradient(circle at 100% 0%, #66e3bd18, transparent 42%),
    #0b1727;
  box-shadow: 0 24px 80px #00000088;
}

.calendar-popover[hidden] {
  display: none;
}

.calendar-header {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 38px;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.calendar-header strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 850;
  text-align: center;
}

.calendar-header button,
.calendar-day {
  border: 0;
  color: var(--text);
  background: transparent;
  cursor: pointer;
}

.calendar-header button {
  display: grid;
  height: 36px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--accent);
  font-size: 20px;
}

.calendar-header button:hover,
.calendar-day:hover {
  background: #ffffff0c;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.calendar-weekday {
  padding: 3px 0 7px;
  color: #6f839b;
  font-size: 10px;
  font-weight: 900;
  text-align: center;
}

.calendar-day {
  display: grid;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 750;
}

.calendar-day.outside-month {
  color: #53677d;
}

.calendar-day.today {
  color: var(--accent);
  box-shadow: inset 0 0 0 1px #66e3bd55;
}

.calendar-day.selected {
  color: #06231f;
  background: var(--accent);
  box-shadow: 0 8px 20px #66e3bd24;
}

.primary-button {
  align-self: end;
  min-height: 48px;
  padding: 0 24px;
  border: 0;
  border-radius: 11px;
  color: #06231f;
  background: var(--accent);
  font-weight: 850;
  cursor: pointer;
}

.primary-button:hover {
  filter: brightness(1.06);
}

.primary-button:disabled {
  cursor: wait;
  filter: saturate(0.3);
  opacity: 0.7;
}

.board {
  margin-top: 30px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
}

.workspace-shell {
  min-height: 370px;
  padding: 58px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    linear-gradient(#0d1929dd, #0d1929dd),
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 99px,
      #ffffff08 100px
    );
}

.workspace-icon {
  margin-bottom: 44px;
  color: var(--accent);
  font-size: 58px;
  line-height: 1;
}

.workspace-shell h2 {
  margin-bottom: 14px;
  font-size: clamp(25px, 4vw, 38px);
}

.workspace-shell > p:last-of-type {
  max-width: 650px;
  color: var(--muted);
  line-height: 1.75;
}

.calendar-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  margin-top: 48px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--line);
}

.calendar-week span {
  padding: 15px 8px;
  color: #6f839b;
  background: var(--surface-light);
  font-size: 10px;
  font-weight: 900;
  text-align: center;
}

.board-header,
.filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 26px;
}

.board-header {
  border-bottom: 1px solid var(--line);
}

.status-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  padding: 12px 26px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  background: #0a1524;
  font-size: 12px;
  font-weight: 750;
}

.status-legend > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.legend-dot {
  width: 4px;
  height: 12px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 3px #ffffff08;
}

.legend-dot--active {
  background: #47d7a8;
}

.legend-dot--completed {
  background: #748398;
}

.legend-dot--delayed {
  background: var(--warning);
}

.legend-dot--cancelled {
  background: var(--danger);
}

.board-caption {
  margin: 0 0 7px;
  letter-spacing: 0.06em;
}

h2 {
  margin: 0;
  font-size: 25px;
  letter-spacing: -0.03em;
}

.count-box {
  text-align: right;
}

.count-box strong {
  display: block;
  font-size: 30px;
  line-height: 1;
}

.count-box span {
  color: var(--muted);
  font-size: 12px;
}

footer a {
  color: inherit;
}

footer a:hover {
  color: var(--accent);
}

.flight-detail {
  width: min(680px, calc(100% - 28px));
  max-height: calc(100vh - 20px);
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--text);
  background: var(--surface);
  box-shadow: 0 30px 100px #000000aa;
}

.flight-detail::backdrop {
  background: #020711bb;
  backdrop-filter: blur(5px);
}

.detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 28px;
  border-bottom: 1px solid var(--line);
}

.detail-header h2 {
  margin-top: 8px;
  font-size: 34px;
}

.detail-summary {
  margin: 9px 0 0;
  color: var(--muted);
}

.detail-close {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  background: transparent;
  font-size: 24px;
  cursor: pointer;
}

.detail-close:hover {
  color: var(--text);
  background: #ffffff0a;
}

.detail-facts {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 0;
  padding: 22px 28px;
  border-bottom: 1px solid var(--line);
}

.detail-facts > div {
  padding: 4px 20px;
  border-right: 1px solid var(--line);
}

.detail-facts > div:first-child {
  padding-left: 0;
}

.detail-facts > div:last-child {
  border-right: 0;
}

.detail-facts dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.detail-facts dd {
  margin: 8px 0 0;
  color: var(--accent);
  font-size: 22px;
  font-weight: 850;
}

.detail-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 28px 28px;
}

.detail-aircraft-media {
  display: grid;
  gap: 10px;
  padding: 16px 28px 20px;
}

.detail-aircraft-photo-link,
.detail-aircraft-photo-empty {
  display: grid;
  width: min(100%, 450px, 51vh);
  height: auto;
  aspect-ratio: 3 / 2;
  margin: 0 auto;
  overflow: hidden;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.detail-aircraft-photo-link[hidden],
.detail-aircraft-photo-empty[hidden],
.detail-aircraft-photo-link img[hidden] {
  display: none !important;
}

.detail-aircraft-photo-link img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.detail-aircraft-photo-empty {
  color: var(--muted);
  background: #ffffff08;
  font-size: 12px;
  font-weight: 800;
}

.detail-aircraft-photo-footer {
  display: flex;
  justify-content: flex-end;
}

.detail-photo-source {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 7px;
}

.detail-photo-credit {
  max-width: 320px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-livery {
  min-width: 0;
}

.detail-livery span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.detail-livery strong {
  display: block;
  color: #d6b7ff;
  font-size: 17px;
  line-height: 1.45;
}

.photo-link {
  display: inline-flex;
  flex: 0 0 auto;
  padding: 10px 13px;
  border: 1px solid #66e3bd55;
  border-radius: 9px;
  color: var(--accent);
  background: var(--accent-dark);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.filter-row {
  justify-content: flex-start;
  padding-block: 16px;
  background: #0a1524;
}

.search-box {
  display: flex;
  align-items: center;
  width: min(470px, 100%);
  gap: 10px;
  padding: 0 14px;
}

.search-box span {
  color: var(--accent);
  font-size: 24px;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.search-box input::placeholder {
  color: #6f839b;
}

.filter-options {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.checkbox-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
}

.checkbox-filter input {
  accent-color: var(--accent);
}

.message {
  padding: 72px 24px;
  color: var(--muted);
  text-align: center;
}

.message.error {
  color: var(--danger);
}

.data-notice {
  padding: 10px 18px;
  border-bottom: 1px solid rgba(255, 209, 102, 0.24);
  color: var(--warning);
  background: rgba(255, 209, 102, 0.08);
  font-size: 12px;
  font-weight: 700;
}

.data-notice[hidden] {
  display: none;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  padding: 16px 18px;
  border-bottom: 1px solid #1b2a3e;
  text-align: left;
  white-space: nowrap;
}

th {
  position: sticky;
  top: 0;
  color: var(--muted);
  background: #0d1929;
  font-size: 11px;
  letter-spacing: 0.08em;
}

.indicator-heading,
.indicator-cell {
  width: 12px;
  padding-right: 0;
}

.row-action-heading,
.row-action {
  width: 36px;
  padding-left: 0;
  color: #62758d;
  text-align: right;
}

.row-action {
  font-size: 21px;
  font-weight: 300;
  transition: color 140ms ease;
}

.indicator-bar {
  display: block;
  width: 4px;
  height: 28px;
  border-radius: 999px;
  background: var(--accent);
}

.indicator-bar--completed {
  background: #748398;
}

.indicator-bar--active {
  background: #47d7a8;
}

.indicator-bar--delayed {
  background: var(--warning);
}

.indicator-bar--cancelled {
  background: var(--danger);
}

.sort-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  font-weight: 800;
  letter-spacing: inherit;
  cursor: pointer;
}

.sort-button:hover,
.sort-button.selected {
  color: var(--accent);
}

.sort-mark {
  width: 10px;
  color: #62758d;
  font-size: 10px;
}

.sort-button.selected .sort-mark {
  color: var(--accent);
}

tbody tr:hover {
  background: #ffffff08;
}

tbody tr:hover .row-action {
  color: var(--accent);
}

.flight-row {
  cursor: pointer;
}

.flight-row:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.special-livery-row {
  background:
    linear-gradient(90deg, #b57cff15, transparent 48%);
}

.special-livery-row:hover {
  background:
    linear-gradient(90deg, #b57cff24, #ffffff08 58%);
}

.time-cell {
  color: var(--accent);
  font-weight: 800;
}

.flight-id,
.registration {
  font-weight: 800;
  letter-spacing: 0.02em;
}

.registration {
  color: var(--warning);
}

.special-livery-row .registration {
  color: #d6b7ff;
}

.special-livery-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 3px 6px;
  border: 1px solid #b57cff66;
  border-radius: 999px;
  color: #d7bcff;
  background: #6d36a733;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.08em;
  vertical-align: 1px;
}

.muted-cell {
  color: #62758d;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

footer {
  display: flex;
  justify-content: space-between;
  padding: 28px 0 40px;
  color: #667a93;
  font-size: 12px;
}

body[data-layout="mobile-preview"] {
  background: #0b1421;
}

body[data-layout="mobile-preview"] .topbar {
  height: 58px;
  padding: 0 14px;
}

body[data-layout="mobile-preview"] .brand {
  font-size: 15px;
}

body[data-layout="mobile-preview"] .brand-mark {
  width: 32px;
  height: 32px;
}

body[data-layout="mobile-preview"] .module-nav {
  gap: 3px;
}

body[data-layout="mobile-preview"] .module-nav a {
  padding: 7px 8px;
  font-size: 11px;
}

body[data-layout="mobile-preview"] main,
body[data-layout="mobile-preview"] footer {
  width: min(100%, 680px);
}

body[data-layout="mobile-preview"] .hero {
  gap: 16px;
  padding: 24px 16px 16px;
}

body[data-layout="mobile-preview"] .hero h1 {
  font-size: 26px;
}

body[data-layout="mobile-preview"] .eyebrow {
  margin-bottom: 6px;
  font-size: 10px;
}

body[data-layout="mobile-preview"] .hero-copy {
  display: none;
}

body[data-layout="mobile-preview"] .hero-status {
  padding: 9px 12px;
  font-size: 12px;
}

body[data-layout="mobile-preview"] .control-panel {
  grid-template-columns: 1fr;
  gap: 14px;
  padding: 16px;
  border-right: 0;
  border-left: 0;
  border-radius: 0;
  box-shadow: none;
}

body[data-layout="mobile-preview"] .field {
  gap: 7px;
}

body[data-layout="mobile-preview"] .preview-date-row {
  grid-template-columns: minmax(0, 1fr) 56px minmax(92px, 0.45fr);
}

body[data-layout="mobile-preview"] .field label,
body[data-layout="mobile-preview"] .field-label {
  font-size: 11px;
}

body[data-layout="mobile-preview"] select,
body[data-layout="mobile-preview"] input[type="date"],
body[data-layout="mobile-preview"] .search-box,
body[data-layout="mobile-preview"] .date-navigator,
body[data-layout="mobile-preview"] .primary-button {
  min-height: 44px;
}

body[data-layout="mobile-preview"] .primary-button {
  width: auto;
  padding: 0 11px;
  font-size: 12px;
}

body[data-layout="mobile-preview"] .board {
  margin-top: 0;
  border-right: 0;
  border-left: 0;
  border-radius: 0;
}

body[data-layout="mobile-preview"] .board-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
}

body[data-layout="mobile-preview"] .board-header > div:first-child {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 10px;
  white-space: nowrap;
}

body[data-layout="mobile-preview"] .board-caption {
  order: 2;
  display: inline;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #8fa3bb;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.02em;
  text-overflow: ellipsis;
}

body[data-layout="mobile-preview"] h2 {
  order: 1;
  flex: 0 0 auto;
  display: inline;
  font-size: 19px;
  letter-spacing: -0.035em;
}

body[data-layout="mobile-preview"] .count-box {
  display: flex;
  align-items: baseline;
  gap: 5px;
  white-space: nowrap;
}

body[data-layout="mobile-preview"] .count-box strong {
  font-size: 22px;
  letter-spacing: -0.03em;
}

body[data-layout="mobile-preview"] .count-box span {
  font-size: 11px;
}

body[data-layout="mobile-preview"] .status-legend {
  gap: 12px;
  padding: 10px 16px;
  font-size: 11px;
}

body[data-layout="mobile-preview"] .filter-row {
  align-items: stretch;
  flex-direction: column;
  gap: 12px;
  padding: 14px 16px;
}

body[data-layout="mobile-preview"] .search-box {
  width: 100%;
}

body[data-layout="mobile-preview"] .filter-options {
  gap: 9px;
}

body[data-layout="mobile-preview"] .checkbox-filter {
  padding: 8px 10px;
  border-radius: 9px;
  background: #ffffff08;
  font-size: 12px;
}

body[data-layout="mobile-preview"] .table-wrap {
  overflow-x: hidden;
}

body[data-layout="mobile-preview"] table {
  table-layout: fixed;
  font-size: clamp(11px, 2.95vw, 14px);
}

body[data-layout="mobile-preview"] th,
body[data-layout="mobile-preview"] td {
  padding: 10px 5px;
}

body[data-layout="mobile-preview"] th {
  font-size: clamp(9px, 2.35vw, 11px);
  letter-spacing: 0.03em;
}

body[data-layout="mobile-preview"] .indicator-heading,
body[data-layout="mobile-preview"] .indicator-cell {
  width: 14px;
  padding-right: 2px;
  padding-left: 8px;
}

body[data-layout="mobile-preview"] .indicator-bar {
  width: 5px;
  height: 29px;
}

body[data-layout="mobile-preview"] th:nth-child(2),
body[data-layout="mobile-preview"] td:nth-child(2) {
  width: 20%;
}

body[data-layout="mobile-preview"] th:nth-child(3),
body[data-layout="mobile-preview"] td:nth-child(3) {
  width: 13%;
}

body[data-layout="mobile-preview"] th:nth-child(4),
body[data-layout="mobile-preview"] td:nth-child(4) {
  width: 18%;
}

body[data-layout="mobile-preview"] th:nth-child(5),
body[data-layout="mobile-preview"] td:nth-child(5) {
  width: 15%;
}

body[data-layout="mobile-preview"] th:nth-child(6),
body[data-layout="mobile-preview"] td:nth-child(6) {
  width: 18%;
}

body[data-layout="mobile-preview"] th:nth-child(7),
body[data-layout="mobile-preview"] td:nth-child(7) {
  width: 10%;
}

body[data-layout="mobile-preview"] .flight-id,
body[data-layout="mobile-preview"] .registration,
body[data-layout="mobile-preview"] .time-cell {
  letter-spacing: -0.02em;
}

body[data-layout="mobile-preview"] .special-livery-badge {
  position: relative;
  width: 16px;
  height: 16px;
  margin-left: 3px;
  padding: 0;
  overflow: hidden;
  color: transparent;
  vertical-align: -2px;
}

body[data-layout="mobile-preview"] .special-livery-badge::after {
  content: "★";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #d7bcff;
  font-size: 9px;
  font-weight: 900;
}

body[data-layout="mobile-preview"] footer {
  padding: 18px 14px 28px;
}

body[data-vfr-board] {
  background:
    radial-gradient(circle at 80% -10%, #1d4161 0, transparent 32rem),
    linear-gradient(135deg, #0b1421, #102723 65%, #07111f);
}

body[data-vfr-board] .topbar {
  height: 62px;
  padding: 0 max(14px, calc((100vw - 680px) / 2));
}

.vfr-main {
  width: min(680px, 100%);
  min-height: calc(100vh - 128px);
  margin-inline: auto;
}

.vfr-control-panel {
  margin: 0;
}

body[data-vfr-board] footer {
  width: min(680px, calc(100% - 28px));
}

.vfr-toolbar,
.vfr-mode-row,
.vfr-date-row {
  display: grid;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid #24364d;
  background: #0b1421d9;
  backdrop-filter: blur(14px);
}

.vfr-toolbar {
  grid-template-columns: 42px minmax(0, 1fr) 58px;
}

.vfr-mode-row {
  grid-template-columns: auto minmax(146px, 168px);
  justify-content: space-between;
}

.vfr-date-row {
  grid-template-columns: 48px minmax(0, 1fr) 48px 72px;
  background: #0d1828d9;
}

.vfr-back,
.vfr-icon-button,
.vfr-date-row button,
.vfr-airport,
.vfr-chip,
.vfr-search {
  min-height: 44px;
  border: 1px solid #344459;
  border-radius: 13px;
  color: var(--text);
  background: #1a2434;
  text-decoration: none;
}

.vfr-back,
.vfr-icon-button,
.vfr-date-row button {
  display: grid;
  place-items: center;
  cursor: pointer;
}

.vfr-back {
  border: 0;
  background: transparent;
  font-size: 28px;
}

.vfr-icon-button,
.vfr-date-row button {
  color: #dfe7f3;
  font-size: 24px;
}

.vfr-date-row button:disabled,
.vfr-icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.vfr-date-row #vfrToday {
  color: var(--accent);
  font-size: 13px;
  font-weight: 850;
}

.vfr-search {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 0 15px;
}

.vfr-search span {
  color: #5e718a;
  font-size: 24px;
}

.vfr-search input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.vfr-search input::placeholder {
  color: #8393a7;
}

.vfr-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0 18px;
  border-color: #ff9a4c66;
  color: #ffe0c3;
  background: #7b452733;
  font-weight: 900;
}

.vfr-airport {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 146px;
  padding: 0 10px 0 12px;
  color: #2664d8;
  background: #f5f8ff;
}

.vfr-airport select {
  width: 100%;
  min-width: 0;
  min-height: 0;
  padding: 0 18px 0 0;
  border: 0;
  color: #101928;
  background: transparent;
  font-weight: 900;
}

#vfrDateDisplay {
  color: var(--text);
  font-weight: 900;
  letter-spacing: -0.02em;
}

.vfr-board {
  overflow: hidden;
  background:
    linear-gradient(90deg, #1c675f66, #263949cc),
    #122332;
}

.vfr-column-head,
.vfr-card-main {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr 0.9fr 0.9fr 0.9fr 0.9fr;
  align-items: center;
  gap: 8px;
}

.vfr-board-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid #314255;
  background: #101b2b;
}

.vfr-board-tools .vfr-search {
  flex: 1 1 220px;
}

.vfr-filter-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.vfr-status-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  color: #aeb9c8;
  font-size: 11px;
  font-weight: 800;
}

.vfr-status-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.vfr-legend-bar {
  width: 4px;
  height: 13px;
  border-radius: 999px;
  background: #66e3bd;
}

.vfr-legend-bar--scheduled {
  background: #66e3bd;
}

.vfr-legend-bar--active {
  background: #f5dc63;
}

.vfr-legend-bar--completed {
  background: #8a98aa;
}

.vfr-filter-button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #344459;
  border-radius: 9px;
  color: #cdd7e4;
  background: #1a2434;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.vfr-filter-button:hover,
.vfr-filter-button.active {
  border-color: #66e3bd66;
  color: #06231f;
  background: var(--accent);
}

.vfr-column-head {
  padding: 10px 14px;
  color: #dbe4ef;
  background: #172132;
  font-size: clamp(10px, 2.7vw, 13px);
  font-weight: 900;
}

.vfr-sort-button {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  font-weight: inherit;
  text-align: left;
  cursor: pointer;
}

.vfr-sort-button:hover,
.vfr-sort-button.selected {
  color: var(--accent);
}

.vfr-sort-mark {
  display: inline-block;
  width: 10px;
  color: #7c8a9e;
  font-size: 10px;
}

.vfr-sort-button.selected .vfr-sort-mark {
  color: var(--accent);
}

.vfr-message {
  padding: 52px 22px;
  color: #c4d0de;
  text-align: center;
  line-height: 1.65;
}

.vfr-message.error {
  color: #ffc3c8;
}

.vfr-message.notice {
  padding: 10px 16px;
  border-bottom: 1px solid #5d4b2455;
  color: #f5dc8a;
  background: #322815;
  font-size: 12px;
  font-weight: 750;
}

.vfr-message[hidden],
.vfr-rows[hidden] {
  display: none;
}

.vfr-rows {
  display: grid;
  gap: 5px;
  padding: 7px 10px 18px;
}

.vfr-card {
  position: relative;
  display: block;
  width: 100%;
  padding: 10px 11px 9px 18px;
  overflow: hidden;
  border: 1px solid #ffffff0b;
  border-radius: 10px;
  color: var(--text);
  background: #385865cc;
  box-shadow: 0 8px 24px #00000018;
  text-align: left;
  cursor: pointer;
}

.vfr-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: #66e3bd;
}

.vfr-card--scheduled::before {
  background: #66e3bd;
}

.vfr-card--active::before {
  background: #f5dc63;
}

.vfr-card--completed::before {
  background: #8a98aa;
}

.vfr-card:hover {
  border-color: #ffffff24;
  background: #426673d9;
}

.vfr-card-main {
  font-size: clamp(11px, 3vw, 14px);
}

.vfr-card-main span:first-child {
  font-weight: 950;
}

.vfr-card-main span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vfr-actual-time {
  color: #f8df68;
}

.vfr-card--completed .vfr-card-main span:last-child {
  color: #c4ceda;
}

.vfr-card-sub {
  margin-top: 5px;
  overflow: hidden;
  color: #c6d0dd;
  font-size: clamp(10px, 2.6vw, 12px);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vfr-detail {
  width: min(680px, calc(100% - 28px));
  max-height: min(820px, calc(100vh - 40px));
  padding: 0;
  overflow: auto;
  border: 1px solid #405169;
  border-radius: 18px;
  color: var(--text);
  background: #0d1828;
  box-shadow: 0 30px 100px #000000aa;
}

.vfr-detail::backdrop {
  background: #020711bb;
  backdrop-filter: blur(5px);
}

.vfr-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 26px;
  border-bottom: 1px solid #344459;
  font-size: 22px;
}

.vfr-detail-header > div {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.vfr-detail-header strong {
  color: #ffe0c3;
}

.vfr-detail-status {
  padding: 5px 9px;
  border: 1px solid #66e3bd44;
  border-radius: 999px;
  color: #66e3bd;
  background: #123128;
  font-size: 12px;
  font-weight: 900;
}

.vfr-detail-header button {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 0;
  color: #bdc7d5;
  background: transparent;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
}

.vfr-detail-body {
  display: grid;
  gap: 14px;
  padding: 28px;
}

.vfr-detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.vfr-detail-card {
  padding: 22px;
  border: 1px solid #405169;
  border-radius: 14px;
  background: #273243;
}

.vfr-detail-card h3 {
  margin: 0 0 14px;
  color: #e9f0f8;
  font-size: 15px;
}

.vfr-detail-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.vfr-detail-title h2 {
  margin: 0;
  font-size: 34px;
}

.vfr-detail-title span {
  padding: 7px 11px;
  border-radius: 8px;
  color: #ffd9b3;
  background: #8b5735;
  font-weight: 900;
}

.vfr-detail-photo-card {
  overflow: hidden;
  border: 1px solid #405169;
  border-radius: 14px;
  background: #111d2e;
}

.vfr-detail-photo {
  display: grid;
  min-height: 220px;
  place-items: center;
  background:
    radial-gradient(circle at 50% 25%, #66e3bd22, transparent 44%),
    linear-gradient(135deg, #17283b, #101827);
}

.vfr-detail-photo img {
  display: block;
  width: 100%;
  max-height: 300px;
  object-fit: contain;
  background: #0b1421;
}

.vfr-detail-photo-empty {
  color: #9eabbc;
  font-size: 14px;
  font-weight: 800;
}

.vfr-detail-photo-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  color: #aeb9c8;
  font-size: 12px;
  font-weight: 800;
}

.vfr-detail-photo-meta a {
  color: #66e3bd;
  text-decoration: none;
}

.vfr-detail-route {
  margin: 14px 0 22px;
  color: #aeb9c8;
  font-size: 13px;
  line-height: 1.55;
}

.vfr-route-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0 0;
}

.vfr-route-grid > div {
  padding: 12px;
  border: 1px solid #4a586b;
  border-radius: 10px;
  background: #303b4c;
}

.vfr-route-grid .vfr-route-grid-wide {
  grid-column: 1 / -1;
}

.vfr-detail-grid,
.vfr-detail-times {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.vfr-detail-grid > div,
.vfr-detail-times > div {
  padding: 14px;
  border: 1px solid #4a586b;
  border-radius: 10px;
  background: #303b4c;
}

.vfr-detail-times {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.vfr-detail dt {
  color: #9daabc;
  font-size: 12px;
  font-weight: 800;
}

.vfr-detail dd {
  margin: 7px 0 0;
  font-size: 20px;
  font-weight: 850;
}

.vfr-detail-note {
  margin: 18px 0 0;
  color: #aeb9c8;
  font-size: 13px;
  line-height: 1.65;
}

.vfr-detail-fpl {
  margin: 0;
  padding: 14px;
  overflow-x: auto;
  border: 1px solid #4a586b;
  border-radius: 10px;
  color: #dfe7f3;
  background: #111a29;
  font-family: "Cascadia Mono", "Consolas", monospace;
  font-size: 12px;
  line-height: 1.7;
  white-space: pre-wrap;
}

@media (max-width: 720px) {
  body[data-vfr-board] .topbar {
    justify-content: center;
  }

  .vfr-toolbar {
    grid-template-columns: 40px minmax(0, 1fr) 54px;
  }

  .vfr-toolbar,
  .vfr-mode-row,
  .vfr-date-row {
    gap: 10px;
  }

  .vfr-date-row {
    grid-template-columns: 44px minmax(0, 1fr) 44px 66px;
  }

  .vfr-back,
  .vfr-icon-button,
  .vfr-date-row button,
  .vfr-airport,
  .vfr-chip,
  .vfr-search {
    min-height: 48px;
  }

  .vfr-board-tools {
    align-items: stretch;
    flex-direction: column;
    padding: 10px 14px;
  }

  .vfr-board-tools .vfr-search {
    flex: none;
  }

  .vfr-filter-actions {
    width: 100%;
  }

  .vfr-filter-button {
    flex: 1 1 0;
  }

  .vfr-column-head,
  .vfr-card-main {
    grid-template-columns: 1.35fr 0.85fr 0.9fr 0.9fr 0.9fr 0.9fr;
  }

  .vfr-detail-body {
    padding: 18px;
  }

  .vfr-detail-grid,
  .vfr-detail-times,
  .vfr-route-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .source-label,
  .module-nav {
    display: none;
  }

  main,
  footer {
    width: min(100% - 28px, 1240px);
  }

  .hero {
    align-items: flex-start;
    flex-direction: column;
    padding-top: 46px;
  }

  .home-hero {
    padding: 42px 0 30px;
  }

  .service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .service-card {
    min-height: 190px;
    padding: 17px;
    border-radius: 16px;
  }

  .service-icon {
    top: 15px;
    right: 16px;
    font-size: 34px;
  }

  .service-copy strong {
    margin-bottom: 0;
    font-size: 20px;
    line-height: 1.2;
  }

  .service-copy > span:last-child {
    display: none;
  }

  .service-action {
    margin-top: 15px;
    font-size: 10px;
  }

  .control-panel {
    grid-template-columns: 1fr;
  }

  .primary-button {
    width: 100%;
  }

  .board-header,
  .filter-row {
    align-items: flex-start;
  }

  .filter-row {
    flex-direction: column;
  }

  th,
  td {
    padding: 14px;
  }

  .workspace-shell {
    min-height: 330px;
    padding: 34px 24px;
  }

  .detail-header {
    padding: 18px 20px;
  }

  .detail-facts {
    grid-template-columns: repeat(2, 1fr);
    padding: 14px 20px;
  }

  .detail-facts > div {
    padding: 3px 10px;
    border-right: 1px solid var(--line);
  }

  .detail-facts dd {
    margin-top: 5px;
    font-size: 19px;
  }

  .detail-facts > div:nth-child(2n) {
    border-right: 0;
  }

  .detail-actions {
    align-items: stretch;
    flex-direction: column;
    gap: 18px;
    padding: 22px;
  }

  .detail-aircraft-media {
    gap: 8px;
    padding: 12px 20px 16px;
  }

  .detail-aircraft-photo-link,
  .detail-aircraft-photo-empty {
    width: min(100%, 36vh);
    height: auto;
  }

  .detail-aircraft-photo-footer {
    display: block;
  }

  .detail-photo-source {
    gap: 6px 10px;
  }

  .photo-link {
    justify-content: center;
  }
}
