/* home: 이번 주 시세 변동 — tokens from styles.css */
.movers { margin: 8px 0 40px; }
.movers-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.movers-head h2 { font: 800 clamp(22px, 3.2vw, 30px)/1.2 var(--sans); letter-spacing: -.03em; }
.movers-updated { margin-top: 4px; color: var(--muted); font-size: 12px; }
.movers-tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--paper-2); }
.movers-tab { min-height: 36px; padding: 0 16px; border: 0; border-radius: 999px; background: none; color: var(--ink-2); font: 700 14px/1 var(--sans); cursor: pointer; }
.movers-tab[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 4px rgb(0 0 0 / .12); }
.movers-tab[data-kind="up"][aria-selected="true"] { color: #d1495b; }
.movers-tab[data-kind="down"][aria-selected="true"] { color: #2f7fd1; }
.movers-list { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); gap: 12px; margin: 0; padding: 2px 2px 10px; list-style: none; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.mover { scroll-snap-align: start; }
.mover-link { display: grid; grid-template-columns: 64px minmax(0, 1fr); grid-template-rows: auto auto; gap: 4px 12px; height: 100%; padding: 12px; border-radius: 16px; background: var(--surface); box-shadow: 0 0 0 1px var(--line), var(--shadow-sm); color: var(--ink); text-decoration: none; transition: transform 160ms ease; }
.mover-link:hover { transform: translateY(-2px); }
.mover-art { position: relative; grid-row: 1 / 3; display: block; width: 64px; aspect-ratio: 63 / 88; overflow: hidden; border-radius: 6px; background: var(--paper-2); }
.mover-art img { width: 100%; height: 100%; object-fit: cover; }
.mover-rank { position: absolute; left: 4px; top: 4px; display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: rgb(0 0 0 / .72); color: #fff; font: 800 11px/1 var(--sans); }
.mover-copy { display: grid; gap: 2px; min-width: 0; }
.mover-copy small { overflow: hidden; color: var(--muted); font-size: 11px; white-space: nowrap; text-overflow: ellipsis; }
.mover-copy strong { overflow: hidden; font: 800 14px/1.3 var(--sans); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.mover-price { color: var(--ink-2); font-size: 12px; }
.mover-change { align-self: end; justify-self: start; padding: 4px 9px; border-radius: 999px; font: 800 13px/1 var(--sans); }
.mover-change.is-up { background: color-mix(in srgb, #d1495b 14%, transparent); color: #d1495b; }
.mover-change.is-down { background: color-mix(in srgb, #2f7fd1 14%, transparent); color: #2f7fd1; }
@media (max-width: 560px) { .movers-list { grid-auto-columns: 78%; } }

/* ---------- hero: stats ---------- */
.hero-stats { display: flex; flex-wrap: wrap; gap: 12px 34px; margin: 40px 0 0; }
.hero-stats div { display: grid; gap: 4px; }
.hero-stats dt { color: #a69f94; font-size: 12px; letter-spacing: .02em; }
.hero-stats dd { margin: 0; color: #a69f94; font-size: 14px; }
.hero-stats b {
  margin-right: 2px; font: 800 clamp(24px, 2.6vw, 32px)/1 var(--sans); letter-spacing: -.03em;
  background: linear-gradient(100deg, #fff6de, #e8c98a 55%, #fff6de); -webkit-background-clip: text; background-clip: text; color: transparent;
  font-variant-numeric: tabular-nums;
}
.hero-stats b span { color: inherit; }
/* the four hero buttons fit on one line */
.hero .hero-actions { gap: 8px; }
.hero .hero-action, .hero .hero-link { min-height: 46px; padding: 0 18px; gap: 9px; font-size: 14px; }

/* ---------- hero: TOP 시세 ticker ---------- */
.hero-ticker {
  grid-column: 1 / -1; align-self: end; position: relative; z-index: 14;
  display: flex; align-items: center; gap: 12px;
  margin: 0 -1px -1px; padding: 0 0 0 20px; height: 46px;
  border-top: 1px solid rgb(214 178 112 / .22);
  background: rgb(12 11 15 / .72); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.hero-ticker-tag { flex: none; padding: 5px 10px; border-radius: 999px; background: linear-gradient(110deg, #e8c98a, #fff3d2); color: #1c1430; font: 800 11px/1 var(--sans); letter-spacing: .08em; }
.hero-ticker-window { position: relative; flex: 1; overflow: hidden; height: 100%;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 4%, #000 92%, transparent); }
.hero-ticker-track { display: flex; align-items: center; height: 100%; width: max-content; }
.hero-ticker-item { display: inline-flex; align-items: center; gap: 8px; padding: 0 22px; height: 100%; color: #e4dccf; font: 600 13px/1 var(--sans); white-space: nowrap; text-decoration: none; }
.hero-ticker-item:hover { color: #fff; }
.hero-ticker-item + .hero-ticker-item { border-left: 1px solid rgb(255 255 255 / .08); }
.hero-ticker-rank { display: grid; place-items: center; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 6px; background: rgb(232 201 138 / .16); color: #e8c98a; font: 800 10px/1 var(--sans); }
.hero-ticker-item b { color: #ffd98f; font-weight: 800; font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: no-preference) {
  .hero-ticker-track { animation: ticker-roll var(--ticker-duration, 90s) linear infinite; }
  .hero-ticker:hover .hero-ticker-track, .hero-ticker:focus-within .hero-ticker-track { animation-play-state: paused; }
  @keyframes ticker-roll { to { transform: translateX(-50%); } }
}
@media (prefers-reduced-motion: reduce) { .hero-ticker-window { overflow-x: auto; } }
@media (max-width: 740px) {
  .hero-ticker { position: relative; margin-top: 18px; height: 42px; padding-left: 14px; }
  .hero-ticker-item { padding: 0 16px; font-size: 12px; }
  .hero-stats { gap: 8px 22px; margin: 18px 0 30px; }
  .hero-stats b { font-size: 22px; }
}

/* ---------- hero: the spotlight card tilts and its foil sweeps on its own (no hover needed) ---------- */
@property --rx { syntax: '<angle>'; inherits: true; initial-value: 0deg; }
@property --ry { syntax: '<angle>'; inherits: true; initial-value: 0deg; }
@property --mx { syntax: '<percentage>'; inherits: true; initial-value: 50%; }
@property --my { syntax: '<percentage>'; inherits: true; initial-value: 40%; }
@media (prefers-reduced-motion: no-preference) {
  .hero-card.is-spot:not(.is-tilting) {
    --holo: .7;
    transform: rotate(calc(var(--r) * .9)) translateY(calc(var(--lift, 0px) - 26px)) perspective(700px) rotateX(var(--rx)) rotateY(var(--ry)) scale(1.1);
    animation: spot-tilt 2.6s ease-in-out both;
  }
  .hero-card.is-spot:not(.is-tilting)::before { animation: none; }
  @keyframes spot-tilt {
    0%   { --rx: 0deg;  --ry: 0deg;   --mx: 10%; --my: 20%; }
    30%  { --rx: 7deg;  --ry: -12deg; --mx: 35%; --my: 35%; }
    65%  { --rx: -6deg; --ry: 12deg;  --mx: 80%; --my: 70%; }
    100% { --rx: 0deg;  --ry: 0deg;   --mx: 95%; --my: 85%; }
  }
}

/* ---------- hero copy: one-line title, and a tighter phone layout ---------- */
.hero .hero-title { font-size: clamp(38px, 4.3vw, 62px); }
.hero .hero-name { white-space: nowrap; }
.hero .hero-description { max-width: none; word-break: keep-all; }
@media (max-width: 740px) {
  .hero { margin-top: 8px; }
  .hero .hero-copy { padding: 22px 20px 0; }
  .hero .hero-title { margin-top: 0; font-size: clamp(30px, 10vw, 50px); }
  .hero .hero-brand { margin-bottom: .25em; }
  .hero .hero-description { margin: 10px 0 16px; font-size: 14.5px; line-height: 1.6; }
  .hero .hero-actions { gap: 6px; }
  .hero .hero-action, .hero .hero-link { min-height: 44px; flex: 1 1 auto; justify-content: center; padding: 0 8px; gap: 6px; font-size: 13px; white-space: nowrap; }
  .hero .hero-art { height: clamp(290px, 89vw, 390px); margin-top: -16px; }
}
@media (max-width: 360px) { .hero .hero-stats { gap: 8px 14px; } .hero .hero-stats b { font-size: 18px; } }

/* ---------- hero: a card going back into the fan ---------- */
.hero-gallery.is-dealt .hero-card:not(.is-spot):not(.is-settling) { animation: none; }
@media (prefers-reduced-motion: no-preference) {
  .hero-gallery .hero-card.is-settling:not(.is-spot):not(.is-tilting) { animation: spot-return 860ms cubic-bezier(.45, .05, .25, 1) both; }
  .hero-gallery .hero-card.is-settling:not(.is-spot):not(.is-tilting)::before { animation: foil-return 860ms ease-out both; }
  .hero-gallery .hero-card.is-settling::after { content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none; background: linear-gradient(105deg, transparent 35%, rgb(255 244 214 / .75) 50%, transparent 65%); animation: gleam-return 620ms ease-out both; }
  @keyframes spot-return {
    0%   { z-index: 10; transform: rotate(calc(var(--r) * .9)) translateY(calc(var(--lift, 0px) - 26px)) perspective(700px) rotateX(var(--rx0, 0deg)) rotateY(var(--ry0, 0deg)) scale(1.1);
           box-shadow: 0 0 0 1px rgb(255 236 200 / .45), 0 30px 60px -14px rgb(0 0 0 / .9), 0 0 70px -6px rgb(255 200 120 / .55); }
    30%  { z-index: 10; transform: rotate(calc(var(--r) * .85)) translateY(calc(var(--lift, 0px) - 40px)) perspective(700px) rotateX(6deg) rotateY(-18deg) scale(1.12);
           box-shadow: 0 0 0 1px rgb(255 236 200 / .6), 0 36px 64px -14px rgb(0 0 0 / .9), 0 0 90px 0 rgb(255 210 130 / .7); }
    58%  { z-index: 8; }
    74%  { transform: rotate(var(--r)) translateY(calc(var(--lift, 0px) + 12px)) perspective(700px) rotateX(-4deg) rotateY(7deg) scale(.975); }
    100% { transform: rotate(var(--r)) translateY(var(--lift, 0px)) perspective(700px) rotateX(0deg) rotateY(0deg) scale(1); }
  }
  @keyframes foil-return { 0%, 30% { opacity: .75; } 100% { opacity: var(--holo, 0); } }
  @keyframes gleam-return { from { transform: translateX(-90%); opacity: 1; } to { transform: translateX(90%); opacity: 0; } }
}

/* ---------- home: today's bonus pack ---------- */
.daily-pack { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px; margin: 22px 0 26px; padding: 14px 18px; border-radius: 18px; overflow: hidden; background: linear-gradient(110deg, #3a1f12, #5a2440 55%, #2a1c4a); color: #fff6e6; text-decoration: none; box-shadow: 0 14px 34px -18px rgb(90 30 60 / .9); }
.daily-pack[hidden] { display: none; }
.daily-pack-art { display: grid; place-items: center; width: 74px; height: 74px; }
.daily-pack-art img { max-width: 100%; max-height: 100%; object-fit: contain; filter: drop-shadow(0 8px 12px rgb(0 0 0 / .5)); }
.daily-pack-copy { display: grid; gap: 5px; min-width: 0; }
.daily-pack-copy small { color: #ffd36e; font: 800 12px/1.2 var(--sans); }
.daily-pack-copy strong { overflow: hidden; font: 800 17px/1.25 var(--sans); letter-spacing: -.02em; text-overflow: ellipsis; white-space: nowrap; }
.daily-pack-state { color: rgb(255 246 230 / .75); font-size: 12.5px; }
.daily-pack-go { padding: 11px 16px; border-radius: 999px; background: linear-gradient(110deg, #ffd36e, #ff9d5c 60%, #ff7ab6); color: #2a1408; font: 800 13.5px/1 var(--sans); white-space: nowrap; }
.daily-pack.is-used { filter: saturate(.6); }
.daily-pack.is-used .daily-pack-go { background: rgb(255 255 255 / .16); color: #fff6e6; }
.daily-pack::after { content: ''; position: absolute; inset: 0 auto 0 -40%; width: 30%; transform: skewX(-20deg); background: linear-gradient(90deg, transparent, rgb(255 255 255 / .2), transparent); pointer-events: none; }
@media (prefers-reduced-motion: no-preference) {
  .daily-pack:not(.is-used)::after { animation: daily-sweep 4.5s ease-in-out 1.5s infinite; }
  .daily-pack:not(.is-used) .daily-pack-art img { animation: daily-bob 2.6s ease-in-out infinite; }
  @keyframes daily-sweep { 0% { left: -40%; } 35%, 100% { left: 120%; } }
  @keyframes daily-bob { 50% { transform: translateY(-5px) rotate(-3deg); } }
}
@media (max-width: 560px) {
  .daily-pack { gap: 12px; padding: 12px; }
  .daily-pack-art { width: 58px; height: 58px; }
  .daily-pack-copy strong { font-size: 14.5px; }
  .daily-pack-go { padding: 10px 12px; font-size: 12.5px; }
}
