/* Jhilmil — soft, round and bright. Big targets for small fingers. */
:root {
  --ink: #3a2a55; --soft: #6f6287; --page: #fff8fb; --card: #ffffff; --line: #f1e4f2;
  --pink: #ff8fb3; --lemon: #ffe08a; --mint: #b6ecc5; --sky: #b5dcff; --lilac: #d9ccff;
  --r: 22px; --shadow: 0 6px 0 rgba(58, 42, 85, .08), 0 14px 30px rgba(58, 42, 85, .08);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--ink); font: 500 17px/1.5 Nunito, system-ui, sans-serif; overflow-x: hidden; }
h1, h2, h3, .name, .act, .mode, .tabs button, .card b { font-family: 'Baloo 2', Nunito, sans-serif; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid #7d5cff; outline-offset: 2px; }
[hidden] { display: none !important; }

.bar { display: flex; align-items: center; gap: 14px; padding: 10px max(16px, env(safe-area-inset-left)); max-width: 1280px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.logo { width: 38px; height: 38px; border-radius: 50%; background: radial-gradient(circle at 34% 46%, #2a1c3c 0 9%, transparent 10%), radial-gradient(circle at 66% 46%, #2a1c3c 0 9%, transparent 10%), radial-gradient(circle at 22% 64%, #ff8fb0 0 8%, transparent 9%), radial-gradient(circle at 78% 64%, #ff8fb0 0 8%, transparent 9%), var(--lilac); box-shadow: 0 3px 0 rgba(58, 42, 85, .12); }
.name { font-weight: 800; font-size: 26px; line-height: 1; }
.links { display: flex; gap: 6px; margin-left: 10px; }
.links a { white-space: nowrap; color: var(--soft); text-decoration: none; font-weight: 700; font-size: 15px; padding: 8px 12px; border-radius: 999px; }
.links a:hover { background: #fbeef5; color: var(--ink); }
.grow { flex: 1; }
.round { width: 46px; height: 46px; border-radius: 50%; background: var(--card); box-shadow: var(--shadow); font-size: 20px; display: grid; place-items: center; }
.round.small { width: 36px; height: 36px; font-size: 15px; box-shadow: 0 3px 0 rgba(58, 42, 85, .1); }
.round:active, .act:active, .mode:active, .pk:active, .sw:active { transform: translateY(2px); }

.maker { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(340px, .9fr); gap: 18px; max-width: 1280px; margin: 0 auto; padding: 4px 16px 20px; align-items: stretch; }
.stage { position: relative; border-radius: 32px; overflow: hidden; min-height: 560px; height: min(74vh, 720px); box-shadow: var(--shadow); transition: background .6s; background: linear-gradient(#cfefff, #fff6dc 62%, #d9f5c8); }
.stage[data-mode="fly"] { background: linear-gradient(#bfe1ff, #e6dcff 55%, #ffe3ef); }
.stage[data-mode="swim"] { background: linear-gradient(#b9f3ea, #9fdcf5 60%, #8ecbf0); }
.stage::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 84% 14%, rgba(255, 255, 255, .9) 0 5%, rgba(255, 255, 255, .35) 6% 11%, transparent 12%); }
.stage[data-mode="swim"]::before { background: repeating-linear-gradient(105deg, rgba(255, 255, 255, .16) 0 30px, transparent 30px 110px); }
#gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; cursor: grab; }
#gl:active { cursor: grabbing; }
.hint { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); margin: 0; padding: 6px 16px; border-radius: 999px; background: rgba(255, 255, 255, .8); font-weight: 700; font-size: 15px; white-space: nowrap; pointer-events: none; animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translate(-50%, 5px); } }
.who { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 18px 16px; text-align: center; pointer-events: none; background: linear-gradient(transparent, rgba(255, 255, 255, .7) 55%); }
.who-name { display: inline-flex; align-items: center; gap: 10px; pointer-events: auto; }
.who h1 { margin: 0; font-size: clamp(30px, 4.4vw, 46px); line-height: 1.05; font-weight: 800; }
.who p { margin: 2px 0 0; color: var(--soft); font-weight: 700; font-size: 16px; }
.nogl { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 30px; font-weight: 700; margin: 0; }
.hearts { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.hearts span { position: absolute; font-size: 30px; opacity: 0; animation: fly 1.3s ease-out forwards; }
@keyframes fly { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.3); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1.3) rotate(20deg); } }

.panel { background: var(--card); border-radius: 32px; box-shadow: var(--shadow); padding: 16px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mode { border-radius: 18px; padding: 10px 6px 8px; font-weight: 700; font-size: 18px; line-height: 1.1; display: grid; justify-items: center; gap: 2px; background: #f7f1fb; border: 3px solid transparent; }
.mode span { font-size: 28px; line-height: 1.1; }
.mode.walk[aria-checked="true"] { background: #e3f7d6; border-color: #9ad98a; }
.mode.fly[aria-checked="true"] { background: #e6ecff; border-color: #a9bcff; }
.mode.swim[aria-checked="true"] { background: #d6f4f3; border-color: #7fd6d2; }
.tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.tabs button { border-radius: 14px; padding: 7px 2px 5px; font-weight: 700; font-size: 14px; line-height: 1.15; display: grid; justify-items: center; color: var(--soft); background: #faf6fc; min-height: 56px; }
.tabs button span { font-size: 22px; line-height: 1.2; }
.tabs button[aria-selected="true"] { background: var(--ink); color: #fff; }
.opts { flex: 1; min-height: 232px; }
.opts h3 { margin: 4px 2px 8px; font-size: 16px; font-weight: 700; color: var(--soft); }
.opts h3:not(:first-child) { margin-top: 14px; }
.swatches { display: flex; flex-wrap: wrap; gap: 9px; }
.sw { width: 44px; height: 44px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 2px var(--line), 0 3px 0 rgba(58, 42, 85, .08); }
.sw[aria-pressed="true"] { box-shadow: 0 0 0 4px var(--ink); transform: scale(1.06); }
.picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.pk { border-radius: 16px; padding: 9px 4px 7px; background: #faf6fc; border: 3px solid transparent; font-weight: 700; font-size: 15px; line-height: 1.15; display: grid; justify-items: center; gap: 2px; min-height: 68px; }
.pk span { font-size: 25px; line-height: 1.15; white-space: nowrap; }
.pk[aria-pressed="true"] { background: #fff0f6; border-color: var(--pink); }
.slide { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; font-weight: 700; font-size: 14px; color: var(--soft); }
.slide input { width: 100%; height: 44px; accent-color: var(--pink); }
.acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.act { border-radius: 18px; padding: 11px 10px; font-weight: 700; font-size: 17px; line-height: 1.15; box-shadow: 0 4px 0 rgba(58, 42, 85, .13); display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 50px; }
.act span { font-size: 21px; }
.act.lemon { background: var(--lemon); } .act.pink { background: var(--pink); color: #4a1230; } .act.mint { background: var(--mint); } .act.sky { background: var(--sky); } .act.plain { background: #f3edf7; }
.act.done { background: #9be0a8; }
.act[disabled] { opacity: .6; }

.band { max-width: 1280px; margin: 0 auto; padding: 22px 16px 6px; }
.band h2 { margin: 0; font-size: 30px; font-weight: 800; line-height: 1.1; }
.sub { margin: 4px 0 14px; color: var(--soft); font-weight: 700; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.card { position: relative; border-radius: var(--r); box-shadow: var(--shadow); background: linear-gradient(#d9f2ff, #f2fbdc); transition: transform .15s; }
.card.fly { background: linear-gradient(#cfe4ff, #f6e4f6); } .card.swim { background: linear-gradient(#c6f5ee, #b3ddf7); }
.card:hover { transform: translateY(-3px) rotate(-1deg); }
.card .open { width: 100%; padding: 8px 8px 10px; display: grid; justify-items: center; border-radius: var(--r); }
.card img, .card i { width: 100%; aspect-ratio: 1; display: block; object-fit: contain; }
.card i { background: radial-gradient(circle, rgba(255, 255, 255, .7) 0 30%, transparent 31%); animation: bobi 1.2s ease-in-out infinite; }
@keyframes bobi { 50% { transform: scale(.9); } }
.card b { font-size: 19px; font-weight: 700; line-height: 1.1; }
.gone { position: absolute; top: 6px; right: 6px; width: 32px; height: 32px; border-radius: 50%; background: rgba(255, 255, 255, .85); font-size: 13px; font-weight: 800; color: var(--soft); }

.foot { max-width: 820px; margin: 34px auto 0; padding: 0 16px 40px; color: var(--soft); font-size: 14.5px; }
.foot a { color: inherit; }
.ad { margin: 18px 0; text-align: center; } .ad small { display: block; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; opacity: .6; }
.ad:has([data-yld]:empty) { display: none; }
.fine { text-align: center; font-size: 13px; }

dialog { border: 0; border-radius: 28px; padding: 22px; max-width: min(430px, calc(100vw - 32px)); color: var(--ink); box-shadow: 0 30px 80px rgba(58, 42, 85, .35); }
dialog::backdrop { background: rgba(58, 42, 85, .45); }
dialog h3 { margin: 0 0 6px; font-size: 24px; line-height: 1.15; }
dialog p { margin: 0 0 12px; color: var(--soft); font-size: 15px; }
dialog label { display: block; font-weight: 800; font-size: 14px; margin-bottom: 4px; }
dialog input[type="email"] { width: 100%; font: inherit; padding: 12px 14px; border-radius: 14px; border: 2px solid var(--line); color: var(--ink); }
dialog .row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.msg { min-height: 22px; margin: 8px 0 !important; font-weight: 700; color: var(--ink) !important; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

@media (max-width: 900px) {
  .maker { grid-template-columns: 1fr; gap: 12px; padding: 0 10px 14px; }
  .stage { min-height: 0; height: 48vh; border-radius: 26px; }
  .panel { border-radius: 26px; padding: 12px; }
  .opts { min-height: 0; }
  .links { margin-left: 0; gap: 0; }
  .links a { padding: 8px 6px; font-size: 13.5px; }
  .who p { font-size: 14px; }
}
@media (max-width: 520px) {
  .links a:last-child { display: none; }
  .name { font-size: 23px; }
  .tabs button { font-size: 12.5px; }
  .mode { font-size: 16px; }
  .picks { grid-template-columns: repeat(3, 1fr); }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .act { font-size: 15.5px; }
}
@media (prefers-reduced-motion: reduce) { .hint, .card i { animation: none; } html { scroll-behavior: auto; } }
