:root{
  --navy:#0F1B2D;
  --ink:#101828;
  --paper:#EEF2F7;
  --paper2:#F7F9FC;
  --sapphire:#2554F5;
  --emerald:#12B76A;
  --amber:#F59E0B;
  --line:#D7DEEA;
  --glass: rgba(255,255,255,0.72);
  --grad: linear-gradient(120deg, var(--sapphire), var(--emerald));
}
*{box-sizing:border-box; -webkit-tap-highlight-color:transparent;}
html,body{margin:0;padding:0;}
body{
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Malgun Gothic","Apple SD Gothic Neo",Pretendard,sans-serif;
  background:
    radial-gradient(1200px 600px at 100% -10%, rgba(37,84,245,0.10), transparent 60%),
    radial-gradient(1000px 500px at -10% 110%, rgba(18,183,106,0.10), transparent 60%),
    var(--paper);
  color:var(--ink);
  min-height:100vh;
  -webkit-font-smoothing:antialiased;
}
#app{max-width:560px; margin:0 auto; min-height:100vh; display:flex; flex-direction:column; padding:20px 18px 40px;}
.top-row{display:flex; justify-content:space-between; align-items:center; margin-bottom:18px;}
.brand{display:flex; align-items:center; gap:8px; font-weight:700; font-size:14px; letter-spacing:0.02em; color:#334155;}
.brand .dot{width:9px;height:9px;border-radius:50%;background:var(--grad);}
.link-btn{font-size:12.5px; color:#475467; background:none; border:none; cursor:pointer; text-decoration:underline; text-underline-offset:3px; padding:4px;}

.glass{
  background:var(--glass);
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
  border:1px solid rgba(255,255,255,0.6);
  border-radius:20px;
  box-shadow:0 8px 30px rgba(16,24,40,0.07);
}

/* Session bar */
.session-bar{display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:12px; font-size:11.5px; color:#667085;}
.session-bar b{color:#344054; letter-spacing:0.05em;}
.session-bar .acts{display:flex; gap:10px;}

/* Landing */
.hero{padding:30px 24px 26px; margin-bottom:16px; position:relative; overflow:hidden;}
.hero::before{
  content:"";position:absolute; inset:-2px; border-radius:20px; padding:1px;
  background:var(--grad); opacity:0.35; pointer-events:none;
  -webkit-mask:linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite:xor; mask-composite:exclude;
}
.eyebrow{font-size:11.5px; font-weight:700; letter-spacing:0.12em; text-transform:uppercase;
  background:var(--grad); -webkit-background-clip:text; background-clip:text; color:transparent;}
.h1{font-size:26px; font-weight:800; line-height:1.32; margin:10px 0 8px; letter-spacing:-0.01em;}
.sub{font-size:14px; color:#475467; line-height:1.55; margin-bottom:20px;}
.steps-mini{display:flex; gap:10px; margin-bottom:22px;}
.step-chip{flex:1; text-align:center; font-size:11.5px; color:#667085; padding:9px 4px; border-radius:12px; background:rgba(255,255,255,0.6); border:1px solid var(--line);}
.step-chip b{display:block; font-size:13px; color:var(--ink); margin-bottom:2px;}
input[type=text]{
  width:100%; padding:14px 16px; border-radius:14px; border:1.5px solid var(--line);
  font-size:15px; background:#fff; margin-bottom:12px; color:var(--ink);
}
input[type=text]:focus{outline:none; border-color:var(--sapphire);}
.btn{
  display:block; width:100%; text-align:center; padding:15px 18px; border-radius:14px;
  border:none; font-size:15.5px; font-weight:700; cursor:pointer; color:#fff;
  background:var(--grad); box-shadow:0 10px 24px rgba(37,84,245,0.25);
  transition:transform .15s ease, box-shadow .15s ease;
}
.btn:active{transform:scale(0.98);}
.btn.secondary{background:#fff; color:var(--ink); border:1.5px solid var(--line); box-shadow:none;}
.btn.ghost{background:transparent; color:#475467; box-shadow:none; border:1.5px dashed var(--line);}
.footer-link{text-align:center; margin-top:18px; font-size:12.5px; color:#667085;}
.footer-link button{background:none;border:none;color:var(--sapphire);font-weight:600;cursor:pointer;font-size:12.5px;text-decoration:underline;text-underline-offset:3px;}

/* Quiz */
.progress-wrap{margin-bottom:22px;}
.progress-labels{display:flex; justify-content:space-between; font-size:12px; color:#667085; margin-bottom:8px;}
.progress-track{height:6px; background:#DEE4EE; border-radius:99px; overflow:hidden;}
.progress-fill{height:100%; background:var(--grad); border-radius:99px; transition:width .35s ease;}
.section-tag{display:inline-block; font-size:11.5px; font-weight:700; padding:5px 11px; border-radius:99px;
  background:rgba(37,84,245,0.08); color:var(--sapphire); margin-bottom:14px;}
.q-card{padding:26px 22px; margin-bottom:16px; min-height:120px;}
.q-num{font-size:12px; color:#98A2B3; margin-bottom:10px; font-weight:600;}
.q-text{font-size:18px; font-weight:700; line-height:1.5; color:var(--ink);}
.choice-btn{
  width:100%; text-align:left; padding:16px 18px; border-radius:14px; border:1.5px solid var(--line);
  background:#fff; font-size:14.5px; line-height:1.5; margin-bottom:10px; cursor:pointer; color:var(--ink);
  transition:border-color .15s, background .15s;
}
.choice-btn:active{background:#F0F4FF; border-color:var(--sapphire);}
.bipolar-stmt{font-size:15px; font-weight:600; line-height:1.55; color:var(--ink); margin-bottom:12px; display:flex; gap:8px; align-items:flex-start;}
.pole-tag{flex-shrink:0; width:22px; height:22px; border-radius:7px; display:flex; align-items:center; justify-content:center; font-size:11.5px; font-weight:800; color:#fff; margin-top:1px;}
.pole-tag.a{background:var(--sapphire);}
.pole-tag.b{background:var(--emerald);}
.likert-row{display:flex; gap:8px; margin-top:18px;}
.likert-btn{
  flex:1; padding:14px 4px; border-radius:12px; border:1.5px solid var(--line); background:#fff;
  font-size:12.5px; font-weight:600; color:#667085; cursor:pointer; text-align:center;
}
.likert-btn small{display:block; font-weight:400; font-size:10.5px; margin-top:3px; color:#98A2B3;}
.likert-btn:active{background:#F0F4FF; border-color:var(--sapphire); color:var(--sapphire);}
.back-row{display:flex; justify-content:flex-start; margin-bottom:8px;}
.back-btn{background:none;border:none;color:#98A2B3;font-size:13px;cursor:pointer;padding:6px 0;}

/* Result */
.result-card{padding:30px 24px; margin-bottom:16px; text-align:center; position:relative; overflow:hidden;}
.result-card::before{
  content:"";position:absolute; inset:-2px; border-radius:20px; padding:1.5px; pointer-events:none;
  background:var(--grad); -webkit-mask:linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite:xor; mask-composite:exclude;
}
.r-name{font-size:13px; color:#667085; margin-bottom:4px;}
.r-mbti{font-size:42px; font-weight:900; letter-spacing:0.04em; background:var(--grad); -webkit-background-clip:text; background-clip:text; color:transparent; margin:6px 0 2px;}
.r-mbti-label{font-size:12.5px; color:#98A2B3; margin-bottom:18px;}
.r-row{display:flex; gap:10px; margin-bottom:10px;}
.r-block{flex:1; background:#fff; border:1px solid var(--line); border-radius:14px; padding:14px 10px;}
.r-block .k{font-size:10.5px; color:#98A2B3; font-weight:700; letter-spacing:0.04em; text-transform:uppercase; margin-bottom:5px;}
.r-block .v{font-size:14.5px; font-weight:700; color:var(--ink);}
.chips{display:flex; flex-wrap:wrap; gap:6px; justify-content:center; margin-top:6px;}
.chip{font-size:12px; font-weight:600; padding:6px 12px; border-radius:99px; background:rgba(18,183,106,0.1); color:#0B7A46;}
.chip.blue{background:rgba(37,84,245,0.08); color:var(--sapphire);}
.saved-badge{display:inline-flex; align-items:center; gap:6px; font-size:12.5px; color:#0B7A46; background:rgba(18,183,106,0.1); padding:7px 14px; border-radius:99px; margin-top:14px; font-weight:600;}
.result-caption{font-size:11px; color:#98A2B3; font-weight:600; margin:14px 0 6px; text-align:left;}
.axis-wrap{margin:16px 0; text-align:left;}
.axis-row{margin-bottom:10px;}
.axis-labels{display:flex; justify-content:space-between; font-size:12px; font-weight:700; color:#475467; margin-bottom:4px;}
.axis-track{display:flex; height:10px; border-radius:99px; overflow:hidden; background:#F2F5F9;}
.axis-fill-a{background:var(--sapphire); height:100%;}
.axis-fill-b{background:var(--emerald); height:100%;}
.ai-body{font-size:13px; color:#344054; line-height:1.75; white-space:pre-line; text-align:left;}
.btn:disabled{opacity:0.5; cursor:not-allowed;}
.p-row{display:flex; align-items:center; gap:12px;}
.p-ai-toggle{font-size:11.5px; color:var(--sapphire); background:none; border:none; cursor:pointer; margin-top:8px; padding:0; font-weight:600;}
.p-ai-body{font-size:12px; color:#475467; line-height:1.7; white-space:pre-line; margin-top:8px; padding-top:8px; border-top:1px dashed var(--line);}
.ai-meta{font-size:11px; color:#98A2B3; margin-top:8px;}
.arche-title{font-size:21px; font-weight:800; background:var(--grad); -webkit-background-clip:text; background-clip:text; color:transparent; margin-bottom:5px; text-align:left;}
.arche-persona{font-size:12.5px; color:#667085; font-style:italic; margin-bottom:12px; line-height:1.6; text-align:left;}
.arche-summary{font-size:13.5px; color:#344054; line-height:1.75; margin-bottom:14px; text-align:left;}
.arche-tips{margin:0 0 14px 0; padding:0; list-style:none;}
.arche-tips li{font-size:13px; color:#344054; line-height:1.6; padding-left:22px; position:relative; margin-bottom:7px; text-align:left;}
.arche-tips li::before{content:"✓"; position:absolute; left:0; color:var(--emerald); font-weight:800;}
.arche-comm{font-size:12.5px; color:#B54708; background:rgba(245,158,11,0.1); padding:10px 12px; border-radius:10px; line-height:1.6; text-align:left;}

/* Facilitator */
.fac-header{margin-bottom:18px;}
.fac-title{font-size:22px; font-weight:800; margin-bottom:4px;}
.fac-sub{font-size:13px; color:#667085;}
.stat-row{display:flex; gap:10px; margin:16px 0;}
.stat{flex:1; text-align:center; padding:14px 6px;}
.stat .num{font-size:24px; font-weight:800; background:var(--grad); -webkit-background-clip:text; background-clip:text; color:transparent;}
.stat .lbl{font-size:11px; color:#667085; margin-top:2px;}
.panel{padding:20px; margin-bottom:14px;}
.panel-title{font-size:14.5px; font-weight:700; margin-bottom:14px; display:flex; align-items:center; gap:7px;}
.panel-title .bar{width:4px; height:14px; border-radius:2px; background:var(--grad); display:inline-block;}
.mbti-grid{display:grid; grid-template-columns:repeat(4,1fr); gap:6px;}
.mbti-cell{aspect-ratio:1; border-radius:12px; background:#F2F5F9; border:1px solid var(--line); display:flex; flex-direction:column; align-items:center; justify-content:center; font-size:11px; font-weight:700; color:#98A2B3;}
.mbti-cell.on{background:linear-gradient(135deg, rgba(37,84,245,0.12), rgba(18,183,106,0.12)); border-color:rgba(37,84,245,0.3); color:var(--ink);}
.mbti-cell .cnt{font-size:15px; font-weight:800; color:var(--sapphire); margin-top:2px;}
.bar-row{display:flex; align-items:center; gap:10px; margin-bottom:9px; font-size:12.5px;}
.bar-label{width:76px; flex-shrink:0; color:#475467; font-weight:600;}
.bar-track{flex:1; height:16px; background:#F2F5F9; border-radius:8px; overflow:hidden;}
.bar-fill{height:100%; background:var(--grad); border-radius:8px; transition:width .4s ease;}
.bar-cnt{width:20px; text-align:right; font-weight:700; color:var(--ink); flex-shrink:0;}
.gap-note{font-size:12.5px; color:#B54708; background:rgba(245,158,11,0.1); padding:10px 12px; border-radius:10px; margin-top:10px; line-height:1.5;}
.p-card{padding:14px 16px; margin-bottom:8px;}
.p-avatar{width:38px; height:38px; border-radius:50%; background:var(--grad); color:#fff; display:flex; align-items:center; justify-content:center; font-weight:700; font-size:14px; flex-shrink:0;}
.p-info{flex:1; min-width:0;}
.p-name{font-size:14px; font-weight:700; margin-bottom:2px;}
.p-meta{font-size:11.5px; color:#667085; display:flex; gap:6px; flex-wrap:wrap;}
.p-meta span{background:#F2F5F9; padding:2px 8px; border-radius:99px;}
.empty{text-align:center; padding:40px 20px; color:#98A2B3; font-size:13.5px;}
.small-btn{font-size:12px; color:#98A2B3; background:none; border:none; cursor:pointer; text-decoration:underline; text-underline-offset:2px;}
.disclaimer{font-size:11px; color:#98A2B3; line-height:1.6; text-align:center; margin-top:22px; padding:0 6px;}
