/* =========================================================================
   styles.css — Demo d'actes municipals (Scritium)

   ORGANITZACIÓ (reordenat 21/08/2026, sense canvis visuals):
     1. Base i tipografia
     2. Capçalera i estat del document
     3. Estructura principal i pestanyes
     4. Xat: missatges i bombolles
     5. Xat: fonts consultades
     6. Xat: miniatures de pàgines
     7. Xat: valoració (feedback)
     8. Xat: quota de preguntes
     9. Àrea d'entrada
    10. Cerca de llistes
    11. Visor d'imatges
    12. Elements comuns (loading, welcome, títols de secció)
    13. Gatekeeper (control d'accés)
    14. Modals (privacitat i contacte)
    15. Peu i avís de mòbil
    16. Regles sense ús

   CONVENCIÓ: una propietat per línia, indentació de 2 espais.
   ========================================================================= */

/* ========================================================================
   1. BASE I TIPOGRAFIA
   ======================================================================== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: system-ui, sans-serif;
  background: #f5f4f0;
  color: #1a1a1a;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ========================================================================
   2. CAPÇALERA I ESTAT DEL DOCUMENT
   ======================================================================== */

header {
  background: #fff;
  border-bottom: 0.5px solid #ddd;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 12px;
}
header h1 {
  font-size: 16px;
  font-weight: 500;
}
header span {
  font-size: 13px;
  color: #888;
}
header .doc-status {
  font-size: 12px;
  color: #888;
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.status-bar {
  width: 120px;
  height: 5px;
  background: #eee;
  border-radius: 3px;
  overflow: hidden;
  display: flex;
}
.status-bar-fill {
  height: 100%;
  background: #7c6fd0;
}
.status-bar-process {
  height: 100%;
  background: #fbbf24;
}

.logo-icon {
  width: auto;
  height: 40px;
  display: block;
}

/* ========================================================================
   3. ESTRUCTURA PRINCIPAL I PESTANYES
   ======================================================================== */

.main {
  display: flex;
  flex: 1;
  overflow: hidden;
  padding-bottom: 24px;
}
.chat-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.tab-bar {
  display: flex;
  border-bottom: 0.5px solid #ddd;
  background: #fff;
  flex-shrink: 0;
}
.tab-btn {
  padding: 0.5rem 1.5rem;
  font-size: 13px;
  border: none;
  background: none;
  cursor: pointer;
  color: #888;
  border-bottom: 2px solid transparent;
}
.tab-btn.active {
  color: #1a1a1a;
  border-bottom-color: #1a1a1a;
}
.tab-content {
  display: none;
  flex: 1;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}
.tab-content.active {
  display: flex;
}

/* ========================================================================
   4. XAT: MISSATGES I BOMBOLLES
   ======================================================================== */

.messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.message {
  max-width: 82%;
}
.message.user {
  align-self: flex-end;
}
.message.assistant {
  align-self: flex-start;
  width: 82%;
}
.bubble {
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.6;
}
.user .bubble {
  background: #1a1a1a;
  color: #fff;
  border-bottom-right-radius: 4px;
}
.assistant .bubble {
  background: #fff;
  border: 0.5px solid #ddd;
  border-bottom-left-radius: 4px;
}

/* ========================================================================
   5. XAT: FONTS CONSULTADES
   ======================================================================== */

.footer-block {
  margin-top: 0.5rem;
  padding: 0.75rem 1rem;
  background: #fafaf9;
  border: 0.5px solid #e8e8e4;
  border-radius: 8px;
  font-size: 12px;
}
.footer-title {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #888;
  margin-bottom: 10px;
}
.source-entry {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 6px;
  border-bottom: 0.5px solid #eee;
  border-radius: 6px;
}
.source-entry:last-child {
  border-bottom: none;
}
.source-entry:hover {
  background: #f5f4f0;
}
.source-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  cursor: pointer;
}
.source-info .s-session {
  font-weight: 500;
  color: #333;
  font-size: 12px;
}
.source-info .s-date {
  color: #666;
  font-size: 11px;
}
.source-info .s-file {
  color: #aaa;
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.source-info .s-context {
  color: #888;
  font-size: 11px;
  font-style: italic;
  margin-top: 2px;
}
.list-badge {
  display: inline-block;
  font-size: 10px;
  background: #f0eeff;
  color: #7c6fd0;
  border-radius: 3px;
  padding: 1px 5px;
  margin-left: 4px;
}
.chunk-index {
  font-size: 10px;
  color: #aaa;
  margin-left: 4px;
}

/* ========================================================================
   6. XAT: MINIATURES DE PÀGINES
   ======================================================================== */

.page-strip {
  display: flex;
  gap: 4px;
  align-items: center;
  flex-shrink: 0;
}
.page-strip-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
}
.page-strip-item img {
  border-radius: 3px;
  border: 0.5px solid #ddd;
  background: #eee;
  object-fit: cover;
  transition: border-color 0.15s;
}
.page-strip-item.main-page img {
  width: 40px;
  height: 52px;
  border-color: #999;
}
.page-strip-item.adj-page img {
  width: 28px;
  height: 36px;
  opacity: 0.55;
}
.page-strip-item:hover img {
  border-color: #555;
  opacity: 1;
}
.page-strip-item.active img {
  border-color: #7c6fd0 !important;
  box-shadow: 0 0 0 2px #c0b8f0;
  opacity: 1;
}
.page-strip-item span {
  font-size: 9px;
  color: #aaa;
}
.page-strip-item.main-page span {
  color: #555;
  font-weight: 500;
}
.page-strip-sep {
  color: #ddd;
  font-size: 12px;
}

/* ========================================================================
   7. XAT: VALORACIÓ (FEEDBACK)
   NOTA: .feedback-bar estava declarada DUES vegades al fitxer original,
   amb margin-top repetit. Fusionades aquí en una sola regla.
   ======================================================================== */

.feedback-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  margin-left: 8px;
  position: relative;
}
.fb-toggle {
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 6px;
  padding: 4px 12px;
  cursor: pointer;
  font-size: 12px;
  color: #666;
  opacity: 0.7;
  transition: opacity 0.15s;
}
.fb-toggle:hover {
  opacity: 1;
  background: #f5f4f0;
}
.fb-panel {
  display: none;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
  padding: 8px;
  border: 1px solid #eee;
  border-radius: 8px;
  background: #fafafa;
  width: fit-content;
  min-width: 200px;
}
.feedback-bar.open .fb-panel {
  display: flex;
}
.fb-opt {
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 6px;
  padding: 5px 12px;
  cursor: pointer;
  font-size: 13px;
  text-align: left;
}
.fb-opt:hover {
  background: #f0eefb;
  border-color: #7c6fd0;
}
.fb-reason {
  display: none;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}
.feedback-bar.show-reason .fb-reason {
  display: flex;
}
.fb-reason-input {
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 6px;
  font-family: inherit;
  font-size: 13px;
  resize: vertical;
}
.fb-reason-send {
  align-self: flex-end;
  border: none;
  background: #7c6fd0;
  color: #fff;
  border-radius: 6px;
  padding: 5px 14px;
  cursor: pointer;
  font-size: 13px;
}
.fb-reason-send:hover {
  background: #6a5cc0;
}
.fb-done {
  font-size: 12px;
  color: #7c6fd0;
}

/* ========================================================================
   8. XAT: QUOTA DE PREGUNTES
   ======================================================================== */

.quota-bar {
  padding: 10px 14px;
  margin: 0 12px 8px;
  border-radius: 6px;
  font-size: 13px;
  background: #fff8e1;
  border: 0.5px solid #fcd34d;
  color: #92400e;
}
.quota-bar.blocked {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #991b1b;
}
.quota-bar a {
  color: inherit;
  font-weight: 600;
}

/* ========================================================================
   9. ÀREA D'ENTRADA
   ======================================================================== */

.input-area {
  padding: 1rem 1.5rem;
  background: #fff;
  border-top: 0.5px solid #ddd;
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.input-area textarea {
  flex: 1;
  border: 0.5px solid #ddd;
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  font-size: 14px;
  resize: none;
  height: 42px;
  font-family: inherit;
  background: #fafaf9;
}
.input-area textarea:focus {
  outline: none;
  border-color: #999;
}
.input-area button {
  background: #1a1a1a;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0 1rem;
  font-size: 14px;
  cursor: pointer;
}
.input-area button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ========================================================================
   10. CERCA DE LLISTES
   ======================================================================== */

.list-context-bar {
  padding: 0.6rem 1.5rem;
  background: #fff;
  border-bottom: 0.5px solid #eee;
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.context-tag {
  font-size: 11px;
  background: #f0eeff;
  color: #7c6fd0;
  border: 0.5px solid #d4cef7;
  border-radius: 20px;
  padding: 3px 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.1s;
}
.context-tag:hover {
  background: #e0d8ff;
}
.context-tag.active {
  background: #7c6fd0;
  color: #fff;
  border-color: #7c6fd0;
}
.context-tag-count {
  font-size: 10px;
  opacity: 0.7;
  margin-left: 3px;
}
.list-search-total {
  padding: 0.5rem 1.5rem;
  font-size: 12px;
  color: #888;
  background: #fff;
  border-bottom: 0.5px solid #eee;
  flex-shrink: 0;
}
.list-results {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.list-card {
  background: #fff;
  border: 0.5px solid #ddd;
  border-radius: 8px;
  padding: 0.75rem 1rem;
}
.list-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
}
.list-card-session {
  font-weight: 500;
  font-size: 13px;
}
.list-card-date {
  font-size: 11px;
  color: #888;
}
.list-card-context {
  font-size: 11px;
  color: #7c6fd0;
  font-style: italic;
  margin-bottom: 0.5rem;
  background: #f0eeff;
  display: inline-block;
  padding: 1px 8px;
  border-radius: 10px;
}
.list-card-body {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.list-card-items {
  flex: 1;
  font-size: 11px;
  color: #444;
  line-height: 1.6;
  max-height: 120px;
  overflow-y: auto;
}
.list-card-items div {
  padding: 2px 0;
  border-bottom: 0.5px solid #f0f0f0;
}
.list-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.5rem;
}
.list-card-count {
  font-size: 10px;
  color: #aaa;
}
.list-search-area {
  padding: 1rem 1.5rem;
  background: #fff;
  border-top: 0.5px solid #ddd;
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: wrap;
}
.list-search-area input {
  flex: 1;
  border: 0.5px solid #ddd;
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  font-size: 14px;
  font-family: inherit;
  background: #fafaf9;
}
.list-search-area input:focus {
  outline: none;
  border-color: #999;
}
.list-search-area button {
  background: #1a1a1a;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0 1rem;
  font-size: 14px;
  cursor: pointer;
}
#active-filter {
  width: 100%;
  margin-bottom: 6px;
}

/* ========================================================================
   11. VISOR D'IMATGES
   ======================================================================== */

.image-panel {
  width: 50%;
  border-left: 0.5px solid #ddd;
  background: #1a1a1a;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex-shrink: 0;
}
.image-panel.hidden {
  display: none;
}
.image-panel-header {
  padding: 0.6rem 1rem;
  border-bottom: 0.5px solid #333;
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  background: #222;
}
.image-panel-header span {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #ccc;
}
.panel-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.panel-btn {
  background: none;
  border: 0.5px solid #444;
  border-radius: 5px;
  cursor: pointer;
  padding: 3px 8px;
  font-size: 11px;
  color: #aaa;
}
.panel-btn:hover {
  background: #333;
  color: #fff;
}
.close-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 20px;
  color: #666;
  padding: 0 2px;
  line-height: 1;
}
.close-btn:hover {
  color: #fff;
}
.image-viewport {
  flex: 1;
  overflow: hidden;
  position: relative;
}
.image-viewport img {
  display: block;
  max-width: 100%;
  user-select: none;
}
.zoom-hint {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.6);
  color: #ccc;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 20px;
  pointer-events: none;
  transition: opacity 0.5s;
}
.zoom-hint.hidden {
  opacity: 0;
}
.zoom-controls {
  position: absolute;
  bottom: 12px;
  right: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.zoom-btn {
  width: 30px;
  height: 30px;
  background: rgba(0,0,0,0.6);
  border: 0.5px solid #444;
  border-radius: 6px;
  color: #ccc;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.zoom-btn:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
}

/* ========================================================================
   12. ELEMENTS COMUNS
   ======================================================================== */

.loading {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 0.75rem 1rem;
}
.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #999;
  animation: bounce 1.2s infinite;
}
.dot:nth-child(2) {
  animation-delay: 0.2s;
}
.dot:nth-child(3) {
  animation-delay: 0.4s;
}
@keyframes bounce {
  0%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-6px); }
}
.welcome {
  text-align: center;
  padding: 3rem 1rem;
  color: #888;
}
.welcome h2 {
  font-size: 18px;
  font-weight: 500;
  color: #444;
  margin-bottom: 0.5rem;
}
.welcome p {
  font-size: 14px;
}
.results-section-title {
  font-size: 11px;
  font-weight: 500;
  color: #888;
  padding: 8px 0 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 0.5px solid #eee;
  margin-bottom: 4px;
}
.results-section-title.fuzzy {
  color: #b45309;
}

/* ========================================================================
   13. GATEKEEPER (CONTROL ACCÉS)
   ======================================================================== */

.gatekeeper-overlay {
  position: fixed;
  inset: 0;
  height: 100dvh;
  background: rgba(43, 37, 33, 0.45);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1999;
  font-family: inherit;
}
.gatekeeper-card {
  background: #fff;
  border: 1px solid rgba(43, 37, 33, 0.08);
  border-radius: 12px;
  padding: 2.5rem 2rem;
  max-width: 380px;
  width: 100%;
  max-height: 90dvh;
  overflow-y: auto;
  text-align: center;
  box-shadow: 0 18px 45px rgba(43, 37, 33, 0.25);
}
.gatekeeper-view {
  text-align: inherit;
}
.gatekeeper-text {
  font-size: 0.9rem;
  color: #6E645B;
  margin-bottom: 1.5rem;
  line-height: 1.4;
}
.gatekeeper-input {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(43, 37, 33, 0.14);
  background: #FAF7F2;
  color: #2B2521;
  text-align: center;
  font-size: 1.1rem;
  font-family: monospace;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.gatekeeper-input:focus {
  outline: none;
  border-color: #B07D3C;
  box-shadow: 0 0 0 3px rgba(176, 125, 60, 0.18);
}
.gatekeeper-input-mail {
  width: 100%;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(43, 37, 33, 0.14);
  background: #FAF7F2;
  color: #2B2521;
  text-align: center;
  font-size: 1rem;
  font-family: monospace;
  margin-bottom: 0.5rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.gatekeeper-input-mail:focus {
  outline: none;
  border-color: #B07D3C;
  box-shadow: 0 0 0 3px rgba(176, 125, 60, 0.18);
}
.gatekeeper-btn,
.gatekeeper-btn-mail {
  width: 100%;
  border-radius: 8px;
  border: none;
  background: #B0512E;
  color: #FFF7F2;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}
.gatekeeper-btn {
  padding: 12px;
  font-size: 0.95rem;
}
.gatekeeper-btn-mail {
  padding: 10px;
  font-size: 0.8rem;
}
.gatekeeper-btn:hover:not(:disabled),
.gatekeeper-btn-mail:hover:not(:disabled) {
  background: #C4643D;
}
.gatekeeper-btn:disabled,
.gatekeeper-btn-mail:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}
.gatekeeper-link {
  display: block;
  width: 100%;
  background: none;
  border: none;
  color: #6E645B;
  font-size: 11px;
  text-decoration: none;
  cursor: pointer;
  margin-top: 14px;
  opacity: 0.85;
}
.gatekeeper-link:hover {
  opacity: 1;
  color: #2B2521;
}
.gatekeeper-privacy {
  font-size: 0.82rem;
  color: #6E645B;
  line-height: 1.4;
  margin: 5px 0;
  text-align: left;
}
.gatekeeper-privacy a {
  color: #B0512E;
  text-decoration: underline;
  cursor: pointer;
}
.gatekeeper-privacy a:hover {
  color: #C4643D;
}
.gatekeeper-consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.85rem;
  color: #6E645B;
  text-align: left;
  margin: 10px 0 16px;
  cursor: pointer;
}
.gatekeeper-consent input[type="checkbox"] {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  accent-color: #B0512E;
  cursor: pointer;
}
.gatekeeper-request-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}
.gatekeeper-request-msg {
  font-size: 12px;
  margin-top: 10px;
  margin-top: 10px;
  color: #6E645B;
  text-align: center;
}
.gatekeeper-request-msg.error {
  color: #8C2F1A;
  text-align: left;
}
.gatekeeper-error {
  color: #8C2F1A;
  font-size: 0.85rem;
  margin-top: 1rem;
  margin-bottom: 0;
  display: none;
}

.gatekeeper-hint {
  font-size: 11px;
  color: #7a7a85;
  margin: 0 0 14px;
  text-align: center;
}

/* Confirmació que s'ha enviat un codi. Apareix a dalt de #viewCode, no a
   la vista de sol·licitud: així l'usuari torna del correu i té el camp
   del codi just a sota, sense haver de navegar enlloc. */
.gatekeeper-sent {
  font-size: 0.85rem;
  color: #2B2521;
  background: #FAF7F2;
  border: 1px solid rgba(176, 125, 60, 0.35);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 16px;
  line-height: 1.4;
}

/* ========================================================================
   14. MODALS (PRIVACITAT I CONTACTE)
   ======================================================================== */

.privacy-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.privacy-modal-overlay.open {
  display: flex;
}
.privacy-modal-card {
  background: #fff;
  border-radius: 10px;
  max-width: 1024px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  padding: 24px;
  position: relative;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}
.privacy-modal-card h3 {
  margin-top: 0;
  font-size: 1.1rem;
}
.privacy-modal-card p {
  font-size: 0.88rem;
  line-height: 1.5;
  color: #444;
}
.privacy-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: none;
  border: none;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  color: #888;
}
.privacy-modal-close:hover {
  color: #333;
}

/* --- Modal de contacte (quota 80% / 100%) ---
   Comparteix .privacy-modal-overlay i .privacy-modal-card, però amb la
   paleta del gatekeeper. */
.contact-card {
  max-width: 420px;
}
.contact-card h3 {
  color: #2B2521;
  margin-bottom: 8px;
}
.contact-intro {
  font-size: 0.88rem;
  color: #6E645B;
  line-height: 1.5;
  margin-bottom: 12px;
}
.contact-email {
  font-size: 0.82rem;
  color: #B07D3C;
  background: #FAF7F2;
  border-radius: 6px;
  padding: 6px 10px;
  margin-bottom: 18px;
}
.contact-label {
  display: block;
  font-size: 0.82rem;
  color: #6E645B;
  margin-bottom: 4px;
}
.contact-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid rgba(43, 37, 33, 0.14);
  border-radius: 8px;
  background: #FAF7F2;
  color: #2B2521;
  font-family: inherit;
  font-size: 0.9rem;
  margin-bottom: 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.contact-input:focus {
  outline: none;
  border-color: #B07D3C;
  box-shadow: 0 0 0 3px rgba(176, 125, 60, 0.18);
}
textarea.contact-input {
  resize: vertical;
  min-height: 70px;
}
.contact-btn {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 8px;
  background: #B0512E;
  color: #FFF7F2;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}
.contact-btn:hover:not(:disabled) {
  background: #C4643D;
}
.contact-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.contact-msg {
  font-size: 12px;
  color: #6E645B;
  margin-top: 10px;
  text-align: center;
}
.contact-msg.error {
  color: #8C2F1A;
}

/* ========================================================================
   15. PEU I AVÍS DE MÒBIL
   ======================================================================== */

.privacy-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 11px;
  color: #aaa;
  background: rgba(255, 255, 255, 0.92);
  padding: 5px 10px;
  border-top: 1px solid #eee;
  z-index: 500;
  pointer-events: none;
  /* que no bloquegi clics al que hi ha a sota */;
}
.mobile-warning {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  height: 100dvh;
  z-index: 2000;
  /* per sobre de tot, inclòs el gatekeeper */ align-items: center;
  justify-content: center;
  padding: 20px;
}
.mobile-warning.show {
  display: flex;
}
.mobile-warning-card {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  width: 100%;
  max-width: 340px;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}
.mobile-warning-card h3 {
  margin-top: 0;
  font-size: 1.1rem;
}
.mobile-warning-card p {
  font-size: 0.9rem;
  color: #555;
  line-height: 1.5;
}
.mobile-warning-card button {
  margin-top: 12px;
  border: none;
  background: #7c6fd0;
  color: #fff;
  border-radius: 8px;
  padding: 8px 18px;
  cursor: pointer;
  font-size: 0.9rem;
}

/* ========================================================================
   16. REGLES SENSE ÚS
   Cap d'aquests selectors apareix a index.html ni a app.js (comprovat
   creuant els tres fitxers). Es conserven per si es recuperen; si al cap
   d'un temps segueixen aquí, es poden esborrar sense por.
   
   .gatekeeper-request-panel  el panell de sol·licitud ja no s'apila: ara
                              són dues vistes excloents (#viewCode/#viewRequest)
   .gatekeeper-btn-secondary  botó 'Cancel·lar' que es va retirar
   .gatekeeper-microcopy      variant de text que finalment no es va aplicar
   .gatekeeper-title          mai s'ha fet servir cap títol a la targeta
   .fb-btn / .fb-label        versió antiga de la barra de valoració,
                              substituïda per .fb-toggle + .fb-panel
   .split-badge               badge de llista partida, no implementat
   
   ATENCIÓ: .gatekeeper-btn-secondary usa var(--btn-secondary-bg) i
   var(--paper), que NO estan definides en aquest full — venien de la
   landing. Si es recupera, cal definir-les o posar-hi colors literals.
   ======================================================================== */

.gatekeeper-title {
  margin: 0 0 0.5rem 0;
  font-size: 1.4rem;
  font-weight: 600;
  color: #ffffff;
}
.gatekeeper-request-panel {
  display: none;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(241, 233, 216, 0.14);
  text-align: left;
}
.gatekeeper-request-panel.open {
  display: block;
}
.gatekeeper-btn-secondary {
  flex: 1;
  background: var(--btn-secondary-bg);
  border: 1px solid var(--btn-secondary-border);
  color: var(--paper);
  padding: 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}
.gatekeeper-microcopy {
  font-size: 12px;
  color: #888;
  margin: 10px 0 0;
  line-height: 1.5;
}
.split-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  background: #fff8e1;
  color: #b45309;
  border: 0.5px solid #fcd34d;
  border-radius: 3px;
  padding: 1px 5px;
  margin-top: 3px;
}
.fb-label {
  font-size: 12px;
  color: #888;
}
.fb-btn {
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 6px;
  padding: 3px 10px;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  opacity: 0.6;
  transition: opacity 0.15s, background 0.15s;
}
.fb-btn:hover {
  opacity: 1;
  background: #f5f4f0;
}
.fb-btn.selected {
  opacity: 1;
  background: #e8e4f5;
  border-color: #7c6fd0;
}
.feedback-bar.done .fb-btn:not(.selected) {
  opacity: 0.3;
  pointer-events: none;
}