/* 설정 */
.pb-tier-row {
  --c: #ffb020;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px;
  padding: 8px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border);
  border-left: 5px solid var(--c);
}
.pb-tier-badge { font-weight: 900; font-size: 15px; white-space: nowrap; }
.pb-name-input { min-width: 0; }
.pb-tier-row .stepper button { width: 40px; height: 40px; }
.pb-tier-row .stepper output { min-width: 44px; font-size: 15px; }
@media (max-width: 420px) {
  .pb-tier-row { grid-template-columns: auto minmax(0, 1fr); }
  .pb-tier-row .stepper { grid-column: 1 / -1; justify-self: end; }
}
.pb-blank-info { margin: 4px 0 0; font-weight: 700; color: var(--text-2); font-size: 14px; }

/* 뽑기판 (옛날 문방구 종이판 느낌) */
.pb-board {
  --pb-p0: #ffd6e0; --pb-p1: #fff1a8; --pb-p2: #c9f2d9; --pb-p3: #cfe6ff; --pb-p4: #e6d9ff;
  position: relative; width: 100%; max-width: calc(var(--design-cols, 6) * 76px + 40px); margin: 0 auto;
  padding: 12px; border-radius: 18px; color: #3b2a1a;
  background:
    radial-gradient(rgba(255, 255, 255, .6) 1px, transparent 1.5px) 0 0 / 12px 12px,
    linear-gradient(#fff7e0, #ffeec2);
  box-shadow: 0 0 0 6px #ff5a8a, 0 0 0 9px #fff, 0 0 0 12px #2f80ed, 0 14px 30px rgba(0, 0, 0, .18);
  margin-top: 12px; margin-bottom: 12px;
}
.pb-head { text-align: center; margin-bottom: 10px; }
.pb-title {
  margin: 0 auto 8px; width: fit-content; padding: 4px 18px; border-radius: 999px; background: #ff5a8a; color: #fff;
  font-weight: 900; font-size: 18px; letter-spacing: .04em; box-shadow: 0 3px 0 #c93d69; transform: rotate(-1.5deg);
}
.pb-prizes { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.pb-prize {
  --c: #ffb020;
  display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 10px; max-width: 100%;
  background: #fff; border: 2px solid var(--c); font-size: 13px; font-weight: 700; color: #3b2a1a;
  box-shadow: 0 2px 0 rgba(0, 0, 0, .08);
}
.pb-prize b { color: #3b2a1a; }
.pb-prize-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 8.5em; }
.pb-left { font-family: var(--font-num); font-weight: 900; background: var(--c); color: #fff; border-radius: 6px; padding: 0 5px; }
.pb-prize.is-gone { opacity: .45; text-decoration: line-through; }

.pb-grid { display: grid; grid-template-columns: repeat(var(--cols, 5), minmax(0, 1fr)); gap: 5px; }
.pb-tab {
  --paper: #fff1a8; --c: #ffb020;
  position: relative; aspect-ratio: 1 / 1.08; min-height: 44px; padding: 0; border: 0; border-radius: 6px; cursor: pointer;
  background: transparent; perspective: 400px; -webkit-tap-highlight-color: transparent;
}
.pb-tab:focus-visible { outline: 3px solid #2f80ed; outline-offset: 2px; }
.pb-under {
  position: absolute; inset: 0; border-radius: 6px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: #f1e4c8; box-shadow: inset 0 2px 5px rgba(0, 0, 0, .18); color: #9a8567; line-height: 1.1;
}
.pb-u-medal { font-size: clamp(16px, 4.5vw, 22px); }
.pb-u-text { font-size: 11.5px; font-weight: 900; }
.pb-tab.is-prize .pb-under { background: radial-gradient(circle, #fffbe8, color-mix(in srgb, var(--c) 45%, #fff)); color: #3b2a1a; box-shadow: inset 0 0 0 2px var(--c); }
.pb-flap {
  position: absolute; inset: 0; border-radius: 6px; display: grid; place-items: center; transform-origin: 50% 0;
  background:
    linear-gradient(135deg, transparent 0 78%, rgba(0, 0, 0, .12) 78% 80%, rgba(255, 255, 255, .7) 80% 100%),
    var(--paper);
  box-shadow: 0 2px 0 rgba(0, 0, 0, .15), inset 0 0 0 1px rgba(0, 0, 0, .06);
  transition: transform .12s ease;
}
.pb-num {
  display: grid; place-items: center; min-width: 26px; height: 26px; padding: 0 4px; border-radius: 999px;
  background: #fff; color: #e5383b; font-family: var(--font-num); font-weight: 900; font-size: 13px; border: 2px dashed #e5383b;
}
.pb-tab:hover:not(:disabled) .pb-flap { transform: translateY(-2px) rotate(-1deg); }
.pb-tab:disabled { cursor: default; }
.pb-tab.is-open .pb-flap { animation: pb-tear .5s ease-in forwards; pointer-events: none; }
.pb-tab.is-open .pb-under { animation: bb-pop .35s .12s cubic-bezier(.2, 1.4, .4, 1) both; }
.pb-tab.is-open.is-prize { z-index: 1; }
.pb-tab.is-peek .pb-flap { opacity: .32; }
@keyframes pb-tear {
  0% { transform: none; opacity: 1; }
  35% { transform: rotateX(55deg) translateY(-3px); opacity: 1; }
  100% { transform: rotateX(80deg) translateY(-26px) rotate(-14deg); opacity: 0; }
}
.pb-foot { margin: 10px 0 0; text-align: center; font-size: 12px; font-weight: 700; color: #9a7b55; }

.pb-status { margin: 0; text-align: center; font-weight: 800; font-size: 17px; min-height: 1.5em; word-break: keep-all; }
.pb-actions .btn { flex: 1 1 auto; }
.pb-progress { font-weight: 800; color: var(--text-2); font-family: var(--font-num); }
.pb-log { margin: 8px 0 0; padding-left: 0; list-style: none; display: grid; gap: 4px; font-weight: 700; max-height: 240px; overflow: auto; }
.pb-log li.pb-log-blank, .pb-log li.pb-log-empty { color: var(--text-3); font-weight: 600; }

/* 결과 모달 */
.pb-m-prize { font-size: 22px; font-weight: 900; color: var(--text); margin: 0 0 6px; word-break: keep-all; }
