:root {
  color-scheme: light;
  --bg: #e2eaf3;
  --panel: rgba(248, 251, 254, 0.93);
  --text: #182231;
  --muted: #667386;
  --line: #cbd6e3;
  --primary: #F07820;
  --primary-dark: #C45E08;
  --green: #157a4a;
  --green-soft: #e2f6eb;
  --yellow-soft: #fff3d7;
  --blue-soft: #e8f0ff;
  --shadow: 0 18px 48px rgba(31, 44, 62, 0.075), 0 2px 10px rgba(31, 44, 62, 0.04);

  /* 스케줄 유형 색상 */
  --c-off: #9ba6b7;
  --c-off-bg: #eef0f4;
  --c-dom: #2e6fd6;
  --c-dom-bg: #e3edff;
  --c-intl: #7a4fcf;
  --c-intl-bg: #efe8ff;
  --c-lay: #b16ad8;
  --c-lay-bg: #f5e8fb;
  --c-rsv: #c69300;
  --c-rsv-bg: #fff3d0;
  --c-stby: #d56b1f;
  --c-stby-bg: #ffe7d3;

  /* 상태 */
  --c-warn: #b78400;
  --c-fail: #c43a2a;
  --c-pass: #157a4a;
}

* { box-sizing: border-box; }

/* hidden 속성이 display:flex/grid 등 명시 스타일을 덮을 수 있게 강제 */
[hidden] { display: none !important; }

html { touch-action: pan-x pan-y; -webkit-text-size-adjust: 100%; height: 100%; }
body {
  margin: 0;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background:
    radial-gradient(circle at 96% -6%, rgba(240, 120, 32, 0.23) 0, rgba(240, 120, 32, 0.07) 24%, transparent 44%),
    radial-gradient(circle at -12% 43%, rgba(63, 105, 158, 0.17) 0, transparent 38%),
    linear-gradient(180deg, #f4f7fa 0%, #e8eef5 48%, #dce6f0 100%);
  color: var(--text);
  font-family: "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  touch-action: pan-x pan-y;
}

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

.pull-refresh-indicator {
  height: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: #ff5d3d;
  transition: height 0.18s ease;
}

.app {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px 24px 24px;
  padding-top: calc(24px + env(safe-area-inset-top));
  padding-left: calc(24px + env(safe-area-inset-left));
  padding-right: calc(24px + env(safe-area-inset-right));
}

/* ===== 헤더 ===== */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-bottom: 18px; padding: 14px 16px; flex-wrap: wrap;
  position: sticky; top: env(safe-area-inset-top); z-index: 20;
  border: 1px solid rgba(203, 214, 227, 0.92); border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 249, 242, 0.96), rgba(238, 245, 252, 0.94));
  box-shadow: 0 14px 36px rgba(38, 52, 72, 0.09);
}
.topbar.is-compact {
  min-height: 46px;
  justify-content: flex-end;
  position: fixed;
  top: calc(env(safe-area-inset-top) + 12px);
  right: calc(env(safe-area-inset-right) + 16px);
  width: auto;
  margin: 0;
  padding: 0;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  pointer-events: none;
  z-index: 90;
}
.topbar.is-compact .brand,
.topbar.is-compact .credit-pill { display: none; }
.topbar.is-compact .status-strip,
.topbar.is-compact .bell-button { pointer-events: auto; }
.topbar.is-compact .bell-button { margin-right: 0; }
.app > .view { padding-top: 54px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 10px; background: var(--primary); color: #fff; font-weight: 800; font-size: 20px; }
.brand strong { display: block; font-size: 16px; }
.brand span { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }

.status-strip { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.status-strip > span, .status-strip .credit-pill { display: inline-flex; align-items: center; min-height: 32px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--muted); font-size: 12px; font-weight: 600; }
.credit-pill { color: var(--text); }
.credit-pill b { color: var(--primary); margin-right: 3px; }
.header-quals { display: none; }
.status-strip .rating-pill { color: #b07a00; background: var(--yellow-soft); border-color: #e8d27a; }
.status-strip .airline-pill { color: #fff; background: var(--primary); border-color: var(--primary-dark); font-weight: 700; }

.bell-button { position: relative; min-width: 38px; min-height: 38px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--panel); font-size: 16px; margin-right: 14px; }
.bell-badge { position: absolute; top: -7px; right: -16px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--primary); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--bg); pointer-events: none; white-space: nowrap; }

.section-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.find-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
#refreshFindBtn { white-space: nowrap; }

/* 스왑하기 서브탭 (찾기 / 요청 올리기) */
.swap-subtabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 14px; padding: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.swap-subtab { padding: 10px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-weight: 700; font-size: 14px; cursor: pointer; }
.swap-subtab.is-active { background: var(--primary); color: #fff; }
.section-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }

h1, h2, h3, h4, p { margin-top: 0; }
h1 { max-width: 760px; margin-bottom: 8px; font-size: clamp(28px, 4vw, 42px); line-height: 1.1; }
h2 { margin-bottom: 6px; font-size: 24px; }
h3 { margin-bottom: 8px; font-size: 17px; }
h4 { margin-bottom: 6px; font-size: 14px; }
p { color: var(--muted); }

.eyebrow { margin-bottom: 6px; color: var(--primary); font-size: 12px; font-weight: 800; letter-spacing: 0.5px; }
.hint { color: var(--muted); font-size: 12px; margin-top: 4px; }
.field-label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 700; }
.policy-consent { display: flex !important; flex-direction: row !important; align-items: flex-start; gap: 9px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #f7f9fc; font-size: 12px; line-height: 1.55; }
.policy-consent input { width: auto; min-height: auto; margin-top: 3px; flex: 0 0 auto; }
.policy-consent a, .policy-links a { color: var(--primary-dark); font-weight: 700; }

/* ===== 패널 공통 ===== */
.signup-panel, .calendar-panel, .side-panel, .form-panel, .filter-panel, .profile-form, .profile-card, .match-card, .request-card, .saved-searches, .bidirectional-form, .post-footer {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), var(--panel));
  box-shadow: var(--shadow);
}
.calendar-panel { background: #fff; }

/* ===== 회원가입 (모달) ===== */
.signup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,22,32,0.6);
  z-index: 200;
}
.signup-dialog {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: calc(100vw - 32px);
  max-width: 480px;
  max-height: 92dvh;
  max-height: 92vh;
  padding: 0;
  border: 0;
  border-radius: 12px;
  overflow: hidden;
  box-sizing: border-box;
  box-shadow: var(--shadow);
  z-index: 201;
  background: #fff;
  display: flex;
  flex-direction: column;
}
body.no-scroll .app { overflow: hidden; }
.signup-head {
  padding: 24px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  text-align: center;
}
.signup-head .eyebrow { color: #fff; opacity: 0.85; }
.signup-head h2 { margin: 6px 0; font-size: 32px; color: #fff; }
.signup-head p { color: rgba(255,255,255,0.92); margin: 4px 0; font-size: 13px; line-height: 1.5; }
.signup-head .signup-bonus { margin-top: 12px; padding: 8px 12px; background: rgba(0,0,0,0.18); border-radius: 8px; color: #fff; font-weight: 700; }
.signup-dialog .signup-form { padding: 20px; max-height: calc(92vh - 200px); overflow-y: auto; }

/* 기존 panel 클래스도 fallback */
.signup-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 440px;
  gap: 24px;
  align-items: start;
  margin-bottom: 22px;
  padding: 24px;
}

/* 언어 토글 */
.lang-toggle { min-width: 56px; height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-weight: 700; font-size: 12px; color: var(--text); cursor: pointer; }
.lang-toggle:hover { background: var(--bg); border-color: #243449; }
.signup-form, .profile-form { display: grid; gap: 13px; padding: 0; }
.signup-bonus { color: var(--c-pass); font-weight: 700; margin-top: 12px; }
.signup-bonus strong { color: var(--primary); }

label { display: grid; gap: 7px; font-size: 13px; font-weight: 700; color: var(--text); }
input, select, textarea { width: 100%; min-height: 40px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--text); }
input[readonly] { background: #f6f8fb; color: var(--muted); }

.check-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.check-row label, .check-grid label { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: 13px; font-weight: 600; }
.check-row input, .check-grid input { width: auto; min-height: auto; }

/* ===== 뷰 토글 / 탭 ===== */
.view { display: none; }
.view.is-active { display: block; }

.view-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.view-toggle button { padding: 8px 14px; border: 0; background: #fff; color: var(--muted); font-weight: 700; font-size: 13px; }
.view-toggle button.is-active { background: #243449; color: #fff; }

/* ===== 누적 진행바 ===== */
.metrics-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow);
}
.metric { display: grid; gap: 6px; }
.metric-label { font-size: 11px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.metric strong { font-size: 14px; font-weight: 800; }
.metric-bar { height: 8px; background: #eef2f6; border-radius: 999px; overflow: hidden; }
.metric-fill { height: 100%; background: linear-gradient(90deg, #4caf7a, #157a4a); border-radius: 999px; transition: width 0.4s ease; }
.metric-fill.warn { background: linear-gradient(90deg, #f0b945, #c08400); }
.metric-fill.danger { background: linear-gradient(90deg, #e87264, #c43a2a); }
.deadline-text { color: var(--c-fail); }
.deadline-text.calm { color: var(--text); }

/* 메트릭 요약 바 (평소 정상 / 경고 시 강조) */
.metrics-summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; margin-bottom: 12px; padding: 12px 14px;
  border: 1px solid var(--green-soft); border-radius: 10px;
  background: var(--green-soft); color: var(--green);
  font-size: 13px; font-weight: 700; cursor: pointer;
}
.metrics-summary.has-warn { background: #fdecea; border-color: #f0b8b2; color: var(--c-fail); }
.metrics-summary-toggle { font-size: 12px; font-weight: 600; opacity: 0.85; white-space: nowrap; }

/* ===== 달력 ===== */
.schedule-layout, .post-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; }
.calendar-panel { overflow: hidden; }
.calendar-month { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: #fff; flex-wrap: wrap; }
.month-nav { display: flex; align-items: center; gap: 12px; }
.month-nav > div { text-align: center; min-width: 200px; }
.month-nav-btn { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: 18px; font-weight: 800; color: var(--text); cursor: pointer; line-height: 1; }
.month-nav-btn:hover { background: #f6f8fb; border-color: #243449; }
.calendar-empty { background: #fafbfd; border-top: 1px solid var(--line); border-right: 1px solid var(--line); min-height: 122px; }
.calendar-empty:nth-child(7n) { border-right: 0; }
.calendar-month strong { font-size: 18px; }
.calendar-month span { color: var(--muted); font-size: 12px; }

.available-months { display: flex; gap: 6px; flex-wrap: wrap; }
.available-months:empty { display: none; }
.month-chip { padding: 5px 10px; border: 1px solid var(--line); border-radius: 14px; background: #fff; color: var(--text); font-size: 12px; font-weight: 700; cursor: pointer; line-height: 1.2; }
.month-chip:hover { background: #f6f8fb; border-color: #243449; }
.month-chip.is-active { background: var(--primary); color: #fff; border-color: var(--primary); }
.month-chip small { opacity: .75; font-weight: 600; margin-left: 2px; }

.legend { display: flex; gap: 4px; flex-wrap: wrap; }
.lg { padding: 3px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; }
.lg-off { background: var(--c-off-bg); color: var(--c-off); }
.lg-dom { background: var(--c-dom-bg); color: var(--c-dom); }
.lg-intl { background: var(--c-intl-bg); color: var(--c-intl); }
.lg-lay { background: var(--c-lay-bg); color: var(--c-lay); }
.lg-rsv { background: var(--c-rsv-bg); color: var(--c-rsv); }
.lg-stby { background: var(--c-stby-bg); color: var(--c-stby); }
.calendar-icon-note {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.45;
}

.calendar-weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(94px, 1fr)); }
.calendar-weekdays span { padding: 10px; background: #eef2f6; color: var(--muted); font-size: 12px; font-weight: 800; text-align: center; }
.calendar-weekdays span:nth-child(6), .calendar-weekdays span:nth-child(7) { color: var(--primary); }

.calendar-day {
  min-height: 122px;
  padding: 6px;
  border: 0;
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  background: #fff;
  text-align: left;
  user-select: none;
  position: relative;
  display: flex;
  flex-direction: column;
}
.calendar-day:nth-child(7n) { border-right: 0; }
.calendar-day.is-weekend { background: #fafbfd; }
.calendar-day.is-selected { outline: 3px solid #243449; outline-offset: -3px; z-index: 2; }
.calendar-day.is-warn-consec::before { content: "⚠"; position: absolute; top: 4px; right: 4px; font-size: 12px; color: var(--c-warn); }
.calendar-day.is-holiday { background: #fff5f5; }

.date-number { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; color: var(--muted); font-size: 12px; font-weight: 800; }
.date-number .watchers { color: var(--primary); font-size: 10px; }

/* 패턴 띠 - 상단 굵은 색띠 */
.pattern-band { height: 4px; margin: 0 -6px 4px; background: var(--c-intl); }
.pattern-band.lay { background: var(--c-lay); }
.pattern-band.dom { background: var(--c-dom); }
.pattern-band.gnd { background: #64748b; }
.pattern-band.start { margin-left: 2px; border-radius: 4px 0 0 4px; }
.pattern-band.end { margin-right: 2px; border-radius: 0 4px 4px 0; }
.pattern-band.single { margin: 0 2px 4px; border-radius: 4px; }

/* 스케줄 pill (셀 내부) */
.schedule-pill {
  display: grid;
  gap: 2px;
  flex: 1;
  padding: 6px;
  border-radius: 6px;
  font-size: 11px;
  line-height: 1.3;
  position: relative;
}
.schedule-pill strong { min-width: 0; font-size: 12px; overflow-wrap: anywhere; }
.pill-time-position + strong { padding-right: 34px; }
.schedule-pill small { display: block; color: var(--muted); font-size: 10px; }
.pill-route { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.pill-time-position { position: absolute; right: 4px; top: 4px; font-size: 9px; font-weight: 700; padding: 1px 4px; border-radius: 3px; background: rgba(0,0,0,0.06); }

.pill-off { background: var(--c-off-bg); color: var(--c-off); }
.pill-dom { background: var(--c-dom-bg); color: var(--c-dom); }
.pill-intl { background: var(--c-intl-bg); color: var(--c-intl); }
.pill-lay { background: var(--c-lay-bg); color: var(--c-lay); }
.pill-rsv { background: var(--c-rsv-bg); color: var(--c-rsv); }
.pill-stby { background: var(--c-stby-bg); color: var(--c-stby); }
.pill-pickup { background: #fdecea; color: var(--c-fail); }
.pill-arrival { background: #ede4f7; color: #6d4d9c; border: 1px dashed #b16ad8; font-style: italic; }
/* 지상근무·SIM 훈련(비행 아님) — 회색 계열로 비행과 확실히 구분, 스왑 불가 */
.pill-gnd { background: #eef1f5; color: #475569; border: 1px dashed #94a3b8; }

/* ===== 사이드 패널 ===== */
.side-panel, .form-panel, .filter-panel, .profile-form { padding: 18px; }
.side-panel button { width: 100%; margin-top: 10px; }
.side-panel h3 { margin-bottom: 12px; }

.empty-state { display: grid; min-height: 100px; place-items: center; padding: 16px; border: 1px dashed var(--line); border-radius: 8px; background: #f9fbfd; color: var(--muted); text-align: center; font-size: 13px; }

.selected-list, .card-list { display: grid; gap: 12px; }
.selected-item { padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.selected-item strong { display: block; margin-bottom: 6px; }
.selected-item dl { display: grid; gap: 6px; margin: 8px 0 0; }
.selected-item dl div { display: grid; grid-template-columns: 84px 1fr; gap: 8px; }
.selected-item dt { color: var(--muted); font-size: 11px; font-weight: 700; }
.selected-item dd { margin: 0; color: var(--text); font-size: 12px; line-height: 1.4; }

.pattern-summary { padding: 12px; border-radius: 8px; background: #f6f8fb; margin-bottom: 12px; }
.pattern-summary strong { display: block; font-size: 14px; margin-bottom: 4px; }
.pattern-summary .meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.pattern-summary .meta b { color: var(--text); }

/* ===== 룰 체크 ===== */
.rule-check { display: grid; gap: 6px; margin-top: 14px; }
.rule-check h4 { margin-bottom: 8px; }
.rule-check .rule-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 10px; border-radius: 6px; background: #f6f8fb; font-size: 12px; align-items: center; }
.rule-check .rule-row.fail { background: #fdecea; }
.rule-check .rule-row.warn { background: var(--yellow-soft); }
.rule-check .rule-row.pass { background: var(--green-soft); }
.rule-check .rule-row .verdict { font-weight: 700; font-size: 11px; padding: 2px 6px; border-radius: 4px; white-space: nowrap; }
.rule-check .rule-row.pass .verdict { color: var(--c-pass); background: #fff; }
.rule-check .rule-row.warn .verdict { color: var(--c-warn); background: #fff; }
.rule-check .rule-row.fail .verdict { color: var(--c-fail); background: #fff; }
.rule-check .disclaimer { font-size: 11px; color: var(--muted); padding: 6px; }

/* ===== 버튼 ===== */
.primary-button, .secondary-button {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 13px;
}
.primary-button { background: var(--primary); color: #fff; }
.primary-button:hover:not(:disabled) { background: var(--primary-dark); }
.primary-button:disabled, .secondary-button:disabled { cursor: not-allowed; opacity: 0.48; }
.secondary-button { border-color: var(--line); background: #fff; color: var(--text); }
.secondary-button:hover:not(:disabled) { background: #f6f8fb; }
.link-button { padding: 0; background: transparent; border: 0; color: var(--primary); font-weight: 700; font-size: 13px; }
.link-button.danger { color: var(--c-fail); margin-top: 10px; }
.req-respond-buttons { display: flex; gap: 8px; margin-top: 12px; }
.req-respond-buttons button { flex: 1; }
/* 열린 로스터 날짜 선택 (글작성자가 바꿀 날 고르기) */
.open-roster-pick { margin: 10px 0; padding: 10px 12px; border: 1px solid #c8d6ef; border-radius: 8px; background: var(--blue-soft); }
.open-roster-pick h4 { margin: 0 0 6px; font-size: 14px; color: #1d3a7a; }
.cmp-legend { margin: 0 0 8px; font-size: 10.5px; color: var(--muted); line-height: 1.5; }
.cmp-swatch { display: inline-block; width: 9px; height: 9px; border-radius: 2px; vertical-align: middle; margin-right: 2px; }
.cmp-swatch.take { background: #dbe8ff; border: 1px solid #6f9be8; }
.cmp-swatch.mine { background: #eceff3; border: 1px solid var(--line); }
/* 비교 달력 */
.compare-month-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin: 10px 2px 6px; }
.compare-month-head strong { font-size: 14px; color: var(--text); }
.compare-month-head span { font-size: 10px; color: var(--muted); }
.compare-calendars { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.cmp-cal { min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px; }
.cmp-cal h5 { display: flex; align-items: center; gap: 6px; margin: 0 0 3px; font-size: 12px; }
.cmp-cal > p { margin: 0 0 7px; font-size: 9.5px; line-height: 1.35; }
.cmp-owner-dot { width: 9px; height: 9px; border-radius: 50%; }
.cmp-owner-dot.mine { background: var(--primary); }
.cmp-owner-dot.take { background: #3f73ce; }
.cmp-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-size: 9.5px; color: var(--muted); margin-bottom: 3px; }
.cmp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cmp-cell { min-width: 0; min-height: 54px; padding: 3px; border: 1px solid transparent; border-radius: 6px; background: #fafbfc; display: flex; flex-direction: column; align-items: stretch; gap: 1px; text-align: left; font: inherit; overflow: hidden; }
.cmp-cell.empty { background: transparent; }
.cmp-cell .cmp-day { font-size: 10px; font-weight: 700; color: var(--text); }
.cmp-cell .cmp-day.muted { color: var(--line); }
.cmp-cell .cmp-take { font-size: 9.5px; font-weight: 700; color: #1d3a7a; line-height: 1.2; }
.cmp-cell .cmp-take em { display: block; font-style: normal; font-weight: 400; font-size: 8.5px; color: #4a67a8; }
.cmp-own-cell .cmp-own-duty { font-size: 9.5px; font-weight: 700; color: var(--text); }
.cmp-cell .cmp-ac { display: inline-block; margin-top: 1px; font-size: 8px; font-weight: 800; color: #b45309; background: #fff3e0; border-radius: 3px; padding: 0 3px; align-self: flex-start; }
button.cmp-cell.has-req.is-picked .cmp-ac { background: rgba(255,255,255,0.28); color: #fff; }
.cmp-own-cell em { font-style: normal; font-size: 8px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmp-own-cell small { margin-top: auto; color: var(--primary-dark); font-size: 7.5px; font-weight: 800; }
.cmp-own-cell.is-posted { background: #fff1e7; border-color: #f3a66e; }
.cmp-own-cell.has-own { cursor: pointer; }
.cmp-own-cell.has-own.is-inspected { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.cmp-request-cell.is-closed small { margin-top: auto; font-size: 7.5px; color: #b3bbc7; }
button.cmp-cell.has-req { background: #dbe8ff; border-color: #a7c3ee; cursor: pointer; }
button.cmp-cell.has-req.is-picked { background: var(--primary); border-color: var(--primary); }
button.cmp-cell.has-req.is-picked .cmp-day, button.cmp-cell.has-req.is-picked .cmp-take, button.cmp-cell.has-req.is-picked .cmp-take em { color: #fff; }
button.cmp-cell.has-req.is-swap-blocked { cursor: not-allowed; opacity: 0.45; filter: grayscale(0.7); }
.cmp-detail-panel { display: grid; gap: 6px; margin-top: 8px; }
.cmp-detail-panel[hidden] { display: none; }
.cmp-detail-card { padding: 9px; border: 1px solid #b8cae8; border-radius: 7px; background: #f4f8ff; }
.cmp-detail-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.cmp-detail-head strong { color: #1d3a7a; font-size: 11px; }
.cmp-detail-head b { color: var(--text); font-size: 11px; text-align: right; }
.cmp-detail-card > p { margin: 5px 0 0; color: #425b86; font-size: 10px; font-weight: 700; overflow-wrap: anywhere; }
.cmp-detail-times { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin-top: 7px; }
.cmp-detail-times span { padding: 5px; border-radius: 5px; background: #fff; text-align: center; }
.cmp-detail-times small, .cmp-detail-times b { display: block; }
.cmp-detail-times small { color: var(--muted); font-size: 8px; }
.cmp-detail-times b { margin-top: 1px; color: var(--text); font-size: 10px; }
.roster-pick-msg { margin-top: 8px; padding: 9px; border-radius: 7px; background: #fff; font-size: 11px; font-weight: 600; color: var(--muted); }
.roster-pick-msg.is-blocked { border: 1px solid #ef9a9a; background: #fff5f5; color: #c53030; line-height: 1.55; }
.compare-exchange-summary { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 7px; margin-bottom: 7px; }
.compare-exchange-summary span { min-width: 0; }
.compare-exchange-summary small, .compare-exchange-summary strong { display: block; }
.compare-exchange-summary small { margin-bottom: 2px; font-size: 9px; color: var(--muted); }
.compare-exchange-summary strong { color: var(--text); overflow-wrap: anywhere; }
.compare-exchange-summary b { color: var(--primary); font-size: 16px; }
.approval-notice { margin: 0 0 10px; padding: 10px 12px; border: 1px solid #f0b45c; border-radius: 8px; background: #fff7e7; color: #8a5700; font-size: 12px; font-weight: 700; line-height: 1.5; }
.approval-notice.waiting { border-color: #b9c9e4; background: #eef4ff; color: #2b4e86; }
.decline-closed-note { margin-top: 10px; padding: 10px 12px; border-radius: 8px; background: #f2f4f7; color: #596579; font-size: 12px; font-weight: 700; text-align: center; }

/* ===== 저장 검색 ===== */
.saved-searches { padding: 14px 18px; margin-bottom: 14px; }
.saved-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.saved-list { display: flex; gap: 8px; flex-wrap: wrap; }
.saved-item { display: flex; flex-direction: column; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: #f6f8fb; font-size: 12px; min-width: 200px; position: relative; }
.saved-item strong { font-size: 13px; margin-bottom: 2px; }
.saved-item .saved-meta { color: var(--muted); font-size: 11px; }
.saved-item .saved-del { position: absolute; top: 4px; right: 6px; background: transparent; border: 0; color: var(--muted); font-size: 14px; }
/* 🔔 스왑 알림(저장검색) 박스 */
.saved-search-box { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 12px; overflow: hidden; background: var(--panel); }
.saved-search-head { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 14px; background: transparent; border: 0; font-size: 13px; font-weight: 700; color: var(--text); cursor: pointer; }
#savedSearchBody { padding: 0 14px 14px; display: flex; flex-direction: column; gap: 10px; }
.saved-add-form { display: flex; flex-direction: column; gap: 8px; }
.saved-add-form input { width: 100%; }
.saved-field-label { font-size: 12px; font-weight: 700; color: var(--muted); margin-top: 2px; }
/* 프리미엄(PRO) 표시 */
.pro-badge { display: inline-block; background: linear-gradient(135deg, #ffb02e, #ff7a00); color: #fff; font-size: 10px; font-weight: 800; padding: 1px 6px; border-radius: 6px; margin: 0 4px; vertical-align: middle; letter-spacing: .5px; }
.saved-search-box.premium-feature { border-color: #ffcf8a; background: linear-gradient(180deg, #fffaf2, var(--panel)); }
.flow-choice-card.is-premium { border-color: #ffcf8a; background: linear-gradient(135deg, #fffaf2, #fff); }
.flow-choice-card.is-premium .flow-choice-icon { background: #fff0d5; }
.flow-choice-card.is-premium > b { color: #b86a00; }
.premium-alert-page-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.premium-alert-page-head .secondary-button { width: auto; flex: 0 0 auto; padding: 9px 12px; }
.premium-alert-page-head h2 { margin: 2px 0 4px; font-size: 20px; }
.premium-alert-page-head p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.premium-alert-page-box { padding: 14px; }
.premium-alert-page-box .premium-note { margin-bottom: 2px; }
.premium-note { font-size: 11.5px; color: #9a6300; background: #fff4e0; border: 1px solid #ffe0b0; border-radius: 8px; padding: 8px 10px; margin: 0; line-height: 1.5; }
.premium-lock { display: grid; gap: 8px; text-align: center; padding: 14px 12px; font-size: 12px; color: #9a6300; background: #fff4e0; border: 1px dashed #ffcf8a; border-radius: 8px; line-height: 1.6; }
.premium-lock strong { color: var(--text); font-size: 14px; }
.premium-lock small { display: block; }
.premium-lock button { width: 100%; margin-top: 2px; }
.premium-access-state { display: grid; gap: 4px; padding: 10px 11px; margin-bottom: 8px; border: 1px solid #ffcf8a; border-radius: 8px; background: #fffaf2; }
.premium-access-state.is-active { border-color: #8fd3ab; background: #f0fff6; }
.premium-access-state strong { color: var(--text); font-size: 12.5px; }
.premium-access-state span { color: var(--muted); font-size: 11px; line-height: 1.45; }
.premium-push-state { display: grid; gap: 5px; padding: 11px; border: 1px solid #ffcf8a; border-radius: 8px; background: #fffaf2; }
.premium-push-state.is-on { border-color: #8fd3ab; background: #f0fff6; }
.premium-push-state strong { color: var(--text); font-size: 13px; }
.premium-push-state span { color: var(--muted); font-size: 11px; line-height: 1.5; }
.premium-push-state button { margin-top: 3px; width: 100%; }

/* ===== 필터 ===== */
.filter-panel { display: grid; gap: 0; margin-bottom: 14px; }
.filter-panel > div > strong { display: block; margin-bottom: 8px; font-size: 13px; }
.filter-toggle { display: flex; justify-content: space-between; align-items: center; width: 100%; background: transparent; border: 0; padding: 4px 0 10px; font-size: 13px; font-weight: 600; color: var(--text); cursor: pointer; }
#filterBody { display: grid; gap: 14px; }
#filterBody.is-collapsed { display: none; }
.chip-row { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-chip, .chip-multi button {
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.filter-chip.is-active, .chip-multi button.is-active { border-color: #243449; background: #243449; color: #fff; }
.filter-grid { display: grid; grid-template-columns: repeat(4, minmax(140px, 1fr)); gap: 10px; }

/* ===== 매칭 카드 ===== */
.match-summary { padding: 10px 14px; background: var(--blue-soft); border: 1px solid #c8d6ef; border-radius: 8px; margin-bottom: 12px; font-size: 13px; color: #1d3a7a; font-weight: 600; }
.match-card { display: grid; gap: 12px; padding: 18px; min-width: 0; overflow: hidden; }
.match-card .card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; min-width: 0; }
.match-card .card-head > div:first-child { min-width: 0; flex: 1 1 auto; }
.match-card .card-head h3 { margin-bottom: 4px; overflow-wrap: break-word; }
.match-card .card-head p { overflow-wrap: break-word; }
.score-block { flex-shrink: 0; }
.match-deadline { flex-shrink: 0; font-size: 13px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.match-deadline.urgent { color: var(--c-fail); }
.match-wanted { padding: 10px 12px; background: #f6f8fb; border-radius: 8px; font-size: 13px; color: var(--text); line-height: 1.5; }
.match-wanted strong { color: var(--muted); font-size: 11px; font-weight: 700; margin-right: 6px; }
.match-flight-detail { border: 1px solid var(--line); border-radius: 10px; background: #fff; overflow: hidden; }
.match-flight-detail > summary { padding: 11px 13px; cursor: pointer; color: var(--text); font-size: 13px; font-weight: 800; list-style: none; }
.match-flight-detail > summary::-webkit-details-marker { display: none; }
.match-flight-detail[open] > summary { border-bottom: 1px solid var(--line); background: #f7f9fc; }
.match-flight-detail-list { display: grid; gap: 8px; padding: 10px; }
.match-flight-detail-row { padding: 11px; border: 1px solid #dde5ee; border-radius: 8px; background: #fbfcfe; }
.match-flight-detail-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.match-flight-detail-head strong { min-width: 0; overflow-wrap: anywhere; font-size: 13px; }
.match-flight-detail-head span { flex: 0 0 auto; color: var(--muted); font-size: 11px; font-weight: 700; }
.match-flight-detail-row > p { margin: 5px 0 9px; color: var(--muted); font-size: 12px; font-weight: 700; }
.match-flight-times { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.match-flight-times span { display: grid; gap: 3px; padding: 7px 5px; border-radius: 6px; background: #eef3f8; text-align: center; }
.match-flight-times small { color: var(--muted); font-size: 9px; font-weight: 700; white-space: nowrap; }
.match-flight-times b { color: var(--text); font-size: 12px; }
.match-flight-no-time { margin-top: 7px; color: var(--muted); font-size: 11px; }
.match-card .badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.match-card .badge { padding: 3px 8px; border-radius: 4px; background: var(--c-intl-bg); color: var(--c-intl); font-size: 11px; font-weight: 700; }
.match-card .badge.dom { background: var(--c-dom-bg); color: var(--c-dom); }
.match-card .badge.off { background: var(--c-off-bg); color: var(--c-off); }
.match-card .badge.rsv { background: var(--c-rsv-bg); color: var(--c-rsv); }

.score-block { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; min-width: 90px; }
.score-num { font-size: 28px; font-weight: 800; color: var(--c-pass); line-height: 1; }
.score-num.mid { color: var(--c-warn); }
.score-num.low { color: var(--c-fail); }
.score-bar { width: 90px; height: 6px; background: #eef2f6; border-radius: 999px; overflow: hidden; }
.score-bar div { height: 100%; background: var(--c-pass); border-radius: 999px; }
.score-bar div.mid { background: var(--c-warn); }
.score-bar div.low { background: var(--c-fail); }

.score-breakdown { background: #f6f8fb; border-radius: 6px; padding: 8px 12px; font-size: 12px; }
.score-breakdown summary { cursor: pointer; font-weight: 700; color: var(--muted); }
.score-breakdown .br-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-top: 8px; }
.score-breakdown .br-grid div { display: flex; justify-content: space-between; padding: 2px 0; }
.score-breakdown .br-grid b { color: var(--c-pass); }

.bidirectional-display { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); gap: 10px; align-items: center; padding: 10px; background: #f6f8fb; border-radius: 8px; font-size: 12px; }
.bidirectional-display .give, .bidirectional-display .get { padding: 6px 8px; background: #fff; border: 1px solid var(--line); border-radius: 6px; min-width: 0; }
.bidirectional-display .give select, .bidirectional-display .get select { max-width: 100%; }
.bidirectional-display .give strong, .bidirectional-display .get strong { display: block; font-size: 11px; color: var(--muted); margin-bottom: 2px; font-weight: 600; }
.bidirectional-display .arrow { font-size: 18px; color: var(--primary); font-weight: 800; }

.meta-grid { display: grid; grid-template-columns: repeat(4, minmax(110px, 1fr)); gap: 8px; }
.meta-grid div { padding: 8px 10px; border-radius: 6px; background: #f6f8fb; }
.meta-grid span { display: block; color: var(--muted); font-size: 11px; }
.meta-grid strong { display: block; margin-top: 2px; font-size: 13px; }
.meta-grid strong.urgent { color: var(--c-fail); }

.card-actions { display: flex; gap: 8px; }

/* 스왑 요청 X ⇄ Y */
.req-pair { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: stretch; margin-top: 10px; }
.req-side { display: flex; flex-direction: column; gap: 4px; }
.req-side-label { font-size: 11px; color: var(--muted); font-weight: 700; }
.req-box { flex: 1; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: #f6f8fb; font-size: 12px; }
.req-box strong { display: block; font-size: 13px; margin-bottom: 2px; }
.req-arrow { display: grid; place-items: center; font-size: 20px; color: var(--primary); font-weight: 800; }
.req-day-warn { margin-top: 6px; font-size: 11px; color: var(--c-fail); font-weight: 700; }
.pending-action-bar { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; margin: 0 -4px 12px; background: linear-gradient(135deg, #ff8a3d, #ff5d3d); color: #fff; border-radius: 12px; box-shadow: 0 6px 20px rgba(255,93,61,0.4); border: 2px solid #fff; animation: pendingBarPop 0.25s ease-out; }
.pending-action-bar > span { font-size: 13px; font-weight: 800; flex: 1; line-height: 1.3; }
.pending-target { display: block; background: rgba(255,255,255,0.2); border-radius: 8px; padding: 7px 10px; margin-bottom: 7px; }
.pending-target-label { display: block; font-size: 10px; font-weight: 700; opacity: 0.9; }
.pending-target-name { display: block; font-size: 13px; font-weight: 800; }
.pending-target-sub { display: block; font-size: 11px; font-weight: 600; opacity: 0.92; }
.pending-guide { display: block; }
.my-post-section { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 16px; scroll-margin-top: 170px; }
.my-post-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.my-post-title { margin: 0 0 12px; font-size: 15px; }
.my-post-heading .my-post-title { margin: 0; }
.submit-owner { font-size: 12px; font-weight: 700; padding: 8px 10px; border-radius: 8px; margin-bottom: 10px; line-height: 1.4; }
.submit-owner.me { background: #e6f4ea; color: #1a7a3f; }
.submit-owner.other { background: #fff4e5; color: #b06400; }
.submit-status { font-size: 12px; font-weight: 700; padding: 8px 10px; border-radius: 8px; margin-top: 8px; line-height: 1.4; }
.submit-status.done { background: #e6f4ea; color: #1a7a3f; }
.submit-status.nudged { background: #fff4e5; color: #b06400; }
.pending-action-buttons { display: flex; gap: 8px; flex-shrink: 0; }
.pending-action-buttons button { padding: 8px 14px; font-size: 13px; font-weight: 800; }
.pending-action-buttons .secondary-button { background: rgba(255,255,255,0.25); color: #fff; border: none; }
.pending-action-buttons .primary-button { background: #fff; color: #ff5d3d; }
.pending-action-buttons .primary-button:disabled { opacity: 0.5; }
@keyframes pendingBarPop { from { transform: scale(0.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.req-exchange { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; padding: 10px; margin-bottom: 10px; background: var(--blue-soft); border-radius: 8px; }
.req-ex-side { min-width: 0; }
.req-ex-side span { display: block; font-size: 10px; color: #1d3a7a; font-weight: 700; }
.req-ex-side strong { display: block; font-size: 12px; color: var(--text); overflow-wrap: break-word; }
.req-ex-side small { font-size: 11px; color: var(--muted); }
.req-ex-arrow { font-size: 16px; color: var(--primary); font-weight: 800; }
.card-unavailable { flex: 1; text-align: center; padding: 10px; font-size: 12px; color: var(--muted); background: #f1f3f6; border-radius: 8px; }
.card-actions button { flex: 1; }

/* ===== 양방향 등록 폼 ===== */
.bidirectional-form { display: grid; grid-template-columns: 1fr auto 1fr; gap: 18px; padding: 20px; align-items: stretch; }
.form-side { display: flex; flex-direction: column; gap: 12px; padding: 16px; background: #f8fafc; border-radius: 8px; }
.side-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.side-num { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 800; font-size: 14px; }
.side-head h3 { margin: 0; }

.swap-arrow { display: grid; place-items: center; font-size: 32px; color: var(--primary); font-weight: 800; }

.slot-card { display: grid; gap: 8px; padding: 16px; background: #fff; border: 2px dashed var(--line); border-radius: 8px; text-align: center; color: var(--muted); }
.slot-card.filled { border: 1px solid var(--c-intl); background: var(--c-intl-bg); text-align: left; color: var(--text); }
.slot-card.filled strong { display: block; font-size: 14px; margin-bottom: 4px; }
.slot-card.filled .slot-meta { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.slot-card.filled .slot-meta span { padding: 2px 6px; background: #fff; border-radius: 4px; font-size: 11px; }
.slot-card.is-editing { border: 2px solid var(--primary); background: var(--yellow-soft); }

/* ===== 등록 푸터 ===== */
.post-footer { padding: 18px; margin-top: 18px; display: grid; gap: 14px; }
.preview-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat-cell { padding: 12px; background: #f6f8fb; border-radius: 8px; text-align: center; }
.stat-cell span { display: block; font-size: 11px; color: var(--muted); font-weight: 600; }
.stat-cell strong { display: block; font-size: 22px; margin: 4px 0; }
.stat-cell small { display: block; font-size: 10px; color: var(--muted); }

.rule-check-summary { padding: 14px; background: #fafbfd; border-radius: 8px; }
.rule-check-summary h4 { margin-bottom: 10px; }
.rule-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.rule-grid div { padding: 6px 10px; border-radius: 4px; font-size: 12px; font-weight: 600; }
.rule-grid div.pass { background: var(--green-soft); color: var(--c-pass); }
.rule-grid div.warn { background: var(--yellow-soft); color: var(--c-warn); }
.rule-grid div.fail { background: #fdecea; color: var(--c-fail); }
.rule-grid div.info { background: #f6f8fb; color: var(--muted); }

/* ===== 요청함 / 프라이버시 스테퍼 ===== */
.request-card { display: grid; gap: 12px; padding: 18px; min-width: 0; overflow: hidden; }
.request-card .card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; min-width: 0; }
.request-card .card-head > div:first-child { min-width: 0; flex: 1 1 auto; }
.request-card .card-head h3 { margin-bottom: 4px; overflow-wrap: break-word; }
.request-card .card-head p { font-size: 12px; }
.request-card .card-head > .badge { flex: 0 0 auto; max-width: 42%; padding: 4px 10px; border-radius: 999px; background: var(--c-rsv-bg); color: var(--c-rsv); font-size: 10.5px; font-weight: 700; line-height: 1.35; text-align: center; align-self: flex-start; }
.request-card .card-head > .badge.accepted { background: var(--green-soft); color: var(--c-pass); }
.request-card .card-head > .badge.submitted { background: var(--blue-soft); color: #1d3a7a; }

.privacy-stepper { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 12px; background: #f6f8fb; border-radius: 8px; }
.privacy-stepper .step { padding: 8px 6px; background: #fff; border-radius: 6px; text-align: center; font-size: 11px; color: var(--muted); border: 1px solid var(--line); position: relative; }
.privacy-stepper .step.done { background: var(--green-soft); color: var(--c-pass); border-color: #8bd2ac; font-weight: 700; }
.privacy-stepper .step.current { background: var(--primary); color: #fff; border-color: var(--primary); font-weight: 700; }
.privacy-stepper .step .step-icon { display: block; font-size: 14px; margin-bottom: 2px; }

.disclosed-info { padding: 12px; background: #fafbfd; border: 1px solid var(--line); border-radius: 8px; }
.disclosed-info h4 { margin-bottom: 8px; font-size: 12px; }
.info-row { display: flex; justify-content: space-between; padding: 5px 0; border-bottom: 1px dashed var(--line); font-size: 12px; }
.info-row:last-child { border-bottom: 0; }
.info-row span { color: var(--muted); }
.info-row strong { font-weight: 700; }
.info-row strong.locked { color: var(--muted); font-weight: 600; }

.request-actions { display: flex; gap: 8px; }
.request-actions button { flex: 1; }

.submit-guide { margin-top: 8px; padding: 12px 14px; background: var(--blue-soft); border: 1px solid #c8d6ef; border-radius: 8px; }
.submit-guide h4 { margin-bottom: 8px; color: #1d3a7a; font-size: 13px; }
.submit-guide ol { margin: 0; padding-left: 20px; }
.submit-guide ol li { margin-bottom: 5px; font-size: 12px; color: var(--text); line-height: 1.5; }
.submit-guide ol strong { color: var(--primary-dark); }
.submit-guide .hint { margin-top: 8px; font-size: 11px; color: var(--muted); }

/* ===== 내 정보 / 평판 ===== */
.profile-grid { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr) minmax(0, 320px); gap: 18px; align-items: start; }
.profile-card { padding: 20px; }
.profile-side-stack { display: grid; gap: 18px; }
.swap-usage-card { display: grid; gap: 12px; }
.swap-usage-status { color: var(--text); font-size: 18px; }
.swap-usage-counts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.swap-usage-counts > div { display: grid; gap: 4px; padding: 12px; border-radius: 12px; background: #eef3f8; }
.swap-usage-counts span { color: var(--muted); font-size: 12px; font-weight: 700; }
.swap-usage-warning { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.swap-usage-card.is-limit { border-color: #efbd72; background: #fff9ef; }
.swap-usage-card.is-limit .swap-usage-status,
.swap-usage-card.is-limit .swap-usage-warning { color: #a85b00; }
.swap-usage-card.is-over { border-color: #e7a39a; background: #fff3f1; }
.swap-usage-card.is-over .swap-usage-status,
.swap-usage-card.is-over .swap-usage-warning { color: #b83224; }
.rating-card { text-align: center; }
.profile-email-display { padding: 14px; background: #f6f8fb; border-radius: 8px; margin-top: 8px; }
.profile-email-display span { display: block; font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.profile-email-display strong { font-size: 14px; word-break: break-all; }
.big-rating { font-size: 38px; font-weight: 800; color: #b07a00; margin: 12px 0; }
.big-rating span { font-size: 16px; color: var(--muted); font-weight: 600; }
.rating-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 12px; }
.rating-stats div { padding: 10px; background: #f6f8fb; border-radius: 6px; }
.rating-stats span { display: block; font-size: 11px; color: var(--muted); }
.rating-stats strong { display: block; font-size: 16px; margin-top: 2px; }

.credit-balance { font-size: 24px; font-weight: 800; margin: 8px 0 12px; }
.credit-balance strong { color: var(--primary); font-size: 32px; }
.beta-credit-notice { display: inline-block; padding: 6px 14px; border-radius: 20px; background: #fff5f4; border: 1px solid var(--primary); color: var(--primary); font-size: 12px; font-weight: 700; margin-bottom: 10px; }
.refund-note { padding: 10px 12px; margin-bottom: 12px; background: var(--blue-soft); border: 1px solid #c8d6ef; border-radius: 8px; font-size: 12px; color: #1d3a7a; line-height: 1.5; }

/* ===== 하단 탭 — 스크롤 영역 밖 구조적 고정 (항상 화면 맨 아래) ===== */
.bottom-tabs {
  flex: 0 0 auto;
  display: grid; grid-template-columns: repeat(4, 1fr);
  width: 100%; margin: 0; padding: 6px 4px max(6px, env(safe-area-inset-bottom));
  border: 0; border-top: 1px solid var(--line); border-radius: 0;
  background: rgba(244, 248, 252, 0.86);
  border-top-color: rgba(188, 201, 216, 0.9);
  box-shadow: 0 -10px 30px rgba(31, 44, 62, 0.12);
  -webkit-backdrop-filter: blur(18px) saturate(135%);
  backdrop-filter: blur(18px) saturate(135%);
}
.tab { min-height: 44px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-weight: 700; font-size: 12px; white-space: nowrap; overflow: visible; position: relative; }
.tab-badge { display: inline-grid; place-items: center; min-width: 16px; height: 16px; padding: 0 4px; margin-left: 3px; border-radius: 999px; background: var(--primary); color: #fff; font-size: 10px; font-weight: 800; vertical-align: top; }
.tab.is-active {
  background: linear-gradient(145deg, #2d4058, #1e2d40);
  color: #fff;
  box-shadow: 0 5px 14px rgba(30, 45, 64, 0.18);
}

/* ===== 알림 패널 ===== */
.alert-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.28); z-index: 99; }
.alert-panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(380px, 90vw); background: var(--panel); border-left: 1px solid var(--line); box-shadow: -16px 0 44px rgba(0,0,0,0.12); z-index: 100; display: flex; flex-direction: column; }
.alert-head { display: flex; justify-content: space-between; align-items: center; padding: 16px; padding-top: calc(16px + env(safe-area-inset-top)); border-bottom: 1px solid var(--line); gap: 8px; }
.alert-head h3 { margin: 0; flex: 1; }
.alert-clear-all { background: transparent; border: 1px solid var(--line); border-radius: 6px; font-size: 11px; color: var(--muted); padding: 4px 10px; cursor: pointer; white-space: nowrap; }
.alert-clear-all:hover { color: var(--c-fail); border-color: var(--c-fail); }
.alert-head > button[aria-label="닫기"] { background: transparent; border: 0; font-size: 24px; color: var(--muted); flex-shrink: 0; }
.alert-filters { display: flex; gap: 6px; padding: 12px; border-bottom: 1px solid var(--line); }
.alert-filters button { flex: 1; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--muted); font-size: 12px; font-weight: 600; }
.alert-filters button.is-active { background: #243449; color: #fff; border-color: #243449; }
.alert-list { overflow-y: auto; padding: 12px; display: grid; gap: 8px; }
.alert-item { position: relative; padding: 12px 48px 12px 12px; border: 1px solid var(--line); border-left: 4px solid var(--muted); border-radius: 6px; cursor: pointer; }
.alert-item strong { display: block; font-size: 13px; margin-bottom: 4px; }
/* 기본: 본문 2줄로 축약. 클릭(is-expanded)하면 전체 표시 */
.alert-item .alert-body { font-size: 12px; margin-bottom: 6px; color: var(--text); white-space: pre-line;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.alert-item.is-expanded .alert-body { display: block; -webkit-line-clamp: unset; overflow: visible; }
.alert-item .time { font-size: 11px; color: var(--muted); }
/* 미읽음 표시: 굵은 제목 + 주황 점 */
.alert-item.is-unread strong { font-weight: 800; }
.unread-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #ff5d3d; margin-right: 6px; vertical-align: middle; }
.alert-item.match { border-left-color: var(--c-pass); background: var(--green-soft); cursor: pointer; }
.alert-item.urgent { border-left-color: var(--c-fail); background: #fdecea; }
.alert-item.announce { border-left-color: var(--c-dom); background: var(--blue-soft); }
.alert-del-btn { position: absolute; top: 4px; right: 4px; width: 36px; height: 36px; border: none; background: transparent; color: var(--muted); font-size: 24px; font-weight: 600; line-height: 1; cursor: pointer; border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.alert-del-btn:hover { background: rgba(0,0,0,0.08); color: var(--text); }

/* ===== 회원 탈퇴 ===== */
.withdraw-zone { padding: 24px 16px 12px; text-align: center; border-top: 1px solid var(--line); margin-top: 16px; }
.withdraw-button { background: transparent; border: 1px solid var(--c-fail); color: var(--c-fail); border-radius: 8px; padding: 10px 28px; font-size: 13px; cursor: pointer; }
.withdraw-button:hover { background: #fdecea; }
.policy-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 7px; margin-bottom: 16px; font-size: 12px; color: var(--muted); }
.warning-note { margin: 0; padding: 12px; border: 1px solid #f3b5ac; border-radius: 8px; background: #fff4f2; color: #8d2f24; font-size: 12px; line-height: 1.6; }

/* ===== 다이얼로그 ===== */
dialog { width: min(520px, calc(100vw - 28px)); border: 0; border-radius: 12px; box-shadow: var(--shadow); padding: 0; }
#crewDialog { max-width: min(820px, calc(100vw - 24px)); }
dialog::backdrop { background: rgba(15, 22, 32, 0.56); }
.dialog-body { display: grid; gap: 14px; padding: 20px; }

/* ===== div 기반 모달 (iOS dialog top-layer 버그 회피용) ===== */
.generic-modal-overlay {
  position: fixed; inset: 0; background: rgba(15, 22, 32, 0.56); z-index: 200;
}
.generic-modal {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: calc(100vw - 32px); max-width: 520px; max-height: 92dvh; max-height: 92vh;
  border: 0; border-radius: 12px; box-shadow: var(--shadow); background: #fff;
  box-sizing: border-box; overflow: hidden; z-index: 201;
  display: flex; flex-direction: column;
}
.generic-modal .dialog-body { overflow-y: auto; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }
.import-progress { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 8px; background: var(--blue-soft); }
.import-progress span { width: 18px; height: 18px; border: 3px solid #93a9da; border-top-color: #2e5cc9; border-radius: 999px; animation: spin 0.8s linear infinite; }

/* ===== 버전 업데이트 안내 ===== */
.release-notice-dialog { max-width: 460px; }
.release-notice-dialog .dialog-body { gap: 16px; padding: 24px; }
.release-notice-badge {
  justify-self: start; padding: 5px 10px; border-radius: 999px;
  background: var(--primary); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .04em;
}
.release-notice-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.release-notice-heading h3 { margin: 0 0 7px; font-size: 20px; color: var(--text); }
.release-notice-heading p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.release-notice-meta { flex: 0 0 auto; display: grid; justify-items: end; gap: 3px; color: var(--primary); }
.release-notice-meta strong { font-size: 13px; }
.release-notice-meta span { color: var(--muted); font-size: 11px; }
.release-notice-changes {
  display: grid; gap: 10px; margin: 0; padding: 16px 16px 16px 34px;
  border: 1px solid #c8d6ef; border-radius: 10px; background: var(--blue-soft);
  color: #1d3a7a; font-size: 13px; line-height: 1.55;
}
.release-notice-hint { margin: 0; color: var(--muted); font-size: 11px; text-align: center; }
.release-notice-dialog .primary-button { width: 100%; min-height: 46px; }
@media (max-width: 420px) {
  .release-notice-heading { display: grid; }
  .release-notice-meta { display: flex; justify-items: initial; gap: 8px; }
}

/* ===== 임포트 다이얼로그 (div 모달 내부 컨텐츠) ===== */
.import-dialog { width: 100%; box-sizing: border-box; }
.notice { padding: 10px 12px; background: var(--blue-soft); border: 1px solid #c8d6ef; border-radius: 6px; font-size: 12px; color: #1d3a7a; line-height: 1.5; }
.import-tabs { display: flex; gap: 4px; margin: 12px 0 0; border-bottom: 1px solid var(--line); }
.import-tab { padding: 8px 14px; border: 0; background: transparent; color: var(--muted); font-weight: 700; font-size: 13px; border-bottom: 2px solid transparent; }
.import-tab.is-active { color: var(--primary); border-bottom-color: var(--primary); }
.import-mode { display: grid; gap: 10px; padding-top: 8px; }
.import-mode textarea { font-family: ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace; font-size: 12px; }

.preview-wrap { overflow-x: auto; max-height: 380px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; min-width: 0; max-width: 100%; -webkit-overflow-scrolling: touch; }
.generic-modal .dialog-body { min-width: 0; }
.generic-modal .dialog-body > * { min-width: 0; }
.preview-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.preview-table th { position: sticky; top: 0; background: #eef2f6; padding: 8px 6px; text-align: left; font-weight: 700; border-bottom: 1px solid var(--line); white-space: nowrap; font-size: 11px; z-index: 1; }
.preview-table td { padding: 4px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.preview-table input, .preview-table select { min-height: 28px; padding: 3px 6px; font-size: 12px; min-width: 0; }
.preview-table input[type="number"] { width: 52px; }
.preview-table input[type="checkbox"] { width: auto; min-height: auto; }
.preview-table .row-del { background: transparent; border: 0; color: var(--c-fail); font-size: 16px; cursor: pointer; }
.preview-table tr.has-warning td { background: #fff7ea; }

/* ===== 토스트 ===== */
.toast { position: fixed; right: 22px; bottom: 92px; transform: translateY(20px); max-width: min(420px, calc(100vw - 44px)); padding: 12px 16px; border-radius: 8px; background: #18202d; color: #fff; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; z-index: 200; font-size: 13px; }
.toast.is-visible { transform: translateY(0); opacity: 1; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Position 배지 ===== */
.badge-position { background: #eef0f4; color: #3a4a5c; font-weight: 700; }
.badge-aircraft { background: #fff3e0; color: #b45309; font-weight: 800; border: 1px solid #f3c98a; }

/* ===== 상대가 내놓음 상세 펼침 ===== */
.give-expand { border: 0; background: transparent; padding: 0; }
.give-expand summary { list-style: none; cursor: pointer; user-select: none; }
.give-expand summary::-webkit-details-marker { display: none; }
.give-summary-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.give-summary-row strong { font-size: 11px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.give-name { font-size: 13px; font-weight: 600; color: var(--text); flex: 1; }
.expand-caret { font-size: 11px; color: var(--muted); transition: transform 0.15s; }
.give-expand[open] .expand-caret { transform: rotate(180deg); }
.offered-detail-dl { margin: 8px 0 0; display: grid; gap: 4px; }
.offered-detail-dl > div { display: flex; gap: 8px; font-size: 12px; }
.offered-detail-dl dt { color: var(--muted); white-space: nowrap; min-width: 62px; }
.offered-detail-dl dd { color: var(--text); font-weight: 500; margin: 0; }

/* ===== 회사 룰 사전체크 헤더 ===== */
.rule-check-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; gap: 8px; flex-wrap: wrap; }
.rule-check-title { display: flex; align-items: center; gap: 8px; }
.rule-check-title strong { font-size: 13px; }
.rule-scope-badge { display: inline-block; padding: 2px 8px; border-radius: 20px; background: var(--blue-soft); color: #1d3a7a; font-size: 11px; font-weight: 700; white-space: nowrap; }
.rule-summary-badge { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.rule-summary-badge.pass { background: var(--green-soft); color: var(--green); }
.rule-summary-badge.warn { background: var(--yellow-soft); color: #7a5500; }
.rule-summary-badge.fail { background: #fdecea; color: var(--c-fail); }

/* ===== 이메일 인증 ===== */
.signup-verify-block { display: grid; gap: 8px; }
.verify-email-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.verify-email-row input { margin: 0; }
.verify-email-row .secondary-button { white-space: nowrap; min-width: 88px; }

/* ===== WARN 확인 팝업 ===== */
.warn-confirm-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px 14px;
  background: var(--yellow-soft);
  border-radius: 8px;
  margin-bottom: 14px;
}
.warn-confirm-icon { font-size: 28px; line-height: 1; flex-shrink: 0; }
.warn-confirm-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.warn-confirm-item {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #f0d98a;
  background: #fffdf0;
}
.warn-confirm-label {
  font-size: 13px;
  font-weight: 700;
  color: #7a5500;
}
.warn-confirm-detail {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

/* ===== 내가 등록한 글 목록 ===== */
.my-post-list { display: grid; gap: 10px; margin-bottom: 18px; }
.my-post-list:empty { display: none; }

.my-post-card {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid #c0cce0;
  border-left: 4px solid var(--c-intl);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: 0 2px 8px rgba(24,32,45,0.05);
}
.my-post-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.my-post-head strong { font-size: 14px; }
.my-post-status {
  padding: 2px 9px;
  border-radius: 999px;
  background: #e8f0ff;
  color: #1d3a7a;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.my-post-status.done {
  background: var(--green-soft);
  color: var(--green);
}
.my-post-status.expired {
  background: #f1f3f6;
  color: #8a94a3;
}
.my-post-detail summary {
  font-size: 12px;
  color: var(--primary);
  cursor: pointer;
  user-select: none;
  padding: 2px 0;
}
.my-post-detail-dl {
  display: grid;
  gap: 4px;
  margin: 8px 0 4px;
  padding: 10px 12px;
  background: var(--bg);
  border-radius: 8px;
  font-size: 12px;
}
.my-post-detail-dl div { display: flex; gap: 8px; }
.my-post-detail-dl dt { color: var(--muted); min-width: 60px; }
.my-post-detail-dl dd { margin: 0; color: var(--text); font-weight: 600; }
.my-post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 12px;
  color: var(--muted);
}
.my-post-time { color: #9ba6b7; font-size: 11px; }
.my-post-btn-row { display: flex; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
.edit-post-button { align-self: flex-start; padding: 6px 12px; font-size: 12px; }
.cancel-post-button {
  align-self: flex-start;
  margin-top: 0;
  padding: 6px 12px;
  border: 1px solid #f0b8b2;
  border-radius: 6px;
  background: #fff5f4;
  color: var(--c-fail);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}
.cancel-post-button:hover { background: #fdecea; }
.delete-post-history-button {
  align-self: flex-start;
  margin-top: 8px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.delete-post-history-button:hover { border-color: var(--c-fail); color: var(--c-fail); }

/* ===== 등록 버튼 행 ===== */
.post-footer-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.post-footer-btns .secondary-button { flex: 0 0 auto; min-width: 100px; }
.post-footer-btns .primary-button { flex: 1; min-width: 140px; }
.post-footer-btns #watchAdButton,
.post-footer-btns #watchAdButtonProfile { flex: 0 0 100%; margin-top: 0; }
.rewarded-ad-button {
  width: 100%;
  margin-top: 10px;
  border-color: #f4b37b;
  background: #fff8f1;
  color: var(--primary-dark);
  font-weight: 800;
}
.reward-ad-dialog { text-align: center; }
.reward-ad-dialog h3 { margin: 8px 0; }
.reward-ad-dialog p { margin: 0; color: var(--muted); line-height: 1.6; }
.reward-ad-icon {
  display: grid;
  width: 68px;
  height: 68px;
  margin: 0 auto;
  place-items: center;
  border-radius: 20px;
  background: #fff0e3;
  font-size: 34px;
}
.reward-ad-status {
  margin: 18px 0 4px;
  padding: 13px;
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font-weight: 800;
}

/* ===== 단계별 스왑 흐름 ===== */
.flow-home { max-width: 920px; margin: 0 auto; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); box-shadow: var(--shadow); }
.flow-home-head { text-align: center; padding: 4px 8px 18px; }
.flow-home-head h2 { margin: 0 0 5px; font-size: clamp(24px, 4vw, 32px); }
.flow-home-head p { margin: 0; }
.flow-kicker { color: var(--primary); font-size: 11px; font-weight: 900; letter-spacing: 1px; }
.flow-choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.flow-choice-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; min-height: 108px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: #fff; color: var(--text); text-align: left; box-shadow: 0 8px 24px rgba(24,32,45,.06); }
.flow-choice-card.is-manage { grid-column: 1 / -1; }
.flow-choice-card:hover { border-color: var(--primary); transform: translateY(-1px); }
.flow-choice-card > span:not(.flow-choice-icon) { min-width: 0; }
.flow-choice-card strong, .flow-choice-card small { display: block; }
.flow-choice-card strong { margin-bottom: 7px; font-size: 20px; }
.flow-choice-card small { color: var(--muted); font-size: 12px; line-height: 1.5; }
.flow-choice-card > b { color: var(--primary-dark); font-size: 13px; white-space: nowrap; }
.flow-choice-icon { display: grid; width: 52px; height: 52px; place-items: center; border-radius: 14px; background: #fff1e7; font-size: 25px; }
.flow-schedule-notice { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 11px 14px; border-radius: 10px; background: #fff7e7; color: #8a5700; }
.flow-schedule-notice.is-ready { background: var(--green-soft); color: var(--green); }
.flow-schedule-notice > span { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 50%; background: rgba(255,255,255,.8); font-weight: 900; }
.flow-schedule-notice strong, .flow-schedule-notice small { display: block; }
.flow-schedule-notice small { margin-top: 2px; opacity: .8; }
.flow-advanced-btn { display: block; width: 100%; margin-top: 12px; }
.flow-guide-banner, .find-guide { margin-bottom: 14px; padding: 14px; border: 1px solid #f2b17e; border-radius: 12px; background: #fff8f2; }
.flow-stepper { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 12px; }
.flow-stepper span { display: flex; align-items: center; justify-content: center; gap: 5px; min-height: 34px; padding: 5px 8px; border-radius: 8px; background: #edf0f4; color: var(--muted); font-size: 11px; font-weight: 700; text-align: center; }
.flow-stepper span b { display: grid; width: 19px; height: 19px; place-items: center; border-radius: 50%; background: #fff; font-size: 10px; }
.flow-stepper span.is-active { background: var(--primary); color: #fff; }
.flow-stepper span.is-active b { color: var(--primary); }
.flow-stepper span.is-done { background: var(--green-soft); color: var(--green); }
.flow-guide-copy { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.flow-guide-copy strong { display: block; margin-bottom: 3px; }
.flow-guide-copy p { margin: 0; font-size: 12px; }
.flow-menu-button { flex: 0 0 auto; white-space: nowrap; }
.find-guide { padding: 14px; }
.find-guide-card { padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.find-guide-card h3 { margin: 5px 0 4px; font-size: 20px; }
.find-guide-card > p { margin: 0 0 14px; font-size: 12px; }
.guide-chip-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.guide-chip-grid button { min-height: 48px; padding: 8px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--text); font-size: 13px; font-weight: 700; }
.guide-chip-grid button.is-active { border-color: var(--primary); background: #fff1e7; color: var(--primary-dark); box-shadow: inset 0 0 0 1px var(--primary); }
.guide-field-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.flow-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.flow-result-actions { display: flex; gap: 7px; }
.find-guide-result-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.find-guide-result-head p { margin: 4px 0 0; }
#find.is-guided > .saved-search-box,
#find.is-guided > .find-actions,
#find.is-guided > .filter-panel,
#find.is-guided > .swap-subtabs { display: none; }
#find.is-guided:not(.show-guide-results) > .match-summary,
#find.is-guided:not(.show-guide-results) > #matchList { display: none; }

/* ===== 반응형 ===== */
@media (max-width: 1280px) {
  .metrics-strip { grid-template-columns: repeat(2, 1fr); }
  .filter-grid { grid-template-columns: repeat(2, 1fr); }
  .profile-grid { grid-template-columns: 1fr; }
}
@media (max-width: 1040px) {
  .signup-panel, .schedule-layout, .bidirectional-form { grid-template-columns: 1fr; }
  .swap-arrow { transform: rotate(90deg); }
  .meta-grid { grid-template-columns: repeat(2, 1fr); }
  .preview-stats { grid-template-columns: 1fr; }
}
/* 세로모드 — 가로 스크롤 (셀 최소 너비 고정으로 가독성 유지) */
@media (max-width: 1040px) and (orientation: portrait) {
  .calendar-panel { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .calendar-weekdays, .calendar-grid { min-width: 760px; }
}
/* 가로모드 — 스크롤 없이 화면 폭에 맞게 자동 축소 */
@media (orientation: landscape) {
  .calendar-weekdays, .calendar-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  body { overflow-x: hidden; }
  .app { padding: 16px 16px 16px; padding-top: calc(16px + env(safe-area-inset-top)); overflow-x: hidden; }
  .topbar, .section-head { flex-direction: column; align-items: stretch; }
  .status-strip { justify-content: flex-start; }
  .topbar.is-compact { flex-direction: row; align-items: center; }
  .topbar.is-compact .status-strip { width: auto; justify-content: flex-end; }
  .match-flight-times { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bottom-tabs { gap: 4px; padding: 6px 4px max(6px, env(safe-area-inset-bottom)); }
  .tab { font-size: 10px; padding: 0 4px; }
  .metrics-strip { grid-template-columns: 1fr; }
  .filter-grid { grid-template-columns: 1fr; }
  .privacy-stepper { grid-template-columns: repeat(2, 1fr); }
  .flow-home { padding: 14px; }
  .flow-choice-grid { grid-template-columns: 1fr; }
  .flow-choice-card { min-height: 96px; padding: 14px; }
  .flow-choice-card strong { font-size: 17px; }
  .flow-choice-icon { width: 44px; height: 44px; }
  .flow-stepper span { flex-direction: column; min-height: 48px; font-size: 9.5px; }
  .flow-guide-copy, .find-guide-result-head { align-items: stretch; flex-direction: column; }
  .flow-guide-copy .flow-menu-button { align-self: stretch; }
  .guide-chip-grid { grid-template-columns: repeat(2, 1fr); }
  .guide-field-grid { grid-template-columns: 1fr; }
  .flow-actions, .flow-result-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .compare-calendars { grid-template-columns: 1fr; }
  .cmp-cell { min-height: 50px; }
}

/* ===================== 스플래시 화면 ===================== */
.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: #000;
  overflow: hidden;
  transition: opacity 0.4s ease;
}
.splash-screen.is-hiding { opacity: 0; pointer-events: none; }
.splash-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.splash-screen::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 40%;
  background: linear-gradient(transparent, rgba(0,0,0,0.88));
  z-index: 0;
}
.splash-buttons {
  position: absolute;
  left: 0; right: 0; bottom: 6%;
  padding: 0 7%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 1;
}
.splash-login-btn, .splash-signup-btn {
  width: 100%;
  padding: 14px 0;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  box-sizing: border-box;
}
.splash-login-btn { background: #FDBF03; border: none; color: #021D45; }
.splash-signup-btn { background: rgba(2, 29, 69, 0.55); border: 1.5px solid #fff; color: #fff; }

.guide-show-all-button {
  width: 100%;
  margin-top: 10px;
  border-color: #f7a66c;
  color: #c9550a;
  background: #fff8f2;
  font-weight: 800;
}

#myPostsManager .my-post-section { margin-top: 0; }
#myPostsManager .my-post-heading { align-items: center; }
