/* Family "tile": pattern bands, curved headline, arch frames, wavy ribbon nav, badge prices.
   Tokens: --fm-pop1 (tile ink + ribbon), --fm-pop2 (badge / stamp), --fm-pop3 (tile accent dots),
   --fm-pattern (optional tile image: fx pattern), --fm-display (headline), --surface, --bg. */
.fm--tile { background: var(--bg); --fmt-ink: var(--fm-pop1); --fmt-dot: var(--fm-pop3, var(--fm-pop2)); }
.fm--tile .fm-app { background: var(--bg); }

/* CSS tile: four quarter circles + centre dot on the surface colour; replaced by --fm-pattern when set */
.fmt-band, .fmt-sec__band { background-color: var(--surface);
  background-image: var(--fm-pattern, radial-gradient(circle at 50% 50%, var(--fmt-dot) 0 9%, transparent 10%), radial-gradient(circle at 0 0, var(--fmt-ink) 0 30%, transparent 31%), radial-gradient(circle at 100% 0, var(--fmt-ink) 0 30%, transparent 31%), radial-gradient(circle at 0 100%, var(--fmt-ink) 0 30%, transparent 31%), radial-gradient(circle at 100% 100%, var(--fmt-ink) 0 30%, transparent 31%), linear-gradient(45deg, transparent 47%, color-mix(in srgb, var(--fmt-ink) 55%, transparent) 48% 52%, transparent 53%), linear-gradient(-45deg, transparent 47%, color-mix(in srgb, var(--fmt-ink) 55%, transparent) 48% 52%, transparent 53%));
  background-size: 34px 34px; }
.fmt-band { height: 58px; }
.fmt-band--top { position: absolute; top: 0; left: 0; right: 0; height: 120px; -webkit-mask: linear-gradient(#000 0 0) top / 100% calc(100% - 14px) no-repeat, radial-gradient(14px at 50% 0, #000 98%, #0000) 50% 100% / 28px 14px repeat-x; mask: linear-gradient(#000 0 0) top / 100% calc(100% - 14px) no-repeat, radial-gradient(14px at 50% 0, #000 98%, #0000) 50% 100% / 28px 14px repeat-x; }

.fmt-hero { position: relative; padding: 0 0 26px; text-align: center; }
.fmt-hero__tools { position: relative; z-index: 3; display: flex; justify-content: flex-end; padding: max(12px, env(safe-area-inset-top)) 14px 0; }
.fmt-arc { position: relative; z-index: 2; margin: 50px auto -36px; width: min(100%, 440px); }
.fmt-arc svg { display: block; width: 100%; height: auto; overflow: visible; }
.fmt-arc text { font-family: var(--fm-display); font-weight: var(--fm-display-weight); fill: var(--ink); letter-spacing: .01em; }
.fmt-name { position: relative; z-index: 2; margin: 80px 20px 14px; font-family: var(--fm-display); font-size: 48px; line-height: 1; }
.fmt-frame { position: relative; z-index: 1; width: 76%; max-width: 420px; margin: 0 auto; aspect-ratio: 4 / 5; overflow: hidden; border: 6px solid var(--surface); box-shadow: 0 0 0 2px var(--fm-pop1), 0 30px 50px -30px color-mix(in srgb, var(--fm-pop1) 70%, #000); background: var(--surface-2); }
.fmt-frame > div { position: absolute; inset: -8% 0; }
.fmt-frame img { width: 100%; height: 100%; object-fit: cover; }
.fmt-frame--arch { border-radius: 999px 999px 22px 22px; }
.fmt-frame--circle { border-radius: 50%; aspect-ratio: 1; }
.fmt-stamp { position: absolute; z-index: 3; left: calc(12% - 6px); top: 62%; display: grid; place-items: center; width: 78px; height: 78px; border-radius: 50%; background: var(--fm-pop2, var(--accent)); color: var(--fm-pop2-ink, #fff); font-size: 30px; box-shadow: 0 0 0 5px var(--bg), 0 0 0 7px var(--fm-pop2, var(--accent)); animation: fmtSpin 24s linear infinite; }
@keyframes fmtSpin { to { transform: rotate(360deg); } }
.fmt-tagline { margin: 20px 20px 0; font-family: var(--fm-display); font-size: 24px; line-height: 1.2; color: var(--fm-pop1); }
.fmt-about { margin: 8px auto 0; max-width: 34ch; padding: 0 20px; color: var(--muted); font-size: 15px; line-height: 1.55; }

.fmt-ribbon { position: sticky; top: 0; z-index: 30; margin-top: 6px; padding: 14px 0; background: var(--fm-pop1); color: var(--fm-pop1-ink); }
.fmt-ribbon.is-wave { padding: 18px 0; -webkit-mask: radial-gradient(10px at 50% 0, #0000 98%, #000) 50% 0 / 20px 51% repeat-x, radial-gradient(10px at 50% 100%, #0000 98%, #000) 50% 100% / 20px 51% repeat-x; mask: radial-gradient(10px at 50% 0, #0000 98%, #000) 50% 0 / 20px 51% repeat-x, radial-gradient(10px at 50% 100%, #0000 98%, #000) 50% 100% / 20px 51% repeat-x; }
.fmt-ribbon__track { display: flex; gap: 6px; overflow-x: auto; padding: 0 14px; scrollbar-width: none; }
.fmt-ribbon__track::-webkit-scrollbar { display: none; }
.fmt-chip { display: inline-flex; flex: none; align-items: center; gap: 7px; min-height: 44px; padding: 0 16px; border-radius: 999px; color: inherit; font-weight: 700; font-size: 14.5px; text-decoration: none; opacity: .82; transition: background .25s ease, color .25s ease, transform .4s var(--fm-spring); }
.fmt-chip.is-on { background: var(--surface); color: var(--fm-pop1); opacity: 1; transform: scale(1.04); }

.fmt-extras { padding: 18px 16px 0; }
.fmt-feat { padding: 26px 0 6px; }
.fmt-feat__title { margin: 0 18px 12px; font-family: var(--fm-display); font-weight: var(--fm-display-weight); font-size: 30px; line-height: 1.05; color: var(--fm-pop1); }
.fmt-feat__row { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 18px; padding: 0 18px 10px; scrollbar-width: none; }
.fmt-feat__row::-webkit-scrollbar { display: none; }
.fmt-fcard { position: relative; flex: 0 0 46%; scroll-snap-align: start; text-align: center; }
.fmt-fcard__img { display: block; aspect-ratio: 4 / 5; overflow: hidden; border: 4px solid var(--surface); box-shadow: 0 0 0 1.5px var(--fm-pop1); }
.fmt-fcard__img.fmt-frame--circle { aspect-ratio: 1; }
.fmt-fcard__img .fm-photo { height: 100%; }
.fmt-fcard .mz-item__name { margin: 10px 0 0; font-family: var(--fm-display); font-size: 18px; font-weight: 400; line-height: 1.15; }
.fmt-fcard .fmt-badge { position: absolute; right: -4px; top: 46%; }

.fmt-main { padding-bottom: 10px; }
.fmt-sec { padding: 34px 0 6px; scroll-margin-top: 80px; }
.fmt-sec__band { height: 26px; opacity: .9; }
.fmt-sec__title { display: flex; align-items: center; justify-content: center; gap: 10px; width: max-content; max-width: calc(100% - 40px); margin: -36px auto 8px; padding: 10px 22px; border-radius: 999px; background: var(--bg); box-shadow: 0 0 0 2px var(--fm-pop1); font-family: var(--fm-display); font-weight: var(--fm-display-weight); font-size: 26px; line-height: 1.1; color: var(--fm-pop1); }
.fmt-sec__title .icon { font-size: 20px; }
.fmt-list { padding: 4px 16px 0; }
.fmt-row { display: flex; align-items: center; gap: 14px; padding: 14px 4px; border-bottom: 1.5px dotted color-mix(in srgb, var(--fm-pop1) 35%, transparent); }
.fmt-row:last-child { border-bottom: 0; }
.fmt-row__img { flex: none; width: 66px; height: 82px; overflow: hidden; border: 3px solid var(--surface); box-shadow: 0 0 0 1.5px var(--fm-pop1); }
.fmt-row__img.fmt-frame--circle { height: 66px; }
.fmt-row__img img { width: 100%; height: 100%; object-fit: cover; }
.fmt-row__tx { flex: 1; min-width: 0; }
.fmt-row .mz-item__name { margin: 0; font-family: var(--fm-display); font-weight: 400; font-size: 20px; line-height: 1.15; }
.fmt-row .mz-item__desc { margin: 3px 0 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.fmt-row .mz-item__meta { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.fmt-badge { display: grid; place-items: center; flex: none; width: 64px; height: 64px; border-radius: 50%; background: var(--fm-pop1); color: var(--fm-pop1-ink); box-shadow: 0 0 0 3px var(--bg), 0 0 0 4.5px var(--fm-pop1); transition: transform .4s var(--fm-spring); }
.fmt-badge .mz-item__price { display: grid; justify-items: center; font-weight: 800; font-size: 14px; line-height: 1.05; text-align: center; color: inherit; }
.fmt-badge .mz-item__old { margin: 0; font-size: 10px; }
.fmt-row:active .fmt-badge { transform: rotate(-12deg) scale(.94); }
.fmt-row:nth-child(3n+2) .fmt-badge { background: var(--fm-pop2, var(--fm-pop1)); color: var(--fm-pop2-ink, var(--fm-pop1-ink)); box-shadow: 0 0 0 3px var(--bg), 0 0 0 4.5px var(--fm-pop2, var(--fm-pop1)); }

.fmt-foot { margin-top: 30px; padding-bottom: 40px; text-align: center; }
.fmt-foot__name { margin: 22px 0 4px; font-family: var(--fm-display); font-size: 34px; color: var(--fm-pop1); }
.fmt-foot__addr { margin: 0 20px; color: var(--muted); font-size: 14px; }
.fm--tile .mz-wifi, .fm--tile .mz-info, .fm--tile .mzb-hours, .fm--tile .mzb-social { box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--fm-pop1) 40%, transparent); }

@media (prefers-reduced-motion: reduce) { .fmt-stamp { animation: none; } }
html.fm-still .fmt-stamp { animation: none; }
.fmt-stamp--solo { position: relative; left: auto; top: auto; margin: 26px auto 0; }
