/* Emglare Developer DNA – design podle předlohy, barvy emglare (#F08C10 / černá) */

:root {
  --orange: #F08C10;
  --orange-soft: #FDF3E3;
  --orange-border: #F5B45C;
  --ink: #111111;
  --gray: #6b6b6b;
  --card: #ffffff;
  --radius: 14px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: linear-gradient(135deg, #fdf6ec 0%, #f7ede0 35%, #eef0f6 70%, #f9f4ea 100%);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  padding: 24px 12px;
  -webkit-font-smoothing: antialiased;
}

/* dekorativní kruhy v pozadí jako na předloze */
.bg-deco {
  position: fixed; border-radius: 50%; pointer-events: none; z-index: 0;
  border: 2px solid rgba(240, 140, 16, .12);
}
.bg-deco-1 { width: 340px; height: 340px; top: -120px; left: -100px;
  box-shadow: 0 0 0 30px rgba(240,140,16,.05), 0 0 0 60px rgba(240,140,16,.03); }
.bg-deco-2 { width: 260px; height: 260px; bottom: -80px; right: -60px;
  background: radial-gradient(circle, rgba(240,140,16,.10), transparent 70%); border-color: transparent; }

/* "telefon" – karta kvízu */
.phone {
  position: relative; z-index: 1;
  width: 100%; max-width: 430px;
  background: linear-gradient(180deg, #ffffff 0%, #fdfaf5 100%);
  border-radius: 28px;
  box-shadow: 0 24px 60px rgba(20, 10, 0, .16), 0 2px 8px rgba(20, 10, 0, .06);
  padding: 22px 22px 26px;
  min-height: 620px;
  display: flex; flex-direction: column;
}

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 14px; border-bottom: 2px solid var(--orange);
  margin-bottom: 18px;
}
.logo { height: 26px; }
.timer { font-size: 13px; color: var(--gray); font-variant-numeric: tabular-nums; }

.screen { display: flex; flex-direction: column; flex: 1; }

.q-progress {
  color: var(--orange); font-size: 13px; font-weight: 600; margin-bottom: 10px;
}
.q-countdown { color: var(--gray); font-weight: 600; }
.q-countdown.urgent { color: #c0392b; }

.q-text {
  font-size: 21px; font-weight: 700; line-height: 1.35; margin-bottom: 22px;
  white-space: pre-line;
}

.options { display: flex; flex-direction: column; gap: 12px; }

.opt {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; text-align: left;
  padding: 15px 16px;
  background: #fff;
  border: 1.5px solid #e4e0d8;
  border-radius: var(--radius);
  font-size: 15.5px; font-weight: 500; color: var(--ink);
  cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s;
  font-family: inherit; line-height: 1.35;
}
.opt:hover { border-color: var(--orange-border); }
.opt .check {
  flex: none; width: 22px; height: 22px; border-radius: 50%;
  border: 1.5px solid #d9d4ca; position: relative;
  transition: all .15s;
}
.opt.selected {
  background: var(--orange-soft);
  border-color: var(--orange);
  box-shadow: 0 4px 14px rgba(240, 140, 16, .18);
}
.opt.selected .check { background: var(--orange); border-color: var(--orange); }
.opt.selected .check::after {
  content: ""; position: absolute; left: 7px; top: 3.5px;
  width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

textarea.open-answer {
  width: 100%; min-height: 170px; resize: vertical;
  padding: 14px 16px; font: inherit; font-size: 15.5px; line-height: 1.5;
  border: 1.5px solid #e4e0d8; border-radius: var(--radius);
  background: #fff; color: var(--ink); outline: none;
}
textarea.open-answer:focus { border-color: var(--orange); box-shadow: 0 4px 14px rgba(240,140,16,.14); }
.char-count { text-align: right; color: var(--gray); font-size: 12.5px; margin-top: 6px; }

.btn-next {
  margin-top: auto;
  width: 100%; padding: 16px;
  background: var(--ink); color: #fff;
  border: none; border-radius: var(--radius);
  font-size: 16px; font-weight: 600; font-family: inherit;
  cursor: pointer;
  transition: opacity .15s, transform .1s;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-next:disabled { opacity: .35; cursor: default; }
.btn-next:not(:disabled):active { transform: scale(.985); }
.btn-next .arrow { font-size: 18px; line-height: 1; }

/* úvodní obrazovka */
.intro h1 { font-size: 26px; font-weight: 800; margin-bottom: 8px; }
.intro h1 .accent { color: var(--orange); }
.intro .sub { color: var(--gray); font-size: 15px; line-height: 1.55; margin-bottom: 22px; }
.intro .hint {
  background: var(--orange-soft); border-radius: var(--radius);
  padding: 13px 15px; font-size: 13.5px; color: #7a5313; line-height: 1.5; margin-bottom: 22px;
}
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: #444; }
.field input {
  width: 100%; padding: 13px 15px; font: inherit; font-size: 15.5px;
  border: 1.5px solid #e4e0d8; border-radius: var(--radius); background: #fff; outline: none;
}
.field input:focus { border-color: var(--orange); }
.err { color: #c0392b; font-size: 13.5px; margin-top: 10px; min-height: 18px; }

/* poděkování / zamítnutí */
.center-msg { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 12px; }
.center-msg .big { font-size: 52px; }
.center-msg h2 { font-size: 23px; font-weight: 800; }
.center-msg p { color: var(--gray); font-size: 15px; line-height: 1.55; max-width: 300px; }

@media (max-width: 480px) {
  body { padding: 0; align-items: stretch; }
  .phone { max-width: none; border-radius: 0; min-height: 100dvh; padding-top: max(22px, env(safe-area-inset-top)); }
  .bg-deco { display: none; }
}
