/* Mobile design preview. Wider windows show the same phone canvas. */
:root {
  font-family: "Avenir Next", "Trebuchet MS", ui-rounded, system-ui, sans-serif;
  color: #303250; background: #e7edf1; font-synthesis: none; color-scheme: light;
  --ink: #303250; --muted: #74768e; --blue: #0878d9; --cream: #fffaf2;
  --safe-top: env(safe-area-inset-top, 0px); --safe-bottom: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overscroll-behavior: none; }
button, input { font: inherit; }
button { border: 0; color: inherit; cursor: pointer; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button:active { transform: scale(.97); }
button:focus-visible, input:focus-visible { outline: 3px solid #006cbd; outline-offset: 3px; }
button svg, span[data-icon] svg { width: 23px; height: 23px; display: block; stroke-width: 1.8; }
.svg-library { position: absolute; width: 0; height: 0; overflow: hidden; }
[hidden] { display: none !important; }
.app { position: relative; width: 100%; max-width: 430px; height: 100dvh; margin-inline: auto; overflow: hidden; background: #fff8ed; }
main, .view { height: 100%; }
.view { position: relative; }
.app-header { position: absolute; inset: var(--safe-top) 0 auto; height: 155px; z-index: 10; pointer-events: none; }
.app-header button { pointer-events: auto; }
.brand { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); width: 61%; max-width: 270px; padding: 0; background: none; }
.brand:active { transform: translateX(-50%) scale(.98); }
.brand img { display: block; width: 100%; height: auto; }
.header-caption { position: absolute; top: min(36vw, 155px); width: 100%; text-align: center; font-size: 12px; font-weight: 750; color: #076298; text-shadow: 0 1px 3px #e4f8ff; }
.icon-button { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: #fffdf4ee; color: #565096; flex-shrink: 0; border: 1px solid #ffffffc4; }
.header-search, .header-info { position: absolute; top: 35px; box-shadow: 0 3px 14px #267db31a; }
.header-search { left: 13px; }.header-info { right: 13px; }
.screen-title { display: none; }
.app:not([data-view="world"]) .app-header { height: 64px; display: flex; align-items: center; justify-content: center; background: #fff8edf5; border-bottom: 1px solid #ede5d7; }
.app:not([data-view="world"]) .brand, .app:not([data-view="world"]) .header-caption { display: none; }
.app:not([data-view="world"]) .screen-title { display: block; font-size: 17px; font-weight: 750; letter-spacing: -.4px; }
.app:not([data-view="world"]) .header-search, .app:not([data-view="world"]) .header-info { top: 10px; box-shadow: none; background: #f1ede6; border: 0; }
.world-view { background: #48b4f1; isolation: isolate; }
.map-viewport { position: absolute; inset: 0; overflow: hidden; touch-action: none; cursor: grab; }
.map-viewport.dragging { cursor: grabbing; }
.map-scene { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); transform-origin: center; will-change: transform; }
.map-art { display: block; width: 100%; height: 100%; pointer-events: none; user-select: none; }
.island-label { position: absolute; z-index: 2; transform: translate(-50%,-50%); display: flex; align-items: center; justify-content: center; gap: 5px; padding: 7px 9px; min-height: 44px; background: #fffdf7f5; border: 1px solid #fff; border-radius: 20px; box-shadow: 0 3px 12px #37487024; white-space: nowrap; font-size: 11px; font-weight: 750; }
.island-label:active { transform: translate(-50%,-50%) scale(.97); }
.island-label svg { width: 19px; height: 19px; color: var(--island-color); }
.island-label>svg:last-child { width: 11px; height: 11px; color: #7971a8; }
.island-label.origin { padding: 8px 12px; font-size: 14px; border-radius: 23px; color: #07598b; gap: 7px; }
.island-label.origin>svg:first-child { width: 24px; height: 28px; color: #cc9a45; }
.island-label.origin>span { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.island-label small { font-size: 10px; font-weight: 500; color: #687ea2; }
.island-label.outside-view { visibility: hidden; pointer-events: none; }
.map-egg { position: absolute; width: 44px; height: 44px; display: grid; place-items: center; padding: 0; background: none; transform: translate(-50%,-50%); z-index: 2; }
.map-egg svg { width: 16px; height: 21px; filter: drop-shadow(0 2px 2px #185e64); }
.map-egg.selected svg { width: 23px; height: 29px; filter: drop-shadow(0 0 4px #fff); }
.map-egg.selected::after { content: ""; position: absolute; bottom: 6px; width: 30px; height: 8px; border: 1.5px solid #fff; border-radius: 50%; }
.map-egg:active { transform: translate(-50%,-50%) scale(.95); }
.map-tools { position: absolute; z-index: 3; right: 11px; top: 53%; display: flex; flex-direction: column; border-radius: 24px; padding: 2px; background: #fffdf7dc; box-shadow: 0 3px 12px #37487020; }
.map-tools .icon-button { width: 44px; height: 44px; background: none; border: 0; }.map-tools svg { width: 18px; height: 18px; }
.journey-card { position: absolute; z-index: 3; left: 14px; right: 14px; bottom: calc(103px + var(--safe-bottom)); display: flex; align-items: center; gap: 10px; text-align: left; padding: 9px 12px 9px 9px; min-height: 75px; background: #fffdf6ee; border: 1px solid #fff; border-radius: 25px; box-shadow: 0 5px 24px #4f6b9e21; backdrop-filter: blur(16px); }
.mini-egg { width: 43px; height: 54px; flex-shrink: 0; transform: rotate(-9deg); }.mini-egg svg { width: 100%; height: 100%; }
.journey-copy { display: flex; flex-direction: column; gap: 4px; }.journey-copy strong { font-size: 16px; color: #29275e; letter-spacing: -.4px; }.journey-copy>span { font-size: 11px; color: #636e9b; }
.journey-arrow { margin-left: auto; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: #fff; color: #087bdf; flex-shrink: 0; }
.bottom-nav { position: absolute; z-index: 10; bottom: calc(23px + var(--safe-bottom)); left: 12px; right: 12px; display: flex; padding: 5px; gap: 2px; height: 70px; background: #fcfbfff2; border: 1px solid #fff; border-radius: 28px; box-shadow: 0 4px 22px #42438325; backdrop-filter: blur(16px); }
.nav-item { flex: 1; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 5px; min-height: 56px; padding: 4px 1px; background: none; border-radius: 23px; color: #68669b; font-size: 11px; font-weight: 600; }
.nav-item.active { background: #fff; color: #0576e4; box-shadow: 0 2px 10px #7994c71a; }.nav-item.active::after { content: ""; position: absolute; bottom: 5px; width: 20px; height: 2px; background: #087ef0; border-radius: 2px; }
.nav-item svg { width: 25px; height: 25px; stroke-width: 1.65; }
.demo-footer { position: absolute; bottom: calc(5px + var(--safe-bottom)); left: 0; right: 0; text-align: center; font-size: 10px; color: #345c71; margin: 0; z-index: 9; text-shadow: 0 1px 3px #fff; pointer-events: none; }
.detail-view { overflow-y: auto; overscroll-behavior-y: contain; padding: calc(76px + var(--safe-top)) 14px calc(116px + var(--safe-bottom)); scroll-padding-block: 90px 120px; background: #fff8ed; }
.detail-topline { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 7px; }
.back-button { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0; font-size: 12px; font-weight: 600; background: none; color: #67647f; }.back-button svg { width: 17px; height: 17px; }
.state-label { font-size: 11px; color: #76716e; display: flex; align-items: center; gap: 5px; }.state-label::before { content: ""; width: 5px; height: 5px; background: #86aa7a; border-radius: 50%; }
.detail-grid { display: flex; flex-direction: column; min-height: 0; border-radius: 27px; background: #fffdf9; border: 1px solid #fff; overflow: hidden; box-shadow: 0 5px 24px #8f745d0a; }
.art-stage { position: relative; height: clamp(230px, 32dvh, 295px); flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: #e1e9cc; overflow: hidden; isolation: isolate; }
.art-stage>img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
.art-stage>img.nursery-scene { object-position: center 57%; }
.art-caption { position: absolute; bottom: 21px; font-size: 11px; color: #725e45; background: #fffaf0eb; border-radius: 13px; padding: 6px 11px; }
.hero-egg { width: 132px; height: 168px; animation: egg-breathe 4s ease-in-out infinite; }.hero-egg svg { width: 100%; height: 100%; }
.detail-copy { position: relative; padding: 22px 20px 24px; margin-top: -11px; border-radius: 23px 23px 0 0; background: #fffdf9; }
.detail-copy .eyebrow { margin: 0 0 7px; font-size: 12px; font-weight: 650; color: #8a643c; }
.detail-copy h1 { font-size: 27px; line-height: 1.12; letter-spacing: -.9px; margin: 0 0 9px; color: #47344a; font-weight: 750; }
.detail-copy .lead { font-size: 13px; line-height: 1.6; color: #787079; margin: 0 0 16px; }
.egg-id { display: inline-flex; align-items: center; font-size: 11px; background: #f6efe3; padding: 6px 9px; border-radius: 8px; margin: 0 0 13px; color: #8b775f; font-variant-numeric: tabular-nums; }
.timer { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; gap: 8px; }.timer strong { font-size: 33px; font-weight: 700; letter-spacing: -1px; font-variant-numeric: tabular-nums; color: #453049; }.timer span { font-size: 12px; color: #796b69; }
.progress-track { height: 8px; background: #f1e9db; border-radius: 8px; overflow: hidden; }.progress-fill { height: 100%; width: 38%; background: linear-gradient(90deg,#40c9ed,#0c95ec); border-radius: inherit; }
.timer-caption { font-size: 11px; color: #756858; margin: 9px 0 18px; }
.primary-button { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 50px; padding: 12px 15px; gap: 10px; border-radius: 16px; color: #fff; background: linear-gradient(#39b9f1,#0788e5); border: 1px solid #1b94d8; box-shadow: inset 0 2px 0 #ffffff6b, 0 3px 0 #087cc7; font-size: 14px; font-weight: 700; }.primary-button svg { width: 19px; height: 19px; }
.secondary-button { display: flex; align-items: center; justify-content: center; min-height: 46px; padding: 10px 13px; gap: 7px; background: #fff3df; border: 1px solid #ecdbc3; border-radius: 15px; color: #795f4b; font-size: 13px; font-weight: 650; box-shadow: inset 0 2px 0 #fff, 0 2px 0 #e8d9c5; }.secondary-button svg { width: 19px; height: 19px; }
.button-stack { display: grid; gap: 11px; }.text-button { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 5px 0; background: none; color: #1685c4; font-size: 13px; font-weight: 650; }.text-button svg { width: 17px; height: 17px; }
.fine-print { font-size: 11px; color: #786b5f; line-height: 1.6; text-align: center; margin: 12px 0 0; }
.small-note { display: flex; align-items: flex-start; gap: 9px; border-radius: 14px; padding: 13px; background: #f5f3ec; color: #898475; font-size: 12px; line-height: 1.6; margin-top: 18px; }.small-note svg { width: 19px; height: 19px; flex-shrink: 0; }
.detail-below { display: flex; justify-content: center; gap: 13px; margin: 18px 0 0; color: #73695c; font-size: 10px; }.detail-below>span { display: inline-flex; align-items: center; gap: 5px; }.detail-below svg { width: 14px; height: 14px; }
.trait-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 16px; }.trait-list>span { font-size: 11px; padding: 6px 9px; background: #eaf4fb; color: #50769b; border-radius: 9px; }
.profile-facts { margin: 17px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 10px; }.profile-facts dt { font-size: 11px; color: #7c6d60; margin-bottom: 4px; }.profile-facts dd { font-size: 13px; font-weight: 650; margin: 0; }
.bond { margin: 19px 0; }.bond-label { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; margin-bottom: 9px; }.bond .progress-fill { background: linear-gradient(90deg,#eeaeaa,#d28aae); }
.care-actions { display: flex; gap: 9px; margin-top: 12px; }.care-actions button { flex: 1; flex-direction: column; gap: 7px; min-height: 71px; }.care-actions button svg { width: 23px; height: 23px; }
.hatching .nursery-scene { animation: egg-hatch .4s ease-in-out infinite; }.hatching .art-stage::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 60%,#fff4bf80,transparent 65%); animation: hatch-glow .8s ease-in-out infinite alternate; pointer-events: none; }
.newborn .art-stage>img { animation: reveal .6s cubic-bezier(.22,1,.36,1) both; }.newborn .detail-copy { animation: reveal .5s .1s both; }
.journal-layout { display: flex; flex-direction: column; gap: 17px; }.journal-cover { height: 230px; position: relative; border-radius: 25px; overflow: hidden; background: #f0e9d9; }.journal-cover img { width: 100%; height: 100%; object-fit: cover; object-position: center 36%; }.journal-cover>div { position: absolute; inset: auto 12px 12px auto; width: 170px; padding: 13px; border-radius: 16px; background: #fff9efe8; }.journal-cover h2 { font-size: 17px; margin: 0 0 4px; color: #5a4254; }.journal-cover p { font-size: 10px; margin: 0; color: #796654; }
.journal-content { border-radius: 24px; padding: 23px 19px; background: #fffdf9; }.journal-content h1 { font-size: 26px; line-height: 1.15; letter-spacing: -.8px; color: #4c3d51; margin: 0 0 9px; }.journal-content>p { font-size: 13px; line-height: 1.6; margin: 0 0 22px; color: #74665e; }
.diary-entry { display: grid; grid-template-columns: 32px 1fr; gap: 11px; padding: 18px 0; border-top: 1px solid #f0e9dd; }.entry-icon { width: 32px; height: 32px; display: grid; place-items: center; background: #fff0db; color: #b78955; border-radius: 50%; }.entry-icon svg { width: 17px; height: 17px; }.diary-entry time { font-size: 11px; color: #96846f; }.diary-entry h2 { font-size: 14px; margin: 6px 0; color: #605060; }.diary-entry p { font-size: 12px; line-height: 1.7; margin: 0; color: #766864; }.empty-journal { padding: 12px 0; }.empty-journal p { font-size: 13px; line-height: 1.7; color: #766864; }
.toast { position: fixed; z-index: 30; left: 50%; bottom: calc(107px + var(--safe-bottom)); transform: translate(-50%,10px); padding: 13px 18px; background: #3c3e63; color: #fff; border-radius: 17px; font-size: 12px; line-height: 1.5; max-width: 380px; width: max-content; max-width: min(90vw,380px); text-align: center; pointer-events: none; opacity: 0; transition: opacity .2s, transform .2s; }.toast.visible { opacity: 1; transform: translate(-50%,0); }
dialog { inset: auto 0 0; border: 0; padding: 31px 23px calc(25px + var(--safe-bottom)); border-radius: 29px 29px 0 0; width: 100%; max-width: 430px; margin: auto auto 0; max-height: 88dvh; overflow-y: auto; overscroll-behavior: contain; background: #fffbf3; color: var(--ink); box-shadow: 0 -8px 40px #34486418; }
dialog[open] { animation: sheet-in .24s cubic-bezier(.22,1,.36,1); }dialog::backdrop { background: #26374870; backdrop-filter: blur(5px); }.dialog-close { position: absolute; top: 12px; right: 12px; background: #f0eadd; }.dialog-close svg { width: 18px; height: 18px; }
dialog h2 { font-size: 27px; line-height: 1.15; letter-spacing: -.8px; margin: 17px 0 13px; color: #4e3c52; }dialog p { font-size: 14px; line-height: 1.65; color: #83766f; }dialog .dialog-art { display: block; padding-right: 35px; font-size: 11px; font-weight: 700; color: #8b6944; }dialog label { display: block; font-size: 13px; font-weight: 650; margin: 22px 0 9px; }dialog input { width: 100%; border: 1px solid #d9cebe; background: #fffef9; border-radius: 13px; padding: 15px; font-size: 16px; color: #544751; }dialog .form-error { color: #a3483b; font-size: 12px; min-height: 18px; margin: 0 0 9px; }dialog .primary-button { margin-top: 19px; }dialog .secondary-button { width: 100%; margin-top: 11px; }.dialog-feature-list { padding-left: 18px; font-size: 13px; color: #83766f; line-height: 1.9; }
.floating-spark { position: absolute; width: 5px; height: 5px; background: #fffbe2; border-radius: 50%; animation: spark 5s ease-in-out infinite; pointer-events: none; }.floating-spark:nth-of-type(1) { left: 25%; top: 30%; }.floating-spark:nth-of-type(2) { right: 20%; top: 45%; animation-delay: -2s; }.floating-spark:nth-of-type(3) { left: 36%; bottom: 25%; animation-delay: -3s; }
@media (max-height: 740px) { .brand { top: 0; width: 54%; }.header-caption { top: 112px; font-size: 11px; }.header-search,.header-info { top: 25px; }.journey-card { bottom: calc(97px + var(--safe-bottom)); min-height: 61px; padding-block: 6px; }.mini-egg { height: 43px; width: 35px; }.journey-copy strong { font-size: 14px; }.journey-copy>span { font-size: 10px; }.bottom-nav { height: 65px; }.nav-item { min-height: 50px; }.art-stage { height: 215px; }.island-label { font-size: 10px; padding-inline: 7px; gap: 4px; }.island-label.origin { font-size: 13px; }.map-tools { top: 51%; }.map-tools .icon-button { width: 44px; height: 44px; } }
@media (hover:hover) and (pointer:fine) { .icon-button:hover { background: #fff; }.island-label:hover { background: #fff; }.nav-item:hover { background: #fff; }.primary-button:hover { filter: brightness(1.04); }.secondary-button:hover { background: #fff7e9; } }
@keyframes egg-breathe { 0%,100% { transform: translateY(0) rotate(-2deg); }50% { transform: translateY(-6px) rotate(2deg); } }
@keyframes egg-hatch { 0%,100% { transform: rotate(-1deg) scale(1.025); }50% { transform: rotate(1deg) scale(1.035); } }
@keyframes hatch-glow { from { opacity: .2; }to { opacity: 1; } }
@keyframes reveal { from { opacity: 0; transform: translateY(8px) scale(.98); }to { opacity: 1; transform: none; } }
@keyframes spark { 0%,100% { opacity: .15; transform: translateY(4px); }50% { opacity: .9; transform: translateY(-12px); } }
@keyframes sheet-in { from { opacity: 0; transform: translateY(24px); }to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion:reduce) { *,*::before,*::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }.map-scene { will-change: auto; } }

/* Keep all nine destinations visible on compact phones. */
.island-label:not(.origin) { width: 128px; gap: 6px; padding-inline: 8px; font-weight: 650; }
.island-label:not(.origin)>svg:last-child { display: none; }
.island-label.origin { font-weight: 650; }
.map-tools { top: calc(159px + var(--safe-top)); right: 11px; }
.map-tools>.icon-button:not(.map-toggle) { display: none; }
.map-tools.expanded>.icon-button { display: inline-grid; }
.header-caption { font-weight: 650; }
.detail-copy h1, .journey-copy strong, .screen-title { font-weight: 650; }
@media(max-height:740px) { .map-tools { top: 133px; }.island-label:not(.origin) { width: 122px; } }

@media(max-height:740px) { .island-label[data-island="Coral"],.island-label[data-island="Bloom"] { top: 63% !important; } }

/* Keep the first action above the navigation on short phones. */
#egg-view .detail-topline, #xmon-view .detail-topline { display: none; }
@media(max-height:740px) { .art-stage { height: 190px; }.detail-copy { padding-top: 18px; }.detail-copy h1 { font-size: 25px; }.timer-caption { margin-bottom: 13px; } }

:root { --map-footprint: 212px; }
.map-viewport { top: var(--safe-top); }
@media(max-height:740px) { :root { --map-footprint: 197px; } }

/* The bottom three labels share the available space above the welcome panel. */
.island-label[data-island="Coral"] { top: min(66%, calc(100% - var(--map-footprint) - var(--safe-bottom) - 50px)) !important; }
.island-label[data-island="Bloom"] { top: min(68%, calc(100% - var(--map-footprint) - var(--safe-bottom) - 50px)) !important; }

.app:not([data-view="world"])::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: calc(23px + var(--safe-bottom)); background: #fff8ed; z-index: 8; pointer-events: none; }
