/* LAWS:
   - design only. No copy, no logic, no data — a rule here decides how the medal board LOOKS and
     nothing about what it says, what it counts or what it may open.
   - colours come from ui/kit tokens; geometry from the --tr* and --j* raw tokens. No hex, no px
     literal (spelltrail/tools/ui-gate.mjs check ①).
   - it rides the trophy screen's parchment and never reaches into it: every selector here is a
     .j* class this layer owns. The map's paint is map.js's, the ledger's is trophy.css's.
   - THE TWO MEDAL VOCABULARIES ARE DRAWN DIFFERENTLY ON PURPOSE. A PLACE medal (.jmed) is a disc,
     the same disc the ledger rows and the map pins wear. A WORD tier (.jw) is a pill on the wall.
     They share three names and nothing else, and a child should be able to see that without being
     told (trophy.js's standing warning).
   History: NOTES.md */

.jroot{ display:flex; flex-direction:column; }

/* ══ THE PRIDE SHELF ═══════════════════════════════════════════════════════════════════════════
   It sits under the header and above the country, full width in both frames — the first thing on
   the screen the door promised treasure on. It is ABSENT until the first medal exists (the view
   draws nothing), so there is no empty state to style and no row of hooks to explain away. */
/* ── THE MEDAL BAND. NO SHELF (owner 2026-11-12: "The shelf I'd like to look better, this doesn't feel logical.
   Do we need it to be a shelf?", then "Your recommendation A is best") ──────────────────────────────────────────
   The band was a painted wooden plank under painted bunting, built for the painted ribbon medal that stood on it.
   The medal is a coin now (.jmed.jpc) and a coin does not stand on a plank, so the band is plain parchment: the
   heading, the "practising since" line, then the coins in a row, each with its count beside it. The plank and the
   bunting (icons/medal/shelf_strip.png, bunting_strip.png) are retired. Two painted ornaments remain, both CSS
   backgrounds on elements that are drawn anyway, so a file that does not arrive is not a gap: the "New!" rosette
   here and the laurel behind the panel's hero. The class names keep the word "shelf" (.jshelf, --jMedShelf): they
   are names, the tests and the view hold them, and nothing a child sees says shelf. */
.jshelf{
  display:flex; flex-wrap:wrap; align-items:center; gap:var(--trGap);
  padding:.75rem var(--trPad) .7rem; border-bottom:var(--trRule) solid rgba(122,92,20,.35);
}
.jshelfhd{
  font-family:var(--fdisp); font-weight:900; font-size:1rem; letter-spacing:.04em;
  text-transform:uppercase; color:var(--parchInk); margin:0;
}
/* the coins take the band's full line for themselves, under the heading and the line */
.jmeds{
  flex:1 0 100%; order:4;
  display:flex; flex-wrap:wrap; align-items:center; gap:1.4rem;
  margin:.45rem 0 0;
}
.jshelfhd{ order:1; }
.jline{ order:2; }
/* (order 3 was `.jhint`, the "tap a medal" line. It is not written any more — §36 law 5 — and the
   coin row keeps order 4 so the sequence in this file still reads top to bottom.) */

/* one medal, with its count. A button because it opens the story — and a tap target at the same
   floor every other control on this screen uses. NO pill and NO border here (an owner ruling from the
   days of the plank, kept: the coin with plain bold type beside it needs no box). The count and the
   name are centred on the coin, and stand a clear step off it (owner 2026-11-12: "Add a bit more space
   between the medal and the count"): the gap is on the coin's own right side so the number and its
   name stay a pair. The hit area is the button's padding, invisible because the button paints nothing. */
.jchip{
  position:relative;
  display:flex; align-items:center; gap:.4rem; min-height:var(--trTap);
  padding:.15rem .4rem .15rem 0; border-radius:var(--trRsm); cursor:pointer;
  background:transparent; border:0;
  color:var(--parchInk); font-family:var(--fbody); font-size:.85rem; font-weight:700;
}
/* the band's coin is the big one (64px). Place rows inside the panel keep the smaller --jMed; only a chip's
   direct child grows. Its right margin is the step between coin and count (see .jchip above). */
.jchip>.jmed{ width:var(--jMedShelf); height:var(--jMedShelf); margin-right:.5rem; }

/* ── THE STACK — MORE THAN ONE TIER, ONE PILE OF PRIDE (owner ruling 2026-09-01) ───────────────
   "If I've got a gold, we probably won't care about the bronze any more — stack them, gold on top
   of silver on top of bronze, so you can still see the bronze a bit behind it." So: the DOM order
   is already best-first (gold, silver, bronze — journey.present's TIERS), and the stack pulls each
   later medal UNDER its better by a negative margin while stepping its z-index down. Gold stands
   frontmost; the older metals peek out to its right like coins slid behind it.
   Every disc keeps most of its face visible, so every one is still a comfortable tap onto its own
   story. The view adds one class when two or more tiers are held; a single-tier shelf never sees
   any of this. */
.jstack{ gap:0; }                            /* the row's own gap would undo the pile */
/* the pile keeps the geometry it was ruled on: its chips keep their old side padding and carry no step between
   coin and count (the count is a badge on the coin here), and the row steps back by that padding so the front
   coin still starts under the heading */
.jmeds.jstack{ margin-left:-.4rem; }
.jstack .jchip{ padding:.15rem .4rem 0; }
.jstack .jchip>.jmed{ margin-right:0; }
/* the pull has to beat the chips' own side padding as well as the medal: just over half a disc,
   so each older metal shows a crescent — "you can still see the bronze a bit behind it" */
.jstack .jchip+.jchip{ margin-left:calc(var(--jMedShelf)*-0.58); }
.jstack .jchip[data-tier="gold"]{ z-index:3; }
.jstack .jchip[data-tier="silver"]{ z-index:2; }
.jstack .jchip[data-tier="bronze"]{ z-index:1; }
/* in the stack the count leaves the medal's side and becomes a small parchment coin pinned to the
   disc's lower-right shoulder — the only part of a stacked medal guaranteed to stay visible — and
   the tier NAME goes entirely: three labels across an overlapped pile is the clutter the stack
   exists to remove, the panel names the tier the moment it opens, and the button's aria-label has
   said "4 bronze medals" all along. */
.jstack .jchip>.jtname{ display:none; }
.jstack .jchip>b{
  position:absolute; right:-.15rem; bottom:.05rem; z-index:4;
  min-width:1.35rem; padding:0 .25rem .05rem;
  font-size:.95rem; line-height:1.3rem; text-align:center;
  background:var(--parchHi); border:var(--trHair) solid rgba(122,92,20,.55);
  border-radius:var(--trPill); box-shadow:0 .08rem .18rem rgba(59,44,20,.25);
}

/* ── "NEW!" — WORN BY ONE MEDAL, ONCE ──────────────────────────────────────────────────────────
   The word rides a painted rosette (a background, so no file is no rosette and the word still
   reads). It is deliberately small and warm rather than loud: this is a shelf, and the difference
   between celebration and nagging is volume. */
.jnew{
  /* perched on the MEDAL's own shoulder now the pill is gone: anchored off the left edge at the
     medal's width so it rides the disc's top-right rim, ribbon reaching up towards the heading and
     clear of the count and label standing beside the medal */
  position:absolute; top:calc(var(--jRosette)/-2.5);
  left:calc(var(--jMedShelf) - var(--jRosette)/1.6); right:auto; z-index:5;
  min-width:var(--jRosette); padding:.1rem .35rem;
  background:url('../../../icons/medal/rosette_128.png') no-repeat center/contain;
  font-family:var(--fdisp); font-weight:900; font-size:.66rem; letter-spacing:.03em;
  line-height:var(--jRosette); text-align:center;
  /* BRIGHT, NOT BROWN (owner: "the same sort of brown colour… could look a bit fresher"): cream
     ink with a russet outline drawn as four hair shadows — the outline is what lets near-white
     type sit on a russet rosette AND on bare parchment when the sprite has not arrived. The tilt
     is the festive part; it is on the word, not the rosette, so the paint stays straight. */
  color:rgba(255,250,235,.98);
  text-shadow:
    calc(var(--trHair)*1) 0 0 rgba(122,44,20,.9), calc(var(--trHair)*-1) 0 0 rgba(122,44,20,.9),
    0 calc(var(--trHair)*1) 0 rgba(122,44,20,.9), 0 calc(var(--trHair)*-1) 0 rgba(122,44,20,.9),
    0 .12rem .2rem rgba(59,22,10,.45);
  transform:rotate(-7deg);
}

/* THE SHINE, AND IT RUNS ONCE. `animation` with no iteration count plays a single pass and stops on
   the final frame, which is the behaviour this needs exactly: a sweep of light across the medal, a
   small settle, and then the shelf is a shelf again. Nothing re-adds the class while the board is
   open (journey.view.js decides "new" once per mount), so there is no second pass to suppress. */
@keyframes jshine{
  0%{ transform:scale(1); }
  18%{ transform:scale(1.09) rotate(-1.5deg); }
  38%{ transform:scale(1.02) rotate(.8deg); }
  60%{ transform:scale(1.04); }
  100%{ transform:scale(1); }
}
@keyframes jglint{
  0%{ opacity:0; transform:translateX(-120%); }
  22%{ opacity:1; }
  100%{ opacity:0; transform:translateX(120%); }
}
.jchip.jshine{ animation:jshine 1.1s cubic-bezier(.2,1.2,.4,1) both; }
/* the glint sweeps the MEDAL, not the button: the button paints nothing now, and a bar of light
   crossing empty parchment read as a glitch. .jmed already clips to its own circle. */
.jchip.jshine .jmed::after{
  content:''; position:absolute; inset:0; border-radius:50%;
  pointer-events:none; animation:jglint 1.1s ease-out both;
  background:linear-gradient(115deg,transparent 38%,rgba(255,255,255,.7) 48%,transparent 58%);
}
/* the one rule that outranks the fuss. A child who has asked for less movement gets the rosette and
   no animation at all — the mark is the message, the sweep was only ever the manners. */
@media (prefers-reduced-motion:reduce){
  .jchip.jshine{ animation:none; }
  .jchip.jshine .jmed::after{ animation:none; opacity:0; }
}
.jchip b{ font-family:var(--fdisp); font-size:1.45rem; }
.jchip>.jtname{ font-size:.95rem; }
/* the affordances moved off the box and onto the medal, because there is no box: hover lifts the
   medal a touch, and the open one wears a round gold ring — a glow around a disc, not a border
   around a pill, so it sits on the wood without re-introducing the shape that clashed. */
@media (hover:hover){ .jchip:hover .jmed{ transform:translateY(calc(var(--trHair)*-2)); } }
.jchip.on .jmed{ box-shadow:0 0 0 .14rem rgba(255,209,102,.9),0 0 .5rem .1rem rgba(255,209,102,.5); }

/* THE MEDAL. The disc every place medal stands on: its box, its circle, its clip. Since 2026-11-12 the face is the
   place coin's (.jmed.jpc, below) wherever journey.view.js or the recap draws one; the flat tier colours here are
   what a bare .jmed would still show. */
.jmed{
  position:relative;
  width:var(--jMed); height:var(--jMed); border-radius:50%; flex-shrink:0;
  display:inline-flex; align-items:center; justify-content:center; overflow:hidden;
  background:var(--gold); border:var(--trRule) solid var(--goldD);
  transition:transform .15s ease;
}
.jmed.big{ width:var(--jMedBig); height:var(--jMedBig); }
.jmed.g-bronze{ background:var(--bronze); box-shadow:0 0 0 .19rem rgba(205,127,50,.45); }
.jmed.g-silver{ background:var(--silver); box-shadow:0 0 0 .19rem rgba(200,205,215,.7); }
.jmed.g-gold{ box-shadow:0 0 0 .19rem rgba(255,209,102,.9),0 0 .5rem .12rem rgba(255,209,102,.5); }

/* THE PLACE COIN (owner 2026-11-12: the place's medal becomes a coin too, "that will look better"). The level coin
   (.jcoin, below) one honour up: the same three metals and the same gloss, bigger, and struck with TWO rims: the
   dark edge, a light ring, a second dark ring inside it. Sized from the box it is given (--pc), so the shelf, the
   place row and the hero are one drawing. No ribbon, no motion. AFTER the three flat tiers on purpose: `.jmed.jpc` and
   `.jmed.g-bronze` have the same specificity, so the one written last paints. The star is ::before:
   ::after is the new medal's one glint (above), which still sweeps the coin and is clipped to its circle. */
.jmed.jpc{
  --pc:var(--jMed); box-sizing:border-box;
  border:calc(var(--pc)*.045) solid var(--cRim);
  background:
    radial-gradient(circle at 30% 24%, rgba(255,255,255,.95) 0, rgba(255,255,255,0) 42%),
    linear-gradient(145deg, var(--cHi) 0%, var(--cMid) 46%, var(--cLo) 100%);
  --pcStruck:inset 0 0 0 calc(var(--pc)*.03) rgba(255,255,255,.62), inset 0 0 0 calc(var(--pc)*.085) var(--cMid),
    inset 0 0 0 calc(var(--pc)*.115) var(--cRim), inset 0 0 0 calc(var(--pc)*.14) rgba(255,255,255,.5),
    0 calc(var(--pc)*.03) calc(var(--pc)*.07) rgba(59,44,20,.5);
  box-shadow:var(--pcStruck);
}
.jmed.jpc.big{ --pc:var(--jMedBig); }
.jchip>.jmed.jpc{ --pc:var(--jMedShelf); }
.jmed.jpc::before{
  content:""; position:absolute; inset:27%; background:var(--cLo); opacity:.62;
  clip-path:polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}
.jmed.jpc.g-gold{ --cHi:var(--coinGoldHi); --cMid:var(--coinGold); --cLo:var(--coinGoldLo); --cRim:var(--coinGoldRim); }
.jmed.jpc.g-silver{ --cHi:var(--coinSilHi); --cMid:var(--coinSil); --cLo:var(--coinSilLo); --cRim:var(--coinSilRim); }
.jmed.jpc.g-bronze{ --cHi:var(--coinBrzHi); --cMid:var(--coinBrz); --cLo:var(--coinBrzLo); --cRim:var(--coinBrzRim); }
/* the open medal keeps its struck rims under the gold ring that says "this one is open" */
.jchip.on .jmed.jpc{ box-shadow:var(--pcStruck), 0 0 0 .14rem rgba(255,209,102,.9), 0 0 .5rem .1rem rgba(255,209,102,.5); }

.jline{ font-size:.9rem; color:var(--parchInk2); margin:0; }

/* ══ THE STORY PANEL ═══════════════════════════════════════════════════════════════════════════
   Opens under the shelf rather than beside it: the shelf is already a full-width band, and a panel
   that pushed the country sideways would be a second layout to keep honest at --trStack. */
.jpanel{
  padding:var(--trGap) var(--trPad); border-bottom:var(--trRule) solid rgba(122,92,20,.35);
  background:var(--parchHi);
}
.jpanelhd{ display:flex; align-items:flex-start; gap:var(--trGap); }

/* THE HERO, IN ITS WREATH. The laurel is a background on the wrapper and the medal sits centred in
   it, so a missing file is a hero medal with nothing behind it — which is what the panel drew
   yesterday. It is bigger than the medal on purpose: the wreath frames, it does not crowd. */
.jhero{
  display:inline-flex; align-items:center; justify-content:center; flex-shrink:0;
  width:var(--jLaurel); height:var(--jLaurel);
  background:url('../../../icons/medal/laurel_256.png') no-repeat center/contain;
}

/* ── THE LEGEND, FOLDED INTO THE PANEL ─────────────────────────────────────────────────────────
   The header's three swatch-buttons are gone; these are their definitions, reachable from inside
   whichever one is open. Quiet type, no medal art, no counts: it is a way ACROSS between three
   meanings and must not read as a second shelf. */
.jpick{ display:flex; flex-wrap:wrap; align-items:center; gap:.35rem; margin:.7rem 0 0; }
/* (`.jpicklb` went with the sentence that introduced the row — §36 law 5. The group keeps the
   words as its accessible name, so a screen reader hears exactly what was on the screen before.) */
.jpickb{
  min-height:var(--trTap); padding:.1rem .6rem; border-radius:var(--trPill); cursor:pointer;
  background:transparent; border:var(--trHair) solid rgba(122,92,20,.45);
  color:var(--parchInk2); font-family:var(--fbody); font-weight:700; font-size:.8rem;
}
@media (hover:hover){ .jpickb:hover{ background:var(--parchLit); } }
.jpickb.on{ cursor:default; color:var(--parchInk); border-color:var(--goldD); background:rgba(255,209,102,.2); }
.jpanelhd h3{
  font-family:var(--fdisp); font-weight:900; font-size:1.15rem; margin:0 0 .2rem; color:var(--parchInk);
}
.jmean{ font-size:.92rem; line-height:1.55; color:var(--parchInk); margin:0; max-width:44rem; }
.jfoot{ font-size:.82rem; line-height:1.5; color:var(--parchInk2); margin:.8rem 0 0; max-width:44rem; }
/* the dismiss, in the panel's own corner (§36 laws 3 and 6): the 44px round pill the header's
   three icons wear, the × drawn on the 24 grid inside it. It was a text pill that floated at the
   end of the head's prose. */
.jclose{
  position:relative; margin-left:auto; flex-shrink:0;
  width:var(--trTap); height:var(--trTap); padding:0; border-radius:var(--trPill);
  display:inline-flex; align-items:center; justify-content:center;
  cursor:pointer; background:transparent; border:var(--trRule) solid rgba(122,92,20,.45);
  color:var(--parchInk);
}
@media (hover:hover){ .jclose:hover{ background:var(--parchLit); } }
/* the × itself: two bars on the 24 grid, drawn here because the SHAPE of a control is design.
   `currentColor` so a look repaints it with the rest of the panel, and the bars are rounded the
   way the header's icon strokes are. */
.jclose::before, .jclose::after{
  content:""; position:absolute; width:1rem; height:var(--trRule); border-radius:var(--trPill);
  background:currentColor;
}
.jclose::before{ transform:rotate(45deg); }
.jclose::after{ transform:rotate(-45deg); }

/* one place inside the panel: its medal, its name, the day it was won, its words */
.jplace{ margin-top:var(--trGap); }
.jplacehd{ display:flex; align-items:center; gap:.6rem; }
.jplacenm{ display:flex; flex-direction:column; min-width:0; }
.jplacenm b{ font-family:var(--fdisp); font-weight:800; font-size:1rem; color:var(--parchInk); }
.jplacenm span{ font-size:.8rem; color:var(--parchInk2); }

/* ══ THE WORD WALL ═════════════════════════════════════════════════════════════════════════════
   The certificate's wall, brought inside — same pill, same ✦ on a gold word, and the mark is a MARK
   rather than a fill for the certificate's own reason: a fill does not survive a photocopy. */
.jwall{ margin:.5rem 0 0; }
/* (`.jwallhd` — "THE WORDS BEHIND IT" — is not drawn any more: §36 law 1. A wall always sits
   directly under the thing it belongs to.) */
.jwords{ display:flex; flex-wrap:wrap; gap:.3rem .4rem; }
.jw{
  position:relative; overflow:hidden;
  font-family:var(--fbody); font-weight:700; font-size:.85rem; padding:var(--jWordPad);
  border-radius:var(--trPill); color:var(--parchInk);
  background:rgba(59,44,20,.07); border:var(--trHair) solid rgba(59,44,20,.22);
}
.jw.t-bronze{ background:rgba(205,127,50,.18); border-color:rgba(205,127,50,.5); }
.jw.t-silver{ background:rgba(200,205,215,.35); border-color:rgba(120,130,150,.55); }
.jw.t-gold{ background:rgba(255,209,102,.28); border-color:rgba(168,127,33,.6); font-weight:800; }
/* ── THE SPELLBOOK'S OWN LANGUAGE, ON A PILL ───────────────────────────────────────────────────
   A held word is a held word wherever it is standing. The Spellbook's card says so with a corner
   MARK and a diagonal foil sheen (index.html .wcard.gold::before / .wcard::after) and this borrows
   both, at pill scale, so the two surfaces read as one collection rather than two ledgers of the
   same fact. The marks are the certificate's characters — ✦ gold, ✧ silver — because a mark
   survives a photocopy and a fill does not.
   IT IS STILL NOT A MEDAL. The pill is a pill; the sheen and the tick are what a word wears and a
   place never does (trophy.js's standing warning). */
.jw.t-gold::before{ content:'✦ '; }
.jw.t-silver::before{ content:'✧ '; }
.jw.t-gold::after{
  content:''; position:absolute; inset:0; pointer-events:none;
  background:linear-gradient(115deg,transparent 34%,rgba(255,255,255,.55) 48%,transparent 60%);
}
/* ── A WORD YOU CAN HEAR ───────────────────────────────────────────────────────────────────────
   Only the ones with a recording are buttons at all (journey.view.js), so this styling can be as
   plain as it likes: the affordance is that it presses, and the ones that do not press look like
   the plain text they are. */
.jw.say, .jw.fpw{ cursor:pointer; }
@media (hover:hover){ .jw.say:hover, .jw.fpw:hover{ background:var(--parchLit); } }
.jw.say:active, .jw.fpw:active{ transform:translateY(var(--trHair)); }
/* ── A WORD WHOSE FOOTPRINT IS LIT (§37.7) ─────────────────────────────────────────────────────
   The same dashed ink the lit pins wear on the map, so the word and its places read as one thing.
   A pill with a footprint and no clip is still a button (it has something true to show). The line
   under the wall names the other places in words, for a map off the edge of a phone. */
.jw.fpon{ outline:var(--trRule) dashed var(--parchInk); outline-offset:var(--trRule); }
.jfp{ font-size:.82rem; line-height:1.45; color:var(--parchInk); margin:.45rem 0 0; }
.jfp[hidden]{ display:none; }
.jkey{ font-size:.75rem; color:var(--parchInk2); margin:.4rem 0 0; }
.jkeytop{ margin:.7rem 0 0; }
.jquiet{ font-size:.82rem; color:var(--parchInk2); margin:.2rem 0 0; }

/* ══ WHAT AN EXPANDED PLACE ROW GAINS ══════════════════════════════════════════════════════════ */
.jextras{ padding:0 var(--trGap) var(--trGap); }
.jexhd{ display:flex; align-items:center; gap:.5rem; margin:.6rem 0 .2rem; }
.jexhd h4{ font-family:var(--fdisp); font-weight:800; font-size:.95rem; margin:0; color:var(--parchInk); }

/* ── LEVEL MEDALS (owner 2026-11-11, rulings 3.2 and 3.3). The seat lies over a level tile's picture (the tile
      is trophy.css's; the seat copies its 5/3 frame) and holds the medal in the lower right corner. It is a
      sibling of the picture and not a child of it, so a level whose words have slipped since (a dimmed tile)
      still wears its medal at full strength: an earned medal is never taken back. No motion, no glow. */
.jlvseat{ position:absolute; left:0; right:0; top:0; aspect-ratio:5/3; pointer-events:none; }
/* THE COIN (owner 2026-11-12: the painted ribbon medal "looks a bit old fashioned here", and "add a shimmer of
   metal gloss, like a rim of the disc or mild gradient"). A level's medal is a small struck coin drawn here and
   nowhere painted, seated in the picture's lower left: a rim, a light ring inside it, the metal falling from light to shade, a soft catch of light
   at the upper left, and a star pressed into the face. The map card's stones (map.js) are the same coin. The
   PLACE's medal is the same coin one honour up (.jmed.jpc, above; owner 2026-11-12): bigger, two rims. Still no motion and no glow. */
.jcoin{
  /* LOWER LEFT (owner 2026-11-12: "Place the medals on the left of images because the interesting part of most
     images is usually on the right"). The round number badge is the upper left's; the two never meet. */
  position:absolute; left:.25rem; bottom:.25rem; box-sizing:border-box;
  width:var(--jMedLv); height:var(--jMedLv); border-radius:50%;
  border:var(--jCoinRim) solid var(--cRim);
  background:
    radial-gradient(circle at 30% 24%, rgba(255,255,255,.95) 0, rgba(255,255,255,0) 44%),
    linear-gradient(145deg, var(--cHi) 0%, var(--cMid) 46%, var(--cLo) 100%);
  box-shadow:inset 0 0 0 var(--jCoinRing) rgba(255,255,255,.6), 0 0 0 var(--jCoinRing) rgba(255,255,255,.92),
    0 .1rem .22rem rgba(59,44,20,.55);
}
.jcoin::after{
  content:""; position:absolute; inset:21%; background:var(--cLo); opacity:.6;
  clip-path:polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}
.jcoin.g-gold{ --cHi:var(--coinGoldHi); --cMid:var(--coinGold); --cLo:var(--coinGoldLo); --cRim:var(--coinGoldRim); }
.jcoin.g-silver{ --cHi:var(--coinSilHi); --cMid:var(--coinSil); --cLo:var(--coinSilLo); --cRim:var(--coinSilRim); }
.jcoin.g-bronze{ --cHi:var(--coinBrzHi); --cMid:var(--coinBrz); --cLo:var(--coinBrzLo); --cRim:var(--coinBrzRim); }
/* the count under the place's medal: a plain line, the facts and nothing that asks for more */
.jlvcount{ font-size:.85rem; line-height:1.45; color:var(--parchInk); margin:.1rem 0 .45rem; }
.jlvcount:has(+ .jlvmetals){ margin-bottom:0; }
.jlvmetals{ font-size:.8rem; line-height:1.45; color:var(--parchInk2); margin:0 0 .45rem; }

/* THE INVITATION. Warm, quiet, and deliberately not a call to action: no button, no arrow, no
   colour that competes with the medals. Treasure still buried, never homework. */
.jnext{
  font-size:.88rem; line-height:1.5; color:var(--parchInk); margin:.6rem 0 0;
  padding:.4rem .7rem; border-radius:var(--trRsm); background:rgba(255,209,102,.16);
  border-left:calc(var(--trRule)*2) solid var(--goldD);
}

.jrules{ margin-top:.7rem; }
.jrules h4{ font-family:var(--fdisp); font-weight:800; font-size:.9rem; margin:0; color:var(--parchInk); }
.jrulestrip{ display:flex; flex-wrap:wrap; gap:.4rem; margin-top:.35rem; }
.jrule{
  min-height:var(--trTap); padding:.15rem .7rem; border-radius:var(--trPill); cursor:pointer;
  background:var(--parchHi); border:var(--trRule) solid rgba(122,92,20,.45);
  color:var(--parchInk); font-family:var(--fbody); font-weight:700; font-size:.82rem;
}
@media (hover:hover){ .jrule:hover{ background:var(--parchLit); } }

/* the phone step: the band stacks rather than shrinks, the same ruling --trStack encodes.
   In a COLUMN, flex-basis means height, so the coin row swaps to auto and stretches across. */
@media (max-width:56.25em){
  .jshelf{ align-items:flex-start; flex-direction:column; gap:.5rem; }
  .jmeds{ flex:0 0 auto; align-self:stretch; }
  /* THE HEAD STAYS ONE ROW ON A PHONE (§36 (d)). `flex-wrap:wrap` put the 7.5rem wreath on a line
     of its own above the title, which is how the panel's head measured 300px at 390 — a third of
     the screen before the first word of the medal's story. The wreath halves instead: it is a
     frame around the medal, and a frame is allowed to be smaller than the thing it frames is
     proud. */
  .jhero{ width:var(--jLaurelSm); height:var(--jLaurelSm); }
  .jpanel{ padding:var(--trGap) calc(var(--trPad)*.65); }
}

/* ══ BOOKMARKS (§24 row 35, WRITING-QUEST-SPEC §11 ⑨) ════════════════════════════════════════════
   One chip ON the medal shelf (owner 2026-09-27: a separate row "takes a chunk of vertical real estate,
   right at the top"): the newest ribbon standing where a medal stands, its count, its name. Tapping it
   opens the medal panel's twin — every bookmark on a rail per month (the rail is a thin CSS rod), and
   the card of the one tapped at the foot. Each ribbon is a button with its date on the tail. */
.jbookart{ display:block; height:var(--jMedShelf); }
.jbookart img{ display:block; height:100%; width:auto; }
.jrail{
  position:relative; display:flex; flex-wrap:wrap; gap:1.1rem; padding:.2rem .6rem 0; margin:.4rem 0 .6rem;
}
.jrail::before{
  content:""; position:absolute; left:0; right:0; top:0; height:.35rem; border-radius:.2rem;
  background:linear-gradient(var(--parchInk), rgba(59,44,20,.6));
}
.jbm{
  position:relative; display:flex; flex-direction:column; align-items:center; gap:.15rem;
  background:none; border:0; padding:0; cursor:pointer; color:var(--parchInk);
}
.jbm img{ display:block; height:6rem; width:auto; }
.jbm.on img{ filter:drop-shadow(0 0 .3rem var(--gold)); }
.jbmd{
  position:absolute; left:50%; top:3.4rem; transform:translateX(-50%) rotate(-90deg); white-space:nowrap;
  font-family:var(--fdisp); font-weight:900; font-size:.62rem; color:rgba(255,250,240,.95);
  text-shadow:0 0 .12rem rgba(0,0,0,.55);
}
.jbm:focus-visible{ outline:.18rem solid var(--parchInk); outline-offset:.2rem; border-radius:.3rem; }
.jbookmo{ margin:.6rem 0 0; font-family:var(--fdisp); font-size:.9rem; color:var(--parchInk); }
.jbookcard{ border-top:var(--trRule) solid rgba(122,92,20,.35); padding-top:.6rem; }
.jbooknm{ margin:0; font-family:var(--fdisp); font-size:1.05rem; color:var(--parchInk); }
.jbookpl{ margin:.3rem 0 0; color:var(--parchInk); }
.jbookws{ display:flex; flex-wrap:wrap; gap:.4rem; margin-top:.5rem; }
.jbookw{ font:inherit; padding:.2rem .6rem; border-radius:var(--trPill); background:var(--parchHi); border:var(--trHair) solid rgba(122,92,20,.55); color:var(--parchInk); }
button.jbookw{ cursor:pointer; }

/* THE PRESS (polish survey 2026-11-11, item 8): a medal chip and a rule settle under a finger; the pick and the
   ✕ press in. Under reduced motion they dim instead. Tokens in kit/tokens.raw.css. */
.jchip:active, .jrule:active{ transform:scale(var(--press-card)); }   /* a word keeps the press it already had (above) */
.jpickb:active, .jclose:active{ transform:scale(var(--press-small)); }
@media (prefers-reduced-motion:reduce){
  .jchip:active, .jrule:active, .jpickb:active, .jclose:active{ transform:none; opacity:var(--press-dim); }
}
