/* 원피스 캐릭터 감별소 — 화면 디자인 전부. 색은 :root 토큰으로만 쓰고, 다크 모드는 아래 두 블록에서 토큰만 바꾼다. */
/* 컨셉: 항구 마을의 현상금 게시판. 바탕은 나무 판자, 내용은 못으로 박아 둔 종이 공고문,
   캐릭터는 작은 수배서, 구획 사이는 밧줄, 주 버튼은 붉은 밀랍 도장, 문항 진행은 지도 위를 가는 배.
   종이 위 글자는 라이트·다크 모두 같은 먹색(종이는 밤에도 종이), 나무 판자 위 글자만 --on-board로 바꾼다. */
:root {
  --board: #c9a274;          /* 낮의 나무 판자 */
  --board-dark: #a97f52;     /* 판자 사이 홈 */
  --on-board: #2b1d10;       /* 판자 위 글자 */
  --on-board-soft: #4e3720;
  --paper: #f4e6c4;          /* 공고문 종이 */
  --paper-2: #fbf2dc;        /* 밝은 종이(칸 안쪽) */
  --paper-edge: #d9c294;
  --ink: #2b2116;
  --ink-soft: #66513a;
  --rule: #cbb284;
  --sea: #1d4f73;            /* 바다 — 보조 강조 */
  --seal: #a3271d;           /* 밀랍 도장 빨강 — 주 버튼 */
  --seal-dark: #6e160f;
  --accent: #a3271d;
  --gold: #c8962c;
  --rope: #b8935a;
  --strawhat: #c0392b;
  --pirate: #2f2a24;
  --marine: #2a6db0;
  --world: #3f8a5a;
  --f-display: "Black Han Sans", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --f-body: "Gowun Dodum", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --f-ui: "IBM Plex Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  --f-western: Rye, Georgia, serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --board: #2a1d12; --board-dark: #1b120b; --on-board: #f1dfb8; --on-board-soft: #c9b28a;
    --paper: #e6d3a8; --paper-2: #efe0bb; --paper-edge: #bfa676; --rule: #bea06c;
    --rope: #8c6b3c; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --board: #2a1d12; --board-dark: #1b120b; --on-board: #f1dfb8; --on-board-soft: #c9b28a;
  --paper: #e6d3a8; --paper-2: #efe0bb; --paper-edge: #bfa676; --rule: #bea06c;
  --rope: #8c6b3c; color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  /* 나무 판자: 세로 홈 + 결 */
  background-color: var(--board);
  background-image:
    repeating-linear-gradient(90deg, transparent 0 118px, var(--board-dark) 118px 121px),
    repeating-linear-gradient(0deg, rgba(0,0,0,.035) 0 2px, transparent 2px 7px),
    radial-gradient(ellipse at 30% 20%, rgba(255,255,255,.08), transparent 60%);
  color: var(--ink);
  font: 400 1rem/1.75 var(--f-body);
  padding-inline: 16px;
  overflow-wrap: anywhere;
  word-break: keep-all;  /* 한국어 낱말 가운데서 줄이 바뀌지 않게 */
  -webkit-font-smoothing: antialiased;
}
.scroll { max-width: 41rem; margin: 0 auto; padding-block: 1.25rem 4rem; position: relative; }
h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 400; text-wrap: balance; margin: 0; letter-spacing: .01em; }
p { margin: 0; }
button { font: inherit; color: inherit; }
a { color: var(--sea); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.label { font-family: var(--f-ui); font-size: .75rem; font-weight: 600; letter-spacing: .14em; color: var(--ink-soft); }

/* 캐릭터 키 컬러: 종이 위에서 읽히도록 먹색과 섞는다 (종이는 밤에도 같은 색이라 섞는 비율도 같다) */
.kc { --c-text: color-mix(in srgb, var(--c) 72%, var(--ink)); }
.result { --key: var(--sea); --key-text: color-mix(in srgb, var(--key) 72%, var(--ink)); }

/* ── 공고문 종이: 모든 칸의 기본 ── */
.notice, .block, .crew-score, .question-paper {
  position: relative;
  background:
    radial-gradient(ellipse at 50% 40%, var(--paper-2) 30%, var(--paper) 75%, var(--paper-edge) 100%);
  color: var(--ink);
  border-radius: 3px;
  box-shadow: 0 1px 0 rgba(255,255,255,.35) inset, 0 8px 18px rgba(30,15,0,.28), 0 1px 3px rgba(30,15,0,.3);
}
/* 못 두 개 */
.notice::before, .block::before {
  content: ""; position: absolute; top: 9px; left: 12px; right: 12px; height: 10px; pointer-events: none;
  background:
    radial-gradient(circle at 5px 5px, #8d8a85 0 2.5px, #4a4744 3px, transparent 4.5px) left / 10px 10px no-repeat,
    radial-gradient(circle at 5px 5px, #8d8a85 0 2.5px, #4a4744 3px, transparent 4.5px) right / 10px 10px no-repeat;
}
.block { margin-top: 1.4rem; padding: 1.6rem 1.25rem 1.3rem; }
.block:nth-of-type(odd) { transform: rotate(-.35deg); }
.block:nth-of-type(even) { transform: rotate(.3deg); }
.block h3 { font-size: 1.3rem; margin-bottom: .8rem; padding-bottom: .35rem; border-bottom: 2px dashed var(--rule); }

/* 밧줄 구분선 */
.rope {
  height: 14px; margin: 1.6rem -6px 1.2rem;
  background: repeating-linear-gradient(-45deg, var(--rope) 0 6px, color-mix(in srgb, var(--rope) 60%, #000) 6px 9px, var(--rope) 9px 12px);
  border-radius: 8px; box-shadow: 0 3px 5px rgba(0,0,0,.25);
}
.board-title {
  text-align: center; font-size: 1.35rem; color: var(--on-board);
  text-shadow: 0 1px 0 rgba(255,255,255,.18);
  margin-bottom: .9rem;
}

/* ── 맨 위: 나무 간판 ── */
.topbar { display: flex; align-items: center; min-height: 2rem; margin-bottom: 1rem; }
.brand {
  display: inline-flex; align-items: center; gap: .5rem; min-width: 0; padding: .35rem .9rem .35rem .45rem;
  text-decoration: none; font-family: var(--f-display); font-size: 1.05rem; color: #f6e7c6;
  background: linear-gradient(#7a5432, #5c3c20); border: 2px solid #3a2412; border-radius: 6px;
  box-shadow: 0 4px 8px rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.15);
}
.brand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand img { flex: none; background: #f4e6c4; border-radius: 50%; }

/* ── 버튼: 주 버튼은 밀랍 도장, 보조는 나무 팻말 ── */
.start, .ghost, .icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  min-height: 2.9rem; padding: .55rem 1.3rem; border-radius: 999px;
  font-family: var(--f-ui); font-weight: 600; font-size: 1rem; text-decoration: none; cursor: pointer;
  transition: transform .12s, filter .15s;
}
.start {
  color: #fbeee0; border: 0;
  background: radial-gradient(circle at 35% 30%, #c7392b, var(--seal) 55%, var(--seal-dark));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--seal) 55%, transparent), 0 5px 10px rgba(60,10,5,.35), inset 0 2px 2px rgba(255,255,255,.25);
  text-shadow: 0 1px 0 rgba(0,0,0,.35);
}
.start small { font-weight: 400; opacity: .85; font-size: .8rem; }
.ghost, .icon-btn {
  color: #f6e7c6; border: 2px solid #3a2412;
  background: linear-gradient(#80593a, #5f3f24);
  box-shadow: 0 3px 6px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.15);
}
.icon-btn { width: 2.9rem; padding: 0; }
.start:active, .ghost:active, .icon-btn:active { transform: scale(.96); }
@media (hover: hover) and (pointer: fine) { .start:hover, .ghost:hover, .icon-btn:hover { filter: brightness(1.1); } }
button:disabled { opacity: .55; cursor: default; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-top: 1rem; }
.toast { font-family: var(--f-ui); font-size: .85rem; color: var(--ink-soft); flex-basis: 100%; min-height: 1.2em; }
.toast:empty { display: none; }
.more-btn { background: none; border: 0; padding: .45rem 0; min-height: 2.75rem; color: var(--sea); font-family: var(--f-ui); font-weight: 600; font-size: .88rem; cursor: pointer; }
.pencil, .remove { background: none; border: 0; min-width: 2.2rem; min-height: 2.2rem; cursor: pointer; font-size: .95rem; color: var(--ink-soft); }

/* ── 처음 화면 ── */
.intro-head.notice { padding: 2.2rem 1.4rem 1.6rem; text-align: center; overflow: hidden; transform: rotate(-.4deg); }
.flag { display: block; width: 92px; margin: .2rem auto .6rem; filter: drop-shadow(0 3px 3px rgba(0,0,0,.25)); }
.intro h1 { font-size: clamp(1.8rem, 7vw, 2.6rem); line-height: 1.3; white-space: pre-line; margin: .5rem 0 .9rem; }
.lede { font-size: 1.04rem; color: var(--ink-soft); max-width: 32rem; margin: 0 auto; }
.lede b { color: var(--seal); font-weight: 400; }
.intro-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .7rem; margin-top: 1.4rem; }
/* 붉은 고무 도장 */
.stamp {
  position: absolute; right: 14px; top: 18px; transform: rotate(14deg);
  font-family: var(--f-display); font-size: .85rem; line-height: 1.1; text-align: center; color: var(--seal);
  border: 3px double var(--seal); border-radius: 8px; padding: .3rem .45rem; opacity: .72;
}
@media (max-width: 26rem) { .stamp { right: 8px; top: 10px; font-size: .7rem; } }
.roster { display: grid; gap: 1.3rem; }
.side-row { display: grid; gap: .6rem; }
.side-name {
  justify-self: start; font-family: var(--f-display); font-size: 1rem; color: #f6e7c6;
  padding: .2rem .8rem; border-radius: 4px; background: linear-gradient(#6d4a2c, #4f331b); border: 1px solid #2f1d0d;
  box-shadow: 0 2px 4px rgba(0,0,0,.25);
}
.side-name::before { content: ""; display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; margin-right: .45rem; vertical-align: .05em; background: var(--side, var(--ink)); box-shadow: 0 0 0 2px #f6e7c6; }
.side-strawhat { --side: var(--strawhat); }
.side-pirate { --side: var(--pirate); }
.side-marine { --side: var(--marine); }
.side-world { --side: var(--world); }
/* 작은 수배서 */
.posters { display: grid; grid-template-columns: repeat(auto-fill, minmax(6.4rem, 1fr)); gap: .75rem .6rem; }
.mini-poster {
  display: grid; justify-items: center; gap: .05rem; padding: .45rem .4rem .5rem; text-decoration: none; color: var(--ink);
  background: radial-gradient(ellipse, var(--paper-2) 35%, var(--paper) 80%, var(--paper-edge));
  border: 1px solid #8c7146; box-shadow: 0 4px 8px rgba(30,15,0,.3);
  transition: transform .15s;
}
.mini-poster:nth-child(3n+1) { transform: rotate(-1.5deg); }
.mini-poster:nth-child(3n+2) { transform: rotate(1deg); }
.mini-poster:nth-child(3n) { transform: rotate(-.3deg); }
@media (hover: hover) and (pointer: fine) { .mini-poster:hover { transform: rotate(0) translateY(-3px) scale(1.04); } }
.mini-poster small { font-family: var(--f-western); font-size: .78rem; letter-spacing: .04em; line-height: 1.2; }
.mini-poster .ph {
  display: grid; place-items: center; width: 100%; aspect-ratio: 1; font-size: 1.9rem; border: 2px solid #2b2116;
  background: radial-gradient(circle, rgba(255,255,255,.14) 1px, transparent 1.4px) 0 0 / 7px 7px, linear-gradient(140deg, var(--c), #2b2116);
}
.mini-poster b { font-family: var(--f-display); font-weight: 400; font-size: .95rem; line-height: 1.25; margin-top: .25rem; text-align: center; }
.mini-poster em { font-style: normal; font-family: var(--f-ui); font-size: .66rem; color: var(--ink-soft); text-align: center; line-height: 1.3; }
.chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.chips .kc {
  display: inline-flex; align-items: center; gap: .3rem; min-height: 2.6rem; padding: .3rem .8rem .3rem .6rem; border-radius: 4px;
  background: var(--paper-2); border: 1px solid color-mix(in srgb, var(--c) 45%, var(--rule)); border-left: 4px solid var(--c);
  color: var(--c-text); text-decoration: none; font-family: var(--f-ui); font-size: .9rem; font-weight: 600; cursor: pointer;
}
.traits-legend { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: .6rem 1rem; margin-top: .75rem; }
.traits-legend div { display: grid; grid-template-columns: 1.6rem auto; column-gap: .45rem; align-items: baseline; }
.traits-legend b { grid-row: span 2; font-weight: 400; }
.traits-legend strong { font-family: var(--f-display); font-weight: 400; }
.traits-legend small { grid-column: 2; color: var(--ink-soft); font-size: .86rem; line-height: 1.5; }
.how p { margin-top: .6rem; color: var(--ink-soft); font-size: .96rem; }
.how b { color: var(--ink); font-weight: 400; }

/* ── 문항: 심사 서류 + 지도 위 항로 ── */
.quiz { padding: 1.4rem 1.2rem 1.6rem; }
.quiz:not([hidden]) {
  display: block; position: relative;
  background: radial-gradient(ellipse at 50% 40%, var(--paper-2) 30%, var(--paper) 75%, var(--paper-edge) 100%);
  box-shadow: 0 8px 18px rgba(30,15,0,.28); border-radius: 3px;
}
.progress-top { display: flex; justify-content: space-between; align-items: center; font-family: var(--f-ui); font-size: .85rem; color: var(--ink-soft); }
.back { background: none; border: 0; min-height: 2.6rem; color: var(--sea); cursor: pointer; font-family: var(--f-ui); font-weight: 600; font-size: .86rem; }
/* 항로: 점선 위를 배가 X(보물)를 향해 간다 */
.track { --p: 0; position: relative; height: 34px; margin-top: .4rem; }
.track::before { content: ""; position: absolute; left: 0; right: 22px; top: 50%; border-top: 3px dashed color-mix(in srgb, var(--sea) 55%, transparent); }
.track i { position: absolute; left: 0; top: calc(50% - 2px); height: 4px; width: 0; background: var(--sea); border-radius: 4px; transition: width .35s; }
.track .ship { position: absolute; top: 0; left: calc(var(--p) * (100% - 52px)); font-size: 1.45rem; line-height: 1; transition: left .35s; filter: drop-shadow(0 2px 1px rgba(0,0,0,.25)); }
.track .goal { position: absolute; right: 0; top: 2px; font-family: var(--f-display); font-size: 1.4rem; color: var(--seal); line-height: 1; }
.question { font-size: clamp(1.35rem, 5.4vw, 1.8rem); line-height: 1.45; margin: 1.8rem 0 1.6rem; display: flex; align-items: center; }
.scale { display: flex; justify-content: space-between; align-items: center; gap: .5rem; max-width: 26rem; margin: 0 auto; }
/* 답 동그라미: 밧줄 고리 */
.scale-btn { --sz: 2.7rem; display: grid; place-items: center; width: var(--sz); height: var(--sz); padding: 0; border-radius: 50%; cursor: pointer;
  background: var(--paper-2); border: 4px solid var(--tone); box-shadow: 0 0 0 2px color-mix(in srgb, var(--tone) 30%, transparent), 0 3px 5px rgba(0,0,0,.18);
  transition: transform .12s, background .12s; }
.scale-btn.s1, .scale-btn.s5 { --sz: 3.6rem; }
.scale-btn.s2, .scale-btn.s4 { --sz: 3.05rem; }
.scale-btn.s1, .scale-btn.s2 { --tone: var(--seal); }
.scale-btn.s3 { --tone: var(--ink-soft); }
.scale-btn.s4, .scale-btn.s5 { --tone: var(--sea); }
.scale-btn.chosen, .scale-btn.was { background: var(--tone); }
.scale-btn.chosen::after { content: "✕"; color: #fbf2dc; font-family: var(--f-display); font-size: 1.1rem; }
.scale-btn.was:not(.chosen) { opacity: .45; }
@media (hover: hover) and (pointer: fine) { .scale-btn:hover { background: color-mix(in srgb, var(--tone) 22%, var(--paper-2)); } }
.scale-btn:active { transform: scale(.92); }
.scale-ends { display: flex; justify-content: space-between; max-width: 26rem; margin: .6rem auto 0; font-family: var(--f-ui); font-size: .86rem; font-weight: 600; color: var(--ink-soft); }
.hint { margin-top: 2rem; text-align: center; font-family: var(--f-ui); font-size: .78rem; color: var(--ink-soft); }
@media (pointer: coarse) { .hint { display: none; } }

/* ── 결과 ── */
.page-kicker {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
  font-family: var(--f-ui); font-size: .85rem; font-weight: 600; color: var(--on-board); margin-bottom: .9rem;
}
.page-kicker a { color: var(--on-board); }
.kicker-links { display: inline-flex; gap: 1rem; }
.hero { display: grid; gap: 1.2rem; }
/* 수배서 (실물처럼 밤에도 종이색) */
.poster {
  position: relative; margin: .6rem auto 0; width: min(100%, 22rem); padding: 1.1rem 1.25rem 1.25rem; text-align: center;
  background: radial-gradient(ellipse at center, #f4e6c4 55%, #dcc597 100%); color: #2b2116;
  border: 3px solid #2b2116; outline: 1px solid #2b2116; outline-offset: -9px; box-shadow: 0 14px 30px rgba(20,10,0,.45);
  transform: rotate(-1deg);
}
.poster::before { /* 맨 위 못 */
  content: ""; position: absolute; top: -9px; left: 50%; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #c9c5bd, #5a5650 70%); box-shadow: 0 2px 3px rgba(0,0,0,.4);
}
.poster-wanted { font-family: var(--f-western); font-size: clamp(2.6rem, 13vw, 3.4rem); line-height: 1; letter-spacing: .02em; }
.poster-photo {
  display: grid; place-items: center; aspect-ratio: 4 / 3.2; margin: .7rem 0 .55rem; border: 3px solid #2b2116;
  background: radial-gradient(circle, rgba(255,255,255,.12) 1.4px, transparent 1.6px) 0 0 / 12px 12px, linear-gradient(135deg, var(--c), #2b2116);
}
.poster-photo span { font-size: clamp(4.5rem, 24vw, 6.5rem); line-height: 1; filter: drop-shadow(0 4px 6px rgba(0,0,0,.35)); }
.mini-poster .ph, .poster-photo, .member .mark { overflow: hidden; }
/* 캐릭터 사진(images/): 사진 자리를 가득 채우고, 낡은 수배서처럼 살짝 바랜 색으로 */
.face { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 6%; filter: sepia(.18) saturate(.95); }
.poster-doa { font-family: var(--f-western); font-size: 1.05rem; letter-spacing: .06em; }
.poster-name { font-family: var(--f-display); font-size: clamp(1.5rem, 7vw, 1.9rem); line-height: 1.25; margin-top: .25rem; }
.poster-bounty { display: flex; justify-content: center; align-items: baseline; flex-wrap: wrap; gap: .35rem; margin-top: .3rem; font-family: var(--f-display); color: #7a2416; }
.poster-bounty small { font-family: var(--f-ui); font-size: .75rem; color: #6b5639; width: 100%; }
.poster-bounty b { font-weight: 400; font-size: clamp(1.4rem, 6.5vw, 1.75rem); }
.poster-bounty b::before { content: "฿ "; font-size: .8em; }
.poster-bounty.epithet b::before { content: none; }
.verdict { position: relative; text-align: center; padding: 1.4rem 1.2rem 1.3rem; }
.verdict:not(:empty) {
  background: radial-gradient(ellipse at 50% 40%, var(--paper-2) 30%, var(--paper) 75%, var(--paper-edge) 100%);
  box-shadow: 0 8px 18px rgba(30,15,0,.28); border-radius: 3px;
}
.verdict .tag { display: inline-block; font-family: var(--f-ui); font-size: .78rem; font-weight: 600; color: var(--ink-soft); }
.verdict .tag::before { content: ""; display: inline-block; width: .5rem; height: .5rem; border-radius: 50%; margin-right: .35rem; background: var(--side); vertical-align: .08em; }
.verdict h2 { font-size: clamp(1.55rem, 6.4vw, 2.05rem); line-height: 1.3; margin: .35rem 0 .5rem; }
.verdict h2 b { font-weight: 400; color: var(--key-text); }
.tagline { font-size: 1.08rem; color: var(--ink-soft); }
.match-line { display: flex; flex-wrap: wrap; justify-content: center; gap: .35rem; margin-top: .9rem; }
.pill { display: inline-block; padding: .15rem .65rem; border-radius: 3px; background: var(--paper-2); border: 1px solid color-mix(in srgb, var(--key) 40%, var(--rule)); font-family: var(--f-ui); font-size: .82rem; font-weight: 600; color: var(--key-text); }
.pill.strong { background: var(--seal); border-color: var(--seal-dark); color: #fbeee0; }
.portrait p { font-size: 1.05rem; }

.lean-bar { display: flex; height: 2rem; border-radius: 4px; overflow: hidden; border: 2px solid #2b2116; font-family: var(--f-ui); font-size: .78rem; font-weight: 600; color: #fff; }
.lean-bar div { display: grid; place-items: center; min-width: 0; background: var(--side); white-space: nowrap; overflow: hidden; }
.lean-legend { display: flex; flex-wrap: wrap; gap: .3rem 1rem; margin-top: .6rem; font-family: var(--f-ui); font-size: .82rem; color: var(--ink-soft); }
.lean-legend i { display: inline-block; width: .65rem; height: .65rem; border-radius: 2px; margin-right: .3rem; background: var(--side); }
.lean-legend b { font-weight: 600; color: var(--ink); margin-right: .3rem; }

.two { display: grid; gap: 1rem; }
@media (min-width: 40rem) { .two { grid-template-columns: 1fr 1fr; align-items: start; } }
/* 레이더: 나침반 장미 위에 */
.radar { width: 100%; max-width: 20rem; margin: 0 auto; display: block; }
.radar text { font-family: var(--f-ui); font-size: 11px; font-weight: 600; fill: var(--ink-soft); }
.trait-list { display: grid; gap: .35rem; }
.trait-row { display: grid; grid-template-columns: 4.8rem 1fr 2.6rem; align-items: center; gap: .6rem; font-family: var(--f-ui); font-size: .9rem; }
.tag-name { white-space: nowrap; }
.bar { height: .6rem; background: color-mix(in srgb, var(--rule) 70%, transparent); border-radius: 999px; overflow: hidden; box-shadow: inset 0 1px 2px rgba(0,0,0,.15); }
.bar i { display: block; height: 100%; background: var(--key, var(--sea)); border-radius: inherit; }
.num { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-soft); }
.num.dots { letter-spacing: -.1em; color: var(--key-text); }

.pairs h4 { font-size: 1.05rem; margin-bottom: .5rem; }
.pairs h4 b { font-weight: 400; margin-right: .35rem; }
.pairs ul, .runners, .members, .roles, .pair-list, .my-crew-list { list-style: none; margin: 0; padding: 0; }
.pairs li { padding: .6rem .2rem .6rem .8rem; border-left: 4px solid var(--c); margin-bottom: .5rem; background: color-mix(in srgb, var(--c) 7%, transparent); }
.pairs p { font-size: .93rem; color: var(--ink-soft); margin-top: .2rem; }
.nm { display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: .35rem; color: var(--c-text); text-decoration: none; font-family: var(--f-display); font-size: 1.05rem; }
.nm small { font-family: var(--f-ui); font-size: .75rem; color: var(--ink-soft); }
.runners li { display: grid; grid-template-columns: 2rem 1fr auto; align-items: center; gap: .6rem; padding: .55rem 0; border-bottom: 1px dashed var(--rule); }
.runners li:last-child { border-bottom: 0; }
/* 순위: 금화 */
.rank { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; color: #4a3108; font-family: var(--f-display); font-size: .9rem;
  background: radial-gradient(circle at 35% 30%, #f6dc8a, var(--gold) 60%, #8a6414); box-shadow: 0 2px 3px rgba(0,0,0,.3), inset 0 0 0 2px rgba(255,255,255,.25); }
.pct { font-family: var(--f-ui); font-size: .9rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.share-text { width: 100%; min-height: 9rem; margin-top: .75rem; font: .85rem/1.6 var(--f-ui); color: var(--ink); background: var(--paper-2); border: 1px solid var(--rule); border-radius: 4px; padding: .6rem; }

/* ── 해적단 ── */
.crew-head { padding-bottom: .3rem; }
.crew-head h2 { font-size: clamp(1.6rem, 6.5vw, 2.1rem); line-height: 1.3; color: var(--on-board); text-shadow: 0 1px 0 rgba(255,255,255,.12); }
.crew-head h2 .pencil { color: var(--on-board-soft); }
.crew-count { font-family: var(--f-ui); font-size: .85rem; font-weight: 600; color: var(--on-board-soft); margin-top: .25rem; }
.crew-head > .crew-desc { color: var(--on-board-soft); }
.crew-desc { color: var(--ink-soft); font-size: .95rem; margin-top: .5rem; }
.crew-desc b { color: var(--ink); font-weight: 400; }
.crew-loading { color: var(--on-board); font-family: var(--f-ui); }
.crew .block .crew-loading { color: var(--ink-soft); }
/* 해적단 평가서: 큰 점수 + 승인 도장 */
.crew-score { margin-top: 1rem; padding: 1.6rem 1.25rem 1.3rem; text-align: center; border: 3px double #2b2116; outline: 1px solid #2b2116; outline-offset: -9px; }
.crew-score::before { content: "해적단 평가서"; display: block; font-family: var(--f-ui); font-size: .72rem; font-weight: 600; letter-spacing: .3em; color: var(--ink-soft); margin-bottom: .4rem; }
.crew-score::after {
  content: "감정 완료"; position: absolute; right: 12px; top: 16px; transform: rotate(12deg);
  font-family: var(--f-display); font-size: .8rem; color: var(--seal); border: 2px solid var(--seal); border-radius: 50%;
  width: 4.2rem; height: 4.2rem; display: grid; place-items: center; opacity: .7;
}
.score-big { font-family: var(--f-display); line-height: 1; color: var(--seal); }
.score-big b { font-weight: 400; font-size: clamp(3.5rem, 18vw, 4.75rem); }
.score-big span { font-size: 1.5rem; margin-left: .15rem; }
.grade { display: inline-block; font-family: var(--f-display); font-size: 1.45rem; margin-top: .45rem; padding: .1rem .9rem; border-top: 2px solid #2b2116; border-bottom: 2px solid #2b2116; }
.crew-bounty { margin-top: .7rem; font-family: var(--f-ui); font-size: .92rem; color: var(--ink-soft); }
.crew-bounty b { font-family: var(--f-display); font-weight: 400; font-size: 1.2rem; color: #7a2416; }
.crew-bounty b::before { content: "฿ "; font-size: .85em; }
.score-rows { display: grid; gap: .55rem; margin-top: 1rem; text-align: left; }
.score-row { display: grid; grid-template-columns: 3.8rem 1fr 2rem; align-items: center; gap: .1rem .6rem; font-family: var(--f-ui); font-size: .9rem; font-weight: 600; }
.score-row small { grid-column: 2 / -1; font-size: .76rem; font-weight: 400; color: var(--ink-soft); line-height: 1.4; }
.score-row .bar i { background: linear-gradient(90deg, var(--gold), #8a6414); }
.crew-tip { margin-top: .9rem; font-size: .9rem; text-align: left; color: var(--ink-soft); }
.crew-tip b { font-weight: 400; color: var(--ink); margin-right: .25rem; }
.crew-cta { outline: 3px dashed color-mix(in srgb, var(--seal) 60%, transparent); outline-offset: -10px; }
.character-pick { margin-top: 1rem; display: grid; gap: .75rem; }
.pick-side { display: grid; gap: .35rem; }
.chips button.kc { font-size: .88rem; }
/* 선원 명단: 작은 수배서들 */
.members { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: .8rem; }
.member {
  position: relative; display: grid; justify-items: center; text-align: center; gap: .2rem; padding: .7rem .6rem .75rem;
  background: radial-gradient(ellipse, #fbf2dc 35%, #f0e0b8 80%, #d9c294); border: 1px solid #8c7146; box-shadow: 0 4px 8px rgba(30,15,0,.25);
}
.member:nth-child(odd) { transform: rotate(-.8deg); }
.member:nth-child(even) { transform: rotate(.7deg); }
.member.me { box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 60%, transparent), 0 4px 8px rgba(30,15,0,.25); }
.member .mark {
  display: grid; place-items: center; width: 100%; aspect-ratio: 4 / 3; font-size: 2rem; border: 2px solid #2b2116;
  background: radial-gradient(circle, rgba(255,255,255,.14) 1px, transparent 1.4px) 0 0 / 7px 7px, linear-gradient(140deg, var(--c), #2b2116);
}
.member-text { display: grid; min-width: 0; }
.member-name b { font-family: var(--f-display); font-weight: 400; font-size: 1.05rem; }
.member-meta { font-family: var(--f-ui); font-size: .76rem; color: var(--ink-soft); line-height: 1.45; }
.member-meta a { color: var(--c-text); text-decoration: none; font-weight: 600; }
.member .remove { position: absolute; top: 2px; right: 2px; }
/* 배 위의 자리: 갑판 위 팻말 */
.roles { display: grid; gap: .45rem; }
.roles li { display: grid; grid-template-columns: 6.4rem 1fr; align-items: center; gap: .6rem; padding: .55rem .7rem; border-radius: 4px; background: color-mix(in srgb, var(--c, var(--rule)) 10%, var(--paper-2)); border: 1px solid var(--rule); }
.roles li.kc { border-left: 5px solid var(--c); }
.roles li.empty { opacity: .65; border-style: dashed; background: transparent; }
.roles li.me { box-shadow: 0 0 0 2px color-mix(in srgb, var(--c) 50%, transparent); }
.role-name { font-family: var(--f-display); font-size: 1rem; }
.role-name small { display: block; font-family: var(--f-ui); font-size: .66rem; font-weight: 600; color: var(--seal); letter-spacing: .08em; }
.role-who { display: grid; min-width: 0; }
.role-who b { font-weight: 400; font-family: var(--f-display); }
.role-who small { font-size: .8rem; color: var(--ink-soft); }
.pair-card { padding: 1rem; border-radius: 4px; background: var(--paper-2); border: 1px dashed var(--rule); text-align: center; }
.pair-card h4 { font-size: 1rem; }
.pair-names { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: .5rem; margin-top: .5rem; }
.pair-names b, .pair-who b { font-family: var(--f-display); font-weight: 400; }
.pair-names small, .pair-who small { display: block; font-family: var(--f-ui); font-size: .72rem; color: var(--ink-soft); }
.pair-score { margin-top: .4rem; font-family: var(--f-ui); font-weight: 600; font-size: .9rem; color: var(--seal); }
.pair-list li { display: grid; grid-template-columns: 1fr 5rem 7rem; align-items: center; gap: .6rem; padding: .5rem 0; border-bottom: 1px dashed var(--rule); }
.pair-list li:last-child { border-bottom: 0; }
@media (max-width: 30rem) { .pair-list li { grid-template-columns: 1fr 6.5rem; } .pair-bar { display: none; } }
.pair-who { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; min-width: 0; }
.pair-who > span { color: var(--ink-soft); }
.pair-bar { height: .55rem; border-radius: 999px; background: color-mix(in srgb, var(--rule) 70%, transparent); overflow: hidden; }
.pair-bar i { display: block; height: 100%; background: var(--sea); }
.pair-num { text-align: right; font-family: var(--f-ui); font-weight: 600; font-variant-numeric: tabular-nums; }
.pair-num small { display: block; font-size: .7rem; font-weight: 400; color: var(--ink-soft); white-space: nowrap; }
.my-crew-list li { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: .25rem 1rem; padding: .7rem 0; border-bottom: 1px dashed var(--rule); }
.my-crew-list a { font-family: var(--f-display); font-size: 1.12rem; text-decoration: none; }
.my-crew-list a::before { content: "🏴‍☠️ "; }
.my-crew-list span { font-family: var(--f-ui); font-size: .8rem; color: var(--ink-soft); }
.inline-edit { display: inline-flex; gap: .4rem; align-items: center; max-width: 100%; }
.inline-edit input { min-width: 0; width: 12rem; font: 1rem var(--f-ui); padding: .4rem .6rem; border-radius: 4px; border: 2px solid #6d4a2c; background: var(--paper-2); color: var(--ink); }
.inline-edit .ghost { min-height: 2.4rem; padding: .3rem .8rem; font-size: .85rem; }
.crew-danger { background: transparent; box-shadow: none; border: 2px dashed var(--on-board-soft); transform: none !important; }
.crew-danger::before { content: none; }
.crew-danger .toast { color: var(--on-board); }
.danger { color: #fbeee0; border-color: var(--seal-dark); background: linear-gradient(#8f2a1f, #6e160f); }

/* ── 공유 고르기 창: 종이 쪽지 ── */
.share-sheet { border: 0; padding: 0; background: transparent; max-width: 100vw; }
.share-sheet::backdrop { background: rgba(15, 8, 2, .55); }
.sheet-body { width: min(26rem, calc(100vw - 32px)); padding: 1.25rem; background: radial-gradient(ellipse, var(--paper-2) 40%, var(--paper)); color: var(--ink); border-radius: 4px; border: 2px solid #6d4a2c; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.sheet-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(6rem, 1fr)); gap: .6rem; margin: .9rem 0; }
.sheet-grid button { display: grid; justify-items: center; gap: .35rem; min-height: 4.5rem; padding: .8rem .4rem; border-radius: 4px; border: 1px solid var(--rule); background: var(--paper-2); color: var(--ink); cursor: pointer; font-family: var(--f-ui); font-weight: 600; font-size: .85rem; }
.sheet-close { width: 100%; }
@media (max-width: 30rem) {
  .share-sheet { margin: auto 0 0; width: 100vw; }
  .sheet-body { width: 100vw; border-radius: 10px 10px 0 0; padding-bottom: calc(1.25rem + env(safe-area-inset-bottom)); }
}
.img-sheet { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; align-content: center; gap: 1rem; padding: 16px; background: rgba(10, 6, 2, .85); color: #fff; text-align: center; font-family: var(--f-ui); }
.img-sheet img { max-width: 100%; max-height: 70vh; border-radius: 4px; }

/* ── 맨 아래 ── */
.site-foot { max-width: 41rem; margin: 0 auto; padding: 1.5rem 0 2.5rem; border-top: 3px solid var(--board-dark); font-family: var(--f-ui); font-size: .78rem; color: var(--on-board-soft); display: grid; gap: .3rem; }
.site-foot a { color: var(--on-board); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
