/* The December drop cards, in Keepsake's own look (Cabin / Ubuntu / Mynerve,
   brand red #d70913, 12px corners). Each card keeps a tiny moving preview of
   its game. Used by /december, the homepage section and the "More December
   games" row on every game's end screens. Follows html.light like the rest
   of the site. */
.ksd {
  --ksd-bg: #0d161a; --ksd-art: #0a1316; --ksd-text: #f0ece6; --ksd-sec: #8b949e;
  --ksd-line: rgba(255,255,255,.07); --ksd-line2: rgba(255,255,255,.14);
  --ksd-red: #d70913; --ksd-paper: #f7f1e6; --ksd-ink: #071013; --ksd-gold: #c9a84c;
  font-family: "Cabin", sans-serif;
}
html.light .ksd { --ksd-bg: #f7f3ed; --ksd-art: #ece8e2; --ksd-text: #1c1c18; --ksd-sec: #625e59; --ksd-line: rgba(0,0,0,.07); --ksd-line2: rgba(0,0,0,.14); }
.ksd__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 0 0 14px; }
.ksd__head h2, .ksd__head h3 { margin: 0; font-family: "Ubuntu", sans-serif; font-weight: 500; font-size: 22px; }
.ksd__head a { font-weight: 600; font-size: 14px; color: var(--ksd-red); text-decoration: none; white-space: nowrap; }
.ksd__head a:hover { text-decoration: underline; text-underline-offset: 4px; }
.ksd__row { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -20px; padding: 4px 20px 10px; scrollbar-width: none; }
.ksd__row::-webkit-scrollbar { display: none; }
.ksd__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 20px; }
.ksd-card { flex: none; width: 240px; scroll-snap-align: start; display: flex; flex-direction: column; border-radius: 12px; overflow: hidden; background: var(--ksd-bg); color: var(--ksd-text); text-decoration: none; border: 1px solid var(--ksd-line); transition: transform .25s, border-color .25s, box-shadow .25s; }
.ksd-card:hover { transform: translateY(-4px); border-color: var(--ksd-line2); box-shadow: 0 18px 40px -24px rgba(215,9,19,.45); }
.ksd-card:focus-visible { outline: 2px solid var(--ksd-red); outline-offset: 3px; }
.ksd__grid .ksd-card { width: auto; }
.ksd-card__art { position: relative; height: 150px; overflow: hidden; display: grid; place-items: center; background: var(--ksd-art); }
.ksd__grid .ksd-card__art { height: 200px; }
.ksd-card__body { padding: 16px 18px 18px; display: grid; gap: 6px; flex: 1; align-content: start; }
.ksd-card__body > b { font-family: "Ubuntu", sans-serif; font-weight: 500; font-size: 20px; line-height: 1.2; }
.ksd-card__body > span { font-size: 15px; line-height: 1.45; color: var(--ksd-sec); }
.ksd-card__foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.ksd-price { font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--ksd-sec); }
.ksd-price.is-paid { color: var(--ksd-red); }
.ksd-go { font-weight: 600; font-size: 14px; padding: 8px 14px; border-radius: 6px; background: var(--ksd-red); color: #fff; }

/* ── Unwrapped: a story slide filling its progress bar ── */
.a-story { background: radial-gradient(circle at 50% 45%, rgba(215,9,19,.22), var(--ksd-art) 70%); }
.a-story i { position: relative; width: 78px; height: 130px; border-radius: 10px; background: var(--ksd-red); box-shadow: 0 16px 28px -12px rgba(0,0,0,.6); display: grid; place-items: center; transform: rotate(-4deg); }
.a-story i::before { content: ""; position: absolute; top: 8px; left: 8px; right: 8px; height: 3px; border-radius: 2px; background: rgba(255,255,255,.3); }
.a-story i::after { content: ""; position: absolute; top: 8px; left: 8px; height: 3px; border-radius: 2px; background: #fff; animation: ksd-fill 3s linear infinite; }
.a-story i b { font-family: "Ubuntu", sans-serif; font-weight: 700; font-size: 21px; line-height: .95; text-align: center; color: #fff; }
.a-story i b em { display: block; font-family: "Mynerve", cursive; font-style: normal; font-weight: 400; font-size: 15px; }
@keyframes ksd-fill { from { width: 0; } to { width: calc(100% - 16px); } }

/* ── Kind Notes: a wax seal stamping an envelope ── */
.a-seal { background: radial-gradient(circle at 50% 55%, rgba(215,9,19,.18), var(--ksd-art) 70%); }
.a-seal i { position: relative; width: 124px; height: 82px; border-radius: 6px; background: var(--ksd-paper); box-shadow: 0 14px 26px -12px rgba(0,0,0,.55); }
.a-seal i::before { content: ""; position: absolute; inset: 0; background: #ebdfcc; clip-path: polygon(0 0, 100% 0, 50% 58%); border-radius: 6px; }
.a-seal i::after { content: "K"; position: absolute; left: 50%; top: 58%; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 47% 53% 49% 51%; background: radial-gradient(circle at 35% 30%, #f0464c, var(--ksd-red) 45%, #8a060c); color: #8a060c; font-family: "Mynerve", cursive; font-size: 18px; display: grid; place-items: center; box-shadow: 0 2px 0 #66050a; animation: ksd-stamp 3s cubic-bezier(.5,0,.3,1) infinite; }
@keyframes ksd-stamp { 0%, 30% { transform: translateY(-50px) scale(1.8); opacity: 0; } 45% { transform: scale(.85); opacity: 1; } 55%, 100% { transform: scale(1); opacity: 1; } }

/* ── Roast Me: VIOLATION stamp on a cue card ── */
.a-stamp { background: radial-gradient(circle at 50% 0%, rgba(255,214,150,.16), var(--ksd-art) 70%); }
.a-stamp i { position: relative; width: 142px; height: 88px; border-radius: 4px; background: var(--ksd-paper); transform: rotate(-3deg); box-shadow: 0 14px 26px -12px rgba(0,0,0,.6); }
.a-stamp i::before { content: ""; position: absolute; left: 0; right: 0; top: 18px; height: 2px; background: var(--ksd-red); opacity: .6; box-shadow: 0 16px 0 #c9d6e3, 0 32px 0 #c9d6e3, 0 48px 0 #c9d6e3; }
.a-stamp i::after { content: "VIOLATION"; position: absolute; left: 50%; top: 50%; padding: 2px 7px; border: 2px solid var(--ksd-red); border-radius: 4px; color: var(--ksd-red); font-family: "Ubuntu", sans-serif; font-weight: 700; font-size: 12px; letter-spacing: 2px; transform: translate(-50%, -50%) rotate(-14deg); animation: ksd-slam 3s cubic-bezier(.5,0,.3,1) infinite; }
@keyframes ksd-slam { 0%, 25% { transform: translate(-50%, -50%) rotate(-14deg) scale(3); opacity: 0; } 38% { transform: translate(-50%, -50%) rotate(-14deg) scale(.9); opacity: 1; } 46%, 100% { transform: translate(-50%, -50%) rotate(-14deg) scale(1); opacity: 1; } }

/* ── Quiz: a podium rising ── */
.a-podium { display: flex; align-items: flex-end; justify-content: center; gap: 6px; }
.a-podium i { width: 40px; border-radius: 6px 6px 0 0; animation: ksd-rise 3.2s cubic-bezier(.34,1.56,.64,1) infinite; transform-origin: bottom; }
.a-podium i:nth-child(1) { height: 62px; background: #8b949e; animation-delay: .1s; }
.a-podium i:nth-child(2) { position: relative; height: 96px; background: var(--ksd-red); }
.a-podium i:nth-child(2)::before { content: ""; position: absolute; left: 50%; top: -24px; width: 26px; height: 16px; margin-left: -13px; background: var(--ksd-gold); clip-path: polygon(0 30%, 25% 60%, 50% 0, 75% 60%, 100% 30%, 90% 100%, 10% 100%); }
.a-podium i:nth-child(3) { height: 44px; background: #5a6168; animation-delay: .2s; }
@keyframes ksd-rise { 0% { transform: scaleY(0); } 30%, 100% { transform: scaleY(1); } }

/* ── Secret Santa: the To / From ? ? ? tag swaying ── */
.a-tag i { position: relative; width: 114px; padding: 10px 12px; border-radius: 10px; background: var(--ksd-paper); color: var(--ksd-ink); transform-origin: 16px 14px; animation: ksd-sway 3.6s ease-in-out infinite; font-style: normal; box-shadow: 0 14px 26px -14px rgba(0,0,0,.6); }
.a-tag i::before { content: ""; position: absolute; left: 15px; top: -64px; width: 2px; height: 70px; background: var(--ksd-red); }
.a-tag i b { display: block; font-family: "Mynerve", cursive; font-weight: 400; font-size: 24px; line-height: 1.1; }
.a-tag i small { display: block; margin-top: 4px; font-family: "Ubuntu", sans-serif; font-weight: 700; font-size: 15px; letter-spacing: 3px; color: var(--ksd-red); }
.a-tag i u { display: block; width: 14px; height: 14px; border-radius: 50%; background: var(--ksd-art); box-shadow: inset 0 0 0 4px var(--ksd-paper); margin-bottom: 4px; }
@keyframes ksd-sway { 0%, 100% { transform: rotate(-7deg); } 50% { transform: rotate(3deg); } }

@media (prefers-reduced-motion: reduce) { .ksd *, .ksd *::before, .ksd *::after { animation: none !important; } }
