@import url("./fonts.css");

:root {
  --ink: #191919;
  --muted: #555;
  --canvas: #fff;
  --snow: #f5f5f5;
  --line: #e3e3e3;
  --accent: #a42030;
  --accent-hover: #881727;
  --serif: "Fraunces", Georgia, serif;
  --sans: "DM Sans", system-ui, sans-serif;
  --measure: 76rem;
  --radius: .65rem;
  --motion: 210ms cubic-bezier(.22,.61,.36,1);
  --focus: #8d2733;
  --control-size: 44px;
  --control-radius: 8px;
  --panel-radius: 14px;
  --panel-shadow: 0 16px 50px #1418281f, 0 3px 12px #14182812;
  --ui: system-ui, sans-serif;
  --infomaja-paper: #f2efe7;
  --infomaja-gold: #80643a;
}
*, *::after, *::before { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: var(--canvas); font: 1rem/1.55 var(--sans); }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
svg { flex: none; }
img { display: block; width: 100%; height: auto; }
figure, h1, h2, h3, p { margin: 0; }
h1, h2 { font-family: var(--serif); line-height: 1.02; font-weight: 670; letter-spacing: -.05em; }
h1 { font-size: clamp(3.25rem, 7.2vw, 7.15rem); }
h2 { font-size: clamp(2rem, 4vw, 3.45rem); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.wrap { width: min(calc(100% - 5rem), var(--measure)); margin-inline: auto; }
.skip { position: fixed; top: .5rem; left: .5rem; z-index: 10; transform: translateY(-160%); background: white; padding: .6rem; }
.skip:focus { transform: none; }
.site-head { border-bottom: 1px solid var(--line); }
.head-inner, .foot-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.head-inner { min-height: 76px; }
.site-identity { display: flex; align-items: center; gap: .4rem; }
.language-switch {
  display: grid;
  place-items: center;
  min-width: var(--control-size);
  min-height: var(--control-size);
  border-radius: var(--control-radius);
  font: 700 .83rem/1 var(--ui);
  text-decoration: none;
  transition: background var(--motion);
}
.language-switch:hover { background: var(--snow); }
@media (max-width: 450px) {
  body:not(.map-screen) .head-inner { flex-wrap: wrap; gap: 0; padding-top: .25rem; }
  body:not(.map-screen) .site-identity { width: 100%; justify-content: space-between; }
  body:not(.map-screen) .site-head nav { gap: 1rem; }
}
.wordmark { display: inline-flex; align-items: center; flex: none; width: 12.05rem; min-height: 44px; text-decoration: none; }
.site-head nav { display: flex; gap: clamp(.8rem, 3vw, 2.2rem); font-weight: 650; }
.site-head nav a, .foot-inner > a:last-child { min-height: 44px; display: inline-flex; gap: .4rem; align-items: center; text-decoration: none; }
.site-head nav a:hover, .site-head nav [aria-current], .foot-inner > a:last-child:hover { color: var(--accent); }
.site-head nav [aria-current] { text-decoration: underline; text-underline-offset: .35em; }
.site-foot { border-top: 1px solid var(--line); }
.foot-inner { min-height: 90px; }
.foot-inner > span { color: var(--muted); font-size: .9rem; }
.foot-inner > a:last-child svg { width: 17px; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: .7rem; width: fit-content; padding: .72rem 1.05rem; min-height: 48px; border: 1px solid transparent; border-radius: var(--radius); text-decoration: none; font-weight: 700; transition: background var(--motion), color var(--motion), border-color var(--motion), scale var(--motion); }
.button:active:not(:disabled), .icon-button:active:not(:disabled) { scale: .975; }
.button svg { width: 20px; }
.primary { background: var(--accent); color: white; }
.primary:hover { background: var(--accent-hover); }
.secondary { background: white; border-color: var(--line); }
.secondary:hover { background: var(--snow); border-color: var(--ink); }
.home-hero { min-height: 610px; display: flex; align-items: center; overflow: hidden; background: var(--snow); }
.hero-grid { display: grid; grid-template-columns: 1fr 1.19fr; align-items: center; gap: 1rem; }
.hero-copy { position: relative; z-index: 2; padding-block: 3.4rem; }
.hero-copy h1 { font-size: clamp(3.7rem, 7.3vw, 7.05rem); max-width: 9ch; }
.hero-copy h1 em { font-style: normal; color: var(--accent); }
.hero-copy p { max-width: 30ch; font-size: clamp(1.05rem, 2vw, 1.28rem); color: var(--muted); margin: 1.38rem 0 1.6rem; }
.shelf { position: relative; min-width: 0; }
.shelf-art { position: relative; width: 100%; aspect-ratio: 1.28; max-height: 510px; }
.shelf-card { position: absolute; width: 55%; border: clamp(4px, .75vw, 9px) solid #fff; border-radius: 3px; box-shadow: 0 13px 22px #1c23352b, 0 2px 4px #1c233519; transform: rotate(var(--tilt)); }
.shelf-card img { aspect-ratio: 3/2; object-fit: cover; }
.shelf-star { top: 11%; left: 4%; --tilt: -13deg; }
.shelf-sled { top: 8%; right: 3%; --tilt: 12deg; }
.shelf-house { top: 39%; left: 5%; --tilt: -7deg; }
.shelf-cat { top: 47%; right: 4%; --tilt: 8deg; }
.shelf-label { display: block; text-align: center; color: var(--muted); font-size: .9rem; font-weight: 650; }
.home-schools { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; padding-block: 3.6rem; }
.home-schools p, .page-title p { color: var(--muted); max-width: 57ch; margin-top: .8rem; font-size: 1.08rem; }
.page-title { padding-block: clamp(2.5rem, 6vw, 5rem) 2rem; }
.catalog-page, .schools-page { padding-bottom: 4rem; }
.catalog-section + .catalog-section { margin-top: 3.1rem; }
.catalog-section h2 { margin-bottom: 1.1rem; }
.catalog-section { scroll-margin: 1.5rem; }
.resume { margin-top: .9rem; }
.catalog-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(.75rem, 2vw, 1.45rem); align-items: start; }
.catalog-tile { min-width: 0; display: block; text-decoration: none; background: white; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: border-color var(--motion), box-shadow var(--motion); }
.catalog-tile:hover, .catalog-tile:focus-visible { border-color: var(--ink); box-shadow: 0 4px 12px #1518250d; }
.tile-image { display: block; }
.tile-image img { aspect-ratio: 3/2; object-fit: cover; }
.tile-title { display: flex; align-items: center; justify-content: space-between; gap: .45rem; padding: .75rem .8rem; font-weight: 700; line-height: 1.3; }
.tile-title svg { width: 18px; height: 20px; color: var(--accent); }
.tile-from { display: block; color: var(--muted); padding: 0 .8rem .9rem; line-height: 1.35; }
.wall-tile .tile-title { padding-bottom: .3rem; }
#wall .catalog-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 13.5rem), 1fr)); }
.schools-title { display: flex; align-items: end; justify-content: space-between; gap: 1.25rem; }
.schools-title { padding-block: clamp(2rem, 4vw, 3.15rem) 1.45rem; }
.schools-title h1 { font-size: clamp(2.9rem, 5.45vw, 5rem); }
.schools-title > .button { flex: none; }
.wall-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .6rem 1.25rem; margin-bottom: 1.15rem; }
.wall-bar p, .received-note, .field-note, .counter { color: var(--muted); font-size: .9rem; }
.segments { display: inline-flex; width: fit-content; align-items: stretch; padding: 3px; gap: 3px; background: var(--snow); border: 1px solid var(--line); border-radius: .63rem; }
.segments button { min-height: 44px; padding: .35rem .8rem; display: inline-flex; align-items: center; justify-content: center; gap: .42rem; background: transparent; border: 1px solid transparent; border-radius: .43rem; color: var(--muted); font-weight: 700; transition: background var(--motion), color var(--motion); }
.segments button svg { width: 17px; height: 17px; }
.segments button:hover { color: var(--ink); }
.segments button[aria-pressed=true] { color: var(--ink); background: #fff; border-color: var(--line); box-shadow: 0 1px 2px #12162513; }
dialog { background: white; color: var(--ink); border: 1px solid var(--line); border-radius: 1rem; padding: 0; width: min(1120px, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); overscroll-behavior: contain; box-shadow: 0 1rem 4rem #12162542; }
dialog[open] { animation: dialog-in 340ms cubic-bezier(.22,.61,.36,1) both; }
dialog::backdrop { background: #101420ad; animation: backdrop-in 320ms ease-out both; }
@keyframes backdrop-in { from { opacity: 0; } }
dialog.dialog-dismissing::backdrop { animation: backdrop-in 160ms ease-in reverse both; }
body:has(dialog[open]) { overflow: hidden; }
@keyframes dialog-in { from { transform: translateY(7px) scale(.99); opacity: 0; } to { transform: none; opacity: 1; } }
.dialog-head { position: sticky; z-index: 2; top: 0; background: white; display: flex; align-items: center; justify-content: space-between; gap: .5rem; border-bottom: 1px solid var(--line); padding: .55rem 1.1rem; }
.dialog-head h2 { font-size: clamp(1.45rem, 2.8vw, 2.25rem); }
.icon-button { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: .4rem; background: white; border: 1px solid var(--line); transition: background var(--motion), scale var(--motion); }
.icon-button:hover { background: var(--snow); }
.received { padding: clamp(.55rem, 2vw, 1.5rem); margin-inline: auto; max-width: 960px; container-type: inline-size; }
.received-note { margin-top: .75rem; text-align: center; }
.postcard {
  display: grid;
  min-width: 0;
  aspect-ratio: 3 / 2;
  isolation: isolate;
  overflow: hidden;
  background: #152743;
  box-shadow: 0 12px 20px #17171720, 0 2px 4px #17171724;
  color: #fffaf0;
  --letter-inset: 6%;
  --letter-width: 44%;
  --letter-align: end;
  --letter-font: Georgia, "Times New Roman", serif;
  --letter-shadow: 0 1px 5px #000b;
}
.postcard-art, .postcard-letter { grid-area: 1 / 1; min-height: 0; min-width: 0; }
.postcard-art { position: relative; overflow: hidden; }
.postcard-art img { position: absolute; width: 100%; height: 100%; object-fit: cover; }
.postcard-letter {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  justify-self: var(--letter-align);
  width: var(--letter-width);
  margin-inline: var(--letter-inset);
  gap: clamp(.32rem, 1.75cqw, 1.15rem);
  text-shadow: var(--letter-shadow);
}
.postcard:has(.postcard-letter p:not([hidden])) .postcard-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 40%, #11121bc4 66%, #11121bdc 100%);
  pointer-events: none;
}
.letter-to, .letter-from { font: 550 clamp(.69rem, 2.35cqw, 1.5rem)/1.18 var(--letter-font); }
.letter-from { font-style: italic; }
.letter-to, .letter-from, .letter-text { overflow-wrap: anywhere; }
.letter-text { font: 550 clamp(1rem, 4.4cqw, 3.1rem)/1.09 var(--letter-font); letter-spacing: -.025em; }
.postcard.long-greeting .letter-text { font-size: clamp(.86rem, 3.32cqw, 2.45rem); }
.postcard.long-names :is(.letter-to, .letter-from) { font-size: clamp(.62rem, 1.96cqw, 1.25rem); }
.design-joulutaht { --letter-align: start; --letter-font: "Times New Roman", serif; }
.design-joulutaht:has(.postcard-letter p:not([hidden])) .postcard-art::after { background: linear-gradient(270deg, transparent 35%, #4c0815c9 68%, #4c0815e8); }
.design-kass { --letter-font: "Fraunces", Georgia, serif; --letter-width: 42%; }
.design-kass:has(.postcard-letter p:not([hidden])) .postcard-art::after { background: linear-gradient(90deg, transparent 39%, #102039c7 67%, #102039f0); }
.design-kelk { --letter-font: "Trebuchet MS", system-ui, sans-serif; }
.design-talveoo {
  --letter-width: 57%;
  --letter-align: center;
  --letter-font: Georgia, "Times New Roman", serif;
  text-align: center;
}
.design-talveoo:has(.postcard-letter p:not([hidden])) .postcard-art::after {
  background: radial-gradient(ellipse at 50% 46%, #0f1c36c2, transparent 65%);
}
.design-paberipaike {
  --letter-width: 43%;
  --letter-align: start;
  --letter-font: "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --letter-shadow: none;
}
.design-paberipaike .letter-text { font-weight: 760; letter-spacing: -.06em; }
.design-paberipaike:has(.postcard-letter p:not([hidden])) .postcard-art::after {
  background: linear-gradient(90deg, #850900a3 0%, #85090065 43%, transparent 58%);
}
.design-lumemees {
  --letter-width: 46%;
  --letter-align: start;
  --letter-font: var(--serif);
  --letter-shadow: 0 1px 4px #260d1d;
}
.design-lumemees:has(.postcard-letter p:not([hidden])) .postcard-art::after {
  background: linear-gradient(90deg, #1c0718e8 0%, #260b1de6 43%, #260b1d99 53%, transparent 64%);
  mask-image: linear-gradient(180deg, transparent 6%, black 24%, black 73%, transparent 97%);
}
.design-kuldoks {
  --letter-width: 49%;
  --letter-align: start;
  --letter-shadow: none;
  color: #fff0cc;
}
.design-kuldoks:has(.postcard-letter p:not([hidden])) .postcard-art::after { background: none; }
.motif { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.motif i { position: absolute; display: block; }
.design-lumemees .postcard-art img {
  transform-origin: 64% 71%;
  animation: sled-bump 5.8s cubic-bezier(.27,.68,.24,1) infinite;
}
@keyframes sled-bump {
  0%, 56%, 100% { transform: scale(1.035); }
  65% { transform: translate(1.1%, .3%) rotate(1.3deg) scale(1.06); }
  74% { transform: translate(1.8%, .65%) rotate(-.6deg) scale(1.06); }
  88% { transform: scale(1.035); }
}
.design-lumemees .motif i {
  left: 44%;
  top: calc(67% + var(--x) * .18);
  width: calc(var(--size) * 3.8);
  height: max(1.5px, calc(var(--size) * .46));
  background: #f6dfe5;
  border-radius: 90% 40% 65% 35%;
  animation: sled-spray calc(var(--t) * .31) ease-out var(--d) infinite;
}
@keyframes sled-spray {
  0% { opacity: 0; transform: translate(0, 0) rotate(24deg) scale(.18); }
  19% { opacity: .84; }
  100% { opacity: 0; transform: translate(-37cqw, -15cqw) rotate(20deg) scale(1.2); }
}
.design-kuldoks .motif::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("./kuldoks.webp") center / cover;
  filter: brightness(1.52) saturate(.74);
  mask: linear-gradient(118deg, transparent 42%, black 50%, transparent 58%) 100% 0 / 275% 100%;
  animation: foil-light 7.8s ease-in-out infinite;
}
@keyframes foil-light {
  0%, 19% { mask-position: 100% 0; opacity: 0; }
  35% { opacity: .8; }
  62%, 100% { mask-position: 0 0; opacity: 0; }
}
.collection-card { --letter-align: start; --letter-width: 45%; --letter-font: var(--serif); }
.collection-card .postcard-letter { gap: clamp(.22rem, 1.5cqw, 1rem); }
.collection-card.long-greeting .letter-text { font-size: clamp(.7rem, 3.25cqw, 2.4rem); }
.collection-card.collection-light { color: #242224; --letter-shadow: none; }
.collection-card:has(.postcard-letter p:not([hidden])) .postcard-art::after { background: none; }
.collection-card:is(.design-tordituvi, .design-sokikadunud, .design-konnakahvel, .design-rebasesegadus) {
  --letter-align: end;
  --letter-width: 43%;
}
.collection-card:is(.design-tordituvi, .design-sokikadunud, .design-konnakahvel, .design-rebasesegadus):has(.postcard-letter p:not([hidden])) .postcard-art::after {
  background: linear-gradient(90deg, transparent 45%, #100a203d 61%, #100a2026);
}
.postcard-age {
  position: absolute;
  z-index: 1;
  inset: 6% 6% auto auto;
  display: grid;
  place-items: center;
  min-width: 14%;
  aspect-ratio: 1;
  padding: 0 .14em;
  border: .11em double currentColor;
  border-radius: 50%;
  background: #22202b;
  color: #fff0c3;
  font: 800 clamp(1rem, 7cqw, 4.6rem)/1 var(--serif);
  rotate: 8deg;
  box-shadow: 1px 3px 0 #0005;
}
.design-tordituvi .postcard-age, .design-konnakahvel .postcard-age { inset: auto auto 5% 5%; rotate: -10deg; }
.design-tordituvi .postcard-age { background: #f79dce; color: #281233; border-radius: .23em; }
.design-konnakahvel .postcard-age { background: #78291e; color: #fbe299; }
.design-kartuliamet .postcard-age { border-radius: .14em; background: #332617; }
.design-saunakroon .postcard-age { background: #8c2728; }
.birthday-field input { max-width: 8rem; }
.collection-card.design-kaheksajalg:has(.postcard-letter p:not([hidden])) .postcard-art::after {
  background: linear-gradient(90deg, #0a1935b8, #0a1935a6 46%, transparent 59%);
}
.collection-card .motif { container-type: size; }
.collection-card .motif i { display: none; }
.collection-card[data-motion="snow"] .motif i {
  display: block; left: calc(48% + var(--x) * .52); top: -7%;
  width: var(--size); aspect-ratio: 1; border-radius: 50%; background: #fff;
  animation: collection-snow var(--t) linear var(--d) infinite;
}
@keyframes collection-snow {
  0% { opacity: 0; transform: translate(0); }
  15%, 65% { opacity: .82; }
  100% { opacity: 0; transform: translate(-8cqw, 106cqh); }
}
.collection-card[data-motion="ripple"] .motif i:nth-child(-n + 4) {
  display: block; top: 69%; left: 74%; width: 26%; height: 7%;
  border: 1px solid #fff9d7; border-radius: 50%;
  animation: collection-ripple 3.9s ease-out var(--d) infinite;
}
@keyframes collection-ripple {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.3); }
  20% { opacity: .7; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.75); }
}
.collection-card[data-motion="steam"] .motif i:nth-child(-n + 6) {
  display: block; left: calc(63% + var(--x) * .12); top: 37%; width: 5%; height: 9%;
  border-inline: 1px solid #fff9e6; border-radius: 50%; filter: blur(1px);
  animation: collection-steam var(--t) ease-out var(--d) infinite;
}
@keyframes collection-steam {
  0% { opacity: 0; transform: scale(.34); }
  25% { opacity: .9; }
  100% { opacity: 0; transform: translate(-6cqw, -21cqh) rotate(24deg) scale(1.4); }
}
.collection-card[data-motion="bubble"] .motif i {
  display: block; left: calc(53% + var(--x) * .42); top: 85%; width: calc(var(--size) * 2.2);
  aspect-ratio: 1; border: 1px solid #8ae7e0; border-radius: 50%;
  box-shadow: inset 1px 0 1px #fff7;
  animation: collection-bubble var(--t) ease-out var(--d) infinite;
}
@keyframes collection-bubble {
  0% { opacity: 0; transform: scale(.4); }
  23% { opacity: .85; }
  100% { opacity: 0; transform: translate(5cqw, -85cqh) scale(1.35); }
}
.collection-card:is([data-motion="orbit"], [data-motion="scatter"]) .motif i {
  display: block; top: 41%; left: 78%; width: var(--size); height: var(--size);
  background: #fff4a8; animation: collection-orbit var(--t) linear var(--d) infinite;
}
.collection-card[data-motion="scatter"] .motif i {
  background: #ff5ca2; animation: collection-scatter calc(var(--t) + 2s) ease-out var(--d) infinite;
}
.collection-card[data-motion="scatter"] .motif i:nth-child(3n) { background: #ffe95c; }
.collection-card[data-motion="scatter"] .motif i:nth-child(3n + 1) { background: #9cd6ff; }
@keyframes collection-orbit {
  0%, 100% { opacity: .15; transform: rotate(var(--angle)) translateX(9cqw) scale(.6); }
  45% { opacity: .88; }
  99% { transform: rotate(calc(var(--angle) + 360deg)) translateX(9cqw) scale(.7); }
}
@keyframes collection-scatter {
  0%, 38% { opacity: 0; transform: rotate(var(--angle)) translateX(1cqw) scale(.35); }
  50% { opacity: .95; }
  88%, 100% { opacity: 0; transform: rotate(var(--angle)) translateX(19cqw) rotate(140deg) scale(1.3); }
}
.collection-card:is([data-motion="glint"], [data-motion="disco"], [data-motion="beam"]) .motif::after {
  content: ""; position: absolute; inset: 0; mix-blend-mode: screen;
  background: linear-gradient(115deg, transparent 53%, #efce994e 68%, transparent 83%);
  animation: collection-glint 6.7s ease-in-out infinite;
}
.collection-card[data-motion="disco"] .motif::after {
  background: conic-gradient(from -30deg at 74% 17%, transparent 0% 8%, #ee93dd4c 10%, transparent 13% 28%, #b6d9ff33 30%, transparent 34%);
  animation: collection-glint 4.4s ease-in-out infinite;
}
.collection-card[data-motion="beam"] .motif::after {
  background: linear-gradient(100deg, #faec6e00, #fff692a1);
  clip-path: polygon(80% 43%, 84% 43%, 95% 93%, 71% 93%);
  animation: collection-beam 3.7s ease-in-out infinite alternate;
}
@keyframes collection-glint {
  0%, 17%, 76%, 100% { opacity: 0; }
  42% { opacity: .95; }
  0% { transform: translateX(-14%); }
  76%, 100% { transform: translateX(23%); }
}
@keyframes collection-beam { from { opacity: .16; } to { opacity: .84; } }
.collection-card[data-motion="scan"] .motif::after {
  content: ""; position: absolute; inset: 23% 7% 29% 60%;
  border-radius: 22%; pointer-events: none;
  background: repeating-linear-gradient(0deg, transparent 0 4px, #f3d9ff25 5px 7px) 0 0 / 100% 16px;
  animation: collection-scan 3.1s linear infinite;
}
@keyframes collection-scan { to { background-position-y: 16px; } }
.collection-card .postcard-art img { transform-origin: 77% 56%; }
.collection-card[data-motion="nap"] .postcard-art img { animation: breath 5.2s ease-in-out infinite alternate; }
.collection-card[data-motion="flight"] .postcard-art img { animation: collection-flight 6s ease-in-out infinite alternate; }
.collection-card[data-motion="roll"] .postcard-art img { animation: collection-roll 4.1s ease-in-out infinite alternate; }
.collection-card[data-motion="swing"] .postcard-art img {
  transform-origin: 79% 11%; animation: collection-swing 5.2s ease-in-out infinite alternate;
}
.collection-card[data-motion="beat"] .postcard-art img { animation: collection-beat 4.6s cubic-bezier(.25,.65,.28,1) infinite; }
@keyframes collection-flight { from { transform: scale(1.045); } to { transform: translate(1.6%, -1%) scale(1.075); } }
@keyframes collection-roll { from { transform: scale(1.055) rotate(-.9deg); } to { transform: scale(1.08) rotate(1.15deg); } }
@keyframes collection-swing { from { transform: scale(1.045) rotate(-.65deg); } to { transform: scale(1.057) rotate(.7deg); } }
@keyframes collection-beat {
  0%, 44%, 68%, 100% { transform: scale(1.025); }
  48% { transform: translateY(-1.2%) scale(1.07); }
  55% { transform: translateY(1%) scale(1.04); }
  60% { transform: translateY(-.65%) scale(1.05); }
}
.design-talvemaja .motif i, .design-kelk .motif i { left: var(--x); top: -8%; width: var(--size); height: var(--size); background: #fff; border-radius: 50%; opacity: .8; animation: flake var(--t) linear var(--d) infinite; }
@keyframes flake { to { transform: translate(31px, 115cqh); } }
.design-talvemaja .motif, .design-kelk .motif { container-type: size; }
.design-kelk .motif i { width: calc(var(--size) * 3); height: max(2px, calc(var(--size) / 2)); opacity: .9; animation-name: sled-snow; animation-duration: calc(var(--t) * .6); }
@keyframes sled-snow { to { transform: translate(-85cqw, 115cqh) rotate(-14deg); } }
.design-joulutaht .motif::after { content: ""; position: absolute; inset: -30%; background: linear-gradient(110deg, transparent 45%, #ffe2a460 50%, transparent 55%); transform: translateX(-75%); mix-blend-mode: screen; animation: gold 5.4s ease-in-out infinite; }
@keyframes gold { 45%, 100% { transform: translateX(75%); } }
.design-kass .motif::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 16% 25%, #ffe39c75, transparent 40%); mix-blend-mode: screen; animation: candle 1.9s ease-in-out infinite alternate; }
.design-kass .postcard-art img { transform-origin: 70% 60%; animation: breath 4.8s ease-in-out infinite alternate; }
@keyframes candle { 0%, 48% { opacity: .3; } 32% { opacity: .72; } 83%, 100% { opacity: .95; } }
@keyframes breath { from { transform: scale(1); } to { transform: scale(1.035); } }
.design-talveoo .motif i {
  width: clamp(2px, .6cqw, 6px); aspect-ratio: 1; border-radius: 50%;
  background: #ffecd0; box-shadow: 0 0 .6rem #ffdfb9;
  left: 26%; top: 15%; animation: starlight 5.6s ease-in-out infinite;
}
.design-talveoo .motif i:nth-child(2) { left: 61%; top: 19%; animation-delay: -2.3s; }
.design-talveoo .motif i:nth-child(3) { left: 76%; top: 29%; animation-delay: -3.5s; }
@keyframes starlight { 0%, 79%, 100% { opacity: .12; transform: scale(.48); } 46% { opacity: .92; transform: scale(1.28); } }
.design-paberipaike .motif::before {
  content: ""; position: absolute; inset: 0 0 0 47%; pointer-events: none;
  background: linear-gradient(118deg, transparent 30%, #ffe9a477 49%, transparent 65%);
  mix-blend-mode: screen; transform: translateX(-100%); animation: paper-light 6.4s ease-in-out infinite;
}
@keyframes paper-light { 0%, 14% { opacity: 0; transform: translateX(-90%); } 35% { opacity: .85; } 58%, 100% { opacity: 0; transform: translateX(85%); } }
.field { display: block; font-weight: 650; margin-bottom: .65rem; }
.field > span:not([class]) { color: var(--muted); font-weight: 450; }
.field input, .field textarea, .field select { display: block; width: 100%; border-radius: .4rem; border: 1px solid #aeb7c3; background-color: white; padding: .55rem .7rem; margin-top: .2rem; min-height: 44px; font-weight: 450; }
.field textarea { resize: vertical; }
.search-wrap, .select-wrap { display: block; position: relative; }
.field input[type=search] { padding-left: 2.35rem; }
.field input[type=search]::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }
.search-wrap > svg, .select-wrap > svg { position: absolute; top: 50%; transform: translateY(-50%); pointer-events: none; width: 18px; height: 18px; color: var(--muted); }
.search-wrap > svg { left: .72rem; }
.select-wrap > svg { right: .85rem; }
.field select { appearance: none; padding-right: 2.5rem; }
.results { display: grid; gap: 1px; max-height: 13rem; overflow: auto; }
.results button { display: flex; align-items: center; justify-content: space-between; gap: .5rem; min-height: 44px; border: 1px solid var(--line); border-radius: .3rem; background: white; text-align: left; padding: .38rem .65rem; }
.results button:hover { background: var(--snow); }
.results button:focus-visible { outline-offset: -3px; }
.results small { color: var(--muted); }
.submit-button { width: 100%; }
#greeting-map { display: grid; grid-template-columns: minmax(0, 3fr) minmax(15.5rem, 1fr); gap: 1.25rem; align-items: start; }
.map-list { display: grid; gap: .5rem; }
.map-list h2 { margin-block: .25rem .2rem; font: 750 1.05rem/1.3 var(--sans); letter-spacing: -.02em; }
.map-list .catalog-tile + h2 { margin-top: .7rem; }
.map-list .catalog-tile { display: grid; grid-template-columns: 4.4rem 1fr; grid-template-rows: auto auto; min-height: 61px; }
.map-list .tile-image { grid-row: 1 / 3; }
.map-list .tile-image img { width: 100%; height: 100%; object-fit: cover; }
.map-list .tile-title { padding: .45rem .52rem .05rem; font-size: .9rem; }
.map-list .tile-from { padding: .05rem .55rem .42rem; font-size: .8rem; }
.map-list .tile-title svg { height: 16px; }
.map-stage { height: min(64vh, 660px); min-height: 400px; position: relative; isolation: isolate; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--line); background: #dae9f7; }
.map-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: pan-y; cursor: grab; }
.map-stage canvas:active { cursor: grabbing; }
.map-stage.map-expanded { position: fixed; z-index: 5; inset: .5rem; height: auto; min-height: 0; box-shadow: 0 0 0 100vmax #121625ab; }
body:has(.map-expanded) { overflow: hidden; }
.map-stage.map-expanded :is(canvas, .map-marker, .map-dot) { touch-action: none; }
.map-markers { position: absolute; inset: 0; pointer-events: none; isolation: isolate; }
.map-marker { z-index: 2; pointer-events: auto; position: absolute; display: grid; align-content: start; width: var(--map-card-width); transform: translate(-50%, -100%); border: 2px solid white; border-radius: .35rem; background: white; box-shadow: 0 5px 12px #10244246; text-decoration: none; color: #12263e; transition: border-color var(--motion), box-shadow var(--motion); }
.map-marker img { width: 100%; border-radius: .22rem .22rem 0 0; }
.map-marker-name { padding: .24rem .16rem .22rem; font-size: clamp(.68rem, 1vw, .76rem); font-weight: 750; line-height: 1.12; text-align: center; text-wrap: balance; overflow-wrap: anywhere; }
.map-marker:hover, .map-marker:focus-visible { border-color: var(--accent); box-shadow: 0 6px 14px #10244262; z-index: 3; }
.map-controls { position: absolute; z-index: 1; display: flex; border: 1px solid #b6c3ce; border-radius: .45rem; overflow: hidden; background: white; box-shadow: 0 2px 4px #1216251c; }
.map-view-controls { top: .65rem; left: .65rem; }
.map-nav-controls { flex-direction: column; right: .65rem; bottom: 1.8rem; }
.map-controls button { display: grid; place-items: center; width: 44px; height: 44px; background: white; border: 0; font-weight: 750; }
.map-nav-controls button + button { border-top: 1px solid var(--line); }
.map-view-controls button + button { border-left: 1px solid var(--line); }
.map-controls button:hover, .map-controls [aria-pressed=true] { background: var(--ink); color: white; }
.map-controls button { transition: background var(--motion), color var(--motion); }
.map-controls button:focus-visible { outline-offset: -4px; }
.map-controls svg { width: 20px; height: 20px; }
.map-status { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(calc(100% - 2rem), 22rem); padding: 1rem; text-align: center; background: white; border: 1px solid var(--line); border-radius: var(--radius); }
.map-status button { margin-top: .7rem; }
.map-note { position: absolute; bottom: 0; left: 0; font-size: .75rem; background: #fff; color: var(--muted); padding: .2rem .5rem; }
.map-note a { font-weight: 700; }
.map-controls button:disabled { opacity: .45; cursor: default; }
@container (max-width: 34rem) {
  .letter-text { font-size: clamp(1.15rem, 5.4cqw, 1.58rem); }
}
@media (max-width: 980px) {
  .wrap { width: calc(100% - 3rem); }
  .home-hero { min-height: 490px; }
}
@media (max-width: 680px) {
  .wrap { width: calc(100% - 2rem); }
  .head-inner { min-height: 64px; }
  .wordmark { width: 10rem; }
  .site-head nav { font-size: .94rem; gap: clamp(.55rem, 2.5vw, 1.35rem); }
  .home-hero { min-height: 0; }
  .hero-grid { grid-template-columns: 1fr; gap: .35rem; padding-bottom: 1.25rem; }
  .hero-copy { padding-block: 2.4rem .55rem; }
  .hero-copy h1 { font-size: clamp(3.55rem, 11vw, 5rem); }
  .hero-copy p { margin-block: .95rem 1.15rem; }
  .shelf-art { max-height: 320px; width: min(100%, 430px); margin-inline: auto; }
  .home-schools, .schools-title { flex-direction: column; align-items: flex-start; }
  .home-schools { padding-block: 2.5rem; }
  .foot-inner { flex-wrap: wrap; padding-block: .75rem; gap: .25rem .75rem; }
  .foot-inner > span { font-size: .8rem; }
  .catalog-grid, #wall .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile-title, .tile-from { padding-inline: .55rem; }
  .wall-tile .tile-title { align-items: start; }
  dialog { width: calc(100% - 1rem); max-height: calc(100dvh - 1rem); }
  .map-stage { min-height: 400px; }
  .map-view-controls { left: .4rem; top: .4rem; }
  .map-nav-controls { right: .4rem; }
}
@media (max-width: 810px) {
  #greeting-map { grid-template-columns: 1fr; }
}
@media (max-width: 350px) {
  .head-inner { gap: .4rem; }
  .site-head nav { font-size: .87rem; gap: .5rem; }
  .head-inner .wordmark { width: 8.55rem; }
  .hero-copy h1 { font-size: 3.15rem; }
}
@media (max-height: 540px) {
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .motif { display: none; }
}

/* The public map fills the viewport. Composition and reading use the shared dialog. */
.map-screen { overflow: hidden; }
.map-screen #sisu, .map-screen .schools-page, .map-screen #greeting-map { width: 100%; height: 100dvh; margin: 0; padding: 0; display: block; }
.map-screen .site-head { position: fixed; left: 1rem; right: 1rem; top: max(1rem, env(safe-area-inset-top)); z-index: 3; width: fit-content; max-width: calc(100% - 2rem); border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: 0 4px 16px #12162519; }
.map-screen .head-inner { width: auto; min-height: 54px; padding-inline: .9rem; gap: 1.4rem; }
.map-screen .map-stage { --map-edge: .8rem; --map-dock-bottom: calc(1.8rem + env(safe-area-inset-bottom)); height: 100dvh; min-height: 0; border: 0; border-radius: 0; }
.map-screen .map-stage :is(canvas, .map-marker, .map-dot) { touch-action: none; }
.map-screen .map-nav-controls { right: var(--map-edge); bottom: var(--map-dock-bottom); }
.map-screen dialog::backdrop { background: #10142076; }
.overlay-content { padding: clamp(.85rem, 2.4vw, 1.5rem); }
.overlay-content > p { color: var(--muted); margin-bottom: 1rem; }
.overlay-content .catalog-section { scroll-margin-top: 5rem; }
.place-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .55rem; }
.place-results { margin: -.4rem 0 .65rem; }
.place-results button { display: grid; justify-content: stretch; justify-items: start; gap: 0; }
.place-results button small { line-height: 1.25; }
.place-results p { padding: .35rem .15rem; }
@media (max-width: 680px) {
  .map-screen .site-head { left: .55rem; right: .55rem; top: max(.55rem, env(safe-area-inset-top)); max-width: calc(100% - 1.1rem); }
  .map-screen .head-inner { gap: .28rem; padding-inline: .45rem; }
  .map-screen .wordmark { width: clamp(7.05rem, 37.2vw, 9.5rem); }
  .place-fields { grid-template-columns: minmax(0, 1fr); gap: 0; }
}

dialog.send-window {
  position: fixed;
  inset: 0;
  margin: 0;
  width: 100%;
  height: 100dvh;
  max-width: none;
  max-height: none;
  border: 0;
  border-radius: 0;
  background: var(--canvas);
}
.send-window[open]:not(.send-closing) { animation: send-open 360ms cubic-bezier(.22,.7,.27,1) both; }
@keyframes send-open { from { opacity: 0; translate: 0 .45rem; } }
.catalog-window .art-catalog, .greeting-library .catalog-grid {
  animation: send-open 380ms cubic-bezier(.22,.61,.36,1) 65ms both;
}
.send-window .dialog-head {
  padding-inline: max(1rem, calc((100% - var(--measure)) / 2));
  padding-top: max(.35rem, env(safe-area-inset-top));
}
.dialog-actions { display: flex; align-items: center; gap: .45rem; }
.dialog-actions .change-card { white-space: nowrap; }
.send-window .overlay-content { max-width: calc(var(--measure) + 2rem); margin-inline: auto; }
.send-window .overlay-content { padding-block: clamp(.85rem, 2vw, 1.9rem) 3rem; }
.email-fields { margin-bottom: .85rem; }
.send-closing::backdrop { animation: send-backdrop-out 245ms ease-in both; }
@keyframes send-backdrop-out { to { opacity: 0; } }
.postcard-flight { position: fixed; z-index: 7; top: 0; left: 0; pointer-events: none; border-radius: .45rem; overflow: hidden; border: 2px solid white; box-shadow: 0 .7rem 1.9rem #14203375; }
.postcard-flight img { display: block; width: 100%; height: auto; }
.send-result { position: absolute; z-index: 2; top: max(1rem, env(safe-area-inset-top)); right: 1rem; display: flex; align-items: center; justify-content: space-between; gap: .65rem; max-width: min(100% - 2rem, 29rem); padding: .55rem .65rem .55rem .95rem; background: white; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 4px 16px #12162525; }
.send-result-actions { display: flex; align-items: center; gap: .25rem; }
.send-result-actions .button { white-space: nowrap; }
@media (min-width: 831px) {
  .email-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: .55rem; }
  .email-fields > p { grid-column: 1 / -1; }
}
@media (max-width: 830px) {
  .send-result { top: auto; bottom: calc(1.8rem + env(safe-area-inset-bottom)); left: .55rem; right: 3.9rem; max-width: none; }
}
@media (max-width: 420px) {
  .send-window .dialog-head { padding-inline: .7rem; }
  .send-window .change-card { padding-inline: .48rem; font-size: .82rem; }
  .send-window .change-card svg { width: 16px; }
  .send-result { flex-wrap: wrap; }
  .send-result-actions { margin-left: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .send-closing::backdrop { animation: none; }
}

/* The art uses its own typography. The writing surface shares one neutral set of controls. */
dialog.design-workspace, #postcard-aux {
  --editor-ink: #181818;
  --editor-quiet: #595959;
  --editor-rule: #e4e4e4;
  --editor-field-rule: #aaa;
  color: var(--editor-ink);
  background: white;
  font-family: system-ui, sans-serif;
}
.design-workspace .dialog-head {
  min-height: 64px;
  border-color: var(--editor-rule);
  padding-inline: clamp(.65rem, 3.6vw, 4.5rem);
}
.design-workspace .dialog-head h2, #postcard-aux .dialog-head h2 {
  font-family: inherit;
  font-weight: 650;
  letter-spacing: -.04em;
  font-size: clamp(1.18rem, 2.1vw, 1.65rem);
}
.design-workspace .dialog-actions { gap: .15rem; }
.design-workspace :is(.change-card, .icon-button), #postcard-aux .icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  min-height: 44px;
  border: 0;
  border-radius: 2px;
  background: transparent;
  font-weight: 550;
}
.design-workspace .change-card { padding: .4rem .6rem; }
.design-workspace .change-card svg { width: 18px; }
.design-workspace .editor-help { font-size: 1.16rem; }
.design-workspace :is(.change-card, .icon-button):hover, #postcard-aux .icon-button:hover { background: #f3f3f3; }
.editor-preview { min-width: 0; container-type: inline-size; }
#editor-fields { min-width: 0; }
.design-workspace .field, #postcard-aux .field { font-size: .9rem; font-weight: 600; margin-bottom: .85rem; }
.design-workspace .field > span:not([class]) { font-weight: inherit; color: inherit; }
.design-workspace .field input, .design-workspace textarea, .pick-recipient, #postcard-aux .field input {
  width: 100%;
  min-height: 44px;
  margin-top: .25rem;
  padding: .5rem .65rem;
  border: 1px solid var(--editor-field-rule);
  border-radius: var(--control-radius);
  background: white;
  font: 400 1rem/1.35 var(--ui);
}
.design-workspace .search-wrap input, #postcard-aux .search-wrap input { padding-inline-start: 2.2rem; }
.design-workspace .field:has(.pick-recipient) { display: grid; }
.pick-recipient { display: flex; gap: .45rem; align-items: center; justify-content: space-between; text-align: start; }
.pick-recipient svg, .email-details svg { width: 18px; }
.pick-recipient:hover { background: #f6f6f6; }
.greeting-field { display: grid; grid-template-columns: 1fr auto; gap: 0 .35rem; margin-bottom: .85rem; }
.greeting-field .field { margin-bottom: 0; }
.greeting-field textarea { grid-column: 1 / -1; resize: vertical; }
.greeting-field .counter { font-size: .78rem; font-variant-numeric: tabular-nums; color: var(--editor-quiet); }
.visibility-line label { display: flex; width: fit-content; align-items: center; gap: .45rem; min-height: 44px; font-size: .9rem; }
.visibility-line input { width: 17px; height: 17px; margin: 0; accent-color: #242424; }
.email-details summary { display: flex; min-height: 44px; gap: .3rem; align-items: center; width: fit-content; cursor: pointer; font-size: .9rem; }
.email-details summary::-webkit-details-marker { display: none; }
.email-details[open] summary svg { rotate: 180deg; }
.design-workspace .email-fields { margin-bottom: 0; }
.design-workspace .submit-button { border-radius: var(--control-radius); width: 100%; }
.design-workspace .place-fields { gap: 0 .55rem; }
.editor-error { color: #9c1825; font-size: .83rem; padding-top: .25rem; }
#postcard-aux { width: min(calc(100% - 1.2rem), 37rem); border: 1px solid var(--editor-rule); border-radius: 3px; }
#postcard-aux .dialog-head { border-color: var(--editor-rule); }
.aux-body { padding: 1rem clamp(.75rem, 4vw, 1.5rem) 1.25rem; }
#postcard-aux .picker-results {
  max-height: min(45dvh, 25rem);
  overflow: auto;
  border-block: 1px solid var(--editor-rule);
  overscroll-behavior: contain;
}
#postcard-aux .picker-results button, .recipient-all {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  width: 100%;
  min-height: 44px;
  gap: .35rem 1rem;
  border: 0;
  border-radius: 0;
  padding: .55rem .35rem;
  text-align: start;
  background: white;
}
#postcard-aux .picker-results button:hover, .recipient-all:hover { background: #f2f2f2; }
#postcard-aux .picker-results :is(small, p) { color: var(--editor-quiet); }
#postcard-aux .picker-results p { padding: .55rem .35rem; }
#postcard-aux .picker-source { margin-top: .65rem; }
#postcard-aux:has(.infomaja-brand) {
  --editor-ink: #171612;
  --editor-quiet: #665b4b;
  --editor-rule: #d8d0c3;
  --editor-field-rule: var(--editor-rule);
  --focus: var(--infomaja-gold);
  border-radius: 14px;
  background: var(--infomaja-paper);
  font-family: Arial, sans-serif;
}
#postcard-aux:has(.infomaja-brand) .dialog-head {
  align-items: flex-start;
  padding: .85rem clamp(.75rem, 4vw, 1.5rem) .7rem;
  background: inherit;
}
.infomaja-brand {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: .1rem .65rem;
  min-height: 32px;
  color: inherit;
  text-decoration: none;
}
.infomaja-wordmark {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  font-size: 1.3rem;
  font-weight: 750;
  letter-spacing: -.055em;
}
.infomaja-domain { color: var(--infomaja-gold); font-size: .78rem; text-decoration: underline; text-underline-offset: .15em; }
#postcard-aux:has(.infomaja-brand) .icon-button { background: transparent; border-radius: 10px; }
#postcard-aux:has(.infomaja-brand) .icon-button:hover { background: #e9e2d4; }
#postcard-aux:has(.infomaja-brand) .search-wrap input { min-height: 52px; border-radius: 14px; font-family: inherit; }
#postcard-aux:has(.infomaja-brand) .picker-results {
  gap: 0;
  border: 1px solid var(--editor-rule);
  border-radius: 12px;
  background: white;
}
#postcard-aux:has(.infomaja-brand) .picker-results > * { padding: .65rem .85rem; }
#postcard-aux:has(.infomaja-brand) .picker-results button + button { border-top: 1px solid var(--editor-rule); }
#postcard-aux:has(.infomaja-brand) .picker-results button:is(:hover, :focus-visible) { background: var(--infomaja-paper); }
#postcard-aux:has(.infomaja-brand) .picker-results small { color: var(--infomaja-gold); }
.recipient-all { font-weight: 650; }
.send-help dl { margin-block: 1rem; }
.send-help dt { font-weight: 650; }
.send-help dd { margin: .15rem 0 .75rem; }
.map-filter button { width: auto; min-width: 44px; padding-inline: .65rem; font-size: .85rem; }

@media (min-width: 831px) and (max-width: 1180px) {
  .design-workspace .place-fields { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 830px) {

  .design-workspace .place-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  #postcard-aux .picker-results button { flex-wrap: wrap; row-gap: 0; }
  .design-workspace .dialog-head { min-height: 56px; }
}
@media (max-width: 420px) {
  .design-workspace .change-card { padding-inline: .2rem; }
  .design-workspace .change-card svg { display: none; }
  .design-workspace .dialog-actions { gap: 0; }
  .design-workspace .dialog-head h2 { font-size: 1.14rem; }
  .design-workspace .place-fields .search-wrap svg { display: none; }
  .design-workspace .place-fields input { padding-inline-start: .55rem; font-size: .9rem; }
}

.card-object { perspective: 1200px; }
.card-turntable {
  position: relative;
  display: grid;
  transform-style: preserve-3d;
  transition: transform 630ms cubic-bezier(.22,.68,.25,1);
}
.card-turntable > :is(.postcard, .postcard-back) {
  grid-area: 1 / 1;
  backface-visibility: hidden;
}
.flipped .card-turntable, .postcard-back { transform: rotateY(180deg); }
.flipped :is(.motif i, .postcard-art img), .flipped .motif::before, .flipped .motif::after { animation-play-state: paused; }
.postcard-back {
  background: #fbfaf7 repeating-linear-gradient(91deg, #0000 0 2px, #64625a05 2px 3px);
  position: relative;
  box-shadow: 0 12px 20px #17171720, 0 2px 4px #17171724;
}
.postcard-back::after { content: ""; position: absolute; top: 25%; bottom: 21%; left: 50%; border-left: 1px solid #aaa; }
.back-stamp { position: absolute; width: 12%; top: 7%; right: 7%; border: 1px dashed #888; padding: 1%; }
.back-brand { position: absolute; width: 24%; bottom: 7%; left: 7%; }
.back-map {
  position: absolute;
  top: 57%;
  right: 5%;
  width: 41%;
  height: auto;
  translate: 0 -50%;
}
.back-route {
  position: absolute;
  top: 49%;
  left: 7%;
  width: 39%;
  display: grid;
  gap: clamp(.4rem, 2cqw, 1.1rem);
  margin: 0;
  translate: 0 -50%;
  color: var(--ink);
}
.back-route dt { color: var(--muted); font: 600 clamp(.67rem, 2.1cqw, .95rem)/1.2 var(--sans); }
.back-route dd {
  margin: .12rem 0 0;
  font: 650 clamp(.9rem, 3.7cqw, 1.8rem)/1.13 var(--serif);
  overflow-wrap: anywhere;
}
.card-tools { display: flex; justify-content: end; flex-wrap: wrap; gap: .35rem .65rem; }
.card-tools button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  gap: .25rem;
  border: 0;
  border-radius: 2px;
  padding-inline: .4rem;
  background: transparent;
  color: #444;
  font: 500 .82rem/1.25 system-ui, sans-serif;
}
.card-tools button:hover { background: #f3f3f3; }
.card-tools button:disabled { opacity: .55; }
.card-tools svg { width: 17px; }
.card-tools .card-heart {
  justify-content: center;
  gap: .4rem;
  min-width: 50px;
  padding-inline: .65rem;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  background: var(--canvas);
  color: var(--ink);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.card-heart[aria-pressed="true"] svg { fill: var(--accent); stroke: var(--accent); }
.design-talveoo .motif::after {
  content: "";
  position: absolute;
  right: 9%; bottom: 10%; width: 15%; height: 20%;
  background: radial-gradient(ellipse, #ff943aab, transparent 60%);
  mix-blend-mode: screen;
  opacity: .3;
  animation: cabin-glow 4.4s ease-in-out infinite alternate;
}
@keyframes cabin-glow { to { opacity: .85; transform: scale(1.1); } }
@media (prefers-reduced-motion: reduce) {
  .card-turntable { transition: none; }
}

.catalog-window .dialog-head h2 { font: 700 clamp(1.12rem, 2vw, 1.55rem)/1.14 var(--ui); letter-spacing: -.035em; }
.art-catalog .page-title { padding-block: clamp(1.4rem, 3vw, 2.8rem) 1.25rem; }
.art-catalog .page-title h1 { font-size: clamp(2.65rem, 6vw, 5.3rem); }
.art-catalog .resume { margin: 0 0 1rem; }
.catalog-topic { padding-top: .8rem; }
.catalog-shelf {
  --shelf-gap: clamp(.8rem, 2vw, 1.3rem);
  --shelf-card: min(62vw, 16.5rem);
  min-width: 0;
}
.catalog-shelf + .catalog-shelf { margin-top: clamp(1.35rem, 3vw, 2.3rem); }
.shelf-heading, .shelf-actions { display: flex; align-items: center; gap: .7rem; }
.shelf-heading { justify-content: space-between; margin: 0 0 .45rem; }
.catalog-section .shelf-heading h2 { margin: 0; font-size: clamp(1.55rem, 3vw, 2.4rem); line-height: 1.1; }
.shelf-all {
  display: inline-flex;
  align-items: center;
  min-height: var(--control-size);
  gap: .3rem;
  white-space: nowrap;
  font: 650 .88rem/1.2 var(--ui);
  text-underline-offset: .24em;
}
.shelf-all svg { width: 17px; height: 17px; }
.shelf-scroll { display: flex; gap: .25rem; }
.shelf-scroll .icon-button { width: var(--control-size); min-height: var(--control-size); }
.shelf-scroll button:disabled { color: var(--muted); opacity: .4; cursor: default; }
.shelf-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: var(--shelf-card);
  align-items: start;
  gap: var(--shelf-gap);
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 4px;
  padding: 4px 4px .22rem;
  scrollbar-width: thin;
  scrollbar-color: var(--line) var(--canvas);
}
.shelf-track > a { scroll-snap-align: start; }
.shelf-track .tile-image { overflow: hidden; }
.shelf-track img { transition: scale var(--motion); }
.shelf-track a:is(:hover, :focus-visible) img { scale: 1.025; }
.stylebook-content .catalog-shelf { margin-top: 0; }
.catalog-view-links, .catalog-large-topics { display: flex; flex-wrap: wrap; align-items: center; gap: 0 1rem; }
.catalog-large-link { margin-bottom: .75rem; }
.catalog-large-topics { margin-block: .5rem 1.25rem; }
.catalog-large-topics a { display: inline-flex; align-items: center; min-height: var(--control-size); }
.catalog-large-topics [aria-current="page"] { font-weight: 800; text-decoration-thickness: 2px; }
.catalog-large-grid { display: grid; gap: clamp(1.25rem, 4vw, 3rem); max-width: 58rem; margin-inline: auto; }
.catalog-large-tile { display: block; }
.catalog-large-tile .card-object { container-type: inline-size; }
.catalog-large-tile:not(.in-view) :is(.postcard-art img, .motif i),
.catalog-large-tile:not(.in-view) .motif::before,
.catalog-large-tile:not(.in-view) .motif::after { animation-play-state: paused !important; }
@media (max-width: 520px) {
  .shelf-actions { gap: .35rem; }
  .shelf-scroll { display: none; }
}
.art-catalog .catalog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.art-catalog .catalog-tile { border: 0; border-radius: 0; }
.art-catalog .catalog-tile:is(:hover, :focus-visible) { box-shadow: none; }
.art-catalog .tile-image { box-shadow: 0 3px 8px #18181829; }
.art-catalog .tile-title { padding: .65rem .15rem; min-height: 44px; font: 560 .95rem/1.35 system-ui, sans-serif; }
.art-catalog .tile-title svg { color: #222; }
.art-catalog .catalog-tile:hover .tile-title { text-decoration: underline; text-underline-offset: .22em; }
@media (max-width: 680px) {
  .art-catalog .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 831px) and (max-height: 780px) {
  .design-workspace .field, .design-workspace .greeting-field { margin-bottom: .58rem; }
  .design-workspace .greeting-field .field { margin-bottom: 0; }
}

/* Shared controls and floating surface. See ?stiil=1 for their rendered states. */
.recipient-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
.editor-tabs { border: 0; padding: 0; min-width: 0; margin: 0 0 .9rem; }
.editor-tabs legend { font-size: .9rem; font-weight: 650; margin-bottom: .3rem; padding: 0; }
.recipient-options label { display: block; position: relative; }
.recipient-options input { position: absolute; opacity: 0; inset: 0; margin: 0; width: 100%; height: 100%; cursor: pointer; }
.recipient-options span {
  display: grid;
  place-items: center;
  min-height: var(--control-size);
  padding-inline: .25rem;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  color: var(--ink);
  font: 650 .88rem/1.1 var(--ui);
  transition: background var(--motion), color var(--motion);
}
.recipient-options input:hover + span { background: var(--snow); }
.recipient-options input:checked + span { background: var(--ink); color: white; border-color: var(--ink); }
.recipient-options input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.place-results:not(:popover-open) { display: none; }
.place-results:popover-open {
  position: fixed;
  inset: auto;
  padding: .32rem;
  margin: 0;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line);
  border-radius: var(--panel-radius);
  box-shadow: var(--panel-shadow);
  background: white;
  color: var(--ink);
  font: .9rem/1.3 var(--ui);
  animation: place-in 140ms ease-out both;
}
@keyframes place-in { from { opacity: 0; } }
.place-results button { border: 0; border-radius: var(--control-radius); padding: .4rem .55rem; text-align: start; }
.place-results small { font-size: .76rem; }
.place-results p { padding: .65rem; color: var(--muted); }
.design-workspace[open] { display: flex; flex-direction: column; overflow: hidden; }
.design-workspace .dialog-head { flex: none; min-height: 58px; }
.editor-layout {
  --editor-column: clamp(275px, 29cqw, 410px);
  container-type: inline-size;
  --editor-pad: clamp(1rem, 3vw, 3.4rem);
  min-height: 0;
  flex: 1;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
}
.editor-content {
  display: grid;
  min-height: 0;
  grid-template-columns: var(--editor-column) minmax(0, 1fr);
  gap: clamp(1.5rem, 5vw, 5rem);
  align-items: stretch;
  padding-inline: var(--editor-pad);
}
#editor-fields {
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  padding: 1.2rem 6px .55rem;
  margin-inline: -6px;
}
.editor-preview {
  align-self: center;
  justify-self: center;
  width: min(100%, 1060px, calc((100dvh - 168px) * 1.5));
}
.design-workspace .editor-preview { animation: editor-card-in 360ms cubic-bezier(.22,.7,.27,1) both; }
@keyframes editor-card-in { from { opacity: 0; scale: .985; } }
.editor-preview .card-turntable { box-shadow: 0 16px 44px #16161628, 0 2px 5px #1616161a; }
.editor-footer {
  width: calc(var(--editor-column) + var(--editor-pad));
  padding: .62rem 0 max(.85rem, env(safe-area-inset-bottom)) var(--editor-pad);
  background: white;
}
.visibility-line label { min-height: 36px; }
.visibility-line label + label { padding-inline-start: .75rem; }
.composer-launch.button { min-height: 54px; min-width: min(50vw, 188px); border-radius: 999px; box-shadow: var(--panel-shadow); }
.map-screen .site-head {
  top: max(.8rem, env(safe-area-inset-top));
  left: .8rem;
  right: auto;
  border-radius: var(--panel-radius);
  box-shadow: var(--panel-shadow);
}
.map-screen .head-inner { min-height: 60px; padding-inline: .7rem; }
.map-screen .wordmark { width: clamp(10.5rem, 19vw, 13.2rem); min-height: 50px; }
.map-screen .map-filter { left: auto; right: var(--map-edge); top: max(.8rem, env(safe-area-inset-top)); }
.map-filter-label { align-self: center; padding-inline: .75rem; font-size: .89rem; font-weight: 650; white-space: nowrap; }
.map-filter [data-overlay], .map-filter .map-play { border-left: 1px solid var(--line); }
.map-layer-dock {
  position: absolute;
  z-index: 1;
  top: .65rem;
  right: .65rem;
  display: grid;
  justify-items: end;
  gap: .38rem;
}
.map-screen .map-layer-dock {
  top: calc(max(.8rem, env(safe-area-inset-top)) + 52px);
  right: var(--map-edge);
}
.map-layer-dock :is(.map-layers, .map-region) { position: static; }
:is(.map-layers, .map-region) button {
  width: auto;
  min-width: var(--control-size);
  padding-inline: .65rem;
  font-size: .84rem;
}
.map-layers button + button { border-left: 1px solid var(--line); }
.map-layer-note {
  padding: .37rem .58rem;
  width: max-content;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  background: var(--canvas);
  color: var(--muted);
  font-size: .76rem;
  text-align: right;
}
.map-heat-scale {
  display: flex;
  justify-content: space-between;
  gap: 1.2rem;
  padding-bottom: .32rem;
  font-size: .68rem;
}
.map-heat-scale::after {
  content: "";
  position: absolute;
  inset: auto .58rem 0;
  height: 3px;
  background: linear-gradient(90deg, #f7e6f0, #982574);
}
.map-heat-scale { position: relative; margin-bottom: .18rem; }
[data-layer="to"] .map-heat-scale::after { background: linear-gradient(90deg, #fae7d9, #b33518); }
.map-screen .map-view-controls {
  inset: auto var(--map-edge) calc(var(--map-dock-bottom) + 3 * 44px + .6rem) auto;
}
.map-stage:is(.map-world-overview, [data-touring]) .map-view-controls { display: none; }
.map-screen .map-controls { box-shadow: var(--panel-shadow); border: 1px solid var(--line); border-radius: var(--control-radius); }
.map-screen .map-controls button[aria-pressed="true"] { background: var(--ink); }
.map-compose-area {
  position: absolute;
  z-index: 1;
  left: var(--map-edge);
  bottom: var(--map-dock-bottom);
  width: min(22rem, calc(100% - 2 * var(--map-edge) - 55px));
  display: grid;
  gap: .5rem;
  pointer-events: none;
}
.map-intro, .map-screen .send-result {
  padding: clamp(.8rem, 2vw, 1.25rem);
  border: 1px solid var(--line);
  border-radius: var(--panel-radius);
  background: white;
  box-shadow: var(--panel-shadow);
  pointer-events: auto;
}
.map-stage:is(.map-world-overview, [data-layer]:not([data-layer="cards"]), [data-touring]) .map-intro {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  pointer-events: none;
}
.map-stage:is(.map-world-overview, [data-layer]:not([data-layer="cards"]), [data-touring]) .map-intro > :not(.composer-launch) { display: none; }
.map-stage:is(.map-world-overview, [data-layer]:not([data-layer="cards"]), [data-touring]) .composer-launch { pointer-events: auto; }
.map-world-status {
  position: absolute;
  z-index: 2;
  top: 44%;
  inset-inline: 1rem;
  width: fit-content;
  max-width: calc(100% - 2rem);
  margin-inline: auto;
  padding: .55rem .8rem;
  background: var(--canvas);
  border-radius: var(--control-radius);
  box-shadow: var(--panel-shadow);
}
.map-intro-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34%;
  align-items: center;
  gap: .5rem;
}
.map-intro :is(h1, h3) { font: 670 clamp(1.55rem, 3.2vw, 1.8rem)/1.02 var(--serif); letter-spacing: -.05em; }
.map-intro :is(h1, h3) span { white-space: nowrap; }
.map-intro-art { display: block; width: 100%; height: auto; }
.map-intro-description { margin-block: .5rem .75rem; color: var(--muted); font-size: .92rem; }
.map-preview-note {
  display: block;
  min-height: 44px;
  margin: .25rem 0 -.4rem;
  padding: .3rem 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: .89rem;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: .2em;
}
.map-preview-note:hover { color: var(--accent); }
.map-screen .send-result {
  position: static;
  width: 100%;
  max-width: none;
  padding: .55rem .6rem;
  font-size: .89rem;
  flex-wrap: wrap;
}
.library-toolbar { display: flex; flex-wrap: wrap; gap: .35rem 1rem; align-items: center; justify-content: space-between; }
.greeting-library .library-count { margin: .75rem 0 1rem; }
.greeting-library .segments button { white-space: nowrap; }
.greeting-library .segments button[aria-pressed="true"] { background: var(--ink); color: white; border-color: var(--ink); }
.map-screen .send-result .secondary { min-height: 42px; padding: .35rem .65rem; font-size: .84rem; }
.map-screen .send-result .icon-button { border: 0; }
.map-stage[data-touring] { --tour-thread: 42px; }
.map-tour-pin {
  position: absolute;
  z-index: 2;
  top: var(--tour-ground-y);
  left: var(--tour-ground-x);
  translate: -50% -50%;
  width: 13px;
  height: 13px;
  border: 2px solid white;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 1px 5px #12162545;
  pointer-events: none;
  animation: tour-pin-in 220ms ease-out 335ms both;
}
.map-tour-pin::before {
  content: "";
  position: absolute;
  bottom: 50%;
  left: calc(50% - 1px);
  width: 2px;
  height: var(--tour-thread);
  background: #314761;
  box-shadow: 0 0 0 1px #ffffffb0;
}
@keyframes tour-pin-in { from { opacity: 0; } }
.map-spotlight {
  position: absolute;
  z-index: 2;
  top: calc(var(--tour-ground-y) + .85rem);
  left: 50%;
  translate: -50%;
  padding: .55rem .9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  box-shadow: var(--panel-shadow);
  font-weight: 720;
  font-size: .9rem;
  max-width: calc(100% - 4rem);
  width: max-content;
  text-align: center;
  overflow-wrap: anywhere;
  pointer-events: none;
}
.map-feature {
  container-type: inline-size;
  position: absolute;
  z-index: 2;
  top: calc(var(--tour-ground-y) - var(--tour-thread));
  left: 50%;
  translate: -50% -100%;
  width: min(68vw, 620px, max(150px, calc((var(--tour-ground-y) - 7.5rem) * 1.5)));
}
.tour-card { display: block; text-decoration: none; }
.tour-tools { position: absolute; inset: calc(100% + .45rem) 0 auto auto; }
.tour-tools .card-heart { box-shadow: var(--panel-shadow); }
.tour-card .postcard { box-shadow: 0 18px 70px #191b2d63; }
.map-marker.tour-selected { outline: 3px solid var(--accent); outline-offset: 2px; }
.map-stage:has(.map-feature:not([hidden])) :is(.tour-selected, .map-connector:has(+ .tour-selected)) {
  visibility: hidden !important;
}
.map-stage[data-touring] .send-result { visibility: hidden; }
@media (max-width: 830px) {
  .editor-layout { --editor-pad: .85rem; }
  .editor-content { display: flex; flex-direction: column; gap: .35rem; overflow: auto; padding-top: .65rem; }
  .editor-preview { order: -1; width: min(100%, 580px); }
  #editor-fields { flex: none; overflow: visible; padding-top: .45rem; }
  .editor-footer { width: 100%; padding: .5rem var(--editor-pad); border-top: 1px solid var(--line); }
  .map-feature { width: min(calc(100% - 2.5rem), 520px, max(150px, calc((var(--tour-ground-y) - 7.5rem) * 1.5))); }
}
@media (max-width: 680px) {
  .map-feature { width: min(calc(100% - 2.5rem), 520px, max(130px, calc((var(--tour-ground-y) - 16.6rem) * 1.5))); }
  .map-spotlight { padding: .35rem .65rem; }
}
@media (prefers-reduced-motion: reduce) {
  .place-results:popover-open { animation: none; }
}
.editor-addons { display: flex; align-items: flex-start; flex-wrap: wrap; column-gap: .55rem; }
.editor-addons .email-details[open] { flex-basis: 100%; }
.stylebook-content { padding-block: 2rem 4rem; max-width: 960px; }
.stylebook-content > h1, .stylebook-section > h2 { font-family: var(--ui); letter-spacing: -.035em; }
.stylebook-content h1 { font-size: clamp(2rem, 6vw, 3.25rem); }
.stylebook-section > h2 { font-size: clamp(1.4rem, 3vw, 1.85rem); }
.stylebook-section { border-top: 1px solid var(--line); margin-top: 2.5rem; padding-top: 1.4rem; }
.stylebook-content > :is(h1, p), .stylebook-section > :is(h2, p, h3) { margin-bottom: .65rem; }
.stylebook-section > :not(h2) + :is(p, .art-catalog, .stylebook-tile) { margin-top: .8rem; }
.stylebook-index { display: flex; flex-wrap: wrap; gap: 0 1rem; }
.stylebook-index a { display: inline-flex; align-items: center; min-height: var(--control-size); }
.stylebook-content .editor-tabs { max-width: 26rem; }
.stylebook-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem; }
.stylebook-card { container-type: inline-size; max-width: 600px; }
.stylebook-tile { max-width: 16rem; }
.stylebook-type p { font: 650 clamp(1.5rem, 4vw, 2.6rem)/1.1 var(--serif); margin-bottom: .65rem; }
.stylebook-swatches, .stylebook-icons {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 8.5rem), 1fr));
  gap: .65rem;
  list-style: none;
  margin: .8rem 0 1.25rem;
  padding: 0;
}
.stylebook-swatches li, .stylebook-icons li { display: grid; gap: .15rem; padding: .55rem; border: 1px solid var(--line); }
.stylebook-swatches li > span { height: 1.35rem; border: 1px solid var(--line); background: var(--swatch); }
.stylebook-content code { font-size: .78rem; overflow-wrap: anywhere; }
.stylebook-map summary { display: flex; align-items: center; gap: .4rem; min-height: var(--control-size); cursor: pointer; list-style: none; }
.stylebook-map summary::-webkit-details-marker { display: none; }
.stylebook-map summary svg { width: 18px; }
.stylebook-map[open] summary svg { rotate: 180deg; }
.stylebook-map .map-stage { margin-bottom: .8rem; }
.stylebook-section > .map-intro { max-width: 22rem; margin-top: .65rem; }
.stylebook-map .map-filter { top: .65rem; right: .65rem; }
.stylebook-map .map-layer-dock { top: calc(.65rem + 52px); }
.stylebook-map .map-view-controls { inset: auto auto 1.8rem .65rem; }
.stylebook-content .send-result { position: static; max-width: 29rem; flex-wrap: wrap; margin-top: .8rem; }
@media (max-width: 680px) {
  .stylebook-map .map-filter-label { display: none; }
  .stylebook-map .map-filter { inset-inline: .35rem; }
  .stylebook-map .map-filter button { flex: 1 0 auto; padding-inline: .25rem; }
}
@media (max-width: 830px) {
  .stylebook-content { width: calc(100% - 2rem); }
}

.design-workspace .editor-card-jump { display: none; }
@media (max-width: 830px) {
  .editor-footer { display: flex; align-items: center; gap: .4rem; }
  .design-workspace .editor-card-jump {
    display: grid;
    border: 1px solid var(--line);
    border-radius: var(--control-radius);
    width: 49px;
    height: 49px;
  }
  .design-workspace .greeting-field textarea { min-height: 6.4rem; }
}

@media (max-width: 360px) {
  .map-screen .map-filter button { padding-inline: .42rem; }
  .design-workspace .dialog-head h2 { font-size: 1.05rem; overflow-wrap: anywhere; }
  .design-workspace .change-card { min-width: var(--control-size); justify-content: center; }
  .design-workspace .change-card svg { display: block; }
  .design-workspace .change-card span { display: none; }
}
@media (max-width: 680px) {
  .map-screen .head-inner { min-height: 52px; }
  .map-screen .wordmark { width: 10.4rem; min-height: 46px; }
  .map-screen .map-filter { top: calc(max(.8rem, env(safe-area-inset-top)) + 61px); }
  .map-screen .map-layer-dock { top: calc(max(.8rem, env(safe-area-inset-top)) + 113px); }
  .map-filter-label { font-size: .76rem; padding-inline: .45rem; }
  .map-screen .map-view-controls { flex-direction: column; }
  .map-screen .map-view-controls button + button { border-left: 0; border-top: 1px solid var(--line); }
  .map-intro :is(h1, h3) { font-size: 1.4rem; }
  .map-intro-description { font-size: .86rem; }
  .map-intro .composer-launch { min-height: 46px; }
}
@media (max-width: 480px) {
  .map-layer-dock { top: 3.6rem; }
}
@media (max-width: 390px) {
  .map-screen .map-filter button { padding-inline: .48rem; }
  .map-filter-label { display: none; }
}
.map-marker-stack { padding: 0; }
.map-marker.map-route-open { z-index: 4; }
.map-route-tip {
  position: absolute;
  display: grid;
  visibility: hidden;
  opacity: 0;
  top: 100%;
  left: var(--route-tip-left, 0);
  width: 216px;
  gap: .2rem;
  padding: .48rem .6rem;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  background: var(--canvas);
  box-shadow: var(--panel-shadow);
  color: var(--ink);
  font: 650 .8rem/1.28 var(--sans);
  text-align: start;
  overflow-wrap: anywhere;
  transition: opacity var(--motion), visibility var(--motion);
}
.map-route-tip strong { color: var(--muted); margin-inline-end: .22rem; }
.map-route-above .map-route-tip { top: auto; bottom: 100%; }
.map-route-open:not([inert]) .map-route-tip { visibility: visible; opacity: 1; }
.map-marker-count {
  position: absolute;
  top: .25rem;
  right: .25rem;
  min-width: 1.55rem;
  padding: .12rem .3rem;
  border: 1px solid #fffe;
  border-radius: 999px;
  background: var(--ink);
  color: white;
  font: 650 .71rem/1.25 var(--ui);
  font-variant-numeric: tabular-nums;
  text-align: center;
}
@media (max-width: 520px) {
  .map-marker-name { padding-inline: .1rem; font-size: .62rem; }
}
@media (max-width: 420px) {
  .greeting-library .segments button { padding-inline: .55rem; font-size: .9rem; }
}
@media (max-width: 360px) {
  .greeting-library .tile-title { padding-inline: .5rem; }
  .greeting-library .tile-title svg { display: none; }
}

.map-connector {
  position: absolute;
  height: 1px;
  background: #526c88;
  transform-origin: 0 50%;
}
.map-connector::before {
  content: "";
  position: absolute;
  inset: 50% auto auto 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  translate: -50% -50%;
}
.map-dot {
  position: absolute;
  z-index: 1;
  display: grid;
  place-items: center;
  translate: -50% -50%;
  min-width: 25px;
  min-height: 25px;
  border: 0;
  border-radius: 50%;
  padding: 0;
  color: white;
  background: transparent;
  pointer-events: auto;
  font: 750 .65rem/1 var(--ui);
}
.map-dot::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 1px #fff;
  transition: scale var(--motion);
}
.map-dot-cluster::before { width: 10px; height: 10px; }
.map-dot:not(:empty)::before { width: 18px; height: 18px; }
.map-dot:hover::before, .map-dot:focus-visible::before { scale: 1.24; }
@media (prefers-reduced-motion: no-preference) {
  .map-dot:empty:not(:hover, :focus-visible, [inert])::before {
    animation: map-dot-pulse var(--dot-period) ease-in-out var(--dot-phase) infinite;
  }
}
@keyframes map-dot-pulse {
  0%, 19%, 82%, 100% { opacity: 1; }
  50% { opacity: .15; }
}
