:root {
  color-scheme: dark;
  --page: #071b31;
  --navy: #0f2747;
  --navy-deep: #06182c;
  --navy-mid: #143657;
  --accent: #00c2c7;
  --accent-bright: #58e3e4;
  --silver: #e8edf2;
  --cool-gray: #9aa4b2;
  --dark-gray: #4b5563;
  --panel: #102b49;
  --text: #f4f8fb;
  --muted: #b8cad8;
  --line: rgba(184, 211, 230, .24);
  --card-ratio: 1 / 1;
  font-family: Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  scroll-behavior: smooth;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--page); color: var(--text); }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
button { font: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--accent-bright); outline-offset: 4px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 10; padding: 12px 16px; background: var(--silver); color: var(--navy); transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }

.site-header { position: fixed; z-index: 5; top: 0; right: 0; left: 0; height: 62px; padding: 0 clamp(20px, 4vw, 72px); display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid rgba(232,237,242,.16); background: var(--navy-deep); box-shadow: 0 5px 20px rgba(4, 22, 43, .18); transition: background .25s ease, border-color .25s ease, box-shadow .25s ease; }
.site-header.is-scrolled { border-bottom-color: transparent; background: transparent; box-shadow: none; }
.site-header.is-scrolled .brand img { filter: invert(1); }
.site-header.is-scrolled .contact-link { color: #fff; }
.link-icon { display: inline-block; flex: 0 0 17px; width: 17px; height: 17px; background: currentColor; -webkit-mask: url("./icon-angle-right.svg") center / contain no-repeat; mask: url("./icon-angle-right.svg") center / contain no-repeat; }
.brand { display: inline-flex; align-items: center; text-decoration: none; min-width: 0; }
.brand img { width: clamp(170px, 18vw, 220px); height: auto; }
.site-header .brand img { filter: invert(1); }
.contact-link { color: #fff; padding: 7px 0 5px; border-bottom: 2px solid var(--accent); text-decoration: none; font-size: 13px; font-weight: 800; letter-spacing: .14em; white-space: nowrap; transition: color .18s ease; }
.contact-link:hover { color: var(--accent-bright); }
.site-footer a:hover { color: var(--accent-bright); text-decoration: underline; text-underline-offset: 4px; }

.featured { position: relative; height: 100vh; overflow: hidden; border-bottom: 1px solid var(--line); background: var(--navy-deep); }
.featured::before { content: ""; position: absolute; z-index: 2; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--accent), transparent 62%); pointer-events: none; }
.featured-stage { position: relative; height: 100%; }
.featured-game { position: relative; height: 100%; isolation: isolate; }
.featured-game.is-active { animation: featured-enter .55s ease-out both; }
@keyframes featured-enter { from { opacity: .16; } to { opacity: 1; } }
.featured-art, .featured-shade { position: absolute; inset: 0; }
.featured-art { overflow: hidden; }
.featured-art picture, .featured-art img, .thumb-art img, .card-art img { display: block; width: 100%; height: 100%; }
.featured-art img, .thumb-art img, .card-art img { object-fit: cover; object-position: var(--art-position, center); }
.featured-art--skyduel { background: #09245a url("./art/skyduel/menu_back.webp") center / cover no-repeat; }
.featured-art--goma { background: #5ba9e9; }
.goma-hero-image { object-position: center 42%; }
.sky-hero-plane, .featured-art .sky-hero-pilots { position: absolute; max-width: none; height: auto; object-fit: contain; pointer-events: none; }
.featured-art .sky-hero-plane { width: min(30vw, 420px); height: auto; }
.sky-hero-plane--a { top: 0; left: -2%; transform: rotate(-8deg); }
.sky-hero-plane--b { top: 0; right: -2%; transform: rotate(8deg); }
.sky-hero-plane--c { bottom: -22%; left: -10%; transform: rotate(12deg); }
.sky-hero-plane--d { bottom: -25%; right: -10%; transform: rotate(-14deg); }
.featured-art .sky-hero-pilots { width: min(60vw, 780px); left: 56%; bottom: -14%; transform: translateX(-50%); }
.featured-shade { z-index: 1; background: linear-gradient(90deg, rgba(4,19,38,.84) 0%, rgba(5,24,48,.4) 44%, rgba(5,24,48,.08) 80%), linear-gradient(0deg, rgba(4,19,38,.58), transparent 46%); pointer-events: none; }
.featured-copy { position: relative; z-index: 2; width: min(700px, 55%); padding: clamp(112px, 19vh, 215px) 0 210px clamp(24px, 5vw, 88px); }
.featured-copy h2 { display: flex; align-items: center; height: min(220px, 30vh); margin: 0 0 16px; line-height: 1; }
.featured-copy .skyduel-title { width: min(100%, 470px); line-height: 0; }
.skyduel-title img { width: 100%; height: auto; filter: drop-shadow(0 3px 9px rgba(0,0,0,.46)); }
.goma-dash-title img { width: auto; max-width: 100%; height: min(210px, 29vh); object-fit: contain; filter: drop-shadow(0 5px 15px rgba(0,24,58,.4)); }
.featured-description { margin: 0; font-size: clamp(16px, 1.7vw, 23px); font-weight: 700; line-height: 1.6; text-wrap: balance; }
.description-phrase { display: inline-block; }
.play-link { display: inline-flex; align-items: center; justify-content: space-between; gap: 32px; min-width: 205px; min-height: 57px; margin-top: 32px; padding: 0 18px 0 21px; border: 1px solid var(--accent); border-radius: 3px; background: rgba(7, 32, 61, .92); box-shadow: inset 0 0 0 1px rgba(0,194,199,.15), 0 0 24px rgba(0,194,199,.2); color: #fff; text-decoration: none; font-weight: 800; transition: transform .18s ease, background-color .18s ease, box-shadow .18s ease; }
.play-link .link-icon { width: 19px; height: 19px; flex-basis: 19px; color: var(--accent-bright); }
.play-link:hover { transform: translateY(-3px); background: var(--navy-mid); box-shadow: 0 0 30px rgba(0,194,199,.36); }
.featured-bottom { position: absolute; z-index: 3; right: 0; bottom: 24px; left: 0; display: flex; justify-content: center; padding: 0 20px; }
.featured-select { display: grid; grid-template-columns: repeat(3, minmax(0, 210px)); gap: 10px; width: min(100%, 650px); }
.featured-thumb { position: relative; padding: 0; border: 2px solid rgba(215,232,242,.44); border-radius: 3px; overflow: hidden; color: #fff; text-align: left; cursor: pointer; background: var(--navy); box-shadow: 0 8px 24px rgba(0,8,22,.36); transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.featured-thumb:hover { transform: translateY(-3px); }
.featured-thumb[aria-pressed="true"] { border-color: var(--accent-bright); box-shadow: 0 0 0 1px var(--accent-bright), 0 0 22px rgba(0,194,199,.4); }
.thumb-art { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; }
.thumb-art--skyduel { background: #09245a url("./art/skyduel/menu_back.webp") center / cover no-repeat; }
.thumb-art--skyduel img { position: absolute; width: auto; max-width: none; height: 160%; left: 50%; bottom: -57%; transform: translateX(-50%); object-fit: contain; }
.thumb-title { position: absolute; inset: 0; display: grid; place-items: center; padding: 10px; background: linear-gradient(0deg, rgba(0,0,0,.65), rgba(0,0,0,.08) 70%); text-align: center; font-size: 14px; font-weight: 800; text-shadow: 0 2px 8px #000; }
.featured-all-link { display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 9; border: 2px solid rgba(0,194,199,.7); border-radius: 3px; background: var(--navy-deep) url("./art/game-list-tile.webp") center / cover no-repeat; box-shadow: 0 8px 24px rgba(0,8,22,.36); color: #fff; text-decoration: none; font-size: 16px; font-weight: 800; transition: transform .18s ease, border-color .18s ease, background-color .18s ease; }
.featured-all-link:hover { transform: translateY(-3px); border-color: var(--accent-bright); }

.games-section { margin: 0; padding: clamp(60px, 7vw, 110px) clamp(24px, 5vw, 88px) clamp(90px, 10vw, 150px); background: linear-gradient(rgba(6,24,44,.75), rgba(6,24,44,.75)), var(--navy-deep) url("./art/games-section-bg.webp") center / cover no-repeat; scroll-margin-top: 30px; }
.games-section-inner { max-width: 1424px; margin: 0 auto; }
.section-heading { margin-bottom: 30px; }
.section-heading h2 { display: flex; align-items: center; gap: 14px; margin: 0; font-size: clamp(28px, 3.2vw, 44px); letter-spacing: -.04em; }
.section-heading h2 img { width: clamp(30px, 3vw, 40px); height: auto; flex: none; }
.game-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(12px, 1.2vw, 20px); }
.game-card { min-width: 0; display: block; overflow: hidden; border: 1px solid #8da4b5; border-radius: 4px; background: var(--silver); box-shadow: 0 12px 32px rgba(0, 9, 25, .18); color: var(--navy); text-decoration: none; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.card-art { display: block; aspect-ratio: var(--card-ratio); overflow: hidden; border-bottom: 1px solid #a9bdcc; transition: filter .2s ease; }
.card-art--skyduel { position: relative; background: #09245a url("./art/skyduel/menu_back.webp") center / cover no-repeat; }
.card-art--skyduel img { position: absolute; width: auto; max-width: none; height: 136%; left: 50%; bottom: -26%; transform: translateX(-50%); object-fit: contain; }
.game-card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: 0 14px 32px rgba(0, 194, 199, .17); }
.game-card:hover .card-art { filter: saturate(1.1); }
.card-details { display: flex; justify-content: space-between; gap: 4px; padding: 11px 12px 13px; }
.card-details > span:first-child { min-width: 0; }
.card-details strong, .card-details small { display: block; }
.card-details strong { font-size: clamp(14px, 1.2vw, 18px); line-height: 1.35; white-space: nowrap; }
.card-details small { margin-top: 4px; color: var(--dark-gray); font-size: 11px; line-height: 1.4; white-space: nowrap; }
.card-arrow { color: #008e96; }
.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); padding: 30px clamp(24px, 5vw, 88px); background: var(--navy-deep); color: var(--muted); font-size: 13px; }
.site-footer a { text-decoration: none; }
.footer-brand img { filter: invert(1); }
.footer-links { display: flex; align-items: center; gap: clamp(18px, 2vw, 28px); }
.footer-links a { display: inline-flex; align-items: center; justify-content: center; min-height: 30px; opacity: .72; transition: opacity .18s ease; }
.footer-links a:hover { opacity: 1; }
.footer-tomlab img { width: 90px; height: auto; }
.footer-icon-link img { width: 18px; height: 18px; }

@media (min-width: 1600px) {
  .game-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
}

@media (max-width: 1000px) {
  .game-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .site-header { height: 54px; padding-inline: 16px; gap: 10px; }
  .brand img { width: clamp(136px, 40vw, 160px); }
  .contact-link { font-size: 11px; }
  .featured-shade { background: linear-gradient(0deg, rgba(4,19,38,.88) 0%, rgba(4,19,38,.4) 52%, rgba(4,19,38,.08) 100%); }
  .featured-art .sky-hero-pilots { width: 130vw; left: 50%; bottom: 10%; }
  .featured-art .sky-hero-plane { width: 55vw; }
  .sky-hero-plane--a { left: -16%; top: 0; }
  .sky-hero-plane--b { right: -16%; top: 0; }
  .sky-hero-plane--c, .sky-hero-plane--d { display: none !important; }
  .featured-copy { position: absolute; left: 0; right: 0; bottom: 0; width: auto; padding: 0 20px 126px; }
  .featured-copy h2 { height: clamp(112px, 34vw, 140px); margin-bottom: 16px; }
  .featured-copy .skyduel-title { width: min(72vw, 300px); }
  .goma-dash-title img { height: 100%; }
  .featured-description { min-height: 48px; font-size: 15px; }
  .play-link { margin-top: 18px; min-height: 50px; min-width: 180px; }
  .featured-bottom { bottom: 18px; padding: 0 10px; }
  .featured-select { grid-template-columns: repeat(3, minmax(0, 1fr)); width: min(100%, 480px); gap: 6px; }
  .thumb-title, .featured-all-link { font-size: clamp(10px, 2.8vw, 13px); }
  .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
  .site-footer { align-items: flex-start; }
  .footer-links { justify-content: flex-end; gap: 16px; }
}

@media (max-width: 360px) {
  .contact-link { font-size: 10px; }
  .thumb-title { padding: 3px; font-size: 9px; white-space: nowrap; }
  .featured-all-link { font-size: 9px; white-space: nowrap; }
  .site-footer { gap: 12px; padding-inline: 20px; }
  .footer-brand img { width: 120px; }
  .footer-tomlab img { width: 68px; }
  .footer-icon-link img { width: 16px; height: 16px; }
  .card-details { padding-inline: 8px; }
  .card-details strong { font-size: 13px; }
  .card-arrow { width: 14px; height: 14px; flex-basis: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  .play-link, .featured-thumb, .featured-all-link, .game-card, .card-art, .contact-link, .site-header, .footer-links a { transition: none; }
  .featured-game.is-active { animation: none; }
}
