/* Sky Observers' Association (Hong Kong) — mobile homepage preview */

:root {
  --burgundy: #900;
  --burgundy-deep: #6b0000;
  --burgundy-soft: #a31a1a;
  --gold: #ffe566;
  --gold-deep: #e6c84a;
  --ink: #2b1717;
  --ink-soft: #5c3d3d;
  --muted: #7a5c5c;
  --paper: #f6f1ea;
  --card: #ffffff;
  --line: #e8dcd2;
  --header: #141414;
  --header-text: #fff8e7;
  --shadow: 0 8px 24px rgba(80, 20, 20, 0.08);
  --radius: 14px;
  --tap: 44px;
  --content: 26rem;
  --header-h: 3.65rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: "Noto Sans CJK HK", "Noto Sans CJK TC", "PingFang HK", "PingFang TC",
    "Hiragino Sans CNS", "Microsoft JhengHei", "Noto Sans", "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--burgundy);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--burgundy-soft);
}

a:focus-visible,
.nav-toggle:focus-visible {
  outline: 3px solid var(--gold-deep);
  outline-offset: 2px;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  min-height: var(--header-h);
  padding: 0.35rem 0.7rem 0.35rem 0.65rem;
  padding-top: calc(0.35rem + env(safe-area-inset-top, 0px));
  background: var(--header);
  color: var(--header-text);
  box-shadow: 0 1px 0 rgba(255, 229, 102, 0.35);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  flex: 1;
  color: inherit;
  text-decoration: none;
}

.brand:hover {
  color: inherit;
}

.brand-mark {
  width: 2.55rem;
  height: 2.55rem;
  object-fit: cover;
  object-position: center;
  border-radius: 0.45rem;
  background: #1a1a1a;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.15;
}

.brand-zh {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.brand-en {
  margin-top: 0.12rem;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #d9c47a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-toggle-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: var(--tap);
  height: var(--tap);
  margin-left: auto;
  border-radius: 8px;
  cursor: pointer;
  flex-shrink: 0;
}

.nav-toggle-bar {
  display: block;
  width: 1.35rem;
  height: 2px;
  background: var(--gold);
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle-input:checked + .nav-toggle .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle-input:checked + .nav-toggle .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle-input:checked + .nav-toggle .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.site-nav {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: #1d1d1d;
  border-top: 1px solid rgba(255, 229, 102, 0.28);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.35);
  transform-origin: top;
  visibility: hidden;
  opacity: 0;
  transform: translateY(-0.4rem);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}

.nav-toggle-input:checked ~ .site-nav {
  visibility: visible;
  opacity: 1;
  transform: none;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0.4rem 0.5rem 0.7rem;
}

.site-nav a {
  display: flex;
  align-items: center;
  min-height: 3rem;
  padding: 0 0.9rem;
  color: #fff8e7;
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  border-radius: 8px;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--gold);
  background: rgba(153, 0, 0, 0.45);
}

.nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  top: var(--header-h);
  background: rgba(0, 0, 0, 0.4);
  z-index: -1;
}

.nav-toggle-input:checked ~ .nav-backdrop {
  display: block;
}

/* Main */

main {
  max-width: var(--content);
  margin: 0 auto;
  padding: 0 0 2rem;
}

.section {
  padding: 0 0 0.25rem;
}

.section-title {
  margin: 0 0 0.9rem;
  padding: 0.55rem 1rem;
  background: var(--burgundy);
  color: var(--gold);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  line-height: 1.4;
  text-align: center;
}

.subhead {
  margin: 1.35rem 1rem 0.65rem;
  color: var(--burgundy-deep);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

/* Events */

.event {
  margin: 0 1rem 0.75rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.event--featured {
  margin-top: 0.15rem;
}

.event-visual {
  display: block;
  background: #1a1018;
}

.event-visual img {
  width: 100%;
  height: auto;
  aspect-ratio: 1200 / 590;
  object-fit: cover;
}

.event-body {
  padding: 0.85rem 1rem 1rem;
}

.event-date {
  margin: 0 0 0.25rem;
  color: var(--burgundy);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.event-title {
  margin: 0 0 0.4rem;
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.4;
}

.event-title a {
  color: var(--ink);
  text-decoration: none;
}

.event-title a:hover {
  color: var(--burgundy);
  text-decoration: underline;
}

.event-summary {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.98rem;
}

.event-action {
  margin: 0.7rem 0 0;
}

.text-link {
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}

.text-link:hover {
  color: var(--burgundy-soft);
}

.more-link-wrap {
  margin: 0.9rem 1rem 1.4rem;
  text-align: center;
}

/* Address */

.card {
  margin: 0 1rem 1.4rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.address-text {
  padding: 1rem 1rem 0.35rem;
}

.address-zh {
  margin: 0 0 0.35rem;
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.45;
}

.address-en {
  margin: 0 0 0.75rem;
  color: var(--ink-soft);
  font-size: 0.86rem;
  line-height: 1.45;
}

.address-phone,
.address-walk {
  margin: 0 0 0.7rem;
  font-size: 0.98rem;
}

.address-phone {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.15rem 0.85rem;
}

.address-phone a,
.address-walk a {
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}

.nowrap {
  white-space: nowrap;
}

.link-sep {
  margin: 0 0.35rem;
  color: var(--muted);
}

.badge {
  display: inline-block;
  margin-right: 0.45rem;
  padding: 0.08rem 0.5rem 0.1rem;
  background: var(--burgundy);
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1.4;
  border-radius: 999px;
  vertical-align: 0.08em;
}

.map-thumb {
  display: block;
  margin: 0.15rem 1rem 0.9rem;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.map-thumb img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: 60% 50%;
}

.address-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  padding: 0 1rem 1rem;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  padding: 0.45rem 0.55rem;
  border-radius: 999px;
  text-align: center;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.25;
}

.btn-primary {
  background: var(--burgundy);
  color: var(--gold);
}

.btn-primary:hover {
  background: var(--burgundy-deep);
  color: var(--gold);
}

.btn-secondary {
  background: #fff;
  color: var(--burgundy);
  border: 1.5px solid var(--burgundy);
}

.btn-secondary:hover {
  background: #f8efe4;
  color: var(--burgundy-deep);
}

/* About */

.about-card {
  padding: 1rem 1rem 1.15rem;
}

.about-card p {
  margin: 0 0 0.8rem;
}

.about-card p:last-child {
  margin-bottom: 0;
}

.about-links {
  margin-top: 1rem;
}

/* Footer */

.site-footer {
  max-width: var(--content);
  margin: 0 auto;
  padding: 1.1rem 1.2rem 1.8rem;
  padding-bottom: calc(1.8rem + env(safe-area-inset-bottom, 0px));
  color: var(--muted);
  text-align: center;
  font-size: 0.78rem;
  line-height: 1.5;
}

.footer-name {
  margin: 0 0 0.2rem;
  color: var(--burgundy-deep);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.footer-copy,
.footer-note {
  margin: 0 0 0.25rem;
}

.footer-note {
  color: #9a8080;
}

.footer-note a {
  color: #9a8080;
  text-decoration: none;
  font-weight: 600;
}

.footer-note a:hover,
.footer-note a:focus {
  color: var(--burgundy);
  text-decoration: underline;
}

/* Wider phones still stay single-column and centered */
@media (min-width: 480px) {
  body {
    font-size: 1.075rem;
  }
}

@media (min-width: 700px) {
  body {
    background: #efe7dd;
  }
}

/* Inner pages (/m/) */

.page-head {
  padding: 1.15rem 1.15rem 0.35rem;
}

.page-kicker {
  margin: 0 0 0.25rem;
  color: var(--burgundy);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.page-title {
  margin: 0;
  color: #8a6a10;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.3;
}

.page-lead {
  margin: 0.55rem 0 0;
  color: var(--ink-soft);
}

.page-lead.en,
.en {
  color: var(--muted);
  font-size: 0.95em;
}

.toc,
.year-nav,
.jump-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.2rem 1.15rem 0.9rem;
}

.toc a,
.year-nav a,
.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.2rem;
  padding: 0.25rem 0.7rem;
  border: 1.5px solid var(--burgundy);
  border-radius: 999px;
  background: #fff;
  color: var(--burgundy);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.2;
}

.toc a:hover,
.year-nav a:hover,
.chip:hover {
  background: #f8efe4;
  color: var(--burgundy-deep);
}

.prose,
.card.prose {
  padding: 1rem 1rem 1.15rem;
}

.prose p,
.prose li {
  margin: 0 0 0.75rem;
}

.prose p:last-child,
.prose li:last-child {
  margin-bottom: 0;
}

.prose ul,
.prose ol {
  margin: 0.2rem 0 0.8rem;
  padding-left: 1.2rem;
}

.section-title.sub {
  font-size: 1.15rem;
}

.contact-list {
  margin: 0;
  padding: 0.2rem 0 0;
}

.contact-list div {
  display: grid;
  gap: 0.1rem;
  padding: 0.7rem 0;
  border-top: 1px solid var(--line);
}

.contact-list div:first-child {
  border-top: 0;
  padding-top: 0.2rem;
}

.contact-list dt {
  color: var(--burgundy);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.contact-list dd {
  margin: 0;
}

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  position: relative;
  margin: 0 0 0.7rem;
  padding: 0.75rem 0.85rem 0.75rem 2.7rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffaf4;
}

.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0.7rem;
  top: 0.8rem;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--burgundy);
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 800;
  text-align: center;
  line-height: 1.5rem;
}

.fee-list {
  margin: 0.4rem 0 0.8rem;
  padding: 0;
  list-style: none;
}

.fee-list li {
  display: grid;
  gap: 0.15rem;
  margin: 0 0 0.55rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.fee-name {
  font-weight: 700;
  color: var(--burgundy-deep);
}

.fee-amt {
  font-weight: 800;
}

.roster {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.roster th,
.roster td {
  padding: 0.7rem 0.85rem;
  text-align: left;
  vertical-align: top;
}

.roster th {
  width: 38%;
  background: var(--burgundy);
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.roster tr:nth-child(even) td {
  background: #fffaf4;
}

.roster tr + tr th,
.roster tr + tr td {
  border-top: 1px solid var(--line);
}

.roster tr + tr th {
  border-top-color: rgba(255, 229, 102, 0.35);
}

.link-group {
  margin: 0 0 1rem;
}

.link-group h2 {
  margin: 0 0 0.45rem;
  color: #8a6a10;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.link-group ul,
.plain-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.link-group li,
.plain-list li {
  border-top: 1px solid var(--line);
}

.link-group a,
.resource-link,
.plain-list a {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: var(--tap);
  padding: 0.55rem 0.1rem;
  text-decoration: none;
  font-weight: 700;
  line-height: 1.35;
}

.link-group a:hover,
.resource-link:hover,
.plain-list a:hover {
  color: var(--burgundy-deep);
}

.link-extra,
.meta {
  display: block;
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 500;
}

.product {
  margin: 0 0 0.75rem;
  padding: 0.9rem 1rem 1rem;
}

.product h3 {
  margin: 0 0 0.4rem;
  color: var(--burgundy-deep);
  font-size: 1.02rem;
}

.product-price {
  margin: 0.5rem 0 0;
  font-weight: 800;
}

.software h3 {
  margin: 0 0 0.35rem;
  font-size: 1.02rem;
}

.logo-block {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
}

.logo-block img {
  width: 4.2rem;
  height: auto;
  flex-shrink: 0;
  border: 4px solid var(--burgundy);
  background: #111;
}

.map-full {
  display: block;
  margin: 0.15rem 0 0.9rem;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
}

.map-full img {
  width: 100%;
  height: auto;
}

.site-nav a[aria-current="page"] {
  color: var(--gold);
}

.footer-nav {
  margin: 0.85rem 0 0;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
  text-align: left;
}

.footer-nav-title {
  margin: 0 0 0.35rem;
  color: var(--burgundy-deep);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-align: center;
}

.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.15rem 0.55rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.8;
}

.footer-nav a:hover {
  color: var(--burgundy);
  text-decoration: underline;
}

.muted-note {
  margin: 0.4rem 1.15rem 0.8rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.footer-nav span {
  color: var(--burgundy-deep);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.8;
}
