/* Figlings site. Same palette as the game: plum surfaces, gold trim, paper sheets, toy buttons. */
@font-face { font-family: 'Lilita One'; src: url('/fonts/LilitaOne-Regular.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'Fredoka'; src: url('/fonts/Fredoka.ttf') format('truetype'); font-weight: 300 700; font-display: swap; }

:root {
  --plum950: #120D18; --plum900: #17112A; --plum850: #1B1530; --plum800: #221A3B; --plum700: #2E2450; --plum600: #3A2D63;
  --frame: #4A3A7E; --frame-light: #7B63C9; --trim: #D9A441; --trim-hi: #FFD873;
  --paper: #FFF8EC; --paper2: #F3E7D3; --paper-line: #E2D3BC; --ink: #2A2140; --ink2: #6E6488;
  --text: #FFF8EC; --text2: #CFC4F0; --muted: #8C84A6;
  --teal: #2EC4B6; --teal-dark: #1A8C82; --green: #52C95A; --green-dark: #2E8A3A; --mana: #4FC3F7; --gold: #FFC93C;
  --kw-damage: #D93A3A; --kw-buff: #2E9E48; --kw-control: #7B5CE0;
  --display: 'Lilita One', 'Fredoka', system-ui, sans-serif; --body: 'Fredoka', system-ui, sans-serif;
  --r: 18px; --shadow: 0 10px 30px rgba(0,0,0,.35);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--plum900) radial-gradient(1200px 600px at 50% -200px, #3A2D63 0%, var(--plum900) 60%); color: var(--text); font-family: var(--body); font-size: 17px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--trim-hi); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, .display { font-family: var(--display); font-weight: 400; letter-spacing: .01em; line-height: 1.1; margin: 0 0 .4em; text-shadow: 0 2px 0 rgba(0,0,0,.35); }
h1 { font-size: clamp(34px, 6vw, 52px); } h2 { font-size: clamp(26px, 4vw, 36px); margin-top: 1.6em; } h3 { font-size: 22px; }
p { margin: 0 0 1em; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 24px 16px; }
.lead { font-size: 19px; color: var(--text2); max-width: 68ch; }
.small { font-size: 14px; color: var(--muted); }
.note { font-size: 14px; color: var(--muted); margin-top: 8px; }
.ico { display: inline-block; vertical-align: -3px; width: 18px; height: 18px; }

/* Header and footer */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 18px; padding: 10px 16px; background: rgba(18,13,24,.85); backdrop-filter: blur(10px); border-bottom: 2px solid var(--frame); }
.brand img { width: 120px; height: auto; }
.links { display: flex; gap: 4px; margin-left: auto; }
.links a { padding: 8px 12px; border-radius: 12px; color: var(--text2); font-weight: 600; }
.links a:hover, .links a.on { background: var(--plum700); color: var(--text); text-decoration: none; }
.burger { display: none; width: 44px; height: 44px; border: 0; background: var(--plum700); border-radius: 12px; cursor: pointer; flex-direction: column; justify-content: center; gap: 5px; align-items: center; }
.burger span { width: 20px; height: 3px; background: var(--text); border-radius: 2px; }
.drawer { display: none; flex-direction: column; background: var(--plum850); border-bottom: 2px solid var(--frame); }
.drawer a { padding: 14px 20px; border-top: 1px solid var(--plum700); color: var(--text); font-weight: 600; }
@media (max-width: 760px) { .links, .top .btn-play { display: none; } .burger { display: flex; margin-left: auto; } .menu-open .drawer { display: flex; } }
.foot { margin-top: 60px; padding: 40px 16px; text-align: center; color: var(--muted); font-size: 14px; border-top: 2px solid var(--plum700); }
.foot img { margin: 0 auto 12px; width: 100px; opacity: .8; }
.foot-links a { color: var(--text2); }

/* Buttons: chunky toys with a highlight and a dark lip */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 26px; border-radius: 16px; font-family: var(--display); font-size: 21px; letter-spacing: .02em; color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.35); border: 0; cursor: pointer; text-decoration: none !important; box-shadow: inset 0 3px 0 rgba(255,255,255,.35), inset 0 -5px 0 rgba(0,0,0,.28), 0 6px 14px rgba(0,0,0,.35); transition: transform .08s; }
.btn:active { transform: translateY(3px); box-shadow: inset 0 3px 0 rgba(255,255,255,.35), inset 0 -2px 0 rgba(0,0,0,.28); }
.btn-play { background: linear-gradient(#78E07E, var(--green) 45%, var(--green-dark)); }
.btn-store { background: linear-gradient(#FFE38A, var(--gold) 45%, #C98A12); color: #3B2600; text-shadow: 0 1px 0 rgba(255,255,255,.4); }
.btn-ghost { background: linear-gradient(var(--frame-light), var(--frame) 50%, #352A5F); }
.btn-sm { padding: 9px 16px; font-size: 17px; border-radius: 12px; }
.btn-soon { opacity: .55; cursor: default; flex-direction: column; gap: 0; line-height: 1; }
.btn-soon small { font-family: var(--body); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 18px 0; }
.cta-box { text-align: center; padding: 36px 16px; margin-top: 40px; background: var(--plum800); border: 2px solid var(--frame); border-radius: 24px; }
.cta-box h2 { margin-top: 0; } .cta-box .cta-row { justify-content: center; }

/* Home hero */
.hero { position: relative; overflow: hidden; background: url('/game/scenery/sky_wide.jpg') center / cover; }
.hero-in { position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; min-height: 520px; display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: 20px; padding: 40px 16px 20px; }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(23,17,42,.1), rgba(23,17,42,.55) 55%, rgba(23,17,42,.85)), linear-gradient(0deg, var(--plum900), transparent 30%); pointer-events: none; }
.hero > * { position: relative; z-index: 1; }
.hero-figs { position: relative; height: 440px; max-width: 600px; }
.hero-figs img { position: absolute; bottom: 0; width: auto; height: 70%; filter: drop-shadow(0 18px 14px rgba(0,0,0,.45)); animation: breathe 3.2s ease-in-out infinite; }
.hf-0 { left: 50%; transform: translateX(-50%); height: 82%; z-index: 3; animation-name: breathe-c; } .hf-1 { left: 0; z-index: 2; animation-delay: -1s; } .hf-2 { right: 0; z-index: 2; animation-delay: -2s; }
.hf-3 { left: 12%; height: 50%; z-index: 1; bottom: 150px; opacity: .85; animation-delay: -.5s; } .hf-4 { right: 12%; height: 48%; z-index: 1; bottom: 150px; opacity: .85; animation-delay: -1.6s; }
@keyframes breathe-c { 0%, 100% { transform: translateX(-50%) translateY(0) } 50% { transform: translateX(-50%) translateY(-6px) } }
@keyframes breathe { 0%, 100% { transform: translateY(0) } 50% { transform: translateY(-6px) } }
.hero-logo { width: min(420px, 80%); filter: drop-shadow(0 8px 10px rgba(0,0,0,.4)); }
.hero-tag { font-family: var(--display); font-size: clamp(26px, 4vw, 38px); text-shadow: 0 3px 0 rgba(0,0,0,.4); margin: 14px 0 6px; }
.hero-sub { color: var(--text2); font-size: 19px; max-width: 46ch; }
@media (max-width: 820px) { .hero-in { grid-template-columns: 1fr; text-align: center; padding-top: 24px; } .hero-figs { height: 300px; order: 2; margin: 0 auto; width: 100%; } .hero-text { display: flex; flex-direction: column; align-items: center; } .hero-sub { max-width: none; } .cta-row { justify-content: center; } }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feat { background: var(--plum800); border: 2px solid var(--frame); border-radius: var(--r); padding: 22px; }
.feat img { width: 56px; margin-bottom: 10px; filter: drop-shadow(0 4px 4px rgba(0,0,0,.4)); }
.feat h3 { color: var(--trim-hi); } .feat p { color: var(--text2); margin: 0; }
@media (max-width: 760px) { .features { grid-template-columns: 1fr; } }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sec-head h2 { margin-top: 1.2em; } .more { font-family: var(--display); font-size: 19px; }

/* Collection cards */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.grid-sm { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.ucard { --r: #8FA3B8; position: relative; display: flex; flex-direction: column; align-items: center; padding: 10px 8px 10px; border-radius: 16px; background: linear-gradient(var(--plum700), var(--plum850)); border: 3px solid var(--r); box-shadow: inset 0 0 0 2px rgba(0,0,0,.35), 0 6px 14px rgba(0,0,0,.35); color: var(--text); text-decoration: none !important; transition: transform .12s, box-shadow .12s; cursor: pointer; }
.ucard:hover { transform: translateY(-4px); box-shadow: inset 0 0 0 2px rgba(0,0,0,.35), 0 12px 22px rgba(0,0,0,.45), 0 0 0 3px color-mix(in srgb, var(--r) 55%, transparent); }
.ucard img { width: 100%; aspect-ratio: 1; object-fit: contain; filter: drop-shadow(0 6px 5px rgba(0,0,0,.45)); }
.ucard-top { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); display: flex; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-family: var(--display); font-size: 15px; background: linear-gradient(#5ED1FF, var(--mana) 50%, #1C7FB8); color: #fff; text-shadow: 0 1px 0 rgba(0,0,0,.4); box-shadow: 0 2px 5px rgba(0,0,0,.4); white-space: nowrap; }
.badge-hero { background: linear-gradient(#FFE38A, var(--gold) 50%, #C98A12); color: #3B2600; text-shadow: none; }
.ucard-name { font-family: var(--display); font-size: 18px; margin-top: 4px; text-shadow: 0 2px 0 rgba(0,0,0,.4); }
.ucard-role { font-size: 13px; color: var(--text2); }
.ucard-classes { display: flex; gap: 4px; margin-top: 6px; }
.ucard-classes i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 1.5px rgba(0,0,0,.35); }
.ucard.big { max-width: 300px; padding-top: 18px; }
.ucard.big .ucard-name { font-size: 24px; }
.ucard.sm .ucard-name { font-size: 15px; } .ucard.sm .ucard-role { display: none; }
.ucard[hidden] { display: none; }

/* Chips and pills */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 20px; }
.chip { display: inline-block; padding: 4px 12px; border-radius: 999px; font-family: var(--display); font-size: 15px; letter-spacing: .02em; background: var(--c, var(--frame)); color: #fff; text-shadow: 0 1px 0 rgba(0,0,0,.4); box-shadow: inset 0 -2px 0 rgba(0,0,0,.25); }
.chip-link:hover { text-decoration: none; filter: brightness(1.12); }
.pill { display: inline-block; padding: 4px 12px; border-radius: 999px; font-family: var(--display); font-size: 15px; background: var(--c); color: #fff; text-shadow: 0 1px 0 rgba(0,0,0,.4); box-shadow: inset 0 -2px 0 rgba(0,0,0,.25); }

/* Paper sheets */
.sheet { background: var(--paper); color: var(--ink); border-radius: var(--r); padding: 18px 20px; margin: 14px 0; border: 3px solid var(--trim); box-shadow: inset 0 0 0 2px #fff, var(--shadow); }
.sheet h2, .sheet h3 { color: var(--frame); text-shadow: none; margin-top: 0; }
.sheet a { color: #5C42B5; }
.sheet ul { padding-left: 20px; } .sheet li { margin-bottom: 8px; }
.kw { font-weight: 700; } .kw-damage { color: var(--kw-damage); } .kw-buff { color: var(--kw-buff); } .kw-control { color: var(--kw-control); } .kw-trigger, .kw-area { color: var(--ink); }
.power { font-size: 20px; line-height: 1.45; margin: 0; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; } }
table.stats { width: 100%; border-collapse: collapse; font-size: 16px; margin-bottom: 10px; }
.stats th { text-align: left; color: var(--ink2); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; padding: 6px 8px; border-bottom: 2px solid var(--paper-line); }
.stats td { padding: 8px; border-bottom: 1px solid var(--paper-line); font-weight: 600; }
.stats td:first-child { color: var(--ink2); font-weight: 500; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 10px 0 0; }
.facts dt { color: var(--ink2); } .facts dd { margin: 0; font-weight: 600; }
.upgrades { list-style: none; padding: 0; margin: 0; }
.upgrades li { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; padding: 10px 0; border-bottom: 1px solid var(--paper-line); }
.upgrades li:last-child { border-bottom: 0; }
.upgrades .up-star { grid-row: span 2; color: var(--gold); font-size: 18px; text-shadow: 0 1px 0 #a06a00; min-width: 56px; }
.upgrades b { color: var(--frame); font-family: var(--display); font-weight: 400; font-size: 19px; }
.terms { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px 20px; margin: 0; }
.terms dt { display: inline; } .terms dd { display: inline; margin: 0 0 0 6px; color: var(--ink2); }
.class-row { display: grid; gap: 4px; padding: 10px 12px; margin-bottom: 8px; border-left: 6px solid var(--c); background: var(--paper2); border-radius: 10px; }
.class-row b { font-family: var(--display); font-weight: 400; font-size: 19px; color: var(--frame); }
.class-row em { font-style: normal; font-weight: 700; color: var(--ink); }

/* Unit page */
.crumbs { color: var(--muted); font-size: 14px; } .crumbs a { color: var(--text2); }
.unit-head { display: grid; grid-template-columns: 300px 1fr; gap: 24px; align-items: start; }
@media (max-width: 760px) { .unit-head { grid-template-columns: 1fr; } .unit-card-col { display: flex; justify-content: center; } }
.unit-role { color: var(--text2); font-size: 18px; margin: -4px 0 10px; }
.unit-tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.unit-plain { color: var(--text2); }

/* Scene: pose sheet over a scenery, looping an attack */
.scene { position: relative; overflow: hidden; border-radius: 22px; border: 3px solid var(--trim); box-shadow: var(--shadow); background: var(--bg) center 70% / cover; min-height: 400px; display: grid; place-items: end center; }
.scene::before { content: ''; position: absolute; inset: 0; background: linear-gradient(transparent 55%, rgba(18,13,24,.55)); }
.scene::after { content: ''; position: absolute; left: 50%; bottom: 46px; width: 240px; height: 50px; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(rgba(0,0,0,.45), transparent 70%); }
.pose { position: relative; z-index: 1; width: min(600px, 96%); margin-bottom: 36px; background: var(--sheet) no-repeat; background-size: 400% 400%; background-position: var(--idle); filter: drop-shadow(0 6px 6px rgba(0,0,0,.35)); }
.pose.anim { animation: attack 2.2s steps(1, end) infinite; }
@keyframes attack { 0%, 58% { background-position: var(--idle); } 59%, 71% { background-position: var(--windup); } 72%, 88% { background-position: var(--strike); } 89%, 100% { background-position: var(--idle); } }
@media (prefers-reduced-motion: reduce) { .pose.anim { animation: none; background-position: var(--strike); } .hero-figs img { animation: none; } }
.scene-fig { position: relative; z-index: 1; width: min(360px, 80%); margin-bottom: 40px; filter: drop-shadow(0 8px 8px rgba(0,0,0,.4)); }
.scene-ctl { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; padding: 8px; background: rgba(18,13,24,.7); }
.scene-ctl button { border: 0; padding: 6px 12px; border-radius: 999px; background: var(--plum700); color: var(--text2); font-family: var(--body); font-weight: 600; font-size: 14px; cursor: pointer; }
.scene-ctl button.on { background: var(--trim); color: #3B2600; }

/* Filters */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.filters input, .filters select { font: inherit; padding: 9px 12px; border-radius: 12px; border: 2px solid var(--frame); background: var(--plum800); color: var(--text); min-width: 150px; }
.filters input { flex: 1 1 200px; }
.count { color: var(--muted); font-size: 14px; }
.empty { color: var(--text2); padding: 30px; text-align: center; }

/* Classes page */
.sticky-chips { position: sticky; top: 66px; z-index: 5; padding: 10px 0; background: var(--plum900); }
.class-block { margin: 20px 0 36px; padding: 18px; border-radius: 22px; background: var(--plum800); border: 2px solid var(--frame); border-top: 8px solid var(--c); scroll-margin-top: 130px; }
.class-head h2 { margin-top: 0; color: var(--c); } .class-head p { color: var(--text2); }
.tiers { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.tier { display: flex; gap: 12px; align-items: center; background: var(--paper); color: var(--ink); border-radius: 14px; padding: 10px 14px; }
.tier p { margin: 0; font-weight: 600; }
.tier-n { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: var(--c); color: #fff; font-family: var(--display); font-size: 22px; text-shadow: 0 1px 0 rgba(0,0,0,.4); }
@media (max-width: 600px) { .tiers { grid-template-columns: 1fr; } }

/* Team builder */
.team-slots { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin: 16px 0; }
@media (max-width: 700px) { .team-slots { grid-template-columns: repeat(3, 1fr); } }
.slot-empty { aspect-ratio: .8; border: 3px dashed var(--frame); border-radius: 16px; display: grid; place-items: center; color: var(--muted); font-family: var(--display); font-size: 18px; }
.ucard.picked { border-color: var(--trim-hi); }
.team-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.stat { background: var(--plum800); border: 2px solid var(--frame); border-radius: 14px; padding: 10px 14px; }
.stat b { display: block; font-family: var(--display); font-size: 30px; font-weight: 400; color: var(--trim-hi); } .stat span { font-size: 13px; color: var(--text2); }
.bonuses { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.bonus { padding: 8px 12px; border-radius: 12px; border-left: 6px solid var(--c); background: var(--plum800); opacity: .6; }
.bonus.on { opacity: 1; background: var(--paper); color: var(--ink); }
.bonus b { display: block; font-family: var(--display); font-weight: 400; } .bonus span { font-size: 14px; }
.team-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
@media (max-width: 600px) { .team-summary { grid-template-columns: 1fr 1fr; } }
.prose .sheet h2 { font-size: 26px; }
