/* Smocza Matematyka — map screens (js/screens/map.js): 'home' (.mp), 'island' (.isl), 'welcome' (.wl).
 * Stage px; colours from css/base.css tokens; island art colours live in map.js (one painted palette).
 */

/* ======================================================================
 * Map ('home')
 * ==================================================================== */

.screen-home .mp {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #9fd4d3;
}
.mp-svg {
  position: absolute;
  left: 0;
  top: 0;
}

/* sea life: slow, calm */
.mp-wave {
  fill: none;
  stroke: #fff;
  stroke-width: 2.6;
  stroke-linecap: round;
  opacity: 0.6;
  animation: mp-wave 6.5s ease-in-out infinite alternate;
}
@keyframes mp-wave {
  from { transform: translateX(-5px); opacity: 0.35; }
  to { transform: translateX(7px); opacity: 0.7; }
}
.mp-route {
  fill: none;
  stroke: #fffbee;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 0.1 15;
  opacity: 0.75;
}
.mp-boat {
  animation: mp-bob 5s ease-in-out infinite alternate;
}
@keyframes mp-bob {
  from { transform: translate(706px, 744px) rotate(-2deg); }
  to { transform: translate(716px, 740px) rotate(2deg); }
}
.mp-pennant,
.mp-cloth {
  transform-box: fill-box;
  transform-origin: 0% 50%;
  animation: mp-cloth 2.8s ease-in-out infinite alternate;
}
@keyframes mp-cloth {
  from { transform: skewY(-3deg) scaleX(0.96); }
  to { transform: skewY(3deg) scaleX(1); }
}
.mp-twinkle {
  transform-box: fill-box;
  transform-origin: center;
  animation: mp-twinkle 1.8s ease-in-out infinite alternate;
}
.mp-tw2 {
  animation-delay: -0.9s;
}
@keyframes mp-twinkle {
  from { transform: scale(0.5); opacity: 0.3; }
  to { transform: scale(1.15); opacity: 1; }
}
.mp-cave-glow,
.mp-lantern {
  animation: mp-flicker 3.2s ease-in-out infinite alternate;
}
@keyframes mp-flicker {
  from { opacity: 0.75; }
  to { opacity: 1; }
}

/* islands, fog, flags */
.mp-island .mp-isl-art {
  transform-box: fill-box;
  transform-origin: 50% 85%;
}
.mp-island.mp-tap .mp-isl-art {
  animation: mp-island-tap 0.45s ease-out;
}
@keyframes mp-island-tap {
  0% { transform: scale(1); }
  35% { transform: scale(1.05, 0.96); }
  70% { transform: scale(0.98, 1.03); }
  100% { transform: scale(1); }
}
.mp-island.is-fogged .mp-isl-art {
  opacity: 0.72;
}
.mp-fog-drift {
  animation: mp-drift 9s ease-in-out infinite alternate;
}
@keyframes mp-drift {
  from { transform: translateX(-6px); }
  to { transform: translateX(6px); }
}
.mp-fog {
  transform-box: fill-box;
  transform-origin: center;
  transition: opacity 1.3s ease, transform 1.4s ease;
}
.mp-fog.lifting {
  opacity: 0;
  transform: translateY(-26px) scale(1.25);
}
/* the sleeping smoczątko: slow breathing (body swells, head lifts a little), now and then a tail-tip twitch */
.mp-sleepy-breathe,
.mp-sleepy-nod,
.mp-sleepy-tip {
  transform-box: fill-box;
  transform-origin: 50% 100%;
}
.mp-sleepy-breathe {
  animation: mp-breathe 3.6s ease-in-out infinite;
}
.mp-sleepy-nod {
  animation: mp-nod 3.6s ease-in-out infinite;
}
.mp-sleepy-tip {
  animation: mp-tip 7.2s ease-in-out infinite;
}
@keyframes mp-breathe {
  0%, 100% { transform: scale(1, 1); }
  45% { transform: scale(1.03, 1.07); }
}
@keyframes mp-nod {
  0%, 100% { transform: translateY(0); }
  45% { transform: translateY(-0.9px); }
}
@keyframes mp-tip {
  0%, 80%, 100% { transform: rotate(0deg); }
  85% { transform: rotate(16deg); }
  91% { transform: rotate(-7deg); }
  96% { transform: rotate(3deg); }
}
.mp-z {
  font: 700 15px var(--font);
  fill: #f3efff;
  stroke: #4a3f73;
  stroke-width: 3px;
  stroke-linejoin: round;
  paint-order: stroke;
  animation: mp-z 3s ease-in-out infinite;
}
.mp-z2 {
  font-size: 19px;
  animation-delay: -1.5s;
}
@keyframes mp-z {
  0% { opacity: 0; transform: translate(0, 4px); }
  40% { opacity: 1; }
  100% { opacity: 0; transform: translate(6px, -10px); }
}
.mp-flag-new {
  transform-box: fill-box;
  animation: mp-flag-rise 0.9s 0.5s ease-out backwards;
}
@keyframes mp-flag-rise {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* chest (hidden stone) */
.mp-chest-lid {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  transition: transform 0.6s cubic-bezier(0.3, 1.6, 0.5, 1);
}
.mp-chest-rays,
.mp-chest-shine {
  opacity: 0;
  transition: opacity 0.6s ease 0.25s;
}
.mp-chest.is-open .mp-chest-lid {
  transform: translateY(-9px) rotate(-24deg);
}
.mp-chest.is-open .mp-chest-rays {
  opacity: 1;
}
.mp-chest.is-open .mp-chest-shine {
  opacity: 0.9;
}
.mp-chest.is-open .mp-chest-lock {
  opacity: 0;
}
.mp-chest.opening .mp-chest-rays {
  animation: mp-rays 1.2s ease-in-out 0.3s 2 alternate;
}
@keyframes mp-rays {
  from { opacity: 0.4; }
  to { opacity: 1; }
}

/* tap targets + name labels */
.mp-hits {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.mp-hit {
  position: absolute;
  pointer-events: auto;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 0 4px;
  margin: 0;
  border: 0;
  border-radius: 48px;
  background: transparent;
  -webkit-tap-highlight-color: transparent;
}
.mp-hit:focus-visible {
  outline: 4px solid var(--accent);
  outline-offset: -4px;
}
.mp-label {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--panel);
  border: 3px solid var(--isl, var(--line));
  box-shadow: 0 3px 0 rgba(42, 34, 56, 0.16), 0 6px 14px rgba(42, 34, 56, 0.12);
  font: 700 24px/1 var(--font);
  color: var(--ink);
  white-space: nowrap;
  transition: transform 0.08s ease;
}
.mp-hit:active .mp-label {
  transform: translateY(3px) scale(0.97);
}
.mp-hit.is-fogged .mp-label {
  border-color: #cfc8dc;
  color: var(--ink-soft);
}
.mp-label-paw {
  position: absolute;
  right: -30px;
  top: -26px;
  animation: mp-paw 1.8s ease-in-out infinite alternate;
}
.mp-label-paw svg,
.isl-card-paw svg {
  display: block;
}
@keyframes mp-paw {
  from { filter: drop-shadow(0 0 2px rgba(242, 183, 5, 0.5)); transform: rotate(-6deg) scale(0.96); }
  to { filter: drop-shadow(0 0 10px rgba(255, 200, 40, 1)); transform: rotate(6deg) scale(1.06); }
}

/* the dragon and its speech bubble */
.mp-flyer {
  position: absolute;
  z-index: 10;
  pointer-events: none;
  will-change: transform;
}
.mp-flyer .guide-dragon {
  pointer-events: auto;
}
.mp-flyer.flying .guide-dragon {
  pointer-events: none;
}
.mp-flyer .d-shadow {
  transition: opacity 0.2s;
}
.mp-flyer.flying .d-shadow {
  opacity: 0;
}
.mp-hidden {
  visibility: hidden;
}
.mp-bubble-layer {
  position: absolute;
  inset: 0;
  z-index: 12;
  pointer-events: none;
}
.mp-bubble.guide-bubble {
  position: absolute;
  max-width: 400px;
  min-height: 0;
  overflow: visible;
  padding: 14px 20px 16px;
  font-size: 26px;
  font-weight: 600;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.mp-bubble .guide-repeat {
  display: none;
}
.mp-bubble.mp-off {
  opacity: 0;
  pointer-events: none;
}
.mp-bubble.tail-left::before,
.mp-bubble.tail-right::before,
.mp-bubble.tail-left::after,
.mp-bubble.tail-right::after {
  content: '';
  position: absolute;
  top: var(--tail-y, 40px);
  border: 14px solid transparent;
  margin-top: -14px;
}
.mp-bubble.tail-left::before {
  left: -28px;
  border-right-color: var(--ink);
}
.mp-bubble.tail-left::after {
  left: -23px;
  border-right-color: #fff;
}
.mp-bubble.tail-right::before {
  right: -28px;
  border-left-color: var(--ink);
}
.mp-bubble.tail-right::after {
  right: -23px;
  border-left-color: #fff;
}
.mp-bubble.tail-down::before,
.mp-bubble.tail-down::after {
  content: '';
  position: absolute;
  left: var(--tail-x, 50%);
  border: 14px solid transparent;
  margin-left: -14px;
}
.mp-bubble.tail-down::before {
  bottom: -28px;
  border-top-color: var(--ink);
}
.mp-bubble.tail-down::after {
  bottom: -23px;
  border-top-color: #fff;
}

/* top bar: Sakiewka, Skarbiec, Półka kamieni, Kram … parent gear */
.mp-top {
  position: absolute;
  left: 18px;
  right: 18px;
  top: 14px;
  height: 84px;
  display: flex;
  align-items: center;
  gap: 24px;
  z-index: 20;
  pointer-events: none;
}
.mp-top > * {
  pointer-events: auto;
}
.mp-top-spacer {
  flex: 1;
  pointer-events: none;
}
.mp-purse.gold-counter {
  min-height: 76px;
  padding: 6px 24px 6px 12px;
  border: 3px solid #f0d27a;
  font-size: 32px;
  gap: 10px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.08s ease;
}
.mp-purse:active,
.mp-tool:active {
  transform: translateY(3px);
}
.mp-tool {
  width: 80px;
  height: 80px;
  padding: 0;
  border-radius: 50%;
  border: 3px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.08s ease;
}
.mp-tool-ico {
  display: block;
}
.mp-shelf-ico {
  position: relative;
  display: inline-flex;
  align-items: flex-start;
  justify-content: center;
}
.mp-shelf-ico .stone {
  margin-top: 2px;
}
.mp-shelf-plank {
  position: absolute;
  left: 2px;
  right: 2px;
  bottom: 4px;
  height: 9px;
  border-radius: 3px;
  background: linear-gradient(180deg, #c48d55, #8a5a2b);
}
.mp-gear {
  position: relative;
  width: 72px;
  height: 72px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 253, 247, 0.72);
  color: #8f899b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 0 rgba(42, 34, 56, 0.1);
  touch-action: none;
}
.mp-gear svg {
  display: block;
}
.mp-gear-ring {
  position: absolute;
  inset: -6px;
  width: 84px;
  height: 84px;
  transform: rotate(-90deg);
  pointer-events: none;
}
.mp-gear-track {
  fill: none;
  stroke: rgba(42, 34, 56, 0.08);
  stroke-width: 5;
}
.mp-gear-fill {
  fill: none;
  stroke: var(--gold);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 214;
  stroke-dashoffset: 214;
  transition: stroke-dashoffset 0.2s ease;
}
.mp-gear.holding .mp-gear-fill {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 3s linear;
}

/* "Polecam najpierw…" choice: veil over the map, the dragon and its bubble above it */
.mp-veil {
  position: absolute;
  inset: 0;
  z-index: 21;
  background: rgba(36, 29, 59, 0.22);
  animation: fade-in 0.25s ease;
}
.mp-veil.closing {
  animation: fade-out 0.2s ease forwards;
}
.mp.asking .mp-flyer {
  z-index: 22;
}
.mp.asking .mp-bubble-layer {
  z-index: 23;
}
.mp-ask {
  position: absolute;
  left: 50%;
  bottom: 36px;
  transform: translateX(-50%);
  z-index: 30;
  padding: 22px 30px;
  border-radius: 34px;
  background: var(--panel);
  border: 3px solid var(--line);
  box-shadow: var(--shadow);
  animation: pop-in 0.25s ease-out;
}
.mp-ask.at-top {
  top: 118px;
  bottom: auto;
}
.mp-ask.closing {
  animation: fade-out 0.2s ease forwards;
}
.mp-ask-row {
  display: flex;
  gap: 32px;
}
.mp-ask .btn-xl {
  min-width: 250px;
  font-size: 36px;
}
.mp-ask .btn-icon svg,
.mp-ask .btn-icon {
  display: block;
}

/* island presentation (covers the map; module-like frame) */
.mp-pres {
  z-index: 40;
  background: var(--bg);
  animation: fade-in 0.3s ease;
}
.mp-pres.closing {
  animation: fade-out 0.26s ease forwards;
}
.mp-pres-ico {
  display: inline-flex;
  width: 64px;
  height: 64px;
}
.mp-pres-ico svg {
  width: 64px;
  height: 64px;
}
.mp-pres .topbar-title {
  max-width: 900px;
  font-size: 30px;
  font-weight: 700;
}
.mp-pres-area {
  background: var(--bg);
}
.mp-show {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease;
}
.mp-show.closing {
  opacity: 0;
}
.mp-show-mat {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  min-width: 640px;
  min-height: 300px;
  padding: 48px 56px;
  border-radius: 44px;
  background: radial-gradient(ellipse at 50% 40%, #fbf3df, #efdfbd);
  border: 4px solid #e3cf9f;
  box-shadow: inset 0 0 0 10px rgba(255, 255, 255, 0.35), var(--shadow);
}
.mp-show-item {
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pop-in 0.45s ease-out backwards;
}
.mp-chainpic {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* night: break and daily limit */
.mp-night {
  position: absolute;
  inset: 0;
  z-index: 50;
  background: radial-gradient(ellipse at 50% 38%, rgba(58, 47, 92, 0.975), rgba(23, 18, 42, 0.985) 75%);
  animation: fade-in 0.6s ease;
}
.mp-night.closing {
  animation: fade-out 0.5s ease forwards;
}
.mp-stars i {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff6d6;
  box-shadow: 0 0 6px #fff6d6;
  animation: mp-star 4s ease-in-out infinite alternate;
}
@keyframes mp-star {
  from { opacity: 0.25; }
  to { opacity: 0.95; }
}
.mp-moon {
  position: absolute;
  right: 170px;
  top: 70px;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  box-shadow: inset -26px -6px 0 0 #fff1bf;
  filter: drop-shadow(0 0 18px rgba(255, 241, 191, 0.55));
}
.mp-night-dragon {
  position: absolute;
  left: 50%;
  top: 170px;
  transform: translateX(-50%);
}
.mp-night-cushion {
  position: absolute;
  left: -46px;
  right: -46px;
  bottom: -22px;
  height: 64px;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 40%, #6c5aa6, #45386f 70%);
  box-shadow: inset 0 6px 0 rgba(255, 255, 255, 0.12), 0 0 40px rgba(255, 220, 140, 0.18);
}
.mp-night-dragon .dragon {
  position: relative;
}
.mp-night-say {
  position: absolute;
  left: 50%;
  top: 186px;
  transform: translateX(-50%);
  max-width: 620px;
  padding: 14px 26px;
  border-radius: 26px;
  background: #fff;
  border: 3px solid var(--ink);
  font: 600 28px/1.25 var(--font);
  color: var(--ink);
  text-align: center;
  width: max-content;
  box-shadow: var(--shadow-sm);
  animation: fade-in 0.5s 0.3s ease backwards;
}
.mp-night-say::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -18px;
  margin-left: -14px;
  border: 14px solid transparent;
  border-top-color: var(--ink);
  border-bottom: 0;
}
.mp-night-text {
  position: absolute;
  left: 0;
  right: 0;
  top: 470px;
  text-align: center;
  font: 700 44px/1.2 var(--font);
  color: #fff6e0;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.3);
}
.mp-night .mp-wake {
  position: absolute;
  left: 50%;
  top: 580px;
  transform: translateX(-50%);
  min-width: 300px;
}
.mp-night .mp-wake:active {
  transform: translateX(-50%) translateY(4px);
}
.mp-night .mp-gear {
  position: absolute;
  right: 18px;
  top: 22px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.45);
}

/* body glow of the dragon (§4.2): 1 soft, 2 clear, 3 golden */
.mp-glow.glow-horns-1 .d-s-head,
.mp-glow.glow-tail-1 .d-s-tail,
.mp-glow.glow-wings-1 .d-s-wing-l,
.mp-glow.glow-wings-1 .d-s-wing-r,
.mp-glow.glow-claws-1 .d-feet,
.mp-glow.glow-claws-1 .d-s-arm-l,
.mp-glow.glow-claws-1 .d-s-arm-r,
.mp-glow.glow-necklace-1 .d-acc-neck,
.mp-glow.glow-eyes-1 .d-eye {
  filter: drop-shadow(0 0 3px rgba(255, 214, 90, 0.75));
}
.mp-glow.glow-horns-2 .d-s-head,
.mp-glow.glow-tail-2 .d-s-tail,
.mp-glow.glow-wings-2 .d-s-wing-l,
.mp-glow.glow-wings-2 .d-s-wing-r,
.mp-glow.glow-claws-2 .d-feet,
.mp-glow.glow-claws-2 .d-s-arm-l,
.mp-glow.glow-claws-2 .d-s-arm-r,
.mp-glow.glow-necklace-2 .d-acc-neck,
.mp-glow.glow-eyes-2 .d-eye {
  filter: drop-shadow(0 0 4px rgba(255, 205, 50, 0.95)) drop-shadow(0 0 2px rgba(255, 205, 50, 0.9));
}
.mp-glow.glow-horns-3 .d-s-head,
.mp-glow.glow-tail-3 .d-s-tail,
.mp-glow.glow-wings-3 .d-s-wing-l,
.mp-glow.glow-wings-3 .d-s-wing-r,
.mp-glow.glow-claws-3 .d-feet,
.mp-glow.glow-claws-3 .d-s-arm-l,
.mp-glow.glow-claws-3 .d-s-arm-r,
.mp-glow.glow-necklace-3 .d-acc-neck,
.mp-glow.glow-eyes-3 .d-eye {
  filter: drop-shadow(0 0 3px #ffd23f) drop-shadow(0 0 8px rgba(255, 179, 0, 0.95));
  animation: mp-glow3 2.4s ease-in-out infinite alternate;
}
@keyframes mp-glow3 {
  from { filter: drop-shadow(0 0 3px #ffd23f) drop-shadow(0 0 6px rgba(255, 179, 0, 0.8)); }
  to { filter: drop-shadow(0 0 4px #ffe58a) drop-shadow(0 0 11px rgba(255, 179, 0, 1)); }
}
.mp-glow.glow-great .d-sil {
  filter: drop-shadow(0 0 5px rgba(255, 210, 63, 0.9));
}

/* ======================================================================
 * Island screen ('island')
 * ==================================================================== */

.screen-island .isl {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--bg);
  background:
    radial-gradient(ellipse at 70% 0%, color-mix(in srgb, var(--isl) 16%, transparent), transparent 60%),
    linear-gradient(180deg, color-mix(in srgb, var(--isl) 10%, var(--bg)) 0%, var(--bg) 60%, var(--bg-2) 100%);
}
.isl-bg {
  position: absolute;
  right: -70px;
  bottom: -90px;
  opacity: 0.13;
  pointer-events: none;
}
.isl-top {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 116px;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 32px 0 24px;
}
.isl-home.btn-round {
  width: 92px;
  height: 92px;
  min-width: 92px;
  min-height: 92px;
  background: var(--panel);
  border: 3px solid var(--line);
}
.isl-title {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.isl-title-ico {
  display: inline-flex;
  width: 92px;
  height: 92px;
}
.isl-title h1 {
  font: 700 42px/1.1 var(--font);
  color: var(--ink);
  white-space: nowrap;
}
.isl-flag {
  margin-left: auto;
}
.isl-guide {
  position: absolute;
  left: 0;
  top: 116px;
  bottom: 0;
  width: 280px;
  padding: 10px 18px 14px 22px;
  display: flex;
  flex-direction: column;
}
.isl-guide .guide-column .guide-bubble {
  font-size: 25px;
}
.isl-shelf {
  position: absolute;
  left: 300px;
  right: 32px;
  top: 132px;
  bottom: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 34px;
}
.isl-shelf-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  align-self: center;
  min-width: 560px;
  padding: 0 24px;
}
.isl-row {
  display: flex;
  justify-content: center;
  gap: 34px;
  position: relative;
  z-index: 1;
}
.isl-plank {
  height: 24px;
  margin: -10px 6px 0;
  border-radius: 8px;
  background: linear-gradient(180deg, #d6a46c 0%, #b07a45 60%, #8f5f33 100%);
  box-shadow: 0 8px 14px rgba(90, 60, 30, 0.22), inset 0 3px 0 rgba(255, 255, 255, 0.25);
}
.isl-card {
  position: relative;
  width: 220px;
  height: 240px;
  padding: 12px 12px 16px;
  border: 4px solid var(--line);
  border-top: 12px solid var(--mod, var(--isl));
  border-radius: 30px;
  background: var(--panel);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
.isl-card:active {
  transform: translateY(4px);
  box-shadow: var(--shadow-sm);
}
.isl-card.is-rec {
  border-color: #f0d27a;
  border-top-color: var(--mod, var(--isl));
  box-shadow: 0 0 0 5px rgba(242, 183, 5, 0.25), var(--shadow);
}
.isl-card-ico {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 100px;
  height: 100px;
  font-size: 78px;
  line-height: 1;
}
.isl-card-ico > svg {
  width: 96px;
  height: 96px;
}
.isl-card-ico > * {
  max-width: 100px;
  max-height: 100px;
}
.isl-card-name {
  flex: 1;
  display: flex;
  align-items: center;
  font: 700 26px/1.1 var(--font);
  color: var(--ink);
  text-align: center;
}
.isl-dots {
  flex: none;
  display: flex;
  gap: 8px;
  justify-content: center;
}
.isl-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 3px solid #d2c3a0;
  background: transparent;
}
.isl-dot.is-full {
  border-color: var(--gold-deep);
  background: radial-gradient(circle at 35% 30%, #fff6c4, var(--gold) 55%, var(--gold-deep));
}
.isl-dot.is-ring {
  box-shadow: 0 0 0 2px var(--panel), 0 0 0 5px var(--gold);
}
.isl-card-paw {
  position: absolute;
  right: -22px;
  top: -30px;
  animation: mp-paw 1.8s ease-in-out infinite alternate;
}
.isl-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}
.isl-empty-text {
  font: 700 34px/1.2 var(--font);
  color: var(--ink);
  padding: 18px 34px;
  border-radius: 28px;
  background: var(--panel);
  border: 3px dashed var(--line);
}

/* ======================================================================
 * Daily welcome ('welcome')
 * ==================================================================== */

.screen-welcome .wl {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.wl-sea {
  position: absolute;
  left: 0;
  top: 0;
}
.wl-veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 520px 260px at 50% 0%, rgba(255, 214, 120, 0.45), rgba(255, 214, 120, 0) 70%),
    linear-gradient(180deg, rgba(246, 239, 224, 0.92) 0%, rgba(246, 239, 224, 0.6) 55%, rgba(246, 239, 224, 0.88) 100%);
}
.wl-title {
  position: absolute;
  left: 0;
  right: 0;
  top: 58px;
  text-align: center;
  font: 700 44px/1.1 var(--font);
  color: var(--ink);
}
.wl-cards {
  position: absolute;
  left: 0;
  right: 0;
  top: 168px;
  display: flex;
  justify-content: center;
  gap: 32px;
}
.wl-card {
  position: relative;
  width: 260px;
  height: 270px;
  padding: 16px 14px 18px;
  border: 4px solid var(--line);
  border-radius: 34px;
  background: var(--panel);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  animation: pop-in 0.4s ease-out backwards;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.wl-card:active {
  transform: translateY(4px);
}
.wl-card.is-picked {
  border-color: var(--gold);
  transform: translateY(-10px);
  box-shadow: 0 0 0 7px var(--gold-soft), var(--shadow);
}
.wl-card-ico {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 140px;
  height: 140px;
  font-size: 100px;
  line-height: 1;
}
.wl-card-ico > svg {
  width: 124px;
  height: 124px;
}
.wl-badge {
  position: absolute;
  right: -10px;
  bottom: -4px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid var(--panel);
  box-shadow: var(--shadow-sm);
}
.wl-badge-ring {
  background: var(--panel);
  border: 7px solid var(--gold);
  box-shadow: 0 0 0 3px var(--panel), var(--shadow-sm);
}
.wl-badge-new {
  background: var(--accent);
  color: #fff;
}
.wl-card-title {
  font: 700 32px/1.1 var(--font);
  color: var(--ink);
  text-align: center;
}
.wl-card-sub {
  font: 600 22px/1.15 var(--font);
  color: var(--ink-soft);
  text-align: center;
}
.wl-go.btn {
  position: absolute;
  top: 482px;
  left: 510px;
  width: 260px;
  min-height: 96px;
  padding: 0 20px;
  font-size: 34px;
  border-radius: 28px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, left 0.25s ease;
}
.wl-go .btn-icon svg {
  display: block;
}
.wl-go.is-shown {
  opacity: 1;
  pointer-events: auto;
}
.wl-guide {
  position: absolute;
  left: 26px;
  bottom: 12px;
  right: 260px;
  display: flex;
}
.wl-guide .guide-side {
  flex-direction: row-reverse;
  justify-content: flex-end;
  align-items: flex-end;
}
.wl-guide .guide-side .wl-bubble {
  max-width: 600px;
  margin-bottom: 96px;
  margin-left: 10px;
  font-size: 26px;
  overflow: visible;
}
.wl-guide .wl-bubble::before {
  content: '';
  position: absolute;
  left: -28px;
  bottom: 22px;
  border: 14px solid transparent;
  border-right-color: var(--ink);
}
.wl-guide .wl-bubble::after {
  content: '';
  position: absolute;
  left: -23px;
  bottom: 22px;
  border: 14px solid transparent;
  border-right-color: #fff;
}
.wl-map {
  position: absolute;
  right: 28px;
  bottom: 28px;
  min-width: 170px;
}

/* the whole bubble is the "repeat" target; the speaker icon inside is only a sign */
.mp-tap-repeat {
  cursor: pointer;
}
.mp-tap-repeat .guide-repeat {
  pointer-events: none;
}

/* guide text on these screens: whole words only (beginning reader), never below 22 px */
.mp .guide-text,
.mp-pres .guide-text,
.isl .guide-text,
.wl .guide-text {
  hyphens: manual;
  -webkit-hyphens: manual;
  overflow-wrap: normal;
}
.mp-pres .guide-col .guide-bubble,
.mp-pres .guide-col .guide-bubble.long {
  font-size: 24px;
}

/* reduced motion (parent setting): no drifting, bobbing, twinkling or pulsing */
#stage.reduced-motion .mp-wave,
#stage.reduced-motion .mp-fog-drift,
#stage.reduced-motion .mp-boat,
#stage.reduced-motion .mp-cloth,
#stage.reduced-motion .mp-pennant,
#stage.reduced-motion .mp-twinkle,
#stage.reduced-motion .mp-z,
#stage.reduced-motion .mp-sleepy-breathe,
#stage.reduced-motion .mp-sleepy-nod,
#stage.reduced-motion .mp-sleepy-tip,
#stage.reduced-motion .mp-cave-glow,
#stage.reduced-motion .mp-lantern,
#stage.reduced-motion .mp-label-paw,
#stage.reduced-motion .isl-card-paw,
#stage.reduced-motion .mp-stars i,
#stage.reduced-motion .mp-chest.opening .mp-chest-rays,
#stage.reduced-motion .mp-glow .d-eye,
#stage.reduced-motion .mp-glow .d-s-head,
#stage.reduced-motion .mp-glow .d-s-tail,
#stage.reduced-motion .mp-glow .d-s-wing-l,
#stage.reduced-motion .mp-glow .d-s-wing-r {
  animation: none;
}
#stage.reduced-motion .mp-fog,
#stage.reduced-motion .mp-chest-lid {
  transition-property: opacity;
}
#stage.reduced-motion .mp-fog.lifting {
  transform: none;
}
