:root {
  color-scheme: light;
  --bg: #f5f7f6;
  --surface: #ffffff;
  --surface-soft: #eef4f2;
  --ink: #1c1f1e;
  --muted: #67706d;
  --line: #dbe2df;
  --accent: #176f62;
  --blue: #285f9f;
  --warm: #9a5a3e;
  --shadow: 0 10px 24px rgba(21, 29, 26, 0.08);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(23, 111, 98, 0.08), transparent 34%),
    var(--bg);
  color: var(--ink);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei",
    sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

.guide {
  width: min(100%, 760px);
  min-height: 100svh;
  margin: 0 auto;
  padding: calc(14px + env(safe-area-inset-top)) 14px calc(10px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-rows: auto auto auto auto auto auto;
  align-content: start;
  gap: 12px;
}

.topbar,
.brand,
.time-chip,
.section-title,
.footer-line {
  display: flex;
  align-items: center;
}

.topbar {
  justify-content: space-between;
  gap: 14px;
  min-height: 68px;
}

.brand {
  gap: 14px;
  min-width: 0;
}

.brand-mark {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  display: grid;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 3px 3px 0 rgba(28, 31, 30, 0.12);
  overflow: hidden;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
}

.brand-copy {
  min-width: 0;
}

.brand-title,
.brand-subtitle {
  display: block;
}

.brand-title {
  font-size: 1.23rem;
  font-weight: 800;
  line-height: 1.2;
}

.brand-subtitle {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.86rem;
}

.time-chip {
  min-height: 42px;
  padding: 0 13px;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--ink);
  font-size: 1rem;
  font-weight: 700;
  white-space: nowrap;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(23, 111, 98, 0.12);
}

.intro {
  padding: 8px 0 2px;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.intro h1 {
  margin: 0;
  font-size: clamp(2.35rem, 10vw, 3.25rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.intro p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 1.03rem;
  line-height: 1.5;
}

.primary-card {
  min-height: 96px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  border-radius: var(--radius);
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow);
}

.primary-card small,
.primary-card strong {
  display: block;
}

.primary-card small {
  margin-bottom: 7px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.96rem;
}

.primary-card strong {
  font-size: 1.62rem;
  line-height: 1.15;
}

.enter-mark {
  min-width: 74px;
  padding: 11px 14px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.08rem;
  font-weight: 700;
  text-align: center;
}

.notice {
  padding: 15px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
}

.notice p {
  margin: 0;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 2.05;
}

.entry-zone {
  min-height: 0;
}

.section-title {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.section-title h2 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.2;
}

.section-title span {
  color: var(--muted);
  font-size: 0.78rem;
  white-space: nowrap;
}

.entry-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  min-height: 0;
}

.entry-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.entry-card {
  min-height: 82px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 12px;
}

.entry-card:hover,
.primary-card:hover {
  transform: translateY(-1px);
}

.entry-card:hover {
  border-color: rgba(23, 111, 98, 0.5);
  box-shadow: 0 8px 18px rgba(21, 29, 26, 0.08);
}

.entry-card:focus-visible,
.primary-card:focus-visible,
.brand:focus-visible {
  outline: 3px solid rgba(23, 111, 98, 0.22);
  outline-offset: 3px;
}

.entry-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--accent);
  font-size: 1rem;
  font-weight: 800;
}

.entry-card[data-tone="blue"] .entry-icon {
  background: rgba(40, 95, 159, 0.1);
  color: var(--blue);
}

.entry-card[data-tone="warm"] .entry-icon {
  background: rgba(154, 90, 62, 0.1);
  color: var(--warm);
}

.entry-copy {
  min-width: 0;
}

.entry-copy strong,
.entry-copy span {
  display: block;
}

.entry-copy strong {
  overflow: hidden;
  font-size: 1.06rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.entry-copy span {
  margin-top: 5px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  white-space: normal;
}

.footer-line {
  justify-content: space-between;
  gap: 12px;
  margin-top: 2px;
  min-height: 18px;
  color: var(--muted);
  font-size: 0.76rem;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 10;
  max-width: calc(100% - 32px);
  padding: 10px 14px;
  border: 1px solid rgba(28, 31, 30, 0.12);
  border-radius: 999px;
  background: rgba(28, 31, 30, 0.92);
  color: #fff;
  font-size: 0.86rem;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (min-width: 760px) {
  body {
    background:
      linear-gradient(115deg, rgba(23, 111, 98, 0.09), transparent 38%),
      linear-gradient(245deg, rgba(40, 95, 159, 0.08), transparent 36%),
      var(--bg);
  }

  .guide {
    padding-block: 28px;
    gap: 12px;
  }

  .intro {
    padding-top: 10px;
  }

  .intro h1 {
    font-size: 3rem;
  }

  .entry-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .entry-card {
    min-height: 78px;
  }
}

@media (max-width: 640px) {
  .intro h1 {
    font-size: 2.25rem;
  }

  .intro p {
    font-size: 0.96rem;
  }

  .primary-card {
    min-height: 88px;
    padding: 18px 20px;
  }

  .primary-card strong {
    font-size: 1.42rem;
  }

  .notice {
    padding: 10px 12px;
  }

  .notice p {
    font-size: 0.82rem;
    line-height: 1.72;
  }

  .entry-card {
    min-height: 78px;
  }
}

@media (max-width: 640px) and (min-height: 760px) {
  .primary-card {
    min-height: 92px;
  }

  .notice p {
    font-size: 0.84rem;
    line-height: 1.8;
  }

  .entry-grid {
    gap: 10px;
  }

  .entry-card {
    min-height: 112px;
  }
}

@media (max-width: 380px) {
  .guide {
    gap: 8px;
    padding-inline: 12px;
  }

  .topbar {
    min-height: 60px;
    gap: 10px;
  }

  .brand {
    gap: 10px;
  }

  .brand-mark {
    width: 52px;
    height: 52px;
    flex-basis: 52px;
  }

  .brand-title {
    font-size: 1.1rem;
  }

  .brand-subtitle {
    margin-top: 4px;
    font-size: 0.8rem;
  }

  .time-chip {
    min-height: 38px;
    padding-inline: 11px;
    font-size: 0.94rem;
  }

  .intro h1 {
    font-size: 1.82rem;
  }

  .intro p {
    font-size: 0.84rem;
  }

  .primary-card {
    min-height: 70px;
    padding: 13px 14px;
  }

  .primary-card strong {
    font-size: 1.2rem;
  }

  .enter-mark {
    min-width: 58px;
    padding: 8px 10px;
  }

  .notice {
    padding: 8px 10px;
  }

  .notice p {
    font-size: 0.75rem;
    line-height: 1.75;
  }

  .entry-card {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
  }

  .entry-icon {
    width: 38px;
    height: 38px;
  }

  .entry-copy strong {
    font-size: 0.98rem;
  }

  .entry-copy span {
    font-size: 0.76rem;
  }

}

@media (max-height: 700px) and (max-width: 640px) {
  .guide {
    gap: 6px;
  }

  .topbar {
    min-height: 56px;
  }

  .brand-mark {
    width: 50px;
    height: 50px;
    flex-basis: 50px;
  }

  .brand-title {
    font-size: 1.05rem;
  }

  .brand-subtitle {
    font-size: 0.76rem;
  }

  .time-chip {
    min-height: 36px;
    font-size: 0.9rem;
  }

  .intro {
    padding-top: 2px;
  }

  .intro h1 {
    font-size: 1.72rem;
  }

  .intro p {
    margin-top: 4px;
  }

  .primary-card {
    min-height: 64px;
    padding-block: 11px;
  }

  .primary-card small {
    font-size: 0.76rem;
  }

  .primary-card strong {
    font-size: 1.12rem;
  }

  .notice {
    padding-block: 6px;
  }

  .notice p {
    font-size: 0.72rem;
    line-height: 1.62;
  }

  .entry-grid {
    grid-template-rows: repeat(2, minmax(72px, 1fr));
    gap: 6px;
  }

  .entry-card {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 9px;
    padding: 8px;
  }

  .entry-icon {
    width: 36px;
    height: 36px;
  }

  .entry-copy strong {
    font-size: 0.94rem;
  }

  .entry-copy span {
    margin-top: 3px;
    font-size: 0.72rem;
  }

  .footer-line {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
