/* ハジマラナイ — soshage launch screen on the outside, real OS/app UI on the inside. */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; height: 100%; overflow: hidden; background: #160f3a;
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Noto Sans CJK JP", "Yu Gothic UI", Meiryo, system-ui, sans-serif;
  color: #2a1b55; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  touch-action: manipulation; overscroll-behavior: none; -webkit-text-size-adjust: 100%;
}
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; -webkit-touch-callout: none; }
.hidden { display: none !important; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }

#app {
  position: relative; width: 100%; height: 100vh; height: 100dvh; margin: 0 auto; overflow: hidden;
  container-type: size; background: #251a6b; isolation: isolate;
}
@media (min-width: 600px) and (min-height: 560px) {
  body { display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at 50% 30%, #3b2b8a, #120b30 70%); }
  #app { width: 400px; height: min(860px, calc(100dvh - 40px)); border-radius: 38px; box-shadow: 0 0 0 10px #0b0820, 0 0 0 12px #3a3160, 0 30px 80px rgba(0,0,0,.6); }
}
#scene { position: absolute; inset: 0; }
.scr { position: absolute; inset: 0; overflow: hidden; }
.scr.enter { animation: scrIn .38s ease-out both; }
.scr.leave { animation: scrOut .36s ease-in both; pointer-events: none; z-index: 1; }
@keyframes scrIn { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: none; } }
@keyframes scrOut { to { opacity: 0; transform: scale(.97); } }

#app.shaking { animation: shake .42s cubic-bezier(.36,.07,.19,.97); }
@keyframes shake {
  10%, 90% { transform: translate(calc(var(--shk, 6px) * -.3), 1px); }
  20%, 80% { transform: translate(calc(var(--shk, 6px) * .6), -1px); }
  30%, 50%, 70% { transform: translate(calc(var(--shk, 6px) * -1), 2px); }
  40%, 60% { transform: translate(var(--shk, 6px), -2px); }
}

/* --- soshage backdrop ------------------------------------------------------------- */
.soshage { background: radial-gradient(130% 80% at 50% 18%, #ffe0f4 0%, #f7a6e3 20%, #b07cff 46%, #5a43d8 74%, #2a1d78 100%); }
.rays {
  position: absolute; left: 50%; top: 40%; width: 170cqh; height: 170cqh; margin: -85cqh 0 0 -85cqh; border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, rgba(255,255,255,.16) 0deg 7deg, rgba(255,255,255,0) 7deg 20deg);
  -webkit-mask: radial-gradient(closest-side, #000 8%, rgba(0,0,0,.6) 40%, transparent 75%);
  mask: radial-gradient(closest-side, #000 8%, rgba(0,0,0,.6) 40%, transparent 75%);
  animation: spin 60s linear infinite; pointer-events: none;
}
@keyframes spin { to { transform: rotate(360deg); } }
.sparkles { position: absolute; inset: 0; pointer-events: none; }
.sp {
  position: absolute; width: calc(14px * var(--z)); height: calc(14px * var(--z)); background: #fff;
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
  filter: drop-shadow(0 0 4px #fff); animation: twinkle 2.6s ease-in-out var(--d) infinite; opacity: 0;
}
@keyframes twinkle { 0%, 100% { opacity: 0; transform: scale(.3) rotate(0); } 50% { opacity: .95; transform: scale(1) rotate(45deg); } }

/* --- the logo: dark rim, white rim, gradient fill ----------------------------------- */
.logo { position: relative; display: flex; justify-content: center; font-size: min(14cqw, 62px); font-weight: 900; line-height: 1; z-index: 2; }
.ch { position: relative; display: block; width: 1em; height: 1.18em; touch-action: none; }
.ch-in { position: absolute; inset: 0; display: block; transform: rotate(var(--rot, 0deg)) translateY(var(--ty, 0)); }
.ch:nth-child(6n+1) { --rot: -6deg; --ty: .02em; }
.ch:nth-child(6n+2) { --rot: 4deg; --ty: -.06em; }
.ch:nth-child(6n+3) { --rot: -3deg; --ty: .04em; }
.ch:nth-child(6n+4) { --rot: 5deg; --ty: -.04em; }
.ch:nth-child(6n+5) { --rot: -4deg; --ty: .05em; }
.ch:nth-child(6n+6) { --rot: 6deg; --ty: -.03em; }
.ch-o, .ch-w, .ch-f { position: absolute; left: 0; top: .08em; width: 100%; text-align: center; }
.ch-o { color: #3a1d7a; -webkit-text-stroke: .32em #3a1d7a; text-shadow: 0 .1em 0 #3a1d7a, 0 .18em .16em rgba(30,0,70,.45); }
.ch-w { color: #fff; -webkit-text-stroke: .17em #fff; }
.ch-f {
  background: linear-gradient(180deg, #fffbd0 8%, #ffe04a 38%, #ffa22f 62%, #ff5d8f 92%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.ch.changed .ch-f { background: linear-gradient(180deg, #e8fbff 8%, #7fe3ff 40%, #4b8dff 70%, #8a5bff 95%); -webkit-background-clip: text; background-clip: text; }
.ch.gold .ch-f { background: linear-gradient(180deg, #fff 0%, #fff6a0 30%, #ffc400 60%, #ff8a00 95%); -webkit-background-clip: text; background-clip: text; }
.ch.gold .ch-in { filter: drop-shadow(0 0 .18em #fff6a0) drop-shadow(0 0 .35em #ffb300); }
.ch.held .ch-in { transform: rotate(var(--rot)) translateY(var(--ty)) scale(1.12); filter: drop-shadow(0 0 .12em #fff); transition: transform .12s; }
.ch.dragging { z-index: 5; }
.ch.dragging .ch-in { filter: drop-shadow(0 .3em .25em rgba(20,0,60,.45)); }
.flyer { position: absolute; z-index: 30; pointer-events: none; }
.wob { animation: wob .5s cubic-bezier(.36,.07,.19,.97); }
@keyframes wob { 20% { transform: rotate(calc(var(--rot, 0deg) - 10deg)) scale(1.08); } 45% { transform: rotate(calc(var(--rot, 0deg) + 8deg)); } 70% { transform: rotate(calc(var(--rot, 0deg) - 4deg)); } }
.wob-s { animation: wobs .4s ease-out; }
@keyframes wobs { 30% { transform: translateX(-4px) rotate(-1deg); } 60% { transform: translateX(3px) rotate(.6deg); } }
.flicked { animation: flicked .5s cubic-bezier(.34,1.56,.64,1); }
@keyframes flicked { 0% { transform: rotate(var(--rot)) scale(.5); } 60% { transform: rotate(var(--rot)) scale(1.25); } 100% { transform: rotate(var(--rot)) translateY(var(--ty)); } }
.shake-x { animation: shakex .45s cubic-bezier(.36,.07,.19,.97); }
@keyframes shakex { 15%, 85% { transform: translateX(-3px); } 30%, 70% { transform: translateX(6px); } 45%, 55% { transform: translateX(-8px); } }
.pop-in { animation: popIn .45s cubic-bezier(.34,1.56,.64,1); }
@keyframes popIn { 0% { transform: scale(.7); } 60% { transform: scale(1.12); } 100% { transform: none; } }

/* --- title ------------------------------------------------------------------------- */
.title { display: flex; flex-direction: column; align-items: center; }
.title-top { position: relative; margin-top: 15cqh; display: flex; flex-direction: column; align-items: center; z-index: 2; }
.title-pre { font-size: 12px; font-weight: 900; letter-spacing: .5em; color: #fff; text-shadow: 0 1px 0 #6b3fd0, 0 0 8px rgba(107,63,208,.8); margin: 0 0 6px .5em; }
.ribbon { position: relative; margin-top: 4px; padding: 5px 26px; background: linear-gradient(#ff79b0, #ff4f93); color: #fff; font-weight: 900; font-size: 14px; letter-spacing: .12em;
  box-shadow: 0 3px 0 #b82a64, 0 6px 14px rgba(120,20,80,.35); border-radius: 3px; text-shadow: 0 1px 0 #b82a64; }
.ribbon::before, .ribbon::after { content: ""; position: absolute; top: 6px; width: 16px; height: 100%; background: #d63a7a; z-index: -1; }
.ribbon::before { left: -11px; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 40% 50%); }
.ribbon::after { right: -11px; clip-path: polygon(0 0, 100% 0, 60% 50%, 100% 100%, 0 100%); }
.title-egg { position: relative; width: min(34cqw, 22cqh); margin-top: 5cqh; animation: bob 2.4s ease-in-out infinite; z-index: 1; }
.title-egg .egg-svg, .ld-egg .egg-svg, .kk-egg .egg-svg { width: 100%; height: auto; display: block; overflow: visible; }
@keyframes bob { 50% { transform: translateY(-8px) rotate(2deg); } }
.title-egg.wob, .ld-egg.wob { animation: eggwob .55s cubic-bezier(.36,.07,.19,.97); }
@keyframes eggwob { 20% { transform: rotate(-14deg); } 45% { transform: rotate(11deg); } 70% { transform: rotate(-5deg); } }
.title-bottom { position: absolute; left: 0; right: 0; bottom: 11cqh; display: flex; flex-direction: column; align-items: center; gap: 10px; z-index: 3; }
.tap-hint { font-size: 12px; font-weight: 900; letter-spacing: .3em; color: #fff; text-shadow: 0 0 6px #7b54ff; animation: blink 1.4s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .35; } }
.title-foot { position: absolute; left: 14px; right: 14px; bottom: max(10px, env(safe-area-inset-bottom)); display: flex; justify-content: space-between; font-size: 10px; font-weight: 700; color: rgba(255,255,255,.75); letter-spacing: .05em; }
.link-small { font-size: 12px; font-weight: 700; color: rgba(255,255,255,.85); text-decoration: underline; text-underline-offset: 3px; padding: 6px 12px; }

.btn-start {
  position: relative; width: min(68cqw, 272px); height: 66px; border-radius: 36px; border: 3px solid #fff;
  background: linear-gradient(180deg, #fff1a6 0%, #ffcf3a 40%, #ffa000 75%, #ff8500 100%);
  box-shadow: 0 6px 0 #c45400, 0 12px 22px rgba(70,20,0,.35), inset 0 -4px 0 rgba(200,90,0,.35);
  color: #fff; font-size: 27px; font-weight: 900; letter-spacing: .14em; text-indent: .14em;
  text-shadow: 0 2px 0 #b34800, 2px 0 0 #b34800, -2px 0 0 #b34800, 0 -2px 0 #b34800, 1.5px 1.5px 0 #b34800, -1.5px 1.5px 0 #b34800, 1.5px -1.5px 0 #b34800, -1.5px -1.5px 0 #b34800, 0 4px 4px rgba(120,40,0,.4);
  animation: breathe 1.8s ease-in-out infinite; transition: transform .08s, box-shadow .08s; overflow: hidden;
}
.btn-start::before { content: ""; position: absolute; left: 8px; right: 8px; top: 4px; height: 42%; border-radius: 30px; background: linear-gradient(rgba(255,255,255,.85), rgba(255,255,255,.1)); }
.btn-start::after { content: ""; position: absolute; top: -20%; bottom: -20%; width: 30%; left: -40%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.7), transparent); transform: skewX(-20deg); animation: shine 2.8s ease-in-out infinite; }
.btn-start span { position: relative; z-index: 1; white-space: nowrap; }
@keyframes breathe { 50% { box-shadow: 0 6px 0 #c45400, 0 12px 22px rgba(70,20,0,.35), inset 0 -4px 0 rgba(200,90,0,.35), 0 0 26px 6px rgba(255,236,140,.75); filter: brightness(1.06); } }
@keyframes shine { 0%, 60% { left: -40%; } 100% { left: 130%; } }
.btn-start.pressed { animation: none; transform: translateY(5px); box-shadow: 0 1px 0 #c45400, 0 4px 10px rgba(70,20,0,.3), inset 0 -4px 0 rgba(200,90,0,.35); }
.btn-start.nope { background: linear-gradient(180deg, #e6e2f2 0%, #bdb6d6 60%, #9d95bd 100%); box-shadow: 0 6px 0 #6c6491, 0 12px 22px rgba(30,20,60,.3); animation: none; }
.btn-start.nope span { text-shadow: 0 2px 0 #5b5283, 2px 0 0 #5b5283, -2px 0 0 #5b5283, 0 -2px 0 #5b5283; font-size: 22px; letter-spacing: .06em; }
.btn-start.nope::after { display: none; }
.btn-start.go { background: linear-gradient(180deg, #fffbe0, #ffe24a 40%, #ffb300); box-shadow: 0 6px 0 #c45400, 0 0 40px #fff38a, 0 0 80px #ffcc33; animation: popIn .5s cubic-bezier(.34,1.56,.64,1); }

/* --- bubble (tsukkomi) ------------------------------------------------------------- */
#toast { position: absolute; left: 0; right: 0; top: calc(max(8px, env(safe-area-inset-top)) + 48px); display: flex; justify-content: center; pointer-events: none; z-index: 80; padding: 0 12px; }
.bubble {
  display: flex; align-items: center; gap: 9px; max-width: 100%; padding: 9px 16px 9px 9px; background: #fff; color: #2a1b55;
  border: 3px solid #2a1b55; border-radius: 18px; box-shadow: 0 5px 0 #2a1b55, 0 12px 26px rgba(10,0,40,.3);
  font-weight: 800; font-size: 16px; line-height: 1.35; transform: rotate(var(--tilt));
  animation: bubbleIn .45s cubic-bezier(.34,1.56,.64,1) both;
}
.bubble.out { animation: bubbleOut .25s ease-in both; }
.bubble-t { text-wrap: balance; word-break: auto-phrase; }
.bubble-egg { flex: none; width: 28px; height: 32px; animation: eggwob .5s .1s; }
.bubble-egg svg { width: 100%; height: 100%; display: block; }
@keyframes bubbleIn { from { opacity: 0; transform: translateY(-14px) scale(.6) rotate(var(--tilt)); } to { opacity: 1; transform: rotate(var(--tilt)); } }
@keyframes bubbleOut { to { opacity: 0; transform: translateY(-8px) scale(.9) rotate(var(--tilt)); } }

/* --- HUD ---------------------------------------------------------------------------- */
#hud { position: absolute; left: 10px; right: 10px; top: max(8px, env(safe-area-inset-top)); height: 34px; display: flex; align-items: center; gap: 6px; z-index: 70; pointer-events: none; }
#hud > * { pointer-events: auto; }
.hud-time, .hud-btn { height: 32px; border-radius: 16px; background: rgba(24,14,60,.58); color: #fff; display: flex; align-items: center; gap: 5px; font-weight: 800; font-size: 14px; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); }
.hud-time { padding: 0 11px 0 9px; font-variant-numeric: tabular-nums; min-width: 72px; }
.hud-time svg { width: 15px; height: 15px; opacity: .85; }
.hud-dots { flex: 1; display: flex; justify-content: center; gap: 7px; pointer-events: none; }
.hud-dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.35); box-shadow: 0 0 0 1.5px rgba(24,14,60,.35); transition: all .3s; }
.hud-dots i.done { background: #fff; }
.hud-dots i.on { background: #ffd23f; width: 20px; border-radius: 5px; box-shadow: 0 0 0 1.5px rgba(24,14,60,.4), 0 0 8px #ffd23f; }
.hud-btn { padding: 0 12px; }
.hud-btn svg { width: 17px; height: 17px; }
.hud-btn.pressed { transform: scale(.94); }
.hud-mute { padding: 0 8px; }
.hud-mute .x { display: none; }
.hud-mute.off .x { display: inline; }
.hud-mute.off .w { display: none; }
.hud-hint em { font-style: normal; font-size: 11px; background: #ffd23f; color: #3a1d7a; border-radius: 8px; padding: 1px 5px; margin-left: 2px; }

/* --- effects -------------------------------------------------------------------------- */
.flash { position: absolute; inset: 0; z-index: 90; pointer-events: none; animation: flash ease-out both; }
@keyframes flash { from { opacity: .9; } to { opacity: 0; } }
.spark { position: absolute; z-index: 85; width: var(--s); height: var(--s); margin: calc(var(--s) / -2); background: var(--c); pointer-events: none;
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%); animation: spark .75s cubic-bezier(.2,.8,.3,1) both; }
@keyframes spark { to { transform: translate(var(--dx), var(--dy)) rotate(180deg) scale(.2); opacity: 0; } }
.stamp-wrap { position: absolute; inset: 0; z-index: 88; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.stamp-wrap::before { content: ""; position: absolute; inset: 0; background: rgba(255,250,240,.35); animation: fadeIn .2s both; }
.stamp { position: relative; width: 168px; height: 168px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  border: 8px solid #d9261c; box-shadow: inset 0 0 0 5px rgba(255,255,255,0), inset 0 0 0 7px #d9261c; color: #d9261c; background: rgba(255,255,255,.55);
  font-size: 92px; font-weight: 900; font-family: "Hiragino Mincho ProN", "Noto Serif JP", "Noto Serif CJK JP", "Yu Mincho", serif;
  transform: rotate(-12deg); animation: stampIn .34s cubic-bezier(.2,1.5,.45,1) both; }
.stamp-in { margin-top: -6px; }
.stamp-wrap.out { animation: fadeOut .3s both; }
@keyframes stampIn { 0% { transform: scale(2.6) rotate(-30deg); opacity: 0; } 55% { transform: scale(.92) rotate(-10deg); opacity: 1; } 100% { transform: scale(1) rotate(-12deg); } }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }

/* --- loading ---------------------------------------------------------------------------- */
.loading { background: radial-gradient(120% 75% at 50% 32%, #8f6cff 0%, #5a3fd8 38%, #2c1d84 72%, #170f4a 100%); color: #fff; }
.loading .rays { top: 34%; }
.ld-mid { position: absolute; left: 0; right: 0; top: 21cqh; display: flex; flex-direction: column; align-items: center; }
.ld-egg { width: min(30cqw, 19cqh); animation: hop .7s cubic-bezier(.3,0,.7,1) infinite alternate; }
@keyframes hop { from { transform: translateY(0) scale(1.03, .97); } to { transform: translateY(-18px) scale(.98, 1.03); } }
.ld-label { margin-top: 12px; font-weight: 900; font-size: 18px; letter-spacing: .2em; text-shadow: 0 2px 0 #3a1d7a, 0 0 10px #a98bff; }
.dots i { font-style: normal; animation: dot 1.2s infinite; }
.dots i:nth-child(2) { animation-delay: .2s; } .dots i:nth-child(3) { animation-delay: .4s; }
@keyframes dot { 0%, 60%, 100% { opacity: .2; } 30% { opacity: 1; } }
.done .ld-label { color: #ffe04a; letter-spacing: .1em; }
.done .ld-egg { animation: hop .25s cubic-bezier(.3,0,.7,1) 4 alternate; }
.ld-panel { position: absolute; left: 6cqw; right: 6cqw; bottom: 9cqh; }
.ld-row { display: flex; align-items: flex-end; justify-content: space-between; margin: 0 2px 7px; }
.ld-cap { font-size: 12px; font-weight: 700; opacity: .85; }
.ld-pct { font-size: 30px; font-weight: 900; font-variant-numeric: tabular-nums; line-height: 1; text-shadow: 0 2px 0 #3a1d7a; padding: 4px 0 0 8px; }
.stuck .ld-pct { animation: pctPulse 1.1s ease-in-out infinite; }
@keyframes pctPulse { 50% { color: #ffe04a; } }
.ld-pct.wob { animation: popIn .4s; }
.ld-bar { position: relative; display: flex; gap: 3px; height: 26px; padding: 3px; border-radius: 15px; background: rgba(10,4,40,.55); box-shadow: inset 0 2px 4px rgba(0,0,0,.4), 0 0 0 2px rgba(255,255,255,.75); transition: box-shadow .2s; }
.ld-bar.hover { box-shadow: inset 0 2px 4px rgba(0,0,0,.4), 0 0 0 2px #fff, 0 0 18px 4px #ffe04a; }
.ld-bar.wob { animation: wobs .35s; }
.ld-track { flex: 1; position: relative; border-radius: 12px 4px 4px 12px; overflow: hidden; }
.ld-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 12px 4px 4px 12px;
  background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,0) 55%), repeating-linear-gradient(-45deg, rgba(255,255,255,.18) 0 8px, transparent 8px 16px), linear-gradient(90deg, #4ee6ff, #7f8cff 55%, #ff74c8);
  background-size: auto, 22px 22px, auto; animation: stripes .6s linear infinite; }
@keyframes stripes { to { background-position: 0 0, 22px 0, 0 0; } }
.ld-slot { flex: none; width: 26px; border-radius: 4px 12px 12px 4px; border: 2px dashed rgba(255,255,255,.55); }
.stuck .ld-slot { animation: slotBlink 1.2s ease-in-out infinite; }
@keyframes slotBlink { 50% { border-color: #ffe04a; background: rgba(255,224,74,.15); } }
.ld-slot.filled { border: 0; background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,0) 55%), linear-gradient(90deg, #ff74c8, #ff9ad8); animation: popIn .4s; }
.done .ld-track, .done .ld-slot { box-shadow: 0 0 14px #fff; }
.tips { margin-top: 16px; position: relative; min-height: 76px; padding: 14px 14px 12px; border-radius: 14px; background: rgba(255,255,255,.94); color: #3a2a6e; box-shadow: 0 4px 0 rgba(30,10,90,.5), 0 10px 20px rgba(0,0,0,.25); }
.tips-tag { position: absolute; left: 12px; top: -10px; padding: 2px 10px; border-radius: 10px; background: #ff5d8f; color: #fff; font-size: 11px; font-weight: 900; letter-spacing: .1em; box-shadow: 0 2px 0 #b82a64; }
.tips-text { margin: 0; font-size: 15px; line-height: 1.6; font-weight: 500; }
.tips-text.tip-in { animation: tipIn .35s ease-out; }
@keyframes tipIn { from { opacity: 0; transform: translateY(6px); } }
.one { font-weight: 800; display: inline-block; touch-action: none; padding: 0 1px; transition: transform .15s; }
.one.taken { visibility: hidden; }
.one.wob { animation: popIn .4s; }
.one-ghost { position: absolute; z-index: 60; width: 58px; height: 34px; border-radius: 6px; display: flex; align-items: center; justify-content: center; pointer-events: none;
  font-weight: 900; font-size: 16px; color: #fff; text-shadow: 0 1px 0 #6a2b8f;
  background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,0) 55%), linear-gradient(90deg, #ff74c8, #ff9ad8);
  box-shadow: 0 0 0 2px #fff, 0 8px 16px rgba(20,0,60,.4); transform: scale(.4); opacity: 0; }
.one-ghost.lift { transform: scale(1); opacity: 1; transition: transform .18s cubic-bezier(.34,1.56,.64,1), opacity .1s; }
.one-ghost.near { box-shadow: 0 0 0 2px #fff, 0 0 20px 6px #ffe04a; transform: scale(.85); }
.one-ghost.back { transition: left .25s ease-in, top .25s ease-in, transform .25s, opacity .25s; transform: scale(.4); opacity: 0; }
.one-ghost.snap { transition: all .16s ease-in; font-size: 0; border-radius: 4px 12px 12px 4px; box-shadow: none; transform: none; }

/* --- cards, dialogs -------------------------------------------------------------------- */
.bg-title { position: absolute; left: 0; right: 0; top: 18cqh; filter: blur(2px); opacity: .7; }
.scrim { position: absolute; inset: 0; background: rgba(22,10,60,.45); }
.card { position: absolute; left: 50%; transform: translateX(-50%); width: min(90cqw, 360px); background: #fff; border-radius: 22px; color: #2c2540;
  box-shadow: 0 0 0 4px rgba(255,255,255,.35), 0 18px 50px rgba(15,5,50,.5); animation: cardIn .45s cubic-bezier(.34,1.4,.64,1) both; }
@keyframes cardIn { from { opacity: 0; transform: translateX(-50%) translateY(30px) scale(.92); } }
.b-main { display: block; width: 100%; height: 50px; border-radius: 25px; font-size: 17px; font-weight: 800; color: #fff;
  background: linear-gradient(180deg, #5aa2ff, #3a6dff); box-shadow: 0 4px 0 #2448b8; transition: transform .08s, box-shadow .08s, background .2s; }
.b-main.pressed { transform: translateY(3px); box-shadow: 0 1px 0 #2448b8; }
.b-main.off { background: #cfcdd8; box-shadow: 0 4px 0 #aeacba; color: #f7f6fa; }
.b-main.off.pressed { transform: translateY(1px); box-shadow: 0 3px 0 #aeacba; }
.b-main.on { background: linear-gradient(180deg, #4ad38a, #19a865); box-shadow: 0 4px 0 #0f7a46, 0 0 18px rgba(25,168,101,.5); }
.b-sub { display: block; width: 100%; height: 50px; border-radius: 25px; font-size: 16px; font-weight: 800; color: #6a6480; background: #fff; box-shadow: inset 0 0 0 2px #dad7e3, 0 4px 0 #dad7e3; }
.b-sub.pressed { transform: translateY(3px); box-shadow: inset 0 0 0 2px #dad7e3, 0 1px 0 #dad7e3; }
.b-link { display: block; margin: 8px auto 0; padding: 8px 16px; font-size: 14px; font-weight: 700; color: #8a84a0; }

/* terms */
.terms-card { top: calc(max(8px, env(safe-area-inset-top)) + 50px); bottom: max(16px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; padding: 16px 16px 14px; }
.card-hd { text-align: center; padding-bottom: 10px; border-bottom: 1px solid #eceaf2; }
.card-hd b { display: block; font-size: 19px; font-weight: 900; color: #2a1b55; }
.card-hd small { display: block; margin-top: 2px; font-size: 11.5px; color: #8a84a0; }
.terms-box { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; -webkit-overflow-scrolling: touch; margin: 10px 0 0; padding: 14px 14px 18px; background: #f6f5fa; border-radius: 12px; font-size: 13.5px; line-height: 1.75; color: #3d3754; box-shadow: inset 0 0 0 1px #ebe9f2; }
.t-title { margin: 0 0 8px; text-align: center; font-size: 15px; font-weight: 900; }
.t-pre { margin: 0 0 12px; }
.art { margin: 0 0 12px; }
.art-h { margin: 0 0 3px; font-size: 14px; font-weight: 900; color: #2a1b55; white-space: nowrap; }
.art-n { display: inline-block; width: 4em; }
.art-p { margin: 0; padding-left: 1em; text-indent: -1em; }
.art-p:not(:has(.art-num)) { padding-left: 0; text-indent: 1em; }
.art-num { display: inline-block; width: 1em; text-indent: 0; font-weight: 700; color: #8a84a0; }
.sign { margin-top: 18px; padding: 14px 4px 4px; border-top: 1px dashed #cfcbe0; }
.sign-date { font-size: 12.5px; color: #6a6480; margin-bottom: 14px; text-align: right; }
.sign-row { display: flex; align-items: flex-end; gap: 6px; }
.sign-label { font-size: 13.5px; font-weight: 700; padding-bottom: 6px; }
.sign-line { flex: 1; height: 1px; background: #3d3754; margin-bottom: 9px; }
.seal { position: relative; flex: none; width: 66px; height: 66px; display: flex; align-items: center; justify-content: center; touch-action: none; border-radius: 50%; }
.seal-txt { font-size: 15px; color: #3d3754; letter-spacing: -.05em; transition: opacity .2s; }
.seal-ring { position: absolute; inset: 6px; border-radius: 50%; background: conic-gradient(#d9261c calc(var(--p, 0) * 1%), transparent 0); -webkit-mask: radial-gradient(closest-side, transparent 78%, #000 80%); mask: radial-gradient(closest-side, transparent 78%, #000 80%); opacity: 0; }
.seal.pressing .seal-ring { opacity: 1; animation: ring .62s linear forwards; }
.seal.pressing { background: rgba(217,38,28,.08); transform: scale(.95); transition: transform .2s; }
@property --p { syntax: "<number>"; inherits: false; initial-value: 0; }
@keyframes ring { to { --p: 100; } }
.seal.stamped .seal-txt { opacity: .15; }
.seal.wob { animation: wobs .4s; }
.inkan { position: absolute; inset: 0; animation: stampIn .3s cubic-bezier(.2,1.5,.45,1) both; transform: rotate(-12deg); }
.seal-svg { width: 100%; height: 100%; display: block; overflow: visible; }
.seal-text text { font-family: "Hiragino Mincho ProN", "Noto Serif JP", "Noto Serif CJK JP", "Yu Mincho", serif; }
.scroll-note { text-align: center; font-size: 12px; font-weight: 700; color: #8a84a0; padding: 8px 0 10px; }
.scroll-note.read { color: #19a865; }
.card-btns { display: flex; gap: 10px; }
.card-btns > * { flex: 1; }

/* update dialog */
.upd-card { top: 50%; transform: translate(-50%, -50%); padding: 26px 22px 16px; text-align: center; animation: cardIn2 .45s cubic-bezier(.34,1.4,.64,1) both; }
@keyframes cardIn2 { from { opacity: 0; transform: translate(-50%, -40%) scale(.92); } }
.upd-icon { width: 76px; height: 76px; margin: 0 auto 12px; filter: drop-shadow(0 6px 10px rgba(60,20,120,.3)); }
.upd-icon svg { width: 100%; height: 100%; }
.upd-title { font-size: 19px; font-weight: 900; color: #2a1b55; }
.upd-body { font-size: 14px; line-height: 1.65; color: #5d5775; margin: 10px 0 18px; }
.upd-prog { margin: 0 0 12px; font-size: 13px; font-weight: 700; color: #6a6480; }
.upd-bar { height: 10px; border-radius: 5px; background: #ebe9f2; overflow: hidden; margin-bottom: 8px; position: relative; }
.upd-bar i { position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(90,162,255,.5), transparent); animation: indet 1.2s linear infinite; }
@keyframes indet { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

/* iOS alert */
.alert-bg { position: absolute; inset: 0; z-index: 75; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.32); animation: fadeIn .18s both; }
.alert-bg.out { animation: fadeOut .18s both; pointer-events: none; }
.alert { width: 272px; border-radius: 14px; overflow: hidden; background: rgba(246,246,248,.96); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", "Noto Sans CJK JP", sans-serif; color: #000; animation: alertIn .28s cubic-bezier(.3,1.4,.6,1) both; }
@keyframes alertIn { from { transform: scale(1.18); opacity: 0; } }
.alert-tx { padding: 19px 16px 17px; text-align: center; }
.alert-tx b { display: block; font-size: 17px; font-weight: 700; line-height: 1.3; }
.alert-tx p { margin: 5px 0 0; font-size: 13px; line-height: 1.45; }
.alert-btns { display: flex; border-top: .5px solid rgba(60,60,67,.3); }
.alert-b { flex: 1; height: 44px; font-size: 17px; color: #007aff; font-family: inherit; }
.alert-b + .alert-b { border-left: .5px solid rgba(60,60,67,.3); }
.alert-b.bold { font-weight: 700; }
.alert-b.red { color: #ff3b30; }
.alert-b.pressed { background: rgba(0,0,0,.08); }
.alert-ok { width: 44px; height: 44px; margin: 0 auto 10px; border-radius: 50%; background: #34c759; color: #fff; font-size: 26px; font-weight: 900; line-height: 44px; animation: popIn .45s; }
.spin { width: 30px; height: 30px; margin: 2px auto 12px; border-radius: 50%; border: 3px solid rgba(0,0,0,.12); border-top-color: #8e8e93; animation: spin .8s linear infinite; }

/* --- iOS settings: storage -------------------------------------------------------------- */
.ios-scr { position: absolute; inset: 0; z-index: 5; background: #f2f2f7; color: #000; transform: translateX(100%); transition: transform .38s cubic-bezier(.2,.9,.3,1);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", "Noto Sans CJK JP", sans-serif; display: flex; flex-direction: column; }
.ios-scr.in { transform: none; }
.ios-nav { flex: none; position: relative; height: calc(max(8px, env(safe-area-inset-top)) + 84px); padding-top: calc(max(8px, env(safe-area-inset-top)) + 40px); background: rgba(249,249,249,.94); border-bottom: .5px solid rgba(0,0,0,.2); display: flex; align-items: center; justify-content: center; }
.ios-back { position: absolute; left: 6px; bottom: 9px; color: #007aff; font-size: 17px; padding: 4px 6px; }
.ios-back.wob { animation: wobs .35s; }
.ios-navt { font-size: 17px; font-weight: 600; }
.ios-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; padding: 14px 16px 30px; }
.ios-sum { background: #fff; border-radius: 10px; padding: 12px 14px 12px; }
.ios-sum-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 15px; }
.ios-sum-top span { font-size: 13px; color: #8e8e93; }
.ios-meter { display: flex; gap: 1.5px; height: 18px; border-radius: 4px; overflow: hidden; margin: 10px 0 8px; background: #e5e5ea; }
.ios-meter i { display: block; transition: flex .6s ease; }
.ios-meter i.free { background: #e5e5ea; }
.ios-legend { display: flex; gap: 12px; font-size: 11.5px; color: #3c3c43; flex-wrap: wrap; }
.ios-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; vertical-align: 0; }
.ios-alert { display: flex; align-items: center; gap: 9px; margin: 12px 0 0; padding: 11px 13px; border-radius: 10px; background: #fff; color: #ff3b30; font-size: 14px; font-weight: 600; box-shadow: inset 0 0 0 1.5px rgba(255,59,48,.35); }
.ios-alert-ic { flex: none; width: 22px; height: 22px; border-radius: 50%; background: #ff3b30; color: #fff; font-size: 14px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.ios-alert.ok { color: #248a3d; box-shadow: inset 0 0 0 1.5px rgba(52,199,89,.4); animation: popIn .4s; }
.ios-alert.ok .ios-alert-ic { background: #34c759; }
.ios-cap { font-size: 13px; color: #6d6d72; margin: 18px 16px 6px; }
.ios-group { background: #fff; border-radius: 10px; overflow: hidden; margin-bottom: 18px; }
.row { position: relative; height: 58px; overflow: hidden; transition: height .3s ease, opacity .3s; }
.row.gone { opacity: 0; }
.row + .row::before { content: ""; position: absolute; left: 58px; right: 0; top: 0; height: .5px; background: rgba(60,60,67,.25); z-index: 2; }
.row-del { opacity: 0; position: absolute; right: 0; top: 0; bottom: 0; width: 84px; background: #ff3b30; color: #fff; font-size: 15px; font-weight: 500; display: flex; align-items: center; justify-content: flex-end; padding-right: 22px; }
.row.open .row-del { opacity: 1; }
.row-main { position: relative; z-index: 1; height: 100%; display: flex; align-items: center; gap: 12px; padding: 0 12px 0 14px; background: #fff; touch-action: pan-y; }
.row.nudge .row-main { animation: nudge .55s cubic-bezier(.3,1.3,.5,1); }
@keyframes nudge { 35% { transform: translateX(-46px); } }
.row-ic { flex: none; width: 32px; height: 32px; }
.row-ic svg { width: 100%; height: 100%; display: block; border-radius: 7px; }
.ic-badge { position: relative; display: block; width: 100%; height: 100%; }
.ic-badge .badge { position: absolute; right: -4px; bottom: -4px; width: 15px; height: 15px; border-radius: 50%; }
.row-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row-tx b { font-size: 16px; font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-tx small { font-size: 12px; color: #8e8e93; margin-top: 1px; white-space: nowrap; }
.row-sz { font-size: 15px; color: #8e8e93; white-space: nowrap; }
.chev { color: #c4c4c7; font-size: 22px; line-height: 1; margin-left: 2px; }

/* --- ad ------------------------------------------------------------------------------------- */
.kk-scr { background: #000; }
.kk { position: absolute; inset: 0; overflow: hidden; color: #fff; transition: transform .55s cubic-bezier(.6,-.3,.7,1), opacity .5s, border-radius .5s; }
.kk.closing { transform: scale(.05) rotate(-20deg); opacity: 0; border-radius: 80px; }
.kk-bg { position: absolute; inset: 0; background: linear-gradient(160deg, #1a0f4f, #3c1a7a 45%, #0e2a6b); }
.kk-bg i { position: absolute; width: 70cqw; height: 70cqw; border-radius: 50%; filter: blur(40px); opacity: .55; animation: blob 7s ease-in-out infinite alternate; }
.kk-bg .b1 { background: #ff4fa3; left: -20cqw; top: 10cqh; }
.kk-bg .b2 { background: #4fd7ff; right: -25cqw; top: 40cqh; animation-delay: -2s; }
.kk-bg .b3 { background: #8a5cff; left: 10cqw; bottom: -20cqw; animation-delay: -4s; }
@keyframes blob { to { transform: translate(10cqw, -6cqh) scale(1.2); } }
.kk-top { position: absolute; left: 12px; top: calc(max(8px, env(safe-area-inset-top)) + 44px); display: flex; gap: 6px; z-index: 3; }
.kk-tag { font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 4px; background: #ffd23f; color: #3a2a00; }
.kk-info { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.7); font-size: 11px; font-weight: 800; font-style: italic; line-height: 15px; color: rgba(255,255,255,.85); font-family: Georgia, serif; }
.kk-x { position: absolute; z-index: 6; right: 12px; top: calc(max(8px, env(safe-area-inset-top)) + 40px); width: 30px; height: 30px; margin: 0; border-radius: 50%; background: rgba(0,0,0,.45); color: rgba(255,255,255,.9); font-size: 20px; line-height: 28px; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.5);
  transition: left .35s cubic-bezier(.34,1.56,.64,1), top .35s cubic-bezier(.34,1.56,.64,1), transform .2s; }
.kk-x.moved { right: auto; transform: rotate(180deg); }
.kk-content { position: absolute; left: 0; right: 0; top: 12cqh; bottom: 10cqh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2cqh; z-index: 2; }
.kk-catch1 { font-size: min(7cqw, 28px); font-weight: 900; text-shadow: 0 3px 0 #3a1d7a, 0 0 18px rgba(255,79,163,.8); transform: rotate(-3deg); }
.kk-catch1 b { color: #ffe04a; }
.kk-logo { font-size: min(12cqw, 52px); }
.kk-logo.glitch { animation: glitch .24s steps(3) both; }
.kk-logo.glitch .ch:nth-child(5), .kk-logo.glitch .ch:nth-child(6) { opacity: 0; }
.kk-logo.glitch .ch:nth-child(-n+4) { transform: translateX(1em); }
@keyframes glitch { 0% { filter: hue-rotate(90deg) brightness(1.6); transform: translateX(-3px) skewX(-8deg); } 50% { filter: none; transform: translateX(3px); } 100% { filter: hue-rotate(-60deg); transform: none; } }
.kk-egg { width: min(38cqw, 24cqh); animation: bob 1.6s ease-in-out infinite; }
.kk-catch2 { font-size: 15px; font-weight: 800; letter-spacing: .04em; text-shadow: 0 2px 6px rgba(0,0,0,.6); }
.kk-rate { font-size: 12.5px; font-weight: 700; opacity: .9; }
.kk-rate .stars { color: #ffd23f; letter-spacing: .05em; }
.kk-cta { margin-top: .6cqh; width: min(74cqw, 290px); height: 60px; border-radius: 30px; font-size: 22px; font-weight: 900; letter-spacing: .1em; color: #fff;
  background: linear-gradient(180deg, #6dff9e, #18c964 60%, #0ea050); box-shadow: 0 5px 0 #08703a, 0 0 30px rgba(60,255,140,.55); text-shadow: 0 2px 0 #08703a; animation: ctaPulse 1s ease-in-out infinite; }
.kk-cta.pressed { transform: translateY(4px); box-shadow: 0 1px 0 #08703a; animation: none; }
@keyframes ctaPulse { 50% { transform: scale(1.06); box-shadow: 0 5px 0 #08703a, 0 0 46px rgba(60,255,140,.8); } }
.kk-skip { position: absolute; right: 0; bottom: calc(max(14px, env(safe-area-inset-bottom)) + 18px); z-index: 4; padding: 10px 14px 10px 16px; background: rgba(0,0,0,.62); font-size: 13px; font-weight: 700; border-radius: 4px 0 0 4px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); white-space: nowrap; }
.kk-skip.ready { font-size: 16px; padding: 10px 18px; background: rgba(0,0,0,.8); }
.kk-skip.ready span { font-size: 12px; }
.kk-prog { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255,255,255,.25); z-index: 4; }
.kk-prog i { display: block; height: 100%; width: 0; background: #ffd23f; }
.kk-content.wob-s { animation: wobs .4s; }
.kk-trap { position: absolute; inset: 0; z-index: 8; background: #f2f2f7; color: #3c3c43; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 15px; animation: fadeIn .15s; }
.spin.dark { border-top-color: #3c3c43; }

/* store sheet */
.store-bg { position: absolute; inset: 0; z-index: 74; background: rgba(0,0,0,0); transition: background .25s; }
.store-bg.in { background: rgba(0,0,0,.4); }
.store { position: absolute; left: 0; right: 0; bottom: 0; padding: 8px 18px max(26px, env(safe-area-inset-bottom)); background: #fff; color: #000; border-radius: 16px 16px 0 0; transform: translateY(105%); transition: transform .35s cubic-bezier(.2,.9,.3,1);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", "Noto Sans CJK JP", sans-serif; }
.store-bg.in .store { transform: none; }
.store-grab { width: 38px; height: 5px; border-radius: 3px; background: #d1d1d6; margin: 0 auto 16px; }
.store-head { display: flex; gap: 14px; }
.store-ic { flex: none; width: 96px; height: 96px; }
.store-ic svg { width: 100%; height: 100%; border-radius: 22px; box-shadow: 0 0 0 .5px rgba(0,0,0,.15); }
.store-meta { display: flex; flex-direction: column; align-items: flex-start; }
.store-meta b { font-size: 21px; font-weight: 700; }
.store-meta small { font-size: 14px; color: #8e8e93; margin-top: 2px; }
.store-open { margin-top: auto; height: 30px; padding: 0 22px; border-radius: 15px; background: #007aff; color: #fff; font-size: 15px; font-weight: 700; }
.store-open.pressed { opacity: .7; }
.store-stats { display: flex; margin: 18px -4px 0; padding: 12px 0; border-top: .5px solid #d1d1d6; border-bottom: .5px solid #d1d1d6; }
.store-stats div { flex: 1; text-align: center; display: flex; flex-direction: column; }
.store-stats div + div { border-left: .5px solid #d1d1d6; }
.store-stats b { font-size: 17px; color: #6d6d72; }
.store-stats small { font-size: 10.5px; color: #8e8e93; margin-top: 2px; }
.store-note { margin: 14px 0 0; font-size: 13px; color: #248a3d; font-weight: 600; text-align: center; }

/* --- stage 5 flick guide ------------------------------------------------------------------- */
.flick { position: absolute; z-index: 40; width: 0; height: 0; pointer-events: none; }
.flick i { position: absolute; width: 46px; height: 46px; margin: -23px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  font-style: normal; font-size: 22px; font-weight: 800; color: #2a1b55; background: rgba(255,255,255,.92); box-shadow: 0 3px 10px rgba(30,0,80,.35); transition: background .1s, transform .1s; }
.flick i[data-d="0"] { left: 0; top: 0; background: rgba(230,226,255,.95); }
.flick i[data-d="1"] { left: -50px; top: 0; }
.flick i[data-d="2"] { left: 0; top: -50px; }
.flick i[data-d="3"] { left: 50px; top: 0; }
.flick i[data-d="4"] { left: 0; top: 50px; }
.flick[data-dir="0"] i[data-d="0"], .flick[data-dir="1"] i[data-d="1"], .flick[data-dir="2"] i[data-d="2"], .flick[data-dir="3"] i[data-d="3"], .flick[data-dir="4"] i[data-d="4"] { background: #ffd23f; transform: scale(1.12); }
.flick:not(.hidden) { animation: fadeIn .1s; }

/* --- ending ---------------------------------------------------------------------------------- */
.gs { position: absolute; inset: 0; z-index: 82; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle, #fff7b0, #ffb300 60%, #ff6a00); animation: fadeIn .15s; overflow: hidden; }
.gs-rays { position: absolute; left: 50%; top: 50%; width: 200cqh; height: 200cqh; margin: -100cqh; background: repeating-conic-gradient(rgba(255,255,255,.4) 0 10deg, transparent 10deg 20deg); animation: spin 8s linear infinite; }
.gs-text { position: relative; font-size: min(11cqw, 46px); font-weight: 900; color: #fff; letter-spacing: .04em; white-space: nowrap;
  -webkit-text-stroke: 3px #c43d00; paint-order: stroke fill; text-shadow: 0 5px 0 #c43d00, 0 10px 20px rgba(120,30,0,.5); animation: slam .5s cubic-bezier(.2,1.6,.4,1) both; }
@keyframes slam { 0% { transform: scale(3); opacity: 0; } 60% { transform: scale(.9); opacity: 1; } 100% { transform: scale(1) rotate(-4deg); } }
.mini { position: absolute; inset: 0; z-index: 83; background: linear-gradient(#5ec8ff, #b9ecff 65%); overflow: hidden; animation: fadeIn .2s; }
.mini-sun { position: absolute; right: 12cqw; top: 14cqh; width: 64px; height: 64px; border-radius: 50%; background: #fff27a; box-shadow: 0 0 40px #fff27a; }
.mini-cloud { position: absolute; width: 90px; height: 30px; border-radius: 20px; background: #fff; }
.mini-cloud::before { content: ""; position: absolute; left: 20px; top: -18px; width: 44px; height: 40px; border-radius: 50%; background: #fff; }
.mini-cloud.c1 { left: 8cqw; top: 22cqh; animation: drift 6s linear infinite; }
.mini-cloud.c2 { left: 50cqw; top: 32cqh; transform: scale(.7); animation: drift 9s linear infinite reverse; }
@keyframes drift { to { translate: 30px 0; } }
.mini-hill { position: absolute; border-radius: 50%; background: #52c45a; }
.mini-hill.h1 { left: -20cqw; bottom: 16cqh; width: 90cqw; height: 40cqh; background: #7bd66b; }
.mini-hill.h2 { right: -30cqw; bottom: 14cqh; width: 100cqw; height: 34cqh; }
.mini-ground { position: absolute; left: 0; right: 0; bottom: 0; height: 22cqh; background: repeating-linear-gradient(90deg, #c47a3a 0 40px, #b06a30 40px 80px); border-top: 10px solid #3ea845; }
.mini-hud { position: absolute; left: 12px; right: 12px; top: calc(max(8px, env(safe-area-inset-top)) + 8px); display: flex; justify-content: space-between; font-weight: 900; font-size: 14px; color: #fff; text-shadow: 0 2px 0 #2a4a80; font-family: ui-monospace, Menlo, monospace; }
.mini-hud .hearts { color: #ff4f6d; text-shadow: 0 2px 0 #fff; letter-spacing: 2px; }
.mini-hero { position: absolute; left: 50%; bottom: 21cqh; width: 120px; height: 140px; margin-left: -60px; }
.mini-egg, .mini-chick { position: absolute; inset: 0; }
.mini-egg svg, .mini-chick svg { width: 100%; height: 100%; display: block; overflow: visible; }
.mini-chick { opacity: 0; transform: scale(.3) translateY(30px); }
.mini.crack .mini-egg { animation: eggwob .35s infinite; }
.mini.hatch .mini-egg { animation: none; opacity: 0; transform: scale(1.4); transition: all .25s; }
.mini.hatch .mini-chick { opacity: 1; transform: none; transition: all .45s cubic-bezier(.34,1.8,.64,1); animation: hop .35s .5s infinite alternate; }
.mini-start { position: absolute; left: 0; right: 0; top: 34cqh; text-align: center; font-size: 40px; font-weight: 900; color: #fff; -webkit-text-stroke: 2px #2a4a80; paint-order: stroke fill; text-shadow: 0 4px 0 #2a4a80; font-family: ui-monospace, Menlo, monospace; animation: blink .5s steps(2) infinite; }
.the-end { position: absolute; inset: 0; z-index: 84; background: #000; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; animation: fadeIn .5s both; }
.the-end p { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: .1em; }
.the-end .e1 { animation: fadeIn .8s .2s both; }
.the-end .e2 { opacity: 0; font-size: 28px; }
.the-end.two .e2 { opacity: 1; animation: slam .45s cubic-bezier(.2,1.6,.4,1) both; }

/* --- result ------------------------------------------------------------------------------------ */
/* The shared block (site/common/after.js) runs past the screen, so the content scrolls over the fixed rays. */
.res-scroll { position: absolute; inset: 0; overflow-y: auto; touch-action: pan-y; overscroll-behavior: contain; display: flex; flex-direction: column; align-items: center; justify-content: safe center; gap: 14px; padding: 3cqh 0 4cqh; }
.res-scroll > * { flex: none; }
.res-ribbon { margin-bottom: 4px; font-size: 15px; padding: 6px 28px; }
.fresh .res-ribbon { animation: popIn .5s .2s both; }
.res-card { position: relative; width: min(88cqw, 350px); padding: 20px 18px 16px; border-radius: 24px; background: rgba(255,255,255,.95); text-align: center;
  box-shadow: 0 0 0 4px rgba(255,255,255,.4), 0 18px 40px rgba(20,5,60,.4); }
.fresh .res-card { animation: cardIn3 .5s cubic-bezier(.34,1.4,.64,1) both; }
@keyframes cardIn3 { from { opacity: 0; transform: translateY(30px) scale(.9); } }
.res-logo .logo { font-size: min(11cqw, 46px); }
.res-label { margin-top: 10px; font-size: 14px; font-weight: 800; color: #8a6fd6; letter-spacing: .2em; }
.res-time { font-size: min(16cqw, 64px); font-weight: 900; line-height: 1.05; color: #2a1b55; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.res-time small { font-size: .38em; margin: 0 .1em; }
.res-hint { display: inline-block; margin-top: 6px; padding: 4px 14px; border-radius: 14px; background: #efecf8; color: #6a6480; font-weight: 800; font-size: 14px; }
.res-hint.gold { background: linear-gradient(#fff3a6, #ffcc33); color: #7a4a00; box-shadow: 0 2px 0 #d99a00; }
.res-stages { display: flex; justify-content: space-between; gap: 4px; margin-top: 14px; padding-top: 12px; border-top: 1px dashed #dcd8ea; }
.res-stages div { flex: 1; display: flex; flex-direction: column; align-items: center; min-width: 0; }
.res-stages small { font-size: 10.5px; color: #8a84a0; font-weight: 700; white-space: nowrap; }
.res-stages b { font-size: 13.5px; color: #3d3754; font-variant-numeric: tabular-nums; }
.res-stages em { font-style: normal; font-size: 9.5px; color: #c08a00; white-space: nowrap; }
.res-seal { position: absolute; right: -6px; top: -14px; width: 84px; height: 84px; transform: rotate(14deg); }
.fresh .res-seal { animation: stampIn2 .32s .55s cubic-bezier(.2,1.5,.45,1) both; }
@keyframes stampIn2 { 0% { transform: scale(2.6) rotate(-10deg); opacity: 0; } 60% { opacity: 1; transform: scale(.92) rotate(16deg); } 100% { transform: rotate(14deg); } }
.res-seal .seal-svg { border-radius: 50%; }
.btn-start.share {
  width: min(76cqw, 300px); height: 60px; font-size: 24px; margin-top: 6px; letter-spacing: .06em; text-indent: .06em;
  background: linear-gradient(180deg, #3a3a3a 0%, #111 55%, #000 100%);
  box-shadow: 0 6px 0 #444, 0 12px 22px rgba(0,0,0,.35); text-shadow: none; animation: none;
}
.btn-start.share::before { background: linear-gradient(rgba(255,255,255,.28), rgba(255,255,255,0)); }
.btn-start.share.pressed { box-shadow: 0 1px 0 #444, 0 4px 10px rgba(0,0,0,.3); }
.btn-start.share span { display: inline-flex; align-items: center; gap: 10px; }
.btn-start.share .x-logo { width: 24px; height: 24px; fill: #fff; }
.res-row { display: flex; gap: 10px; }
.result .sn-after { width: min(88cqw, 350px); margin: 6px 0 0; padding: 14px 16px 10px; border-radius: 20px; background: rgba(255,255,255,.95); color: #2a1b55; box-shadow: 0 10px 30px rgba(20,5,60,.3); box-sizing: border-box; }
.title-foot { align-items: center; }
.title-foot .sn-guide-link { font-size: 10px; font-weight: 700; opacity: 1; }
.b-pill { height: 44px; padding: 0 20px; border-radius: 22px; background: rgba(255,255,255,.92); color: #4a3a8a; font-size: 15px; font-weight: 800; box-shadow: 0 4px 0 rgba(40,20,110,.45); }
.b-pill.pressed { transform: translateY(3px); box-shadow: 0 1px 0 rgba(40,20,110,.45); }

/* --- bottom sheets (hints, spoilers) ------------------------------------------------------------- */
.sheet-bg { position: absolute; inset: 0; z-index: 78; background: rgba(10,4,40,0); transition: background .25s; }
.sheet-bg.in { background: rgba(10,4,40,.5); }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; max-height: 86%; overflow-y: auto; touch-action: pan-y; padding: 8px 18px max(18px, env(safe-area-inset-bottom)); background: #fff; color: #2a1b55; border-radius: 22px 22px 0 0; transform: translateY(105%); transition: transform .34s cubic-bezier(.2,1.1,.3,1); }
.sheet-bg.in .sheet { transform: none; }
.sheet-grab { width: 40px; height: 5px; border-radius: 3px; background: #dcd8ea; margin: 0 auto 12px; }
.sheet-hd { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.sheet-hd b { font-size: 19px; font-weight: 900; }
.sheet-hd span { font-size: 13px; font-weight: 700; color: #8a84a0; }
.hint-list, .spoil-list { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.hint-list li, .spoil-list li { display: flex; gap: 10px; align-items: flex-start; padding: 11px 12px; border-radius: 12px; background: #f6f4fc; font-size: 15px; line-height: 1.55; font-weight: 600; }
.hint-list li.new { animation: popIn .4s; background: #fff7d6; }
.lv { flex: none; width: 24px; height: 24px; border-radius: 50%; background: #6b4cff; color: #fff; font-size: 13px; font-weight: 900; display: flex; align-items: center; justify-content: center; margin-top: 1px; }
.spoil-list small { display: block; font-size: 11.5px; color: #8a84a0; font-weight: 800; }
.spoil-list b { display: block; font-size: 15px; }
.spoil-list p { margin: 2px 0 0; font-size: 13px; font-weight: 500; color: #5d5775; line-height: 1.55; }

/* --- small screens --------------------------------------------------------------------------------- */
@container (max-height: 700px) {
  .title-top { margin-top: 12cqh; }
  .title-bottom { bottom: 8cqh; }
  .btn-start { height: 58px; font-size: 24px; }
  .ld-mid { top: 13cqh; }
  .ld-panel { bottom: 6cqh; }
  .tips { min-height: 70px; padding: 12px 12px 10px; }
  .tips-text { font-size: 14px; }
  .terms-box { font-size: 13px; line-height: 1.65; }
  .card-hd small { display: none; }
  .row { height: 52px; }
  .kk-content { top: 11cqh; bottom: 10cqh; gap: 1.2cqh; }
  .kk-cta { height: 52px; font-size: 20px; }
  .res-scroll { gap: 10px; }
  .res-card { padding: 16px 14px 12px; }
}
