/* Homepage rules are scoped so the game's interface keeps its own layout. */
html { scroll-behavior: smooth; }
body:not(.game-active) { background: #0e211e; }
.site-main { max-width: none; width: 100%; padding: 0; }
.home-header { height: 84px; padding: 0 5%; align-items: center; gap: 30px; background: #0b1c19; border-bottom: 1px solid #bca16b35; }
.home-wordmark { display: inline-flex; align-items: center; gap: 12px; color: #e4c68b; text-decoration: none; font: 700 21px/1 Georgia,serif; letter-spacing: .14em; }
.home-sigil { display: grid; place-items: center; width: 32px; height: 40px; border: 1px solid #c8a86c; font: 28px Georgia,serif; clip-path: polygon(50% 0,100% 14%,100% 83%,50% 100%,0 83%,0 14%); }
.home-header nav { display: flex; justify-content: center; flex: 1; gap: clamp(20px,4vw,52px); }
.home-header nav a, .home-nav-login { color: #dddcc9; text-decoration: none; font-size: 12px; letter-spacing: .06em; }
.home-nav-login { border: 1px solid #ab92604f; padding: 12px 20px; color: #e7cf99; }
.home-nav-login span { margin-left: 20px; }
.home-header a:hover, .home-footer a:hover { color: #fff2cc; }
.home-hero { position: relative; min-height: 730px; display: flex; flex-direction: column; justify-content: center; isolation: isolate; }
.home-hero-art, .home-hero-shade { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.home-hero-art { object-fit: cover; object-position: center 55%; }
.home-hero-shade { background: linear-gradient(90deg,#071a19eb 0%,#08211ab3 29%,#061e1920 67%,#061a194d),linear-gradient(0deg,#0e211e 0%,transparent 32%,#06171430); }
.home-hero-content { width: min(1320px,90%); margin: 0 auto; padding: 75px 0 92px; display: grid; grid-template-columns: minmax(0,1fr) 350px; align-items: center; gap: clamp(35px,6vw,100px); }
.home-kicker { font: 600 10px/1.6 system-ui,sans-serif; letter-spacing: .19em; color: #ddbf83; margin: 0 0 22px; }
.home-intro h1 { font: 500 clamp(42px,5.8vw,86px)/1.05 Georgia,serif; color: #f1deb4; letter-spacing: .045em; margin: 0 0 23px; text-shadow: 0 3px 20px #0006; }
.home-tagline { font: 400 clamp(28px,3.2vw,46px)/1.17 Georgia,serif; color: #fff9e8; margin: 0 0 24px; }
.home-intro-copy { max-width: 410px; margin: 0 0 32px; font-size: 14px; line-height: 1.9; color: #d0d9cc; }
.home-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; }
.home-button { display: inline-flex; justify-content: center; align-items: center; gap: 22px; min-height: 49px; padding: 15px 22px; border-radius: 0; border: 1px solid #d7b371; font: 700 11px/1.3 system-ui,sans-serif; letter-spacing: .07em; text-decoration: none; cursor: pointer; transition: background .18s, box-shadow .18s; }
.home-button-gold { background: #d6b679; color: #172b23; box-shadow: inset 0 0 0 3px #e9d09566; }
.home-button-gold:hover { background: #ebce91; box-shadow: 0 0 24px #d3b57233; }
.home-button-outline { background: transparent; color: #dfc58e; }
.home-button:disabled { cursor: default; opacity: .55; }
.home-text-link { font-size: 11px; letter-spacing: .035em; color: #ebd4a2; text-decoration: none; border-bottom: 1px solid #d8bd7e70; padding: 9px 0; }
.home-text-link span { margin-left: 10px; }
.home-alpha { margin-top: 24px; font-size: 10px; letter-spacing: .035em; color: #afc2b0; }
#auth.home-auth { position: relative; width: 100%; max-width: none; margin: 0; padding: 30px 28px 20px; background: #0a211fed; border: 1px solid #d4bb7a66; border-radius: 0; box-shadow: 0 15px 45px #04161450; }
#auth.home-auth::before { content: ''; position: absolute; top: -5px; left: 50%; width: 8px; height: 8px; border: 1px solid #e0c58a; background: #163429; transform: rotate(45deg); }
#auth .home-kicker { font-size: 8px; margin-bottom: 12px; }
#auth h2 { font: 400 27px/1.15 Georgia,serif; margin: 0 0 24px; color: #f3e6c5; }
#auth .tabs { margin-bottom: 22px; gap: 14px; }
#auth .tabs button { font-size: 11px; padding: 10px 0; color: #94aaa0; border-color: #3b5248; }
#auth .tabs button.active { color: #edce8d; border-color: #ddbb77; }
#auth form { gap: 8px; }
#auth label { font-size: 10px; color: #c9d2c4; }
#auth input { min-width: 0; width: 100%; font-size: 12px; padding: 12px; border: 1px solid #5b716257; border-radius: 0; background: #071a18a8; color: #f9efda; margin-bottom: 8px; }
#auth input::placeholder { color: #79938a; }
#auth input:focus { outline: 1px solid #dfc18b; outline-offset: 2px; }
#auth .home-button { margin-top: 10px; }
#auth .error { font-size: 12px; line-height: 1.5; margin: 12px 0 0; }
#auth .error:empty { display: none; }
.home-auth-note { font: 10px/1.7 system-ui,sans-serif; color: #91a89b; text-align: center; margin: 18px 0 0; }
.home-hero-foot { position: absolute; bottom: 22px; left: 5%; right: 5%; display: flex; align-items: center; justify-content: space-between; gap: 20px; color: #8ea59b; font-size: 8px; letter-spacing: .14em; }
.home-hero-foot a { color: #d3bd88; text-decoration: none; }
.home-principles { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); padding: 34px max(5%,calc((100vw - 1200px)/2)); background: #0e211e; border-bottom: 1px solid #9c966134; }
.home-principles > div { position: relative; padding: 4px 25px 4px 50px; border-right: 1px solid #6c846143; }
.home-principles > div:last-child { border-right: 0; }
.home-principles > div > span { position: absolute; left: 20px; top: 8px; color: #a78b58; font: 12px Georgia,serif; }
.home-principles h2 { font: 400 19px Georgia,serif; color: #e6d9b8; margin: 0 0 8px; }
.home-principles p { font-size: 10px; line-height: 1.8; color: #8fa79b; margin: 0; }
.home-section { padding: 85px max(6%,calc((100vw - 1160px)/2)); scroll-margin-top: 24px; }
.home-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 45px; margin-bottom: 34px; }
.home-section-heading h2, .home-support h2 { font: 400 clamp(30px,3.3vw,46px)/1.15 Georgia,serif; margin: 0; }
.home-section-heading .home-kicker { margin-bottom: 12px; }
.home-section-heading > p { max-width: 330px; font-size: 12px; line-height: 1.8; margin: 0 0 3px; }
.home-universe { background: #f0eddf; color: #18362c; }
.home-universe .home-kicker { color: #8a7042; }
.home-universe .home-section-heading > p { color: #6c7567; }
.home-trailer { position: relative; aspect-ratio: 2.15; overflow: hidden; background: #14382c; outline: 1px solid #b4a883; outline-offset: 6px; }
.home-trailer > img { width: 100%; height: 100%; object-fit: cover; object-position: center 56%; filter: brightness(.54); }
.home-trailer-placeholder { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; text-align: center; color: #f6ebd3; background: linear-gradient(0deg,#051b2060,transparent); }
.home-play-mark { display: grid; place-items: center; width: 56px; height: 56px; border: 1px solid #e2c282; border-radius: 50%; color: #f5dd9f; font-size: 35px; margin-bottom: 18px; }
.home-trailer-placeholder .home-kicker { margin: 0 0 10px; color: #ddc694; font-size: 9px; }
.home-trailer-placeholder h3 { font: 30px Georgia,serif; margin: 0 0 12px; }
.home-trailer-placeholder > p:last-child { font-size: 12px; margin: 0; color: #dfdfcb; }
.home-trailer video { display: block; width: 100%; height: 100%; object-fit: contain; background: #081712; }
.home-video-caption { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 20px; }
.home-video-caption p { color: #6b7364; font-size: 11px; }
.home-video-caption .home-text-link { color: #52623c; border-color: #aaa480; white-space: nowrap; }
.home-journal { background: #102620; color: #e9dec1; }
.home-journal .home-section-heading > p { color: #99afa0; }
.home-journal-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 28px; align-items: start; }
.journal-entry { min-width: 0; }
.journal-art { height: 190px; display: grid; place-items: center; border: 1px solid #9c996c40; overflow: hidden; position: relative; }
.journal-art::after { content: ''; position: absolute; inset: 0; box-shadow: inset 0 -30px 45px #0a201956; pointer-events: none; }
.journal-art-village { background: radial-gradient(ellipse at 50% 70%,#7e9859,#314d3c); }
.journal-art-village span { display: block; width: 270px; height: 190px; background: url('/assets/home/news-village.webp') center/contain no-repeat; }
.journal-art-npcs { background: radial-gradient(ellipse at 50% 75%,#648e6c,#263f37); }
.journal-art-npcs span { display: block; width: 128px; height: 144px; background: url('/assets/home/news-nelis.webp') center/contain no-repeat; image-rendering: pixelated; }
.journal-art-slimes { background: radial-gradient(ellipse at 50% 70%,#66834c,#20372f); }
.journal-art-slimes span { display: block; width: 175px; height: 175px; background: url('/assets/home/news-slime.webp') center/contain no-repeat; }
.journal-body { padding-top: 20px; }
.journal-meta { color: #c1a66b; font: 500 8px/1.7 system-ui,sans-serif; letter-spacing: .07em; margin: 0 0 13px; }
.journal-body h3 { font: 400 24px/1.2 Georgia,serif; margin: 0 0 12px; }
.journal-body > p:not(.journal-meta), .journal-body details p { font-size: 12px; line-height: 1.9; color: #9eb4a6; }
.journal-body details { border-top: 1px solid #75856345; padding-top: 14px; margin-top: 20px; }
.journal-body summary { color: #d5bd85; font-size: 10px; cursor: pointer; }
.journal-body details[open] summary { margin-bottom: 12px; }
.home-support { display: grid; grid-template-columns: 60px minmax(0,1fr) auto; gap: 34px; align-items: center; border-block: 1px solid #c7b47d30; background: radial-gradient(ellipse at 10% 40%,#244431,#142b25 65%); }
.home-support-emblem { color: #c9ad6a; font-size: 64px; }
.home-support .home-kicker { margin-bottom: 12px; }
.home-support h2 { font-size: 36px; }
.home-support p:not(.home-kicker) { font-size: 12px; line-height: 1.8; color: #acbba8; max-width: 510px; }
.home-support .home-support-status { font-size: 10px; color: #c6b184; }
.home-advertisement { padding: 35px 5% 42px; text-align: center; background: #0c1d19; }
.home-advertisement > p { font-size: 8px; letter-spacing: .18em; color: #75877c; }
#advertisementSlot { margin: 15px auto 0; max-width: 970px; min-height: 90px; border: 1px dashed #77906b45; display: grid; place-items: center; color: #7b8e80; font-size: 11px; }
#advertisementSlot a, #advertisementSlot img { display: block; max-width: 100%; }
.home-footer { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 24px; padding: 38px 6%; border-top: 1px solid #9b9c6626; background: #081814; }
.home-footer .home-wordmark { font-size: 17px; }
.home-footer > p { font: italic 15px Georgia,serif; text-align: right; color: #8fa394; margin: 0; }
.home-footer > div { display: flex; flex-wrap: wrap; gap: 24px; }
.home-footer > div a, .home-footer small { color: #819689; font-size: 10px; text-decoration: none; }
.home-footer small { text-align: right; }
.game-active #landing { display: none; }
#landing a:focus-visible, #landing button:focus-visible, .home-header a:focus-visible, .home-footer a:focus-visible, #landing summary:focus-visible { outline: 2px solid #dec184; outline-offset: 5px; }
[aria-disabled="true"][data-open-auth] { opacity: .65; cursor: progress; }
.home-wake-actions { display: grid; gap: 14px; margin-top: 24px; }
#wakeStatus { font-size: 12px; line-height: 1.8; color: #dbd9bd; }
@media(max-width:1050px) {
  .home-hero-content { gap: 30px; grid-template-columns: minmax(0,1fr) 320px; }
  .home-actions { gap: 15px; }
  .home-header { gap: 20px; }
  .home-header nav { gap: 20px; }
  .home-wordmark { font-size: 17px; }
  .home-support { grid-template-columns: 40px minmax(0,1fr); gap: 24px; }
  #donationAction { grid-column: 2; }
}
@media(max-width:760px) {
  .home-header { height: auto; min-height: 72px; padding: 17px 5%; flex-wrap: wrap; gap: 18px; }
  .home-header nav { order: 3; flex-basis: 100%; justify-content: space-between; border-top: 1px solid #bba47225; padding-top: 14px; }
  .home-header nav a { font-size: 10px; }
  .home-nav-login { margin-left: auto; padding: 9px 12px; font-size: 10px; }
  .home-nav-login span { margin-left: 8px; }
  .home-sigil { width: 23px; height: 30px; font-size: 20px; }
  .home-hero-content { grid-template-columns: 1fr; width: 88%; padding: 58px 0 70px; gap: 45px; }
  .home-hero-art { object-position: 57% top; }
  .home-hero-shade { background: linear-gradient(0deg,#0e211e 3%,#0b221bae 44%,#061a1980),linear-gradient(90deg,#071c18c9,transparent); }
  .home-intro h1 { font-size: clamp(38px,9vw,66px); }
  .home-tagline { font-size: 33px; }
  .home-kicker { font-size: 8px; }
  .home-intro-copy { font-size: 13px; }
  .home-alpha { line-height: 1.8; }
  #auth.home-auth { max-width: 440px; justify-self: center; padding: 27px 24px; }
  .home-hero-foot { font-size: 7px; gap: 10px; }
  .home-hero-foot > span:first-child { display: none; }
  .home-principles { grid-template-columns: 1fr; gap: 24px; padding: 30px 6%; }
  .home-principles > div { border-right: 0; padding-left: 40px; }
  .home-principles > div > span { left: 5px; }
  .home-principles p { font-size: 11px; }
  .home-section { padding: 52px 6%; }
  .home-section-heading { display: block; margin-bottom: 28px; }
  .home-section-heading > p { margin-top: 18px; max-width: none; }
  .home-section-heading h2 { font-size: 35px; }
  .home-trailer { aspect-ratio: 1.25; }
  .home-trailer-placeholder h3 { font-size: 25px; }
  .home-trailer-placeholder > p:last-child { font-size: 11px; }
  .home-video-caption { align-items: start; flex-direction: column; gap: 4px; }
  .home-journal-grid { grid-template-columns: 1fr; gap: 36px; }
  .journal-art { height: 205px; }
  .journal-body h3 { font-size: 26px; }
  .home-support { grid-template-columns: 1fr; text-align: center; gap: 15px; }
  .home-support-emblem { font-size: 45px; }
  .home-support h2 { font-size: 32px; }
  #donationAction { grid-column: 1; }
  .home-advertisement { padding-inline: 6%; }
  .home-footer { grid-template-columns: 1fr; justify-items: center; gap: 22px; }
  .home-footer > p, .home-footer small { text-align: center; }
  .home-footer > div { justify-content: center; gap: 18px; }
}
@media(prefers-reduced-motion:reduce) { html { scroll-behavior: auto; } .home-button { transition: none; } }

#auth #resumeGame { width: 100%; margin: 0 0 18px; }

/* Compact welcome: a panoramic introduction followed by one editorial row. */
.home-header { height: 60px; }
.home-hero { min-height: 0; }
.home-hero-content { padding: 24px 0 34px; grid-template-columns: minmax(0,1fr) 340px; gap: 40px; }
.home-intro h1 { font-size: clamp(42px,5vw,68px); margin-bottom: 12px; }
.home-kicker { margin-bottom: 12px; }
.home-tagline { font-size: 30px; margin-bottom: 12px; }
.home-intro-copy { line-height: 1.6; margin-bottom: 18px; max-width: 440px; }
.home-alpha { margin: 14px 0 0; font-size: 11px; }
.home-button { min-height: 42px; padding: 11px 18px; font-size: 12px; }
#auth.home-auth { padding: 20px 22px 14px; border-color: #d4bb7a35; }
#auth h2 { font-size: 25px; margin-bottom: 12px; }
#auth .home-kicker { font-size: 9px; margin-bottom: 8px; }
#auth .tabs { margin-bottom: 12px; }
#auth .tabs button { font-size: 12px; padding: 8px 0; }
#auth .tabs button[data-mode="register"] { color: #edd19a; }
#auth form { gap: 5px; }
#auth label { font-size: 11px; }
#auth input { padding: 10px; margin-bottom: 4px; font-size: 13px; }
#auth .home-button { margin-top: 5px; }
.home-auth-note { margin-top: 8px; font-size: 11px; }
.home-hero-foot { bottom: 8px; }
.home-dashboard { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; padding: 20px 5%; background: #102620; }
.home-dashboard .home-section { padding: 0; background: transparent; color: #e9dec1; min-width: 0; }
.home-section-heading { gap: 14px; margin-bottom: 12px; align-items: center; }
.home-section-heading h2 { font-size: 25px; }
.home-section-heading .home-kicker { margin-bottom: 4px; font-size: 9px; color: #c3ab7a; }
.home-text-link { font-size: 12px; }
button.home-text-link { border: 0; border-bottom: 1px solid #d8bd7e40; border-radius: 0; background: transparent; cursor: pointer; padding: 6px 0; text-align: left; }
.home-trailer { height: 176px; aspect-ratio: auto; outline: none; border: 1px solid #a99b6830; }
.home-play-mark { width: 34px; height: 34px; font-size: 25px; margin-bottom: 8px; }
.home-trailer-placeholder { padding: 12px; }
.home-trailer-placeholder h3 { font-size: 23px; margin-bottom: 7px; }
.home-trailer-placeholder .home-kicker { margin-bottom: 4px; }
.home-video-caption { margin-top: 5px; gap: 12px; }
.home-video-caption p { color: #a2b3a4; margin: 4px 0; }
.home-video-caption .home-text-link { color: #dfc68e; border-color: #aaa48045; }
.home-journal-grid { grid-template-columns: 1fr; gap: 8px; }
.journal-entry { display: grid; grid-template-columns: 78px minmax(0,1fr); gap: 14px; align-items: center; padding-bottom: 8px; border-bottom: 1px solid #9baf9230; }
.journal-entry:last-child { border: 0; padding-bottom: 0; }
.journal-art { height: 62px; border: 0; }
.journal-art span { width: 100%; height: 100%; }
.journal-art-npcs span { width: 48px; }
.journal-art-slimes span { width: 62px; }
.journal-body { padding: 0; }
.journal-meta { font-size: 9px; margin: 0 0 3px; letter-spacing: .025em; }
.journal-body h3 { font-size: 18px; margin: 0 0 3px; }
.journal-body h3 button { font: inherit; color: inherit; text-align: left; padding: 0; border: 0; background: none; border-radius: 0; cursor: pointer; }
.journal-body h3 button:hover { color: #ffe3a9; text-decoration: underline; }
.journal-body > p:not(.journal-meta) { font-size: 11px; line-height: 1.4; margin: 0; }
.home-support { padding: 12px 5%; grid-template-columns: 35px minmax(0,1fr) auto; gap: 18px; border-color: #c7b47d1c; }
.home-support-emblem { font-size: 34px; }
.home-support .home-kicker { margin-bottom: 2px; font-size: 9px; }
.home-support h2 { font-size: 23px; }
.home-support .home-support-status { margin: 4px 0 0; font-size: 11px; }
.home-button-outline { border-color: #b7a06b50; }
.home-advertisement { padding: 8px 5% 12px; }
.home-advertisement > p { margin: 0 0 6px; }
#advertisementSlot { min-height: 50px; margin-top: 0; border-color: #77906b25; }
.home-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px; padding: 14px 5%; }
.home-footer .home-wordmark { font-size: 14px; }
.home-footer > p { display: none; }
.home-footer > div a, .home-footer small { font-size: 11px; }
.home-archive { width: min(680px,90vw); max-height: 85dvh; overflow: auto; padding: 28px; background: #102620; color: #e9dec1; border: 1px solid #bda27370; }
.home-archive::backdrop { background: #03130ed9; }
.home-archive form { display: flex; justify-content: end; }
.home-archive form button { background: transparent; color: #ead2a0; border: 1px solid #bda27350; padding: 9px 14px; cursor: pointer; }
.home-archive h2 { font: 30px Georgia,serif; }
.home-archive article { padding: 18px 0; border-top: 1px solid #bda27330; }
.home-archive time { color: #bfa675; font-size: 12px; }
.home-archive h3 { font: 23px Georgia,serif; margin: 10px 0; }
.home-archive article p { font-size: 14px; line-height: 1.8; color: #c0cdbf; }
@media(max-width:1050px) {
  .home-dashboard { gap: 24px; }
  .home-section-heading { flex-wrap: wrap; gap: 6px; }
  #donationAction { grid-column: auto; }
  .home-intro-copy { max-width: 350px; }
}
@media(max-width:760px) {
  .home-header { height: auto; }
  .home-hero-content { grid-template-columns: 1fr; padding: 34px 0 38px; gap: 28px; }
  .home-intro h1 { font-size: clamp(36px,9vw,58px); }
  .home-intro-copy { max-width: 440px; }
  .home-alpha { line-height: 1.7; }
  #auth.home-auth { padding: 24px; }
  #auth input { font-size: 16px; }
  .home-dashboard { grid-template-columns: 1fr; gap: 30px; padding: 26px 6%; }
  .home-trailer { height: auto; aspect-ratio: 1.6; }
  .home-video-caption { flex-direction: row; align-items: center; }
  .journal-entry { grid-template-columns: 76px minmax(0,1fr); min-height: 88px; }
  .journal-body > p:not(.journal-meta) { font-size: 12px; }
  .home-support { grid-template-columns: 1fr; gap: 12px; padding: 24px 6%; }
  .home-support-emblem { display: none; }
  #donationAction { grid-column: 1; }
  .home-footer { justify-content: center; padding-block: 20px; }
  .home-archive { padding: 20px; }
}
@media(min-width:1060px) {
  .home-hero-content { padding-block: 10px 18px; }
  .home-hero-foot { bottom: 4px; }
  .home-dashboard { padding-block: 12px; }
  .home-trailer { height: 160px; }
  .journal-art { height: 54px; }
  .home-support { padding-block: 8px; }
  .home-advertisement { padding-block: 6px 8px; }
  .home-footer { padding-block: 10px; }
}
