/* Reduce spacing between about_site_paragraph and username */
.member-user + .member-user {
  margin-bottom: 1.2rem !important;
  margin-top: -0.4rem !important;
}
/* Set the username font-family to Times New Roman only */
.member-user #memberName {
  font-family: 'Times New Roman', Times, serif !important;
  font-style: italic !important;
}
/* Make the username a little smaller */
.member-user #memberName {
  font-size: 0.92em !important;
  opacity: 0.92;
}

/* FINAL OVERRIDE: Force all member-user line text and children to white (except links) */
.member-user, .member-user *, .member-user *:not(a) {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

/* Force left/right alignment for slogans on very small screens */
@media (max-width: 600px) {
  .slogan-top {
    justify-content: flex-start !important;
  }
  .slogan-bottom {
    justify-content: flex-end !important;
  }
  .slogan-top h2 {
    text-align: left !important;
  }
  .slogan-bottom h2 {
    text-align: right !important;
  }
}
@media (min-width: 1000px) {
  .right-group {
    margin-top: -2.5em !important;
  }
}
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

*, *::before, *::after {
  box-sizing: inherit;
}

html {

  background: url("../../images/background.jpg") center/cover fixed no-repeat;
  background-size: cover;
}

:root {
  /* Palette and layout tokens to make future tweaks easier */
  --accent: #ffda6b;
  --accent-2: #ffc94d;
  --accent-strong: #ffecb3;
  --muted-accent: rgba(255,230,150,0.85);
  --card-bg: rgba(255,255,255,0.06);
  --card-border: rgba(255,215,100,0.12);
  --overlay: rgba(0,0,0,0.45);
  --text-on-accent: #000000;
  --control-radius: 8px;
  --btn-padding: 0 0.9rem;
}

body {
  background: transparent !important;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 0;
  pointer-events: none;
}

.page-wrapper {
  position: relative;
  z-index: 1;
}

.page-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 8%;
}
@media (min-width: 901px) {
  .page-wrapper {
    padding-top: 0.5rem;
  }
}

body.member-page .page-wrapper {
  flex-direction: column;
  justify-content: flex-start;
  gap: 0.6rem;
}

.top-section {
  width: 100%;
  max-width: 1200px;
  display: grid;
  grid-template-columns: 40% 60%;
  gap: 5rem;
  align-items: center;
  position: relative;
  align-items: center;
}
@media (min-width: 901px) {
  .top-section {
    row-gap: 1.2rem;
    column-gap: 5rem;
    align-items: flex-start;
  }
  .left-group {
    align-self: flex-start;
    margin-top: -6rem;
  }
  .right-group {
    align-self: flex-start;
    margin-top: 20rem;
  }
  .register-area {
    margin-top: 0.6rem !important;
  }
}

/* 901–1000px: keep register button centered */
@media (min-width: 901px) and (max-width: 1000px) {
  .mobile-action-bar {
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
  }
  .mobile-action-bar .register-area {
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    margin-left: 0 !important;
  }
  .mobile-action-bar .register-btn {
    margin: 0 auto !important;
  }
}
@media (max-width: 900px) {
  .top-section {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  /* Treat medium screens like the small-screen flow so the image stays
     above the login/register controls (prevents buttons appearing before image) */
  .top-section { display: flex; flex-direction: column; align-items: center; }
  .left-group, .right-group { display: contents; }
  .title-section { order: 0; width: 100%; }
  .main-image { order: 1; width: 100%; }
  .slogan-top { order: 2; width: 100%; margin-top: 1.4rem; }
  .slogan-bottom { order: 3; width: 100%; }
  .slogan-area { order: 4; width: 100%; }
  /* keep login after the right-group slogans/image on medium screens */
  .login-section { order: 4; width: 100%; }
  .register-area { order: 4; width: 100%; }

  /* Replace inline login with opener button on medium screens as well */
  .login-section { display: none !important; }
  .login-open-wrapper { display: block; order: 3; width: 100%; text-align: center; }
  .login-open-btn { display: inline-block; }
  /* Ensure the mobile action bar itself comes after the image */
  .mobile-action-bar { order: 5; width: 100%; display: flex; justify-content: center; }
  /* Medium screens: keep buttons compact and centered beneath the image */
  .mobile-action-bar { gap: 1rem; padding: 0 0.5rem; }
  .mobile-action-bar > * { width: auto !important; max-width: none !important; display: inline-block !important; margin: 0 !important; padding: 0 !important; }
  .mobile-action-bar .login-open-btn,
  .mobile-action-bar .register-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 44px !important;
    min-width: 170px !important;
    padding: 0 1rem !important;
    font-size: 1rem !important;
    border-radius: 10px !important;
    box-shadow: 0 6px 20px rgba(0,0,0,0.25) !important;
    margin: 0 !important;
  }

/* Make login button text blue (desktop, modal and small-screen opener) */
#loginBtn,
#modalLoginBtn,
.login-open-btn,
.mobile-action-bar .login-open-btn {
  color: hsl(195,76%,30%) !important; /* near register background, slightly lighter */
}
}

.left-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  min-width: 260px;
  text-align: center;
}

.right-group {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 0.6rem; /* reduced gap so slogans sit closer to the image on large screens */
  min-width: 300px;
  position: relative;
  padding-top: 1rem;
  margin-top: -2.5rem;
  --hh-image-width: 400px;
}

.title-section {
  position: relative;
  color: #f8e9b0;
  font-family: "Segoe UI", "Poppins", sans-serif;
  text-shadow: 0 0 10px rgba(255, 220, 130, 0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.6rem;
  margin: 0.2rem 0 0 0;
}

.title-section h1 {
  font-size: 3.9rem;
  margin: 0;
  letter-spacing: 1px;
  font-weight: 600;
  font-style: italic;
  color: var(--accent-strong);
  font-family: "Dancing Script", "Brush Script MT", cursive;
  order: 2;

  /* reduced shadow for improved legibility */
  text-shadow: 0 0 8px rgba(255, 230, 160, 0.9), 0 0 12px rgba(255, 210, 100, 0.45);
  animation: fadeInLeft 1.5s ease-in-out both;
}

.byline {
  margin-top: 0.25rem;
  margin-bottom: 0.1rem;
  font-size: 1.05rem;
  color: var(--accent-strong);
  font-family: "Orbitron", "Segoe UI", sans-serif;
  opacity: 0;
  animation: fadeInOnly 1.2s ease-in 1.4s forwards;
  text-align: center;
  white-space: nowrap;
  order: 1;
  text-shadow: 0 0 8px rgba(255, 230, 160, 0.9), 0 0 12px rgba(255, 210, 100, 0.45);
  position: fixed;
  left: 0;
  right: 0;
  bottom: 1.2rem;
  margin: 0;
  z-index: 5;
}

.byline a {
  color: #ffe793;
  text-decoration: none;
  transition: all 0.3s ease;
  text-shadow:
    0 0 10px rgba(255, 230, 160, 0.9),
    0 0 18px rgba(255, 210, 100, 0.6),
    0 0 28px rgba(255, 200, 90, 0.45);
  animation: bylinePulse 2.6s ease-in-out infinite;
}

.byline a:hover {
  color: hsl(190, 100%, 72%);
  text-shadow:
    0 0 10px rgba(90, 240, 255, 0.8),
    0 0 20px rgba(90, 240, 255, 0.4),
    0 0 30px rgba(255, 255, 200, 0.3);
}



.slogan-top, .slogan-bottom {
  width: 100%;
  display: flex;
  animation: fadeInOnly 1.3s ease-out 2.7s forwards;
}

.slogan-top {
  
  justify-content: flex-start !important;
  align-items: center !important;
}
.slogan-bottom {
  justify-content: flex-end !important;
  align-items: center !important;
}


.slogan-bottom {
  width: min(100%, var(--hh-image-width));
  justify-content: flex-end;
  align-items: center;
  padding-right: 10px;
}
.slogan-bottom h2 {
  width: 100%;
  text-align: right;

}

.slogan-top h2, .slogan-bottom h2 {
  font-family: "Dancing Script", "Brush Script MT", cursive;
  font-size: 3rem; /* larger on wide screens */
  font-style: italic;
  font-weight: 600;
  color: #ffecb3;
  letter-spacing: 1.1px;
  text-shadow:
    0 0 18px rgba(255, 230, 160, 0.9),
    0 0 30px rgba(255, 210, 100, 0.5);
  margin: 0;
  max-width: 90%;
  line-height: 1.2;
}
.slogan-top h2 {
  text-align: left !important;
}
.slogan-bottom h2 {
  text-align: right !important;
}

/* Use split slogans as the canonical source: apply combined styling to each split part
   and hide legacy .slogan-area (removed from visual flow). */
.slogan-area { display: none !important; }
.slogan-top, .slogan-bottom {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 0.5rem; /* tighter horizontal padding */
  opacity: 1;
  animation: fadeInOnly 1.3s ease-out 0.9s forwards;
}
.slogan-top h2, .slogan-bottom h2 {
  font-family: "Dancing Script", "Brush Script MT", cursive;
  font-size: 2.2rem;
  font-style: italic;
  font-weight: 600;
  color: #ffecb3;
  letter-spacing: 1.1px;
  text-shadow:
    0 0 18px rgba(255, 230, 160, 0.9),
    0 0 30px rgba(255, 210, 100, 0.5);
  margin: 0;
  text-align: center;
  max-width: 92%;
  line-height: 1.2;
}

@media (max-width: 900px) {
  .slogan-top h2, .slogan-bottom h2 { font-size: 2.2rem; }
}

@media (max-width: 600px) {
  .slogan-top h2, .slogan-bottom h2 { font-size: 1.6rem; }
}

/* Normalize mobile-action-bar button sizing and alignment for mid-size screens */
@media (min-width: 601px) and (max-width: 900px) {
  .mobile-action-bar {
    display: flex !important;
    justify-content: center !important;
    gap: 2.5rem !important;
    padding: 0.5rem 0.5rem !important;
    order: 5;
    width: 100%;
    margin-top: 3.8rem !important; /* add breathing room under the image */
  }

  .mobile-action-bar > * {
    width: auto !important;
    max-width: 220px !important;
    min-width: 110px !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    display: inline-flex !important;
  
  /* Strong override: force login-related button text to blue across all breakpoints */
  #loginBtn,
  #loginOpenBtn,
  #modalLoginBtn,
  .login-open-btn,
  .mobile-action-bar .login-open-btn {
    color: hsl(195,76%,30%) !important;
    -webkit-text-fill-color: hsl(195,76%,30%) !important; /* iOS/Safari */
  }
    vertical-align: middle !important;
    flex: 0 0 auto !important;
  }

  .mobile-action-bar .login-open-btn,
  .mobile-action-bar .register-btn {
    height: 44px !important;
    min-width: 200px !important;
    width: 200px !important;
    padding: 0 1.2rem !important;
    font-size: 1rem !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    border-radius: 10px !important;
  }

  /* Hard override for login opener size in this range */
  #loginOpenBtn {
    height: 44px !important;
    min-height: 44px !important;
    padding: 0 1.2rem !important;
    line-height: 44px !important;
  }

  /* Ensure login button height matches register */
  .mobile-action-bar .login-open-btn { height: 44px !important; }

  /* Remove any top margin the register button may inherit */
  .mobile-action-bar .register-btn { margin-top: 0 !important; }
}

/* Ensure split slogans preserve original formatting and center alignment */
.slogan-top, .slogan-bottom {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  width: 100% !important;
  padding: 0.1rem 0 !important; /* reduce vertical gap */
}
.slogan-top {
  justify-content: flex-start !important;
}
.slogan-bottom {
  justify-content: flex-end !important;
}
.slogan-top h2, .slogan-bottom h2 {
  font-family: "Dancing Script", "Brush Script MT", cursive !important;
  font-size: 3.4rem !important;
  font-style: italic !important;
  font-weight: 600 !important;
  color: #ffecb3 !important;
  letter-spacing: 1.1px !important;
  text-shadow: 0 0 18px rgba(255, 230, 160, 0.9), 0 0 30px rgba(255, 210, 100, 0.5) !important;
  margin: 0 !important;
  text-align: center !important;
  line-height: 1.2 !important;
}

@media (max-width: 900px) {
  .slogan-top h2, .slogan-bottom h2 { font-size: 2.6rem !important; }
}

@media (max-width: 600px) {
  .slogan-top h2, .slogan-bottom h2 { font-size: 2rem !important; }
}

@media (max-width: 900px) {
  .slogan-area h2 {
    font-size: 2.2rem;
  }
}

.login-section {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  opacity: 0;
  animation: fadeInUp 1.5s ease-in-out 0s forwards;
  margin-top: 2rem;
  margin-bottom: 4.5rem;
}

.login-box {
  width: 100%;
  max-width: 300px;
    margin-bottom: 0.6rem;
  border: 1px solid rgba(255, 215, 100, 0.3);
  border-radius: 12px;
  padding: 1.6rem 1.8rem;
  box-shadow: 0 0 20px rgba(255, 215, 100, 0.15);
  backdrop-filter: blur(6px);
}

/* Login opener button (hidden on wide screens, shown on small screens) */
.login-open-wrapper { display: none; }
.login-open-btn {
  display: inline-block;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: var(--text-on-accent);
  border: none;
  padding: 0.9rem 2.6rem;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(0,0,0,0.3);
  animation: loginPulse 2.8s ease-in-out infinite;
  filter: drop-shadow(0 0 6px rgba(255, 220, 130, 0.45)) drop-shadow(0 0 14px rgba(255, 200, 90, 0.35));
  will-change: filter;
}
.body-modal { display: none; align-items: center; justify-content: center; }
.body-modal .body-modal-content { max-width: 360px; }

.login-box h2 {
  font-size: 1.1rem;
  color: #ffecb3;
  margin-bottom: 2.5rem;
}

.login-box input {
  width: 100%;
  padding: 0.6rem 0.8rem;
  margin-bottom: 0.9rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 230, 150, 0.4);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.3s ease;
}

.login-box input:focus {
  border-color: #ffecb3;
  box-shadow: 0 0 10px rgba(255, 215, 100, 0.4);
}

.login-box button {
  width: 46%;
  height: 2.4rem;
  border: none;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: var(--text-on-accent);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0.8rem auto 0;
  animation: loginPulse 2.8s ease-in-out infinite;
  filter: drop-shadow(0 0 6px rgba(255, 220, 130, 0.45)) drop-shadow(0 0 14px rgba(255, 200, 90, 0.35));
  will-change: filter;
}

.login-box button:hover {
  background: linear-gradient(90deg, #ffe793, #ffdb70);
  box-shadow: 0 0 18px rgba(255, 215, 100, 0.6);
  transform: scale(1.03);
}

.hh-btn {
  height: 2.4rem;
  border: none;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: var(--text-on-accent);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 150px;
  padding: 0 0.9rem;
  margin-top: 2.5rem;
  filter: drop-shadow(0 0 6px rgba(255, 220, 130, 0.45)) drop-shadow(0 0 14px rgba(255, 200, 90, 0.35));
  will-change: filter;
}

#modalCloseBtn {
  animation: none !important;
  filter: none !important;
}

.hh-btn:hover {
  background: linear-gradient(90deg, #ffe793, #ffdb70);
  box-shadow: 0 0 18px rgba(255, 215, 100, 0.6);
  transform: scale(1.03);
}

.register-box label {
  display: grid;
  grid-template-columns: 34% 1fr;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.9rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid rgba(255,215,100,0.06);
}

.register-box label:last-of-type {
  border-bottom: none;
  margin-bottom: 0.4rem;
  padding-bottom: 0;
}

.register-box label span {
  display: inline-block;
  margin: 0;
  color: #ffecb3;
  font-weight: 600;
  justify-self: start;
}

@media (max-width: 600px) {
  .register-box label {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
  .register-box label span { margin-bottom: 0.35rem; }
}
.register-btn {
  background: hsl(195, 76%, 25%);
  color: #ffda6b;
  border: 2px solid #ffda6b;
  border-radius: 10px;
  padding: 0.9rem 2.6rem;
  font-size: 1.15rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 2rem;
  transition: all 0.25s ease;
  box-shadow:
    0 0 20px rgba(255, 215, 100, 0.6),
    0 0 50px rgba(255, 200, 60, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1;
  text-decoration: none;
}

.register-btn:hover {
  background: linear-gradient(90deg, hsl(195, 76%, 30%), hsl(195, 76%, 25%));
  color: #fff8dc;
  transform: scale(1.08);
  box-shadow:
    0 0 35px rgba(255, 230, 150, 0.9),
    0 0 80px rgba(255, 210, 80, 0.6),
    0 0 20px rgba(64, 180, 255, 0.4);
}

.register-box {
  width: 100%;
  max-width: 320px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 215, 100, 0.12);
  padding: 0.9rem;
  padding: 1.25rem;
  box-shadow: 0 0 12px rgba(0,0,0,0.25);
}

.register-box label {
  display: block;
  margin-bottom: 0.9rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid rgba(255,215,100,0.06);
}

.register-box label:last-of-type {
  padding: 0.35rem 0.5rem;
  margin-bottom: 0.4rem;
  padding-bottom: 0;
}

.register-box label span {
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
  color: #ffecb3;
  font-weight: 600;
}

.register-box input {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 230, 150, 0.18);
  background: rgba(255,255,255,0.04);
  color: #fff;
  font-size: 1rem;
  outline: none;
}

.register-box input:focus {
  border-color: #ffecb3;
  box-shadow: 0 0 10px rgba(255, 215, 100, 0.25);
}

.register-box form { display: block; }
.register-box label { width: 100%; }
.register-box input { display: block; box-sizing: border-box; }
.register-box .hh-btn { display: block; width: 100%; margin: 0.9rem 0 0; }

.main-image {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.5rem;
}

.main-image img {
  width: 400px;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow:
    0 0 30px rgba(255, 215, 100, 0.5),
    0 0 90px rgba(255, 180, 60, 0.25);
  animation: fadeIn 1.5s ease-in-out, glowPulse 6s cubic-bezier(0.6, 0, 0.4, 1) infinite;
  animation-delay: 0s, 1.5s;
  will-change: box-shadow, filter;
}

.body-map-section { margin-top: 1rem; text-align: center; }
.body-map { max-width: 420px; margin: 0.6rem auto; }
.body-map svg { width: 100%; height: auto; display: block; }
.body-map .hotspot { cursor: pointer; }
.body-modal { position: fixed; inset:0; display:none; align-items:center; justify-content:center; background: rgba(0,0,0,0.6); z-index: 2000; padding: 1rem; }
.body-modal-content { background: rgba(255,255,255,0.03); padding: 1rem; border-radius: 10px; max-width: 520px; width: 100%; color: #fff; box-shadow: 0 6px 30px rgba(0,0,0,0.6); }
.body-modal #bodyModalTitle { margin: 0 0 0.5rem 0; font-size: 1.1rem; }

@media (max-width: 900px) {
  .main-image img { width: 320px; }
  .right-group { --hh-image-width: 320px; }
}

@media (max-width: 600px) {
  .main-image img { width: 260px; }
  .right-group { --hh-image-width: 260px; }
}

@media (max-width: 700px) {
  .login-section {
    margin-top: 2.5rem;
    margin-bottom: 0.5rem;
  }
}

@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-120px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInOnly {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeIn {
  from { opacity: 0; filter: brightness(0.8); }
  to { opacity: 1; filter: brightness(1); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(25px); filter: brightness(0.9); }
  to { opacity: 1; transform: translateY(0); filter: brightness(1); }
}

@keyframes bylinePulse {
  0%, 100% {
    text-shadow:
      0 0 8px rgba(255, 230, 160, 0.8),
      0 0 14px rgba(255, 210, 100, 0.45),
      0 0 22px rgba(255, 200, 90, 0.3);
  }
  50% {
    text-shadow:
      0 0 12px rgba(255, 235, 175, 1),
      0 0 22px rgba(255, 215, 120, 0.75),
      0 0 34px rgba(255, 210, 110, 0.55);
  }
}

@keyframes loginPulse {
  0%, 100% {
    filter:
      drop-shadow(0 0 6px rgba(255, 220, 130, 0.45))
      drop-shadow(0 0 14px rgba(255, 200, 90, 0.35));
  }
  50% {
    filter:
      drop-shadow(0 0 10px rgba(255, 235, 175, 0.9))
      drop-shadow(0 0 22px rgba(255, 215, 120, 0.7))
      drop-shadow(0 0 36px rgba(255, 200, 90, 0.55));
  }
}

@media (prefers-reduced-motion: reduce) {
  .login-open-btn,
  .login-box button,
  .hh-btn,
  .byline a {
    animation: none !important;
  }
}

@keyframes popIn {
  0% { opacity: 0; transform: scale(0.6); }
  60% { opacity: 1; transform: scale(1.1); }
  100% { opacity: 1; transform: scale(1); }
}
@media (max-width: 900px) {
  .main-item .main-image,
  .main-item .twitch-frame {
    max-width: 260px;
    height: 150px;
  }

  .main-item:nth-of-type(1) {
    transform: scale(1.05);
  }
  .main-item:nth-of-type(1) .main-image,
  .main-item:nth-of-type(1) .twitch-frame {
    max-width: 280px;
    height: 160px;
  }
}
@media (max-width: 600px) {
  .main-item .main-image,
  .main-item .twitch-frame {
    max-width: 200px;
    height: 120px;
  }

  .main-item:nth-of-type(1) .main-image,
  .main-item:nth-of-type(1) .twitch-frame {
    max-width: 220px;
    height: 130px;
  }
}

@media (max-width: 900px) {
  :root { font-size: 16px; }
  .title-section h1 { font-size: 2.8rem; font-style: italic; }
  .slogan-area h2 { font-size: 1.95rem; }
  .top-section { grid-template-columns: 1fr; gap: 1rem; padding: 1rem; }
  .left-group, .right-group { padding: 0 0.5rem; }
  .right-group { margin-top: 0; }
  .login-box, .register-box { max-width: 360px; width: 100%; }
  .login-box button, .hh-btn { width: 100%; }

  .top-section { display: flex; flex-direction: column; align-items: center; }
  .left-group, .right-group { display: contents; }
  .title-section { order: 0; width: 100%; }
  /* Ensure top->image->bottom ordering on small screens */
  .slogan-top { order: 2; width: 100%; }
  /* add gap between byline (title-section) and top slogan */
  .slogan-top { margin-top: 1.4rem; }
  .main-image { order: 1; width: 100%; }
  .slogan-bottom { order: 3; width: 100%; }
  /* legacy combined area kept last (hidden) */
  .slogan-area { order: 4; width: 100%; }
  /* ensure the byline stacks below the title on narrow screens */
  .title-section { display: flex; flex-direction: column; align-items: center; }
  .title-section .byline { margin-top: 0.4rem; order: 2; }

  .title-section { margin-bottom: 0rem; }
  .main-image { margin-top: 0rem; }
  /* keep login after the right-group slogans/image on narrow screens */
  .login-section { order: 4; width: 100%; }
  .register-area { order: 4; width: 100%; }

  /* Replace inline login with opener button on narrow screens */
  .login-section { display: none !important; }
  .mobile-action-bar { display: contents !important; }
  .login-open-wrapper { display: block; order: 1; width: 100%; text-align: center; margin-top: 0.6rem; margin-bottom: 1.4rem; }
  .login-open-btn { display: inline-block; }
  /* Keep register at the bottom */
  .register-area { order: 6; width: 100%; display: flex; justify-content: center; margin-top: 2.4rem; }
  /* remove vertical gaps between slogans and image on small screens */
  .slogan-top { margin-bottom: 0; padding-bottom: 0; order: 2; }
  .main-image { margin: 0; padding: 0; }
  .slogan-bottom { margin-top: 0; padding-top: 0; order: 4; }

  .slogan-area { padding: 2px 0; margin: 4px 0 8px 0; }
  .main-image { padding: 2px 0; margin: 2px 0; }

  .page-wrapper { align-items: flex-start; padding-top: 2rem; padding-bottom: 1rem; }

  .slogan-area { margin-bottom: 1.6rem; }

  .login-section { margin-top: 2.4rem; margin-bottom: 1rem; }
  .register-area { margin-top: 2.4rem; }
}

/* 600–900px: bigger title and tighter slogan spacing */
@media (min-width: 600px) and (max-width: 900px) {
  .title-section h1 { font-size: 3.6rem !important; }
  .slogan-top { margin-top: 0.4rem !important; }
  .slogan-top { margin-bottom: 0.1rem !important; }
  .slogan-bottom { margin-top: 0.1rem !important; }
}

/* 900–1235px: keep title on one line */
@media (min-width: 900px) and (max-width: 1235px) {
  .title-section h1 {
    white-space: nowrap !important;
    font-size: 3.4rem !important;
  }
}

@media (max-width: 600px) {
  :root { font-size: 15px; }

  .title-section h1 { font-size: 2.6rem; font-style: italic; }
  .slogan-area h2 { font-size: 1.95rem; }
  .page-wrapper { padding: 0.8rem; align-items: flex-start; padding-top: 1.6rem; }
  .login-box, .register-box { padding: 0.7rem; border-radius: 10px; }

  .login-box input, .register-box input { padding: 0.5rem 0.6rem; font-size: 0.95rem; }
  .hh-btn { height: 2.6rem; font-size: 0.98rem; }
  .register-box label { padding-bottom: 0.35rem; }
  .main-image img { width: 240px; }

  .top-section { gap: 0.5rem; }
  .slogan-area { padding: 2px 0; margin: 2px 0 8px 0; }
  .main-image { padding: 1px 0; margin: 2px 0; }
  /* ensure slogans sit flush with image on very small screens */
  .slogan-top { margin-bottom: 0; padding-bottom: 0; }
  .main-image { margin: 0; padding: 0; }
  .slogan-bottom { margin-top: 0; padding-top: 0; }

  .slogan-area { margin-bottom: 1.4rem; }
  .login-section { margin-top: 2rem; margin-bottom: 1rem; }
  .register-area { margin-top: 2.8rem; }
  .login-box h2 { margin-bottom: 1rem; font-size: 1.05rem; }

  .login-box { max-width: 260px; padding: 0.6rem; }
  .login-box input { font-size: 0.95rem; padding: 0.45rem 0.6rem; }
  .login-box button {
    width: 56%;
    height: 3rem;
    font-size: 1.02rem;
    border-radius: 8px;
    margin: 0.8rem auto 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .register-area { margin-top: 1.8rem; }

  .title-section { display: flex; flex-direction: column; align-items: center; padding-top: 0.9rem; }
  .title-section .byline { white-space: normal; margin-top: 0.35rem; margin-bottom: 0.6rem; text-align: center; width: 100%; }

  .title-section h1 { margin-top: -1px !important; font-size: 3.2rem !important; font-style: italic !important; }
  .slogan-area h2 { font-size: 1.75rem; }
  .main-image img { width: 260px; }
  .title-section { margin-bottom: 0.8rem; }
  .main-image { margin-top: 0.4rem; padding: 0.2rem 0; }
}

@media (max-width: 480px) {
  .hh-btn { height: 3rem; font-size: 1.02rem; }
  .login-box input, .register-box input { padding: 0.75rem; }
  /* push register button further down on very small screens */
  .register-area { margin-top: 3.2rem; }
}

/* On larger screens ensure the register control is centered horizontally */
@media (min-width: 901px) {
  /* span the full viewport so the register button centers against the page, not its parent */
  .register-area {
    display: flex !important;
    justify-content: center !important;
    width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-top: -2rem !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
  }
  .register-area .register-btn {
    margin: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
}

/* Ensure the two title words stay on one line on smaller viewports */
@media (max-width: 600px) {
  .title-section h1 {
    white-space: nowrap;
    overflow: visible;
    font-size: 2.8rem !important;
    line-height: 1;
  }
}

@media (max-width: 480px) {
  .title-section h1 {
    white-space: nowrap;
    font-size: 2.4rem !important;
  }
}

.register-box {
  max-width: 380px !important;
  margin: 0 auto;
  text-align: center;
}

.register-box form { display:block; }
.register-box label {
  display: flex !important;
  flex-direction: column !important;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid rgba(255,215,100,0.06);
}

.register-box label:last-of-type { border-bottom: none; padding-bottom: 0; }
.register-box label span { display:block; margin:0; color:#ffecb3; font-weight:600; }
.register-box input { width: 100%; box-sizing: border-box; }
.register-box .hh-btn { display:block; width:100%; margin-top:0.9rem; }
.register-box p { text-align:center; margin-top:0.9rem; }

@media (max-width: 600px) {
  .register-box { padding-left: 1rem; padding-right: 1rem; }
}

/* Final small-screen ordering: login after byline, register at bottom (400–600px) */
@media (max-width: 600px) {
  .mobile-action-bar { display: contents !important; }
  .login-open-wrapper {
    order: 1 !important;
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    margin-top: 0.6rem !important;
    margin-bottom: 1.6rem !important;
  }
  .register-area {
    order: 6 !important;
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    margin-top: 2.6rem !important;
  }
  .main-image { order: 2 !important; }
  .slogan-top { order: 3 !important; }
  .slogan-bottom { order: 4 !important; }
}

/* Member box: increase spacing between items and enlarge text for readability */
.member-box {
  font-size: 1.5rem; /* slightly larger text */
  line-height: 1.5;     /* improve readability */
}
.member-box > * + * {
  margin-top: 0.5rem; /* spacing between consecutive items */
}
.member-box p {
  margin: 0; /* reset default p margins; spacing handled by sibling rule */
}
.member-box  {
  margin-top: 0.6rem; /* avoid large global hh-btn margin inside member box */
}

/* Member page specific adjustments */
.welcome.html .title-section,
.member-page .title-section,
body.member-page .title-section,
body.member-area .title-section,
body.member .title-section,
body.member-page .member-box,
.member-box {
  margin-top: 0.1rem;
  margin-bottom: 0.5rem;
}

body.member-page .top-section {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  max-width: 900px !important;
  gap: 1.6rem !important;
}

body.member-page .left-group {
  width: 100% !important;
  max-width: 820px !important;
  align-items: center !important;
  text-align: center !important;
  gap: 1.2rem !important;
}

body.member-page .member-box {
  width: 100% !important;
  max-width: 820px !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 215, 100, 0.18) !important;
  border-radius: 16px !important;
  padding: 1.4rem 1.6rem !important;
  box-shadow: 0 10px 26px rgba(0,0,0,0.35) !important;
}

body.member-page .member-box p:has(#memberLogout) {
  display: flex !important;
  justify-content: flex-start !important;
  margin-top: 0 !important;
  padding-top: 2rem !important;
}

@media (max-width: 600px) {
  body.member-page .member-box p:has(#memberLogout) {
    justify-content: center !important;
  }
}

body.member-page .member-box p,
body.member-page .member-box strong,
body.member-page .member-box span {
  color: var(--accent-strong) !important;
}

body.member-page .member-box p[data-i18n="about_site_paragraph"] {
  font-size: 2rem !important;
  letter-spacing: 0.2px !important;
  text-align: center !important;
  color: #ffffff !important;
  font-weight: 600 !important;
}

body.member-page .member-box p[data-i18n="about_site_paragraph_2"] {
  font-size: 1rem !important;
  letter-spacing: 0.2px !important;
  text-align: center !important;
  margin-top: 0.4rem !important;
}
body.member-page .member-box p[data-i18n="about_site_paragraph_1"] {
  font-size: 1rem !important;
  letter-spacing: 0.2px !important;
  text-align: center !important;
  margin-top: 0.4rem !important;
  margin-bottom: 2rem !important;
}

body.member-page .member-box p.member-note,
body.member-page .member-box p[data-i18n="about_site_paragraph_3"] {
  margin-top: 3rem !important;
  margin-bottom: 1rem !important;
  font-size: 1rem !important;
  letter-spacing: 0.2px !important;
  text-align: center !important;
}

body.member-page .member-box .main-button {
  margin-top: 0.5rem !important;
  margin-bottom: 2rem !important;
}

body.member-page .member-box p:has(a[href^="mailto:"]) {
  margin-top: 0.2rem !important;
  margin-bottom: 2.4rem !important;
  text-align: center !important;
}

body.member-page .member-box p:has(a[href^="mailto:"]) a {
  font-size: 1.08rem !important;
}

@media (max-width: 900px) {
  body.member-page .member-box p:has(a[href^="mailto:"]) a {
    font-size: 1rem !important;
  }
}

.member-box p[data-i18n="about_site_paragraph"] {
  display: block !important;
  margin-top: 0.6rem !important;
  margin-bottom: 0.6rem !important;
  line-height: 1.6 !important;
}

.member-box #memberLogout {
  height: 2.6rem !important;
  width: 150px !important;
  min-width: 150px !important;
  max-width: 150px !important;
  padding: 0 1.2rem !important;
  font-size: 1rem !important;
  margin-top: 0.4rem !important;
  display: inline-flex !important;
  justify-content: center !important;
}

.member-welcome {
  margin-top: 0.5rem;
  margin-bottom: 0.1rem;
  font-size: 2.5rem;
  color: var(--accent-strong);
  font-family: "Dancing Script", "Brush Script MT", cursive;
  font-style: italic;
  font-weight: 600;
  text-align: center;
  text-shadow: 0 0 8px rgba(255, 230, 160, 0.9), 0 0 12px rgba(255, 210, 100, 0.45);
}

.member-link {
  margin: 0;
  text-align: left;
  position: absolute;
  top: 1.25rem;
  left: 1.5rem;
  z-index: 2;
}

.member-link a {
  color: #ffe793;
  text-decoration: none;
  font-family: "Orbitron", "Segoe UI", sans-serif;
  letter-spacing: 0.4px;
  text-shadow:
    0 0 10px rgba(255, 230, 160, 0.9),
    0 0 18px rgba(255, 210, 100, 0.6),
    0 0 28px rgba(255, 200, 90, 0.45);
}

.member-user {
  margin: 0.05rem 0 0.25rem !important;
  font-family: inherit;
  font-size: 1.7rem !important;
  font-weight: 500;
  text-align: center;
  color: #ffffff !important;
  text-shadow: 0 0 8px rgba(255, 230, 160, 0.9), 0 0 12px rgba(255, 210, 100, 0.45);
  animation: bylinePulse 2.6s ease-in-out infinite;
}

.member-box .member-home-btn {
  height: 2.6rem !important;
  width: auto !important;
  min-width: 150px !important;
  max-width: none !important;
  padding: 0 1.2rem !important;
  font-size: 1rem !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  white-space: nowrap !important;
}

.member-page .title-section,
body.member-page .title-section,
body.member-area .title-section,
body.member .title-section {
  margin-bottom: 0.15rem !important;
}

body.member-page .title-section {
  width: 100%;
  text-align: center;
  pointer-events: none;
}

body.member-page .top-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding-top: 0.2rem;
  width: 100%;
}

body.member-page .member-link {
  position: static;
  text-align: center;
  margin-bottom: 0.2rem;
}

/* Align slogans to image edges: make slogan boxes match image width and
   align text left for top slogan and right for bottom slogan. Placed
   near the end to override earlier centering rules. */
.slogan-top h2 {
  width: 400px !important;
  max-width: 100% !important;
  text-align: center !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 0 !important;
}
.slogan-bottom h2 {
  width: 400px !important;
  max-width: 100% !important;
  text-align: center !important;
}

/* Increase separation between part1 and part2 */
.slogan-top { margin-bottom: 1.4rem !important; }
.slogan-bottom { margin-top: 0.4rem !important; }

@media (max-width: 900px) {
  .slogan-top h2, .slogan-bottom h2 { width: 320px !important; }
  .slogan-top { margin-bottom: 1.1rem !important; }
  .slogan-bottom { margin-top: 0.3rem !important; }
}

@media (max-width: 600px) {
  .slogan-top h2, .slogan-bottom h2 { width: 260px !important; }
  .slogan-top { margin-bottom: 0.9rem !important; }
  .slogan-bottom { margin-top: 0.2rem !important; }
}


@media (max-width: 600px) {
  .member-box { font-size: 1rem; }
}

/* Extra overrides for very small screens to remove residual gaps */
@media (max-width: 600px) {
  .main-image { margin-top: 0.2rem !important; padding-top: 0.2rem !important; }
  .slogan-top { margin-bottom: 0 !important; padding-bottom: 0 !important; }
  .slogan-bottom { margin-top: 0 !important; padding-top: 0 !important; }
  .right-group { gap: 0.25rem !important; }
  .title-section { margin-bottom: 0 !important; }
}

/* Mobile action bar: stack buttons vertically on very small screens */
@media (max-width: 600px) {
  /* Keep action bar in the normal flow and stack buttons */
  .mobile-action-bar {
    position: static !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.8rem !important;
    padding: 0 0.6rem;
    margin-top: 3rem !important;
    margin-bottom: 1.2rem !important; /* keep buttons clear of the viewport bottom */
    pointer-events: auto;
    flex-wrap: nowrap !important;
  }

  /* make wrappers full-width so buttons stack and center correctly */
  .mobile-action-bar > * {
    width: 100% !important;
    max-width: none !important;
    display: flex !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    vertical-align: middle !important;
    align-items: center !important;
    justify-content: center !important;
  }

  /* fixed-size buttons for very small screens (compact but readable) */
  .mobile-action-bar .login-open-btn,
  .mobile-action-bar .register-btn {
    width: 150px !important;
    min-width: 150px !important;
    height: 44px !important;
    padding: 0 0.6rem !important;
    font-size: 0.98rem !important;
    line-height: 1 !important;
    margin: 0 !important;
    border-radius: 10px !important;
    box-shadow: 0 6px 18px rgba(0,0,0,0.28) !important;
    text-align: center !important;
    vertical-align: middle !important;
  }

  .mobile-action-bar .register-btn { text-decoration: none !important; }

  /* ensure wrapper containers still center the stacked buttons when used */
  .mobile-action-bar .login-open-wrapper,
  .mobile-action-bar .register-area {
    display: flex !important;
    justify-content: center !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    order: 0 !important;
    transform: none !important;
  }

  /* Ensure modal and tiny-screen login opener keep expected visual styling */
  #modalLoginBtn,
  .login-open-btn,
  .hh-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: linear-gradient(90deg, var(--accent), var(--accent-2)) !important;
    color: hsl(195,76%,30%) !important;
    border: none !important;
    padding: 0.6rem 1rem !important;
    border-radius: 10px !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25) !important;
    font-weight: 700 !important;
    text-align: center !important;
  }
}

  /* Final global override: force login button text to blue for all viewports
     Placed at the end to win over any earlier rules */
  #loginBtn,
  #loginOpenBtn,
  #modalLoginBtn,
  .login-open-btn,
  .mobile-action-bar .login-open-btn,
  .login-box button,
  .hh-btn {
    color: #1e6ef1 !important;
    -webkit-text-fill-color: #1e6ef1 !important; /* iOS/Safari */
  }

/* Very small screens: stack buttons vertically and tighten spacing */
@media (max-width: 400px) {
  .mobile-action-bar {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.8rem !important;
  }

  /* Tighten title → image → slogans spacing on very small screens */
  .title-section {
    margin-bottom: 0.2rem !important;
  }
  .slogan-top {
    margin-top: 0.2rem !important;
  }
  .main-image {
    margin: 0 !important;
    padding: 0.1rem 0 !important;
  }

  .mobile-action-bar > * {
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
  }

  .login-open-wrapper {
    order: 1 !important;
    margin-top: 0.6rem !important;
    margin-bottom: 2.4rem !important;
  }

  .register-area {
    order: 6 !important;
    margin-top: 2.6rem !important;
  }

  .mobile-action-bar .login-open-btn,
  .mobile-action-bar .register-btn {
    width: 145px !important;
    min-width: 145px !important;
    height: 40px !important;
    padding: 0.45rem 0.5rem !important;
    font-size: 0.92rem !important;
    margin: 0.25rem 0 !important;
  }

  /* Reduce space between byline and following element on very small screens */
  .title-section .byline { margin-bottom: 0 !important; }

  /* Shrink main image slightly so slogans remain a bit outside its margins */
  .main-image img {
    transform: scale(0.8) !important;
    transform-origin: center center !important;
    transition: transform 160ms ease !important;
  }

  /* Minimal spacing between slogans and image */
  .slogan-top { margin-bottom: -0.5rem !important; padding-bottom: 0 !important; transform: translateY(0.3rem) !important; }
  .main-image { margin: 0 !important; padding: 0 !important; }
  .slogan-bottom { margin-top: -0.5rem !important; padding-top: 0 !important; transform: translateY(-0.3rem) !important; }
}

/* Override: slightly increase the main title on small screens for better legibility */
@media (max-width: 600px) {
  .title-section h1 {
    font-size: 2.9rem !important; /* a bit larger than existing rules */
    line-height: 1 !important;
    white-space: nowrap !important;
  }
}

@media (max-width: 480px) {
  .title-section h1 {
    font-size: 2.8rem !important; /* slightly reduce on very small screens */
  }
}

@media (max-width: 400px) {
  .title-section h1 {
    font-size: 2.6rem !important; /* fall back for the smallest viewports */
  }
  .slogan-top h2,
  .slogan-bottom h2 {
    width: 234px !important; /* align with scaled image width (260px * 0.9) */
  }
}

/* Final override: make hh_title larger on small screens */
@media (max-width: 600px) {
  .title-section h1 {
    font-size: 3.2rem !important;
  }
}
@media (max-width: 400px) {
  .title-section h1 {
    font-size: 2.9rem !important;
  }
}

/* Final tighten: reduce image → slogan part1 gap on very small screens */
@media (max-width: 400px) {
  .main-image { padding-bottom: 0 !important; }
  .slogan-top {
    margin-top: 0 !important;
    transform: none !important;
  }
  .mobile-action-bar {
    margin-top: 1.2rem !important;
  }
}

/* Final overrides: login after byline, register at bottom (small screens) */
.login-open-wrapper { display: none; }

@media (max-width: 900px) {
  .title-section {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    margin-top: 0 !important;
    padding-top: 0.2rem !important;
  }
  .title-section .byline {
    order: 1 !important;
    color: #1e6ef1 !important;
    -webkit-text-fill-color: #1e6ef1 !important;
    margin-top: 0.15rem !important;
  }
  .title-section h1 { order: 2 !important; }
  .title-section .login-open-wrapper {
    order: 3 !important;
    display: flex !important;
    justify-content: center !important;
    width: 100% !important;
    margin-top: 1.6rem !important;
    margin-bottom: 1.8rem !important;
  }
  .mobile-action-bar {
    order: 6 !important;
    display: flex !important;
    justify-content: center !important;
    width: 100% !important;
    margin-top: 2.4rem !important;
  }
  .register-area {
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
  }
}

/* === Consolidated layout breakpoints (large → mid → small → tiny) === */
/* Large screens: 1000px+ */
@media (min-width: 1000px) {
  .title-section { display: flex !important; flex-direction: column !important; align-items: center !important; }
  .title-section .byline {
    order: 1 !important;
    color: var(--accent-strong) !important;
    -webkit-text-fill-color: var(--accent-strong) !important;
  }
  .title-section h1 { order: 2 !important; }
  .login-open-wrapper { display: none !important; }
}

/* Mid screens: 600px–999px */
@media (min-width: 600px) and (max-width: 999px) {
  .title-section {
    margin-top: 0 !important;
    padding-top: 0.15rem !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
  }
  .title-section .byline {
    order: 1 !important;
    margin-top: 0.15rem !important;
    margin-bottom: 0.1rem !important;
    color: var(--accent-strong) !important;
    -webkit-text-fill-color: var(--accent-strong) !important;
  }
  .title-section h1 { order: 2 !important; }
  .title-section .login-open-wrapper {
    order: 3 !important;
    display: flex !important;
    justify-content: center !important;
    width: 100% !important;
    margin-top: 3.2rem !important;
    margin-bottom: 0.8rem !important;
  }
  .login-open-btn,
  .mobile-action-bar .login-open-btn {
    animation: loginPulse 2.8s ease-in-out infinite !important;
  }
  .slogan-top { margin-top: 0.6rem !important; }
  .login-open-btn,
  .title-section .login-open-btn,
  .mobile-action-bar .login-open-btn {
    height: 50px !important;
    min-width: 180px !important;
    width: 180px !important;
    font-size: 1.08rem !important;
  }
  .mobile-action-bar {
    display: flex !important;
    justify-content: center !important;
    width: 100% !important;
    margin-top: 2.4rem !important;
  }
  .register-area {
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
  }
  .login-open-btn,
  .login-open-wrapper .login-open-btn,
  .login-box button {
    animation: loginPulse 2.8s ease-in-out infinite !important;
  }
}

/* Small screens: 360px–599px */
@media (min-width: 360px) and (max-width: 599px) {
  .title-section {
    margin-top: 0 !important;
    padding-top: 0.1rem !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
  }
  .title-section .byline {
    order: 1 !important;
    margin-top: 0.1rem !important;
    margin-bottom: 0.1rem !important;
    color: var(--accent-strong) !important;
    -webkit-text-fill-color: var(--accent-strong) !important;
  }
  .title-section h1 { order: 2 !important; }
  .title-section .login-open-wrapper {
    order: 3 !important;
    display: flex !important;
    justify-content: center !important;
    width: 100% !important;
    margin-top: 2.2rem !important;
    margin-bottom: 1rem !important;
  }
  .slogan-top { margin-top: 0.6rem !important; }
  .mobile-action-bar {
    display: flex !important;
    justify-content: center !important;
    width: 100% !important;
    margin-top: 2.6rem !important;
  }
  .register-area {
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
  }
  .login-open-wrapper .login-open-btn {
    width: 130px !important;
    min-width: 130px !important;
    height: 44px !important;
  }
}

/* Tiny screens: under 360px */
@media (max-width: 359px) {
  .title-section {
    margin-top: 0 !important;
    padding-top: 0.05rem !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
  }
  .title-section .byline {
    order: 1 !important;
    margin-top: 0.1rem !important;
    margin-bottom: 0.1rem !important;
    color: var(--accent-strong) !important;
    -webkit-text-fill-color: var(--accent-strong) !important;
  }
  .title-section h1 { order: 2 !important; }
  .title-section .login-open-wrapper {
    order: 3 !important;
    display: flex !important;
    justify-content: center !important;
    width: 100% !important;
    margin-top: 2rem !important;
    margin-bottom: 0.9rem !important;
  }
  .slogan-top { margin-top: 0.5rem !important; }
  .mobile-action-bar {
    display: flex !important;
    justify-content: center !important;
    width: 100% !important;
    margin-top: 2.4rem !important;
  }
  .register-area {
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
  }
  .login-open-wrapper .login-open-btn {
    width: 124px !important;
    min-width: 124px !important;
    height: 40px !important;
    font-size: 0.92rem !important;
  }
}

/* Force hh-btn fixed width (override other width rules) */
.hh-btn,
.register-box .hh-btn {
  width: 150px !important;
  max-width: 150px !important;
}

/* Add more space between title and image on small/medium screens */
@media (max-width: 900px) {
  .title-section {
    margin-bottom: 1.4rem !important;
  }
  .main-image {
    margin-top: 1rem !important;
  }
}

/* Ensure login sits at the bottom above register on small/medium screens */
@media (max-width: 900px) {
  .mobile-action-bar {
    order: 99 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 1rem !important;
  }
  .mobile-action-bar .login-open-wrapper {
    order: 1 !important;
    margin: 0.8rem 0 0.2rem 0 !important;
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
  }
  .mobile-action-bar .register-area {
    order: 2 !important;
    margin: 0 !important;
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
  }
}

/* Final sizes: login 180px, register 160px */
.mobile-action-bar .login-open-btn {
  width: 155px !important;
  min-width: 155px !important;
}
.mobile-action-bar .register-btn {
  width: 155px !important;
  min-width: 155px !important;
}

/* Final override for very small screens: tighten title/image/slogan spacing */
@media (max-width: 400px) {
  .title-section { margin-bottom: 0.2rem !important; }
  .main-image { margin-top: 0 !important; padding: 0.1rem 0 !important; margin-bottom: 0}
  .slogan-top { margin-top: 0.2rem !important; }
  .slogan-bottom { margin-top: 0.1rem !important; padding-right: 1em !important;}
}

/* Final tighten: reduce image → slogan part1 gap on very small screens */
@media (max-width: 400px) {
  .main-image { padding-bottom: 0 !important; }
  .slogan-top { margin-top: -0.2rem !important; }
}

/* Very small screens: add more space between slogan parts */
@media (max-width: 400px) {
  .slogan-top { margin-bottom: 0rem !important; }
  .slogan-bottom { margin-top: 0rem !important; }
}

/* Final tweak: reduce space between slogan part2 and login button on very small screens */
@media (max-width: 400px) {
  .slogan-bottom { margin-bottom: 0rem !important; }
  .mobile-action-bar { margin-top: 0.2rem !important; gap: 0.9rem !important; }
}

/* Final: 600–900px tighter spacing between slogan parts */
@media (min-width: 600px) and (max-width: 900px) {
  .slogan-top { margin-bottom: 0rem !important; padding-bottom: 0 !important; transform: none !important; }
  .slogan-bottom { margin-top: 0rem !important; padding-top: 0 !important; transform: none !important; }
  .slogan-top, .slogan-bottom { padding: 0.05rem 0 !important; }
}

/* Final override: large screens left up, right far down */
@media (min-width: 901px) {
  .page-wrapper {
    align-items: center !important;
    padding-top: 2rem !important;
  }
  .top-section { align-items: center !important; margin-top: 0 !important; }
  .left-group { margin-top: -2rem !important; }
  .right-group { margin-top: 0.6rem !important; }
}

/* Large screens: show image before slogan part1 */
@media (min-width: 901px) {
  .right-group { display: flex; flex-direction: column; }
  .main-image { order: 1; }
  .slogan-top { order: 2; }
  .slogan-bottom { order: 3; }
}

/* Large screens: tighter spacing between slogan parts */
@media (min-width: 901px) {
  .slogan-top { margin-bottom: 0rem !important; padding-bottom: 0 !important; }
  .slogan-bottom { margin-top: 0rem !important; padding-top: 0 !important; }
  .slogan-top, .slogan-bottom { padding: 0.05rem 0 !important; }
  .slogan-top h2, .slogan-bottom h2 { font-size: 2.8rem !important; }
  .slogan-top, .slogan-bottom, .main-image img, .register-area { opacity: 0; }
  .slogan-top, .slogan-bottom { animation: fadeInOnly 1.5s ease-in-out 0.2s forwards !important; }
  .main-image img { animation: fadeIn 1.5s ease-in-out 0.2s forwards !important; }
  .register-area { animation: fadeInOnly 1.5s ease-in-out 0.2s forwards !important; }
}

/* Final: force left column higher on large screens */
@media (min-width: 901px) {
  .left-group { margin-top: -3.5rem !important; }
}

/* Final tighten: reduce image → slogan part1 gap further on very small screens */
@media (max-width: 400px) {
  .main-image { padding-bottom: 0 !important; }
  .slogan-top {
    margin-top: -0.4rem !important;
    padding-top: 0 !important;
  }
}

.main-image img {
  width: 100%;

  height: auto;
  display: block;
  margin-left: auto;
  margin-right: auto;
  background: none;
  
}
/* === FORCE REMOVE BOX, GLOW, BACKGROUND FROM MAIN-IMAGE (OVERRIDE ALL) === */
.main-image,
.main-image img {
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: none !important;
  background-image: none !important;
  background-color: transparent !important;
  outline: none !important;
  filter: none !important;
  padding: 0 !important;
  margin: 0 auto !important;
  transition: none !important;
  box-sizing: content-box !important;
  margin-top: -50px;
  margin-bottom: -40px;
  width: 100%;
}

@media (max-width: 600px) {
.slogan-top {
  margin-top: -2em !important;
  padding-left: 1.5em !important;
  margin-bottom: 3em;
}
.slogan-bottom {
  margin-bottom: 2.5em !important;
  padding-right: 2.5em;
}
.slogan-top h2, .slogan-bottom h2 {
  font-size: 1.5rem !important;
}

  .title-section {
    margin-bottom: -2em !important;
  }
}
/* Reduce space between title and image */
.title-section {
  margin-bottom: -30px !important;
  margin-top: 30px;
}
.main-image {
  margin-top: -20px;
}

/* Force left/right alignment for slogans on very small screens */
@media (max-width: 360px) {
  .slogan-top {
    justify-content: flex-start !important;
  }
  .slogan-bottom {
    justify-content: flex-end !important;
  }
  .slogan-top h2 {
    text-align: left !important;
  }
  .slogan-bottom h2 {
    text-align: right !important;
  }
}
@media (max-width: 600px) {
  .title-section {
    margin-bottom: 2.5rem !important;
    margin-top: 1.5rem !important;
  }
  .register-box {
    margin-top: 3.5rem !important;
  }
}

@media (max-width: 360px) {
  .title-section {
    margin-bottom: 1rem !important;
    margin-top: -0.5rem !important;
  }
  .register-box {
    margin-top: 0rem !important;
  }
}
body.index-page .title-section {
  margin-top: 1.5rem !important;
}
body.index-page .main-image {
  margin-top: -3.5rem !important;
}

@media (max-width: 400px) {
  body.index-page .mobile-action-bar {
    margin-top: -0.4rem !important;
  }
}
@media (max-width: 400px) {
  #loginModal.body-modal {
    align-items: flex-start !important;
    padding-top: 1.2rem !important;
  }
}
body.member-page .member-box p[data-i18n="about_site_paragraph_2"] {
  margin-top: 1.2rem !important;
  margin-bottom: 0rem !important;
}
body.member-page .member-box p[data-i18n="about_site_paragraph_3"] {
  margin-top: 2rem !important;
  margin-bottom: 1rem !important;
}

/* Align top slogan with image left edge on index page */
body.index-page .right-group .slogan-top {
  width: var(--hh-image-width, 400px);
  align-self: center;
  display: flex;
  justify-content: flex-start !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}
body.index-page .right-group .slogan-top h2 {
  width: 100%;
  text-align: left !important;
  max-width: 100% !important;
  padding-left: 5px !important;
}
body.index-page .right-group .slogan-bottom {
  width: var(--hh-image-width, 400px);
  align-self: center;
  display: flex;
  justify-content: flex-end !important;
  padding-left: 0 !important;
  padding-right: 40px !important;
}
body.index-page .right-group .slogan-bottom h2 {
  width: 100%;
  text-align: right !important;
  max-width: 100% !important;
}
