@font-face {
  font-family: 'DotGothic16';
  src: url('./assets/dotgothic16.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: light;
  font-family: 'DotGothic16', sans-serif;
  font-synthesis: none;
  --ink: #293b61;
  --muted: #506584;
  --blue: #276ca7;
  --line: #a9cbe5;
  --gold: #efd084;
  --paper: #fffdf6;
  --pink: #f8e1eb;
  background: #eaf5fd;
  color: var(--ink);
  line-height: 1.8;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background: linear-gradient(#eaf5fd12, #edf7ffe0 68%, #f5efffe8), url('./assets/palace.webp') center top / cover no-repeat;
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(#ffffffb3 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--blue); text-underline-offset: .22em; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: #beddf7; }
:focus-visible { outline: 3px solid #b54a84; outline-offset: 5px; }
::selection { background: #e8c6ec; }
h1, h2, h3, p { margin: 0; font-weight: 400; }
h1 { font-size: clamp(1.65rem, 3.5vw, 2rem); line-height: 1.5; letter-spacing: .06em; }
h2 { font-size: clamp(1.3rem, 2.6vw, 1.6rem); line-height: 1.65; }
h3 { font-size: 1.12rem; line-height: 1.6; }
p + p { margin-top: 1em; }
strong { font-weight: 400; color: #984877; }
.skip-link { position: fixed; left: 1rem; top: -100px; z-index: 10; padding: .6rem 1rem; background: white; }
.skip-link:focus { top: 1rem; }
.site-header {
  border-top: 4px solid #719fc4;
  border-bottom: 1px solid #b5cce2;
  background: #f8fcfff0;
  box-shadow: 0 3px 0 #ffffffb8, 0 6px 0 #9fb6db21;
}
.header-inner, .site-main, .footer-inner { width: min(1104px, calc(100% - 64px)); margin-inline: auto; }
.header-inner { min-height: 94px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .7rem; color: var(--ink); text-decoration: none; font-size: 1.5rem; letter-spacing: .04em; }
.brand img { width: 68px; height: 40px; object-fit: contain; image-rendering: pixelated; }
.site-nav { display: flex; gap: 1.75rem; align-items: center; }
.site-nav a { text-decoration: none; font-size: .95rem; padding-block: .6rem; }
.site-nav a[aria-current='page'] { color: #9b4d79; box-shadow: inset 0 -3px #e4a6c8; }
.site-main { padding-top: 43px; padding-bottom: 70px; }
.catalog-heading { display: flex; align-items: center; gap: .8rem; margin-bottom: 32px; }
.catalog-heading::before, .catalog-heading::after { content: ''; height: 1px; background: #a3bddd; flex: 1; box-shadow: 0 2px white; }
.catalog-heading h1 { padding-inline: .5rem; }
.games-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 34px; }
.game-card {
  position: relative;
  background: var(--paper);
  border: 2px solid #6a8ab5;
  border-radius: 10px;
  box-shadow: 0 0 0 3px #fffdf7, 0 0 0 5px #d9b877, 0 8px 0 #7798bb35, 0 14px 28px #354a7b14;
  overflow: hidden;
}
.card-art { display: block; position: relative; overflow: hidden; border-bottom: 3px solid #ddc48d; background: #d6ebff; }
.card-art img { width: 100%; aspect-ratio: 1024 / 500; object-fit: contain; transition: transform .2s; }
@media (hover: hover) {
  .card-art:hover img { transform: scale(1.018); }
  .button:hover { filter: brightness(1.035); transform: translateY(-1px); }
  .text-link:hover { color: #9b4d79; }
}
.card-body { padding: 23px 25px 24px; }
.card-title { display: flex; align-items: center; gap: 12px; margin-bottom: 13px; }
.card-title img { width: 49px; height: 49px; border-radius: 10px; border: 1px solid #dcc58e; }
.card-title h2 { font-size: clamp(1.15rem, 2.1vw, 1.4rem); }
.card-title h2 a { color: inherit; text-decoration: none; }
.genre { display: block; color: var(--muted); font-size: .875rem; margin-top: 1px; }
.card-summary { font-size: 1rem; line-height: 1.95; min-height: 6em; }
.card-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }
.button {
  min-height: 48px;
  padding: .6rem .9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  text-align: center;
  text-decoration: none;
  color: #284c6a;
  background: linear-gradient(#fff8dc, #f8df9d);
  border: 2px solid #bd9549;
  border-radius: 7px;
  box-shadow: inset 0 0 0 2px #fff8df, 0 3px 0 #b798613b;
  line-height: 1.5;
  transition: transform .15s, filter .15s;
}
.button.secondary { background: linear-gradient(#f7fcff, #dceefd); border-color: #8caeca; box-shadow: inset 0 0 0 2px #f7fcff, 0 3px 0 #7699b332; }
.button:active { transform: translateY(2px); box-shadow: inset 0 0 0 2px #fff8df; }
.card-platform { margin-top: 16px; display: flex; align-items: center; justify-content: center; gap: .45rem; color: var(--muted); font-size: .875rem; }
.card-platform a { color: var(--muted); }
.pixel-star { width: 18px; height: 18px; object-fit: contain; image-rendering: pixelated; }
.site-footer { border-top: 1px solid #b2c9df; background: #f7fbffdd; }
.footer-inner { padding: 26px 0 30px; display: flex; justify-content: space-between; align-items: center; gap: 20px; color: var(--muted); font-size: .875rem; }
.footer-links { display: flex; align-items: center; flex-wrap: wrap; gap: 1.5rem; }
.footer-inner a { color: var(--muted); }
.breadcrumbs { font-size: .875rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: .7rem; margin: 0 0 22px; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs span[aria-hidden] { color: #9daec3; }
.detail-hero, .content-panel {
  background: #fffdf8f5;
  border: 1px solid #a9bdd4;
  border-radius: 10px;
  box-shadow: inset 0 0 0 4px #fffdf8, inset 0 0 0 5px #e9d9af, 0 6px 0 #98b2d52c;
}
.detail-hero { overflow: hidden; }
.detail-hero > img { width: 100%; aspect-ratio: 1024 / 500; object-fit: contain; border-bottom: 3px solid #d9c191; }
.detail-hero-content { padding: 28px 34px 30px; display: flex; align-items: center; justify-content: space-between; gap: 25px; }
.detail-hero-title { display: flex; align-items: center; gap: 15px; }
.detail-hero-title img { width: 64px; height: 64px; border-radius: 12px; border: 1px solid #d6c199; }
.detail-actions { display: flex; gap: 12px; flex-shrink: 0; }
.section-menu { margin: 32px 0; display: flex; justify-content: center; flex-wrap: wrap; gap: 12px 30px; }
.section-menu a { text-decoration: none; border-bottom: 1px solid #a6c4d9; }
.content-panel { padding: 32px 36px; margin-top: 30px; scroll-margin-top: 20px; }
.content-panel > h1 { margin-bottom: 24px; }
.content-panel > h2, .section-heading { margin-bottom: 22px; padding-bottom: 12px; border-bottom: 1px solid #b9cbdf; }
.content-panel > h2::before, .section-heading::before { content: ''; display: inline-block; width: 12px; height: 12px; background: #efc66d; border: 2px solid #b2914d; box-shadow: inset 0 0 0 2px #fff3bc; transform: rotate(45deg); margin: 0 14px 2px 2px; }
.prose { max-width: 800px; line-height: 2.05; }
.mechanics { display: grid; gap: 20px; margin-top: 26px; }
.mechanic { display: grid; grid-template-columns: 46px 1fr; gap: 16px; border-top: 1px solid #dce2ea; padding-top: 22px; }
.mechanic img { width: 42px; max-height: 52px; object-fit: contain; image-rendering: auto; }
.mechanic h3 { margin-bottom: 6px; }
.mechanic p { color: #405577; }
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 30px; }
.gallery figure { margin: 0; min-width: 0; }
.gallery a { display: block; background: #e7f3ff; border: 1px solid #a9bfd9; padding: 5px; border-radius: 6px; }
.gallery img { aspect-ratio: 9 / 16; object-fit: contain; width: 100%; border-radius: 2px; }
.gallery figcaption { color: var(--muted); font-size: .875rem; line-height: 1.7; margin-top: 10px; }
.steps { padding-left: 1.55rem; margin: 0; }
.steps li { padding-left: .6rem; }
.steps li + li { margin-top: 22px; }
.steps li::marker { color: #a76794; }
.steps h3 { margin-bottom: 4px; }
.control-list { margin: 25px 0 0; }
.control-list dt { color: #35608b; margin-top: 20px; }
.control-list dd { margin: 6px 0 0; }
.faq { margin-top: 28px; }
.faq details { border-top: 1px solid #c5d5e4; padding: 16px 0; }
.faq details:last-child { border-bottom: 1px solid #c5d5e4; }
.faq summary { cursor: pointer; padding-right: 8px; color: #355c85; }
.faq details p { margin-top: 10px; padding-left: 1.25rem; }
.play-again { margin-top: 32px; display: flex; justify-content: center; }
.play-again .button { min-width: 220px; }
.about-layout { display: grid; grid-template-columns: 110px 1fr; gap: 28px; align-items: start; }
.about-layout > img { border-radius: 18px; border: 2px solid #e6cc99; width: 110px; }
.about-layout h2 { margin-bottom: 15px; }
.contact { margin-top: 30px; padding-top: 22px; border-top: 1px solid #c8d5e4; }
.contact a { word-break: break-word; }
.policy-section + .policy-section { margin-top: 28px; }
.policy-section h2 { margin-bottom: 10px; font-size: 1.2rem; }
.policy-date { color: var(--muted); font-size: .875rem; margin-bottom: 24px; }
.policy-links { margin-top: 12px; padding-left: 1.2rem; }

@media (min-width: 1400px) {
  body::before { background-size: 1700px auto; background-color: #eaf5fd; }
}
@media (max-width: 800px) {
  .header-inner, .site-main, .footer-inner { width: calc(100% - 40px); }
  .games-grid { gap: 24px; }
  .card-body { padding: 20px 18px; }
  .card-title { gap: 9px; }
  .card-title img { width: 39px; height: 39px; }
  .card-actions { grid-template-columns: 1fr; }
  .card-summary { min-height: 8em; }
  .detail-hero-content { align-items: flex-start; flex-direction: column; }
  .detail-actions { width: 100%; }
  .detail-actions > a { flex: 1; }
  .content-panel { padding: 28px; }
}
@media (max-width: 590px) {
  .header-inner, .site-main, .footer-inner { width: calc(100% - 36px); }
  .header-inner { min-height: 80px; }
  .brand { font-size: 1.25rem; gap: .4rem; }
  .brand img { width: 43px; height: 31px; }
  .site-nav { gap: 14px; }
  .site-nav a { font-size: .875rem; }
  .site-main { padding-top: 32px; padding-bottom: 48px; }
  .catalog-heading { margin-bottom: 25px; }
  .games-grid { grid-template-columns: 1fr; gap: 30px; }
  .card-body { padding: 20px; }
  .card-summary { min-height: 0; }
  .card-title img { width: 46px; height: 46px; }
  .card-title h2 { font-size: 1.25rem; }
  .card-actions { grid-template-columns: 1fr 1fr; gap: 9px; }
  .button { padding-inline: 9px; font-size: .95rem; }
  .card-platform { margin-top: 15px; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 14px; }
  .footer-links { gap: 10px 20px; }
  .detail-hero-content { padding: 23px 20px; gap: 20px; }
  .detail-hero-title { gap: 12px; }
  .detail-hero-title h1 { font-size: 1.4rem; letter-spacing: 0; }
  .detail-hero-title img { width: 49px; height: 49px; }
  .section-menu { gap: 10px 24px; margin-block: 27px; }
  .content-panel { padding: 27px 21px; margin-top: 24px; }
  .mechanic { grid-template-columns: 34px 1fr; gap: 12px; }
  .mechanic img { width: 34px; }
  .gallery { gap: 13px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gallery a { padding: 3px; }
  .gallery figcaption { font-size: .875rem; }
  .about-layout { grid-template-columns: 1fr; gap: 20px; }
  .about-layout > img { width: 88px; }
}
@media (max-width: 350px) {
  .header-inner { flex-wrap: wrap; justify-content: center; padding-block: 12px; gap: 6px; }
  .card-actions, .detail-actions { grid-template-columns: 1fr; flex-direction: column; }
  .card-title img { width: 35px; height: 35px; }
  .card-title h2 { font-size: 1.1rem; }
  .gallery { grid-template-columns: 1fr; }
  .gallery img { max-height: 380px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
