/* 网页版样式：基调移植自 webapp/index.html（Telegram Web App 表单），
   颜色改为独立站中性配色，不再依赖 Telegram 主题变量。 */
:root {
  --bg: #ffffff;
  --text: #1c1c1e;
  --hint: #8e8e93;
  --button: #2481cc;
  --button-text: #ffffff;
  --secondary-bg: #f2f2f7;
  --destructive: #d70015;
  --ok: #1a7f37;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0; padding: 0 14px calc(28px + env(safe-area-inset-bottom));
  background: var(--bg); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px; line-height: 1.55;
}
.wrap { max-width: 720px; margin: 0 auto; }
header.top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0 10px; border-bottom: 1px solid var(--secondary-bg); margin-bottom: 16px;
}
header.top .brand { font-weight: 700; font-size: 17px; }
header.top nav a { margin-left: 14px; font-size: 14px; }
a { color: var(--button); text-decoration: none; }
h1 { font-size: 20px; margin: 4px 0 8px; }
h2 { font-size: 17px; margin: 22px 0 8px; }
.sub { color: var(--hint); font-size: 13px; margin-bottom: 16px; }
.hint { color: var(--hint); font-size: 12px; margin-top: 6px; }
.field { margin-bottom: 20px; }
label.title { display: block; font-weight: 600; margin-bottom: 8px; }
input[type="text"], input[type="number"], input[type="date"], input[type="email"], textarea {
  width: 100%; padding: 12px; font-size: 16px; min-height: 48px;
  border: 1px solid var(--hint); border-radius: 12px;
  background: var(--bg); color: var(--text);
}
textarea { min-height: 72px; }
input:focus, textarea:focus { outline: 2px solid var(--button); outline-offset: -1px; border-color: var(--button); }
button.primary, .btn-primary {
  display: block; width: 100%; padding: 14px; font-size: 16px; font-weight: 600;
  background: var(--button); color: var(--button-text); border: 0; border-radius: 12px;
  min-height: 50px; touch-action: manipulation; cursor: pointer; text-align: center;
}
button.danger { background: var(--destructive); }
button.plain {
  padding: 10px 16px; font-size: 15px; border: 1px solid var(--hint); border-radius: 12px;
  background: var(--bg); color: var(--text); cursor: pointer; min-height: 44px;
}
.errors {
  color: var(--destructive); font-size: 14px;
  border: 1px solid var(--destructive); border-radius: 12px; padding: 10px 12px; margin-bottom: 16px;
}
.notice {
  border: 1px solid var(--button); border-radius: 12px; padding: 10px 12px;
  margin-bottom: 16px; font-size: 14px;
}
.notice.warn { border-color: var(--destructive); color: var(--destructive); }
.card {
  border: 1px solid var(--secondary-bg); background: var(--secondary-bg);
  border-radius: 12px; padding: 12px 14px; margin-bottom: 12px;
}
.card .row { display: flex; justify-content: space-between; gap: 10px; }
.muted { color: var(--hint); font-size: 13px; }
table.list { width: 100%; border-collapse: collapse; font-size: 14px; }
table.list td, table.list th { padding: 8px 6px; border-bottom: 1px solid var(--secondary-bg); text-align: left; }
pre.rules { white-space: pre-wrap; font-family: inherit; font-size: 14px; line-height: 1.6; }

/* 机场标签输入（移植自 webapp） */
.tagbox {
  border: 1px solid var(--hint); border-radius: 12px; padding: 8px;
  position: relative; background: var(--bg);
}
.tagbox:focus-within { outline: 2px solid var(--button); outline-offset: -1px; border-color: var(--button); }
.tagbox.full { opacity: .75; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--secondary-bg); border-radius: 999px;
  padding: 6px 6px 6px 12px; font-size: 14px; min-height: 36px;
}
.tag b { font-weight: 600; }
.tag .city { color: var(--hint); font-size: 12px; }
.tag button {
  border: 0; background: var(--hint); color: #fff; cursor: pointer;
  width: 24px; height: 24px; border-radius: 50%; font-size: 14px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center; padding: 0;
  touch-action: manipulation;
}
.tagbox input[type="text"] { border: 0; padding: 8px 4px; min-height: 40px; outline: none !important; }
.suggest {
  display: none; position: absolute; left: -1px; right: -1px; top: calc(100% + 4px);
  background: var(--bg); border: 1px solid var(--hint); border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.18); z-index: 30; overflow: hidden;
  max-height: 264px; overflow-y: auto;
}
.suggest.show { display: block; }
.suggest .opt {
  padding: 12px 14px; min-height: 48px; cursor: pointer; font-size: 15px;
  display: flex; align-items: baseline; gap: 8px; touch-action: manipulation;
}
.suggest .opt:active { background: var(--secondary-bg); }
.suggest .opt b { font-weight: 700; }
.suggest .opt .nm { color: var(--hint); font-size: 13px; }

.seg { display: flex; gap: 8px; flex-wrap: wrap; }
.seg label, .chips label {
  border: 1px solid var(--hint); border-radius: 999px;
  padding: 10px 14px; font-size: 14px; cursor: pointer; user-select: none;
  min-height: 44px; display: inline-flex; align-items: center; touch-action: manipulation;
}
.seg input, .chips input { display: none; }
.seg label.on, .chips label.on { background: var(--button); color: var(--button-text); border-color: var(--button); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 520px) {
  .grid3 { grid-template-columns: 1fr 1fr; }
  .grid3 .wide { grid-column: span 2; }
  .grid2 { grid-template-columns: 1fr; }
}
.switch-row { display: flex; align-items: center; justify-content: space-between; min-height: 48px; }
.switch-row input { width: 26px; height: 26px; accent-color: var(--button); }
.dates { display: none; }
.dates.show { display: block; }
