/* =========================================================
   Kállos 面试表格 —— Apple liquid glass，配色字体跟 assessment 一致
   ========================================================= */
:root {
  --brand: #1b1916;
  --brand-ink: #f7f2e8;
  --accent: #a8865a;
  --accent-deep: #5b4630;
  --sand: #d6b68a;
  --bg: #edeae2;
  --ink: #1b1916;
  --ink-2: #4c463d;
  --muted: #8f877a;
  --line: rgba(120, 104, 80, .16);
  --danger: #b4492f;
  --ok: #3f7a55;
  --grad: linear-gradient(115deg, #5b4630 5%, #a8865a 55%, #d6b68a 100%);
  --num: "DM Serif Display", "Didot", "Bodoni 72", Georgia, serif;
  --sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans SC", "Segoe UI", sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);

  /* 玻璃 */
  --glass: rgba(255, 255, 255, .42);
  --glass-strong: rgba(255, 255, 255, .62);
  --glass-edge: rgba(255, 255, 255, .78);
  --glass-blur: blur(28px) saturate(170%);
  --glass-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .9),
    inset 0 -1px 0 rgba(255, 255, 255, .25),
    0 1px 2px rgba(40, 30, 18, .05),
    0 24px 48px -24px rgba(60, 44, 24, .28);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
button, input, textarea, select { font: inherit; color: inherit; }

/* ---------- 背景光斑（玻璃后面要有东西才看得出折射） ---------- */
.aura { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.aura i { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .75; animation: drift 22s ease-in-out infinite alternate; }
.aura .b1 { width: 62vmax; height: 62vmax; left: -22vmax; top: -24vmax; background: radial-gradient(circle, #d6b68a 0%, rgba(214, 182, 138, 0) 68%); }
.aura .b2 { width: 54vmax; height: 54vmax; right: -20vmax; top: 18vh; background: radial-gradient(circle, #c9a77a 0%, rgba(201, 167, 122, 0) 66%); animation-duration: 28s; animation-delay: -6s; }
.aura .b3 { width: 48vmax; height: 48vmax; left: 8vw; bottom: -26vmax; background: radial-gradient(circle, #b9ac8d 0%, rgba(185, 172, 141, 0) 66%); animation-duration: 31s; animation-delay: -12s; }
.aura .b4 { width: 26vmax; height: 26vmax; right: 12vw; top: -6vmax; background: radial-gradient(circle, #fff7ea 0%, rgba(255, 247, 234, 0) 70%); opacity: .9; animation-duration: 19s; }
@keyframes drift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(4vw, 3vh, 0) scale(1.08); }
  100% { transform: translate3d(-3vw, 5vh, 0) scale(.96); }
}

.app {
  position: relative;
  z-index: 1;
  max-width: 600px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  padding: max(14px, env(safe-area-inset-top)) 16px max(28px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
}

/* ---------- 玻璃元件 ---------- */
.glass {
  position: relative;
  background: linear-gradient(160deg, rgba(255, 255, 255, .58), rgba(255, 255, 255, .28));
  border: 1px solid var(--glass-edge);
  border-radius: 28px;
  -webkit-backdrop-filter: var(--glass-blur);
          backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow);
}
/* 高光：左上角一道反光 */
.glass::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg, rgba(255, 255, 255, .95), rgba(255, 255, 255, 0) 38%, rgba(255, 255, 255, 0) 70%, rgba(255, 255, 255, .55));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}
.card { padding: 22px 18px; }
@media (min-width: 520px) { .card { padding: 28px 26px; } }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky;
  top: max(10px, env(safe-area-inset-top));
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 8px 8px;
  margin-bottom: 18px;
  border-radius: 999px;
}
.topbar .logo { height: 22px; width: auto; display: block; margin-left: 6px; }
.icon-btn {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .55);
  box-shadow: inset 0 1px 0 #fff, 0 2px 6px -2px rgba(40, 30, 18, .18);
  cursor: pointer;
  color: var(--ink-2);
  transition: transform .15s var(--ease);
}
.icon-btn:active { transform: scale(.92); }
.icon-btn[hidden] { visibility: hidden; display: grid; }
.progress { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.progress .meta { display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; letter-spacing: .06em; color: var(--ink-2); }
.progress .meta span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.progress .meta b { font-family: var(--num); font-weight: 400; font-size: 14px; color: var(--accent); letter-spacing: 0; }
.track { height: 5px; border-radius: 99px; background: rgba(120, 104, 80, .14); overflow: hidden; }
.track i { display: block; height: 100%; border-radius: inherit; background: var(--grad); transition: width .5s var(--ease); }

/* ---------- 画面切换 ---------- */
.screen { flex: 1; display: flex; flex-direction: column; animation: enter .5s var(--ease) both; }
.screen.back { animation-name: enter-back; }
@keyframes enter { from { opacity: 0; transform: translateY(14px) scale(.985); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes enter-back { from { opacity: 0; transform: translateY(-14px) scale(.985); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- 文字 ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .14em;
  color: var(--accent-deep);
  text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: var(--grad); }
.display { font-weight: 800; font-size: clamp(28px, 7.6vw, 40px); line-height: 1.22; letter-spacing: -.015em; margin: 0 0 12px; }
.title { font-weight: 800; font-size: clamp(22px, 5.8vw, 27px); line-height: 1.3; letter-spacing: -.01em; margin: 0 0 6px; }
.title small { display: block; margin-top: 4px; font-size: 13.5px; font-weight: 600; letter-spacing: .02em; color: var(--muted); }
.hl { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sub { color: var(--ink-2); font-size: 15.5px; margin: 0 0 20px; }
.qnum { font-family: var(--num); font-size: 54px; line-height: 1; margin: 0 0 6px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.qnum span { font-size: 22px; color: var(--muted); -webkit-text-fill-color: var(--muted); }
.question-text { font-size: clamp(20px, 5.4vw, 24px); font-weight: 700; line-height: 1.45; margin: 0 0 18px; }

/* ---------- 开场 ---------- */
.intro { justify-content: center; gap: 18px; padding: 4vh 0 0; }
.intro .logo-big { width: 128px; height: auto; display: block; margin-bottom: 4px; }
.hero-card { overflow: hidden; padding: 0; }
.hero-card .photo { height: 210px; background: center 30% / cover no-repeat; -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent); }
.hero-card .body { padding: 0 20px 22px; margin-top: -36px; position: relative; }
.stats { list-style: none; margin: 0; padding: 14px 4px; display: grid; grid-template-columns: repeat(3, 1fr); border-radius: 22px; }
.stats li { display: flex; flex-direction: column; align-items: center; gap: 0; animation: rise .5s var(--ease) both; }
.stats li + li { border-left: 1px solid var(--line); }
.stats li:nth-child(2) { animation-delay: .08s; } .stats li:nth-child(3) { animation-delay: .16s; }
.stats strong { font-family: var(--num); font-weight: 400; font-size: 32px; line-height: 1.15; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stats span { font-size: 12.5px; color: var(--ink-2); }
.steps-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.steps-list li { display: flex; align-items: center; gap: 12px; font-size: 14.5px; color: var(--ink-2); }
.steps-list li i { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-style: normal; font-size: 12px; font-weight: 800; color: var(--accent-deep); background: rgba(255, 255, 255, .65); box-shadow: inset 0 1px 0 #fff, 0 1px 3px rgba(60, 44, 24, .15); }

/* ---------- 表单 ---------- */
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; }
.field { display: flex; flex-direction: column; gap: 6px; grid-column: span 2; min-width: 0; }
.field.half { grid-column: span 1; }
@media (max-width: 380px) { .field.half { grid-column: span 2; } }
.field > label, .field > .lab { font-size: 13.5px; font-weight: 700; color: var(--ink); line-height: 1.35; }
.field > label em, .field > .lab em { font-style: normal; font-weight: 600; color: var(--muted); font-size: 12px; margin-left: 4px; }
.field > label .req { color: var(--accent); margin-left: 2px; }
.input, .textarea, .select {
  width: 100%;
  min-height: 50px;
  padding: 12px 15px;
  font-size: 16px; /* 16px 以上 iPhone 才不会自动放大 */
  border: 1px solid rgba(255, 255, 255, .85);
  border-radius: 16px;
  background: rgba(255, 255, 255, .55);
  box-shadow: inset 0 1px 2px rgba(60, 44, 24, .08);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
  -webkit-appearance: none;
          appearance: none;
}
.input::placeholder, .textarea::placeholder { color: #a79e8f; }
.input:focus, .textarea:focus, .select:focus {
  background: rgba(255, 255, 255, .82);
  border-color: rgba(168, 134, 90, .55);
  box-shadow: 0 0 0 4px rgba(214, 182, 138, .28), inset 0 1px 2px rgba(60, 44, 24, .06);
}
.input[type="date"], .input[type="month"] { min-height: 50px; line-height: 1.4; }
.select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%234c463d' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 15px center; padding-right: 38px; }
.textarea { min-height: 170px; resize: vertical; line-height: 1.65; }
.field.bad .input, .field.bad .textarea, .field.bad .select, .field.bad .chips { border-color: rgba(180, 73, 47, .6); box-shadow: 0 0 0 3px rgba(180, 73, 47, .12); }
.field.bad .chips { border-radius: 18px; }
.err { display: none; font-size: 12.5px; color: var(--danger); font-weight: 600; }
.field.bad .err { display: block; }
.count { align-self: flex-end; font-size: 12px; color: var(--muted); }
.hint { font-size: 12.5px; color: var(--muted); margin: 0; }

/* 选项胶囊 */
.chips { display: flex; flex-wrap: wrap; gap: 8px; border: 1px solid transparent; }
.chip {
  position: relative;
  padding: 11px 17px;
  border: 1px solid rgba(255, 255, 255, .85);
  border-radius: 999px;
  background: rgba(255, 255, 255, .5);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 2px 6px -3px rgba(60, 44, 24, .2);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .15s var(--ease), background .2s, color .2s, box-shadow .2s;
}
.chip:active { transform: scale(.96); }
.chip[aria-pressed="true"] {
  color: var(--brand-ink);
  background: linear-gradient(135deg, #3a332b, #1b1916 65%);
  border-color: rgba(27, 25, 22, .6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 8px 18px -8px rgba(27, 25, 22, .55);
}
.chip.big { flex: 1 1 calc(50% - 8px); text-align: left; border-radius: 18px; padding: 14px 16px; }

/* 学历 / 工作 多行 */
.rows { display: grid; gap: 12px; }
.row-card { padding: 16px 14px 14px; border-radius: 22px; animation: rise .4s var(--ease) both; }
.row-card .row-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.row-card .row-head b { font-family: var(--num); font-weight: 400; font-size: 20px; color: var(--accent); }
.row-card .row-head button { border: 0; background: none; color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; padding: 6px 4px; }
.add-row {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 52px; margin-top: 12px;
  border: 1.5px dashed rgba(168, 134, 90, .5);
  border-radius: 20px;
  background: rgba(255, 255, 255, .28);
  color: var(--accent-deep); font-weight: 700; font-size: 15px; cursor: pointer;
}
.add-row:disabled { opacity: .4; cursor: default; }
.check {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 14px; border-radius: 18px;
  background: rgba(255, 255, 255, .42);
  border: 1px solid rgba(255, 255, 255, .8);
  cursor: pointer; font-size: 14.5px; line-height: 1.55; color: var(--ink-2);
}
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check .box {
  flex: none; width: 22px; height: 22px; margin-top: 1px; border-radius: 7px;
  background: rgba(255, 255, 255, .8); border: 1.5px solid rgba(120, 104, 80, .35);
  display: grid; place-items: center; transition: background .2s, border-color .2s;
}
.check .box svg { width: 14px; height: 14px; opacity: 0; transition: opacity .15s; }
.check input:checked + .box { background: var(--brand); border-color: var(--brand); }
.check input:checked + .box svg { opacity: 1; }
.check input:focus-visible + .box { box-shadow: 0 0 0 4px rgba(214, 182, 138, .4); }
.check small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.field.bad .check { border-color: rgba(180, 73, 47, .6); }

/* 上传 */
.drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 150px; padding: 20px; text-align: center;
  border: 1.5px dashed rgba(168, 134, 90, .55); border-radius: 24px;
  background: rgba(255, 255, 255, .3); cursor: pointer; color: var(--ink-2);
  transition: background .2s, border-color .2s;
}
.drop.over, .drop:hover { background: rgba(255, 255, 255, .55); border-color: var(--accent); }
.drop svg { width: 34px; height: 34px; color: var(--accent); }
.drop b { font-size: 15.5px; color: var(--ink); }
.drop span { font-size: 12.5px; color: var(--muted); }
.files { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.files li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; background: rgba(255, 255, 255, .55); border: 1px solid rgba(255, 255, 255, .85); font-size: 14px; animation: rise .3s var(--ease) both; }
.files .thumb { flex: none; width: 40px; height: 40px; border-radius: 10px; background: #efe4d0 center / cover; display: grid; place-items: center; font-size: 11px; font-weight: 800; color: var(--accent-deep); }
.files .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.files .st { font-size: 12px; color: var(--muted); white-space: nowrap; }
.files .st.ok { color: var(--ok); }
.files .st.bad { color: var(--danger); }
.files button { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 4px; font-size: 18px; line-height: 1; }

/* 签名 */
.sign-wrap { position: relative; border-radius: 22px; overflow: hidden; background: rgba(255, 255, 255, .78); border: 1px solid rgba(255, 255, 255, .9); box-shadow: inset 0 1px 3px rgba(60, 44, 24, .1); }
.sign-wrap canvas { display: block; width: 100%; height: 180px; touch-action: none; cursor: crosshair; }
.sign-wrap .base { position: absolute; left: 22px; right: 22px; bottom: 42px; border-bottom: 1.5px dashed rgba(120, 104, 80, .35); pointer-events: none; }
.sign-wrap .ph { position: absolute; inset: 0; display: grid; place-items: center; color: #b5ab9a; font-size: 15px; pointer-events: none; transition: opacity .2s; }
.sign-wrap.has .ph { opacity: 0; }
.sign-wrap .clear { position: absolute; right: 10px; top: 10px; border: 0; padding: 6px 12px; border-radius: 999px; background: rgba(27, 25, 22, .06); font-size: 12.5px; font-weight: 700; color: var(--ink-2); cursor: pointer; }
.field.bad .sign-wrap { border-color: rgba(180, 73, 47, .6); }
.decl { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }

/* ---------- 底部按钮 ---------- */
.foot { margin-top: auto; padding-top: 22px; }
.btn {
  position: relative;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 58px; padding: 16px 22px;
  font-size: 17px; font-weight: 700; letter-spacing: .02em; text-decoration: none;
  color: var(--brand-ink);
  background: linear-gradient(135deg, #3a332b, var(--brand) 60%);
  border: 0; border-radius: 999px; cursor: pointer; overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 14px 28px -14px rgba(27, 25, 22, .8);
  transition: transform .15s var(--ease), opacity .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(.985); }
.btn:disabled { opacity: .45; cursor: default; transform: none; }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn .arrow { transition: transform .2s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }
.btn.shine::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(214, 182, 138, .5) 50%, transparent 70%);
  background-size: 250% 100%; animation: shine 3.4s ease-in-out infinite; pointer-events: none;
}
@keyframes shine { 0%, 55% { background-position: 130% 0; } 100% { background-position: -130% 0; } }
.btn .spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(247, 242, 232, .35); border-top-color: #f7f2e8; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn.ghost { color: var(--ink); background: rgba(255, 255, 255, .5); box-shadow: inset 0 1px 0 #fff, 0 6px 16px -10px rgba(60, 44, 24, .4); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.fineprint { text-align: center; font-size: 12.5px; color: var(--muted); margin: 12px 0 0; }
.saved { display: inline-flex; align-items: center; gap: 6px; }
.saved::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
.form-err { margin: 12px 0 0; padding: 10px 14px; border-radius: 14px; background: rgba(180, 73, 47, .1); color: var(--danger); font-size: 14px; font-weight: 600; text-align: center; }

/* ---------- 完成 ---------- */
.done { justify-content: center; align-items: center; text-align: center; padding-top: 6vh; }
.done .seal {
  width: 104px; height: 104px; margin: 0 auto 22px; border-radius: 50%;
  display: grid; place-items: center;
  animation: pop .7s var(--ease) both;
}
.done .seal svg { width: 46px; height: 46px; color: var(--accent-deep); }
@keyframes pop { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: none; } }
.ref { display: inline-block; margin: 6px 0 18px; padding: 8px 18px; border-radius: 999px; font-family: var(--num); font-size: 22px; letter-spacing: .12em; color: var(--accent-deep); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
/* 不支援 backdrop-filter 的浏览器：玻璃改成实一点的白 */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background: rgba(251, 249, 245, .94); }
}

/* ---------- 开场：Welcome + 介绍 ---------- */
.intro { justify-content: flex-start; gap: 16px; padding-top: 2vh; }
.welcome { font-family: var(--num); font-weight: 400; font-size: clamp(54px, 17vw, 84px); line-height: 1; letter-spacing: -.02em; margin: 2px 0 12px; }
.about { animation: rise .6s .1s var(--ease) both; }
.about-lead { margin: 0 0 10px; font-size: 17px; font-weight: 700; line-height: 1.55; }
.about-text { margin: 0 0 18px; font-size: 15px; color: var(--ink-2); line-height: 1.75; }
.about b { color: var(--accent-deep); font-weight: 700; }
.pillars { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pillars li { display: flex; flex-direction: column; gap: 2px; padding: 12px 10px; border-radius: 18px; background: rgba(255, 255, 255, .5); border: 1px solid rgba(255, 255, 255, .85); box-shadow: inset 0 1px 0 #fff; }
.pillars i { font-style: normal; font-family: var(--num); font-size: 18px; line-height: 1.1; color: var(--accent); }
.pillars b { font-size: 14px; color: var(--ink) !important; }
.pillars span { font-size: 11.5px; color: var(--muted); line-height: 1.35; }
.intro .stats { animation: rise .6s .2s var(--ease) both; }
