.app-title {
  font-size: 18px;
  font-weight: 700;
  color: #2c3e50;
  letter-spacing: 0.5px;
}
#_dbg { display: none !important; }
/* ============================================================
   Questionnaire — styles
   ============================================================ */

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

body {
  font-family: 'Segoe UI', 'Roboto', Arial, sans-serif;
  background: #f5f7f7;
  color: #2c3e50;
  min-height: 100vh;
}

/* ── Header ── */
.header {
  position: fixed; top: 0; left: 0; right: 0; height: 44px;
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px;
  z-index: 100;
}
.logo { font-weight: 700; font-size: 18px; color: #589191; letter-spacing: .5px; }
.logo-dot { color: #bbb; }

.lang-switcher { display: flex; gap: 6px; }
.lang-switcher button {
  background: none; border: 1px solid #ccc; border-radius: 4px;
  padding: 3px 8px; font-size: 12px; cursor: pointer; color: #666;
}
.lang-switcher button.active {
  background: #589191; border-color: #589191; color: #fff;
}

/* ── App container ── */
#app {
  margin-top: 44px;
  min-height: calc(100vh - 44px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 28px 12px;
}

/* ── Blocks ── */
.block { display: none; width: 100%; max-width: 680px; }
#block-2 { max-width: 100%; width: 100%; }
.block.active { display: block; }

/* ── Card ── */
.card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.07);
  padding: 40px 44px;
}
.card.wide { max-width: 100%; }
.card.center { text-align: center; }

h1 { font-size: 24px; font-weight: 700; margin-bottom: 16px; color: #2c3e50; }
h2 { font-size: 20px; font-weight: 600; margin-bottom: 12px; color: #2c3e50; }
p  { font-size: 15px; line-height: 1.7; color: #555; margin-bottom: 16px; }
.note { font-size: 13px; color: #999; font-style: italic; }

/* ── Buttons ── */
.btn-primary {
  display: inline-block;
  background: #589191; color: #fff; border: none;
  padding: 12px 36px; border-radius: 24px;
  font-size: 15px; font-weight: 600; cursor: pointer;
  text-decoration: none;
  transition: background .15s;
}
.btn-primary:hover { background: #4a7d7d; }

.btn-secondary {
  display: inline-block;
  background: transparent; color: #589191;
  border: 1.5px solid #589191;
  padding: 11px 28px; border-radius: 24px;
  font-size: 15px; font-weight: 600; cursor: pointer;
  transition: all .15s;
}
.btn-secondary:hover { background: #f0f6f6; }

.actions {
  margin-top: 28px;
  display: flex; gap: 12px; justify-content: flex-end;
}

/* ── Name inputs ── */
.name-row {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 10px;
}
.name-num { font-size: 14px; color: #aaa; width: 20px; text-align: right; flex-shrink: 0; }
.name-input {
  flex: 1;
  border: 1.5px solid #d5e0e0;
  border-radius: 8px; padding: 8px 12px;
  font-size: 15px; color: #333;
  outline: none; transition: border-color .15s;
}
.name-input:focus { border-color: #589191; }

#t_btn_add_name {
  margin-top: 6px;
  background: none; border: none; color: #589191;
  font-size: 14px; cursor: pointer; padding: 4px 0;
}

/* ── Alter table ── */
.table-wrap { overflow-x: auto; margin: 20px 0; width: 100%; }

table { width: 100%; border-collapse: collapse; }

thead th {
  background: #f0f6f6;
  font-size: 12px; font-weight: 600; color: #589191;
  padding: 8px 6px; text-align: center;
  border-bottom: 2px solid #d5e0e0;
}
thead th:first-child { text-align: left; padding-left: 12px; }

tbody tr:nth-child(even) { background: #fafcfc; }
tbody tr:hover { background: #f0f6f6; }

.name-cell {
  padding: 8px 12px;
  font-size: 14px; font-weight: 600; color: #2c3e50;
  min-width: 90px;
}
.check-cell {
  text-align: center; padding: 6px 4px;
}
.check-cell input[type="checkbox"] {
  width: 18px; height: 18px; cursor: pointer; accent-color: #589191;
}

/* ── Likert ── */
.likert-section-label {
  font-size: 14px; font-weight: 700; color: #589191;
  margin: 28px 0 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid #e0eded;
}

.likert-item {
  margin-bottom: 20px;
  padding: 16px 0;
  border-bottom: 1px solid #f0f0f0;
}
.likert-text {
  font-size: 15px; color: #333; margin-bottom: 12px;
}

.likert-scale {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.scale-anchor {
  font-size: 12px; color: #999; flex-shrink: 0;
}
.scale-point {
  display: flex; flex-direction: column; align-items: center;
  cursor: pointer;
}
.scale-point input[type="radio"] { display: none; }
.scale-circle {
  width: 36px; height: 36px;
  border: 2px solid #d5e0e0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: #888;
  transition: all .15s; cursor: pointer;
}
.scale-point input[type="radio"]:checked + .scale-circle {
  background: #589191; border-color: #589191; color: #fff;
  font-weight: 700;
}
.scale-circle:hover { border-color: #589191; color: #589191; }

.scale-hint {
  font-size: 13px; color: #999; font-style: italic;
  margin-bottom: 8px;
}

/* ── Complete ── */
.check-circle {
  width: 72px; height: 72px;
  background: #589191; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 24px;
}
.check-circle svg { width: 36px; height: 36px; }

/* ── Responsive ── */
@media (max-width: 600px) {
  .card { padding: 28px 20px; }
  .likert-scale { gap: 4px; }
  .scale-circle { width: 30px; height: 30px; font-size: 12px; }
}

/* ── Rest / transition block ── */
.rest-icon {
  font-size: 48px;
  margin-bottom: 20px;
}
.rest-rules {
  background: #f5fafa;
  border-left: 3px solid #589191;
  border-radius: 0 8px 8px 0;
  padding: 16px 20px;
  margin: 20px 0 0;
  text-align: left;
}
.rest-rules p {
  font-size: 14px;
  color: #555;
  margin-bottom: 8px;
  padding-left: 4px;
}
.rest-rules p:last-child { margin-bottom: 0; }
.rest-rules p::before { content: "✓ "; color: #589191; font-weight: bold; }

/* ── Inline scale (1-5 in table) ── */
.scale-cell { padding: 4px 4px; }
.inline-scale {
  display: flex; gap: 2px; align-items: center; justify-content: center;
}
.inline-scale-point { cursor: pointer; }
.inline-scale-point input[type="radio"] { display: none; }
.inline-circle {
  width: 24px; height: 24px;
  border: 1.5px solid #d5e0e0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: #999;
  transition: all .12s; cursor: pointer; user-select: none;
}
.inline-scale-point input[type="radio"]:checked + .inline-circle {
  background: #589191; border-color: #589191; color: #fff; font-weight: 700;
}
.inline-circle:hover { border-color: #589191; color: #589191; }

/* ── Relationship type dropdown ── */
.reltype-cell { padding: 6px 8px; }
.rel-select {
  border: 1.5px solid #d5e0e0; border-radius: 6px;
  padding: 4px 6px; font-size: 12px; color: #444;
  background: #fff; cursor: pointer; outline: none;
  min-width: 110px; max-width: 130px;
}
.rel-select:focus { border-color: #589191; }

/* make table scrollable on small screens — already have .table-wrap */
.table-wrap { overflow-x: auto; }
thead th { white-space: nowrap; font-size: 12px; padding: 8px 10px; }

/* ── Attention check ── */
.attention-item {
  background: #f9f9f9;
  border: 1.5px dashed #d0d0d0;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 20px;
}
.attention-item .likert-text {
  font-style: italic;
  color: #777;
  font-size: 14px;
}
.bogus-col {
  background: #fafafa;
  opacity: 0.7;
}
thead .bogus-col {
  font-size: 11px;
  color: #aaa !important;
  font-style: italic;
}

/* ── Debriefing box ── */
.debrief-box {
  background: #f0f7f7;
  border-left: 3px solid #589191;
  border-radius: 0 8px 8px 0;
  padding: 16px 20px;
  margin: 20px 0;
  text-align: left;
}
.debrief-box h3 {
  font-size: 12px; font-weight: 700; color: #589191;
  text-transform: uppercase; letter-spacing: .5px;
  margin-bottom: 8px;
}
.debrief-box p { font-size: 14px; color: #555; line-height: 1.7; margin: 0; }

/* ── Validation error highlighting ─────────────────────────── */
.field-error select,
.field-error .inline-scale,
select.field-error {
  outline: 2px solid #e74c3c;
  border-radius: 4px;
  background: #fff5f5;
}

.likert-item.field-error {
  background: #fff5f5;
  border-left: 3px solid #e74c3c;
  border-radius: 4px;
  padding-left: 10px;
}

td.field-error {
  background: #fff5f5;
  outline: 2px solid #e74c3c;
}

.error-banner {
  background: #fde8e8;
  color: #c0392b;
  border: 1px solid #e74c3c;
  border-radius: 6px;
  padding: 10px 16px;
  margin: 12px 0 4px;
  font-size: 14px;
  font-weight: 500;
  display: none;
}

body {
  overscroll-behavior-y: contain;
}
