/* I'm the Farmer. The panel's size is game-layout.css's (data-ideal); inside it the farm takes the
   whole panel: a row of counters across the top, the field in the middle, the harvest button and
   the tool bar along the bottom. im-the-farmer.js sizes and places the field.

   No `inset` and no flex `gap` in this file: iOS before 14.5 drops `inset` and ignores `gap` on a
   flex box, so the spacing between flex children is margins. */

.game-root[data-game="im-the-farmer"] {
  position: relative; display: block; padding: 0; overflow: hidden; text-align: left;
  background: linear-gradient(180deg, #a9cc86 0%, #86b465 45%, #6a9c4d 100%);
  touch-action: manipulation;
  -webkit-user-select: none; user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.game-root[data-game="im-the-farmer"].fm-s-spring { background: linear-gradient(180deg, #b0d08a 0%, #8cb968 45%, #6fa050 100%); }
.game-root[data-game="im-the-farmer"].fm-s-summer { background: linear-gradient(180deg, #a2c883 0%, #7fad60 45%, #619447 100%); }
.game-root[data-game="im-the-farmer"].fm-s-autumn { background: linear-gradient(180deg, #b0ca85 0%, #8db263 45%, #70984b 100%); }
.game-root[data-game="im-the-farmer"].fm-s-winter { background: linear-gradient(180deg, #adc890 0%, #8aaf70 45%, #6c9656 100%); }

.fm { position: absolute; top: 0; right: 0; bottom: 0; left: 0; overflow: hidden; color: #3a2f1c; }
/* The sky, hedge and farm, as wide as the panel unless the farm moves sideways (the script sets its width). */
.fm-pane { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.fm-pane.is-pan { touch-action: pan-y; }
.fm-pane.is-grab, .fm-pane.is-grab .fm-field { cursor: grab; }
.fm-pane.is-dragging, .fm-pane.is-dragging * { cursor: grabbing; }
/* The sky and far hills, its foot on the horizon, fading into the meadow below it. */
.fm-back {
  position: absolute; top: 0; left: 0; right: 0; z-index: 0; height: calc(var(--fm-horizon, 35%) + 3px); pointer-events: none;
  background-repeat: no-repeat; background-size: cover; background-position: 50% 100%;
}
/* im-the-farmer.js takes this height (the horizon + 3px) when it places the hills' tint. */
.fm-back-tint { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-repeat: no-repeat; }
.fm-back::before {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; height: 22px;
  background: linear-gradient(rgba(35, 60, 25, 0), rgba(35, 60, 25, .2));
}
.fm-back::after { content: ''; position: absolute; left: 0; right: 0; top: 100%; z-index: 1; height: 56px; }
.fm[data-sky="sun"] .fm-back::after { background: linear-gradient(rgba(203, 226, 199, 1), rgba(203, 226, 199, 0)); }
.fm[data-sky="rain"] .fm-back::after { background: linear-gradient(rgba(180, 200, 196, 1), rgba(180, 200, 196, 0)); }
.fm[data-sky="storm"] .fm-back::after { background: linear-gradient(rgba(157, 187, 194, 1), rgba(157, 187, 194, 0)); }
.fm[data-sky="frost"] .fm-back::after { background: linear-gradient(rgba(220, 235, 246, 1), rgba(220, 235, 246, 0)); }
.fm[data-sky="rainbow"] .fm-back::after { background: linear-gradient(rgba(210, 228, 207, 1), rgba(210, 228, 207, 0)); }
/* The bushes along the hills' foot: over the sky, under the meadow. */
.fm-hedge {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none;
  -webkit-filter: saturate(.75); filter: saturate(.75);
}
.fm-bush {
  position: absolute;
  -webkit-filter: drop-shadow(0 1px 2px rgba(30, 50, 20, .35)); filter: drop-shadow(0 1px 2px rgba(30, 50, 20, .35));
}
.fm-bush img { display: block; width: 100%; height: 100%; max-width: none; -webkit-user-drag: none; }
.fm-bush-shade {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(rgba(25, 45, 20, 0) 40%, rgba(25, 45, 20, .38));
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
}
.fm[data-sky="rain"] .fm-hedge { -webkit-filter: brightness(.9) saturate(.68); filter: brightness(.9) saturate(.68); }
.fm[data-sky="storm"] .fm-hedge { -webkit-filter: brightness(.75) saturate(.64); filter: brightness(.75) saturate(.64); }
.fm[data-sky="frost"] .fm-hedge { -webkit-filter: saturate(.52); filter: saturate(.52); }
.fm-bush-snow {
  display: none; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(rgba(250, 252, 255, .95), rgba(250, 252, 255, .9) 18%, rgba(250, 252, 255, 0) 40%);
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
}
.fm-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
/* Seasons: the same pictures in each, told apart by colour, and by snow in winter. The beds,
   crops and fence keep their colours. */
.fm-s-spring .fm-back-tint { -webkit-filter: brightness(1.05) hue-rotate(-6deg); filter: brightness(1.05) hue-rotate(-6deg); }
.fm-s-spring .fm-bush img { -webkit-filter: brightness(1.08) hue-rotate(-10deg); filter: brightness(1.08) hue-rotate(-10deg); }
.fm-s-spring .fm-lawn { -webkit-filter: brightness(1) saturate(1.05) hue-rotate(-10deg); filter: brightness(1) saturate(1.05) hue-rotate(-10deg); }
.fm-s-summer .fm-back-tint { -webkit-filter: saturate(1.15); filter: saturate(1.15); }
.fm-s-summer .fm-bush img { -webkit-filter: saturate(1.2) brightness(.93); filter: saturate(1.2) brightness(.93); }
.fm-s-summer .fm-lawn { -webkit-filter: brightness(.86) saturate(1.15); filter: brightness(.86) saturate(1.15); }
.fm-s-autumn .fm-back-tint, .fm-s-autumn .fm-bush img { -webkit-filter: url(#fm-autumn); filter: url(#fm-autumn); }
.fm-s-autumn .fm-lawn { -webkit-filter: url(#fm-autumn-dim); filter: url(#fm-autumn-dim); }
.fm-s-winter .fm-back-tint { -webkit-filter: saturate(.5) brightness(1.05); filter: saturate(.5) brightness(1.05); }
.fm-s-winter .fm-bush img { -webkit-filter: saturate(.45) brightness(.92); filter: saturate(.45) brightness(.92); }
.fm-s-winter .fm-lawn { -webkit-filter: saturate(.4) brightness(1.05); filter: saturate(.4) brightness(1.05); }
.fm-s-winter .fm-bush-snow { display: block; }
/* The land still to come: toned down to the meadow round it, coloured with the season. */
.fm-cell-locked { -webkit-filter: brightness(.82) saturate(.75); filter: brightness(.82) saturate(.75); }
.fm-s-spring .fm-cell-locked .fm-soil { -webkit-filter: brightness(1.1) hue-rotate(-10deg); filter: brightness(1.1) hue-rotate(-10deg); }
.fm-s-summer .fm-cell-locked .fm-soil { -webkit-filter: brightness(.95) saturate(1.15); filter: brightness(.95) saturate(1.15); }
.fm-s-autumn .fm-cell-locked .fm-soil { -webkit-filter: url(#fm-autumn); filter: url(#fm-autumn); }
.fm-s-winter .fm-cell-locked { -webkit-filter: brightness(.95) saturate(.75); filter: brightness(.95) saturate(.75); }
.fm-s-winter .fm-cell-locked .fm-soil { -webkit-filter: saturate(.4); filter: saturate(.4); }
.fm-lot-snow {
  display: none; position: absolute; top: -3%; left: -1.5%; width: 103%; height: 106%; background: rgba(246, 249, 252, .7);
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
}
.fm-s-winter .fm-lot-snow { display: block; }
.fm-lawn-snow { display: none; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(246, 249, 252, .66); }
.fm-s-winter .fm-lawn-snow { display: block; }
/* The light over the field: a wash per weather, under the falling rain or snow. */
.fm::before {
  content: ''; position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 19; pointer-events: none;
  transition: background .8s ease;
}
.fm[data-sky="sun"]::before { background: radial-gradient(120% 70% at 85% -10%, rgba(255, 244, 196, .22), rgba(255, 244, 196, 0) 60%); }
.fm[data-sky="rain"]::before { background: rgba(70, 92, 120, .08); }
.fm[data-sky="storm"]::before { background: rgba(35, 45, 70, .18); }
.fm[data-sky="frost"]::before { background: rgba(214, 232, 255, .14); }
.fm[data-sky="rainbow"]::before { background: radial-gradient(120% 70% at 80% 0%, rgba(255, 250, 220, .4), rgba(255, 250, 220, 0) 60%); }
.fm::after {
  content: ''; position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 19; pointer-events: none;
  background: radial-gradient(140% 110% at 78% 18%, rgba(30, 40, 20, 0) 40%, rgba(30, 40, 20, .3) 100%);
}

/* --- the field ---------------------------------------------------------------------------------- */
.fm-scene { position: absolute; top: 60px; right: 0; bottom: 140px; left: 0; }
.fm-field { position: absolute; touch-action: none; cursor: pointer; }
/* Tipped back by im-the-farmer.js, which also works out where each bed lands on screen. */
.fm-plane { position: absolute; left: 0; }
.fm-beds { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.fm-lawn {
  position: absolute; background-repeat: repeat; pointer-events: none; -webkit-filter: brightness(.9); filter: brightness(.9);
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
}
.fm-lawn-haze { position: absolute; top: 0; left: 0; right: 0; }
.fm-hedge-shade { position: absolute; top: 0; left: 0; right: 0; background: linear-gradient(rgba(30, 50, 20, .38), rgba(30, 50, 20, 0)); }
.fm[data-sky="sun"] .fm-lawn-haze { background: linear-gradient(rgba(203, 226, 199, 0), rgba(203, 226, 199, .3) 18%, rgba(203, 226, 199, 0)); }
.fm[data-sky="rain"] .fm-lawn-haze { background: linear-gradient(rgba(180, 200, 196, 0), rgba(180, 200, 196, .3) 18%, rgba(180, 200, 196, 0)); }
.fm[data-sky="storm"] .fm-lawn-haze { background: linear-gradient(rgba(157, 187, 194, 0), rgba(157, 187, 194, .3) 18%, rgba(157, 187, 194, 0)); }
.fm[data-sky="frost"] .fm-lawn-haze { background: linear-gradient(rgba(220, 235, 246, 0), rgba(220, 235, 246, .3) 18%, rgba(220, 235, 246, 0)); }
.fm[data-sky="rainbow"] .fm-lawn-haze { background: linear-gradient(rgba(210, 228, 207, 0), rgba(210, 228, 207, .3) 18%, rgba(210, 228, 207, 0)); }
/* Grass and flowers stand under the crops (z-index 10 and up). */
.fm-meadow { position: absolute; top: 0; left: 0; z-index: 5; pointer-events: none; }
/* .fm-meadow has no width, so the sitewide img max-width: 100% would squeeze these to nothing. */
.fm-deco { position: absolute; max-width: none; transform-origin: 50% 100%; -webkit-user-drag: none; }
/* The whole field under the cells, in the ridges' own colour, so nothing shows between them. */
.fm-ground { position: absolute; border-radius: 12px; background: #a17b4d; box-shadow: 0 6px 14px rgba(60, 90, 20, .22); }
.fm-fence { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; }
.fm-fence-piece { position: absolute; transform-origin: 50% 100%; -webkit-user-drag: none; }
.fm-fence-side { z-index: 4; }
/* The earth round a post: toned to the ground and its lower edge fading into the grass. */
.fm-post-soil {
  -webkit-filter: saturate(.62) brightness(.86); filter: saturate(.62) brightness(.86);
  -webkit-mask-image: linear-gradient(#000 55%, rgba(0, 0, 0, 0)); mask-image: linear-gradient(#000 55%, rgba(0, 0, 0, 0));
}
.fm-fence-snow { display: none; -webkit-mask-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; }
.fm-s-winter .fm-fence-snow { display: block; }
.fm-fence-snow.is-post { background: linear-gradient(rgba(250, 252, 255, .95), rgba(250, 252, 255, .9) 9%, rgba(250, 252, 255, 0) 17%); }
.fm-fence-snow.is-rail { background: linear-gradient(rgba(250, 252, 255, .95), rgba(250, 252, 255, .9) 9%, rgba(250, 252, 255, 0) 24%); }
.fm-fence-snow.is-soil { background: linear-gradient(rgba(250, 252, 255, .95), rgba(250, 252, 255, .85) 35%, rgba(250, 252, 255, 0) 65%); }
.fm-critters { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; }
.fm-critter { position: absolute; left: 0; top: 0; max-width: none; transform-origin: 0 0; -webkit-user-drag: none; }
.fm-plot, .fm-cell { position: absolute; }
.fm-lot-pin {
  position: absolute;
  display: flex; align-items: center; justify-content: center;
  width: calc(var(--pw, 100px) * .2); height: calc(var(--pw, 100px) * .2); border-radius: 50%;
  background: rgba(255, 250, 240, .92); color: #7a6d55; box-shadow: 0 2px 4px rgba(40, 60, 20, .25); pointer-events: none;
}
.fm-lot-pin .fm-svg { width: 58%; height: 58%; }
.fm-sign { position: absolute; padding: 0; border: 0; background: none; cursor: pointer; font: inherit; transform-origin: 50% 100%; }
.fm-sign-pic { display: block; width: 100%; pointer-events: none; -webkit-user-drag: none; }
/* Over the board, which is the top 62% of the sign picture. */
.fm-sign-text {
  position: absolute; left: 8%; right: 8%; top: 3%; height: 57%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #6b3f16; line-height: 1.1; white-space: nowrap; pointer-events: none;
}
.fm-sign-text b { font-size: clamp(10px, calc(var(--pw, 100px) * .1), 19px); font-weight: 800; }
.fm-sign-sub { display: flex; align-items: center; margin-top: 2px; font-size: clamp(9px, calc(var(--pw, 100px) * .075), 14px); font-weight: 800; }
.fm-sign-ic { flex: none; width: 1.15em; height: 1.15em; margin-right: 3px; object-fit: contain; }
.fm-namesign .fm-sign-text { white-space: normal; text-align: center; }
/* Over the board, which is the top 42% of the sign-tall picture. */
.fm-namesign.is-tall .fm-sign-text { top: 2%; height: 38%; }
.fm-namesign .fm-sign-text b { display: block; max-width: 100%; line-height: 1.05; }
.fm-namesign.is-break .fm-sign-text b { word-break: break-all; }
.fm-namesign.is-blank .fm-sign-text b { font-weight: 700; opacity: .8; }
/* The brand: its mark, its words and its picture in a row across the board. */
.fm-namesign.is-brand .fm-sign-text, .fm-bp-board { flex-direction: row; }
.fm-namesign.is-brand .fm-sign-text { left: 6%; right: 6%; }
.fm-bm { display: block; flex: none; }
.fm-bm-line { fill: none; stroke: currentColor; stroke-width: 8; stroke-linecap: round; stroke-linejoin: round; }
.fm-bm-line.is-thin { stroke-width: 5.5; }
.fm-bm-line.is-dot { stroke-width: 6; }
.fm-bm-fill { fill: currentColor; stroke: currentColor; stroke-width: 3; stroke-linejoin: round; }
.fm-bm-letter { fill: currentColor; font-weight: 800; font-family: inherit; }
.fm-bb-words { display: flex; flex-direction: column; align-items: center; flex: 0 1 auto; min-width: 0; margin: 0 3%; text-align: center; line-height: 1.05; }
.fm-sign-text .fm-bb-words b { font-weight: 800; }
.fm-bb-words small { display: block; margin-top: .3em; font-weight: 700; opacity: .75; }
.fm-bb-pic { display: block; flex: none; object-fit: contain; pointer-events: none; -webkit-user-drag: none; }
/* A cell picture carries a few transparent pixels round its edge; drawn a little larger than its
   cell, neighbours overlap and the field has no seams. */
.fm-soil { position: absolute; top: -3%; left: -1.5%; width: 103%; height: 106%; object-fit: fill; pointer-events: none; -webkit-user-drag: none; }
.fm-count {
  position: absolute; transform: translate(-50%, -50%);
  padding: 1px 6px; border-radius: 999px; background: rgba(255, 250, 240, .94); color: #3a2f1c;
  font-size: clamp(10px, calc(var(--pw, 100px) * .1), 14px); font-weight: 800; line-height: 1.35; white-space: nowrap;
  font-variant-numeric: tabular-nums; pointer-events: none; box-shadow: 0 1px 3px rgba(40, 30, 10, .3);
}
.fm-plant, .fm-ghost {
  position: absolute; left: 50%; transform: translateX(-50%); transform-origin: 50% 100%;
  pointer-events: none; -webkit-user-drag: none;
}
.fm-plot.is-ripe .fm-plant {
  animation: fm-bob 2.6s ease-in-out infinite;
  -webkit-filter: drop-shadow(0 0 5px rgba(255, 236, 140, .95)); filter: drop-shadow(0 0 5px rgba(255, 236, 140, .95));
}
@keyframes fm-bob {
  0%, 100% { transform: translateX(-50%) scale(1, 1); }
  50% { transform: translateX(-50%) scale(1.03, .97); }
}
/* A standing thing's shadow: its own picture, flattened and laid on the ground forward and to the
   left from its foot, plus a soft dark patch where it meets the ground. Overcast skies keep only
   the patch. */
.fm-shade {
  position: absolute; left: 50%; transform-origin: 50% 100%; transform: translateX(-50%) scaleY(-.36) skewX(40deg);
  -webkit-filter: brightness(0) blur(1px); filter: brightness(0) blur(1px); opacity: .36;
  pointer-events: none; -webkit-user-drag: none; transition: opacity .8s ease;
}
.fm[data-sky="frost"] .fm-shade { opacity: .2; }
.fm[data-sky="rain"] .fm-shade, .fm[data-sky="storm"] .fm-shade { opacity: .08; }
.fm-foot {
  position: absolute; left: 50%; transform: translate(-50%, -50%); border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(40, 32, 10, .55), rgba(40, 32, 10, 0));
}
.fm-sign .fm-shade { bottom: 0; width: 100%; }
.fm-sign .fm-foot { top: 100%; width: 34%; height: 9%; }
.fm-weed { position: absolute; left: 8%; bottom: 14%; width: 22%; pointer-events: none; -webkit-user-drag: none; }
.fm-dirt { position: absolute; width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px; border-radius: 50%; background: #7a5230; pointer-events: none; }
.fm-drop {
  position: absolute; width: 4px; height: 9px; margin-left: -2px; pointer-events: none;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: #8ccfff;
}
.fm-drop.is-frost { width: 6px; height: 6px; margin-left: -3px; border-radius: 1px; background: #eaf6ff; box-shadow: 0 0 0 1px #9fd0f0; }
.fm-drop.is-storm { width: 3px; height: 11px; margin-left: -1.5px; border-radius: 2px; background: #ffe066; box-shadow: 0 0 4px #ffd23f; }
.fm-count-sky { display: inline-block; vertical-align: -2px; margin-right: 3px; }
.fm-count-sky[hidden] { display: none; }
.fm-count-svg { display: block; width: 1.05em; height: 1.05em; }
.fm-timer {
  position: absolute; left: 50%; top: -6px; z-index: 5; transform: translate(-50%, -100%);
  padding: 3px 10px; border-radius: 999px; background: rgba(255, 250, 240, .96); color: #3a2f1c;
  font-size: .78rem; font-weight: 700; white-space: nowrap; pointer-events: none; opacity: 0;
  box-shadow: 0 2px 6px rgba(40, 50, 20, .25);
}
.fm-timer.is-two { border-radius: 12px; text-align: center; }
.fm-timer small { display: block; font-size: .72rem; font-weight: 600; color: #6b5a36; }
.fm-timer.is-on { animation: fm-timer 2.2s ease-out; }
@keyframes fm-timer { 0% { opacity: 0; } 10%, 75% { opacity: 1; } 100% { opacity: 0; } }

/* Weather marks on a ripe crop, drawn over the plant: five sparkles placed round it. */
.fm-mut { position: absolute; left: 50%; transform: translateX(-50%); pointer-events: none; }
.fm-mut i { position: absolute; display: block; width: 14%; height: 14%; max-width: 16px; max-height: 16px; animation: fm-twinkle 1.8s ease-in-out infinite; }
.fm-mut i:nth-child(1) { left: 12%; top: 28%; animation-delay: 0s; }
.fm-mut i:nth-child(2) { left: 72%; top: 16%; animation-delay: .4s; }
.fm-mut i:nth-child(3) { left: 44%; top: 48%; animation-delay: .8s; }
.fm-mut i:nth-child(4) { left: 80%; top: 58%; animation-delay: 1.2s; }
.fm-mut i:nth-child(5) { left: 22%; top: 70%; animation-delay: 1.5s; }
@keyframes fm-twinkle {
  0%, 100% { opacity: .25; transform: scale(.6); }
  50% { opacity: 1; transform: scale(1.1); }
}
.fm-mut-dew i { border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: radial-gradient(circle at 35% 30%, #fff 0, #e2f4ff 25%, #8ccfff 70%, #4ba6e8 100%); box-shadow: 0 0 4px rgba(120, 200, 255, .9); }
.fm-mut-spark i { background: #ffe24a; transform: rotate(45deg); box-shadow: 0 0 8px 2px rgba(255, 220, 60, .9); border-radius: 2px; }
.fm-mut-spark::before { content: ''; position: absolute; left: 10%; right: 10%; top: 10%; bottom: 0; border-radius: 50%; background: radial-gradient(rgba(255, 230, 90, .35), rgba(255, 230, 90, 0) 70%); animation: fm-flicker 1.1s steps(2) infinite; }
@keyframes fm-flicker { 50% { opacity: .35; } }
.fm-mut-frost i { background: #fff; border: 2px solid #9fd2f5; border-radius: 3px; transform: rotate(45deg); box-shadow: 0 0 5px rgba(170, 220, 255, .95); }
.fm-mut-frost::before { content: ''; position: absolute; left: 0; right: 0; top: 30%; bottom: 0; border-radius: 50%; background: radial-gradient(rgba(220, 240, 255, .55), rgba(220, 240, 255, 0) 70%); }
.fm-mut-rainbow::before {
  content: ''; position: absolute; left: -6%; right: -6%; top: -16%; height: 70%;
  background: radial-gradient(circle at 50% 100%, rgba(0, 0, 0, 0) 48%, rgba(239, 91, 91, .75) 49%, rgba(245, 197, 66, .75) 55%, rgba(102, 196, 108, .75) 61%, rgba(74, 168, 232, .75) 67%, rgba(0, 0, 0, 0) 69%);
  animation: fm-glow 2.4s ease-in-out infinite;
}
.fm-mut-rainbow i { background: radial-gradient(circle, #fff 0, rgba(255, 255, 255, 0) 70%); }
.fm-mut-moon::before { content: ''; position: absolute; left: -10%; right: -10%; top: 0; bottom: -4%; border-radius: 50%; background: radial-gradient(rgba(214, 226, 255, .6), rgba(214, 226, 255, 0) 68%); animation: fm-glow 3s ease-in-out infinite; }
.fm-mut-moon i { background: radial-gradient(circle, #fff 0, #e6ecff 35%, rgba(230, 236, 255, 0) 70%); }
.fm-mut-gold::after { content: ''; position: absolute; left: 0; right: 0; top: 0; bottom: 0; border-radius: 50%; background: radial-gradient(rgba(255, 215, 80, .5), rgba(255, 215, 80, 0) 70%); animation: fm-glow 1.6s ease-in-out infinite; }
.fm-mut-gold i { background: #ffd34d; transform: rotate(45deg); box-shadow: 0 0 8px 2px rgba(255, 205, 60, .95); border-radius: 2px; }
@keyframes fm-glow { 50% { opacity: .55; } }

/* --- the sky, and things in flight --------------------------------------------------------------- */
.fm-sky { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 20; pointer-events: none; }
.fm-fly { position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 40; pointer-events: none; overflow: hidden; }
.fm-flyer { position: absolute; left: 0; top: 0; }
.fm-flyer-ic { display: block; width: 100%; height: 100%; object-fit: contain; -webkit-filter: drop-shadow(0 3px 3px rgba(40, 30, 10, .3)); filter: drop-shadow(0 3px 3px rgba(40, 30, 10, .3)); }
.fm-flyer-badges { position: absolute; right: -6px; bottom: -6px; display: flex; }

/* --- the top row --------------------------------------------------------------------------------- */
.fm-top {
  position: absolute; top: 10px; left: 12px; right: 12px; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; pointer-events: none;
}
.fm-top-l, .fm-top-r { display: flex; align-items: center; pointer-events: auto; }
.fm-top-l > * + *, .fm-top-r > * + * { margin-left: 8px; }
.fm-lv, .fm-coins, .fm-pill {
  display: inline-flex; align-items: center; height: 38px; box-sizing: border-box;
  padding: 0 12px; border-radius: 999px; background: rgba(255, 250, 240, .92); color: #3a2f1c;
  box-shadow: 0 2px 6px rgba(40, 50, 20, .22); font: inherit; font-size: .9rem; font-weight: 800; white-space: nowrap;
}
.fm-pill { border: 0; cursor: pointer; }
.fm-pill:hover { background: #fff; }
.fm-pill > * + * { margin-left: 6px; }
.fm-round { width: 38px; padding: 0; justify-content: center; }
.fm-svg { width: 20px; height: 20px; }
.fm-lv { flex-direction: column; justify-content: center; align-items: stretch; min-width: 96px; height: auto; min-height: 38px; padding: 4px 12px; border-radius: 16px; }
.fm-lv.is-bump { animation: fm-bump .35s ease-out; }
.fm-lv-num { font-size: .85rem; line-height: 1.1; text-align: center; }
.fm-xp { display: block; height: 6px; margin-top: 3px; border-radius: 3px; background: #e6dcc2; overflow: hidden; }
.fm-xp-text { display: block; margin-top: 2px; font-size: .64rem; font-weight: 700; line-height: 1.1; color: #7a6d55; text-align: center; }
.fm-xp-pop {
  position: absolute; z-index: 41; padding: 2px 9px; border-radius: 999px; background: #4caf50; color: #fff;
  font-size: .8rem; font-weight: 800; white-space: nowrap; pointer-events: none; box-shadow: 0 2px 5px rgba(30, 60, 20, .3);
}
.fm-xp-fill { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #8bd25a, #4caf50); transition: width .4s ease; }
.fm-coin-ic { width: 22px; height: 22px; object-fit: contain; margin-right: 6px; }
.fm-coins.is-bump { animation: fm-bump .35s ease-out; }
@keyframes fm-bump { 40% { transform: scale(1.14); } }
.fm-wx-ic { display: inline-flex; }
.fm-wx-svg { width: 24px; height: 24px; }
.fm-wx-text { display: inline-flex; flex-direction: column; line-height: 1.05; text-align: left; }
.fm-wx-label { font-size: .85rem; }
.fm-top.is-t1 .fm-wx-text { display: none; }
.fm-top.is-t2 .fm-full span { max-width: 5.5em; font-size: .68rem; line-height: 1.05; white-space: normal; text-align: left; }
.fm-top.is-t3 { flex-wrap: wrap; }
.fm-top.is-t3 .fm-top-r { margin: 5px 0 0 auto; }
.fm-wx-season { font-size: .68rem; font-weight: 700; color: #7a6d55; }

/* --- the bottom: harvest and the tool bar -------------------------------------------------------- */
.fm-bar {
  position: absolute; left: 50%; bottom: 10px; z-index: 30; transform: translateX(-50%);
  display: flex; align-items: stretch; width: calc(100% - 20px); max-width: 640px; height: 68px; box-sizing: border-box;
  padding: 5px; border-radius: 18px; background: rgba(255, 250, 240, .95); box-shadow: 0 3px 10px rgba(40, 50, 20, .25);
}
.fm-tool {
  position: relative; flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  margin: 0 2px; padding: 0; border: 0; border-radius: 13px; background: none; color: #3a2f1c; font: inherit; cursor: pointer;
}
.fm-tool:hover { background: rgba(240, 225, 190, .5); }
.fm-tool.is-on { background: #ffe9a8; box-shadow: inset 0 0 0 2px #e0a72b; }
.fm-tool.is-bump { animation: fm-bump .35s ease-out; }
.fm-tool-pic { position: relative; display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; }
.fm-tool.is-sack .fm-tool-pic, .fm-tool.is-sack .fm-tool-pic img { width: 40px; height: 40px; }
/* On the seed sack's label, which is measured on its picture: 17-79% across, 51-83% down. */
.fm-sack-label {
  position: absolute; left: 48%; top: 67%; transform: translate(-50%, -50%); pointer-events: none;
  color: #6b3f16; font-size: 7.5px; font-weight: 800; line-height: 1; white-space: nowrap;
}
.fm-tool-pic .fm-ic, .fm-tool-pic img { width: 34px; height: 34px; object-fit: contain; }
.fm-tool-pic .fm-svg { width: 26px; height: 26px; color: #6b4521; }
.fm-tool-label { margin-top: 2px; font-size: .74rem; font-weight: 800; line-height: 1; white-space: nowrap; }
.fm-tool-count {
  position: absolute; top: 2px; left: 50%; margin-left: 8px; min-width: 18px; box-sizing: border-box;
  padding: 1px 5px; border-radius: 999px; background: #3b7d2b; color: #fff; font-size: .66rem; font-weight: 800; line-height: 1.3; text-align: center;
}
.fm-bar-gap { flex: 0 0 1px; margin: 8px 4px; background: #e2d6ba; }
/* The Orders button while the panel has something open: a small wiggle every five seconds. */
.fm-tab.is-nudge { animation: fm-orders-nudge 5s ease-in-out infinite; transform-origin: 50% 80%; }
@keyframes fm-orders-nudge {
  0%, 16%, 100% { transform: rotate(0); }
  3% { transform: rotate(-9deg); }
  6% { transform: rotate(8deg); }
  9% { transform: rotate(-6deg); }
  12% { transform: rotate(3deg); }
}
.fm-tab-count {
  display: inline-block; min-width: 18px; margin-left: 6px; box-sizing: border-box; padding: 1px 5px; border-radius: 999px;
  background: #3b7d2b; color: #fff; font-size: .66rem; font-weight: 800; line-height: 1.3; text-align: center; vertical-align: 1px;
}
.fm-tab-count[hidden] { display: none; }

.fm-harvest {
  position: absolute; left: 50%; bottom: 88px; z-index: 31; transform: translateX(-50%);
  display: inline-flex; align-items: center; height: 46px; box-sizing: border-box; padding: 0 22px 0 52px;
  border: 0; border-radius: 999px; background: #4caf50; color: #fff; font: inherit; font-size: 1.05rem; font-weight: 800; white-space: nowrap;
  box-shadow: 0 3px 0 #2e7d32, 0 6px 14px rgba(30, 60, 20, .3); cursor: pointer;
}
.fm-harvest:disabled { background: #ece5d3; color: #8a8270; box-shadow: 0 2px 0 #cfc5ac; cursor: default; }
.fm-harvest-hand { position: absolute; left: 12px; top: 50%; width: 30px; height: 32px; margin-top: -17px; transform: rotate(-14deg); }
.fm-harvest-hand svg { display: block; width: 100%; height: 100%; }
.fm-harvest.is-ready { animation: fm-call 2.4s ease-in-out infinite; }
.fm-harvest.is-ready .fm-harvest-hand { animation: fm-tap 1.2s ease-in-out infinite; }
@keyframes fm-call { 0%, 100% { transform: translateX(-50%) scale(1); } 50% { transform: translateX(-50%) scale(1.05); } }
/* Inside .fm-acts a button is not translated, so it pulses with fm-call-pair: fm-call would move it by half its width. */
.fm-acts { position: absolute; left: 50%; bottom: 88px; z-index: 31; transform: translateX(-50%); display: flex; align-items: center; }
.fm-acts .fm-harvest { position: relative; left: auto; bottom: auto; transform: none; }
.fm-acts .fm-harvest.is-ready { animation-name: fm-call-pair; }
@keyframes fm-call-pair { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
.fm-sow { margin-right: 8px; }
.fm-harvest.fm-sow[hidden] { display: none; }
@keyframes fm-tap { 0%, 100% { transform: rotate(-14deg) translateY(0); } 50% { transform: rotate(-14deg) translateY(4px) scale(.92); } }

/* --- messages ------------------------------------------------------------------------------------ */
.fm-tip {
  position: absolute; left: 50%; bottom: 144px; z-index: 35; transform: translate(-50%, 8px); opacity: 0;
  max-width: 88%; padding: 7px 16px; border-radius: 999px; background: rgba(45, 40, 25, .86); color: #fff;
  font-size: .88rem; font-weight: 700; text-align: center; pointer-events: none; transition: opacity .25s, transform .25s;
}
.fm-tip.is-in { opacity: 1; transform: translate(-50%, 0); }
.fm-banner {
  position: absolute; left: 50%; top: 108px; z-index: 36; transform: translateX(-50%);
  width: 92%; max-width: 460px; box-sizing: border-box; padding: 10px 16px; border-radius: 16px;
  background: #fffaf0; box-shadow: 0 6px 18px rgba(40, 50, 20, .3); text-align: center; cursor: pointer;
}
.fm-banner strong { display: block; font-size: 1.05rem; color: #2e6b1f; }
.fm-banner span { display: block; margin-top: 3px; font-size: .88rem; color: #5a4d35; }
.fm-banner.is-in { animation: fm-drop-in .4s cubic-bezier(.3, 1.4, .5, 1); }
@keyframes fm-drop-in { 0% { transform: translate(-50%, -20px); opacity: 0; } 100% { transform: translate(-50%, 0); opacity: 1; } }
.fm-caption {
  position: absolute; left: 50%; top: 58px; z-index: 37; transform: translateX(-50%);
  max-width: 92%; box-sizing: border-box; margin: 0; padding: 8px 16px; border-radius: 999px;
  background: #fff; color: #2d4a1f; font-weight: 800; text-align: center; box-shadow: 0 3px 10px rgba(40, 50, 20, .25);
}
.fm-offline {
  position: absolute; left: 50%; top: 58px; z-index: 38; transform: translateX(-50%);
  padding: 6px 14px; border-radius: 999px; background: #c0392b; color: #fff; font-size: .85rem; font-weight: 700; white-space: nowrap;
}
.fm-loading { position: absolute; left: 0; right: 0; top: 45%; margin: 0; text-align: center; font-weight: 800; color: #fff; text-shadow: 0 1px 3px rgba(30, 50, 10, .5); }
.fm-hand { position: absolute; left: 0; top: 0; z-index: 70; width: 44px; height: 46.75px; pointer-events: none; }
.fm-hand svg { display: block; width: 100%; height: 100%; -webkit-filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .3)); filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .3)); }

/* --- sheets: the shop, the barn and the rest ------------------------------------------------------ */
.fm-sheet-host { position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 50; pointer-events: none; transition: background .2s; }
.fm-sheet-host.is-open { pointer-events: auto; background: rgba(30, 40, 20, .32); }
.fm-sheet {
  position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  display: flex; flex-direction: column; width: 100%; max-width: 560px; max-height: 88%; box-sizing: border-box;
  border-radius: 20px 20px 0 0; background: #fffaf0; box-shadow: 0 -6px 24px rgba(30, 40, 20, .3);
  text-align: left; animation: fm-rise .25s ease-out;
}
@keyframes fm-rise { 0% { transform: translate(-50%, 30px); opacity: 0; } 100% { transform: translate(-50%, 0); opacity: 1; } }
.fm-sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 6px 18px; flex: none; }
.fm-sheet-head h3 { margin: 0; font-size: 1.15rem; }
.fm-x { width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: #f1e7cf; color: #5a4d35; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.fm-x svg { width: 18px; height: 18px; }
.fm-sheet-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 2px 14px 18px; }
.fm-sheet-coins { display: flex; align-items: center; margin: 0 0 8px; font-weight: 800; }
.fm-tabs { display: flex; margin: 0 0 6px; padding: 3px; border-radius: 12px; background: #f1e7cf; }
.fm-tabbtn { flex: 1 1 0; padding: 7px 4px; border: 0; border-radius: 9px; background: none; color: #6b5c40; font: inherit; font-weight: 800; cursor: pointer; }
.fm-tabbtn.is-on { background: #fff; color: #2e6b1f; box-shadow: 0 1px 3px rgba(40, 30, 10, .15); }
.fm-sub { margin: 14px 0 4px; font-size: .92rem; color: #6b5c40; }
.fm-note { margin: 8px 0; font-size: .85rem; color: #6b5c40; }
.fm-empty { margin: 14px 0; color: #8a7d62; text-align: center; }
.fm-list { display: block; }
.fm-row { display: flex; align-items: center; padding: 8px 2px; border-bottom: 1px solid #efe5cf; }
.fm-row:last-child { border-bottom: 0; }
.fm-row > * + * { margin-left: 10px; }
.fm-row-btn { width: 100%; border: 0; border-bottom: 1px solid #efe5cf; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; border-radius: 10px; }
.fm-row-btn.is-on, .fm-row-btn:hover { background: #fff1c8; }
.fm-row .fm-ic, .fm-row-pic { flex: none; width: 40px; height: 40px; object-fit: contain; }
.fm-row-pic { position: relative; }
.fm-row-pic .fm-ic { width: 40px; height: 40px; object-fit: contain; }
.fm-row-glyph { flex: none; width: 40px; text-align: center; font-size: 1.6rem; color: #6b4521; }
.fm-row-name { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.fm-row-name b { font-size: .95rem; }
.fm-row-name small { font-size: .76rem; color: #7a6d55; }
.fm-row-n, .fm-row-own { flex: none; font-weight: 800; color: #5a4d35; }
.fm-row-small { padding: 5px 2px; }
.fm-row.is-locked { opacity: .62; }
.fm-shelf {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); grid-gap: 6px;
  margin: 6px 0 4px; padding: 6px; border-radius: 12px;
  background: linear-gradient(#7a5c45, #67503d); box-shadow: inset 0 0 0 2px #55432f, 0 3px 8px rgba(60, 45, 30, .25);
}
.fm-cubby {
  display: flex; flex-direction: column; align-items: center; min-width: 0; padding: 0 5px 7px; border-radius: 5px;
  background: #f8f2e6; text-align: center; box-shadow: inset 0 0 0 1px rgba(85, 67, 47, .25);
}
.fm-cubby-shelf {
  position: relative; display: flex; align-items: flex-end; justify-content: center; align-self: stretch;
  height: 66px; margin: 0 -5px; padding-bottom: 2px; border-radius: 5px 5px 0 0;
  background: linear-gradient(#d9cbb2, #eee4d1 55%);
  box-shadow: inset 0 7px 9px -5px rgba(70, 52, 30, .45), inset 6px 0 8px -6px rgba(70, 52, 30, .3), inset -6px 0 8px -6px rgba(70, 52, 30, .3);
  border-bottom: 6px solid #9b8062;
}
.fm-cubby-shelf::after { content: ''; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; background: #b9a487; }
.fm-cubby-ic { position: relative; display: inline-flex; width: 50px; height: 50px; }
.fm-cubby-ic .fm-ic, .fm-cubby-ic .fm-row-pic, .fm-cubby-ic .fm-row-pic .fm-ic { width: 50px; height: 50px; object-fit: contain; }
.fm-cubby-ic .fm-ic { -webkit-filter: saturate(.82) drop-shadow(0 3px 2px rgba(70, 40, 15, .3)); filter: saturate(.82) drop-shadow(0 3px 2px rgba(70, 40, 15, .3)); }
.fm-cubby-ic .fm-row-glyph { width: 50px; font-size: 2.2rem; line-height: 50px; }
.fm-cubby-n {
  position: absolute; top: 5px; right: 5px; padding: 1px 6px; border-radius: 999px;
  background: rgba(255, 255, 255, .9); color: #5a4d35; font-size: .72rem; font-weight: 800;
}
.fm-cubby-name { margin-top: 7px; font-size: .82rem; line-height: 1.15; }
.fm-cubby-line { margin-top: 2px; font-size: .68rem; line-height: 1.2; color: #7a6d55; }
.fm-cubby-foot { display: flex; justify-content: center; align-self: stretch; margin-top: auto; padding-top: 7px; }
.fm-cubby-foot > * + * { margin-left: 4px; }
.fm-cubby-foot .fm-btn { flex: 1 1 0; min-width: 0; padding: 5px 1px; font-size: .68rem; white-space: nowrap; }
.fm-cubby-foot .fm-plus { flex: none; width: 30px; padding: 0; }
.fm-buyrow { display: flex; flex: 1 1 auto; min-width: 0; }
.fm-buyrow > * + * { margin-left: 5px; }
.fm-buypair { display: flex; flex: 1 1 0; min-width: 0; }
.fm-buypair > * + * { margin-left: 2px; }
.fm-plus .fm-svg { width: 16px; height: 16px; stroke-width: 3; }
.fm-meta { display: inline-flex; align-items: center; margin: 0 3px; white-space: nowrap; }
.fm-meta-ic { width: 12px; height: 12px; margin-right: 3px; object-fit: contain; }
.fm-big { position: relative; }
.fm-big .fm-cubby-shelf { height: 104px; }
.fm-big .fm-cubby-ic, .fm-big .fm-cubby-ic .fm-ic, .fm-big .fm-cubby-ic .fm-row-pic, .fm-big .fm-cubby-ic .fm-row-pic .fm-ic { width: 80px; height: 80px; }
.fm-big .fm-cubby-name {
  position: absolute; top: 5px; left: 6px; max-width: 60%; margin: 0; text-align: left;
  font-size: .7rem; line-height: 1.1; text-shadow: 0 0 3px #f1dfbd, 0 0 3px #f1dfbd;
}
.fm-big .fm-cubby-line { margin-top: 4px; font-size: .6rem; }
.fm-big .fm-meta-ic { width: 10px; height: 10px; margin-right: 2px; }
.fm-big .fm-cubby-foot { padding-top: 5px; }
.fm-big .fm-cubby-foot .fm-btn { padding: 3px 1px; font-size: .6rem; }
.fm-big .fm-btn small { font-size: .58rem; }
.fm-big .fm-cubby-foot .fm-plus { width: 20px; padding: 0; }
.fm-big .fm-buypair .fm-btn { min-height: 26px; font-size: .74rem; }
.fm-big .fm-buypair .fm-btn.is-long { font-size: .58rem; }
.fm-big .fm-plus .fm-svg { width: 13px; height: 13px; }
.fm-big .fm-cubby-ic .fm-row-glyph { width: 80px; font-size: 3.5rem; line-height: 80px; }
.fm-big .fm-lock, .fm-big .fm-row-own { font-size: .64rem; }
.fm-big .fm-lock svg { width: 12px; height: 12px; margin-right: 3px; }
.fm-cubby.is-empty { padding: 0; background: #ece3d2; }
.fm-cubby.fm-pick { cursor: pointer; }
.fm-cubby.fm-pick:hover { box-shadow: inset 0 0 0 2px #c6a160; }
.fm-cubby.fm-pick.is-on { background: #f6eedb; box-shadow: inset 0 0 0 3px #c6a160; }
.fm-shop .fm-btn-main, .fm-barnsheet .fm-btn-main, .fm-seedsheet .fm-btn-main { background: #6f9a5d; }
.fm-shop .fm-btn-main:hover:not(:disabled), .fm-barnsheet .fm-btn-main:hover:not(:disabled), .fm-seedsheet .fm-btn-main:hover:not(:disabled) { background: #638c52; }
.fm-shop .fm-tabbtn.is-on, .fm-barnsheet .fm-tabbtn.is-on { color: #4f6b3f; }
.fm-cubby.is-empty .fm-cubby-shelf { flex: 1 1 auto; height: auto; min-height: 66px; margin: 0; border-radius: 5px; }
.fm-cubby.is-locked .fm-cubby-ic, .fm-cubby.is-locked .fm-cubby-name, .fm-cubby.is-locked .fm-cubby-line { opacity: .5; }
.fm-cubby.is-locked .fm-cubby-ic { -webkit-filter: grayscale(.8); filter: grayscale(.8); }
.fm-x2 { font-style: normal; font-weight: 800; color: #b0583f; }
.fm-buys { display: flex; flex: none; }
.fm-buys > * + * { margin-left: 6px; }
.fm-btn {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; flex: none;
  min-width: 58px; padding: 6px 10px; border: 0; border-radius: 11px; background: #f1e7cf; color: #3a2f1c;
  font: inherit; font-weight: 800; font-size: .85rem; line-height: 1.15; cursor: pointer;
}
.fm-btn small { font-size: .7rem; font-weight: 700; opacity: .85; }
.fm-btn:hover:not(:disabled) { background: #eadcb7; }
.fm-btn-main { background: #4caf50; color: #fff; }
.fm-btn-main:hover:not(:disabled) { background: #43a047; }
.fm-btn:disabled { opacity: .4; cursor: default; }
.fm-btn-wide { display: flex; width: 100%; margin: 10px 0 4px; padding: 10px; font-size: 1rem; }
.fm-lock { display: inline-flex; align-items: center; flex: none; color: #8a7d62; font-size: .8rem; font-weight: 700; }
.fm-lock svg { width: 15px; height: 15px; margin-right: 4px; }
.fm-market { display: flex; flex-wrap: wrap; align-items: center; margin: 2px 0 6px; padding: 8px 10px; border-radius: 12px; background: #f4ecd8; }
.fm-market > * { margin-right: 10px; }
.fm-market small { color: #7a6d55; font-size: .75rem; }
.fm-hot { display: inline-flex; align-items: center; font-weight: 800; color: #b0583f; }
.fm-hot .fm-ic { width: 26px; height: 26px; object-fit: contain; margin-right: 2px; }

.fm-badges { position: absolute; right: -6px; bottom: -6px; display: flex; }
.fm-badge { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(40, 30, 10, .3); }
.fm-badges .fm-badge + .fm-badge { margin-left: -5px; }
.fm-badge-svg { width: 15px; height: 15px; }

.fm-codex { display: grid; grid-template-columns: minmax(70px, 1.5fr) repeat(7, minmax(0, 1fr)); grid-gap: 4px; align-items: center; }
.fm-codex-h { display: flex; justify-content: center; font-weight: 800; color: #6b5c40; }
.fm-codex-name { font-size: .78rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-codex-cell { position: relative; display: flex; align-items: center; justify-content: center; height: 36px; border-radius: 9px; background: #f3ead6; }
.fm-codex-cell .fm-ic { width: 26px; height: 26px; object-fit: contain; opacity: .16; -webkit-filter: grayscale(1); filter: grayscale(1); }
.fm-codex-cell.is-got { background: #fff1c8; }
.fm-codex-cell.is-got .fm-ic { opacity: 1; -webkit-filter: none; filter: none; }
.fm-codex-cell .fm-badges { right: 0; bottom: 0; }
.fm-codex-cell .fm-badge { width: 15px; height: 15px; }
.fm-codex-cell .fm-badge-svg { width: 11px; height: 11px; }

.fm-forecast { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-gap: 6px; }
.fm-fc { display: flex; flex-direction: column; align-items: center; padding: 8px 2px; border-radius: 12px; background: #f3ead6; text-align: center; }
.fm-fc.is-now { background: #ffe9a8; }
.fm-fc-svg { width: 32px; height: 32px; }
.fm-fc b { font-size: .82rem; }
.fm-fc small { font-size: .7rem; color: #7a6d55; }

.fm-switch .fm-toggle { flex: none; padding: 4px 12px; border-radius: 999px; background: #e6dcc2; font-weight: 800; font-size: .8rem; }
.fm-switch.is-on .fm-toggle { background: #4caf50; color: #fff; }
.fm-code-row { display: flex; align-items: center; margin: 6px 0; }
.fm-code-row > * + * { margin-left: 8px; }
.fm-code { flex: 1 1 auto; min-width: 0; padding: 7px 10px; border-radius: 9px; background: #f3ead6; font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; -webkit-user-select: all; user-select: all; }
.fm-input { flex: 1 1 auto; min-width: 0; padding: 7px 10px; border: 1px solid #d9cba8; border-radius: 9px; font: inherit; font-size: .85rem; }
/* Under 16px, Safari on iPhone zooms the page in when the field takes focus. */
.fm-form .fm-input { display: block; width: 100%; box-sizing: border-box; margin: 6px 0; padding: 9px 10px; font-size: 16px; }

/* --- picking the brand ------------------------------------------------------------------------------ */
.fm-bp-preview { position: -webkit-sticky; position: sticky; top: 0; z-index: 2; display: flex; justify-content: center; margin: 0 -14px; padding: 4px 0 8px; background: #fffaf0; border-bottom: 1px solid #efe5cf; }
/* The top 43% of the 342×360 sign-tall picture: the board and a little of the post. */
.fm-bp-sign { position: relative; width: 230px; height: 104px; overflow: hidden; color: #6b3f16; }
.fm-bp-pic { display: block; width: 100%; pointer-events: none; -webkit-user-drag: none; }
.fm-bp-board { position: absolute; left: 7%; right: 7%; top: 6px; height: 88px; display: flex; align-items: center; justify-content: center; }
.fm-bp-head { display: flex; align-items: center; justify-content: space-between; }
.fm-bp-head .fm-btn { margin-left: 10px; }
.fm-bp-grid { display: grid; grid-gap: 6px; }
.fm-bp-letters { grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); }
.fm-bp-styles { grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); }
.fm-bp-pics { grid-template-columns: repeat(auto-fill, minmax(54px, 1fr)); }
.fm-bp-opt { display: flex; align-items: center; justify-content: center; min-height: 40px; padding: 5px; border: 2px solid #e6dcc2; border-radius: 10px; background: #fff; color: #6b3f16; font: inherit; cursor: pointer; }
.fm-bp-opt.is-on { border-color: #4caf50; box-shadow: 0 0 0 2px #4caf50 inset; background: #f1f8e9; }
.fm-bp-letter { font-size: 1.1rem; font-weight: 800; }
.fm-bp-style { display: flex; flex-direction: column; align-items: center; }
.fm-bp-style .fm-bm { width: 44px; height: 44px; }
.fm-bp-word { margin-top: 3px; font-size: .74rem; font-weight: 700; }
.fm-bp-art { display: block; width: 40px; height: 40px; object-fit: contain; pointer-events: none; -webkit-user-drag: none; }

/* --- the level-up card (in the game, over the field) -------------------------------------------- */
.fm-end { position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 55; display: flex; align-items: center; justify-content: center; background: rgba(30, 40, 20, .35); }
.fm-end-card { width: 90%; max-width: 380px; box-sizing: border-box; padding: 20px 18px 14px; border-radius: 20px; background: #fffaf0; text-align: center; box-shadow: 0 10px 30px rgba(20, 30, 10, .35); animation: fm-rise-c .3s ease-out; }
@keyframes fm-rise-c { 0% { transform: translateY(20px); opacity: 0; } 100% { transform: none; opacity: 1; } }
.fm-end-title { margin: 0 0 6px; font-size: 1.3rem; color: #2e6b1f; }
.fm-end-line { margin: 0 0 6px; color: #5a4d35; }
.fm-feel { margin: 12px 0 6px; font-weight: 800; }
.fm-moods { display: flex; justify-content: center; margin: 6px 0; }
.fm-moods > * + * { margin-left: 8px; }
.fm-mood { display: inline-flex; align-items: center; padding: 7px 12px; border: 0; border-radius: 999px; background: #f1e7cf; color: #3a2f1c; font: inherit; font-weight: 800; font-size: .85rem; cursor: pointer; }
.fm-mood > * + * { margin-left: 6px; }
.fm-mood svg { width: 18px; height: 18px; }
.fm-mood.is-on { background: #4caf50; color: #fff; }

/* --- buildings ------------------------------------------------------------------------------------ */
.fm-bld { position: absolute; padding: 0; border: 0; background: none; cursor: pointer; font: inherit; transform-origin: 50% 100%; }
.fm-bld-pic { position: relative; display: block; width: 100%; height: 100%; object-fit: contain; pointer-events: none; -webkit-user-drag: none; }
.fm-bld .fm-shade { bottom: 0; width: 100%; }
.fm-bld .fm-foot { top: 100%; width: 92%; height: 15%; background: radial-gradient(closest-side, rgba(40, 32, 10, .62), rgba(40, 32, 10, .3) 60%, rgba(40, 32, 10, 0)); }
.fm-bld.is-planted .fm-foot { width: 108%; height: 21%; }
.fm-bld[data-art="greenhouse"] .fm-shade, .fm-bld[data-art="greenhouse-x1"] .fm-shade, .fm-bld[data-art="greenhouse-x2"] .fm-shade { display: none; }
.fm-bld-ao {
  display: none; position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none;
  background: linear-gradient(rgba(45, 34, 14, 0) 76%, rgba(45, 34, 14, .42));
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
}
.fm-bld:not(.is-ground) .fm-bld-ao { display: block; }
.fm-bld-drift { background: linear-gradient(rgba(246, 249, 252, 0) 86%, rgba(246, 249, 252, .9) 96%); }
.fm-bld-roof { background: none; }
/* Where each roof lies in its picture, measured on well-1 and windmill-1: a new picture needs it
   measured again. */
.fm-bld[data-art="well"] .fm-bld-roof { background: linear-gradient(rgba(250, 252, 255, .95), rgba(250, 252, 255, .9) 12%, rgba(250, 252, 255, 0) 21%); }
.fm-bld[data-art="windmill"] .fm-bld-roof {
  background: radial-gradient(16% 8.5% at 50% 18%, rgba(250, 252, 255, .95), rgba(250, 252, 255, .92) 60%, rgba(250, 252, 255, 0) 80%);
}
.fm-bld[data-art="scaffold"] .fm-bld-roof, .fm-bld[data-art="rain-barrel"] .fm-bld-roof, .fm-bld[data-art="greenhouse"] .fm-bld-roof,
.fm-bld[data-art="ice-house"] .fm-bld-roof, .fm-bld[data-art="lightning-rod"] .fm-bld-roof,
.fm-bld[data-art="windmill-x1"] .fm-bld-roof, .fm-bld[data-art="windmill-x2"] .fm-bld-roof,
.fm-bld[data-art="greenhouse-x1"] .fm-bld-roof, .fm-bld[data-art="greenhouse-x2"] .fm-bld-roof {
  background: rgba(250, 252, 255, .95); -webkit-mask-composite: source-out; mask-composite: subtract;
}
.fm-bld.is-planted .fm-bld-drift, .fm-bld.is-planted .fm-bld-roof { display: none; }
.fm-s-winter .fm-bld.is-planted .fm-bld-drift, .fm-s-winter .fm-bld.is-planted .fm-bld-roof { display: block; }
/* The bottom of every picture fades into the ground it stands in (BLD_SINK in the script). */
.fm-bld:not(.is-ground) .fm-bld-pic { -webkit-mask-image: linear-gradient(#000 88%, rgba(0, 0, 0, .15)); mask-image: linear-gradient(#000 88%, rgba(0, 0, 0, .15)); }
.fm-bld-ground { position: absolute; top: 0; left: 0; }
.fm-trodden {
  position: absolute; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(122, 92, 52, .72), rgba(122, 92, 52, .5) 55%, rgba(122, 92, 52, 0));
}
.fm-plots { z-index: 3; }
.fm-rope { position: absolute; top: 0; left: 0; overflow: visible; }
.fm-bld.is-ground .fm-bld-pic, .fm-bld.is-ground .fm-shade, .fm-bld.is-ground .fm-foot { visibility: hidden; }
.fm-bld-chip {
  position: absolute; left: 50%; bottom: 100%; transform: translateX(-50%); transform-origin: 50% 100%; margin-bottom: 2px;
  display: flex; align-items: center; padding: 2px 7px; border-radius: 999px; background: rgba(255, 250, 240, .95);
  color: #3a2f1c; font-size: 11px; font-weight: 800; line-height: 1.3; white-space: nowrap;
  box-shadow: 0 1px 3px rgba(40, 30, 10, .3); pointer-events: none;
}
.fm-bld-chip[hidden] { display: none; }
.fm-bld-chip > * + * { margin-left: 3px; }
.fm-bld-ic { width: 12px; height: 12px; }
.fm-bld.is-new .fm-bld-chip { background: #fff1c8; }
.fm-letter { margin: 6px 0 10px; padding: 12px 14px; border-radius: 12px; background: #fffdf6; box-shadow: inset 0 0 0 1px #e8dcc0; }
.fm-letter b { display: block; margin-bottom: 4px; }
.fm-letter p { margin: 4px 0; font-size: .88rem; color: #5a4d35; }
.fm-letter .fm-letter-tip { font-style: italic; }
.fm-letter-gift { display: flex; align-items: center; margin-top: 8px; font-weight: 800; }
.fm-letter-gift .fm-ic { width: 28px; height: 28px; margin-right: 6px; object-fit: contain; }
.fm-store { display: flex; margin: 10px 0 2px; }
.fm-store-slot {
  display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-right: 8px;
  border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 2px #e6dcc6;
}
.fm-store-slot .fm-store-svg { width: 28px; height: 28px; opacity: .25; -webkit-filter: grayscale(1); filter: grayscale(1); }
.fm-store-slot.is-full { background: #f3f8ec; box-shadow: inset 0 0 0 2px #8fbf6f; }
.fm-store-slot.is-full .fm-store-svg { opacity: 1; -webkit-filter: none; filter: none; }
.fm-gh { margin: 8px 0; }
.fm-gh-bed { display: flex; align-items: center; margin: 0 0 8px; padding: 8px 10px; border-radius: 14px; background: #f8f2e6; }
.fm-gh-pic { position: relative; flex: none; width: 40px; height: 40px; margin-right: 10px; }
.fm-gh-pic .fm-ic { width: 40px; height: 40px; object-fit: contain; }
.fm-gh-pic .fm-badges { right: -4px; bottom: -4px; }
.fm-gh-none { border-radius: 10px; border: 2px dashed #ddd0b2; box-sizing: border-box; }
.fm-gh-text { flex: 1 1 auto; min-width: 0; }
.fm-gh-text b { display: block; font-size: .9rem; }
.fm-gh-text small { display: block; margin-top: 2px; font-size: .78rem; color: #7a6d55; }
.fm-gh-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; flex: none; max-width: 60%; }
.fm-gh-foot > * { margin: 2px 0 2px 6px; }
.fm-gh-foot .fm-btn-main { min-width: 76px; }
.fm-gh-use { flex-direction: row; min-width: 0; padding: 5px 9px; font-size: .75rem; }
.fm-gh-use .fm-badge-svg { margin-right: 4px; }
/* The greenhouse's own beds, two to a row; the list of crops to plant in one stays a list. */
.fm-gh-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-gap: 8px; }
.fm-gh-grid .fm-gh-bed { flex-direction: column; justify-content: flex-start; margin: 0; padding: 10px 8px; text-align: center; }
.fm-gh-grid .fm-gh-pic { width: 56px; height: 56px; margin: 0 0 6px; }
.fm-gh-grid .fm-gh-pic .fm-ic { width: 56px; height: 56px; }
.fm-gh-grid .fm-gh-text { flex: none; width: 100%; }
.fm-gh-grid .fm-gh-foot { justify-content: center; max-width: none; margin-top: 6px; }
.fm-gh-grid .fm-gh-foot > * { margin: 2px 3px; }
.fm-gh-scene { position: relative; display: block; width: 100%; height: 86px; margin: 0 0 6px; }
.fm-gh-soil { position: absolute; left: 50%; bottom: 0; width: 76%; height: 30px; transform: translateX(-50%); }
.fm-gh-plant { position: absolute; left: 50%; bottom: 12px; max-width: 86%; transform: translateX(-50%); }
.fm-gh-scene .fm-badges { right: 14%; bottom: 4px; }
.fm-gh-clock {
  position: absolute; left: 50%; top: 0; transform: translateX(-50%);
  padding: 1px 7px; border-radius: 999px; background: rgba(255, 250, 240, .94); color: #3a2f1c;
  font-size: 12px; font-weight: 800; line-height: 1.35; white-space: nowrap; font-variant-numeric: tabular-nums;
  box-shadow: 0 1px 3px rgba(40, 30, 10, .3);
}
.fm-mill-pic { position: absolute; left: 50%; bottom: 4px; width: 62px; height: 62px; object-fit: contain; transform: translateX(-50%); }
.fm-mill-more { margin-left: 5px; color: #8a7a55; }
.fm-gh-all { display: flex; margin: 8px 0 0; }
.fm-gh-all .fm-btn { flex: 1 1 0; }
.fm-gh-all .fm-btn + .fm-btn { margin-left: 8px; }
.fm-gh-sky { display: flex; align-items: center; font-size: .75rem; font-weight: 800; color: #4f6b3f; }
.fm-gh-sky .fm-badge-svg { margin-right: 4px; }
.fm-mill-job { display: flex; align-items: center; margin: 4px 0; font-weight: 700; }
.fm-mill-job .fm-ic { width: 26px; height: 26px; margin-right: 6px; object-fit: contain; }
.fm-ext-done { display: flex; align-items: flex-start; margin: 8px 0 4px; font-size: .82rem; line-height: 1.35; color: #5a4d35; }
.fm-ext-done .fm-badge-svg { flex: none; width: 16px; height: 16px; margin: 1px 6px 0 0; }
.fm-ext-done b { flex: none; margin-right: 6px; color: #3a2f1c; }
.fm-bldsheet .fm-btn-main { background: #6f9a5d; }
.fm-bldsheet .fm-btn-main:hover:not(:disabled) { background: #638c52; }

/* --- orders from the village ---------------------------------------------------------------------- */
.fm-tool[hidden] { display: none; }
.fm-order { margin: 0 0 10px; padding: 10px 12px; border-radius: 14px; background: #f8f2e6; }
.fm-order.is-weather { background: #eef4fb; box-shadow: inset 0 0 0 2px #b9d3ee; }
.fm-order.is-ready { background: #f3f8ec; box-shadow: inset 0 0 0 2px #8fbf6f; }
.fm-order-head { display: flex; align-items: flex-start; }
.fm-order-who { flex: 1 1 auto; min-width: 0; }
.fm-order-who b { display: block; font-size: .92rem; }
.fm-order-who small { display: block; margin-top: 2px; font-size: .78rem; color: #7a6d55; }
.fm-order-swap { flex: none; min-width: 0; margin-left: 8px; padding: 4px 10px; font-size: .75rem; }
.fm-order-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 2px; }
.fm-order-foot .fm-btn-main { flex: none; min-width: 108px; margin-left: 8px; padding: 8px 14px; }
.fm-order.is-empty { display: flex; align-items: center; background: none; border: 2px dashed #ddd0b2; }
.fm-order-wait { flex: none; width: 26px; height: 26px; margin-right: 10px; color: #a8987a; }
.fm-order-clock { flex: none; margin-left: 8px; font-size: 1.1rem; color: #4f6b3f; font-variant-numeric: tabular-nums; }
.fm-order-items { display: flex; flex-wrap: wrap; margin: 8px -4px 0; }
.fm-order-item {
  display: flex; flex-direction: column; align-items: center; width: 84px; box-sizing: border-box;
  margin: 0 4px 6px; padding: 6px 2px; border-radius: 11px; background: #fff;
}
.fm-order-item.is-ok { box-shadow: inset 0 0 0 2px #8fbf6f; }
.fm-order-pic { position: relative; width: 36px; height: 36px; }
.fm-order-pic .fm-ic { width: 36px; height: 36px; object-fit: contain; }
.fm-order-pic .fm-badge { position: absolute; right: -6px; bottom: -4px; width: 18px; height: 18px; }
.fm-order-pic .fm-badge-svg { width: 13px; height: 13px; }
.fm-order-name { margin-top: 3px; font-size: .7rem; font-weight: 700; line-height: 1.15; text-align: center; }
.fm-order-n { font-size: .78rem; font-weight: 800; color: #8a6d3b; }
.fm-order-item.is-ok .fm-order-n { color: #3b7d2b; }
.fm-order-reward { display: flex; flex-wrap: wrap; align-items: center; margin-top: 2px; font-size: .82rem; font-weight: 800; color: #5a4d35; }
.fm-order-reward > * + * { margin-left: 8px; }
.fm-order-foot .fm-order-reward { flex: 1 1 auto; min-width: 0; }
.fm-order-reward > .fm-order-coin + span { margin-left: 3px; }
.fm-order-coin { width: 18px; height: 18px; object-fit: contain; }
.fm-vl-head { display: flex; align-items: center; }
.fm-vl-pic { flex: none; display: flex; align-items: flex-end; justify-content: center; width: 84px; height: 72px; margin-right: 10px; }
.fm-vl-img { display: block; max-width: 84px; max-height: 72px; object-fit: contain; }
.fm-vl-none { width: 64px; height: 56px; border-radius: 10px; border: 2px dashed #ddd0b2; box-sizing: border-box; }
.fm-vl-say { margin: 6px 0 0; font-size: .8rem; line-height: 1.35; color: #6b5c40; }
.fm-vl-lock { display: flex; align-items: center; margin: 6px 0 0; font-size: .8rem; font-weight: 700; color: #8a7b60; }
.fm-vl-lock .fm-bld-ic { margin-right: 5px; }
.fm-order.is-locked .fm-vl-img { -webkit-filter: saturate(.6); filter: saturate(.6); opacity: .8; }
.fm-order.is-done { background: #f3f8ec; }
.fm-order-item.is-near { box-shadow: inset 0 0 0 2px #e3c77d; }
.fm-ordersheet .fm-tabs { margin-bottom: 10px; }
.fm-ordersheet .fm-btn-main { background: #6f9a5d; }
.fm-ordersheet .fm-btn-main:hover:not(:disabled) { background: #638c52; }
/* Docked at the right and narrower. Not fm-rise: that animates the centred sheets' translateX(-50%). */
.fm-sheet.fm-ordersheet, .fm-sheet.fm-sidesheet { left: auto; right: 12px; width: calc(100% - 24px); max-width: 380px; transform: none; animation-name: fm-rise-r; }
.fm-sheet.fm-sidesheet.is-left { left: 12px; right: auto; }
@keyframes fm-rise-r { 0% { transform: translateY(30px); opacity: 0; } 100% { transform: none; opacity: 1; } }

/* --- the first day's goals: the card under the counters (the script sets its top) and the list ---- */
.fm-goal {
  position: absolute; left: 12px; top: 56px; z-index: 30; display: block; width: 212px; max-width: calc(50% - 18px); box-sizing: border-box;
  padding: 7px 10px 8px; border: 0; border-radius: 14px; background: rgba(255, 250, 240, .95); color: #3a2f1c;
  font: inherit; text-align: left; box-shadow: 0 3px 10px rgba(40, 50, 20, .25); cursor: pointer;
}
.fm-goal[hidden] { display: none; }
.fm-goal-head { display: block; font-size: .7rem; font-weight: 800; color: #6f9a5d; }
.fm-goal-name { display: block; margin: 1px 0 5px; font-size: .9rem; line-height: 1.2; }
.fm-goal-row { display: flex; align-items: center; }
.fm-goal-bar { flex: 1 1 auto; height: 6px; border-radius: 3px; background: #eadfc4; overflow: hidden; }
.fm-goal-bar i { display: block; width: 0; height: 100%; border-radius: 3px; background: #6f9a5d; transition: width .3s; }
.fm-goal-n { flex: none; margin-left: 6px; font-size: .7rem; font-weight: 800; color: #6b5c40; font-variant-numeric: tabular-nums; }
.fm-goal-gift { flex: none; display: inline-flex; align-items: center; margin-left: 6px; font-size: .72rem; font-weight: 800; }
.fm-goal-ic { width: 16px; height: 16px; margin: 0 2px 0 0; object-fit: contain; }
.fm-goal.is-met { animation: fm-goal-met .7s ease-out; }
@keyframes fm-goal-met {
  0% { transform: scale(1); }
  35% { transform: scale(1.07); box-shadow: 0 0 0 4px rgba(111, 154, 93, .55), 0 3px 10px rgba(40, 50, 20, .25); }
  100% { transform: scale(1); }
}
.fm-goal-item { display: flex; align-items: center; margin: 0 0 6px; padding: 8px 10px; border-radius: 12px; background: #f8f2e6; }
.fm-goal-item.is-done { opacity: .6; }
.fm-goal-item.is-now { background: #eef5e4; box-shadow: inset 0 0 0 2px #b9d39f; }
.fm-goal-mark {
  flex: none; display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; margin-right: 10px;
  border-radius: 50%; background: #efe5cf; color: #6b5c40; font-size: .8rem; font-weight: 800;
}
.fm-goal-item.is-done .fm-goal-mark { background: #6f9a5d; color: #fff; }
.fm-goal-svg { width: 16px; height: 16px; }
.fm-goal-what { flex: 1 1 auto; min-width: 0; }
.fm-goal-what b { display: block; }
.fm-goal-what small { display: flex; flex-wrap: wrap; align-items: center; margin-top: 2px; color: #7a6d55; }
.fm-goal-what small > * + * { margin-left: 3px; }
.fm-goal-item .fm-btn { flex: none; margin-left: 8px; }
.fm-goalsheet .fm-btn-main { background: #6f9a5d; }
.fm-goalsheet .fm-btn-main:hover:not(:disabled) { background: #638c52; }

/* --- the mounds in the meadow --------------------------------------------------------------------- */
.fm-mound { position: absolute; padding: 0; border: 0; background: none; cursor: pointer; font: inherit; transform-origin: 50% 100%; -webkit-tap-highlight-color: transparent; }
.fm-mound[hidden] { display: none; }
.fm-mound::after { content: ''; position: absolute; top: -45%; right: -25%; bottom: -25%; left: -25%; }
.fm-mound:not(.is-up) { cursor: default; }
.fm-mound-pic {
  position: relative; display: block; width: 100%; height: 100%; object-fit: contain; pointer-events: none; -webkit-user-drag: none; transform-origin: 50% 100%;
  -webkit-mask-image: linear-gradient(#000 78%, rgba(0, 0, 0, .15)); mask-image: linear-gradient(#000 78%, rgba(0, 0, 0, .15));
}
.fm-mound-ghost { position: absolute; top: 0; left: 0; }
.fm-mound .fm-foot { top: 84%; width: 108%; height: 34%; }
.fm-mound:not(.is-up) .fm-foot { display: none; }
.fm-mound-snow {
  display: none; position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none;
  background: linear-gradient(rgba(250, 252, 255, .95), rgba(250, 252, 255, .9) 22%, rgba(250, 252, 255, 0) 48%);
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
}
.fm-s-winter .fm-mound.is-up .fm-mound-snow { display: block; }
.fm-mound.is-call .fm-mound-pic { animation: fm-mound-call .45s ease-in-out 3; }
@keyframes fm-mound-call { 0%, 100% { transform: none; } 45% { transform: translateY(-16%) scale(1.06, .94); } }
.fm-decor {
  position: absolute; padding: 0; border: 0; background: none; cursor: pointer; font: inherit; transform-origin: 50% 100%;
  -webkit-tap-highlight-color: transparent;
}
/* The bottom of the picture fades into the ground it stands in (DECOR_SINK in the script). */
.fm-decor-pic {
  position: relative; display: block; width: 100%; height: 100%; object-fit: contain; pointer-events: none; -webkit-user-drag: none;
  -webkit-mask-image: linear-gradient(#000 88%, rgba(0, 0, 0, .15)); mask-image: linear-gradient(#000 88%, rgba(0, 0, 0, .15));
}
.fm-decor .fm-shade { width: 100%; }
.fm-decor .fm-foot { background: radial-gradient(closest-side, rgba(40, 32, 10, .62), rgba(40, 32, 10, .3) 60%, rgba(40, 32, 10, 0)); }
.fm-decor-ao {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none;
  background: linear-gradient(rgba(45, 34, 14, 0) 76%, rgba(45, 34, 14, .42));
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
}
.fm-decor-snow {
  display: none; position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; background: rgba(250, 252, 255, .95);
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-composite: source-out; mask-composite: subtract;
}
.fm-s-winter .fm-decor-snow { display: block; }
.fm-heap { position: absolute; height: auto; transform: translate(-50%, -50%); pointer-events: none; -webkit-user-drag: none; }
/* The weathervane's arrow turns about its ring: its width follows the cosine of the turn. */
.fm-vane { position: absolute; pointer-events: none; animation: fm-vane-sway 7s ease-in-out infinite alternate; }
.fm-vane img { display: block; width: 100%; height: 100%; -webkit-user-drag: none; }
.fm[data-sky="rain"] .fm-vane { animation: fm-vane-turn 6s linear infinite; }
.fm[data-sky="storm"] .fm-vane { animation: fm-vane-turn 1.1s linear infinite; }
.fm[data-sky="frost"] .fm-vane { animation: none; transform: scaleX(.8); }
@keyframes fm-vane-sway { 0% { transform: scaleX(1); } 40% { transform: scaleX(.62); } 100% { transform: scaleX(.9); } }
@keyframes fm-vane-turn {
  0%, 100% { transform: scaleX(1); } 8.3% { transform: scaleX(.87); } 16.7% { transform: scaleX(.5); } 25% { transform: scaleX(.06); }
  33.3% { transform: scaleX(-.5); } 41.7% { transform: scaleX(-.87); } 50% { transform: scaleX(-1); } 58.3% { transform: scaleX(-.87); }
  66.7% { transform: scaleX(-.5); } 75% { transform: scaleX(-.06); } 83.3% { transform: scaleX(.5); } 91.7% { transform: scaleX(.87); }
}
/* Lamps light under a rainy sky. */
.fm-glow {
  display: none; position: absolute; border-radius: 50%; transform: translate(-50%, -50%); pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 244, 196, .95), rgba(255, 220, 130, .6) 30%, rgba(255, 205, 100, .18) 65%, rgba(255, 200, 90, 0));
}
.fm[data-sky="rain"] .fm-glow, .fm[data-sky="storm"] .fm-glow { display: block; animation: fm-glow 2.4s ease-in-out infinite alternate; }
@keyframes fm-glow { from { opacity: .78; } to { opacity: 1; } }
.fm-decor-run { position: absolute; }
.fm-decor-run img { display: block; width: 100%; height: 100%; transform-origin: 50% 0; -webkit-user-drag: none; }
.fm-decor-run.is-bunting img { animation: fm-flutter 3s ease-in-out infinite alternate; -webkit-animation-delay: inherit; animation-delay: inherit; }
.fm[data-sky="storm"] .fm-decor-run.is-bunting img { animation-duration: .8s; }
@keyframes fm-flutter { from { transform: skewX(-4deg) scaleY(1); } to { transform: skewX(4deg) scaleY(.93); } }
.fm-decor-back { z-index: 4; }
.fm-chime {
  position: absolute; padding: 0; border: 0; background: none; cursor: pointer; pointer-events: auto; -webkit-tap-highlight-color: transparent;
  transform-origin: 50% 4%; animation: fm-chime-sway 4.5s ease-in-out infinite alternate;
}
.fm-chime::after { content: ''; position: absolute; top: -6%; right: -50%; bottom: -6%; left: -50%; }
.fm-chime img { display: block; width: 100%; height: 100%; pointer-events: none; -webkit-user-drag: none; }
.fm[data-sky="storm"] .fm-chime { animation-duration: 1.3s; }
.fm-chime.is-ring { animation: fm-chime-ring 1.6s ease-out; }
@keyframes fm-chime-sway { from { transform: rotate(-2deg); } to { transform: rotate(2deg); } }
@keyframes fm-chime-ring {
  0% { transform: rotate(0); } 14% { transform: rotate(10deg); } 34% { transform: rotate(-7deg); } 54% { transform: rotate(4deg); }
  76% { transform: rotate(-2deg); } 100% { transform: rotate(0); }
}
.fm-decor-marks { z-index: 40; }
.fm-decor-mark {
  position: absolute; padding: 0; border: 0; border-radius: 50%; cursor: pointer; pointer-events: auto; -webkit-tap-highlight-color: transparent;
  background: radial-gradient(closest-side, rgba(255, 250, 215, .85), rgba(255, 232, 150, .55) 62%, rgba(255, 232, 150, .15));
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .9), 0 0 12px rgba(255, 236, 160, .9); animation: fm-mark 1s ease-in-out infinite alternate;
}
.fm-decor-mark.is-fence { border-radius: 12px; background: rgba(255, 240, 175, .38); }
.fm-decor-mark.is-taken { box-shadow: 0 0 0 2px rgba(255, 214, 110, .95), 0 0 12px rgba(255, 214, 110, .8); }
@keyframes fm-mark { from { opacity: .55; transform: scale(.94); } to { opacity: 1; transform: scale(1.04); } }
.fm-vane-ic { position: relative; display: block; width: 100%; height: 100%; }
/* The arrow on the post as decor-vane-post fills a square box: VANE_AT, VANE_RING and VANE_ARROW in the script. */
.fm-vane-ic-arrow { position: absolute; left: 25%; top: 12%; width: 54%; height: auto; }
.fm-decor-card { text-align: center; }
.fm-decor-card-pic { display: block; width: 104px; height: 104px; margin: 2px auto 4px; }
.fm-decor-card-pic > .fm-ic, .fm-decor-card-pic > .fm-vane-ic > .fm-ic { display: block; width: 100%; height: 100%; object-fit: contain; }
.fm-decor-btns { display: flex; margin-top: 10px; }
.fm-decor-btns .fm-btn { flex: 1 1 0; }
.fm-decor-btns > * + * { margin-left: 8px; }
.fm-dugrow {
  position: absolute; top: 50%; left: 0; right: 0; z-index: 45; transform: translateY(-50%);
  display: flex; flex-wrap: wrap; justify-content: center; pointer-events: none;
}
.fm-dug { display: block; width: 104px; height: 104px; margin: 0 6px 8px; }
.fm-dug-ic {
  display: block; width: 100%; height: 100%; object-fit: contain;
  -webkit-filter: drop-shadow(0 4px 4px rgba(40, 30, 10, .35)); filter: drop-shadow(0 4px 4px rgba(40, 30, 10, .35));
}
.fm-finds-head { display: flex; align-items: center; }
.fm-finds-head small { margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: #e4efd8; color: #3b7d2b; font-size: .7rem; font-weight: 800; }
.fm-finds-done { width: 16px; height: 16px; margin-left: 6px; }
.fm-finds { display: flex; flex-wrap: wrap; margin: 0 -4px 6px; }
.fm-find { display: flex; align-items: center; width: calc(50% - 8px); box-sizing: border-box; margin: 0 4px 8px; padding: 6px 8px; border-radius: 12px; background: #f3ead6; }
.fm-find.is-got { background: #fff1c8; }
.fm-find-pic { flex: none; width: 40px; height: 40px; margin-right: 8px; }
.fm-find-pic .fm-ic { display: block; width: 40px; height: 40px; object-fit: contain; -webkit-filter: brightness(0); filter: brightness(0); opacity: .16; }
.fm-find.is-got .fm-find-pic .fm-ic { -webkit-filter: none; filter: none; opacity: 1; }
.fm-find-text { min-width: 0; }
.fm-find-text b { display: block; font-size: .8rem; line-height: 1.2; }
.fm-find-text small { display: block; margin-top: 2px; font-size: .72rem; line-height: 1.3; color: #7a6d55; }
.fm-order.is-lost { background: #fdf3e1; box-shadow: inset 0 0 0 2px #e3c77d; }

/* --- review build tools, under the game ---------------------------------------------------------- */
.fm-review { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; margin: 10px auto 0; padding: 8px; font-size: .85rem; color: #4a5766; }
.fm-review > * { margin: 3px 4px; }
.fm-review select, .fm-review button { font: inherit; padding: 4px 8px; border-radius: 8px; border: 1px solid #ccc; background: #fff; cursor: pointer; }

/* --- full screen ---------------------------------------------------------------------------------
   #game-root itself goes full screen; these same rules are the fixed-position fallback for a browser
   without the Fullscreen API. game-layout.css gives a [data-ideal] panel an explicit width and
   height, which would beat the fallback's offsets. */
#game-root.fm-fs {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 200; margin: 0; padding: 0;
  width: auto; height: auto; max-width: none; border: 0; border-radius: 0; box-shadow: none; min-height: 0;
}
body.fm-locked { overflow: hidden; }

/* --- narrow panels: the counters and the pills shrink, the words stay -------------------------- */
@media (max-width: 420px) {
  .fm-top { left: 8px; right: 8px; }
  .fm-top-l > * + *, .fm-top-r > * + * { margin-left: 5px; }
  .fm-lv, .fm-coins, .fm-pill { height: 34px; padding: 0 9px; font-size: .8rem; }
  .fm-round { width: 34px; padding: 0; }
  .fm-lv { min-width: 74px; height: auto; min-height: 34px; padding: 3px 8px; }
  .fm-xp-text { font-size: .58rem; }
  .fm-wx-text { display: none; }
  .fm-coin-ic { width: 18px; height: 18px; margin-right: 4px; }
  .fm-tool-label { font-size: .68rem; }
  .fm-harvest { font-size: .95rem; padding: 0 18px 0 48px; }
  .fm-acts.is-pair .fm-harvest { font-size: .88rem; padding: 0 12px 0 38px; }
  .fm-acts.is-pair .fm-harvest-hand { left: 8px; width: 25px; height: 27px; margin-top: -14px; }
  .fm-acts.is-pair .fm-sow { margin-right: 6px; }
}
@media (max-width: 340px) {
  .fm-full span { font-size: .72rem; }
  .fm-acts.is-pair .fm-harvest { font-size: .78rem; padding: 0 9px 0 31px; }
  .fm-acts.is-pair .fm-harvest-hand { left: 6px; width: 21px; height: 23px; margin-top: -12px; }
  .fm-acts.is-pair .fm-sow { margin-right: 4px; }
  .fm-pill > * + * { margin-left: 4px; }
}
