/* The front page (index.html #home): shown to visitors who are not logged in; the game is hidden meanwhile. */
#home { display: none; }
html.home #home { display: flex; }
html.home #game, html.home #ui { display: none !important; }
/* the game's page locks scrolling and text selection; the front page is a normal page */
html.home, html.home body { height: auto; min-height: 100%; overflow: auto; overscroll-behavior: auto; touch-action: auto; }
html.home *, html.home *::before, html.home *::after { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
html.home body { background: linear-gradient(#cfeefc, #a8dcf7 40%, #8fd0f5); color: #1d3557; font-family: Lexend, system-ui, sans-serif; }

#home { gap: 22px; max-width: 1240px; margin: 0 auto; padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 24px max(16px, env(safe-area-inset-left)); box-sizing: border-box; align-items: flex-start; }
.h-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.h-hero { position: relative; margin: 0; border-radius: 22px; overflow: hidden; box-shadow: 0 8px 26px rgba(29, 53, 87, .25); aspect-ratio: 16 / 9; background: #7cc4ef; }
.h-hero img { display: block; width: 100%; height: 100%; object-fit: cover; }
.h-title { position: absolute; right: 4%; top: 14%; max-width: 52%; text-align: center; }
.h-title h1 { margin: 0; font-size: clamp(40px, 7.4vw, 96px); line-height: .95; font-weight: 800; color: #ffcf3a; letter-spacing: .01em;
  -webkit-text-stroke: 2px #8a4b00; paint-order: stroke fill; text-shadow: 0 5px 0 #8a4b00, 0 10px 18px rgba(0, 0, 0, .35); }
.h-title p { display: inline-block; margin: 14px 0 0; padding: 6px 16px; border-radius: 12px; background: #c98b4a; color: #fff; font-size: clamp(14px, 2vw, 22px); font-weight: 700;
  box-shadow: 0 3px 0 #8a5a2b, 0 6px 14px rgba(0, 0, 0, .25); }
.h-lead { margin: 0; font-size: 17px; line-height: 1.55; }

.h-play { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 62px; border: 0; border-radius: 18px; cursor: pointer;
  background: linear-gradient(#53c25f, #2fa84f); color: #fff; font: 800 22px/1 Lexend, system-ui, sans-serif; box-shadow: 0 4px 0 #1d7a36, 0 8px 18px rgba(47, 168, 79, .35); }
.h-play:active { transform: translateY(2px); box-shadow: 0 2px 0 #1d7a36; }
.h-actions { display: none; flex-direction: column; gap: 10px; }
.h-mini { display: flex; gap: 10px; padding: 10px; border-radius: 16px; background: #fff; box-shadow: 0 3px 10px rgba(29, 53, 87, .12); }
.h-mini > * { flex: 1; display: flex; align-items: center; justify-content: center; height: 46px; border-radius: 12px; font: 700 16px/1 Lexend, system-ui, sans-serif; text-decoration: none; cursor: pointer; }
.h-login-btn { border: 0; background: #ffc93c; color: #1d3557; box-shadow: 0 3px 0 #e0a800; }
.h-signup { border: 1.5px solid #1f6fb2; color: #1f6fb2; background: #fff; }

.h-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.h-card { border-radius: 18px; padding: 14px 16px; box-shadow: 0 3px 10px rgba(29, 53, 87, .1); }
.h-card summary { display: flex; align-items: center; gap: 12px; list-style: none; cursor: pointer; }
.h-card summary::-webkit-details-marker { display: none; }
.h-card summary span { flex: none; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 14px; background: rgba(255, 255, 255, .7); font-size: 32px; }
.h-card h2 { margin: 0; font-size: 21px; }
.h-card p { margin: 10px 0 0; font-size: 15px; line-height: 1.5; }
.c-fish { background: #e3f4fd; } .c-money { background: #fff4d6; } .c-adv { background: #e3f7e8; } .c-family { background: #ece8fb; }

.h-faq { padding: 14px 18px; border-radius: 18px; background: #fff; box-shadow: 0 3px 10px rgba(29, 53, 87, .1); }
.h-faq h2 { margin: 0 0 6px; color: #1f6fb2; font-size: 21px; }
.h-faq details { border-top: 1px solid #e3edf3; }
.h-faq summary { padding: 10px 0; font-size: 16px; cursor: pointer; }
.h-faq details p { margin: 0 0 12px; font-size: 15px; line-height: 1.5; color: #2c4760; }

.h-foot { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 13px; }
.h-foot nav { display: flex; gap: 14px; }
.h-foot nav a { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; color: #fff; text-decoration: none; font: 800 18px/1 system-ui; box-shadow: 0 2px 0 rgba(29, 53, 87, .25); }
.s-yt { background: #ff0000; } .s-ig { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285aeb 90%); } .s-fb { background: #1877f2; }
.h-foot p { margin: 0; color: #2c4760; } .h-foot p a { color: #0b6e7f; }

/* the login card: at the side on a computer */
.h-side { position: sticky; top: 16px; flex: none; width: 340px; }
.h-card-login { display: flex; flex-direction: column; gap: 12px; padding: 20px; border-radius: 22px; background: #fff; box-shadow: 0 8px 26px rgba(29, 53, 87, .2); }
.h-or { display: flex; align-items: center; gap: 10px; color: #2c4760; font-size: 14px; }
.h-or::before, .h-or::after { content: ''; flex: 1; height: 1px; background: #c9dce8; }
.h-sso[hidden] { display: none; }
.h-sso { display: flex; flex-direction: column; gap: 10px; }
.h-sso [data-buttons] { display: flex; flex-direction: column; gap: 10px; }
.h-sso [data-note] { margin: 0; padding: 8px 12px; border-radius: 10px; background: #fff4cf; border: 1.5px solid #e0a800; font-size: 13px; }
.sso-btn { font-family: inherit; width: 100%; display: flex; align-items: center; gap: 12px; height: 50px; box-sizing: border-box; padding: 0 16px; border-radius: 25px;
  border: 1.5px solid #8cc6e8; background: #fff; color: #1d3557; text-decoration: none; }
.sso-btn span { display: flex; flex-direction: column; line-height: 1.15; } .sso-btn b { font-size: 15px; font-weight: 600; } .sso-btn small { font-size: 11px; color: #5f778a; }
#li-form { display: flex; flex-direction: column; gap: 6px; }
#li-form label { font-size: 13px; font-weight: 500; }
#li-form input { height: 48px; box-sizing: border-box; padding: 0 14px; margin-bottom: 6px; border-radius: 12px; border: 1.5px solid #8cc6e8; color: #1d3557; font: 16px Lexend, system-ui, sans-serif; }
#li-error { margin: 0; padding: 8px 12px; border-radius: 10px; background: #fde8e6; border: 1.5px solid #d64545; color: #8a1c12; font-size: 13px; font-weight: 600; }
#li-error[hidden] { display: none; }
#li-go { height: 50px; border: 0; border-radius: 25px; font: 700 17px Lexend, system-ui, sans-serif; background: #d5e3ec; color: #5f778a; cursor: not-allowed; }
#li-go:not([disabled]) { background: #ffc93c; color: #1d3557; box-shadow: 0 3px 0 #e0a800; cursor: pointer; }
.h-new { margin: 0; text-align: center; font-size: 14px; } .h-new a { color: #0b6e7f; font-weight: 600; }
.h-small { margin: 0; text-align: center; font-size: 12px; color: #5f778a; }

/* on a phone or a narrow window: one column; Play now and the small Log in / Create account up top; the login card opens as a panel */
@media (max-width: 959px) {
  #home { flex-direction: column; gap: 14px; }
  .h-actions { display: flex; }
  .h-cards { grid-template-columns: 1fr; }
  .h-title { top: 8%; max-width: 60%; }
  .h-title p { margin-top: 8px; padding: 4px 10px; }
  .h-side { display: none; position: fixed; inset: 0; width: auto; z-index: 10; padding: max(16px, env(safe-area-inset-top)) 16px 16px; background: rgba(18, 50, 79, .55); overflow: auto; }
  html.home.login-open .h-side { display: block; }
  .h-card-login { max-width: 420px; margin: 0 auto; }
  .h-card-login .h-play { display: none; }
}
