:root {
  color-scheme: light;
  --paper: #f3efe5;
  --paper-raised: #faf7ef;
  --ink: #202522;
  --ink-muted: #65645e;
  --oxblood: #8f2639;
  --rule: #b8b0a1;
  --error: #a32d24;
  --success: #35624a;
  --serif: "Noto Serif TC", "Source Han Serif TC", Georgia, serif;
  --sans: "Noto Sans TC", system-ui, sans-serif;
  font-family: var(--sans);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { background: var(--paper); color: var(--ink); scroll-behavior: smooth; }
body { min-width: 0; margin: 0; background: var(--paper); }
button, input, select { min-height: 44px; font: inherit; }
button, select { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .45; }
:focus-visible { outline: 3px solid var(--oxblood); outline-offset: 3px; }

.masthead {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: min(1040px, 100%);
  margin: 0 auto;
  padding: 13px clamp(16px, 4vw, 32px);
  border-bottom: 1px solid var(--rule);
  background: color-mix(in srgb, var(--paper) 94%, transparent);
}
.journal-wordmark {
  color: var(--ink);
  font: italic 600 18px/1 var(--serif);
  text-decoration: none;
}
.edition {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
}
.quiet-button {
  justify-self: end;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--oxblood);
  font-weight: 700;
}
.pwa-status {
  position: sticky;
  top: 58px;
  z-index: 19;
  display: grid;
  gap: 8px;
  width: min(1040px, calc(100% - 28px));
  margin: 10px auto 0;
}
.pwa-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: rgba(250, 247, 239, .96);
  box-shadow: 0 10px 24px rgba(32, 37, 34, .08);
}
.pwa-banner[hidden] {
  display: none;
}
.pwa-banner p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 13px;
  line-height: 1.45;
}
main { width: min(1040px, 100%); margin: 0 auto; padding: 0 clamp(16px, 4vw, 32px) 56px; }
.intro { max-width: 660px; padding: clamp(26px, 6vw, 58px) 0 10px; }
.kicker {
  margin: 0 0 7px;
  color: var(--oxblood);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}
h1, h2, .result-row h3, .detail-heading h2 {
  font-family: var(--serif);
  font-weight: 500;
}
h1 { margin: 0; font-size: clamp(32px, 6vw, 56px); line-height: 1.02; letter-spacing: -.04em; }
.intro > p:last-child { margin: 12px 0 0; color: var(--ink-muted); line-height: 1.55; }
.search-area { max-width: 720px; padding: 16px 0 34px; }
.search-shell { position: relative; }
.search-shell > label { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 750; }
.search-control {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  border-bottom: 2px solid var(--ink);
}
.search-control input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 18px;
}
.search-control input::-webkit-search-cancel-button {
  appearance: none;
  display: none;
}
.search-icon { color: var(--oxblood); font-size: 25px; }
.icon-button { width: 44px; padding: 0; border: 0; background: transparent; color: var(--ink-muted); font-size: 22px; }
.suggestions {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 15;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--paper-raised);
  box-shadow: 0 16px 36px rgba(32, 37, 34, .14);
}
.suggestion {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 0;
  border-bottom: 1px solid var(--rule);
  background: transparent;
  color: var(--ink);
  text-align: left;
}
.suggestion:last-child { border-bottom: 0; }
.suggestion small { display: block; margin-top: 3px; color: var(--ink-muted); }
.suggestion-code { font-size: 20px; font-weight: 850; letter-spacing: -.05em; }
.recent-wrap, .recent-list { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.recent-wrap { margin-top: 14px; color: var(--ink-muted); font-size: 12px; }
.recent-list button { border: 0; border-bottom: 1px solid var(--rule); background: transparent; color: var(--ink); }
.results-journal { border-top: 1px solid var(--ink); padding-top: 22px; }
.results-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; }
.results-heading h2 { margin: 0; font-size: clamp(26px, 4vw, 38px); }
.airport-overview {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 0 16px;
  border-bottom: 1px solid var(--rule);
}
.airport-overview[hidden] { display: none; }
.airport-overview > strong {
  font-size: clamp(42px, 8vw, 72px);
  line-height: .82;
  letter-spacing: -.07em;
}
.airport-overview > div { display: grid; gap: 5px; text-align: right; }
.airport-overview small { color: var(--ink-muted); }
.quick-filters {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 11px 0;
  border-bottom: 1px solid var(--rule);
}
.quick-filter {
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink-muted);
  font-size: 13px;
  font-weight: 750;
}
.quick-filter.active { color: var(--oxblood); text-decoration: underline; text-underline-offset: 5px; }
.region-shortcuts {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow-x: auto;
  padding: 0 0 13px;
  border-bottom: 1px solid var(--rule);
  color: var(--ink-muted);
  font-size: 12px;
}
.region-shortcuts span {
  flex: 0 0 auto;
  font-weight: 800;
  letter-spacing: .08em;
}
.region-shortcut {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  font-weight: 750;
}
.region-shortcut.active {
  border-color: var(--oxblood);
  color: var(--oxblood);
}
.result-summary { margin: 14px 0 4px; color: var(--ink-muted); font-size: 13px; }
.result-list { border-top: 1px solid var(--rule); }
.result-row { padding: 17px 0; border-bottom: 1px solid var(--rule); }
.result-kicker {
  color: var(--oxblood);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.result-body { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.result-row h3 { margin: 6px 0 5px; font-size: clamp(19px, 3vw, 24px); line-height: 1.12; }
.result-row p { margin: 0; color: var(--ink-muted); font-size: 13px; line-height: 1.5; }
.result-facilities { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; font-size: 11px; font-weight: 700; }
.result-facilities span:first-child { color: var(--oxblood); }
.text-action {
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--oxblood);
  font-size: 12px;
  font-weight: 750;
}
.state-panel {
  margin: 18px 0;
  padding: 22px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.state-panel p { color: var(--ink-muted); line-height: 1.5; }
.state-panel.error { color: var(--error); }
.primary-button, .secondary-button {
  padding: 0 15px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  background: transparent;
  color: var(--ink);
  font-weight: 750;
}
.primary-button { border-color: var(--oxblood); background: var(--oxblood); color: var(--paper-raised); }
dialog { max-width: none; padding: 0; border: 0; background: transparent; }
dialog::backdrop { background: rgba(32, 37, 34, .42); }
.sheet { width: min(640px, calc(100% - 20px)); margin: auto auto 10px; }
.sheet-panel, .detail-panel {
  max-height: calc(100dvh - 20px);
  overflow-y: auto;
  padding: 22px;
  border-radius: 10px;
  background: var(--paper-raised);
  box-shadow: 0 18px 45px rgba(32, 37, 34, .18);
}
.sheet-header, .detail-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.filter-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 20px 0; }
.filter-grid label { display: grid; gap: 7px; color: var(--ink-muted); font-size: 12px; font-weight: 700; }
.filter-grid select { width: 100%; min-width: 0; padding: 0 10px; border: 1px solid var(--rule); border-radius: 4px; background: var(--paper-raised); color: var(--ink); }
.detail-dialog { width: min(760px, calc(100% - 20px)); margin: 10px auto; }
.detail-heading { padding: 24px 0 18px; border-bottom: 1px solid var(--rule); }
.detail-code { display: block; font-size: 52px; font-weight: 850; line-height: .9; letter-spacing: -.07em; }
.detail-heading h2 { margin: 12px 0 5px; font-size: clamp(26px, 5vw, 42px); }
.detail-heading p, .data-note { color: var(--ink-muted); }
.detail-facts { margin: 0; }
.detail-fact { display: grid; grid-template-columns: minmax(90px, .35fr) 1fr; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--rule); }
.detail-fact dt { color: var(--oxblood); font-size: 11px; font-weight: 800; letter-spacing: .1em; }
.detail-fact dd { margin: 0; line-height: 1.6; white-space: pre-line; }
.raw-copy summary { min-height: 44px; display: flex; align-items: center; color: var(--oxblood); cursor: pointer; font-weight: 750; }
.raw-section { padding: 14px 0; border-top: 1px solid var(--rule); }
.community-section {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--ink);
}
.community-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}
.community-heading h3 {
  margin: 0 0 5px;
  font-family: var(--serif);
  font-size: clamp(22px, 4vw, 32px);
  font-weight: 500;
}
.community-heading p,
.community-empty,
.community-author {
  color: var(--ink-muted);
}
.community-list {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}
.community-report {
  padding: 14px 0;
  border-top: 1px solid var(--rule);
}
.community-report-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: var(--oxblood);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
}
.community-score {
  margin: 10px 0 6px;
  font-weight: 800;
}
.community-report blockquote {
  margin: 0;
  color: var(--ink);
  line-height: 1.65;
}
.community-photos {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-top: 12px;
}
.community-photo-button {
  width: 88px;
  height: 88px;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: transparent;
  cursor: zoom-in;
  overflow: hidden;
}
.community-photo-button:focus-visible {
  outline: 2px solid var(--oxblood);
  outline-offset: 2px;
}
.community-photo-button img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.photo-lightbox {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 20px;
  background: transparent;
}
.photo-lightbox[open] {
  display: grid;
  place-items: center;
}
.photo-lightbox::backdrop {
  background: rgba(18, 20, 19, .86);
}
.photo-lightbox-surface {
  max-width: 100%;
  max-height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-out;
}
.photo-lightbox-surface img {
  max-width: min(1120px, 92vw);
  max-height: 86vh;
  display: block;
  border-radius: 6px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .36);
  object-fit: contain;
}
.photo-lightbox-open {
  overflow: hidden;
}
.report-form textarea,
.report-form input,
.report-form select {
  width: 100%;
  min-width: 0;
  padding: 0 10px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--paper-raised);
  color: var(--ink);
}
.report-form textarea {
  min-height: 130px;
  padding-top: 10px;
  resize: vertical;
}
.report-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 20px 0;
}
.report-form label {
  display: grid;
  gap: 7px;
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 700;
}
.form-status {
  min-height: 24px;
  color: var(--oxblood);
  font-weight: 750;
}
.offline-page {
  max-width: 620px;
  padding-top: 72px;
}
.admin-login {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin: 18px 0;
}
.admin-login label,
.admin-report label {
  display: grid;
  gap: 7px;
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 700;
}
.admin-login input,
.admin-report textarea {
  width: 100%;
  min-width: 0;
  padding: 0 10px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--paper-raised);
  color: var(--ink);
}
.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}
.admin-reports {
  display: grid;
  gap: 18px;
}
.admin-report {
  padding: 18px 0;
  border-top: 1px solid var(--rule);
}
.admin-report h2 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-weight: 500;
}
.admin-report textarea {
  min-height: 74px;
  padding-top: 10px;
}
.official-link { display: inline-flex; align-items: center; min-height: 44px; margin-top: 18px; border-bottom: 1px solid var(--ink); color: var(--ink); text-decoration: none; font-weight: 750; }
.official-missing { color: var(--ink-muted); }
.back-button { padding: 0; border: 0; background: transparent; color: var(--oxblood); font-weight: 750; }
.sheet-actions { display: flex; gap: 12px; }
.sheet-actions button { flex: 1; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 24px; color: var(--ink-muted); font-size: 13px; }
footer { width: min(1040px, 100%); margin: 0 auto; padding: 0 24px 40px; color: var(--ink-muted); text-align: center; font-size: 12px; line-height: 1.6; }

@media (min-width: 760px) {
  .result-list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 34px; }
  .result-row:nth-child(2) { border-top: 0; }
}

@media (max-width: 700px) {
  .masthead { grid-template-columns: 1fr auto; padding: 11px 14px; }
  .edition { display: none; }
  .pwa-status { top: 52px; width: calc(100% - 12px); }
  .pwa-banner { align-items: stretch; display: grid; }
  .pwa-banner button { width: 100%; }
  main { padding-left: 14px; padding-right: 14px; }
  .intro { padding-top: 24px; }
  .intro h1 { font-size: 34px; }
  .search-area { padding-bottom: 24px; }
  .results-heading { align-items: center; }
  .airport-overview { padding-top: 20px; }
  .result-body { gap: 12px; }
  .result-body .text-action { align-self: end; }
  .filter-grid { grid-template-columns: 1fr; }
  .community-heading { display: grid; }
  .report-grid { grid-template-columns: 1fr; }
  .admin-login { grid-template-columns: 1fr; }
  .sheet { width: calc(100% - 12px); margin-bottom: 6px; }
  .sheet-panel, .detail-panel { padding: 18px 14px; }
  .detail-dialog { width: calc(100% - 12px); margin: 6px auto; }
  .detail-fact { grid-template-columns: 82px 1fr; gap: 12px; }
}

@media (max-width: 360px) {
  .journal-wordmark { font-size: 16px; }
  .quiet-button { font-size: 12px; }
  .intro h1 { font-size: 30px; }
  .airport-overview { align-items: start; }
  .airport-overview > div { text-align: left; }
  .result-body { display: block; }
  .text-action { margin-top: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
