/* ===========================================================
   Bubble Reef — stylesheet
   =========================================================== */

:root{
  --ink:        #0f3a55;
  --ink-soft:   #3d6b86;
  --paper:      #f4fbff;
  --green:      #21c48a;
  --green-dark: #149268;
  --blue:       #2f9fe0;
  --blue-dark:  #1a74ab;
  --purple:     #7f6ae6;
  --purple-dark:#5a47bf;
  --pink:       #ff6ba8;
  --gold:       #ffc531;
  --gold-dark:  #e09b00;
  --radius:     22px;
}

/* Nothing in the game is text to select (16 Nov 2026: a held tap on an
   iPhone brought up the magnifier): every element says so itself, as Safari
   does not always carry body's setting down to the canvas and the panels.
   The iPhone app also turns the web view's text interaction off. */
*{ box-sizing:border-box; -webkit-tap-highlight-color:transparent;
   -webkit-user-select:none; user-select:none; -webkit-touch-callout:none; }

html,body{ height:100%; }

body{
  margin:0;
  height:100%;
  font-family:'Baloo 2','Comic Sans MS','Trebuchet MS',system-ui,-apple-system,sans-serif;
  font-weight:700;
  color:var(--ink);
  /* letterbox / pillarbox surface behind the game */
  background:
    radial-gradient(circle at 50% 0%, #17567f 0%, transparent 62%),
    linear-gradient(165deg,#0d3a5c 0%, #061d31 100%);
  overflow:hidden;
  user-select:none;
  -webkit-user-select:none;
  -webkit-touch-callout:none;      /* a long press on the iPhone: no menu, no magnifier */
  touch-action:none;
  overscroll-behavior:none;
}

/* ------------------- STAGE -------------------
   JS sizes #stage to the whole viewport. The world scales so a fixed safe
   region always fits and then simply extends to the screen edges, so there
   is never a letterbox or pillarbox to leave dead, untappable space. */
#stage{
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
  width:100%;
  height:100%;
  overflow:hidden;
  background:#1d6fa8;
}

#game{
  display:block;
  width:100%;
  height:100%;
  image-rendering:auto;
  touch-action:none;
}

.hidden{ display:none !important; }
.light{
  position:absolute; inset:0; pointer-events:none;
  background:
    radial-gradient(ellipse 75% 60% at 50% 55%, rgba(8,24,52,0) 55%, rgba(8,24,52,.24) 100%),
    radial-gradient(circle at -10% -5%, rgba(255,244,214,.2) 0%, rgba(255,244,214,0) 70%),
    linear-gradient(118deg, rgba(255,255,255,0) 42%, rgba(255,255,255,.1) 50%, rgba(255,255,255,0) 58%);
}
/* low effects (game.js SPARE): one pass over the whole screen less */
.light.spare{ display:none; }
.light.moon{
  background:
    radial-gradient(ellipse 75% 60% at 50% 55%, rgba(8,24,52,0) 55%, rgba(8,24,52,.26) 100%),
    radial-gradient(circle at -10% -5%, rgba(170,190,255,.1) 0%, rgba(170,190,255,0) 70%),
    linear-gradient(118deg, rgba(255,255,255,0) 42%, rgba(255,255,255,.06) 50%, rgba(255,255,255,0) 58%);
}

/* ------------------- HUD ------------------- */
/* The readouts are painted on the canvas down the left, so the pause button
   takes the top right. It must stay out of the lower half: the whole screen
   is the steering control, and a thumb resting near the bottom corner would
   pause the run by accident. */
#hud{
  position:absolute;
  inset:0;
  pointer-events:none;
  font-size:clamp(13px,1.9vw,19px);
}
/* Bottom-right, big, and far enough in from the edge to clear a rounded
   screen. The old 44px circle in the top-right corner was a stretch on any
   phone held one-handed. */
.pause-btn{
  position:absolute;
  right:calc(16px + env(safe-area-inset-right,0px));
  bottom:calc(20px + env(safe-area-inset-bottom,0px));
  width:64px; height:64px;
  pointer-events:auto;
  display:grid; place-items:center;
  /* The same ice as every other button: it was the last plain white
     circle left in the game. */
  border:1.5px solid rgba(255,255,255,.8); border-bottom-color:rgba(255,255,255,.3); border-radius:50%;
  background:
    var(--ice-tex) 0 0 / 240px 80px,
    radial-gradient(90% 110% at 28% -5%, rgba(255,255,255,.6), rgba(255,255,255,0) 60%),
    linear-gradient(180deg, #b4ebff 0%, #55bdf0 48%, #2789d8 100%);
  box-shadow:inset 0 9px 10px -7px rgba(255,255,255,.85), inset 0 -8px 14px -6px rgba(0,26,70,.3),
             0 4px 0 #0450b8, 0 5.5px 0 rgba(0,18,52,.4), 0 10px 16px rgba(3,28,70,.3);
  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
}
.pause-btn:active{ transform:translateY(4px);
  box-shadow:inset 0 9px 10px -7px rgba(255,255,255,.85), inset 0 -8px 14px -6px rgba(0,26,70,.3),
             0 1px 0 #0450b8, 0 2px 0 rgba(0,18,52,.4); }
.pause-btn:focus-visible{ outline:3px solid #ffd84a; outline-offset:4px; }
.pause-bars{ display:flex; gap:7px; }
.pause-bars i{ display:block; width:8px; height:24px; border-radius:3px; background:#022f73;   /* cut in, as the words */
               box-shadow:0 1.3px 0 rgba(255,255,255,.62), 0 -1px 0 rgba(0,20,50,.36); }
@media (max-width:420px){
  .pause-btn{ width:58px; height:58px; }
  .pause-bars i{ height:21px; width:6px; }
}
.hud-side{ display:flex; align-items:center; gap:8px; flex:1; }
.hud-right{ justify-content:flex-end; pointer-events:auto; }
.hud-mid{ flex:0 0 auto; }

.level-name{
  background:rgba(43,33,65,.55);
  color:#fff;
  padding:5px 16px;
  border-radius:999px;
  backdrop-filter:blur(4px);
  box-shadow:0 3px 0 rgba(0,0,0,.18);
  white-space:nowrap;
}

.pill{
  display:flex; align-items:center; gap:6px;
  background:rgba(255,255,255,.92);
  color:var(--ink);
  padding:5px 14px;
  border-radius:999px;
  box-shadow:0 3px 0 rgba(0,0,0,.18);
}
.pill-ico{ font-size:1.1em; }

.icon-btn{
  pointer-events:auto;
  /* 27px on a phone was far too small to hit; keep a proper touch target */
  width:2.1em; height:2.1em;
  min-width:44px; min-height:44px;
  display:grid; place-items:center;
  font:inherit; font-size:1em; letter-spacing:1px;
  color:var(--ink);
  background:rgba(255,255,255,.92);
  border:none; border-radius:50%;
  box-shadow:0 3px 0 rgba(0,0,0,.18);
  cursor:pointer;
}
.icon-btn:active{ transform:translateY(2px); box-shadow:0 1px 0 rgba(0,0,0,.18); }

/* ------------------- SCREENS ------------------- */
/* Menus cover the whole window, not just the letterboxed stage: on a phone in
   portrait the stage is far too short to hold a panel, and #stage clips. */
.screen{
  position:fixed; inset:0;
  display:flex; align-items:flex-start; justify-content:center;
  padding:calc(18px + env(safe-area-inset-top,0px))
          calc(18px + env(safe-area-inset-right,0px))
          calc(18px + env(safe-area-inset-bottom,0px))
          calc(18px + env(safe-area-inset-left,0px));
  background:radial-gradient(circle at 50% 40%, rgba(30,18,64,.28), rgba(16,9,38,.62));
  backdrop-filter:blur(5px);
  animation:fade .25s ease both;
  overflow-y:auto;
  overflow-x:hidden;               /* nothing scrolls sideways: a prize popping in grew past the edge for a moment */
  -webkit-overflow-scrolling:touch;
  touch-action:pan-y;              /* body sets touch-action:none for gameplay */
}
@keyframes fade{ from{ opacity:0 } to{ opacity:1 } }

.panel{
  position:relative;
  margin:auto;                     /* centres, yet never clips a tall panel */
  width:min(560px,100%);
  text-align:center;
  padding:26px 26px 22px;
  border-radius:var(--radius);
  background:linear-gradient(180deg,#f7fcff 0%, #ddf1fb 100%);
  box-shadow:0 12px 0 rgba(0,0,0,.18), 0 26px 46px rgba(0,0,0,.35), inset 0 0 0 4px rgba(255,255,255,.9);
  animation:pop .32s cubic-bezier(.2,1.5,.4,1) both;
}
.panel-wide{ width:min(760px,100%); }
@keyframes pop{ from{ transform:scale(.82) translateY(14px); opacity:0 } to{ transform:none; opacity:1 } }

.panel-win{ background:linear-gradient(180deg,#f7fcff 0%, #d9f7ec 100%); }

/* ---- the title ----
   Artwork rather than styled text. The <h1> still holds the words for a
   screen reader; .sr-only takes them out of the picture without taking
   them out of the accessibility tree, which display:none would. */
.sr-only{
  position:absolute; width:1px; height:1px; margin:-1px; padding:0;
  overflow:hidden; clip:rect(0 0 0 0); clip-path:inset(50%); white-space:nowrap;
}
.game-title{
  position:relative;
  container-type:inline-size;        /* the melt sizes itself off this */
  margin:4px auto 30px;
  width:min(640px, 100%);
  line-height:0;                       /* no stray text line under the art */
  filter:drop-shadow(0 6px 10px rgba(20,62,96,.3));
}
.game-title picture, .game-title img{ display:block; width:100%; height:auto; }
/* The artwork's own edge is feathered away to nothing in the file, so it
   melts into the panel. It was a hard rectangle with a white frame before,
   which read as a screenshot pasted on top rather than part of the screen. */

/* ---- ice melting off the letters ----
   Each spike hangs from the bottom of the logo and grows a drop at its tip;
   the drop pinches off, falls and fades. Every spike runs on its own clock
   so they never let go together. */
/* The box covers the artwork itself, so each spike can be placed at the
   height its own letter ends at. */
.melt{ position:absolute; inset:0; pointer-events:none; }
/* The spike is a pseudo-element rather than the <i> itself. clip-path on
   an element clips its descendants too, so with the triangle on the <i> the
   drop hanging below the tip was cut away and never appeared at all. */
.melt i{
  position:absolute; left:var(--x); top:var(--y);
  width:calc(var(--w) * 1cqw); height:calc(var(--len) * 1cqw);
  margin-left:calc(var(--w) * -0.5cqw);
}
.melt i::before{
  content:'';
  position:absolute; inset:0;
  background:linear-gradient(100deg,
    #eaf7ff 0%, #a8d8f2 26%, #4d9fd3 58%, #1c6ea6 100%);
  clip-path:polygon(0 0, 100% 0, 50% 100%);
  filter:drop-shadow(0 2px 3px rgba(16,58,92,.5));
  animation:thaw var(--t) ease-in-out var(--d) infinite;
  transform-origin:top center;
}
/* The drop, born at the tip and outside the spike's clip. */
.melt i::after{
  content:'';
  position:absolute; left:50%; top:100%;
  width:calc(var(--w) * 0.86cqw); height:calc(var(--w) * 1.02cqw);
  margin-left:calc(var(--w) * -0.43cqw);
  border-radius:48% 48% 52% 52% / 38% 38% 62% 62%;
  background:radial-gradient(ellipse at 32% 28%,
    #ffffff 0%, #b6dff5 34%, #3f93cc 72%, #14618f 100%);
  filter:drop-shadow(0 2px 3px rgba(16,58,92,.45));
  animation:drip var(--t) cubic-bezier(.45,0,.75,1) var(--d) infinite;
}
/* The spike itself only breathes — a drop leaving takes a little ice with it. */
@keyframes thaw{
  0%, 100% { transform:scaleY(1); }
  46%      { transform:scaleY(1.06); }
  58%      { transform:scaleY(.94); }
}
@keyframes drip{
  0%, 40%  { transform:translateY(-0.4cqw) scale(.25); opacity:0; }
  62%      { transform:translateY(0) scale(1); opacity:1; }      /* hanging */
  70%      { transform:translateY(0.8cqw) scaleY(1.35) scaleX(.78); opacity:1; }
  100%     { transform:translateY(11cqw) scaleY(1.5) scaleX(.6); opacity:0; }
}
@media (prefers-reduced-motion: reduce){
  .melt i::before{ animation:none; }
  .melt i::after{ animation:none; opacity:0; }
}

/* A band of light crossing the ice. It is masked by the logo's own alpha,
   so it lights the artwork and stops exactly where the artwork fades out —
   no rectangle reappears at the edges. */
.game-title::after{
  content:'';
  position:absolute; inset:0;
  background:linear-gradient(104deg,
    rgba(255,255,255,0) 43%, rgba(255,255,255,.45) 50%, rgba(255,255,255,0) 57%);
  background-size:300% 100%;
  -webkit-mask-image:url(../img/logo.webp); mask-image:url(../img/logo.webp);
  -webkit-mask-size:100% 100%; mask-size:100% 100%;
  -webkit-mask-repeat:no-repeat; mask-repeat:no-repeat;
  pointer-events:none;
  animation:glint 6s ease-in-out infinite;
}
/* With the gradient three times the width of the logo, its band sits at
   1.5 widths from its left edge, so position 0% parks the band off the
   right and 100% carries it off the left. The first attempt ran 170% to
   -70%, which left the band sitting on the artwork for most of the cycle,
   and with mix-blend-mode:screen on top it bleached the logo to nothing. */
@keyframes glint{
  0%, 64% { background-position:0% 0; }
  100%    { background-position:100% 0; }
}
@media (prefers-reduced-motion: reduce){
  .game-title::after{ animation:none; background-position:50% 0; opacity:.5; }
}



/* The display face (Nunito Black, css/font.css) for the titles and the
   buttons; everything read at length stays in Baloo 2. */
:root{ --display:'Nunito','Baloo 2','Trebuchet MS',system-ui,sans-serif; }
.panel-title-text{
  margin:0 0 10px;
  font-family:var(--display);
  font-size:clamp(23px,4.2vw,34px);
  font-weight:900;
  color:var(--ink);
}

.subtitle{ margin:4px 0 14px; font-size:clamp(14px,2.2vw,18px); color:var(--ink-soft); font-weight:600; }

.hero-emoji{ font-size:clamp(48px,10vw,76px); line-height:1; animation:bob 2.2s ease-in-out infinite; }
.win-emoji{ font-size:clamp(44px,9vw,68px); line-height:1; animation:pop2 .6s cubic-bezier(.2,1.7,.4,1) both; }
@keyframes bob{ 0%,100%{ transform:translateY(0) rotate(-4deg) } 50%{ transform:translateY(-12px) rotate(4deg) } }
@keyframes pop2{ from{ transform:scale(0) rotate(-40deg) } to{ transform:none } }

/* ------------------- BUTTONS ------------------- */
/* Row gap is taller than it is wide: every button carries a cap of snow
   that stands above its top edge, and it must not touch the ice block of
   the row above. */
.btn-row{ display:flex; flex-wrap:wrap; gap:22px 10px; justify-content:center; margin-top:20px; }

/* ---- slabs of real ice (13 Nov 2026) ----
   Each button is a slab of coloured ice: clear enough to see bubbles and
   fine cracks caught in it (--ice-tex), light coming through its upper
   part, the colour deepening toward the bottom where you look through
   more of it, frost along its top edge, a lit rim, and the slab's
   thickness under it. Real snow lies on top and icicles hang below. It
   was a cartoon block with a navy outline before; the owner asked for the
   buttons to match the hill and the comics, which are drawn real now.
   Each colour only sets the variables; shape and press are shared. */
.btn{
  --hi:#b4ebff; --face:#55bdf0; --lo:#2789d8; --edge:#0450b8; --deep:#022f73;
  --line:#062a78;
  position:relative;
  font:inherit;
  font-family:var(--display);
  font-size:clamp(15px,2.35vw,19.5px);
  font-weight:900;
  letter-spacing:.01em;
  color:var(--deep);
  padding:12px 26px;
  border:1.5px solid rgba(255,255,255,.78);
  border-bottom-color:rgba(255,255,255,.28);
  border-radius:15px;
  cursor:pointer;
  background:
    var(--ice-tex) 0 0 / 240px 80px,
    radial-gradient(90% 120% at 22% -10%, rgba(255,255,255,.6), rgba(255,255,255,0) 62%),
    linear-gradient(180deg, var(--hi) 0%, var(--face) 48%, var(--lo) 100%);
  box-shadow:
    inset 0 9px 10px -7px rgba(255,255,255,.85),
    inset 0 -8px 14px -6px rgba(0,26,70,.3),
    inset 0 0 0 1px rgba(255,255,255,.16),
    0 6px 0 var(--edge),
    0 7.5px 0 rgba(0,18,52,.4),
    0 13px 16px rgba(3,28,70,.32);
  /* The words cut into the ice (the owner's choice, 13 Nov 2026): the
     slab's own deep colour, the lower lip of each cut catching the light,
     its upper lip in shade. White letters with an outline and a drop
     shadow sat on top of the button, apart from it. */
  text-shadow:
    0 1.3px 0 rgba(255,255,255,.62),
    0 -1px 0 rgba(0,20,50,.36),
    0 0 1px rgba(0,20,50,.22);
  transition:transform .08s ease, box-shadow .08s ease, filter .15s ease;
}
/* ---- snow on the buttons, icicles under them ----
   Snow as it lies on ice: soft and lumpy on top, cold blue underneath, a
   thin shade where it sits on the slab, a few crystals catching the
   light; no outline (the cartoon cap had a navy one). It is three pieces
   so it fits any width without stretching: the two ends and the icicles
   (::after, which reaches from above the slab to below it) and a middle
   that repeats (::before). `round` fits a whole number of lumps between
   the ends, so the seams always meet. */
:root{
  --ice-tex:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 80'%3E%3Cg fill='none' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 67 L39 53 L47 58 L71 41' stroke='rgba(0,30,70,.14)' stroke-width='.9'/%3E%3Cpath d='M14 66 L38 52 L46 57 L70 40' stroke='rgba(255,255,255,.5)' stroke-width='.9'/%3E%3Cpath d='M151 9 L163 23 L159 31 L177 47' stroke='rgba(0,30,70,.14)' stroke-width='.9'/%3E%3Cpath d='M150 8 L162 22 L158 30 L176 46' stroke='rgba(255,255,255,.5)' stroke-width='.9'/%3E%3Cpath d='M197 73 L213 59 L231 63' stroke='rgba(0,30,70,.14)' stroke-width='.9'/%3E%3Cpath d='M196 72 L212 58 L230 62' stroke='rgba(255,255,255,.5)' stroke-width='.9'/%3E%3Cpath d='M97 21 L105 31 L121 29' stroke='rgba(0,30,70,.14)' stroke-width='.9'/%3E%3Cpath d='M96 20 L104 30 L120 28' stroke='rgba(255,255,255,.5)' stroke-width='.9'/%3E%3C/g%3E%3Cg fill='rgba(255,255,255,.18)' stroke='rgba(255,255,255,.65)' stroke-width='.6'%3E%3Ccircle cx='30' cy='20' r='1.7'/%3E%3Ccircle cx='29.405' cy='19.405' r='0.595' fill='rgba(255,255,255,.75)' stroke='none'/%3E%3Ccircle cx='34' cy='27' r='1'/%3E%3Ccircle cx='33.65' cy='26.65' r='0.35' fill='rgba(255,255,255,.75)' stroke='none'/%3E%3Ccircle cx='90' cy='60' r='2.3'/%3E%3Ccircle cx='89.195' cy='59.195' r='0.805' fill='rgba(255,255,255,.75)' stroke='none'/%3E%3Ccircle cx='97' cy='54' r='1.2'/%3E%3Ccircle cx='96.58' cy='53.58' r='0.42' fill='rgba(255,255,255,.75)' stroke='none'/%3E%3Ccircle cx='128' cy='34' r='1.5'/%3E%3Ccircle cx='127.475' cy='33.475' r='0.525' fill='rgba(255,255,255,.75)' stroke='none'/%3E%3Ccircle cx='186' cy='18' r='1.9'/%3E%3Ccircle cx='185.335' cy='17.335' r='0.665' fill='rgba(255,255,255,.75)' stroke='none'/%3E%3Ccircle cx='211' cy='40' r='1.1'/%3E%3Ccircle cx='210.615' cy='39.615' r='0.385' fill='rgba(255,255,255,.75)' stroke='none'/%3E%3Ccircle cx='60' cy='12' r='1'/%3E%3Ccircle cx='59.65' cy='11.65' r='0.35' fill='rgba(255,255,255,.75)' stroke='none'/%3E%3Ccircle cx='112' cy='72' r='1.4'/%3E%3Ccircle cx='111.51' cy='71.51' r='0.49' fill='rgba(255,255,255,.75)' stroke='none'/%3E%3Ccircle cx='226' cy='26' r='1.2'/%3E%3Ccircle cx='225.58' cy='25.58' r='0.42' fill='rgba(255,255,255,.75)' stroke='none'/%3E%3Ccircle cx='170' cy='64' r='1.6'/%3E%3Ccircle cx='169.44' cy='63.44' r='0.56' fill='rgba(255,255,255,.75)' stroke='none'/%3E%3Ccircle cx='6' cy='40' r='1.2'/%3E%3Ccircle cx='5.58' cy='39.58' r='0.42' fill='rgba(255,255,255,.75)' stroke='none'/%3E%3C/g%3E%3Cg fill='rgba(255,255,255,.4)'%3E%3Ccircle cx='82' cy='19' r='.6'/%3E%3Ccircle cx='101' cy='6' r='.6'/%3E%3Ccircle cx='18' cy='68' r='.6'/%3E%3Ccircle cx='24' cy='46' r='.6'/%3E%3Ccircle cx='149' cy='7' r='.6'/%3E%3Ccircle cx='232' cy='64' r='.6'/%3E%3Ccircle cx='54' cy='4' r='.6'/%3E%3Ccircle cx='22' cy='55' r='.6'/%3E%3Ccircle cx='107' cy='8' r='.6'/%3E%3Ccircle cx='61' cy='11' r='.6'/%3E%3Ccircle cx='141' cy='54' r='.6'/%3E%3Ccircle cx='15' cy='72' r='.6'/%3E%3Ccircle cx='31' cy='28' r='.6'/%3E%3Ccircle cx='161' cy='74' r='.6'/%3E%3Ccircle cx='15' cy='73' r='.6'/%3E%3Ccircle cx='149' cy='50' r='.6'/%3E%3Ccircle cx='12' cy='28' r='.6'/%3E%3Ccircle cx='11' cy='71' r='.6'/%3E%3Ccircle cx='219' cy='17' r='.6'/%3E%3Ccircle cx='74' cy='53' r='.6'/%3E%3Ccircle cx='36' cy='69' r='.6'/%3E%3Ccircle cx='30' cy='73' r='.6'/%3E%3Ccircle cx='78' cy='71' r='.6'/%3E%3Ccircle cx='208' cy='23' r='.6'/%3E%3Ccircle cx='26' cy='74' r='.6'/%3E%3Ccircle cx='146' cy='24' r='.6'/%3E%3C/g%3E%3C/svg%3E");
  --snow-l:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 22'%3E%3ClinearGradient id='g' x2='0' y2='1'%3E%3Cstop offset='.25' stop-color='%23fff'/%3E%3Cstop offset='.7' stop-color='%23eaf4fb'/%3E%3Cstop offset='1' stop-color='%23b6d1e6'/%3E%3C/linearGradient%3E%3Cpath d='M26.5 3.2Q22 1.4 17 2.4Q14 .8 10 2.2Q3 3.6 2.2 9.8Q1.8 15.4 5.4 18Q9.6 20.4 12.8 16.6Q17.6 13.4 26.5 15Z' fill='rgba(0,40,90,.17)' transform='translate(0 2.2)'/%3E%3Cpath d='M26.5 3.2Q22 1.4 17 2.4Q14 .8 10 2.2Q3 3.6 2.2 9.8Q1.8 15.4 5.4 18Q9.6 20.4 12.8 16.6Q17.6 13.4 26.5 15Z' fill='url(%23g)'/%3E%3Cpath d='M26.5 3.2Q22 1.4 17 2.4Q14 .8 10 2.2Q3 3.6 2.2 9.8Q1.8 15.4 5.4 18Q9.6 20.4 12.8 16.6Q17.6 13.4 26.5 15' fill='none' stroke='rgba(70,110,150,.42)' stroke-width='.9' stroke-linejoin='round'/%3E%3Cpath d='M8.6 4.8Q5 6 4.4 9.6' fill='none' stroke='%23fff' stroke-width='1.6' stroke-linecap='round'/%3E%3Ccircle cx='15' cy='6' r='.7' fill='%23cfe6f7'/%3E%3Ccircle cx='20' cy='9' r='.6' fill='%23cfe6f7'/%3E%3C/svg%3E");
  --snow-r:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 22'%3E%3Cg transform='translate(26 0) scale(-1 1)'%3E%3ClinearGradient id='g' x2='0' y2='1'%3E%3Cstop offset='.25' stop-color='%23fff'/%3E%3Cstop offset='.7' stop-color='%23eaf4fb'/%3E%3Cstop offset='1' stop-color='%23b6d1e6'/%3E%3C/linearGradient%3E%3Cpath d='M26.5 3.2Q22 1.4 17 2.4Q14 .8 10 2.2Q3 3.6 2.2 9.8Q1.8 15.4 5.4 18Q9.6 20.4 12.8 16.6Q17.6 13.4 26.5 15Z' fill='rgba(0,40,90,.17)' transform='translate(0 2.2)'/%3E%3Cpath d='M26.5 3.2Q22 1.4 17 2.4Q14 .8 10 2.2Q3 3.6 2.2 9.8Q1.8 15.4 5.4 18Q9.6 20.4 12.8 16.6Q17.6 13.4 26.5 15Z' fill='url(%23g)'/%3E%3Cpath d='M26.5 3.2Q22 1.4 17 2.4Q14 .8 10 2.2Q3 3.6 2.2 9.8Q1.8 15.4 5.4 18Q9.6 20.4 12.8 16.6Q17.6 13.4 26.5 15' fill='none' stroke='rgba(70,110,150,.42)' stroke-width='.9' stroke-linejoin='round'/%3E%3Cpath d='M8.6 4.8Q5 6 4.4 9.6' fill='none' stroke='%23fff' stroke-width='1.6' stroke-linecap='round'/%3E%3Ccircle cx='15' cy='6' r='.7' fill='%23cfe6f7'/%3E%3Ccircle cx='20' cy='9' r='.6' fill='%23cfe6f7'/%3E%3C/g%3E%3C/svg%3E");
  --snow-m:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 56 22' preserveAspectRatio='none'%3E%3ClinearGradient id='g' x2='0' y2='1'%3E%3Cstop offset='.25' stop-color='%23fff'/%3E%3Cstop offset='.7' stop-color='%23eaf4fb'/%3E%3Cstop offset='1' stop-color='%23b6d1e6'/%3E%3C/linearGradient%3E%3Cpath d='M-.5 15Q5 13.6 9.4 17.4Q15 21.6 21.6 17.8Q27 14.6 32.4 15.8Q40 17.4 45.6 20.2Q51 22.6 56.5 15L56.5 3.2Q50 1.8 44 2.8Q38 1 31 2.6Q24 .6 17 2.4Q8 1.2 -.5 3Z' fill='rgba(0,40,90,.17)' transform='translate(0 2.2)'/%3E%3Cpath d='M-.5 15Q5 13.6 9.4 17.4Q15 21.6 21.6 17.8Q27 14.6 32.4 15.8Q40 17.4 45.6 20.2Q51 22.6 56.5 15L56.5 3.2Q50 1.8 44 2.8Q38 1 31 2.6Q24 .6 17 2.4Q8 1.2 -.5 3Z' fill='url(%23g)'/%3E%3Cpath d='M-.5 3Q8 1.2 17 2.4Q24 .6 31 2.6Q38 1 44 2.8Q50 1.8 56.5 3.2' fill='none' stroke='rgba(70,110,150,.4)' stroke-width='.9'/%3E%3Cpath d='M-.5 15Q5 13.6 9.4 17.4Q15 21.6 21.6 17.8Q27 14.6 32.4 15.8Q40 17.4 45.6 20.2Q51 22.6 56.5 15' fill='none' stroke='rgba(70,110,150,.45)' stroke-width='.9'/%3E%3Ccircle cx='12' cy='7' r='.7' fill='%23cfe6f7'/%3E%3Ccircle cx='38' cy='8' r='.6' fill='%23cfe6f7'/%3E%3Ccircle cx='26' cy='5' r='.5' fill='%23fff'/%3E%3C/svg%3E");
  --icicles:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 10'%3E%3ClinearGradient id='i' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='rgba(255,255,255,.95)'/%3E%3Cstop offset='1' stop-color='rgba(200,232,250,.6)'/%3E%3C/linearGradient%3E%3Cg fill='url(%23i)' stroke='rgba(80,130,180,.4)' stroke-width='.5'%3E%3Cpath d='M9 0Q10 5 10.8 9.6Q11.6 5 12.8 0Z'/%3E%3Cpath d='M15.5 0Q16 2 16.4 3.6Q16.9 2 17.4 0Z'/%3E%3Cpath d='M58.5 0Q59.3 3.5 59.9 6.4Q60.6 3.5 61.4 0Z'/%3E%3Cpath d='M94.5 0Q95 2.2 95.4 4.2Q95.9 2.2 96.4 0Z'/%3E%3C/g%3E%3C/svg%3E");
}
.btn::before, .btn::after{
  content:'';
  position:absolute; top:-11px; height:22px;
  pointer-events:none;
  filter:drop-shadow(0 1.5px 1.5px rgba(0,30,80,.22));
}
.btn::after{
  /* the icicles hang from the slab's lower lip (6px under the button) and
     no further than 10px: longer, they reached into the words and the
     buttons under them */
  left:-5px; right:-5px; height:auto; bottom:-16px;
  background:
    var(--snow-l) left top / 26px 22px no-repeat,
    var(--snow-r) right top / 26px 22px no-repeat,
    var(--icicles) 22px 100% / 120px 10px;
  background-repeat:no-repeat, no-repeat, repeat-x;
}
.btn::before{
  left:20px; right:20px;
  background:var(--snow-m) 0 0 / 88px 22px;
  background-repeat:round no-repeat;
}
.btn:hover{ filter:brightness(1.07) saturate(1.05); }
.btn:active{
  transform:translateY(5px);
  box-shadow:
    inset 0 9px 10px -7px rgba(255,255,255,.85),
    inset 0 -8px 14px -6px rgba(0,26,70,.3),
    inset 0 0 0 1px rgba(255,255,255,.16),
    0 1px 0 var(--edge),
    0 2.5px 0 rgba(0,18,52,.4),
    0 5px 9px rgba(3,28,70,.3);
}
.btn:focus-visible{ outline:3px solid #ffd84a; outline-offset:4px; }
.btn-big{ font-size:clamp(17.5px,3vw,25px); padding:15px 40px; }
.btn-big::after{ bottom:-18px; background-size:26px 22px, 26px 22px, 144px 12px; }

.btn-blue  { --hi:#b4ebff; --face:#55bdf0; --lo:#2789d8; --edge:#0450b8; --deep:#022f73; }
.btn-green { --hi:#c6f8e6; --face:#45d3a2; --lo:#1ea27c; --edge:#0b7560; --deep:#05463a; }
.btn-purple{ --hi:#ddd4ff; --face:#9a86f4; --lo:#6c55d8; --edge:#4430a6; --deep:#271a6e; }
.btn-red   { --hi:#ffcbd2; --face:#f1667c; --lo:#cf3a53; --edge:#991d35; --deep:#5e0f20; }
/* Gold is the colour of the golden fish, so it marks the Market. */
.btn-gold  { --hi:#fff2b8; --face:#ffcd3a; --lo:#f0a000; --edge:#ad6800; --deep:#6a3e00; }
/* Frost: the quiet buttons. Pale ice with dark letters, and no snow, so
   they sit a step below the coloured ones. */
.btn-ghost {
  --hi:#ffffff; --face:#eaf7fd; --lo:#cbe8f6; --edge:#8dbcd9; --line:#2b5d86;
  color:var(--ink);
  border-color:rgba(255,255,255,.95) rgba(160,200,226,.9) rgba(120,170,206,.9);
  text-shadow:0 1px 0 #fff;
  font-size:clamp(13px,2vw,16px); padding:10px 20px;
}
.btn-ghost::before, .btn-ghost::after{ display:none; }

.toggles{ display:flex; flex-wrap:wrap; gap:10px; justify-content:center; margin-top:16px; }
/* The language choice: one of two, so a picked chip and a free chip.
   The free one used to be faded to 45%, which reads as switched OFF or
   broken rather than as "the other choice". Both are full strength now;
   the picked one is blue ice with a tick. */
.chip{
  font:inherit; font-size:15px; font-weight:800;
  min-height:44px; padding:8px 18px;
  border:2px solid rgba(43,93,134,.45); border-radius:14px;
  cursor:pointer;
  color:var(--ink);
  background:linear-gradient(180deg,#ffffff 0%,#e6f4fb 100%);
  box-shadow:0 3px 0 rgba(43,93,134,.35);
  transition:background .15s, transform .08s, box-shadow .08s;
}
.chip.on{
  color:#fff;
  border-color:#062a78;
  background:linear-gradient(180deg,#b4ebff 0%,#55bdf0 46%,#2789d8 100%);
  box-shadow:0 3px 0 #0450b8, 0 5px 0 #062a78;
  text-shadow:0 1px 0 #062a78, 0 0 2px #062a78;
}
.chip.on::before{ content:'\2713\00a0'; }
.chip:active{ transform:translateY(2px); box-shadow:0 1px 0 rgba(43,93,134,.35); }
.chip:focus-visible, .switch:focus-visible{ outline:3px solid #ffd84a; outline-offset:3px; }

/* Sound and music: on/off, so they are switches. As chips the "off"
   state was the same faded look as an unpicked language and nobody could
   tell which was which. */
.switch{
  display:inline-flex; align-items:center; gap:12px;
  min-height:48px; padding:8px 12px 8px 18px;
  font:inherit; font-size:16px; font-weight:800; color:var(--ink);
  background:linear-gradient(180deg,#ffffff 0%,#e6f4fb 100%);
  border:2px solid rgba(43,93,134,.45); border-radius:16px;
  box-shadow:0 3px 0 rgba(43,93,134,.35);
  cursor:pointer;
}
.switch:active{ transform:translateY(2px); box-shadow:0 1px 0 rgba(43,93,134,.35); }
.sw-track{
  position:relative; width:50px; height:28px; flex:0 0 auto;
  border-radius:999px;
  background:#b8c7d3;
  box-shadow:inset 0 2px 3px rgba(0,0,0,.18);
  transition:background .18s;
}
.sw-knob{
  position:absolute; top:3px; left:3px; width:22px; height:22px;
  border-radius:50%; background:#fff;
  box-shadow:0 2px 3px rgba(0,0,0,.25);
  transition:transform .18s cubic-bezier(.3,1.4,.5,1);
}
.switch.on .sw-track{ background:#21c48a; }
.switch.on .sw-knob{ transform:translateX(22px); }
@media (prefers-reduced-motion: reduce){ .sw-track, .sw-knob{ transition:none; } }

/* ------------------- HELP ------------------- */
.help-list{
  list-style:none; margin:0 0 6px; padding:0;
  text-align:left; display:grid; gap:9px;
  font-size:clamp(13px,2.1vw,17px); font-weight:600; color:var(--ink-soft);
}
.help-list li{
  background:rgba(255,255,255,.7); padding:9px 14px; border-radius:14px;
  display:flex; align-items:center; gap:12px;
}
/* The thing itself, drawn by the game's own painters. Nineteen identical
   boxes of text is where a new player stops reading; a picture of the
   thing being described is what the emoji used to do, except these are
   the actual objects off the hill. */
.hint-ico{
  flex:0 0 auto; width:50px; height:50px;
  background:linear-gradient(180deg,#dff0fb 0%, #c3e2f5 100%);
  border-radius:13px;
  box-shadow:inset 0 0 0 2px rgba(255,255,255,.65);
}
.hint-txt{ flex:1 1 auto; min-width:0; }
/* a line with no picture is plain text: as a flex box its bold word made
   three columns of it */
.help-list li:not([data-hint]){ display:block; }
.keycap{
  display:inline-block; min-width:1.9em; text-align:center;
  padding:1px 7px; margin:0 1px;
  background:#fff; color:var(--ink);
  border-radius:7px;
  box-shadow:0 2px 0 #bfb3d4, inset 0 0 0 2px #e6def2;
  font-size:.92em;
}

/* ------------------- LEVEL GRID ------------------- */
.level-grid{
  display:grid;
  grid-template-columns:repeat(5,1fr);
  gap:12px;
  margin:6px 0 14px;
}
@media (max-width:520px){ .level-grid{ grid-template-columns:repeat(4,1fr); gap:9px; } }

.lvl{
  position:relative;
  aspect-ratio:1;
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px;
  font:inherit; font-weight:800;
  font-size:clamp(17px,3.4vw,26px);
  color:#fff;
  border:none; border-radius:18px;
  cursor:pointer;
  background:linear-gradient(180deg,#5fd0ff,#2f9ce8);
  box-shadow:0 6px 0 #1a74ab, 0 10px 16px rgba(0,0,0,.2);
  transition:transform .09s ease, box-shadow .09s ease;
}
.lvl:hover{ filter:brightness(1.08); }
.lvl:active{ transform:translateY(5px); box-shadow:0 1px 0 #1b7fd4; }
.lvl.done{ background:linear-gradient(180deg,#5de8b4,#1bb583); box-shadow:0 6px 0 #0f8a62, 0 10px 16px rgba(0,0,0,.2); }
.lvl.done:active{ box-shadow:0 1px 0 #0f8a62; }
.lvl.locked{
  background:linear-gradient(180deg,#d8d2e4,#b4abc6);
  box-shadow:0 6px 0 #968cad, 0 10px 16px rgba(0,0,0,.14);
  color:rgba(255,255,255,.9);
  cursor:not-allowed;
}
.lvl .lvl-stars{ font-size:.48em; letter-spacing:1px; line-height:1; color:#fff8c9; text-shadow:0 1px 2px rgba(0,0,0,.25); }

.total-stars{ font-size:clamp(15px,2.4vw,19px); color:var(--ink-soft); }

.stars-earned{ display:flex; gap:10px; justify-content:center; font-size:clamp(38px,7vw,58px); line-height:1; color:#d9cfe6; }
.stars-earned span.lit{ color:var(--gold); text-shadow:0 0 18px rgba(255,197,49,.8); animation:starPop .45s cubic-bezier(.2,1.8,.4,1) both; }
.stars-earned span.lit:nth-child(2){ animation-delay:.16s; }
.stars-earned span.lit:nth-child(3){ animation-delay:.32s; }
@keyframes starPop{ from{ transform:scale(0) rotate(-90deg) } to{ transform:none } }

.big-score{ font-size:clamp(26px,5vw,40px); font-weight:800; color:var(--gold-dark); margin:6px 0 2px; }

/* ------------------- FLOATING DECOR ------------------- */
.sky-deco{ position:absolute; inset:0; overflow:hidden; pointer-events:none; }
.float{ position:absolute; font-size:30px; opacity:.55; animation:drift 9s ease-in-out infinite; }
.f1{ left:8%;  top:18%; animation-delay:0s;   }
.f2{ left:88%; top:26%; animation-delay:1.1s; }
.f3{ left:16%; top:74%; animation-delay:2.3s; }
.f4{ left:78%; top:68%; animation-delay:3.1s; }
.f5{ left:46%; top:10%; animation-delay:4.2s; }
.f6{ left:92%; top:84%; animation-delay:5.4s; }
@keyframes drift{ 0%,100%{ transform:translateY(0) rotate(-8deg) } 50%{ transform:translateY(-26px) rotate(10deg) } }

/* ------------------- SHORT SCREENS ------------------- */
@media (max-height:640px){
  .panel      { padding:18px 20px 16px; }
  .btn-row    { margin-top:16px; gap:20px 8px; }
  .hero-emoji { font-size:clamp(34px,7vw,52px); }
  .win-emoji  { font-size:clamp(32px,7vw,48px); }
  .game-title { width:min(600px, 100%); margin-bottom:26px; }
  .subtitle   { margin:2px 0 8px; }
  .toggles    { margin-top:10px; }
  .help-list  { gap:6px; }
  .help-list li { padding:6px 12px; gap:10px; }
  .hint-ico   { width:44px; height:44px; border-radius:11px; }
}
@media (max-height:460px){
  .hero-emoji, .win-emoji { display:none; }
  .screen      { padding-top:calc(10px + env(safe-area-inset-top,0px));
                 padding-bottom:calc(10px + env(safe-area-inset-bottom,0px)); }
  .panel       { padding:14px 18px 12px; }
  .game-title  { width:min(457px, 96%); margin:2px auto 22px; }
  .panel-title-text { font-size:clamp(19px,3.6vw,26px); margin-bottom:6px; }
  .subtitle    { font-size:clamp(12px,1.9vw,14px); margin:2px 0 6px; }
  .btn         { padding:9px 20px; font-size:clamp(14px,2vw,16px); }
  .btn-big     { padding:11px 26px; font-size:clamp(15px,2.4vw,19px); }
  .btn-row     { margin-top:6px; }
  .toggles     { margin-top:8px; }
  .chip        { padding:5px 13px; font-size:13px; }
  .stars-earned{ font-size:clamp(28px,5vw,40px); }
  .help-list   { gap:4px; font-size:clamp(12px,1.8vw,14px); }
  .help-list li{ padding:5px 10px; gap:8px; }
  .hint-ico    { width:36px; height:36px; border-radius:9px; }
  .level-grid  { gap:7px; margin:4px 0 8px; }
  .total-stars { font-size:14px; }
}
/* ------------------- NARROW SCREENS -------------------
   A phone with its display size turned up is 320 css px across (the
   user's OPPO A9: 720 pixels at density 360). The screen's margin and the
   panel's own took 88 of them, and what was left squeezed the trophies to
   a word a line. */
@media (max-width:360px){
  .screen{ padding-left:calc(8px + env(safe-area-inset-left,0px));
           padding-right:calc(8px + env(safe-area-inset-right,0px)); }
  .panel{ padding-left:14px; padding-right:14px; }
  #screen-shop .wallet{ margin-left:-14px; margin-right:-14px; padding-left:14px; padding-right:14px; }
}

/* ------------------- FISH MARKET -------------------
   The cards have to stay legible on a phone, so the grid collapses to a
   single column rather than shrinking the portraits into thumbnails. */
.wallet{
  display:flex; gap:18px; justify-content:center;
  font-size:clamp(18px,3.2vw,26px); font-weight:800;
  color:var(--gold-dark);
  margin:2px 0 14px;
}

.shop-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(168px,1fr));
  gap:12px;
  margin:0 0 6px;
}

.skin-card{
  display:flex; flex-direction:column; align-items:center; gap:6px;
  padding:12px 10px 14px;
  border-radius:20px;
  background:rgba(255,255,255,.8);
  border:3px solid transparent;
  box-shadow:0 3px 0 rgba(0,0,0,.08);
}
.skin-card.owned{ background:rgba(236,250,241,.92); }
.skin-card.worn{ border-color:var(--green); background:rgba(214,245,225,.96); }

.skin-info{ display:flex; flex-direction:column; align-items:center; gap:6px; }

.skin-pic{
  display:block;
  width:88px; height:88px;
  border-radius:50%;
  background:radial-gradient(circle at 50% 38%, #dff1fb 0%, #b9dcf0 100%);
}

.skin-name{ font-weight:800; font-size:clamp(15px,2.4vw,19px); color:var(--ink); }
.skin-perk{
  font-size:clamp(12px,1.9vw,14px);
  color:var(--ink-soft);
  text-align:center;
  line-height:1.3;
  min-height:2.6em;
}
.btn-sm{ font-size:clamp(12.5px,1.9vw,15px); padding:9px 18px;
  text-shadow:0 1px 0 rgba(255,255,255,.58), 0 -.8px 0 rgba(0,20,50,.32); }
/* A full cap lay across the words on a button this short ("Wear",
   "700 fish"). The same snow, scaled down. */
.btn-sm::before, .btn-sm::after{ top:-8px; height:15px; }
.btn-sm::after{
  left:-4px; right:-4px; bottom:-14px;
  background-size:18px 15px, 18px 15px, 96px 8px;
  background-position:left top, right top, 16px 100%;
}
.btn-sm::before{ left:13px; right:13px; background-size:52px 15px; }
.btn-sm:disabled{ cursor:default; filter:none; }
.btn-sm:disabled:active{ transform:none; }

.shop-note{
  font-size:clamp(12px,1.9vw,15px);
  color:var(--ink-soft);
  text-align:center;
  margin:8px 0 2px;
}

.earned{
  font-size:clamp(17px,3vw,23px);
  font-weight:800;
  color:var(--gold-dark);
  margin:2px 0 4px;
}

/* One column means there is room to stand the portrait beside the words,
   which keeps a card to a third of the height on a phone. */
@media (max-width:540px){
  .shop-grid{ grid-template-columns:1fr; gap:10px; }
  .skin-card{ flex-direction:row; align-items:center; gap:14px; padding:10px 14px; }
  .skin-pic{ width:66px; height:66px; flex:0 0 auto; }
  .skin-info{ align-items:flex-start; flex:1 1 auto; text-align:left; }
  .skin-perk{ text-align:left; min-height:0; }
}

/* Settings headings: small, quiet labels above each group of controls. */
.set-head{
  margin:16px 0 2px;
  font-size:clamp(13px,2.1vw,16px);
  font-weight:800;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:var(--ink-soft);
}
.set-head:first-of-type{ margin-top:6px; }
/* Graphics: a label over four choices in a row, two by two on a narrow
   phone rather than three and one left over. The one chosen is filled;
   with Auto chosen, the level Auto is using has a dashed edge. */
.q-row{ display:flex; align-items:center; justify-content:space-between; gap:12px; max-width:330px; margin:8px auto 0; }
.q-label{ font-size:15px; font-weight:800; color:var(--ink); }
.q-sel{
  flex:0 0 auto; min-height:44px; min-width:160px; padding:6px 40px 6px 14px;
  font:inherit; font-size:15px; font-weight:800; color:var(--ink);
  background:linear-gradient(180deg,#ffffff 0%,#e6f4fb 100%);
  border:2px solid rgba(43,93,134,.45); border-radius:14px;
  box-shadow:0 3px 0 rgba(43,93,134,.35);
  -webkit-appearance:none; appearance:none; cursor:pointer;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%230f3a55' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"),
                   linear-gradient(180deg,#ffffff 0%,#e6f4fb 100%);
  background-repeat:no-repeat, no-repeat; background-position:right 14px center, 0 0; background-size:12px 8px, 100% 100%;
}
.q-sel:focus-visible{ outline:3px solid #ffd84a; outline-offset:3px; }
.q-opts{ display:grid; grid-template-columns:repeat(4, auto); gap:6px; justify-content:center; }
@media (max-width:380px){ .q-opts{ grid-template-columns:repeat(2, minmax(0, 1fr)); max-width:250px; margin:0 auto; } }
.q-opt{
  min-height:44px; min-width:60px; padding:6px 12px;
  font:inherit; font-size:14px; font-weight:800; color:var(--ink);
  background:linear-gradient(180deg,#ffffff 0%,#e6f4fb 100%);
  border:2px solid rgba(43,93,134,.45); border-radius:14px;
  box-shadow:0 3px 0 rgba(43,93,134,.35);
  cursor:pointer;
}
.q-opt:active{ transform:translateY(2px); box-shadow:0 1px 0 rgba(43,93,134,.35); }
.q-opt:focus-visible{ outline:3px solid #ffd84a; outline-offset:3px; }
.q-opt.on{ background:linear-gradient(180deg,#3ad6a0 0%,#21c48a 100%); border-color:#178a62; color:#fff; }
.q-opt.in-use{ border-style:dashed; border-color:#21c48a; }

/* ---- the Freeride board (the Android app) ----
   Google's scores in the game's own clothes: the spans as the same
   buttons as Graphics, a cup for each of the first three, a numbered disc
   after them, and the player's own row edged in green like an earned
   trophy. The list of up to 101 rows scrolls inside the panel. Long names end in an ellipsis rather than pushing the score
   off the row. */
.board-spans{ grid-template-columns:repeat(3, auto); margin:0 0 10px; }
/* On a phone the three spans share the width; a name that does not fit
   ("Săptămâna", "Всё время" in a phone's bigger letters) sends the last
   span down a row instead of out of its tab. */
@media (max-width:380px){ .board-spans{ display:flex; flex-wrap:wrap; justify-content:center; max-width:none; }
                          .board-spans .q-opt{ flex:1 1 0; min-width:max-content; padding:6px 4px; font-size:13px; white-space:nowrap; } }
/* While Google answers: a wheel of ice where the rows will be */
.board-loading{ display:flex; flex-direction:column; align-items:center; justify-content:center; gap:12px;
                flex:1 1 auto; font-weight:800; font-size:15px; color:var(--ink-soft); }
.board-wheel{ width:44px; height:44px; border-radius:50%;
              border:5px solid rgba(43,93,134,.18); border-top-color:#2789d8; border-right-color:#55bdf0;
              animation:boardWheel .8s linear infinite; }
@keyframes boardWheel{ to{ transform:rotate(360deg); } }
@media (prefers-reduced-motion: reduce){ .board-wheel{ animation-duration:2.4s; } }
/* One height whatever the board holds (reported by the owner, 17 Nov 2026:
   the panel grew downwards as more players came on). The wheel, three rows
   or a hundred all sit in the same box, and the rest scrolls inside it.
   Empty (no network, nobody yet), it folds away and the note says why. */
.board-list{ display:flex; flex-direction:column; gap:6px; margin:4px 0 6px; position:relative;
              height:min(56vh, 560px); overflow-y:auto; overscroll-behavior:contain; padding:2px 4px 2px 2px; }
.board-list:empty{ height:auto; }
.board-row{ flex:0 0 auto; }
.board-row{
  display:flex; align-items:center; gap:10px;
  min-height:50px; padding:5px 12px;
  border-radius:14px;
  background:rgba(255,255,255,.8);
  border:2px solid transparent;
  text-align:left;
}
.board-row.me{ background:rgba(236,250,241,.94); border-color:var(--green); }
.board-place{ flex:0 0 auto; width:40px; height:40px; display:grid; place-items:center; }
.board-place svg{ width:40px; height:40px; display:block; }
.board-place.num{
  width:32px; height:32px; margin:0 4px; border-radius:50%;
  font-weight:800; font-size:15px; color:var(--ink-soft);
  background:rgba(70,110,150,.13);
}
.board-name{
  flex:1 1 auto; min-width:0; display:flex; align-items:baseline; gap:6px;
  font-weight:800; font-size:clamp(14px,2.2vw,17px); color:var(--ink);
}
.board-who{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.board-name small{ flex:0 0 auto; font-size:12px; color:#0b7560; }
.board-score{ flex:0 0 auto; font-weight:800; font-size:clamp(14px,2.2vw,17px); color:var(--gold-dark); }
.q-note{ margin:8px 0 0; font-size:13px; text-align:center; color:var(--ink-soft); }

/* Android only (js/native.js). Padded out to a 44px target: the links
   are small words, but they are still things to press. */
.set-link{ display:block; margin-top:6px; padding:12px 0; text-align:center; font-size:14px; color:inherit; opacity:.75; }
.set-link + .set-link{ margin-top:0; }
/* Android only: a button that plays an ad says so with a play mark in
   front of its words, white with the same navy edge as the letters. */
.ad-mark{
  display:inline-block; width:0; height:0; margin-right:.45em; vertical-align:-.02em;
  border-style:solid; border-width:.42em 0 .42em .66em;
  border-color:transparent transparent transparent currentColor;
  filter:drop-shadow(0 2px 0 var(--line));
}
.btn-row.ad-row{ margin-top:16px; margin-bottom:18px; }   /* room for its icicles (16 px) over the line under it */
.btn-row.ad-row .btn{ padding-left:18px; padding-right:18px; }  /* its words the longest of any button: on one line in every language */

/* ------------------- TROPHIES -------------------
   One row each: badge, what it is, how far along, and what it pays. The
   bar is the point — a locked row should still tell you it is close. */
.ach-list{ display:flex; flex-direction:column; gap:8px; margin:4px 0 6px; }

.ach-row{
  display:flex; align-items:center; gap:12px;
  padding:9px 12px;
  border-radius:16px;
  background:rgba(255,255,255,.72);
  border:2px solid transparent;
  text-align:left;
}
.ach-row.got{ background:rgba(236,250,241,.94); border-color:var(--green); }

/* The emoji that used to sit in here went with all the others. What is
   left is a disc that fills in when the trophy is earned, which is the
   only thing the picture was ever telling you. */
.ach-ico{
  flex:0 0 auto;
  width:42px; height:42px;
  display:grid; place-items:center;
  font-size:22px;
  border-radius:50%;
  background:radial-gradient(circle at 50% 38%, #e7f4fd 0%, #bcdcef 100%);
  filter:grayscale(.75) opacity(.6);
}
.ach-row.got .ach-ico{ filter:none; background:radial-gradient(circle at 50% 38%, #fff6d5 0%, #ffd97a 100%); }

/* The right side (the count, or the button that pays) sits beside the
   words while they keep room for a line of their own, and goes under them
   when they would not: on a narrow phone the claim button lay over them. */
.ach-row{ flex-wrap:wrap; row-gap:6px; }
.ach-mid{ flex:1 1 120px; min-width:0; }
.ach-right{ margin-left:auto; }
.ach-name{ font-weight:800; font-size:clamp(14px,2.2vw,17px); color:var(--ink); }
.ach-desc{ font-size:clamp(12px,1.8vw,13px); color:var(--ink-soft); line-height:1.25; }

.ach-bar{
  margin-top:5px; height:7px; border-radius:99px;
  background:rgba(70,110,150,.18); overflow:hidden;
}
.ach-bar i{ display:block; height:100%; border-radius:99px; background:var(--green); }
.ach-row.got .ach-bar i{ background:var(--gold-dark); }

.ach-right{
  flex:0 0 auto; text-align:right;
  font-weight:800; font-size:clamp(11px,1.8vw,14px); color:var(--ink-soft);
}
.ach-right small{ display:block; font-weight:800; color:var(--gold-dark); font-size:max(12px, .92em); }

.won-box{ display:flex; flex-direction:column; gap:4px; margin:6px 0 2px; }
.fx-burst{ position:fixed; inset:0; width:100%; height:100%; z-index:70; pointer-events:none; }
.fly-dot{ position:fixed; z-index:71; width:14px; height:14px; margin:-7px 0 0 -7px; border-radius:50%;
          pointer-events:none; box-shadow:0 0 8px rgba(255,255,255,.9);
          transition:transform .7s cubic-bezier(.5,0,.75,1), opacity .7s ease-in; }
.earned.bump{ animation:earnBump .45s cubic-bezier(.2,1.8,.4,1); }
@keyframes earnBump{ 0%{ transform:scale(1) } 40%{ transform:scale(1.35) } 100%{ transform:scale(1) } }
@media (prefers-reduced-motion: reduce){ .fly-dot{ transition:none; } .earned.bump{ animation:none; } }
.won-row.won-task{ color:#0b5fc0; background:rgba(214,238,255,.9); }

/* ---- today's tasks ---- */
.tasks-box{ margin:0 0 12px; padding:8px 12px 2px; border-radius:16px;
            background:rgba(214,238,255,.55); border:2px solid rgba(43,93,134,.25); }
.tasks-list{ display:flex; flex-direction:column; gap:6px; }
.task-row{ display:flex; align-items:center; gap:10px; text-align:left;
           padding:7px 12px; border-radius:12px; background:rgba(255,255,255,.85);
           font-weight:800; font-size:clamp(13px,2.1vw,15px); color:var(--ink); }
.task-row.got{ background:rgba(214,245,225,.95); color:#0b7560; }
.task-tick{ flex:0 0 auto; width:24px; height:24px; border-radius:50%; display:grid; place-items:center;
            border:2px solid rgba(43,93,134,.45); color:#fff; font-size:14px; }
.task-row.got .task-tick{ background:#21c48a; border-color:#0b7560; }
.task-txt{ flex:1 1 auto; }
.task-pay{ flex:0 0 auto; color:var(--gold-dark); }

/* A trophy or a task not yet earned is a button to where it is earned
   (ui.js goEarn): the same row, a chevron at its end, and it gives under
   the finger. */
.ach-row.go, .task-row.go{ width:100%; font:inherit; cursor:pointer; -webkit-tap-highlight-color:transparent;
                           transition:transform .12s ease, background-color .12s ease; }
.ach-row.go{ color:inherit; }
.task-row.go{ border:0; }
.ach-row.go:active, .task-row.go:active{ transform:scale(.98); background:rgba(255,255,255,.95); }
.ach-row.go:focus-visible, .task-row.go:focus-visible{ outline:3px solid #ffd84a; outline-offset:2px; }
.go-mark{ flex:0 0 auto; margin-left:2px; font-size:24px; line-height:1; font-weight:900; color:#2789d8; }
.ach-row.go .go-mark{ align-self:center; }

/* The next line, after one finished: its name under the words */
.btn.next-line{ display:inline-flex; flex-direction:column; align-items:center; line-height:1.15; }
.btn.next-line small{ font-size:.62em; font-weight:800; opacity:.85; margin-top:2px; }
.tasks-chip{
  display:block; margin:20px auto 0; padding:7px 16px; min-height:44px;   /* a finger, like every other button; clear of the Market's icicles */
  font:inherit; font-size:14px; font-weight:800; color:#0b5fc0;
  background:rgba(214,238,255,.8); border:2px solid rgba(11,95,192,.45); border-radius:999px;
  cursor:pointer;
}
.tasks-chip.all-done{ color:#0b7560; background:rgba(214,245,225,.9); border-color:rgba(11,117,96,.5); }
.tasks-chip:focus-visible{ outline:3px solid #ffd84a; outline-offset:3px; }

/* ---- what is next, on the results ---- */
.goals{ display:flex; flex-direction:column; gap:8px; margin:10px auto 2px; width:min(380px, 100%); }
.goal{ text-align:left; }
.goal-txt{ font-size:clamp(13px,2.1vw,15px); font-weight:800; color:var(--ink-soft); margin:0 0 4px 2px; }
.goal-bar{ height:10px; border-radius:99px; background:rgba(43,93,134,.16);
           box-shadow:inset 0 1px 2px rgba(0,0,0,.15); overflow:hidden; }
.goal-bar i{ display:block; height:100%; border-radius:99px;
             background:linear-gradient(90deg,#55bdf0,#2789d8); }
.goal-buy .goal-txt{ color:#a86a00; }
.goal-buy .goal-bar i{ background:linear-gradient(90deg,#ffd84a,#f0a000); }

/* ---- the modes opening for the first time ---- */
.unlock-box{
  margin:8px auto 2px; padding:8px 16px; width:fit-content; max-width:100%;
  font-weight:800; font-size:clamp(14px,2.3vw,17px); color:#fff;
  background:linear-gradient(180deg,#9a86f4,#6c55d8);
  border:2px solid #062a78; border-radius:14px; box-shadow:0 3px 0 #4430a6;
  text-shadow:0 1px 0 #062a78;
  animation:badgePop .5s cubic-bezier(.2,1.8,.4,1) both;
}
.mode-btn.just-opened{ animation:justOpened 1.3s ease-in-out 3; }
@keyframes justOpened{
  0%,100%{ filter:none; transform:none; }
  50%{ filter:brightness(1.25) drop-shadow(0 0 10px rgba(255,255,255,.9)); transform:scale(1.04); }
}
@media (prefers-reduced-motion: reduce){ .mode-btn.just-opened, .unlock-box{ animation:none; } }

/* ---- something on the Market shelf is affordable ---- */
.market-btn{ position:relative; }
.badge{
  position:absolute; top:-10px; right:-10px; z-index:2;
  width:26px; height:26px; border-radius:50%;
  display:grid; place-items:center;
  font-size:16px; font-weight:800; line-height:1; color:#fff; text-shadow:none;
  background:#e8384f; border:3px solid #062a78;
  box-shadow:0 2px 0 rgba(6,42,120,.4);
  animation:badgeBob 1.6s ease-in-out infinite;
}
@keyframes badgeBob{ 0%,100%{ transform:translateY(0) } 50%{ transform:translateY(-3px) } }
@media (prefers-reduced-motion: reduce){ .badge{ animation:none; } }
.won-row{
  font-weight:800; font-size:clamp(13px,2.1vw,16px);
  color:var(--gold-dark);
  background:rgba(255,246,213,.85);
  border-radius:99px; padding:5px 14px;
}

@media (max-width:540px){
  .ach-ico{ width:34px; height:34px; font-size:18px; }
  .ach-row{ gap:9px; padding:8px 10px; }
}

/* ===================== A FROZEN FRONT DOOR =====================
   The mascot and the ice are drawn with boxes and gradients. An emoji is
   whichever glyph the device happens to ship — on some phones 🐧 is a
   different bird, on others it is a flat outline that fights the artwork. */

.ach-ico.got{
  background:radial-gradient(circle at 50% 36%, #7ee2b4 0%, #21a16e 100%);
  box-shadow:inset 0 0 0 3px rgba(255,255,255,.75);
}
.ach-ico.got::after{
  content:''; width:16px; height:9px; margin-top:-4px;
  border-left:3.5px solid #fff; border-bottom:3.5px solid #fff;
  transform:rotate(-45deg);
}

.over-lives{ display:flex; align-items:center; justify-content:center; gap:7px; margin:0 0 12px; }
.over-lives-txt{ font-weight:800; color:var(--ink-soft); font-size:.9em; }

/* ---- the back arrow ----
   Pinned to the top-left corner over every long panel, cut from the same
   ice as the buttons. It lives outside the screens, so it never scrolls
   away with them. */
.back-btn{
  position:fixed; z-index:50;
  /* Bottom-left, not top-left: the top edge is where YouTube draws its own
     controls over a Playable, and the game keeps its icons clear of it —
     the pause button sits bottom-right for the same reason. */
  bottom:calc(16px + env(safe-area-inset-bottom,0px));
  /* a little in from the edge: on a phone with gesture navigation the
     first stretch from the side is where Android listens for its own back
     swipe, and a tap that landed there now and then never reached it */
  left:calc(22px + env(safe-area-inset-left,0px));
  width:54px; height:54px;
  display:grid; place-items:center; padding:0;
  border:1.5px solid rgba(255,255,255,.8); border-bottom-color:rgba(255,255,255,.3); border-radius:15px;
  background:
    var(--ice-tex) 0 0 / 240px 80px,
    radial-gradient(90% 110% at 28% -5%, rgba(255,255,255,.6), rgba(255,255,255,0) 60%),
    linear-gradient(180deg, #b4ebff 0%, #55bdf0 48%, #2789d8 100%);
  box-shadow:
    inset 0 9px 10px -7px rgba(255,255,255,.85), inset 0 -8px 14px -6px rgba(0,26,70,.3),
    0 4px 0 #0450b8, 0 5.5px 0 rgba(0,18,52,.4), 0 10px 16px rgba(3,28,70,.35);
  cursor:pointer;
  transition:transform .08s ease, box-shadow .08s ease;
}
.back-btn svg{ width:30px; height:30px; display:block; }
.back-btn:hover{ filter:brightness(1.07); }
.back-btn:active{
  transform:translateY(4px);
  box-shadow:inset 0 9px 10px -7px rgba(255,255,255,.85), inset 0 -8px 14px -6px rgba(0,26,70,.3),
             0 1px 0 #0450b8, 0 2px 0 rgba(0,18,52,.4);
}
.back-btn:focus-visible{ outline:3px solid #ffd84a; outline-offset:4px; }
/* On a narrow screen the panel runs edge to edge and its corner would sit
   under the arrow, so those screens start a little lower. */
@media (max-width:820px){
  #screen-help, #screen-shop, #screen-runs, #screen-ach, #screen-settings{
    padding-bottom:calc(84px + env(safe-area-inset-bottom,0px));
  }
}

/* ---- the market's purse stays put ----
   The shop is a long scroll — supplies plus eight animals — and the wallet
   sat at the top of it. By the time you had scrolled to the dearest one
   you could no longer see whether you could afford it. */
#screen-shop .wallet{
  position:sticky; top:0; z-index:3;
  /* bleed to the panel's edges so nothing shows past it while it holds */
  margin:-8px -26px 14px; padding:12px 26px 12px;
  /* Solid, with the shadow doing the work. A gradient that faded to clear
     left the card beneath it half-legible through the bottom of the bar,
     which reads as a rendering fault rather than as something passing
     behind. */
  background:#f7fcff;
  box-shadow:0 8px 10px -8px rgba(26,70,104,.45);
}
@media (max-width:420px){
  #screen-shop .wallet{ margin:-8px -18px 12px; padding:10px 18px 8px; }
}

/* ---- pause ---- */
.pause-note{ margin:14px 0 2px; font-size:.84em; font-weight:700; color:var(--ink-soft); }
/* The one button here that cannot be undone. It should not read as an
   equal sibling of the two that keep your run. */
.btn-quiet{ font-size:.82em; padding:9px 18px; opacity:.72; }
.btn-quiet:hover{ opacity:1; }
.help-key{ font-size:.78em; font-weight:700; opacity:.75; }
@media (hover:none) and (pointer:coarse){ .help-key{ display:none; } }   /* no Space bar on a phone */

/* ---- how to play ---- */
.help-hero{
  background:linear-gradient(180deg,#e9f7ff 0%, #cfeaf8 100%);
  border-radius:20px; padding:16px 18px; margin:0 0 16px;
  box-shadow:inset 0 0 0 2px rgba(255,255,255,.8);
}
.help-hero-main{ margin:0 0 6px; font-size:clamp(17px,3.6vw,22px); font-weight:800; color:var(--ink); }
.help-hero-sub{ margin:0; font-size:.92em; font-weight:700; color:var(--ink-soft); }
.help-head{
  margin:16px 0 8px; text-align:left;
  font-size:.86em; font-weight:800; letter-spacing:.06em; text-transform:uppercase;
  color:var(--ink-soft);
}

/* ---- frozen finds ---- */
.finds-box [data-action="open-find"]{ margin-top:12px; }   /* its snow clear of the count over it */
.finds-box{
  background:rgba(255,255,255,.7); border-radius:20px;
  padding:12px 16px 16px; margin:0 0 14px;
  box-shadow:0 3px 0 rgba(0,0,0,.07);
}
.find-art{ display:block; margin:-30px auto -26px; }   /* room for the light to fade out; the find itself stays 90px */
.find-count{ font-weight:800; color:var(--ink-soft); margin:0 0 8px; }
.find-prize{
  font-weight:800; color:#0f7a54; margin:0 0 10px;
  animation:prizePop .5s cubic-bezier(.2,1.7,.4,1);
}
@keyframes prizePop{ from{ transform:scale(.7); opacity:0 } to{ transform:none; opacity:1 } }

/* ---- spare lives ---- */
/* One SVG path, not a rotated square with two circles stuck to it — that
   construction never resolved into a heart at this size and read as a
   little cluster of circles, which is exactly what it was. An emoji is no
   good either: half the devices ship one that is not even red. */
.heart{
  display:inline-block; width:22px; height:20px;
  background:#e8415c;
  -webkit-mask:var(--heart-svg) center/contain no-repeat;
  mask:var(--heart-svg) center/contain no-repeat;
}
/* An empty slot is an outline, not a grey heart: grey-on-pale read as a
   smudge, and you could not tell the full ones from the empty ones. */
.heart.spent{
  background:rgba(120,150,175,.45);
  -webkit-mask:var(--heart-outline) center/contain no-repeat;
  mask:var(--heart-outline) center/contain no-repeat;
}
:root{
  --heart-svg:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 22'%3E%3Cpath d='M12 21C6 16.5 1.5 12.8 1.5 8.2 1.5 4.8 4.1 2.3 7.2 2.3c1.9 0 3.7 1 4.8 2.6 1.1-1.6 2.9-2.6 4.8-2.6 3.1 0 5.7 2.5 5.7 5.9 0 4.6-4.5 8.3-10.5 12.8z'/%3E%3C/svg%3E");
  --heart-outline:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 22'%3E%3Cpath fill='none' stroke='black' stroke-width='2.2' d='M12 20C6.4 15.8 2.6 12.4 2.6 8.3 2.6 5.4 4.8 3.4 7.3 3.4c1.7 0 3.3.9 4.7 2.6 1.4-1.7 3-2.6 4.7-2.6 2.5 0 4.7 2 4.7 4.9 0 4.1-3.8 7.5-9.4 11.7z'/%3E%3C/svg%3E");
}

.revive-score{ margin:2px 0 12px; }
.revive-score-line{ font-family:var(--display); color:var(--ink); line-height:1; }
.revive-score-line b{ font-weight:900; font-size:clamp(34px,8vw,52px); font-variant-numeric:tabular-nums; }
.revive-score-line span{ font-weight:800; font-size:clamp(15px,3vw,20px); color:var(--ink-soft); }
.revive-gap{ margin-top:6px; font-weight:800; color:var(--blue-dark); font-size:clamp(14px,2.6vw,17px); }
.revive-gap.beat{ color:#c98a00; }
.revive-gap:empty{ display:none; }
.revive-sub{ color:var(--ink-soft); font-weight:700; margin:0 0 12px; }
.revive-hearts{ display:flex; justify-content:center; gap:10px; margin:6px 0 14px; padding-left:4px; }
.revive-count{ color:var(--ink-soft); font-weight:800; margin:0 0 14px; }
.revive-tick{
  /* in the game's own face and ink, as the panels' titles are, an icy edge
     under it (it was a lone green in the system font; the owner, 18 Nov 2026) */
  font-family:var(--display); font-weight:900; font-variant-numeric:tabular-nums;
  font-size:clamp(52px,13vw,84px); line-height:1;
  color:var(--ink); margin:8px 0 16px;
  text-shadow:0 4px 0 rgba(47,159,224,.35), 0 0 22px rgba(255,255,255,.95);
  animation:tickPop .5s cubic-bezier(.2,1.7,.4,1);
}
@keyframes tickPop{ from{ transform:scale(.5); opacity:.2 } to{ transform:none; opacity:1 } }

.shop-supply{ margin:0 0 14px; }
.supply-card{
  display:flex; align-items:center; gap:14px; flex-wrap:wrap;
  background:rgba(255,255,255,.72); border-radius:20px; padding:12px 16px;
  box-shadow:0 3px 0 rgba(0,0,0,.08);
}
.supply-art{ display:flex; gap:8px; padding-left:4px; flex:0 0 auto; }
.supply-mid{ flex:1 1 180px; text-align:left; }
.supply-card .btn{ flex:0 0 auto; }

/* ---- icicles ---- */
.eaves, .drips{
  position:absolute; left:0; right:0; top:0;
  display:flex; justify-content:space-between;
  pointer-events:none;
}
.eaves i, .drips i{
  flex:0 0 auto;
  background:linear-gradient(180deg,
    rgba(255,255,255,.97) 0%, rgba(223,244,253,.9) 40%, rgba(150,208,238,.5) 100%);
  clip-path:polygon(0 0, 100% 0, 50% 100%);
}
/* Hanging from the very top of the screen, long and irregular. */
.eaves{ padding:0 2px; }
.eaves i{ width:15px; height:26px; }
.eaves i:nth-child(2n){ height:44px; width:12px; }
.eaves i:nth-child(3n){ height:17px; width:17px; }
.eaves i:nth-child(5n){ height:62px; width:11px; }
.eaves i:nth-child(7n){ height:34px; width:14px; }
/* And a shorter row along the lip of the panel itself. */
/* On the pale panel a white icicle is invisible, so these lean blue and
   cast a shadow onto the panel behind them. */
.drips{ padding:0 16px; top:2px; z-index:2;
        filter:drop-shadow(0 2px 1px rgba(40,95,135,.28)); }
.drips i{ width:10px; height:13px;
          background:linear-gradient(180deg,
            rgba(255,255,255,.98) 0%, rgba(186,226,246,.95) 45%, rgba(110,178,218,.8) 100%); }
.drips i:nth-child(2n){ height:22px; width:8px; }
.drips i:nth-child(3n){ height:9px;  width:11px; }
.drips i:nth-child(5n){ height:29px; width:7px; }

/* ---- floating ice ----
   Diamonds cut with clip-path. The first pass used rounded squares with an
   inner bar and they read as grey tiles with a character stuck in them. */
.shard{
  position:absolute;
  width:22px; height:22px;
  background:linear-gradient(140deg, rgba(255,255,255,.95) 0%,
                                     rgba(198,235,252,.8) 45%,
                                     rgba(120,190,232,.55) 100%);
  clip-path:polygon(50% 0, 100% 42%, 50% 100%, 0 42%);
  opacity:.75;
  animation:drift 11s ease-in-out infinite;
}

/* ---- the skyline, also in boxes ----
   These were 🌲 and ⛰️. The mountain came out as an empty rectangle on a
   machine whose emoji font has no glyph for it, which is exactly the kind
   of thing you cannot check for on someone else's phone. */
.pine, .berg{ position:absolute; pointer-events:none; }
.pine{
  width:34px; height:44px;
  background:linear-gradient(170deg,#3f8f61 0%, #256845 70%, #1b5136 100%);
  clip-path:polygon(50% 0, 74% 34%, 62% 34%, 88% 68%, 72% 68%, 100% 100%,
                    0 100%, 28% 68%, 12% 68%, 38% 34%, 26% 34%);
  opacity:.5;
  animation:drift 13s ease-in-out infinite;
}
.berg{
  width:64px; height:40px;
  background:linear-gradient(170deg,#ffffff 0%, #d5ecf8 38%, #8fc4e2 100%);
  clip-path:polygon(0 100%, 26% 30%, 40% 48%, 62% 0, 82% 44%, 100% 100%);
  opacity:.42;
  animation:drift 16s ease-in-out infinite;
}
.p1{ left:7%;  top:16%; animation-delay:0s; }
.p2{ right:9%; bottom:14%; width:28px; height:36px; animation-delay:-6s; }
.p3{ left:16%; bottom:9%;  width:22px; height:29px; animation-delay:-3s; }
.b1{ right:11%; top:20%; animation-delay:-2s; }
.b2{ left:5%;  bottom:26%; width:46px; height:29px; animation-delay:-8s; }
.s1{ left:14%; top:30%; transform:rotate(18deg);  animation-delay:-1s; }
.s2{ right:12%; top:22%; width:15px; height:15px; transform:rotate(-24deg); animation-delay:-4s; }
.s3{ left:22%; bottom:18%; width:17px; height:17px; transform:rotate(38deg); animation-delay:-7s; }
.s4{ right:19%; bottom:26%; width:26px; height:26px; transform:rotate(-8deg); animation-delay:-2.5s; }
.s5{ left:46%; bottom:8%;  width:13px; height:13px; transform:rotate(52deg); animation-delay:-9s; }

/* The panel needs room under the icicles hanging off its lip. */
.panel-title{ padding-top:34px; }
/* The title stands over the live hill (Game.attract): no dimming or blur
   over the whole screen — only the corners fall off a little — and the
   panel is frosted, so the hill and the animal on it show through. Not
   through a blur: under the title the hill moves, so a blur behind the
   panel was worked out again on every frame, which kept a phone warm the
   whole time it sat on the menu. A little more white looks the same. */
#screen-title{
  background:radial-gradient(ellipse 80% 70% at 50% 50%, rgba(6,22,60,0) 40%, rgba(6,22,60,.42) 100%);
  backdrop-filter:none; -webkit-backdrop-filter:none;
}
#screen-title .panel-title{
  background:linear-gradient(180deg, rgba(247,252,255,.93) 0%, rgba(221,241,251,.89) 100%);
  backdrop-filter:none; -webkit-backdrop-filter:none;
}
/* wide screens: the menu to the left, the hill and the animal on the right */
@media (min-aspect-ratio: 23/20){
  #screen-title .panel-title{ margin-left:max(4vw, 18px); margin-right:auto; }
  #screen-title{ background:linear-gradient(90deg, rgba(6,22,60,.38) 0%, rgba(6,22,60,.12) 42%, rgba(6,22,60,0) 60%, rgba(6,22,60,.18) 100%); }
}
/* Every panel is a slab of the same ice as the logo and the buttons:
   navy rim, a deep-blue edge for its thickness. It began on the title
   alone, and next to it the pause, results and settings cards were plain
   white boxes from some other game. */
.panel{
  border:3px solid #062a78;
  box-shadow:
    inset 0 0 0 4px rgba(255,255,255,.9),
    0 5px 0 #b5dcf1,
    0 7px 0 #062a78,
    0 24px 40px rgba(0,0,0,.34);
  /* The panel's edge is the thickness of the same pale ice, thin. It was a
     12px band of deep blue and navy — right for a button, but under a whole
     screen it read as a second, darker block stuck beneath it. */
}

@media (prefers-reduced-motion: reduce){
  .peng, .shard, .pine, .berg, .float{ animation:none; }
}

/* Frost creeping in from the corners of the screen. Two pseudo-elements
   rather than more markup: it is pure decoration and must never be
   something a reader or a finger can reach. */
.sky-deco::before, .sky-deco::after{
  content:''; position:absolute; inset:0; pointer-events:none;
}
.sky-deco::before{
  background:
    radial-gradient(60% 42% at 0% 0%,   rgba(226,245,255,.34), transparent 70%),
    radial-gradient(56% 38% at 100% 0%, rgba(226,245,255,.28), transparent 70%),
    radial-gradient(70% 46% at 50% 100%,rgba(198,232,250,.22), transparent 72%);
}
/* A few crystals frozen onto the glass itself, tiny and still. */
.sky-deco::after{
  background-image:
    radial-gradient(3px 3px at 12% 62%, rgba(255,255,255,.7), transparent 60%),
    radial-gradient(2px 2px at 28% 84%, rgba(255,255,255,.55), transparent 60%),
    radial-gradient(4px 4px at 63% 12%, rgba(255,255,255,.5),  transparent 60%),
    radial-gradient(2px 2px at 84% 56%, rgba(255,255,255,.6),  transparent 60%),
    radial-gradient(3px 3px at 91% 82%, rgba(255,255,255,.45), transparent 60%),
    radial-gradient(2px 2px at 44% 34%, rgba(255,255,255,.5),  transparent 60%);
}

/* A shorter run of icicles on a phone, or they eat the panel. */
@media (max-width:540px){
  .eaves i:nth-child(5n){ height:40px; }
  .eaves i:nth-child(2n){ height:28px; }
  .peng{ font-size:clamp(9px,3.4vw,13px); }
  .panel-title{ padding-top:28px; }
}

/* ------------------- SHORT SCREENS, PART TWO -------------------
   These have to sit after the decoration's own rules. Tucked into the
   media queries further up they lost every time, because the base
   `.eaves, .drips { display:flex }` came later in the file and won. */
@media (max-height:640px){
  .peng{ font-size:clamp(8px,1.6vw,11px); }
  .panel-title{ padding-top:26px; }
  .eaves i{ height:16px }
  .eaves i:nth-child(2n){ height:26px }
  .eaves i:nth-child(3n){ height:12px }
  .eaves i:nth-child(5n){ height:34px }
  .eaves i:nth-child(7n){ height:21px }
}
@media (max-height:460px){
  /* No room for a mascot at all, and the icicles would reach the buttons. */
  .peng{ display:none; }
  .drips{ display:none; }
  .panel-title{ padding-top:14px; }
  .eaves i,
  .eaves i:nth-child(2n),
  .eaves i:nth-child(3n),
  .eaves i:nth-child(5n),
  .eaves i:nth-child(7n){ height:14px }
  .eaves i:nth-child(2n){ height:22px }
}

/* ------------------- MODES AND MARKED RUNS ------------------- */
.modes{ flex-direction:column; align-items:stretch; gap:22px; }
.mode-btn{ display:block; text-align:center; line-height:1.15; padding:12px 22px; }
.mode-btn b{ display:block; font-size:1em; white-space:normal; }   /* two lines rather than out of the button */
.mode-btn b, .mode-btn small{ overflow-wrap:break-word; }        /* and a word longer than the button breaks */
.mode-btn small{
  display:block; font-family:'Baloo 2','Trebuchet MS',system-ui,sans-serif;   /* read, not shouted: the text face */
  font-weight:700; font-size:.64em; opacity:.92; margin-top:2px;
  text-shadow:0 1px 0 rgba(255,255,255,.5);                                    /* cut in, as the title over it */
}

.runs-list{ display:flex; flex-direction:column; gap:9px; margin:4px 0 6px; }
.run-row{
  display:flex; align-items:center; gap:12px;
  padding:10px 13px; border-radius:17px; text-align:left;
  background:rgba(255,255,255,.78);
  border:2px solid transparent;
  cursor:pointer; font:inherit; color:inherit; width:100%;
}
.run-row.done{ background:rgba(236,250,241,.94); border-color:var(--green); }
.run-row.locked{ background:rgba(255,255,255,.4); cursor:default; }
/* Freeride before the first line is passed: still readable, plainly shut. */
/* White text on a grey wash was close to unreadable, and the line under
   it is the one that tells you how to open the thing. Keep the panel pale
   and put dark ink on it instead of dimming the whole button. */
.mode-btn.locked{
  --hi:#e4edf3; --face:#d3e0e9; --lo:#bccdd9; --edge:#90a8ba; --line:#5f7d94;
  color:#44647c;
  text-shadow:0 1px 0 rgba(255,255,255,.7);
  cursor:default;
  filter:none;
}
/* Frozen shut: no snow on it, just frost. */
.mode-btn.locked::before, .mode-btn.locked::after{ display:none; }
.mode-btn.locked small{ color:#44647c; opacity:.9; }
.mode-btn.locked:active{
  transform:none;
  box-shadow:inset 0 2px 0 rgba(255,255,255,.55), 0 5px 0 var(--edge), 0 8px 0 var(--line), 0 13px 18px rgba(3,28,70,.2);
}
/* No icon at all. The emoji padlock went with the rest of them, and the
   shackle drawn in its place read as a stray arc at button size — the grey
   button and the line underneath already say it is shut. */
.run-row.locked .run-name, .run-row.locked .run-sub{ opacity:.55; }

.run-no{
  flex:0 0 auto; width:34px; height:34px; border-radius:50%;
  display:grid; place-items:center; font-weight:800; font-size:16px;
  background:linear-gradient(180deg,#bfe3f6,#8dc7e6); color:#12496f;
}
.run-row.done .run-no{ background:linear-gradient(180deg,#fff0bd,#ffd15e); color:#7a5300; }
.run-row.locked .run-no{ background:rgba(180,200,215,.5); color:#5c7488; }
.run-sub.run-shut{ opacity:.45; font-style:italic; }

.run-mid{ flex:1 1 auto; min-width:0; }
.run-name{ font-weight:800; font-size:clamp(15px,2.3vw,18px); }
.run-sub{ font-size:clamp(12px,1.8vw,13px); color:var(--ink-soft); }
.run-stars{ flex:0 0 auto; font-size:clamp(14px,2.2vw,18px); letter-spacing:1px; color:var(--gold-dark); }
p.run-stars{ font-size:clamp(22px,4.4vw,34px); margin:2px 0 4px; letter-spacing:3px; }

/* ------------------- FIRST-RUN TUTORIAL -------------------
   The words sit on a slab of the same ice as the title panel, high on the
   screen and clear of the score, and let every touch fall through to the
   steering underneath. Only Skip takes a tap for itself. */
.tut{
  position:fixed; inset:0; z-index:40;
  pointer-events:none;
}
.tut-card{
  position:absolute; left:50%; transform:translateX(-50%);
  top:max(124px, calc(15vh + env(safe-area-inset-top,0px)));
  width:min(560px, calc(100% - 32px));
  display:flex; align-items:center; gap:12px;
  padding:12px 18px;
  text-align:left;
  font-size:clamp(16px, 2.5vw, 21px); font-weight:800; line-height:1.3;
  color:var(--ink);
  background:linear-gradient(180deg, #ffffff 0%, #e4f4fc 100%);
  border:3px solid #062a78; border-radius:18px;
  box-shadow:0 6px 0 #0450b8, 0 9px 0 #062a78, 0 16px 26px rgba(3,28,70,.35);
  animation:tutIn .32s cubic-bezier(.2,1.5,.4,1) both;
}
.tut-card p{ margin:0; flex:1 1 auto; text-align:center; }
.tut-card b{ color:#0b5fc0; }
.tut-card.tut-ok{ border-color:#0b7560; box-shadow:0 6px 0 #1ea27c, 0 9px 0 #0b7560, 0 16px 26px rgba(3,28,70,.3); }
.tut-card.tut-ok p{ color:#0b7560; font-size:1.2em; }
.tut-ico{ width:52px; height:52px; flex:0 0 auto; }
@keyframes tutIn{ from{ transform:translateX(-50%) scale(.85); opacity:0 } to{ transform:translateX(-50%); opacity:1 } }

/* The hand: a ring breathing where a thumb would go, with an arrow the way
   the tap will send him. With no direction (the very first tap) it is
   just the ring. */
.tut-tap{
  position:absolute; left:50%; top:44%;
  width:104px; height:104px; margin-left:-52px;
  display:grid; place-items:center;
}
.tut-ring{
  position:absolute; inset:0; border-radius:50%;
  border:5px solid rgba(255,255,255,.95);
  box-shadow:0 0 0 3px rgba(6,42,120,.55), inset 0 0 0 3px rgba(6,42,120,.35);
  animation:tutPulse 1.1s ease-in-out infinite;
}
.tut-arrow{ width:58px; height:58px; display:none; filter:drop-shadow(0 3px 0 rgba(6,42,120,.4)); }
.tut-tap.to-right .tut-arrow{ display:block; animation:tutNudgeR 1.1s ease-in-out infinite; }
.tut-tap.to-left  .tut-arrow{ display:block; animation:tutNudgeL 1.1s ease-in-out infinite; }
@keyframes tutPulse{ 0%,100%{ transform:scale(.86); opacity:.75 } 50%{ transform:scale(1.06); opacity:1 } }
@keyframes tutNudgeR{ 0%,100%{ transform:translateX(-6px) } 50%{ transform:translateX(8px) } }
@keyframes tutNudgeL{ 0%,100%{ transform:scaleX(-1) translateX(-6px) } 50%{ transform:scaleX(-1) translateX(8px) } }
@media (prefers-reduced-motion: reduce){
  .tut-ring, .tut-arrow{ animation:none !important; }
  .tut-tap.to-left .tut-arrow{ transform:scaleX(-1); }
}

.tut-skip{
  position:fixed; z-index:45;
  /* Bottom-left, opposite the pause button and clear of the top edge where
     the platform's own controls are drawn. */
  bottom:calc(20px + env(safe-area-inset-bottom,0px));
  left:calc(16px + env(safe-area-inset-left,0px));
  min-height:44px; padding:8px 16px;
  font:inherit; font-size:15px; font-weight:800; color:var(--ink);
  background:rgba(255,255,255,.9);
  border:2px solid rgba(6,42,120,.55); border-radius:999px;
  box-shadow:0 3px 0 rgba(6,42,120,.35);
  cursor:pointer;
}
.tut-skip:active{ transform:translateY(2px); box-shadow:0 1px 0 rgba(6,42,120,.35); }
.tut-skip:focus-visible{ outline:3px solid #ffd84a; outline-offset:3px; }
/* A short screen (a phone on its side) has no room between the words and
   the penguin, and the ring sat on top of him. It goes beside him there,
   smaller. */
@media (max-height:520px){
  .tut-card{ top:calc(14px + env(safe-area-inset-top,0px)); width:min(520px, calc(100% - 360px)); min-width:260px;
             font-size:15px; padding:9px 14px; }
  .tut-ico{ width:40px; height:40px; }
  .tut-tap{ width:78px; height:78px; margin-left:-39px; top:auto;
            left:calc(50% + 150px); bottom:calc(22% + env(safe-area-inset-bottom,0px)); }
  .tut-arrow{ width:44px; height:44px; }
}

/* ---- the results: the score is the headline ----
   It was a line of small grey text under "Ouch!", the same size as the
   detail beneath it, so the one number the run was about was the easiest
   thing on the card to miss. New best gets a gold badge of its own. */
#over-score{
  margin:2px 0 4px;
  font-size:clamp(30px, 6vw, 44px); font-weight:800; line-height:1.1;
  color:#0b3d7a;
  text-shadow:0 2px 0 rgba(255,255,255,.9);
}
#new-best{
  display:inline-block;
  margin:0 0 4px; padding:4px 16px;
  font-size:clamp(16px, 2.6vw, 20px);
  color:#7a4a00;
  background:linear-gradient(180deg,#fff2b8 0%,#ffcd3a 100%);
  border:2px solid #ad6800; border-radius:999px;
  box-shadow:0 3px 0 #ad6800;
  animation:badgePop .45s cubic-bezier(.2,1.8,.4,1) both;
}
#new-best.hidden{ display:none; }
@keyframes badgePop{ from{ transform:scale(.3); opacity:0 } to{ transform:none; opacity:1 } }
@media (prefers-reduced-motion: reduce){ #new-best{ animation:none; } }

/* The logo sizes itself off the height as well as the width. Since the
   name became Ice Dasher (17 Nov 2026) the artwork is 1080x511, not
   780x535: every width here went up by about that ratio, so the letters
   stand as tall as before wherever the height decides, and nearly as tall
   where the width does. On a
   1280x800 laptop the title panel ran past the bottom of the window and
   the best score — the one thing on it that is yours — was below the fold. */
.game-title{ width:min(640px, 100%, 64vh); }
@media (max-height:860px){
  .game-title{ margin-bottom:22px; width:min(640px, 100%, 52vh); }
  .panel-title{ padding-top:18px; padding-bottom:16px; }
  .panel-title .subtitle{ margin:2px 0 6px; }
  .panel-title .best-plaque{ margin:6px auto 0; padding-top:4px; padding-bottom:4px; }
  .panel-title .btn-row{ margin-top:14px; }
  .btn-row.modes{ gap:18px 10px; }
}

/* ---- the modes: a grid, not a stack ----
   Freeride across the whole row on top, bigger than the rest, the mode a
   player comes back for; Known Lines and More modes side by side under it
   (the owner, 18 Nov 2026). */
.btn-row.modes{
  display:grid; grid-template-columns:1fr 1fr; gap:22px 10px;
}
.btn-row.modes .mode-btn{ padding:12px 12px; min-width:0; }
.btn-row.modes .mode-btn small{ font-size:max(11px, .68em); }
/* Three quiet buttons on one row: on a phone the third fell onto a line
   of its own. They share the row evenly instead. */
/* Three side by side, as wide as each other, unless a word does not fit
   (a long one, or the bigger letters a phone's own font size gives): then
   the last goes down to a row of its own instead of out of its button. */
.btn-row.row-three{ display:flex; flex-wrap:wrap; gap:14px 10px; }
.btn-row.row-three .btn{ flex:1 1 0; min-width:max-content; padding:10px 6px; white-space:nowrap; }
@media (max-width:420px){ .btn-row.row-three .btn{ font-size:13px; } }

/* ---- two modes on the title, the rest one tap in ----
   Known Lines and Freeride share the top row; More modes runs the full
   width under them and carries the Daily Line's badge. The list it opens
   stacks its modes, so each keeps its whole subtitle. */
.btn-row.modes .mode-more{ position:relative; }
.btn-row.modes .mode-main{ grid-column:1 / -1; padding:16px 14px; font-size:1.18em; }
.btn-row.modes .mode-main small{ font-size:max(12px, .66em); }
.btn-row.modes-list{ flex-direction:column; align-items:stretch; gap:22px; margin:6px 0 10px; }
.btn-row.modes-list .mode-btn small{ font-size:max(12px, .7em); }

/* ---- the Market shelf as pictures ----
   A tile per creature: the portrait, and a price tag until it is bought.
   Several to a row even on a phone, so the whole shelf is seen at once;
   the words are in the window a tap opens. */
.shop-grid{ grid-template-columns:repeat(auto-fill,minmax(104px,1fr)); gap:12px; }
.skin-card{
  position:relative;
  flex-direction:column; justify-content:center; gap:0;
  padding:12px 6px 18px;
  font:inherit; color:inherit; cursor:pointer;
  transition:transform .12s ease;
}
.skin-card:active{ transform:scale(.95); }
.skin-card:focus-visible{ outline:3px solid #2789d8; outline-offset:2px; }
.skin-card .skin-pic{ width:80px; height:80px; }
.skin-tag{
  position:absolute; left:50%; bottom:-9px; transform:translateX(-50%);
  display:inline-flex; align-items:center; gap:3px;
  padding:2px 9px 2px 5px; border-radius:99px; white-space:nowrap;
  font-weight:800; font-size:13px; line-height:20px;
  color:#44647c; background:#eef5fa; border:2px solid #90a8ba;
}
.skin-tag.can{ color:#062a78; background:#d9f0ff; border-color:#062a78; }
.skin-tag.gold.can{ color:#7a4a00; background:#fff2c2; border-color:#a86a00; }
.skin-tag.tag-worn{
  padding:2px 9px; color:#fff; background:var(--green); border-color:#062a78;
}
.coin{ display:inline-block; vertical-align:middle; flex:0 0 auto; }
@media (max-width:540px){
  /* minmax(0,…) so a column may shrink below the portrait's size; the
     portrait then shrinks to its tile instead of pushing out of the frame */
  .shop-grid{ grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px 10px; }
  .skin-card{ flex-direction:column; padding:10px 4px 16px; gap:0; }
  .skin-card .skin-pic{ width:min(72px,100%); height:auto; aspect-ratio:1; }
}

/* ---- a small window over the screen ----
   Used for a creature's words. Dims what is under it; a tap on the dim,
   the cross, Esc or the back arrow closes it. */
.sheet{
  position:fixed; inset:0; z-index:60;
  display:flex; align-items:center; justify-content:center;
  padding:calc(18px + env(safe-area-inset-top,0px)) 18px calc(18px + env(safe-area-inset-bottom,0px));
  background:rgba(6,20,52,.55);
  animation:fade .2s ease both;
}
.sheet-card{ width:min(400px,100%); margin:0; padding:30px 24px 22px; }
.sheet-x{
  position:absolute; top:8px; right:8px;
  width:44px; height:44px; border-radius:50%;   /* a finger's width, like every other button */
  border:2px solid #062a78; background:#fff; cursor:pointer;
}
.sheet-x::before, .sheet-x::after{
  content:''; position:absolute; left:50%; top:50%; width:16px; height:3px; border-radius:2px;
  background:#062a78; transform:translate(-50%,-50%) rotate(45deg);
}
.sheet-x::after{ transform:translate(-50%,-50%) rotate(-45deg); }
.sheet-pic{ width:140px; height:140px; margin:0 auto 10px; }
.sheet-name{ margin:0 0 6px; font-family:var(--display); font-size:clamp(19px,3.2vw,25px); font-weight:900; color:var(--ink); }
.sheet-perk{ margin:0 auto; max-width:30ch; font-size:clamp(14px,2.2vw,17px); line-height:1.35; color:var(--ink-soft); }
.sheet-card .btn-row{ margin-top:18px; }
.sheet-card .btn .coin{ margin:0 3px 0 2px; }
.sheet-card .shop-note{ margin-top:12px; }

/* ---- the language: flag and name, the list in a window ---- */
.flag{
  display:inline-block; flex:0 0 auto;
  width:36px; height:24px; border-radius:5px; overflow:hidden;
  border:2px solid #062a78; box-shadow:0 2px 0 rgba(6,42,120,.25);
}
.flag svg{ display:block; width:100%; height:100%; }
.btn-row.lang-pick{ margin-top:12px; }
.lang-btn, .lang-row{
  display:flex; align-items:center; gap:12px;
  font:inherit; font-size:17px; font-weight:800; color:var(--ink);
  min-height:52px; padding:8px 18px;
  border:2px solid rgba(43,93,134,.45); border-radius:16px;
  background:linear-gradient(180deg,#ffffff 0%,#e6f4fb 100%);
  box-shadow:0 3px 0 rgba(43,93,134,.35);
  cursor:pointer;
}
.lang-btn::after{
  content:''; width:9px; height:9px; margin-left:4px;
  border:solid #062a78; border-width:0 3px 3px 0; transform:rotate(-45deg);
}
.lang-btn:active, .lang-row:active{ transform:translateY(2px); box-shadow:0 1px 0 rgba(43,93,134,.35); }
.lang-btn:focus-visible, .lang-row:focus-visible{ outline:3px solid #ffd84a; outline-offset:3px; }
.lang-list{ display:flex; flex-direction:column; gap:10px; margin-top:16px; }
.lang-row{ width:100%; }
.lang-row .flag{ width:48px; height:32px; }
.lang-row .lang-name{ flex:1 1 auto; text-align:left; }
.lang-row.on{ border-color:#062a78; background:linear-gradient(180deg,#e8f8ff 0%,#bfe6fa 100%); }
.lang-row.on::after{
  content:''; width:8px; height:15px; margin-right:6px;
  border:solid var(--green-dark); border-width:0 4px 4px 0; transform:rotate(45deg) translateY(-3px);
}

/* ---- the Market purse: two pills, not two words run together ---- */
#screen-shop .wallet.purse{ gap:12px; flex-wrap:wrap; }
.purse-pill{
  display:inline-flex; align-items:center; gap:6px;
  padding:3px 16px 3px 6px; border-radius:99px;
  font-size:clamp(18px,3vw,22px); font-weight:800; line-height:1.2;
  font-variant-numeric:tabular-nums;
  color:#062a78;
  background:linear-gradient(180deg,#ffffff 0%,#d9f0ff 100%);
  border:2px solid #062a78;
  box-shadow:0 3px 0 #0450b8;
}
.purse-pill.gold{
  color:#7a4a00;
  background:linear-gradient(180deg,#fffbe8 0%,#ffe9a0 100%);
  border-color:#a86a00;
  box-shadow:0 3px 0 #c98a00;
}
.purse-pill .coin{
  width:30px; height:30px; border-radius:50%;
  background:radial-gradient(circle at 50% 40%, #ffffff 0%, #cfe9f8 100%);
}
.purse-pill.gold .coin{ background:radial-gradient(circle at 50% 40%, #ffffff 0%, #ffe39a 100%); }

/* ---- a trophy earned and not yet paid ---- */
.ach-row.owed{ border-color:#a86a00; background:rgba(255,246,214,.95); }
.ach-claim{ white-space:nowrap; }
.btn-row.row-three .market-btn{ position:relative; }

/* ---- the prize for every trophy ---- */
.ach-prize{
  display:flex; align-items:center; gap:14px;
  margin:4px 0 14px; padding:12px 16px;
  border-radius:18px; text-align:left;
  background:linear-gradient(135deg,#2a2c78 0%,#3d4fb0 55%,#2f8fa8 100%);
  border:3px solid #062a78; box-shadow:0 4px 0 #062a78;
  color:#fff;
}
.ach-prize:empty{ display:none; }
.prize-pic{ width:72px; height:72px; flex:0 0 auto;
  background:radial-gradient(circle at 50% 40%, #7ff0d0 0%, #4a4fb0 70%, #2a2c78 100%); }
.ach-prize{ flex-wrap:wrap; row-gap:8px; }
.prize-mid{ flex:1 1 140px; min-width:0; display:flex; flex-direction:column; gap:4px; }
.ach-prize > .prize-count, .ach-prize > .btn{ margin-left:auto; }
@media (max-width:400px){ .ach-prize{ gap:8px 10px; padding:10px 12px; } .prize-pic{ width:52px; height:52px; } }
.prize-name{ font-weight:800; font-size:clamp(17px,2.8vw,21px); text-shadow:0 1px 0 #062a78; }
.prize-desc{ font-size:clamp(12px,1.9vw,14px); line-height:1.3; opacity:.92; }
.prize-count{ font-weight:800; font-size:16px; white-space:nowrap; }
.ach-prize .ach-bar{ background:rgba(255,255,255,.25); }
.ach-prize .ach-bar i{ background:linear-gradient(90deg,#7ff0d0,#c7a6ff); }
.ach-prize.won{ background:linear-gradient(135deg,#1f9d63 0%,#2f8fa8 100%); }
.skin-tag.tag-trophy{ color:#fff; background:#3d4fb0; border-color:#062a78; }
.skin-tag.tag-trophy.can{ color:#7a4a00; background:#fff2c2; border-color:#a86a00; }
.skin-card.trophy-card{ background:linear-gradient(160deg,rgba(74,79,176,.18),rgba(47,143,168,.18)); }
.ach-prize .btn{ white-space:nowrap; flex:0 0 auto; }

/* ---- today's Daily Line, not yet finished: a quiet mark on its button ----
   A child of its own, because a button's ::before and ::after are its snow. */
.todo-dot{
  display:none; position:absolute; top:12px; right:14px; z-index:3;
  width:12px; height:12px; border-radius:50%;
  background:#ffd84a; border:2px solid #062a78;
  box-shadow:0 0 0 3px rgba(255,216,74,.35);
}
.mode-btn.todo .todo-dot{ display:block; }

/* ---- the best score: a plaque of amber ice ----
   The same ice as the buttons, amber: bubbles and cracks in it, a lit rim,
   frost on its top edge, the slab's thickness under it; no snow and no
   icicles, as it is not to be pressed. A band of light sweeps across it now
   and then, and a star glints. */
.best-plaque{
  position:relative; overflow:hidden;
  display:flex; align-items:center; justify-content:center; gap:10px;
  width:fit-content; max-width:100%;
  margin:10px auto 2px; padding:6px 18px 6px 10px;
  border-radius:15px;
  border:1.5px solid rgba(255,255,255,.85); border-bottom-color:rgba(255,255,255,.3);
  background:
    var(--ice-tex) 0 0 / 240px 80px,
    radial-gradient(90% 120% at 22% -10%, rgba(255,255,255,.6), rgba(255,255,255,0) 62%),
    linear-gradient(180deg,#fff6c9 0%,#ffd84a 48%,#f0a000 100%);
  box-shadow:inset 0 9px 10px -7px rgba(255,255,255,.85), inset 0 -8px 14px -6px rgba(90,40,0,.25),
             0 4px 0 #ad6800, 0 5.5px 0 rgba(60,30,0,.35), 0 10px 16px rgba(3,28,70,.22);
  color:#5c3600;
}
.best-plaque.hidden{ display:none; }
.best-plaque::after{                               /* the sweep of light */
  content:''; position:absolute; top:0; bottom:0; left:-60%; width:40%;
  background:linear-gradient(100deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.75) 50%, rgba(255,255,255,0) 100%);
  transform:skewX(-18deg);
  animation:bpSweep 4.5s ease-in-out infinite;
}
@keyframes bpSweep{ 0%,62%{ left:-60%; } 100%{ left:130%; } }
.bp-star{
  flex:0 0 auto; width:30px; height:30px;
  background:#fffbe6;
  clip-path:polygon(50% 0%,61% 35%,98% 35%,68% 57%,79% 91%,50% 70%,21% 91%,32% 57%,2% 35%,39% 35%);
  filter:drop-shadow(0 0 4px rgba(255,255,255,.9));
  animation:bpGlint 2.6s ease-in-out infinite;
}
@keyframes bpGlint{ 0%,100%{ transform:scale(1) rotate(0deg); } 50%{ transform:scale(1.14) rotate(10deg); } }
.bp-text{ display:flex; flex-direction:column; align-items:flex-start; line-height:1; }
.bp-lab{ font-size:11px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; opacity:.8; white-space:nowrap; }
.bp-num{ font-size:clamp(22px,4.2vw,30px); font-weight:800; font-variant-numeric:tabular-nums;
         color:#3d2400; text-shadow:0 1px 0 rgba(255,255,255,.6); }
.bp-unit{ font-size:13px; font-weight:800; align-self:flex-end; margin-bottom:3px; opacity:.85; white-space:nowrap; }
/* Where there is a board the plaque opens it: the player's place on its
   right, behind a rule, and a chevron that says it goes somewhere. */
.bp-rank{ display:flex; align-items:center; gap:8px; margin-left:4px; padding-left:12px;
          border-left:2px solid rgba(92,54,0,.3); }
.bp-rank.hidden{ display:none; }
.bp-go{ width:10px; height:10px; border-right:3px solid #3d2400; border-top:3px solid #3d2400;
        transform:rotate(45deg); margin-left:-2px; opacity:.75; }
.best-plaque.tight .bp-unit{ display:none; }        /* set by ui.js when the place would go under */
.best-plaque.to-board{ cursor:pointer; min-height:44px; -webkit-tap-highlight-color:transparent;
                       flex-wrap:wrap; row-gap:6px; }
/* Two numbers on it now: on a phone it draws a little smaller so both fit
   on one line; where they still do not, the place goes under the best. */
@media (max-width:440px){
  .best-plaque.to-board{ gap:8px; padding:6px 12px 6px 8px; }
  .best-plaque.to-board .bp-star{ width:24px; height:24px; }
  .best-plaque.to-board .bp-num{ font-size:22px; }
  .best-plaque.to-board .bp-lab{ font-size:10px; letter-spacing:.04em; }
  .best-plaque.to-board .bp-unit{ font-size:12px; }
  .best-plaque.to-board .bp-rank{ padding-left:10px; gap:6px; margin-left:0; }
}
.best-plaque.to-board:active{ transform:translateY(2px); }
.best-plaque.to-board:focus-visible{ outline:3px solid #ffd84a; outline-offset:4px; }
@media (prefers-reduced-motion: reduce){ .best-plaque::after, .bp-star{ animation:none; } }

/* ---- a creature's three stories, in its window ---- */
.album{ margin:14px 0 4px; text-align:left; display:flex; flex-direction:column; gap:7px; }
.album-head{ font-size:12px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; color:var(--ink-soft); text-align:center; }
.album-row{ padding:8px 12px; border-radius:12px; background:rgba(255,255,255,.6); border:2px dashed rgba(90,130,160,.35); }
.album-row.open{ background:rgba(255,248,222,.95); border:2px solid #e3b23c; }
.album-ch{ font-size:12px; font-weight:800; color:#7a8ea0; text-transform:uppercase; letter-spacing:.05em; }
.album-row.open .album-ch{ color:#a86a00; }
.album-txt{ font-size:13.5px; line-height:1.35; color:var(--ink); margin-top:2px; }
.album-row:not(.open) .album-txt{ color:var(--ink-soft); }
.album-row .ach-bar{ margin-top:6px; }
.sheet-card{ max-height:calc(100vh - 40px); overflow-y:auto; }
.won-story{ color:#a86a00; }

/* ---- the creature being ridden: a tag in its window, a pop on its tile ---- */
.chosen-tag{
  display:inline-flex; align-items:center; gap:6px;
  padding:9px 20px; border-radius:99px;
  font-weight:800; font-size:clamp(15px,2.4vw,18px); color:#0f6b46;
  background:#d6f5e1; border:2px solid var(--green);
}
.chosen-tag.hidden{ display:none; }
.skin-card.just-chosen{ animation:chosenPop .45s cubic-bezier(.2,1.6,.4,1); }
.skin-card.just-chosen .tag-worn{ animation:chosenPop .45s .1s cubic-bezier(.2,1.6,.4,1) both; }
@keyframes chosenPop{ 0%{ transform:scale(.88); } 60%{ transform:scale(1.07); } 100%{ transform:scale(1); } }
@media (prefers-reduced-motion: reduce){ .skin-card.just-chosen, .skin-card.just-chosen .tag-worn{ animation:none; } }

/* ---- a creature's comic ----
   The page is sized to the screen it is on (ui.js fitComic): the three
   panels and their captions fit the height wherever a panel can stay
   120px wide (a shorter phone scrolls, each new panel brought up above
   the buttons), and the page hugs them rather than standing taller than every other
   panel. Each panel is one card — the picture with its caption under it —
   instead of a picture with a yellowed label stuck on below. */
.comic-page{ width:min(560px,100%); max-width:100%; padding:16px 16px 14px; }
.comic-panels{ display:flex; flex-direction:column; align-items:center; gap:10px; cursor:pointer; }
.comic-panel{
  width:100%; max-width:100%;
  background:#ffffff; border:3px solid #062a78; border-radius:14px; overflow:hidden;
  box-shadow:0 4px 0 rgba(6,42,120,.28);
  opacity:0; transform:translateY(10px) scale(.97);
  transition:opacity .35s ease, transform .35s cubic-bezier(.2,1.4,.4,1);
}
.comic-panel.shown{ opacity:1; transform:none; }
.comic-art{ display:block; width:100%; aspect-ratio:16 / 10; height:auto; background:#e6f3fb; }
.comic-cap{
  padding:7px 12px 8px;
  background:linear-gradient(180deg,#ffffff 0%,#eef7fd 100%);
  border-top:2px solid rgba(6,42,120,.14);
  font-weight:700; font-size:clamp(13px,1.9vw,15.5px); line-height:1.32; color:#173a7a; text-align:left;
  letter-spacing:.1px;
}
/* The row under the panels. Its words never break inside — "1 / 3" used to
   come apart over three lines and "Sari peste" over two. When Skip, the
   count and Next do not fit one row (a long language on a narrow phone),
   fitComic in ui.js gives it .tight and the count takes a row of its own
   above the buttons. It sticks to the bottom of the screen, so on a phone
   too short for the whole page the page scrolls under the buttons instead
   of taking them out of reach. */
.comic-foot{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  margin-top:4px; padding-top:14px;   /* room for the buttons' snow when it sticks */
  position:sticky; bottom:env(safe-area-inset-bottom,0px); z-index:1;
}
/* only when the page is taller than the screen does the row lie over the
   panels, and only then does it need a ground of its own */
.comic-foot.over{ background:#e2f3fb; box-shadow:0 -10px 12px -6px #e2f3fb; }
.comic-foot > *{ white-space:nowrap; }
.comic-foot.tight{ flex-wrap:wrap; row-gap:14px; }   /* room for the snow on the buttons' tops */
.comic-foot.tight .comic-pageno{ order:-1; flex-basis:100%; text-align:center; }
/* and when even the two buttons will not sit side by side, they stack:
   Next first, the way on; Skip under it */
.comic-foot.stack{ flex-direction:column; align-items:center; row-gap:16px; }
.comic-foot.stack .comic-pageno{ flex-basis:auto; }
.comic-foot.stack #comic-skip{ order:1; }
.comic-pageno{ font-weight:800; color:var(--ink-soft); font-size:14px; }
.comic-row{ margin-top:8px; }
.comic-row.hidden{ display:none; }
/* A deep comic (comic.js cmPaint, ui.js comicCam): each panel is a card
   that leans a few degrees with its camera (--rx, --ry, set every frame),
   swings in when it is revealed, and swings away when the page turns.
   Once in, .settled drops the transition on the lean, or the card would
   trail the camera by half a second. */
.comic-page.deep .comic-panel{
  transform:perspective(900px) rotateY(-38deg) scale(.9);
  transition:opacity .4s ease, transform .6s cubic-bezier(.2,1.25,.35,1), box-shadow .4s ease;
}
.comic-page.deep .comic-panel.shown{
  transform:perspective(900px) rotateX(var(--rx,0deg)) rotateY(var(--ry,0deg));
  box-shadow:0 12px 20px -8px rgba(6,42,120,.5), 0 4px 0 rgba(6,42,120,.28);
}
.comic-page.deep .comic-panel.settled{ transition:opacity .4s ease, box-shadow .4s ease; }
.comic-page.deep .comic-panels.turn .comic-panel{
  transform:perspective(900px) rotateY(78deg) scale(.92); opacity:0;
  transition:opacity .3s ease-in, transform .34s cubic-bezier(.55,0,.9,.45);
}
.comic-page.deep .comic-panels.turn .comic-panel:nth-child(2){ transition-delay:.05s; }
.comic-page.deep .comic-panels.turn .comic-panel:nth-child(3){ transition-delay:.1s; }
@media (prefers-reduced-motion: reduce){
  .comic-page.deep .comic-panel, .comic-page.deep .comic-panel.shown{ transform:none; transition:opacity .2s ease; }
}
/* three panels side by side wherever the screen is wider than tall */
@media (min-aspect-ratio: 1/1){
  .comic-page{ width:min(1400px,100%); }
  .comic-panels{ display:grid; grid-template-columns:repeat(3,auto); justify-content:center; align-items:start; }
}

/* ---- a one-panel screen that does not fit (ui.js fitScreen) ----
   Scaling the whole panel down was the only answer, and on a phone held
   sideways it went to half size: buttons 23px tall, words 5px. Now the
   panel first changes shape. On a screen wider than tall its two groups
   go side by side (.fit-wide); then it gives up what it can do without
   (.fit-tight) — the tagline, the lines under the mode names, some air.
   Only what is still too tall is scaled, and never below 80%: past that
   the screen scrolls, the way it did before. */
#screen-title.fit-tight .title-head .subtitle{ display:none; }
#screen-title.fit-tight .game-title{ width:min(440px, 94%, 35vh); margin-bottom:14px; }
#screen-title.fit-tight .btn-row.modes .mode-btn small{ display:none; }
#screen-title.fit-tight .btn-row.modes .mode-btn{ padding-top:10px; padding-bottom:10px; }
#screen-title.fit-tight .panel-title .btn-row{ margin-top:12px; }
#screen-title.fit-tight .panel-title{ padding-top:20px; padding-bottom:14px; }

#screen-title.fit-wide .panel-title{
  width:min(980px, 100%); margin-left:auto; margin-right:auto;
  display:grid; grid-template-columns:minmax(0, .85fr) minmax(0, 1.15fr); column-gap:28px; align-items:center;
}
#screen-title.fit-wide .game-title{ width:min(500px, 100%, 58vh); }
#screen-title.fit-wide .title-menu > .btn-row:first-child,
#screen-title.fit-wide .title-menu > .btn-row.hidden + .btn-row{ margin-top:6px; }

#screen-over.fit-tight .panel-title-text{ margin-bottom:0; }
#screen-over.fit-tight #over-score{ font-size:clamp(24px, 5vw, 34px); }
#screen-over.fit-tight .goals{ gap:6px; margin-top:6px; }
#screen-over.fit-tight .goal-bar{ height:8px; }
#screen-over.fit-tight .over-lives{ margin-bottom:6px; }
#screen-over.fit-tight .find-art{ zoom:.72; }
#screen-over.fit-tight .btn-row{ margin-top:14px; }
#screen-over.fit-tight .panel{ padding-top:16px; padding-bottom:14px; }
#screen-over.fit-tight .finds-box{ padding:8px 12px 12px; margin-bottom:8px; }
#screen-over.fit-tight .find-count{ margin-bottom:4px; }
#screen-over.fit-tight .find-prize{ margin-bottom:6px; }
#screen-over.fit-tight .won-box{ margin:4px 0 0; }

#screen-over.fit-wide .panel{
  width:min(920px, 100%);
  display:grid; grid-template-columns:minmax(0, 1fr) minmax(0, 1fr); column-gap:24px; align-items:center;
}
#screen-over.fit-wide .over-side > .btn-row:first-child{ margin-top:6px; }

/* ===================== AIR BETWEEN BUTTONS =====================
   Measured on the phone: from one button's 3D edge (8 px under it, 6 under
   the best's plaque) to the snow on the next (11 px over it; the quiet
   ghost buttons have none) there was 1 to 3 px of clear space, and on a
   short title -7: the snow lay on the button above. --air is that clear
   space now, the same between any two buttons one over the other.
   (13 Nov 2026: the ice buttons' icicles hang to 16 px under a button, 18
   under a big one, 14 under a small one; sparse, they may meet the next
   button's snow, but never words.) */
:root{ --air:10px; }
.btn-row{ row-gap:calc(var(--air) + 19px); }
.btn-row + .btn-row{ margin-top:calc(var(--air) + 19px); }
.btn-row.modes, .btn-row.modes-list{ row-gap:calc(var(--air) + 19px); }
.btn-row.row-three{ row-gap:calc(var(--air) + 8px); }               /* ghost over ghost */
#screen-title.fit-tight, #screen-over.fit-tight{ --air:6px; }
#screen-over.fit-tight .btn-row + .btn-row{ margin-top:calc(var(--air) + 19px); }
/* the title, a step at a time (not when its two halves stand side by side) */
#screen-title .best-plaque{ margin-bottom:0; }
#screen-title:not(.fit-wide) .panel-title .title-menu > .btn-row{ margin-top:calc(var(--air) + 19px); }
#screen-title:not(.fit-wide) .panel-title .title-menu > .btn-row.modes{ margin-top:calc(var(--air) + 17px); }
#screen-title:not(.fit-wide) .panel-title .title-menu > #resume-row:not(.hidden) + .btn-row.modes{ margin-top:calc(var(--air) + 19px); }
#screen-title .panel-title .tasks-chip{ margin-top:calc(var(--air) + 12px); }   /* the Market's icicles hang 16 px */
#screen-title .panel-title .title-menu > .btn-row.row-three{ margin-top:var(--air); }
#screen-title .panel-title .title-menu > .tasks-chip.hidden + .btn-row.row-three{ margin-top:calc(var(--air) + 8px); }
.q-row + .q-row{ margin-top:calc(var(--air) + 3px); }                 /* the graphics lists: 3 px of edge */

/* ---- the ice buttons on a very short screen (a phone held sideways) ----
   The screens draw their buttons closer there to fit 390 px of height,
   and the snow (11 px over a button) lay on the words over it, the
   icicles (16 px under) on the next button (13 Nov 2026, every language).
   There is no room for icicles: they go, and the snow is the small
   buttons' thinner cap. */
@media (max-height: 500px){
  .btn::before, .btn::after, .btn-big::after, .btn-sm::before, .btn-sm::after{ top:-8px; height:15px; bottom:auto; }
  .btn::after, .btn-big::after, .btn-sm::after{
    left:-4px; right:-4px;
    background:var(--snow-l) left top / 18px 15px no-repeat, var(--snow-r) right top / 18px 15px no-repeat;
  }
  .btn::before, .btn-sm::before{ left:13px; right:13px; background-size:52px 15px; }
}

/* ================= the Market's tabs, Looks and Profile (1.3.0) =================
   Three tabs in the same buttons as Graphics; the looks and frames as
   tiles in the shelf's own clothes (a portrait, its name, a price tag or a
   tick); the profile card a frame round the creature, the name, the title
   and two numbers. */
.shop-tabs{ grid-template-columns:repeat(2, auto); margin:2px 0 14px; }
.alt-row{ display:flex; justify-content:center; gap:14px; margin:4px 0 12px; }
.alt-row .look-tile{ width:104px; }
.alts-wrap{ margin-top:6px; }
@media (max-width:380px){ .shop-tabs .q-opt{ padding:6px 8px; font-size:13px; } }
.look-stage{ display:flex; flex-direction:column; align-items:center; gap:4px; margin:0 0 6px; }
.look-stage-pic{ width:132px; height:132px; }
.look-who{ margin:0; font-weight:800; font-size:15px; color:var(--ink-soft); }
.look-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(84px,1fr)); gap:16px 10px; margin:4px 0 12px; }
.look-tile{
  position:relative; display:flex; flex-direction:column; align-items:center; gap:3px;
  padding:8px 4px 16px; border-radius:18px; border:3px solid transparent;
  background:rgba(255,255,255,.8); box-shadow:0 3px 0 rgba(0,0,0,.08);
  font:inherit; color:inherit; cursor:pointer; transition:transform .12s ease;
}
.look-tile:active{ transform:scale(.95); }
.look-tile:focus-visible{ outline:3px solid #2789d8; outline-offset:2px; }
.look-tile.on{ border-color:var(--green); background:rgba(214,245,225,.96); }
.look-tile.picked{ border-color:#2789d8; background:rgba(217,240,255,.96); }
.look-pic{ display:block; width:60px; height:60px; border-radius:50%;
           background:radial-gradient(circle at 50% 38%, #dff1fb 0%, #b9dcf0 100%); }
.look-name{ font-weight:800; font-size:12.5px; line-height:1.15; text-align:center; color:var(--ink); }
.look-buy{ display:flex; align-items:center; justify-content:center; gap:12px; flex-wrap:wrap; margin:4px 0 12px; }
.look-buy-name{ font-weight:900; font-size:16px; color:var(--ink); }

/* the frames: a ring round the card's picture, and the same as a swatch */
.pf-ice{ background:linear-gradient(145deg,#ffffff 0%,#bfe6fb 40%,#5fb0e6 100%); }
.pf-snow{ background:radial-gradient(circle at 30% 25%,#ffffff 0%,#f2f7fb 55%,#c9dbe8 100%); box-shadow:inset 0 0 0 2px #dfeaf2; }
.pf-neon{ background:linear-gradient(135deg,#ff4fd8 0%,#7b5cff 50%,#29e6ff 100%); box-shadow:0 0 10px rgba(255,79,216,.55), 0 0 14px rgba(41,230,255,.45); }
.pf-aurora{ background:conic-gradient(from 210deg,#3fe0a6,#29b6e6,#8a5cf0,#e05ce0,#3fe0a6); }
.pf-gold{ background:linear-gradient(145deg,#fff3b0 0%,#f0c43c 35%,#b07a10 70%,#ffe27a 100%); box-shadow:0 0 0 1px #8a5a0a; }
.pf-swatch{ display:block; width:52px; height:52px; border-radius:50%; position:relative; margin:4px 0 2px; }
.pf-swatch::after{ content:''; position:absolute; inset:7px; border-radius:50%;
                   background:radial-gradient(circle at 50% 38%, #dff1fb 0%, #b9dcf0 100%); }

/* the card */
.prof-preview{ display:flex; justify-content:center; margin:0 0 6px; }
.pcard{ display:flex; align-items:center; gap:14px; padding:10px 16px 10px 10px; border-radius:22px;
        background:rgba(255,255,255,.85); border:2px solid rgba(43,93,134,.18); max-width:100%; text-align:left; }
.pcard-av{ flex:0 0 auto; padding:6px; border-radius:50%; }
.pcard-av canvas{ display:block; border-radius:50%; background:radial-gradient(circle at 50% 38%, #e6f4fc 0%, #c3e1f2 100%); }
.pcard-mid{ min-width:0; display:flex; flex-direction:column; gap:2px; }
.pcard-name{ font-weight:900; font-size:clamp(16px,2.6vw,20px); color:var(--ink); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.pcard-title{ font-weight:800; font-size:14px; color:#7a4a00; }
.pcard-stats{ display:flex; flex-wrap:wrap; gap:4px 12px; font-weight:800; font-size:13px; color:var(--ink-soft); }

/* the titles: a list, the ones not yet won saying which trophy wins them */
.title-list{ display:flex; flex-direction:column; gap:6px; margin:4px 0 8px; }
.title-row{ display:flex; align-items:center; justify-content:space-between; gap:10px; width:100%;
            padding:9px 14px; border-radius:14px; border:2px solid transparent; background:rgba(255,255,255,.85);
            font:inherit; color:var(--ink); cursor:pointer; text-align:left; }
.title-row.on{ border-color:var(--green); background:rgba(214,245,225,.96); }
.title-row.locked{ color:var(--ink-soft); background:rgba(255,255,255,.55); }
.title-name{ font-weight:800; font-size:15px; }
.title-need{ font-weight:700; font-size:12.5px; text-align:right; }
.title-row.on .title-need{ color:#0b7560; font-size:16px; }

/* the board: rows are buttons now (a tap opens the card), with the card's
   picture small in its frame */
.board-row{ width:100%; font:inherit; color:inherit; cursor:pointer; }
.board-row:focus-visible{ outline:3px solid #2789d8; outline-offset:2px; }
.board-av{ flex:0 0 auto; width:38px; height:38px; border-radius:50%; padding:3px; box-sizing:border-box; }
.board-av canvas{ display:block; width:32px; height:32px; border-radius:50%;
                  background:radial-gradient(circle at 50% 38%, #e6f4fc 0%, #c3e1f2 100%); }
.board-av.none{ opacity:.45; }

/* the card's face is a round portrait (portraits.js) */
.pcard-av canvas{ border-radius:50%; }

/* ---- My profile: the avatars, each a round portrait (1.3.0) ---- */
.av-grid{ display:grid; grid-template-columns:repeat(auto-fill, minmax(66px, 1fr)); gap:10px; justify-items:center; margin:8px 0 6px; }
.av-tile{ appearance:none; background:none; border:3px solid transparent; border-radius:50%; padding:2px; cursor:pointer; min-width:44px; min-height:44px; }
.av-tile canvas{ display:block; border-radius:50%; }
.av-tile.on{ border-color:#ffd24a; box-shadow:0 0 0 2px rgba(255,210,74,.35); }
.av-tile:focus-visible{ outline:3px solid #fff; outline-offset:2px; }
