:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-soft: #fafafa;
  --panel: #ffffff;
  --panel-subtle: #fbfbfb;
  --ink: #171717;
  --muted: #666666;
  --muted-2: #8a8a8a;
  --line: rgba(0, 0, 0, 0.08);
  --line-strong: rgba(0, 0, 0, 0.14);
  --accent: #0072f5;
  --accent-ink: #0068d6;
  --accent-soft: #ebf5ff;
  --success: #10a37f;
  --ring: rgba(0, 0, 0, 0.08) 0 0 0 1px;
  --ring-soft: rgb(235, 235, 235) 0 0 0 1px;
  --shadow-card: rgba(0,0,0,0.08) 0 0 0 1px, rgba(0,0,0,0.04) 0 2px 2px, rgba(0,0,0,0.04) 0 8px 8px -8px, #fafafa 0 0 0 1px inset;
  --shadow-hover: rgba(0,0,0,0.10) 0 0 0 1px, rgba(0,0,0,0.06) 0 8px 22px -12px;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 78% -12%, rgba(0, 114, 245, 0.10), transparent 30rem),
    linear-gradient(180deg, #ffffff 0%, #fbfbfb 100%);
  color: var(--ink);
  font-family: Geist, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
button:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(330px, 405px) 1fr;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 24px 18px 18px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px);
  box-shadow: 1px 0 0 var(--line);
}

.brand {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 2px 4px 0;
}
.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-ink);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .13em;
  text-transform: uppercase;
}
h1 {
  margin: 0;
  color: var(--ink);
  font-size: 28px;
  line-height: 1.02;
  letter-spacing: -0.07em;
  font-weight: 700;
}
.count {
  min-width: 36px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border-radius: 9999px;
  background: #171717;
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  box-shadow: var(--ring);
}
.count.subtle {
  background: var(--accent-soft);
  color: var(--accent-ink);
  box-shadow: none;
}
.search-label {
  margin: 14px 4px 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.language-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 22px 0 0;
  padding: 4px;
  border-radius: 9999px;
  background: #f5f5f5;
  box-shadow: var(--ring-soft);
}
.lang-btn {
  min-height: 34px;
  border: 0;
  border-radius: 9999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}
.lang-btn.active {
  background: #ffffff;
  color: var(--ink);
  box-shadow: rgba(0,0,0,0.10) 0 0 0 1px, rgba(0,0,0,0.05) 0 2px 8px;
}
.search {
  width: 100%;
  margin: 0 0 18px;
  border: 0;
  border-radius: var(--radius-md);
  padding: 13px 14px;
  background: #ffffff;
  color: var(--ink);
  font-size: 14px;
  outline: none;
  box-shadow: var(--ring), rgba(0,0,0,0.02) 0 1px 1px;
  transition: box-shadow 120ms ease, background 120ms ease;
}
.search::placeholder { color: #9b9b9b; }
.search:focus {
  box-shadow: rgba(0, 114, 245, 0.75) 0 0 0 1px, rgba(0, 114, 245, 0.14) 0 0 0 4px;
}

.user-list {
  min-height: 0;
  overflow: auto;
  padding: 2px 4px 12px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  scrollbar-color: #d8d8d8 transparent;
}
.user-item {
  width: 100%;
  border: 0;
  border-radius: var(--radius-md);
  background: #ffffff;
  color: var(--ink);
  padding: 13px 13px 12px;
  cursor: pointer;
  text-align: left;
  box-shadow: var(--ring-soft);
  transition: transform 90ms ease, box-shadow 110ms ease, background 110ms ease;
}
.user-item:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-hover);
}
.user-item.active {
  background: linear-gradient(180deg, #ffffff, #f7fbff);
  box-shadow: rgba(0, 114, 245, 0.45) 0 0 0 1px, rgba(0, 114, 245, 0.09) 0 10px 26px -14px;
}
.user-main {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}
.user-name {
  font-weight: 650;
  letter-spacing: -0.035em;
}
.user-no {
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 500;
}
.user-meta {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail {
  min-width: 0;
  padding: 26px;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: -26px -26px 26px;
  padding: 16px 26px;
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(18px);
  box-shadow: 0 1px 0 var(--line);
}
.nav-btn {
  min-height: 42px;
  border: 0;
  border-radius: var(--radius-sm);
  padding: 0 18px;
  background: #171717;
  color: #ffffff;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--ring);
  transition: transform 90ms ease, background 100ms ease, box-shadow 100ms ease;
}
.nav-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  background: #000000;
  box-shadow: rgba(0,0,0,.16) 0 0 0 1px, rgba(0,0,0,.16) 0 8px 18px -14px;
}
.nav-btn:active:not(:disabled) { transform: translateY(0); }
.nav-btn:disabled { opacity: .28; cursor: not-allowed; }
.topbar-center { text-align: center; min-width: 160px; }
.position {
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.03em;
}
.shortcut {
  margin-top: 3px;
  color: var(--muted-2);
  font-size: 12px;
}

.profile-card, .responses-card {
  max-width: 1040px;
  margin: 0 auto 20px;
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: var(--shadow-card);
}
.profile-card {
  position: relative;
  overflow: hidden;
  padding: 28px;
}
.profile-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, #0072f5, #79b8ff 45%, transparent);
}
.profile-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}
.profile-title {
  margin: 0;
  color: var(--ink);
  font-size: clamp(32px, 4vw, 48px);
  line-height: .98;
  letter-spacing: -0.075em;
  font-weight: 700;
  text-wrap: balance;
}
.profile-sub {
  margin: 10px 0 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.badge {
  border-radius: 9999px;
  padding: 7px 10px;
  background: #f5f5f5;
  color: #4d4d4d;
  font-size: 12px;
  font-weight: 500;
  box-shadow: var(--ring-soft);
}
.summary-panel {
  margin-top: 22px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #f8fbff, #ffffff);
  box-shadow: rgba(0, 114, 245, 0.16) 0 0 0 1px, rgba(0,0,0,0.03) 0 8px 18px -14px;
}
.summary-kicker {
  color: var(--accent-ink);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.persona-summary {
  margin: 7px 0 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: -0.02em;
}
.summary-bullets {
  margin: 12px 0 0;
  padding-left: 19px;
  color: #343434;
  line-height: 1.68;
}
.summary-bullets li + li { margin-top: 7px; }
.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(178px, 1fr));
  gap: 10px;
  margin-top: 22px;
}
.meta-cell {
  border-radius: var(--radius-md);
  padding: 13px;
  background: #fafafa;
  box-shadow: var(--ring-soft);
}
.meta-label {
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.meta-value {
  margin-top: 6px;
  color: var(--ink);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.responses-card { padding: 22px 24px 24px; }
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}
h2 {
  margin: 0;
  color: var(--ink);
  font-size: 22px;
  letter-spacing: -0.05em;
  font-weight: 700;
}
.responses {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.qa {
  border-radius: var(--radius-md);
  padding: 16px;
  background: #ffffff;
  box-shadow: var(--ring-soft);
}
.question {
  color: var(--accent-ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -0.01em;
  white-space: pre-wrap;
}
.answer {
  margin-top: 10px;
  color: #242424;
  line-height: 1.72;
  white-space: pre-wrap;
  font-size: 16px;
}
.empty {
  color: var(--muted);
  padding: 34px;
  text-align: center;
}

@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: relative;
    height: 44vh;
    box-shadow: 0 1px 0 var(--line);
  }
  .detail { padding: 18px; }
  .topbar { margin: -18px -18px 18px; padding: 12px 18px; }
  .shortcut { display: none; }
  .profile-card, .responses-card { border-radius: 16px; }
}

@media (max-width: 560px) {
  .sidebar { padding: 18px 14px 14px; }
  h1 { font-size: 24px; }
  .nav-btn { padding: 0 13px; min-height: 40px; }
  .topbar-center { min-width: auto; }
  .profile-card, .responses-card { padding: 18px; }
  .profile-header { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
