/* ==========================================================================
   일러스타 노래자랑 — ILLUSTAR FES 12 톤앤매너
   팔레트: 틸 #38b2ba / 민트 #8bd2d7 / 코랄 #fa6b6b / 핑크 #f7b6cc / 옐로우 #fde1a5
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@100..900&display=swap');

@font-face {
  font-family: 'NanumSquareNeo';
  src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_11-01@1.0/NanumSquareNeo-Variable.woff2') format('woff2-variations');
  font-weight: 300 900;
  font-display: swap;
}

:root {
  --ink: #313634;
  --ink-soft: #838685;
  --bg: #f7f7f7;
  --card: #ffffff;
  --line: #dfdfdf;
  --teal: #38b2ba;
  --teal-deep: #2b969d;
  --mint: #8bd2d7;
  --mint-pale: #eef8f8;
  --mint-soft: #c6e6e8;
  --coral: #fa6b6b;
  --pink: #f7b6cc;
  --pink-pale: #f6d9e3;
  --yellow: #fde1a5;
  --yellow-deep: #ffd06c;
  --radius: 20px;
  --shadow-pop: 6px 6px 0 rgba(49, 54, 52, 0.14);
  --shadow-pop-sm: 4px 4px 0 rgba(49, 54, 52, 0.14);
  --font: 'NanumSquareNeo', 'Noto Sans KR', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  background-image: radial-gradient(rgba(49, 54, 52, 0.06) 1.2px, transparent 1.2px);
  background-size: 26px 26px;
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

button { font-family: var(--font); cursor: pointer; }
input { font-family: var(--font); }
a { color: inherit; text-decoration: none; }

/* ------------------------------ 배경 장식 ------------------------------ */

.bg-deco { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.deco {
  position: absolute;
  font-size: 34px;
  font-weight: 900;
  opacity: 0.5;
  animation: floaty 7s ease-in-out infinite;
}
.deco.d1 { top: 12%; left: 5%;  color: var(--teal);  animation-delay: 0s; }
.deco.d2 { top: 24%; right: 7%; color: var(--coral); font-size: 44px; animation-delay: -2s; }
.deco.d3 { top: 58%; left: 8%;  color: var(--yellow-deep); font-size: 26px; animation-delay: -4s; }
.deco.d4 { top: 72%; right: 12%; color: var(--pink);  font-size: 38px; animation-delay: -1s; }
.deco.d5 { top: 40%; left: 46%; color: var(--mint);  font-size: 22px; animation-delay: -3s; }
.deco.d6 { top: 86%; left: 30%; color: var(--teal);  font-size: 30px; animation-delay: -5s; }
.deco.d7 { top: 8%;  left: 68%; color: var(--pink);  font-size: 20px; animation-delay: -2.5s; }
.deco.blob { border-radius: 50%; filter: blur(60px); opacity: 0.35; }
.deco.b1 { width: 340px; height: 340px; background: var(--mint);   top: -80px;  right: -80px; }
.deco.b2 { width: 300px; height: 300px; background: var(--pink);   bottom: -60px; left: -90px; }
.deco.b3 { width: 240px; height: 240px; background: var(--yellow); top: 45%; right: 20%; }

@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(-6deg); }
  50%      { transform: translateY(-22px) rotate(8deg); }
}

/* ------------------------------ 헤더 ------------------------------ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px clamp(16px, 5vw, 48px);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--ink);
}

.logo { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 20px; }
.logo-mic {
  display: grid; place-items: center;
  width: 40px; height: 40px;
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: 50%;
  box-shadow: var(--shadow-pop-sm);
  font-size: 19px;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.logo:hover .logo-mic { transform: rotate(-12deg) scale(1.08); }
.logo-text em { font-style: normal; color: var(--teal); }

.site-nav { display: flex; gap: clamp(6px, 2vw, 14px); }
.site-nav a {
  position: relative;
  padding: 8px 16px;
  font-weight: 800;
  font-size: 15px;
  border-radius: 999px;
  border: 2px solid transparent;
  transition: all 0.25s ease;
}
.site-nav a:hover { background: var(--mint-pale); }
.site-nav a.active {
  background: var(--teal);
  color: #fff;
  border-color: var(--ink);
  box-shadow: var(--shadow-pop-sm);
}

/* ------------------------------ 레이아웃 ------------------------------ */

.view { position: relative; z-index: 1; flex: 1; width: 100%; }
.container { max-width: 1080px; margin: 0 auto; padding: 0 clamp(16px, 5vw, 40px); }

.site-footer {
  position: relative; z-index: 1;
  text-align: center;
  padding: 34px 20px 44px;
  border-top: 2px solid var(--ink);
  background: var(--card);
  font-weight: 700;
  font-size: 14px;
}
.footer-sub { color: var(--ink-soft); font-size: 12.5px; margin-top: 6px; font-weight: 400; }
.admin-link { margin-left: 8px; text-decoration: underline; opacity: 0.7; }
.admin-link:hover { opacity: 1; color: var(--teal); }

/* ------------------------------ 스태거 등장 ------------------------------ */

.st {
  opacity: 0;
  animation: rise 0.65s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(var(--i, 0) * 90ms);
}
@keyframes rise {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ------------------------------ 히어로 ------------------------------ */

.hero { text-align: center; padding: clamp(52px, 9vh, 96px) 20px 34px; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 8px 20px;
  font-weight: 800;
  font-size: 14px;
  box-shadow: var(--shadow-pop-sm);
}
.hero-badge .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--coral); animation: blink 1.6s ease infinite; }
@keyframes blink { 50% { opacity: 0.25; } }

.hero-title {
  margin: 26px 0 14px;
  font-size: clamp(44px, 9vw, 92px);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -0.02em;
}
.hero-title .stroke {
  color: transparent;
  -webkit-text-stroke: 2.5px var(--ink);
}
.hero-title .fill {
  position: relative;
  display: inline-block;
  color: var(--teal);
  text-shadow: 4px 4px 0 var(--pink);
}
.hero-title .fill::after {
  content: '♪';
  position: absolute;
  top: -0.32em; right: -0.62em;
  font-size: 0.42em;
  color: var(--coral);
  text-shadow: none;
  animation: floaty 3.5s ease-in-out infinite;
}

.hero-copy { font-size: clamp(15px, 2.4vw, 19px); font-weight: 700; color: var(--ink-soft); }
.hero-copy strong { color: var(--ink); }

.hero-chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 24px 0 34px; }
.chip {
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 9px 18px;
  font-weight: 800;
  font-size: 14px;
  box-shadow: var(--shadow-pop-sm);
}
.chip.mint { background: var(--mint-pale); }
.chip.pink { background: var(--pink-pale); }
.chip.yellow { background: var(--yellow); }

.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ------------------------------ 버튼 ------------------------------ */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 14px 34px;
  font-size: 17px;
  font-weight: 900;
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow-pop);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.2s ease;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 rgba(49, 54, 52, 0.16); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 rgba(49, 54, 52, 0.2); }
.btn.primary { background: var(--teal); color: #fff; }
.btn.primary:hover { background: var(--teal-deep); }
.btn.coral { background: var(--coral); color: #fff; }
.btn.ghost { background: var(--card); }
.btn.sm { padding: 9px 20px; font-size: 14px; box-shadow: var(--shadow-pop-sm); }
.btn.block { width: 100%; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: var(--shadow-pop-sm); }

/* ------------------------------ 마퀴 ------------------------------ */

.marquee {
  position: relative;
  background: var(--teal);
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  transform: rotate(-1.4deg) scale(1.02);
  margin: 40px 0;
  overflow: hidden;
  white-space: nowrap;
}
.marquee-track {
  display: inline-block;
  padding: 12px 0;
  animation: marquee 22s linear infinite;
  font-weight: 900;
  font-size: 17px;
  color: #fff;
  letter-spacing: 0.06em;
}
.marquee-track .y { color: var(--yellow); }
.marquee-track .p { color: var(--pink); }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ------------------------------ 섹션/카드 ------------------------------ */

.section { padding: 46px 0 10px; }
.section-title {
  display: flex; align-items: center; gap: 12px;
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 900;
  margin-bottom: 26px;
}
.section-title::before {
  content: '';
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--coral);
  border: 2px solid var(--ink);
  flex-shrink: 0;
}

.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }

.info-card {
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 26px 24px;
  box-shadow: var(--shadow-pop);
  transition: transform 0.25s ease;
}
.info-card:hover { transform: translateY(-6px) rotate(-0.5deg); }
.info-card .icon {
  display: grid; place-items: center;
  width: 52px; height: 52px;
  border-radius: 16px;
  border: 2px solid var(--ink);
  font-size: 24px;
  margin-bottom: 14px;
}
.info-card h3 { font-size: 15px; font-weight: 800; color: var(--ink-soft); margin-bottom: 5px; }
.info-card p { font-size: 19px; font-weight: 900; line-height: 1.4; }
.info-card small { display: block; margin-top: 6px; color: var(--ink-soft); font-weight: 700; }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; counter-reset: step; }
.step {
  position: relative;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 30px 20px 22px;
  box-shadow: var(--shadow-pop-sm);
}
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: -16px; left: 18px;
  display: grid; place-items: center;
  width: 34px; height: 34px;
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: 50%;
  font-weight: 900;
  font-size: 16px;
}
.step .emoji { font-size: 30px; display: block; margin-bottom: 10px; }
.step h3 { font-size: 17px; font-weight: 900; margin-bottom: 6px; }
.step p { font-size: 13.5px; color: var(--ink-soft); font-weight: 700; }

.notice {
  background: var(--mint-pale);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 24px 28px;
  box-shadow: var(--shadow-pop-sm);
}
.notice li {
  list-style: none;
  padding-left: 26px;
  position: relative;
  font-weight: 700;
  font-size: 14.5px;
  margin: 7px 0;
}
.notice li::before { content: '♪'; position: absolute; left: 4px; color: var(--teal); font-weight: 900; }

.home-cta-band {
  margin: 56px 0 66px;
  text-align: center;
  background: var(--ink);
  border-radius: calc(var(--radius) + 8px);
  padding: 46px 24px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.home-cta-band::before, .home-cta-band::after {
  content: '♫';
  position: absolute;
  font-size: 90px;
  opacity: 0.18;
  color: var(--mint);
}
.home-cta-band::before { top: -18px; left: 4%; transform: rotate(-14deg); }
.home-cta-band::after { bottom: -24px; right: 5%; transform: rotate(12deg); color: var(--pink); }
.home-cta-band h2 { font-size: clamp(22px, 4vw, 32px); font-weight: 900; margin-bottom: 8px; }
.home-cta-band p { font-weight: 700; color: #c1c3c2; margin-bottom: 24px; }

/* ------------------------------ 폼 ------------------------------ */

.form-wrap { max-width: 560px; margin: 0 auto; padding: clamp(40px, 7vh, 70px) 0 70px; }

.page-head { text-align: center; margin-bottom: 30px; }
.page-head .hero-badge { font-size: 13px; }
.page-head h1 { font-size: clamp(30px, 5vw, 42px); font-weight: 900; margin: 14px 0 8px; }
.page-head h1 em { font-style: normal; color: var(--teal); }
.page-head p { color: var(--ink-soft); font-weight: 700; font-size: 15px; }

.form-card {
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: calc(var(--radius) + 6px);
  padding: clamp(26px, 5vw, 40px);
  box-shadow: var(--shadow-pop);
}

.field { margin-bottom: 22px; }
.field label { display: block; font-weight: 900; font-size: 15px; margin-bottom: 8px; }
.field label .req { color: var(--coral); }
.field .hint { font-size: 12.5px; color: var(--ink-soft); font-weight: 700; margin-top: 6px; }

.input {
  width: 100%;
  border: 2px solid var(--ink);
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 16px;
  font-weight: 700;
  background: var(--bg);
  transition: box-shadow 0.2s ease, background 0.2s ease;
}
.input:focus { outline: none; background: #fff; box-shadow: 4px 4px 0 var(--mint); }
.input::placeholder { color: #b5b8b7; font-weight: 600; }

/* 노래 선택 필드 */
.song-picker {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border: 2px dashed var(--ink);
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 15.5px;
  font-weight: 800;
  background: var(--mint-pale);
  color: var(--ink-soft);
  transition: all 0.2s ease;
  text-align: left;
}
.song-picker:hover { background: var(--mint-soft); color: var(--ink); transform: translateY(-2px); }
.song-picker .magnifier { font-size: 19px; }

.song-selected {
  display: flex; align-items: center; gap: 12px;
  border: 2px solid var(--ink);
  border-radius: 14px;
  padding: 12px 14px;
  background: var(--yellow);
  box-shadow: var(--shadow-pop-sm);
  animation: popIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.song-selected .no {
  background: var(--ink); color: #fff;
  border-radius: 10px;
  padding: 6px 10px;
  font-weight: 900;
  font-size: 14px;
  flex-shrink: 0;
}
.song-selected .meta { flex: 1; min-width: 0; }
.song-selected .meta b { display: block; font-size: 16px; font-weight: 900; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.song-selected .meta span { font-size: 13px; font-weight: 700; color: rgba(49,54,52,0.75); }
.song-selected .clear {
  border: 2px solid var(--ink);
  background: #fff;
  border-radius: 50%;
  width: 30px; height: 30px;
  font-weight: 900;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.song-selected .clear:hover { transform: rotate(90deg); background: var(--pink-pale); }

/* ------------------------------ 결과/티켓 카드 ------------------------------ */

.ticket {
  position: relative;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: calc(var(--radius) + 6px);
  box-shadow: var(--shadow-pop);
  overflow: hidden;
  animation: popIn 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.ticket-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--teal);
  color: #fff;
  padding: 16px 24px;
  border-bottom: 2px solid var(--ink);
  font-weight: 900;
}
.ticket-head .label { font-size: 13px; letter-spacing: 0.14em; opacity: 0.9; }
.ticket-body { padding: 24px; }
.ticket-row { display: flex; justify-content: space-between; gap: 14px; padding: 10px 0; border-bottom: 1.5px dashed var(--line); font-weight: 700; }
.ticket-row:last-child { border-bottom: none; }
.ticket-row .k { color: var(--ink-soft); font-size: 14px; flex-shrink: 0; }
.ticket-row .v { font-weight: 900; text-align: right; word-break: break-all; }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 6px 16px;
  font-weight: 900;
  font-size: 14px;
}
.badge.wait { background: var(--mint-pale); }
.badge.win { background: var(--coral); color: #fff; animation: tada 0.9s ease 0.3s; }
.badge.gray { background: var(--bg); color: var(--ink-soft); }
.badge.sent { background: var(--yellow); }
.badge.fail { background: var(--pink-pale); color: var(--coral); }

@keyframes tada {
  0% { transform: scale(1); }
  10%, 20% { transform: scale(0.92) rotate(-3deg); }
  30%, 50%, 70%, 90% { transform: scale(1.12) rotate(3deg); }
  40%, 60%, 80% { transform: scale(1.12) rotate(-3deg); }
  100% { transform: scale(1) rotate(0); }
}

/* ------------------------------ 어드민 ------------------------------ */

.admin-wrap { max-width: 1000px; margin: 0 auto; padding: clamp(36px, 6vh, 60px) clamp(16px, 4vw, 32px) 70px; }

.admin-top { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 22px; }
.admin-top .spacer { flex: 1; }

.stat-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 9px 18px;
  font-weight: 900;
  font-size: 14px;
  box-shadow: var(--shadow-pop-sm);
}
.stat-chip b { color: var(--teal); font-size: 17px; }
.stat-chip.coral b { color: var(--coral); }

.admin-table {
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-pop);
  overflow: hidden;
}
.admin-row {
  display: grid;
  grid-template-columns: 1.1fr 1.2fr 2fr 1fr 1.2fr 44px;
  gap: 12px;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1.5px solid var(--line);
  font-weight: 700;
  font-size: 14.5px;
  animation: rise 0.5s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}
.admin-row:last-child { border-bottom: none; }
.admin-row.head {
  background: var(--ink);
  color: #fff;
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 0.05em;
  animation: none;
}
.admin-row .name { font-weight: 900; font-size: 15.5px; }
.admin-row .song b { display: block; }
.admin-row .song span { color: var(--ink-soft); font-size: 12.5px; }
.admin-row .time { color: var(--ink-soft); font-size: 12.5px; }

.del-btn {
  border: 2px solid var(--ink);
  background: #fff;
  border-radius: 10px;
  width: 34px; height: 34px;
  font-size: 15px;
  transition: all 0.2s ease;
}
.del-btn:hover { background: var(--coral); color: #fff; transform: rotate(8deg); }

/* 토글 스위치 */
.toggle {
  position: relative;
  width: 58px; height: 32px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--bg);
  transition: background 0.25s ease;
  flex-shrink: 0;
}
.toggle::after {
  content: '';
  position: absolute;
  top: 2px; left: 3px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--ink);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-sizing: border-box;
}
.toggle.on { background: var(--coral); }
.toggle.on::after { transform: translateX(25px); }
.toggle:disabled { opacity: 0.5; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--ink-soft); font-weight: 800; }
.empty-state .big { font-size: 44px; display: block; margin-bottom: 12px; }

@media (max-width: 760px) {
  .admin-row { grid-template-columns: 1fr 1fr; padding: 16px; row-gap: 8px; }
  .admin-row.head { display: none; }
  .admin-row .song { grid-column: 1 / -1; }
}

/* ------------------------------ 모달 ------------------------------ */

.modal-overlay {
  position: fixed; inset: 0;
  z-index: 100;
  display: grid; place-items: center;
  padding: 20px;
  background: rgba(49, 54, 52, 0.55);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  animation: fadeIn 0.25s ease;
}
.modal-overlay.closing { animation: fadeOut 0.22s ease forwards; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }

.modal {
  width: 100%;
  max-width: 440px;
  background: var(--card);
  border: 2.5px solid var(--ink);
  border-radius: 24px;
  box-shadow: 10px 10px 0 rgba(49, 54, 52, 0.25);
  overflow: hidden;
  animation: popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.modal-overlay.closing .modal { animation: popOut 0.22s ease forwards; }
@keyframes popIn {
  from { opacity: 0; transform: scale(0.72) translateY(30px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes popOut { to { opacity: 0; transform: scale(0.85) translateY(16px); } }

.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 22px;
  background: var(--mint-pale);
  border-bottom: 2px solid var(--ink);
  font-weight: 900;
  font-size: 17px;
}
.modal-head.pink { background: var(--pink-pale); }
.modal-close {
  border: 2px solid var(--ink);
  background: #fff;
  border-radius: 50%;
  width: 32px; height: 32px;
  font-weight: 900;
  font-size: 14px;
  transition: transform 0.25s ease;
}
.modal-close:hover { transform: rotate(90deg); background: var(--yellow); }
.modal-body { padding: 24px 22px 26px; }

/* TJ 검색 모달 */
.tj-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  background: var(--bg);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 4px;
}
.tj-tab {
  flex: 1;
  border: none;
  background: transparent;
  border-radius: 999px;
  padding: 9px 0;
  font-weight: 800;
  font-size: 14px;
  color: var(--ink-soft);
  transition: all 0.22s ease;
}
.tj-tab:hover { color: var(--ink); background: var(--mint-pale); }
.tj-tab.active { background: var(--ink); color: #fff; box-shadow: 2px 2px 0 rgba(49, 54, 52, 0.18); }

.tj-search-bar { display: flex; gap: 10px; }
.tj-search-bar .input { flex: 1; letter-spacing: 0.08em; }
.tj-brand { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; color: var(--ink-soft); margin-top: 10px; }
.tj-brand .tj { background: var(--coral); color: #fff; border-radius: 6px; padding: 1px 7px; font-weight: 900; }

.tj-result { margin-top: 18px; }
.tj-loading { text-align: center; padding: 26px 0 10px; }
.spinner {
  width: 38px; height: 38px;
  margin: 0 auto 10px;
  border-radius: 50%;
  border: 4px solid var(--mint-soft);
  border-top-color: var(--teal);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.tj-loading p { font-weight: 800; color: var(--ink-soft); font-size: 14px; }

.tj-error {
  background: var(--pink-pale);
  border: 2px solid var(--coral);
  color: #c94747;
  border-radius: 12px;
  padding: 13px 16px;
  font-weight: 800;
  font-size: 14px;
  animation: shake 0.4s ease;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-7px); }
  75% { transform: translateX(7px); }
}

.tj-count { font-weight: 800; font-size: 13px; color: var(--ink-soft); margin-bottom: 10px; }
.tj-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: min(300px, 42vh);
  overflow-y: auto;
  padding-right: 4px;
}
.tj-item {
  display: flex; align-items: center; gap: 10px;
  text-align: left;
  border: 2px solid var(--ink);
  border-radius: 14px;
  padding: 10px 14px;
  background: #fff;
  transition: all 0.15s ease;
  animation: rise 0.4s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}
.tj-item:hover { background: var(--mint-pale); transform: translateX(5px); box-shadow: -3px 3px 0 var(--mint); }
.tj-item .no-tag {
  background: var(--ink); color: #fff;
  border-radius: 8px;
  padding: 3px 10px;
  font-weight: 900;
  font-size: 12px;
  flex-shrink: 0;
}
.tj-item .meta { flex: 1; min-width: 0; }
.tj-item .meta b { display: block; font-size: 15px; font-weight: 900; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tj-item .meta span { font-size: 12.5px; font-weight: 700; color: var(--ink-soft); }
.tj-item .arrow { color: var(--teal); font-weight: 900; flex-shrink: 0; }

/* 개인정보 동의 */
.consent-row {
  width: 100%;
  display: flex; align-items: center; gap: 12px;
  border: 2px solid var(--ink);
  border-radius: 14px;
  padding: 13px 16px;
  background: var(--bg);
  font-weight: 800;
  font-size: 14.5px;
  text-align: left;
  transition: all 0.2s ease;
}
.consent-row:hover { background: var(--mint-pale); transform: translateY(-2px); }
.consent-row.on { background: var(--yellow); box-shadow: var(--shadow-pop-sm); }
.consent-box {
  width: 26px; height: 26px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: #fff;
  display: grid; place-items: center;
  font-weight: 900;
  font-size: 14px;
  color: transparent;
  flex-shrink: 0;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.consent-row.on .consent-box { background: var(--teal); color: #fff; transform: rotate(-6deg) scale(1.08); }
.consent-view { margin-left: auto; font-size: 12.5px; font-weight: 700; color: var(--ink-soft); text-decoration: underline; flex-shrink: 0; }

.terms-box {
  max-height: min(320px, 44vh);
  overflow-y: auto;
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
  background: var(--bg);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.7;
}
.terms-box .terms-intro { margin-bottom: 4px; }
.terms-box h4 { margin: 12px 0 3px; font-size: 14px; font-weight: 900; color: var(--teal-deep); }
.terms-box p, .terms-box li { color: #5c605e; }
.terms-box ul { padding-left: 18px; }
.terms-box b { color: var(--coral); }

/* 완료 모달 */
.done-modal { text-align: center; padding: 10px 4px 4px; }
.done-check {
  width: 84px; height: 84px;
  margin: 6px auto 18px;
  border-radius: 50%;
  background: var(--teal);
  border: 2.5px solid var(--ink);
  display: grid; place-items: center;
  box-shadow: var(--shadow-pop-sm);
  animation: popIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s backwards;
}
.done-check svg { width: 42px; height: 42px; }
.done-check path {
  stroke: #fff; stroke-width: 8; fill: none;
  stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 80; stroke-dashoffset: 80;
  animation: draw 0.55s ease 0.45s forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }
.done-modal h2 { font-size: 24px; font-weight: 900; margin-bottom: 10px; }
.done-modal p { font-weight: 700; color: var(--ink-soft); font-size: 15px; line-height: 1.7; }
.done-modal p strong { color: var(--coral); }

/* 컨페티 */
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.confetti i {
  position: absolute;
  top: -12px;
  width: 9px; height: 14px;
  opacity: 0.9;
  animation: confetti-fall linear forwards;
}
@keyframes confetti-fall {
  to { transform: translateY(110vh) rotate(720deg); opacity: 0.6; }
}

/* ------------------------------ 토스트 ------------------------------ */

#toast-root { position: fixed; bottom: 28px; left: 0; right: 0; z-index: 200; display: flex; flex-direction: column; align-items: center; gap: 10px; pointer-events: none; }
.toast {
  background: var(--ink);
  color: #fff;
  border-radius: 999px;
  border: 2px solid var(--ink);
  padding: 12px 26px;
  font-weight: 800;
  font-size: 14.5px;
  box-shadow: var(--shadow-pop-sm);
  animation: toastIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), fadeOut 0.3s ease 2.8s forwards;
}
.toast.error { background: var(--coral); }
@keyframes toastIn { from { opacity: 0; transform: translateY(24px) scale(0.9); } }

/* ------------------------------ 페이지 전환 와이프 ------------------------------ */

.wipe { position: fixed; inset: 0; z-index: 90; pointer-events: none; }
.wipe-panel {
  position: absolute; inset: -2% -1%;
  transform: translateY(103%);
}
.wipe-panel.p1 { background: var(--yellow); }
.wipe-panel.p2 { background: var(--pink); }
.wipe-panel.p3 { background: var(--teal); display: grid; place-items: center; }
.wipe-logo {
  font-size: clamp(30px, 6vw, 52px);
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.1em;
  opacity: 0;
}

.wipe.in .wipe-panel { animation: wipeIn 0.42s cubic-bezier(0.65, 0, 0.35, 1) forwards; }
.wipe.in .p1 { animation-delay: 0s; }
.wipe.in .p2 { animation-delay: 0.09s; }
.wipe.in .p3 { animation-delay: 0.18s; }
.wipe.in .wipe-logo { animation: rise 0.4s ease 0.4s forwards; }

.wipe.out .wipe-panel { transform: translateY(0); animation: wipeOut 0.46s cubic-bezier(0.65, 0, 0.35, 1) forwards; }
.wipe.out .p1 { animation-delay: 0.16s; }
.wipe.out .p2 { animation-delay: 0.08s; }
.wipe.out .p3 { animation-delay: 0s; }
.wipe.out .wipe-logo { opacity: 1; animation: fadeOut 0.2s ease forwards; }

@keyframes wipeIn { from { transform: translateY(103%); } to { transform: translateY(0); } }
@keyframes wipeOut { from { transform: translateY(0); } to { transform: translateY(-103%); } }

/* ------------------------------ 모바일 반응형 ------------------------------ */

/* 모바일 하단 내비게이션 (기본은 숨김, 데스크톱은 상단 nav 사용) */
.mobile-nav { display: none; }

@media (max-width: 640px) {
  /* 상단 헤더: 로고만 표시, 내비는 하단 바로 이동 */
  .site-header { padding: 10px 16px; }
  .site-nav { display: none; }
  .logo { font-size: 18px; gap: 8px; }
  .logo-mic { width: 36px; height: 36px; font-size: 16px; }
  .logo-text { white-space: nowrap; }

  /* 하단 탭 바 */
  .mobile-nav {
    display: flex;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 60;
    justify-content: space-around;
    gap: 4px;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 2px solid var(--ink);
    box-shadow: 0 -4px 16px rgba(49, 54, 52, 0.1);
  }
  .mobile-nav a {
    flex: 1;
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 7px 4px;
    border-radius: 14px;
    font-size: 11.5px; font-weight: 800;
    color: var(--ink-soft);
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
  }
  .mobile-nav a .mn-ico { font-size: 21px; line-height: 1; }
  .mobile-nav a.active { color: var(--teal); background: var(--mint-pale); }
  .mobile-nav a:active { transform: scale(0.93); }

  /* 하단 바에 콘텐츠가 가리지 않도록 여백 */
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
  /* 토스트를 하단 바 위로 */
  #toast-root { bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }

  /* 여백/타이포 정돈 */
  .hero { padding: 38px 18px 22px; }
  .hero-title { margin: 20px 0 12px; }
  .hero-chips { gap: 8px; margin: 20px 0 26px; }
  .section { padding: 32px 0 6px; }
  .section-title { margin-bottom: 20px; }
  .home-cta-band { margin: 40px 0 44px; padding: 34px 18px; }
  .form-wrap { padding: 34px 0 50px; }
  .marquee { margin: 32px 0; }

  /* 어드민: 카드형으로 재배치 */
  .admin-wrap { padding: 30px 14px 60px; }
  .admin-row { grid-template-columns: 1fr auto; padding: 14px 16px; row-gap: 6px; column-gap: 10px; }
  .admin-row.head { display: none; }
  .admin-row .name { grid-column: 1; }
  .admin-row .song { grid-column: 1 / -1; order: 3; }
  .admin-row .sms { grid-column: 1; order: 4; }
  .admin-row .time { grid-column: 2; order: 4; text-align: right; }
  .admin-row .del-btn { grid-column: 2; grid-row: 1; justify-self: end; }
}

/* 아주 좁은 화면(소형 폰) 추가 보정 */
@media (max-width: 360px) {
  .hero-title { font-size: 40px; }
  .mobile-nav a { font-size: 11px; }
  .btn { padding: 13px 22px; font-size: 15px; }
}

/* ------------------------------ 접근성 ------------------------------ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
