:root{
  --bg:#f2f2f7; --card:#ffffff; --ink:#1c1c1e; --sub:#8a8a8e;
  --line:#e4e4e8; --accent:#0a72ff; --accent-soft:#eaf2ff;
  --badge-blue:#e8f1ff; --badge-blue-ink:#0a72ff;
  --badge-green:#e6f7ee; --badge-green-ink:#1f9d55;
  --badge-orange:#fff2e2; --badge-orange-ink:#c8722f;
  --badge-purple:#f1ecff; --badge-purple-ink:#6c4fff;
  --badge-red:#fdeceb; --badge-red-ink:#d94f3f;
  --gold:#c99a3e; --gold-soft:#fbf3e0;
  --sab-top:env(safe-area-inset-top,0px);
  --sab-bottom:env(safe-area-inset-bottom,0px);
}
*{box-sizing:border-box;}
html,body{height:100%;}
body{
  margin:0; background:var(--bg); color:var(--ink);
  font-family:-apple-system,BlinkMacSystemFont,'SF Pro Display','Pretendard','Apple SD Gothic Neo','Malgun Gothic',sans-serif;
  line-height:1.5; font-size:16px; letter-spacing:-.1px;
  -webkit-font-smoothing:antialiased; overscroll-behavior-y:none;
}
#app{max-width:520px; margin:0 auto; min-height:100vh; display:flex; flex-direction:column; background:var(--bg); position:relative;}

.icon{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;vertical-align:-3px;flex-shrink:0;}

/* top bar */
.topbar{
  position:sticky; top:0; z-index:20; padding:calc(10px + var(--sab-top)) 16px 10px;
  background:rgba(242,242,247,.85); backdrop-filter:blur(10px); display:flex; align-items:center; justify-content:space-between;
  border-bottom:1px solid var(--line);
}
.topbar .title{font-weight:800; font-size:19px; letter-spacing:-.4px;}
.topbar .action{color:var(--accent); font-size:13.5px; font-weight:700; background:none; border:none; padding:6px; cursor:pointer;}

/* body */
.view{flex:1; padding:14px 16px calc(90px + var(--sab-bottom)); overflow-y:auto;}
.hidden{display:none !important;}

.sectiontag{font-size:11px; font-weight:800; color:var(--sub); text-transform:uppercase; letter-spacing:.06em; margin:14px 2px 6px;}
.sectiontag:first-child{margin-top:0;}

/* grouped list */
.grouped{background:#fff; border-radius:14px; margin-bottom:12px; overflow:hidden; box-shadow:0 1px 2px rgba(20,20,30,.04);}
.row{display:flex; align-items:center; gap:11px; padding:12px 13px; border-bottom:.5px solid var(--line); font-size:14.5px; min-height:22px;}
.row:last-child{border-bottom:none;}
.row .badge{width:28px;height:28px;border-radius:8px;display:flex;align-items:center;justify-content:center;flex-shrink:0;}
.row .badge .icon{width:15px;height:15px;}
.row .label{flex:1; font-weight:500;}
.row .value{color:var(--sub); font-size:13px;}
.row .chev{width:15px;height:15px;color:#c7c7cc;}
.row input, .row textarea{
  flex:1; border:none; outline:none; font-size:14.5px; font-family:inherit; background:transparent; color:var(--ink); resize:none; padding:4px 0;
}
.row textarea{min-height:20px;}

/* profile card */
.profile-card{
  background:linear-gradient(160deg,#1c1d22,#0b0b0d); color:#fff; border-radius:20px; padding:20px;
  margin-bottom:12px; position:relative; overflow:hidden;
}
.profile-card::after{content:"";position:absolute;inset:0;background:radial-gradient(260px 140px at 100% 0%, rgba(255,255,255,.16), transparent); pointer-events:none;}
.profile-card > *{position:relative;}
.profile-row{display:flex; align-items:center; gap:14px; margin-bottom:6px;}
.avatar-photo{
  width:56px;height:56px;border-radius:50%;background:#2a2b30;border:1.5px solid rgba(255,255,255,.25);
  display:flex;align-items:center;justify-content:center;flex-shrink:0;overflow:hidden;
}
.avatar-photo img{width:100%;height:100%;object-fit:cover;}
.avatar-photo .icon{width:26px;height:26px;stroke:#8a8a8e;}
.profile-card .nm{font-weight:800; font-size:18px; letter-spacing:-.3px;}
.profile-card .role{font-size:12.5px; opacity:.65; margin-top:3px;}
.verified{display:inline-flex; align-items:center; gap:4px; background:rgba(255,255,255,.12); border-radius:999px; padding:3px 10px; font-size:10.5px; margin-top:10px; font-weight:700;}

/* contact/info rows living INSIDE the profile-card block itself (same template/design, not a separate white card) */
.profile-card .card-info{margin-top:14px; padding-top:12px; border-top:1px solid rgba(255,255,255,.16);}
.profile-card .card-info .row{padding:7px 0; border-bottom:1px solid rgba(255,255,255,.1); font-size:13.5px;}
.profile-card .card-info .row:last-child{border-bottom:none;}
.profile-card .card-info .row .badge{background:rgba(255,255,255,.16);}
.profile-card .card-info .row .label{color:#fff; opacity:.92; font-weight:500;}

/* step heading (large two-line question, like SLICE onboarding) */
.step-heading{font-size:21px; font-weight:800; line-height:1.38; letter-spacing:-.3px; margin:6px 0 20px;}

/* full-width option row (purpose/industry picker) */
.option-row{
  display:flex; align-items:center; gap:14px; background:#fff; border:1.4px solid var(--line); border-radius:14px;
  padding:16px 16px; margin-bottom:10px; cursor:pointer; font-family:inherit; width:100%; text-align:left;
}
.option-row .oicon{
  width:40px;height:40px;border-radius:11px;background:var(--chip, var(--bg));display:flex;align-items:center;justify-content:center;flex-shrink:0;
}
.option-row .oicon .icon{width:19px;height:19px;}
.option-row .olabel{font-size:15px; font-weight:700; flex:1;}
.option-row.on{border-color:var(--accent); background:var(--accent-soft);}
.option-row.on .oicon{background:var(--accent); }
.option-row.on .oicon .icon{stroke:#fff;}
.option-row .ochev{width:16px;height:16px;color:#c7c7cc;}

/* color swatch picker */
.swatch-row{display:flex; gap:14px; justify-content:center; flex-wrap:wrap; margin:22px 0 10px;}
.swatch{
  width:40px;height:40px;border-radius:50%; border:2px solid var(--line); cursor:pointer; position:relative;
  display:flex; align-items:center; justify-content:center;
}
.swatch.on{border-color:var(--ink); box-shadow:0 0 0 2px var(--bg), 0 0 0 3.5px var(--ink);}
.swatch .check{color:#fff; width:16px; height:16px; filter:drop-shadow(0 0 1px rgba(0,0,0,.5));}

/* buttons */
.btn{
  background:var(--accent); color:#fff; border:none; border-radius:13px; text-align:center; padding:13px;
  font-weight:700; font-size:14px; margin-top:8px; display:flex; align-items:center; justify-content:center; gap:7px;
  width:100%; cursor:pointer; font-family:inherit;
}
.btn .icon{stroke:#fff;}
.btn.ghost{background:#fff; color:var(--ink); border:1px solid var(--line); box-shadow:none;}
.btn.dark{background:#111;}
.btn.sm{padding:9px; font-size:12.5px; border-radius:10px;}
.btn:active{opacity:.85;}
.btn:disabled{opacity:.4;}

.pillrow{display:flex; flex-wrap:wrap; gap:8px; margin-bottom:10px;}
.pill{
  display:inline-flex; align-items:center; gap:5px; background:#fff; border:1px solid var(--line); border-radius:999px;
  padding:7px 13px; font-size:12.5px; color:var(--ink); font-weight:600; cursor:pointer; font-family:inherit;
}
.pill .icon{width:12px;height:12px;}
.pill.on{background:var(--accent); color:#fff; border-color:var(--accent);}
.pill.on .icon{stroke:#fff;}

/* photo grid */
.photo-grid{display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin-bottom:10px;}
.photo-tile{
  aspect-ratio:1; border-radius:12px; background:#e7e7ea; display:flex; align-items:center; justify-content:center; color:#b6b6bb;
  overflow:hidden; position:relative; cursor:pointer;
}
.photo-tile img{width:100%;height:100%;object-fit:cover;}
.photo-tile.add{background:#fff; border:1.4px dashed #c7c7cc; color:var(--sub);}
.photo-tile .rm{
  position:absolute; top:4px; right:4px; width:20px; height:20px; border-radius:50%; background:rgba(0,0,0,.55);
  display:flex; align-items:center; justify-content:center; color:#fff; font-size:12px;
}

.progress-wrap{margin-bottom:12px;}
.progress-label{display:flex; justify-content:space-between; font-size:11.5px; color:var(--sub); margin-bottom:6px; font-weight:600;}
.progress-track{height:6px; background:#e7e7ea; border-radius:999px; overflow:hidden;}
.progress-fill{height:100%; background:var(--accent); border-radius:999px; transition:width .25s;}

/* "N명이 봤어요" real-view notification banner (Home) */
.view-alert{
  display:flex; align-items:center; gap:12px; width:100%; text-align:left; font-family:inherit; cursor:pointer;
  background:linear-gradient(135deg,var(--accent),#6c4fff); color:#fff; border:none; border-radius:16px;
  padding:14px 16px; margin-bottom:12px; box-shadow:0 8px 20px -10px rgba(10,114,255,.5);
}
.view-alert .va-badge{width:34px;height:34px;border-radius:50%;background:rgba(255,255,255,.2);display:flex;align-items:center;justify-content:center;flex-shrink:0;}
.view-alert .va-badge .icon{stroke:#fff;}
.view-alert .va-text{flex:1;}
.view-alert .va-title{font-weight:800; font-size:14.5px;}
.view-alert .va-sub{font-size:11px; opacity:.85; margin-top:2px;}
.view-alert .ochev{color:rgba(255,255,255,.8);}

/* locked / blurred feature */
.lock-panel{background:#fff; border-radius:14px; padding:14px; margin-bottom:10px; position:relative; overflow:hidden;}
.lock-panel .blurred{filter:blur(4px); opacity:.65; user-select:none; pointer-events:none;}
.lock-overlay{
  position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px;
  background:rgba(255,255,255,.5); text-align:center; padding:10px;
}
.lock-overlay .lock-circle{width:30px;height:30px;border-radius:50%;background:var(--gold-soft);display:flex;align-items:center;justify-content:center;}
.lock-overlay .lock-circle .icon{width:15px;height:15px;stroke:var(--gold);}
.lock-overlay .lock-txt{font-size:11px; font-weight:800; color:var(--ink); background:#fff; padding:5px 12px; border-radius:999px; border:1px solid var(--line); cursor:pointer;}

.stat-row{display:flex; gap:10px; margin-bottom:10px;}
.stat-tile{flex:1; background:#fff; border-radius:14px; padding:14px; text-align:center;}
.stat-num{font-size:22px; font-weight:800; letter-spacing:-.5px;}
.stat-label{font-size:10.5px; color:var(--sub); margin-top:3px;}

.toggle{width:36px;height:20px;border-radius:999px;position:relative;background:#e7e7ea;flex-shrink:0;border:none;cursor:pointer;padding:0;}
.toggle.on{background:#34c759;}
.toggle::after{content:"";position:absolute;left:2px;top:2px;width:16px;height:16px;background:#fff;border-radius:50%;box-shadow:0 1px 2px rgba(0,0,0,.25); transition:left .15s;}
.toggle.on::after{left:18px;}

/* tab bar */
.tabbar{
  position:fixed; left:0; right:0; bottom:0; max-width:520px; margin:0 auto;
  height:calc(58px + var(--sab-bottom)); padding-bottom:var(--sab-bottom);
  border-top:.5px solid var(--line); display:flex; align-items:center; justify-content:space-around;
  background:rgba(250,249,250,.92); backdrop-filter:blur(10px); font-size:10.5px; color:#a9a9ad; z-index:30;
}
.tabbar .tab{display:flex; flex-direction:column; align-items:center; gap:3px; background:none; border:none; font-family:inherit; color:inherit; cursor:pointer; padding:6px 10px;}
.tabbar .tab.active{color:var(--accent); font-weight:700;}
.tabbar .icon{width:22px;height:22px;}

/* qr */
.qr-wrap{text-align:center; margin:6px 0 14px;}
.qr-wrap img{width:168px; height:168px; border-radius:16px; border:1px solid var(--line); background:#fff;}
.qr-hint{font-size:11.5px; color:var(--sub); margin-top:8px;}

.linkbox{
  display:flex; align-items:center; gap:8px; background:#fff; border:1px solid var(--line); border-radius:12px;
  padding:10px 12px; font-size:12.5px; color:var(--sub); margin-bottom:10px;
}
.linkbox .u{flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.linkbox button{background:var(--accent-soft); color:var(--accent); border:none; border-radius:8px; padding:6px 10px; font-weight:700; font-size:11.5px; cursor:pointer; flex-shrink:0;}

.toast{
  position:fixed; left:50%; bottom:calc(80px + var(--sab-bottom)); transform:translateX(-50%);
  background:#111; color:#fff; padding:10px 18px; border-radius:999px; font-size:13px; font-weight:600;
  opacity:0; pointer-events:none; transition:opacity .2s, transform .2s; z-index:60; white-space:nowrap;
}
.toast.show{opacity:1; transform:translateX(-50%) translateY(-6px);}

.empty{text-align:center; padding:60px 20px; color:var(--sub);}
.empty .icon{width:40px;height:40px; margin-bottom:12px; stroke:#c7c7cc;}
.empty p{font-size:13.5px; margin:0 0 14px;}

/* view (public card) mode */
.view-mode-badge{text-align:center; font-size:11px; color:var(--sub); margin:4px 0 12px; display:flex; align-items:center; justify-content:center; gap:5px;}

/* bottom-sheet modal (exchange gate / discover consent) */
.sheet-backdrop{position:fixed; inset:0; background:rgba(0,0,0,.45); z-index:80; display:flex; align-items:flex-end; justify-content:center;}
.sheet-modal{background:#fff; width:100%; max-width:520px; border-radius:20px 20px 0 0; padding:22px 18px calc(22px + var(--sab-bottom)); text-align:center;}
.sheet-modal .sheet-icon{width:44px;height:44px;border-radius:50%;background:var(--accent-soft);display:flex;align-items:center;justify-content:center;margin:0 auto 12px;}
.sheet-modal .sheet-icon .icon{width:22px;height:22px;stroke:var(--accent);}
.sheet-modal h3{font-size:17px; font-weight:800; margin:0 0 8px;}
.sheet-modal p{font-size:13px; color:var(--sub); margin:0 0 16px; line-height:1.5;}

@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    --bg:#0e0e10; --card:#1c1c1e; --ink:#eef0ee; --sub:#9a9a9e; --line:#2c2c2e;
    --badge-blue:#122a4a; --badge-blue-ink:#5b9dff; --badge-green:#123a26; --badge-green-ink:#3ecb7c;
    --badge-orange:#3a2611; --badge-orange-ink:#e2a35f; --badge-purple:#241a3d; --badge-purple-ink:#a58bff;
    --badge-red:#3a1815; --badge-red-ink:#f28f80;
  }
  .row, .grouped, .stat-tile, .lock-panel, .photo-tile, .pill, .linkbox, .sheet-modal{background:#1c1c1e;}
  .btn.ghost{background:#1c1c1e; color:var(--ink);}
  .topbar{background:rgba(14,14,16,.85);}
  .tabbar{background:rgba(20,20,22,.92);}
}
