:root {
  font-family: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #354333;
  background: #f7f5ec;
  color-scheme: light dark;
  font-synthesis: none;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  min-height: 100svh;
  background: radial-gradient(ellipse at 15% 8%, #f6e8bb80, transparent 42%), radial-gradient(ellipse at 90% 50%, #dfedcf90, transparent 45%);
}
main { width: 100%; max-width: 460px; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; margin: auto; padding: max(16px, env(safe-area-inset-top)) 22px max(16px, env(safe-area-inset-bottom)); text-align: center; }
.brand { display: inline-flex; align-self: center; align-items: center; gap: 10px; text-decoration: none; color: inherit; font-size: 17px; font-weight: 650; margin-bottom: 18px; }
.brand img { border-radius: 11px; }
.brand-en { margin-left: 5px; font-size: 12px; font-weight: 750; letter-spacing: 1.7px; color: #6d7d5c; }
.invitation-card { position: relative; padding: 22px 28px 12px; border: 1px solid #fffdf7; border-radius: 32px; background: radial-gradient(ellipse 160px 145px at 34% 125px, #e2edccbd, transparent 100%), radial-gradient(ellipse 150px 135px at 72% 78px, #f6e7bfaa, transparent 100%), #fffdf7; box-shadow: 0 12px 45px #67583709, 0 2px 5px #67583704; }
.illustration { position: relative; height: clamp(180px, 29svh, 240px); max-width: 320px; margin: 4px auto 8px; isolation: isolate; }
.mascot-button { position: absolute; height: 100%; aspect-ratio: 230 / 202; left: 50%; top: 0; transform: translateX(-50%); padding: 0; border: 0; background: transparent; cursor: grab; border-radius: 40%; -webkit-tap-highlight-color: transparent; touch-action: none; user-select: none; -webkit-user-select: none; }
.mascot-button.dragging { cursor: grabbing; }
.play-hint { margin: -4px 0 20px; color: #7b846a; font-size: 12px; line-height: 1.5; }
.mascot-button:focus-visible { outline: 2px dashed #86a473; outline-offset: 3px; }
.hero-logo { display: block; width: 100%; height: 100%; overflow: visible; }
.buddy-skin path { stroke: #e8ecd980; stroke-width: .5; }
.emotion-eyes, .emotion-mouth, .emotion-brows { fill: none; stroke: #354333; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.emotion-tear { fill: #9dcbd1; }
.mumble { fill: #ad775c; font: 600 10px system-ui; letter-spacing: 1px; }
.chat-bubble { position: absolute; z-index: 2; top: 4%; max-width: 72%; padding: 7px 10px; border: 1px solid #ede8d5; border-radius: 15px 15px 15px 4px; background: #fffdf7; color: #536442; font-size: 14px; line-height: 1.5; box-shadow: 0 5px 15px #67753f0b; opacity: 0; transform: none; transition: opacity .2s; pointer-events: none; }
.chat-bubble { right: auto; width: max-content; max-width: 100%; }
.chat-bubble.from-right { border-radius: 15px 15px 4px 15px; }
.chat-bubble.speaking { opacity: 1; transform: none; transition: none; }
.hello-mark { position: absolute; top: 12%; left: 40%; color: #ac6a58; font: 600 24px/1 system-ui; opacity: 0; pointer-events: none; }
.greeting .hello-mark { animation: hello-heart 1.15s ease-out; }
.hello-star { left: 65%; top: 22%; color: #ccaa65; font-size: 19px; }
.hello-dot { left: 22%; top: 31%; color: #91b36e; font-size: 13px; }
.greeting .hello-star { animation-delay: .12s; }
.greeting .hello-dot { animation-delay: .24s; }
.spark { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: #d8ad66; }
.spark-one { right: 28px; top: 25px; }
.spark-two { left: 22px; bottom: 33px; width: 5px; height: 5px; background: #a9c58b; }
.eyebrow { font-size: 11px; color: #9b8356; letter-spacing: 3px; margin: 0 0 10px; }
.invitation-sender { min-height: 48px; display: flex; align-items: center; margin-bottom: 8px; text-align: left; }
.inviter { display: flex; width: 100%; align-items: center; gap: 12px; }
.inviter-avatar { position: relative; flex: 0 0 48px; width: 48px; height: 48px; border-radius: 50%; background: linear-gradient(to bottom left, #c6fd82, white); display: grid; place-items: center; }
.inviter-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.inviter-avatar .default-avatar { inset: 50% auto auto 50%; width: 37.746%; height: 35.745%; transform: translate(-50%, -50%); object-fit: contain; border-radius: 0; }
.inviter p { margin: 0; min-width: 0; text-align: left; }
.inviter strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 18px; font-weight: 650; }
.inviter p > span { display: block; margin-top: 3px; font-size: 14px; color: #68765b; }
h1 { font-size: 29px; line-height: 1.35; font-weight: 650; letter-spacing: .2px; margin: 0 0 12px; }
.description { font-size: 15px; line-height: 1.6; color: #657255; margin: 0 auto 14px; }
.button { display: block; width: 100%; border-radius: 18px; padding: 14px 12px; text-decoration: none; font-weight: 600; font-size: 17px; line-height: 1.4; }
.primary { background: #bce99a; color: #354b28; box-shadow: 0 5px 0 #9bbd7220; }
.primary:hover { background: #b0e388; }
.button:focus-visible, .text-button:focus-visible, .brand:focus-visible { outline: 3px solid #86a473; outline-offset: 4px; }
section { margin-top: 24px; }
h2 { font-size: 13px; color: #717d63; font-weight: 500; margin: 0 0 16px; }
.downloads { display: flex; flex-direction: column; gap: 8px; }
.downloads .button { min-height: 56px; padding: 16px 12px; font-size: 18px; font-weight: 700; }
.secondary-actions { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 12px; }
.secondary-actions:not(:has(> :not([hidden]))) { display: none; }
.secondary-actions .text-button { text-decoration: none; padding: 10px 4px; margin: 0; }
.install-help { margin-top: 12px; color: #69755e; font-size: 13px; }
.install-help summary { cursor: pointer; width: fit-content; margin: auto; }
.install-help .hint { margin-bottom: 4px; }
section .hint { margin-top: 6px; font-size: 14px; }
.hint { color: #69755e; font-size: 14px; line-height: 1.6; margin: 12px 0 0; }
#download-status:empty, #feedback:empty { display: none; }
.text-button { background: none; border: 0; color: #61734f; text-decoration: underline; text-underline-offset: 4px; font: inherit; font-size: 14px; padding: 12px; cursor: pointer; margin-top: 2px; }
.brand, .invitation-card { animation: arrive .7s both; }
.invitation-card { animation-delay: .08s; }
.spark { animation: sparkle 4s ease-in-out infinite; }
.spark-two { animation-delay: -2s; }
.button { font-family: inherit; cursor: pointer; border: 0; transition: transform .2s, background .2s; }
.button:active { transform: scale(.98); }
.guide-open { overflow: hidden; }
.guide-open .illustration * { animation-play-state: paused; }
.browser-guide {
  position: fixed; inset: 0; width: 100%; height: 100%; height: 100dvh;
  max-width: none; max-height: none; margin: 0; border: 0;
  padding: max(22px, env(safe-area-inset-top)) max(22px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(22px, env(safe-area-inset-left));
  background: transparent; color: inherit; overflow-y: auto; overscroll-behavior: contain;
}
.browser-guide[open] { display: flex; flex-direction: column; align-items: center; animation: guide-in .3s both; }
.browser-guide::backdrop { background: #263423b8; backdrop-filter: blur(7px); animation: guide-in .3s both; }
.browser-guide.closing, .browser-guide.closing::backdrop { animation: guide-out .18s both; }
.guide-direction { flex: 0 0 116px; width: min(100%, 380px); position: relative; color: #fcf6de; pointer-events: none; }
.guide-direction span { position: absolute; right: 36px; top: 0; font-size: 12px; letter-spacing: 1px; }
.guide-direction b { font-size: 23px; margin-left: 6px; }
.guide-direction svg { position: absolute; right: -2px; top: 0; width: 180px; height: 110px; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; animation: arrow-point 2.6s ease-in-out infinite; }
.arrow-trail { stroke-dasharray: 5 7; }
.guide-card { flex: 0 0 auto; width: min(100%, 380px); background: #fffdf7; border: 1px solid #f4edda; border-radius: 30px; padding: 28px 26px 18px; text-align: center; box-shadow: 0 20px 70px #16281030; animation: arrive .42s cubic-bezier(.2,.7,.2,1) both; }
.guide-logo { border-radius: 19px; box-shadow: 0 6px 18px #8598551a; margin-bottom: 17px; }
.guide-card h2 { color: inherit; font-size: 27px; font-weight: 650; line-height: 1.5; margin: 0 0 12px; }
.guide-card .eyebrow { font-size: 14px; margin-bottom: 10px; }
.guide-card .description { font-size: 14px; margin-bottom: 20px; }
.guide-steps { list-style: none; margin: 0; padding: 16px; border-radius: 18px; background: #f3f5e9; text-align: left; }
.guide-steps li { display: flex; align-items: flex-start; gap: 10px; }
.guide-steps li + li { margin-top: 17px; }
.guide-steps li > span { display: grid; place-items: center; flex: 0 0 23px; height: 23px; border-radius: 50%; background: #dcebc9; color: #547239; font-size: 12px; }
.guide-steps p { margin: 0; font-size: 15px; line-height: 23px; }
.guide-steps strong { font-weight: 600; }
.guide-steps small { display: block; font-size: 13px; color: #69755e; line-height: 1.7; margin-top: 3px; }
.guide-tip { margin: 17px 0 20px; }
.guide-card .text-button { font-size: 14px; padding: 14px 0 6px; }
#guide-feedback:empty { display: none; }
.guide-link { width: 100%; margin-top: 10px; padding: 10px; font: inherit; font-size: 12px; border: 1px solid #acbb98; border-radius: 10px; background: #f3f5e9; color: #354333; }
@keyframes arrive { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes hello-heart { 0% { opacity: 0; transform: translateY(6px) scale(.6); } 35%, 65% { opacity: 1; } 100% { opacity: 0; transform: translateY(-20px) scale(1.1); } }
@keyframes sparkle { 0%, 100% { opacity: .55; transform: scale(.85); } 50% { opacity: 1; transform: scale(1.15); } }
@keyframes arrow-point { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes guide-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes guide-out { from { opacity: 1; } to { opacity: 0; } }
@media (max-height: 700px) {
  .guide-direction { flex-basis: 84px; }
  .guide-direction svg { height: 78px; width: 128px; }
  .guide-card { padding: 16px 22px 12px; }
  .guide-logo { width: 36px; height: 36px; border-radius: 12px; margin-bottom: 8px; }
  .guide-card h2 { font-size: 22px; line-height: 1.35; }
  .guide-card .eyebrow { margin-bottom: 6px; }
  .guide-card .description { margin-bottom: 12px; }
  .guide-steps { padding: 12px; }
  .guide-steps li + li { margin-top: 10px; }
  .guide-tip { margin: 12px 0; font-size: 14px; line-height: 1.65; }
  .guide-card .button { padding: 12px; }
  .guide-card .text-button { padding-top: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after, .browser-guide::backdrop { animation: none !important; transition: none !important; }
}
@media (max-width: 380px) {
  main { padding-left: 16px; padding-right: 16px; }
  .invitation-card { padding-left: 22px; padding-right: 22px; border-radius: 28px; }
  h1 { font-size: 28px; }
}
@media (max-height: 760px) {
  main { padding-top: max(10px, env(safe-area-inset-top)); padding-bottom: max(10px, env(safe-area-inset-bottom)); }
  .brand { margin-bottom: 10px; font-size: 15px; }
  .brand img { width: 28px; height: 28px; border-radius: 9px; }
  .invitation-card { padding-top: 14px; padding-bottom: 6px; }
  .illustration { height: clamp(154px, 27svh, 208px); margin-bottom: 4px; }
  h1 { font-size: 27px; line-height: 1.25; margin-bottom: 9px; }
  .invitation-card .description { margin-bottom: 13px; }
  .invitation-card section { margin-top: 18px; }
  .invitation-card .text-button { padding: 10px; margin-top: 0; }
}
@media (max-height: 600px) {
  .brand, .play-hint { display: none; }
  .illustration { height: 112px; }
  .chat-bubble { max-width: 38%; padding: 5px 6px; }
}
@media (max-height: 540px) {
  .illustration { height: 100px; }
  .invitation-sender { margin-bottom: 2px; min-height: 42px; }
  .inviter-avatar { width: 42px; height: 42px; flex-basis: 42px; }
  .brand { margin-bottom: 8px; }
  h1 { font-size: 20px; }
  h1 br { display: none; }
}
@media (prefers-color-scheme: dark) {
  :root { color: #e4e7d9; background: #23281f; }
  body { background: radial-gradient(ellipse at 15% 8%, #63593730, transparent 42%), radial-gradient(ellipse at 90% 50%, #39482e50, transparent 45%); }
  .invitation-card { background: radial-gradient(ellipse 160px 145px at 34% 125px, #74975050, transparent 100%), radial-gradient(ellipse 150px 135px at 72% 78px, #c5ad6330, transparent 100%), #2d3428; border-color: #3c4432; box-shadow: 0 12px 45px #10160e20; }
  h2, .brand-en, .play-hint { color: #b2bda3; }
  .eyebrow { color: #d4bd85; }
  .description, .hint { color: #b1bba4; }
  .text-button, .install-help { color: #b2bda3; }
  .guide-card { background: #2d3428; border-color: #4c563f; }
  .guide-steps, .guide-link { background: #38422e; color: #e4e7d9; }
  .guide-steps small { color: #b1bba4; }
  .chat-bubble { background: #3c4732; color: #e1e9d4; border-color: #586349; }
  .inviter p > span { color: #b1bba4; }
}
