/* public/assets/ui.css */
/* =========================================================
   UI CORE — базовые переменные + типографика + контейнер
   + формы + утилиты + базовые компоненты (btn/card/alerts)
   ========================================================= */

/* =========================================================
   PWA/TWA FIX: стабилизация шрифтов в Android Chrome/WebView
   Включается только если в URL есть ?source=pwa
   ========================================================= */

html.is-pwa{
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  font-size: 16px !important; /* фикс rem */
}

html.is-pwa body{
  font-size: 1rem;
  line-height: 1.35;
}

@media (max-width: 700px){
  html.is-pwa .page-title{ font-size: 1.35rem !important; }
  html.is-pwa h1{ font-size: 1.5rem !important; }
  html.is-pwa h2{ font-size: 1.25rem !important; }
}

/* --- Theme tokens + UI tokens --- */
:root{
  --theme-color: #0088cc;

  --bg: #f7f9fc;
  --surface: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --border: #e5e7eb;

  --radius: 14px;
  --radius-sm: 12px;

  --shadow-sm: 0 8px 20px rgba(71,85,105,.06);
  --shadow-md: 0 16px 40px rgba(71,85,105,.12);

  /* ✅ контейнер “под любые ПК” */
  --container: 1440px;

  /* Ширина «широких» секций (org-ui, витрина, доски и т.п.) — синхрон с container */
  --shell-wide: min(1380px, calc(100vw - 28px));

  /* ✅ адаптивный gutter (под телефоны/планшеты/ПК) */
  --gutter: clamp(12px, 1.6vw, 20px);

  --safe-area-inset-bottom: env(safe-area-inset-bottom, 0px);
  --safe-area-inset-left: env(safe-area-inset-left, 0px);
  --safe-area-inset-right: env(safe-area-inset-right, 0px);
  --safe-area-inset-x: max(var(--safe-area-inset-left), var(--safe-area-inset-right));

  /* UI kit tokens (app-like) */
  --ui-bg: var(--bg, #f6f7fb);
  --ui-surface: rgba(255,255,255,.9);
  --ui-border: rgba(190,205,227,.40);
  --ui-text: var(--text, #0f172a);
  --ui-muted: var(--muted, #6b7280);
  --ui-shadow: 0 18px 42px rgba(71,85,105,.10);
  --ui-shadow-sm: 0 10px 24px rgba(71,85,105,.07);
  --ui-radius: 18px;
  --ui-radius-sm: 14px;
  --ui-pad: 14px;
  --ui-gap: 12px;
  --ui-primary: var(--theme-color, #0088cc);
}

/* чуть шире на больших мониторах */
@media (min-width: 1400px){
  :root{ --shell-wide: 1440px; }
}
@media (min-width: 1920px){
  :root{
    --container: 1480px;
    --shell-wide: 1480px;
  }
}
@media (min-width: 2400px){
  :root{
    --container: 1520px;
    --shell-wide: 1520px;
  }
}

/* ===== базовые “железные” фиксы ===== */
html, body{
  width: 100%;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* универсально считаем ширины */
*, *::before, *::after{
  box-sizing: border-box;
}

/* медиа никогда не раздувают страницу */
img, video, iframe, canvas{
  max-width: 100%;
}

/* img по умолчанию без “inline-щели” */
img{
  display: block;
  height: auto;
}

body{
  margin: 0;
  font-family: var(--site-font, var(--site-header-font, "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif));
  background: var(--bg);
  color: var(--text);
}

button,
input,
select,
textarea,
optgroup{
  font-family: inherit;
}

/* --- Container --- */
.container{
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;

  padding-top: 0;
  padding-bottom: var(--gutter);
  padding-left: calc(var(--gutter) + var(--safe-area-inset-x));
  padding-right: calc(var(--gutter) + var(--safe-area-inset-x));
}

/* --- Links --- */
a{
  color: #0055aa;
  text-decoration: none;
}
a:hover{ text-decoration: underline; }

/* --- Focus (не ломаем, используем focus-visible) --- */
:focus-visible{
  outline: 2px solid rgba(0,136,204,.35);
  outline-offset: 2px;
}

/* =========================================================
   Типографика (общая)
   ========================================================= */

.page-title{
  margin: 15px 0 20px;
  padding-bottom: 6px;
  font-size: 1.6rem;
  line-height: 1.15;
  font-weight: 900;
  color: #0f172a;
  border-bottom: 2px solid rgba(229,231,235,.70);
}

.section-title{
  margin: 20px 0 10px;
  font-size: 1.25rem;
  line-height: 1.2;
  font-weight: 800;
  color: rgba(15,23,42,.92);
}

.text-muted{ color: var(--muted); }
.text-center{ text-align: center; }

.empty{
  text-align: center;
  color: var(--muted);
  font-style: italic;
  padding: 20px;
}

/* =========================================================
   Forms base (общие)
   ========================================================= */

input, select, textarea{
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  font-size: 1rem;
  background: #fff;
  color: var(--text);
}

input:focus, select:focus, textarea:focus{
  border-color: var(--theme-color);
  outline: none;
}

/* ВАЖНО: ширину 100% даём всем формам, кроме формы поиска */
form:not(.search-form) input,
form:not(.search-form) select,
form:not(.search-form) textarea{
  width: 100%;
}

/* =========================================================
   Modal (только в своём контейнере)
   ========================================================= */

.message-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}
.message-modal.active { display: flex; }

.modal-content {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  width: 350px;
  max-width: 90%;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}
.modal-content h3 {
  margin-top: 0;
  font-size: 1.2rem;
  margin-bottom: 10px;
}
.modal-content textarea {
  width: 100%;
  border: 1px solid #ccc;
  border-radius: 10px;
  padding: 10px 12px;
  resize: none;
  font-size: 0.95rem;
  margin-bottom: 10px;
}
.modal-actions { text-align: right; }
.modal-actions button {
  border: none;
  border-radius: 10px;
  padding: 8px 14px;
  margin-left: 8px;
  cursor: pointer;
}

#sendMsgBtn { background: #007bff; color: #fff; }
#cancelMsgBtn { background: #ddd; }
#sendMsgBtn:hover { background: #0056b3; }

/* =========================================================
   Базовые UI components (ЕДИНСТВЕННЫЙ источник истины)
   ========================================================= */

/* Buttons */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: #f3f4f6;
  color: #111827;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: filter .15s ease, transform .08s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
  user-select: none;
}

.btn:hover{ filter: brightness(1.03); }
.btn:active{ transform: translateY(1px); }

.btn-primary{
  background: linear-gradient(180deg, var(--theme-color), #006fa8);
  color: #fff;
  box-shadow: 0 10px 22px rgba(0, 136, 204, 0.20);
}

.btn-success{
  background: #16a34a;
  color: #fff;
  box-shadow: 0 8px 18px rgba(22, 163, 74, 0.18);
}

.btn-warning{
  background: #f59e0b;
  color: #111827;
  box-shadow: 0 8px 18px rgba(245, 158, 11, 0.18);
}

.btn-danger{
  background: #dc2626;
  color: #fff;
  box-shadow: 0 8px 18px rgba(220, 38, 38, 0.18);
}

.btn-secondary{
  background: #eef2f7;
  color: #111827;
  border-color: rgba(15,23,42,.10);
}

.btn-outline{
  background: #fff;
  border-color: #d1d5db;
  color: #111827;
}

.btn-outline-danger{
  background: #fff;
  border-color: #fecaca;
  color: #b91c1c;
}

.btn-sm{
  padding: 8px 12px;
  border-radius: 10px;
  font-size: .92rem;
  font-weight: 800;
}

/* Card */
.card{
  background: rgba(255,255,255,.86);
  border: 1px solid rgba(190,205,227,.40);
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(71,85,105,.07);
  padding: 14px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* если используются секции card-header/card-body — убираем общий padding */
.card:has(> .card-header),
.card:has(> .card-body){
  padding: 0;
  overflow: hidden;
}

.card-header{
  padding: 12px 14px;
  border-bottom: 1px solid #eef2f7;
  font-weight: 900;
  color: #111827;
}

.card-body{
  padding: 14px;
}

/* опциональный hover-эффект (не двигаем карточку по умолчанию) */
.card.card-hover:hover{
  box-shadow: 0 14px 28px rgba(71,85,105,.10);
}

/* Alerts */
.alert{
  border-radius: 14px;
  border: 1px solid transparent;
  padding: 12px 14px;
  margin: 10px 0;
  font-weight: 600;
}

.alert-info{
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1e40af;
}

.alert-success{
  background: #ecfdf5;
  border-color: #bbf7d0;
  color: #166534;
}

.alert-danger{
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.alert-warning{
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}

/* Badges */
.badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: .9rem;
  font-weight: 800;
  border: 1px solid transparent;
  line-height: 1.2;
}

.badge-success{ background:#dcfce7; color:#166534; border-color:#bbf7d0; }
.badge-warning{ background:#fef3c7; color:#92400e; border-color:#fde68a; }
.badge-danger{ background:#fee2e2; color:#991b1b; border-color:#fecaca; }
.badge-secondary{ background:#f3f4f6; color:#374151; border-color:#e5e7eb; }

/* =========================================================
   UI KIT (app-like) — дополнительные классы (НЕ конфликтуют)
   ========================================================= */

/* a11y */
.sr-only{
  position:absolute !important;
  width:1px !important;
  height:1px !important;
  padding:0 !important;
  margin:-1px !important;
  overflow:hidden !important;
  clip:rect(0,0,0,0) !important;
  white-space:nowrap !important;
  border:0 !important;
}

/* page */
.ui-page{
  max-width: 980px;
  margin: 0 auto;
  padding: 16px 12px;
}
.ui-page-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap: 12px;
  margin-bottom: 12px;
}

@media (max-width: 480px){
  .ui-page-head{
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

.ui-title{
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.15;
  font-weight: 800;
  color: var(--ui-text);
}
.ui-muted{ color: var(--ui-muted); }

/* card */
.ui-card{
  background: var(--ui-surface);
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius);
  box-shadow: var(--ui-shadow-sm);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.ui-card--soft{
  background: rgba(241,245,249,.6);
  border-color: rgba(148,163,184,.22);
  box-shadow: none;
}

/* grid */
.ui-grid{
  display: grid;
  gap: var(--ui-gap);
}

/* separator */
.ui-sep{
  height: 1px;
  background: rgba(148,163,184,.22);
  margin: 14px 0;
  border-radius: 999px;
}

/* alerts */
.ui-alert{
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(148,163,184,.22);
  background: rgba(241,245,249,.7);
  color: var(--ui-muted);
  font-weight: 600;
}
.ui-alert--muted{
  background: rgba(241,245,249,.55);
}

/* chips */
.ui-chip{
  display:inline-flex;
  align-items:center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  user-select: none;
  white-space: nowrap;
}
.ui-chip--soft{
  border: 1px solid rgba(148,163,184,.22);
  background: rgba(239,246,255,.7);
  color: rgba(29,78,216,.95);
}
.ui-chip--ghost{
  border: 1px solid rgba(148,163,184,.28);
  background: rgba(255,255,255,.88);
  color: rgba(15,23,42,.92);
  backdrop-filter: blur(6px);
}
.ui-chip--btn{
  cursor:pointer;
  text-decoration:none;
}

/* buttons */
.ui-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 8px;
  height: 42px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid transparent;
  text-decoration:none;
  font-weight: 800;
  cursor: pointer;
  user-select: none;
  transition: transform .08s ease, filter .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
}
.ui-btn:active{ transform: translateY(1px); }

.ui-btn--sm{
  height: 38px;
  padding: 0 12px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 14px;
}

.ui-btn--icon{
  width: 42px;
  padding: 0;
}
.ui-btn--sm.ui-btn--icon{
  width: 38px;
}

.ui-btn--primary{
  background: linear-gradient(180deg, var(--ui-primary), #006fa8);
  color: #fff;
  box-shadow: 0 10px 22px rgba(0,136,204,.20);
}
.ui-btn--primary:hover{ filter: brightness(1.03); }
.ui-btn--secondary{
  background: #fff;
  border-color: rgba(148,163,184,.35);
  color: rgba(15,23,42,.88);
}
.ui-btn--secondary:hover{ background: rgba(241,245,249,.65); }

.ui-btn--warning{
  background: rgba(255, 251, 235, .95);
  border-color: rgba(245, 158, 11, .40);
  color: rgba(120, 53, 15, .98);
}
.ui-btn--warning:hover{ filter: brightness(0.99); }

.ui-btn.is-disabled{
  opacity: .55;
  pointer-events: none;
}

/* prose (content) */
.ui-prose{
  color: var(--ui-text);
  font-size: 16px;
  line-height: 1.65;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.ui-prose p{ margin: 0 0 12px; }
.ui-prose ul, .ui-prose ol{ padding-left: 18px; margin: 10px 0 14px; }
.ui-prose a{ color: var(--ui-primary); text-decoration: underline; text-underline-offset: 2px; }
.ui-prose img{
  display:block;
  max-width: 100%;
  height: auto;
  width: 100%;
  margin: 0 auto 14px;
  border-radius: 14px;
  box-sizing: border-box;
}

/* =========================================================
   UI KIT — fields/inputs/checkbox/helpers
   ========================================================= */

.ui-field{ display:flex; flex-direction:column; gap:8px; margin-bottom: 12px; }

.ui-label{
  font-weight: 800;
  font-size: 14px;
  color: rgba(15,23,42,.90);
}
.ui-label--sm{
  font-weight: 700;
  font-size: 12px;
  color: rgba(107,114,128,.95);
}

.ui-input{
  width: 100%;
  min-height: 44px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(148,163,184,.35);
  background: #fff;
  color: rgba(15,23,42,.95);
  font-size: 16px; /* iOS no-zoom */
  outline: none;
  transition: box-shadow .15s ease, border-color .15s ease, background .15s ease;
}

.ui-input--sm{
  min-height: 40px;
  padding: 10px 12px;
  border-radius: 12px;
}

.ui-input:focus{
  border-color: rgba(0,136,204,.55);
  box-shadow: 0 0 0 3px rgba(0,136,204,.12);
}

.ui-textarea{ resize: vertical; min-height: 120px; font-family: inherit; }

.ui-select{ appearance: none; background-image: none; }

.ui-help{
  margin-top: 6px;
  font-size: 13px;
  font-weight: 700;
}
.ui-help--danger{ color: #ef4444; }

/* checkbox */
.ui-check{
  display:inline-flex;
  align-items:center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  font-weight: 800;
  color: rgba(15,23,42,.85);
}

.ui-check input{
  position:absolute;
  opacity:0;
  width:1px;
  height:1px;
}

.ui-check-box{
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1px solid rgba(148,163,184,.45);
  background: #fff;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.ui-check input:checked + .ui-check-box{
  background: rgba(0,136,204,.95);
  border-color: rgba(0,136,204,.95);
  box-shadow: 0 0 0 3px rgba(0,136,204,.12);
}
.ui-check input:checked + .ui-check-box::after{
  content: "✓";
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

.ui-check-text{
  font-size: 14px;
  font-weight: 800;
  color: rgba(15,23,42,.80);
}

/* alerts additions */
.ui-alert--success{
  border-color: rgba(34,197,94,.25);
  background: rgba(220,252,231,.65);
  color: rgba(22,101,52,.95);
}
.ui-alert--danger{
  border-color: rgba(239,68,68,.25);
  background: rgba(254,226,226,.70);
  color: rgba(153,27,27,.95);
}

/* utility */
.is-hidden{ display:none !important; }

.site-footer{
  margin-top: 28px;
  padding: 18px 0 calc(18px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(229,231,235,.8);
  background: var(--surface, #fff);
}

.site-footer__inner{
  max-width: 980px;
  margin: 0 auto;
  padding: 0 14px;
  box-sizing: border-box;

  display: flex;
  justify-content: center;
  text-align: center;
}

.site-footer__copy{
  margin: 0;
  font-size: 14px;
  color: var(--muted, #6b7280);
  line-height: 1.4;
}

/* =========================================================
   MOBILE SCALE — app-like mobile-first overrides
   ========================================================= */
@media (max-width: 480px){

  /* базовый текст */
  body{
    font-size: 15px;
    line-height: 1.45;
  }

  /* заголовки */
  .page-title{
    font-size: 1.25rem;
    margin: 10px 0 14px;
    padding-bottom: 4px;
  }

  .section-title{
    font-size: 1.05rem;
    margin: 14px 0 8px;
  }

  .ui-title{
    font-size: 1.15rem;
  }

  /* контейнеры */
  .ui-page{
    padding: 12px 10px;
  }

  /* карточки */
  .card,
  .ui-card{
    border-radius: 14px;
  }

  .card-body,
  .ui-card{
    padding: 12px;
  }

  /* кнопки — самое важное */
  .btn{
    padding: 8px 12px;
    font-size: 0.95rem;
  }

  .btn-sm{
    padding: 6px 10px;
    font-size: 0.85rem;
  }

  .ui-btn{
    height: 38px;
    padding: 0 12px;
    border-radius: 12px;
    font-size: 14px;
  }

  .ui-btn--sm{
    height: 34px;
    padding: 0 10px;
    font-size: 13px;
  }

  /* формы */
  input,
  select,
  textarea{
    font-size: 15px;
    padding: 9px 11px;
  }

  .ui-input{
    min-height: 40px;
    padding: 10px 12px;
    font-size: 15px;
  }

  /* prose */
  .ui-prose{
    font-size: 15px;
    line-height: 1.55;
  }
}

@media (max-width: 480px){
  .promo-top,
  .profile-topbar,
  .rides-header{
    margin-bottom: 10px;
  }

  .promo-title{
    font-size: 1.25rem;
  }
}

/* =========================================================
   SITEWIDE SOFT POLISH
   Calmer public typography and surfaces for older sections.
   ========================================================= */

:root{
  --ui-text-soft: #1b2a40;
  --ui-heading: #1d426a;
  --ui-muted-soft: #617188;
  --ui-surface-soft: rgba(255,255,255,.72);
  --ui-border-soft: rgba(181,194,222,.28);
  --ui-shadow-soft:
    0 10px 24px rgba(71,85,105,.045),
    inset 0 1px 0 rgba(255,255,255,.58);
}

body{
  color: var(--ui-text-soft);
  font-weight: 450;
}

:where(.page-title, .section-title, .ui-title, .ui-card__title, .card-title){
  letter-spacing: 0;
  color: var(--ui-heading);
}

.page-title{
  font-weight: 720;
  border-bottom-color: rgba(181,194,222,.28);
}

.section-title,
.ui-title{
  font-weight: 700;
}

:where(.ui-card, .card){
  border-color: var(--ui-border-soft);
  box-shadow: var(--ui-shadow-soft);
}

:where(.ui-btn, .btn){
  letter-spacing: 0;
  font-weight: 660;
}

:where(.ui-chip, .badge, .pill, .tag){
  letter-spacing: 0;
  font-weight: 620;
}

:where(input, select, textarea, .ui-input){
  border-color: rgba(181,194,222,.34);
  color: var(--ui-text-soft);
}

:where(input, select, textarea, .ui-input)::placeholder{
  color: rgba(97,113,136,.62);
}

:where(.text-muted, .ui-muted, .muted, .empty){
  color: var(--ui-muted-soft);
}

/* =========================================================
   COMMENTS
   Shared comments partial, modern + legacy variants.
   ========================================================= */

.ui-comments__login-link{
  color: var(--ui-primary, var(--theme-color, #0088cc));
  font-weight: 660;
}

.ui-comments{
  display: grid;
  gap: 14px;
}

.ui-comments__form{
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 20px;
  border: 1px solid rgba(181,194,222,.28);
  background:
    linear-gradient(180deg, rgba(255,255,255,.88), rgba(248,250,253,.76));
  box-shadow:
    0 10px 24px rgba(71,85,105,.04),
    inset 0 1px 0 rgba(255,255,255,.72);
}

.ui-comments__form textarea{
  min-height: 96px;
  border-radius: 16px;
  line-height: 1.55;
  resize: vertical;
}

.ui-comments__form .file-upload-label{
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(181,194,222,.24);
  background: rgba(255,255,255,.72);
  cursor: pointer;
}

.ui-comments__form .file-upload-button{
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(33,95,154,.08);
  color: #1e5b91;
  font-weight: 660;
}

.ui-comments__form .ui-btn--block{
  border-radius: 14px;
  min-height: 44px;
}

.ui-comments__list{
  display: grid;
  gap: 12px;
}

.ui-comment{
  padding: 14px;
  border-radius: 20px;
  border: 1px solid rgba(181,194,222,.24);
  background: rgba(255,255,255,.64);
  box-shadow: 0 8px 20px rgba(71,85,105,.03);
}

.ui-comment__head{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.ui-comment__author{
  font-weight: 720;
  color: var(--ui-heading, #1d426a);
}

.ui-comment__time{
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(241,245,249,.92);
  color: var(--ui-muted-soft, #64748b);
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.ui-comment__body{
  line-height: 1.55;
  white-space: pre-line;
  color: var(--ui-text-soft, #334155);
}

.ui-comments__empty{
  margin-top: 12px;
}

.ui-comment__photos{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.ui-comment__photo-link{
  display: block;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  background: rgba(15,23,42,.04);
}

.ui-comment__photo-img{
  display: block;
  width: 100%;
  height: 110px;
  object-fit: cover;
  transition: transform .18s ease, opacity .18s ease;
}

.ui-comment__photo-link:hover .ui-comment__photo-img{
  transform: scale(1.03);
}

.org-comments{
  margin-top: 30px;
}

.org-comments.content-section{
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(181,194,222,.28);
  background:
    linear-gradient(180deg, rgba(255,255,255,.82), rgba(255,255,255,.66));
  box-shadow:
    0 10px 24px rgba(71,85,105,.045),
    inset 0 1px 0 rgba(255,255,255,.58);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.org-comments .section-title{
  margin-bottom: 14px;
  font-size: 1.08rem;
  line-height: 1.25;
  font-weight: 700;
  color: var(--ui-heading, #1d426a);
}

.org-comments__form{
  margin-bottom: 18px;
}

.org-comments__textarea{
  width: 100%;
  min-height: 92px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(181,194,222,.34);
  background: rgba(255,255,255,.74);
  resize: vertical;
  font-family: inherit;
}

.org-comments__upload{
  margin: 10px 0;
}

.org-comments__upload-hint{
  margin-top: 4px;
  font-size: 12px;
  color: var(--ui-muted-soft, #617188);
}

.org-comments__btn{
  margin-top: 8px;
  padding: 9px 14px;
  border: 0;
  border-radius: 13px;
  background: linear-gradient(180deg, var(--theme-color, #0088cc), #0576ad);
  color: #fff;
  cursor: pointer;
  font-weight: 660;
  box-shadow: 0 10px 20px rgba(0,136,204,.14);
}

.org-comments__list{
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.org-comments__item{
  padding: 14px;
  border-radius: 20px;
  border: 1px solid rgba(181,194,222,.22);
  background: rgba(255,255,255,.64);
  box-shadow: 0 8px 20px rgba(71,85,105,.03);
}

.org-comments__header{
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 6px;
  font-size: .9rem;
}

.org-comments__author{
  font-weight: 680;
  color: var(--ui-heading, #1d426a);
}

.org-comments__date{
  color: var(--ui-muted-soft, #617188);
  white-space: nowrap;
}

.org-comments__text{
  font-size: .95rem;
  line-height: 1.55;
  white-space: pre-line;
  color: var(--ui-text-soft, #1b2a40);
}

.org-comments__photos{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.org-comments__photo-link{
  display: block;
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  background: rgba(15,23,42,.04);
}

.org-comments__photo-img{
  display: block;
  width: 100%;
  height: 90px;
  object-fit: cover;
  transition: transform .18s ease, opacity .18s ease;
}

.org-comments__photo-link:hover .org-comments__photo-img{
  transform: scale(1.03);
}

.org-comments__empty{
  color: var(--ui-muted-soft, #617188);
  text-align: center;
  padding: 20px 0;
}

.org-comments__login-prompt{
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(181,194,222,.24);
  background: rgba(255,255,255,.56);
}

@media (max-width: 640px){
  .ui-comment__photos,
  .org-comments__photos{
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ui-comment__photo-img{
    height: 96px;
  }

  .org-comments__photo-img{
    height: 88px;
  }
}

/* =========================================================
   SEARCH RESULTS
   Shared styling for resources/views/search/results.blade.php.
   ========================================================= */

.search-page{
  max-width: 1000px;
  margin: 0 auto;
  padding: 18px 12px;
  color: #1b2a40;
}

.search-head,
.search-section{
  border: 1px solid rgba(181,194,222,.28);
  border-radius: 18px;
  background: rgba(255,255,255,.72);
  box-shadow:
    0 10px 24px rgba(71,85,105,.045),
    inset 0 1px 0 rgba(255,255,255,.58);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.search-head{
  margin-bottom: 14px;
  padding: 16px;
}

.search-title{
  margin: 0 0 10px;
  color: #1d426a;
  font-size: 1.35rem;
  line-height: 1.18;
  font-weight: 720;
  letter-spacing: 0;
}

.search-form{
  display: grid;
  grid-template-columns: 1fr 220px 120px;
  gap: 10px;
  align-items: center;
}

.search-input,
.search-select{
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(181,194,222,.34);
  border-radius: 13px;
  background: rgba(255,255,255,.78);
  color: #1b2a40;
}

.search-input{
  font-size: 16px;
}

.search-select{
  font-size: 15px;
}

.search-btn{
  padding: 10px 12px;
  border: 0;
  border-radius: 13px;
  background: linear-gradient(180deg, var(--theme-color,#0088cc), #0576ad);
  color: #fff;
  font-weight: 660;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(0,136,204,.12);
  transition: transform .12s ease, opacity .12s ease;
}

.search-btn:hover{
  transform: translateY(-1px);
  opacity: .95;
}

.search-meta{
  margin-top: 10px;
  color: rgba(37,52,75,.74);
  font-size: .95rem;
}

.search-meta .dot{
  margin: 0 8px;
  color: #9ca3af;
}

.search-hint{
  margin-top: 10px;
  color: rgba(37,52,75,.62);
  font-size: .95rem;
}

.search-section{
  margin-bottom: 12px;
  padding: 14px 16px;
}

.section-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.section-title{
  margin: 0;
  color: #1d426a;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0;
}

.section-count{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(239,246,255,.76);
  color: #1d4f85;
  font-size: .85rem;
  font-weight: 650;
}

.section-empty{
  padding: 10px 0;
  color: rgba(37,52,75,.62);
}

.result-list{
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.result-card{
  padding-top: 10px;
  border-top: 1px solid rgba(181,194,222,.20);
}

.result-card:first-child{
  padding-top: 0;
  border-top: 0;
}

.result-title{
  display: inline-block;
  color: #1b2a40;
  font-size: 1rem;
  line-height: 1.35;
  font-weight: 680;
  text-decoration: none;
}

.result-title:hover{
  text-decoration: underline;
}

.result-snippet{
  margin-top: 6px;
  color: rgba(37,52,75,.70);
  font-size: .92rem;
  line-height: 1.5;
}

.result-subline{
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 6px;
  color: rgba(37,52,75,.70);
  font-size: .9rem;
}

.sub-ico{
  flex-shrink: 0;
}

.result-meta{
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  color: rgba(37,52,75,.62);
  font-size: .82rem;
}

.badge{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(239,246,255,.76);
  color: #1d4f85;
  font-size: .8rem;
  font-weight: 620;
}

.meta-date,
.meta-rating{
  color: #6b7280;
}

.meta-rating{
  font-weight: 600;
}

.q-hl{
  padding: 0 2px;
  border-radius: 4px;
  background: rgba(255,243,191,.92);
}

.search-empty{
  padding: 26px 16px;
  border: 1px dashed rgba(181,194,222,.40);
  border-radius: 18px;
  background: rgba(255,255,255,.72);
  color: rgba(37,52,75,.62);
  text-align: center;
}

.empty-icon{
  margin-bottom: 10px;
  font-size: 2.2rem;
}

.empty-title{
  margin-bottom: 6px;
  color: #1d426a;
  font-size: 1.05rem;
  font-weight: 700;
}

.empty-sub{
  font-size: .95rem;
}

.search-note{
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 8px 2px;
  color: #6b7280;
  font-size: .9rem;
}

.note-dot{
  flex-shrink: 0;
}

@media (max-width: 860px){
  .search-form{
    grid-template-columns: 1fr;
  }

  .search-btn{
    width: 100%;
  }
}

/* Ticket widget */
.ticket-widget-page{
  padding-top: 16px;
  padding-bottom: 28px;
}

.ticket-widget-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.ticket-widget-title{
  margin: 0;
  color: #1d426a;
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1.15;
  font-weight: 720;
  letter-spacing: 0;
}

.ticket-widget-subtitle{
  margin-top: 4px;
  color: rgba(37,52,75,.68);
  font-weight: 560;
}

.ticket-widget-back{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid rgba(181,194,222,.30);
  border-radius: 14px;
  background: rgba(255,255,255,.62);
  color: #1d426a;
  font-weight: 660;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(71,85,105,.04);
}

.ticket-widget-root{
  min-height: 70vh;
  border-radius: 18px;
  overflow: hidden;
}

.ticket-kinoplan-embed{
  width: 100%;
  min-height: calc(100dvh - 24px);
}

.ticket-kinoplan-embed__frame{
  display: block;
  width: 100%;
  min-height: calc(100dvh - 24px);
  border: 0;
  border-radius: 16px;
  background: #fff;
}

/* Legal pages */
.legal-page{
  max-width: 980px;
}

.legal-card{
  border-color: rgba(181,194,222,.28);
  border-radius: 20px;
  background: rgba(255,255,255,.72);
  box-shadow:
    0 12px 28px rgba(71,85,105,.055),
    inset 0 1px 0 rgba(255,255,255,.62);
  overflow: hidden;
}

.legal-body{
  color: #1b2a40;
  line-height: 1.64;
}

.legal-title{
  margin-top: 0;
  color: #1d426a;
  font-size: clamp(26px, 2.4vw, 34px);
  line-height: 1.14;
  font-weight: 720;
  letter-spacing: 0;
}

.legal-date{
  margin-top: -6px;
}

.legal-body :where(h2,h3){
  color: #1d426a;
  font-weight: 700;
  letter-spacing: 0;
}

.legal-footnote{
  font-size: 13px;
}

@media (max-width: 640px){
  .ticket-widget-head{
    align-items: flex-start;
    flex-direction: column;
  }

  .ticket-widget-back{
    width: 100%;
  }
}


/* Privacy page */
.privacy-page{
    --privacy-bg:#f6f8fb;
    --privacy-card:#ffffff;
    --privacy-text:#0f172a;
    --privacy-muted:#64748b;
    --privacy-border:rgba(15,23,42,.10);
    --privacy-primary:#2563eb;
    --privacy-primary-dark:#1d4ed8;
    --privacy-shadow:0 18px 50px rgba(2,6,23,.08);
    --privacy-shadow-soft:0 8px 24px rgba(2,6,23,.06);
    --privacy-radius:22px;
  }

.privacy-page{
    padding:32px 0 56px;
    color:var(--privacy-text);
  }

  .privacy-wrap{
    width:min(100%, 980px);
    margin:0 auto;
    padding:0 16px;
  }

  .privacy-hero{
    background:
      radial-gradient(circle at top right, rgba(37,99,235,.10), transparent 28%),
      radial-gradient(circle at left bottom, rgba(59,130,246,.08), transparent 22%),
      linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    border:1px solid var(--privacy-border);
    border-radius:28px;
    box-shadow:var(--privacy-shadow);
    padding:28px 24px;
    margin-bottom:18px;
  }

  .privacy-badge{
    display:inline-flex;
    align-items:center;
    gap:8px;
    padding:8px 12px;
    border-radius:999px;
    background:rgba(37,99,235,.08);
    color:var(--privacy-primary-dark);
    font-size:13px;
    font-weight:700;
    letter-spacing:.01em;
    margin-bottom:14px;
  }

  .privacy-title{
    margin:0 0 12px;
    font-size:clamp(28px, 4vw, 42px);
    line-height:1.08;
    font-weight:800;
    color:var(--privacy-text);
  }

  .privacy-subtitle{
    margin:0;
    max-width:760px;
    font-size:16px;
    line-height:1.7;
    color:var(--privacy-muted);
  }

  .privacy-grid{
    display:grid;
    grid-template-columns:minmax(0, 1fr) 300px;
    gap:18px;
    align-items:start;
  }

  .privacy-main{
    display:flex;
    flex-direction:column;
    gap:18px;
  }

  .privacy-card{
    background:var(--privacy-card);
    border:1px solid var(--privacy-border);
    border-radius:var(--privacy-radius);
    box-shadow:var(--privacy-shadow-soft);
    padding:24px;
  }

  .privacy-card h2{
    margin:0 0 14px;
    font-size:24px;
    line-height:1.25;
    font-weight:800;
    color:var(--privacy-text);
  }

  .privacy-card h3{
    margin:22px 0 10px;
    font-size:18px;
    line-height:1.35;
    font-weight:700;
    color:var(--privacy-text);
  }

  .privacy-card p{
    margin:0 0 14px;
    font-size:15px;
    line-height:1.8;
    color:var(--privacy-text);
  }

  .privacy-card p:last-child{
    margin-bottom:0;
  }

  .privacy-card ul{
    margin:0 0 14px 0;
    padding:0;
    list-style:none;
    display:grid;
    gap:10px;
  }

  .privacy-card li{
    position:relative;
    padding-left:20px;
    font-size:15px;
    line-height:1.8;
    color:var(--privacy-text);
  }

  .privacy-card li::before{
    content:"";
    position:absolute;
    left:0;
    top:.72em;
    width:8px;
    height:8px;
    border-radius:999px;
    background:var(--privacy-primary);
    box-shadow:0 0 0 4px rgba(37,99,235,.10);
    transform:translateY(-50%);
  }

  .privacy-note{
    padding:16px 18px;
    border-radius:18px;
    background:rgba(37,99,235,.06);
    border:1px solid rgba(37,99,235,.14);
    color:#1e3a8a;
    font-size:14px;
    line-height:1.7;
  }

  .privacy-aside{
    position:sticky;
    top:18px;
    display:flex;
    flex-direction:column;
    gap:18px;
  }

  .privacy-side-card{
    background:var(--privacy-card);
    border:1px solid var(--privacy-border);
    border-radius:20px;
    box-shadow:var(--privacy-shadow-soft);
    padding:18px;
  }

  .privacy-side-title{
    margin:0 0 12px;
    font-size:16px;
    line-height:1.3;
    font-weight:800;
    color:var(--privacy-text);
  }

  .privacy-side-list{
    margin:0;
    padding:0;
    list-style:none;
    display:grid;
    gap:10px;
  }

  .privacy-side-list a{
    color:var(--privacy-primary);
    text-decoration:none;
    font-size:14px;
    line-height:1.5;
    font-weight:600;
  }

  .privacy-side-list a:hover{
    color:var(--privacy-primary-dark);
    text-decoration:underline;
  }

  .privacy-meta{
    display:grid;
    gap:12px;
  }

  .privacy-meta-item{
    padding:12px 14px;
    border-radius:16px;
    background:#f8fafc;
    border:1px solid rgba(15,23,42,.08);
  }

  .privacy-meta-label{
    display:block;
    margin-bottom:4px;
    font-size:12px;
    line-height:1.4;
    font-weight:700;
    color:var(--privacy-muted);
    text-transform:uppercase;
    letter-spacing:.04em;
  }

  .privacy-meta-value{
    display:block;
    font-size:14px;
    line-height:1.6;
    color:var(--privacy-text);
    word-break:break-word;
  }

  .privacy-meta-value a{
    color:var(--privacy-primary);
    text-decoration:none;
  }

  .privacy-meta-value a:hover{
    text-decoration:underline;
  }

  .privacy-anchor{
    scroll-margin-top:88px;
  }

  @media (max-width: 900px){
    .privacy-grid{
      grid-template-columns:1fr;
    }

    .privacy-aside{
      position:static;
    }
  }

  @media (max-width: 640px){
    .privacy-page{
      padding:20px 0 40px;
    }

    .privacy-wrap{
      padding:0 12px;
    }

    .privacy-hero,
    .privacy-card,
    .privacy-side-card{
      border-radius:18px;
    }

    .privacy-hero{
      padding:22px 18px;
    }

    .privacy-card{
      padding:20px 16px;
    }

    .privacy-title{
      font-size:28px;
    }

    .privacy-card h2{
      font-size:21px;
    }
  }


/* Child safety page */
.cs-page{
    --cs-bg:#f6f8fb;
    --cs-card:#ffffff;
    --cs-text:#0f172a;
    --cs-muted:#64748b;
    --cs-border:rgba(15,23,42,.10);
    --cs-primary:#2563eb;
    --cs-primary-dark:#1d4ed8;
    --cs-shadow:0 18px 50px rgba(2,6,23,.08);
    --cs-shadow-soft:0 8px 24px rgba(2,6,23,.06);
    --cs-radius:22px;
  }

.cs-page{
    padding:32px 0 56px;
    color:var(--cs-text);
  }

  .cs-wrap{
    width:min(100%, 980px);
    margin:0 auto;
    padding:0 16px;
  }

  .cs-hero{
    background:
      radial-gradient(circle at top right, rgba(37,99,235,.10), transparent 28%),
      radial-gradient(circle at left bottom, rgba(59,130,246,.08), transparent 22%),
      linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    border:1px solid var(--cs-border);
    border-radius:28px;
    box-shadow:var(--cs-shadow);
    padding:28px 24px;
    margin-bottom:18px;
  }

  .cs-badge{
    display:inline-flex;
    align-items:center;
    gap:8px;
    padding:8px 12px;
    border-radius:999px;
    background:rgba(37,99,235,.08);
    color:var(--cs-primary-dark);
    font-size:13px;
    font-weight:700;
    letter-spacing:.01em;
    margin-bottom:14px;
  }

  .cs-title{
    margin:0 0 12px;
    font-size:clamp(28px, 4vw, 42px);
    line-height:1.08;
    font-weight:800;
    color:var(--cs-text);
  }

  .cs-subtitle{
    margin:0;
    max-width:760px;
    font-size:16px;
    line-height:1.7;
    color:var(--cs-muted);
  }

  .cs-grid{
    display:grid;
    grid-template-columns:minmax(0, 1fr) 300px;
    gap:18px;
    align-items:start;
  }

  .cs-main{
    display:flex;
    flex-direction:column;
    gap:18px;
  }

  .cs-card{
    background:var(--cs-card);
    border:1px solid var(--cs-border);
    border-radius:var(--cs-radius);
    box-shadow:var(--cs-shadow-soft);
    padding:24px;
  }

  .cs-card h2{
    margin:0 0 14px;
    font-size:24px;
    line-height:1.25;
    font-weight:800;
    color:var(--cs-text);
  }

  .cs-card h3{
    margin:22px 0 10px;
    font-size:18px;
    line-height:1.35;
    font-weight:700;
    color:var(--cs-text);
  }

  .cs-card p{
    margin:0 0 14px;
    font-size:15px;
    line-height:1.8;
    color:var(--cs-text);
  }

  .cs-card p:last-child{
    margin-bottom:0;
  }

  .cs-card ul{
    margin:0 0 14px 0;
    padding:0;
    list-style:none;
    display:grid;
    gap:10px;
  }

  .cs-card li{
    position:relative;
    padding-left:20px;
    font-size:15px;
    line-height:1.8;
    color:var(--cs-text);
  }

  .cs-card li::before{
    content:"";
    position:absolute;
    left:0;
    top:.72em;
    width:8px;
    height:8px;
    border-radius:999px;
    background:var(--cs-primary);
    box-shadow:0 0 0 4px rgba(37,99,235,.10);
    transform:translateY(-50%);
  }

  .cs-note{
    padding:16px 18px;
    border-radius:18px;
    background:rgba(37,99,235,.06);
    border:1px solid rgba(37,99,235,.14);
    color:#1e3a8a;
    font-size:14px;
    line-height:1.7;
  }

  .cs-warning{
    padding:16px 18px;
    border-radius:18px;
    background:rgba(239,68,68,.06);
    border:1px solid rgba(239,68,68,.14);
    color:#991b1b;
    font-size:14px;
    line-height:1.7;
  }

  .cs-aside{
    position:sticky;
    top:18px;
    display:flex;
    flex-direction:column;
    gap:18px;
  }

  .cs-side-card{
    background:var(--cs-card);
    border:1px solid var(--cs-border);
    border-radius:20px;
    box-shadow:var(--cs-shadow-soft);
    padding:18px;
  }

  .cs-side-title{
    margin:0 0 12px;
    font-size:16px;
    line-height:1.3;
    font-weight:800;
    color:var(--cs-text);
  }

  .cs-side-list{
    margin:0;
    padding:0;
    list-style:none;
    display:grid;
    gap:10px;
  }

  .cs-side-list a{
    color:var(--cs-primary);
    text-decoration:none;
    font-size:14px;
    line-height:1.5;
    font-weight:600;
  }

  .cs-side-list a:hover{
    color:var(--cs-primary-dark);
    text-decoration:underline;
  }

  .cs-meta{
    display:grid;
    gap:12px;
  }

  .cs-meta-item{
    padding:12px 14px;
    border-radius:16px;
    background:#f8fafc;
    border:1px solid rgba(15,23,42,.08);
  }

  .cs-meta-label{
    display:block;
    margin-bottom:4px;
    font-size:12px;
    line-height:1.4;
    font-weight:700;
    color:var(--cs-muted);
    text-transform:uppercase;
    letter-spacing:.04em;
  }

  .cs-meta-value{
    display:block;
    font-size:14px;
    line-height:1.6;
    color:var(--cs-text);
    word-break:break-word;
  }

  .cs-meta-value a{
    color:var(--cs-primary);
    text-decoration:none;
  }

  .cs-meta-value a:hover{
    text-decoration:underline;
  }

  .cs-anchor{
    scroll-margin-top:88px;
  }

  @media (max-width: 900px){
    .cs-grid{
      grid-template-columns:1fr;
    }

    .cs-aside{
      position:static;
    }
  }

  @media (max-width: 640px){
    .cs-page{
      padding:20px 0 40px;
    }

    .cs-wrap{
      padding:0 12px;
    }

    .cs-hero,
    .cs-card,
    .cs-side-card{
      border-radius:18px;
    }

    .cs-hero{
      padding:22px 18px;
    }

    .cs-card{
      padding:20px 16px;
    }

    .cs-title{
      font-size:28px;
    }

    .cs-card h2{
      font-size:21px;
    }
  }
