:root {
  --bg: #14226b; --panel: #161f4a; --panel-border: #3d4a8f;
  --ink: #fffdf5; --muted: #c3cbf0; --gold: #ffd966; --gold-light: #fff0b3;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: linear-gradient(165deg, #060a30 0%, #0f1a4a 30%, #1c2060 60%, #241a4a 100%);
  color: var(--ink);
  font-family: -apple-system, 'Segoe UI', 'Trebuchet MS', system-ui, sans-serif;
  line-height: 1.6;
}
.site-header { border-bottom: 1px solid var(--panel-border); padding: 1rem 1.5rem; }
.header-inner { max-width: 900px; margin: 0 auto; display: flex; align-items: center; gap: 0.7rem; }
.logo { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; color: var(--ink); }
.logo-mark { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; border: 1.5px solid var(--gold); border-radius: 12px; font-size: 1.6rem; color: var(--gold-light); }
.logo-text { font-weight: 700; font-size: 1.5rem; }
.logo-sub { display: block; font-size: 0.8rem; color: var(--muted); font-weight: 400; }
.site-nav { text-align: center; padding: 0.7rem 1.5rem; border-bottom: 1px solid var(--panel-border); }
.site-nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.4rem 1.5rem; }
.site-nav a { color: var(--gold-light); text-decoration: none; font-weight: 600; font-size: 0.95rem; margin: 0; white-space: nowrap; }
@media (max-width: 520px) { .site-nav { gap: 0.3rem 1.1rem; padding: 0.65rem 0.75rem; } .site-nav a { font-size: 0.88rem; } }
.site-nav a.active { color: var(--ink); border-bottom: 2px solid var(--gold); padding-bottom: 4px; }
main { max-width: 900px; margin: 0 auto; padding: 2rem 1.5rem 3rem; }
h1 { font-size: 1.9rem; text-align: center; margin: 0 0 0.5rem; }
h2 { font-size: 1.3rem; color: var(--gold-light); margin: 2.2rem 0 0.8rem; }
.intro { text-align: center; color: var(--muted); max-width: 640px; margin: 0 auto 2rem; }
.card { background: var(--panel); border: 1px solid var(--panel-border); border-radius: 14px; padding: 1.3rem 1.4rem; margin-bottom: 1.2rem; }
.card h3 { margin: 0 0 0.3rem; font-size: 1.05rem; color: var(--gold-light); }
.muted { color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; }
.stat { text-align: center; }
.stat .big { font-size: 1.35rem; font-weight: 700; }
.stat .label { font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.moon-hero { text-align: center; }
.moon-hero .icon { font-size: 5rem; line-height: 1.1; }
.moon-hero .phase { font-size: 1.7rem; font-weight: 700; margin: 0.2rem 0; }
label { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 0.3rem; }
input[type=text], input[type=date], input[type=time], input[type=number], select {
  width: 100%; padding: 0.65rem 0.8rem; background: rgba(0,0,0,0.25); color: var(--ink);
  border: 1px solid var(--panel-border); border-radius: 10px; font-size: 1rem; font-family: inherit; color-scheme: dark;
}
input:focus, select:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.btn { background: linear-gradient(90deg, var(--gold), var(--gold-light)); color: #241a4a; border: none; border-radius: 999px; padding: 0.75rem 1.6rem; font-weight: 700; font-size: 1rem; font-family: inherit; cursor: pointer; }
.btn:hover { filter: brightness(1.06); }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.check { display: flex; align-items: center; gap: 0.5rem; margin: 0 0 1rem; color: var(--muted); font-size: 0.92rem; }
.check input { width: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
th, td { text-align: left; padding: 0.55rem 0.6rem; border-bottom: 1px solid var(--panel-border); }
th { color: var(--gold-light); font-weight: 600; }
.tablewrap { overflow-x: auto; }
.result-sign { font-size: 1.6rem; font-weight: 700; margin: 0; }
.result-sign .sym { color: var(--gold); margin-right: 0.3rem; }
.deg { font-size: 0.85rem; color: var(--muted); font-weight: 400; }
.note { font-size: 0.85rem; color: var(--muted); }
a { color: var(--gold-light); }
details { background: var(--panel); border: 1px solid var(--panel-border); border-radius: 12px; padding: 0.8rem 1.1rem; margin-bottom: 0.7rem; }
summary { cursor: pointer; font-weight: 600; }
details p { margin: 0.6rem 0 0; color: var(--muted); }
footer { text-align: center; padding: 1.5rem; color: var(--muted); font-size: 0.85rem; }
footer a { color: var(--muted); }
.cross-promo-widget { position: fixed; bottom: 20px; right: 20px; z-index: 999; }
.cross-promo-toggle { background: linear-gradient(90deg, var(--gold), var(--gold-light)); color: #241a4a; border: none; border-radius: 999px; padding: 0.7rem 1.15rem; font-weight: 700; font-size: 0.88rem; font-family: inherit; cursor: pointer; box-shadow: 0 6px 18px rgba(0,0,0,0.35); }
.cross-promo-panel { display: none; position: absolute; bottom: 58px; right: 0; background: var(--panel); border: 1px solid var(--panel-border); border-radius: 12px; padding: 1.1rem; width: 230px; box-shadow: 0 10px 30px rgba(0,0,0,0.4); }
.cross-promo-panel.open { display: block; }
.cross-promo-close { position: absolute; top: 8px; right: 10px; background: none; border: none; color: var(--muted); cursor: pointer; font-size: 1rem; padding: 0.2rem; }
.cross-promo-heading { font-weight: 700; margin: 0 0 0.7rem; color: var(--gold-light); font-size: 0.85rem; }
.cross-promo-link { display: block; padding: 0.6rem 0; color: var(--ink); text-decoration: none; border-top: 1px solid var(--panel-border); font-size: 0.92rem; font-weight: 700; }
.cross-promo-link:first-of-type { border-top: none; padding-top: 0; }
.cross-promo-sub { display: block; font-weight: 400; color: var(--muted); font-size: 0.8rem; margin-top: 0.15rem; }
@media (max-width: 480px) {
  .cross-promo-widget { bottom: 14px; right: 14px; }
  .cross-promo-toggle { padding: 0.6rem 0.9rem; font-size: 0.8rem; }
  .cross-promo-panel { width: 200px; }
  .moon-hero .icon { font-size: 4rem; }
}
