/* DriveGas – componente reutilizabile (nu depind de pagină). Culorile vin doar din tokens.css, deci funcționează în ambele teme. */

@layer components {
  /* ---------- iconițe ---------- */
  .icon {
    width: 24px; height: 24px; flex: none;
    fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
  }
  .icon-btn {
    display: inline-grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 50%;
    color: var(--text); background: var(--surface); text-decoration: none;
    box-shadow: inset 0 0 0 1px var(--line);
    transition: background var(--dur-fast), transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast);
    touch-action: manipulation;
  }
  .icon-btn:hover { background: var(--surface-2); }
  .icon-btn:active { transform: scale(.92); }
  .icon-btn--tonal { background: var(--primary-container); color: var(--on-primary-container); box-shadow: none; }
  .icon-btn--tonal:hover { background: color-mix(in srgb, var(--primary-container) 80%, var(--primary)); }
  .icon-btn--accent { position: relative; width: 50px; height: 50px; background: var(--primary); color: var(--on-primary); box-shadow: none; }
  .icon-btn--accent:hover { background: var(--primary); filter: brightness(1.08); }

  /* buton de temă: luna în tema luminoasă, soarele în cea întunecată */
  .theme-toggle .icon-sun { display: none; }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
    :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  }
  :root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
  :root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }

  /* ---------- butoane ---------- */
  .btn {
    --btn-bg: var(--surface-2); --btn-fg: var(--text);
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 52px; padding: 0 26px; border: 0; border-radius: var(--radius-pill);
    background: var(--btn-bg); color: var(--btn-fg);
    font-size: 1.0625rem; font-weight: 700; line-height: 1.1; text-align: center; text-decoration: none;
    transition: transform var(--dur-fast) var(--ease), background var(--dur-base), box-shadow var(--dur-base), filter var(--dur-base);
    touch-action: manipulation; cursor: pointer;
  }
  .btn:hover { filter: brightness(.97); text-decoration: none; }
  .btn:active { transform: scale(.97); }
  .btn .icon { width: 20px; height: 20px; }
  .btn--primary { --btn-bg: var(--primary); --btn-fg: var(--on-primary); box-shadow: 0 8px 20px -10px color-mix(in srgb, var(--primary) 80%, transparent); }
  .btn--primary:hover { filter: brightness(1.06); }
  .btn--tonal { --btn-bg: var(--primary-container); --btn-fg: var(--on-primary-container); }
  .btn--secondary { --btn-bg: var(--secondary); --btn-fg: var(--on-secondary); }
  .btn--outline { --btn-bg: transparent; box-shadow: inset 0 0 0 1.5px var(--line-strong); }
  .btn--outline:hover { --btn-bg: var(--surface-2); }
  .btn--light { --btn-bg: #fff; --btn-fg: #08381c; box-shadow: 0 10px 24px -12px rgb(0 0 0 / .5); }
  .btn--glass { --btn-bg: rgb(255 255 255 / .16); --btn-fg: #fff; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .38); }
  .btn--glass:hover { --btn-bg: rgb(255 255 255 / .26); filter: none; }
  .btn--sm { min-height: 42px; padding: 0 18px; font-size: .9375rem; }
  .btn--block { width: 100%; }
  .btn[disabled], .btn[aria-busy="true"] { opacity: .65; pointer-events: none; }
  .btn-row { display: flex; flex-wrap: wrap; gap: var(--space-3); }

  /* ---------- chip-uri și insigne ---------- */
  .chips { display: flex; flex-wrap: wrap; gap: var(--space-2); list-style: none; }
  .chip {
    display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 14px; border-radius: var(--radius-pill);
    background: var(--surface-2); color: var(--text); font-size: .9375rem; font-weight: 700; line-height: 1; border: 0;
    transition: background var(--dur-fast), box-shadow var(--dur-fast);
  }
  .chip .icon { width: 18px; height: 18px; color: var(--primary); }
  button.chip, a.chip { cursor: pointer; touch-action: manipulation; text-decoration: none; }
  button.chip:hover, a.chip:hover { background: var(--surface-3); }
  .chip[aria-pressed="true"] { background: var(--primary-container); color: var(--on-primary-container); box-shadow: inset 0 0 0 1.5px var(--primary); }
  /* chip doar cu iconiță (în carduri): textul rămâne pentru cititoarele de ecran */
  .chip--icon { width: 34px; min-height: 34px; padding: 0; justify-content: center; }
  .chip--icon .icon { width: 18px; height: 18px; }

  .badge {
    display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: var(--radius-pill);
    background: var(--surface-2); color: var(--text-2);
    font-size: .75rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; line-height: 1;
  }
  .badge--active { background: var(--primary-container); color: var(--on-primary-container); }
  .badge--upcoming { background: var(--secondary-container); color: var(--on-secondary-container); }
  .badge--ended { background: var(--surface-3); color: var(--text-2); }
  .badge--glass { background: rgb(255 255 255 / .2); color: #fff; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
  .badge .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

  /* ---------- carduri ---------- */
  .card {
    background: var(--surface); border-radius: var(--radius-lg); border: 1px solid var(--line); box-shadow: var(--shadow-1);
  }
  .card--pad { padding: var(--space-5); }
  .card--tonal { background: var(--primary-container); color: var(--on-primary-container); border-color: transparent; box-shadow: none; }
  .card--blue { background: var(--secondary-container); color: var(--on-secondary-container); border-color: transparent; box-shadow: none; }

  /* cardul unei stații */
  .st-card {
    display: flex; flex-direction: column; width: 292px; padding: 8px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-1);
    transition: box-shadow var(--dur-base), border-color var(--dur-base), transform var(--dur-base) var(--ease);
  }
  .st-card.is-selected { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary), var(--shadow-2); }
  .st-card__media { position: relative; display: block; overflow: hidden; border-radius: calc(var(--radius-lg) - 8px); aspect-ratio: 8 / 5; background: var(--surface-3); }
  .st-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-slow) var(--ease); }
  .st-card:hover .st-card__media img { transform: scale(1.04); }
  .st-card__dist { position: absolute; left: 10px; top: 10px; }
  .st-card__body { display: flex; flex-direction: column; gap: var(--space-2); flex: 1; padding: var(--space-3) 8px 6px; }
  .st-card__area { font-size: .8125rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
  .st-card__name { font-size: 1.75rem; line-height: 1; }
  .st-card__name a { color: inherit; text-decoration: none; }
  .st-card__name a::after { content: ""; position: absolute; inset: 0; } /* tot cardul este clicabil, butoanele rămân deasupra */
  .st-card__name a:focus-visible { outline: none; }
  .st-card:has(.st-card__name a:focus-visible) { outline: 3px solid var(--focus); outline-offset: 3px; }
  .promo-card__title a:focus-visible { outline: none; }
  .promo-card:has(.promo-card__title a:focus-visible) { outline: 3px solid var(--focus); outline-offset: 3px; }
  .st-card { position: relative; }
  .st-card__addr { color: var(--text-2); font-size: var(--fs-small); }
  .st-card__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2); margin-top: auto; padding-top: var(--space-2); }
  .st-card__foot .btn { flex: 1 1 auto; padding-inline: 14px; }
  .st-card__foot .btn { position: relative; z-index: 1; }
  @media (min-width: 1024px) { .st-card { width: auto; } }

  /* cardul unei campanii */
  .promo-card {
    position: relative; display: flex; flex-direction: column; width: 300px; overflow: hidden;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-1);
    transition: transform var(--dur-base) var(--ease), box-shadow var(--dur-base);
  }
  .promo-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
  .promo-card__media {
    position: relative; display: grid; place-items: center; aspect-ratio: 16 / 10; overflow: hidden; color: #fff;
    background: linear-gradient(135deg, var(--hero-a), var(--hero-c));
  }
  .promo-card__media--blue { background: linear-gradient(135deg, #123a78, var(--hero-a) 55%, #1d6fb5); }
  .promo-card__media--green { background: linear-gradient(135deg, #0a6b36, var(--hero-c) 55%, #19b866); }
  .promo-card__media--mix { background: linear-gradient(135deg, var(--hero-a), var(--hero-b) 55%, var(--hero-c)); }
  .promo-card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  .promo-card__media--photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(0 0 0 / .05), rgb(8 18 22 / .55)); }
  .promo-card__glyph { width: 76px; height: 76px; opacity: .92; stroke-width: 1.3; filter: drop-shadow(0 6px 14px rgb(0 0 0 / .25)); }
  .promo-card__badges { position: absolute; left: 12px; right: 12px; top: 12px; display: flex; justify-content: space-between; gap: 8px; z-index: 1; }
  .promo-card__body { display: flex; flex-direction: column; gap: 6px; padding: var(--space-4) var(--space-4) var(--space-5); }
  .promo-card__title { font-size: 1.75rem; line-height: 1; }
  .promo-card__title a { color: inherit; text-decoration: none; }
  .promo-card__title a::after { content: ""; position: absolute; inset: 0; }
  .promo-card__sub { color: var(--text-2); font-weight: 700; font-size: var(--fs-small); }
  .promo-card__text { color: var(--text-2); font-size: var(--fs-small); }
  .promo-card.is-ended .promo-card__media { filter: saturate(.55) brightness(.92); }
  @media (min-width: 1024px) { .promo-card { width: auto; } }

  /* serviciu (pictogramă + text) */
  .service {
    display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-5);
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-1);
  }
  .service__icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 18px; background: var(--primary-container); color: var(--on-primary-container); }
  .service__icon .icon { width: 28px; height: 28px; }
  .service h3 { font-size: 1.625rem; }
  .service p { color: var(--text-2); }
  /* pe telefon, serviciul devine un rând compact: pictogramă + text */
  @media (max-width: 639.98px) {
    .service { display: grid; grid-template-columns: auto 1fr; column-gap: var(--space-4); row-gap: 2px; align-items: start; padding: var(--space-4); }
    .service__icon { grid-row: 1 / span 2; width: 52px; height: 52px; }
    .service h3, .service h2 { align-self: end; font-size: 1.5rem; }
  }

  /* ---------- rânduri de listă (meniu, legături) ---------- */
  .rows { display: grid; gap: var(--space-2); list-style: none; }
  .row {
    display: flex; align-items: center; gap: var(--space-4); min-height: 68px; padding: 12px 16px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md);
    color: var(--text); text-decoration: none;
    transition: background var(--dur-fast), transform var(--dur-fast) var(--ease);
  }
  .row:hover { background: var(--surface-2); }
  .row:active { transform: scale(.985); }
  .row__icon { display: grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 15px; background: var(--primary-container); color: var(--on-primary-container); }
  .row__icon--blue { background: var(--secondary-container); color: var(--on-secondary-container); }
  .row__text { flex: 1; min-width: 0; }
  .row__title { display: block; font-weight: 700; }
  .row__sub { display: block; color: var(--text-2); font-size: var(--fs-small); }
  .row > .icon:last-child { color: var(--text-3); width: 22px; height: 22px; }
  .group-title { margin: var(--space-6) 0 var(--space-3); font-family: var(--font-body); font-size: var(--fs-caption); letter-spacing: .09em; text-transform: uppercase; color: var(--text-3); }

  /* ---------- control segmentat (temă, vizualizări) ---------- */
  .seg { display: inline-flex; padding: 4px; gap: 2px; border-radius: var(--radius-pill); background: var(--surface-2); }
  .seg button {
    display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 16px; border-radius: var(--radius-pill);
    color: var(--text-2); font-weight: 700; font-size: .9375rem; touch-action: manipulation;
    transition: background var(--dur-fast), color var(--dur-fast), box-shadow var(--dur-fast);
  }
  .seg button .icon { width: 18px; height: 18px; }
  .seg button[aria-pressed="true"] { background: light-dark(var(--surface), var(--surface-3)); color: var(--text); box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line); }
  .seg { max-width: 100%; }
  .seg button { flex: 1 1 auto; min-width: 0; justify-content: center; }
  .seg--block { display: flex; width: 100%; }
  /* pe telefoane înguste, doar textul (iconițele ar face controlul mai lat decât ecranul) */
  @media (max-width: 420px) { .seg button { padding: 0 11px; } .seg button .icon { display: none; } }

  /* ---------- acordeon (<details>) ---------- */
  .acc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); overflow: clip; }
  .acc + .acc { margin-top: var(--space-2); }
  .acc summary {
    display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); min-height: 60px; padding: 14px 18px;
    font-weight: 700; cursor: pointer; list-style: none;
  }
  .acc summary::-webkit-details-marker { display: none; }
  .acc summary .icon { transition: transform var(--dur-base) var(--ease); color: var(--text-3); }
  .acc[open] summary .icon { transform: rotate(180deg); }
  .acc summary:hover { background: var(--surface-2); }
  .acc__body { padding: 4px 18px 18px; }

  /* ---------- pași numerotați ---------- */
  .steps { counter-reset: step; list-style: none; display: grid; gap: var(--space-4); }
  .steps > li { counter-increment: step; position: relative; padding-left: 60px; min-height: 44px; }
  .steps > li::before {
    content: counter(step); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
    background: var(--primary); color: var(--on-primary); font-family: var(--font-display); font-weight: 700; font-size: 1.5rem;
  }
  .steps > li + li::after {
    content: ""; position: absolute; left: 21px; top: -16px; width: 2px; height: 16px; background: var(--line-strong); opacity: .5;
  }
  .steps h3 { font-family: var(--font-body); font-size: 1.1875rem; line-height: 1.25; margin-bottom: 2px; }
  .steps p { color: var(--text-2); }

  /* ---------- note ---------- */
  .note {
    display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-4);
    border-radius: var(--radius-md); background: var(--secondary-container); color: var(--on-secondary-container);
  }
  .note .icon { margin-top: 2px; color: inherit; }
  .note--green { background: var(--primary-container); color: var(--on-primary-container); }
  .note p + p { margin-top: var(--space-2); }
  .note a { color: inherit; font-weight: 700; }

  /* ---------- formulare ---------- */
  .form { display: grid; gap: var(--space-4); }
  .field { display: grid; gap: 6px; }
  .field > label, .field > .label { font-weight: 700; }
  .field .req { color: var(--danger); margin-left: 2px; }
  .input, .textarea {
    width: 100%; min-height: 54px; padding: 12px 16px; border-radius: var(--radius-md);
    background: var(--surface); color: var(--text); border: 1.5px solid var(--line-strong);
    transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
  }
  .textarea { min-height: 140px; resize: vertical; line-height: 1.5; }
  .input::placeholder, .textarea::placeholder { color: var(--text-3); }
  .input:hover, .textarea:hover { border-color: var(--text-3); }
  .input:focus, .textarea:focus { outline: none; border-color: var(--secondary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--secondary) 24%, transparent); }
  .field.has-error .input, .field.has-error .textarea { border-color: var(--danger); }
  .field__hint { color: var(--text-3); font-size: var(--fs-small); }
  .form__note { display: flex; gap: 8px; align-items: center; justify-content: center; text-align: center; }
  .form__note .icon { width: 18px; height: 18px; color: var(--primary); }
  .field__error { display: flex; gap: 6px; align-items: center; color: var(--danger); font-weight: 700; font-size: var(--fs-small); }
  .field__error .icon { width: 18px; height: 18px; }
  .check { display: flex; gap: var(--space-3); align-items: flex-start; }
  .check input { flex: none; width: 24px; height: 24px; margin-top: 2px; accent-color: var(--primary); }
  .check label { font-size: var(--fs-small); color: var(--text-2); }
  .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; } /* câmp-capcană pentru boți */
  .alert { display: flex; gap: var(--space-3); padding: var(--space-4); border-radius: var(--radius-md); font-weight: 700; }
  .alert .icon { margin-top: 1px; }
  .alert--ok { background: var(--primary-container); color: var(--on-primary-container); }
  .alert--err { background: var(--danger-container); color: var(--on-danger-container); }

  /* ---------- ferestre (filtre): <dialog> ---------- */
  dialog { color: inherit; border: 0; padding: 0; background: transparent; max-width: none; max-height: none; }
  dialog::backdrop { background: color-mix(in srgb, var(--scrim) 62%, transparent); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
  dialog[open] { animation: dialog-in var(--dur-slow) var(--ease); }
  @keyframes dialog-in { from { opacity: 0; transform: translateY(24px) scale(.98); } }

  /* ---------- text lung (regulamente, texte legale) ---------- */
  .prose { max-width: 72ch; }
  .prose > * + * { margin-top: 1em; }
  .prose h2 { font-size: 2rem; margin-top: 2em; scroll-margin-top: calc(var(--appbar-h) + 16px); }
  .prose h3 { font-size: 1.5rem; margin-top: 1.7em; scroll-margin-top: calc(var(--appbar-h) + 16px); }
  .prose h4 { margin-top: 1.4em; font-size: 1.125rem; }
  .prose h2:first-child, .prose h3:first-child { margin-top: 0; }
  .prose ul { padding-left: 1.3em; display: grid; gap: .5em; }
  .prose li::marker { color: var(--primary); }
  .prose a { word-break: break-word; }
  .prose p { color: var(--text); }
  .toc { display: grid; gap: 2px; list-style: none; font-size: var(--fs-small); }
  .toc a { display: block; padding: 7px 12px; border-radius: var(--radius-sm); color: var(--text-2); text-decoration: none; }
  .toc a:hover { background: var(--surface-2); color: var(--text); }
  .toc .lvl3 a { padding-left: 24px; }
  .toc .lvl4 { display: none; }

  /* ---------- „DRIVE +": plusul în verdele logo-ului; „ta" din regula minimului de litri apare cu majuscule ---------- */
  .logo-white { --logo-blue: #fff; --logo-green: #fff; }
  .plus { color: var(--logo-green); }
  .caps { text-transform: uppercase; }
  .link-btn { color: var(--secondary); font-weight: 700; text-decoration: underline; cursor: pointer; }

  /* ---------- bulina (imitația autocolantului): culorile mărcii în ambele teme, fiindcă autocolantul este un obiect fizic ---------- */
  .bulina { --logo-blue: var(--brand-blue); --logo-green: var(--brand-green); display: block; }
  .bulina__emblem, .bulina__word { --logo-blue: var(--brand-blue); --logo-green: var(--brand-green); }
  .bulina__outline { --logo-blue: #fff; --logo-green: #fff; }

  /* ---------- stația fără fotografie (varianta curentă): zonă, nume, adresă, serviciile cu denumire, butoane ---------- */
  .badge--tonal { background: var(--primary-container); color: var(--on-primary-container); }
  .st-card__top { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); min-height: 22px; }
  .st-card--plain { padding: var(--space-4); gap: 0; }
  .st-card--plain .st-card__body { padding: 0; gap: var(--space-2); }
  .st-card--plain .st-card__name { font-size: 2rem; }
  .st-card--plain .chip { min-height: 32px; padding: 0 11px 0 9px; font-size: .875rem; gap: 6px; }
  .st-card--plain .chip .icon { width: 16px; height: 16px; }
  .st-card--plain .chips { gap: 6px; }
  .row--button { width: 100%; font: inherit; text-align: left; cursor: pointer; }

  /* ---------- cardul unui program de loialitate (DRIVE + / DRIVE + VIP): fundal închis în culorile programului ---------- */
  .program-card {
    position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; width: 300px; overflow: hidden; padding: var(--space-5);
    border-radius: var(--radius-lg); color: var(--on-hero); border: 1px solid rgb(255 255 255 / .08);
    background: radial-gradient(120% 90% at 100% 0%, var(--drive-c), transparent 62%), linear-gradient(145deg, var(--drive-a), var(--drive-b));
    box-shadow: var(--shadow-1);
    transition: transform var(--dur-base) var(--ease), box-shadow var(--dur-base);
  }
  .rail--fill .program-card { padding: var(--space-6); }
  .rail--fill .program-card__title { font-size: 3.25rem; }
  .rail--fill .program-card__text { font-size: 1rem; max-width: 40ch; }
  .program-card--vip {
    background: radial-gradient(110% 80% at 100% 0%, color-mix(in srgb, var(--gold) 24%, transparent), transparent 60%), linear-gradient(145deg, var(--vip-a), var(--vip-b));
  }
  .program-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
  .program-card__badge {
    padding: 4px 10px; border-radius: var(--radius-pill); background: var(--drive-accent); color: var(--drive-a);
    font-size: .75rem; font-weight: 700; letter-spacing: .07em; line-height: 1; text-transform: uppercase;
  }
  .program-card--vip .program-card__badge { background: var(--gold); color: var(--vip-a); }
  .program-card__title { margin-top: var(--space-3); font-size: 2.75rem; line-height: .9; font-style: italic; letter-spacing: .01em; }
  .program-card__title a { color: inherit; text-decoration: none; }
  .program-card__title a::after { content: ""; position: absolute; inset: 0; }
  .program-card__title a:focus-visible { outline: none; }
  .program-card:has(.program-card__title a:focus-visible) { outline: 3px solid var(--focus); outline-offset: 3px; }
  .program-card .plus { color: var(--brand-green); }
  .program-card__tag { font-weight: 700; font-size: 1.125rem; line-height: 1.25; color: var(--drive-accent); }
  .program-card__text { color: rgb(255 255 255 / .86); font-size: var(--fs-small); }
  .program-card__more { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; padding-top: var(--space-3); font-weight: 700; color: var(--drive-accent); }
  .program-card__more .icon { width: 20px; height: 20px; }
  @media (min-width: 1024px) { .program-card { width: auto; } }

  /* ---------- fereastra de acceptare a cookie-urilor (prima vizită) ---------- */
  .consent {
    position: fixed; z-index: var(--z-toast); left: 12px; right: 12px; margin-inline: auto; max-width: 560px;
    bottom: calc(var(--tabbar-h) + 38px + env(safe-area-inset-bottom, 0px));
    opacity: 0; translate: 0 18px; transition: opacity var(--dur-slow) var(--ease), translate var(--dur-slow) var(--ease);
  }
  .consent.is-open { opacity: 1; translate: 0 0; }
  .consent__card {
    display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-3) var(--space-4); padding: var(--space-4);
    border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-3);
  }
  .consent__icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--primary-container); color: var(--on-primary-container); }
  .consent__title { font-size: 1.625rem; line-height: 1.1; }
  .consent__body p { margin-top: 4px; color: var(--text-2); font-size: var(--fs-small); line-height: 1.4; }
  .consent__body a { color: var(--secondary); font-weight: 700; }
  .consent__actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: var(--space-2); }
  .consent__actions .btn { flex: 1 1 150px; }
  .consent__actions .btn[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--primary); }
  @media (min-width: 1024px) {
    .consent { left: 24px; right: auto; bottom: 24px; margin: 0; width: 470px; }
  }

  /* ---------- bifa „Nu sunt robot" (calculul este în assets/js/captcha.js; vezi includes/captcha.php) ---------- */
  .captcha {
    position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "box brand" "status brand";
    align-items: center; column-gap: var(--space-3); row-gap: 2px; padding: 12px 14px;
    border: 1.5px solid var(--line-strong); border-radius: var(--radius-md); background: var(--surface);
  }
  .captcha__box { grid-area: box; display: inline-flex; align-items: center; gap: 12px; width: fit-content; cursor: pointer; font-weight: 700; }
  .captcha__input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
  .captcha__mark {
    position: relative; display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 8px;
    border: 2px solid var(--line-strong); background: var(--surface); color: transparent;
    transition: background var(--dur-fast), border-color var(--dur-fast), color var(--dur-fast);
  }
  .captcha__mark .icon { width: 20px; height: 20px; stroke-width: 3; }
  .captcha__box:hover .captcha__mark { border-color: var(--text-3); }
  .captcha__input:focus-visible + .captcha__mark { outline: 3px solid var(--focus); outline-offset: 3px; }
  .captcha__input:checked + .captcha__mark { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
  .captcha__spinner { display: none; position: absolute; inset: 2px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--primary); animation: captcha-spin .8s linear infinite; }
  .captcha[data-state="busy"] .captcha__mark { background: var(--surface); border-color: transparent; color: transparent; }
  .captcha[data-state="busy"] .captcha__spinner { display: block; }
  .captcha__status { grid-area: status; min-height: 1.2em; padding-left: 42px; font-size: var(--fs-small); color: var(--text-2); }
  .captcha[data-state="ok"] .captcha__status { color: var(--primary); font-weight: 700; }
  .captcha[data-state="error"] .captcha__status { color: var(--danger); font-weight: 700; }
  .captcha__brand { grid-area: brand; display: grid; justify-items: center; gap: 2px; font-size: .6875rem; line-height: 1.2; text-align: center; color: var(--text-3); }
  .captcha__brand .icon { width: 24px; height: 24px; color: var(--secondary); }
  @keyframes captcha-spin { to { transform: rotate(360deg); } }
  /* fără JavaScript bifa nu poate calcula dovada de lucru: se arată întrebarea aritmetică în loc */
  .captcha-math { display: none; gap: 6px; margin-top: var(--space-3); }
  .captcha-math label { font-weight: 700; }
  html:not(.js) .captcha { display: none; }
  html:not(.js) .captcha-math { display: grid; }
  .js .captcha-math { display: none; }

  /* ---------- povești (cercuri + vizualizator pe tot ecranul) ---------- */
  .stories { display: flex; gap: var(--space-4); overflow-x: auto; scrollbar-width: none; margin-inline: calc(-1 * var(--gutter)); padding: 4px var(--gutter) 6px; scroll-padding-inline: var(--gutter); }
  .stories::-webkit-scrollbar { display: none; }
  .story { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 82px; flex: none; text-decoration: none; color: var(--text); touch-action: manipulation; }
  .story__ring {
    display: grid; place-items: center; width: 78px; height: 78px; border-radius: 50%; padding: 3px;
    background: conic-gradient(from 210deg, var(--brand-blue), #1a9ab0, var(--brand-green), var(--brand-blue));
    transition: transform var(--dur-base) var(--ease);
  }
  .story:active .story__ring { transform: scale(.94); }
  .story__img {
    display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; overflow: hidden;
    border: 3px solid var(--bg); background: var(--surface-2); color: var(--primary);
  }
  .story__img img { width: 100%; height: 100%; object-fit: cover; }
  .story__img--tone { background: linear-gradient(145deg, var(--hero-a), var(--hero-c)); color: #fff; }
  .story__img--drive { background: linear-gradient(160deg, var(--drive-a), var(--drive-b)); color: var(--drive-accent); }
  .story__img--vip { background: linear-gradient(160deg, var(--vip-b), var(--vip-a)); color: var(--gold); }
  .story__img .icon { width: 30px; height: 30px; }
  .story__label { font-size: .8125rem; font-weight: 700; line-height: 1.15; text-align: center; text-wrap: balance; }
  @media (min-width: 1024px) { .stories { margin-inline: 0; padding-inline: 0; } }

  .story-view { width: min(100vw, 440px); height: 100vh; height: 100dvh; max-height: 880px; margin: auto; }
  @media (min-width: 560px) { .story-view { height: min(100dvh - 32px, 860px); } }
  .story-view__frame {
    position: relative; display: flex; flex-direction: column; width: 100%; height: 100%; overflow: hidden; color: #fff;
    background: linear-gradient(160deg, var(--hero-a), var(--hero-b) 55%, var(--hero-c));
    border-radius: 0;
  }
  /* programele de loialitate au fundalul cardurilor lor: verde foarte închis (DRIVE +) și negru (DRIVE + VIP) */
  .story-view__frame[data-tone="drive"] {
    background: radial-gradient(90% 60% at 100% 0%, color-mix(in srgb, var(--drive-c) 70%, transparent), transparent 65%), linear-gradient(165deg, var(--drive-a), var(--drive-b) 60%, var(--drive-a));
  }
  .story-view__frame[data-tone="vip"] {
    background: radial-gradient(70% 55% at 78% 62%, color-mix(in srgb, var(--brand-green) 30%, transparent), transparent 70%), linear-gradient(135deg, var(--vip-b), var(--vip-a) 72%);
  }
  @media (min-width: 560px) { .story-view__frame { border-radius: var(--radius-xl); box-shadow: var(--shadow-3); } }
  .story-view__bars { position: absolute; z-index: 3; left: 14px; right: 14px; top: calc(12px + env(safe-area-inset-top, 0px)); display: flex; gap: 5px; }
  .story-view__bar { flex: 1; height: 4px; border-radius: 4px; background: rgb(255 255 255 / .3); overflow: hidden; }
  .story-view__bar i { display: block; width: 100%; height: 100%; background: #fff; transform-origin: left; transform: scaleX(0); }
  .story-view__bar.is-done i { transform: scaleX(1); }
  .story-view__bar.is-active i { animation: story-progress var(--story-ms, 7000ms) linear forwards; }
  .story-view.is-paused .story-view__bar.is-active i { animation-play-state: paused; }
  @keyframes story-progress { to { transform: scaleX(1); } }
  .story-view__top { position: absolute; z-index: 3; left: 14px; right: 14px; top: calc(28px + env(safe-area-inset-top, 0px)); display: flex; align-items: center; justify-content: space-between; }
  .story-view__who { display: flex; align-items: center; gap: 10px; font-weight: 700; }
  .story-view__who img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: rgb(255 255 255 / .2); }
  .story-view__avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: rgb(255 255 255 / .2); }
  .story-view__avatar .icon { width: 20px; height: 20px; }
  .story-view__actions { display: flex; gap: 8px; }
  .story-view__close { color: #fff; background: rgb(0 0 0 / .22); box-shadow: none; }
  .story-view__close:hover { background: rgb(0 0 0 / .36); }
  .story-view__slide { position: relative; flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: var(--space-4); padding: 96px 24px calc(28px + env(safe-area-inset-bottom, 0px)); isolation: isolate; }
  .story-view__slide h2 { font-size: clamp(2.6rem, 11vw, 3.6rem); line-height: .94; }
  .story-view__slide h2 .plus { color: var(--brand-green); }
  .story-view__slide p { font-size: 1.1875rem; line-height: 1.45; opacity: .95; max-width: 32ch; white-space: pre-line; }
  .story-view__slide.has-art h2, .story-view__slide.has-art p { max-width: 60%; }
  /* lipit de marginea din dreapta, nu în afara ei: mâna lui Gepelino (degetul mare ridicat) ajunge până la marginea imaginii */
  .story-view__art { position: absolute; z-index: -1; right: 8px; bottom: 0; height: 56%; width: auto; max-width: 80%; object-fit: contain; object-position: bottom right; }
  .story-view__art--center { right: 50%; translate: 50% 0; height: 46%; top: 16%; bottom: auto; object-position: center; }
  .story-view__svg { position: absolute; z-index: -1; left: 0; right: 0; top: 92px; width: 100%; height: 50%; }
  .story-view__svg--frame { left: 16px; right: auto; top: 104px; width: calc(100% - 32px); height: auto; border-radius: 22px; box-shadow: 0 18px 40px -18px rgb(0 0 0 / .6); }
  .story-view__glyph { position: absolute; z-index: -1; right: -14%; top: 12%; width: 78%; height: auto; stroke-width: .8; color: #fff; opacity: .14; }
  .story-view__tap { position: absolute; z-index: 2; top: 0; bottom: 120px; width: 40%; }
  .story-view__tap--prev { left: 0; }
  .story-view__tap--next { right: 0; width: 60%; }
  .story-view__cta { align-self: flex-start; position: relative; z-index: 4; }

  /* ---------- fereastră de jos (bottom sheet): filtrele hărții și codul bulinei ---------- */
  dialog.sheet { position: fixed; inset: auto 0 0 0; margin: 0; width: 100%; max-width: none; z-index: var(--z-sheet); }
  .sheet__panel {
    display: flex; flex-direction: column; max-height: min(86dvh, 640px); margin-inline: auto; width: min(100%, 560px);
    background: var(--surface); border-radius: var(--radius-xl) var(--radius-xl) 0 0; box-shadow: var(--shadow-3);
    padding: var(--space-5) var(--space-5) calc(var(--space-5) + env(safe-area-inset-bottom, 0px));
  }
  .sheet__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-2); }
  .sheet__head h2 { font-size: 2rem; }
  .sheet__body { overflow: auto; padding-bottom: var(--space-4); }
  .sheet__hint { color: var(--text-3); font-size: var(--fs-small); margin-top: var(--space-4); }
  .sheet__foot { display: grid; grid-template-columns: 1fr 1.6fr; gap: var(--space-3); padding-top: var(--space-3); }
  @media (min-width: 640px) {
    dialog.sheet { inset: 0; margin: auto; width: min(560px, 100%); height: fit-content; }
    .sheet__panel { border-radius: var(--radius-xl); }
  }
  dialog.sheet::backdrop { background: color-mix(in srgb, var(--scrim) 55%, transparent); }
  .group-title:first-child { margin-top: var(--space-2); }
}
