  :root {
    --bg-top: #2a2944;
    --bg-bot: #14131f;
    --glass: rgba(255,255,255,0.06);
    --stroke: rgba(255,255,255,0.10);
    --text: #eef0fb;
    --text-2: #a9abc6;
    --text-3: #6f7191;
    --glow: #8fb7ff;
    --glow-2: #b79cff;
    --sheet-a: #e9e6f7;
    --sheet-b: #c9d2f3;
    --sheet-ink: #2b2d4a;
    --sheet-ink-2: #6e7196;
  }
  * { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
  /* 스크롤바: 브라우저 기본 흰색 대신 앱 배경에 어울리는 가늘고 은은한 라벤더색으로 통일한다. */
  * { scrollbar-width: thin; scrollbar-color: rgba(175,190,255,.38) transparent; }
  *::-webkit-scrollbar { width: 8px; height: 8px; }
  *::-webkit-scrollbar-track { background: transparent; }
  *::-webkit-scrollbar-thumb { background: rgba(175,190,255,.34); border: 2px solid transparent; background-clip: content-box; border-radius: 999px; }
  *::-webkit-scrollbar-thumb:hover { background: rgba(205,214,255,.58); background-clip: content-box; }
  .reading-tabs, .pager, #resultModal .page { scrollbar-width: none; }
  /* 모서리가 둥근 창은 스크롤바가 모서리 밖으로 삐져나와 보이므로, 크롬/사파리에서는 스크롤 트랙의 위아래를 둥근 반경만큼 띄운다. */
  @supports selector(::-webkit-scrollbar) {
    .about-box, .menu-box, .intro-box { scrollbar-width: auto; scrollbar-color: auto; }
    .about-box::-webkit-scrollbar-track, .menu-box::-webkit-scrollbar-track, .intro-box::-webkit-scrollbar-track { margin: 28px 0; }
  }
  html, body { margin: 0; min-height: 100%; }
  body {
    font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
    color: var(--text);
    background: radial-gradient(120% 60% at 50% 0%, #3a3760 0%, transparent 60%),
                linear-gradient(180deg, var(--bg-top), var(--bg-bot));
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
  }
  .stars { position: fixed; inset: 0; pointer-events: none; z-index: 0;
    background-image:
      radial-gradient(1.5px 1.5px at 18% 12%, #fff9 50%, transparent 51%),
      radial-gradient(1px 1px at 72% 8%, #fff7 50%, transparent 51%),
      radial-gradient(1px 1px at 86% 26%, #fff6 50%, transparent 51%),
      radial-gradient(1.5px 1.5px at 40% 30%, #cfe0ff99 50%, transparent 51%),
      radial-gradient(1px 1px at 8% 44%, #fff5 50%, transparent 51%),
      radial-gradient(1px 1px at 62% 48%, #fff4 50%, transparent 51%);
    animation: tw 5s ease-in-out infinite alternate; transition: opacity .3s ease; }
  @keyframes tw { from { opacity: .5 } to { opacity: 1 } }

  .app {
    position: relative; z-index: 1;
    width: 100%; max-width: none; margin: 0 auto; height: 100vh; height: 100svh; height: 100dvh; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain;
    display: flex; flex-direction: column;
    padding: max(14px, env(safe-area-inset-top)) clamp(20px, 4vw, 72px) 0;
  }

  /* 상단 */
  .top { display: flex; align-items: center; justify-content: space-between; height: 44px; }
  .text-btn {
    height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--stroke);
    background: var(--glass); color: var(--text); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); white-space: nowrap;
  }
  .text-btn:active { transform: scale(.97); }
  .top { position: relative; }
  .brand { position: absolute; left: 50%; transform: translateX(-50%); pointer-events: none; }
  .brand { font-weight: 600; font-size: 13px; letter-spacing: .2em; display: flex; align-items: center; gap: 6px; color: #f3e3b5; padding-left: .2em; }
  @media (max-width: 420px) { .brand { font-size: 0; letter-spacing: 0; padding: 0; gap: 0; } .bmark { width: 30px !important; height: 30px !important; } }
  .bmark { display: block; width: 24px; height: 24px; } .bmark svg { display: block; width: 100%; height: 100%; }

  /* 날짜는 숨기되, 궁합 알림 칩을 위한 자리로는 유지합니다. */
  .hello { margin: 0 2px; min-height: 0; }
  .hello:empty { display: none; }

  /* 히어로: 아이소메트릭 제단 */
  /* 모든 스프레드가 함께 쓰는 넉넉한 카드 무대 */
  /* flex-shrink를 막아서, 밑에 내용(PC에서 펼쳐진 리딩 메뉴 등)이 길어져도 테이블/수정구가 찌그러지지 않고
     정해진 높이를 유지한다 - 대신 화면 전체가 스크롤된다. */
  .hero { position: relative; height: clamp(438px, 52vw, 720px); margin-top: auto; display: grid; place-items: center; flex-shrink: 0; }
  /* picking이 끝나기 전(테이블이 아직 페이드 중)에 margin-top이 먼저 바뀌면 테이블이 자리를 옮기며 사라지는 것처럼 보인다.
     picking이 완전히 끝나 테이블이 이미 투명해진 뒤에만 위치를 확정한다. */
  .app.reading:not(.picking) .hero { margin-top: 0; }
  #drawBtn { margin-bottom: auto; }
  .altar {
    position: absolute; width: clamp(230px, 30vw, 500px); height: clamp(230px, 30vw, 500px); top: 69%; left: 50%;
    transform: translate(-50%, -50%) rotateX(58deg) rotateZ(45deg);
    border-radius: 42px;
    background: linear-gradient(135deg, #3b3d6b, #262744);
    box-shadow:
      0 0 0 2px rgba(143,183,255,.55),
      0 0 30px rgba(143,183,255,.35),
      14px 14px 0 #d9d3ea, 22px 22px 0 #b8b3d6, 30px 30px 40px rgba(0,0,0,.55);
    /* 3D 회전이 걸린 상태로 opacity/scale이 함께 바뀌면 모바일 GPU가 레이어를 다시 만들며 순간적으로 번쩍이는 경우가 있어, 레이어를 고정해 둔다. */
    will-change: transform, opacity;
    backface-visibility: hidden; -webkit-backface-visibility: hidden;
  }
  .altar::after {
    content: ""; position: absolute; inset: 18px; border-radius: 30px;
    border: 1px dashed rgba(183,156,255,.35);
    background: radial-gradient(circle at 50% 50%, rgba(143,183,255,.25), transparent 65%);
  }
  .glow-dot { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: #fff; box-shadow: 0 0 10px #cfe0ff; transition: opacity .35s ease; }

  .spread {
    position: relative; z-index: 2; display: flex; align-items: flex-end; justify-content: center;
    transform: translateY(34px);
  }
  /* 유리 수정구 */
  .crystal { --crystal-scale: 1; position: relative; width: 150px; height: 150px; animation: bob 5s ease-in-out infinite; transition: opacity .35s ease; }
  .crystal .ball {
    position: absolute; left: 0; top: 0; width: 150px; height: 150px; border-radius: 50%; overflow: hidden;
    box-shadow:
      inset 0 0 0 1.5px rgba(255,255,255,.75),
      inset -8px -4px 14px rgba(0,0,0,.75),
      0 18px 28px -10px rgba(0,0,0,.6), 0 0 40px rgba(143,183,255,.18);
  }
  /* 구슬 유리 바탕(어두운 가장자리와 빛)은 .glass 로 옮겨, 그 아래 .lens(굴절된 테이블)가 비쳐 보이게 한다. */
  .crystal .ball .glass { position: absolute; inset: 0; z-index: 1; border-radius: 50%;
    background:
      radial-gradient(circle at 36% 46%, transparent 0, transparent 62%, rgba(0,0,8,.85) 70%, #000 80%),
      radial-gradient(ellipse 60% 52% at 42% 70%, rgba(236,243,255,.6) 0%, rgba(205,220,255,.38) 45%, rgba(170,195,250,.14) 75%, rgba(150,175,240,0) 100%),
      linear-gradient(180deg, rgba(40,46,100,.3) 0%, rgba(30,34,80,.12) 100%); }
  .crystal .ball .lens { position: absolute; inset: 0; z-index: 0; display: block; overflow: hidden; border-radius: 50%;
    -webkit-mask: radial-gradient(circle, #000 52%, rgba(0,0,0,.55) 72%, transparent 96%); mask: radial-gradient(circle, #000 52%, rgba(0,0,0,.55) 72%, transparent 96%); }
  .crystal .ball .lens-altar { position: absolute; left: 50%; top: 50%; border-radius: 42px; transform-origin: 50% 50%;
    background: linear-gradient(135deg, #3b3d6b, #262744);
    box-shadow: 0 0 0 2px rgba(143,183,255,.55), 0 0 30px rgba(143,183,255,.35), 14px 14px 0 #d9d3ea, 22px 22px 0 #b8b3d6;
    filter: blur(.7px) saturate(1.2) brightness(1.15); }
  .crystal .ball .lens-altar::after { content: ""; position: absolute; inset: 18px; border-radius: 30px; border: 1px dashed rgba(183,156,255,.45); }
  .crystal .ball::before { content: ''; position: absolute; right: 12px; top: 10px; width: 78px; height: 78px; border-radius: 50%; z-index: 3;
    background: conic-gradient(from 0deg at 50% 100%, transparent 0deg, #fff 14deg, #fff 44deg, rgba(255,255,255,.6) 60deg, transparent 66deg, transparent 360deg);
    -webkit-mask: radial-gradient(circle at 20% 105%, transparent 60%, #000 61%, #000 78%, transparent 79%); mask: radial-gradient(circle at 20% 105%, transparent 60%, #000 61%, #000 78%, transparent 79%); transform: rotate(8deg); opacity: 1; }
  .crystal .ball::after { content: ''; position: absolute; inset: 3px; border-radius: 50%; z-index: 2; pointer-events: none;
    background: conic-gradient(from 180deg, rgba(255,255,255,.0) 0deg, rgba(255,255,255,.9) 40deg, rgba(150,225,255,1) 70deg, rgba(255,255,255,0) 100deg, transparent 360deg);
    -webkit-mask: radial-gradient(circle, transparent 69%, #000 71%, #000 73%, transparent 75%); mask: radial-gradient(circle, transparent 69%, #000 71%, #000 73%, transparent 75%); }
  .crystal .mist {
    position: absolute; inset: 14%; border-radius: 50%; filter: blur(14px); opacity: .9;
    background: conic-gradient(from 0deg, rgba(143,183,255,.0), rgba(143,183,255,.75), rgba(183,156,255,.0), rgba(230,160,255,.6), rgba(143,183,255,.0));
    animation: swirl 9s linear infinite;
  }
  .crystal .mist.m2 { inset: 26%; filter: blur(10px); animation-duration: 6s; animation-direction: reverse; opacity: .75;
    background: conic-gradient(from 90deg, rgba(255,255,255,0), rgba(210,225,255,.8), rgba(255,255,255,0), rgba(183,156,255,.7), rgba(255,255,255,0)); }
  .crystal .core { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; transform: translate(-50%,-50%); border-radius: 50%;
    background: radial-gradient(circle, #fff, rgba(210,225,255,.6) 45%, transparent 70%); animation: breathe 3.2s ease-in-out infinite; }
  .crystal .speck { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #fff; box-shadow: 0 0 6px #cfe0ff; animation: breathe 2.6s ease-in-out infinite; }
  .crystal .shine { position: absolute; left: 72px; top: 20px; width: 5px; height: 5px; border-radius: 50%; z-index: 3; opacity: .9;
    background: #fff; box-shadow: 0 0 4px 1px rgba(255,255,255,.7); }
  .crystal .shine2 { position: absolute; right: 22px; bottom: 26px; width: 26px; height: 7px; border-radius: 50%; transform: rotate(-38deg); z-index: 3;
    background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,.85), rgba(255,255,255,0)); }
  .crystal .rim { position: absolute; inset: 0; border-radius: 50%;
    background: radial-gradient(circle at 50% 50%, transparent 60%, rgba(120,150,255,.18) 80%, transparent 90%); mix-blend-mode: screen; }
  .crystal .stand { position: absolute; left: 50%; bottom: 0; width: 96px; height: 38px; transform: translateX(-50%);
    border-radius: 50% 50% 14px 14px / 60% 60% 14px 14px;
    background: linear-gradient(180deg, #e9e4f7 0%, #b9b2d8 55%, #8d86b8 100%);
    box-shadow: inset 0 3px 0 rgba(255,255,255,.7), 0 10px 18px rgba(0,0,0,.45); }
  .crystal .stand::before { content: ""; position: absolute; left: 50%; top: -6px; width: 70px; height: 14px; transform: translateX(-50%);
    border-radius: 50%; background: radial-gradient(ellipse, rgba(143,183,255,.9), rgba(143,183,255,0) 70%); filter: blur(3px); }
  .crystal .shine, .crystal .shine2, .crystal .rim { display: none; }
  .crystal .mist { opacity: .12; mix-blend-mode: screen; } .crystal .mist.m2 { display: none; } .crystal .speck, .crystal .core { display: none !important; }
  @keyframes swirl { to { transform: rotate(360deg) } }
  @keyframes breathe { 0%,100% { opacity: .55; transform: translate(-50%,-50%) scale(.85) } 50% { opacity: 1; transform: translate(-50%,-50%) scale(1.15) } }
  .crystal .speck { transform: none; animation-name: twk; }
  @keyframes twk { 0%,100% { opacity: .3 } 50% { opacity: 1 } }
  @keyframes bob { 0%,100% { transform: translateY(0) scale(var(--crystal-scale)) } 50% { transform: translateY(-8px) scale(var(--crystal-scale)) } }
  .crystal { cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .crystal .ball { transition: filter .4s; }
  .crystal.tap .ball { animation: orbShake .7s cubic-bezier(.36,.07,.19,.97); filter: brightness(1.25) saturate(1.2); }
  .crystal.tap .ball .core { animation: orbBurst .9s ease-out !important; opacity: 1 !important; }
  .crystal.tap .ball .mist { opacity: .6 !important; animation-duration: 1.6s !important; }
  .crystal::after { content: ''; position: absolute; left: 50%; top: 75px; width: 150px; height: 150px; margin: -75px 0 0 -75px; border-radius: 50%; pointer-events: none; opacity: 0; box-shadow: 0 0 0 2px rgba(241,210,138,.7), 0 0 30px rgba(241,210,138,.5); }
  .crystal.tap::after { animation: orbRing .9s ease-out; }
  @keyframes orbShake { 0%,100% { transform: translateX(0) rotate(0) } 20% { transform: translateX(-3px) rotate(-2deg) } 40% { transform: translateX(3px) rotate(2deg) } 60% { transform: translateX(-2px) rotate(-1deg) } 80% { transform: translateX(1px) rotate(.5deg) } }
  @keyframes orbBurst { 0% { transform: translate(-50%,-50%) scale(.6); opacity: 1 } 40% { transform: translate(-50%,-50%) scale(4.5); opacity: .9 } 100% { transform: translate(-50%,-50%) scale(1); opacity: .3 } }
  @keyframes orbRing { 0% { transform: scale(.9); opacity: .9 } 100% { transform: scale(1.5); opacity: 0 } }
  .orb-say { position: absolute; left: 50%; bottom: calc(100% + 14px); width: max-content; max-width: min(78vw, 300px); transform: translate(-50%, 8px) scale(.96); opacity: 0; pointer-events: none;
    padding: 10px 16px 11px; border-radius: 16px; background: rgba(26,24,52,.88); border: 1px solid rgba(241,210,138,.4); box-shadow: 0 10px 30px rgba(0,0,0,.4), 0 0 24px rgba(241,210,138,.15);
    color: #fff; font-size: 14.5px; font-weight: 600; line-height: 1.5; text-align: center; transition: opacity .35s, transform .45s cubic-bezier(.2,.9,.3,1.2); z-index: 6; white-space: normal; }
  .orb-say small { display: block; font-size: 11px; font-weight: 600; color: #f1d28a; letter-spacing: .04em; margin-bottom: 2px; }
  .orb-say::after { content: ''; position: absolute; left: 50%; top: 100%; margin-left: -6px; border: 6px solid transparent; border-top-color: rgba(241,210,138,.4); }
  .orb-say.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
  .orb-hint { position: absolute; left: 50%; top: 100%; margin-top: 6px; transform: translateX(-50%); white-space: nowrap; font-size: 11.5px; color: rgba(241,210,138,.85); pointer-events: none; animation: orbHint 2.4s ease-in-out infinite; }
  @keyframes orbHint { 0%,100% { opacity: .35 } 50% { opacity: 1 } }

  .card {
    width: min(calc((100vw - 76px) / 3), 120px); aspect-ratio: 5 / 8; perspective: 1000px; cursor: pointer;
    opacity: 0; transform: translateY(26px) scale(.92);
    animation: cardRise .6s cubic-bezier(.2,.9,.3,1.2) forwards;
  }
  .spread.one .card { width: min(50vw, 192px); }
  .spread { gap: 10px; }
  .spread.ten { display: grid; width: 100%; grid-template-columns: repeat(var(--cols, 5), minmax(0, 1fr)); gap: 14px 8px; align-items: start; transform: translateY(34px); }
  .spread.ten > div { min-width: 0; text-align: center; }
  .spread.ten .card { width: 100%; }
  .spread.ten .pos { display: block; width: max-content; max-width: none; margin: 8px 0 0 50%; transform: translateX(-50%); font-size: 11.5px; line-height: 1.25; white-space: nowrap; }
  @keyframes rise { to { opacity: 1; transform: none; } }
  @keyframes cardRise { 0% { opacity: 0; transform: translateY(26px) scale(.92); } 72% { opacity: 1; transform: translateY(-2px) scale(1.018); } 100% { opacity: 1; transform: none; } }
  .inner { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .7s cubic-bezier(.2,.8,.2,1); }
  .card.flipped .inner { transform: rotateY(180deg); }
  .inner { -webkit-transform-style: preserve-3d; will-change: transform; }
  .face { -webkit-transform: translateZ(0); }
  .face { position: absolute; inset: 0; border-radius: 14px; backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden; }
  .back {
    background: #1c1a42;
    border: none;
    box-shadow: 0 0 18px rgba(143,183,255,.35), 0 16px 24px rgba(0,0,0,.45);
    display: grid; place-items: center;
  }
  .back::before { display: none; }
  .back svg.cb, .pk-slot i .back svg.cb { position: absolute; inset: 0; width: 100% !important; height: 100%; opacity: 1; filter: none; }
  .card:not(.flipped) .back { animation: pulse 2.4s ease-in-out infinite; }
  @keyframes pulse { 0%,100% { box-shadow: 0 0 14px rgba(143,183,255,.3), 0 16px 24px rgba(0,0,0,.45) } 50% { box-shadow: 0 0 26px rgba(143,183,255,.6), 0 16px 24px rgba(0,0,0,.45) } }
  .art { display: block; width: 100%; height: 100%; }
  .front {
    transform: rotateY(180deg);
    background: #1b1c38;
    padding: 0;
    box-shadow: 0 0 20px rgba(183,156,255,.35), 0 16px 24px rgba(0,0,0,.45);
  }
  .card.reversed .front .art { transform: rotate(180deg); }
  /* 카드 아래 자리 이름: 금빛 테두리와 은은한 그라데이션의 명패 느낌 */
  /* 카드 아래 자리 이름: 박스 없이 글자만 두고 아래에 금빛 실선 하나 */
  .pos { position: relative; display: table; margin: 12px auto 0; padding: 0 2px 7px; font-size: 14px; white-space: nowrap; color: rgba(240,238,255,.94); font-weight: 600; letter-spacing: .05em; text-shadow: 0 1px 8px rgba(6,6,22,.85), 0 0 2px rgba(6,6,22,.6); }
  .pos::after, .pk-slot > span::after { content: ''; position: absolute; left: 50%; bottom: 0; width: 120%; max-width: 64px; height: 1px; transform: translateX(-50%); background: linear-gradient(90deg, transparent, rgba(241,210,138,.85), transparent); }

  .hint { text-align: center; font-size: 14.5px; color: rgba(238,240,255,.94); text-shadow: 0 1px 10px rgba(6,6,20,.75); margin: -4px 0 14px; min-height: 18px; }
  .question-row { margin: 0 0 14px; }
  /* 아이콘/카운터를 절대배치로 input 위에 얹는 대신, 박스 자체(question-field)가 배경·테두리를 갖고
     input은 배경 없는 순수 텍스트필드로 만들어서, 두 요소가 겹쳐서 서로를 가리는 문제를 원천적으로 없앤다. */
  .question-field {
    position: relative; display: flex; align-items: center; height: 52px; padding: 0 16px 0 46px;
    border-radius: 18px; border: 1px solid var(--stroke); background: var(--glass);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    transition: border-color .2s, box-shadow .2s, background .2s;
  }
  .question-icon {
    position: absolute; left: 16px; width: 19px; height: 19px; color: #f1d28a; opacity: .9;
    pointer-events: none; z-index: 1; transition: opacity .2s, color .2s, transform .2s;
  }
  .question-field:focus-within .question-icon { opacity: 1; transform: scale(1.08); }
  .question-input {
    flex: 1; min-width: 0; height: 100%; padding: 0; border: none; background: none; outline: none;
    color: var(--text); font: inherit; font-size: 14px;
  }
  .question-input::placeholder { color: var(--text-3); }
  .question-field:focus-within {
    border-color: rgba(241,210,138,.5); background: rgba(241,210,138,.05);
    box-shadow: 0 0 0 3px rgba(241,210,138,.14), 0 0 22px rgba(241,210,138,.1);
  }
  .question-count {
    flex: none; margin-left: 6px; font-size: 10.5px; color: var(--text-3);
    opacity: 0; transition: opacity .2s; pointer-events: none;
  }
  .question-field:focus-within .question-count { opacity: 1; }
  .question-field.invalid { border-color: rgba(255,159,180,.6); animation: questionShake .35s ease; }
  .question-field.invalid .question-icon { color: #ff9fb4; }
  @keyframes questionShake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
  .question-error { display: flex; align-items: center; gap: 5px; margin: 7px 2px 0; font-size: 12px; color: #ff9fb4; }
  .question-error[hidden] { display: none; }
  .hint b { color: #f1d28a; font-weight: 700; }
  .hint { transition: opacity .18s ease; }
  .hint.pk-off { opacity: 0; pointer-events: none; }
  .hint { word-break: keep-all; text-wrap: balance; padding: 0 6px; }

  /* 리딩 방식: 홈에서는 한 줄, 목록은 필요할 때만 펼칩니다. */
  .modes { margin-bottom: 14px; }
  .modes[hidden] { display: none; }
  .reading-select {
    width: 100%; min-height: 64px; display: flex; align-items: center; gap: 12px; padding: 10px 14px;
    border: 1px solid var(--stroke); border-radius: 18px; background: var(--glass); color: var(--text); cursor: pointer;
    font: inherit; text-align: left; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    transition: border-color .2s, background .2s, transform .15s;
  }
  .reading-select:active { transform: scale(.985); }
  .reading-select.chosen { border-color: rgba(143,183,255,.58); background: rgba(112,132,245,.13); }
  .reading-select-icon, .mode .ring {
    width: 42px; height: 42px; flex: none; display: grid; place-items: center; border-radius: 14px;
    color: var(--text); background: rgba(124,140,255,.16); border: 1px solid rgba(143,183,255,.24);
  }
  .reading-select-icon svg, .mode .ring svg { width: 21px; height: 21px; }
  .reading-select-copy { min-width: 0; flex: 1; display: grid; gap: 2px; }
  .reading-select-copy small { color: var(--text-2); font-size: 11px; line-height: 1.15; }
  .reading-select-copy b { overflow: hidden; color: var(--text); font-size: 14px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
  .reading-chevron, .mode-go { width: 18px; height: 18px; flex: none; color: var(--text-2); }

  .reading-sheet { position: fixed; inset: 0; z-index: 64; display: flex; align-items: flex-end; justify-content: center; background: rgba(6,7,19,.64); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
  .reading-sheet[hidden] { display: none; }
  .reading-box { width: 100%; max-width: 440px; max-height: min(80dvh, 680px); padding: 12px 18px calc(20px + env(safe-area-inset-bottom)); border: 1px solid rgba(183,200,255,.18); border-bottom: 0; border-radius: 30px 30px 0 0; overflow: hidden; touch-action: pan-y; color: #eef0ff; background: radial-gradient(120% 56% at 50% 0%, rgba(112,126,222,.24), transparent 64%), linear-gradient(180deg, #24254b 0%, #16172f 100%); box-shadow: 0 -18px 52px rgba(0,0,0,.42), inset 0 1px 0 rgba(255,255,255,.06); animation: up .3s cubic-bezier(.2,.9,.3,1); }
  .reading-box .grab { background: rgba(238,240,255,.24); }
  .reading-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
  .reading-eyebrow { display: block; color: #f1d28a; font-size: 10px; font-weight: 700; letter-spacing: .1em; }
  .reading-head h2 { margin: 3px 0 2px; font-size: 20px; line-height: 1.2; }
  .reading-head p { margin: 0; color: rgba(214,218,250,.68); font-size: 13px; }
  .reading-close { width: 34px; height: 34px; flex: none; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; color: #fff; background: rgba(255,255,255,.07); cursor: pointer; font: inherit; font-size: 18px; }
  .reading-tabs { display: flex; gap: 7px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; margin: 0 -2px 12px; padding: 2px 2px 4px; }
  .reading-tabs::-webkit-scrollbar { display: none; }
  .reading-tab { flex: 0 0 auto; min-height: 34px; padding: 0 13px; border: 1px solid rgba(221,229,255,.11); border-radius: 999px; background: rgba(255,255,255,.055); color: rgba(226,230,255,.72); cursor: pointer; font: inherit; font-size: 12px; font-weight: 650; }
  .reading-tab.active { border-color: rgba(168,181,255,.18); background: linear-gradient(100deg, #5f73d8, #826bc6); color: #fff; box-shadow: 0 4px 13px rgba(91,110,213,.28); }
  .reading-tab[hidden], .mode[hidden] { display: none; }
  .reading-list { display: grid; gap: 8px; max-height: calc(min(80dvh, 680px) - 182px); overflow-y: auto; overscroll-behavior: contain; padding: 2px 1px 3px; will-change: transform; transition: transform .2s cubic-bezier(.2,.8,.25,1); }
  .reading-list.dragging { transition: none; }
  .reading-list.swipe-next { animation: readingListNext .18s ease-out; }
  .reading-list.swipe-prev { animation: readingListPrev .18s ease-out; }
  @keyframes readingListNext { from { opacity: .45; transform: translateX(14px); } to { opacity: 1; transform: translateX(0); } }
  @keyframes readingListPrev { from { opacity: .45; transform: translateX(-14px); } to { opacity: 1; transform: translateX(0); } }
  .mode { width: 100%; min-height: 78px; display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px solid rgba(221,229,255,.09); border-radius: 16px; background: rgba(255,255,255,.045); color: #eef0ff; cursor: pointer; font: inherit; text-align: left; transition: border-color .18s, background .18s, transform .15s; }
  .mode:active { transform: scale(.985); }
  .mode .ring { color: #cbd7ff; background: rgba(112,132,245,.14); border-color: rgba(143,183,255,.22); }
  .mode-copy { min-width: 0; flex: 1; display: grid; gap: 3px; }
  .mode-copy b { font-size: 14px; line-height: 1.2; }
  .mode-copy small { overflow: hidden; color: rgba(214,218,250,.64); font-size: 11.5px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
  .mode-go { color: rgba(214,218,250,.7); }
  .mode.active { border-color: rgba(143,183,255,.42); background: linear-gradient(135deg, rgba(100,120,222,.24), rgba(153,118,219,.15)); box-shadow: 0 3px 14px rgba(80,98,190,.16); }
  .mode.active .ring { color: #fff; background: linear-gradient(135deg, #6579dd, #9275d3); border-color: transparent; box-shadow: 0 4px 12px rgba(101,121,221,.28); }

  .mode .ring { background: linear-gradient(135deg, rgba(143,183,255,.26), rgba(153,118,219,.22)); box-shadow: 0 3px 10px rgba(90,100,200,.18); }
  .mode-badge { order: 3; flex: none; padding: 3px 8px; border-radius: 999px; background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.16); color: rgba(226,230,255,.8); font-size: 10px; font-weight: 700; letter-spacing: .01em; }
  .mode.active .mode-badge { background: rgba(255,255,255,.16); color: #fff; }
  .mode-go { order: 4; }
  .mode-tag { justify-self: start; width: fit-content; margin: 0 0 1px; padding: 2px 7px; border-radius: 999px; background: linear-gradient(100deg, #f1d28a, #e0b865); color: #2a2210; font-size: 9.5px; font-weight: 800; letter-spacing: .01em; }
  .mode-tag.soon { background: rgba(255,255,255,.12); color: rgba(226,230,255,.75); }
  .mode.locked { background: rgba(255,255,255,.025); border-color: rgba(221,229,255,.06); }
  .mode.locked .ring { color: rgba(226,230,255,.4); background: rgba(255,255,255,.04); }
  .mode.locked .mode-copy b { color: rgba(238,240,255,.55); }
  .mode.locked .mode-copy small { color: rgba(238,240,255,.35); }
  .mode.locked .mode-go { color: rgba(226,230,255,.3); }

  /* 넓은 화면과 폴더블 펼침 화면: 빈 여백 대신 무대·카드·패널을 함께 확장한다. */
  @media (min-width: 600px) {
    .app { padding-left: clamp(32px, 5vw, 96px); padding-right: clamp(32px, 5vw, 96px); }
    .hero { height: clamp(520px, 62dvh, 780px); }
    .crystal { --crystal-scale: 1.45; }
    .spread.one .card { width: min(clamp(192px, 22vw, 340px), calc((var(--hero-h, 9999px) - 56px) / 1.6)); }
    .spread:not(.one) .card { width: clamp(120px, 14vw, 220px); }
    .spread.ten { width: min(100%, 980px); gap: 18px 12px; }
    .hint, .modes, #drawBtn, .lang-row, .hello { width: min(100%, 620px); margin-left: auto; margin-right: auto; }
    .reading-box, .intro-box { max-width: 720px; }
    .mbox { max-width: min(720px, calc(100vw - 72px)); }
  }
  @media (min-width: 1000px) {
    .crystal { --crystal-scale: 1.5; }
    .spread.ten { width: min(100%, 1280px); grid-template-columns: repeat(var(--n, 10), minmax(0, 1fr)); gap: 16px; }
    .spread.ten .pos { font-size: 12.5px; }
    /* PC에서는 버튼을 눌러 시트를 여는 대신, 테이블/카드 영역 옆에 리딩 메뉴를 나란히 펼쳐서 보여준다.
       세로로 계속 쌓이면 화면 스크롤이 생기므로, 왼쪽(테이블)·오른쪽(메뉴) 2단 구성으로 바꾸고
       테이블 높이도 줄여서 화면 하나에 스크롤 없이 들어오게 한다. */
    .app {
      display: grid; height: 100dvh;
      max-width: 1680px; margin-left: auto; margin-right: auto;
      grid-template-columns: minmax(0, 1fr) 400px;
      grid-template-rows: auto auto minmax(0, 1fr) auto auto auto;
      grid-template-areas: "top top" "hello hello" "hero modes" "hint modes" "question modes" "drawBtn modes";
      column-gap: clamp(24px, 4vw, 56px); row-gap: 0;
      align-items: stretch;
    }
    /* 상단도 모바일용 "가운데 로고 + 좌측 햄버거"가 아니라, 일반적인 PC 헤더처럼
       로고는 왼쪽, 메뉴 버튼은 오른쪽에 배치한다. */
    .top { grid-area: top; justify-content: flex-start; height: 56px; }
    .brand { position: static; transform: none; order: -1; margin-right: auto; font-size: 15px; }
    .hello { grid-area: hello; }
    .hero { grid-area: hero; height: min(48dvh, 460px); min-height: 0; margin-top: 0; align-self: center; }
    #hint { grid-area: hint; }
    #questionRow { grid-area: question; }
    #modes { grid-area: modes; min-height: 0; display: flex; flex-direction: column; margin-bottom: 0; }
    #drawBtn { grid-area: drawBtn; margin-bottom: 0; align-self: end; }
    .reading-select { display: none; }
    .reading-sheet, .reading-sheet[hidden] {
      position: static; inset: auto; display: flex; min-height: 0; flex: 1; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; padding: 0;
    }
    .reading-box {
      width: 100%; min-height: 0; display: flex; flex-direction: column; padding: 18px 20px; border-radius: 20px; border: 1px solid var(--stroke);
      background: var(--glass); box-shadow: none; animation: none;
    }
    .reading-box .grab, .reading-close { display: none; }
    .reading-list { flex: 1; min-height: 0; max-height: none; overflow-y: auto; }
  }

  @media (max-width: 599px) and (max-height: 740px) {
    .hero { height: 380px; margin-top: 0; }
  }
  @media (max-width: 380px) { .reading-box { padding-left: 14px; padding-right: 14px; } .mode { gap: 10px; } }
  #drawBtn.btn-wait { opacity: 0; transform: translateY(14px) scale(.96); visibility: hidden; pointer-events: none; transition: opacity .2s, transform .2s, visibility 0s .2s; }
  .cta {
    width: 100%; height: 56px; border: none; border-radius: 18px; cursor: pointer;
    font: inherit; font-size: 16px; font-weight: 600; color: #fff;
    background: linear-gradient(90deg, #6a7cff, #9a7cff);
    box-shadow: 0 10px 24px rgba(106,124,255,.4), inset 0 1px 0 rgba(255,255,255,.25);
    transition: transform .15s;
  }
  .cta:active { transform: scale(.98); }
  /* "카드 뽑기" 버튼만 조금 더 고급스럽게: 금색 테두리 한 줄, 은은하게 스치는 광택, 살짝 숨쉬는 반짝임 아이콘. */
  #drawBtn {
    position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; gap: 9px;
    border: 1px solid rgba(241,210,138,.4); font-weight: 700; letter-spacing: .01em;
    background: linear-gradient(135deg, #5f6ef5 0%, #7c6bf0 50%, #9a7cff 100%);
    box-shadow:
      0 16px 32px rgba(106,124,255,.4), 0 0 0 1px rgba(241,210,138,.12),
      inset 0 1px 0 rgba(255,255,255,.3), inset 0 -14px 22px rgba(30,20,70,.18);
    transition: transform .15s, box-shadow .25s;
  }
  #drawBtn::after {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.4) 46%, transparent 62%);
    transform: translateX(-140%); animation: drawBtnShine 4.2s ease-in-out infinite;
  }
  @keyframes drawBtnShine { 0%, 30% { transform: translateX(-140%); } 55%, 100% { transform: translateX(140%); } }
  #drawBtn .cta-icon {
    width: 17px; height: 17px; flex: none; color: #f9e6b8;
    filter: drop-shadow(0 0 5px rgba(241,210,138,.7)); animation: drawBtnIconPulse 2.4s ease-in-out infinite;
  }
  @keyframes drawBtnIconPulse { 0%, 100% { opacity: .85; transform: scale(1); } 50% { opacity: 1; transform: scale(1.12); } }
  #drawBtn:active { transform: scale(.97); box-shadow: 0 10px 22px rgba(106,124,255,.34), 0 0 0 1px rgba(241,210,138,.12), inset 0 1px 0 rgba(255,255,255,.22); }
  @media (hover: hover) {
    #drawBtn:hover { transform: translateY(-2px); box-shadow: 0 20px 38px rgba(106,124,255,.48), 0 0 0 1px rgba(241,210,138,.2), inset 0 1px 0 rgba(255,255,255,.35); }
  }

  .app.idle { padding-bottom: calc(28px + env(safe-area-inset-bottom)); }
  .grab { position: relative; width: 40px; height: 4px; border-radius: 4px; background: rgba(43,45,74,.2); margin: 0 auto 14px; touch-action: none; cursor: grab; }
  .grab::before { content: ''; position: absolute; inset: -16px -70px -12px; }
  [role="dialog"]:focus { outline: none; }
  .badge {
    width: 42px; height: 42px; border-radius: 50%; flex: none; display: grid; place-items: center;
    background: #3b3e6e; color: #fff; font-weight: 700; font-size: 13px;
    box-shadow: 0 6px 14px rgba(59,62,110,.35);
  }

  /* 온보딩 */
  .intro { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center;
    background: rgba(10,10,20,.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
  .intro[hidden] { display: none; }
  .intro-box {
    width: 100%; max-width: 440px; border-radius: 30px 30px 0 0; padding: 12px 22px calc(24px + env(safe-area-inset-bottom));
    background: linear-gradient(160deg, var(--sheet-a), var(--sheet-b)); color: var(--sheet-ink);
    animation: up .45s cubic-bezier(.2,.9,.3,1);
  }
  @keyframes up { from { transform: translateY(100%) } to { transform: none } }
  .intro-box h2 { margin: 6px 0 4px; font-size: 22px; font-weight: 700; }
  .intro-box .lead { font-size: 14px; color: var(--sheet-ink-2); margin-bottom: 14px; }
  .istep { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; }
  .istep .badge { width: 36px; height: 36px; font-size: 14px; }
  .istep b { display: block; font-size: 15px; }
  .istep span { font-size: 13px; color: var(--sheet-ink-2); line-height: 1.55; }
  .intro .cta { margin-top: 12px; }

  .menu-tool.installed, .menu-tool:disabled { opacity: .42; cursor: default; pointer-events: none; }
  .menu-tool.installed .menu-icon, .menu-tool:disabled .menu-icon { color: rgba(241,210,138,.58); background: rgba(241,210,138,.06); }
  /* 결과 모달 */
  .modal { position: fixed; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center; padding: 20px;
    background: rgba(8,8,18,.78); }
  .modal[hidden] { display: none; }
  #cardModal { z-index: 85; background: rgba(8,8,18,.42); --sheet-ink: #eef0ff; --sheet-ink-2: rgba(214,218,250,.66); --gold: #f1d28a; }
  #cardModal .mbox { color: var(--sheet-ink); border: 1px solid rgba(183,156,255,.22);
    background: radial-gradient(130% 55% at 50% 0%, rgba(120,104,230,.30), transparent 62%), radial-gradient(90% 40% at 50% 100%, rgba(143,183,255,.10), transparent 70%), linear-gradient(180deg, #24234a 0%, #17172f 100%) !important;
    box-shadow: 0 30px 80px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.08) !important; }
  #cardModal .mhead h2 { font-weight: 600; letter-spacing: .01em; color: #fff; }
  #cardModal .mclose { width: 38px; height: 38px; font-size: 16px; background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.28); box-shadow: 0 4px 12px rgba(0,0,0,.3); flex-shrink: 0; }
  #cardModal .mhead { padding: 16px 16px 8px 20px; }
  .card-modal-body { padding: 6px 22px 20px; overflow-y: auto; flex: 1; min-height: 0; }
  #cardModal .pdesc { margin: 0; }
  #cardModal .pill { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); color: var(--sheet-ink-2); }
  #cardModal .pill.rev { color: #ff9fb4; border-color: rgba(255,159,180,.3); }
  #cardModal .kws span { background: rgba(241,210,138,.1); color: var(--gold); border: 1px solid rgba(241,210,138,.22); font-weight: 500; }
  #cardModal .kws.rev span { background: rgba(255,159,180,.08); color: #ffb3c4; border-color: rgba(255,159,180,.22); }
  #cardModal .pmean { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); color: rgba(238,240,255,.9); line-height: 1.85; }
  .pmean-label { margin: 0 0 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .02em; color: var(--gold, #b98a3e); text-transform: uppercase; }
  #cardModal .pmean-label { color: #f1d28a; }
  .pmore-note { margin: 14px 0 0; font-size: 12.5px; line-height: 1.5; color: rgba(43,45,74,.55); text-align: center; }
  #cardModal .pmore-note { color: rgba(214,218,250,.55); }
  #cardModal .ptitle { color: #fff; }
  /* 카드 1장 결과: 카드 아래에는 자리 이름 대신 카드 이름·방향·키워드를 보여 준다. */
  .strip-info { display: grid; gap: 8px; justify-items: center; margin: 12px 0 0; text-align: center; }
  .strip-name { color: #fff; font-size: 20px; font-weight: 750; letter-spacing: -.01em; }
  .strip-info .pmeta, .strip-info .kws { margin: 0 !important; justify-content: center; }
  #resultModal .strip-info .pill { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); }
  #cardModal .cm-extra { margin-top: 18px; }
  #cardModal .cm-extra .pmean-label { margin: 14px 0 6px; }
  #cardModal .cm-advice { margin: 0; color: rgba(238,240,255,.88); font-size: 14px; line-height: 1.8; }
  #cardModal .cm-extra .kws { justify-content: flex-start; margin: 0; }
  /* PC 카드 설명창: 세로로 길게 늘어놓지 않고 왼쪽 카드 / 오른쪽 설명 2단으로 배치하고, 뒤의 결과창이 비쳐 보이지 않게 어둡게 한다. */
  @media (min-width: 1000px) {
    #cardModal { background: rgba(6,6,18,.78); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
    #cardModal .mbox { width: min(860px, calc(100vw - 96px)); max-width: none; height: auto; max-height: min(720px, calc(100dvh - 56px)); }
    #cardModal .card-modal-body { display: grid; grid-template-columns: 250px minmax(0, 1fr); grid-template-rows: auto auto auto 1fr; column-gap: 40px; align-items: start; padding: 10px 36px 30px; }
    #cardModal .pvisual { grid-column: 1; margin: 0; }
    #cardModal .pcard { width: 230px !important; }
    #cardModal .pmeta { grid-column: 1; justify-content: center; margin: 16px 0 10px; }
    #cardModal .kws { grid-column: 1; justify-content: center; margin: 0; }
    #cardModal .pdesc { grid-column: 2; grid-row: 1 / span 4; align-self: start; }
    #cardModal .xcore { font-size: 17px; line-height: 1.7; }
  }
  .modal { overscroll-behavior: contain; touch-action: pan-x pan-y; }
  .mbox { max-height: calc(100vh - 40px); }
  @supports (height: 100svh) { .mbox { max-height: calc(100svh - 40px) !important; } }
  @keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
  .mbox { width: 100%; max-width: 400px; max-height: calc(100dvh - 40px); display: flex; flex-direction: column;
    border-radius: 28px; overflow: hidden; color: var(--sheet-ink);
    background: linear-gradient(165deg, #f3f0fc 0%, #dfe3f8 60%, #cdd6f5 100%);
    box-shadow: 0 30px 80px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.5) inset;
    animation: pop .35s cubic-bezier(.2,.9,.3,1.1) both; }
  @keyframes pop { from { opacity: 0 } to { opacity: 1 } }
  .mhead { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 6px; }
  .mhead h2 { margin: 0; font-size: 16px; font-weight: 700; }
  .mclose { width: 40px; height: 40px; border-radius: 50%; border: none; background: rgba(43,45,74,.08); color: var(--sheet-ink); font-size: 18px; cursor: pointer; display: grid; place-items: center; }
  .pager { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; flex: 1; min-height: 0; }
  .pager::-webkit-scrollbar { display: none; }
  .page { flex: 0 0 100%; scroll-snap-align: center; padding: 6px 22px 8px; overflow-y: auto; }
  .ptag { display: inline-block; font-size: 12px; font-weight: 700; color: #fff; background: #3b3e6e; padding: 5px 12px; border-radius: 999px; }
  .pvisual { display: flex; justify-content: center; margin: 12px 0 12px; cursor: pointer; }
  .pvisual:active .pcard { transform: scale(.97); }
  .tap-hint { text-align: center; font-size: 12.5px; color: var(--sheet-ink-2); margin: 6px 0 0; opacity: .9; }
  #resultModal .tap-hint { color: rgba(238,240,255,.74); }
  .lead-sum { margin: 14px 0 16px; padding: 12px 14px; border-radius: 12px; border-left: 3px solid #f1d28a; background: rgba(241,210,138,.09); color: inherit; font-size: 14.5px; line-height: 1.65; word-break: keep-all; }
  .ai-box { margin: 18px 0 8px; padding: 16px 16px 14px; border-radius: 16px; border: 1px solid rgba(154,124,255,.4); background: linear-gradient(180deg, rgba(106,124,255,.13), rgba(154,124,255,.06)); }
  .ai-box.hist { margin: 14px 0 4px; }
  .ai-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
  .ai-head b { font-size: 15px; }
  .ai-badge { padding: 1px 7px; border-radius: 999px; border: 1px solid rgba(241,210,138,.6); color: #f1d28a; font-size: 10.5px; font-weight: 800; letter-spacing: .08em; }
  .ai-body h4 { margin: 14px 0 4px; font-size: 14px; color: #f1d28a; }
  .ai-body p, .ai-body li { margin: 0 0 8px; font-size: 14.5px; line-height: 1.75; word-break: keep-all; }
  .ai-body ul { margin: 0 0 8px; padding-left: 18px; }
  .ai-wait { color: rgba(238,240,255,.7); }
  .ai-wait::after { content: ''; display: inline-block; width: 6px; height: 6px; margin-left: 6px; border-radius: 50%; background: #f1d28a; animation: aiDot 1s ease-in-out infinite; }
  @keyframes aiDot { 0%, 100% { opacity: .2; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.2); } }
  .ai-err { color: #ffb7c5; }
  .ai-safe { padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,.07); line-height: 1.75; }
  .ai-btn { width: 100%; min-height: 48px; margin-top: 4px; border: 0; border-radius: 14px; background: linear-gradient(90deg, #6a7cff, #9a7cff); color: #fff; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
  .ai-btn[hidden] { display: none; }
  .ai-note { margin: 10px 0 0; font-size: 11.5px; line-height: 1.6; color: rgba(238,240,255,.6); }
  .lead-sum b { display: block; margin-bottom: 4px; color: #f1d28a; font-size: 11.5px; letter-spacing: .08em; }
  .result-question { text-align: center; font-size: 13px; font-style: italic; color: var(--sheet-ink-2); margin: 12px 0 0; padding: 10px 14px; border-radius: 14px; background: rgba(0,0,0,.04); }
  #resultModal .result-question { color: rgba(238,240,255,.75); background: rgba(255,255,255,.05); }
  @media (max-height: 740px) { .pcard { width: min(32vw, 118px) !important; } .pvisual { margin: 8px 0; } }
  .ynbig { text-align: center; margin: 2px 0 10px; }
  .ynbig.yes { color: #2f7d62; } .ynbig.no { color: #b4546a; }
  .yn-word { display: block; font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
  .yn-reason { display: block; font-size: 13px; font-weight: 500; color: var(--sheet-ink-2); margin-top: 12px; line-height: 1.5; }
  .page { padding-bottom: 28px !important; }
  .pcard { width: min(40vw, 156px); aspect-ratio: 5 / 8; border-radius: 18px; position: relative; overflow: hidden;
    box-shadow: 0 0 0 1px rgba(143,183,255,.6), 0 0 26px rgba(143,183,255,.45), 0 18px 30px rgba(43,45,74,.35); }
  .pcard.rev .art, .mini.rev .art { transform: rotate(180deg); }
  .ptitle { text-align: center; font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
  .pmeta { display: flex; justify-content: center; gap: 6px; margin: 8px 0 14px; flex-wrap: wrap; }
  .pill { font-size: 12px; font-weight: 600; padding: 5px 11px; border-radius: 999px; background: rgba(255,255,255,.75); color: var(--sheet-ink-2); }
  .pill.rev { color: #b4546a; }
  .pill.yes { color: #2f7d62; } .pill.no { color: #b4546a; }
  .pmean { font-size: 15px; line-height: 1.8; background: rgba(255,255,255,.6); border-radius: 18px; padding: 14px 16px; margin: 0; }
  .altar { transition: transform .6s cubic-bezier(.3,.7,.2,1), opacity .4s ease; }
  .app.picking .altar { transform: translate(-50%, -50%) scale(1.3) rotateX(58deg) rotateZ(45deg); }
  /* 카드가 펼쳐진 뒤에는 테이블·장식 효과를 완전히 숨겨 카드에만 집중합니다. */
  .app.reading .altar, .app.reading .glow-dot { opacity: 0; pointer-events: none; }
  body:has(.app.reading) .stars { opacity: 0; animation: none; }
  /* 구슬은 카드 선택 단계에서 이미 감춰져 있으므로, 결과 전환 중 다시 보이지 않게 유지합니다. */
  .app.reading .crystal { opacity: 0; visibility: hidden; transform: scale(1.06); pointer-events: none; }
  .app.reading .pk-top, .app.reading .pk-x { visibility: hidden; pointer-events: none; }
  .app.reading-focus .top, .app.reading-focus .hello, .app.reading-focus .modes, .app.reading-focus #drawBtn, .app.reading-focus .lang-row, .app.reading-focus #questionRow { opacity: 0; visibility: hidden; pointer-events: none; }
  /* 10장: 카드 놓는 자리 두 줄이 테이블 꼭짓점과 겹치지 않도록 영역 높이(560px)를 넉넉히 둔다(테이블·카드 부채꼴은 영역 높이의 69% 지점이라 함께 내려간다) */
  .app.ten-picking .hero { height: calc((560px + (var(--rows, 2) - 2) * 78px) * var(--picker-scale)); margin-top: 0; }
  @media (max-width: 999.98px) {
    .app.ten-picking .pk-x { top: -46px; }
  }
  .app.ten-spread .hero { height: calc(480px + (var(--rows, 2) - 2) * 150px); margin-top: 0; }
  html.picking .stars, .app.picking .crystal, .app.picking .crystal *, .app.picking .card .back { animation-play-state: paused !important; }
  .app.picking .spread { visibility: hidden; transition: opacity .4s, transform .5s, visibility 0s .5s; }
  /* 카드 선택 종료 후 실제 카드가 렌더링되기 전까지, 이전 스프레드(수정구 등)가 잠깐 다시 보이는 깜빡임을 막습니다. */
  .app.dealing .spread { visibility: hidden; opacity: 0; transform: translateY(-18px) scale(.7); pointer-events: none; }
  .top, .hello, .modes, #drawBtn, .lang-row, .spread, #questionRow { transition: opacity .4s, transform .5s; }
  html.picking, html.picking body { overflow-x: hidden; }
  .app.picking { overflow-y: hidden; }
  .app.picking .top, .app.picking .hello, .app.picking .modes, .app.picking #drawBtn, .app.picking .lang-row, .app.picking #questionRow { opacity: 0; pointer-events: none; }
  .app.picking .spread { opacity: 0; transform: translateY(-18px) scale(.7); pointer-events: none; }
  .pk-top { position: absolute; left: 0; right: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; opacity: 0; transition: opacity .35s; pointer-events: none; }
  .app.picking .pk-top { opacity: 1; transition-delay: .3s; }
  .pk-x { position: absolute; top: 0; right: 0; z-index: 4; border-radius: 50%; border: 1px solid var(--stroke); background: #2c2d52; color: #fff; cursor: pointer; opacity: 0; pointer-events: none; transition: opacity .35s; }
  .app.picking .pk-x { opacity: 1; pointer-events: auto; transition-delay: .3s; }
  /* 카드 선택이 끝나면(closing-picker) picking 상태(테이블 확대, 카드 숨김 등)는 그대로 둔 채
     장식 요소만 먼저 투명해진다. 실제 상태 전환은 이 페이드가 끝난 뒤 JS에서 한 번에 처리한다. */
  .app.closing-picker .altar, .app.closing-picker .glow-dot,
  .app.closing-picker .pk-top, .app.closing-picker .pk-x { opacity: 0; pointer-events: none; transition-delay: 0s !important; }
  .pk-slots { display: flex; }
  .pk-slots.many { display: grid; }
  .pk-slot { display: flex; flex-direction: column; align-items: center; font-weight: 500; color: var(--text-2); }
  .pk-slots.many .pk-slot { line-height: 1.2; text-align: center; }
  .pk-slot i { position: relative; display: block; aspect-ratio: 5 / 8; border: 1px dashed rgba(183,156,255,.5); background: rgba(255,255,255,.04); }
  .pk-slot i .face { animation: rise .45s cubic-bezier(.2,.9,.3,1.2) both; }
  .pk-slot i .back::before { inset: 3px; border-radius: 5px; }
  .pk-slot i .back svg { width: 50%; }
  .pk-fan { --pk-scale: 1; position: absolute; left: -20px; right: -20px; top: 0; bottom: 0; z-index: 2; pointer-events: none; touch-action: none; contain: layout style; user-select: none; -webkit-user-select: none; will-change: opacity; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
  .app.picking .pk-fan { pointer-events: auto; cursor: pointer; }
  .pk-plane { position: absolute; left: 50%; top: 69%; width: 0; height: 0; transform: translate3d(0,0,0) rotateX(58deg); transition: transform .46s cubic-bezier(.22,.82,.28,1); }
  .pk-card { position: absolute; width: calc(40px * var(--pk-scale)); height: calc(64px * var(--pk-scale)); margin-left: calc(-20px * var(--pk-scale)); border-radius: calc(5px * var(--pk-scale)); pointer-events: none;
    background: #1a1846 url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2040%2064%22%3E%3Cdefs%3E%3ClinearGradient%20id%3D%22g%22%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%221%22%20y2%3D%221%22%3E%3Cstop%20offset%3D%220%22%20stop-color%3D%22%23fff1c4%22%2F%3E%3Cstop%20offset%3D%22.45%22%20stop-color%3D%22%23e0b865%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23a87a30%22%2F%3E%3C%2FlinearGradient%3E%3CradialGradient%20id%3D%22r%22%20cx%3D%22.5%22%20cy%3D%22.5%22%20r%3D%22.6%22%3E%3Cstop%20offset%3D%220%22%20stop-color%3D%22%235a4cc4%22%20stop-opacity%3D%22.6%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%235a4cc4%22%20stop-opacity%3D%220%22%2F%3E%3C%2FradialGradient%3E%3C%2Fdefs%3E%3Crect%20width%3D%2240%22%20height%3D%2264%22%20fill%3D%22%231a1846%22%2F%3E%3Crect%20width%3D%2240%22%20height%3D%2264%22%20fill%3D%22url(%23r)%22%2F%3E%3Crect%20x%3D%222%22%20y%3D%222%22%20width%3D%2236%22%20height%3D%2260%22%20rx%3D%223%22%20fill%3D%22none%22%20stroke%3D%22url(%23g)%22%20stroke-width%3D%22.9%22%2F%3E%3Crect%20x%3D%224.2%22%20y%3D%224.2%22%20width%3D%2231.6%22%20height%3D%2255.6%22%20rx%3D%222%22%20fill%3D%22none%22%20stroke%3D%22url(%23g)%22%20stroke-width%3D%22.35%22%20opacity%3D%22.7%22%2F%3E%3Ccircle%20cx%3D%2220%22%20cy%3D%2232%22%20r%3D%2210%22%20fill%3D%22none%22%20stroke%3D%22url(%23g)%22%20stroke-width%3D%22.7%22%2F%3E%3Cpath%20d%3D%22M20%2021%20l2%207.5%207.5%202%20-7.5%202%20-2%207.5%20-2%20-7.5%20-7.5%20-2%207.5%20-2z%22%20fill%3D%22url(%23g)%22%2F%3E%3Cpath%20d%3D%22M17%2010a3.4%203.4%200%201%200%206%200a2.8%202.8%200%201%201-6%200z%22%20fill%3D%22url(%23g)%22%2F%3E%3Cpath%20d%3D%22M17%2054a3.4%203.4%200%201%201%206%200a2.8%202.8%200%201%200-6%200z%22%20fill%3D%22url(%23g)%22%2F%3E%3C%2Fsvg%3E") center / 100% 100% no-repeat; border: none; box-shadow: 0 4px 0 rgba(8,8,28,.5);
    transform: rotate(-70deg); transition: transform .5s cubic-bezier(.2,.8,.2,1), opacity .25s; }
  .pk-plane.hide > .pk-card { opacity: 0; transition: none; }
  .pk-fan.open .pk-card { transform: rotate(var(--a)); }
  .pk-vplane { z-index: 6; pointer-events: none; perspective: 620px; -webkit-perspective: 620px; perspective-origin: 50% 50%; -webkit-perspective-origin: 50% 50%; transform: rotateX(58deg); transform-style: preserve-3d; -webkit-transform-style: preserve-3d; }
  .pk-fan.fade { opacity: 0; transition: opacity .3s; pointer-events: none !important; }
  .pk-vx { position: absolute; left: 0; top: calc(-45px * var(--pk-scale)); width: 0; height: 0; transform-style: preserve-3d; -webkit-transform-style: preserve-3d; }
  .pk-vx .pk-card { top: calc(-32px * var(--pk-scale)); left: 0; transition: none; transform: none; box-shadow: 0 2px 6px rgba(0,0,0,.45), 0 0 10px rgba(241,210,138,.25); }
  .pk-vglow { position: absolute; border-radius: 50%; pointer-events: none; background: radial-gradient(circle, rgba(255,236,180,.95), rgba(217,178,100,.45) 30%, rgba(183,156,255,.2) 55%, transparent 70%); animation: pkGlow 1.95s ease-in forwards; }
  @keyframes pkGlow { 0% { opacity: 0; transform: scale(.3); } 55% { opacity: .45; transform: scale(.9); } 88% { opacity: 1; transform: scale(1.25); } 100% { opacity: 0; transform: scale(1.9); } }
  .pk-fan.open .pk-card.hot { z-index: 5; transform: rotate(var(--a)) translateY(-12px); box-shadow: 0 10px 0 rgba(8,8,28,.35); transition-duration: .15s; transition-delay: 0s !important; filter: brightness(1.35); }
  .pk-fan.open .pk-card.gone { transform: rotate(var(--a)) translateY(-10px); opacity: 0; visibility: hidden; transition: transform .18s, opacity .18s, visibility 0s .18s; transition-delay: 0s !important; }
  .xbtn { width: 100%; height: 48px; border: none; border-radius: 14px; font: inherit; font-size: 15px; font-weight: 600; color: #fff; cursor: pointer; background: linear-gradient(90deg, #6f7cff, #b28bff); }
  .xtease { margin: 10px 0 12px; padding: 16px; border-radius: 20px; text-align: center; color: #fff;
    background: radial-gradient(120% 90% at 50% 0%, rgba(178,139,255,.55), transparent 70%), linear-gradient(160deg, #3b3a78, #25244a); box-shadow: 0 12px 24px rgba(43,45,74,.28); }
  .xtease > b { display: block; font-size: 16px; font-weight: 700; }
  .xtease > b + .xbtn { margin-top: 12px; }
  .xtease p { margin: 4px 0 10px; font-size: 13px; line-height: 1.55; color: rgba(235,236,255,.8); }
  .xq { display: flex; align-items: baseline; justify-content: center; gap: 8px; margin-bottom: 12px; }
  .xq span { font-size: 12px; color: rgba(235,236,255,.75); font-weight: 600; }
  .xq b { font-size: 36px; font-weight: 800; letter-spacing: .04em; color: #fff; text-shadow: 0 0 18px rgba(207,180,255,.9); animation: xpulse 1.6s ease-in-out infinite; }
  .xq i { font-style: normal; font-size: 16px; margin-left: 2px; }
  @keyframes xpulse { 0%,100% { opacity: .65 } 50% { opacity: 1 } }
  .xtease .xbtn { height: 52px; font-size: 16px; box-shadow: 0 8px 20px rgba(111,124,255,.45); }
  .xcmp { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 4px 0 4px; }
  .xcmp div { text-align: center; }
  .xcmp small { display: block; font-size: 12px; font-weight: 600; color: var(--sheet-ink-2); }
  .xcmp b { font-size: 26px; font-weight: 700; color: var(--sheet-ink-2); }
  .xcmp b.real { font-size: 42px; font-weight: 800; background: linear-gradient(90deg, #5b64d8, #c0609a); -webkit-background-clip: text; background-clip: text; color: transparent; }
  .xcmp i { font-style: normal; font-size: 20px; color: var(--sheet-ink-2); }
  .xnote { text-align: center; margin: 2px 0 10px; font-size: 14px; font-weight: 600; line-height: 1.5; }
  .xnote span { font-size: 12px; font-weight: 500; color: var(--sheet-ink-2); }
  .xnotice { position: fixed; left: 50%; top: calc(12px + env(safe-area-inset-top)); z-index: 95; width: calc(100% - 24px); max-width: 420px; display: flex; align-items: center; gap: 10px;
    padding: 12px 12px 12px 16px; border-radius: 18px; color: #fff; background: linear-gradient(135deg, rgba(126,86,214,.96), rgba(54,48,124,.96));
    border: 1px solid rgba(255,255,255,.2); box-shadow: 0 16px 40px rgba(0,0,0,.45); transform: translate(-50%, -160%); transition: transform .55s cubic-bezier(.2,.9,.3,1.15); }
  .xnotice.show { transform: translate(-50%, 0); }
  .xnotice div { flex: 1; min-width: 0; }
  .xnotice b { display: block; font-size: 14px; font-weight: 700; }
  .xnotice span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; margin-top: 2px; color: rgba(240,235,255,.85); }
  .xnotice a { flex-shrink: 0; padding: 9px 13px; border-radius: 12px; background: #fff; color: #3b2d7a; font-size: 13px; font-weight: 700; text-decoration: none; }
  .xnotice button { flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; border: none; background: rgba(255,255,255,.16); color: #fff; font-size: 12px; cursor: pointer; }
  .xtease.sent { background: radial-gradient(120% 90% at 50% 0%, rgba(90,200,160,.45), transparent 70%), linear-gradient(160deg, #2f4a66, #23284a); }
  .xbtn.ghost { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25); box-shadow: none !important; }
  .xchip { margin-top: 12px; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--stroke);
    background: var(--glass); color: var(--text); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
  .xlist { display: flex; flex-direction: column; gap: 10px; max-height: 60vh; overflow-y: auto; padding-bottom: 4px; }
  .xitem { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); }
  .xinfo { flex: 1; min-width: 0; }
  .xinfo b, .xinfo span, .xinfo em { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .xinfo b { font-size: 13px; font-weight: 600; }
  .xinfo span { font-size: 12px; color: rgba(225,228,255,.7); margin-top: 1px; }
  .xinfo em { white-space: normal !important; font-style: normal; font-size: 11.5px; color: rgba(225,228,255,.55); margin-top: 4px; }
  .xinfo i { font-style: normal; } .xinfo i.ok { color: #8ff0c4; font-weight: 600; }
  .xbtns { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
  .xdel { width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(255,255,255,.08); color: rgba(255,255,255,.6); font-size: 11px; cursor: pointer; }
  .xempty { text-align: center; color: rgba(225,228,255,.6); font-size: 13px; padding: 20px 0; margin: 0; }
  .xact { flex-shrink: 0; height: 34px; padding: 0 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.08); color: #fff; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
  .xact.ok { background: linear-gradient(90deg, #6f7cff, #b28bff); border: none; }
  #resultModal h4 { margin: 0 0 4px; font-size: 12px; font-weight: 600; color: #f1d28a; letter-spacing: .02em; }
  @media (max-width: 460px) { }
  .xcore { text-align: left; font-size: 16px; font-weight: 600; margin: 0 0 10px; color: #fff; line-height: 1.5; }
  .xdo { margin-top: 8px; display: grid; gap: 4px; font-size: 13.5px; line-height: 1.5; font-weight: 400; color: rgba(238,240,255,.86); }
  .xdo i { font-style: normal; display: inline-block; width: 18px; color: #7fe3bd; } .xdo span + span i { color: #ff9fb4; }
  .xq2 { margin: 10px 0 0; padding: 12px 16px; border-radius: 16px; border: 1px dashed rgba(241,210,138,.35); font-size: 14.5px; line-height: 1.6; color: #fff; }
  .xq2 b { display: block; font-size: 12px; font-weight: 600; color: #f1d28a; margin-bottom: 2px; }
  .xheart { align-self: center; font-size: 20px; color: #e0708e; margin-bottom: 20px; }
  .xscore { text-align: center; margin: 4px 0 6px; }
  .xscore small { display: block; font-size: 12px; font-weight: 600; color: var(--sheet-ink-2); }
  .xscore b { font-size: 44px; font-weight: 800; letter-spacing: -.02em; background: linear-gradient(90deg, #5b64d8, #c0609a); -webkit-background-clip: text; background-clip: text; color: transparent; }
  .xscore i { font-style: normal; font-size: 18px; margin-left: 2px; }
  .kws { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; margin: -4px 0 12px; }
  .kws span { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: rgba(91,100,216,.1); color: #4a52b8; }
  .kws.rev span { background: rgba(180,84,106,.1); color: #b4546a; }
  .padv { margin: 10px 0 0; background: linear-gradient(135deg, rgba(91,100,216,.13), rgba(143,183,255,.16)); border-radius: 18px; padding: 12px 16px; font-size: 15px; line-height: 1.7; font-weight: 500; }
  .padv b, .pflow b { display: block; font-size: 12px; font-weight: 600; color: #5b64d8; margin-bottom: 2px; }
  .pflow { background: rgba(255,255,255,.6); border-radius: 18px; padding: 12px 16px; margin-bottom: 10px; font-size: 15px; line-height: 1.7; }
  .pflow p { margin: 0; } .pflow p + p { margin-top: 6px; font-size: 14px; color: var(--sheet-ink-2); }
  .summary-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 4px 0 0; }
  .mini-wrap { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--sheet-ink-2); cursor: pointer; }
  .mini-wrap:active .mini { transform: scale(.94); }
  .mini { width: 68px; aspect-ratio: 5 / 8; border-radius: 10px; overflow: hidden; box-shadow: 0 8px 14px rgba(43,45,74,.28); }
  .strip-list { display: none; }
  .card-strip { margin: 0 0 18px; padding-bottom: 14px; border-bottom: 1px solid rgba(43,45,74,.12); }
  #resultModal .card-strip { border-bottom-color: rgba(255,255,255,.08); }
  .mainHead { margin: 0 0 14px; font-size: 21px; font-weight: 800; line-height: 1.35; letter-spacing: -.01em; color: var(--sheet-ink); }
  #resultModal .mainHead { color: #fff; }
  .mfoot { padding: 10px 18px calc(16px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 10px; align-items: center; }
  .dots { display: flex; gap: 6px; }
  .dots i { width: 7px; height: 7px; border-radius: 999px; background: rgba(43,45,74,.2); transition: all .25s; }
  .dots i.on { width: 20px; background: #5b64d8; }
  #resultModal .dots { gap: 0; padding: 8px 10px; margin: -8px 0; cursor: pointer; position: relative; z-index: 5; touch-action: manipulation; }
  #resultModal .dots i { cursor: pointer; position: relative; margin: 0 4px; pointer-events: none; }
  @media (hover: hover) and (pointer: fine) { #resultModal .dots i { width: 9px; height: 9px; margin: 0 5px; } #resultModal .dots i.on { width: 24px; } }
  @media (hover: hover) { #resultModal .dots i:not(.on):hover { background: rgba(255,255,255,.45); } }
  .mbtns.single { grid-template-columns: 1fr; }
  .mlinks { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 6px; width: 100%; }
  .mlinks[hidden] { display: none; }
  .mlinks button { min-height: 40px; padding: 0 12px; border: 0; border-radius: 999px; background: transparent; color: rgba(238,240,255,.82); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: underline; text-decoration-color: rgba(241,210,138,.5); text-underline-offset: 4px; }
  .mlinks button:hover { color: #f1d28a; }
  .mbtns { display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; width: 100%; }
  .mbtn { height: 50px; border-radius: 16px; border: none; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
  .mbtn.ghost { background: rgba(43,45,74,.08); color: var(--sheet-ink); }
  .mbtn.main { background: linear-gradient(90deg, #6a7cff, #9a7cff); color: #fff; box-shadow: 0 8px 18px rgba(106,124,255,.35); }
  .hint .again { display: inline-flex; align-items: center; height: 40px; margin: 6px 3px 0; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(143,183,255,.5); background: rgba(143,183,255,.16); color: #fff; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
  .hint .again.alt { background: var(--glass); border-color: var(--stroke); }
  .hint { line-height: 1.6; }
  .mh-actions { display: flex; gap: 8px; align-items: center; }
  .mshare { height: 40px; padding: 0 12px 0 10px; border-radius: 999px; border: none; background: #3b3e6e; color: #fff; font: inherit; font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 5px; cursor: pointer; }
  .mshare svg { width: 15px; height: 15px; }
  .about-box { background: linear-gradient(180deg, #2a2946, #1a1928); color: var(--text); max-height: 86dvh; overflow-y: auto; overscroll-behavior: contain; border: 1px solid var(--stroke); border-bottom: none; }
  .about-box .grab { background: rgba(255,255,255,.25); }
  .about { margin: 0 0 6px; color: var(--text-2); font-size: 14px; line-height: 1.75; }
  .about ol.how { padding-left: 20px; margin: 0; }
  .about-box .cta { margin-top: 14px; }
  .about h2 { color: var(--text); font-size: 18px; margin: 0 0 8px; }
  .about h3 { color: var(--text); font-size: 15px; margin: 22px 0 8px; }
  .about ul { padding-left: 18px; margin: 0; }
  .about li { margin-bottom: 4px; }
  .about b { color: var(--text); font-weight: 600; }
  .about details { border: 1px solid var(--stroke); background: var(--glass); border-radius: 14px; padding: 12px 14px; margin-bottom: 8px; }
  .about summary { color: var(--text); font-weight: 600; cursor: pointer; list-style: none; }
  .about summary::-webkit-details-marker { display: none; }
  .about summary::after { content: "+"; float: right; color: var(--text-3); }
  .about details[open] summary::after { content: "−"; }
  .about details p { margin: 8px 0 0; }
  .about a { color: var(--glow); font-weight: 600; text-decoration: none; }
  .about-link { margin-top: 18px; }
  .history-list { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
  .history-empty { text-align: center; color: var(--text-3); font-size: 13px; padding: 28px 0; }
  .history-entry { border: 1px solid var(--stroke); background: var(--glass); border-radius: 16px; padding: 12px 14px; }
  .history-entry-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
  .history-date { font-size: 12px; color: var(--text-3); }
  .history-mode { font-size: 13px; font-weight: 600; color: var(--text); }
  .history-question { margin: 0 0 10px; font-size: 12.5px; color: var(--text-2); font-style: italic; }
  .history-cards { display: flex; gap: 8px; flex-wrap: wrap; }
  .history-card { width: 40px; aspect-ratio: 5 / 8; border-radius: 6px; overflow: hidden; box-shadow: 0 4px 10px rgba(0,0,0,.35); }
  .history-card svg.art { display: block; width: 100%; height: 100%; }
  .history-card.rev .art { transform: rotate(180deg); }
  .history-clear { display: block; width: 100%; margin-top: 4px; padding: 12px; border-radius: 14px; border: 1px solid rgba(255,159,180,.3); background: rgba(255,159,180,.08); color: #ff9fb4; font: inherit; font-weight: 600; cursor: pointer; }
  /* 달력·목록에서 그때의 해석을 펼쳐 보기 */
  .about .history-detail { border: 0; background: none; padding: 0; margin: 0; }
  .history-detail > summary, .history-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 12px; }
  .about .history-detail > summary { cursor: pointer; list-style: none; font-weight: 400; }
  .about .history-detail > summary::before { content: none; }
  .about .history-detail > summary::after, .about .history-detail[open] > summary::after { content: none; }
  .history-detail > summary::-webkit-details-marker { display: none; }
  .history-detail > summary .history-cards, .history-row .history-cards { flex: 0 1 auto; max-width: 100%; }
  .history-more { margin-left: auto; }
  .history-more { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 1px solid rgba(241,210,138,.4); border-radius: 999px; background: rgba(241,210,138,.08); color: #f1d28a; font-size: 12.5px; font-weight: 650; white-space: nowrap; transition: background .2s; }
  .history-detail > summary:hover .history-more { background: rgba(241,210,138,.16); }
  @media (max-width: 560px) { .history-detail > summary, .history-row { flex-direction: column; align-items: stretch; gap: 10px; } .history-more { justify-content: center; margin-left: 0; } .history-nores { text-align: left; } }
  .history-more::after { content: '▾'; font-size: 11px; transition: transform .2s; }
  .history-detail[open] .history-more::after { transform: rotate(180deg); }
  .history-detail .history-result p { margin: 0 0 8px; }
  .history-result { margin-top: 12px; padding: 14px 16px; border-radius: 14px; background: rgba(255,255,255,.04); color: rgba(238,240,255,.9); font-size: 13.5px; line-height: 1.8; }
  .history-result .mainHead { margin: 0 0 10px; font-size: 15px; font-weight: 750; color: #fff; }
  .history-result h4 { margin: 14px 0 4px; color: #f1d28a; font-size: 11.5px; font-weight: 700; letter-spacing: .04em; }
  .history-result h4:first-child { margin-top: 0; }
  .history-result p { margin: 0 0 8px; }
  .history-result .pinterp, .history-result .syn { background: none; border: 0; padding: 0; margin: 0; }
  .history-result .ynbig { margin: 0 0 12px; padding: 0 0 12px; border-bottom: 1px solid rgba(255,255,255,.08); }
  .history-result .yn-word { display: block; font-size: 22px; font-weight: 800; }
  .history-result .ynbig.yes .yn-word { color: #7fe3bd; }
  .history-result .ynbig.no .yn-word { color: #ff9fb4; }
  .history-nores { color: var(--text-3); font-size: 11.5px; text-align: right; line-height: 1.5; }
  /* 오늘의 금전운: 동전 게이지 */
  .mnbig { display: grid; justify-items: center; gap: 6px; margin: 2px 0 14px; text-align: center; }
  .mnbig small { color: #f1d28a; font-size: 12px; font-weight: 700; letter-spacing: .06em; }
  .mnbig .coins { display: flex; gap: 8px; }
  .mnbig .coins i { width: 20px; height: 20px; border-radius: 50%; border: 1px solid rgba(241,210,138,.35); background: rgba(255,255,255,.08); }
  .mnbig .coins i.on { border-color: #f6dc9a; background: radial-gradient(circle at 35% 30%, #fff4d0, #e6c273 55%, #a87a30); box-shadow: 0 0 12px rgba(241,210,138,.45); }
  .mnbig .mn-word { font-size: 24px; font-weight: 800; color: #f8ecc8; text-shadow: 0 0 22px rgba(241,210,138,.4); }
  .mnbig .mn-sub { color: rgba(214,218,250,.66); font-size: 12px; }
  .mn-note { margin: 14px 0 0 !important; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.08); color: rgba(214,218,250,.55); font-size: 11.5px !important; line-height: 1.6; }
  .history-result .mnbig { padding: 0 0 12px; margin: 0 0 12px; border-bottom: 1px solid rgba(255,255,255,.08); }
  /* 질문창: 필요 없는 리딩에서는 아래 버튼 쪽으로 접혀 들어갔다가, 필요할 때 버튼 쪽에서 펼쳐진다 */
  #questionRow { max-height: 130px; transform-origin: 50% 100%; transition: opacity .4s, transform .5s, max-height .5s cubic-bezier(.3,.8,.3,1), margin .5s cubic-bezier(.3,.8,.3,1), visibility 0s; }
  #questionRow.gone { max-height: 0; margin-top: 0; margin-bottom: 0; opacity: 0; overflow: hidden; visibility: hidden; pointer-events: none; transform: translateY(28px) scale(.92); transition: opacity .3s, transform .5s cubic-bezier(.5,0,.8,.4), max-height .5s cubic-bezier(.3,.8,.3,1), margin .5s cubic-bezier(.3,.8,.3,1), visibility 0s .5s; }
  /* 기록이 많아도 가볍게: 화면 밖 기록은 그리기를 미루고, 더 보기로 나눠 보여준다 */
  .history-entry { content-visibility: auto; contain-intrinsic-size: auto 150px; }
  .history-morebtn { display: block; width: 100%; margin: 4px 0 10px; padding: 12px; border-radius: 14px; border: 1px solid rgba(241,210,138,.32); background: rgba(241,210,138,.07); color: #f1d28a; font: inherit; font-size: 13px; font-weight: 650; cursor: pointer; }
  .hist-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
  .hist-filter { height: 34px; max-width: 100%; padding: 0 10px; border: 1px solid var(--stroke); border-radius: 12px; background: rgba(255,255,255,.06); color: var(--text-2); font: inherit; font-size: 12.5px; }
  .hist-filter { -webkit-appearance: none; appearance: none; padding-right: 30px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d6daf0' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 9px center; background-size: 14px; cursor: pointer; }
  .hist-filter option { color: #1b1a2e; }
  /* 회원가입(체험) */
  .su-agree { margin: 4px 0 14px; padding: 4px 12px; border: 1px solid var(--stroke); border-radius: 14px; background: rgba(255,255,255,.03); }
  .su-check { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid rgba(255,255,255,.06); font-size: 13.5px; color: var(--text-2); cursor: pointer; }
  .su-check:last-child { border-bottom: 0; }
  .su-check span { flex: 1; }
  .su-check a { color: var(--text-3); font-size: 12px; text-decoration: underline; }
  .su-check input { width: 18px; height: 18px; accent-color: #f1d28a; flex: none; }
  .su-all { color: var(--text); font-weight: 700; }
  .su-provs { display: grid; gap: 10px; transition: opacity .2s; }
  .su-provs.su-off { opacity: .45; }
  .su-btn { display: flex; align-items: center; gap: 12px; width: 100%; height: 52px; padding: 0 16px; border: 0; border-radius: 14px; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; transition: transform .15s, filter .15s; }
  .su-btn:active { transform: scale(.985); }
  .su-btn:hover { filter: brightness(.96); }
  .su-btn i { display: grid; place-items: center; width: 24px; height: 24px; flex: none; }
  .su-btn i svg { width: 24px; height: 24px; display: block; }
  .su-btn span { flex: 1; text-align: center; padding-right: 24px; }
  .su-more { display: block; margin: 12px auto 0; padding: 8px 14px; border: 0; background: none; color: var(--text-3); font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; }
  .su-hint { margin: 10px 0 0; text-align: center; color: #f1d28a; font-size: 12.5px; }
  .su-consent { padding: 18px 16px; border: 1px solid var(--stroke); border-radius: 16px; background: rgba(255,255,255,.04); text-align: center; }
  .su-badge { display: grid; place-items: center; width: 52px; height: 52px; margin: 0 auto 10px; border-radius: 16px; }
  .su-badge i { display: grid; place-items: center; width: 28px; height: 28px; }
  .su-badge svg { width: 28px; height: 28px; }
  .su-consent p { margin: 0 0 10px; font-size: 13.5px; line-height: 1.6; color: var(--text-2); }
  .su-consent ul { margin: 0; padding: 0; list-style: none; text-align: left; font-size: 13px; color: var(--text); }
  .su-consent li { padding: 9px 12px; border-top: 1px solid rgba(255,255,255,.07); }
  .su-card { display: flex; align-items: center; gap: 12px; margin: 8px 0 12px; padding: 12px 14px; border: 1px solid rgba(241,210,138,.3); border-radius: 16px; background: rgba(241,210,138,.06); }
  .su-card b { display: block; font-size: 15px; }
  .su-card small { color: var(--text-3); font-size: 12px; }
  .su-avatar { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 50%; background: linear-gradient(135deg, #fff1c4, #e6c273); color: #2a2210; font-weight: 800; font-size: 17px; }
  @media (pointer: coarse) { .question-field .question-input, .hist-bar .hist-filter { font-size: 16px; } }
  /* 화면에는 보이지 않지만 읽기 도구·검색 로봇이 읽는 소개(제목·설명·안내 링크) */
  .sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
  /* 준비 중인 리딩은 접어 두고, 사용 가능한 리딩이 먼저 눈에 들어오게 */
  .mode.soon-hide { display: none; }
  .soon-toggle { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; margin: 4px 0 2px; padding: 10px 12px; border: 1px dashed rgba(221,229,255,.2); border-radius: 14px; background: rgba(255,255,255,.03); color: rgba(226,230,255,.7); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
  .soon-toggle::after { content: '▾'; font-size: 11px; transition: transform .2s; }
  .soon-toggle[aria-expanded="true"]::after { transform: rotate(180deg); }
  .soon-toggle:hover { background: rgba(255,255,255,.06); color: #fff; }
  .menu-tool.wide { grid-column: 1 / -1; }
  .history-clear:active { transform: scale(.98); }
  /* 타로 기록: 달력 보기 */
  .hist-tabs { display: flex; gap: 4px; width: fit-content; padding: 3px; border-radius: 12px; background: rgba(255,255,255,.06); }
  .hist-tabs button { padding: 6px 18px; border: 0; border-radius: 9px; background: none; color: var(--text-3); cursor: pointer; font: inherit; font-size: 13px; font-weight: 600; }
  .hist-tabs button.on { background: rgba(241,210,138,.16); color: #f1d28a; }
  /* 달력: 유리 패널 안에 월 제목·요일·날짜를 정돈하고, 기록이 있는 날은 카드 썸네일이 놓인 작은 명패로 보여준다 */
  .cal-panel { margin-top: 12px; padding: 16px 14px 14px; border-radius: 22px; border: 1px solid rgba(241,210,138,.22); background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.025)); box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 14px 32px rgba(4,3,20,.28); }
  .cal-head { display: flex; align-items: center; justify-content: space-between; margin: 0 0 14px; }
  .cal-title { display: grid; justify-items: center; gap: 2px; }
  .cal-title b { color: #f8ecc8; font-size: 18px; font-weight: 750; letter-spacing: .04em; }
  .cal-title small { color: rgba(214,218,250,.6); font-size: 11.5px; letter-spacing: .04em; min-height: 14px; }
  .cal-head button { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid rgba(241,210,138,.3); border-radius: 50%; background: rgba(241,210,138,.06); color: #f1d28a; cursor: pointer; transition: background .2s, transform .2s; }
  .cal-head button:hover { background: rgba(241,210,138,.16); }
  .cal-head button:active { transform: scale(.92); }
  .cal-head button svg { width: 16px; height: 16px; }
  .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px 4px; }
  .cal-dow { padding: 0 0 8px; margin-bottom: 2px; color: rgba(214,218,250,.5); font-size: 11px; font-weight: 650; letter-spacing: .06em; text-align: center; border-bottom: 1px solid rgba(255,255,255,.07); grid-row: 1; }
  .cal-dow.sun { color: rgba(255,159,180,.75); }
  .cal-dow.sat { color: rgba(143,183,255,.8); }
  .cal-cell { position: relative; height: 62px; overflow: visible; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 4px; padding: 6px 0 5px; border: 1px solid transparent; border-radius: 12px; background: none; color: rgba(214,218,250,.55); font: inherit; font-size: 12px; transition: background .2s, border-color .2s, transform .2s, box-shadow .2s; }
  .cal-cell .cal-n { display: grid; place-items: center; min-width: 22px; height: 22px; border-radius: 50%; font-weight: 600; }
  .cal-cell.sun .cal-n { color: rgba(255,159,180,.7); }
  .cal-cell.sat .cal-n { color: rgba(143,183,255,.75); }
  .cal-cell.blank { visibility: hidden; }
  button.cal-cell { cursor: pointer; background: linear-gradient(180deg, rgba(241,210,138,.13), rgba(241,210,138,.04)); border-color: rgba(241,210,138,.3); color: #f6ecd0; }
  button.cal-cell .cal-n { color: #f6ecd0; }
  button.cal-cell:hover { transform: translateY(-2px); background: linear-gradient(180deg, rgba(241,210,138,.2), rgba(241,210,138,.07)); }
  .cal-cell.today .cal-n { color: #2a2210; background: linear-gradient(135deg, #fff1c4, #e6c273); font-weight: 800; box-shadow: 0 0 12px rgba(241,210,138,.5); }
  button.cal-cell.today .cal-n { color: #2a2210; }
  .cal-cell.sel { border-color: #f1d28a; background: linear-gradient(180deg, rgba(241,210,138,.26), rgba(241,210,138,.1)); box-shadow: 0 0 0 1px rgba(241,210,138,.5), 0 8px 20px rgba(241,210,138,.16); }
  .cal-thumb { width: 24px; aspect-ratio: 5 / 8; border-radius: 4px; overflow: hidden; box-shadow: 0 3px 8px rgba(0,0,0,.5), 0 0 0 1px rgba(241,210,138,.35); }
  .cal-thumb svg.art { display: block; width: 100%; height: 100%; }
  .cal-thumb.rev .art { transform: rotate(180deg); }
  .cal-count { position: absolute; top: -5px; right: -3px; min-width: 16px; height: 16px; padding: 0 4px; box-sizing: border-box; border-radius: 999px; background: linear-gradient(135deg, #fff1c4, #e6c273); color: #2a2210; font-size: 9.5px; font-style: normal; font-weight: 800; line-height: 16px; text-align: center; box-shadow: 0 2px 6px rgba(0,0,0,.4); }
  .cal-day-title { display: flex; align-items: center; gap: 10px; margin: 22px 2px 10px; color: #f8ecc8; font-size: 14px; font-weight: 700; letter-spacing: .03em; }
  .cal-day-title::before, .cal-day-title::after { content: ''; height: 1px; flex: 1; background: linear-gradient(90deg, transparent, rgba(241,210,138,.4)); }
  .cal-day-title::after { transform: scaleX(-1); }
  @media (min-width: 700px) { .cal-cell { height: 92px; } .cal-thumb { width: 30px; } .cal-panel { padding: 20px 18px 18px; } }
  .settings-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 2px; border-bottom: 1px solid var(--stroke); font-size: 14px; color: var(--text-2); }
  /* 결제 미리보기(체험) 화면 */
  .pay-demo { margin: 4px 0 14px; padding: 10px 12px; border-left: 3px solid #f1d28a; border-radius: 4px; background: rgba(241,210,138,.08); font-size: 12.5px; line-height: 1.6; }
  .pay-steps { display: flex; gap: 6px; margin: 0 0 16px; padding: 0; list-style: none; counter-reset: pay; }
  .pay-steps li { flex: 1; padding-top: 8px; border-top: 3px solid rgba(255,255,255,.12); color: var(--text-3); font-size: 11.5px; counter-increment: pay; }
  .pay-steps li::before { content: counter(pay) ". "; }
  .pay-steps li.on { border-top-color: #f1d28a; color: var(--text); font-weight: 600; }
  .pay-plan { position: relative; width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 8px; padding: 14px 14px; border: 1px solid var(--stroke); border-radius: 14px; background: none; color: var(--text); cursor: pointer; font: inherit; text-align: left; transition: border-color .18s, background .18s; }
  .pay-plan:hover { background: rgba(255,255,255,.04); }
  .pay-plan.on { border-color: #f1d28a; background: rgba(241,210,138,.08); }
  .pay-plan b { display: block; font-size: 15px; }
  .pay-plan small { display: block; margin-top: 2px; color: var(--text-3); font-size: 12px; line-height: 1.4; }
  .pay-price { flex: none; text-align: right; font-size: 16px; font-weight: 700; }
  .pay-price small { font-weight: 500; }
  .pay-tag { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: #f1d28a; color: #2a2210; font-size: 10px; font-weight: 800; vertical-align: 1px; }
  .pay-perks { margin: 14px 0 0; }
  .pay-method { display: flex; align-items: center; gap: 10px; padding: 12px 2px; border-bottom: 1px solid var(--stroke); color: var(--text-2); font-size: 14px; cursor: pointer; }
  .pay-method input { accent-color: #f1d28a; width: 17px; height: 17px; }
  .pay-total { display: flex; justify-content: space-between; align-items: baseline; margin: 14px 2px 0; color: var(--text); font-size: 15px; font-weight: 600; }
  .pay-total b { font-size: 20px; }
  .pay-agree { display: flex; align-items: flex-start; gap: 8px; margin: 14px 2px 0; color: var(--text-2); font-size: 12.5px; line-height: 1.5; cursor: pointer; }
  .pay-agree input { margin-top: 3px; accent-color: #f1d28a; }
  .pay-actions { display: flex; gap: 8px; margin-top: 14px; }
  .pay-actions .cta { margin-top: 0; }
  .pay-actions .pay-back { flex: none; width: 92px; background: rgba(255,255,255,.08); box-shadow: none; }
  .pay-actions .cta:disabled { opacity: .4; cursor: default; }
  .pay-receipt { margin: 6px 0 0; padding: 4px 0; text-align: center; }
  .pay-receipt .pay-check { width: 52px; height: 52px; margin: 6px auto 10px; display: grid; place-items: center; border-radius: 50%; background: rgba(241,210,138,.14); color: #f1d28a; font-size: 26px; }
  .settings-row:last-of-type { border-bottom: none; }
  .settings-row b { color: var(--text); font-weight: 600; }
  .settings-row .text-btn { height: 30px; padding: 0 12px; font-size: 12.5px; }
  .share-sheet { position: fixed; inset: 0; z-index: 120; display: flex; align-items: flex-end; justify-content: center;
    background: rgba(6,6,16,.72); }
  .share-sheet[hidden] { display: none; }
  @media (min-width: 600px) { .share-sheet { align-items: center; } .share-box { border-radius: 28px !important; border-bottom: 1px solid rgba(183,156,255,.25) !important; } }
  .share-box { position: relative; width: 100%; max-width: 420px; border-radius: 28px 28px 0 0; padding: 10px 20px calc(18px + env(safe-area-inset-bottom)); color: #fff; overflow: hidden;
    background: radial-gradient(120% 60% at 50% 0%, rgba(120,110,230,.35), transparent 60%), linear-gradient(180deg, #25244a, #16162c);
    border: 1px solid rgba(183,156,255,.25); border-bottom: none; box-shadow: 0 -20px 60px rgba(0,0,0,.45); animation: up .35s cubic-bezier(.2,.9,.3,1); }
  .share-box .grab { background: rgba(255,255,255,.22); }
  .sh-head { display: flex; align-items: center; justify-content: space-between; margin: 2px 0 12px; }
  .sh-head h3 { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
  .sh-x { width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.08); color: #fff; font-size: 14px; cursor: pointer; }
  .sh-preview { display: flex; gap: 14px; align-items: center; padding: 12px; border-radius: 18px; margin-bottom: 18px;
    background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); }
  .sh-cards { display: flex; flex-shrink: 0; }
  .sh-cards div { width: 40px; aspect-ratio: 5 / 8; border-radius: 6px; overflow: hidden; box-shadow: 0 6px 14px rgba(0,0,0,.4), 0 0 0 1px rgba(143,183,255,.4); background: #1b1c38; }
  .sh-cards div + div { margin-left: -14px; }
  .sh-cards div.rev .art { transform: rotate(180deg); }
  .sh-text { min-width: 0; }
  .sh-text b { display: block; font-size: 14px; font-weight: 600; line-height: 1.4; }
  .sh-text span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 12px; line-height: 1.5; color: rgba(225,228,255,.7); margin-top: 2px; }
  .sh-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px 6px; margin-bottom: 18px; }
  .sbtn { display: flex; flex-direction: column; align-items: center; gap: 7px; background: none; border: none; font: inherit; font-size: 11.5px; color: rgba(235,236,255,.85); cursor: pointer; padding: 0; }
  .sbtn i { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font-style: normal; box-shadow: 0 8px 18px rgba(0,0,0,.35); transition: transform .15s; }
  .sbtn:active i { transform: scale(.92); }
  .sbtn svg { width: 26px; height: 26px; }
  .sh-tools { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.08); }
  .sh-tool { display: flex; align-items: center; justify-content: center; gap: 6px; height: 44px; border-radius: 14px; border: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.06); color: #fff; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
  .sh-tool svg { width: 17px; height: 17px; flex-shrink: 0; }
  .sh-tool:active { background: rgba(255,255,255,.12); }
  .sh-url { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
  /* 해설에 집중할 수 있도록 결과창 뒤의 그래픽은 그리지 않는다. */
  /* 모달이 실제로 다 나타난 뒤에만(JS의 waitForFade로 확인) result-open을 붙이므로,
     여기서는 별도의 지연 없이 바로 숨겨도 빈 화면이 끼지 않는다. */
  body.result-open .app, body.result-open .stars { visibility: hidden; pointer-events: none; }
  /* 창이 열려 가려진 배경 애니메이션은 멈춤 */
  body:has(#resultModal:not([hidden])) .stars, body:has(#resultModal:not([hidden])) .crystal, body:has(#resultModal:not([hidden])) .crystal *,
  body:has(#aboutSheet:not([hidden])) .stars, body:has(#aboutSheet:not([hidden])) .crystal, body:has(#aboutSheet:not([hidden])) .crystal * { animation-play-state: paused; }
  .crystal .mist { will-change: transform; }
  /* 기기에서 '동작 줄이기'를 켠 사용자 */
  @media (prefers-reduced-motion: reduce) {
    .stars, .card:not(.flipped) .back { animation: none !important; }
  }
  .toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); opacity: 0;
    background: rgba(20,20,35,.9); color: #fff; padding: 10px 16px; border-radius: 999px; font-size: 13px; transition: all .3s; z-index: 300; pointer-events: none; max-width: calc(100vw - 40px); text-align: center; }
  .toast.show { opacity: 1; transform: translate(-50%, 0); }
  /* ---- 결과창: 앱 배경과 어울리는 어두운 유리 톤 ---- */
  #resultModal { --sheet-ink: #eef0ff; --sheet-ink-2: rgba(214,218,250,.66); --gold: #f1d28a; background: rgba(6,6,18,.66) !important; opacity: 1; transition: opacity .25s ease; }
  @starting-style { #resultModal:not([hidden]) { opacity: 0; } }
  #resultModal .mbox { color: var(--sheet-ink); border: 1px solid rgba(183,156,255,.22);
    background: radial-gradient(130% 55% at 50% 0%, rgba(120,104,230,.30), transparent 62%), radial-gradient(90% 40% at 50% 100%, rgba(143,183,255,.10), transparent 70%), linear-gradient(180deg, #24234a 0%, #17172f 100%) !important;
    box-shadow: 0 30px 80px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.08) !important; }
  #resultModal .mhead h2 { font-weight: 600; letter-spacing: .01em; color: #fff; }
  #resultModal .mclose { background: rgba(255,255,255,.08); color: #fff; border: 1px solid rgba(255,255,255,.12); }
  #resultModal .mshare { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); }
  #resultModal .ptag { background: transparent; color: var(--gold); border: 1px solid rgba(241,210,138,.4); font-weight: 600; letter-spacing: .04em; }
  #resultModal .pcard { box-shadow: 0 0 0 1px rgba(183,200,255,.35), 0 0 40px rgba(143,183,255,.28), 0 20px 40px rgba(0,0,0,.5); }
  #resultModal .ptitle { color: #fff; font-weight: 600; font-size: 23px; }
  #resultModal .pill { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); color: var(--sheet-ink-2); }
  #resultModal .pill.rev { color: #ff9fb4; border-color: rgba(255,159,180,.3); }
  #resultModal .kws span { background: rgba(241,210,138,.1); color: var(--gold); border: 1px solid rgba(241,210,138,.22); font-weight: 500; }
  #resultModal .kws.rev span { background: rgba(255,159,180,.08); color: #ffb3c4; border-color: rgba(255,159,180,.22); }
  #resultModal .pmean, #resultModal .pflow, #resultModal .pinterp, #resultModal .syn { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); color: rgba(238,240,255,.9); }
  #resultModal .pmean { line-height: 1.85; }
  #resultModal .padv { background: linear-gradient(135deg, rgba(126,110,240,.22), rgba(143,183,255,.10)); border: 1px solid rgba(183,156,255,.25); color: #fff; }
  #resultModal .padv b, #resultModal .pflow b { color: var(--gold); letter-spacing: .03em; }
  #resultModal .pinterp, #resultModal .syn { border-radius: 18px; padding: 18px 18px 20px; }
  #resultModal .pinterp h4, #resultModal .syn h4 { margin: 0 0 10px; font-size: 12px; font-weight: 700; color: var(--gold); letter-spacing: .04em; text-transform: uppercase; }
  #resultModal .syn h4:not(:first-child), #resultModal .pinterp h4:not(:first-child) { margin-top: 24px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.08); }
  #resultModal .pinterp p, #resultModal .syn p { margin: 0 0 14px; font-size: 15px; line-height: 1.85; }
  #resultModal .pinterp p:last-child, #resultModal .syn p:last-child { margin-bottom: 0; }
  #resultModal .pdesc .pmean { margin-top: 8px; }
  #resultModal .reveal-panel { max-height: 0; overflow: hidden; opacity: 0; transition: max-height .5s ease, opacity .45s ease, margin .45s ease; margin-top: 0; }
  #resultModal .reveal-panel.open { max-height: 4000px; opacity: 1; margin-top: 12px; }
  #resultModal .reveal-panel .pinterp, #resultModal .reveal-panel .syn { border: 1px solid rgba(241,210,138,.22); box-shadow: 0 0 0 1px rgba(241,210,138,.06) inset; }
  #resultModal .reveal-note { margin: 0 0 10px; font-size: 12.5px; color: var(--gold); opacity: .85; letter-spacing: .01em; }
  #resultModal .ynbig.yes { color: #7fe3bd; text-shadow: 0 0 22px rgba(127,227,189,.35); }
  #resultModal .ynbig.no { color: #ff9fb4; text-shadow: 0 0 22px rgba(255,159,180,.35); }
  #resultModal .xscore b, #resultModal .xcmp b.real { background: linear-gradient(90deg, #f1d28a, #d9b3ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
  #resultModal .xheart { color: #ff9fb4; }
  #resultModal .xtease { border: 1px solid rgba(183,156,255,.3); box-shadow: 0 12px 30px rgba(0,0,0,.35); }
  #resultModal .dots i { background: rgba(255,255,255,.18); }
  #resultModal .dots i.on { background: var(--gold); }
  #resultModal .mbtn.ghost { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); color: #fff; }
  #resultModal .mbtn.main { background: linear-gradient(90deg, #6f7cff, #a98bff); box-shadow: 0 10px 24px rgba(111,124,255,.35); }
  /* 결과창 닫기 버튼: 금색 테두리의 얇은 알약형으로 통일(카드 뽑기 버튼과 같은 결). */
  #resultModal .mbtns.single .mbtn.ghost {
    height: 48px; border-radius: 999px; border: 1px solid rgba(241,210,138,.4);
    background: linear-gradient(180deg, rgba(255,255,255,.11), rgba(255,255,255,.03));
    color: #f6e7bd; font-size: 14.5px; font-weight: 650; letter-spacing: .1em;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 8px 22px rgba(0,0,0,.3);
    transition: transform .15s, background .2s, border-color .2s, box-shadow .2s, color .2s;
  }
  #resultModal .mbtns.single .mbtn.ghost:active { transform: scale(.97); }
  @media (hover: hover) {
    #resultModal .mbtns.single .mbtn.ghost:hover { border-color: rgba(241,210,138,.75); color: #fff; background: linear-gradient(180deg, rgba(241,210,138,.2), rgba(241,210,138,.06)); box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 0 0 4px rgba(241,210,138,.08), 0 10px 26px rgba(0,0,0,.34); }
  }
  #resultModal .page::-webkit-scrollbar { width: 0; }
  #resultModal { background: rgba(6,6,18,.82) !important; }
  .pager { overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; will-change: scroll-position; }
  .page { contain: layout paint; }
  #resultModal .mini [filter] { filter: none; }
  body:has(#resultModal:not([hidden])) .card .back, body:has(#resultModal:not([hidden])) .xq b { animation-play-state: paused; }
  #resultModal .xq b { animation: none; }
  /* 결과창 박스 간격 통일 */
  #resultModal .page .pmean, #resultModal .page .padv, #resultModal .page .pflow, #resultModal .page .xq2,
  #resultModal .page .xtease,
  #resultModal .page .pdesc, #resultModal .page .pinterp, #resultModal .page .syn { margin: 0 0 12px !important; }
  #resultModal .page .kws { margin: 0 0 12px; }
  #resultModal .page .xcore { margin: 0 0 12px; }
  #resultModal .page .pmeta { margin: 8px 0 12px; }
  #resultModal .page .summary-row { margin: 14px 0 12px; }
  #resultModal .page > :last-child { margin-bottom: 0 !important; }
  /* 간결한 확장형 메뉴 */
  .menu-btn { width: 36px; height: 36px; display: grid; place-items: center; padding: 0; border-radius: 50%; border: 1px solid var(--stroke); background: var(--glass); color: #f3e3b5; cursor: pointer; }
  .menu-btn svg { width: 19px; height: 19px; }
  .menu-btn:active { transform: scale(.94); }
  /* 언어 선택: 메뉴를 열지 않아도 상단에서 바로 바꿀 수 있다 */
  .lang-switch { position: relative; z-index: 6; }
  .ls-btn { height: 36px; min-width: 36px; padding: 0 11px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; border-radius: 999px; border: 1px solid var(--stroke); background: var(--glass); color: #f3e3b5; font: inherit; font-size: 12px; font-weight: 700; letter-spacing: .06em; cursor: pointer; }
  .ls-btn svg { width: 16px; height: 16px; flex: none; }
  .ls-code { text-transform: uppercase; }
  .ls-btn:active { transform: scale(.95); }
  .ls-btn[aria-expanded="true"] { border-color: rgba(241,210,138,.5); background: rgba(241,210,138,.1); }
  .ls-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 156px; padding: 6px; border-radius: 16px; border: 1px solid var(--stroke); background: rgba(30,29,52,.97); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 18px 44px rgba(0,0,0,.5); }
  .ls-menu[hidden] { display: none; }
  .ls-menu a { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 44px; padding: 0 12px; border-radius: 11px; color: rgba(238,240,255,.92); font-size: 14px; font-weight: 500; text-decoration: none; }
  .ls-menu a:hover { background: rgba(255,255,255,.07); }
  .ls-menu a[aria-current="true"] { color: #f1d28a; background: rgba(241,210,138,.1); font-weight: 650; }
  .ls-menu a[aria-current="true"]::after { content: '✓'; font-size: 13px; }
  .desktop-nav { display: none; }
  .menu-sheet { position: fixed; inset: 0; z-index: 65; display: flex; justify-content: center; align-items: flex-start; padding: max(12px, env(safe-area-inset-top)) 12px 12px; background: rgba(8,9,25,.38); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); }
  .menu-sheet[hidden] { display: none; }
  .menu-box { width: min(440px, 100%); max-height: calc(100dvh - 24px); overflow-y: auto; padding: 10px 14px 16px; border: 1px solid rgba(173,190,255,.16); border-radius: 24px; color: #eef0ff; background: radial-gradient(100% 62% at 50% 0%, rgba(90,108,180,.16), transparent 66%), rgba(20,22,49,.86); box-shadow: 0 18px 44px rgba(0,0,0,.34); backdrop-filter: blur(20px) saturate(120%); -webkit-backdrop-filter: blur(20px) saturate(120%); animation: menuIn .22s cubic-bezier(.2,.9,.3,1) both; }
  @keyframes menuIn { from { opacity: 0; transform: translateY(-10px) scale(.98); } to { opacity: 1; transform: none; } }
  .menu-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 2px 10px; }
  .menu-head h2 { margin: 0; font-size: 18px; font-weight: 650; letter-spacing: -.02em; }
  .menu-eyebrow { display: block; margin-bottom: 2px; color: #f1d28a; font-size: 10px; font-weight: 700; letter-spacing: .16em; }
  .menu-close { width: 40px; height: 40px; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; background: rgba(255,255,255,.07); color: #fff; font-size: 18px; cursor: pointer; }
  .menu-section { margin-top: 12px; }
  .menu-section-title { margin: 0 2px 7px; color: rgba(225,228,255,.62); font-size: 11px; font-weight: 700; letter-spacing: .06em; }
  .menu-preview-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .menu-preview { position: relative; min-width: 0; min-height: 96px; display: block; padding: 12px 10px 10px; border: 1px solid rgba(221,229,255,.08); border-radius: 16px; background: rgba(255,255,255,.035); color: #fff; cursor: pointer; font: inherit; text-align: left; }
  .menu-preview:active { transform: scale(.98); background: rgba(255,255,255,.075); }
  .menu-preview:disabled { cursor: default; }
  .menu-preview-icon { width: 30px; height: 30px; display: grid; place-items: center; margin-bottom: 8px; border-radius: 10px; color: #f1d28a; background: rgba(241,210,138,.12); }
  .menu-preview-icon svg { width: 18px; height: 18px; }
  .menu-preview-copy { display: block; min-width: 0; }
  .menu-preview b { display: block; overflow: hidden; font-size: 13px; line-height: 1.25; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
  .menu-preview small { display: block; overflow: hidden; margin-top: 4px; color: rgba(225,228,255,.62); font-size: 10px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
  .menu-tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .menu-tool { min-width: 0; min-height: 68px; display: grid; place-items: center; align-content: center; gap: 5px; padding: 7px 3px; border: 1px solid rgba(221,229,255,.075); border-radius: 15px; background: rgba(255,255,255,.03); color: rgba(238,240,255,.82); cursor: pointer; font: inherit; font-size: 10px; line-height: 1.15; text-align: center; text-decoration: none; }
  .menu-tool:active { transform: scale(.97); background: rgba(255,255,255,.075); }
  .menu-icon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 10px; color: #f1d28a; background: rgba(241,210,138,.12); }
  .menu-icon svg { width: 17px; height: 17px; }
  .menu-sound .on { display: none; }
  .menu-sound.act .on { display: grid; }
  .menu-sound.act .off { display: none; }
  .menu-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 12px; }
  .menu-links a { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 9px 4px; border-radius: 11px; color: rgba(231,233,255,.74); font-size: 11px; text-align: center; text-decoration: none; background: rgba(255,255,255,.045); }

  /* ---- 반응형 UI 시스템: 무대는 넓게, 읽고 누르는 영역은 안정적으로 ---- */
  :root { --control-h: 44px; --panel-pad: 22px; --reading-width: 620px; }
  button, a { -webkit-tap-highlight-color: transparent; }
  button:focus-visible, a:focus-visible { outline: 2px solid #f1d28a; outline-offset: 3px; }
  @media (hover: hover) {
    .text-btn:hover, .menu-btn:hover{ border-color: rgba(241,210,138,.56); background-color: rgba(255,255,255,.1); }
    .reading-select:hover { border-color: rgba(143,183,255,.52); background: rgba(112,132,245,.11); }
    .mode:not(.locked):hover { border-color: rgba(143,183,255,.36); background: rgba(255,255,255,.075); transform: translateY(-1px); }
    .menu-preview:hover, .menu-tool:hover, .menu-links a:hover { background: rgba(255,255,255,.085); border-color: rgba(241,210,138,.2); }
  }

  /* 카드 선택 보조 요소도 팬 카드와 같은 비율로 커집니다. */
  .hero { --picker-scale: 1; }
  .pk-top { top: calc(42px * var(--picker-scale)); }
  .pk-top:has(.pk-slots.many) { top: calc(8px * var(--picker-scale)); }
  .pk-x { width: max(40px, calc(34px * var(--picker-scale))); height: max(40px, calc(34px * var(--picker-scale))); font-size: calc(14px * var(--picker-scale)); }
  .pk-slots { gap: calc(var(--sw) * .16); }
  /* 자리 폭(--sw): 화면 폭을 자리 수로 나눈 값, 화면 높이(9dvh)를 넘지 않게. 작은 폰은 줄고 큰 폰은 커진다 */
  .pk-slots { --sw: clamp(44px, min(calc((100vw - 56px - (var(--n, 1) - 1) * 10px) / var(--n, 1) * .8), 9.5dvh), 76px); }
  .pk-slots.many { --sw: min(calc(58px * var(--picker-scale)), calc((100vw - 36px - (var(--cols, 5) - 1) * 8px) / var(--cols, 5))); grid-template-columns: repeat(var(--cols, 5), var(--sw)); gap: calc(6px * var(--picker-scale)) calc(8px * var(--picker-scale)); }
  .pk-slot { width: var(--sw); gap: calc(var(--sw) * .09); font-size: calc(10px * var(--picker-scale)); }
  .pk-slots.many .pk-slot { width: var(--sw); font-size: calc(9px * var(--picker-scale)); }
  .pk-slot i { width: var(--sw); border-radius: calc(var(--sw) * .16); }
  .pk-slot i .face { border-radius: calc(var(--sw) * .16); }
  /* 자리 이름(현재·장애물 등)이 작고 흐려서 잘 안 보이던 것을 크고 밝게 */
  .pk-slot > span { position: relative; padding: 0 2px 7px; font-size: max(11.5px, calc(11px * var(--picker-scale))); line-height: 1.25; white-space: nowrap; color: rgba(240,238,255,.94); font-weight: 600; letter-spacing: .05em; text-shadow: 0 1px 8px rgba(6,6,22,.85), 0 0 2px rgba(6,6,22,.6); }
  .pk-slots.many .pk-slot { width: var(--sw); font-size: inherit; }
  .pk-slots.many .pk-slot > span { font-size: max(10.5px, calc(11px * var(--picker-scale))); }
  .pk-vglow { left: calc(-70px * var(--pk-scale)); top: calc(-70px * var(--pk-scale)); width: calc(140px * var(--pk-scale)); height: calc(140px * var(--pk-scale)); }

  /* 접힌 폴더블과 휴대폰: 한 손 조작을 우선합니다. */
  @media (max-width: 599px) {
    .top { height: 46px; }
    .menu-btn{ width: 40px; height: 40px; }
    .ls-btn { height: 40px; }
    .reading-select { min-height: 68px; }
    .cta { min-height: 52px; }
  }

  /* 모바일은 기존 배치를 보존하고, 카드 선택 중 브라우저만 스크롤되지 않게 합니다. */
  @media (max-width: 999px) {
    html.picking, html.picking body { height: 100%; overflow: hidden; }
  }

  /* 태블릿·펼친 폴더블: 패널 폭과 타이포그래피를 함께 확장합니다. */
  @media (min-width: 600px) {
    :root { --control-h: 48px; --panel-pad: 28px; --reading-width: 720px; }
    .top { height: 52px; }
    .menu-btn{ width: 42px; height: 42px; }
    .ls-btn { height: 42px; }
    .brand { font-size: 14px; }
    .hint { font-size: 15.5px; margin-bottom: 18px; }
    .reading-select { min-height: 72px; padding: 12px 16px; border-radius: 20px; }
    .reading-select-icon, .mode .ring { width: 46px; height: 46px; border-radius: 15px; }
    .reading-select-icon svg, .mode .ring svg { width: 23px; height: 23px; }
    .reading-select-copy b, .mode-copy b { font-size: 15px; }
    .reading-select-copy small, .mode-copy small { font-size: 12px; }
    .cta { min-height: 54px; font-size: 16px; }
    .reading-box { width: min(100%, 760px); max-width: 760px; max-height: min(82dvh, 760px); padding-left: var(--panel-pad); padding-right: var(--panel-pad); }
    .reading-head h2 { font-size: 22px; }
    .reading-head p { font-size: 14px; }
    .reading-close { width: 40px; height: 40px; }
    .reading-tab { min-height: 38px; padding: 0 16px; font-size: 13px; }
    .reading-list { gap: 10px; max-height: calc(min(82dvh, 760px) - 196px); }
    .mode { min-height: 86px; padding: 12px; border-radius: 18px; }
    .mode-badge { padding: 4px 9px; font-size: 11px; }

    /* 이 선언은 기본 규칙 뒤에 두어 기존 400~440px 제한을 실제로 해제합니다. */
    .intro-box { width: min(100%, 680px); max-width: 680px; padding-left: var(--panel-pad); padding-right: var(--panel-pad); }
    .share-box { width: min(100%, 620px); max-width: 620px; padding-left: var(--panel-pad); padding-right: var(--panel-pad); }
    .menu-box { width: min(100%, 680px); max-width: 680px; padding: 14px 20px 20px; }
    .mbox { width: min(100%, 760px); max-width: min(760px, calc(100vw - 64px)); border-radius: 30px; }
    .mhead { padding: 20px var(--panel-pad) 8px; }
    .mhead h2 { font-size: 18px; }
    .page, .card-modal-body { padding-left: var(--panel-pad); padding-right: var(--panel-pad); }
    .page > .pinterp, .page > .syn, .card-modal-body > .pdesc { max-width: 68ch; margin-left: auto; margin-right: auto; }
    .menu-preview-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .menu-preview { min-height: 112px; padding: 14px 12px 12px; }
    .menu-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
    .menu-tool { min-height: 76px; font-size: 11px; }
    .menu-links { gap: 8px; }
  }

  /* 넓은 PC: 카드 무대는 화면을 쓰되, 읽을 글은 지나치게 늘어나지 않습니다. */
  @media (min-width: 1000px) {
    :root { --panel-pad: 34px; --reading-width: 680px; }
    .app { padding-left: clamp(28px, 3.5vw, 72px); padding-right: clamp(28px, 3.5vw, 72px); }
    .top { max-width: 1440px; width: 100%; margin: 0 auto; }
    /* 테이블 높이는 창 높이에서 상단/문구/입력창/버튼이 쓰는 자리를 뺀 만큼만 쓴다. 창이 낮아져도 아래 입력창과 겹치지 않는다. */
    /* 테이블은 화면(vw)이 아니라 자기가 놓인 왼쪽 칸(cqw)의 폭에 맞춘다. 선택 중 확대(1.14배)되어도 옆 리딩 메뉴를 침범하지 않는다. */
    .hero { --hero-h: clamp(230px, calc(100dvh - 275px), 640px); --stage-y: 62%; height: var(--hero-h); container-type: inline-size; }
    /* 테이블 중심을 조금 위로 올려, 확대되어도 아래 안내 문구를 가리지 않고 위쪽 카드 자리와도 간격이 생기게 한다. */
    .altar { top: var(--stage-y); width: min(500px, 60cqw, calc(var(--hero-h) * .72)); height: min(500px, 60cqw, calc(var(--hero-h) * .72)); }
    .pk-plane { top: var(--stage-y); }
    /* 뽑은 카드가 놓일 자리는 PC에서 지나치게 커지지 않게 고정 배율을 쓴다. */
    .pk-top { --picker-scale: 1.15; top: 14px; }
    .pk-top:has(.pk-slots.many) { --picker-scale: 1; top: 26px; }
    /* 카드 놓는 자리를 PC에서 크게: 1~3장은 넉넉한 크기, 10장은 한 줄로 늘어놓아 각 자리를 키운다. */
    /* 자리(카드+이름표)가 테이블 꼭짓점 위 빈 공간(대략 hero 높이의 33%)에 들어가도록 크기를 맞춘다 */
    .pk-slots { --sw: min(84px, max(48px, calc((var(--hero-h) * .327 - 66px) / 1.6))); gap: 22px; }
    .pk-slots.many { --sw: min(88px, calc((100cqw - 150px) / var(--n, 10))); display: flex; flex-wrap: nowrap; gap: 10px; }
    .pk-slot, .pk-slots.many .pk-slot { width: var(--sw); gap: 10px; }
    .pk-slot i { width: var(--sw); border-radius: 11px; }
    .pk-slot i .face { border-radius: 11px; }
    .pk-slot > span, .pk-slots.many .pk-slot > span { font-size: 13.5px; }
    .pk-slots.many .pk-slot > span { font-size: 12.5px; }
    .hint, .modes, #drawBtn, .lang-row, .hello, #questionRow { width: min(100%, var(--reading-width)); }
    #questionRow { justify-self: center; }
    .reading-box { width: min(100%, 920px); max-width: 920px; }
    .intro-box { width: min(100%, 760px); max-width: 760px; }
    .share-box { width: min(100%, 680px); max-width: 680px; }
    .menu-box { width: min(100%, 800px); max-width: 800px; }
    .mbox { width: min(100%, 860px); max-width: min(860px, calc(100vw - 96px)); }
    #resultModal .page { padding-bottom: 34px !important; }
    #resultModal .pinterp p, #resultModal .syn p { font-size: 15.5px; }
    .menu-preview-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

    /* 선택 중 제단이 안내 문구 영역을 침범하지 않도록 확대 폭을 절제합니다. */
    .app.picking .altar { transform: translate(-50%, -50%) scale(1.14) rotateX(58deg) rotateZ(45deg); }
    .app.picking .hero { padding-bottom: 42px; }
  }

  /* Desktop reading workspace: keep the stage open while making navigation and choices easy to scan. */
  @media (min-width: 1000px) {
    .app {
      grid-template-columns: minmax(0, 1fr) clamp(390px, 25vw, 460px);
      column-gap: clamp(36px, 4vw, 72px);
      padding-top: clamp(18px, 2.4vh, 30px);
      padding-bottom: clamp(20px, 3vh, 34px);
    }
    .top {
      width: 100%; max-width: none; min-height: 58px; height: auto; margin: 0; padding: 0 2px 14px;
      display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 16px;
      border-bottom: 1px solid rgba(212,220,255,.1);
    }
    .menu-btn {
      display: inline-flex; grid-column: 4; grid-row: 1; align-items: center; justify-content: center; gap: 8px;
      width: auto; min-width: 104px; height: 42px; padding: 0 14px;
      border-color: rgba(212,220,255,.15); border-radius: 13px; background: rgba(255,255,255,.055);
      box-shadow: 0 8px 22px rgba(0,0,0,.16);
    }
    .menu-btn svg { width: 16px; height: 16px; }
    .lang-switch { grid-column: 3; grid-row: 1; }
    .ls-btn { height: 42px; padding: 0 14px; border-radius: 13px; border-color: rgba(212,220,255,.15); background: rgba(255,255,255,.055); box-shadow: 0 8px 22px rgba(0,0,0,.16); }
    .menu-btn::after { content: '더보기'; color: rgba(238,240,255,.9); font-size: 12px; font-weight: 650; white-space: nowrap; }
    .menu-btn[aria-expanded="true"] { border-color: rgba(241,210,138,.46); background: rgba(241,210,138,.1); }
    .brand { position: static; transform: none; font-size: 15px; letter-spacing: .24em; }
    .brand { grid-column: 1; grid-row: 1; }
    .desktop-nav { grid-column: 2; grid-row: 1; display: flex; justify-self: end; align-items: center; gap: 10px; min-width: 0; }
    /* 성격이 같은 항목끼리 한 묶음(둘러보기 / 내 공간 / 설정)으로 보여 준다. */
    .nav-group {
      display: flex; align-items: center; overflow: hidden; border: 1px solid rgba(212,220,255,.13); border-radius: 13px;
      background: rgba(255,255,255,.035);
    }
    .desktop-nav button, .desktop-nav a {
      min-height: 38px; display: inline-flex; align-items: center; justify-content: center; padding: 0 15px;
      border: 0; border-radius: 0; color: rgba(235,238,255,.78);
      background: transparent; cursor: pointer; font: inherit; font-size: 12px; font-weight: 600;
      line-height: 1; text-decoration: none; transition: border-color .18s, background .18s, color .18s, transform .15s;
    }
    .nav-group > * + * { border-left: 1px solid rgba(212,220,255,.1); }
    /* 전체 메뉴: 상자 안에 상자를 겹치지 않고, 한 장의 패널 안에 제목과 구분선, 목록 행으로만 구성한다. */
    .menu-sheet {
      position: fixed; inset: 0; z-index: 65;
      display: flex; align-items: center; justify-content: center; padding: 28px;
      background: rgba(8,9,25,.5); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); pointer-events: auto;
    }
      .menu-box {
      width: min(400px, calc(100vw - 96px)); max-height: min(640px, calc(100dvh - 80px)); padding: 22px 22px 16px;
      display: block; border-radius: 22px; pointer-events: auto;
      background: radial-gradient(95% 50% at 50% 0%, rgba(91,105,194,.18), transparent 68%), rgba(20,22,49,.97);
      box-shadow: 0 30px 90px rgba(0,0,0,.48), inset 0 1px 0 rgba(255,255,255,.07);
    }
    .menu-box .grab { display: none; }
    .menu-head { padding: 0 0 12px; }
    .menu-box .menu-head h2::after { content: ' · 서비스와 설정'; color: rgba(214,218,250,.5); font-size: 12px; font-weight: 500; }
    .menu-section { margin: 0; padding: 12px 0 8px; border: 0; border-top: 1px solid rgba(221,229,255,.08); border-radius: 0; background: none; }
    .menu-section-title { margin: 0 0 6px; padding: 0 8px; }
    .menu-tools, .menu-preview-grid { display: grid; grid-template-columns: 1fr; gap: 2px; }
    /* 상단 메뉴(둘러보기/내 공간/효과음)에 이미 있는 묶음은 PC 전체 메뉴에서 뺀다. */
    .menu-box .menu-section.pc-dup, .menu-box .menu-tool.pc-dup { display: none; }
    .menu-box .menu-tool, .menu-box .menu-preview {
      min-height: 46px; padding: 6px 8px; border: 0; border-radius: 12px; background: none;
      display: flex; align-items: center; gap: 12px; text-align: left; font-size: 13.5px;
    }
    .menu-box .menu-tool span, .menu-box .menu-preview b { font-size: 13.5px; font-weight: 600; }
    .menu-box .menu-icon, .menu-box .menu-preview-icon { width: 32px; height: 32px; margin: 0; flex: none; }
    .menu-box .menu-preview-copy { min-width: 0; display: grid; gap: 2px; }
    .menu-box .menu-preview small { margin: 0; font-size: 11.5px; }
    .menu-links { display: flex; justify-content: center; gap: 4px; margin: 6px 0 0; padding-top: 12px; border-top: 1px solid rgba(221,229,255,.08); }
    .menu-links a { padding: 6px 10px; border-radius: 8px; background: none; font-size: 11.5px; }
    .menu-links a + a::before { content: none; }
    .desktop-nav .desktop-sound { color: #f1d28a; }
    .desktop-nav button:hover, .desktop-nav a:hover { border-color: rgba(241,210,138,.42); background: rgba(241,210,138,.09); color: #fff; }
    .desktop-nav button:active { transform: scale(.97); }
    .desktop-nav button:disabled { cursor: default; color: rgba(226,230,255,.42); border-color: rgba(255,255,255,.07); background: rgba(255,255,255,.02); }
    #modes { width: auto; margin: 0; align-self: stretch; }
    /* The reading desk remains as an orientation point while cards and results take focus. */
    .app.picking .top, .app.reading-focus .top,
    .app.picking .modes, .app.reading-focus .modes { opacity: 1; visibility: visible; }
    .app.picking .top, .app.picking .modes { filter: saturate(.72); pointer-events: none; }
    .app.reading-focus .top, .app.reading-focus .modes { pointer-events: none; }
    .app.ten-picking .hero { height: min(72dvh, 680px); max-height: 680px; }
    .app.ten-picking .altar { transform: translate(-50%, -50%) scale(.98) rotateX(58deg) rotateZ(45deg); }
    /* Give a 10-card result two generous rows instead of a cramped single line. */
    .app.ten-spread .hero { --sp-h: min(74dvh, 700px, calc(var(--hero-h) + 60px)); height: var(--sp-h); max-height: 700px; }
    .spread.ten {
      width: min(100%, 980px);
      grid-template-columns: repeat(var(--colsw, 5), minmax(0, 1fr));
      gap: 18px clamp(14px, 1.6vw, 22px);
      transform: translateY(12px);
    }
    .spread.ten .card { width: min(100%, 170px, calc((var(--sp-h, 700px) - 12px - var(--rows, 2) * 44px - (var(--rows, 2) - 1) * 18px) / (var(--rows, 2) * 1.6))); max-width: 170px; margin-left: auto; margin-right: auto; }
    .spread.ten .pos { display: table; width: auto; margin: 10px auto 0; transform: none; font-size: 13.5px; white-space: nowrap; }
    .reading-sheet, .reading-sheet[hidden] { width: 100%; }
    .reading-box {
      padding: 22px;
      border: 1px solid rgba(192,204,255,.16);
      border-radius: 26px;
      background:
        radial-gradient(115% 48% at 52% 0%, rgba(112,126,222,.2), transparent 66%),
        linear-gradient(180deg, rgba(37,39,77,.92), rgba(20,21,48,.92));
      box-shadow: 0 20px 52px rgba(0,0,0,.2), inset 0 1px 0 rgba(255,255,255,.055);
    }
    .reading-head { margin-bottom: 16px; padding: 1px 2px 0; }
    .reading-eyebrow { font-size: 10.5px; letter-spacing: .14em; }
    .reading-head h2 { margin-top: 5px; font-size: 23px; letter-spacing: -.025em; }
    .reading-head p { margin-top: 4px; font-size: 13px; line-height: 1.45; }
    .reading-tabs {
      display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px;
      overflow: visible; margin: 0 0 16px; padding: 0;
    }
    .reading-tab {
      min-width: 0; min-height: 38px; padding: 0 7px;
      border-radius: 12px; font-size: 11.5px; white-space: nowrap;
    }
    .reading-list {
      gap: 9px; padding: 2px 6px 4px 1px;
      scrollbar-width: thin;
      scrollbar-color: rgba(175,190,255,.42) rgba(255,255,255,.04);
    }
    .reading-list::-webkit-scrollbar { width: 5px; }
    .reading-list::-webkit-scrollbar-track { background: rgba(255,255,255,.035); border-radius: 999px; }
    .reading-list::-webkit-scrollbar-thumb { background: rgba(175,190,255,.35); border-radius: 999px; }
    .mode { min-height: 76px; padding: 11px 12px; border-radius: 17px; }
    /* 선택되지 않은 리딩 항목은 테두리와 배경 없이 목록처럼, 선택된 항목과 마우스를 올린 항목만 강조한다. */
    .mode:not(.active) { border-color: transparent; background: none; }
    .mode:not(.active):not(.locked):hover { background: rgba(255,255,255,.06); }
    .mode-badge { border-color: transparent; }
    .mode .ring { width: 44px; height: 44px; border-radius: 14px; }
    .mode-copy { gap: 4px; }
    .mode-copy b { font-size: 14px; }
    .mode-copy small { font-size: 11.5px; }
    .mode-badge { padding: 4px 8px; font-size: 10px; }
  }

  /* 낮은 높이의 가로 화면에서도 제단과 컨트롤이 겹치지 않도록 유지합니다. */
  @media (min-width: 600px) and (max-width: 999px) and (max-height: 680px) {
    .hero { height: 460px; }
    .crystal { --crystal-scale: 1.2; }
    .reading-box { max-height: 88dvh; }
  }
  /* PC 카드 선명도: will-change:transform 이 붙은 레이어는 처음 그려진 배율(카드가 .92배로 떠오르는 순간)로 고정되어
     이후 확대되면 흐릿해 보인다. PC에서는 이 힌트를 빼서 최종 크기로 다시 그리게 하고, 결과창의 카드 그림도 키운다. */
  @media (min-width: 1000px) {
    .inner { will-change: auto; }
    /* 한국어 외 언어는 탭 이름이 길어 4칸에 다 들어가지 않으므로 2줄(2칸)로 나눠 보여 준다. */
    html:not([lang="ko"]) .reading-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    html:not([lang="ko"]) .reading-tab { white-space: normal; line-height: 1.2; }
    .art { shape-rendering: geometricPrecision; text-rendering: geometricPrecision; }
    .mini { width: 104px; border-radius: 12px; }
    .mini-wrap { font-size: 13px; gap: 8px; }
    .pcard { width: clamp(130px, 24dvh, 200px) !important; }
  }
  /* PC 첫 화면: 수정구를 위로 올린다. (구슬 안의 굴절 테이블은 PC·모바일 공통으로 .lens 가 그린다.) */
  @media (min-width: 1000px) and (hover: hover) {
    .crystal { translate: 0 -56px; }
  }
  /* PC 결과창: 좁은 세로 한 줄 대신 왼쪽(카드) / 오른쪽(해석) 2단으로 나눠 빈 공간 없이 채운다. 왼쪽 카드는 스크롤해도 그대로 보인다. */
  @media (min-width: 1000px) {
    #resultModal .mbox { width: min(1080px, calc(100vw - 96px)); max-width: none; height: min(780px, calc(100dvh - 56px)); max-height: none; }
    #resultModal .page:has(> .card-strip):has(> .interp-block) {
      display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); column-gap: 40px; align-items: start; padding: 12px 36px 28px;
    }
    #resultModal .page:has(> .card-strip):has(> .interp-block) > .card-strip {
      position: sticky; top: 0; grid-column: 1; grid-row: 1 / span 6; margin: 0; padding: 4px 0 0; border-bottom: 0;
    }
    #resultModal .page:has(> .card-strip):has(> .interp-block) > :not(.card-strip) { grid-column: 2; min-width: 0; }
    #resultModal .page:has(> .card-strip):has(> .interp-block) > .interp-block { margin: 0; }
    #resultModal .strip-list { display: grid; gap: 10px; margin: 14px 0 0; padding: 0; list-style: none; }
    #resultModal .strip-list li { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: baseline; padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.04); font-size: 13px; line-height: 1.45; }
    #resultModal .strip-list em { color: #f1d28a; font-size: 11px; font-style: normal; font-weight: 700; letter-spacing: .04em; white-space: nowrap; }
    #resultModal .strip-list b { color: #fff; font-weight: 650; }
    #resultModal .strip-list span { grid-column: 2; color: rgba(214,218,250,.62); font-size: 12px; }
    #resultModal .strip-list:has(li:nth-child(4)) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-top: 12px; }
    #resultModal .strip-list:has(li:nth-child(4)) li { grid-template-columns: 1fr; row-gap: 1px; padding: 6px 9px; font-size: 12px; }
    #resultModal .strip-list:has(li:nth-child(4)) em { font-size: 10px; }
    #resultModal .strip-list:has(li:nth-child(4)) span { display: none; }
    #resultModal .page .card-strip .summary-row { justify-content: flex-start; margin: 0 0 10px; }
    #resultModal .page .card-strip .summary-row:has(.mini-wrap:only-child) { justify-content: center; }
    #resultModal .page .card-strip .summary-row:has(.mini-wrap:only-child) .mini { width: min(250px, 100%); border-radius: 16px; }
    #resultModal .page .card-strip .summary-row:has(.mini-wrap:nth-child(4)) { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px 8px; }
    #resultModal .page .card-strip .summary-row:has(.mini-wrap:nth-child(4)) .mini { width: 100%; border-radius: 8px; }
    #resultModal .page .card-strip .summary-row:has(.mini-wrap:nth-child(4)) .mini-wrap { font-size: 11px; text-align: center; }
    #resultModal .page .card-strip .tap-hint { text-align: left; margin-top: 10px; }
    #resultModal .page .card-strip .summary-row:has(.mini-wrap:only-child) + .tap-hint { text-align: center; }
    #resultModal .page .card-strip:has(.strip-info) .tap-hint { text-align: center; }
    #resultModal .mbtns.single .mbtn { width: 240px; max-width: 100%; margin: 0 auto; }
  }
  /* 낮은 PC 창(브라우저 확대 포함)에서는 수정구도 함께 줄여 테이블 위에 자연스럽게 얹히게 한다. */
  @media (min-width: 1000px) and (max-height: 760px) { .crystal { --crystal-scale: 1.25; } }
  @media (min-width: 1000px) and (max-height: 620px) { .crystal { --crystal-scale: 1; } }
/* yes-no */
  .ynbig { text-align: center; margin: 2px 0 10px; }
  .ynbig.yes { color: #2f7d62; } .ynbig.no { color: #b4546a; }
  .yn-word { display: block; font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
  .yn-reason { display: block; font-size: 13px; font-weight: 500; color: var(--sheet-ink-2); margin-top: 12px; line-height: 1.5; }
  .history-result .ynbig { margin: 0 0 12px; padding: 0 0 12px; border-bottom: 1px solid rgba(255,255,255,.08); }
  .history-result .yn-word { display: block; font-size: 22px; font-weight: 800; }
  .history-result .ynbig.yes .yn-word { color: #7fe3bd; }
  .history-result .ynbig.no .yn-word { color: #ff9fb4; }
  #resultModal .ynbig.yes { color: #7fe3bd; text-shadow: 0 0 22px rgba(127,227,189,.35); }
  #resultModal .ynbig.no { color: #ff9fb4; text-shadow: 0 0 22px rgba(255,159,180,.35); }

/* money */
  .mnbig { display: grid; justify-items: center; gap: 6px; margin: 2px 0 14px; text-align: center; }
  .mnbig small { color: #f1d28a; font-size: 12px; font-weight: 700; letter-spacing: .06em; }
  .mnbig .coins { display: flex; gap: 8px; }
  .mnbig .coins i { width: 20px; height: 20px; border-radius: 50%; border: 1px solid rgba(241,210,138,.35); background: rgba(255,255,255,.08); }
  .mnbig .coins i.on { border-color: #f6dc9a; background: radial-gradient(circle at 35% 30%, #fff4d0, #e6c273 55%, #a87a30); box-shadow: 0 0 12px rgba(241,210,138,.45); }
  .mnbig .mn-word { font-size: 24px; font-weight: 800; color: #f8ecc8; text-shadow: 0 0 22px rgba(241,210,138,.4); }
  .mnbig .mn-sub { color: rgba(214,218,250,.66); font-size: 12px; }
  .mn-note { margin: 14px 0 0 !important; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.08); color: rgba(214,218,250,.55); font-size: 11.5px !important; line-height: 1.6; }
  .history-result .mnbig { padding: 0 0 12px; margin: 0 0 12px; border-bottom: 1px solid rgba(255,255,255,.08); }
