/* Match the Friends · a calm flip-to-match game for ages 4 to 7. Same brand kit and feel as Play with Ellie. */
@font-face {
  font-family: "Fredoka";
  src: url("/assets/fonts/fredoka-latin.woff2") format("woff2");
  font-weight: 300 700; font-display: swap;
}

:root {
  --navy: #2E3253;
  --sun: #FDF2C5;
  --coral: #F56F56;
  --lagoon: #0EC0DB;
  --deep: #0293C6;
  --kelp: #8A9A2A;
  --ellie: #D29E76;
  --spots: #716166;
  --blush: #FBB5A8;
  --glass: #8FD3CB;
}

html, body {
  margin: 0; height: 100%; overflow: hidden;
  overscroll-behavior: none;
  background: #49C7E4;
}
body {
  position: fixed; inset: 0;
  font-family: "Fredoka", ui-rounded, system-ui, sans-serif;
  color: var(--navy);
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
img { -webkit-user-drag: none; }

/* calm, sunlit water (the same sea as Play with Ellie), with warm sand glowing at the bottom */
.sea {
  --t: calc(max(12px, env(safe-area-inset-top)) + 54px);
  --b: calc(max(10px, env(safe-area-inset-bottom)) + 66px);
  --l: calc(max(10px, env(safe-area-inset-left)) + 1vw);
  --r: calc(max(10px, env(safe-area-inset-right)) + 1vw);
  position: absolute; inset: 0; overflow: hidden;
  background:
    radial-gradient(120% 60% at 50% -10%, rgba(253, 242, 197, 0.55), transparent 60%),
    radial-gradient(90% 22% at 50% 112%, rgba(253, 242, 197, 0.7), transparent 70%),
    linear-gradient(180deg, #A4E2F1 0%, #49C7E4 26%, #16B2DA 52%, #0BA0CE 76%, #2FB0D2 100%);
  cursor: pointer;
}

/* sun rays from the surface */
.sea__light { position: absolute; inset: 0; pointer-events: none; }
.sea__light i {
  position: absolute; top: -6%; left: 50%;
  width: 11vw; min-width: 60px; height: 115%;
  transform-origin: 50% 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0) 72%);
  filter: blur(14px); opacity: 0.28;
  animation: ray 14s ease-in-out infinite alternate;
}
.sea__light i:nth-child(1) { transform: translateX(-50%) rotate(-34deg); animation-delay: -3s; }
.sea__light i:nth-child(2) { transform: translateX(-50%) rotate(-16deg); width: 7vw; animation-delay: -8s; }
.sea__light i:nth-child(3) { transform: translateX(-50%) rotate(2deg); width: 14vw; animation-delay: -1s; }
.sea__light i:nth-child(4) { transform: translateX(-50%) rotate(19deg); width: 8vw; animation-delay: -11s; }
.sea__light i:nth-child(5) { transform: translateX(-50%) rotate(35deg); animation-delay: -6s; }
@keyframes ray { from { opacity: 0.16; } to { opacity: 0.42; } }
.sea__light { transition: opacity 2.6s ease; }

/* the places (the levels): the kelp forest and the night sea fade in over the sunny shallows */
.scene { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 2.6s ease; }
.sea.is-instant .scene, .sea.is-instant .kelp, .sea.is-instant .sea__light { transition: none !important; }
.scene--kelp {
  background:
    radial-gradient(110% 55% at 50% -12%, rgba(253, 242, 197, 0.5), transparent 62%),
    radial-gradient(90% 22% at 50% 112%, rgba(253, 242, 197, 0.45), transparent 70%),
    linear-gradient(180deg, #9EDCCF 0%, #4BBDB4 26%, #1E9FA6 54%, #13879A 78%, #2C99A5 100%);
}
.scene--night {
  background:
    radial-gradient(90% 20% at 50% 112%, rgba(120, 190, 210, 0.28), transparent 70%),
    linear-gradient(180deg, #2C5C8C 0%, #21497A 30%, #1A3D6A 62%, #18375F 84%, #1F4870 100%);
}
.sea[data-place="kelp"] .scene--kelp, .sea[data-place="night"] .scene--night { opacity: 1; }
.sea[data-place="night"] .sea__light { opacity: 0.32; }

/* giant kelp at the sides; it grows up from the sand when Ellie arrives */
.kelp {
  position: absolute; bottom: -1%; width: clamp(84px, 17vmax, 230px); height: 96%;
  transform: scaleY(0.18); transform-origin: 50% 100%;
  transition: transform 3.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.kelp svg { width: 100%; height: 100%; display: block; overflow: visible; }
.kelp--l { left: -3%; }
.kelp--r { right: -3%; }
.kelp--r svg { transform: scaleX(-1); }
.kelp--far { width: clamp(60px, 11vmax, 150px); height: 74%; opacity: 0.32; }
.kelp--f1 { left: 24%; }
.kelp--f2 { right: 20%; }
.kelp--f2 svg { transform: scaleX(-1); }
.sea[data-place="kelp"] .kelp { transform: scaleY(1); }
.kf__sway { transform-box: fill-box; transform-origin: 50% 100%; animation: kelpsway 11s ease-in-out infinite alternate; }
.kelp--r .kf__sway { animation-duration: 13s; animation-delay: -5s; }
.kelp--far .kf__sway { animation-duration: 15s; animation-delay: -8s; }
.sea:not([data-place="kelp"]) .kf__sway { animation-play-state: paused; }
@keyframes kelpsway { from { transform: rotate(-2deg); } to { transform: rotate(2deg); } }
.kf__stipe { fill: none; stroke: #7A6A24; stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; }
.kf__leaf { fill: #A08A2E; fill-opacity: 0.92; }
.kf__leaf--b { fill: #8C7A26; }
.kf__bulb { fill: #C2A848; }

/* the night sea: a soft moon glow, and tiny specks of glowing plankton fading slowly in and out (never flashing) */
.moon {
  position: absolute; top: -22vmin; right: 4%; width: 54vmin; height: 54vmin; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(253, 242, 197, 0.5), rgba(253, 242, 197, 0.14) 45%, rgba(253, 242, 197, 0) 100%);
}
.speck {
  position: absolute; border-radius: 50%;
  background: #B8F7EA;
  box-shadow: 0 0 6px 2px rgba(150, 240, 225, 0.55);
  opacity: 0;
  animation: plankton 9s ease-in-out infinite;
}
.sea:not([data-place="night"]) .speck { animation-play-state: paused; }
@keyframes plankton {
  0%, 100% { opacity: 0; transform: translateY(0); }
  50% { opacity: 0.75; transform: translateY(-10px); }
}

/* the row of places at the top: reached ones in color, the rest faded (no numbers, no words) */
.places {
  position: absolute; top: max(12px, env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-right));
  display: flex; align-items: center; gap: 7px;
  box-sizing: border-box; height: 46px; padding: 3px 7px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  background: rgba(255, 252, 240, 0.78);
  z-index: 6;
}
.place {
  position: relative; width: 34px; height: 34px;
  margin: 0; padding: 0; border: 0; background: none; border-radius: 50%;
  -webkit-appearance: none; appearance: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.place > * { pointer-events: none; }
.place::after { content: ""; position: absolute; inset: -6px -4px; border-radius: 50%; }
.place:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; }
.place__disc {
  position: absolute; inset: 0; border-radius: 50%; display: grid; place-items: center;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.85);
  filter: grayscale(1) brightness(1.18); opacity: 0.32;
  transition: filter 1.6s ease, opacity 1.6s ease, box-shadow 0.8s ease;
}
.place.is-open .place__disc { filter: none; opacity: 1; }
.place.is-here .place__disc { box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.85), 0 0 0 2.5px #fff, 0 0 0 5px rgba(2, 147, 198, 0.7); }
.place__disc svg { width: 72%; height: 72%; display: block; overflow: visible; }
.place--shallows .place__disc { background: radial-gradient(circle at 36% 30%, #E8FAFD, #9CE2F0 60%, #6CCFE6); }
.place--kelp .place__disc { background: radial-gradient(circle at 36% 30%, #E2F4D8, #9FD3B0 60%, #5DB39A); }
.place--night .place__disc { background: radial-gradient(circle at 36% 30%, #5D82BC, #2E528A 60%, #1F3D6C); }
.pi-sun { fill: #FFD66E; }
.pi-wave { fill: none; stroke: #0293C6; stroke-width: 2.2; stroke-linecap: round; }
.pi-stem { fill: none; stroke: #7A6A24; stroke-width: 1.7; stroke-linecap: round; }
.pi-leaf { fill: #A08A2E; }
.pi-bulb { fill: #C9AE4E; }
.pi-moon { fill: #FDF2C5; }
.pi-star { fill: #FDF2C5; }

/* the board: one box between the controls and the caption; memory.js lays the cards out inside it */
.board, .center {
  position: absolute; top: var(--t); bottom: var(--b); left: var(--l); right: var(--r);
}
.board { pointer-events: none; z-index: 2; }
.board > * { pointer-events: auto; }

.layer { position: absolute; inset: 0; pointer-events: none; }
.layer--fx { z-index: 5; }
.layer--fx > * { pointer-events: none; }

/* a card: one big, forgiving button that turns over slowly */
.card {
  --rad: calc(var(--s, 100px) * 0.16);
  position: absolute; left: 0; top: 0;
  margin: 0; padding: 0; border: 0; background: none;
  -webkit-appearance: none; appearance: none;
  border-radius: var(--rad);
  perspective: 900px;
  cursor: pointer; z-index: 1;
  -webkit-tap-highlight-color: transparent;
  transition: transform 1.4s cubic-bezier(0.3, 0, 0.2, 1);
}
.card > * { pointer-events: none; }
.card:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }
.card.hint { z-index: 2; }
/* the soft glow behind a matched pair */
.card::before {
  content: ""; position: absolute; inset: -5px; border-radius: calc(var(--rad) + 5px);
  background: rgba(253, 242, 197, 0.55);
  box-shadow: 0 0 22px 8px rgba(253, 242, 197, 0.75);
  opacity: 0; transition: opacity 1.2s ease;
  pointer-events: none;
}
.card.is-matched::before { opacity: 1; }
.card.is-lift { transform: translateY(-8px) scale(1.03); }

.card__inner {
  position: absolute; inset: 0; display: block;
  transform-style: preserve-3d; -webkit-transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.card.is-up .card__inner { transform: rotateY(180deg); }
.card__side {
  position: absolute; inset: 0; display: block; overflow: hidden;
  box-sizing: border-box;
  border-radius: var(--rad);
  border: 3px solid rgba(255, 255, 255, 0.92);
  -webkit-backface-visibility: hidden; backface-visibility: hidden;
  box-shadow: 0 6px 14px rgba(2, 80, 120, 0.22);
}

/* the back: soft sea glass with a few bubbles, the same on every card */
.card__back {
  background:
    radial-gradient(70% 55% at 22% 12%, rgba(255, 255, 255, 0.4), transparent 70%),
    radial-gradient(circle, rgba(255, 255, 255, 0.2) 1.2px, transparent 2px) 0 0 / 13px 13px,
    linear-gradient(160deg, #B2E6DA 0%, #8BD2C9 52%, #6CC0BF 100%);
  box-shadow: 0 6px 14px rgba(2, 80, 120, 0.22), inset 0 0 0 5px rgba(255, 255, 255, 0.16);
}
.card__back svg { position: absolute; left: 14%; top: 14%; width: 72%; height: 72%; display: block; overflow: visible; }
.bub { fill: #fff; fill-opacity: 0.16; stroke: #fff; stroke-opacity: 0.85; stroke-width: 2.2; }
.bub__shine { fill: none; stroke: #fff; stroke-opacity: 0.9; stroke-width: 2.4; stroke-linecap: round; }
.sea[data-place="kelp"] .card__back {
  background:
    radial-gradient(70% 55% at 22% 12%, rgba(255, 255, 255, 0.38), transparent 70%),
    radial-gradient(circle, rgba(255, 255, 255, 0.18) 1.2px, transparent 2px) 0 0 / 13px 13px,
    linear-gradient(160deg, #CFE3A0 0%, #A9C870 52%, #86AE52 100%);
}
.sea[data-place="night"] .card__back {
  background:
    radial-gradient(70% 55% at 22% 12%, rgba(255, 255, 255, 0.2), transparent 70%),
    linear-gradient(160deg, #5677B0 0%, #36598F 52%, #284878 100%);
}
.kb__stem { fill: none; stroke: #fff; stroke-opacity: 0.88; stroke-width: 2.6; stroke-linecap: round; }
.kb__leaf { fill: #fff; fill-opacity: 0.2; stroke: #fff; stroke-opacity: 0.88; stroke-width: 2.1; stroke-linejoin: round; }
.nb__moon { fill: #FDF2C5; fill-opacity: 0.95; }
.nb__star { fill: #FDF2C5; fill-opacity: 0.9; }
.nb__dot { fill: #FDF2C5; fill-opacity: 0.7; }

/* the face: one sea friend on a soft colored disc */
.card__face {
  transform: rotateY(180deg);
  background: linear-gradient(170deg, #FFFDF5 0%, #FFF8E6 100%);
}
.card__disc {
  position: absolute; left: 50%; top: 50%;
  width: calc(var(--s, 100px) * 0.8); height: calc(var(--s, 100px) * 0.8);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle at 38% 34%, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 60%), var(--disc, #C9EEF5);
}
.card__art { position: absolute; left: 8%; right: 8%; top: 15%; bottom: 15%; display: block; }
.card__art img, .card__art svg {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block;
  object-fit: contain;
  filter: drop-shadow(0 3px 3px rgba(46, 50, 83, 0.2));
}
.card--wide .card__art { left: 5%; right: 5%; }
/* long friends (moray, horn shark) lie on a gentle slant so they can be bigger */
.card--long .card__art { left: -2%; right: -2%; top: 2%; bottom: 2%; transform: rotate(-24deg); }

/* Ellie gliding by at the end of a round */
.glider { position: absolute; left: 0; top: 0; }
.glider svg { width: 100%; height: 100%; display: block; overflow: visible; filter: drop-shadow(0 16px 12px rgba(2, 80, 120, 0.2)); }
.glider .ce-tail { transform-box: fill-box; transform-origin: 0% 50%; animation: wag 1.8s ease-in-out infinite alternate; }
@keyframes wag { from { transform: rotate(-5deg); } to { transform: rotate(5deg); } }
.glider--art img { width: 100%; height: 100%; display: block; filter: drop-shadow(0 12px 10px rgba(2, 80, 120, 0.2)); }
/* "Good job!": big, soft words with sea stars settled around them (no flashing, no bounce) */
.goodjob { position: absolute; left: 0; top: 0; transform: translate(-50%, -50%); }
.goodjob__glow {
  position: absolute; left: 50%; top: 50%; width: 170%; height: 300%;
  transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 252, 240, 0.95), rgba(255, 252, 240, 0.82) 50%, rgba(255, 252, 240, 0));
}
.goodjob__words {
  position: relative; display: block; white-space: nowrap;
  font: 600 clamp(2.9rem, 15vw, 5.8rem)/1 "Fredoka", ui-rounded, system-ui, sans-serif;
  color: var(--deep);
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.9), 0 6px 18px rgba(2, 147, 198, 0.25);
  letter-spacing: 0.01em;
}
.goodjob__star { position: absolute; left: 0; top: 0; display: block; }
.goodjob__star img { width: 100%; height: 100%; display: block; filter: drop-shadow(0 4px 4px rgba(2, 80, 120, 0.22)); }
.sea[data-place="night"] .goodjob__words { color: #2E528A; }

/* soft rings when a new place lights up */
.ring { position: absolute; left: 0; top: 0; border-radius: 50%; border: 3px solid rgba(253, 242, 197, 0.95); box-shadow: 0 0 10px rgba(253, 242, 197, 0.6); }

/* tap ripples + bubbles */
.ripple {
  position: absolute; left: 0; top: 0; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.35);
}
.fxb {
  position: absolute; left: 0; top: 0; border-radius: 50%;
  background: radial-gradient(circle at 30% 28%, rgba(255, 255, 255, 0.95) 0 10%, rgba(255, 255, 255, 0.32) 14% 40%, rgba(255, 255, 255, 0.08) 65%, rgba(255, 255, 255, 0.04));
  border: 1.5px solid rgba(255, 255, 255, 0.8);
}
/* the bubble heart: soft blush bubbles, so the heart reads even over a board full of cards */
.fxb--glow {
  background: radial-gradient(circle at 30% 28%, rgba(255, 255, 255, 0.95) 0 12%, rgba(251, 181, 168, 0.6) 20% 62%, rgba(245, 111, 86, 0.3));
  border: 2px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 10px 3px rgba(251, 181, 168, 0.55);
}

/* "play again": one big round bubble in the middle, no words */
.center { display: grid; place-items: center; pointer-events: none; z-index: 7; }
.next {
  position: relative; pointer-events: auto;
  width: clamp(96px, 24vmin, 150px); height: clamp(96px, 24vmin, 150px);
  margin: 0; padding: 0;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.95);
  background: radial-gradient(circle at 32% 28%, #FFFFFF 0 8%, #F4FCFE 16% 34%, #DDF5FA 62%, #B8E9F4);
  box-shadow: 0 0 0 10px rgba(255, 255, 255, 0.28), 0 0 44px 20px rgba(14, 192, 219, 0.32), 0 10px 26px rgba(2, 80, 120, 0.28), inset 0 -10px 20px rgba(2, 147, 198, 0.16);
  -webkit-appearance: none; appearance: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  animation: breathe 2.6s ease-in-out infinite alternate;
}
.next[hidden] { display: none; }
.next svg { width: 54%; height: 54%; display: block; fill: none; stroke: var(--deep); stroke-width: 4.2; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.next .next__low { stroke: var(--lagoon); stroke-width: 3.6; }
.next::after {
  content: ""; position: absolute; inset: -14px; border-radius: 50%;
  border: 4px solid rgba(253, 242, 197, 0.95);
  animation: hint 2.6s ease-out infinite;
  pointer-events: none;
}
.next:focus-visible { outline: 3px solid var(--navy); outline-offset: 6px; }
/* after a level-up, the big bubble shows the new place's picture */
.next__place { width: 62%; height: 62%; border-radius: 50%; display: grid; place-items: center; pointer-events: none; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.85); }
.next__place.place--shallows { background: radial-gradient(circle at 36% 30%, #E8FAFD, #9CE2F0 60%, #6CCFE6); }
.next__place.place--kelp { background: radial-gradient(circle at 36% 30%, #E2F4D8, #9FD3B0 60%, #5DB39A); }
.next__place.place--night { background: radial-gradient(circle at 36% 30%, #5D82BC, #2E528A 60%, #1F3D6C); }
.next .next__place svg { width: 74%; height: 74%; stroke-width: 0; }
.next .pi-wave { stroke: #0293C6; stroke-width: 2.2; }
.next .pi-stem { stroke: #7A6A24; stroke-width: 1.7; }
@keyframes breathe { from { transform: scale(1); } to { transform: scale(1.06); } }

/* "tap me" without words: a soft glowing ring */
.card.hint::after {
  content: ""; position: absolute; inset: -7px; border-radius: calc(var(--rad) + 7px);
  border: 4px solid rgba(253, 242, 197, 0.95);
  animation: hint 2.2s ease-out infinite;
  pointer-events: none;
}
@keyframes hint { 0% { transform: scale(0.92); opacity: 1; } 100% { transform: scale(1.12); opacity: 0; } }

/* optional grown-up caption: one true fact at a time */
.caption {
  position: absolute; left: 50%; bottom: max(10px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  margin: 0; box-sizing: border-box;
  width: max-content; max-width: min(92vw, 640px);
  padding: 8px 16px; border-radius: 18px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  background: rgba(255, 252, 240, 0.84);
  font: 500 clamp(0.82rem, 2.4vw, 1rem)/1.3 "Fredoka", system-ui, sans-serif;
  text-align: center;
  z-index: 6; pointer-events: none;
  transition: opacity 0.35s ease;
}
.caption.is-fading { opacity: 0; }

/* grown-up controls (same as Play with Ellie; each hit area reaches 64px) */
.controls {
  position: absolute; left: max(12px, env(safe-area-inset-left)); top: max(12px, env(safe-area-inset-top));
  display: flex; gap: 18px; z-index: 6;
}
.ctl {
  position: relative;
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px; padding: 0 14px; border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  background: rgba(255, 252, 240, 0.78);
  color: var(--navy); text-decoration: none;
  font: 500 0.92rem/1 "Fredoka", system-ui, sans-serif;
  cursor: pointer;
  box-sizing: border-box;
}
.ctl::after { content: ""; position: absolute; inset: -9px; border-radius: 50%; }
.ctl:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
.ctl--round { width: 46px; height: 46px; padding: 0; justify-content: center; }
.ctl--round svg { width: 24px; height: 24px; fill: none; stroke: var(--navy); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.ctl--pill { box-sizing: border-box; height: 46px; padding: 0 16px 0 11px; gap: 7px; font-size: 1rem; } /* "Games": the way to every game, labeled so grown-ups find it */
.ctl--pill svg { width: 22px; height: 22px; fill: none; stroke: var(--navy); stroke-width: 2.4; }
.ctl--round .spk { fill: var(--navy); }
.ctl--round .off { display: none; }
.ctl[aria-pressed="false"] .wave { display: none; }
.ctl[aria-pressed="false"] .off { display: inline; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (hover: hover) {
  .card:hover .card__back { filter: brightness(1.05); }
}
@media (max-width: 379px) {
  .controls { gap: 12px; }
  .ctl--pill { padding: 0 12px 0 9px; }
  .places { gap: 5px; padding: 3px 5px; }
  .place { width: 30px; height: 30px; }
}
/* short landscape phones: a one-line caption, so less room is held for it */
@media (max-height: 520px) and (orientation: landscape) {
  .sea { --b: calc(max(8px, env(safe-area-inset-bottom)) + 40px); }
  .caption { padding: 5px 14px; font-size: 0.82rem; }
}

@media (prefers-reduced-motion: reduce) {
  .sea__light i, .glider .ce-tail, .kf__sway { animation: none !important; }
  .kelp, .sea[data-place="kelp"] .kelp { transform: none; transition: none; }
  .speck { animation: none; opacity: 0.45; }
  .sea:not([data-place="night"]) .speck { opacity: 0; }
  /* the cards crossfade instead of turning over */
  .card, .card.is-lift { transform: none !important; transition: none; }
  .card__inner, .card.is-up .card__inner { transform: none !important; transition: none; }
  .card__face { transform: none; opacity: 0; transition: opacity 0.6s ease; }
  .card__back { transition: opacity 0.6s ease; }
  .card.is-up .card__face { opacity: 1; }
  .card.is-up .card__back { opacity: 0; }
  .card.hint::after, .next::after { animation: hintfade 2.2s ease-in-out infinite alternate; }
  .next { animation: none; }
  .caption { transition: none; }
}
@keyframes hintfade { from { opacity: 0.25; } to { opacity: 1; } }
