/* =========================================================
   AI面接 — NALYSYS-style video interview UI
   Light base · blue primary · two-tile video stage
   ========================================================= */
:root {
  --bg: #eef1f6;
  --surface: #ffffff;
  --surface-2: #f5f7fb;
  --ink: #16202e;
  --ink-soft: #4a5568;
  --ink-faint: #8a93a3;
  --line: #e4e8f0;
  --line-strong: #d3d9e4;

  --blue: #2f6bed;
  --blue-deep: #2257cf;
  --blue-soft: #eaf1fe;

  --rec: #e5384f;

  --shadow-sm: 0 1px 2px rgba(22,32,46,.05);
  --shadow-md: 0 2px 6px rgba(22,32,46,.06), 0 12px 30px -12px rgba(22,32,46,.16);
  --shadow-lg: 0 8px 40px -12px rgba(22,32,46,.28);

  --r-sm: 9px;
  --r: 14px;
  --r-lg: 20px;

  --font-jp: "Noto Sans JP", system-ui, sans-serif;
  --font-en: "Inter", "Noto Sans JP", system-ui, sans-serif;
  --bob: 0px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font-jp);
  color: var(--ink);
  background:
    radial-gradient(1100px 600px at 88% -8%, #eaf0fb 0%, transparent 55%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

.app {
  max-width: 1240px;
  margin: 0 auto;
  padding: 20px clamp(14px, 3.5vw, 36px) 26px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ---------- Topbar ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 30px; height: 30px; display: grid; place-items: center;
  border-radius: 9px; color: #fff;
  background: linear-gradient(150deg, var(--blue) 0%, var(--blue-deep) 100%);
  box-shadow: var(--shadow-sm);
}
.brand-name { font-weight: 700; font-size: 18px; letter-spacing: .01em; }
.badge {
  font-family: var(--font-en); font-size: 10px; font-weight: 600;
  letter-spacing: .07em; text-transform: uppercase;
  color: var(--blue-deep); background: var(--blue-soft);
  padding: 3px 8px; border-radius: 999px;
}

.segmented {
  display: inline-flex; padding: 3px; background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 11px;
}
.seg-option { position: relative; display: inline-flex; }
.seg-option input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.seg-option span {
  min-width: 46px; padding: 6px 14px; display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-en); font-weight: 600; font-size: 13px; color: var(--ink-faint);
  border-radius: 8px; transition: .18s;
}
.seg-option:hover span { color: var(--ink-soft); }
.seg-option input:checked + span { color: var(--blue-deep); background: #fff; box-shadow: var(--shadow-sm); }

/* ---------- Meta / status bar ---------- */
.meta-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 11px 16px; margin-bottom: 14px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--shadow-sm);
}
.meta-left { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-width: 0; }
.rec-badge {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 700; color: var(--ink-faint);
  letter-spacing: .02em;
}
.rec-badge.live { color: var(--rec); }
.rec-dot {
  width: 9px; height: 9px; border-radius: 50%; background: var(--ink-faint); flex-shrink: 0;
}
.rec-badge.live .rec-dot, .rec-dot.on { background: var(--rec); animation: recPulse 1.4s ease-out infinite; }
@keyframes recPulse {
  0% { box-shadow: 0 0 0 0 rgba(229,56,79,.5); }
  70% { box-shadow: 0 0 0 7px rgba(229,56,79,0); }
  100% { box-shadow: 0 0 0 0 rgba(229,56,79,0); }
}
.meta-divider { width: 1px; height: 16px; background: var(--line-strong); }
.meta-state { font-size: 12.5px; font-weight: 600; color: var(--ink-soft); }
.timer {
  font-family: var(--font-en); font-weight: 600; font-size: 13px; color: var(--ink);
  font-variant-numeric: tabular-nums; letter-spacing: .02em;
}
.meta-title {
  font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; max-width: 38vw;
}
.meta-right { display: flex; align-items: center; }
.progress { display: flex; align-items: center; gap: 10px; }
.progress-track {
  width: clamp(120px, 22vw, 240px); height: 7px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line); overflow: hidden;
}
.progress-fill {
  height: 100%; width: 0%; border-radius: 999px;
  background: linear-gradient(90deg, var(--blue) 0%, #5b8cff 100%);
  transition: width .5s cubic-bezier(.4,0,.2,1);
}
.progress-pct {
  font-family: var(--font-en); font-weight: 600; font-size: 12.5px; color: var(--ink-soft);
  min-width: 34px; text-align: right; font-variant-numeric: tabular-nums;
}

/* ---------- Stage: two tiles ---------- */
.stage-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px; flex: 0 0 auto;
}
.tile {
  position: relative; aspect-ratio: 4 / 3; border-radius: var(--r-lg); overflow: hidden;
  border: 1px solid var(--line-strong); box-shadow: var(--shadow-md);
  background: #0e1726;
}
@supports not (aspect-ratio: 1) { .tile { height: 460px; } }

/* interviewer office backdrop（明るいオフィス調・透過アバターの背後） */
.tile.interviewer {
  background:
    radial-gradient(90px 90px at 80% 20%, rgba(255,255,255,.75), transparent 70%),
    radial-gradient(110px 110px at 16% 26%, rgba(214,231,252,.6), transparent 72%),
    radial-gradient(70px 70px at 60% 16%, rgba(255,246,224,.55), transparent 70%),
    linear-gradient(180deg, #f3f7fc 0%, #e7eef8 52%, #d9e4f1 100%);
}
.tile.interviewer::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(0deg, rgba(180,196,220,.28) 0%, transparent 26%),
    radial-gradient(140% 60% at 50% 120%, rgba(255,255,255,.5), transparent 60%);
}
.tile.candidate { background: linear-gradient(180deg, #1a2233 0%, #0f1726 100%); }

.tile-label {
  position: absolute; top: 12px; left: 12px; z-index: 4;
  display: flex; align-items: center; gap: 8px;
}
.tile-tag {
  font-size: 11.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px;
  backdrop-filter: blur(8px); color: #fff;
}
.tile-tag.ai { background: rgba(47,107,237,.82); }
.tile-tag.you { background: rgba(20,28,44,.6); border: 1px solid rgba(255,255,255,.18); }
.tile-name { font-size: 12px; color: rgba(255,255,255,.78); font-weight: 600; }

.stage { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 2; }
.stage > * { width: 100%; height: 100%; }
/* 2D avatar: keep aspect, anchor to bottom so head & shoulders fit */
.stage-error { color: rgba(255,255,255,.75); font-size: 14px; text-align: center; line-height: 1.7; padding: 24px; }

.selfview {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transform: scaleX(-1); z-index: 2; background: #0f1726;
}
.cam-placeholder {
  position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px; color: rgba(255,255,255,.42);
}
.cam-placeholder p { margin: 0; font-size: 13px; }

/* caption over interviewer tile */
.caption {
  position: absolute; left: 14px; right: 14px; bottom: 14px; z-index: 5;
  display: flex; gap: 11px; align-items: flex-start;
  padding: 13px 15px; border-radius: 13px;
  background: rgba(255,255,255,.94); backdrop-filter: blur(10px);
  box-shadow: 0 6px 24px -8px rgba(0,0,0,.45);
  border: 1px solid rgba(255,255,255,.6);
}
.caption-tag {
  flex-shrink: 0; font-size: 11px; font-weight: 700; color: #fff;
  background: var(--blue); padding: 4px 9px; border-radius: 7px; margin-top: 1px;
}
.subtitle { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--ink); font-weight: 500; }

/* ---------- Control dock ---------- */
.dock {
  margin-top: 18px; display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.equalizer { display: flex; align-items: flex-end; gap: 4px; height: 26px; opacity: .35; }
.equalizer span {
  width: 4px; height: 6px; border-radius: 999px; background: var(--blue);
  animation: eq 1.1s ease-in-out infinite;
}
.equalizer span:nth-child(odd) { animation-duration: .9s; }
.equalizer span:nth-child(3n) { animation-duration: 1.3s; background: #5b8cff; }
.dock.active .equalizer { opacity: .8; }
@keyframes eq { 0%,100% { height: 6px; } 50% { height: 24px; } }

.dock-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: center; }
.dock-or { font-size: 12.5px; color: var(--ink-faint); }
.text-controls { display: flex; align-items: center; gap: 8px; }
#textAnswer {
  width: clamp(180px, 26vw, 300px); padding: 11px 14px; font: inherit; font-size: 14px;
  border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); color: var(--ink);
  transition: border .15s, box-shadow .15s;
}
#textAnswer:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.dock-hint { margin: 2px 0 0; font-size: 12.5px; color: var(--ink-faint); min-height: 18px; text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; font: inherit; font-weight: 600; font-size: 14px;
  border: 1px solid transparent; border-radius: 11px; padding: 11px 20px; cursor: pointer;
  transition: transform .08s ease, background .15s, box-shadow .15s, border-color .15s; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-lg { padding: 13px 26px; font-size: 15px; border-radius: 12px; }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 8px 18px -8px rgba(47,107,237,.7); }
.btn-primary:hover { background: var(--blue-deep); }
.btn-record { background: #fff; color: var(--ink); border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.btn-record:hover { border-color: var(--blue); color: var(--blue-deep); }
.btn-soft { background: var(--surface-2); color: var(--ink-soft); border-color: var(--line); }
.btn-soft:hover { background: #ebeff6; }
.btn-ghost { background: transparent; color: var(--ink-soft); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--surface-2); }

.answerbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* ---------- Transcript ---------- */
.transcript {
  margin-top: 22px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--shadow-sm); overflow: hidden;
}
.transcript-head {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; background: none; border: none; cursor: pointer; font: inherit;
  font-weight: 700; font-size: 14px; color: var(--ink);
}
.th-left { display: flex; align-items: center; gap: 9px; color: var(--ink); }
.th-left svg { color: var(--blue); }
.transcript-head .chev { color: var(--ink-faint); transition: transform .2s; }
.transcript.collapsed .chev { transform: rotate(-90deg); }
.transcript.collapsed .log { display: none; }

.log {
  display: flex; flex-direction: column; gap: 10px;
  padding: 4px 18px 18px; max-height: 360px; overflow-y: auto;
}
.log-empty { color: var(--ink-faint); font-size: 13px; padding: 14px 0; text-align: center; }
.bubble { max-width: 80%; padding: 11px 15px; border-radius: 14px; border: 1px solid var(--line); }
.bubble .who { font-size: 11px; font-weight: 700; color: var(--ink-faint); display: inline-flex; align-items: center; gap: 7px; }
.bubble-time { font-family: var(--font-en); font-weight: 600; font-size: 10.5px; color: var(--blue-deep); background: var(--blue-soft); padding: 1px 6px; border-radius: 999px; }
.bubble p { margin: 4px 0 0; font-size: 14px; line-height: 1.55; }
.bubble.ai { align-self: flex-start; background: var(--blue-soft); border-color: #d8e6fe; }
.bubble.ai .who { color: var(--blue-deep); }
.bubble.user { align-self: flex-end; background: var(--surface-2); }

/* ---------- Footer ---------- */
.footbar {
  margin-top: auto; padding-top: 22px; display: flex; gap: 8px; flex-wrap: wrap; justify-content: center;
  color: var(--ink-faint); font-size: 11.5px;
}
.foot-dot { color: var(--line-strong); }

/* avatar 2D subtle bob */
.face-svg { transform: translateY(var(--bob)); transition: transform .08s linear; }

/* ---------- Entry (lobby) ---------- */
.entry-card {
  max-width: 480px; margin: 7vh auto 0; text-align: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-md); padding: 40px 36px;
}
.entry-kicker { font-family: var(--font-en); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--blue-deep); }
.entry-card h1 { margin: 8px 0 12px; font-size: 23px; }
.entry-lead { margin: 0 0 24px; color: var(--ink-soft); font-size: 14px; line-height: 1.8; }
.entry-form { display: flex; flex-direction: column; gap: 16px; text-align: left; }
.entry-form .field > span { font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.entry-form input {
  font: inherit; font-size: 15px; padding: 12px 14px; border: 1px solid var(--line-strong);
  border-radius: 10px; background: var(--surface); color: var(--ink); width: 100%;
}
.entry-form input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.entry-form .btn { justify-content: center; }
.entry-note { margin: 16px 0 0; font-size: 12px; color: var(--ink-faint); }

/* ---------- Completion (candidate) ---------- */
.done-actions { display: flex; justify-content: center; gap: 10px; }
.done-card {
  max-width: 520px; margin: 6vh auto 0; text-align: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-md); padding: 44px 36px;
}
.done-ico {
  width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 50%;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(150deg, #2bb673, #1f9e63);
  box-shadow: 0 10px 24px -10px rgba(43,182,115,.7);
}
.done-card h1 { margin: 0 0 12px; font-size: 22px; }
.done-card p { margin: 0 0 24px; color: var(--ink-soft); font-size: 14.5px; line-height: 1.8; }

/* ---------- Admin gate & list ---------- */
.gate { display: grid; place-items: center; padding: 8vh 0; }
.gate-card {
  width: min(420px, 92vw); text-align: center; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-md); padding: 36px 32px;
}
.gate-card h1 { margin: 0 0 8px; font-size: 20px; }
.gate-card p { margin: 0 0 20px; color: var(--ink-soft); font-size: 13.5px; }
#gateForm { display: flex; gap: 10px; }
#passInput {
  flex: 1; padding: 11px 14px; font: inherit; font-size: 14px; border: 1px solid var(--line-strong);
  border-radius: 10px; background: var(--surface); color: var(--ink);
}
#passInput:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.gate-error { color: var(--rec) !important; margin-top: 14px !important; font-size: 13px; }

.results-list { display: grid; gap: 10px; }
.result-row {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--shadow-sm); padding: 15px 18px; font: inherit; transition: border .15s, box-shadow .15s, transform .08s;
}
.result-row:hover { border-color: var(--blue); box-shadow: var(--shadow-md); }
.result-row:active { transform: translateY(1px); }
.rr-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.rr-title { font-weight: 700; font-size: 14.5px; }
.rr-sub { font-size: 12.5px; color: var(--ink-faint); }
.rr-score { font-family: var(--font-en); color: var(--ink-soft); }
.rr-score b { font-size: 22px; color: var(--blue-deep); }
.rr-chev { color: var(--ink-ghost); flex-shrink: 0; }
.list-empty { text-align: center; color: var(--ink-faint); font-size: 14px; padding: 40px 0; }

/* ---------- Result view (admin) ---------- */
.result-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-bottom: 18px;
}
.result-kicker {
  font-family: var(--font-en); font-size: 11px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--blue-deep);
}
.result-head h1 { margin: 4px 0 6px; font-size: 24px; letter-spacing: .01em; }
.result-sub { margin: 0; font-size: 13px; color: var(--ink-soft); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.result-sub .meta-divider { height: 12px; }
.result-head-actions { display: flex; gap: 10px; }

.result-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(240px, 1fr); gap: 16px; align-items: start; }

.score-card {
  display: flex; gap: 22px; align-items: center; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm); padding: 22px 24px; margin-bottom: 16px;
}
.score-ring { position: relative; width: 120px; height: 120px; flex-shrink: 0; }
.score-ring svg { transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--surface-2); stroke-width: 11; }
.ring-fg {
  fill: none; stroke: url(#g); stroke: var(--blue); stroke-width: 11; stroke-linecap: round;
  stroke-dasharray: 327; stroke-dashoffset: 327; transition: stroke-dashoffset 1s cubic-bezier(.4,0,.2,1);
}
.score-num { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 1px; }
.score-num span { font-family: var(--font-en); font-weight: 700; font-size: 34px; color: var(--ink); }
.score-num small { font-size: 13px; color: var(--ink-faint); margin-top: 12px; }
.score-meta h2 { margin: 0 0 6px; font-size: 16px; }
.score-meta p { margin: 0; font-size: 13.5px; color: var(--ink-soft); line-height: 1.7; max-width: 52ch; }

.cat-list { display: grid; gap: 12px; }
.cat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--shadow-sm); padding: 15px 18px;
}
.cat-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 9px; }
.cat-name { font-weight: 700; font-size: 14px; }
.cat-score { font-family: var(--font-en); font-weight: 600; font-size: 13px; color: var(--ink-soft); }
.cat-score b { color: var(--blue-deep); font-size: 16px; }
.cat-bar { height: 7px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin-bottom: 9px; }
.cat-bar > i { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--blue), #5b8cff); transition: width .8s cubic-bezier(.4,0,.2,1); }
.cat-comment { margin: 0; font-size: 12.5px; color: var(--ink-soft); line-height: 1.6; }

.result-side { display: grid; gap: 14px; }
.sw-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-sm); padding: 16px 18px; }
.sw-card h3 { margin: 0 0 10px; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.sw-ico { width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; font-size: 13px; font-weight: 700; color: #fff; }
.sw-card.strengths .sw-ico { background: #2bb673; }
.sw-card.concerns .sw-ico { background: #e8893a; }
.sw-card ul { margin: 0; padding-left: 18px; display: grid; gap: 7px; }
.sw-card li { font-size: 13px; color: var(--ink-soft); line-height: 1.55; }
.sw-card li.muted { color: var(--ink-faint); list-style: none; margin-left: -18px; }

.transcript-block {
  margin-top: 18px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--shadow-sm); overflow: hidden;
}
.transcript-head.static { padding: 14px 18px; font-weight: 700; font-size: 14px; }
.transcript-head.static .th-left { display: flex; align-items: center; gap: 9px; }
.transcript-head.static .th-left svg { color: var(--blue); }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .stage-grid { grid-template-columns: 1fr; }
  .tile { aspect-ratio: 16 / 12; }
  .meta-title { max-width: 60vw; }
  .meta-right { width: 100%; }
  .progress-track { width: 100%; flex: 1; }
  .progress { width: 100%; }
}
/* ===================== Admin shell ===================== */
.admin-body { background: var(--bg); }
.admin-shell { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }

.sidebar {
  background: var(--surface); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 18px 14px; position: sticky; top: 0; height: 100vh;
}
.side-brand { display: flex; align-items: center; gap: 9px; padding: 6px 8px 18px; }
.side-brand .brand-mark { width: 30px; height: 30px; }
.side-brand .brand-name { font-weight: 700; font-size: 16px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.nav-label { font-size: 11px; font-weight: 700; color: var(--ink-ghost); letter-spacing: .04em; padding: 14px 10px 6px; }
.nav-item {
  display: flex; align-items: center; gap: 11px; width: 100%; text-align: left; cursor: pointer;
  background: none; border: none; font: inherit; font-size: 14px; font-weight: 500; color: var(--ink-soft);
  padding: 10px 12px; border-radius: 10px; transition: background .15s, color .15s;
}
.nav-item svg { color: var(--ink-faint); }
.nav-item:hover { background: var(--surface-2); color: var(--ink); }
.nav-item.active { background: var(--blue-soft); color: var(--blue-deep); font-weight: 700; }
.nav-item.active svg { color: var(--blue); }
.side-foot { margin-top: auto; padding: 10px; font-size: 11px; color: var(--ink-ghost); }

.admin-main { padding: 28px clamp(18px, 3.5vw, 44px); max-width: 1100px; }
.view-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.view-head h1 { margin: 0; font-size: 23px; }
.view-sub { margin: 6px 0 0; font-size: 13px; color: var(--ink-faint); }

/* list */
.rr-avatar { width: 40px; height: 40px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center;
  font-weight: 700; color: #fff; background: linear-gradient(150deg, var(--blue), var(--blue-deep)); }

/* detail */
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-faint); margin-bottom: 16px; flex-wrap: wrap; }
.crumb-link { background: none; border: none; font: inherit; font-size: 13px; color: var(--blue-deep); cursor: pointer; padding: 0; }
.crumb-link:hover { text-decoration: underline; }
.crumb-sep { color: var(--ink-ghost); }
.crumb-cur { color: var(--ink); font-weight: 600; }

.cand-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.cand-id { display: flex; align-items: center; gap: 14px; }
.cand-avatar { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; font-weight: 700;
  color: #fff; background: linear-gradient(150deg, #5b8cff, var(--blue-deep)); }
.cand-meta h1 { margin: 0; font-size: 22px; }
.cand-meta p { margin: 3px 0 0; font-size: 13px; color: var(--ink-faint); }

.summary-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); padding: 22px 24px; margin-bottom: 18px; }
.summary-top { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
.summary-top h2 { margin: 0; font-size: 17px; }
.summary-date { font-size: 12.5px; color: var(--ink-faint); }
.total-row { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: var(--r);
  background: linear-gradient(120deg, #2f6bed 0%, #4f86ff 100%); color: #fff; margin-bottom: 16px; }
.total-label { font-size: 13px; font-weight: 600; opacity: .95; white-space: nowrap; }
.total-bar { flex: 1; height: 10px; border-radius: 999px; background: rgba(255,255,255,.28); overflow: hidden; }
.total-fill { height: 100%; width: 0; border-radius: 999px; background: #fff; transition: width 1s cubic-bezier(.4,0,.2,1); }
.total-num { font-family: var(--font-en); white-space: nowrap; }
.total-num b { font-size: 26px; font-weight: 700; }
.total-num small { font-size: 13px; opacity: .9; }
.summary-text { margin: 0 0 18px; font-size: 13.5px; color: var(--ink-soft); line-height: 1.8; }

.cat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.cat-cell { border: 1px solid var(--line); border-radius: var(--r); padding: 13px 15px; background: var(--surface-2); }
.cc-name { font-weight: 700; font-size: 13.5px; }
.cc-score { float: right; font-family: var(--font-en); color: var(--ink-soft); font-size: 12px; }
.cc-score b { font-size: 16px; color: var(--blue-deep); }
.cat-cell .cat-bar { margin: 9px 0 8px; }
.cat-cell .cat-comment { margin: 0; }

/* capture strip (admin) */
.capture-block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-sm); padding: 16px 18px; margin-bottom: 18px; }
.capture-head { font-size: 14px; font-weight: 700; margin-bottom: 12px; }
.capture-head span { color: var(--ink-faint); font-weight: 500; margin-left: 6px; font-size: 12.5px; }
.capture-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.cap { margin: 0; }
.cap img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); display: block; }
.cap figcaption { font-size: 11px; color: var(--ink-faint); text-align: center; margin-top: 4px; font-family: var(--font-en); }

.detail-grid { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(220px,1fr); gap: 16px; align-items: start; }
.detail-side { display: grid; gap: 14px; }
.transcript-block { margin-top: 0; }

/* custom questions */
.q-head-actions { display: flex; gap: 10px; }
.q-form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); padding: 24px; display: grid; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field > span { font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.field input, .field textarea, #qVoice {
  font: inherit; font-size: 14px; padding: 11px 13px; border: 1px solid var(--line-strong); border-radius: 10px;
  background: var(--surface); color: var(--ink); resize: vertical; width: 100%;
}
.field input:focus, .field textarea:focus, #qVoice:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.q-row2 { display: grid; grid-template-columns: 1fr 260px; gap: 16px; }
.q-list-head { display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.q-list { display: grid; gap: 10px; }
.q-item { display: grid; grid-template-columns: 28px 1fr auto; align-items: start; gap: 10px;
  padding: 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); }
.q-num { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-family: var(--font-en);
  font-weight: 700; font-size: 13px; color: var(--blue-deep); background: var(--blue-soft); }
.q-text { font: inherit; font-size: 14px; padding: 9px 11px; border: 1px solid var(--line-strong); border-radius: 9px; resize: vertical; background: var(--surface); color: var(--ink); }
.q-text:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.q-item-actions { display: flex; flex-direction: column; gap: 4px; }
.q-mini { width: 28px; height: 24px; border: 1px solid var(--line-strong); background: var(--surface); border-radius: 7px; cursor: pointer; color: var(--ink-soft); font-size: 12px; line-height: 1; }
.q-mini:hover { border-color: var(--blue); color: var(--blue-deep); }
.q-mini.danger:hover { border-color: var(--rec); color: var(--rec); }
.q-actions { display: flex; align-items: center; gap: 12px; }
.q-status { font-size: 13px; color: var(--ink-soft); }

@media (max-width: 820px) {
  .admin-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; align-items: center; gap: 6px; overflow-x: auto; }
  .side-brand { padding: 6px 8px; }
  .nav-label, .side-foot { display: none; }
  .side-nav { flex-direction: row; }
  .cat-grid { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .q-row2 { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition-duration: .001ms !important; }
}
