@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;600;700&family=Inter:wght@400;500;600&display=swap');

:root {
  --bg:          #0F172A;
  --bg-card:     #1E293B;
  --bg-input:    #162032;
  --border:      rgba(255,255,255,.09);
  --border-focus:#7C3AED;
  --toro:        #7C3AED;
  --toro-light:  rgba(124,58,237,.15);
  --toro-glow:   rgba(124,58,237,.35);
  --green:       #10B981;
  --green-light: rgba(16,185,129,.12);
  --red:         #F87171;
  --red-light:   rgba(248,113,113,.12);
  --text:        #F1F5F9;
  --text-2:      #94A3B8;
  --text-3:      #475569;
  --radius-sm:   8px;
  --radius-md:   12px;
  --radius-lg:   16px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.65;
  min-height: 100vh;
}

.nav {
  display: flex;
  gap: 6px;
  padding: .75rem 1.5rem;
  background: rgba(15,23,42,.92);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
}
.nav-btn {
  padding: 7px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  transition: all .18s ease;
}
.nav-btn:hover, .nav-btn.active {
  color: var(--text);
  border-color: var(--toro);
  background: var(--toro-light);
}

.container { max-width: 680px; margin: 0 auto; padding: 2.5rem 1.25rem 4rem; }

.page-eyebrow {
  font-family: 'Sora', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--toro);
  margin-bottom: .75rem;
}
.page-title {
  font-family: 'Sora', sans-serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
  margin-bottom: .5rem;
}
.page-sub { color: var(--text-2); font-size: 14px; margin-bottom: 2.5rem; }

.q-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: .875rem;
  transition: border-color .2s;
}
.q-block:focus-within { border-color: rgba(124,58,237,.4); }

.q-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1rem;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.45;
}
.q-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--toro);
  color: #fff;
  border-radius: 6px;
  width: 24px;
  height: 24px;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
  font-family: 'Sora', sans-serif;
}

input[type="text"], textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  background: var(--bg-input);
  color: var(--text);
  resize: vertical;
  transition: border-color .18s, box-shadow .18s;
}
textarea { min-height: 90px; }
input[type="text"]:focus, textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--toro-glow);
}
input[type="text"]::placeholder, textarea::placeholder {
  color: var(--text-3);
  font-size: 13px;
}

.radio-group, .check-group { display: flex; flex-direction: column; gap: 7px; }
.opt {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: all .14s;
  font-size: 14px;
  color: var(--text-2);
}
.opt:hover { border-color: var(--toro); background: var(--toro-light); color: var(--text); }
.opt input { accent-color: var(--toro); cursor: pointer; width: 16px; height: 16px; flex-shrink: 0; }

.scale-wrap { display: flex; flex-direction: column; gap: 10px; }
.scale-row { display: flex; gap: 7px; align-items: center; }
.scale-btn {
  width: 46px; height: 46px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text-2);
  font-size: 15px; font-weight: 600;
  font-family: 'Sora', sans-serif;
  cursor: pointer;
  transition: all .14s;
}
.scale-btn:hover { border-color: var(--toro); color: var(--text); }
.scale-btn.sel { background: var(--toro); border-color: var(--toro); color: #fff; box-shadow: 0 0 12px var(--toro-glow); }
.scale-labels { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-3); padding: 0 2px; }

.toro-card {
  position: relative;
  border: 1.5px solid var(--toro);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-card);
  padding: 1.5rem;
  margin-bottom: .875rem;
}
.toro-bg { position: absolute; inset: 0; pointer-events: none; overflow: hidden; opacity: .18; }
.toro-particle {
  position: absolute;
  font-size: 11px;
  font-family: 'Sora', sans-serif;
  color: var(--toro);
  animation: fall linear infinite;
  white-space: nowrap;
  user-select: none;
}
@keyframes fall {
  0%   { transform: translateY(-20px); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translateY(160px); opacity: 0; }
}
.toro-label {
  font-size: 11px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--toro); margin-bottom: .625rem;
  display: flex; align-items: center; gap: 6px;
}
.toro-card textarea { border-color: rgba(124,58,237,.35); min-height: 110px; background: rgba(15,23,42,.6); }
.toro-card textarea:focus { border-color: var(--toro); box-shadow: 0 0 0 3px var(--toro-glow); }

.submit-btn {
  width: 100%; padding: 14px;
  background: var(--toro); color: #fff; border: none;
  border-radius: var(--radius-md);
  font-size: 15px; font-weight: 600;
  font-family: 'Sora', sans-serif;
  cursor: pointer; margin-top: 1.75rem;
  transition: opacity .18s, box-shadow .18s;
  box-shadow: 0 4px 18px var(--toro-glow);
}
.submit-btn:hover { opacity: .9; box-shadow: 0 6px 26px var(--toro-glow); }
.submit-btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }

.diag-card {
  background: linear-gradient(135deg, rgba(124,58,237,.12), rgba(56,189,248,.08));
  border: 1.5px solid var(--toro);
  border-radius: var(--radius-lg);
  padding: 1.5rem; margin-top: 1.25rem;
}
.diag-title { font-family: 'Sora', sans-serif; font-size: 13px; font-weight: 700; color: var(--toro); margin-bottom: .875rem; }
.diag-body { font-size: 14px; color: var(--text); line-height: 1.8; white-space: pre-wrap; }
.diag-loading { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 13px; }
.spinner {
  width: 16px; height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--toro);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

.banner { border-radius: var(--radius-sm); padding: .875rem 1.125rem; margin-top: .875rem; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.banner.ok  { background: var(--green-light); border: 1px solid rgba(16,185,129,.3); color: #34D399; }
.banner.err { background: var(--red-light);   border: 1px solid rgba(248,113,113,.3); color: var(--red); }

.stat-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-bottom: 1.75rem; }
.stat-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1.125rem 1rem; text-align: center; }
.stat-num { font-family: 'Sora', sans-serif; font-size: 30px; font-weight: 700; color: var(--toro); line-height: 1; }
.stat-lbl { font-size: 11px; color: var(--text-3); margin-top: 5px; text-transform: uppercase; letter-spacing: .06em; }

.chart-wrap { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1.25rem; margin-bottom: 1rem; }
.chart-title { font-family: 'Sora', sans-serif; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); margin-bottom: 1.125rem; }
.bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.bar-lbl { font-size: 12px; width: 190px; min-width: 190px; color: var(--text-2); line-height: 1.3; flex-shrink: 0; }
.bar-track { flex: 1; background: rgba(255,255,255,.05); border-radius: 4px; height: 16px; overflow: hidden; min-width: 30px; }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--toro), #A78BFA); border-radius: 4px; transition: width .5s ease; }
.bar-n { font-size: 12px; min-width: 22px; color: var(--text-3); text-align: right; font-family: 'Sora', sans-serif; font-weight: 600; }

.wordcloud-wrap { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1.25rem; margin-bottom: 1rem; }
.wordcloud-canvas { width: 100%; height: 240px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; }

.section-title { font-family: 'Sora', sans-serif; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); margin: 2rem 0 .875rem; }
.resp-list { display: flex; flex-direction: column; gap: .75rem; }
.resp-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1.25rem; transition: border-color .15s; }
.resp-card:hover { border-color: var(--toro); }
.resp-head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px; margin-bottom: .875rem; padding-bottom: .75rem; border-bottom: 1px solid var(--border); }
.resp-area { font-family: 'Sora', sans-serif; font-size: 13px; font-weight: 600; color: var(--text); }
.resp-date { font-size: 11px; color: var(--text-3); }
.resp-row { font-size: 13px; margin-bottom: .625rem; padding-bottom: .625rem; border-bottom: 1px solid var(--border); }
.resp-row:last-child { border: none; margin: 0; padding: 0; }
.resp-row b { display: block; font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); margin-bottom: 3px; }
.toro-bubble { background: var(--toro-light); border: 1px solid rgba(124,58,237,.3); border-radius: var(--radius-sm); padding: 8px 10px; color: #A78BFA; font-size: 13px; margin-top: 4px; }

.empty { text-align: center; padding: 4rem 1rem; color: var(--text-3); font-size: 14px; }
.empty-icon { font-size: 36px; display: block; margin-bottom: .75rem; opacity: .5; }

@media (max-width: 520px) {
  .stat-grid { grid-template-columns: repeat(2,1fr); }
  .bar-lbl   { width: 130px; min-width: 130px; }
  .page-title { font-size: 21px; }
  .scale-btn  { width: 40px; height: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .toro-particle { animation: none; }
  .spinner       { animation: none; }
}
