/* Shared by the four Grandia pages: the game's own fonts (rebuilt as TTFs by the port) and its window style. */
@font-face { font-family: "Grandia Dialogue"; src: url("../../fonts/Grandia-Dialogue.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Grandia Menu"; src: url("../../fonts/Grandia-BattleMenu.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Grandia Small"; src: url("../../fonts/Grandia-BattleSmall.woff2") format("woff2"); font-display: swap; }

/* Pixel fonts stay sharp only at whole multiples of their native size (16 px, 8 px). */
.g-dialogue, .g-menu, .g-small { font-weight: 400; letter-spacing: 0; -webkit-font-smoothing: none; font-smooth: never; text-rendering: optimizeSpeed; }
.g-dialogue { font-family: "Grandia Dialogue", monospace; font-size: 32px; line-height: 40px; }
.g-menu { font-family: "Grandia Menu", monospace; font-size: 32px; line-height: 40px; }
.g-small { font-family: "Grandia Small", monospace; font-size: 16px; line-height: 20px; }
.g-x1 { font-size: 16px; line-height: 20px; }
.g-x3 { font-size: 48px; line-height: 56px; }
.g-x4 { font-size: 64px; line-height: 72px; }

/* The in-game window: deep blue gradient with a bevelled gold-and-white frame, as on the V-Slash banner. */
.g-window {
  position: relative; padding: 18px 24px; color: #fff;
  background: linear-gradient(180deg, #2b4fb3 0%, #17307a 55%, #0e1f57 100%);
  border: 3px solid #e9edf7; border-radius: 6px;
  box-shadow: inset 0 0 0 2px #233a85, inset 0 0 0 4px #9fb4ee55, 0 12px 30px rgba(0, 0, 0, .45);
  text-shadow: 2px 2px 0 #0a1440;
}
.g-window--gold { border-color: #f2d36b; box-shadow: inset 0 0 0 2px #7a5a12, inset 0 0 0 4px #ffe9a055, 0 12px 30px rgba(0, 0, 0, .45); }
.g-window--parchment { /* the field dialogue frame */
  background: linear-gradient(180deg, #6b5b3d, #4a3d27); border-color: #d9c38b; text-shadow: 2px 2px 0 #241b0d;
  box-shadow: inset 0 0 0 2px #3a2e18, inset 0 0 0 4px #f6e2a855, 0 12px 30px rgba(0, 0, 0, .45);
}
.g-cursor { display: inline-block; width: 0; height: 0; border-left: 12px solid #ffd84d; border-top: 8px solid transparent; border-bottom: 8px solid transparent; margin-right: 10px; animation: g-bob .6s steps(2) infinite; vertical-align: middle; }
@keyframes g-bob { 50% { transform: translateX(4px); } }

.fan-note { font-size: .85rem; }

/* Grandia pages: headings in the game's own Dialogue font. Pixel fonts stay crisp only at whole multiples of
   16 px, so sizes step 64/48/32 instead of scaling smoothly. */
body[data-page="decomp"] :is(h1, h2, h3),
body[data-page="recomp"] :is(h1, h2, h3):not(.hero-title),
body[data-page="assets"] :is(h1, h2, h3),
body[data-page="mods"] :is(h1, h2, h3),
.g-head, .g-head-all :is(h2, h3) {
  font-family: "Grandia Dialogue", monospace; font-weight: 400; letter-spacing: 0; line-height: 1.3;
  -webkit-font-smoothing: none; text-rendering: optimizeSpeed;
}
body[data-page] .title-xl { font-size: 64px; }
body[data-page] .title-l, .g-head.title-l { font-size: 48px; }
body[data-page] :is(.title-m, h3) { font-size: 32px; }
body[data-page="assets"] h1 em, body[data-page="assets"] h2 em { font-style: normal; }
body[data-page="home"] .g-head-all h3 { font-size: 32px; }
@media (max-width: 900px) {
  body[data-page] .title-xl { font-size: 48px; }
  body[data-page] .title-l, .g-head.title-l { font-size: 32px; }
}
@media (max-width: 480px) {
  body[data-page] .title-xl { font-size: 32px; }
}
