:root {
  color-scheme: light;
  --ink: #172720;
  --muted: #718078;
  --green: #285b43;
  --green-dark: #204b36;
  --line: #e6eae5;
  --paper: #ffffff;
  --bg: #f5f6f1;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'DM Sans', sans-serif;
  -webkit-font-smoothing: antialiased;
}

.page-shell { width: min(100% - 36px, 560px); margin: 0 auto; padding: 28px 0 24px; }
.brand { display: flex; align-items: center; gap: 10px; font: 800 21px 'Manrope', sans-serif; letter-spacing: -1px; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 12px; background: var(--green); color: white; font: 800 22px 'Manrope', sans-serif; line-height: 1; text-decoration: none; }
.intro { padding: 42px 4px 25px; }
.eyebrow, .step-label, .route-heading { margin: 0; color: var(--green); font-size: 10px; font-weight: 700; letter-spacing: 1.25px; }
h1, h2 { font-family: 'Manrope', sans-serif; letter-spacing: -1.4px; }
h1 { margin: 11px 0 10px; font-size: clamp(34px, 9vw, 46px); line-height: 1.13; }
.subtitle { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.form-card { padding: 28px; border: 1px solid rgba(30, 56, 42, .06); border-radius: 22px; background: var(--paper); box-shadow: 0 14px 45px rgba(29, 48, 37, .055); }
.card-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.step-label { color: #89968e; font-size: 9px; }
h2 { margin: 5px 0 0; font-size: 24px; letter-spacing: -.75px; }
.step-indicator { color: var(--green); font: 700 12px 'Manrope', sans-serif; }
.step-indicator span { color: #a8b1ab; font-weight: 500; }
.field { min-width: 0; margin-bottom: 18px; }
.field-row { display: grid; grid-template-columns: .8fr 1.2fr; gap: 14px; }
label:not(.check-card) { display: block; margin-bottom: 8px; color: #34443b; font-size: 12px; font-weight: 600; }
.optional { margin-left: 4px; color: #98a39c; font-size: 10px; font-weight: 400; }
.trip-details { margin-bottom: 18px; padding: 14px; border-radius: 12px; background: #f7f9f6; }
.trip-details .field:last-child { margin-bottom: 0; }
.trip-details-heading { margin: 0 0 13px; color: var(--green); font-size: 11px; font-weight: 700; }
.trip-details .field-row { gap: 10px; }
input:not([type=checkbox]), select, textarea { width: 100%; min-height: 48px; padding: 0 13px; border: 1px solid var(--line); border-radius: 11px; outline: none; background: #fff; color: var(--ink); font: 13px 'DM Sans', sans-serif; transition: border-color .15s, box-shadow .15s; }
textarea { min-height: 86px; padding-top: 12px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #a5afa8; }
input:focus, select:focus, textarea:focus { border-color: #5e8b70; box-shadow: 0 0 0 3px rgba(55, 111, 76, .1); }
select:invalid { color: #a5afa8; }
.route-heading { display: flex; align-items: center; gap: 8px; margin: 2px 0 13px; }
.route-heading span { font-size: 16px; }
.route-fields { position: relative; padding-left: 16px; }
.route-fields::before, .route-fields::after { position: absolute; left: 0; width: 8px; height: 8px; border: 2px solid #6d9279; border-radius: 50%; background: white; content: ''; }
.route-fields::before { top: 38px; }
.route-fields::after { bottom: 38px; border-color: var(--green); border-radius: 2px; }
.route-line { position: absolute; top: 49px; bottom: 49px; left: 4px; border-left: 1px dashed #c5d2c8; }
.check-card { display: flex; align-items: center; gap: 12px; margin: 0 0 20px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; transition: border-color .15s, background .15s; }
.check-card:has(input:checked) { border-color: #b6cebd; background: #f5faf6; }
.check-card input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.custom-check { display: grid; place-items: center; flex: 0 0 20px; width: 20px; height: 20px; border: 1.5px solid #cbd4cd; border-radius: 6px; color: transparent; font-size: 12px; }
.check-card input:checked + .custom-check { border-color: var(--green); background: var(--green); color: white; }
.check-card input:focus-visible + .custom-check { outline: 3px solid rgba(55, 111, 76, .2); }
.check-copy { display: grid; gap: 3px; }
.check-copy strong { font-size: 12px; }
.check-copy small { color: var(--muted); font-size: 10px; }
.submit-button { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 52px; margin-top: 6px; border: 0; border-radius: 12px; background: var(--green); color: white; font: 700 13px 'DM Sans', sans-serif; cursor: pointer; transition: background .15s, transform .15s; }
.submit-button:hover { background: var(--green-dark); }
.submit-button:active { transform: translateY(1px); }
.submit-button span { font-size: 17px; }
.privacy-note { margin: 13px 0 0; color: #8a968e; font-size: 10px; text-align: center; }
.privacy-note span { margin-right: 4px; }
.notice { display: flex; gap: 10px; margin: -6px 0 20px; padding: 12px 14px; border-radius: 10px; font-size: 12px; line-height: 1.5; }
.notice p { margin: 0; }
.notice p + p { margin-top: 4px; }
.success { align-items: center; background: #eff8f1; color: #285b43; }
.notice-icon { display: grid; place-items: center; flex: 0 0 20px; width: 20px; height: 20px; border-radius: 50%; background: #d5ebda; font-weight: 700; }
.error { display: block; background: #fff2ef; color: #a43e2c; }
footer { padding: 21px 0 0; color: #8a968e; font-size: 10px; text-align: center; }
footer span { padding: 0 5px; color: #bac2bc; }

.list-shell { width: min(100% - 36px, 760px); }
.brand-with-action { justify-content: space-between; }
.brand-home { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.text-link, .notice-link { color: var(--green); font-size: 12px; font-weight: 700; text-decoration: none; }
.text-link:hover, .notice-link:hover { text-decoration: underline; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.settings-control { position: relative; }
.settings-button { display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--green); cursor: pointer; transition: background .15s, border-color .15s; }
.settings-button:hover, .settings-button[aria-expanded="true"] { border-color: #c9dacd; background: #f4f9f4; }
.settings-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.settings-menu { position: absolute; z-index: 5; top: calc(100% + 8px); right: 0; display: grid; min-width: 205px; padding: 6px; border: 1px solid var(--line); border-radius: 13px; background: var(--paper); box-shadow: 0 12px 30px rgba(29, 48, 37, .14); }
.settings-menu a, .settings-menu button { display: block; width: 100%; padding: 10px 11px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font: 500 12px 'DM Sans', sans-serif; text-align: left; text-decoration: none; cursor: pointer; }
.settings-menu a:hover, .settings-menu button:hover { background: #f4f7f3; }
.settings-menu .danger-action { color: #a43e2c; }
.back-link { color: var(--green); font-size: 12px; font-weight: 600; text-decoration: none; }
.back-link span { margin-right: 4px; font-size: 16px; vertical-align: -1px; }
.back-link:hover { text-decoration: underline; }
.list-shell .intro { padding-top: 36px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; margin: 0 2px 13px; }
.section-heading h2 { font-size: 22px; }
#current-profile, #matching-section, #others-section { margin-bottom: 26px; }
.count-pill { display: grid; place-items: center; min-width: 28px; height: 28px; padding: 0 8px; border-radius: 20px; background: #e8efe9; color: var(--green); font-size: 11px; font-weight: 700; }
.people-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.profile-card { min-width: 0; padding: 18px; border: 1px solid rgba(30, 56, 42, .07); border-radius: 17px; background: var(--paper); box-shadow: 0 9px 27px rgba(29, 48, 37, .045); }
.own-profile-card { border-color: #c9dacd; background: linear-gradient(135deg, #fff 55%, #f4f9f4); }
.profile-card-top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.avatar { display: grid; place-items: center; flex: 0 0 39px; width: 39px; height: 39px; border-radius: 13px; background: #e9f0ea; color: var(--green); font: 700 16px 'Manrope', sans-serif; }
.profile-person { min-width: 0; }
.profile-person h3 { overflow: hidden; margin: 0; color: var(--ink); font: 700 14px 'Manrope', sans-serif; text-overflow: ellipsis; white-space: nowrap; }
.profile-person p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.request-badge { display: inline-flex; align-items: center; gap: 5px; margin-left: auto; padding: 6px 8px; border-radius: 20px; background: #eff8f1; color: var(--green); font-size: 9px; line-height: 1.35; }
.request-badge span { font-weight: 700; }
.profile-route { display: flex; align-items: center; gap: 8px; min-width: 0; margin: 16px 0 13px; padding: 11px 10px; border-radius: 10px; background: #f5f7f3; font-size: 11px; }
.profile-route strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.route-dot { flex: 0 0 8px; width: 8px; height: 8px; border: 2px solid #6d9279; border-radius: 50%; }
.route-arrow { flex: 0 0 auto; color: #8a968e; }
.profile-route strong:last-child { color: var(--green); }
.profile-details { display: flex; flex-wrap: wrap; align-items: center; gap: 9px 12px; }
.ticket-status, .detail-item { display: inline-flex; align-items: center; gap: 5px; color: #65736a; font-size: 10px; }
.ticket-yes { color: var(--green); }
.interests { width: 100%; margin: 0; color: #526057; font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.interests span { display: block; margin-bottom: 2px; color: #8a968e; font-size: 9px; }
.via-cities { padding-top: 8px; border-top: 1px solid #edf0ec; }
.match-note { margin: 12px 0 0; padding-top: 9px; border-top: 1px solid #edf0ec; color: #718078; font-size: 10px; line-height: 1.45; }
.demo-notice { margin: -8px 0 22px; padding: 12px 14px; border: 1px solid #e4d7a8; border-radius: 11px; background: #fff9e9; color: #6e5b24; font-size: 11px; line-height: 1.5; }
.test-badge { display: inline-flex; align-items: center; margin-left: auto; padding: 5px 7px; border: 1px solid #e4d7a8; border-radius: 20px; background: #fff9e9; color: #806a2a; font-size: 8px; font-weight: 700; letter-spacing: .4px; }
.telegram-link-panel { display: grid; gap: 8px; margin: -8px 0 20px; padding: 14px 16px; border: 1px solid #c9dacd; border-radius: 12px; background: #f4f9f4; color: #526057; font-size: 12px; line-height: 1.5; }
.telegram-link-panel a { width: fit-content; color: var(--green); font-weight: 700; }
.telegram-link-panel.error { border-color: #f0d0c8; background: #fff2ef; color: #a43e2c; }
.publish-button { margin-top: 16px; }
.publish-button:disabled { background: #e9f2eb; color: var(--green); cursor: default; }
.trip-inactive-note { margin: 13px 0 0; padding: 11px 12px; border-radius: 10px; background: #f4f7f3; color: #65736a; font-size: 11px; line-height: 1.5; }
.empty-note { margin: 0 0 13px; padding: 14px 16px; border: 1px dashed #d4ded6; border-radius: 12px; color: #69776e; font-size: 12px; line-height: 1.5; }
.notice-link { display: inline-block; margin-left: 4px; }

@media (max-width: 480px) {
  .page-shell { width: min(100% - 28px, 420px); padding-top: 20px; }
  .intro { padding: 34px 3px 21px; }
  .form-card { padding: 22px 18px; border-radius: 18px; }
  .field-row { gap: 10px; }
  input:not([type=checkbox]), select { min-height: 46px; padding-right: 9px; padding-left: 10px; font-size: 12px; }
  .list-shell { width: min(100% - 28px, 420px); }
  .list-shell .intro { padding-top: 32px; }
  .people-list { grid-template-columns: 1fr; gap: 10px; }
  .profile-card { padding: 16px; }
  .request-badge { max-width: 125px; }
}
