/* 🎰 하루 한 번 무료 룰렛(spin.js) · 📢 전체 공지 띠(notice.js). 색·모양은 hub.css 의 변수를 그대로 씀 */

/* ---------- 📢 공지 띠 (첫 화면 어두운 띠 안, 로고 아래) ---------- */
.hub-notice { display: grid; gap: 8px; margin-top: 4px; }
.hn { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 8px 8px 12px; border-radius: 16px; color: var(--hero-ink);
  background: var(--gl-chip); border: 1px solid var(--gl-chip-line); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.hn-maint { background: rgba(251, 191, 36, .16); border-color: rgba(251, 191, 36, .5); }
.hn-event { background: rgba(244, 114, 182, .16); border-color: rgba(244, 114, 182, .5); }
.hn-tag { flex: none; padding: 3px 9px; border-radius: 99px; background: var(--gl-hover2); font-size: 12.5px; font-weight: 800; white-space: nowrap; }
.hn-text { flex: 1; min-width: 0; margin: 0; font-size: 14.5px; font-weight: 700; line-height: 1.45; }
.hn-link { flex: none; color: var(--hero-hi); font-size: 14px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.hn-link:hover { text-decoration: underline; }
.hn-x { flex: none; width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--gl-x); color: var(--hero-ink); font-size: 14px; cursor: pointer; }
.hn-x:hover { background: var(--gl-x-h); }
@media (max-width: 560px) {
  .hn { flex-wrap: wrap; gap: 6px 8px; }
  .hn-text { flex-basis: calc(100% - 50px); order: 3; font-size: 13.5px; }
  .hn-tag { order: 1; } .hn-link { order: 4; } .hn-x { order: 2; margin-left: auto; width: 32px; height: 32px; }
}

/* ---------- 🎰 룰렛 ---------- */
.spin { position: relative; z-index: 1; max-width: 1000px; margin: 0 auto; padding: 30px 16px 0; scroll-margin-top: 70px; }
.spin.loading { min-height: 340px; }
.sp-card { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 300px); grid-template-areas: "text wheel" "table wheel"; gap: 6px 28px; align-items: center;
  padding: 24px 26px; border-radius: 28px; background: radial-gradient(circle at 85% 20%, var(--vio-soft2) 0%, transparent 55%), var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.sp-text { grid-area: text; min-width: 0; }
.sp-wheel { grid-area: wheel; position: relative; width: 100%; max-width: 300px; justify-self: center; aspect-ratio: 1; }
.sp-table { grid-area: table; min-width: 0; }
.sp-text h2 { margin: 6px 0 0; display: flex; align-items: center; gap: 8px; font-size: clamp(22px, 3vw, 28px); font-weight: 800; letter-spacing: -.03em; }
.sp-lead { margin: 10px 0 0; color: var(--soft); font-size: 15.5px; line-height: 1.55; }
.sp-lead b { color: var(--ink); }
.sp-win { color: var(--ink); font-size: 17px; font-weight: 700; }
.sp-win:focus { outline: none; }
.sp-note { margin: 8px 0 0; padding: 9px 12px; border-radius: 14px; background: var(--bg-soft); color: var(--soft); font-size: 14px; line-height: 1.5; }
.sp-note.ok { background: var(--ok-bg); color: var(--ok-ink); }
.sp-note.warn { background: var(--warn-bg); color: var(--warn-ink); }
.sp-note a { color: var(--vio-ink); font-weight: 800; white-space: nowrap; }
.sp-next { margin: 10px 0 0; font-size: 14.5px; font-weight: 700; color: var(--vio-ink); }
.sp-next span { font-variant-numeric: tabular-nums; }
.sp-pick { display: grid; gap: 6px; margin-top: 14px; font-size: 13.5px; font-weight: 700; color: var(--soft); }
.sp-pick select { width: 100%; max-width: 360px; height: 46px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg-soft); color: var(--ink);
  font: 700 16px/1 inherit; font-family: inherit; }
.sp-pick select:focus { outline: 2px solid var(--focus); border-color: transparent; }
.sp-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.sp-go, .sp-ghost { min-height: 48px; padding: 0 24px; border-radius: 99px; border: 0; font: 800 16px/1 inherit; font-family: inherit; cursor: pointer; transition: transform .3s var(--ease), opacity .2s; }
.sp-go { color: #fff; background: var(--grad); box-shadow: 0 10px 24px rgba(124, 92, 255, .28); }
.sp-ghost { color: var(--vio-ink); background: var(--vio-soft2); }
.sp-go:disabled, .sp-ghost:disabled { opacity: .5; cursor: default; box-shadow: none; }
@media (hover: hover) { .sp-go:not(:disabled):hover { transform: translateY(-2px); } }
.sp-go:not(:disabled):active { transform: scale(.97); }

/* 돌림판: 칸 크기 = 진짜 확률. 위쪽 바늘이 가리키는 칸이 받는 골드 */
.sw-svg { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 12px 22px rgba(124, 92, 255, .22)); }
.sw-rot { transform-origin: 130px 130px; }
.sw-rot.go { transition: transform 4.4s cubic-bezier(.12, .78, .16, 1); }
.sw-t { font: 800 14px/1 Pretendard, system-ui, sans-serif; fill: #1e1b4b; }
.sw-t.sm { font-size: 10.5px; }
.sw-c { font-size: 20px; }
.sw-pin { position: absolute; left: 50%; top: -4px; width: 0; height: 0; transform: translateX(-50%); border-left: 13px solid transparent; border-right: 13px solid transparent; border-top: 24px solid var(--ink);
  filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .2)); }
.spin.won .sw-svg { animation: spWin 1.2s var(--ease); }
@keyframes spWin { 30% { transform: scale(1.05); } 100% { transform: none; } }

/* 확률표 */
.sp-odds { width: 100%; max-width: 360px; margin-top: 14px; border-collapse: collapse; font-size: 14px; }
.sp-odds caption { text-align: left; padding-bottom: 6px; font-size: 13px; font-weight: 800; color: var(--soft); }
.sp-odds th { padding: 6px 10px; text-align: left; font-size: 12.5px; color: var(--mute); border-bottom: 1px solid var(--line); }
.sp-odds td { padding: 6px 10px; border-bottom: 1px solid var(--line); font-weight: 700; font-variant-numeric: tabular-nums; }
.sp-odds td:last-child, .sp-odds th:last-child { text-align: right; }
.sp-odds i { display: inline-block; width: 11px; height: 11px; margin-right: 8px; border-radius: 3px; vertical-align: -1px; }
.sp-fine { margin: 8px 0 0; max-width: 360px; color: var(--mute); font-size: 12.5px; line-height: 1.5; }
.sp-free { margin: 4px 0 0; max-width: 360px; color: var(--soft); font-size: 14px; font-weight: 700; line-height: 1.5; }
.sp-more { margin-top: 4px; max-width: 360px; }
.sp-more summary { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; margin-left: -14px; border-radius: 99px; cursor: pointer; list-style: none; color: var(--soft); font-size: 14px; font-weight: 700; }
.sp-more summary::-webkit-details-marker { display: none; }
.sp-more summary:hover, .sp-more summary:focus-visible { background: var(--bg-soft); color: var(--ink); }
.sp-more summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.sp-more[open] summary { color: var(--ink); }
.sp-more .sp-odds { margin-top: 4px; }

@media (max-width: 760px) {
  .sp-card { grid-template-columns: 1fr; grid-template-areas: "text" "wheel" "table"; padding: 20px 16px; gap: 14px; border-radius: 22px; }
  .sp-wheel { max-width: 250px; }
  .sp-odds, .sp-fine, .sp-free, .sp-more, .sp-pick select { max-width: none; }
  .spin { padding-top: 22px; }
  .spin.loading { min-height: 540px; }
}
@media (prefers-reduced-motion: reduce) {
  .sw-rot.go { transition: none; }
}
