/* ── Policy popup overlay ── */
  .policy-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
  }
  .policy-overlay.open { display: flex; }

  .policy-popup {
    background: var(--clr-bg-card);
    color: var(--clr-text-body);
    border-radius: 16px;
    width: min(92vw, 640px);
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
    overflow: hidden;
  }

  /* Header */
  .policy-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--clr-border);
    flex-shrink: 0;
    background: var(--clr-bg-card);
  }
  .policy-popup-header h2 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--clr-bg-dark);
  }
  .policy-close {
    background: none;
    border: none;
    font-size: var(--text-2xl);
    cursor: pointer;
    color: var(--clr-text-muted);
    padding: 0.2rem;
    line-height: 1;
  }
  .policy-close:hover { color: var(--clr-bg-dark); }

  /* Tab pills */
  .policy-tabs {
    display: flex;
    gap: 0.25rem;
    padding: 0.75rem 1.25rem;
    overflow-x: auto;
    flex-shrink: 0;
    border-bottom: 1px solid var(--clr-border-light);
    background: var(--clr-bg-card);
    -webkit-overflow-scrolling: touch;
  }
  .policy-tab {
    padding: 0.3rem 0.7rem;
    border-radius: 16px;
    font-size: var(--text-xs);
    font-weight: 600;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    background: var(--clr-bg-page);
    color: var(--clr-text-dark);
    transition: all 0.15s;
  }
  .policy-tab:hover { background: var(--clr-border); color: var(--clr-bg-dark); }
  .policy-tab.active { background: var(--clr-primary); color: var(--clr-text-light); }

  /* Scrollable body */
  .policy-popup-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem;
    font-size: 0.88rem;
    line-height: 1.7;
    color: var(--clr-text-body);
    background: var(--clr-bg-card);
  }
  .policy-section { display: none; }
  .policy-section.active { display: block; }
  .policy-section h4 {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--clr-bg-dark);
    margin: 1rem 0 0.35rem;
  }
  .policy-section h4:first-child { margin-top: 0; }
  .policy-section p { margin-bottom: 0.6rem; color: var(--clr-text-body); }
  .policy-section a { color: var(--clr-primary); text-decoration: none; }
  .policy-section a:hover { text-decoration: underline; }
  .policy-section strong { color: var(--clr-bg-dark); }

  /* Footer */
  .policy-popup-footer {
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--clr-border);
    text-align: center;
    flex-shrink: 0;
    background: var(--clr-bg-card);
  }
  .policy-accept-btn {
    background: var(--clr-primary);
    color: var(--clr-text-light);
    border: none;
    border-radius: 8px;
    padding: 0.6rem 2rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
  }
  .policy-accept-btn:hover { background: var(--clr-primary-dark); }

  @media (max-width: 500px) {
    .policy-popup { border-radius: 12px 12px 0 0; max-height: 90vh; width: 100vw; align-self: flex-end; }
    .policy-tabs { gap: 0.2rem; padding: 0.5rem 0.75rem; }
    .policy-tab { font-size: 0.7rem; padding: 0.25rem 0.55rem; }
    .policy-popup-body { padding: 1rem; }
  }