@font-face {
  font-family: Fredoka;
  src: url("assets/fonts/Fredoka-Medium.ttf") format("truetype");
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
}
@font-face {
  font-family: Fredoka;
  src: url("assets/fonts/Fredoka-Bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700 900;
  font-display: swap;
}
:root {
  /* From GameMenu.uss and CareHud.uss. */
  --paper: #fff3d9;
  --ink: #4a3323;
  --muted: #795635;
  --line: #d7b884;
  --gold: #d29142;
  --sky: #dceff3;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 500 18px/1.6 Fredoka, sans-serif; }
a { color: inherit; text-underline-offset: 5px; }
a:hover { text-decoration-thickness: 2px; }
button { font: inherit; }
img { display: block; max-width: 100%; height: auto; }
figure, h1, h2, h3 { margin: 0; }
p { margin: 0 0 1rem; }
h1, h2, h3 { font-family: Fredoka, sans-serif; font-weight: 700; line-height: 1.08; }
h2 { font-size: clamp(2rem, 3.6vw, 3.5rem); letter-spacing: -.025em; }
h3 { font-size: 1.55rem; line-height: 1.2; }
.wrap { width: min(1220px, calc(100% - 80px)); margin-inline: auto; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #357c89; outline-offset: 5px; }
.skip-link { position: absolute; top: 0; left: 20px; transform: translateY(-150%); background: var(--paper); padding: 12px; z-index: 10; }
.skip-link:focus { transform: none; }
.site-header { position: relative; z-index: 2; min-height: 92px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.wordmark { font-size: 1.55rem; font-weight: 700; text-decoration: none; white-space: nowrap; letter-spacing: -.035em; }
.site-header nav { display: flex; align-items: center; gap: 30px; font-size: 1rem; }
.site-header nav a { padding-block: 12px; text-decoration: none; }
.site-header nav a:hover { text-decoration: underline; }
body:has(.hero) {
  background: radial-gradient(ellipse at 88% 5%, #f9dfec 0, transparent 26%), linear-gradient(#dceff3 0, #eaf3ec 580px, #fff3d9 990px);
}
.hero { display: grid; grid-template-columns: .95fr 1.05fr; align-items: center; gap: 36px; padding-block: 24px 76px; }
.hero-copy { position: relative; z-index: 1; }
.game-logo { width: min(360px, 85%); margin: 0 0 24px; }
.intro { font-size: 1.5rem; line-height: 1.35; margin: 0 0 18px; }
.hero-description { max-width: 425px; font-size: 1.08rem; color: var(--muted); }
.eyebrow { font-size: .83rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 22px; margin-top: 24px; }
/* Same nine-slice artwork as CareHud's wood buttons (top/right/bottom/left). */
.button, .play-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 20px;
  min-height: 60px; padding: 7px 20px; border: 12px solid transparent;
  border-image: url("assets/ui/button.png") 160 100 160 100 fill / 12px 10px stretch;
  background: transparent; color: var(--ink); font-weight: 700; font-size: 1rem;
  text-decoration: none; cursor: pointer; filter: drop-shadow(0 3px 0 #70472230);
}
.button:hover, .play-button:hover { border-image-source: url("assets/ui/button-hover.png"); }
.button:active, .play-button:active { transform: translateY(2px); }
.text-link { font-size: 1rem; }
.development { font-size: .83rem; color: var(--muted); margin-top: 18px; }
.bird-portrait { align-self: stretch; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.portrait-field { position: relative; display: grid; align-items: center; min-height: 470px; padding-block: 24px; }
.portrait-field::after { content: ""; position: absolute; z-index: 0; width: 82%; height: 20px; bottom: 24px; left: 9%; border-radius: 50%; background: #708e7b22; filter: blur(9px); }
.portrait-field .hero-flock { position: relative; z-index: 1; width: 100%; height: auto; }
.bird-portrait figcaption { text-align: center; color: var(--muted); font-size: .9rem; transform: rotate(-3deg); }
/* Use the game's cream panel with its original slice proportions. */
.game-section {
  display: grid; grid-template-columns: 1fr 1fr; gap: 32px 48px; margin-bottom: 64px;
  padding: 26px; border: 20px solid transparent;
  border-image: url("assets/ui/panel.png") 60 60 75 60 fill / 20px stretch;
}
.section-intro { align-self: end; max-width: 480px; color: var(--muted); }
.section-intro p:first-child { color: var(--ink); font-size: 1.2rem; }
.landscape { grid-column: 1 / -1; min-width: 0; }
.landscape a { display: block; }
.landscape img { width: 100%; border-radius: 12px; border: 3px solid #b78b53; }
.landscape figcaption { display: flex; justify-content: space-between; gap: 16px; font-size: .8rem; color: var(--muted); margin-top: 12px; }
.details-row { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; }
.number { display: block; color: var(--muted); font-size: .75rem; font-weight: 700; letter-spacing: .06em; margin-bottom: 14px; }
.details-row p { margin-top: 14px; font-size: 1rem; color: var(--muted); }
.gameplay-section { padding-block: 30px 60px; }
.inline-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.video-frame {
  position: relative; aspect-ratio: 16 / 9; background: #302519;
  border: 18px solid transparent;
  border-image: url("assets/ui/frame.png") 105 105 115 105 / 18px stretch;
}
.video-frame > img { width: 100%; height: 100%; object-fit: cover; }
.video-frame iframe { display: block; width: 100%; height: 100%; border: 0; }
.play-button { position: absolute; left: 20px; bottom: 20px; }
.video-note { font-size: .83rem; color: var(--muted); margin-top: 16px; }
.preview-notice { font-size: .95rem; padding: 18px; margin-top: 16px; border: 2px solid var(--line); border-radius: 12px; background: #fffaf0; }
.studio-section { padding-block: 56px 72px; display: grid; grid-template-columns: 1fr 2fr; gap: 48px; border-top: 2px solid var(--line); }
.studio-section p:not(.eyebrow) { max-width: 590px; color: var(--muted); }
.studio-section h2 { margin-bottom: 24px; }
.studio-aside { min-width: 0; }
.studio-mascot { width: min(270px, 100%); margin: 18px auto 0; }
.studio-mascot img { width: 100%; transform-origin: 50% 85%; }
.studio-mascot.is-in-view img { animation: pigeon-me 3.8s ease-in-out 1; }
@keyframes pigeon-me {
  0%, 100% { transform: rotate(0deg) translateY(0); }
  18% { transform: rotate(-5deg) translateY(-5px); }
  36% { transform: rotate(4deg) translateY(0); }
  52%, 68% { transform: rotate(-2deg) translateY(-3px); }
  60% { transform: rotate(2deg) translateY(0); }
  82% { transform: rotate(0deg) translateY(-2px); }
}
@media (max-width: 600px) {
  .studio-aside { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
  .studio-aside .eyebrow { margin: 0; }
  .studio-mascot { flex: 0 0 120px; margin: 0; }
}
@media (prefers-reduced-motion: reduce) { .studio-mascot.is-in-view img { animation: none; } }
.site-footer { border-top: 2px solid var(--line); display: flex; justify-content: space-between; gap: 20px; padding-block: 26px; font-size: .85rem; color: var(--muted); }
.press-title { padding-block: 42px; }
.press-title h1 { font-size: clamp(2.8rem, 6vw, 4.6rem); }
.press-title > p:last-child { margin-top: 20px; color: var(--muted); }
.press-grid { display: grid; grid-template-columns: 260px 1fr; gap: 60px; padding-bottom: 60px; }
.facts { align-self: start; border: 16px solid transparent; border-image: url("assets/ui/panel.png") 60 60 75 60 fill / 16px stretch; padding: 10px; }
.facts dt { font-size: .8rem; color: var(--muted); }
.facts dd { margin: 4px 0 24px; }
.press-content h2 { font-size: 2rem; margin-bottom: 20px; }
.press-content section { margin-bottom: 42px; }
.press-content p, .press-content li { color: var(--muted); }
.press-content ul { padding-left: 22px; }
.download-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.download-grid a { font-size: .9rem; }
.download-grid img { aspect-ratio: 16 / 9; object-fit: cover; margin-bottom: 12px; border-radius: 10px; }
.permission-note { border-left: 2px solid var(--line); padding-left: 20px; }
.permission-note p { font-size: 1rem; }
@media (max-width: 900px) {
  .wrap { width: calc(100% - 48px); }
  .hero { gap: 16px; grid-template-columns: 1fr 1fr; }
  .portrait-field { min-height: 320px; }
  .game-section { padding: 14px; gap: 24px; }
  .details-row { gap: 24px; }
  .press-grid { grid-template-columns: 220px 1fr; gap: 30px; }
}
@media (max-width: 600px) {
  body { font-size: 17px; }
  .wrap { width: calc(100% - 32px); }
  .site-header { min-height: 76px; gap: 12px; }
  .wordmark { font-size: 1.2rem; }
  .site-header nav { gap: 14px; font-size: .85rem; }
  .site-header nav a:first-child { display: inline; }
  .hero { grid-template-columns: 1fr; padding-block: 20px 36px; gap: 0; text-align: center; }
  .game-logo { width: min(275px, 80%); margin: 0 auto 22px; }
  .intro { font-size: 1.35rem; }
  .hero-description { max-width: 390px; margin-inline: auto; font-size: 1rem; }
  .hero .actions { justify-content: center; gap: 18px; }
  .button, .play-button { font-size: .95rem; padding-inline: 12px; }
  .portrait-field { min-height: 0; max-width: 440px; margin: 8px auto 0; padding-block: 12px; }
  .portrait-field::after { bottom: 12px; }
  .bird-portrait figcaption { margin-top: 8px; }
  .game-section { grid-template-columns: 1fr; border-width: 12px; border-image-width: 12px; padding: 12px; gap: 20px; margin-bottom: 28px; }
  .section-intro { max-width: 100%; }
  .details-row { grid-template-columns: 1fr; gap: 20px; }
  .details-row article { border-top: 1px solid var(--line); padding-top: 20px; }
  .number { margin-bottom: 8px; }
  .landscape figcaption { display: block; }
  .landscape figcaption span { display: block; }
  .gameplay-section { padding-block: 25px 40px; }
  .inline-heading { display: block; }
  .inline-heading > a { display: inline-block; margin-top: 18px; }
  .video-frame { border-width: 10px; border-image-width: 10px; }
  .play-button { left: 5px; bottom: 5px; min-height: 46px; font-size: .8rem; gap: 10px; padding: 2px 8px; }
  .studio-section { grid-template-columns: 1fr; gap: 0; padding-block: 40px; }
  .site-footer { flex-wrap: wrap; gap: 12px; }
  .site-footer > span:nth-child(2) { display: none; }
  .press-title { padding-block: 30px; }
  .press-grid, .download-grid { grid-template-columns: 1fr; gap: 24px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Native-script fallbacks where the game's Fredoka font has no glyphs. */
html:lang(ru) { --script-font: "Segoe UI", sans-serif; }
html:lang(ja) { --script-font: "Yu Gothic", "Hiragino Kaku Gothic ProN", sans-serif; }
html:lang(ko) { --script-font: "Malgun Gothic", "Apple SD Gothic Neo", sans-serif; }
html:lang(zh-Hans) { --script-font: "Microsoft YaHei", "PingFang SC", sans-serif; }
html:lang(zh-Hant) { --script-font: "Microsoft JhengHei", "PingFang TC", sans-serif; }
body, h1, h2, h3 { font-family: Fredoka, var(--script-font, sans-serif); }
.site-header { flex-wrap: wrap; gap: 8px 24px; padding-block: 20px; }
.site-header .main-nav { flex-wrap: wrap; gap: 8px 20px; margin-left: auto; }
.main-nav [aria-current] { text-decoration: underline; }
.language-menu { position: relative; font-size: .9rem; }
.language-menu summary { cursor: pointer; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff6e6; }
.language-menu summary::marker { color: var(--muted); }
.site-header .language-menu nav { position: absolute; right: 0; top: calc(100% + 8px); width: 340px; max-width: calc(100vw - 32px); display: grid; grid-template-columns: 1fr 1fr; gap: 0; padding: 12px; background: #fff6e6; border: 2px solid var(--line); border-radius: 16px; box-shadow: 0 8px 22px #4a332326; }
.site-header .language-menu a { padding: 10px; font-family: "Segoe UI", "Microsoft YaHei", "Yu Gothic", "Malgun Gothic", sans-serif; font-size: .9rem; border-radius: 8px; }
.language-menu a[aria-current] { background: #ead3ac; font-weight: 700; }
.language-menu a:hover { background: #f3e4c9; }
.contact-section { display: grid; grid-template-columns: 1fr 2fr; gap: 48px; padding-block: 46px 64px; border-top: 2px solid var(--line); }
.contact-section p { max-width: 640px; color: var(--muted); }
.contact-email { font-size: clamp(1rem, 2vw, 1.3rem); overflow-wrap: anywhere; }
.social-intro { margin-top: 24px; }
.social-links { display: flex; flex-wrap: wrap; gap: 12px 24px; font-size: 1rem; }
.site-footer { flex-wrap: wrap; }
.site-footer small { flex-basis: 100%; font: inherit; font-size: .8rem; }
.facts h2 { font-size: 1.5rem; }
.facts { overflow-wrap: anywhere; }
.facts .social-links { gap: 8px 16px; }
.press-title .eyebrow { margin-top: 28px; text-transform: none; }
.logo-download { display: inline-block; max-width: 360px; }
.logo-download img { padding: 20px; margin-bottom: 12px; background: #deeee6; border-radius: 16px; }
.hero-copy, .contact-section > *, .press-content, .details-row article { min-width: 0; }
h2, h3 { overflow-wrap: anywhere; }
@media (max-width: 1100px) {
  .site-header .main-nav { order: 3; flex-basis: 100%; margin: 0; justify-content: center; }
  .language-menu { margin-left: auto; }
}
@media (max-width: 600px) {
  .site-header { padding-block: 14px; }
  .site-header .main-nav { gap: 2px 16px; font-size: .85rem; }
  .site-header .main-nav a { padding-block: 6px; }
  .contact-section { grid-template-columns: 1fr; gap: 22px; padding-block: 36px; }
  .language-menu { font-size: .8rem; }
  .language-menu summary { padding: 8px 10px; }
  .language-menu nav { z-index: 5; }
  .button, .play-button { max-width: 100%; text-align: center; }
  .video-frame .play-button { max-width: calc(100% - 10px); }
}
