/* ============================================================
   site-nav.css — unified fixed top-tab navigation + page shell
   Shared across all navigation-level pages of the collection site.
   ============================================================ */
:root {
  --sn-pink: #f472b6;
  --sn-purple: #a78bfa;
  --sn-ink: #202635;
  --sn-muted: #6b7183;
  --sn-line: rgba(244, 114, 182, 0.18);
  --sn-cream: #fff9f0;
}

/* ---------- fixed top tab bar (refined) ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  height: 68px;
  padding: 0 max(1rem, calc((100% - 1220px) / 2));
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  box-shadow: 0 6px 24px -14px rgba(120, 80, 130, 0.35);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}
/* gradient hairline at the very bottom */
.site-nav::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: linear-gradient(90deg, var(--sn-pink), var(--sn-purple) 45%, #5eead4 100%);
  opacity: 0.5;
}

.snav-brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--sn-ink); text-decoration: none; flex: none; }
.snav-mark {
  position: relative; width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: 0.92rem; letter-spacing: 0.04em;
  background: linear-gradient(135deg, var(--sn-pink), var(--sn-purple));
  box-shadow: 0 6px 14px -5px rgba(167, 139, 250, 0.7), inset 0 1px 0 rgba(255,255,255,0.5);
}
.snav-mark::after { content: ""; position: absolute; inset: 4px; border-radius: 10px; border: 1.5px solid rgba(255,255,255,0.35); }
.snav-brandtext b { display: block; font-size: 1.02rem; line-height: 1.05; letter-spacing: -0.01em; }
.snav-brandtext small { color: var(--sn-pink); font-size: 0.68rem; letter-spacing: 0.02em; }

.snav-tabs { flex: 1 1 auto; display: flex; align-items: center; gap: 0.15rem; overflow-x: auto; margin-left: 0.6rem; scrollbar-width: none; }
.snav-tabs::-webkit-scrollbar { display: none; }
.snav-tab {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.5rem 0.85rem; border-radius: 12px;
  color: var(--sn-muted); text-decoration: none; font-size: 0.93rem; font-weight: 600; white-space: nowrap;
  transition: background 0.2s, color 0.2s, transform 0.15s, box-shadow 0.2s;
}
.snav-tab .ic { display: inline-flex; }
.snav-tab .ic svg { width: 18px; height: 18px; display: block; }
.snav-tab:hover { background: #fdeef6; color: #d84f9a; transform: translateY(-1px); }
.snav-tab.active {
  color: #fff;
  background: linear-gradient(135deg, var(--sn-pink), var(--sn-purple));
  box-shadow: 0 8px 18px -7px rgba(216, 79, 154, 0.7);
}
.snav-tab .soon { font-size: 0.6rem; font-weight: 700; opacity: 0.85; padding: 0.05rem 0.3rem; border-radius: 6px; background: rgba(255,255,255,0.25); }

.snav-right { flex: none; margin-left: auto; display: inline-flex; align-items: center; gap: 0.5rem; }
.snav-lang {
  display: inline-flex; align-items: center; gap: 0.28rem;
  padding: 0.32rem 0.55rem 0.32rem 0.7rem; border-radius: 999px; border: 1px solid var(--sn-line);
  background: rgba(255,255,255,0.6); color: var(--sn-muted); font: inherit; font-size: 0.82rem; font-weight: 700;
  cursor: pointer; white-space: nowrap; transition: border-color 0.2s, color 0.2s, transform 0.15s;
}
.snav-lang:hover { border-color: var(--sn-pink); color: #d84f9a; transform: translateY(-1px); }
.snav-lang-globe { font-size: 0.95rem; line-height: 1; }
.snav-lang-select {
  border: 0; background: transparent; color: inherit; font: inherit; font-weight: 700;
  cursor: pointer; padding: 0 0.1rem; max-width: 8.5rem;
}
.snav-lang-select:focus { outline: none; }
.snav-login {
  display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.52rem 1.15rem; border-radius: 999px;
  background: linear-gradient(135deg, var(--sn-pink), var(--sn-purple)); color: #fff; font-weight: 700; text-decoration: none; font-size: 0.9rem;
  box-shadow: 0 8px 18px -8px rgba(167, 139, 250, 0.8); transition: transform 0.15s, box-shadow 0.2s, filter 0.2s;
}
.snav-login .ic svg { width: 17px; height: 17px; display: block; }
.snav-login:hover { transform: translateY(-1px); box-shadow: 0 12px 22px -8px rgba(167, 139, 250, 0.9); filter: brightness(1.04); }

.snav-user {
  display: inline-flex; align-items: center; gap: 0.55rem; text-decoration: none; color: var(--sn-ink);
  padding: 0.28rem 0.85rem 0.28rem 0.32rem; border: 1px solid var(--sn-line); border-radius: 999px;
  background: rgba(255,255,255,0.6); transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}
.snav-user:hover { transform: translateY(-1px); box-shadow: 0 8px 18px -10px rgba(120,80,130,0.5); }
.snav-user.active { border-color: var(--sn-pink); box-shadow: 0 0 0 2px rgba(244,114,182,0.18); }
.snav-ava {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--sn-pink), var(--sn-purple)); color: #fff; font-weight: 800; flex: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.5), 0 0 0 2px rgba(255,255,255,0.85);
}
.snav-uinfo { display: flex; flex-direction: column; gap: 1px; }
.snav-uinfo b { font-size: 0.85rem; line-height: 1.05; white-space: nowrap; }
.snav-coin { display: inline-flex; align-items: center; gap: 0.2rem; font-size: 0.72rem; font-weight: 800; color: #d98a13; line-height: 1; }
.snav-coin svg { width: 14px; height: 14px; display: block; }

@media (max-width: 860px) {
  .snav-brandtext { display: none; }
  .site-nav { gap: 0.5rem; height: 62px; }
  .snav-tab .lb { display: none; }
  .snav-tab { padding: 0.5rem 0.6rem; }
  .snav-tab.active .lb { display: inline; }
  .snav-uinfo { display: none; }
  .snav-login span:last-child { display: none; }
  .snav-login { padding: 0.5rem 0.7rem; }
}

.snav-pro {
  font-size: 0.66rem; font-weight: 800; letter-spacing: 0.04em; line-height: 1;
  padding: 0.22rem 0.42rem; border-radius: 999px; color: #fff; background: #c8923a;
}

/* ---------- global footer (PRD §5.2) ---------- */
.site-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.6rem 1.4rem;
  margin-top: 2.5rem; padding: 1.4rem max(1rem, calc((100% - 1220px) / 2)) 1.8rem;
  border-top: 1px solid #dce4d2; color: #56655b;
  font: 0.86rem/1.4 Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}
.sfoot-links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.1rem; }
.sfoot-links:empty { display: none; }
.sfoot-links a { color: #456752; text-decoration: none; font-weight: 600; }
.sfoot-links a:hover { text-decoration: underline; }
.sfoot-lang { display: inline-flex; align-items: center; gap: 0.3rem; }
.sfoot-lang-select { border: 1px solid #dce4d2; border-radius: 999px; background: #fff; color: inherit; font: inherit; padding: 0.2rem 0.5rem; }
.sfoot-copy { margin: 0; }

/* ---------- shared page shell (统一分页模板) ---------- */
.page-body {
  min-height: 100vh;
  margin: 0;
  color: var(--sn-ink);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  background:
    radial-gradient(circle at 12% 4%, rgba(244, 114, 182, 0.14), transparent 24rem),
    radial-gradient(circle at 88% 8%, rgba(94, 234, 212, 0.16), transparent 22rem),
    var(--sn-cream);
}
.page-wrap { max-width: 1220px; margin: 0 auto; padding: 2rem max(1rem, 4vw) 4rem; }
.page-head { margin-bottom: 1.8rem; }
.page-head .eyebrow { color: var(--sn-pink); font-weight: 700; letter-spacing: 0.08em; font-size: 0.8rem; text-transform: uppercase; }
.page-head h1 { margin: 0.3rem 0 0.5rem; font-size: clamp(1.6rem, 3.5vw, 2.3rem); }
.page-head p { margin: 0; color: var(--sn-muted); font-size: 1.02rem; line-height: 1.6; max-width: 60ch; }
.page-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.3rem; }
.page-section-title { margin: 2.2rem 0 1rem; font-size: 1.3rem; }
.page-foot { text-align: center; padding: 2.5rem 1rem 1rem; color: var(--sn-muted); font-size: 0.9rem; }
.page-foot a { color: var(--sn-pink); font-weight: 600; }

/* generic pastel card */
.uc-card { background: #fff; border: 1px solid var(--sn-line); border-radius: 22px; box-shadow: 0 12px 30px -18px rgba(60, 40, 70, 0.4); padding: 1.4rem; }

/* Mahjong Station shared identity. The product has two main destinations. */
.snav-brandtext b {font-family:Georgia,serif;color:#345447;font-size:20px;font-weight:500}
.snav-brandtext small{color:#82937c}.snav-mark{background:#648b72;box-shadow:none}
.snav-tab.active,.snav-login{background:#648b72;box-shadow:none}
.site-nav::after{background:#dce4d2}.snav-tab:hover{background:#edf1e6;color:#456752}
/* phones: icons only (the active tab keeps its label); the language picker
   lives in the footer and the first-visit hint, so the bar never overflows */
@media(max-width:600px){.site-nav{padding:0 10px;gap:5px}.snav-tabs{margin-left:0;min-width:0}.snav-tab{font-size:11px;padding:8px;white-space:nowrap}.snav-tab .lb{display:none}.snav-tab.active .lb{display:inline}.snav-tab .ic{display:inline-flex}.snav-mark{width:32px;height:36px}.snav-lang{display:none}.snav-login{padding:8px}}

/* ---------- first-visit language hint (i18n.js, I18N-01) ---------- */
.mh-lang-hint {
  display: flex; align-items: center; justify-content: center; gap: 0.8rem;
  padding: 0.5rem 1rem; background: #edf1e6; color: #345447; border-bottom: 1px solid #dce4d2;
  font: 600 0.9rem/1.3 Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}
.mh-lang-hint-go { color: #345447; text-decoration: underline; }
.mh-lang-hint-x { border: 0; background: transparent; color: inherit; font-size: 1.2rem; line-height: 1; cursor: pointer; padding: 0.2rem 0.4rem; }

/* ---------- consent banner + preferences (mh-consent.js, LEG-02) ---------- */
.sfoot-consent { all: unset; cursor: pointer; color: inherit; font: inherit; text-decoration: underline; text-underline-offset: 2px; }
.sfoot-consent:focus-visible { outline: 2px solid var(--sn-pink); outline-offset: 2px; }
.mh-consent {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 9000; max-width: 880px; margin: 0 auto;
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 14px 16px;
  background: #fff; color: var(--sn-ink); border: 1px solid var(--sn-line); border-radius: 14px;
  box-shadow: 0 10px 30px rgba(32, 38, 53, 0.18); font-size: 14px; line-height: 1.45;
}
.mh-consent-text { flex: 1 1 320px; margin: 0; }
.mh-consent-text a { color: #b83280; }
.mh-consent-btns { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.mh-consent-btn {
  min-height: 44px; padding: 0 16px; border-radius: 10px; border: 1px solid #c9ccd6; background: #fff;
  color: var(--sn-ink); font: inherit; font-weight: 700; cursor: pointer;
}
.mh-consent-btn.pri { background: #2f5d46; border-color: #2f5d46; color: #fff; }
.mh-consent-btn:focus-visible { outline: 3px solid var(--sn-pink); outline-offset: 2px; }
.mh-consent-dlg { position: fixed; inset: 0; z-index: 9100; display: grid; place-items: center; padding: 16px; background: rgba(20, 24, 34, 0.45); }
.mh-consent-card { width: min(480px, 100%); max-height: 90vh; overflow: auto; background: #fff; color: var(--sn-ink); border-radius: 16px; padding: 20px; box-shadow: 0 16px 40px rgba(0,0,0,0.25); }
.mh-consent-card h2 { margin: 0 0 10px; font-size: 18px; }
.mh-consent-note { margin: 0 0 10px; color: var(--sn-muted); font-size: 14px; }
.mh-consent-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid #eee; cursor: pointer; }
.mh-consent-row small { display: block; color: var(--sn-muted); font-size: 13px; margin-top: 2px; }
.mh-consent-row input { width: 22px; height: 22px; flex: none; accent-color: #2f5d46; }
.mh-consent-card .mh-consent-btns { margin-top: 14px; }
@media (max-width: 600px) { .mh-consent { left: 8px; right: 8px; bottom: 8px; } .mh-consent-btns { width: 100%; } .mh-consent-btn { flex: 1; } }

/* reserve the bar's height before site-nav.js swaps the mount in (no layout shift, ENG-07) */
#site-nav-mount { display: block; height: 68px; }
@media (max-width: 860px) { #site-nav-mount { height: 62px; } }

/* ---------- sign-in dialog (mh-login.js, ACC-08) ---------- */
.mhl-back { position: fixed; inset: 0; z-index: 9200; display: grid; place-items: center; padding: 16px; background: rgba(20, 28, 24, 0.5); overflow-y: auto; }
.mhl-card { position: relative; width: min(420px, 100%); background: #fff; color: #243029; border-radius: 18px; padding: 26px 24px 22px; box-shadow: 0 20px 60px rgba(0,0,0,0.25); font: 15px/1.45 Inter, system-ui, sans-serif; }
.mhl-inline .mhl-card, .mhl-card.inline { box-shadow: none; border: 1px solid #e3e7dc; }
.mhl-x { position: absolute; right: 10px; top: 8px; width: 40px; height: 40px; border: 0; background: none; font-size: 26px; color: #6b7a70; cursor: pointer; border-radius: 10px; }
.mhl-x:focus-visible, .mhl-card button:focus-visible, .mhl-card input:focus-visible { outline: 3px solid #d98ab1; outline-offset: 2px; }
.mhl-title { margin: 0 32px 4px 0; font: 600 21px/1.25 Georgia, serif; }
.mhl-sub { margin: 0 0 16px; color: #5f6d64; font-size: 14px; }
.mhl-google { margin-bottom: 12px; } .mhl-gbtn { display: flex; justify-content: center; min-height: 44px; }
.mhl-fine { margin: 8px 0 0; font-size: 12px; color: #6b7a70; text-align: center; }
.mhl-fine a, .mhl-check a { color: #2f5d46; }
.mhl-or { display: flex; align-items: center; gap: 10px; margin: 14px 0 4px; color: #6b7a70; font-size: 12px; }
.mhl-or::before, .mhl-or::after { content: ""; flex: 1; height: 1px; background: #e3e7dc; }
.mhl-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: #f1f3ec; border-radius: 12px; margin-bottom: 14px; }
.mhl-tabs button { min-height: 40px; border: 0; border-radius: 9px; background: transparent; font: inherit; font-weight: 600; color: #56655b; cursor: pointer; }
.mhl-tabs button[aria-selected="true"] { background: #fff; color: #243029; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.mhl-form { display: grid; gap: 12px; }
.mhl-form label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; color: #3d4a42; }
.mhl-form input[type=email], .mhl-form input[type=password], .mhl-form input[type=text] { font: inherit; font-weight: 400; min-height: 44px; padding: 0 12px; border: 1px solid #c9cfc4; border-radius: 10px; background: #fff; color: #243029; }
.mhl-check { grid-template-columns: 20px 1fr !important; align-items: start; font-weight: 400 !important; }
.mhl-check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: #2f5d46; }
.mhl-msg { margin: 0; min-height: 1.2em; font-size: 13px; color: #b3261e; } .mhl-msg.ok { color: #2f6b45; }
.mhl-btn { min-height: 46px; border: 0; border-radius: 12px; background: #2f5d46; color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.mhl-btn:disabled { opacity: 0.6; cursor: default; }
.mhl-link { justify-self: center; border: 0; background: none; color: #2f5d46; font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; min-height: 32px; }
.mh-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 9300; background: #243029; color: #fff; padding: 12px 18px; border-radius: 12px; font: 14px/1.4 Inter, system-ui, sans-serif; box-shadow: 0 8px 24px rgba(0,0,0,0.2); transition: opacity .3s; max-width: calc(100% - 32px); }
.mh-toast.out { opacity: 0; }
.mhl-card, .mhl-card *, .mhl-card *::before, .mhl-card *::after { box-sizing: border-box; }
.mhl-form input { width: 100%; }

/* ---------- partner cards (mh-affiliate.js, GRO-02 / LEG-04) ---------- */
.aff-disclosure { margin: 0 0 8px; font-size: 12px; color: #6b7a70; }
.aff-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.aff-card { display: grid; gap: 6px; align-content: start; padding: 12px; border-radius: 12px; border: 1px solid #e3e7dc; background: #fff; color: #243029; text-decoration: none; min-height: 44px; }
.aff-card img { width: 96px; height: 96px; object-fit: contain; }
.aff-card b { font-size: 14px; }
.aff-go { font-size: 12px; color: #2f5d46; font-weight: 600; }
.aff-card:focus-visible { outline: 3px solid #d98ab1; outline-offset: 2px; }
.aff-amazon { flex-basis: 100%; text-align: center; margin: 0; font-size: 12px; color: #56655b; }

/* ---------- site-wide announcement (config "banner", OPS-04) ---------- */
.mh-banner { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 8px 44px 8px 16px; background: #2f5d46; color: #fff; font: 600 13px/1.4 Inter, system-ui, sans-serif; position: relative; text-align: center; }
.mh-banner a { color: #fff; text-decoration: underline; }
.mh-banner button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: 0; background: transparent; color: #fff; font-size: 20px; cursor: pointer; border-radius: 8px; }
