/* 소개 페이지(index.html)만: 첫 화면, 흐르는 띠, 놀이 순서, 던져 보기, 결과, 특징 상자, 갤러리, 약속, 마지막 권유. */

/* ── 첫 화면(주홍 판) ────────────────────────────────── */
.hero {
  position: relative; margin-top: -64px; padding: 104px 0 120px; color: #fff; overflow: hidden; isolation: isolate;
  background:
    radial-gradient(1200px 600px at 85% 10%, rgba(255, 196, 120, .35), transparent 60%),
    radial-gradient(900px 500px at 0% 100%, rgba(120, 20, 10, .45), transparent 60%),
    linear-gradient(160deg, #E25B3E 0%, #D2452F 45%, #B5341F 100%);
}
@media (prefers-color-scheme: dark) {
  .hero { background:
    radial-gradient(1200px 600px at 85% 10%, rgba(255, 160, 90, .22), transparent 60%),
    radial-gradient(900px 500px at 0% 100%, rgba(0, 0, 0, .5), transparent 60%),
    linear-gradient(160deg, #A93824 0%, #8E2B1A 50%, #6A1F12 100%); }
}
.hero::before { /* 큰 윷판 무늬 */
  content: ""; position: absolute; z-index: -1; width: 780px; height: 780px; right: -220px; top: -120px; opacity: .13;
  background:
    linear-gradient(45deg, transparent calc(50% - 2px), #fff calc(50% - 2px), #fff calc(50% + 2px), transparent calc(50% + 2px)),
    linear-gradient(-45deg, transparent calc(50% - 2px), #fff calc(50% - 2px), #fff calc(50% + 2px), transparent calc(50% + 2px));
  border: 4px solid #fff; border-radius: 40px; transform: rotate(-8deg);
}
@keyframes slowspin { to { transform: rotate(352deg); } }
.hero::after { /* 아래 곡선 */
  content: ""; position: absolute; left: -5%; right: -5%; bottom: -1px; height: 90px; z-index: 1;
  background: var(--bg); border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}
.hero .wrap { position: relative; z-index: 2; display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
.hero .chip { background: rgba(255, 255, 255, .16); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3); }
.hero h1 {
  font-family: var(--display); font-weight: 400; font-size: clamp(2.9rem, 8.4vw, 5.4rem); line-height: 1.04;
  margin: 18px 0 18px; letter-spacing: -.02em; text-shadow: 0 6px 30px rgba(80, 10, 0, .35);
}
.hero h1 .line { display: block; }
.hero h1 .hl { color: #FFE2A8; position: relative; display: inline-block; }
.hero h1 .hl::after {
  content: ""; position: absolute; left: -2%; right: -2%; bottom: .06em; height: .2em; z-index: -1; border-radius: 99px;
  background: rgba(255, 210, 120, .35); 
}
.hero .lead { font-size: clamp(1.05rem, 2.4vw, 1.22rem); color: rgba(255, 248, 240, .9); margin: 0 0 26px; max-width: 34em; }
.hero .cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero .facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0 0; padding: 0; list-style: none; }
.hero .facts li { padding: 6px 14px; border-radius: 999px; background: rgba(255, 248, 240, .95); color: #A8321F; font-weight: 800; font-size: .9rem; }
.hero .status { font-size: .9rem; color: rgba(255, 248, 240, .78); margin: 14px 0 0; }

/* 폰과 말·윷 (멈춰 있다) */
.stage { position: relative; height: 560px; perspective: 1200px; }
.phone {
  position: absolute; width: 258px; aspect-ratio: 540 / 1170; border-radius: 40px; padding: 9px;
  background: linear-gradient(145deg, #2A2421, #110E0C); box-shadow: var(--shadow-lg), inset 0 0 0 2px rgba(255, 255, 255, .08);
  transform-style: preserve-3d;
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 32px; }
.phone::before { content: ""; position: absolute; top: 18px; left: 50%; width: 64px; height: 18px; margin-left: -32px; background: #0d0b0a; border-radius: 99px; z-index: 2; }
.stage .phone.main { left: 50%; top: 10px; margin-left: -100px; transform: rotateY(-14deg) rotateX(6deg) rotateZ(3deg); z-index: 3; }
.stage .phone.back { left: 50%; top: 70px; margin-left: -250px; width: 218px; transform: rotateY(18deg) rotateZ(-9deg) translateZ(-80px); opacity: .92; filter: saturate(.9); z-index: 2; }
.token {
  position: absolute; z-index: 4; width: 68px; height: 68px; border-radius: 50%; display: grid; place-items: center;
  font-size: 36px; background: #FFF6EA; box-shadow: 0 0 0 6px var(--c, #E56A3C), 0 16px 30px -10px rgba(60, 10, 0, .55);
}
.token span { display: block; line-height: 1; }
.t1 { --c: #E8743B; left: 4%; top: 16px; }
.t2 { --c: #E36FA4; right: 2%; top: 120px; --d: -1.6s; width: 58px; height: 58px; font-size: 30px; }
.t3 { --c: #8E5A33; left: 0; bottom: 70px; --d: -3s; }
.t4 { --c: #7C6CE0; right: 8%; bottom: 20px; --d: -4.4s; width: 60px; height: 60px; font-size: 32px; }
.pop {
  position: absolute; z-index: 5; right: 6%; top: 46%; padding: 6px 20px 10px; border-radius: 22px; background: #FFFBF3; color: #D2452F;
  font-family: var(--display); font-size: 3rem; line-height: 1.1; box-shadow: 0 18px 40px -12px rgba(60, 10, 0, .6);
  transform: rotate(-8deg);
}
.pop small { display: block; font-family: system-ui, sans-serif; font-size: .8rem; font-weight: 800; color: #5E544B; text-align: center; margin-top: -2px; }


.float-stick { position: absolute; z-index: 1; }
.fs1 { left: 18%; bottom: 0; transform: rotate(28deg); }
.fs2 { right: 24%; top: -10px; transform: rotate(-36deg); }

/* 놀이 순서 */
.steps3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: s; }
.step3 {
  position: relative; background: var(--surface); border-radius: var(--r); padding: 22px 22px 0; overflow: hidden;
  box-shadow: var(--shadow); border: 1px solid var(--line); display: flex; flex-direction: column;
  transition: transform .5s var(--ease-spring), box-shadow .4s;
}
.step3 .no { counter-increment: s; font-family: var(--display); font-size: 1.05rem; color: #fff; background: var(--ju); width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; transform: rotate(-6deg); }
.step3 .no::before { content: counter(s); }
.step3 h3 { font-size: 1.28rem; margin: 14px 0 4px; letter-spacing: -.01em; }
.step3 p { color: var(--muted); margin: 0 0 18px; font-size: .98rem; }
.step3 .shot { margin: auto -2px 0; height: 300px; overflow: hidden; border-radius: 26px 26px 0 0; background: #111; padding: 7px 7px 0; box-shadow: 0 -6px 30px -14px rgba(0, 0, 0, .4); }
.step3 .shot img { border-radius: 20px 20px 0 0; }
.step3:nth-child(2) .no { background: var(--cheong); }
.step3:nth-child(3) .no { background: var(--hwang); }

/* ── 던져 보기 ───────────────────────────────────────── */
.play { background: var(--bg-2); border-block: 1px solid var(--line); }
.play-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.mat {
  position: relative; aspect-ratio: 1; max-width: 460px; width: 100%; margin: 0 auto; border-radius: 50%; overflow: hidden; isolation: isolate;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, .12), transparent 60%),
    repeating-radial-gradient(circle at 50% 50%, rgba(0, 0, 0, .04) 0 2px, transparent 2px 5px),
    #3B6E52;
  box-shadow: inset 0 0 0 10px #2A4F3B, inset 0 0 60px rgba(0, 0, 0, .45), var(--shadow-lg);
  touch-action: manipulation;
}
.mat .rays { position: absolute; inset: -20%; z-index: -1; opacity: 0; transition: opacity .4s;
  background: repeating-conic-gradient(from 0deg, rgba(255, 214, 120, .38) 0 10deg, transparent 10deg 24deg);
  animation: slowspin 14s linear infinite; }
.mat.gold .rays { opacity: 1; }
.sticks { position: absolute; inset: 0; }
.sticks .stick { --w: clamp(22px, 6.4vw, 30px); position: absolute; left: 50%; top: 50%; margin: calc(var(--w) * -2.6) 0 0 calc(var(--w) / -2); transform: translate(var(--x, 0), var(--y, 0)) rotate(var(--r, 0deg)); }
.sticks .stick:nth-child(1) { --x: -78px; --y: -14px; --r: -16deg; }
.sticks .stick:nth-child(2) { --x: -26px; --y: 10px; --r: 8deg; }
.sticks .stick:nth-child(3) { --x: 28px; --y: -8px; --r: -4deg; }
.sticks .stick:nth-child(4) { --x: 80px; --y: 12px; --r: 18deg; }
.sticks .stick.rock { animation: rock .32s ease-in-out infinite alternate; }
@keyframes rock { from { scale: .55 1; } to { scale: 1 1; } }
.badge {
  position: absolute; left: 50%; top: 50%; z-index: 5; min-width: 150px; padding: 8px 22px 12px; border-radius: 26px; text-align: center;
  background: #FFFBF3; color: #D2452F; box-shadow: 0 20px 40px -12px rgba(0, 0, 0, .55);
  transform: translate(-50%, -50%) scale(0); opacity: 0; transition: transform .5s var(--ease-spring), opacity .2s;
  pointer-events: none;
}
.badge.show { transform: translate(-50%, -50%) scale(1); opacity: 1; }
.badge b { display: block; font-family: var(--display); font-weight: 400; font-size: 3.6rem; line-height: 1.05; }
.badge span { font-weight: 800; color: #5E544B; font-size: .95rem; }
.badge.gold b { color: #C98A12; }
.suspense { position: absolute; left: 0; right: 0; top: 14%; text-align: center; z-index: 5; color: #FFE2A8; font-family: var(--display); font-size: 1.6rem; opacity: 0; transition: opacity .2s; text-shadow: 0 2px 10px rgba(0, 0, 0, .5); }
.suspense.show { opacity: 1; }
.runner { position: absolute; bottom: 16%; left: 0; z-index: 4; font-size: 54px; line-height: 1; opacity: 0; pointer-events: none; }
.runner.go { animation: run 1.5s linear forwards; }
.runner.go.fast { animation-duration: .8s; }
.runner.go.back { animation-name: runback; }
@keyframes run { 0% { opacity: 1; transform: translateX(-20%) scaleX(-1) translateY(0); } 25% { transform: translateX(110%) scaleX(-1) translateY(-10px); } 50% { transform: translateX(240%) scaleX(-1) translateY(0); } 75% { transform: translateX(370%) scaleX(-1) translateY(-10px); } 100% { opacity: 1; transform: translateX(560%) scaleX(-1) translateY(0); } }
@keyframes runback { 0% { opacity: 1; transform: translateX(300%) translateY(0); } 50% { transform: translateX(380%) translateY(-6px); } 100% { opacity: 0; transform: translateX(470%) translateY(0); } }
.confetti { position: absolute; inset: 0; pointer-events: none; z-index: 6; overflow: hidden; }
.confetti i { position: absolute; top: -10px; width: 9px; height: 14px; border-radius: 2px; animation: fall 1.6s ease-in forwards; }
@keyframes fall { to { transform: translate(var(--dx), 520px) rotate(var(--rot)); opacity: .2; } }
.play-copy .throw-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 18px 0 10px; }
.play-copy .hint { color: var(--muted); font-size: .92rem; margin: 0; }
.tally { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin: 22px 0 0; padding: 0; list-style: none; max-width: 420px; }
.tally li { text-align: center; padding: 8px 0 6px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); font-size: .78rem; color: var(--muted); font-weight: 700; transition: transform .4s var(--ease-spring), background .3s; }
.tally li b { display: block; font-family: var(--display); font-weight: 400; font-size: 1.15rem; color: var(--ink); }
.tally li.hit { transform: translateY(-6px) scale(1.08); background: var(--ju-soft); border-color: var(--ju); }

/* 결과 동물 줄 */
.results { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.res {
  position: relative; text-align: center; padding: 22px 10px 18px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow-sm); cursor: default;
}
.res .ani { font-size: 46px; line-height: 1.1; display: inline-block; }
.res .nm { display: block; font-family: var(--display); font-size: 2rem; line-height: 1.2; margin-top: 6px; color: var(--ju); }
.res .mv { display: block; font-weight: 800; font-size: .95rem; }
.res .pc { display: block; color: var(--muted); font-size: .82rem; margin-top: 2px; }
.res .again { position: absolute; top: -10px; right: -6px; background: var(--hwang); color: #fff; font-size: .72rem; font-weight: 800; padding: 3px 9px; border-radius: 999px; transform: rotate(8deg); }
.res.bk .nm { color: var(--cheong); }
.res.bk .ani { transform: scaleX(-1); }
.note-sm { color: var(--muted); font-size: .9rem; margin: 18px 0 0; }

/* ── 기능 상자 ───────────────────────────────────────── */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; }
.bx {
  position: relative; overflow: hidden; border-radius: 26px; padding: 26px; background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow-sm); isolation: isolate;
}
.bx { display: flex; flex-direction: column; }
.bx h3 { font-size: 1.3rem; margin: 0 0 6px; letter-spacing: -.01em; }
.bx p { color: var(--muted); margin: 0; }
.bx .ic { font-size: 30px; line-height: 1; margin-bottom: 14px; display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 18px; background: var(--ju-soft); }
.span2 { grid-column: span 2; } .span3 { grid-column: span 3; } .span4 { grid-column: span 4; }
.bx.big { display: grid; grid-template-columns: 1fr; }
.bx .media { margin: auto -26px -26px; padding-top: 20px; overflow: hidden; }
.bx .media img { border-top: 1px solid var(--line); }
.bx .media img { width: 100%; }
.bx.dark { background: #1F1A17; color: #F1EAE0; border-color: #1F1A17; }
.bx.dark p { color: #C9BFB4; }
.bx.dark .ic { background: rgba(255, 255, 255, .08); }
.bx.ju { background: linear-gradient(150deg, #E2573A, #C23B26); color: #fff; border-color: transparent; }
.bx.ju p { color: rgba(255, 248, 240, .88); }
.bx.ju .ic { background: rgba(255, 255, 255, .16); }
.bx.ju .tags { margin-top: auto; padding-top: 18px; }
.bx.ju .tags span { background: rgba(255, 255, 255, .16); color: #fff; border-color: rgba(255, 255, 255, .35); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.tags span { padding: 4px 11px; border-radius: 999px; font-size: .85rem; font-weight: 800; background: var(--bg-2); color: var(--ink); border: 1px solid var(--line); }
.tags .red { background: #D2452F; color: #fff; border-color: #D2452F; }
.tags .gold { background: #C98A12; color: #fff; border-color: #C98A12; }
.soon { display: inline-block; font-size: .75rem; font-weight: 800; padding: 3px 10px; border-radius: 999px; background: var(--hwang-soft); color: var(--hwang); margin-left: 6px; vertical-align: 3px; }
.chain { display: flex; align-items: center; gap: 0; margin-top: 18px; }
.chain i { flex: none; width: 44px; height: 44px; border-radius: 12px; background: rgba(255, 255, 255, .08); border: 1.5px solid rgba(255, 255, 255, .25); display: grid; place-items: center; font-style: normal; font-size: .72rem; font-weight: 800; color: #F2C14E; font-family: ui-monospace, Menlo, monospace; }
.chain b { flex: 1; min-width: 10px; max-width: 34px; height: 2px; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .45) 0 4px, transparent 4px 8px); }
.robots { display: flex; gap: 6px; margin-top: 14px; font-size: 28px; }
.robots span { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--bg-2); position: relative; }
.robots span::after { content: ""; position: absolute; right: -4px; bottom: -4px; width: 20px; height: 16px; border-radius: 6px; background: #1F1A17; border: 2px solid var(--surface); }
.robots span::before { content: ""; position: absolute; right: 7px; bottom: 3px; width: 3px; height: 3px; border-radius: 50%; background: #7FE0FF; box-shadow: -6px 0 0 #7FE0FF; z-index: 1; }

/* ── 화면 갤러리 ─────────────────────────────────────── */
.gallery-wrap { position: relative; }
.gallery {
  display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 10px 16px 26px; margin: 0 -16px;
  scrollbar-width: none; cursor: grab;
}
.gallery::-webkit-scrollbar { display: none; }
.gallery.dragging { cursor: grabbing; scroll-snap-type: none; }
.gallery figure { flex: none; margin: 0; scroll-snap-align: center; }
.gallery .p { width: 210px; }
.gallery .p img { border-radius: 26px; border: 6px solid #1A1614; box-shadow: var(--shadow); aspect-ratio: 540 / 1170; object-fit: cover; }
.gallery .t { width: min(620px, 82vw); }
.gallery .t img { border-radius: 20px; border: 6px solid #1A1614; box-shadow: var(--shadow); aspect-ratio: 16 / 10; object-fit: cover; }
.gallery figcaption { margin-top: 12px; color: var(--muted); font-size: .93rem; font-weight: 700; text-align: center; }
.gallery img { pointer-events: none; user-select: none; -webkit-user-drag: none; }
.gal-nav { display: flex; gap: 8px; justify-content: flex-end; margin-top: -8px; }
.gal-nav button { width: 46px; height: 46px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font-size: 1.2rem; cursor: pointer; transition: background .2s; }
.gal-nav button:hover { background: var(--ju); color: #fff; border-color: var(--ju); }
html:not(.js) .gal-nav { display: none; }

/* 약속 띠 */
.promise { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 0; padding: 0; list-style: none; }
.promise li { padding: 22px 16px; border-radius: 22px; background: var(--surface); border: 1px dashed color-mix(in srgb, var(--ju) 45%, var(--line)); text-align: center; font-weight: 800; }
.promise li span { display: block; font-size: 38px; margin-bottom: 6px; }
.promise li small { display: block; font-weight: 600; color: var(--muted); font-size: .85rem; margin-top: 2px; }

/* ── 마지막 권유 ─────────────────────────────────────── */
.cta-band {
  position: relative; overflow: hidden; border-radius: 34px; padding: 56px 28px; text-align: center; color: #fff; isolation: isolate;
  background: radial-gradient(600px 300px at 20% 0%, rgba(255, 196, 120, .35), transparent 60%), linear-gradient(140deg, #D9502F, #B5341F);
  box-shadow: var(--shadow-lg);
}
.cta-band h2 { font-family: var(--display); font-weight: 400; font-size: clamp(2rem, 6vw, 3.2rem); line-height: 1.15; margin: 0 0 12px; }
.cta-band p { margin: 0 auto 26px; max-width: 32em; color: rgba(255, 248, 240, .88); }
.cta-band .sticks-deco { position: absolute; inset: 0; z-index: -1; opacity: .5; }
.cta-band .sticks-deco .stick { position: absolute; }

/* 아직 테스트 버전에 없는 기능: 눈에 띄게 */
.bx.upcoming { border: 2px dashed var(--hwang); background: color-mix(in srgb, var(--hwang) 7%, var(--surface)); padding-top: 54px; }
.bx.upcoming .ribbon {
  position: absolute; top: 0; left: 0; right: 0; padding: 7px 16px; font-size: .86rem; font-weight: 800; text-align: center;
  background: repeating-linear-gradient(-45deg, #C98A12 0 14px, #B97C0C 14px 28px); color: #fff; letter-spacing: .01em;
}
.bx.upcoming .ic, .bx.upcoming .robots { filter: saturate(.6); }
.bx.upcoming p { color: var(--muted); }
/* 자주 묻는 질문: 다른 절과 같은 폭, 넓은 화면은 두 줄 */
@media (min-width: 900px) {
  .faq-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; align-items: start; }
}

/* ── 좁은 화면 ── */
@media (max-width: 960px) {
  .hero .wrap, .play-grid { grid-template-columns: 1fr; }
  .stage { height: 470px; max-width: 420px; width: 100%; margin: 0 auto; }
  .stage .phone.main { width: 220px; margin-left: -80px; }
  .stage .phone.back { width: 180px; margin-left: -200px; top: 60px; }
  .steps3 { grid-template-columns: 1fr; }
  .step3 { display: grid; grid-template-columns: 1fr 112px; column-gap: 16px; padding: 20px 18px; }
  .step3 .no, .step3 h3, .step3 p { grid-column: 1; }
  .step3 p { margin: 0; }
  .step3 .shot { grid-column: 2; grid-row: 1 / span 3; align-self: center; height: auto; margin: 0; padding: 4px; border-radius: 18px; }
  .step3 .shot img { border-radius: 14px; }
  .cta-band .sticks-deco { opacity: .28; }
  .results { grid-template-columns: repeat(3, 1fr); }
  .bento { grid-template-columns: 1fr 1fr; }
  .span2, .span3, .span4 { grid-column: span 2; }
  .bx.half { grid-column: span 1; }
  .promise { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .hero { padding: 92px 0 96px; }
  .stage { height: 420px; }
  .stage .phone.main { width: 196px; border-radius: 34px; margin-left: -66px; }
  .stage .phone.back { width: 160px; margin-left: -168px; }
  .token { width: 56px; height: 56px; font-size: 30px; box-shadow: 0 0 0 5px var(--c), 0 12px 24px -10px rgba(60, 10, 0, .55); }
  .t2, .t4 { width: 50px; height: 50px; font-size: 26px; }
  .pop { font-size: 2.4rem; right: 0; }
  .bx { padding: 22px; }
  .bx .media { margin: 18px -22px -22px; }
  .bx.half { grid-column: span 2; }
  .stats b { font-size: 2.5rem; }
  .gallery .p { width: 180px; }
}
