/* Family "story": full-screen horizontal slides. Tokens: --fm-pop1..n (slide colour fields), --fm-display (giant
   type), --surface (list panel), --accent (start button). Slide vars: --bgc / --bgi (field + ink), --p (-1..1 swipe position). */
body.fm--story { overflow: hidden; height: 100svh; background: #111; }
.fm--story .fm-app { height: 100svh; overflow: hidden; background: var(--bg); }
.fms { position: relative; height: 100%; }

/* top: progress bars + brand + tools */
.fms-top { position: absolute; z-index: 20; top: 0; left: 0; right: 0; padding: max(10px, env(safe-area-inset-top)) 12px 0; pointer-events: none; }
.fms-top > * { pointer-events: auto; }
.fms-bars { display: flex; gap: 4px; }
.fms-bars i { position: relative; flex: 1; height: 3px; overflow: hidden; border-radius: 3px; background: color-mix(in srgb, var(--fms-ink, #fff) 30%, transparent); }
.fms-bars b { position: absolute; inset: 0; background: var(--fms-ink, #fff); transform: scaleX(0); transform-origin: left; transition: transform .5s var(--fm-ease); }
.fms-bars i.is-done b, .fms-bars i.is-on b { transform: none; }
.fms-top__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.fms-brand { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding-right: 8px; color: var(--fms-ink, #fff); font-weight: 700; font-size: 14px; letter-spacing: .02em; }
.fms-brand .mz-mark { display: grid; place-items: center; width: 34px; height: 34px; overflow: hidden; border-radius: 50%; background: rgba(255,255,255,.18); font-size: 16px; }
.fms-brand .mz-mark img { width: 100%; height: 100%; object-fit: cover; }
.fm-app:not(.is-cover) .fms-top { --fms-ink: var(--ink); }
.fm-app:not(.is-cover) .fms-top .fm-on-photo .fm-round, .fm-app:not(.is-cover) .fms-top .fm-on-photo .fm-lang.mz-lang { background: color-mix(in srgb, var(--surface) 70%, transparent); color: var(--ink); box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 18%, transparent); }
.fm-app:not(.is-cover) .fms-top .fm-on-photo .fm-lang.mz-lang a { color: var(--muted); }
.fm-app:not(.is-cover) .fms-top .fm-on-photo .fm-lang.mz-lang a.is-on { background: var(--ink); color: var(--bg); }

/* deck */
.fms-deck { display: flex; height: 100%; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; }
.fms-deck::-webkit-scrollbar { display: none; }
.fms-slide { position: relative; flex: 0 0 100%; height: 100%; overflow: hidden; scroll-snap-align: start; scroll-snap-stop: always; }

/* cover */
.fms-cover { color: #fff; background: #1a1714; }
.fms-cover__img { position: absolute; inset: 0; transform: scale(calc(1.08 - var(--p, 0) * .05)) translateX(calc(var(--p, 0) * 18%)); }
.fms-cover__img img { width: 100%; height: 100%; object-fit: cover; animation: fmsKen 18s ease-in-out infinite alternate; }
@keyframes fmsKen { to { transform: scale(1.08) translate(-2%, -1%); } }
.fms-cover__img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.45) 0%, rgba(0,0,0,.05) 30%, rgba(0,0,0,.25) 55%, rgba(0,0,0,.86) 100%); }
.fms-cover__copy { position: absolute; left: 20px; right: 20px; bottom: max(26px, env(safe-area-inset-bottom)); display: grid; gap: 12px; }
.fms-cover__kicker { margin: 0; display: inline-flex; justify-self: start; padding: 6px 12px; border-radius: 999px; background: var(--fm-pop1); color: var(--fm-pop1-ink); font-size: 12.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.fms-cover__name { display: grid; margin: 0; font-family: var(--fm-display); font-weight: var(--fm-display-weight); text-transform: var(--fm-display-case); font-size: clamp(64px, 21vw, 118px); line-height: .86; letter-spacing: var(--fm-display-track); }
.fms-cover__name span { display: block; animation: fmsRise .9s var(--fm-ease) both; animation-delay: calc(.12s + var(--i) * .09s); }
@keyframes fmsRise { from { transform: translateY(40%); opacity: 0; } to { transform: none; opacity: 1; } }
.fms-cover__about { margin: 0; max-width: 34ch; color: rgba(255,255,255,.86); font-size: 15px; line-height: 1.5; }
.fms-notes .mzb-note { margin: 0; }
.fms-start { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 58px; padding: 0 22px 0 24px; border-radius: 999px; background: var(--fm-pop1); color: var(--fm-pop1-ink); font-size: 17px; font-weight: 700; box-shadow: 0 18px 40px -16px rgba(0,0,0,.6); transition: transform .35s var(--fm-spring); }
.fms-start .icon { font-size: 22px; transition: transform .35s var(--fm-spring); }
.fms-start:active { transform: scale(.97); }
.fms-start:hover .icon { transform: translateX(4px); }
.fms-index { display: flex; gap: 8px; overflow-x: auto; margin: 0 -20px; padding: 2px 20px 4px; scrollbar-width: none; }
.fms-index::-webkit-scrollbar { display: none; }
.fms-index__a { display: inline-flex; flex: none; align-items: center; gap: 7px; min-height: 40px; padding: 0 14px; border-radius: 999px; background: rgba(255,255,255,.14); box-shadow: inset 0 0 0 1px rgba(255,255,255,.22); color: #fff; font-size: 14px; font-weight: 600; text-decoration: none; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.fms-index__a b { font-size: 11px; opacity: .7; letter-spacing: .06em; }

/* category slide */
.fms-cat { display: flex; flex-direction: column; background: var(--bgc); color: var(--bgi); --fms-ink: var(--bgi); }
.fms-stage { position: relative; flex: 0 0 52%; min-height: 330px; overflow: hidden; cursor: pointer; }
.fms-stage__photo { position: absolute; inset: 0; opacity: .35; filter: blur(14px) saturate(1.2); transform: scale(1.2); }
.fms-stage__photo img { width: 100%; height: 100%; object-fit: cover; }
.fms-giant { position: absolute; left: 0; right: 0; top: 50%; margin: 0; display: grid; justify-items: center; transform: translate3d(calc(var(--p, 0) * 46%), -46%, 0); font-family: var(--fm-display); font-weight: var(--fm-display-weight); text-transform: uppercase; letter-spacing: -.01em; line-height: .82; white-space: nowrap; pointer-events: none; }
.fms-giant span { font-size: clamp(96px, calc(250vw / var(--len)), 260px); }
.fms--giant-outline .fms-giant { color: transparent; -webkit-text-stroke: 2.5px color-mix(in srgb, var(--bgi) 78%, transparent); }
.fms--giant-solid .fms-giant { color: color-mix(in srgb, var(--bgi) 16%, transparent); }
.fms-num { position: absolute; left: 18px; bottom: 16px; font-family: var(--fm-display); font-size: 15px; letter-spacing: .1em; opacity: .75; }
.fms-star { position: absolute; left: 50%; top: 54%; width: min(56vw, 300px); transform: translate3d(calc(-50% + var(--p, 0) * -24%), -50%, 0) rotate(calc(var(--p, 0) * -14deg)); }
.fms-star__img { width: 100%; animation: fmsFloat 5.5s ease-in-out infinite; }
.fms-star__img.fm-cut.is-masked img { border-radius: 50%; }
@keyframes fmsFloat { 0%, 100% { transform: translateY(0) rotate(-1.5deg); } 50% { transform: translateY(-8px) rotate(1.5deg); } }
.fms-cat.is-on .fms-star { animation: fmsPop .8s var(--fm-spring) both; }
@keyframes fmsPop { from { opacity: 0; scale: .7; rotate: -10deg; } to { opacity: 1; scale: 1; rotate: 0deg; } }
.fms-cat.is-on .fms-giant span { animation: fmsSlide 1s var(--fm-ease) both; }
.fms-cat.is-on .fms-giant span + span { animation-delay: .08s; }
@keyframes fmsSlide { from { transform: translateX(30%); opacity: 0; } to { transform: none; opacity: 1; } }
.fms-sticker { position: absolute; right: -6px; bottom: 6%; display: grid; justify-items: start; gap: 2px; max-width: 70%; padding: 10px 14px; border-radius: 16px; background: var(--ink); color: var(--bg); transform: rotate(4deg); box-shadow: 0 14px 30px -14px rgba(0,0,0,.55); }
.fms-sticker__name { font-size: 13.5px; font-weight: 600; line-height: 1.2; margin: 0; font-family: var(--font-b); }
.fms-sticker .mz-item__price { color: var(--bgc); font-family: var(--fm-display); font-size: 22px; line-height: 1; letter-spacing: .01em; }
.fms-cat.is-on .fms-sticker { animation: fmsTag .7s .35s var(--fm-spring) both; }
@keyframes fmsTag { from { opacity: 0; transform: rotate(14deg) scale(.6); } to { opacity: 1; transform: rotate(4deg); } }
.fms-arrow { position: absolute; z-index: 3; bottom: 8px; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: var(--bgi); font-size: 22px; opacity: .8; }
.fms-arrow--prev { right: 56px; } .fms-arrow--next { right: 10px; }

.fms-panel { position: relative; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; margin: 0 8px; padding: 18px 16px 28px; border-radius: 26px 26px 0 0; background: var(--surface); color: var(--ink); box-shadow: 0 -18px 40px -24px rgba(0,0,0,.5); }
.fms-panel__title { display: flex; align-items: center; gap: 9px; margin: 0 2px 6px; font-family: var(--fm-display); font-weight: var(--fm-display-weight); text-transform: var(--fm-display-case); font-size: 26px; line-height: 1; letter-spacing: var(--fm-display-track); }
.fms-panel__title .icon { font-size: 20px; color: var(--accent-ink); }
.fms-panel__title small { margin-left: auto; font-family: var(--font-b); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.fms-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 14px 2px; border-bottom: 1px dashed var(--line); }
.fms-row:last-child { border-bottom: 0; }
.fms-row .mz-item__name { margin: 0; font-family: var(--font-b); font-size: 16.5px; font-weight: 700; line-height: 1.25; }
.fms-row .mz-item__desc { margin: 3px 0 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.fms-row .mz-item__meta { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.fms-row__price { flex: none; display: grid; justify-items: end; padding: 5px 11px; border-radius: 999px; background: var(--bgc); color: var(--bgi); font-weight: 700; font-size: 15px; white-space: nowrap; }
.fms-next { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 56px; margin-top: 14px; padding: 0 18px; border-radius: 18px; background: var(--ink); color: var(--bg); text-align: left; }
.fms-next small { display: block; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; opacity: .7; }
.fms-next span { flex: 1; font-weight: 700; font-size: 16px; }
.fms-next small + span { flex: 1; }
.fms-next .icon { font-size: 20px; }

/* info slide */
.fms-info { overflow-y: auto; background: var(--bg); color: var(--ink); --fms-ink: var(--ink); }
.fms-info__in { padding: 96px 18px 40px; }
.fms-info__title { margin: 0; font-family: var(--fm-display); font-weight: var(--fm-display-weight); text-transform: var(--fm-display-case); font-size: 46px; line-height: .95; }
.fms-info__addr { margin: 8px 0 22px; color: var(--muted); }

/* tools on colour fields */
.fms-cat .fm-round { color: var(--bgi); }

@media (prefers-reduced-motion: reduce) {
  .fms-cover__img img, .fms-star__img { animation: none !important; }
  .fms-cover__name span, .fms-cat.is-on .fms-star, .fms-cat.is-on .fms-giant span, .fms-cat.is-on .fms-sticker { animation: none !important; }
  .fms-giant, .fms-star, .fms-cover__img { transform: translate(-50%, -50%); }
  .fms-giant { transform: translateY(-46%); }
  .fms-cover__img { transform: none; }
}
html.fm-still .fms-cover__img img, html.fm-still .fms-star__img, html.fm-still .fms-cover__name span, html.fm-still .fms-cat.is-on .fms-star, html.fm-still .fms-cat.is-on .fms-giant span, html.fm-still .fms-cat.is-on .fms-sticker { animation: none !important; }
html.mz-hero-embed body.fm--story, html.mz-hero-embed .fm--story .fm-app { height: 100vh; }
