:root {
  --night: #111218;
  --night-soft: #1b1d26;
  --paper: #f4f1e8;
  --muted: #989ba6;
  --line: #353842;
  --lime: #baff29;
  --coral: #ff7048;
  --yellow: #ffd83d;
  --blue: #62a8ff;
  --display: "Arial Black", "Pretendard Variable", Pretendard, sans-serif;
  --body: "Pretendard Variable", Pretendard, "Noto Sans KR", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--night); }
body { min-width: 320px; min-height: 100vh; margin: 0; color: var(--paper); background: var(--night); font-family: var(--body); }
a { color: inherit; }
button { font: inherit; }
.skip-link { position: fixed; z-index: 1000; top: 8px; left: 8px; padding: 10px 14px; color: var(--night); background: var(--lime); transform: translateY(-150%); }
.skip-link:focus { transform: none; }
:where(a, button):focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }
.shell { width: min(1160px, calc(100% - 40px)); margin: 0 auto; }

.site-header { border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 66px; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font: 900 18px/1 var(--display); text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 30px; height: 30px; color: var(--night); background: var(--yellow); font-size: 9px; transform: rotate(-5deg); }
.account-back { color: var(--muted); font-size: 12px; font-weight: 800; text-decoration: none; }
.account-back:hover { color: var(--lime); }

.collection-wrap { width: min(1160px, calc(100% - 40px)); margin: 0 auto; padding: clamp(38px, 6vw, 74px) 0 80px; }
.collection-loading { min-height: 50vh; display: grid; place-items: center; color: var(--muted); font-size: 13px; }
.eyebrow { margin: 0 0 11px; color: var(--coral); font-size: 10px; font-weight: 900; letter-spacing: .18em; }

.collection-hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(330px, .85fr); min-height: 390px; border-bottom: 1px solid var(--line); }
.hero-copy { display: flex; flex-direction: column; justify-content: center; padding: 18px clamp(28px, 6vw, 78px) 42px 0; }
.hero-copy h1 { margin: 0; font: 900 clamp(42px, 8vw, 86px)/.92 var(--display); letter-spacing: -.055em; }
.hero-copy > p:not(.eyebrow) { max-width: 590px; margin: 28px 0 0; color: #c4c6ce; font-size: 15px; line-height: 1.8; }
.checkin-strip { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px; max-width: 590px; margin-top: 36px; padding: 13px 15px; border: 1px solid #484c39; background: #171a16; }
.checkin-strip span { color: var(--lime); font-size: 9px; font-weight: 900; letter-spacing: .14em; }
.checkin-strip strong { font-size: 12px; }
.checkin-strip b { color: var(--yellow); font-size: 11px; }

.current-stage { position: relative; display: grid; place-items: center; align-content: center; min-height: 390px; overflow: hidden; border-left: 1px solid var(--line); background: #171820; isolation: isolate; }
.current-stage::before { position: absolute; z-index: -1; inset: 12% 8%; border: 1px solid #2d303a; content: ""; transform: rotate(-4deg); }
.current-stage::after { position: absolute; z-index: -1; bottom: 42px; width: 220px; height: 22px; border-radius: 50%; background: rgb(0 0 0 / .45); content: ""; filter: blur(7px); }
.stage-label { position: absolute; top: 20px; left: 22px; color: var(--lime); font-size: 9px; font-weight: 900; letter-spacing: .16em; }
.current-stage > strong { margin-top: 24px; font: 900 19px/1.2 var(--display); }
.current-stage > small { max-width: 280px; margin-top: 8px; color: var(--muted); font-size: 11px; line-height: 1.5; text-align: center; }

.level-console { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 26px; margin: 30px 0 74px; padding: 20px 24px; border: 1px solid var(--line); background: var(--night-soft); }
.level-number { display: flex; align-items: baseline; gap: 8px; }
.level-number span, .collection-count span { color: var(--muted); font-size: 9px; font-weight: 900; letter-spacing: .14em; }
.level-number b { color: var(--lime); font: 900 44px/1 var(--display); }
.level-copy small { color: var(--coral); font-size: 10px; font-weight: 850; }
.level-copy strong { display: block; margin-top: 4px; font: 900 17px/1.2 var(--display); }
.level-copy strong b { color: var(--yellow); }
.level-meter { width: 100%; height: 5px; margin-top: 10px; overflow: hidden; background: #30333d; }
.level-meter i { display: block; width: 0; height: 100%; background: var(--lime); transition: width .55s cubic-bezier(.25, 1, .5, 1); }
.level-copy p { margin: 7px 0 0; color: var(--muted); font-size: 10px; }
.collection-count { min-width: 100px; text-align: right; }
.collection-count span { display: block; }
.collection-count b { display: block; margin-top: 5px; font: 900 24px/1 var(--display); }
.collection-count i { font-style: normal; }

.catalogue-head { display: flex; align-items: end; justify-content: space-between; gap: 28px; margin-bottom: 26px; }
.catalogue-head h2 { margin: 0; font: 900 clamp(28px, 4vw, 42px)/1 var(--display); letter-spacing: -.035em; }
.catalogue-filter { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.catalogue-filter button { min-height: 38px; padding: 0 13px; border: 1px solid var(--line); color: var(--muted); background: transparent; cursor: pointer; font-size: 11px; font-weight: 800; }
.catalogue-filter button:hover, .catalogue-filter button[aria-pressed="true"] { border-color: var(--lime); color: var(--night); background: var(--lime); }

.costume-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.costume-card { position: relative; display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 22px; min-height: 250px; padding: 24px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); animation: card-in .45s cubic-bezier(.25, 1, .5, 1) both; animation-delay: calc(var(--order) * 35ms); }
.costume-card:nth-child(2n) { border-right: 0; }
.costume-card.is-equipped { background: #181c16; box-shadow: inset 0 0 0 1px #5a6b32; }
.costume-card.is-anomaly { background: #14151d; }
.costume-card.is-anomaly.is-equipped { background: #191a13; }
.costume-card.is-anomaly .costume-visual { background-color: #12131a; background-image: linear-gradient(#252832 1px, transparent 1px), linear-gradient(90deg, #252832 1px, transparent 1px); background-size: 18px 18px; }
.costume-card.is-anomaly .costume-copy small { color: var(--coral); }
.costume-card.is-anomaly.is-unlocked:hover .itty-avatar { transform: translateY(-4px) scale(.92); }
.costume-visual { position: relative; display: grid; place-items: center; min-height: 170px; overflow: hidden; background: #171820; }
.costume-visual::after { position: absolute; bottom: 25px; width: 90px; height: 12px; border-radius: 50%; background: rgb(0 0 0 / .45); content: ""; filter: blur(4px); }
.costume-visual > span:last-child { position: absolute; z-index: 3; top: 10px; left: 11px; color: var(--muted); font-size: 8px; font-weight: 900; letter-spacing: .15em; }
.costume-copy { min-width: 0; padding-bottom: 48px; }
.costume-copy small { color: var(--lime); font-size: 9px; font-weight: 900; letter-spacing: .15em; }
.costume-card.is-locked .costume-copy small { color: #686b74; }
.costume-copy h3 { margin: 10px 0 9px; font: 900 17px/1.2 var(--display); }
.costume-copy p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.unlock-condition { display: flex; align-items: center; gap: 7px; margin-top: 15px; color: #c8cad2; font-size: 10px; font-weight: 750; }
.unlock-condition i { color: var(--yellow); font-style: normal; }
.costume-card > button { position: absolute; right: 84px; bottom: 24px; min-height: 40px; padding: 0 15px; border: 1px solid var(--lime); color: var(--night); background: var(--lime); cursor: pointer; font-size: 11px; font-weight: 900; }
.costume-card > button:hover:not(:disabled) { transform: translateY(-2px); }
.costume-card > button:disabled { border-color: #596449; color: var(--lime); background: transparent; cursor: default; }
.locked-label { position: absolute; right: 84px; bottom: 24px; color: #5f626c; font-size: 9px; font-weight: 900; letter-spacing: .14em; }
.costume-card.is-locked .costume-visual { filter: grayscale(1); opacity: .42; }
@keyframes card-in { from { opacity: 0; transform: translateY(10px); } }

/* ITTY is built from the same small control-room geometry as the live widget. */
.itty-avatar { --head: #292c35; --edge: var(--paper); --eyes: var(--lime); --body: var(--yellow); position: relative; z-index: 1; display: block; width: 108px; height: 124px; }
.itty-avatar.medium { width: 82px; height: 96px; transform: scale(.88); transition: transform .28s cubic-bezier(.25, 1, .5, 1); }
.avatar-antenna { position: absolute; top: 4px; left: 51px; width: 7px; height: 23px; background: var(--edge); }
.avatar-antenna::before { position: absolute; top: -6px; left: -5px; width: 17px; height: 17px; background: var(--eyes); content: ""; transform: rotate(45deg); }
.avatar-head { position: absolute; top: 27px; left: 10px; width: 88px; height: 67px; border: 8px solid var(--edge); background: var(--head); }
.avatar-head::before, .avatar-head::after { position: absolute; top: 20px; width: 13px; height: 17px; background: var(--eyes); content: ""; }
.avatar-head::before { left: 16px; }
.avatar-head::after { right: 16px; }
.avatar-mouth { position: absolute; z-index: 2; top: 77px; left: 44px; width: 21px; height: 7px; background: var(--edge); }
.avatar-body { position: absolute; bottom: 0; left: 31px; width: 47px; height: 31px; background: var(--body); }
.avatar-body::before, .avatar-body::after { position: absolute; top: 9px; width: 18px; height: 8px; background: var(--body); content: ""; }
.avatar-body::before { left: -18px; }
.avatar-body::after { right: -18px; }
.avatar-mark { position: absolute; z-index: 4; pointer-events: none; }
.itty-avatar[data-costume="campus"] { --head: #27313a; --edge: #e8f0df; --eyes: #baff29; --body: #62a8ff; }
.itty-avatar[data-costume="campus"] .avatar-mark { top: 18px; left: 5px; width: 98px; height: 12px; background: #62a8ff; transform: skewX(-14deg); }
.itty-avatar[data-costume="office"] { --head: #27282e; --edge: #efece2; --eyes: #ffd83d; --body: #d7d4cb; }
.itty-avatar[data-costume="office"] .avatar-mark { bottom: 8px; left: 50px; width: 9px; height: 23px; background: #ff7048; clip-path: polygon(50% 0,100% 35%,70% 100%,30% 100%,0 35%); }
.itty-avatar[data-costume="queue-pilot"] { --head: #211f1c; --edge: #ffd83d; --eyes: #ff7048; --body: #ff7048; }
.itty-avatar[data-costume="queue-pilot"] .avatar-mark { top: 41px; left: 3px; width: 102px; height: 14px; border: 4px solid #ffd83d; border-left: 0; border-right: 0; }
.itty-avatar[data-costume="type-ninja"] { --head: #1f2420; --edge: #dce8d6; --eyes: #baff29; --body: #232a24; }
.itty-avatar[data-costume="type-ninja"] .avatar-mark { top: 31px; left: 18px; width: 72px; height: 12px; background: #baff29; box-shadow: 52px 5px 0 -3px #baff29; }
.itty-avatar[data-costume="math-mage"] { --head: #252238; --edge: #eee9d8; --eyes: #62a8ff; --body: #7164af; }
.itty-avatar[data-costume="math-mage"] .avatar-mark { top: -2px; left: 25px; width: 60px; height: 33px; background: #7164af; clip-path: polygon(50% 0,100% 100%,0 100%); }
.itty-avatar[data-costume="timekeeper"] { --head: #22292d; --edge: #e8eee9; --eyes: #62a8ff; --body: #c9d6d2; }
.itty-avatar[data-costume="timekeeper"] .avatar-mark { top: 40px; left: 36px; width: 38px; height: 38px; border: 5px solid #62a8ff; border-radius: 50%; box-shadow: inset 10px 0 0 -8px #62a8ff; }
.itty-avatar[data-costume="archivist"] { --head: #302720; --edge: #eee6d8; --eyes: #ffd83d; --body: #a47350; }
.itty-avatar[data-costume="archivist"] .avatar-mark { top: 48px; left: 17px; width: 76px; height: 28px; border: 5px solid #d0aa72; border-radius: 50%; }
.itty-avatar[data-costume="streak-flare"] { --head: #34201c; --edge: #fff0d8; --eyes: #ffd83d; --body: #ff7048; }
.itty-avatar[data-costume="streak-flare"] .avatar-mark { top: -7px; left: 32px; width: 46px; height: 37px; background: #ff7048; clip-path: polygon(48% 0,62% 33%,83% 15%,76% 58%,100% 64%,66% 100%,25% 96%,0 64%,27% 49%); }
.itty-avatar[data-costume="pro-signal"] { --head: #20251c; --edge: #baff29; --eyes: #ffd83d; --body: #baff29; }
.itty-avatar[data-costume="pro-signal"] .avatar-mark { top: 15px; left: 16px; width: 78px; height: 18px; background: #ffd83d; clip-path: polygon(0 100%,12% 0,34% 70%,50% 0,67% 70%,88% 0,100% 100%); }
.itty-avatar[data-costume="signal-slime"] { --head: #587d37; --edge: #d9f2b0; --eyes: #baff29; --body: #7bab4a; }
.itty-avatar[data-costume="signal-slime"] .avatar-antenna { display: none; }
.itty-avatar[data-costume="signal-slime"] .avatar-head { top: 18px; left: 6px; width: 96px; height: 82px; border-width: 7px; border-radius: 48% 54% 40% 46%; }
.itty-avatar[data-costume="signal-slime"] .avatar-head::before, .itty-avatar[data-costume="signal-slime"] .avatar-head::after { top: 27px; }
.itty-avatar[data-costume="signal-slime"] .avatar-mouth { top: 76px; background: #d9f2b0; }
.itty-avatar[data-costume="signal-slime"] .avatar-body { bottom: 0; left: 28px; width: 52px; height: 15px; border-radius: 50%; }
.itty-avatar[data-costume="signal-slime"] .avatar-body::before, .itty-avatar[data-costume="signal-slime"] .avatar-body::after { display: none; }
.itty-avatar[data-costume="signal-slime"] .avatar-mark { top: 4px; right: 5px; width: 14px; height: 14px; border: 4px solid #d9f2b0; border-radius: 50%; box-shadow: -17px -5px 0 -3px #7bab4a; }
.itty-avatar[data-costume="orbit-nine"] { --head: #24333d; --edge: #dde9f0; --eyes: #66d8ff; --body: #ff7652; }
.itty-avatar[data-costume="orbit-nine"] .avatar-head { top: 24px; left: 10px; width: 88px; height: 88px; border-radius: 50%; }
.itty-avatar[data-costume="orbit-nine"] .avatar-head::before, .itty-avatar[data-costume="orbit-nine"] .avatar-head::after { top: 27px; }
.itty-avatar[data-costume="orbit-nine"] .avatar-mouth { top: 83px; background: #66d8ff; }
.itty-avatar[data-costume="orbit-nine"] .avatar-body { bottom: -5px; left: 45px; width: 18px; height: 12px; }
.itty-avatar[data-costume="orbit-nine"] .avatar-body::before, .itty-avatar[data-costume="orbit-nine"] .avatar-body::after { top: 8px; width: 10px; height: 13px; background: #ffd83d; }
.itty-avatar[data-costume="orbit-nine"] .avatar-body::before { left: -8px; transform: skewX(-18deg); }
.itty-avatar[data-costume="orbit-nine"] .avatar-body::after { right: -8px; transform: skewX(18deg); }
.itty-avatar[data-costume="orbit-nine"] .avatar-mark { top: 48px; left: -3px; width: 114px; height: 42px; border: 5px solid #66d8ff; border-right-color: transparent; border-radius: 50%; transform: rotate(-15deg); }
.itty-avatar[data-costume="glitch-ghost"] { --head: #ece8ff; --edge: transparent; --eyes: #ff7652; --body: transparent; }
.itty-avatar[data-costume="glitch-ghost"] .avatar-antenna, .itty-avatar[data-costume="glitch-ghost"] .avatar-body { display: none; }
.itty-avatar[data-costume="glitch-ghost"] .avatar-head { top: 8px; left: 5px; width: 98px; height: 112px; border: 0; clip-path: polygon(12% 0,88% 0,100% 17%,100% 100%,76% 82%,58% 100%,39% 82%,18% 100%,0 82%,0 17%); }
.itty-avatar[data-costume="glitch-ghost"] .avatar-head::before, .itty-avatar[data-costume="glitch-ghost"] .avatar-head::after { top: 38px; }
.itty-avatar[data-costume="glitch-ghost"] .avatar-mouth { top: 77px; background: #262338; }
.itty-avatar[data-costume="glitch-ghost"] .avatar-mark { top: 24px; right: -4px; width: 25px; height: 8px; background: #66d8ff; box-shadow: -96px 31px 0 #ff7652, 3px 63px 0 #baff29; }
.itty-avatar[data-costume="void-monolith"] { --head: #0d0e14; --edge: #676c7b; --eyes: #ff7652; --body: #676c7b; }
.itty-avatar[data-costume="void-monolith"] .avatar-antenna, .itty-avatar[data-costume="void-monolith"] .avatar-mouth { display: none; }
.itty-avatar[data-costume="void-monolith"] .avatar-head { top: 5px; left: 32px; width: 44px; height: 108px; border-width: 5px; clip-path: polygon(50% 0,100% 10%,88% 100%,12% 100%,0 10%); }
.itty-avatar[data-costume="void-monolith"] .avatar-head::before { top: 39px; left: 13px; width: 10px; height: 24px; }
.itty-avatar[data-costume="void-monolith"] .avatar-head::after { display: none; }
.itty-avatar[data-costume="void-monolith"] .avatar-body { bottom: 0; left: 39px; width: 30px; height: 8px; }
.itty-avatar[data-costume="void-monolith"] .avatar-body::before, .itty-avatar[data-costume="void-monolith"] .avatar-body::after { display: none; }
.itty-avatar[data-costume="void-monolith"] .avatar-mark { top: 24px; left: 17px; width: 7px; height: 7px; background: #676c7b; box-shadow: 77px 25px 0 #676c7b, -7px 66px 0 #ff7652, 68px 83px 0 #3d414c; }

.collection-foot { display: flex; justify-content: space-between; gap: 20px; width: min(1160px, calc(100% - 40px)); margin: 0 auto; padding: 22px 0 32px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }

@media (max-width: 820px) {
  .collection-hero { grid-template-columns: 1fr; }
  .hero-copy { padding-right: 0; }
  .current-stage { min-height: 350px; border-top: 1px solid var(--line); border-left: 0; }
  .costume-card { grid-template-columns: 124px minmax(0, 1fr); padding: 20px; }
  .costume-grid { grid-template-columns: 1fr; }
  .costume-card, .costume-card:nth-child(2n) { border-right: 0; }
}

@media (max-width: 560px) {
  .shell, .collection-wrap, .collection-foot { width: min(100% - 28px, 1160px); }
  .collection-wrap { padding-top: 34px; }
  .hero-copy h1 { font-size: clamp(40px, 16vw, 64px); }
  .checkin-strip { grid-template-columns: 1fr auto; }
  .checkin-strip span { grid-column: 1 / -1; }
  .level-console { grid-template-columns: auto minmax(0, 1fr); gap: 15px; padding: 18px 16px; }
  .collection-count { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; width: 100%; text-align: left; }
  .catalogue-head { align-items: flex-start; flex-direction: column; }
  .catalogue-filter { justify-content: flex-start; width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
  .catalogue-filter button { flex: 0 0 auto; }
  .costume-card { grid-template-columns: 104px minmax(0, 1fr); gap: 15px; min-height: 232px; padding: 16px; }
  .costume-visual { min-height: 150px; }
  .costume-card > button, .locked-label { right: 76px; bottom: 16px; }
  .collection-foot { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
