/* ===== Solitaire Voyage theme layer (after art.css). Layout untouched: only skins.
   The gold category card is a passport: --fill (0-100%, set by potFill in app.js from the word count) raises a band of the
   category's own colour (--cc) with fine postmark lines, and the band dips like a stamp press when a word lands (.hit). */
.k-c .front {
  background:
    linear-gradient(
      90deg,
      transparent 9%,
      rgba(255, 255, 255, 0.42) 12%,
      rgba(255, 255, 255, 0.08) 17%,
      transparent 21%
    ),
    linear-gradient(165deg, #fff1b0, #ffd35a 40%, #f5a524);
}
.k-c .front > * {
  z-index: 1;
}
.k-c .front::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--fill, 0%);
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.85) 0 calc(var(--cw) * 0.025),
      transparent calc(var(--cw) * 0.025)
    ),
    repeating-linear-gradient(
      -30deg,
      rgba(255, 255, 255, 0.22) 0 1.5px,
      transparent 1.5px calc(var(--cw) * 0.07)
    ),
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--cc, #2f5da8) 46%, #fff),
      color-mix(in srgb, var(--cc, #2f5da8) 66%, #fff)
    );
  opacity: 0.86;
  transition: height 0.65s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-origin: 50% 100%;
}
.k-c.hit .front::after {
  animation: potPress 0.34s ease-out;
}
@keyframes potPress {
  35% {
    transform: scaleY(1.08);
  }
  100% {
    transform: none;
  }
}
.k-c.covered .front::after {
  display: none;
}
/* full passport: the gold glows in its colour */
.k-c.full .front {
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.7),
    0 0 0 3px var(--cc),
    0 0 18px 4px color-mix(in srgb, var(--cc) 70%, transparent),
    0 6px 14px rgba(40, 10, 0, 0.35);
}
.k-c .crown {
  width: 28%;
  top: 7%;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.6));
}
.k-c .crown svg {
  color: #9a4f06;
}
/* card backs without the painted image: navy airmail paper, gold rim (the world colours still tint them) */
.back {
  background: radial-gradient(
    120% 90% at 50% 20%,
    color-mix(in srgb, var(--b1) 35%, #2f5da8),
    color-mix(in srgb, var(--b2) 35%, #1b2a4a)
  );
  box-shadow:
    inset 0 0 0 calc(var(--cw) * 0.045) #f6d27a,
    inset 0 0 0 calc(var(--cw) * 0.065) rgba(10, 16, 40, 0.35),
    0 2px 0 rgba(10, 16, 40, 0.38),
    0 5px 12px rgba(5, 10, 30, 0.3);
}
.back::after {
  inset: 26% 22%;
}
.card.deep .back {
  box-shadow:
    inset 0 0 0 calc(var(--cw) * 0.045) #f6d27a,
    0 1px 0 rgba(40, 15, 50, 0.3);
}
/* empty foundation slots: a dashed spot in cream paper colour, an empty airmail stamp frame inside */
.slot.f {
  border-color: rgba(255, 236, 200, 0.38);
  background: rgba(255, 236, 200, 0.05);
  color: rgba(255, 236, 200, 0.5);
}
.mini.cat {
  background: linear-gradient(165deg, #fff1b0, #ffd35a 40%, #f5a524);
}
@media (prefers-reduced-motion: reduce) {
  .k-c .front::after {
    animation: none;
  }
}
.calm .k-c .front::after {
  animation: none !important;
  transition-duration: 0.2s;
}
/* a postmark printed on the passport when a word lands (potBubbles in voyage.js): a ring with wavy cancel lines */
.pMark {
  position: absolute;
  width: calc(var(--cw) * 0.26);
  aspect-ratio: 1;
  translate: -50% -50%;
  z-index: 1;
  pointer-events: none;
  border-radius: 50%;
  border: calc(var(--cw) * 0.014) solid color-mix(in srgb, var(--cc, #2f5da8) 75%, #000);
  background: repeating-linear-gradient(
    0deg,
    transparent 0 22%,
    color-mix(in srgb, var(--cc, #2f5da8) 70%, transparent) 22% 27%,
    transparent 27% 33%
  );
  animation: pMark 2.6s ease-out both;
}
@keyframes pMark {
  0% {
    transform: scale(1.5);
    opacity: 0;
  }
  12% {
    transform: scale(0.94);
    opacity: 0.85;
  }
  20% {
    transform: scale(1);
  }
  70% {
    opacity: 0.7;
  }
  100% {
    opacity: 0;
  }
}
/* Bento's hop (buddy.js bdInk): a little puff of warm dust instead of the octopus ink */
#buddy .ink {
  background: radial-gradient(
    circle,
    #fff6e4 0 20%,
    #e9cf9f 45%,
    rgba(200, 160, 100, 0.5) 65%,
    transparent 72%
  );
  box-shadow: 0 0 10px 3px rgba(240, 210, 150, 0.45);
  width: 18px;
  height: 18px;
}

/* ---------- the match is played on an explorer's travel desk (no blurred map behind the cards).
   table-v in portrait, table-h in landscape; a desk lamp glow breathes very slowly in the corners (no flicker). */
/* the edges where the HUD and the boosters sit are dimmed, so their text reads over the globe, maps and tickets */
/* one painted table per world: potTable() (src/voyage.js) sets --tv / --th */
#artBg .ab-table {
  inset: -2%;
  background-image:
    linear-gradient(
      180deg,
      rgba(6, 12, 28, 0.72),
      rgba(6, 12, 28, 0.25) 9%,
      transparent 15%,
      transparent 82%,
      rgba(6, 12, 28, 0.35) 90%,
      rgba(6, 12, 28, 0.78)
    ),
    var(--tv, url(../assets/game/table-v.webp));
}
@media (min-aspect-ratio: 1/1) {
  #artBg .ab-table {
    background-image:
      linear-gradient(
        90deg,
        rgba(6, 12, 28, 0.78),
        rgba(6, 12, 28, 0.35) 9%,
        transparent 16%,
        transparent 84%,
        rgba(6, 12, 28, 0.35) 91%,
        rgba(6, 12, 28, 0.78)
      ),
      var(--th, url(../assets/game/table-h.webp));
  }
}
#artBg .ab-table::after {
  content: "";
  position: absolute;
  inset: 0;
  mix-blend-mode: screen;
  pointer-events: none;
  background:
    radial-gradient(28% 22% at 6% 8%, rgba(255, 170, 70, 0.35), transparent 70%),
    radial-gradient(28% 22% at 94% 8%, rgba(255, 170, 70, 0.3), transparent 70%),
    radial-gradient(28% 22% at 6% 94%, rgba(255, 170, 70, 0.3), transparent 70%),
    radial-gradient(28% 22% at 94% 94%, rgba(255, 170, 70, 0.35), transparent 70%);
  animation: lamp 7s ease-in-out infinite;
}
@keyframes lamp {
  50% {
    opacity: 0.72;
  }
}
body[data-scr="game"] #artBg .ab-table {
  opacity: 1;
}
body[data-scr="game"] #artBg .ab-w.on {
  opacity: 0;
}
.calm #artBg .ab-table::after {
  animation: none;
}

/* ---------- painted board icons (assets/game): airmail card back, the stamp on the passport, empty stamp frames, the joker ticket */
.art .back {
  background:
    url(../assets/game/card-back.webp) center/cover no-repeat,
    #1b2a4a;
  box-shadow:
    inset 0 0 0 1px rgba(255, 220, 140, 0.5),
    0 2px 0 rgba(10, 16, 40, 0.38),
    0 5px 12px rgba(5, 10, 30, 0.3);
}
.art .back::after {
  display: none;
}
.art .card.deep .back {
  box-shadow:
    inset 0 0 0 1px rgba(255, 220, 140, 0.5),
    0 1px 0 rgba(10, 16, 40, 0.3);
}
.art .k-c .crown {
  background: url(../assets/game/stamp.webp) center/contain no-repeat;
  width: 34%;
  top: 5%;
  filter: drop-shadow(0 2px 2px rgba(90, 40, 0, 0.35));
}
.art .k-c .crown svg {
  visibility: hidden;
}
.art .slot.f {
  background:
    url(../assets/game/stamp-frame.webp) center/52% no-repeat,
    rgba(255, 236, 200, 0.05);
}
.art .slot.f svg {
  visibility: hidden;
}
.art .k-j .jstar {
  background: url(../assets/game/joker.webp) center/contain no-repeat;
  filter: drop-shadow(0 2px 2px rgba(40, 0, 40, 0.35));
}
.art .k-j .jstar svg {
  visibility: hidden;
}

/* ---------- the rubber stamp that slams on a full passport (potCork); its base lands on the card centre, the ink ring spreads */
.potCork {
  position: fixed;
  width: clamp(70px, 17vw, 100px);
  aspect-ratio: 1;
  background: url(../assets/game/rubber-stamp.webp) center/contain no-repeat;
  pointer-events: none;
  z-index: 62;
  transform-origin: 50% 100%;
  filter: drop-shadow(0 6px 5px rgba(0, 0, 0, 0.4));
}
.potInk {
  position: fixed;
  width: clamp(70px, 11vw, 110px);
  aspect-ratio: 1;
  border-radius: 50%;
  pointer-events: none;
  z-index: 61;
  border: 3px solid color-mix(in srgb, var(--cc) 80%, #fff);
  box-shadow:
    0 0 12px color-mix(in srgb, var(--cc) 70%, transparent),
    inset 0 0 10px color-mix(in srgb, var(--cc) 50%, transparent);
}

/* ---------- stamp album (openShelf): brass rails, one stamp per category tinted to its colour, empty airmail frames for the rest */
.shelfBtn {
  position: relative;
  margin-left: auto;
  margin-right: 8px;
}
.shelfBtn .shIc {
  width: 62%;
  height: 62%;
  background: url(../assets/game/stamp.webp) center/contain no-repeat;
}
.shelfBtn .dot {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 3px rgba(255, 84, 104, 0.3);
}
.sheet.shelfSheet {
  width: min(860px, 96vw);
  max-width: none;
  max-height: 94vh;
  overflow: hidden;
  gap: 10px;
  padding: 14px 16px 12px;
}
/* painted crest with the title on its empty panel */
.shCrest {
  flex: none;
  container-type: inline-size;
  position: relative;
  width: min(100%, 560px, 72vh);
  aspect-ratio: 900/292;
  margin: -4px auto -6px;
  background: url(../assets/game/shelf-crest.webp) center/contain no-repeat;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.45));
}
.shCrest b {
  position: absolute;
  left: 20%;
  right: 19%;
  top: 41%;
  bottom: 25%;
  display: grid;
  place-items: center;
  text-align: center;
  color: #fff;
  font: 800 clamp(14px, 5.4cqw, 30px)/1 var(--f-display);
  white-space: nowrap;
  text-shadow:
    0 2px 0 #0a1226,
    0 0 2px #0a1226,
    0 0 14px rgba(255, 214, 120, 0.45);
}
.shProg {
  flex: none;
  position: relative;
  height: 30px;
  border-radius: 15px;
  background: rgba(0, 0, 0, 0.4);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.14);
  overflow: hidden;
  margin: 0 2px;
}
.shProg > i {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  min-width: 30px;
  border-radius: 15px;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.55) 0 2px, transparent 3px) 0 0/22px 22px,
    linear-gradient(90deg, #d9962e, #f5c853);
  box-shadow: 0 0 14px rgba(245, 200, 83, 0.6);
  animation: shBub 3s linear infinite;
}
@keyframes shBub {
  to {
    background-position:
      22px -22px,
      0 0;
  }
}
.shProg > b {
  position: relative;
  display: block;
  text-align: center;
  font: 800 14px/30px var(--f-card);
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}
/* the album: thick walnut frame, navy leather pages, vertical scroll only, dust motes drifting in the lamp light */
.shCab {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  border-radius: 22px;
  padding: 10px;
  background: linear-gradient(180deg, #7a4627, #4a2614 70%, #3a1d0f);
  box-shadow:
    inset 0 2px 0 rgba(255, 214, 150, 0.4),
    inset 0 -4px 0 rgba(0, 0, 0, 0.4),
    inset 0 0 0 2px rgba(255, 190, 90, 0.25),
    0 10px 24px rgba(0, 0, 0, 0.45);
}
.shScroll {
  flex: 1 1 auto;
  min-height: 120px;
  overflow-x: hidden;
  overflow-y: auto;
  border-radius: 14px;
  padding: 18px 12px 6px;
  background:
    radial-gradient(70% 50% at 50% 0, rgba(255, 210, 130, 0.22), transparent 70%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.025) 0 2px, transparent 2px 54px),
    linear-gradient(180deg, #22345a, #121c33);
  box-shadow: inset 0 0 28px rgba(0, 0, 0, 0.65);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}
.shCab .shMotes {
  inset: 10px;
  border-radius: 14px;
  z-index: 2;
}
.shRow {
  --pk: 30px;
  margin-bottom: 20px;
}
.shPots,
.shTags {
  display: grid;
  grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr));
  gap: 8px;
  padding: 0 3%;
}
.shPots {
  position: relative;
  z-index: 1;
  align-items: end;
}
.shItem {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  height: clamp(78px, 17vw, 112px);
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
/* contact shadow: the stamp stands on the rail */
.shItem::after {
  content: "";
  position: absolute;
  left: 24%;
  right: 24%;
  bottom: -3px;
  height: 7px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(20, 6, 0, 0.6), transparent);
  z-index: -1;
}
.shPot {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  background: url(../assets/game/stamp-frame-album.webp) center bottom/contain no-repeat;
  opacity: 0.5;
  filter: saturate(0.6);
  transform-origin: 50% 100%;
}
.shItem.on .shPot {
  background-image: url(../assets/game/stamp-album.webp);
  opacity: 1;
  filter: hue-rotate(var(--hue)) saturate(1.15);
}
.shGlow {
  position: absolute;
  left: 50%;
  top: 55%;
  width: 120%;
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--cc) 75%, transparent), transparent);
  animation: shGlow 2.6s ease-in-out infinite;
  pointer-events: none;
}
.shItem:nth-child(2n) .shGlow {
  animation-delay: -1.1s;
}
.shItem:nth-child(3n) .shGlow {
  animation-delay: -1.9s;
}
@keyframes shGlow {
  0%,
  100% {
    opacity: 0.45;
    scale: 0.9;
  }
  50% {
    opacity: 0.85;
    scale: 1.05;
  }
}
/* a glint runs over every collected stamp */
.shItem.on .shPot::after {
  content: "";
  position: absolute;
  left: 38%;
  top: 42%;
  width: 12%;
  aspect-ratio: 1;
  background: #fff;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  animation: shTw 2.4s ease-in-out infinite;
  opacity: 0;
}
.shItem:nth-child(2n).on .shPot::after {
  animation-delay: -0.9s;
}
.shItem:nth-child(3n).on .shPot::after {
  animation-delay: -1.7s;
}
@keyframes shTw {
  0%,
  60%,
  100% {
    opacity: 0;
    transform: scale(0.3);
  }
  75% {
    opacity: 1;
    transform: scale(1) rotate(45deg);
  }
}
.shItem em {
  position: absolute;
  top: 2px;
  right: 8%;
  font: 800 12px/1 var(--f-card);
  font-style: normal;
  padding: 3px 7px;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffe07a, #f5a524);
  color: #5b2a00;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  z-index: 2;
}
/* the rail: its brass starts at 2% of the image height (measured on shelf.webp), the stamps end at the image bottom, so they meet */
.shPlank {
  display: block;
  height: var(--pk);
  margin: calc(var(--pk) * -0.02 - 2px) -1% 0;
  background: url(../assets/game/shelf.webp) center top/100% 100% no-repeat;
  filter: drop-shadow(0 5px 5px rgba(0, 0, 0, 0.5));
}
.shTags {
  margin-top: 4px;
}
.shTag {
  justify-self: center;
  max-width: 100%;
  padding: 4px 6px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.4);
  color: rgba(255, 255, 255, 0.78);
  font: 700 clamp(10.5px, 2.9vw, 12px)/1.15 var(--f-card);
  text-align: center;
  overflow: hidden;
  overflow-wrap: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  align-self: start;
}
.shTag.on {
  background: color-mix(in srgb, var(--cc) 62%, #0e1830);
  color: #fff;
  box-shadow:
    0 0 0 1.5px color-mix(in srgb, var(--cc) 80%, #fff),
    0 2px 6px rgba(0, 0, 0, 0.4);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);
}
.shFoot {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
}
.shFoot .masc {
  --ms: 56px;
  margin: -14px 0 -6px;
}
.shLock {
  margin: 0;
  font: 700 13px/1.3 var(--f-card);
  color: rgba(255, 255, 255, 0.82);
  text-align: left;
}
@media (min-width: 760px) {
  .shRow {
    --pk: 34px;
  }
  .shTag {
    font-size: 13px;
  }
  .shFoot .masc {
    --ms: 64px;
  }
}
.calm .shGlow,
.calm .shProg > i,
.calm .shItem.on .shPot::after {
  animation: none;
}
.calm .shMotes {
  display: none;
}

/* ---------- home: a paper plane glides over the desk with a dashed red route, dust motes in the lamp light */
.hfx,
.hmotes {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}
.hfx .hplane {
  position: absolute;
  inset: 0;
}
.hfx .hpl {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1;
  background: url(../assets/game/plane.webp) center/contain no-repeat;
  filter: drop-shadow(0 8px 6px rgba(0, 0, 0, 0.35));
  will-change: transform;
}
.hfx .hdash {
  position: absolute;
  width: 9px;
  height: 2.5px;
  margin: -1px -4.5px;
  border-radius: 2px;
  background: #d8343f;
  box-shadow: 0 0 3px rgba(255, 220, 200, 0.6);
}
.hmotes i {
  position: absolute;
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  background: #fff1c2;
  box-shadow: 0 0 8px 3px rgba(255, 214, 120, 0.55);
  opacity: 0;
  animation: hMote var(--d) ease-in-out infinite;
}
@keyframes hMote {
  0% {
    opacity: 0;
    transform: translate(0, 0);
  }
  20% {
    opacity: 0.9;
  }
  45% {
    opacity: 0.35;
  }
  60% {
    opacity: 0.85;
    transform: translate(var(--dx), -28px);
  }
  100% {
    opacity: 0;
    transform: translate(calc(var(--dx) * -0.5), -64px);
  }
}
.calm .hmotes,
.calm .hfx {
  display: none;
}
@media (prefers-reduced-motion: reduce) {
  .hmotes,
  .hfx {
    display: none;
  }
}

/* ---------- home: only Daily gift and Challenge under Play, side by side and as wide as Play (the Shop opens from the coins) */
.homeRow .htile {
  flex-direction: row;
  justify-content: center;
  gap: 10px;
  padding: 10px 12px;
  min-height: 64px;
  font-size: 15px;
  text-align: left;
}
.homeRow .htile span {
  line-height: 1.15;
}
.art .homeRow .htile i {
  width: 54px;
  height: 54px;
  margin: -6px 0;
  flex: none;
}
@media (min-width: 1100px) and (min-height: 720px) {
  .homeRow .htile {
    min-height: 76px;
    font-size: 17px;
  }
  .art .homeRow .htile i {
    width: 62px;
    height: 62px;
  }
}
@media (max-height: 500px) {
  .homeRow .htile {
    min-height: 52px;
    padding: 6px 10px;
  }
  .art .homeRow .htile i {
    width: 42px;
    height: 42px;
  }
}

/* === UPGRADE 2026-11-09 === table finish, reward, journey (docs/o-que-melhoraria/jogo-20261109) */
/* 1 HUD on dark plates with a gold rim, readable over every painted table */
#hud .lvl,
#hud .menuBtn,
#hud .pill {
  background: linear-gradient(180deg, rgba(26, 40, 72, 0.86), rgba(10, 16, 34, 0.9));
  border: 1.5px solid rgba(255, 201, 74, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 4px 10px rgba(0, 0, 0, 0.38);
}
#hud .lvl {
  padding: 5px 10px 6px;
  border-radius: 16px;
}
#hud .moves.low {
  background: rgba(255, 60, 90, 0.42);
  border-color: var(--red);
}
#hLevel,
#hWorld,
.cmbTxt,
#hud .pill b {
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.45);
}
/* 2 the "how much is left" counter becomes a gold pill */
.progRow {
  width: min(170px, 100%);
  gap: 7px;
}
.prog {
  height: 9px;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.42);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}
#hCats {
  font: 800 14px/1 var(--f-display);
  color: var(--gold);
  padding: 3px 8px 2px;
  border-radius: 99px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 201, 74, 0.5);
}
/* 6 thicker combo bar, so you can see it drain */
.cmbBar {
  width: min(130px, 100%);
  height: 9px;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.45);
  box-shadow: inset 0 0 0 1px rgba(255, 176, 224, 0.35);
}
.cmbBar i {
  border-radius: 5px;
}
/* 3 category card: a cream paper label on the passport (the colour band stays visible below it) */
.k-c:not(.covered) .front::before {
  inset: 31% 6% 20%;
  z-index: 1;
  border-radius: calc(var(--cw) * 0.06);
  border: 1px solid rgba(140, 80, 10, 0.55);
  background: linear-gradient(180deg, rgba(255, 251, 238, 0.93), rgba(250, 235, 200, 0.9));
  box-shadow:
    0 0 0 calc(var(--cw) * 0.016) rgba(255, 246, 220, 0.5),
    0 calc(var(--cw) * 0.014) calc(var(--cw) * 0.03) rgba(90, 40, 0, 0.3);
}
/* 4 word card = a cream luggage tag: a red and blue airmail stripe frame and a brass eyelet at the top (text untouched) */
.k-w:not(.covered) .front::before {
  border: calc(var(--cw) * 0.028) solid transparent;
  border-radius: 0;
  border-image: repeating-linear-gradient(
      -45deg,
      #c8323c 0 6px,
      #fffaf0 6px 9px,
      #2f5da8 9px 15px,
      #fffaf0 15px 18px
    )
    8;
  opacity: 0.85;
}
.k-w:not(.covered) .front::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  --y: calc(var(--cw) * 0.13);
  background: radial-gradient(
    circle at 50% var(--y),
    rgba(60, 40, 20, 0.55) 0 calc(var(--cw) * 0.028),
    #d9a441 calc(var(--cw) * 0.03) calc(var(--cw) * 0.05),
    #8a5a1c calc(var(--cw) * 0.052) calc(var(--cw) * 0.058),
    transparent calc(var(--cw) * 0.062)
  );
}
/* the joker is an airline ticket on deep airmail blue */
.k-j .front {
  background: linear-gradient(155deg, #4a78cf, #24427e 55%, #16244a);
}
/* 5 name plates under the tools */
.boost .nm {
  padding: 3px 8px;
  border-radius: 8px;
  background: rgba(10, 16, 34, 0.8);
  border: 1px solid rgba(255, 201, 74, 0.42);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.6);
}
.boost:not(.b-more) .nm {
  color: var(--txt);
}
/* 8 the paper plane that flies to the progress bar */
.potFly {
  position: fixed;
  left: 0;
  top: 0;
  width: clamp(48px, 7vw, 70px);
  aspect-ratio: 1;
  background: url(../assets/game/plane.webp) center/contain no-repeat;
  filter: drop-shadow(0 6px 6px rgba(0, 0, 0, 0.4));
  pointer-events: none;
  z-index: 62;
  will-change: transform;
}
/* 7 win sheet: the level's stamps, a brighter Perfect line, rays behind the coins */
.wpots {
  display: flex;
  justify-content: center;
  gap: clamp(3px, 1.4vw, 10px);
  margin: -6px 0 4px;
}
.wpot {
  width: clamp(30px, 8.4vw, 44px);
  aspect-ratio: 1;
  background: url(../assets/game/stamp-album.webp) center bottom/contain no-repeat;
  filter: hue-rotate(var(--hue)) saturate(1.15) drop-shadow(0 3px 4px rgba(0, 0, 0, 0.45));
  opacity: 0;
  transform: translateY(10px) scale(0.5);
}
.wpot.on {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.2s,
    transform 0.45s var(--spring);
}
.calm .wpot {
  opacity: 1;
  transform: none;
  transition: none;
}
.win .wrow {
  box-shadow: inset 0 0 0 1px rgba(255, 201, 74, 0.25);
}
.win .wrow.perfect {
  background: linear-gradient(90deg, rgba(63, 214, 166, 0.42), rgba(63, 214, 166, 0.14));
  box-shadow:
    inset 0 0 0 1.5px rgba(157, 255, 224, 0.75),
    0 0 14px rgba(63, 214, 166, 0.35);
  color: #d2fff2;
  font-size: 17px;
}
.win .wrow.tot {
  box-shadow: inset 0 0 0 1.5px rgba(255, 201, 74, 0.65);
}
.win .sheetCoins {
  position: relative;
  isolation: isolate;
}
.win .sheetCoins::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 170px;
  height: 170px;
  margin: -85px 0 0 -85px;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
  background: repeating-conic-gradient(rgba(255, 224, 130, 0.4) 0 9deg, transparent 9deg 24deg);
  -webkit-mask: radial-gradient(closest-side, #000 25%, transparent);
  mask: radial-gradient(closest-side, #000 25%, transparent);
  animation: wRays 12s linear infinite;
}
@keyframes wRays {
  to {
    rotate: 360deg;
  }
}
.calm .win .sheetCoins::before {
  animation: none;
}
@media (max-height: 500px) {
  .wpots {
    display: none;
  }
  .win .sheetCoins::before {
    width: 110px;
    height: 110px;
    margin: -55px 0 0 -55px;
  }
}
/* 9 map: glowing travelled path, bigger stars, a halo on the current level, quieter locked levels, wider on desktop */
.pdone {
  stroke-width: 9px;
  filter: drop-shadow(0 0 5px rgba(255, 211, 90, 0.85));
}
.art .node .ns i {
  width: 20px;
  height: 20px;
}
.art .node .ns i:nth-child(2) {
  width: 24px;
  height: 24px;
  margin-top: 3px;
}
.node.cur::before {
  content: "";
  position: absolute;
  inset: -16px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(closest-side, transparent 68%, rgba(255, 226, 120, 0.7) 74%, transparent);
  animation: curGlow 1.6s ease-in-out infinite;
}
@keyframes curGlow {
  50% {
    transform: scale(1.12);
    opacity: 0.55;
  }
}
.node.lock {
  filter: saturate(0.55) brightness(0.85);
}
.calm .node.cur::before {
  animation: none;
}
@media (min-width: 1100px) and (min-height: 720px) {
  #mapInner {
    width: min(720px, 100%);
  }
}
/* 11 home: a soft lamp glow behind the logo */
.art .logoArt {
  isolation: isolate;
}
.art .logoArt::before {
  content: "";
  position: absolute;
  inset: -14% -10%;
  z-index: -1;
  pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(
    closest-side,
    rgba(255, 214, 130, 0.3),
    rgba(255, 170, 80, 0.12) 55%,
    transparent
  );
  animation: cauldGlow 5s ease-in-out infinite;
}
@keyframes cauldGlow {
  50% {
    opacity: 0.6;
    transform: scale(0.94);
  }
}
.calm .logoArt::before {
  animation: none;
}
@media (prefers-reduced-motion: reduce) {
  .logoArt::before,
  .node.cur::before,
  .win .sheetCoins::before {
    animation: none;
  }
}
@media (max-width: 420px) {
  #hud {
    gap: 6px;
  }
  #hud .lvl {
    padding-inline: 5px;
  }
  .cmbTxt {
    font-size: clamp(13px, 4.1vw, 17px);
  }
}
/* === /UPGRADE 2026-11-09 === */

/* compass rose under a finished passport (potRunes in voyage.js) */
.pRunes {
  position: absolute;
  width: calc(var(--cw) * 2.5);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 5;
  filter: drop-shadow(0 0 5px var(--rc)) drop-shadow(0 0 1px #fff6d0);
}
.pRunes svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  fill: none;
  stroke: color-mix(in srgb, var(--rc) 40%, #ffe7a0);
  stroke-width: 1.3;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.pRunes .f {
  fill: color-mix(in srgb, var(--rc) 40%, #ffe7a0);
  stroke: none;
}
.pRunes .rr {
  animation: pRspin 7s linear infinite;
}
.pRunes .ri {
  animation: pRspin 4.5s linear infinite reverse;
}
@keyframes pRspin {
  to {
    rotate: 360deg;
  }
}
.calm .pRunes .rr,
.calm .pRunes .ri {
  animation: none;
}
@media (prefers-reduced-motion: reduce) {
  .pRunes .rr,
  .pRunes .ri {
    animation: none;
  }
}

/* painted tutorial hand (assets/game/hand.webp); fingertip stays where the svg one was (~42% x, top) */
.art #hand {
  width: 58px;
  height: 72px;
  background: url(../assets/game/hand.webp) center top/contain no-repeat;
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.4));
}
.art #hand svg {
  visibility: hidden;
}
/* "0/4" sits inside a thicker bar, so the bar is centred under the level name */
.progRow {
  position: relative;
  width: min(150px, 100%);
  display: block;
}
.prog {
  height: 18px;
  border-radius: 9px;
  border: 1px solid rgba(255, 201, 74, 0.55);
}
.prog i {
  border-radius: 9px;
}
#hCats {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: #fff;
  font: 800 13px/1 var(--f-display);
  text-shadow:
    0 1px 0 #3a1d00,
    1px 0 0 #3a1d00,
    -1px 0 0 #3a1d00,
    0 -1px 0 #3a1d00,
    0 2px 3px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}
/* no ads: Continue alone, centred */
.win .wbtns {
  grid-template-columns: minmax(0, 300px);
  justify-content: center;
}
/* Bento bigger on the map */
.mapMasc,
.mapMasc .masc {
  --ms: 94px;
}
@media (min-width: 1100px) and (min-height: 720px) {
  .mapMasc,
  .mapMasc .masc {
    --ms: 108px;
  }
}
/* Bento docked in the left HUD column (desktop) faces the table */
#buddy.dock .masc img {
  scale: -1 1;
}
@media (min-aspect-ratio: 5/4) {
  #hud .lvl {
    padding-inline: 6px;
  }
  #hWorld {
    letter-spacing: 0.05em;
  }
}
#hWorld {
  letter-spacing: 0.05em;
}
/* the painted Bento swings like a pendulum when the whole picture rotates: no looping side-to-side rock (sway, excited head, wobble) */
.masc.masc[data-bd="bounce"] .mHead,
.masc.masc[data-bd="sway"] .mHead,
.masc.masc[data-bd="wobble"] .mHead {
  animation: none;
}
/* perf: the tinted stamps and the rotating rays get their own layers, so the win sheet is not repainted every frame */
.wpot,
.win .sheetCoins::before {
  will-change: transform;
}
/* mobile Chrome/Safari: layered children of the front (label, text, counter) ignore backface-visibility and show mirrored through
   the card back. Hide the front while the card is face down; it switches halfway through the .44s flip, so the turn still reads. */
.card .front {
  transition: visibility 0s 0.2s;
}
.card.down .front {
  visibility: hidden;
}

/* ---------- Voyage palette over the inherited UI: navy leather and brass instead of the violet of the base theme */
:root {
  --t1: #22345a;
  --t2: #0e1830;
  --ink: #1b2a4a;
  --glass: rgba(6, 12, 28, 0.42);
}
.sheet {
  background: linear-gradient(170deg, #26395f, #111b33);
  border-color: rgba(255, 201, 74, 0.32);
}
/* tool buttons: round navy badges with a brass rim (the joker is airmail red), like the approved study */
.art .boost .ic,
.art .boost.b-restart .ic {
  --c1: #36558a;
  --c2: #1b2a4a;
  --c3: #0b1530;
  color: #f6e9cf;
  box-shadow:
    inset 0 0 0 3px #e8b54a,
    inset 0 0 0 5px rgba(0, 0, 0, 0.28),
    inset 0 6px 8px rgba(255, 255, 255, 0.12),
    0 5px 0 var(--c3),
    0 9px 16px rgba(0, 0, 0, 0.4);
}
.art .b-joker .ic,
.art .bic.b-joker {
  --c1: #e0564f;
  --c2: #a82a33;
  --c3: #5e1018;
}
.boost .badge.price {
  background: #16244a;
}

/* fixes 10/11: the painted backgrounds stay on their own GPU layer, so a cross-fade between screens does not re-raster
   them (that snap read as the background shaking); bigger top-bar buttons on desktop */
#artBg > i {
  will-change: opacity;
  backface-visibility: hidden;
}
@media (min-width: 760px) and (min-height: 560px) {
  .topbar .iconbtn {
    width: 56px;
    height: 56px;
    border-radius: 17px;
  }
  .topbar .iconbtn svg {
    width: 29px;
    height: 29px;
  }
  .topbar .pill {
    height: 50px;
    font-size: 23px;
    padding: 0 17px 0 8px;
  }
  .topbar .pill .coin {
    width: 34px;
    height: 34px;
  }
}
@media (min-width: 1100px) and (min-height: 720px) {
  .topbar .iconbtn {
    width: 64px;
    height: 64px;
    border-radius: 19px;
  }
  .topbar .iconbtn svg {
    width: 33px;
    height: 33px;
  }
  .topbar .pill {
    height: 56px;
    font-size: 25px;
  }
  .topbar .pill .coin {
    width: 38px;
    height: 38px;
  }
}
/* End of css/voyage.css */
