/* Гостевая часть: приветствие в стиле обложки и светлые рабочие экраны с навигацией. */

/* ===== Приветствие и вход: эмблема 2026 (серебряная бабочка на чёрной киноленте), золото =====
   Фон — фирменный коричневый обложки, затемнённый к краям, с мягкой подсветкой за эмблемой: на плоском
   #563d2d чёрная лента выглядела «дырой», на почти чёрном терялся силуэт ленты; так лента читается
   силуэтом, перфорация — как настоящая, золото текста контрастнее. */
.auth-body { min-height: 100vh; color: #f3e9d8; background-color: var(--brown-night);
  background-image: radial-gradient(ellipse 110% 520px at 50% 200px, #6a4b36 0%, var(--brown-night) 62%);
  background-repeat: no-repeat; }
.auth-wrap { max-width: 460px; margin: 0 auto; padding: 16px var(--gutter) 48px; }
.auth-top { display: flex; justify-content: flex-end; min-height: 44px; }
.auth-hero { position: relative; display: flex; justify-content: center; margin: 4px 0 8px; }
.auth-hero::before { content: ""; position: absolute; inset: 6% 10% 14%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(217, 189, 115, .22), rgba(217, 189, 115, 0)); pointer-events: none; }
.auth-emblem { position: relative; display: block; width: min(260px, 64vw); height: auto; }
.auth-emblem-sm { display: block; width: 104px; height: auto; margin: 8px auto 6px; }
.auth-title { font-family: var(--font-display); font-weight: 200; color: var(--gold); text-align: center;
  font-size: 44px; letter-spacing: .02em; margin: 8px 0 4px; line-height: 1.1; }
.auth-sub { text-align: center; color: var(--gold-light); font-family: var(--font-display); font-weight: 300;
  letter-spacing: .12em; text-transform: uppercase; font-size: 15px; margin: 0 0 12px; }
[dir="rtl"] .auth-sub { letter-spacing: 0; }
.auth-lang { display: flex; justify-content: center; margin: 4px 0 20px; }
.auth-card { background: var(--paper); color: var(--ink); border-radius: var(--radius); padding: 24px 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .35); border-top: 3px solid var(--gold); }
.auth-card h1 { font-weight: 300; color: var(--gold-text); font-size: 30px; text-align: center; }
.auth-card .lead { color: var(--muted); text-align: center; }
.auth-foot { text-align: center; margin-top: 20px; font-size: 14px; color: #d8c6a8; }
.auth-foot a { color: var(--gold-light); }
.auth-body :focus-visible { outline-color: #8fb4ff; }
.auth-card :focus-visible { outline-color: var(--focus); }
.gold-rule { width: 64px; height: 1px; background: var(--gold); margin: 12px auto 20px; border: 0; }

/* Правовые тексты */
.legal { background: var(--paper); color: var(--ink); border-radius: var(--radius); padding: 24px 20px; }
.legal h1, .legal h2 { color: var(--ink); }

/* ===== Кабинет гостя ===== */
.g-header { background: var(--brown); color: var(--gold-light); position: sticky; top: 0; z-index: 40; }
.g-header-in { max-width: var(--maxw); margin: 0 auto; display: flex; align-items: center; gap: 12px;
  padding: 6px var(--gutter); min-height: 56px; }
.g-brand { display: flex; align-items: center; gap: 10px; color: var(--gold-light); text-decoration: none;
  font-family: var(--font-display); font-weight: 300; font-size: 20px; letter-spacing: .03em; margin-inline-end: auto; }
.g-brand img { width: 40px; height: auto; display: block; }
.g-brand span { line-height: 1.1; }
.g-brand { min-width: 0; }
.g-brand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 420px) { .g-brand { font-size: clamp(15px, 4.6vw, 19px); gap: 8px; } .g-brand img { width: 32px; } }
.g-header :focus-visible { outline-color: #8fb4ff; }
.g-topnav { display: none; }
.g-main { max-width: var(--maxw); margin: 0 auto; padding: 20px var(--gutter) calc(150px + env(safe-area-inset-bottom)); }
.g-main h1 { font-weight: 300; color: var(--brown); font-size: 32px; }

/* Нижняя навигация (телефон) */
.g-bottomnav { position: fixed; inset-inline: 0; bottom: 0; z-index: 45; background: var(--paper);
  border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(5, 1fr);
  padding-bottom: env(safe-area-inset-bottom); }
.g-bottomnav a, .g-bottomnav summary { display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 60px; gap: 2px; font-size: 12px; color: var(--muted); text-decoration: none; text-align: center;
  padding: 4px 2px; cursor: pointer; list-style: none; line-height: 1.15; }
.g-bottomnav summary::-webkit-details-marker { display: none; }
.g-bottomnav a[aria-current="page"] { color: var(--brown); font-weight: 700; }
.g-bottomnav svg { width: 24px; height: 24px; }
.g-more { position: relative; }
.g-more-menu { position: fixed; inset-inline: 8px; bottom: 72px; background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 8px; display: grid; gap: 2px; }
.g-more-menu a, .g-more-menu button { flex-direction: row; justify-content: flex-start; font-size: 16px; min-height: 48px;
  padding: 8px 14px; color: var(--ink); border-radius: var(--radius-sm); }
.g-more-menu a:hover { background: var(--bg); }

/* Кнопка «Нужна помощь» — всегда на виду */
.help-fab { position: fixed; inset-inline-end: 16px; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 44; box-shadow: 0 6px 20px rgba(0, 0, 0, .25);
  border: 2px solid var(--gold); }
.help-fab svg { width: 20px; height: 20px; }

@media (min-width: 900px) {
  .g-topnav { display: block; background: var(--paper); border-bottom: 1px solid var(--line); }
  .g-topnav ul { max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); display: flex; flex-wrap: nowrap;
    gap: 2px; list-style: none; overflow-x: auto; scrollbar-width: thin; }
  .g-topnav li { flex: none; }
  .g-topnav a { display: inline-flex; align-items: center; min-height: 48px; padding: 0 10px; color: var(--ink);
    text-decoration: none; border-bottom: 3px solid transparent; font-size: 15px; white-space: nowrap; }
  .g-topnav .btn-link { white-space: nowrap; padding: 0 10px; }
  .g-topnav a[aria-current="page"] { border-color: var(--gold); font-weight: 700; color: var(--brown); }
  .g-bottomnav { display: none; }
  .help-fab { bottom: 24px; }
  .g-main { padding-bottom: 96px; }
}

/* Главная */
.hello { margin: 4px 0 20px; }
.hello h1 { margin-bottom: 2px; }
.quick { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; list-style: none; padding: 0; margin: 0; }
@media (min-width: 720px) { .quick { grid-template-columns: repeat(4, 1fr); } }
.quick a { display: flex; flex-direction: column; gap: 8px; min-height: 96px; padding: 16px; background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); font-weight: 700; }
.quick a:hover { border-color: var(--gold); }
.quick svg { width: 28px; height: 28px; color: var(--gold-text); }
.home-grid { display: grid; gap: 16px; grid-template-columns: 1fr; margin-bottom: 24px; }
@media (min-width: 900px) { .home-grid { grid-template-columns: 3fr 2fr; } }
.card-title { font-family: var(--font-display); font-weight: 400; font-size: 14px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--gold-text); margin: 0 0 10px; }

/* Анкета */
.form-card { max-width: 720px; }
.cm-row { display: grid; grid-template-columns: minmax(110px, 38%) 1fr; gap: 8px 12px; align-items: center;
  margin-bottom: 8px; }
.photo-slot { flex-wrap: wrap; align-items: flex-start; }
.photo-form { flex: 1 1 220px; min-width: 0; }
@media (max-width: 340px) { .cm-row { grid-template-columns: 1fr; } }
.photo-slot { display: flex; gap: 14px; align-items: center; }
.photo-ph { width: 72px; height: 72px; border-radius: 50%; background: var(--bg); border: 1px dashed var(--line-strong);
  display: grid; place-items: center; color: var(--muted); font-size: 28px; flex: none; }

/* ===== Программа, событие, справка, контакты, проживание (зона P) ===== */
.p-days { position: sticky; top: 56px; z-index: 30; background: var(--bg); margin: 0 calc(-1 * var(--gutter)) 12px;
  padding: 8px var(--gutter); border-bottom: 1px solid var(--line); }
.p-days ul { display: flex; gap: 8px; list-style: none; margin: 0; padding: 0; overflow-x: auto; scrollbar-width: none; }
.p-days ul::-webkit-scrollbar { display: none; }
.p-days a { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-height: 48px;
  min-width: 64px; padding: 4px 12px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong);
  background: var(--paper); color: var(--ink); text-decoration: none; font-size: 14px; line-height: 1.15; white-space: nowrap; }
.p-days a b { font-family: var(--font-display); font-weight: 400; font-size: 18px; color: var(--brown); }
.p-days a.past { opacity: .6; }
.p-day { scroll-margin-top: 130px; margin: 8px 0 24px; }
.p-day > h2 { font-size: 22px; color: var(--brown); border-bottom: 1px solid var(--gold);
  padding-bottom: 6px; margin-bottom: 12px; }
.p-list { list-style: none; margin: 0; padding: 0; }
.p-item { display: grid; grid-template-columns: 92px 1fr; gap: 4px 14px; background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 10px; }
.p-item.is-cancelled { background: #faf6f2; }
.p-item.is-cancelled .p-title { text-decoration: line-through; color: var(--muted); }
.p-time { font-family: var(--font-display); font-size: 20px; color: var(--brown); line-height: 1.2; }
.p-time.p-note { font-family: var(--font-body); font-size: 14px; color: var(--muted); font-style: italic; }
.p-title { font-weight: 700; color: var(--ink); text-decoration: none; display: block; }
a.p-title:hover { color: var(--gold-text); text-decoration: underline; }
.p-place { color: var(--muted); font-size: 15px; }
.p-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.p-badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 700;
  background: var(--bg); border: 1px solid var(--line); }
.p-badge.ok { background: var(--ok-bg); color: var(--ok); border-color: #c4dfc6; }
.p-badge.off { background: var(--danger-bg); color: var(--danger); border-color: #efc4c0; }
.p-badge.gold { background: #f6eedb; color: var(--gold-text); border-color: #e8d7ac; }
.p-step { display: grid; grid-template-columns: 92px 1fr; gap: 2px 14px; padding: 8px 16px 8px 16px; margin: -4px 0 10px;
  border-inline-start: 3px solid var(--gold-light); font-size: 15px; }
.p-step .p-time { font-size: 16px; }
.p-step .p-kind { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--gold-text); font-weight: 700; }
.p-step a { color: var(--ink); text-decoration: none; }
.p-step a:hover { text-decoration: underline; }
.p-past { margin: 0 0 20px; }
.p-past > summary { cursor: pointer; min-height: var(--tap); display: flex; align-items: center; gap: 8px;
  font-weight: 700; color: var(--muted); padding: 8px 0; }
.p-past[open] > summary { margin-bottom: 8px; }
.p-past .p-item, .p-past .p-step { opacity: .75; }
.p-empty { text-align: center; padding: 32px 16px; }
@media (max-width: 420px) { .p-item, .p-step { grid-template-columns: 1fr; } .p-time { font-size: 18px; } }

/* Карточка события */
.ev-back { display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); text-decoration: none; }
.ev-cover { width: 100%; max-height: 360px; object-fit: cover; border-radius: var(--radius); margin-bottom: 16px; display: block; }
.ev-kind { font-size: 13px; text-transform: uppercase; letter-spacing: .14em; color: var(--gold-text); font-weight: 700; }
.ev-head h1 { margin: 4px 0 12px; }
.ev-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .ev-grid { grid-template-columns: 3fr 2fr; align-items: start; } }
.ev-meta { list-style: none; margin: 0; padding: 0; }
.ev-meta li { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.ev-meta li:last-child { border-bottom: 0; }
.ev-meta .k { color: var(--muted); font-size: 14px; }
@media (max-width: 420px) { .ev-meta li { grid-template-columns: 1fr; gap: 2px; } }
.ev-when { font-family: var(--font-display); font-size: 24px; color: var(--brown); }
.ev-body p:last-child { margin-bottom: 0; }
.ev-note { background: var(--warn-bg); border: 1px solid #f0dfaf; border-radius: var(--radius-sm); padding: 12px 16px; }
.ev-docs { list-style: none; padding: 0; margin: 0; }
.ev-docs a { display: flex; align-items: center; gap: 10px; min-height: var(--tap); }
.rsvp-box { border-top: 3px solid var(--gold); }
.rsvp-state { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; margin-bottom: 12px; }
.rsvp-state .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--ok); flex: none; }
.rsvp-state.off .dot { background: var(--danger); }
.rsvp-state.muted .dot { background: var(--line-strong); }
.rsvp-confirm { position: static; margin: 12px 0 0; max-width: none; box-shadow: none; border: 1px solid var(--line); }
.tr-card { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; margin-top: 10px; background: var(--bg); }

/* Справка, контакты, проживание */
.info-card h2 { font-size: 22px; color: var(--brown); }
.info-toc { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 16px; }
.info-toc a { display: inline-flex; align-items: center; min-height: 40px; padding: 4px 14px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--paper); text-decoration: none; color: var(--ink); font-size: 15px; }
.info-card { scroll-margin-top: 80px; }
.stay-dates { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin: 12px 0; }
.stay-dates div { background: var(--bg); border-radius: var(--radius-sm); padding: 10px 14px; }
.stay-dates b { display: block; font-family: var(--font-display); font-weight: 400; font-size: 20px; color: var(--brown); }
.home-next-title { font-weight: 700; font-size: 19px; text-decoration: none; color: var(--ink); display: block; margin: 4px 0; }
.home-next-when { font-family: var(--font-display); font-size: 22px; color: var(--brown); }
.tr-card .tel { font-size: 15px; min-height: 32px; }
.p-day > h2::first-letter { text-transform: uppercase; }
.home-next-steps { list-style: none; padding: 0; margin: 10px 0 0; font-size: 15px; }
.home-next-steps li { padding: 4px 0; border-top: 1px solid var(--line); }
.home-next-tr { margin-top: 8px; padding: 8px 12px; background: var(--bg); border-radius: var(--radius-sm); }

/* ===== Уведомления и объявления (зона C) ===== */
.nt-list { list-style: none; margin: 0; padding: 0; }
.nt-item { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px;
  margin-bottom: 12px; border-inline-start: 4px solid var(--line); }
.nt-item.is-new { border-inline-start-color: var(--gold); background: #fffdf7; }
.nt-item.is-important { border-inline-start-color: var(--brown); }
.nt-head { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-bottom: 6px; }
.nt-title { font-weight: 700; font-size: 18px; margin: 0; flex: 1 1 100%; overflow-wrap: break-word; }
.nt-tag { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 700;
  background: var(--bg); border: 1px solid var(--line); white-space: nowrap; }
.nt-tag.new { background: #f6eedb; color: var(--gold-text); border-color: #e8d7ac; }
.nt-tag.imp { background: var(--brown); color: #fff; border-color: var(--brown); }
.nt-tag.ok { background: var(--ok-bg); color: var(--ok); border-color: #c4dfc6; }
.nt-body p { margin: 0 0 8px; overflow-wrap: break-word; }
.nt-facts { margin: 8px 0; display: grid; gap: 4px 12px; grid-template-columns: max-content 1fr; }
.nt-facts dt { color: var(--muted); font-size: 14px; }
.nt-facts dd { margin: 0; font-weight: 700; overflow-wrap: break-word; }
.nt-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 8px; }
.nt-meta { color: var(--muted); font-size: 13px; }
.nt-badge { display: inline-flex; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--danger);
  color: #fff; font-size: 12px; font-weight: 700; align-items: center; justify-content: center; margin-inline-start: 6px; vertical-align: middle; }

/* ===== Мои документы и фото (зона G) ===== */
.doc-list { list-style: none; margin: 0; padding: 0; }
.doc-list > li { border-top: 1px solid var(--line); padding: 14px 0; }
.doc-list > li:first-child { border-top: 0; padding-top: 0; }
.doc-row { display: flex; gap: 12px; align-items: flex-start; }
.doc-thumb { width: 64px; height: 64px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--line); flex: none; }
.doc-ico { width: 64px; height: 64px; border-radius: var(--radius-sm); background: var(--bg); border: 1px solid var(--line);
  display: grid; place-items: center; font-weight: 700; color: var(--gold-text); flex: none; font-size: 14px; }
.doc-name { font-weight: 700; overflow-wrap: anywhere; }
.doc-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; align-items: center; }
.doc-actions form { margin: 0; }
details.doc-replace > summary { cursor: pointer; min-height: 44px; display: inline-flex; align-items: center; color: var(--gold-text); font-weight: 700; }


/* ===== Моя поездка (зона G) ===== */
.trip-grid .tel { font-size: 16px; }
.trip-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .trip-grid { grid-template-columns: 1fr 1fr; } }
.trip-kv { display: grid; grid-template-columns: minmax(88px, 34%) 1fr; gap: 6px 12px; margin: 0 0 12px; }
.trip-kv dt { color: var(--muted); font-size: 15px; }
.trip-kv dd { margin: 0; overflow-wrap: anywhere; }
.trip-big { font-size: 22px; font-weight: 700; margin: 0 0 4px; }
.trip-note { background: var(--bg); border-radius: var(--radius-sm); padding: 10px 12px; margin: 0 0 12px; white-space: pre-line; }
.trip-form-grid { display: grid; gap: 0 12px; grid-template-columns: 1fr 1fr; }
.trip-form-grid .full { grid-column: 1 / -1; }
@media (max-width: 360px) { .trip-form-grid { grid-template-columns: 1fr; } }
details.trip-edit > summary { cursor: pointer; min-height: var(--tap); display: inline-flex; align-items: center;
  font-weight: 700; color: var(--gold-text); }
.tr-card + .tr-card { margin-top: 12px; }

/* Посадочные талоны в «Моей поездке» */
.boarding-list { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 12px; }
.boarding-list li { display: flex; flex-direction: column; gap: 6px; align-items: stretch; width: 120px; }
.boarding-list a { display: block; border-radius: var(--radius-sm); }
.boarding-list img, .boarding-pdf { width: 120px; height: 120px; object-fit: cover; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--bg); display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: var(--gold-text); }
.boarding-list .btn { width: 100%; }
.boarding-dir { margin: 8px 0 8px; display: flex; gap: 4px 24px; flex-wrap: wrap; }
.boarding-dir legend { margin-bottom: 0; }
.boarding-dir label { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.boarding-dir input[type=radio] { width: 22px; height: 22px; margin: 0; flex: none; }
.boarding-pick { position: relative; overflow: hidden; border-style: dashed; }
.boarding-pick:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.boarding-pick input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.boarding-name { display: block; margin: 8px 0 12px; overflow-wrap: anywhere; }
.boarding-name:empty { display: none; }
#boarding form > .btn { margin-top: 12px; }
@media (max-width: 719px) { .boarding-pick, #boarding form > .btn { width: 100%; } }
[dir="rtl"] .ev-kind, [dir="rtl"] .p-kind { font-size: 14px; }

/* ===== «Моя поездка»: рейс как посадочный талон, транспорт — карточка поездки ===== */
.pass { border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper);
  overflow: hidden; margin: 4px 0 16px; }
.pass-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 14px 16px 12px; border-bottom: 1px dashed var(--line-strong); }
.pass-flight { font-family: var(--font-display); font-weight: 400; font-size: 34px; line-height: 1;
  letter-spacing: .02em; color: var(--brown-ink); }
.pass-date { font-size: 16px; color: var(--ink); text-align: end; }
.pass-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pass-cell { display: flex; flex-direction: column; gap: 4px; padding: 12px 16px 14px; min-width: 0; }
.pass-cell + .pass-cell { border-inline-start: 1px solid var(--line); }
.pass-wide { grid-column: span 2; }
.pass-wide + .pass-cell { grid-column: 1 / -1; border-inline-start: 0; border-top: 1px solid var(--line); }
.pass-label { display: block; font-size: 12px; line-height: 1.3; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); }
[dir="rtl"] .pass-label { letter-spacing: 0; text-transform: none; }
.pass-value { font-family: var(--font-display); font-size: 26px; line-height: 1.1; color: var(--brown-ink);
  overflow-wrap: break-word; }
.pass-wide .pass-value { font-family: var(--font-body); font-size: 18px; line-height: 1.3; }

.info-rows { margin: 0 0 12px; display: flex; flex-direction: column; }
.info-row { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; border-top: 1px solid var(--line); }
.info-row:first-child { border-top: 0; padding-top: 0; }
.info-row dt { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
[dir="rtl"] .info-row dt { letter-spacing: 0; text-transform: none; }
.info-row dd { margin: 0; font-size: 17px; line-height: 1.4; display: flex; flex-wrap: wrap; align-items: center;
  column-gap: 14px; }
.info-row .tel { font-size: 17px; min-height: 44px; }
.info-name { font-weight: 600; }
.trip-note { background: var(--bg); border-inline-start: 3px solid var(--gold); border-radius: var(--radius-sm);
  padding: 12px 14px; margin: 0 0 12px; font-size: 16px; line-height: 1.5; white-space: pre-line; }
.trip-note b { display: block; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
  font-weight: 400; margin-bottom: 4px; }

.ride { border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); padding: 16px; }
.ride + .ride { margin-top: 12px; }
.ride-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.ride-title { margin: 0; font-size: 18px; line-height: 1.3; font-weight: 700; font-family: var(--font-body); }
.ride-time { display: flex; flex-direction: column; align-items: flex-end; text-align: end; flex: none; max-width: 50%; }
.ride-hm { font-family: var(--font-display); font-size: 30px; line-height: 1; color: var(--brown-ink); }
.ride-hm-note { font-family: var(--font-body); font-size: 15px; line-height: 1.3; font-weight: 600; }
.ride-day { font-size: 13px; color: var(--muted); margin-top: 4px; }
.route { list-style: none; margin: 0 0 12px; padding: 0; position: relative; }
.route li { position: relative; display: flex; flex-direction: column; gap: 2px; padding-inline-start: 22px;
  padding-bottom: 10px; font-size: 16px; line-height: 1.4; }
.route li::before { content: ""; position: absolute; inset-inline-start: 4px; top: 5px; width: 9px; height: 9px;
  border-radius: 50%; border: 2px solid var(--gold); background: var(--paper); }
.route li:last-child { padding-bottom: 0; }
.route li:last-child::before { background: var(--gold); }
.route li:not(:last-child)::after { content: ""; position: absolute; inset-inline-start: 9px; top: 18px; bottom: 0;
  border-inline-start: 2px dotted var(--line-strong); }
.car { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  background: var(--bg); border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 12px; }
.car-model { font-size: 15px; line-height: 1.35; }
.plate { font-family: "Arimo", Arial, sans-serif; font-weight: 700; font-size: 17px; letter-spacing: .08em;
  padding: 4px 10px; border: 2px solid var(--ink); border-radius: 6px; background: #fff; white-space: nowrap; }

@media (max-width: 360px) {
  .pass-flight { font-size: 30px; }
  .pass-value { font-size: 22px; }
  .pass-cell { padding: 10px 12px 12px; }
  .ride-hm { font-size: 26px; }
}

/* Шапка гостя на телефоне — только бабочка (решение владельца 08.11) */
@media (max-width: 520px) {
  .g-brand > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
/* Значения в ячейках талона — на одной линии при любой длине подписей */
.pass-cell { justify-content: space-between; }
.pass-cell .pass-value { margin-top: auto; padding-top: 6px; }
.pass-label { letter-spacing: .04em; }
.pass-msk { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; font-family: var(--font-body); }
.pass-grid { grid-template-columns: minmax(0, .95fr) minmax(0, 1.25fr) minmax(0, .8fr); }
/* Узкие экраны: слова не рвутся посередине */
.pass-label, .g-bottomnav span { overflow-wrap: normal; word-break: normal; hyphens: auto; }
@media (max-width: 374px) {
  .pass-label { font-size: 11px; letter-spacing: .02em; }
  .pass-cell { padding-inline: 10px; }
  .g-bottomnav span { font-size: 11px; }
}
.ride-hm small { font-size: .6em; margin-inline-end: 2px; }
.ride-when { display: flex; flex-direction: column; gap: 2px; margin: -4px 0 12px; padding: 10px 12px;
  background: var(--warn-bg); border-radius: var(--radius-sm); font-size: 16px; font-weight: 600; line-height: 1.35; }
.ride-when .ride-day { margin: 0; font-weight: 400; }
.pass-label { hyphens: manual; }
@media (max-width: 374px) {
  .pass-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) minmax(0, 1fr); }
  .pass-label { font-size: 10.5px; letter-spacing: 0; }
}
.pass-date { display: flex; flex-direction: column; align-items: flex-end; }
@media (max-width: 400px) {
  .pass-head { flex-direction: column; align-items: flex-start; gap: 6px; }
  .pass-date { align-items: flex-start; text-align: start; }
}
.g-bottomnav span { hyphens: none; }
.pass-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1fr); }
.pass-label { font-size: 11px; letter-spacing: .03em; }

/* =====================================================================================================
   Визуальная приёмка 08.11 (iPhone/Galaxy): принципы «Моей поездки» на всех экранах —
   подписи мелкими капителями над значениями, время шрифтом заголовков, неточное время — плашкой,
   единые карточки и отступы, ничего не перекрывается кнопкой «Нужна помощь».
   ===================================================================================================== */

/* Нижнее меню: иконки на одной линии, подписи начинаются с одной высоты (одно- и двухстрочные) */
.g-bottomnav a, .g-bottomnav summary { justify-content: flex-start; padding: 8px 2px 6px; gap: 3px; }
.g-bottomnav svg { flex: none; }
.g-bottomnav span { display: block; max-width: 100%; }
/* «Ещё»: затемнение под меню; тап по затемнению закрывает меню (это часть summary) */
.g-more[open] > summary::before { content: ""; position: fixed; inset: 0; background: rgba(26, 18, 12, .38); }
.g-more-menu { z-index: 1; bottom: calc(68px + env(safe-area-inset-bottom)); }
.g-more-menu a { display: flex; align-items: center; }
.g-more-menu a[aria-current="page"] { background: var(--bg); font-weight: 700; color: var(--brown); }
.g-more-menu form { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; }
.g-more-menu form .btn-link { width: 100%; text-align: start; min-height: 48px; padding: 8px 14px !important;
  color: var(--danger); text-decoration: none; font-size: 16px; }

/* Нижний отступ контента: последний элемент виден над «Нужна помощь» и нижним меню */
.g-main { padding-bottom: calc(168px + env(safe-area-inset-bottom)); }
@media (min-width: 900px) { .g-main { padding-bottom: 104px; } }

/* Плитки разделов — одной высоты в ряду */
.quick li { display: flex; }
.quick a { flex: 1; }
.home-grid { margin-bottom: 16px; }
.home-grid > .card { margin-bottom: 0; }
.home-grid + .card-title { margin-top: 24px; }

/* Время события: точное — крупно; «около…», «по окончании…», «уточняется» — плашкой */
.ev-whenbox { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; margin-bottom: 12px; }
.ev-when { font-family: var(--font-display); font-weight: 400; font-size: 32px; line-height: 1.05; color: var(--brown-ink); }
.ev-day { font-size: 14px; line-height: 1.35; color: var(--muted); }
.ride-when.ev-when-note { display: inline-block; margin: 0; padding: 6px 10px; font-size: 16px; }
.when-chip, .steps-note, .p-time.p-note { display: inline-block; justify-self: start; align-self: start;
  padding: 3px 8px; border-radius: 6px; background: var(--warn-bg); color: #5b4510; font-family: var(--font-body);
  font-style: normal; font-weight: 600; font-size: 14px; line-height: 1.35; }
.p-item .p-time.p-note, .p-step .p-time.p-note { margin-bottom: 4px; }
.ev-facts .ev-whenbox { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.ev-facts .info-rows .info-row:first-child { padding-top: 0; }
.info-row dd.info-col { flex-direction: column; align-items: flex-start; }
.map-link { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; }
.info-row .map-link { margin-bottom: -10px; }

/* Главная: ближайшее событие */
.home-next-title { font-size: 19px; line-height: 1.3; margin: 0 0 6px; }
.home-next-place { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; margin: 0 0 12px;
  font-size: 16px; line-height: 1.4; }
.home-next-place .muted { font-size: 15px; }
.home-next-place .map-link { min-height: 40px; }
.steps { list-style: none; margin: 0 0 12px; padding: 0; border-top: 1px solid var(--line); }
.steps li { display: grid; grid-template-columns: 4.4em minmax(0, 1fr); gap: 12px; align-items: baseline;
  padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 16px; line-height: 1.35; }
.steps li.is-note { grid-template-columns: minmax(0, 1fr); gap: 6px; }
.steps-t { font-family: var(--font-display); font-size: 19px; line-height: 1.2; color: var(--brown-ink); }
.home-next-rides { display: flex; flex-direction: column; gap: 10px; margin-bottom: 4px; }
.card-more { margin: 8px 0 0; }
.card-more a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 600; }

/* Транспорт в программе, на главной и в карточке события — та же карточка поездки, компактнее */
.ride-compact { padding: 14px; }
.ride-compact .ride-title { font-size: 17px; }
.ride-compact .ride-hm { font-size: 28px; }
.ride-compact .ride-when { margin: -2px 0 12px; }
.ride > :last-child, .ride .info-rows:last-child { margin-bottom: 0; }
.ride + .ride { margin-top: 10px; }
.p-item .ride { margin-top: 12px; background: var(--bg); border-color: var(--line); }
.p-item .ride .car { background: var(--paper); }
.p-item .ride .plate { background: #fff; }
.p-item .route li::before { background: var(--bg); }
.p-item .route li:last-child::before { background: var(--gold); }

/* Проживание: даты и номер — ровные ячейки с подписью капителью и значением на одной линии */
.stay-dates { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); grid-template-columns: none; gap: 8px; margin: 12px 0 16px; }
.stay-dates div { display: flex; flex-direction: column; justify-content: space-between; gap: 6px; padding: 10px 12px; }
.stay-dates .pass-label { overflow-wrap: normal; }
.stay-dates b { font-size: 22px; line-height: 1.1; }
.stay-hotel { color: var(--brown); margin-bottom: 4px; }
.stay-addr { display: flex; flex-direction: column; align-items: flex-start; margin: 0; }
.stay-contacts { margin-top: 16px; }

/* Уведомления: заголовок обычным жирным (не «синтетический» жирный Oswald), факты — подпись над значением */
.nt-title { font-family: var(--font-body); font-weight: 700; font-size: 18px; line-height: 1.3; letter-spacing: 0;
  margin-top: 2px; }
.nt-item { padding: 16px; }
.nt-facts { display: flex; flex-direction: column; gap: 0; margin: 12px 0 4px; border-top: 1px solid var(--line); }
.nt-facts dt { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding-top: 10px; }
[dir="rtl"] .nt-facts dt { letter-spacing: 0; text-transform: none; }
.nt-facts dd { font-weight: 600; line-height: 1.4; padding: 2px 0 10px; border-bottom: 1px solid var(--line); }
.nt-facts dd:last-child { border-bottom: 0; padding-bottom: 0; }
.nt-actions:empty { display: none; }
.nt-actions a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.nt-list > .nt-item:last-child { margin-bottom: 0; }
.card .nt-list { margin-bottom: 4px; }

/* Профиль: способы связи — флажок, под ним поле (поле пустого невыбранного способа скрыто) */
.cm-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; margin-bottom: 0; }
.cm-row input[type=text] { margin: 0 0 10px; }
.cm-row:has(input[type=checkbox]:not(:checked)) input[type=text]:placeholder-shown { display: none; }
@media (min-width: 720px) { .cm-row { grid-template-columns: 200px minmax(0, 1fr); column-gap: 12px; align-items: center; }
  .cm-row input[type=text] { margin: 4px 0; } }
.email { overflow-wrap: anywhere; font-weight: 700; }
@media (max-width: 719px) {
  .g-main .form-card form > .btn, .g-main .form-card form > button[type=submit] { width: 100%; }
}


.photo-slot { align-items: flex-start; }
.photo-form { flex: 1 1 260px; }

/* Отмена записи: кнопки одной ширины */
#rsvp-cancel-dlg .row .btn { flex: 1 1 200px; }

/* Справка: оглавление — «таблетки» 44 px */
.info-toc a { min-height: 44px; }

/* Правовые тексты: шапка оператора — врезкой, пункты 1.1, 1.2… — с новой строки, как в исходнике */
.legal p, .legal li { white-space: pre-line; }
.legal blockquote { margin: 0 0 1em; padding: 12px 14px; background: var(--bg); border-inline-start: 3px solid var(--gold);
  border-radius: var(--radius-sm); }
.legal blockquote p:last-child { margin-bottom: 0; }
.legal h1 { font-size: 28px; }
.legal h2 { font-size: 21px; margin-top: 1.2em; }
/* На главной — короткая карточка: название, время, место подачи и номер машины */
.ride-mini .ride-head { margin-bottom: 8px; }
.ride-mini .route li { padding-inline-start: 0; }
.ride-mini .route li::before, .ride-mini .route li::after { display: none; }
.ride-mini .car { justify-content: flex-start; padding: 0; background: none; }
span.cap { display: inline-block; }
.g-bottomnav .g-more-menu a { flex-direction: row; justify-content: flex-start; align-items: center; gap: 8px;
  padding: 8px 14px; font-size: 16px; color: var(--ink); text-align: start; }
/* RTL: данные сотрудников на кириллице/латинице (место подачи, машина, время-пояснение) — направление по содержимому */
[dir="rtl"] .ride-when span, [dir="rtl"] .route li > span:last-child, [dir="rtl"] .car-model,
[dir="rtl"] .steps li > span:last-child { unicode-bidi: plaintext; }
/* Раскрывающиеся формы («Изменить данные рейса», «Заменить файл») — со стрелкой-указателем */
details.trip-edit > summary, details.doc-replace > summary { list-style: none; gap: 8px; }
details.trip-edit > summary::-webkit-details-marker, details.doc-replace > summary::-webkit-details-marker { display: none; }
details.trip-edit > summary::after, details.doc-replace > summary::after { content: ""; width: 8px; height: 8px; flex: none;
  border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-2px) rotate(45deg); transition: transform .15s; }
details[open].trip-edit > summary::after, details[open].doc-replace > summary::after { transform: translateY(2px) rotate(-135deg); }
.info-rows:last-child > .info-row:last-child { padding-bottom: 0; }
.info-row:last-child dd > .tel:last-child { margin-bottom: -8px; }
.g-main > section + section { margin-top: 24px; }
.g-main > section > .nt-list + p, .g-main > section + p.small { margin-top: 16px; }
.card .p-list > :last-child { margin-bottom: 0; }
/* Ввод кода: вспомогательные ссылки — по центру, столбиком, как остальная карточка */
.auth-links { display: flex; flex-direction: column; align-items: center; gap: 0; margin-top: 4px; }
.auth-links form { margin: 0; }
.auth-links a { display: inline-flex; align-items: center; min-height: 44px; }
/* Неточное время в списке программы — плашкой над названием (а не в узкой колонке времени) */
.p-item:has(> .p-note), .p-step:has(> .p-note) { grid-template-columns: minmax(0, 1fr); }
.card .p-step { grid-template-columns: minmax(0, 1fr); }
/* ПК: верхнее меню выровнено по колонке контента */
@media (min-width: 900px) {
  .g-topnav ul { max-width: var(--maxw); padding: 0 calc(var(--gutter) - 9px); }
  .g-topnav a, .g-topnav .btn-link { padding: 0 9px; }
}
.info-row dd { align-items: baseline; }
/* Форма рейса: на телефоне — одна колонка (длинные подписи не сдвигают поля); в две колонки — поля на одной линии */
@media (max-width: 559px) { .trip-form-grid { grid-template-columns: minmax(0, 1fr); } }
@media (min-width: 560px) {
  .trip-form-grid { align-items: start; }
  .trip-form-grid > .field > label { min-height: 2.9em; display: flex; align-items: flex-end; }
  .trip-form-grid > .full > .field > label { min-height: 0; }
}
.trip-form-grid + .btn { width: 100%; }
@media (min-width: 720px) { .trip-form-grid + .btn { width: auto; } }
