:root {
  --ink: #0f172a;
  --muted: #596273;
  --line: #dde3ec;
  --blue: #0045de;
  --brand-gradient: linear-gradient(135deg, #0a5ae8, #0045de);
  --bg: #f1f4f9;
  --surface: #f9fbfd;
  --chip: #e6ebf2;
  font-family: Inter, 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; overflow-x: hidden; overflow-x: clip; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
a:focus-visible { outline: 3px solid var(--blue); outline-offset: 6px; }
img { max-width: 100%; display: block; }
h1, h2, h3, p { margin: 0; }
p { line-height: 1.85; }

.wrap { width: min(1224px, calc(100% - 80px)); margin-inline: auto; }
.skip { position: fixed; top: -100px; left: 10px; background: var(--surface); padding: 10px; z-index: 100; }
.skip:focus { top: 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; color: #5b6474; }

/* Header & footer */
.header { position: relative; z-index: 2; min-height: 96px; display: flex; justify-content: space-between; align-items: center; gap: 24px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; }
.brand img { height: 40px; width: auto; }
.header nav { display: flex; align-items: center; gap: 30px; font-size: 14px; font-weight: 600; }
.header nav a:not(.language):hover { color: var(--blue); }
.language { border: 1px solid #cdd5e1; border-radius: 6px; padding: 7px 12px; background: var(--surface); }
.footer { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 30px 0; border-top: 1px solid var(--line); font-size: 12px; color: #5b6474; }
.footer .brand img { height: 28px; }

/* Hero */
.hero { position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); align-items: center; gap: 24px; min-height: min(720px, calc(100svh - 96px)); padding: 40px 0 56px; }
.hero-copy { position: relative; z-index: 1; word-break: auto-phrase; }
.hero h1 { font-size: clamp(40px, 5.3vw, 68px); line-height: 1.4; letter-spacing: -0.045em; font-weight: 800; margin: 18px 0 22px; }
.hero h1 span { color: var(--blue); background: linear-gradient(120deg, #1476ff, #0045de 65%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero::before, .hero::after { content: ''; position: absolute; z-index: -1; border-radius: 50%; pointer-events: none; }
.hero::before { width: min(640px, 70%); aspect-ratio: 1; right: 0; top: 0; background: radial-gradient(circle, #cfe4ff 0%, #cfe4ff00 66%); animation: aurora 18s ease-in-out infinite alternate; }
.hero::after { width: min(500px, 55%); aspect-ratio: 1; right: 30%; bottom: 0; background: radial-gradient(circle, #e3eeff 0%, #e3eeff00 66%); animation: aurora 23s ease-in-out -7s infinite alternate-reverse; }
.hero-copy > * { animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.hero-copy > :nth-child(2) { animation-delay: 0.1s; }
.hero-copy > :nth-child(3) { animation-delay: 0.25s; }
.hero-copy > :nth-child(4) { animation-delay: 0.4s; }
@keyframes aurora { to { transform: translate(-6%, 5%) scale(1.08); } }
@keyframes rise { from { opacity: 0; transform: translateY(20px); } }
.hero-lead { color: var(--muted); font-size: 16px; max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.button { display: inline-flex; align-items: center; gap: 14px; border-radius: 999px; padding: 14px 22px; font-size: 15px; font-weight: 700; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.button-primary { position: relative; overflow: hidden; background: var(--brand-gradient); color: #fff; box-shadow: 0 10px 30px #1476ff33; }
.button-primary::after { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, #ffffff66 50%, transparent 70%); transform: translateX(-120%); transition: transform 0.8s ease; }
.button-primary:hover::after { transform: translateX(120%); }
.button-secondary { border: 1px solid #cdd5e1; background: var(--surface); }
.button:hover { transform: translateY(-2px); }

.hero-visual { width: 100%; max-width: 520px; justify-self: end; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.mascot { display: block; width: 100%; height: auto; overflow: visible; }
.mascot * { transform-box: fill-box; }
.mascot-ring { fill: none; stroke: #8cc4ff; stroke-width: 11; stroke-linecap: round; stroke-linejoin: round; }
.mascot-ring-back { stroke: #b7d9ff; }
.mascot-ball { fill: url(#mascot-ball); }
.mascot-body, .mascot-leg { fill: url(#mascot-fill); }
.mascot-eye { fill: var(--bg); transition: transform 0.15s ease-out; }
.mascot-enter { transform-origin: 50% 100%; animation: mascot-pop 0.7s cubic-bezier(0.3, 1.6, 0.5, 1) 0.6s both; }
.mascot-hop { transform-origin: 50% 100%; }
.mascot-walk { transform-origin: 50% 100%; animation: mascot-bob 0.9s ease-in-out 1.3s infinite; }
.mascot-leg { transform-origin: 50% 0; animation: mascot-step 0.9s ease-in-out 1.3s infinite; }
.mascot-leg:nth-child(2) { animation-delay: 1.75s; }
.mascot-blink { transform-origin: center; animation: mascot-blink 4.6s 2s infinite; }
.is-hopping .mascot-hop { animation: mascot-hop 0.7s cubic-bezier(0.3, 0.7, 0.4, 1); }
.mascot-shadow { fill: #0045de; opacity: 0.13; transform-origin: center; animation: mascot-fade 0.7s 0.6s both, mascot-shadow-bob 0.9s ease-in-out 1.3s infinite; }
.is-hopping .mascot-shadow { animation: mascot-shadow-hop 0.7s cubic-bezier(0.3, 0.7, 0.4, 1); }
.mascot-bubbles circle { fill: none; stroke: #8cc4ff; stroke-width: 2; opacity: 0; transform-origin: center; animation: mascot-bubble 4.2s ease-in 2s infinite; }
.mascot-bubbles circle:nth-child(2) { animation-delay: 2.9s; }
.mascot-bubbles circle:nth-child(3) { animation-delay: 3.8s; }
.mascot-bubbles circle:nth-child(4) { animation-delay: 4.6s; }
.mascot-bubbles circle:nth-child(5) { animation-delay: 5.4s; }
.mascot.is-paused * { animation-play-state: paused; }

@keyframes mascot-fade { from { opacity: 0; } }
@keyframes mascot-shadow-bob {
  0%, 50%, 100% { transform: scaleX(1); }
  25%, 75% { transform: scaleX(0.93); }
}
@keyframes mascot-shadow-hop {
  45% { transform: scale(0.6); opacity: 0.06; }
}
@keyframes mascot-bubble {
  0% { opacity: 0; transform: translateY(8px) scale(0.6); }
  20% { opacity: 0.9; }
  100% { opacity: 0; transform: translateY(-48px) scale(1.15); }
}

@keyframes mascot-pop { from { opacity: 0; transform: translateY(12px) scale(0.4); } }
@keyframes mascot-bob {
  0%, 50%, 100% { transform: translateY(0) scaleY(1); }
  25%, 75% { transform: translateY(-3px) scaleY(1.02); }
}
@keyframes mascot-step {
  0%, 100% { transform: rotate(9deg); }
  50% { transform: rotate(-9deg); }
}
@keyframes mascot-blink {
  0%, 94%, 100% { transform: scaleY(1); }
  97% { transform: scaleY(0.1); }
}
@keyframes mascot-hop {
  0% { transform: translateY(0) scale(1, 1); }
  15% { transform: translateY(0) scale(1.08, 0.88); }
  45% { transform: translateY(-34px) scale(0.95, 1.06); }
  80% { transform: translateY(0) scale(1.06, 0.92); }
  100% { transform: translateY(0) scale(1, 1); }
}

/* Apps */
.section-heading { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); padding: 25px 0; }
.section-heading h2 { font-size: 20px; font-weight: 700; }
.section-heading > span { font-size: 12px; color: #626c7e; letter-spacing: 0.12em; }
.app-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.app-card { position: relative; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); container-type: inline-size; transition: transform 0.25s ease, box-shadow 0.25s ease; }
.app-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px #19202c14; }
/* Artwork scales with the card width so the label never reaches the phone. */
.app-art { position: relative; height: clamp(220px, 76cqi, 300px); overflow: hidden; background: #dcefe9; }
.app-twitter-easy-search .app-art { background: #ddecff; }
.app-kaimono-hakase .app-art { background: #ffebbb; }
.app-number { position: absolute; top: 20px; left: 7cqi; font-size: 12px; font-weight: 600; color: #566773; letter-spacing: 0.1em; }
.icon-tile { position: absolute; left: 7cqi; top: 17cqi; background: #fff; border-radius: 22%; padding: 2.6cqi; box-shadow: 0 8px 24px #00000008; }
.icon-tile img { width: clamp(44px, 17cqi, 66px); height: clamp(44px, 17cqi, 66px); border-radius: 14px; object-fit: contain; }
.art-type { position: absolute; bottom: 10cqi; left: 7cqi; font-size: 12cqi; font-weight: 800; letter-spacing: -0.05em; color: #13392c; }
.app-twitter-easy-search .art-type { color: #143c66; }
.app-kaimono-hakase .art-type { color: #62450b; font-size: 8.5cqi; }
.phone-preview { position: absolute; right: 5cqi; top: 15cqi; width: 38cqi; height: auto; transform: rotate(9deg); border: 5px solid #20252d; border-radius: 22px; box-shadow: 0 14px 28px #17273625; transition: transform 0.4s ease; }
.app-card:hover .phone-preview { transform: rotate(5deg) translateY(-8px); }
.app-content { display: flex; flex-direction: column; flex: 1; padding: 25px 24px 22px; }
.app-content h3 { font-size: 23px; font-weight: 750; letter-spacing: -0.03em; margin: 7px 0 17px; }
.app-promise { font-size: 15px; font-weight: 700; line-height: 1.7; margin-bottom: 8px; }
.app-description { font-size: 14px; color: var(--muted); }
.tags { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 7px; margin: 20px 0 24px; }
.tags li { font-size: 12px; background: var(--chip); border-radius: 5px; padding: 4px 8px; color: #566071; }
.app-link { margin-top: auto; display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); padding-top: 18px; font-size: 14px; font-weight: 700; }
.app-link > span:last-child { color: var(--blue); font-size: 24px; }
.app-link:hover { color: var(--blue); }
.app-link::after { content: ''; position: absolute; inset: 0; }

.minigames { margin-top: 48px; }
.minigames .section-heading { padding-bottom: 12px; }
.minigames .section-heading h2 { font-size: 16px; }
.minigame { display: flex; align-items: center; gap: 16px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.minigame img { width: 40px; height: 40px; border-radius: 10px; flex: none; }
.minigame-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.minigame-copy strong { font-size: 15px; font-weight: 750; letter-spacing: -0.02em; }
.minigame-copy span { font-size: 13px; color: var(--muted); }
.minigame-play { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; white-space: nowrap; }
.minigame-play span { color: var(--blue); font-size: 20px; }
.minigame:hover { color: var(--blue); }

.about-strip { display: flex; justify-content: space-between; align-items: center; gap: 30px; margin-top: 70px; padding: 40px 0 50px; border-top: 1px solid var(--line); }
.about-strip h2 { font-size: 24px; font-weight: 700; margin: 9px 0; }
.about-strip p:not(.eyebrow) { font-size: 15px; color: var(--muted); }
.text-link { display: flex; align-items: center; gap: 28px; font-size: 15px; font-weight: 600; white-space: nowrap; }
.text-link span { font-size: 25px; color: var(--blue); }

/* About page */
.page-hero { position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 48px; padding: 72px 0 80px; word-break: auto-phrase; }
.page-hero::before { content: ''; position: absolute; z-index: -1; right: 0; top: 50%; width: min(460px, 60%); aspect-ratio: 1; translate: 0 -50%; border-radius: 50%; background: radial-gradient(circle, #cfe4ff 0%, #cfe4ff00 66%); pointer-events: none; }
.page-hero h1 { font-size: clamp(34px, 4.6vw, 56px); line-height: 1.35; letter-spacing: -0.04em; font-weight: 800; margin: 18px 0 22px; }
.page-hero h1 span { color: var(--blue); }
.page-lead { max-width: 36em; font-size: 16px; color: var(--muted); }
.page-hero-mark { display: grid; place-items: center; width: 240px; aspect-ratio: 1; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 24px 60px #1476ff1f; }
.page-hero-mark img { width: 62%; height: auto; }

.app-list { list-style: none; margin: 0 0 72px; padding: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.app-row { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; gap: 22px; padding: 22px 26px; }
.app-row + .app-row { border-top: 1px solid var(--line); }
.app-row > img { width: 56px; height: 56px; border-radius: 14px; object-fit: contain; background: #fff; box-shadow: 0 6px 18px #19202c10; }
.app-row h3 { font-size: 18px; font-weight: 750; letter-spacing: -0.02em; }
.app-row p { margin-top: 2px; font-size: 14px; color: var(--muted); line-height: 1.7; }
.app-row-links { display: flex; flex-wrap: wrap; gap: 8px; }
.app-row-links a { padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--bg); transition: border-color 0.2s ease, color 0.2s ease; }
.app-row-links a:first-child { color: var(--blue); }
.app-row-links a:hover { border-color: var(--blue); color: var(--blue); }

.contact-card { display: flex; flex-direction: column; align-items: flex-start; padding: 30px 30px 32px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.contact-kicker { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; color: var(--blue); }
.contact-card h3 { margin: 8px 0 10px; font-size: 22px; font-weight: 750; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.contact-card p:not(.contact-kicker) { font-size: 15px; color: var(--muted); }
.contact-primary { border-color: #b7d9ff; box-shadow: 0 18px 44px #1476ff14; }
.contact-mail { margin-top: 18px; font-size: 14px; color: var(--muted); }
.contact-mail a { color: var(--blue); text-decoration: underline; text-underline-offset: 4px; }
.contact-tips { margin: 24px 0 88px; padding: 22px 30px; border-radius: 14px; background: var(--chip); }
.contact-tips p { font-size: 14px; font-weight: 700; }
.contact-tips ul { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 8px 0 0; padding-left: 20px; font-size: 14px; color: #535e6f; line-height: 1.8; }

/* Text pages */
.prose { max-width: 800px; min-height: 65vh; padding: 65px 0 85px; }
.prose h1 { font-size: 38px; font-weight: 750; margin: 16px 0 24px; }
.prose h2 { font-size: 22px; font-weight: 700; margin: 35px 0 14px; }
.prose p { margin: 15px 0; color: #535e6f; }
.prose a { color: var(--blue); text-decoration: underline; text-underline-offset: 4px; }
.prose ul { padding-left: 22px; line-height: 2; }

@media (max-width: 1000px) {
  .wrap { width: calc(100% - 48px); }
  .app-grid { gap: 16px; }
  .app-content { padding: 22px 18px; }
  .app-content h3 { font-size: 20px; }
}

@media (max-width: 760px) {
  .wrap { width: calc(100% - 40px); }
  .header { min-height: 84px; flex-wrap: wrap; padding: 18px 0; gap: 16px; }
  .header nav { gap: 18px; flex-wrap: wrap; }
  .hero { display: flex; flex-direction: column-reverse; align-items: stretch; gap: 8px; min-height: 0; padding: 24px 0 48px; }
  .hero-visual { width: min(240px, 64%); align-self: center; }
  .hero h1 { font-size: clamp(32px, 9vw, 50px); }
  .app-grid { grid-template-columns: 1fr; gap: 25px; }
  .app-content { padding: 26px; }
  .app-content h3 { font-size: 25px; }
  .app-description { font-size: 16px; }
  .hero::before { width: 100%; top: 0; }
  .hero::after { width: 90%; right: auto; left: 0; bottom: 8%; }
  .minigames { margin-top: 36px; }
  .minigame { flex-wrap: wrap; }
  .minigame-play { margin-left: 56px; }
  .about-strip { display: block; margin-top: 45px; }
  .about-strip .text-link { margin-top: 24px; }
  .page-hero { display: flex; flex-direction: column-reverse; align-items: flex-start; gap: 28px; padding: 40px 0 56px; }
  .page-hero::before { right: 0; top: 0; width: 80%; translate: none; }
  .page-hero-mark { width: 140px; }
  .app-row { grid-template-columns: 48px minmax(0, 1fr); gap: 14px 16px; padding: 20px; }
  .app-row > img { width: 48px; height: 48px; }
  .app-row-links { grid-column: 1 / -1; }
  .contact-card { padding: 24px; }
  .contact-tips { padding: 20px 22px; margin-bottom: 56px; }
  .contact-tips ul { display: block; }
  .footer { flex-direction: column; align-items: flex-start; gap: 14px; }
  .prose { padding: 45px 0; }
  .prose h1 { font-size: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
  .mascot * { animation: none !important; }
  .hero::before, .hero::after, .hero-copy > * { animation: none !important; }
}
