/* 홀덤 운세 — 오늘의 패
   스펙 = docs/superpowers/specs/2026-08-15-holdem-fortune-design.md
   ⚠ 앱 토큰만 쓴다 (--g0..--g3 · --t0..--t2 · --red · --gold · --grn · --sans · --num · --ease).
      새 색을 만들지 않는다 — 디자인 시스템 v2 그대로. */

/* ── 홈 티저 카드 ────────────────────────────────────────────────────────────
   ⭐ 티저다 — 패도 점수도 문구도 여기 안 보여준다. 다 보여주면 열어볼 이유가 없다.
      (2026-08-15 사용자: 결과 요약 띠를 보고 "뭐야 이게 뭐야") */
#fortuneCard { padding: 12px 12px 4px; }
.fx-teaser {
  display: flex; align-items: center; gap: 13px; width: 100%;
  padding: 15px 15px; border-radius: 13px; cursor: pointer; text-align: left;
  background: linear-gradient(135deg, #191A20 0%, #131418 55%, #1C1913 100%);
  border: 1px solid var(--hair2); color: var(--t0);
  font-family: var(--sans); position: relative; overflow: hidden;
}
.fx-teaser:active { transform: scale(.988); }
.fx-teaser::after {                                   /* 골드 스윕 — 안 뽑은 날만 */
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 38%, rgba(215,182,111,.14) 50%, transparent 62%);
  transform: translateX(-120%); animation: fsheen 3.6s var(--ease) infinite;
}
.fx-teaser.fx-seen::after { animation: none; }
.fx-teaser.fx-seen { background: var(--g1); }
@keyframes fsheen { 0%,60% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }

/* 카드 두 장이 겹쳐 있는 훅 */
.fx-teaser .fx-tc { position: relative; width: 40px; height: 44px; flex: 0 0 40px; }
.fx-teaser .fx-tc i {
  position: absolute; top: 4px; width: 27px; height: 37px; border-radius: 4px;
  background:
    repeating-linear-gradient(45deg, rgba(215,182,111,.13) 0 3px, transparent 3px 6px),
    linear-gradient(160deg, #262A33, #171A20);
  border: 1px solid #3A4050; box-shadow: 0 2px 6px rgba(0,0,0,.5);
}
.fx-teaser .fx-tc i:first-child { left: 0; transform: rotate(-9deg); }
.fx-teaser .fx-tc i:last-child  { left: 11px; transform: rotate(7deg); }
.fx-teaser.fx-seen .fx-tc i { opacity: .55; }

.fx-teaser .fx-tx { flex: 1; min-width: 0; }
/* ⚠⚠ display:block 이 없으면 두 줄이 inline 으로 이어 붙는다 — 실제로 겪었다
      ("…정한다" + "무리해서…" → "정한다무리해서"). nowrap·말줄임도 같이 죽는다. */
.fx-teaser .fx-t1 {
  display: block; font-size: 14.5px; font-weight: 800; letter-spacing: -.3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fx-teaser .fx-t2 {
  display: block; font-size: 11.5px; color: var(--t1); margin-top: 4px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fx-teaser .fx-ch { color: var(--t2); flex: 0 0 auto; font-size: 17px; }

/* ── 전체화면 ───────────────────────────────────────────────────────────── */
#fort .fx-body { padding: 6px 16px 40px; }
/* 뒤집기 전 — 카드만 있어 아래가 텅 빈다. 세로 중앙으로 (뒤집으면 클래스가 빠진다) */
#fort .fx-body.fx-pre {
  display: flex; flex-direction: column; justify-content: center;
  min-height: calc(100dvh - 132px);
}
.fx-hero { text-align: center; padding: 8px 0 2px; }
.fx-hero .fx-date { font-size: 11.5px; color: var(--t1); font-weight: 700; letter-spacing: .3px; }
.fx-hero .fx-title {
  font-size: 19.5px; font-weight: 800; letter-spacing: -.5px; margin-top: 6px;
  color: var(--t0); line-height: 1.36; word-break: keep-all;
}
.fx-hero .fx-sub { font-size: 12.5px; color: var(--t1); margin-top: 7px; font-weight: 600; }

.fx-spread { display: flex; justify-content: center; gap: 12px; margin: 22px 0 4px; }

/* ── 카드 ──────────────────────────────────────────────────────────────────
   ⭐ 진짜 트럼프 배치 — 모서리 인덱스 + 숫자만큼의 핍.
   ⭐⭐ **카드는 밝다.** 다크 앱이라고 카드까지 어둡게 했더니 배경에 묻히고 글자가 안 읽혔다
      (2026-08-15 사용자). 브랜드 색은 바탕이 아니라 **문양**에 넣는다 —
      ♠♣ = 차콜 · ♥♦ = 다홍. 전통 규칙(검정/빨강)이 그대로 우리 색이 된다.
   ⚠ 크기는 --cw 하나로만 잡는다. 미니 카드가 --cw 만 바꿔도 전부 따라오게. */
/* ⚠ 카드는 주인공이 아니다 — 운세 글과 4운이 주인공이라 카드가 화면을 먹으면 안 된다
      (2026-08-15 사용자 "패가 너무 크다"). 106 → 78 */
.fx-card {
  --cw: 78px;
  width: var(--cw); height: calc(var(--cw) * 1.4); flex: 0 0 var(--cw);
  perspective: 800px;
}
.fx-card.fx-mini { --cw: 46px; perspective: 460px; }
.fx-card .fx-in {
  position: relative; width: 100%; height: 100%;
  transform-style: preserve-3d; transition: transform .62s var(--ease);
}
.fx-card.fx-flip .fx-in { transform: rotateY(180deg); }
.fx-card .fx-face, .fx-card .fx-back {
  position: absolute; inset: 0; backface-visibility: hidden;
  border-radius: calc(var(--cw) * .08); overflow: hidden;
}

/* 뒷면 — 다홍 격자 + 이너 라인 + 스페이드 엠블럼.
   앞면이 밝아도 뒷면은 어둡다(진짜 카드가 그렇고, 뒤집는 순간 대비가 커진다) */
.fx-card .fx-back {
  background:
    repeating-linear-gradient(45deg, rgba(255,75,64,.14) 0 1.5px, transparent 1.5px 5.5px),
    repeating-linear-gradient(-45deg, rgba(255,75,64,.14) 0 1.5px, transparent 1.5px 5.5px),
    linear-gradient(160deg, #22262F, #0F1116);
  border: 1px solid #3C4453; box-shadow: 0 10px 26px rgba(0,0,0,.66);
}
.fx-card .fx-back span {
  position: absolute; inset: calc(var(--cw) * .05);
  border: 1px solid rgba(255,75,64,.38); border-radius: calc(var(--cw) * .05);
  display: grid; place-items: center; color: rgba(255,75,64,.8);
}
.fx-card .fx-back svg {
  width: calc(var(--cw) * .30); height: calc(var(--cw) * .30); display: block;
  filter: drop-shadow(0 0 calc(var(--cw) * .09) rgba(255,75,64,.55));
}

/* 앞면 — 밝은 카드. 테두리 없이 그림자로 띄운다 */
.fx-card .fx-face {
  transform: rotateY(180deg);
  background: linear-gradient(168deg, #FDFCFA 0%, #F4F2ED 100%);
  box-shadow: 0 10px 26px rgba(0,0,0,.62), inset 0 1px 0 rgba(255,255,255,.9);
  color: #15171C;                                   /* ♠♣ — 우리 '검정' */
  font-family: var(--num); line-height: 1;
}
.fx-card .fx-face.fx-red { color: var(--red); }     /* ♥♦ — 우리 다홍 */
.fx-frame {
  position: absolute; inset: calc(var(--cw) * .042);
  border: 1px solid rgba(21,23,28,.10); border-radius: calc(var(--cw) * .05);
  pointer-events: none;
}
.fx-face.fx-red .fx-frame { border-color: rgba(255,75,64,.20); }

/* 모서리 인덱스 (좌상단 / 우하단 180°) */
.fx-ix {
  position: absolute; top: calc(var(--cw) * .055); left: calc(var(--cw) * .08);
  display: flex; flex-direction: column; align-items: center;
  gap: calc(var(--cw) * .02); line-height: .92;
}
.fx-ix b { font-size: calc(var(--cw) * .225); font-weight: 800; letter-spacing: -.06em; }
.fx-ix svg { width: calc(var(--cw) * .13); height: calc(var(--cw) * .13); display: block; }
.fx-ix.fx-ix2 {
  top: auto; left: auto;
  bottom: calc(var(--cw) * .055); right: calc(var(--cw) * .08);
  transform: rotate(180deg);
}

/* 핍 — [좌·중·우] 세 열 */
.fx-pips {
  position: absolute; inset: calc(var(--cw) * .225) calc(var(--cw) * .245);
  display: flex; justify-content: space-between;
}
.fx-col { display: flex; flex-direction: column; justify-content: space-between; align-items: center; }
.fx-col:nth-child(2) { justify-content: space-around; }   /* 가운데 열은 균등 배치 */
.fx-col svg { width: calc(var(--cw) * .16); height: calc(var(--cw) * .16); display: block; }
/* ⛔ 아래 절반을 180° 회전하지 말 것 — 문양이 뒤집히면 다른 문양으로 읽힌다(fortune.js 주석) */

/* A — 큰 문양 하나 */
.fx-ace { position: absolute; inset: 0; display: grid; place-items: center; }
.fx-ace svg { width: calc(var(--cw) * .42); height: calc(var(--cw) * .42); }

/* J · Q · K */
.fx-court {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: calc(var(--cw) * .04);
}
.fx-court b { font-size: calc(var(--cw) * .40); font-weight: 800; letter-spacing: -.07em; }
.fx-court svg { width: calc(var(--cw) * .185); height: calc(var(--cw) * .185); }

.fx-tap {
  text-align: center; font-size: 13px; color: var(--t1); font-weight: 700;
  margin: 18px 0 0; animation: ftapb 1.9s ease-in-out infinite;
}
@keyframes ftapb { 0%,100% { opacity: .55; } 50% { opacity: 1; } }

/* ── 결과 ────────────────────────────────────────────────────────────────── */
.fx-res { margin-top: 6px; }
.fx-score { text-align: center; margin: 16px 0 0; }
.fx-score .fx-n {
  font-family: var(--num); font-size: 58px; font-weight: 800; color: var(--gold);
  letter-spacing: -2.5px; line-height: 1;
}
.fx-score .fx-n.fx-low { color: var(--t1); }
.fx-score .fx-u { font-size: 16px; font-weight: 700; margin-left: 2px; color: var(--t1); }
.fx-score .fx-cap { font-size: 11px; color: var(--t2); font-weight: 700; margin-top: 8px; letter-spacing: .4px; }

/* 핸드 표기 한 줄 — 별명이 있으면 별명이 앞 */
.fx-hand {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 12px; flex-wrap: wrap;
}
.fx-hand .fx-hn { font-size: 13.5px; font-weight: 800; color: var(--gold); letter-spacing: -.2px; }
.fx-hand .fx-hk { font-family: var(--num); font-size: 13px; font-weight: 700; color: var(--t0); }
.fx-hand .fx-hr { font-size: 11.5px; color: var(--t2); font-weight: 700; }

/* 테이블 한 줄 */
.fx-line {
  margin-top: 18px; padding: 15px 15px 14px; border-radius: 13px;
  background: linear-gradient(150deg, #1A1B21, #141519); border: 1px solid var(--hair2);
}
.fx-line .fx-lk { font-size: 10.5px; color: var(--gold); font-weight: 800; letter-spacing: .8px; }
.fx-line .fx-lv {
  margin-top: 8px; font-size: 14.5px; line-height: 1.62; color: var(--t0);
  font-weight: 600; word-break: keep-all;
}

/* ⭐ 행운 핸드 — 점수가 낮은 날 빠져나갈 구멍 */
.fx-lucky {
  margin-top: 12px; padding: 14px 15px 15px; border-radius: 13px;
  background: linear-gradient(150deg, rgba(91,192,143,.07), rgba(20,21,25,.6));
  border: 1px solid rgba(91,192,143,.30);
}
.fx-lucky .fx-lkh { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.fx-lucky .fx-lkb { font-size: 11px; font-weight: 800; color: var(--grn); letter-spacing: .3px; }
.fx-lucky .fx-lkl { font-size: 11px; color: var(--t1); font-weight: 700; }
.fx-lucky .fx-lkrow { display: flex; align-items: center; gap: 12px; margin-top: 11px; }
.fx-lucky .fx-lkc { display: flex; gap: 5px; flex: 0 0 auto; }
.fx-lucky .fx-lkt { min-width: 0; }
.fx-lucky .fx-lkn { font-size: 17px; font-weight: 800; color: var(--t0); letter-spacing: -.4px; }
.fx-lucky .fx-lks { font-family: var(--num); font-size: 11.5px; color: var(--t1); font-weight: 600; margin-top: 4px; }
.fx-lucky .fx-lkm {
  margin-top: 12px; padding-top: 11px; border-top: 1px solid var(--hair);
  font-size: 13px; color: var(--t0); font-weight: 600; line-height: 1.55; word-break: keep-all;
}

/* ── 생년월일 입력 ─────────────────────────────────────────────────────────
   ⭐⭐ 이게 있어야 점수의 근거가 선다. 로그인 없이 기기에 저장한다. */
.fx-fld { margin-top: 20px; }
.fx-fld label { display: block; font-size: 12px; color: var(--t1); font-weight: 700; margin-bottom: 9px; }
.fx-fld label b { color: var(--t2); font-weight: 600; font-size: 11px; margin-left: 5px; }
.fx-3 { display: flex; gap: 8px; }
.fx-fld select {
  flex: 1; width: 100%; padding: 14px 34px 14px 13px; border-radius: 11px;
  background-color: var(--g2); border: 1px solid var(--hair2); color: var(--t0);
  font-family: var(--sans); font-size: 14.5px; font-weight: 700;
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8'><path d='M1 1.5L6 6.5l5-5' stroke='%239CA2AE' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat; background-position: right 13px center;
}
.fx-hint { font-size: 11.5px; color: var(--t2); margin-top: 8px; font-weight: 600; }
.fx-go {
  width: 100%; margin-top: 26px; padding: 15px; border-radius: 12px; border: 0;
  background: var(--red); color: #fff; font-size: 15px; font-weight: 800;
  font-family: var(--sans); cursor: pointer;
}
.fx-go:active { transform: scale(.99); }

/* ── 4운 ───────────────────────────────────────────────────────────────────
   문양 순서(♣♦♥♠)와 인덱스가 같다 — 카드 문양이 곧 그 운이다 */
.fx-fort {
  margin-top: 16px; padding: 4px 14px 8px; border-radius: 13px;
  background: var(--g2); border: 1px solid var(--hair);
}
.fx-f1 { display: flex; align-items: center; gap: 11px; padding: 10px 0; border-bottom: 1px solid var(--hair); }
.fx-f1:last-child { border-bottom: 0; }
.fx-fk {
  flex: 0 0 104px; display: flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 700; color: var(--t1);
}
.fx-fk svg { width: 12px; height: 12px; flex: 0 0 12px; }
.fx-fbar { flex: 1; height: 6px; border-radius: 3px; background: var(--hair2); overflow: hidden; }
.fx-fbar i { display: block; height: 100%; border-radius: 3px; background: var(--t2); }
.fx-fv { flex: 0 0 26px; text-align: right; font-family: var(--num); font-size: 13px; font-weight: 800; color: var(--t1); }
.fx-ftop .fx-fk { color: var(--t0); }
.fx-ftop .fx-fbar i { background: var(--gold); }
.fx-ftop .fx-fv { color: var(--gold); }

/* ── 사주 한 줄 ────────────────────────────────────────────────────────────── */
.fx-saju {
  margin-top: 14px; padding: 12px 14px 11px; border-radius: 12px;
  background: var(--g1); border: 1px solid var(--hair); position: relative;
}
.fx-sjr {
  display: flex; align-items: baseline; gap: 9px; padding: 5px 0;
  font-size: 12px; color: var(--t1); font-weight: 600;
}
.fx-sjk { flex: 0 0 44px; font-size: 11px; color: var(--t2); font-weight: 700; }
.fx-saju b { color: var(--t0); font-weight: 800; letter-spacing: -.01em; }
.fx-sjd { color: var(--t2); margin: 0 2px; }
.fx-saju .fx-dim { color: var(--t2); font-size: 11px; font-weight: 600; }
.fx-edit {
  position: absolute; top: 11px; right: 13px;
  background: none; border: 0; color: var(--t2);
  font-size: 11px; font-weight: 700; text-decoration: underline;
  font-family: var(--sans); cursor: pointer; padding: 0;
}

/* 잠금 (미사용 — 4운이 열리며 없어졌다. 되살릴 일 있으면 여기) */
.fx-lock {
  margin-top: 14px; padding: 18px 16px; border-radius: 13px; text-align: center;
  background: var(--g2); border: 1px dashed var(--hair2);
}
.fx-lock .fx-lt { font-size: 13px; font-weight: 800; color: var(--t0); }
.fx-lock .fx-ls { font-size: 12px; color: var(--t1); margin-top: 6px; font-weight: 600; line-height: 1.5; }

.fx-dis { margin-top: 18px; text-align: center; font-size: 11px; color: var(--t2); font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  .fx-teaser::after { animation: none; }
  .fx-tap { animation: none; }
  .fx-card .fx-in { transition: none; }
}
