/* Подборки, «Моя прогулка», форма предложения и общие действия объекта
   (поделиться, QR-код, прогулка). Построено на токенах rassvet.css. */

.d-skip { position: absolute; left: -9999px; }
.d-skip:focus { left: var(--pad); top: 8px; z-index: 2000; padding: 10px 14px; border-radius: var(--r-sm); background: var(--surface); color: var(--accent); font-weight: 600; }

.d-shell { max-width: var(--wrap); margin: 0 auto; padding: 14px var(--pad) 0; }
.d-breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 15px; color: var(--slate); }
.d-breadcrumb a { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.d-breadcrumb span { color: #A9B1C7; }

.d-intro { padding: 6px 0 4px; }
.d-kicker { display: block; font-size: 15px; color: var(--slate); }
.d-intro h1, .d-shell h1 { margin-top: 2px; font-size: 30px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; text-wrap: balance; }
.d-shell h2 { font-size: 22px; }
.d-lead { margin-top: 10px; max-width: 62ch; font-size: 17px; line-height: 1.5; color: var(--slate); }
.d-note { margin-top: 14px; max-width: 68ch; font-size: 15px; line-height: 1.5; color: var(--slate); }
.d-note a, .d-shell p a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* кнопки раздела */
.d-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }
.d-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 16px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); color: var(--accent); font: 600 15px/1.2 var(--font); text-align: center; cursor: pointer; }
.d-btn:hover { border-color: #B9C1D6; }
.d-btn .ic { width: 20px; height: 20px; }
.d-btn.primary { background: var(--navy); border-color: var(--accent); color: #fff; }
.d-btn.primary:hover { background: #1F2B5E; }
.d-btn[aria-pressed="true"] { background: var(--mist); border-color: var(--mist); }
.d-btn:disabled { opacity: .45; cursor: not-allowed; }
.d-btn--icon { width: 46px; padding: 0; }

/* список подборок */
.d-grid { display: grid; gap: 28px 20px; margin-top: 26px; }
.d-card-link { display: block; }
.d-card__img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--r); background: var(--mist); }
.d-card__img.r-nophoto { color: #A9B1C7; }
.d-card-body { padding-top: 10px; }
.d-card-body small { display: block; font-size: 14px; color: var(--slate); }
.d-card h3 { font-size: 20px; font-weight: 700; letter-spacing: -.01em; line-height: 1.2; }
.d-card-body p { margin-top: 6px; font-size: 15px; line-height: 1.45; color: var(--slate); }
.d-card:hover h3 { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* места подборки */
.d-places { margin-top: 22px; border-bottom: 1px solid var(--line); }
.d-place { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 4px 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.d-place__pic { width: 88px; height: 88px; border-radius: 12px; overflow: hidden; background: var(--mist); color: var(--accent); display: grid; place-items: center; }
.d-place__pic img { width: 100%; height: 100%; object-fit: cover; }
.d-place__pic .ic { width: 28px; height: 28px; }
.d-place__name { font-size: 18px; font-weight: 650; line-height: 1.25; letter-spacing: 0; }
.d-place__name a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.d-place__kind { display: flex; align-items: center; gap: 6px; margin-top: 3px; font-size: 14px; color: var(--slate); }
.d-place__kind .ic { width: 16px; height: 16px; }
.d-place .d-actions { grid-column: 1 / -1; margin-top: 4px; }
.d-place .d-actions .d-btn { flex: 1; }
.d-place .d-btn { min-height: 44px; padding: 0 12px; }

.d-banner { display: grid; gap: 14px; margin-top: 28px; padding: 18px; border-radius: 16px; background: var(--mist); }
.d-banner strong, .d-banner h2 { display: block; font-size: 19px; font-weight: 700; letter-spacing: -.01em; line-height: 1.25; }
.d-banner p { margin-top: 4px; font-size: 15px; line-height: 1.5; color: var(--slate); }
.d-banner .d-btn { justify-self: start; }

.d-status { padding: 28px 0; color: var(--slate); }
.d-status:empty { display: none; }
.d-status h2 { color: var(--ink); }
.d-status p { margin-top: 6px; max-width: 60ch; }
.d-status .d-btn { margin-top: 16px; }

/* «Моя прогулка»: остановки по порядку */
#routeList { margin-top: 18px; border-bottom: 1px solid var(--line); }
.d-route-row { display: grid; grid-template-columns: 28px 72px minmax(0, 1fr); gap: 8px 12px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.d-number { font-size: 20px; font-weight: 750; color: var(--accent); font-variant-numeric: tabular-nums; text-align: center; }
.d-route-row__pic { width: 72px; height: 72px; border-radius: 12px; overflow: hidden; background: var(--mist); color: var(--accent); display: grid; place-items: center; }
.d-route-row__pic img { width: 100%; height: 100%; object-fit: cover; }
.d-route-row h3 { font-size: 17px; font-weight: 650; line-height: 1.25; letter-spacing: 0; }
.d-route-row h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.d-route-row .d-note { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; margin-top: 2px; color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.d-route-tools { grid-column: 2 / -1; display: flex; gap: 8px; }
.d-route-tools .d-btn { min-height: 44px; }

/* форма предложения */
.d-form { max-width: 680px; margin-top: 22px; }
.d-form label:not(.d-check) { display: block; margin: 16px 0 6px; font-size: 15px; font-weight: 600; }
.d-form input:not([type="checkbox"]), .d-form select, .d-form textarea { display: block; width: 100%; min-height: 52px; padding: 12px 14px; border-radius: var(--r); border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font: 400 17px/1.4 var(--font); }
.d-form textarea { min-height: 120px; resize: vertical; }
.d-form input:focus, .d-form select:focus, .d-form textarea:focus { outline: 3px solid var(--sun); outline-offset: 1px; border-color: var(--accent); }
.d-form ::placeholder { color: #8189A3; }
.d-form .d-note { margin-top: 6px; font-size: 14px; }
.d-form-grid { display: grid; gap: 0 16px; }
.d-check { display: flex; align-items: flex-start; gap: 12px; margin-top: 18px; font-size: 15px; line-height: 1.45; }
.d-check input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--accent); }
.d-check a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.d-honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.d-form .d-status { padding: 12px 0 0; color: var(--danger); font-weight: 600; }
.d-form .d-btn.primary { min-height: 52px; padding: 0 22px; background: var(--sun); border-color: var(--sun); color: var(--navy-deep); font-size: 17px; }
.d-form h2 { margin-top: 4px; }

/* окно подтверждения и запасное копирование ссылки */
.d-dialog { width: min(440px, calc(100% - 32px)); padding: 22px; border: 0; border-radius: var(--r-lg); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-pop); font-family: var(--font); }
.d-dialog::backdrop { background: rgba(13,21,53,.55); }
.d-dialog h2 { padding-right: 44px; font-size: 20px; }
.d-dialog p { margin-top: 8px; color: var(--slate); }
.d-dialog textarea { margin-top: 12px; padding: 12px; border-radius: var(--r-sm); border: 1.5px solid var(--line); font: 400 15px/1.4 var(--font); }
.d-close { position: absolute; right: 10px; top: 10px; width: 44px; height: 44px; border-radius: 50%; font-size: 26px; line-height: 1; color: var(--slate); text-align: center; }
.d-close:hover { background: var(--mist); }

/* QR-код страницы — раскрывается на месте, без всплывающего окна */
.d-qr-panel { display: flex; align-items: center; gap: 20px; margin-top: 14px; padding: 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); }
.d-qr-panel .d-qr-image { flex: none; width: 200px; height: 200px; max-width: 100%; object-fit: contain; }
.d-qr-copy { min-width: 0; }
.d-qr-panel h2 { font-size: 19px; font-weight: 700; letter-spacing: -.01em; }
.d-qr-panel p { margin-top: 6px; font-size: 15px; line-height: 1.45; color: var(--slate); }
.d-qr-status:empty { display: none; }
.d-qr-panel .d-actions { margin-top: 14px; }

.d-footer { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 40px; padding: 22px 0 30px; border-top: 1px solid var(--line); font-size: 15px; color: var(--slate); }
.d-footer a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 540px) {
  .d-qr-panel { flex-direction: column; align-items: stretch; text-align: left; }
  .d-qr-panel .d-qr-image { align-self: center; }
  .d-qr-panel .d-actions > .d-btn { flex: 1; }
}
@media (min-width: 700px) {
  .d-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .d-form-grid { grid-template-columns: 1fr 1fr; }
  .d-banner { grid-template-columns: minmax(0, 1fr) auto; align-items: center; padding: 22px 24px; }
  .d-route-row { grid-template-columns: 32px 72px minmax(0, 1fr) auto; }
  .d-route-tools { grid-column: auto; }
}
@media (min-width: 960px) {
  .d-shell { padding-top: 24px; }
  .d-intro h1, .d-shell h1 { font-size: 40px; }
  .d-shell h2 { font-size: 26px; }
  .d-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 20px; }
  .d-places { max-width: 820px; }
  .d-place { grid-template-columns: 104px minmax(0, 1fr) auto; align-items: center; }
  .d-place__pic { width: 104px; height: 104px; }
  .d-place .d-actions { grid-column: auto; margin-top: 0; }
  .d-place .d-actions .d-btn { flex: none; }
  #routeList, .d-status { max-width: 820px; }
}
