#login {
  display: block;
  overflow: auto;
  padding: 0;
  color: #f4e6cf;
  background: radial-gradient(ellipse at 50% 45%, #291614, #100b0c 75%);
  user-select: text;
}
#loginBg { position: fixed; opacity: .34; pointer-events: none; }
.home-shell { position: relative; width: min(1216px, 100%); margin: auto; padding-inline: clamp(18px, 5vw, 68px); }
.home-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding-block: 16px;
  border-bottom: 1px solid #e9bc7040;
}
.home-header a, .home-footer a { color: inherit; text-decoration: none; }
.home-header a:hover, .home-footer a:hover { color: #f0ba6e; }
.home-header nav [aria-current="page"] { color: #f0ba6e; text-decoration: underline; text-underline-offset: 4px; }
.home-brand { font: 700 18px Cinzel, Georgia, serif; margin-right: auto; }
.home-brand span { color: #e3a55b; }
.home-header nav { display: flex; gap: clamp(12px, 3vw, 30px); }
.home-header select { padding: 5px; }
.home-button, .home-header .home-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid #e4a65d;
  border-radius: 3px;
  background: #eab370;
  color: #231208;
  font: 700 .83rem Cinzel, Georgia, serif;
  text-decoration: none;
}
.home-button:hover, .home-header .home-button:hover { background: #ffcb86; color: #231208; }
.home-button.home-outline { background: #1d1415; color: #f7d5a3; }
.home-button.home-outline:hover { background: #38241b; }
#login :focus-visible { outline: 2px solid #ffcd88; outline-offset: 4px; }
.home-hero {
  display: grid;
  grid-template-columns: 1.12fr 1fr;
  align-items: center;
  gap: 12px;
  padding-block: clamp(32px, 6vw, 82px);
}
.home-hero h1 { margin: 12px 0 0; font: 900 clamp(2.55rem, 6vw, 5.7rem)/.96 'Cinzel Decorative', Georgia, serif; letter-spacing: -.06em; }
.home-title-tower { position: relative; display: inline-block; color: #efb773; }
.home-beta {
  position: absolute;
  right: -.6em;
  bottom: -.25em;
  padding: .28em .65em;
  border: 2px solid currentColor;
  border-radius: 3px;
  background: #281816;
  color: #ffca88;
  font: 700 clamp(.8rem, 1.9vw, 1.55rem)/1 Cinzel, Georgia, serif;
  letter-spacing: .12em;
  text-transform: uppercase;
  transform: rotate(-34deg);
}
.home-kicker, .home-tagline, .home-stats dt { color: #edb77c; font: 700 .8rem Cinzel, Georgia, serif; letter-spacing: .13em; }
.home-hero .home-tagline { font-size: 1rem; margin-block: 18px; }
.home-hero-copy > p:not([class]), .home-section > p, .home-guide p, .home-entry p {
  color: #d5bfa7;
  line-height: 1.5;
  font-size: 1.12rem;
  max-width: 56ch;
}
.home-beta-notice {
  max-width: 50ch;
  margin: 16px 0 0;
  padding-left: 12px;
  border-left: 2px solid #edb77c;
  color: #edcba2;
  line-height: 1.45;
}
.home-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.home-discord-btn { display: inline-flex; align-items: center; gap: 9px; }
.home-discord-btn svg { color: #edb77c; flex: none; }
.home-hero-art {
  margin: 0;
  min-width: 0;
  border: 1px solid #d99a5959;
  background: #140d10;
}
.home-boss-portrait {
  position: relative;
  isolation: isolate;
  aspect-ratio: 640 / 460;
  background: radial-gradient(ellipse at 50% 55%, #7a3921, #2b1817 47%, #120d11 78%);
}
.home-dial {
  position: absolute;
  z-index: -1;
  inset: 50% auto auto 50%;
  width: 66%;
  transform: translate(-50%, -50%);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid #e3a55b80;
  box-shadow: 0 0 0 7px #e3a55b17, inset 0 0 32px #e3a55b25;
  background: repeating-conic-gradient(#edb77c50 0 1deg, transparent 1deg 15deg);
  mask-image: radial-gradient(transparent 63%, black 64%);
}
.home-hero-art canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 10px 18px #100707); }
.home-hero-art figcaption {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 14px;
  padding: 12px 16px;
  border-top: 1px solid #d99a5930;
}
.home-hero-art .wb-heading { flex: 1 1 170px; }
.home-hero-art .home-kicker { color: #edb77c; }
.home-hero-art .wb-heading strong { font: 700 clamp(.95rem, 2vw, 1.35rem) Cinzel, Georgia, serif; }
.home-hero-art .wb-timing { text-align: start; font-size: 13px; }
.home-hero-art[data-phase="active"] [data-wb="status"],
.home-hero-art[data-phase="warning"] [data-wb="status"] { color: #ffb677; }
.home-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; border: 1px solid #d99a5959; background: #211514; }
.home-stats div { display: flex; flex-direction: column-reverse; gap: 5px; padding: 16px 8px; text-align: center; }
.home-stats div + div { border-left: 1px solid #d99a5959; }
.home-stats dd { margin: 0; font: 700 clamp(1.6rem, 4vw, 2.6rem)/1 Cinzel, Georgia, serif; }
.home-stats dt { letter-spacing: .06em; }
.home-section { padding-top: clamp(48px, 8vw, 96px); scroll-margin-top: 14px; }
.home-section :is(h1, h2) { margin: 0 0 16px; font: 700 clamp(1.65rem, 4vw, 2.65rem)/1.1 Cinzel, Georgia, serif; }
.home-guide, .home-results { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 245px), 1fr)); gap: 12px; }
.home-guide article, .home-entry { min-width: 0; padding: 18px; border: 1px solid #d99a5959; background: #211618; }
.home-guide h3, .home-entry h3 { margin: 6px 0 8px; font: 700 1.12rem Cinzel, Georgia, serif; }
.home-guide article > span { color: #efb773; font-size: 24px; }
.home-guide p, .home-entry p { margin: 6px 0; }
.home-filters { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 14px; max-width: 680px; }
.home-filters label { color: #e5c8a9; }
.home-filters :is(input, select) { display: block; margin-top: 5px; width: 100%; min-height: 44px; padding: 8px 10px; font-size: 16px; }
.home-entry summary { cursor: pointer; color: #efb773; margin-top: 10px; }
.home-entry ul { margin: 8px 0 0; padding-left: 18px; line-height: 1.5; }
#codexMore { margin-top: 14px; }
#login .login-wrap {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  align-items: start;
  gap: 14px;
  width: auto;
  max-width: none;
  max-height: none;
  overflow: visible;
  padding: 0;
  margin: 0;
}
#login :is(.login-box, .login-side) { width: 100%; min-width: 0; }
.home-footer { padding: 24px 0; margin-top: 36px; border-top: 1px solid #d99a5959; }
.register-terms { margin: 14px 0; line-height: 1.45; color: #e5c8a9; }
.register-terms a, .legal-page a { color: #f0ba6e; text-underline-offset: .2em; }
.register-terms .remember { align-items: flex-start; }
.register-terms .remember input { flex: none; margin-top: .25em; }
.legal-page { margin: 0; background: #140e10; color: #f4e6cf; font: 1rem/1.65 system-ui, sans-serif; }
.legal-page main { width: min(48rem, calc(100% - 2rem)); margin: 0 auto; padding: 2rem 0 4rem; }
.legal-page nav { padding-block: 1rem; border-block: 1px solid #d99a5959; }
.legal-page nav ol { columns: 2 18rem; column-gap: 2rem; margin: 0; padding-inline-start: 1.75rem; }
.legal-page nav li { break-inside: avoid; }
.legal-page h1 { font: 700 clamp(1.8rem, 5vw, 2.8rem)/1.15 Georgia, serif; }
.legal-page h2 { margin-top: 2rem; }
.legal-page h3 { margin-top: 1.5rem; }
.legal-page dt { color: #f0ba6e; font-weight: 700; margin-top: .75rem; }
.legal-page dd { margin-inline-start: 0; }
.legal-page li + li { margin-top: .5em; }
.legal-page :focus-visible, .register-terms :focus-visible { outline: 2px solid #f0ba6e; outline-offset: 3px; }
@media (max-width: 720px) {
  .home-hero, #login .login-wrap { grid-template-columns: minmax(0, 1fr); }
  .home-hero { gap: 24px; }
  .home-hero-art { width: min(100%, 440px); }
  .home-header nav { order: 1; flex-basis: 100%; }
}
@media (max-width: 400px) {
  .home-filters { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .home-header { gap: 10px; }
  .home-brand { font-size: 15px; }
}
#login .login-box { padding: clamp(15px, 3vw, 32px); background: #211618; }
.login-kicker { margin: 0 0 12px; }
#loginTabs { padding: 4px; gap: 4px; border: 1px solid #966a454f; background: #130e11; border-radius: 4px; }
#loginTabs .tab { min-height: 42px; padding: 6px; color: #dfc4a4; border: 1px solid transparent; border-radius: 3px; }
#loginTabs .tab.active { color: #f9dcac; background: #453025; border-color: #b27c48; }
.login-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.login-fields label, #login .remember { color: #e5c8a9; }
.login-fields input { min-height: 42px; padding: 8px 10px; font-size: 16px; }
#login :is(#btnLogin, #btnRegister) { min-height: 44px; background: #eab370; color: #231208; text-shadow: none; }
#login .create { display: block; }
.login-customization { display: grid; grid-template-columns: minmax(0, 1fr) minmax(108px, 30%); align-items: start; gap: 16px; }
#login .create .row { flex-wrap: wrap; }
.login-appearance { margin: 14px 0 10px; font: 700 .85rem Cinzel, Georgia, serif; color: #efb773; }
.login-preview { margin: 8px 0 0; text-align: center; color: #d5bfa7; }
#login #heroPreview { display: block; width: 100%; height: auto; margin-bottom: 6px; }
@media (max-width: 560px) {
  .login-customization { gap: 8px; grid-template-columns: minmax(0, 1fr) minmax(76px, 26%); }
}
@media (max-width: 420px) {
  .login-fields { grid-template-columns: minmax(0, 1fr); }
}

/* Entrada do novato em /play (html.novice): imagem do jogo, Visitante e nada mais até pedir a conta */
.novice-hero, #btnHaveAcc { display: none; }
.novice .novice-hero { display: block; margin-bottom: 14px; }
.novice-hero img { display: block; width: 100%; height: auto; aspect-ratio: 8 / 5; object-fit: cover; border: 1px solid #966a45; border-radius: 4px; background: #130e11; }
.novice-hero p { margin: 0; }
.novice-hero .novice-title { margin-top: 12px; font: 700 clamp(1.15rem, 3.4vw, 1.9rem)/1.2 Cinzel, Georgia, serif; color: #efb773; }
.novice-hero .novice-sub { margin-top: 4px; color: #e5c8a9; }
.novice #homeAccessTitle, .novice .login-kicker, .novice .guest-box .or, .novice :is(#loginTabs, #tabIn, #tabUp) { display: none; }
.novice #btnHaveAcc { display: block; width: 100%; margin-top: 12px; }
.novice .login-box:has(#tabAcc:not(.hidden)) #btnHaveAcc { display: none; }
.novice #loginErr:empty, .novice .home-header .home-button { display: none; }
@media (min-width: 721px) {
  .novice #acesso { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 0 20px; align-items: start; padding-top: 24px; }
  .novice #acesso .embed-link { grid-column: 1 / -1; }
  .novice #login .login-wrap, #login .novice-hero { min-width: 0; }
  .novice #login .login-wrap { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .novice .home-header nav { display: none; }
  .novice #acesso { padding-top: 14px; }
}

/* ------------------------------------------------------------ News (notas de atualização) */
.news-list { display: grid; gap: 24px; margin-top: 24px; }
.news-post {
  padding: clamp(16px, 3vw, 28px);
  border: 1px solid #e9bc7040;
  border-radius: 4px;
  background: #1a1112cc;
  scroll-margin-top: 14px;
}
.news-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-bottom: 12px; }
.news-head h2 { flex: 1 1 100%; order: 2; margin: 0; font: 700 clamp(1.3rem, 3vw, 1.8rem)/1.15 Cinzel, Georgia, serif; color: #efb773; }
.news-date { order: 1; color: #c9ad86; font-size: .9rem; }
.news-tag { order: 1; padding: 1px 8px; border: 1px solid #e4a65d; border-radius: 3px; color: #ffca88; font: 700 .72rem Cinzel, Georgia, serif; }
.news-summary { margin: 0 0 8px; line-height: 1.55; }
.news-post h3 { margin: 18px 0 6px; font: 700 1.05rem Cinzel, Georgia, serif; color: #f7d5a3; }
.news-post ul { margin: 0; padding-left: 1.2em; line-height: 1.55; }
.news-post li + li { margin-top: 6px; }
.news-note { margin: 18px 0 0; padding-top: 12px; border-top: 1px solid #e9bc7030; color: #c9ad86; font-style: italic; }
.news-empty { color: #c9ad86; }

/* ===== Modo embed (itch.io: /play?embed=itch) — só o seletor de idioma no topo, com link para o site ===== */
.embed-link { display: none; }
.embed .home-header { justify-content: flex-end; border-bottom: 0; }
.embed .home-header > :not(#homeLanguage) { display: none !important; }
.embed .embed-link { display: block; text-align: center; margin: -6px 0 16px; color: #f0ba6e; text-decoration: none; letter-spacing: .04em; }
.embed .embed-link:hover { text-decoration: underline; text-underline-offset: 4px; }
