/* ------------------------------------------------------------
 * ticket-modal.css
 * - 티켓 상세 모달 전용
 * ------------------------------------------------------------ */

.ticket-modal-card,
.ticket-sheet-card{
  background:
    radial-gradient(circle at top left, rgba(255,255,255,0.98) 0, rgba(255,255,255,0) 16%),
    linear-gradient(180deg, rgba(255,255,255,0.99), rgba(245,247,243,0.99));
}

.premium-reveal-overlay{
  position:absolute;
  inset:0;
  z-index:8;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:22px;
  background:
    radial-gradient(circle at 50% 22%, rgba(255,255,255,0.98), rgba(255,255,255,0.66) 28%, rgba(236,246,241,0.96) 68%),
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(232,241,236,0.98));
  animation:premiumRevealFade 7.8s ease both;
}

.premium-reveal-overlay[hidden]{
  display:none;
}

.premium-reveal-stage{
  width:min(100%, 420px);
  text-align:center;
  color:var(--text-strong);
}

.premium-reveal-kicker{
  color:#15957a;
  font-size:11px;
  font-weight:900;
  letter-spacing:.09em;
}

.premium-reveal-title{
  margin-top:8px;
  font-size:25px;
  line-height:1.2;
  font-weight:900;
}

.premium-reveal-copy{
  margin-top:8px;
  color:var(--text-soft);
  font-size:13px;
  line-height:1.55;
  font-weight:700;
}

.premium-reveal-scenes{
  display:grid;
  gap:8px;
  margin-top:22px;
}

.premium-reveal-scene{
  display:grid;
  grid-template-columns:34px minmax(0, 1fr);
  gap:10px;
  align-items:center;
  padding:10px 11px;
  border-radius:16px;
  border:1px solid rgba(208,216,210,0.92);
  background:rgba(255,255,255,0.78);
  box-shadow:0 12px 28px rgba(20,28,26,0.07);
  text-align:left;
  opacity:0;
  transform:translateY(10px);
  animation:premiumSceneEnter .62s ease forwards;
  animation-delay:var(--delay);
}

.premium-reveal-scene span{
  grid-row:1 / span 2;
  display:flex;
  align-items:center;
  justify-content:center;
  width:34px;
  height:34px;
  border-radius:999px;
  background:linear-gradient(180deg, rgba(42,193,160,0.22), rgba(42,193,160,0.34));
  color:#127a66;
  font-size:12px;
  font-weight:900;
}

.premium-reveal-scene strong{
  min-width:0;
  font-size:14px;
  font-weight:900;
}

.premium-reveal-scene small{
  min-width:0;
  color:var(--text-soft);
  font-size:12px;
  line-height:1.35;
  font-weight:700;
}

.premium-reveal-balls{
  display:flex;
  justify-content:center;
  gap:7px;
  flex-wrap:wrap;
  margin-top:24px;
  min-height:44px;
}

.premium-reveal-balls .ticket-number{
  width:36px;
  height:36px;
  font-size:15px;
  opacity:0;
  transform:translateY(-88px) scale(.88);
  animation:premiumBallDrop .78s cubic-bezier(.2, .86, .25, 1.22) forwards;
  animation-delay:var(--delay);
}

.premium-reveal-skip{
  position:absolute;
  top:12px;
  right:12px;
  min-height:30px;
  padding:0 11px;
  border:1px solid rgba(208,216,210,0.9);
  border-radius:999px;
  background:rgba(255,255,255,0.72);
  color:var(--text-soft);
  font-size:11px;
  font-weight:800;
}

.ticket-sheet-card.is-premium-revealing .sheet-modal-header,
.ticket-sheet-card.is-premium-revealing .sheet-modal-body,
.ticket-sheet-card.is-premium-revealing .sheet-modal-footer{
  filter:blur(2px);
  opacity:.22;
}

@keyframes premiumRevealFade{
  0%{opacity:0;filter:brightness(1.35)}
  8%, 84%{opacity:1;filter:brightness(1)}
  100%{opacity:0;filter:brightness(1.08)}
}

@keyframes premiumSceneEnter{
  to{opacity:1;transform:translateY(0)}
}

@keyframes premiumBallDrop{
  0%{opacity:0;transform:translateY(-88px) scale(.88)}
  70%{opacity:1;transform:translateY(4px) scale(1.04)}
  100%{opacity:1;transform:translateY(0) scale(1)}
}

.ticket-sheet-header{
  padding-bottom:4px;
}

.ticket-sheet-hero{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.ticket-sheet-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:8px;
  padding-right:34px;
}

.ticket-sheet-number-row{
  gap:6px;
}

.ticket-sheet-number-row .ticket-number{
  width:36px;
  height:36px;
  font-size:15px;
}

.ticket-sheet-number-wrap{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

.ticket-modal-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
  padding-right:32px;
}

.ticket-modal-kicker{
  color:var(--text-faint);
  font-size:12px;
  font-weight:900;
  line-height:1.4;
  letter-spacing:.02em;
}

.ticket-modal-flavor{
  display:none;
  color:var(--text-soft);
  font-size:10px;
  line-height:1.45;
  font-weight:700;
}

.ticket-modal-badges{
  display:flex;
  flex:0 0 auto;
  flex-direction:row;
  flex-wrap:wrap;
  gap:6px;
  align-items:center;
  justify-content:flex-end;
  min-width:max-content;
  white-space:nowrap;
}

.ticket-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:21px;
  padding:0 8px;
  border-radius:999px;
  background:rgba(17,24,23,0.06);
  color:var(--text);
  font-size:11.5px;
  font-weight:900;
  border:1px solid rgba(208,216,210,0.88);
}

.ticket-badge--grade{
  background:linear-gradient(180deg, rgba(42,193,160,0.16), rgba(42,193,160,0.26));
  color:var(--accent-strong);
  box-shadow:none;
}

.ticket-modal-section{
  margin-top:0;
  padding:10px 11px;
  border-radius:14px;
  background:rgba(255,255,255,0.95);
  border:1px solid rgba(208,216,210,0.88);
}

.ticket-section-title{
  margin-bottom:8px;
  color:var(--text-strong);
  font-size:14px;
  font-weight:700;
}

.ticket-summary-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0,1fr));
  gap:7px;
}

.ticket-summary-card{
  padding:10px 8px;
  border-radius:14px;
  background:linear-gradient(180deg, rgba(255,255,255,0.99), rgba(246,248,244,0.99));
  color:var(--text-strong);
  text-align:center;
  box-shadow:none;
  border:1px solid rgba(208,216,210,0.88);
}

.ticket-summary-card span{
  display:block;
  color:var(--text-faint);
  font-size:11.5px;
  font-weight:800;
}

.ticket-summary-card strong{
  display:block;
  margin-top:4px;
  font-size:15px;
  font-weight:900;
  letter-spacing:-0.03em;
  color:var(--text-strong);
}

.ticket-summary-card--rank{
  background:linear-gradient(180deg, rgba(42,193,160,0.22), rgba(42,193,160,0.34));
  color:var(--accent-strong);
}

.ticket-summary-card--rank span{
  color:rgba(21,149,122,0.74);
}

.ticket-summary-card--rank strong{
  color:var(--accent-strong);
}

.ticket-accordion-toggle{
  display:flex;
  justify-content:space-between;
  align-items:center;
  width:100%;
  min-height:28px;
  padding:0;
  border:0;
  background:none;
  color:var(--text-strong);
  font-size:14px;
  font-weight:700;
}

.ticket-accordion-arrow{
  color:var(--text-faint);
  font-size:12px;
}

.ticket-accordion-toggle[aria-expanded="true"] .ticket-accordion-arrow{
  transform:rotate(180deg);
}

.ticket-accordion-body{
  padding-top:6px;
}

.ticket-info-grid{
  display:flex;
  flex-direction:column;
  gap:0;
}

.ticket-info-line{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
  padding:8px 0;
  border-bottom:1px dashed rgba(208,216,210,0.88);
}

.ticket-info-line:last-child{
  border-bottom:0;
  padding-bottom:0;
}

.ticket-info-line span{
  color:var(--text-faint);
  font-size:12px;
  font-weight:700;
}

.ticket-info-line strong{
  text-align:right;
  color:var(--text-strong);
  font-size:12px;
  line-height:1.4;
  font-weight:700;
}

.ticket-modal-actions{
  display:grid;
  grid-template-columns:repeat(3, minmax(0,1fr));
  gap:7px;
  margin-top:10px;
}

.ticket-modal-actions .btn{
  min-height:36px;
  border-radius:10px;
  font-size:12px;
  padding-inline:0;
}

.ticket-sheet-footer{
  padding-top:6px;
}

.ticket-analysis-card-list,
.ticket-story-list{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.ticket-analysis-card,
.ticket-story-step{
  position:relative;
  border-radius:16px;
  border:1px solid rgba(208,216,210,0.88);
  background:
    radial-gradient(circle at top right, rgba(143,228,207,0.14), rgba(143,228,207,0) 32%),
    linear-gradient(180deg, rgba(255,255,255,0.99), rgba(244,247,242,0.99));
  box-shadow:0 10px 24px rgba(20,28,26,0.05);
}

.ticket-analysis-card{
  padding:13px 13px 12px;
}

.ticket-analysis-step{
  color:var(--accent-strong);
  font-size:11px;
  font-weight:900;
  letter-spacing:0.08em;
  text-transform:uppercase;
}

.ticket-analysis-title{
  margin-top:7px;
  color:var(--text-strong);
  font-size:14px;
  line-height:1.4;
  font-weight:900;
  letter-spacing:-0.03em;
}

.ticket-analysis-body{
  margin-top:6px;
  color:var(--text-soft);
  font-size:13px;
  line-height:1.65;
  font-weight:700;
}

.ticket-story-step{
  display:grid;
  grid-template-columns:34px minmax(0, 1fr);
  gap:11px;
  padding:12px;
}

.ticket-story-index{
  display:flex;
  align-items:center;
  justify-content:center;
  width:34px;
  height:34px;
  border-radius:999px;
  background:linear-gradient(180deg, rgba(42,193,160,0.18), rgba(42,193,160,0.3));
  color:var(--accent-strong);
  font-size:12px;
  font-weight:900;
}

.ticket-story-copy{
  min-width:0;
}

.ticket-story-title{
  color:var(--text-strong);
  font-size:12px;
  font-weight:900;
  letter-spacing:-0.02em;
}

.ticket-story-scene{
  margin-top:4px;
  color:var(--text-soft);
  font-size:12px;
  line-height:1.55;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:0.03em;
}

.ticket-story-meta{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-top:8px;
}

.ticket-story-meta span{
  display:inline-flex;
  align-items:center;
  min-height:22px;
  padding:0 8px;
  border-radius:999px;
  background:rgba(248,250,247,0.96);
  border:1px solid rgba(208,216,210,0.88);
  color:var(--text-soft);
  font-size:11px;
  font-weight:800;
}

.ticket-analysis-empty{
  padding:12px;
  border-radius:14px;
  background:rgba(248,250,247,0.96);
  border:1px dashed rgba(208,216,210,0.92);
  color:var(--text-soft);
  font-size:13px;
  line-height:1.6;
  font-weight:700;
  text-align:center;
}

@media (max-width:420px){
  .premium-reveal-overlay{
    padding:18px 14px;
  }

  .premium-reveal-title{
    font-size:22px;
  }

  .premium-reveal-scenes{
    margin-top:18px;
  }

  .premium-reveal-scene{
    padding:9px 10px;
  }

  .premium-reveal-balls .ticket-number{
    width:32px;
    height:32px;
    font-size:13px;
  }

  .ticket-sheet-top{
    flex-direction:column;
    padding-right:34px;
  }

  .ticket-sheet-number-wrap{
    gap:8px;
  }

  .ticket-sheet-number-row{
    gap:5px;
  }

  .ticket-sheet-number-row .ticket-number{
    width:32px;
    height:32px;
    font-size:13px;
  }

  .ticket-modal-actions{
    grid-template-columns:repeat(3, minmax(0,1fr));
    gap:6px;
  }

  .ticket-story-step{
    grid-template-columns:30px minmax(0, 1fr);
    gap:9px;
    padding:11px;
  }

  .ticket-story-index{
    width:30px;
    height:30px;
    font-size:11px;
  }
}

@media (prefers-reduced-motion: reduce){
  .premium-reveal-overlay,
  .premium-reveal-scene,
  .premium-reveal-balls .ticket-number{
    animation-duration:.01ms !important;
    animation-delay:0ms !important;
  }
}
