/* 확률 보기 시트(게임 안)와 확률 공개 페이지(probability.html) 공용 스타일 — docs/GACHA.md 5절 */
/* 글꼴: Pretendard(OFL) — 게임 본문과 같은 글꼴. probability.html 은 app.css 없이 이 파일만 써서 여기서도 선언한다(같은 파일이라 이중 다운로드 없음) */
@font-face{font-family:Pretendard;font-style:normal;font-weight:100 700;font-display:swap;src:url(../fonts/Pretendard-Bold.woff2) format('woff2')}
@font-face{font-family:Pretendard;font-style:normal;font-weight:800 900;font-display:swap;src:url(../fonts/Pretendard-ExtraBold.woff2) format('woff2')}
:root{--o-ink:#3D2C4E;--o-sub:#5E4E70;--o-pink:#E8508D;--o-line:#E9DCF3;--o-bg:#FFF8FC;
  --g-common:#DDF5E8;--g-common-t:#1F6B45;--g-uncommon:#DCE9FF;--g-uncommon-t:#2B4F99;--g-rare:#EBE0FF;--g-rare-t:#5A39A8;--g-legend:#FFE6A8;--g-legend-t:#7A4A00}

/* 공통 본문 */
.odds-h{font-family:Pretendard,"Apple SD Gothic Neo","Malgun Gothic",sans-serif;font-weight:800;color:var(--o-ink);margin:22px 0 8px;line-height:1.35}
.odds-sheet,.op-wrap{font-family:Pretendard,"Apple SD Gothic Neo","Malgun Gothic",sans-serif;color:var(--o-ink);line-height:1.6;font-size:14px;word-break:keep-all;overflow-wrap:anywhere;-webkit-user-select:text;user-select:text}
.odds-sheet *,.op-wrap *{-webkit-user-select:text;user-select:text}
.odds-num,.odds-pct,.odds-n{font-variant-numeric:tabular-nums;font-family:Pretendard,"Apple SD Gothic Neo","Malgun Gothic",sans-serif;font-weight:700}
.odds-pct{text-align:right;white-space:nowrap;font-weight:700}
.odds-n{white-space:nowrap}
.odds-table{border-collapse:collapse;width:100%;margin:8px 0 12px;font-size:14px;background:#fff}
.odds-table caption{text-align:left;font-weight:700;padding:4px 2px;color:var(--o-ink);font-size:14px}
.odds-table th,.odds-table td{border:1px solid var(--o-line);padding:7px 8px;text-align:left;vertical-align:middle}
.odds-table thead th{background:#F8F0FF;font-weight:700;font-size:13px}
.odds-table tbody th{font-weight:400}
.odds-table tfoot th,.odds-table tfoot td{background:#FFF0F7;font-weight:700}
.odds-table td.odds-pct{text-align:right}
.odds-set{color:var(--o-sub);font-size:13px;white-space:nowrap}
.odds-nm{font-weight:700}
.odds-ico{display:inline-block;vertical-align:middle;margin-right:6px;width:30px;height:30px;line-height:0}
.odds-ico svg{width:30px;height:30px;vertical-align:middle}
.odds-grade{display:inline-block;padding:1px 8px;border-radius:999px;font-size:12.5px;font-weight:700;white-space:nowrap}
.odds-g-common{background:var(--g-common);color:var(--g-common-t)}
.odds-g-uncommon{background:var(--g-uncommon);color:var(--g-uncommon-t)}
.odds-g-rare{background:var(--g-rare);color:var(--g-rare-t)}
.odds-g-legend{background:var(--g-legend);color:var(--g-legend-t);box-shadow:inset 0 0 0 1.5px #E0A92E}
.odds-facts{margin:6px 0 10px;border:1px solid var(--o-line);border-radius:12px;background:#fff;overflow:hidden}
.odds-facts>div{display:flex;gap:10px;padding:7px 12px;border-top:1px solid var(--o-line)}
.odds-facts>div:first-child{border-top:0}
.odds-facts dt{flex:none;width:6.2em;font-weight:700;color:var(--o-sub)}
.odds-facts dd{margin:0;flex:1;min-width:0}
.odds-list{margin:6px 0 10px;padding-left:20px}
.odds-list li{margin:4px 0}
.odds-total{margin:2px 0 8px;text-align:right;font-weight:700}
.odds-mypity{background:#FFF1F7;border:2px solid #F7B5D2;border-radius:14px;padding:8px 14px;margin:10px 0}
.odds-mypity p{margin:2px 0 0;font-size:15px}
.odds-mypity .odds-num{font-size:18px;color:var(--o-pink)}
.odds-blk{margin:0}
.odds-fold{border:1px solid var(--o-line);border-radius:12px;margin:8px 0;background:#fff;overflow:hidden}
.odds-fold>summary{cursor:pointer;padding:9px 12px;background:#FAF4FF;font-weight:700;list-style:none}
.odds-fold>summary::-webkit-details-marker{display:none}
.odds-fold>summary::before{content:"▾ ";color:var(--o-sub)}
.odds-fold:not([open])>summary::before{content:"▸ "}
.odds-fold .odds-table{margin:0;border-left:0;border-right:0;border-bottom:0}
.odds-fold .odds-table caption{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}

/* 게임 안 시트 */
.odds-overlay{position:fixed;inset:0;z-index:60;display:flex;align-items:flex-end;justify-content:center;background:rgba(61,44,78,.55)}
.odds-sheet{width:100%;max-width:520px;max-height:92vh;max-height:92dvh;display:flex;flex-direction:column;background:var(--o-bg);border-radius:26px 26px 0 0;box-shadow:0 -10px 40px rgba(61,44,78,.3);animation:oddsUp .22s ease-out;overflow:hidden}
@keyframes oddsUp{from{transform:translateY(36px);opacity:0}to{transform:none;opacity:1}}
@media (prefers-reduced-motion:reduce){.odds-sheet{animation:none}}
.odds-head{flex:none;display:flex;align-items:center;gap:10px;padding:12px 14px;background:#fff;border-bottom:2px solid #F3C6DC}
.odds-machine{flex:none;display:block;width:44px;height:58px;line-height:0}
.odds-machine svg{width:44px;height:auto;max-height:58px}
.odds-gifticon{flex:none;font-size:32px;width:44px;text-align:center}
.odds-title{flex:1;min-width:0}
.odds-title h3{margin:0;font-family:Pretendard,"Apple SD Gothic Neo","Malgun Gothic",sans-serif;font-weight:800;font-size:21px;line-height:1.25}
.odds-title small{display:block;color:var(--o-sub);font-size:13px;margin-top:1px}
.odds-x{flex:none;font-family:inherit;font-size:14px;font-weight:700;border:0;border-radius:999px;padding:9px 16px;min-height:40px;background:#FF6FA5;color:#fff;cursor:pointer}
.odds-body{overflow-y:auto;-webkit-overflow-scrolling:touch;padding:6px 14px calc(22px + env(safe-area-inset-bottom))}
.odds-body .odds-table th,.odds-body .odds-table td{padding:6px 6px;font-size:13.5px}
.odds-link{text-align:center;margin:12px 0}
.odds-link a{display:inline-block;padding:10px 18px;border-radius:999px;background:#5BB6FF;color:#0B2A4A;font-weight:700;text-decoration:none}
.odds-op{text-align:center;color:var(--o-sub);font-size:13px;margin:4px 0 0}

/* 웹 페이지 */
body.op{margin:0;background:linear-gradient(180deg,#FFE9F4,#F1EBFF 40%,#EAF6FF);min-height:100vh}
.op-wrap{max-width:760px;margin:0 auto;padding:22px 14px 56px;font-size:16px}
.op-wrap h1{font-family:Pretendard,"Apple SD Gothic Neo","Malgun Gothic",sans-serif;font-weight:800;font-size:30px;margin:6px 0 4px;line-height:1.25}
.op-meta{color:var(--o-sub);font-size:14px;margin:0 0 12px}
.op-wrap a{color:#1F63C4}
.op-card{background:#fff;border:1px solid var(--o-line);border-radius:18px;padding:6px 16px 14px;margin:16px 0;box-shadow:0 4px 0 rgba(200,170,220,.35)}
.op-card>h2{font-family:Pretendard,"Apple SD Gothic Neo","Malgun Gothic",sans-serif;font-weight:800;font-size:23px;margin:12px 0 4px;padding-bottom:4px;border-bottom:3px solid #F3C6DC;scroll-margin-top:12px}
.op-card .odds-h{font-size:18px}
.op-card .odds-table{font-size:15px}
.op-card .odds-table caption{font-size:15px}
.op-card .odds-table th,.op-card .odds-table td{padding:8px 9px}
.op-notice{background:#FFF6D9;border-left:5px solid #E0A92E;border-radius:8px;padding:10px 14px;margin:12px 0;font-size:15px}
.op-toc{background:#fff;border:1px solid var(--o-line);border-radius:14px;padding:10px 16px;font-size:15px}
.op-toc ol{margin:6px 0 0;padding-left:0;list-style:none;display:flex;flex-wrap:wrap;gap:6px 14px}
.op-toc a{display:inline-block;padding:6px 4px;min-height:32px}
.op-foot{color:var(--o-sub);font-size:13px;margin-top:26px;border-top:1px solid var(--o-line);padding-top:10px}
.op-foot code{font-size:12px;word-break:break-all}
.op-top{display:block;text-align:right;font-size:13px}
@media (max-width:420px){
  .op-wrap{font-size:15.5px;padding:16px 10px 48px}
  .op-card{padding:4px 10px 12px;border-radius:14px}
  .op-card .odds-table,.op-card .odds-table caption{font-size:14px}
  .op-card .odds-table th,.op-card .odds-table td{padding:6px 5px}
  .odds-facts>div{flex-direction:column;gap:0}
  .odds-facts dt{width:auto}
}
@media (prefers-color-scheme:dark){
  /* 표는 글자가 선명해야 하므로 어두운 테마에서도 밝은 바탕을 유지한다 */
  body.op{background:#2A2038}
  .op-wrap{color:#2A2038}
  .op-wrap h1,.op-meta,.op-foot{color:#F3EAFB}
  .op-wrap a{color:#1F63C4}
  .op-foot a,.op-meta a{color:#9CC8FF}
}

.odds-dup .odds-n,.odds-pity-items .odds-n{white-space:normal}
