/* Đ Café Hub · Encuesta de servicio (/encuesta/). Basada en el diseño Encuesta_D_cafe (claro y oscuro). */
:root {
  --bg: #efefef; --ink: #202121; --mute: #5d6066; --line: #a1a1a1; --card: #ffffff;
  --gold: #d7a35c; --sel-bg: #202121; --sel-fg: #efefef; --err: #c8323f;
  --btn-bg: #202121; --btn-fg: #efefef; --hover: #e74859;
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #202121; --ink: #efefef; --mute: #a3a6ab; --line: #8d8f93; --card: #2a2b2b;
  --sel-bg: #efefef; --sel-fg: #202121; --err: #ff7a85;
  --btn-bg: #efefef; --btn-fg: #202121;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #202121; --ink: #efefef; --mute: #a3a6ab; --line: #8d8f93; --card: #2a2b2b;
    --sel-bg: #efefef; --sel-fg: #202121; --err: #ff7a85;
    --btn-bg: #efefef; --btn-fg: #202121;
    color-scheme: dark;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.45 'Archivo', system-ui, sans-serif; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
h1, h2, p { margin: 0; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

.enc { width: 100%; max-width: 620px; margin: 0 auto; padding: max(32px, env(safe-area-inset-top)) max(clamp(24px, 7vw, 32px), env(safe-area-inset-right)) max(32px, env(safe-area-inset-bottom)) max(clamp(24px, 7vw, 32px), env(safe-area-inset-left)); }

/* Encabezado: sello, estrellas y título */
.enc__top { text-align: center; margin-bottom: 28px; }
.enc__logo { display: inline-block; color: var(--ink); border-radius: 50%; }
.enc__sello { display: block; width: 112px; height: auto; }
.enc__stars { margin-top: 14px; color: var(--gold); font-size: 22px; letter-spacing: 8px; padding-left: 8px; line-height: 1; }
.enc__top h1 { margin-top: 22px; font-size: clamp(24px, 6vw, 30px); font-weight: 700; letter-spacing: -.01em; line-height: 1.15; }
.enc__lead { margin-top: 8px; color: var(--mute); font-size: 15px; }

.enc__scale { display: flex; justify-content: space-between; font-size: 13px; color: var(--mute); padding: 0 2px 4px; border-bottom: 1px solid color-mix(in srgb, var(--line) 50%, transparent); margin-bottom: 4px; }

/* Preguntas */
.q { border: 0; margin: 0; padding: 22px 0; min-width: 0; border-bottom: 1px solid color-mix(in srgb, var(--line) 35%, transparent); scroll-margin-top: 24px; }
.q legend, .q label { padding: 0; font-size: 16px; line-height: 1.4; }
.q legend b, .q label b { font-weight: 600; }
.q label span { color: var(--mute); }
.q__opts { display: flex; justify-content: space-between; gap: 8px; margin-top: 10px; max-width: 420px; }
.q__opts input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.q__opt { display: grid; place-items: center; width: 52px; height: 52px; border: 1.5px solid var(--ink); border-radius: 50%; font-size: 18px; font-weight: 500; user-select: none; -webkit-user-select: none; transition: background-color 160ms var(--ease), color 160ms var(--ease), transform 160ms var(--ease); }
.q__opt:active { transform: scale(0.94); }
.q__opts input:checked + .q__opt { background: var(--sel-bg); color: var(--sel-fg); border-color: var(--sel-bg); }
.q__opts input:focus-visible + .q__opt { outline: 3px solid var(--ink); outline-offset: 3px; }
.q__ends { display: flex; justify-content: space-between; max-width: 420px; margin-top: 8px; font-size: 12px; color: var(--mute); }
/* Sí / No */
.q[data-tipo="si-no"] .q__opts { justify-content: flex-start; gap: 12px; }
.q[data-tipo="si-no"] .q__opt { width: 104px; border-radius: 999px; font-size: 16px; }
/* Falta responder */
.q.is-miss legend { color: var(--err); }
.q.is-miss .q__opt { border-color: var(--err); }

.q--txt { display: block; }
.q--txt textarea { display: block; width: 100%; margin-top: 12px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--card); font-size: 16px; resize: vertical; min-height: 88px; }
.q--txt textarea:focus { border-color: var(--ink); outline: none; }
.q__count { margin-top: 6px; text-align: right; font-size: 12px; color: var(--mute); font-variant-numeric: tabular-nums; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.enc__err { margin-top: 20px; color: var(--err); font-weight: 600; font-size: 15px; }
.enc__send, .enc__back { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 54px; margin-top: 24px; border: 1px solid var(--btn-bg); border-radius: 10px; background: var(--btn-bg); color: var(--btn-fg); font-size: 16px; font-weight: 600; text-decoration: none; transition: background-color 160ms var(--ease), border-color 160ms var(--ease), transform 160ms var(--ease); }
.enc__send:active, .enc__back:active { transform: scale(0.97); }
.enc__send[aria-busy="true"] { opacity: .6; cursor: progress; }
@media (hover: hover) and (pointer: fine) {
  .q__opt:hover { border-color: var(--hover); }
  .enc__send:hover, .enc__back:hover { background: var(--hover); border-color: var(--hover); color: #fff; }
}

/* Gracias */
.enc__done { text-align: center; padding: 8px 0 12px; }
.enc__done:focus { outline: none; }
.enc__done h2 { font-size: 24px; font-weight: 700; }
.enc__done p { margin-top: 10px; color: var(--mute); }
.enc__done .enc__back { max-width: 320px; margin-left: auto; margin-right: auto; }

.enc__legal { margin-top: 36px; text-align: center; font-size: 12px; color: var(--mute); }

@media (max-width: 379px) { .q__opt { width: 46px; height: 46px; font-size: 17px; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
