/* Board #385: Interessenten-Seite — CI (Zenitblau 2019 / sanoniq.at):
   Prompt Light/Regular/Medium, Türkis #1590BB, Textgrau #706F6F,
   Anthrazit #393E42. Mobile-first (iPhone), auf dem iPad zentrierte Spalte. */
@font-face { font-family: "Prompt"; font-weight: 300; font-style: normal; font-display: swap; src: url("../fonts/Prompt-Light.woff2") format("woff2"); }
@font-face { font-family: "Prompt"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/Prompt-Regular.woff2") format("woff2"); }
@font-face { font-family: "Prompt"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/Prompt-Medium.woff2") format("woff2"); }

:root {
  --sq-blue: #1590bb;
  --sq-blue-dark: #0f6f92;
  --sq-blue-soft: #e8f4fa;
  --sq-ink: #393e42;
  --sq-muted: #706f6f;
  --sq-line: #dde3e8;
  --sq-line-soft: #eef2f5;
  --sq-bg: #f7f8f9;
  --sq-white: #ffffff;
  --sq-danger: #c8452c;
  --sq-ok: #2d9a5b;
  --sq-radius: 14px;
  --sq-radius-sm: 12px;
  --sq-shadow: 0 2px 10px rgba(0, 32, 91, 0.06);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--sq-bg);
  color: var(--sq-ink);
  font-family: "Prompt", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 300;
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--sq-blue); }
a:hover { color: var(--sq-blue-dark); }
button { font: inherit; color: inherit; }
b { font-weight: 400; }
em { font-style: normal; color: var(--sq-blue); }
[hidden] { display: none !important; }

.sq-app {
  max-width: 560px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh; /* sichtbarer Bereich inkl. ein-/ausblendender Browserleiste */
  display: flex;
  flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom);
}
.sq-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(18px + env(safe-area-inset-top)) 20px 12px 20px;
}
.sq-back {
  width: 44px; height: 44px; margin-left: -11px;
  border: 0; background: transparent; border-radius: 22px;
  display: flex; align-items: center; justify-content: center;
  color: var(--sq-ink); cursor: pointer;
}
.sq-back:active { background: var(--sq-line-soft); }
.sq-logo { height: 36px; width: auto; }
.sq-stepno { margin-left: auto; font-size: 12px; color: var(--sq-muted); }
.sq-progress { display: flex; gap: 6px; padding: 0 20px 22px 20px; }
.sq-progress i { flex: 1 1 0; height: 4px; border-radius: 2px; background: var(--sq-line); transition: background .25s; }
.sq-progress i.on { background: var(--sq-blue); }

.sq-main { flex: 1 1 auto; display: flex; flex-direction: column; }
.sq-step { display: flex; flex-direction: column; gap: 14px; padding: 0 20px 20px 20px; flex: 1 1 auto; position: relative; }
.sq-intro { display: flex; flex-direction: column; gap: 6px; padding-bottom: 6px; }
.sq-eyebrow { font-size: 13px; color: var(--sq-blue); text-transform: uppercase; letter-spacing: 1px; font-weight: 400; }
.sq-h1 { margin: 0; font-size: 26px; font-weight: 400; line-height: 1.2; }
.sq-sub { font-size: 14px; color: var(--sq-muted); }

.sq-card {
  background: var(--sq-white);
  border-radius: var(--sq-radius);
  padding: 20px;
  box-shadow: var(--sq-shadow);
  display: flex; flex-direction: column; gap: 14px;
}
.sq-card-head { display: flex; align-items: center; justify-content: space-between; }
.sq-q { font-size: 18px; font-weight: 400; }
.sq-q-sm { font-size: 15px; font-weight: 400; }
.sq-hint { font-size: 13px; color: var(--sq-muted); }
.sq-note-card {
  display: block;
  padding: 14px 16px; background: var(--sq-white);
  border-radius: var(--sq-radius); border: 1px dashed #c7d3db;
  font-size: 13px; color: var(--sq-muted); line-height: 1.4;
}
.sq-note-card b { color: var(--sq-ink); }
.sq-note-card svg { flex: 0 0 auto; color: var(--sq-blue); }

/* Tage */
.sq-days { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 2px; -webkit-overflow-scrolling: touch; }
.sq-day {
  flex: 1 1 0; min-width: 84px; height: 64px;
  border-radius: var(--sq-radius-sm); border: 1px solid var(--sq-line); background: var(--sq-white);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  cursor: pointer; padding: 0 6px;
}
.sq-day-wd { font-size: 12px; color: var(--sq-muted); white-space: nowrap; }
.sq-day-d { font-size: 18px; font-weight: 400; }
.sq-day.on { border: 2px solid var(--sq-blue); background: var(--sq-blue-soft); }
.sq-day.on .sq-day-wd { color: var(--sq-blue); font-weight: 400; }
.sq-days-sm .sq-day { height: 56px; min-width: 76px; }
.sq-timerow {
  display: flex; align-items: center; justify-content: space-between;
  height: 56px; border-radius: var(--sq-radius-sm); border: 1px solid var(--sq-line);
  padding: 0 16px; background: var(--sq-white);
}
.sq-label-inline { font-size: 14px; color: var(--sq-muted); }
.sq-time { display: flex; align-items: center; gap: 8px; }
.sq-time-input {
  border: 0; background: transparent; font: inherit; font-size: 22px; font-weight: 400;
  color: var(--sq-ink); padding: 0; text-align: right; min-width: 96px;
}
.sq-time-input:focus { outline: none; }
.sq-now { border: 0; background: transparent; color: var(--sq-blue); font-size: 12px; padding: 8px 0 8px 6px; cursor: pointer; }

/* Felder */
.sq-row { display: flex; gap: 10px; }
.sq-row .sq-field { flex: 1 1 0; min-width: 0; }
.sq-field { display: flex; flex-direction: column; gap: 6px; }
.sq-label { font-size: 13px; color: var(--sq-muted); }
.sq-field input, .sq-own input, textarea {
  width: 100%; height: 48px; border-radius: var(--sq-radius-sm); border: 1px solid var(--sq-line);
  padding: 0 14px; font: inherit; font-size: 16px; color: var(--sq-ink); background: var(--sq-white);
  -webkit-appearance: none; appearance: none;
}
textarea { height: auto; min-height: 84px; padding: 12px 14px; resize: vertical; line-height: 1.45; }
.sq-field input:focus, .sq-own input:focus, textarea:focus { outline: none; border: 2px solid var(--sq-blue); padding: 0 13px; }
textarea:focus { padding: 11px 13px; }
.sq-field.error input { border: 2px solid var(--sq-danger); padding: 0 13px; }
.sq-field .sq-error { font-size: 12px; color: var(--sq-danger); }
.sq-hp { position: absolute; left: -9999px; top: -9999px; height: 0; overflow: hidden; }

/* Chips und Pills */
.sq-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.sq-chip, .sq-pill {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--sq-line); background: var(--sq-white); color: var(--sq-ink);
  cursor: pointer; user-select: none; -webkit-user-select: none;
}
.sq-chip { height: 44px; border-radius: 22px; padding: 0 16px; font-size: 14px; }
.sq-pill { height: 40px; border-radius: 20px; padding: 0 14px; font-size: 14px; }
.sq-chip input, .sq-pill input { position: absolute; opacity: 0; width: 0; height: 0; }
.sq-chip.on, .sq-pill.on { border: 2px solid var(--sq-blue); background: var(--sq-blue-soft); }
.sq-pills { display: flex; flex-wrap: wrap; gap: 8px; }

/* Themen */
.sq-topics { display: flex; flex-direction: column; gap: 12px; }
.sq-topic {
  background: var(--sq-white); border-radius: var(--sq-radius); border: 1px solid var(--sq-line);
  display: flex; flex-direction: column; overflow: hidden;
}
.sq-topic.on { border: 2px solid var(--sq-blue); box-shadow: 0 2px 10px rgba(21, 144, 187, 0.12); }
.sq-topic-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; border: 0; background: transparent; padding: 16px; text-align: left; cursor: pointer;
}
.sq-topic-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sq-topic-name { font-size: 17px; font-weight: 400; }
.sq-topic-sub { font-size: 13px; color: var(--sq-muted); }
.sq-check {
  flex: 0 0 auto; width: 28px; height: 28px; border-radius: 14px; border: 2px solid var(--sq-line);
  display: flex; align-items: center; justify-content: center; color: transparent;
}
.sq-topic.on .sq-check { background: var(--sq-blue); border-color: var(--sq-blue); color: var(--sq-white); }
.sq-topic-body { display: none; flex-direction: column; gap: 10px; padding: 0 16px 16px 16px; }
.sq-topic.on .sq-topic-body { display: flex; }
.sq-own {
  background: var(--sq-white); border-radius: var(--sq-radius); border: 1px dashed #9fb8c6;
  padding: 16px; display: flex; flex-direction: column; gap: 10px;
}

/* Unterschrift */
.sq-sig { position: relative; height: 130px; border-radius: var(--sq-radius-sm); border: 1px dashed #9fb8c6; background: #fbfcfd; overflow: hidden; touch-action: none; }
.sq-sig canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.sq-sig-line { position: absolute; left: 16px; right: 16px; bottom: 22px; height: 1px; background: var(--sq-line); pointer-events: none; }
.sq-sig-hint { position: absolute; left: 0; right: 0; bottom: 4px; text-align: center; font-size: 12px; color: #9fb8c6; pointer-events: none; }
.sq-link { border: 0; background: transparent; color: var(--sq-blue); font-size: 13px; font-weight: 500; padding: 8px; cursor: pointer; }

/* Foto / Video */
.sq-media { display: flex; gap: 10px; }
.sq-media-btn {
  flex: 1 1 0; min-height: 84px; border-radius: var(--sq-radius-sm); border: 1px solid var(--sq-line);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 10px; text-align: center; font-size: 13px; color: var(--sq-ink); cursor: pointer; position: relative;
}
.sq-media-btn svg { color: var(--sq-blue); }
.sq-media-btn input { position: absolute; opacity: 0; width: 0; height: 0; }
.sq-media-list { display: flex; flex-direction: column; gap: 8px; }
.sq-media-list:empty { display: none; }
.sq-media-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--sq-radius-sm); background: var(--sq-blue-soft); font-size: 13px; }
.sq-media-item img, .sq-media-item video { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; background: #dde3e8; }
.sq-media-item .sq-media-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Schalter und Häkchen */
.sq-switch { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.sq-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.sq-switch-ui { flex: 0 0 auto; width: 48px; height: 28px; border-radius: 14px; background: var(--sq-line); position: relative; transition: background .2s; }
.sq-switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 11px; background: var(--sq-white); box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: left .2s; }
.sq-switch input:checked + .sq-switch-ui { background: var(--sq-blue); }
.sq-switch input:checked + .sq-switch-ui::after { left: 23px; }
.sq-switch-text { display: flex; flex-direction: column; gap: 2px; }
.sq-switch-text small { font-size: 12px; color: var(--sq-muted); }
.sq-proposal { display: flex; flex-direction: column; gap: 10px; padding-top: 4px; }
.sq-checkrow { display: flex; align-items: flex-start; gap: 12px; font-size: 14px; line-height: 1.4; cursor: pointer; }
.sq-checkrow input { position: absolute; opacity: 0; width: 0; height: 0; }
.sq-box { flex: 0 0 auto; width: 24px; height: 24px; border-radius: 7px; border: 2px solid var(--sq-line); background: var(--sq-white); margin-top: 1px; position: relative; }
.sq-checkrow input:checked + .sq-box { background: var(--sq-blue); border-color: var(--sq-blue); }
.sq-checkrow input:checked + .sq-box::after { content: ""; position: absolute; left: 7px; top: 3px; width: 6px; height: 11px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.sq-checkrow.error .sq-box { border-color: var(--sq-danger); }

/* Fuß und Aktion */
.sq-foot { margin-top: auto; padding-top: 6px; display: flex; flex-direction: column; gap: 10px; }
.sq-cta {
  width: 100%; height: 52px; border-radius: var(--sq-radius-sm); border: 0;
  background: var(--sq-blue); color: var(--sq-white); font-size: 17px; font-weight: 500;
  display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer;
}
.sq-cta:active { background: var(--sq-blue-dark); }
.sq-cta[disabled] { opacity: .6; cursor: default; }
.sq-cta-outline { background: var(--sq-white); color: var(--sq-blue); border: 2px solid var(--sq-blue); }
.sq-cta-outline.on { background: var(--sq-blue-soft); }
.sq-foot-note { text-align: center; font-size: 12px; color: var(--sq-muted); }

/* Danke-Seite */
.sq-thanks .sq-h1 { font-size: 30px; }
.sq-confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 5; }
.sq-summary-row { display: flex; gap: 12px; font-size: 14px; padding: 6px 0; border-bottom: 1px solid var(--sq-line-soft); }
.sq-summary-row:last-child { border-bottom: 0; }
.sq-summary-row b { flex: 0 0 110px; color: var(--sq-muted); font-weight: 300; }
.sq-reset-note { text-align: center; font-size: 12px; color: var(--sq-muted); font-variant-numeric: tabular-nums; }

/* Rückmeldungen */
.sq-toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  max-width: 90vw; background: var(--sq-ink); color: var(--sq-white); padding: 12px 18px; border-radius: 12px;
  font-size: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.2); z-index: 20;
}
.sq-toast.error { background: var(--sq-danger); }
.sq-toast.ok { background: var(--sq-ok); }
.sq-offline { position: sticky; top: 0; z-index: 10; background: #fff4d6; color: #6b4d00; font-size: 13px; padding: 10px 20px; text-align: center; }

/* Willkommensseite (User-Feedback 08.09.) — muss auf dem Handy OHNE Scrollen
   passen: kompakt, Ansprechpartner in der Karte, Knopf am unteren Rand des
   sichtbaren Bereichs (dynamische Viewport-Höhe, s. .sq-app). */
.sq-hero { display: flex; flex-direction: column; gap: 6px; padding: 2px 0 8px 0; }
.sq-h1-hero { font-size: 26px; }
.sq-card-invite { gap: 10px; padding: 16px 18px; border-top: 4px solid var(--sq-blue); }
.sq-card-invite .sq-q { font-size: 17px; }
.sq-invite-text { font-size: 14px; line-height: 1.45; }
.sq-invite-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--sq-muted); }
.sq-invite-list li { display: flex; gap: 10px; align-items: flex-start; line-height: 1.4; }
.sq-invite-dot { flex: 0 0 auto; width: 9px; height: 9px; border-radius: 5px; background: var(--sq-blue); margin-top: 5px; }
.sq-invite-contact { font-size: 13px; color: var(--sq-muted); padding-top: 8px; border-top: 1px solid var(--sq-line-soft); }
.sq-welcome .sq-foot .sq-cta { height: 56px; font-size: 18px; }
@media (max-height: 720px) {
  .sq-invite-list { display: none; }
  .sq-welcome .sq-foot-note { display: none; }
}

/* Anmerkung je Thema */
.sq-topic-note { width: 100%; height: 44px; border-radius: var(--sq-radius-sm); border: 1px solid var(--sq-line); padding: 0 12px; font: inherit; font-size: 15px; color: var(--sq-ink); background: var(--sq-white); -webkit-appearance: none; appearance: none; }
.sq-topic-note:focus { outline: none; border: 2px solid var(--sq-blue); padding: 0 11px; }

/* Fehler an Tag, Uhrzeit und Terminvorschlag (Felder: s. .sq-field.error) */
.sq-error { font-size: 12px; color: var(--sq-danger); }
.sq-card.error, .sq-timerow.error { border: 2px solid var(--sq-danger); }
.sq-proposal.error .sq-day { border-color: var(--sq-danger); }
.sq-summary-row span { flex: 1 1 auto; min-width: 0; }
.sq-summary-row small { color: var(--sq-muted); }

/* Videoaufnahme in der Seite (Overlay, stoppt automatisch am Zeitlimit) */
.sq-noscroll { overflow: hidden; }
.sq-rec {
  position: fixed; inset: 0; z-index: 30; background: #0f1418; color: #fff;
  display: flex; flex-direction: column;
  padding: calc(12px + env(safe-area-inset-top)) 16px calc(16px + env(safe-area-inset-bottom)) 16px;
}
.sq-rec-top { display: flex; align-items: center; justify-content: space-between; font-size: 15px; font-variant-numeric: tabular-nums; }
.sq-rec-close { width: 44px; height: 44px; border: 0; border-radius: 22px; background: rgba(255,255,255,.12); color: #fff; font-size: 18px; cursor: pointer; }
.sq-rec-stage { flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; margin: 12px 0; border-radius: var(--sq-radius); overflow: hidden; background: #000; }
.sq-rec-stage video { width: 100%; height: 100%; object-fit: cover; }
#sq-rec-preview { transform: scaleX(-1); }
.sq-rec-bar { height: 4px; border-radius: 2px; background: rgba(255,255,255,.18); overflow: hidden; }
.sq-rec-bar i { display: block; height: 100%; width: 0; background: var(--sq-blue); transition: width .25s linear; }
.sq-rec-hint { text-align: center; font-size: 13px; color: rgba(255,255,255,.75); padding: 12px 0; }
.sq-rec-actions { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 76px; }
.sq-rec-btn { width: 76px; height: 76px; border-radius: 38px; border: 4px solid #fff; background: transparent; display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.sq-rec-btn i { width: 60px; height: 60px; border-radius: 30px; background: #e0342b; transition: all .2s; }
.sq-rec-btn.on i { width: 30px; height: 30px; border-radius: 6px; }
.sq-rec-actions .sq-cta { width: auto; min-width: 140px; padding: 0 20px; }
.sq-rec-retry { background: transparent; color: #fff; border-color: #fff; }

/* Handy (User 08.09.: Android stellt alles zu groß dar) — kompakter Satz,
   Eingabefelder bleiben 16 px (sonst zoomt iOS beim Tippen). */
@media (max-width: 430px) {
  body { font-size: 14px; }
  .sq-head { padding: calc(12px + env(safe-area-inset-top)) 16px 8px 16px; }
  .sq-logo { height: 30px; }
  .sq-progress { padding: 0 16px 14px 16px; }
  .sq-step { padding: 0 16px 16px 16px; gap: 12px; }
  .sq-h1 { font-size: 23px; }
  .sq-h1-hero { font-size: 24px; }
  .sq-sub { font-size: 13px; }
  .sq-card { padding: 16px; gap: 12px; }
  .sq-q { font-size: 16px; }
  .sq-topic-name { font-size: 16px; }
  .sq-topic-head { padding: 14px; }
  .sq-topic-body { padding: 0 14px 14px 14px; }
  .sq-chip { height: 40px; padding: 0 14px; font-size: 13px; }
  .sq-pill { height: 36px; padding: 0 12px; font-size: 13px; }
  .sq-day { height: 56px; min-width: 76px; }
  .sq-cta { height: 50px; font-size: 16px; }
  .sq-foot-note { font-size: 11px; }
}

@media (min-width: 700px) {
  .sq-app { padding-top: 16px; }
  .sq-h1 { font-size: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  .sq-confetti { display: none; }
}
