/* GeroNFO 디자인 시스템 — NFT 마켓플레이스 포털
   다크 테마 기본 + 라이트 테마 전환. 카드가 화면을 채우고 검색이 상단에 붙는다. */

@font-face {
  font-family: 'Pretendard';
  src: url('/static/fonts/PretendardVariable.woff2') format('woff2-variations');
  font-weight: 45 920;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Pretendard Fallback';
  src: url('/static/fonts/Pretendard-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}

/* ---------------------------------------------------------------- 다크(기본) */
:root, :root[data-theme="dark"] {
  --bg: #0c0c0f;
  --surface: #16161a;
  --surface-2: #1c1c21;
  --surface-3: #26262d;
  --elevated: #1e1e24;
  --line: #2b2b33;
  --line-soft: #232329;

  --fg: #f4f4f6;
  --muted: #a1a1ac;
  --muted-strong: #b8b8c2;

  --point: #2081e2;          /* 마켓플레이스 블루 */
  --point-dark: #1868db;
  --point-soft: rgba(32,129,226,.14);
  --point-fg: #ffffff;

  --accent2: #ff4d6d;        /* 보조 강조(좋아요·희귀도) */
  --ok: #34d399;
  --warn: #fbbf24;
  --err: #f87171;

  --radius: 14px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow-md: 0 6px 20px rgba(0,0,0,.45);
  --shadow-lg: 0 18px 48px rgba(0,0,0,.6);
  --glow: 0 0 0 1px rgba(32,129,226,.35), 0 8px 28px rgba(32,129,226,.22);

  --sidebar-w: 250px;
  --sidebar-w-collapsed: 76px;
  --topbar-h: 76px;
  --ease: cubic-bezier(.2,.7,.3,1);
  color-scheme: dark;
}

/* ---------------------------------------------------------------- 라이트 */
:root[data-theme="light"] {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f7f7f8;
  --surface-3: #eeeef1;
  --elevated: #ffffff;
  --line: #dddddd;
  --line-soft: #ebebed;

  --fg: #222222;
  --muted: #717171;
  --muted-strong: #5a5a5a;

  --point: #1868db;
  --point-dark: #0f52ad;
  --point-soft: rgba(24,104,219,.10);
  --point-fg: #ffffff;

  --accent2: #ff385c;
  --ok: #087443;
  --warn: #b26a00;
  --err: #c1121f;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.08), 0 2px 6px rgba(0,0,0,.05);
  --shadow-md: 0 6px 16px rgba(0,0,0,.10), 0 2px 4px rgba(0,0,0,.06);
  --shadow-lg: 0 12px 32px rgba(0,0,0,.14);
  --glow: 0 0 0 1px rgba(24,104,219,.25), 0 8px 24px rgba(24,104,219,.14);
  color-scheme: light;
}

* { box-sizing: border-box; }
/* hidden 은 무슨 일이 있어도 숨긴다. 브라우저 기본값은 `[hidden]{display:none}` 인데
   이건 선택자 하나짜리라, `.studio-frame img { display:block }` 처럼 클래스가 하나만
   붙어도 밀린다 — 그래서 아직 그림이 없는 <img hidden> 이 빈 상자로 자리를 차지하고
   흰 사각형처럼 보였다. 여기서 한 번 못박아 그 부류의 버그를 전부 없앤다. */
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; max-width: 100%; }
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; }
/* 긴 토큰·URL·해시가 가로 스크롤을 만들지 않게 한다 */
.mono, .card-title, .rank-name, .activity-title, .toast-msg, .stat-value, .hero-name {
  overflow-wrap: anywhere;
}

body {
  font-family: 'Pretendard', 'Pretendard Fallback', -apple-system, BlinkMacSystemFont,
               'Apple SD Gothic Neo', system-ui, sans-serif;
  background: var(--bg);
  color: var(--fg);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background .25s var(--ease), color .25s var(--ease);
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; padding: 0; }
img { max-width: 100%; display: block; }
h1,h2,h3,h4 { margin: 0; font-weight: 700; letter-spacing: -.025em; }
:focus-visible { outline: 2px solid var(--point); outline-offset: 2px; border-radius: 8px; }
::selection { background: var(--point); color: #fff; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 8px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--line); }

.icon { width: 20px; height: 20px; flex: none; stroke-width: 1.8; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 24px; height: 24px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------------------------------------------------------------- 레이아웃 */
.app { display: flex; min-height: 100vh; }

.sidebar {
  position: fixed; inset: 0 auto 0 0;
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  z-index: 60;
  transition: width .24s var(--ease), transform .24s var(--ease);
}
body.sidebar-collapsed .sidebar { width: var(--sidebar-w-collapsed); }

.sidebar-head {
  height: var(--topbar-h); display: flex; align-items: center; gap: 10px;
  padding: 0 18px; border-bottom: 1px solid var(--line-soft); flex: none;
}
/* 로고 — 나선만 남긴 투명 PNG 를 쓴다(예전 파일에는 검은 둥근사각 배경이
   그림 안에 구워져 있어서, 어떤 테마에서도 검은 딱지처럼 보였다).
   테두리도 배경도 없이 나선만 놓고, 대신 은은하게 살아 움직이게 한다. */
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand-logo {
  position: relative; flex: none; width: 56px; height: 56px;
  display: grid; place-items: center;
}
/* 뒤에 깔리는 숨결 — 나선 색과 같은 계열의 빛이 천천히 커졌다 작아진다 */
.brand-logo::before {
  content: ''; position: absolute; inset: 6px; border-radius: 50%;
  background: radial-gradient(circle, rgba(120,170,255,.45), rgba(170,120,255,.18) 55%, transparent 72%);
  filter: blur(6px); opacity: .75;
  animation: brand-breathe 4.8s ease-in-out infinite;
}
.brand-mark {
  position: relative; width: 100%; height: 100%; object-fit: contain;
  animation: brand-float 6.4s ease-in-out infinite;
  transition: transform .35s cubic-bezier(.34, 1.56, .64, 1);
}
.brand:hover .brand-mark { transform: scale(1.08) rotate(-4deg); }
.brand:active .brand-mark { transform: scale(.96); }
/* 눌렀을 때 한 바퀴. 떠 있는 애니메이션과 겹치면 위아래로 튀므로,
   도는 동안에는 떠 있기를 멈추고 회전만 보여 준다. */
.brand-mark.spin {
  animation: brand-spin 1.1s cubic-bezier(.5, 0, .2, 1);
  transform: none;
}
@keyframes brand-spin {
  from { transform: rotateY(0deg)   scale(1); }
  50%  { transform: rotateY(180deg) scale(1.12); }
  to   { transform: rotateY(360deg) scale(1); }
}

@keyframes brand-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-3px); }
}
@keyframes brand-breathe {
  0%, 100% { opacity: .45; transform: scale(.88); }
  50%      { opacity: .95; transform: scale(1.06); }
}
/* 움직임을 줄여 달라고 한 사람에게는 움직이지 않는다 */
@media (prefers-reduced-motion: reduce) {
  .brand-mark, .brand-logo::before { animation: none; }
}

.brand-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.brand-name {
  font-weight: 800; font-size: 21px; letter-spacing: -.035em; white-space: nowrap;
  line-height: 1.1;
}
/* 이름만으로는 NFO 가 무슨 말인지 알 수 없다. 풀어 쓴 말을 한 줄 밑에 둔다 —
   코인이 아니라 오믹스라는 걸 첫 화면에서 바로 말해 주는 자리다. */
.brand-sub {
  font-size: 10.5px; font-weight: 600; letter-spacing: .01em; white-space: nowrap;
  color: var(--muted); line-height: 1.1;
}
body.sidebar-collapsed .brand-text { display: none; }
body.sidebar-collapsed .brand-logo { width: 48px; height: 48px; }
body.sidebar-collapsed .sidebar-head { padding: 0 12px; }

.nav { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 12px 12px 8px; }
.nav-group-label {
  font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase;
  letter-spacing: .08em; padding: 15px 12px 6px; white-space: nowrap;
}
body.sidebar-collapsed .nav-group-label { opacity: 0; height: 12px; padding: 6px 0 0; }

.nav-item {
  position: relative; display: flex; align-items: center; gap: 12px;
  padding: 11px 12px; border-radius: 11px; color: var(--muted-strong);
  font-weight: 600; white-space: nowrap; margin-bottom: 2px;
  transition: background .15s var(--ease), color .15s var(--ease);
}
.nav-item:hover { background: var(--surface-2); color: var(--fg); }
.nav-item.active { background: var(--point-soft); color: var(--point); }
.nav-item.active .icon { color: var(--point); }
.nav-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
body.sidebar-collapsed .nav-item { justify-content: center; padding: 11px 0; }
body.sidebar-collapsed .nav-label { display: none; }

.nav-item[data-tip]::after {
  content: attr(data-tip);
  position: absolute; left: calc(100% + 10px); top: 50%; transform: translateY(-50%) scale(.96);
  background: var(--elevated); color: var(--fg); font-size: 12.5px; font-weight: 600;
  padding: 7px 11px; border-radius: 9px; white-space: nowrap;
  border: 1px solid var(--line);
  opacity: 0; pointer-events: none; transition: opacity .14s, transform .14s;
  z-index: 100; box-shadow: var(--shadow-md);
}
body.sidebar-collapsed .nav-item:hover::after { opacity: 1; transform: translateY(-50%) scale(1); }
body:not(.sidebar-collapsed) .nav-item::after { display: none; }

.sidebar-foot { padding: 10px 12px 16px; border-top: 1px solid var(--line-soft); flex: none; }
.collapse-btn {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 10px 12px; border-radius: 11px; color: var(--muted); font-weight: 600;
}
.collapse-btn:hover { background: var(--surface-2); color: var(--fg); }
body.sidebar-collapsed .collapse-btn { justify-content: center; padding: 10px 0; }
body.sidebar-collapsed .collapse-btn .nav-label { display: none; }
body.sidebar-collapsed .collapse-btn .icon { transform: rotate(180deg); }

.main {
  flex: 1; min-width: 0; margin-left: var(--sidebar-w);
  transition: margin-left .24s var(--ease);
  display: flex; flex-direction: column;
}
body.sidebar-collapsed .main { margin-left: var(--sidebar-w-collapsed); }

/* ---------------------------------------------------------------- 상단바 */
.topbar {
  position: sticky; top: 0; z-index: 50;
  min-height: var(--topbar-h);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 14px;
  padding: 12px 26px;
}
.hamburger { display: none; }

.searchbar {
  flex: 1; max-width: 620px; display: flex; align-items: center; gap: 10px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 15px;
  transition: border-color .16s var(--ease), box-shadow .16s;
}
.searchbar:focus-within { border-color: var(--point); box-shadow: var(--glow); }
.searchbar input { flex: 1; border: none; outline: none; background: none; min-width: 0; }
.searchbar input::placeholder { color: var(--muted); }
.searchbar .icon { color: var(--muted); }

.topbar-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.icon-btn {
  width: 40px; height: 40px; border-radius: 11px;
  display: grid; place-items: center; color: var(--muted-strong);
  border: 1px solid transparent; transition: all .15s;
}
.icon-btn:hover { background: var(--surface-2); border-color: var(--line); color: var(--fg); }

.theme-toggle {
  display: flex; align-items: center; background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px;
}
.theme-toggle button {
  width: 30px; height: 30px; border-radius: 999px; display: grid; place-items: center;
  color: var(--muted); transition: all .15s;
}
.theme-toggle button.active { background: var(--surface-3); color: var(--fg); }
.theme-toggle button:hover { color: var(--fg); }

.lang-select {
  border: 1px solid var(--line); border-radius: 11px; padding: 9px 12px;
  background: var(--surface-2); font-weight: 600; font-size: 13.5px; cursor: pointer;
}

/* 프로필 카드 안의 언어 토글 — 다섯 언어를 두 줄로 접어 한 번에 누르게 한다 */
.lang-toggle {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 12px; padding: 4px;
}
.lang-toggle button {
  padding: 9px 4px; border-radius: 9px; font-weight: 700; font-size: 12.5px;
  color: var(--muted); text-align: center; justify-content: center;
  white-space: nowrap; transition: background .15s, color .15s;
}
.lang-toggle button:hover { color: var(--fg); background: var(--surface-3); }
.lang-toggle button.active {
  background: var(--point); color: #fff; box-shadow: var(--shadow-sm);
}
.lang-toggle button.active:hover { background: var(--point); color: #fff; }

.avatar {
  width: 34px; height: 34px; border-radius: 999px;
  background: linear-gradient(135deg, var(--point), #7c4dff);
  color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 13px;
  flex: none; text-transform: uppercase;
}

.menu-pop {
  position: absolute; top: calc(100% + 8px); right: 0; min-width: 230px;
  background: var(--elevated); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 8px; z-index: 200; display: none;
}
.menu-pop.open { display: block; }
.menu-pop a, .menu-pop button {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 10px 12px; border-radius: 10px; font-weight: 600; text-align: left;
  color: var(--muted-strong);
}
.menu-pop a:hover, .menu-pop button:hover { background: var(--surface-2); color: var(--fg); }
.menu-sep { height: 1px; background: var(--line-soft); margin: 6px 4px; }

/* ---------------------------------------------------------------- 콘텐츠 */
.content { padding: 26px 26px 130px; flex: 1; }
.page-head { margin-bottom: 22px; }
.page-title { font-size: 29px; font-weight: 800; letter-spacing: -.038em; }
.page-sub { color: var(--muted); margin-top: 6px; }

.section-head {
  display: flex; align-items: center; gap: 12px; margin: 34px 0 16px;
}
.section-title { font-size: 21px; font-weight: 800; letter-spacing: -.03em; }
.section-more { margin-left: auto; color: var(--point); font-weight: 700; font-size: 13.5px; }

/* ---------------------------------------------------------------- 히어로 */
/* ---------------------------------------------------------------- 히어로
   홈 맨 위, 오늘의 대표 카드. 예전에는 흐린 배경 위에 카드와 글자를 얹은
   납작한 띠였다 — 카드가 작고, 네 칸 지표가 회색 상자에 갇혀 있고, 배경이
   그냥 검게 깔려 있어서 어느 카드가 대표인지 눈에 들어오지 않았다.
   지금은 카드를 크게 세우고 살짝 기울여 실물처럼 두고, 그 카드의 색이
   배경으로 번지게 한다. 카드마다 배경색이 달라지는 게 핵심이다. */
.hero {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  min-height: 400px; background: var(--surface-2); border: 1px solid var(--line);
  margin-bottom: 12px;
}
.hero-slide { position: relative; display: none; }
.hero-slide.on { display: block; animation: heroIn .55s var(--ease); }
@keyframes heroIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
.hero-bg { position: absolute; inset: 0; }
.hero-bg img {
  width: 100%; height: 100%; object-fit: cover;
  filter: blur(56px) saturate(1.9) brightness(.85); transform: scale(1.35);
}
/* 위쪽은 색이 살아 있고 아래로 갈수록 어두워져 글자가 읽힌다.
   왼쪽 아래에서 은은한 빛이 올라와 카드를 받쳐 준다. */
.hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(120% 90% at 18% 105%, rgba(255,255,255,.20), transparent 60%),
    linear-gradient(105deg, rgba(8,8,14,.86) 0%, rgba(8,8,14,.62) 46%, rgba(8,8,14,.30) 100%),
    linear-gradient(to top, rgba(6,6,12,.90) 0%, rgba(6,6,12,.10) 62%);
}
/* 아주 느린 빛 쓸림 — 있는 줄 모르다가 문득 눈에 띄는 정도로만 */
.hero-bg::before {
  content: ''; position: absolute; inset: -30%;
  background: linear-gradient(115deg, transparent 42%, rgba(255,255,255,.10) 50%, transparent 58%);
  animation: heroSheen 9s linear infinite;
}
@keyframes heroSheen {
  from { transform: translateX(-40%); }
  to   { transform: translateX(40%); }
}
.hero-inner {
  position: relative; display: flex; gap: 34px; align-items: center;
  padding: 36px 40px; min-height: 400px;
}
.hero-card {
  width: 232px; flex: none; border-radius: 14px; overflow: hidden;
  aspect-ratio: 5/7; background: #000;
  box-shadow: 0 30px 60px -18px rgba(0,0,0,.75), 0 0 0 1px rgba(255,255,255,.10);
  transform: perspective(1100px) rotateY(-9deg) rotateX(2deg);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}
.hero-card:hover {
  transform: perspective(1100px) rotateY(0deg) rotateX(0deg) translateY(-6px) scale(1.03);
  box-shadow: 0 40px 80px -20px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.20);
}
.hero-card img { width: 100%; height: 100%; object-fit: cover; }
.hero-copy { flex: 1; min-width: 0; color: #fff; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 7px; margin-bottom: 12px;
  padding: 5px 12px 5px 9px; border-radius: 999px;
  background: rgba(255,255,255,.13); border: 1px solid rgba(255,255,255,.20);
  backdrop-filter: blur(8px);
  font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
}
.hero-eyebrow .icon { color: currentColor; }
.hero-name {
  font-size: clamp(26px, 3.4vw, 40px); font-weight: 800; letter-spacing: -.04em;
  line-height: 1.12; display: flex; align-items: center; gap: 10px; margin-bottom: 8px;
  text-shadow: 0 2px 24px rgba(0,0,0,.45);
}
.hero-by { color: rgba(255,255,255,.80); font-size: 14px; margin-bottom: 22px;
  display: flex; align-items: center; gap: 7px; }
/* 지표는 상자 하나에 가두지 않고 낱장 카드로 흩어 놓는다 — 좁은 화면에서
   그대로 접히고, 값 하나하나가 또렷하게 읽힌다. */
.hero-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 10px; max-width: 620px;
}
.hero-stat {
  padding: 12px 16px; border-radius: 14px;
  background: rgba(255,255,255,.10); backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.16);
  transition: background .2s, border-color .2s, transform .2s;
}
.hero-stat:hover {
  background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.3);
  transform: translateY(-2px);
}
.hero-stat-label {
  font-size: 10.5px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase;
  color: rgba(255,255,255,.68); margin-bottom: 4px;
}
.hero-stat-value {
  font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
@media (max-width: 760px) {
  .hero-inner { flex-direction: column; align-items: stretch; gap: 22px; padding: 24px; }
  .hero-card { width: 168px; align-self: center; transform: none; }
  .hero-stats { max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-bg::before { animation: none; }
  .hero-slide.on { animation: none; }
}
.hero-dots { display: flex; gap: 6px; justify-content: center; margin-bottom: 22px; }
.hero-dot { width: 26px; height: 4px; border-radius: 99px; background: var(--surface-3); transition: all .2s; }
.hero-dot.on { background: var(--point); width: 40px; }

.verified { color: var(--point); flex: none; }

/* ---------------------------------------------------------------- 칩 필터 */
.filters {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 20px;
}
.chip-row {
  display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 16px;
  scrollbar-width: none;
}
.chip-row::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--line); border-radius: 12px; padding: 9px 15px;
  font-size: 13.5px; font-weight: 700; color: var(--muted-strong);
  background: var(--surface-2); white-space: nowrap; transition: all .15s var(--ease);
}
.chip:hover { border-color: var(--muted); color: var(--fg); }
.chip.active { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.chip .icon-sm { flex: none; }

select.chip { appearance: none; padding-right: 32px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a1a1ac' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }

.type-dot { width: 12px; height: 12px; border-radius: 999px; flex: none; }

/* ---------------------------------------------------------------- 카드 그리드 */
.card-grid {
  display: grid; gap: 20px 16px;
  grid-template-columns: repeat(auto-fill, minmax(216px, 1fr));
}
.card {
  display: flex; flex-direction: column; min-width: 0;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  transition: transform .2s var(--ease), border-color .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-4px); border-color: var(--muted); box-shadow: var(--shadow-md); }
.card-media {
  position: relative; aspect-ratio: 5/7; overflow: hidden; background: var(--surface-3);
}
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.card:hover .card-media img { transform: scale(1.05); }
.card-media.skeleton::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 37%, var(--surface-2) 63%);
  background-size: 400% 100%; animation: shimmer 1.4s infinite;
}
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

.card-badge {
  position: absolute; top: 10px; left: 10px;
  background: rgba(12,12,15,.82); color: #fff; backdrop-filter: blur(6px);
  border-radius: 8px; padding: 5px 10px; font-size: 11.5px; font-weight: 800;
  letter-spacing: .02em;
}
.card-badge.tier-Mythic    { background: linear-gradient(135deg,#f59e0b,#ef4444); color:#fff; }
.card-badge.tier-Legendary { background: linear-gradient(135deg,#a855f7,#6366f1); color:#fff; }
.card-badge.tier-Epic      { background: linear-gradient(135deg,#3b82f6,#06b6d4); color:#fff; }
.card-badge.tier-Rare      { background: #0d9488; color:#fff; }
.card-badge.tier-Uncommon  { background: #475569; color:#fff; }

/* 전사체까지 반영된 카드 표시. 등급 배지는 왼쪽 위, 하트는 오른쪽 위를 쓰고
   있으므로 왼쪽 아래에 앉힌다 — 셋이 서로 겹치지 않는 유일한 모서리다. */
.card-rna {
  position: absolute; left: 10px; bottom: 10px; display: inline-flex; gap: 5px;
  align-items: center; padding: 4px 8px; border-radius: 8px; font-size: 11px;
  font-weight: 800; font-variant-numeric: tabular-nums; color: #ecfff8;
  background: rgba(13,102,86,.88); backdrop-filter: blur(6px);
}
.card-rna .icon, .card-rna .icon-sm { width: 13px; height: 13px; flex: none; }

.card-like {
  position: absolute; top: 8px; right: 8px; width: 32px; height: 32px;
  display: grid; place-items: center; color: #fff; border-radius: 9px;
  background: rgba(12,12,15,.66); backdrop-filter: blur(6px);
  transition: transform .18s var(--ease), background .18s;
}
.card-like:hover { transform: scale(1.10); background: rgba(12,12,15,.9); }
.card-like.on svg { fill: var(--accent2); stroke: var(--accent2); }

.card-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 12px 13px 13px; }
.card-title {
  font-weight: 700; font-size: 14.5px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 5px;
}
.card-meta { color: var(--muted); font-size: 12.5px; }
/* 만들어진 날짜·시각 — 제목 밑에 조용히 붙는 한 줄 */
.card-when {
  display: flex; align-items: center; gap: 5px; color: var(--muted);
  font-size: 11.5px; font-variant-numeric: tabular-nums;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card-when svg { width: 12px; height: 12px; flex: none; }
.card-foot {
  display: flex; align-items: center; gap: 6px; font-size: 13px; margin-top: 8px;
  padding-top: 10px; border-top: 1px solid var(--line-soft);
}
.card-price { font-weight: 800; font-variant-numeric: tabular-nums; }
.card-price-label { font-size: 10.5px; color: var(--muted); text-transform: uppercase;
  letter-spacing: .07em; font-weight: 700; }

/* ---------------------------------------------------------------- 패널 · 폼 */
.panel {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; background: var(--surface); margin-bottom: 18px;
}
.panel-title {
  font-size: 17px; font-weight: 800; margin-bottom: 4px;
  display: flex; align-items: center; gap: 9px; letter-spacing: -.02em;
}
.panel-sub { color: var(--muted); font-size: 13.5px; margin-bottom: 16px; }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }

.field { margin-bottom: 15px; }
.label { display: block; font-weight: 700; font-size: 13px; margin-bottom: 7px; }
.hint { color: var(--muted); font-size: 12.5px; margin-top: 6px; line-height: 1.5; }
.input, .select, .textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 11px;
  padding: 11px 13px; background: var(--surface-2); outline: none; color: var(--fg);
  transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--point); box-shadow: var(--glow);
}
.input::placeholder, .textarea::placeholder { color: var(--muted); }
.textarea { min-height: 96px; resize: vertical; }
.select { appearance: none; padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23a1a1ac' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }
.input[type="file"] { padding: 9px 12px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 11px; padding: 11px 18px; font-weight: 700; font-size: 14.5px;
  border: 1px solid transparent; transition: all .16s var(--ease); white-space: nowrap;
}
.btn:active { transform: scale(.977); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--point); color: var(--point-fg); }
.btn-primary:hover:not(:disabled) { background: var(--point-dark); box-shadow: var(--glow); }
.btn-dark { background: var(--fg); color: var(--bg); }
.btn-dark:hover:not(:disabled) { opacity: .88; }
.btn-ghost { border-color: var(--line); color: var(--fg); background: var(--surface-2); }
.btn-ghost:hover:not(:disabled) { border-color: var(--muted); background: var(--surface-3); }
.btn-danger { border-color: var(--err); color: var(--err); background: transparent; }
.btn-danger:hover:not(:disabled) { background: rgba(248,113,113,.12); }
.btn-sm { padding: 8px 13px; font-size: 13px; border-radius: 9px; }
.btn-lg { padding: 14px 24px; font-size: 16px; border-radius: 13px; }
.btn-block { width: 100%; }

.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-track {
  width: 46px; height: 27px; border-radius: 999px; background: var(--surface-3);
  position: relative; transition: background .2s var(--ease); flex: none;
  border: 1px solid var(--line);
}
.switch-track::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 21px; height: 21px;
  border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm);
  transition: transform .2s var(--ease);
}
.switch input:checked + .switch-track { background: var(--point); border-color: var(--point); }
.switch input:checked + .switch-track::after { transform: translateX(19px); }

/* ---------------------------------------------------------------- 통계 */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.stat {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px;
  background: var(--surface);
}
.stat-label { color: var(--muted); font-size: 11.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .07em; }
.stat-value {
  font-size: 25px; font-weight: 800; letter-spacing: -.035em; margin-top: 5px;
  font-variant-numeric: tabular-nums;
}
.stat-unit { font-size: 13px; color: var(--muted); font-weight: 600; margin-left: 3px; }
.stat-delta { font-size: 12px; font-weight: 700; margin-top: 3px; }
.stat-delta.up { color: var(--ok); }
.stat-delta.down { color: var(--err); }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  border-radius: 8px; padding: 4px 10px; font-size: 12px; font-weight: 700;
  background: var(--surface-3); color: var(--muted-strong);
}
.badge.ok   { background: rgba(52,211,153,.14); color: var(--ok); }
.badge.warn { background: rgba(251,191,36,.14); color: var(--warn); }
.badge.err  { background: rgba(248,113,113,.14); color: var(--err); }
.badge.info { background: var(--point-soft); color: var(--point); }
/* 전사체까지 반영된 카드 — 목록 타일의 .card-rna 와 같은 색 계열로 맞춘다.
   글자색은 테마마다 다르게 준다: 어두운 배경에 진한 청록은 읽히지 않는다. */
.badge.rna  { background: rgba(20,184,166,.16); color: #5eead4; }
:root[data-theme="light"] .badge.rna { color: #0f766e; }

.progress { height: 6px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.progress-bar {
  height: 100%; background: linear-gradient(90deg, var(--point), #7c4dff);
  border-radius: 999px; transition: width .35s var(--ease);
  background-size: 200% 100%; animation: flow 1.8s linear infinite;
}
@keyframes flow { 0% { background-position: 0 0; } 100% { background-position: 200% 0; } }

.spinner {
  width: 18px; height: 18px; border: 2.5px solid var(--surface-3);
  border-top-color: var(--point); border-radius: 50%;
  animation: spin .7s linear infinite; flex: none;
}
.spinner-lg { width: 34px; height: 34px; border-width: 3px; }
@keyframes spin { to { transform: rotate(360deg); } }

.empty { text-align: center; padding: 64px 24px; color: var(--muted); }
.empty .icon { width: 46px; height: 46px; color: var(--surface-3); margin: 0 auto 14px; stroke-width: 1.3; }
.empty-title { font-weight: 800; color: var(--fg); font-size: 17px; margin-bottom: 6px; }

.skeleton-card { display: flex; flex-direction: column; gap: 10px; }
.skeleton-line {
  height: 12px; border-radius: 6px;
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 37%, var(--surface-2) 63%);
  background-size: 400% 100%; animation: shimmer 1.4s infinite;
}

/* ---------------------------------------------------------------- 랭킹 표 */
.rank-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.rank-table th {
  font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase;
  letter-spacing: .07em; padding: 10px 14px; text-align: left; white-space: nowrap;
  border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--bg);
}
.rank-table td { padding: 12px 14px; border-bottom: 1px solid var(--line-soft); }
.rank-table tbody tr { transition: background .12s; }
.rank-table tbody tr:hover { background: var(--surface-2); cursor: pointer; }
.rank-num { width: 46px; font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; }
.rank-num.top1 { color: #fbbf24; }
.rank-num.top2 { color: #cbd5e1; }
.rank-num.top3 { color: #d97706; }
.rank-item { display: flex; align-items: center; gap: 12px; min-width: 0; }
.rank-thumb { width: 42px; height: 58px; border-radius: 8px; object-fit: cover; flex: none;
  background: var(--surface-3); }
.rank-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-sub { color: var(--muted); font-size: 12px; }
td.num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }

/* ---------------------------------------------------------------- 액티비티 */
.activity-row {
  display: flex; align-items: center; gap: 14px; padding: 13px 4px;
  border-bottom: 1px solid var(--line-soft);
}
.activity-icon {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  flex: none; background: var(--surface-3); color: var(--muted-strong);
}
.activity-icon.mint { background: var(--point-soft); color: var(--point); }
.activity-icon.restore { background: rgba(52,211,153,.14); color: var(--ok); }
.activity-icon.like { background: rgba(255,77,109,.14); color: var(--accent2); }
.activity-icon.share { background: rgba(251,191,36,.14); color: var(--warn); }
.activity-body { flex: 1; min-width: 0; }
.activity-title { font-weight: 700; font-size: 14px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.activity-meta { color: var(--muted); font-size: 12.5px; }
.activity-time { color: var(--muted); font-size: 12.5px; white-space: nowrap; }

/* ---------------------------------------------------------------- 컬렉션 */
.collection-card {
  display: flex; flex-direction: column; border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; background: var(--surface);
  transition: transform .2s var(--ease), border-color .2s;
}
.collection-card:hover { transform: translateY(-3px); border-color: var(--muted); }
.collection-banner { height: 92px; position: relative; }
.collection-avatar {
  width: 62px; height: 62px; border-radius: 16px; border: 3px solid var(--surface);
  position: absolute; left: 16px; bottom: -26px; display: grid; place-items: center;
  color: #fff;
}
.collection-body { padding: 34px 16px 16px; }
.collection-name { font-weight: 800; font-size: 16px; display: flex; align-items: center; gap: 6px; }
.collection-stats { display: flex; gap: 18px; margin-top: 12px; }
.collection-stat-label { font-size: 10.5px; color: var(--muted); text-transform: uppercase;
  letter-spacing: .07em; font-weight: 700; }
.collection-stat-value { font-weight: 800; font-variant-numeric: tabular-nums; font-size: 15px; }

/* ---------------------------------------------------------------- 진행 알약 */
.job-pills {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: 22px; z-index: 300;
  display: flex; flex-direction: column-reverse; gap: 8px; align-items: center;
  pointer-events: none; width: min(560px, calc(100vw - 28px));
}
.job-pill {
  pointer-events: auto; width: 100%;
  background: var(--elevated); border: 1px solid var(--line); color: var(--fg);
  border-radius: 14px; padding: 11px 16px; display: flex; align-items: center; gap: 12px;
  box-shadow: var(--shadow-lg); cursor: pointer;
  animation: pillIn .3s var(--ease); transition: transform .16s var(--ease);
}
.job-pill:hover { transform: translateY(-2px); border-color: var(--point); }
@keyframes pillIn { from { opacity: 0; transform: translateY(16px); } }
.job-pill-text { flex: 1; min-width: 0; }
.job-pill-title { font-size: 13.5px; font-weight: 700; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
.job-pill-step { font-size: 11.5px; color: var(--muted); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
.job-pill-ring { position: relative; width: 32px; height: 32px; flex: none; }
.job-pill-ring svg { transform: rotate(-90deg); }
.job-pill-ring circle { fill: none; stroke-width: 3; }
.job-pill-ring .track { stroke: var(--surface-3); }
.job-pill-ring .fill { stroke: var(--point); transition: stroke-dashoffset .35s var(--ease); }
.job-pill-pct { position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 9.5px; font-weight: 800; font-variant-numeric: tabular-nums; }
.job-pill-close { color: var(--muted); padding: 4px; }
.job-pill-close:hover { color: var(--fg); }

/* ---------------------------------------------------------------- 토스트 */
.toasts {
  position: fixed; right: 20px; bottom: 20px; z-index: 400;
  display: flex; flex-direction: column-reverse; gap: 10px;
  width: min(400px, calc(100vw - 32px));
}
.toast {
  background: var(--elevated); border: 1px solid var(--line); border-left: 4px solid var(--point);
  border-radius: 13px; padding: 13px 15px; box-shadow: var(--shadow-lg);
  display: flex; gap: 11px; align-items: flex-start; animation: toastIn .32s var(--ease);
}
@keyframes toastIn { from { opacity: 0; transform: translateX(28px); } }
.toast.out { animation: toastOut .26s var(--ease) forwards; }
@keyframes toastOut { to { opacity: 0; transform: translateX(28px); } }
.toast.ok  { border-left-color: var(--ok); }
.toast.err { border-left-color: var(--err); }
.toast.warn{ border-left-color: var(--warn); }
.toast-body { flex: 1; min-width: 0; }
.toast-title { font-weight: 800; font-size: 14px; }
.toast-msg { color: var(--muted); font-size: 13px; margin-top: 2px; word-break: break-word; }
.toast .icon { flex: none; margin-top: 1px; }
.toast.ok .icon { color: var(--ok); }
.toast.err .icon { color: var(--err); }
.toast.warn .icon { color: var(--warn); }
.toast.info .icon { color: var(--point); }

/* ---------------------------------------------------------------- 모달 */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.72); z-index: 500;
  display: grid; place-items: center; padding: 20px;
  animation: fadeIn .2s var(--ease); overflow-y: auto; backdrop-filter: blur(4px);
}
@keyframes fadeIn { from { opacity: 0; } }
.modal {
  background: var(--elevated); border: 1px solid var(--line);
  border-radius: 18px; width: min(620px, 100%);
  box-shadow: var(--shadow-lg); animation: modalIn .28s var(--ease);
  max-height: calc(100vh - 40px); display: flex; flex-direction: column; margin: auto;
}
.modal.wide { width: min(940px, 100%); }
@keyframes modalIn { from { opacity: 0; transform: translateY(22px) scale(.98); } }
.modal-head {
  display: flex; align-items: center; gap: 12px; padding: 20px 22px;
  border-bottom: 1px solid var(--line-soft); flex: none;
}
.modal-title { font-size: 17.5px; font-weight: 800; flex: 1; }
.modal-body { padding: 22px; overflow-y: auto; flex: 1; }
.modal-foot {
  display: flex; gap: 10px; justify-content: flex-end; padding: 16px 22px;
  border-top: 1px solid var(--line-soft); flex: none; flex-wrap: wrap;
}

/* ---------------------------------------------------------------- 표 */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line-soft); }
th { font-weight: 700; color: var(--muted); font-size: 11.5px;
  text-transform: uppercase; letter-spacing: .06em; background: var(--surface-2); white-space: nowrap; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--surface-2); }

/* ---------------------------------------------------------------- 업로드 */
.dropzone {
  border: 2px dashed var(--line); border-radius: var(--radius);
  padding: 44px 24px; text-align: center; cursor: pointer;
  transition: all .2s var(--ease); background: var(--surface-2);
}
.dropzone:hover, .dropzone.over { border-color: var(--point); background: var(--point-soft); }
.dropzone .icon { width: 42px; height: 42px; color: var(--muted); margin: 0 auto 12px; stroke-width: 1.4; }
.dropzone.over .icon { color: var(--point); }
.dz-title { font-weight: 800; font-size: 16px; margin-bottom: 5px; }
.dz-sub { color: var(--muted); font-size: 13px; }

/* 발행 화면의 기대감 블록 — 예전의 '그림 스타일 고르기' 자리를 대신한다.
   무엇이 나올지 고르는 게 아니라 게놈이 정한다는 걸 여기서 분명히 말한다. */
.surprise {
  display: flex; gap: 14px; align-items: flex-start; margin-bottom: 18px;
  padding: 16px 18px; border-radius: var(--radius);
  border: 1px solid var(--point); background: var(--point-soft);
}
.surprise > [data-icon] { color: var(--point); flex: none; }
.surprise-title { font-weight: 800; font-size: 15px; margin-bottom: 5px; }
.surprise-body { color: var(--muted-strong); font-size: 13.5px; line-height: 1.65; }

/* 발행 화면에서 "지금 이 게놈이 데리고 있는 아이" 를 보여 주는 칸.
   분석 때 그린 그 얼굴이 그대로 카드가 된다는 걸 말이 아니라 그림으로 보여 준다. */
.pending-buddy {
  display: flex; gap: 14px; align-items: center; margin-bottom: 18px;
  padding: 12px 14px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface-2);
}
.pending-face {
  width: 76px; height: 76px; flex: none; border-radius: 14px; object-fit: cover;
  border: 1px solid var(--border); background: var(--surface);
}
.pending-title { font-weight: 800; font-size: 14px; margin-bottom: 4px; }
.pending-body { color: var(--muted-strong); font-size: 12.5px; line-height: 1.6; }
@media (max-width: 560px) {
  .pending-face { width: 60px; height: 60px; }
}

.trait-row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.trait-name { width: 110px; font-size: 13px; font-weight: 600; flex: none; color: var(--muted-strong); }
.trait-bar { flex: 1; height: 7px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.trait-fill { height: 100%; background: linear-gradient(90deg, var(--point), #7c4dff);
  border-radius: 999px; transition: width .6s var(--ease); }
.trait-val { width: 52px; text-align: right; font-size: 12.5px; font-weight: 800;
  font-variant-numeric: tabular-nums; flex: none; }

.palette { display: flex; gap: 6px; }
.palette span { width: 26px; height: 26px; border-radius: 8px; border: 1px solid var(--line); }

/* 게놈 첫인상 — 카드가 되기 전 얼굴. 좁은 화면에서는 그림이 위, 글이 아래. */
.genome-face {
  display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px;
  align-items: center; margin-bottom: 20px; padding: 18px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2);
}
.genome-face-media {
  aspect-ratio: 5/7; border-radius: 14px; overflow: hidden;
  background: var(--surface-3); box-shadow: var(--shadow-md);
}
.genome-face-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.genome-face-title { font-size: 17px; font-weight: 800; margin-bottom: 6px; }
.genome-face-note {
  color: var(--muted-strong); font-size: 13.5px; line-height: 1.6; margin: 0 0 14px;
}

.chrom-chart { display: flex; align-items: flex-end; gap: 3px; height: 110px; }
.chrom-bar { flex: 1; background: var(--point); border-radius: 3px 3px 0 0; min-height: 2px;
  opacity: .8; transition: opacity .15s; }
.chrom-bar:hover { opacity: 1; }
.chrom-labels { display: flex; gap: 3px; margin-top: 5px; }
.chrom-labels span { flex: 1; text-align: center; font-size: 8.5px; color: var(--muted); }

.sns-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(126px, 1fr)); gap: 9px; }
.sns-btn {
  display: flex; align-items: center; gap: 8px; padding: 11px 13px;
  border: 1px solid var(--line); border-radius: 11px; font-weight: 700; font-size: 13.5px;
  transition: all .15s var(--ease); background: var(--surface-2);
}
.sns-btn:hover { border-color: var(--point); background: var(--surface-3); transform: translateY(-1px); }
.sns-btn .icon { flex: none; }

.pagination { display: flex; gap: 6px; justify-content: center; align-items: center;
  margin-top: 34px; flex-wrap: wrap; }
.page-btn {
  min-width: 38px; height: 38px; padding: 0 11px; border-radius: 10px;
  border: 1px solid var(--line); display: grid; place-items: center;
  font-weight: 700; font-size: 13.5px; background: var(--surface-2); color: var(--muted-strong);
}
.page-btn:hover:not(:disabled) { border-color: var(--point); color: var(--fg); }
.page-btn.active { background: var(--point); color: #fff; border-color: var(--point); }
.page-btn:disabled { opacity: .35; cursor: not-allowed; }

.mono { font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, monospace; font-size: 12.5px; }
code { background: var(--surface-3); padding: 2px 6px; border-radius: 5px;
  font-family: ui-monospace, monospace; font-size: 12.5px; }

.drawer-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 55;
  opacity: 0; pointer-events: none; transition: opacity .24s var(--ease);
}
body.drawer-open .drawer-backdrop { opacity: 1; pointer-events: auto; }

/* ---------------------------------------------------------------- 모바일 */
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); width: 284px; box-shadow: var(--shadow-lg); }
  body.drawer-open .sidebar { transform: translateX(0); }
  body.sidebar-collapsed .sidebar { width: 284px; }
  body.sidebar-collapsed .brand-text { display: flex; }
  body.sidebar-collapsed .brand-logo { width: 56px; height: 56px; }
  body.sidebar-collapsed .nav-item { justify-content: flex-start; padding: 11px 12px; }
  body.sidebar-collapsed .nav-label { display: block; }
  body.sidebar-collapsed .nav-group-label { opacity: 1; height: auto; padding: 15px 12px 6px; }
  .main, body.sidebar-collapsed .main { margin-left: 0; }
  .hamburger { display: grid; }
  .sidebar-foot .collapse-btn { display: none; }
  /* 상단바가 좁은 화면을 밀어내지 않도록 축약한다 */
  .topbar { padding: 10px 12px; gap: 8px; min-height: 62px; }
  .topbar > * { min-width: 0; }
  .searchbar { min-width: 0; padding: 9px 12px; }
  .topbar-actions { gap: 6px; flex: none; }
  /* 상단바에 직접 놓인 것만 숨긴다 — 계정 메뉴 안의 같은 이름 요소는 남겨야 한다 */
  .topbar-actions > .theme-toggle,
  .topbar-actions > .lang-select { display: none; }   /* 계정 메뉴 안으로 이동 */
  .topbar-actions .btn-primary .nav-label,
  .topbar-actions .btn-primary span:not([data-icon]) { display: none; }
  .topbar-actions .btn-primary { padding: 10px; }
  .menu-pop { min-width: 250px; }
  .content { padding: 18px 14px 130px; }
  .page-title { font-size: 23px; }
  .section-title { font-size: 18px; }
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px 12px; }
  .panel { padding: 16px; }
  .job-pills { bottom: 14px; width: calc(100vw - 20px); }
  .toasts { right: 10px; left: 10px; bottom: 14px; width: auto; }
  .modal-body { padding: 17px; }
  .stat-value { font-size: 21px; }
  .trait-name { width: 84px; font-size: 12px; }
  .hero { min-height: 0; }
  .hero-inner { flex-direction: column; align-items: stretch; padding: 18px; min-height: 0; gap: 16px; }
  .hero-card { width: 128px; align-self: center; }
  .hero-name { font-size: 21px; }
  .hero-stats { max-width: none; }
  .hero-stat { padding: 10px 12px; }
  .hero-stat-value { font-size: 14px; }
  .rank-table th:nth-child(n+4), .rank-table td:nth-child(n+4) { display: none; }
  /* 첫인상은 한 열로 — 그림이 화면 폭을 다 먹지 않게 가운데로 좁혀 둔다 */
  .genome-face { grid-template-columns: 1fr; gap: 16px; padding: 16px; }
  .genome-face-media { width: 190px; justify-self: center; }
}

@media (max-width: 480px) {
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .topbar-actions .lang-select { display: none; }
}

@media print { .sidebar, .topbar, .job-pills, .toasts { display: none !important; }
  .main { margin-left: 0 !important; } }

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

/* 궁합 결과 — 점수 하나만 던지지 않고 어느 칸이 붙고 벌어졌는지까지 보여준다 */
.match-band {
  border-radius: var(--radius); padding: 14px 18px; text-align: center;
  border: 1px solid var(--border); background: var(--surface-2);
}
.match-band-title { font-weight: 800; font-size: 17px; margin-bottom: 4px; }
.match-band-sub { color: var(--muted-strong); font-size: 13px; line-height: 1.6; }
.match-band-twin  { border-color: #f59e0b; background: rgba(245, 158, 11, .10); }
.match-band-close { border-color: #10b981; background: rgba(16, 185, 129, .10); }
.match-band-mixed { border-color: #6366f1; background: rgba(99, 102, 241, .10); }
.match-band-far   { border-color: #64748b; background: rgba(100, 116, 139, .10); }

.match-heads {
  display: flex; gap: 18px; align-items: center; justify-content: center;
  flex-wrap: nowrap; margin-bottom: 18px;
}
.match-face {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  min-width: 0; max-width: 160px; color: var(--fg);
}
.match-face img {
  width: 104px; height: 104px; border-radius: 14px; object-fit: cover;
  border: 1px solid var(--line);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.match-face:hover img { transform: translateY(-3px) scale(1.04); box-shadow: var(--shadow-lg); }
.match-face-name {
  font-size: 12.5px; font-weight: 700; text-align: center; line-height: 1.35;
  max-width: 100%; overflow: hidden; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.match-face:hover .match-face-name { color: var(--point); }
.match-score-big { text-align: center; flex: none; }
.match-score-num {
  font-size: 38px; font-weight: 800; letter-spacing: -.04em; color: var(--point);
  font-variant-numeric: tabular-nums; line-height: 1.05;
}
.match-score-cap { color: var(--muted-strong); font-size: 12.5px; }

.match-rows { margin-top: 18px; display: flex; flex-direction: column; gap: 14px; }
.match-row-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 13.5px; }
.match-row-head .spacer { flex: 1; }
.match-tag {
  font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px;
  background: var(--point-soft); color: var(--point);
}
.match-verdict { font-size: 12px; color: var(--muted-strong); }
.match-score { font-size: 14px; font-variant-numeric: tabular-nums; }
.match-row-foot {
  display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap;
  margin-top: 5px; font-size: 12px; color: var(--muted);
}
.match-vals { font-variant-numeric: tabular-nums; color: var(--muted-strong); }

/* 어시스턴트 추천 질문 — 빈 입력칸 앞에서 멈추지 않게 길을 터 준다 */
.ask-suggest { margin-bottom: 14px; }
.ask-suggest-label {
  display: flex; align-items: center; gap: 6px; margin-bottom: 8px;
  font-size: 12.5px; font-weight: 700; color: var(--muted-strong);
}
.ask-suggest-label .icon { color: var(--point); }
.ask-suggest-note { font-weight: 500; color: var(--muted); }
.ask-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ask-chip {
  border: 1px solid var(--border); background: var(--surface-2); color: var(--fg);
  border-radius: 999px; padding: 8px 14px; font-size: 13px; font-weight: 600;
  cursor: pointer; text-align: left; line-height: 1.4; max-width: 100%;
  transition: border-color .15s, background .15s, transform .15s;
}
.ask-chip:hover { border-color: var(--point); background: var(--point-soft); }
.ask-chip:active { transform: scale(.97); }
@media (max-width: 560px) {
  .ask-chips { flex-direction: column; align-items: stretch; }
  .ask-chip { border-radius: 12px; }
}

/* 로그인 화면 브랜드 — 사이드바와 같은 나선을 조금 더 크게 */
.auth-brand .brand-logo { width: 72px; height: 72px; }
.auth-brand b { font-size: 26px; }

/* ------------------------------------------------------------------ 작업실
   진행 중인 작업을 눌렀을 때 뜨는 라이브 화면. 서버가 단계마다 남긴
   실제 프레임을 보여준다. */
.studio { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 20px; }
.studio-stage { min-width: 0; }
.studio-frame {
  position: relative; aspect-ratio: 5 / 7; border-radius: var(--radius);
  overflow: hidden; background: var(--surface-2); border: 1px solid var(--line);
  display: grid; place-items: center;
}
.studio-frame img { width: 100%; height: 100%; object-fit: contain; display: block;
  animation: studioFade .5s var(--ease); }
@keyframes studioFade { from { opacity: 0; transform: scale(.985); } to { opacity: 1; transform: none; } }
.studio-placeholder { text-align: center; color: var(--muted); font-size: 13px; padding: 20px; }
.studio-spinner {
  display: block; width: 34px; height: 34px; margin: 0 auto 14px;
  border: 3px solid var(--surface-3); border-top-color: var(--point);
  border-radius: 50%; animation: studioSpin .9s linear infinite;
}
@keyframes studioSpin { to { transform: rotate(360deg); } }
.studio-caption { margin-top: 10px; font-size: 12.5px; color: var(--muted); text-align: center; }

/* ---- 카드가 만들어지는 동안의 연출 --------------------------------------
   전부 카드 위에 덮는 효과라서 미리보기 그림 자체는 건드리지 않는다.
   포인터 이벤트를 막지 않도록 pointer-events:none 을 유지할 것. */
.studio-fx {
  position: absolute; inset: 0; pointer-events: none; opacity: 0;
  transition: opacity .45s var(--ease); overflow: hidden; border-radius: inherit;
}
.studio-frame.is-working .studio-fx { opacity: 1; }

/* 무지개 홀로그램이 카드를 비스듬히 훑고 지나간다 */
.fx-sweep {
  position: absolute; inset: -40%;
  background: linear-gradient(105deg,
    transparent 38%, rgba(255, 255, 255, .10) 45%,
    rgba(120, 190, 255, .34) 49%, rgba(190, 140, 255, .34) 52%,
    rgba(255, 210, 140, .28) 55%, rgba(255, 255, 255, .10) 60%, transparent 67%);
  transform: translateX(-60%);
  animation: fxSweep 2.6s cubic-bezier(.5, 0, .5, 1) infinite;
  mix-blend-mode: screen;
}
@keyframes fxSweep {
  0%   { transform: translateX(-65%); }
  100% { transform: translateX(65%); }
}

/* 게놈을 픽셀에 새기는 단계에서만 켜지는 스캔선 */
.fx-scan {
  position: absolute; left: 0; right: 0; height: 16%;
  background: linear-gradient(180deg, transparent,
    rgba(90, 200, 255, .40) 45%, rgba(255, 255, 255, .75) 50%,
    rgba(90, 200, 255, .40) 55%, transparent);
  box-shadow: 0 0 26px 6px rgba(90, 200, 255, .35);
  opacity: 0; animation: fxScan 1.5s linear infinite;
}
.studio-frame.is-etching .fx-scan { opacity: 1; }
@keyframes fxScan {
  0%   { top: -18%; }
  100% { top: 100%; }
}

/* 카드를 감싸고 도는 에너지 링 두 겹 */
.fx-ring {
  position: absolute; left: 50%; top: 50%; width: 62%; aspect-ratio: 1;
  margin: -31% 0 0 -31%; border-radius: 50%;
  border: 2px solid transparent; border-top-color: rgba(120, 190, 255, .8);
  border-right-color: rgba(190, 140, 255, .45);
  animation: studioSpin 3.4s linear infinite;
}
.fx-ring:nth-of-type(4) {
  width: 84%; margin: -42% 0 0 -42%; animation-duration: 5.6s;
  animation-direction: reverse; border-top-color: rgba(255, 200, 130, .55);
  border-right-color: transparent; border-left-color: rgba(120, 255, 220, .40);
}

/* 완성 — 테두리가 금빛으로 번쩍이고 카드가 한 번 튀어오른다 */
.studio-frame.is-done {
  animation: fxDone 1.1s var(--ease);
  box-shadow: 0 0 0 2px rgba(212, 175, 82, .85), 0 0 46px rgba(212, 175, 82, .45);
}
.studio-frame.is-done img { animation: fxPop .7s cubic-bezier(.18, 1.5, .38, 1); }
@keyframes fxDone {
  0%   { box-shadow: 0 0 0 0 rgba(255, 255, 255, .95), 0 0 0 rgba(212, 175, 82, 0); }
  35%  { box-shadow: 0 0 0 6px rgba(255, 255, 255, .55), 0 0 70px rgba(212, 175, 82, .8); }
  100% { box-shadow: 0 0 0 2px rgba(212, 175, 82, .85), 0 0 46px rgba(212, 175, 82, .45); }
}
@keyframes fxPop {
  0%   { transform: scale(.9) rotate(-1.2deg); }
  60%  { transform: scale(1.03) rotate(.4deg); }
  100% { transform: none; }
}

/* 완성 순간 사방으로 튀는 반짝임 */
.studio-burst { position: absolute; inset: 0; pointer-events: none; }
.studio-burst i {
  position: absolute; left: 50%; top: 50%; width: 7px; height: 7px; margin: -3.5px;
  border-radius: 50%; opacity: 0;
  background: radial-gradient(circle, #fff 0 35%, rgba(212, 175, 82, .95) 70%, transparent);
}
.studio-burst.go i {
  animation: fxSpark .95s var(--d, 0ms) cubic-bezier(.16, .84, .44, 1) both;
}
@keyframes fxSpark {
  0%   { opacity: 0; transform: rotate(var(--ang)) translateY(0) scale(.3); }
  22%  { opacity: 1; }
  100% { opacity: 0; transform: rotate(var(--ang)) translateY(calc(var(--dist) * -1)) scale(1); }
}

/* 진행 막대에도 빛이 흐르게 */
.studio-frame.is-working ~ .studio-caption { opacity: .9; }
.studio .progress-bar { position: relative; overflow: hidden; }
.studio .progress-bar::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent);
  animation: fxShimmer 1.5s linear infinite;
}

@keyframes fxShimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* 모션을 줄여 달라고 한 사람에겐 흐르는 효과를 모두 멈춘다 */
@media (prefers-reduced-motion: reduce) {
  .fx-sweep, .fx-scan, .fx-ring,
  .studio .progress-bar::after, .studio-burst i { animation: none; }
  .studio-fx { opacity: .25; }
  .studio-frame.is-done, .studio-frame.is-done img { animation: none; }
}
.studio-side { min-width: 0; display: flex; flex-direction: column; }
.studio-title { font-weight: 800; font-size: 16px; word-break: break-word; }
.studio-step { color: var(--muted); font-size: 13px; margin-top: 4px; min-height: 18px; }
.studio-pct { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums;
  text-align: right; }
.studio-steps { list-style: none; margin: 14px 0 0; padding: 0; flex: 1;
  overflow-y: auto; max-height: 320px; }
.studio-steps li {
  position: relative; padding: 5px 0 5px 22px; font-size: 13px; color: var(--muted);
}
.studio-steps li::before {
  content: ''; position: absolute; left: 4px; top: 11px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--surface-3); border: 1px solid var(--line);
}
.studio-steps li.done { color: var(--muted-strong); }
.studio-steps li.done::before { background: var(--ok); border-color: var(--ok); }
.studio-steps li.now { color: var(--fg); font-weight: 700; }
.studio-steps li.now::before {
  background: var(--point); border-color: var(--point);
  box-shadow: 0 0 0 4px var(--point-soft); animation: studioPulse 1.4s ease-in-out infinite;
}
@keyframes studioPulse { 50% { box-shadow: 0 0 0 7px transparent; } }
.studio-actions { margin-top: 16px; display: flex; gap: 8px; flex-wrap: wrap; }
.studio-actions .btn, .studio-actions a { flex: 1; justify-content: center; }
.studio-error { color: var(--err); font-size: 13px; line-height: 1.55; word-break: break-word; }

/* ------------------------------------------------------------------ 화면 설명
   각 메뉴가 무엇을 하는 곳인지 처음 온 사람도 알 수 있게. 접어 두면 기억한다. */
.explainer {
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2);
  padding: 16px 18px; margin-bottom: 18px; position: relative; overflow: hidden;
}
.explainer::before {
  content: ''; position: absolute; inset: 0 auto 0 0; width: 3px;
  background: linear-gradient(180deg, var(--point), #7c4dff);
}
.explainer-head { display: flex; align-items: center; gap: 9px; }
.explainer-head .icon { color: var(--point); flex: none; }
.explainer-title { font-weight: 800; font-size: 14.5px; flex: 1; min-width: 0; }
.explainer-toggle {
  font-size: 12.5px; color: var(--muted); background: none; border: 0; cursor: pointer;
  padding: 4px 8px; border-radius: 8px; flex: none;
}
.explainer-toggle:hover { color: var(--fg); background: var(--surface-3); }
.explainer-body { margin-top: 9px; color: var(--muted-strong); font-size: 13.5px; line-height: 1.65; }
.explainer-list { list-style: none; margin: 11px 0 0; padding: 0; display: grid; gap: 7px; }
.explainer-list li {
  position: relative; padding-left: 20px; font-size: 13px; color: var(--muted);
  line-height: 1.55;
}
.explainer-list li::before {
  content: ''; position: absolute; left: 4px; top: 8px; width: 6px; height: 6px;
  border-radius: 2px; background: var(--point); opacity: .75;
}
.explainer.collapsed .explainer-body, .explainer.collapsed .explainer-list { display: none; }

/* ------------------------------------------------------------------ 세트 카드 */
.set-note {
  display: flex; gap: 10px; align-items: flex-start; padding: 13px 15px; margin: 14px 0;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--point-soft);
}
.set-note .icon { color: var(--point); flex: none; margin-top: 1px; }
.set-note-title { font-weight: 800; font-size: 13.5px; }
.set-note-body { color: var(--muted-strong); font-size: 12.5px; margin-top: 3px; line-height: 1.55; }
.set-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.set-part { border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  background: var(--surface-2); display: block; cursor: zoom-in;
  transition: border-color .18s var(--ease), transform .18s var(--ease); }
.set-part:hover, .set-part:focus-visible { border-color: var(--brand); transform: translateY(-2px); }
.set-part img { width: 100%; display: block; aspect-ratio: 5 / 7; object-fit: cover; }
.set-part-label { display: flex; align-items: center; gap: 6px;
  padding: 7px 9px; font-size: 11.5px; color: var(--muted);
  font-variant-numeric: tabular-nums; }
.set-part-label span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; }
.set-part-label a { display: grid; place-items: center; width: 22px; height: 22px;
  border-radius: 6px; color: var(--muted); cursor: pointer; }
.set-part-label a:hover { background: var(--surface-3); color: var(--fg); }

/* ------------------------------------------------------------------ 크게 보기 */
.viewer { position: relative; display: grid; place-items: center; }
.viewer img { max-width: 100%; max-height: 74vh; border-radius: 10px; display: block; }
.viewer-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%;
  color: #fff; background: rgba(12,12,15,.62); backdrop-filter: blur(6px);
  transition: background .18s;
}
.viewer-nav:hover { background: rgba(12,12,15,.88); }
.viewer-nav.prev { left: 8px; }
.viewer-nav.next { right: 8px; }
.viewer-bar { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.viewer-count { font-size: 12.5px; color: var(--muted-strong);
  font-variant-numeric: tabular-nums; }

@media (max-width: 760px) {
  .studio { grid-template-columns: 1fr; }
  .studio-frame { max-height: 46vh; aspect-ratio: auto; height: 46vh; }
  .studio-steps { max-height: 160px; }
}

/* ------------------------------------------------------------------ 백본 이미지 게시판 */
.bb-drop {
  border: 2px dashed var(--line); border-radius: var(--radius); padding: 26px 16px;
  text-align: center; cursor: pointer; transition: .15s; background: var(--surface-2);
  margin-top: 14px;
}
.bb-drop:hover, .bb-drop.over, .bb-drop:focus-visible {
  border-color: var(--brand); background: var(--surface); outline: none;
}
.bb-drop b { display: block; margin-top: 8px; font-size: 14.5px; }
.bb-drop span:last-child { color: var(--muted-strong); font-size: 12.5px; }

.bb-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px;
}
.bb-card {
  position: relative; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; background: var(--surface); display: flex; flex-direction: column;
}
.bb-card.off { opacity: .55; }
.bb-check { position: absolute; top: 8px; left: 8px; z-index: 2; }
.bb-check input { width: 20px; height: 20px; accent-color: var(--brand); cursor: pointer; }
/* 백본은 투명 PNG 라 배경이 없으면 무엇이 그려졌는지 안 보인다 — 체크무늬를 깐다 */
.bb-media {
  aspect-ratio: 1 / 1; display: grid; place-items: center; overflow: hidden;
  background-color: var(--surface-2);
  background-image:
    linear-gradient(45deg, rgba(128,128,128,.14) 25%, transparent 25%, transparent 75%,
                    rgba(128,128,128,.14) 75%),
    linear-gradient(45deg, rgba(128,128,128,.14) 25%, transparent 25%, transparent 75%,
                    rgba(128,128,128,.14) 75%);
  background-size: 18px 18px; background-position: 0 0, 9px 9px;
}
.bb-media img { width: 100%; height: 100%; object-fit: contain; display: block; }
.bb-missing { color: var(--muted-strong); font-size: 12.5px; padding: 12px; text-align: center; }
.bb-body { padding: 11px 12px 10px; display: flex; flex-direction: column; gap: 6px; }
.bb-name {
  font-weight: 700; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap;
}
.bb-meta {
  display: flex; gap: 7px; align-items: center; flex-wrap: wrap;
  font-size: 11.5px; color: var(--muted-strong); font-variant-numeric: tabular-nums;
}
.bb-warn { font-size: 11.5px; color: var(--warn, #b45309); line-height: 1.45; }
.bb-note { font-size: 11.5px; color: var(--muted); line-height: 1.45; }
.bb-actions { display: flex; align-items: center; gap: 4px; margin-top: 2px; }
.bb-actions .switch { font-size: 12px; }

pre.code {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; margin: 8px 0 0; overflow-x: auto; font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; line-height: 1.6;
  color: var(--fg); white-space: pre;
}

@media (max-width: 560px) {
  .bb-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
}

/* ------------------------------------------------------------------ 전사체(선택) */
.rna-box {
  margin-top: 16px; padding: 14px 16px; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--surface-2);
}
.rna-head { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.rna-head .icon, .rna-head .icon-sm { color: var(--point); flex: none; }
.rna-body { color: var(--muted-strong); font-size: 12.5px; line-height: 1.65; margin-top: 6px; }
.rna-samples {
  grid-column: 1 / -1; margin-top: 4px; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2);
}
.rna-sample-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px; margin-top: 10px;
}
.rna-chip {
  display: flex; gap: 9px; align-items: flex-start; padding: 10px 12px; cursor: pointer;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
}
.rna-chip:hover { border-color: var(--brand); }
/* 고른 칸은 테두리로도 알려 준다 — 라디오 점 하나는 훑어볼 때 놓치기 쉽다 */
.rna-chip.on { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.rna-chip input { margin-top: 3px; accent-color: var(--brand); flex: none; }
.rna-chip b { display: block; font-size: 13px; }
.rna-chip i { display: block; font-style: normal; font-size: 11.5px; color: var(--muted-strong);
  line-height: 1.5; margin-top: 2px; }

/* 고르는 칸(예제 게놈) — rna-chip 과 같은 어법을 쓴다. 화면 안에서 "고르는 것"이
   두 가지 모양으로 나오면, 사람은 둘이 다른 종류의 선택이라고 읽는다. */
.pick-step { font-size: 12.5px; font-weight: 800; color: var(--muted-strong);
  letter-spacing: .02em; margin: 18px 0 8px; }
.pick-step:first-child { margin-top: 4px; }
.pick-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px;
}
.pick-card {
  position: relative; display: flex; gap: 10px; align-items: flex-start; cursor: pointer;
  padding: 14px 15px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
}
.pick-card:hover { border-color: var(--brand); }
.pick-card.on { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.pick-card input { margin-top: 3px; accent-color: var(--brand); flex: none; }
.pick-card .icon-sm { color: var(--point); flex: none; }
.pick-title { display: flex; align-items: center; gap: 7px; font-weight: 800; font-size: 14px; }
.pick-desc { color: var(--muted-strong); font-size: 12.5px; line-height: 1.6; margin-top: 5px; }
.pick-meta { display: flex; align-items: center; gap: 8px; margin-top: 9px; }

/* 고른 파일 한 줄 — 무엇을 들고 있는지 누르기 전에 보여 준다 */
.picked {
  display: flex; align-items: center; gap: 10px; margin-top: 12px;
  padding: 11px 14px; border: 1px solid var(--brand); border-radius: 12px;
  background: var(--point-soft); font-size: 13.5px;
}
.picked .icon-sm { color: var(--point); flex: none; }

/* 기본값이 이미 알맞은 설정은 접어 둔다 — 처음 온 사람에게 고를 것을 늘리지 않는다 */
.vault-adv { margin-top: 14px; }
.vault-adv > summary {
  cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--muted-strong); user-select: none;
}
.vault-adv > summary:hover { color: var(--text); }
.vault-adv[open] > summary { margin-bottom: 2px; }

/* 만들기 줄 — 버튼이 무엇을 하는지 옆에 한 줄로 붙인다 */
.make-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.make-note { color: var(--muted-strong); font-size: 12.5px; line-height: 1.6; }


/* ─────────────────────────────────────────────────────────────
   스플래시 — 앱이 처음 열릴 때 한 번
   ─────────────────────────────────────────────────────────────
   띄울지 말지는 <head> 의 인라인 스크립트가 :root[data-splash] 로 정한다.
   본문이 그려지기 전에 정해야 "화면이 잠깐 보였다가 덮이는" 깜빡임이 없다.

   중요 — 자바스크립트가 죽어도 스플래시는 반드시 걷힌다.
   sp-failsafe 애니메이션이 4.4초 뒤 스스로 숨긴다. 걷어내는 일을 JS 에만
   맡기면, 스크립트 하나가 터졌을 때 사용자는 영영 덮인 화면만 보게 된다. */
.splash { display: none; }

:root[data-splash] .splash {
  display: grid; place-items: center;
  position: fixed; inset: 0; z-index: 9000;
  background: var(--bg);
  animation: sp-failsafe 4.4s forwards;
}
:root[data-splash] .splash.out { animation: sp-out .44s cubic-bezier(.4,0,.2,1) forwards; }

@keyframes sp-failsafe { 0%, 86% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }
@keyframes sp-out      { to { opacity: 0; visibility: hidden; transform: scale(1.035); } }

.splash-inner {
  display: grid; justify-items: center; gap: 0;
  position: relative; z-index: 1;
  padding: 0 24px; text-align: center;
}

/* 뒤에 깔리는 빛무리. 어두운 배경에서는 은은한 후광, 밝은 배경에서는
   옅은 파란 물듦으로 보인다 — 한 벌로 두 테마를 다 감당한다. */
.splash-glow {
  position: absolute; width: min(128vw, 760px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle,
              rgba(47,139,250,.30) 0%, rgba(139,92,246,.13) 42%, transparent 70%);
  animation: sp-pulse 3.8s ease-in-out infinite;
  pointer-events: none;
}
@keyframes sp-pulse {
  0%, 100% { transform: scale(.94); opacity: .75; }
  50%      { transform: scale(1.06); opacity: 1; }
}

/* 나선 — 두 가닥이 그려져 올라오고, 사다리가 아래에서 위로 차례로 켜진다.
   sp-sway 는 좌우 15도까지만 기울인다. 한 바퀴 돌리면 절반 동안 거울상이
   되는데, DNA 는 오른손 방향이라 그 절반이 실제로 틀린 그림이 된다. */
.splash-helix {
  width: clamp(88px, 22vw, 112px); height: auto; overflow: visible;
  filter: drop-shadow(0 0 16px rgba(47,139,250,.45));
  animation: sp-rise .72s cubic-bezier(.16,1,.3,1) both,
             sp-sway 5s ease-in-out .72s infinite alternate;
}
@keyframes sp-rise {
  from { opacity: 0; transform: translateY(14px) scale(.86); }
  to   { opacity: 1; transform: none; }
}
@keyframes sp-sway {
  from { transform: perspective(420px) rotateY(-15deg); }
  to   { transform: perspective(420px) rotateY(15deg); }
}

.hx-strand {
  fill: none; stroke: url(#geronfoSplashInk); stroke-width: 5.4;
  stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 400; stroke-dashoffset: 400;
  animation: sp-draw 1.15s cubic-bezier(.62,0,.36,1) forwards;
}
.hx-b { animation-delay: .15s; }
@keyframes sp-draw { to { stroke-dashoffset: 0; } }

.hx-rungs path {
  fill: none; stroke: url(#geronfoSplashInk); stroke-width: 3.1; stroke-linecap: round;
  opacity: 0; animation: sp-rung .45s ease-out forwards;   /* 지연은 마크업에서 하나씩 */
}
@keyframes sp-rung { from { opacity: 0; } to { opacity: .85; } }

.splash-word {
  margin-top: 20px; font-size: 27px; font-weight: 800;
  letter-spacing: -.035em; color: var(--fg);
  animation: sp-up .6s cubic-bezier(.16,1,.3,1) .5s both;
}
.splash-sub {
  margin-top: 7px; font-size: 10.5px; font-weight: 700;
  letter-spacing: .26em; text-transform: uppercase; color: var(--muted);
  animation: sp-up .6s cubic-bezier(.16,1,.3,1) .62s both;
}
@keyframes sp-up { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }

.splash-bar {
  margin-top: 26px; width: 124px; height: 3px; border-radius: 99px;
  background: var(--surface-3); overflow: hidden;
  animation: sp-up .5s ease-out .8s both;
}
.splash-bar > span {
  display: block; width: 38%; height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, #5ed4ff, #2f8bfa, #8b5cf6);
  animation: sp-slide 1.3s cubic-bezier(.45,0,.32,1) infinite;
}
@keyframes sp-slide { from { transform: translateX(-110%); } to { transform: translateX(370%); } }

/* 움직임을 줄여 달라고 한 사람에게는 그리는 연출 없이 결과만 보여 준다.
   다만 "불러오는 중" 이라는 신호는 남겨야 하므로, 막대는 자리를 옮기는
   대신 밝기만 천천히 오르내리게 둔다. */
@media (prefers-reduced-motion: reduce) {
  .splash-helix { animation: none; }
  .splash-glow  { animation: none; }
  .hx-strand    { stroke-dashoffset: 0; animation: none; }
  .hx-rungs path { opacity: .85; animation: none; }
  .splash-word, .splash-sub, .splash-bar { animation: none; }
  .splash-bar > span { width: 100%; animation: sp-breathe 1.8s ease-in-out infinite; }
  @keyframes sp-breathe { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
}

@media (max-width: 420px) {
  .splash-word { font-size: 24px; }
}
