/* TrueMelodies funnel — shared styles for /, /waiting.
   Brand tokens match the preview/paid pages (web/design/*.dc.html). */
:root {
  --plum: #3A2230;
  --rose: #D9526F;
  --rose-dark: #B23A57;
  --blush: #FDF4F4;
  --blush-2: #F7E6E9;
  --line: #F0DDE2;
  --line-strong: #E3C6CE;
  --body: #5C4452;
  --muted: #8A6E7C;
  --green: #3E9B63;
  --green-soft: #E2F2E8;
  --track: #EEDFE3;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--plum);
  background: var(--blush);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
button { font-family: inherit; }
.tm-wrap { width: 100%; max-width: 900px; margin: 0 auto; padding: 0 20px; }
main.tm-main { flex: 1 0 auto; padding-bottom: 56px; }

/* ------------------------------------------------------------------ header */
.tm-head { display: flex; align-items: center; justify-content: space-between; padding: 26px 0 22px; min-height: 84px; }
.tm-back {
  display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; padding: 6px 0;
  color: var(--body); font-size: 15px; cursor: pointer; text-decoration: none;
}
.tm-back:hover { color: var(--plum); }
.tm-back svg { width: 18px; height: 18px; }
.tm-back[hidden] { visibility: hidden; display: inline-flex; }
.tm-logo { display: block; height: 34px; width: auto; }
.tm-head.center { justify-content: center; }

/* ------------------------------------------------------------------ progress (quiz) */
.tm-prog-row { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-bottom: 9px; }
.tm-prog-row b { color: var(--rose); font-weight: 600; }
.tm-track { height: 8px; border-radius: 999px; background: var(--track); overflow: hidden; }
.tm-fill { height: 100%; width: 0; border-radius: 999px; background: var(--rose); transition: width .55s cubic-bezier(.2,.7,.2,1); }

/* ------------------------------------------------------------------ step */
.tm-step { text-align: center; padding: 38px 0 0; animation: tmIn .32s ease both; }
@keyframes tmIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.tm-h1 {
  font-family: var(--serif); font-weight: 600; color: var(--plum);
  font-size: clamp(28px, 4.6vw, 40px); line-height: 1.15; letter-spacing: -.01em; margin: 0 0 10px;
}
.tm-sub { color: var(--muted); font-size: 15px; margin: 0 auto 30px; max-width: 520px; }
.tm-label { font-family: var(--serif); font-weight: 600; font-size: 20px; margin: 30px 0 14px; color: var(--plum); }

.tm-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; max-width: 860px; margin: 0 auto; }
.tm-chip {
  background: #fff; border: 1.5px solid var(--line); color: var(--plum);
  border-radius: 999px; padding: 12px 22px; font-size: 15px; font-weight: 600; cursor: pointer;
  transition: border-color .15s, background .15s, color .15s, transform .1s, box-shadow .15s;
  box-shadow: 0 1px 2px rgba(58,34,48,.04);
}
.tm-chip:hover { border-color: var(--rose); }
.tm-chip:active { transform: scale(.97); }
.tm-chip.on { background: var(--rose); border-color: var(--rose); color: #fff; box-shadow: 0 6px 16px rgba(217,82,111,.28); }

.tm-field { max-width: 520px; margin: 0 auto; text-align: left; }
.tm-input, .tm-textarea {
  width: 100%; font: inherit; font-size: 17px; color: var(--plum); background: #fff;
  border: 1.5px solid var(--line); border-radius: 14px; padding: 15px 18px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.tm-textarea { min-height: 150px; resize: vertical; line-height: 1.55; }
.tm-input:focus, .tm-textarea:focus { border-color: var(--rose); box-shadow: 0 0 0 4px rgba(217,82,111,.12); }
.tm-input::placeholder, .tm-textarea::placeholder { color: #B9A2AD; }
.tm-help { font-size: 13px; color: var(--muted); margin-top: 8px; }
.tm-err { color: var(--rose-dark); font-size: 14px; font-weight: 600; margin-top: 10px; min-height: 20px; }

/* ------------------------------------------------------------------ actions */
.tm-actions { display: flex; justify-content: center; align-items: center; gap: 18px; margin-top: 64px; }
.tm-actions.center { justify-content: center; }
.tm-next {
  display: inline-flex; align-items: center; gap: 10px; border: 0; border-radius: 999px;
  background: var(--rose); color: #fff; font-size: 16px; font-weight: 700; padding: 17px 32px; cursor: pointer;
  box-shadow: 0 10px 24px rgba(217,82,111,.3); transition: background .15s, transform .1s, box-shadow .15s;
}
.tm-next:hover { background: var(--rose-dark); }
.tm-next:active { transform: scale(.98); }
.tm-next:disabled { background: #D8CCD1; color: #7F6B75; box-shadow: none; cursor: not-allowed; }
.tm-next svg { width: 18px; height: 18px; }
.tm-skip { background: none; border: 0; color: var(--muted); font-size: 15px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.tm-skip:hover { color: var(--plum); }
.tm-reassure { text-align: center; font-size: 13px; color: var(--muted); margin-top: 18px; }

/* ------------------------------------------------------------------ footer */
.tm-foot { flex-shrink: 0; background: var(--plum); color: #D9C3CC; padding: 34px 0 30px; font-size: 14px; }
.tm-foot .tm-wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 30px; }
.tm-foot img { height: 30px; width: auto; display: block; }
.tm-foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.tm-foot a { color: #F1DDE4; text-decoration: none; }
.tm-foot a:hover { text-decoration: underline; }
.tm-foot .tm-copy { width: 100%; color: #A98F9B; font-size: 13px; border-top: 1px solid rgba(255,255,255,.09); padding-top: 16px; }

/* ------------------------------------------------------------------ waiting page */
.tm-wait-top { max-width: 620px; margin: 6px auto 0; position: sticky; top: 0; z-index: 5;
  background: var(--blush); padding: 12px 0 10px; }
.tm-wait-top::before { content: ""; position: absolute; inset: 0 -20px; background: var(--blush); z-index: -1; }
.tm-load-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.tm-load-pct { font-family: var(--serif); font-weight: 600; font-size: 30px; color: var(--plum); line-height: 1; font-variant-numeric: tabular-nums; }
.tm-load-eta { font-size: 14px; font-weight: 600; color: var(--green); }
.tm-load-track { height: 14px; border-radius: 999px; background: var(--track); overflow: hidden; position: relative; }
.tm-load-fill {
  height: 100%; width: 3%; border-radius: 999px; background: linear-gradient(90deg, #4FB075, var(--green));
  transition: width .9s linear; position: relative; overflow: hidden;
}
.tm-load-fill::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent);
  transform: translateX(-100%); animation: tmShine 1.8s ease-in-out infinite;
}
@keyframes tmShine { to { transform: translateX(100%); } }
.tm-load-what { font-size: 13px; color: var(--muted); margin-top: 9px; min-height: 20px; }

.tm-ready {
  display: none; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  background: #fff; border: 1.5px solid #BFE3CC; border-radius: 16px; padding: 16px 18px; margin-top: 18px;
  box-shadow: 0 8px 22px rgba(62,155,99,.14); animation: tmIn .35s ease both;
}
.tm-ready.show { display: flex; }
.tm-ready b { font-size: 16px; }
.tm-ready .tm-next { padding: 13px 24px; background: var(--green); box-shadow: 0 8px 18px rgba(62,155,99,.3); }
.tm-ready .tm-next:hover { background: #2F8552; }

.tm-custom { max-width: 620px; margin: 38px auto 0; text-align: center; }
.tm-custom .tm-h2 { font-family: var(--serif); font-weight: 600; font-size: clamp(22px, 3.6vw, 28px); line-height: 1.2; margin: 0 0 6px; }
.tm-custom .tm-sub { margin-bottom: 22px; font-size: 14px; }

.tm-card { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 26px 24px 24px; box-shadow: 0 10px 30px rgba(58,34,48,.06); text-align: center; }
.tm-q-count { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.tm-q { font-family: var(--serif); font-weight: 600; font-size: 21px; line-height: 1.25; margin: 0 0 18px; }
.tm-q-body { animation: tmIn .3s ease both; }
.tm-dots { display: flex; justify-content: center; gap: 6px; margin-bottom: 14px; }
.tm-dots i { width: 22px; height: 4px; border-radius: 99px; background: var(--track); }
.tm-dots i.on { background: var(--rose); }

.tm-styles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.tm-style { background: #fff; border: 2px solid var(--line); border-radius: 16px; padding: 7px 7px 10px; cursor: pointer; transition: border-color .15s, transform .1s, box-shadow .15s; }
.tm-style img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 11px; display: block; }
.tm-style span { display: block; font-weight: 700; font-size: 14px; margin-top: 8px; }
.tm-style:hover { border-color: var(--rose); }
.tm-style.on { border-color: var(--rose); box-shadow: 0 8px 20px rgba(217,82,111,.22); }
.tm-card .tm-chips { gap: 10px; }
.tm-card .tm-actions { margin-top: 22px; justify-content: center; }
.tm-card .tm-next { padding: 14px 28px; font-size: 15px; }
.tm-card .tm-textarea { min-height: 110px; font-size: 16px; }
.tm-card .tm-input { font-size: 16px; }

.tm-set-check { width: 54px; height: 54px; border-radius: 50%; background: var(--green-soft); color: var(--green); display: grid; place-items: center; margin: 0 auto 12px; }
.tm-set-check svg { width: 28px; height: 28px; }
.tm-set p { color: var(--body); font-size: 15px; margin: 0 auto 18px; max-width: 460px; }
.tm-set .tm-cover-mini { width: 120px; height: 120px; border-radius: 14px; object-fit: cover; display: none; margin: 0 auto 14px; box-shadow: 0 8px 20px rgba(58,34,48,.15); }
.tm-ghost {
  display: inline-flex; align-items: center; gap: 8px; background: #fff; color: var(--rose);
  border: 1.5px solid var(--rose); border-radius: 999px; padding: 12px 24px; font-size: 15px; font-weight: 700; cursor: pointer;
}
.tm-ghost:hover { background: #FFF5F7; }

/* ------------------------------------------------------------------ modal */
.tm-modal { position: fixed; inset: 0; z-index: 50; display: none; align-items: center; justify-content: center; padding: 16px; background: rgba(58,34,48,.45); }
.tm-modal.open { display: flex; animation: tmFade .2s ease both; }
@keyframes tmFade { from { opacity: 0; } to { opacity: 1; } }
.tm-modal-box { position: relative; width: min(460px, 100%); height: min(820px, calc(100vh - 32px)); background: #fff; border-radius: 22px; overflow: hidden; box-shadow: 0 30px 80px rgba(20,8,14,.35); display: flex; flex-direction: column; }
.tm-modal-bar { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 12px 18px; border-bottom: 1px solid var(--line); background: #fff; }
.tm-modal-bar b { font-size: 14px; }
.tm-modal-bar small { display: block; color: var(--muted); font-size: 12px; font-weight: 400; }
.tm-x { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--blush-2); color: var(--plum); font-size: 20px; line-height: 1; cursor: pointer; }
.tm-modal iframe { flex: 1; width: 100%; border: 0; background: var(--blush); }

@media (max-width: 640px) {
  .tm-head { padding: 18px 0 16px; min-height: 64px; }
  .tm-logo { height: 28px; }
  .tm-step { padding-top: 28px; }
  .tm-chip { padding: 11px 17px; font-size: 14px; }
  .tm-chips { gap: 9px; }
  .tm-actions { margin-top: 40px; justify-content: stretch; }
  .tm-actions .tm-next { flex: 1; justify-content: center; }
  .tm-foot .tm-wrap { flex-direction: column; align-items: flex-start; }
  .tm-card { padding: 22px 16px 20px; }
  .tm-styles { gap: 8px; }
  .tm-style span { font-size: 13px; }
  .tm-modal { padding: 0; }
  .tm-modal-box { width: 100%; height: 100%; border-radius: 0; }
}

/* ---------- "You're all set" card (cover-first) ---------- */
.tm-card-set { padding: 18px 18px 22px; }
.tm-set-cover { position: relative; width: 100%; max-width: 340px; margin: 0 auto; aspect-ratio: 1; border-radius: 18px; overflow: hidden; background: var(--blush-2); box-shadow: 0 18px 40px rgba(58,34,48,.18); }
.tm-set-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tm-set-pill { position: absolute; left: 12px; top: 12px; display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.94); color: var(--plum); font-size: 13px; font-weight: 800; padding: 6px 11px 6px 8px; border-radius: 999px; box-shadow: 0 4px 12px rgba(58,34,48,.18); }
.tm-set-pill svg { width: 15px; height: 15px; color: var(--green); }
.tm-set-note { max-width: 340px; margin: 16px auto 0; background: var(--blush); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; font-family: var(--serif); font-style: italic; font-size: 17px; line-height: 1.4; color: var(--plum); }
.tm-set-note small { display: block; font-family: var(--sans); font-style: normal; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.tm-set .tm-set-pitch { font-size: 14.5px; line-height: 1.55; max-width: 340px; margin: 16px auto 16px; color: var(--body); }

/* ---------- kviz: prvi ekran je i ulazna strana (29.9.2026) ---------- */
.tm-hook { max-width: 600px; margin: 0 auto 10px; }
.tm-hook-h { font-family: var(--serif); font-weight: 600; color: var(--rose); font-size: clamp(18px, 2.4vw, 21px); line-height: 1.3; margin: 0; }
.tm-rate { display: flex; flex-direction: column; align-items: center; gap: 7px; margin-top: 20px; font-size: 14px; font-weight: 600; color: var(--body); }
.tm-nw { white-space: nowrap; }
.tm-rate-t { display: inline-flex; align-items: center; gap: 6px; }
.tm-faces { display: inline-flex; }
.tm-faces img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; border: 2px solid var(--blush); margin-left: -9px; }
.tm-faces img:first-child { margin-left: 0; }
.tm-stars { color: #F2B01E; letter-spacing: 1px; }
.tm-first .tm-h1 { font-size: clamp(30px, 4.6vw, 40px); margin: 0 0 22px; }
.tm-first .tm-actions { margin-top: 40px; }
@media (max-width: 640px) {
  .tm-hook { margin-bottom: 8px; }
  .tm-hook-h { font-size: 16.5px; }
  .tm-rate { margin-top: 16px; }
  .tm-first .tm-actions { margin-top: 30px; }
}

/* ---------- kviz: "Did you mean ...?" za mejl (29.9.2026) ---------- */
.tm-sugg { margin-top: 14px; background: #fff; border: 1.5px solid var(--rose); border-radius: 14px; padding: 14px 16px; text-align: center; font-size: 15px; color: var(--plum); animation: tmIn .25s ease both; }
.tm-sugg b { color: var(--rose-dark); word-break: break-all; }
.tm-sugg-btns { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.tm-sugg-yes { border: 0; border-radius: 999px; background: var(--rose); color: #fff; font-weight: 700; font-size: 14px; padding: 10px 18px; cursor: pointer; }
.tm-sugg-no { border: 0; background: none; color: var(--muted); font-size: 14px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 10px 6px; }
