/* Traduire en jeu (js/features/loot.js) : la barre du jeu dans le bloc, les cartes à collectionner, l'album du livre */
:root { --r-rare: #2459b8; --r-legend: #c99412; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --r-rare: #7aa7f5; --r-legend: #f2c94c; } }
:root[data-theme="dark"] { --r-rare: #7aa7f5; --r-legend: #f2c94c; }
.r-rare, .pn-rare { --rc: var(--r-rare); } .r-legend, .pn-legend { --rc: var(--r-legend); }
/* the game strip at the top of the translate block (Wito and his tips are in it now) */
.wito-tip[data-wt="tr"] { display: none; }
.tr-panel > .gm-wrap { margin-bottom: 4px; }
.tr-panel > .gm-wrap + h2 { margin-top: 14px; }
/* a rare or legendary word in Traduire: the top of its card (the word and its translation) becomes a sticker —
   a white edge, a coloured frame, a numbered band, the word big on rays, the translation on a slanted plate, a footer.
   Rare: blue, one shine sweeps over it; legendary: gold, a moving rainbow foil. The other words keep their normal look. */
.entry.pn { padding-top: 40px; }
.pn-tools { position: absolute; top: 8px; right: 12px; display: flex; gap: 6px; align-items: center; z-index: 6; }
.pn-tools > .tr-del, .pn-tools > .del { position: static; margin: 0; font-size: 13px; padding: 4px 8px; }
.pn-card { --rc2: color-mix(in srgb, var(--rc) 55%, #0d1a22); position: relative; margin: 0 -2px 10px; padding: 7px; border-radius: 14px; background: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,.12), 0 12px 26px rgba(27,36,48,.18); transform: rotate(-.6deg); }
.pn-card::before { content: ""; position: absolute; inset: 7px; border-radius: 9px; border: 3px solid var(--rc); pointer-events: none; z-index: 4; }
.pn-legend::before { border-color: transparent; background: linear-gradient(135deg, #f7e08a, #c99412 30%, #fff3c4 50%, #b8860b 70%, #f2c94c) border-box;
  -webkit-mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.pn-top { display: flex; align-items: center; gap: 8px; padding: 7px 11px 6px; background: var(--rc); color: #fff; border-radius: 9px 9px 0 0; font: 800 13px/1 "Saira Condensed", var(--f-body); letter-spacing: .06em; }
.pn-legend .pn-top { background: linear-gradient(90deg, #b8860b, #e8c14c 50%, #b8860b); }
.pn-no { white-space: nowrap; text-transform: uppercase; }
.pn-book { flex: 1; min-width: 0; text-align: center; text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: .92; }
.pn-lv { display: grid; place-items: center; min-width: 28px; height: 24px; padding: 0 4px; background: #fff; color: var(--rc2); clip-path: polygon(50% 0, 100% 22%, 100% 78%, 50% 100%, 0 78%, 0 22%); font-size: 12.5px; }
.pn-pic { position: relative; overflow: hidden; padding: 18px 12px 0; text-align: center;
  background: radial-gradient(120% 90% at 50% 30%, color-mix(in srgb, var(--rc) 22%, #fff), color-mix(in srgb, var(--rc) 55%, #fff) 70%, var(--rc) 130%); }
.pn-pic::before { content: ""; position: absolute; inset: -20%; background: repeating-linear-gradient(115deg, rgba(255,255,255,.22) 0 7px, transparent 7px 24px); pointer-events: none; }
.pn-pic > .entry-head, .pn-pic > .entry-tr { position: relative; z-index: 3; }
.pn-pic > .entry-head { padding-top: 0 !important; grid-template-columns: 0 1fr 44px; min-height: 60px; }
.pn-pic > .entry-head > .entry-n { display: none; }
.pn-pic > .entry-head > .entry-w { font-size: 30px; color: #fff; overflow-wrap: anywhere; hyphens: auto;
  text-shadow: 0 2px 0 var(--rc2), 0 0 1px var(--rc2), 2px 0 0 var(--rc2), -2px 0 0 var(--rc2), 0 -2px 0 var(--rc2), 0 5px 12px rgba(0,0,0,.25); }
.pn-pic > .entry-head > .entry-w .art, .pn-pic > .entry-head > .entry-w [class*="art"] { color: #fff; }
.pn-pic > .entry-head > .say { background: rgba(255,255,255,.9); border-color: transparent; color: var(--rc2); }
.pn-pic > .entry-head > .entry-place { color: var(--rc2); font-weight: 600; }
.pn-pic > .entry-tr { margin: 14px -12px 0 !important; padding: 12px 14px 10px; background: var(--rc2); color: #fff; clip-path: polygon(0 16%, 100% 0, 100% 100%, 0 100%); }
.pn-pic > .entry-tr .tr-main { font: 800 22px/1.1 "Saira Condensed", var(--f-body) !important; letter-spacing: .04em; text-transform: uppercase; color: #fff; margin: 4px 0 2px; }
.pn-pic > .entry-tr .tr-alt, .pn-pic > .entry-tr .tr-alt-k { color: rgba(255,255,255,.82); }
.pn-pic > .entry-tr .sense-swap, .pn-pic > .entry-tr button { color: #fff; border-color: rgba(255,255,255,.5); background: transparent; }
.pn-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 6px 11px 7px; background: color-mix(in srgb, var(--rc) 12%, #fff); border-radius: 0 0 9px 9px; font: 700 11px/1 var(--f-body); letter-spacing: .07em; text-transform: uppercase; color: var(--rc2); }
.pn-stars { color: var(--rc); letter-spacing: 1px; font-size: 13px; }
.pn-legend .pn-stars { color: #c99412; }
.pn-shine { position: absolute; inset: 0; z-index: 2; pointer-events: none; background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.75) 48%, transparent 60%); transform: translateX(-120%); }
.pn-card.hit .pn-shine { animation: stk-sweep 1.1s ease .15s both; }
.pn-holo { position: absolute; inset: 0; z-index: 2; pointer-events: none; mix-blend-mode: overlay; opacity: .55;
  background: linear-gradient(115deg, #ff6b6b, #ffd93d, #6bff95, #6bd5ff, #b06bff, #ff6b6b); background-size: 300% 300%; animation: stk-holo 4s linear infinite; }
/* face down until it turns over */
.pn-back { display: none; position: absolute; inset: 0; z-index: 5; border-radius: 14px; place-items: center; align-content: center; gap: 8px; border: 7px solid #fff;
  background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--rc) 45%, #1d4a5a), #10262f 75%); overflow: hidden; }
.pn-back::before { content: ""; position: absolute; inset: 0; background: repeating-conic-gradient(from 0deg at 50% 40%, rgba(255,255,255,.07) 0 8deg, transparent 8deg 16deg); }
.pn-back svg, .pn-back span { position: relative; }
.pn-back span { font: 800 22px/1 "Saira Condensed", var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: #fff; }
.pn-card.down .pn-back { display: grid; animation: stk-glow 1s ease-in-out infinite alternate; }
.pn-card.shake { animation: pn-shake .45s ease both; }
.pn-card.hit { animation: pn-hit .9s cubic-bezier(.3,1.6,.5,1) both; }
.loot-spark { position: absolute; left: 50%; top: 50%; z-index: 7; width: 8px; height: 8px; border-radius: 50%; background: var(--rc); pointer-events: none; }
.pn-legend .loot-spark:nth-child(3n) { background: #fff3c4; }
@keyframes pn-shake { 0%,100% { transform: rotate(-.6deg) } 25% { transform: rotate(-2.5deg) scale(1.02) } 50% { transform: rotate(1.8deg) scale(1.03) } 75% { transform: rotate(-2deg) scale(1.02) } }
@keyframes pn-hit { 0% { transform: rotate(-.6deg) scale(1) } 35% { transform: rotate(-.6deg) scale(1.05) } 100% { transform: rotate(-.6deg) scale(1) } }
@keyframes stk-glow { from { box-shadow: inset 0 0 0 0 transparent } to { box-shadow: inset 0 0 34px 6px color-mix(in srgb, var(--rc) 75%, transparent) } }
@keyframes stk-sweep { to { transform: translateX(120%) } }
@keyframes stk-holo { 0% { background-position: 0% 50% } 100% { background-position: 300% 50% } }
/* the album of the book */
.tr-album { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 14px 16px; }
.tr-album .alb-h h3 { margin: 0 0 2px; font: 700 16px var(--f-display); }
.tr-album .alb-h p { margin: 0 0 10px; font-size: 13px; color: var(--muted); }
.alb-counts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.alb-none { margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.alb-cnt { --rc: var(--line); border-radius: 10px; padding: 8px 4px; text-align: center; border: 1.5px solid var(--rc); min-width: 0; }
.alb-cnt:not([data-r]) b { color: var(--ink); }
.alb-cnt b { display: block; font: 700 18px var(--f-body); color: var(--rc); }
.alb-cnt span { font-size: 11px; color: var(--muted); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alb-cnt.bump { animation: alb-bump .45s ease; }
.alb-thumbs { display: flex; gap: 6px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; }
.alb-thumbs::-webkit-scrollbar { display: none; }
.alb-th { flex: 0 0 auto; width: 54px; height: 72px; border-radius: 6px; background: #fff; padding: 3px; box-shadow: 0 1px 3px rgba(0,0,0,.15); display: flex; flex-direction: column; }
.alb-th i { height: 6px; background: var(--rc); border-radius: 3px 3px 0 0; }
.alb-th span { flex: 1; display: grid; place-items: center; text-align: center; font: 700 9px/1.1 var(--f-display); color: #fff; padding: 2px; overflow: hidden; overflow-wrap: anywhere; hyphens: auto; border-radius: 0 0 3px 3px;
  background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--rc) 55%, #fff), var(--rc)); text-shadow: 0 1px 1px rgba(0,0,0,.35); }
.alb-th.r-legend span { background: linear-gradient(135deg, #f7e08a, #c99412 45%, #fff3c4 60%, #b8860b); }
@keyframes alb-bump { 0%,100% { transform: none } 40% { transform: scale(1.12) } }
@media (prefers-reduced-motion: reduce) { .pn-card, .pn-card *, .alb-cnt.bump { animation: none !important; } }

/* the printed card (js/features/print-cards.js): a rare word keeps a blue frame, a legendary one a gold frame, with its badge.
   The outer edge is the cut (square); the inside of the frame is rounded. 1.8 mm wide on paper. */
.pc.pc-rare, .pc.pc-legend { --pf: #2459b8; }
.pc.pc-legend { --pf: #c99412; }
.pc.pc-rare::after, .pc.pc-legend::after { content: ""; position: absolute; inset: 1.8mm; border-radius: 3.6mm; box-shadow: 0 0 0 30mm var(--pf); pointer-events: none; z-index: 5; }
.pc.pc-legend .pc-in { background: linear-gradient(160deg, #fffaf0, #fff 40%); }
.pc.pc-rare .pc-in { background: linear-gradient(160deg, #f2f6fe, #fff 40%); }
.pc-rar { font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #fff; background: #2459b8; border-radius: 1.4mm; padding: .3mm 1.4mm; font-size: 6pt; }
.pc.pc-legend .pc-rar { background: #c99412; }
@media print { .pc.pc-rare::after, .pc.pc-legend::after, .pc .pc-in, .pc-rar { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }

/* the collector number, top left, engraved in the band (js/features/loot.js micrSVG) */
.pn-no .micr { display: block; height: 14px; width: auto; }
.pn-no .micr-hi { fill: rgba(255,255,255,.55); }
.pn-no .micr-lo { fill: color-mix(in srgb, var(--rc2) 85%, #000); }
.pn-legend .pn-no .micr-lo { fill: rgba(80, 55, 4, .85); }
/* on the sticker: no arrow between the word and the plate, and the book is already in the band */
.entry.pn .pn-pic > .entry-tr .tr-main::before { display: none !important; }
.pn-pic > .entry-head > .entry-place { display: none; }
.pn-pic > .entry-head { min-height: 54px; }
.pn-pic > .entry-tr { margin-top: 18px !important; }

/* rare and legendary stickers: a rich typeface — engraved Roman capitals (Cinzel) for the band, the plate and the footer,
   a high-contrast display serif (Playfair Display) for the word */
.pn-card { --f-rich: "Cinzel", "Trajan Pro", Georgia, serif; --f-rich-w: var(--f-rich); }
.pn-pic > .entry-head > .entry-w, .pn-pic > .entry-head > .entry-w * { font-family: var(--f-rich-w) !important; font-weight: 900 !important; letter-spacing: .01em; }
.pn-pic > .entry-tr .tr-main { font-family: var(--f-rich) !important; font-weight: 700 !important; letter-spacing: .08em !important; font-size: 21px !important; }
.pn-top, .pn-foot { font-family: var(--f-rich); font-weight: 700; letter-spacing: .1em; }
.pn-book { font-size: 13px; }
.pn-foot { font-size: 11.5px; }
.pn-pic > .entry-tr .tr-alt, .pn-pic > .entry-tr .tr-alt-k { font-family: var(--f-rich); letter-spacing: .04em; }
/* the number: black, nothing under it */
.pn-no .micr-hi { display: none; }
.pn-no .micr-lo, .pn-legend .pn-no .micr-lo { fill: #111; }

/* one typeface on the whole sticker (only the number keeps its own style) */
.pn-card, .pn-card .entry-w, .pn-card .entry-w *, .pn-card .entry-tr, .pn-card .entry-tr *, .pn-top, .pn-foot, .pn-book, .pn-lv { font-family: var(--f-rich) !important; }
.pn-pic > .entry-head > .entry-w, .pn-pic > .entry-head > .entry-w * { font-weight: 700 !important; letter-spacing: .02em; }
.pn-pic > .entry-head > .entry-w { font-size: 28px; }
.pn-lv { font-weight: 700; }

/* chosen typefaces (Mirza, 16.11): legendary = Cinzel Decorative, rare = Alfa Slab One — one face on the whole sticker
   (only the number keeps its cheque digits), and the same face on the front of the printed card */
.pn-legend { --f-rich: "Cinzel Decorative", "Cinzel", Georgia, serif; }
.pn-rare { --f-rich: "Alfa Slab One", "Rockwell", Georgia, serif; }
.pn-rare, .pn-rare .entry-w, .pn-rare .entry-w *, .pn-rare .entry-tr, .pn-rare .entry-tr *, .pn-rare .pn-top, .pn-rare .pn-foot, .pn-rare .pn-lv { font-weight: 400 !important; }
.pn-legend .entry-w, .pn-legend .entry-w *, .pn-legend .entry-tr .tr-main, .pn-legend .pn-top, .pn-legend .pn-foot, .pn-legend .pn-lv { font-weight: 700 !important; }
.pn-rare .pn-pic > .entry-tr .tr-main { letter-spacing: .04em !important; }
.pc.pc-legend:not(.pc-back) .pc-in, .pc.pc-legend:not(.pc-back) .pc-in * { font-family: "Cinzel Decorative", "Cinzel", Georgia, serif !important; font-weight: 700; }
.pc.pc-rare:not(.pc-back) .pc-in, .pc.pc-rare:not(.pc-back) .pc-in * { font-family: "Alfa Slab One", "Rockwell", Georgia, serif !important; font-weight: 400 !important; }
.pc.pc-legend:not(.pc-back) .pc-rar, .pc.pc-rare:not(.pc-back) .pc-rar { letter-spacing: .08em; }

/* moving ornaments (screen only): the knight of the legendary cards, the diamonds of the rare ones, sparkles */
.entry.pn .pn-legend .pn-pic { padding-top: 12px; }
.pn-coin { position: relative; z-index: 3; display: block; width: 74px; height: 74px; margin: 0 auto 4px; perspective: 300px; filter: drop-shadow(0 4px 6px rgba(92,64,6,.4)); }
.pn-coin-svg { display: block; width: 100%; height: 100%; animation: pn-coin 6s ease-in-out infinite; }
@keyframes pn-coin { 0%, 35% { transform: rotateY(0) } 50% { transform: rotateY(180deg) } 65%, 100% { transform: rotateY(360deg) } }
.pn-coin-shine { position: absolute; inset: 0; border-radius: 50%; overflow: hidden; pointer-events: none; }
.pn-coin-shine::after { content: ""; position: absolute; inset: -20%; background: linear-gradient(110deg, transparent 40%, rgba(255,255,255,.7) 50%, transparent 60%); animation: pn-cshine 3s ease-in-out infinite; }
@keyframes pn-cshine { 0%, 55% { transform: translateX(-80%) } 100% { transform: translateX(80%) } }
.pn-gem { position: absolute; z-index: 2; width: 30px; height: 26px; perspective: 120px; pointer-events: none; filter: drop-shadow(0 3px 4px rgba(18,58,122,.35)); }
.pn-gem svg { width: 100%; height: 100%; animation: pn-spin 3.2s linear infinite; transform-style: preserve-3d; }
.pn-gem.g1 { left: 10px; top: 10px; }
.pn-gem.g2 { right: 54px; top: 46%; width: 22px; height: 19px; }
.pn-gem.g2 svg { animation-duration: 4.4s; animation-direction: reverse; }
@keyframes pn-spin { 0% { transform: rotateY(0) } 50% { transform: rotateY(180deg) } 100% { transform: rotateY(360deg) } }
.pn-spk { position: absolute; z-index: 2; width: 14px; height: 14px; margin: -7px 0 0 -7px; pointer-events: none; opacity: 0;
  background: radial-gradient(circle, #fff 0 18%, transparent 20%), linear-gradient(#fff, #fff) center / 2px 100% no-repeat, linear-gradient(#fff, #fff) center / 100% 2px no-repeat;
  filter: drop-shadow(0 0 3px color-mix(in srgb, var(--rc) 80%, #fff)); animation: pn-twinkle 2.4s ease-in-out infinite; }
@keyframes pn-twinkle { 0%, 60%, 100% { opacity: 0; transform: scale(.2) rotate(0) } 75% { opacity: 1; transform: scale(1) rotate(45deg) } }
.pn-card.down .pn-coin, .pn-card.down .pn-gem, .pn-card.down .pn-spk { visibility: hidden; }
@media (prefers-reduced-motion: reduce) { .pn-coin-svg, .pn-coin-shine::after, .pn-gem svg, .pn-spk { animation: none !important; } }

.entry.pn .pn-rare .pn-pic { padding-top: 12px; }
.pn-gem.big { position: relative; display: block; z-index: 3; left: auto; top: auto; width: 66px; height: 56px; margin: 0 auto 6px; perspective: 260px; }
.pn-gem.big svg { animation: pn-gem 5s ease-in-out infinite; }
@keyframes pn-gem { 0%, 30% { transform: rotateY(0) } 50% { transform: rotateY(180deg) } 70%, 100% { transform: rotateY(360deg) } }

/* ---- corners: the small emblem (medal / 3D diamond) top left, a small 🔊 top right; the word has the middle to itself ---- */
.entry.pn .pn-card .pn-pic { padding-top: 40px; }
.pn-emb { position: absolute; z-index: 4; left: 8px; top: 6px; width: 46px; height: 46px; display: grid; place-items: center; pointer-events: none; }
.pn-emb .pn-coin { width: 42px; height: 42px; margin: 0; }
.pn-emb .pn-gem3d { width: 50px; height: 50px; }
.pn-emb .pn-gem.big { width: 36px; height: 31px; margin: 0; }
.entry.pn .pn-pic > .entry-head { grid-template-columns: 0 1fr 0; position: static; }
.entry.pn .pn-pic > .entry-head > .say { position: absolute; z-index: 5; top: 8px; right: 8px; width: 28px; height: 28px; grid-column: auto; }
.entry.pn .pn-pic > .entry-head > .say svg { width: 14px; height: 14px; }
.pn-card.down .pn-emb { visibility: hidden; }
/* ---- the intro (5 s): the word and the plate wait, the film / the big diamond play over the picture ---- */
.pn-card.pn-on .pn-pic > .entry-head > .entry-w, .pn-card.pn-on .pn-pic > .entry-tr, .pn-card.pn-on .pn-emb { opacity: 0; }
.pn-card.pn-done .pn-pic > .entry-head > .entry-w, .pn-card.pn-done .pn-pic > .entry-tr { animation: pn-wordin .6s cubic-bezier(.2,1.4,.4,1) both; }
.pn-card.pn-done .pn-emb { animation: pn-embin .5s ease .25s both; }
@keyframes pn-wordin { from { opacity: 0; transform: scale(.7) } to { opacity: 1; transform: none } }
@keyframes pn-embin { from { opacity: 0; transform: scale(1.6) } to { opacity: 1; transform: none } }
.pn-intro { position: absolute; inset: 0; z-index: 6; display: grid; place-items: center; pointer-events: none; }
.pn-intro .pn-gem3d { width: 190px; height: 190px; filter: drop-shadow(0 10px 18px rgba(18,58,122,.45)); animation: pn-gemin .6s cubic-bezier(.2,1.5,.4,1) both; }
@keyframes pn-gemin { from { transform: scale(.2); opacity: 0 } to { transform: none; opacity: 1 } }
/* the knight's film: a sky, hills, the ground; he gallops from left to right across the whole card */
.kf { position: absolute; inset: 0; overflow: hidden; border-radius: 0; animation: kf-in .3s ease both; }
.kf-sky { position: absolute; inset: 0; background: linear-gradient(180deg, #fbe9b0 0%, #f6d27a 55%, #e9b44c 100%); }
.kf-hills { position: absolute; left: -10%; right: -10%; bottom: 22%; height: 34%; background: radial-gradient(60% 100% at 20% 100%, #c99412 60%, transparent 61%), radial-gradient(50% 90% at 70% 100%, #b8860b 60%, transparent 61%); opacity: .55; animation: kf-pan var(--kf-left, 5s) linear both; }
.kf-ground { position: absolute; left: 0; right: 0; bottom: 0; height: 24%; background: linear-gradient(180deg, #a87a10, #7a560a); }
.kf-ground::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, rgba(255,243,196,.25) 0 12px, transparent 12px 34px); animation: kf-road .5s linear infinite; }
.kf-rider { position: absolute; bottom: 6%; left: 0; width: 64%; animation: kf-run var(--kf-left, 5s) linear both; }
.kf-rider svg { display: block; width: 100%; height: auto; overflow: visible; filter: drop-shadow(0 4px 3px rgba(60,40,0,.35)); }
.kf-cape { animation: kf-cape .33s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: 100% 0; }
.kf-dust { position: absolute; bottom: 2%; left: 18%; width: 14px; height: 14px; border-radius: 50%; background: rgba(255,243,196,.75); animation: kf-dust .66s ease-out infinite; }
.kf-dust.d2 { left: 30%; animation-delay: .22s; } .kf-dust.d3 { left: 8%; animation-delay: .44s; }
@keyframes kf-in { from { opacity: 0 } to { opacity: 1 } }
/* the knight gallops in from the left, slows down in the middle, the landscape fades, a gold disc grows behind him
   and he shrinks into it: he has become his medal, which then flies to the corner (js/features/loot-fx.js lootIntroEnd) */
@keyframes kf-run { 0% { transform: translateX(-85%) } 62% { transform: translateX(28%) } 80% { transform: translateX(28%) scale(1) } 96%, 100% { transform: translateX(28%) scale(.5) } }
@keyframes kf-pan { from { transform: translateX(0) } to { transform: translateX(-18%) } }
@keyframes kf-road { from { background-position: 0 0 } to { background-position: -34px 0 } }
@keyframes kf-gallop { from { transform: translateY(0) rotate(1.5deg) } to { transform: translateY(-7%) rotate(-3deg) } }
@keyframes kf-cape { from { transform: skewY(0) } to { transform: skewY(-10deg) scaleX(1.1) } }
@keyframes kf-dust { 0% { opacity: .9; transform: translate(0, 0) scale(.4) } 100% { opacity: 0; transform: translate(-30px, -10px) scale(1.8) } }
/* ---- rare: the Berber-style letters (js/features/loot-fx.js tifSVG) ---- */
.tif-w { display: inline; }
.tif { display: inline-block; height: 1em; width: auto; vertical-align: -.1em; overflow: visible; max-width: 100%; }
.tif path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.tif-ink path { stroke: currentColor; stroke-width: 1.05; }
.tif-edge path { stroke: var(--rc2); stroke-width: 2.6; }
.tif-sp { display: inline-block; width: .35em; }
.pn-rare .pn-pic > .entry-head > .entry-w { font-size: 30px; line-height: 1.3; text-shadow: none; }
.pn-rare .pn-pic > .entry-head > .entry-w .tif { height: .95em; }
.pn-rare .pn-pic > .entry-tr .tr-main { font-size: 20px !important; line-height: 1.4; }
.pn-rare .pn-pic > .entry-tr .tr-alt { font-size: 11px; line-height: 1.6; }
.pn-rare .pn-book { font-size: 12px; } .pn-rare .pn-foot span { font-size: 10px; } .pn-rare .pn-lv { font-size: 11px; }
@media (prefers-reduced-motion: reduce) { .kf-rider, .kf-rider svg, .kf-hills, .kf-ground::before, .kf-dust, .kf-cape { animation: none !important; } .kf-rider { transform: translateX(60%); } }
.pn-gem3d { filter: drop-shadow(0 3px 5px rgba(13,47,102,.45)); }

/* the gallop: the body rocks, each leg swings from the hip and bends at the knee, in the order of a real gallop */
.kf .kf-body { transform-box: view-box; transform-origin: 62px 46px; animation: kf-rock .44s ease-in-out infinite; }
.kf .kf-up, .kf .kf-lo { transform-box: fill-box; transform-origin: 50% 0; }
.kf .kf-up { animation: kf-up .44s linear infinite; }
.kf .kf-lo { animation: kf-lo .44s linear infinite; }
.kf .kf-lo.hind { animation-name: kf-lo-h; }
.kf .f1 { animation-delay: 0s; } .kf .f2 { animation-delay: -.07s; } .kf .h1 { animation-delay: -.22s; } .kf .h2 { animation-delay: -.29s; }
.kf .kf-head { transform-box: fill-box; transform-origin: 0 100%; animation: kf-nod .44s ease-in-out infinite; }
.kf .kf-tail { transform-box: fill-box; transform-origin: 100% 0; animation: kf-tail .44s ease-in-out infinite alternate; }
.kf .kf-mane { transform-box: fill-box; transform-origin: 100% 100%; animation: kf-tail .3s ease-in-out infinite alternate; }
.kf .kf-man { transform-box: view-box; transform-origin: 62px 28px; animation: kf-ride .44s ease-in-out infinite; }
.kf .kf-arm { transform-box: fill-box; transform-origin: 0 100%; animation: kf-sword .88s ease-in-out infinite; }
.kf .kf-crest { transform-box: fill-box; transform-origin: 0 100%; animation: kf-tail .22s ease-in-out infinite alternate; }
.kf .kf-cape { transform-box: fill-box; transform-origin: 100% 0; animation: kf-cape2 .3s ease-in-out infinite alternate; }
.kf .kf-eye { animation: kf-eye .9s ease-in-out infinite; }
@keyframes kf-rock { 0%, 100% { transform: translateY(0) rotate(0) } 25% { transform: translateY(-4px) rotate(-4deg) } 60% { transform: translateY(-1px) rotate(3deg) } }
@keyframes kf-up { 0% { transform: rotate(-38deg) } 50% { transform: rotate(34deg) } 100% { transform: rotate(-38deg) } }
@keyframes kf-lo { 0% { transform: rotate(10deg) } 20% { transform: rotate(0deg) } 50% { transform: rotate(8deg) } 75% { transform: rotate(75deg) } 100% { transform: rotate(10deg) } }
@keyframes kf-lo-h { 0% { transform: rotate(-10deg) } 20% { transform: rotate(0deg) } 50% { transform: rotate(-6deg) } 75% { transform: rotate(-70deg) } 100% { transform: rotate(-10deg) } }
@keyframes kf-nod { 0%, 100% { transform: rotate(0) } 30% { transform: rotate(8deg) } 65% { transform: rotate(-5deg) } }
@keyframes kf-tail { from { transform: rotate(-8deg) } to { transform: rotate(10deg) } }
@keyframes kf-ride { 0%, 100% { transform: translateY(0) rotate(0) } 35% { transform: translateY(1.5px) rotate(2deg) } 70% { transform: translateY(-1.5px) rotate(-2deg) } }
@keyframes kf-sword { 0%, 100% { transform: rotate(10deg) } 45% { transform: rotate(-35deg) } 60% { transform: rotate(-30deg) } }
@keyframes kf-cape2 { from { transform: skewY(0) scaleX(1) } to { transform: skewY(-12deg) scaleX(1.15) } }
@keyframes kf-eye { 0%, 100% { opacity: 1 } 50% { opacity: .55 } }
@media (prefers-reduced-motion: reduce) { .kf .kf-body, .kf .kf-up, .kf .kf-lo, .kf .kf-head, .kf .kf-tail, .kf .kf-mane, .kf .kf-man, .kf .kf-arm, .kf .kf-crest, .kf .kf-cape, .kf .kf-eye { animation: none !important; } }

.kf .kf-sky, .kf .kf-hills, .kf .kf-ground { animation-name: kf-scene; animation-duration: var(--kf-left, 5s); animation-fill-mode: both; animation-timing-function: linear; }
.kf .kf-hills { animation-name: kf-pan, kf-scene; animation-duration: var(--kf-left, 5s), var(--kf-left, 5s); }
.kf .kf-ground::before { animation: kf-road .5s linear infinite; }
@keyframes kf-scene { 0%, 70% { opacity: 1 } 88%, 100% { opacity: 0 } }
.kf-rider { transform-origin: 50% 50%; z-index: 2; }
.kf-coin { position: absolute; z-index: 1; left: 50%; top: 52%; width: 44%; aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%) scale(0);
  background: radial-gradient(circle at 35% 30%, #fff6cf, #e9c452 45%, #b8860b 80%, #8a6410);
  box-shadow: inset 0 0 0 2px #6b4a06, inset 0 0 0 6px #e9c452, inset 0 0 0 7px #7a560a, 0 6px 14px rgba(92,64,6,.45);
  animation: kf-coin var(--kf-left, 5s) cubic-bezier(.3,1.4,.5,1) both; }
.kf-coin::after { content: ""; position: absolute; inset: 11%; border-radius: 50%; border: 1px dashed rgba(122,86,10,.8); }
@keyframes kf-coin { 0%, 76% { transform: translate(-50%, -50%) scale(0) } 92%, 100% { transform: translate(-50%, -50%) scale(1) } }
.kf-dust { animation-name: kf-dust; }
.kf .kf-rider .kf-dust { opacity: 1; }
.pn-card.pn-done .pn-emb { animation: pn-embin2 .25s ease both; }
@keyframes pn-embin2 { from { opacity: .6 } to { opacity: 1 } }


/* ---- Traduire (js/core/word-entry.js, opts.tr2): level ← arrow → kind; under the translation, the blocks of Réviser ---- */
.tr-mid { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin: 2px 0 6px; }
.tr-mid-l { justify-self: end; } .tr-mid-r { justify-self: start; color: var(--muted); font-size: 14px; }
.tr-mid .lvl { box-sizing: border-box; height: 28px; min-width: 28px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center; line-height: 1; }
.tr-arrow { display: block; width: 16px; height: 30px; background: var(--muted); opacity: .6;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 30'%3E%3Cpath d='M8 1v26M2 21l6 7 6-7' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 30'%3E%3Cpath d='M8 1v26M2 21l6 7 6-7' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.entry .entry-tr.tr2 .tr-main::before { display: none !important; }
.entry .entry-tr.tr2 { margin-top: 0; }
.tr2-blocks { display: flex; flex-direction: column; gap: 12px; margin: 10px 0 4px; }
.tr2-blocks:empty { display: none; }
.pn-pic > .tr-mid { display: none; } /* (on a sticker: the level is in the band, the kind in the footer) */
.rv-none { color: var(--muted); opacity: .6; }
/* the circle of words in Traduire: the one of Réviser (js/pages/review-extras.js), animated with the scroll */
.entry-fam.rv-ring { display: flex; flex-direction: column; gap: 12px; }
.entry-fam.rv-ring h3 { margin: 0; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.entry-fam.rv-ring h3 em { font-style: normal; font-family: var(--f-display); text-transform: none; letter-spacing: 0; font-size: 15px; color: var(--ink); }
/* Traduire: the sentences at the sizes of Réviser — sentence 15 px, its translation 13 px, its title 11 px (Mirza, 16.11) */
.trc-ex .k { font-size: 11px !important; font-weight: 400 !important; }
.trc-ex .de { font-size: 15px !important; line-height: 1.5 !important; }
.trc-ex .tr { font-size: 13px !important; line-height: 1.5 !important; }
/* the 💬 suggestion button of the translate block: in the bottom corner, as on the flash card (at the top it covered the XP ring) */
.tr-panel > .fb-btn { top: auto; bottom: 2px; }
.tr-panel { padding-bottom: 30px !important; } /* (room for the 💬 under the 📷 button) */

/* Réviser › Vocabulaire: the top of the card of a rare or legendary word (js/pages/review.js) */
.rv-loot { --rc2: color-mix(in srgb, var(--rc) 60%, #0d1a22); position: relative; margin: -4px -6px 14px; border-radius: 14px; padding: 3px; background: var(--rc); box-shadow: 0 6px 18px color-mix(in srgb, var(--rc) 30%, transparent); }
.rv-rare { --rc: var(--r-rare); } .rv-legend { --rc: var(--r-legend); background: linear-gradient(135deg, #f7e08a, #c99412 30%, #fff3c4 50%, #b8860b 70%, #f2c94c); }
.rv-band { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 10px 6px; color: #fff; font: 800 12.5px/1 "Saira Condensed", var(--f-body); letter-spacing: .08em; text-transform: uppercase; }
.rv-legend .rv-band { color: #4a3304; }
.rv-no .micr { height: 12px; width: auto; display: block; }
.rv-no .micr-lo { fill: rgba(255,255,255,.95); } .rv-no .micr-hi { fill: rgba(0,0,0,.25); }
.rv-legend .rv-no .micr-lo { fill: rgba(74,51,4,.9); } .rv-legend .rv-no .micr-hi { fill: rgba(255,255,255,.5); }
.rv-stars { letter-spacing: 1px; font-size: 13px; }
.rv-in { position: relative; overflow: hidden; border-radius: 11px; padding: 10px 12px 12px;
  background: radial-gradient(120% 100% at 50% 20%, color-mix(in srgb, var(--rc) 6%, var(--surface, #fff)), color-mix(in srgb, var(--rc) 20%, var(--surface, #fff)) 80%); }
.rv-in::before { content: ""; position: absolute; inset: -20%; background: repeating-linear-gradient(115deg, color-mix(in srgb, var(--rc) 9%, transparent) 0 7px, transparent 7px 24px); pointer-events: none; }
.rv-in > :not(.rv-shine):not(.rv-holo):not(.rv-intro) { position: relative; z-index: 2; }
.rv-in .word { color: var(--rc2); }
.rv-in .lvl { border-color: var(--rc); color: var(--rc2); background: color-mix(in srgb, var(--rc) 8%, transparent); }
.rv-in .card-top { color: var(--rc2); }
.rv-shine { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.7) 48%, transparent 60%); transform: translateX(-120%); animation: stk-sweep 1.2s ease .3s both, rv-sweep 6s ease 2s infinite; }
.rv-holo { position: absolute; inset: 0; z-index: 1; pointer-events: none; mix-blend-mode: overlay; opacity: .4;
  background: linear-gradient(115deg, #ff6b6b, #ffd93d, #6bff95, #6bd5ff, #b06bff, #ff6b6b); background-size: 300% 300%; animation: stk-holo 4s linear infinite; }
@keyframes rv-sweep { 0%, 80% { transform: translateX(-120%) } 100% { transform: translateX(120%) } }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .rv-in .word { color: var(--rc); } :root:not([data-theme="light"]) .rv-in .lvl, :root:not([data-theme="light"]) .rv-in .card-top { color: var(--rc); } }
:root[data-theme="dark"] .rv-in .word, :root[data-theme="dark"] .rv-in .lvl, :root[data-theme="dark"] .rv-in .card-top { color: var(--rc); }
@media (prefers-reduced-motion: reduce) { .rv-shine, .rv-holo { animation: none; } .rv-shine { display: none; } }

/* the film before the word (Réviser › Vocabulaire), and Wito turned into the medal / the diamond */
.rv-loot.rv-on .rv-in { min-height: 168px; }
.rv-loot.rv-on .rv-in > :not(.rv-intro):not(.rv-shine):not(.rv-holo) { visibility: hidden; }
.rv-loot.rv-on ~ .opts { opacity: 0; pointer-events: none; }
.rv-loot ~ .opts { transition: opacity .35s ease; }
.rv-intro { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; pointer-events: none; overflow: hidden; border-radius: 11px; }
.rv-intro .pn-gem3d { width: 150px; height: 150px; filter: drop-shadow(0 10px 18px rgba(18,58,122,.45)); animation: pn-gemin .6s cubic-bezier(.2,1.5,.4,1) both; }
.rv-intro .kf { border-radius: 11px; }
.card-top .rv-emb { display: grid; place-items: center; width: 34px; height: 34px; margin: -6px 0 -6px -4px; }
.rv-emb .pn-coin { width: 32px; height: 32px; margin: 0; }
.rv-emb .pn-gem3d { width: 38px; height: 38px; }
.rv-emb .pn-gem.big { width: 30px; height: 26px; margin: 0; }
.rv-on .rv-emb { opacity: 0; }
.rv-done .rv-emb { animation: pn-embin .5s ease both; }

/* the album: the counts of rare / legendary cards open the Lexique (no thumbnails any more) */
button.alb-cnt { font: inherit; background: var(--surface); cursor: pointer; transition: transform .15s, box-shadow .15s; }
@media (hover: hover) { button.alb-cnt:not(:disabled):hover { transform: translateY(-2px); box-shadow: 0 4px 12px color-mix(in srgb, var(--rc) 30%, transparent); } }
button.alb-cnt:disabled { cursor: default; opacity: .6; }
button.alb-cnt:focus-visible { outline: 2px solid var(--rc); outline-offset: 2px; }
button.alb-cnt span::after { content: " ›"; }
button.alb-cnt:disabled span::after { content: ""; }
/* Lexique: the headings of the groups */
.lx-rare-h { --rc: var(--r-rare); display: flex; align-items: center; gap: 8px; margin: 14px 0 4px; padding: 8px 12px; border-radius: 10px; font: 800 15px/1.2 var(--f-body); letter-spacing: .04em; text-transform: uppercase; color: #fff; background: var(--rc); }
.lx-rare-h.r-legend { --rc: var(--r-legend); color: #4a3304; background: linear-gradient(135deg, #f7e08a, #c99412 45%, #fff3c4 60%, #b8860b); }
.lx-rare-h b { margin-left: auto; font-family: var(--f-mono); }
.lx-rare-h:first-child { margin-top: 0; }

.alb-cnt.r-rare { --rc: var(--r-rare); } .alb-cnt.r-legend { --rc: var(--r-legend); }

/* the album: a count with cards takes the colour of its cards (blue sticker / gold) */
button.alb-cnt.r-rare:not(:disabled) { background: linear-gradient(160deg, color-mix(in srgb, var(--r-rare) 85%, #fff), var(--r-rare)); border-color: var(--r-rare); }
button.alb-cnt.r-legend:not(:disabled) { background: linear-gradient(135deg, #f7e08a, #c99412 45%, #fff3c4 60%, #b8860b); border-color: #b8860b; }
button.alb-cnt.r-rare:not(:disabled) b, button.alb-cnt.r-rare:not(:disabled) span { color: #fff; }
button.alb-cnt.r-legend:not(:disabled) b, button.alb-cnt.r-legend:not(:disabled) span { color: #4a3304; }

/* one font on the whole card (Mirza, 18.11): the number, the rank and the back in the font of the card */
.pn-card .entry-n, .pn-card .pn-no, .pn-card .pn-back span { font-family: var(--f-rich) !important; }
.pn-no { font-size: 13px; letter-spacing: .06em; text-transform: none; }
.rv-legend { --f-rich: "Cinzel Decorative", "Cinzel", Georgia, serif; } .rv-rare { --f-rich: "Alfa Slab One", "Rockwell", Georgia, serif; }
.rv-band, .rv-band *, .rv-in .word, .rv-in .word *, .rv-in .lvl, .rv-in .card-top, .rv-in .meta { font-family: var(--f-rich) !important; }
.rv-band { text-transform: none; font-weight: 700; letter-spacing: .06em; }
.rv-rare .rv-band, .rv-rare .rv-in .word, .rv-rare .rv-in .word * { font-weight: 400 !important; }
.rv-legend .rv-in .word, .rv-legend .rv-in .word * { font-weight: 700 !important; }
.pn-pic > .entry-head > .entry-lvn { display: none; } /* (the level is already in the hexagon of the sticker) */
.pn-gem3d:not([data-drawn]) { opacity: 0; } /* (shown from its first real picture) */
