/* ===== 갈라예측 (폴리마켓식) ===== */
* { box-sizing: border-box; }
html, body {
  margin: 0; background: #000; color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, Helvetica, Arial, sans-serif;
}
#app { max-width: 480px; margin: 0 auto; min-height: 100vh; }

.predict-main { padding-bottom: 120px; }

/* 포인트 pill */
.point-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px;
  background: linear-gradient(90deg, #1c2b4a, #17325e);
  border: 1px solid #3356ff; color: #fff; font-weight: 800; font-size: 13px;
  cursor: pointer;
}
.point-coin { font-size: 14px; }

/* hero */
.predict-hero { padding: 16px 16px 8px; }
.predict-title { font-size: 22px; font-weight: 900; margin: 0; }
.predict-sub { font-size: 13px; color: #9aa; margin: 6px 0 0; }

/* 세그먼트 탭 */
.seg-tabs { display: flex; gap: 6px; padding: 12px 16px 6px; }
.seg-tab {
  flex: 1; padding: 10px; border-radius: 10px;
  background: #101010; border: 1px solid #222; color: #999;
  font-weight: 800; font-size: 13px; cursor: pointer;
}
.seg-tab.active { background: #17325e; border-color: #3356ff; color: #fff; }

.predict-view { padding: 6px 16px 0; }
.predict-view[hidden] { display: none; }

/* 카테고리 칩 */
.cat-chips { display: flex; gap: 8px; overflow-x: auto; padding: 8px 0; -webkit-overflow-scrolling: touch; }
.cat-chips::-webkit-scrollbar { display: none; }
.cat-chip {
  flex: 0 0 auto; padding: 7px 14px; border-radius: 999px;
  background: #111; border: 1px solid #2a2a2a; color: #bbb;
  font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.cat-chip.active { background: #fff; color: #000; border-color: #fff; }

.sort-row { padding: 4px 0 10px; }
.sort-select {
  background: #111; color: #ddd; border: 1px solid #2a2a2a;
  border-radius: 10px; padding: 8px 10px; font-size: 13px; font-weight: 700;
}

/* 마켓 카드 */
.market-list { display: flex; flex-direction: column; gap: 12px; }
.market-card {
  background: #0d0d0d; border: 1px solid #1e1e1e; border-radius: 16px;
  padding: 14px; cursor: pointer; transition: border-color .15s;
}
.market-card:active { border-color: #3356ff; }
.mc-top { display: flex; gap: 12px; align-items: flex-start; }
.mc-thumb { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; flex: 0 0 auto; background: #1a1a1a; }
.mc-thumb-ph { display: flex; align-items: center; justify-content: center; font-size: 24px; }
.mc-head { flex: 1; min-width: 0; }
.mc-q { font-size: 15px; font-weight: 800; line-height: 1.35; }
.mc-meta { font-size: 12px; color: #888; margin-top: 4px; }
.mc-time { color: #ffb020; font-weight: 700; }
.mc-resolved { font-weight: 800; }
.mc-resolved.yes { color: #3356ff; }
.mc-resolved.no { color: #ff4f6e; }

.mc-prob { margin-top: 12px; }
.mc-prob-bar { height: 8px; border-radius: 999px; background: #ff4f6e; overflow: hidden; }
.mc-prob-yes { height: 100%; background: #3356ff; border-radius: 999px 0 0 999px; }
.mc-prob-legend { display: flex; justify-content: space-between; margin-top: 6px; font-size: 13px; font-weight: 800; }
.mc-yes { color: #6d8bff; }
.mc-no { color: #ff4f6e; }

.mc-foot { display: flex; justify-content: space-between; margin-top: 12px; font-size: 12px; color: #999; }
.mc-go { color: #3356ff; font-weight: 800; }

.empty-zone {
  padding: 40px 16px; text-align: center; color: #777; font-size: 14px;
}

/* FAB */
.create-fab {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: 78px; z-index: 80;
  padding: 14px 22px; border-radius: 999px;
  background: #3356ff; color: #fff; font-weight: 900; font-size: 15px;
  border: none; box-shadow: 0 6px 20px rgba(51,86,255,.5); cursor: pointer;
}

/* 리더보드 */
.lb-caption { font-size: 13px; color: #9aa; padding: 8px 0 12px; }
.leaderboard { display: flex; flex-direction: column; gap: 8px; }
.lb-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; background: #0d0d0d; border: 1px solid #1c1c1c; border-radius: 12px;
}
.lb-rank { width: 28px; text-align: center; font-weight: 900; font-size: 15px; color: #aaa; }
.lb-rank.top { font-size: 18px; }
.lb-name { flex: 1; font-weight: 700; font-size: 14px; }
.lb-stat { font-weight: 800; font-size: 13px; color: #3356ff; }
.lb-title { font-size: 11px; padding: 2px 6px; border-radius: 6px; margin-left: 4px; }
.lb-title.king { background: #3a2d00; color: #ffd54a; }
.lb-title.god { background: #2a1440; color: #c98bff; }
.lb-loading { padding: 24px; text-align: center; color: #777; }

/* 생성 모달 */
.pm-modal {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.72); display: flex; align-items: flex-end; justify-content: center;
}
.pm-modal[hidden] { display: none; }
.pm-modal-inner {
  width: 100%; max-width: 480px; max-height: 88vh; overflow-y: auto;
  background: #0e0e0e; border-radius: 20px 20px 0 0; border-top: 1px solid #222;
}
.pm-modal-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px; border-bottom: 1px solid #1c1c1c; position: sticky; top: 0; background: #0e0e0e;
}
.pm-modal-header h2 { font-size: 17px; margin: 0; }
.pm-close { background: none; border: none; color: #aaa; font-size: 20px; cursor: pointer; }
.pm-modal-body { padding: 16px; display: flex; flex-direction: column; }
.pm-label { font-size: 13px; font-weight: 800; color: #ccc; margin: 12px 0 6px; }
.pm-input {
  width: 100%; padding: 12px; border-radius: 10px;
  background: #050505; border: 1px solid #2a2a2a; color: #fff; font-size: 14px;
}
.pm-textarea { min-height: 72px; resize: vertical; }
.pm-image-btn {
  padding: 12px; border-radius: 10px; background: #111; border: 1px dashed #333;
  color: #bbb; font-weight: 700; cursor: pointer;
}
.pm-image-preview:not(:empty) { margin-top: 10px; }
.pm-image-preview img { width: 100%; max-height: 180px; object-fit: cover; border-radius: 12px; }
.pm-submit {
  margin-top: 20px; padding: 15px; border-radius: 999px;
  background: #3356ff; color: #fff; font-weight: 900; font-size: 16px; border: none; cursor: pointer;
}
.pm-submit:disabled { opacity: .6; }

/* 토스트 */
.pm-toast {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: 150px; z-index: 300;
  background: #fff; color: #000; padding: 12px 18px; border-radius: 999px;
  font-weight: 800; font-size: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.5);
}
.pm-toast[hidden] { display: none; }

/* ===== 예언가 등급 ===== */
.tier-badge {
  display: inline-block; font-size: 11px; font-weight: 800;
  padding: 2px 7px; border-radius: 999px; border: 1px solid currentColor;
  margin-top: 3px;
}
.tier-card {
  background: linear-gradient(135deg, #0f1420, #141a26);
  border: 1px solid #23304a; border-radius: 16px; padding: 16px; margin: 6px 0 14px;
}
.tier-card-guest { color: #9aa; text-align: center; padding: 8px; font-size: 14px; }
.tier-card-top { display: flex; align-items: center; gap: 12px; }
.tier-emoji {
  width: 46px; height: 46px; border-radius: 12px; border: 1px solid;
  display: flex; align-items: center; justify-content: center; font-size: 24px; flex: 0 0 auto;
}
.tier-card-name { font-size: 18px; font-weight: 900; }
.tier-card-pts { font-size: 12px; color: #9aa; margin-top: 2px; }
.tier-progress { height: 8px; background: #1a2233; border-radius: 999px; overflow: hidden; margin: 12px 0 6px; }
.tier-progress-fill { height: 100%; border-radius: 999px; }
.tier-next { font-size: 12px; color: #9aa; text-align: right; }

.rank-subtabs { display: flex; gap: 6px; margin-bottom: 10px; }
.rank-subtab {
  flex: 1; padding: 8px; border-radius: 8px; background: #101010;
  border: 1px solid #222; color: #999; font-weight: 800; font-size: 12px; cursor: pointer;
}
.rank-subtab.active { background: #17325e; border-color: #3356ff; color: #fff; }
.rank-pane[hidden] { display: none; }
.lb-sub { font-size: 11px; color: #888; font-weight: 600; }
.lb-name { line-height: 1.35; }

/* ===== 다중 선택지 (목록 카드) ===== */
.mc-multi { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.mc-multi-row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; padding: 5px 0; border-bottom: 1px solid #141414; }
.mc-multi-row.win .mc-multi-label { color: #dfe5f0; font-weight: 800; }
.mc-multi-label { color: #ddd; }
.mc-multi-pct { font-weight: 800; color: #6d8bff; }
.mc-multi-more { font-size: 12px; color: #777; padding-top: 2px; }

/* ===== 생성 모달: 유형/후보 ===== */
.pm-type-tabs { display: flex; gap: 8px; }
.pm-type-tab { flex: 1; padding: 11px; border-radius: 10px; background: #111; border: 1px solid #2a2a2a; color: #999; font-weight: 800; font-size: 14px; cursor: pointer; }
.pm-type-tab.active { background: #17325e; border-color: #3356ff; color: #fff; }
.pm-hint { font-size: 11px; color: #777; font-weight: 600; }
.pm-outcome-row { display: flex; gap: 8px; margin-bottom: 8px; }
.pm-outcome-input { flex: 1; }
.pm-outcome-del { width: 42px; border-radius: 10px; background: #1a0808; border: 1px solid #3a1414; color: #ffaaaa; font-weight: 800; cursor: pointer; }
.pm-add-outcome { width: 100%; padding: 10px; border-radius: 10px; background: #111; border: 1px dashed #333; color: #aac4ff; font-weight: 700; cursor: pointer; }

/* 파일 input: 화면에서만 숨김(모바일 label[for] 안전) */
.visually-hidden-file {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0; opacity: 0; pointer-events: none;
}


/* 마켓 카드 foot: 통계 + 인라인 이모지 액션 */
.mc-foot { align-items: center; }
.mc-stats { display: inline-flex; align-items: center; gap: 12px; }
.mc-act {
  background: none; border: none; padding: 0; cursor: pointer;
  color: #999; font-size: 12px; font-weight: 700;
  display: inline-flex; align-items: center; gap: 3px;
}
.mc-act.mc-like.on { color: #6d8bff; }
.mc-act.mc-dislike.on { color: #ff6f86; }
.mc-act.mc-save { color: #8a8f99; }
.mc-act.mc-save .ic-bookmark { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; display: block; }
.mc-act.mc-save.on { color: #f5c518; }
.mc-act.mc-save.on .ic-bookmark { fill: #f5c518; }
.mc-act.mc-share { color: #8a8f99; }
.mc-act.mc-share .ic-share { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; display: block; }
.mc-act:disabled { opacity: .5; }
