:root {
  --brand-red: #b40016;
  --brand-dark-red: #970012;
  --brand-coral: #ff7352;
  --page-background: #fff5f5;
  --soft-red: #fff0f0;
  --dark-card: #2a070b;
  --text-primary: #222222;
  --text-secondary: #777777;
  --paper: #ffffff;
  --line: #ffd3d3;
  --shadow: 0 14px 38px rgba(180, 0, 22, 0.1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: linear-gradient(180deg, #ffe8e8 0, var(--page-background) 18%, #fff 58%, #fff8f8 100%);
  color: var(--text-primary);
  font-family: "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  line-height: 1.7;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
:focus-visible { outline: 3px solid var(--brand-coral); outline-offset: 3px; }
[id] { scroll-margin-top: 92px; }
.section-shell { width: min(1120px, calc(100% - 48px)); margin: auto; }
.hidden { display: none !important; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 78px;
  padding: 12px max(24px, calc((100vw - 1180px) / 2));
  display: flex;
  align-items: center;
  gap: 34px;
  background: rgba(255, 245, 245, 0.92);
  border-bottom: 1px solid rgba(255, 211, 211, 0.72);
  backdrop-filter: blur(14px);
}
.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; font-size: 19px; font-weight: 800; letter-spacing: .06em; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px 12px 12px 4px; background: linear-gradient(135deg, var(--brand-dark-red), var(--brand-coral)); color: #fff; }
.main-nav { display: flex; gap: 26px; color: var(--text-secondary); font-size: 14px; }
.main-nav a:hover, .text-link:hover { color: var(--brand-red); }

.button { border: 0; border-radius: 999px; cursor: pointer; padding: 13px 23px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-weight: 700; transition: .2s ease; }
.button-primary { color: #fff; background: linear-gradient(120deg, var(--brand-dark-red), var(--brand-red) 55%, var(--brand-coral)); box-shadow: 0 10px 22px rgba(180, 0, 22, .24); }
.button-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 28px rgba(180, 0, 22, .28); }
.button-outline { padding: 8px 17px; border: 1px solid #ffc8c8; background: #fff; color: var(--brand-dark-red); font-size: 13px; }
.button-outline:hover { background: var(--soft-red); }
.button-quiet { padding-left: 4px; background: transparent; color: var(--brand-red); }
.button-full { width: 100%; margin-top: 14px; }

.hero { min-height: 610px; display: grid; grid-template-columns: 1.04fr .96fr; align-items: center; gap: 58px; padding-block: 54px; }
.eyebrow { margin: 0 0 16px; color: var(--brand-red); font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.hero h1 { max-width: 610px; margin: 0 0 25px; font-size: clamp(42px, 5.2vw, 68px); font-weight: 900; line-height: 1.18; letter-spacing: -.065em; }
.hero h1 em { display: block; color: var(--brand-red); font-style: normal; }
.hero-text { max-width: 490px; color: var(--text-secondary); font-size: 16px; }
.hero-actions { display: flex; align-items: center; gap: 22px; margin: 32px 0; }
.hero-note { color: var(--text-secondary); font-size: 12px; }
.pulse-dot { display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--brand-red); box-shadow: 0 0 0 5px rgba(180, 0, 22, .1); }

.hero-art { position: relative; min-height: 420px; overflow: hidden; border-radius: 28px; background: linear-gradient(135deg, #9d0013, #c9001b 52%, var(--brand-coral)); box-shadow: 0 24px 60px rgba(151, 0, 18, .25); }
.sun { position: absolute; top: -62px; right: -42px; width: 190px; height: 190px; border-radius: 50%; background: rgba(255,255,255,.13); }
.wave { position: absolute; bottom: 24px; left: -8%; width: 120%; height: 118px; border-radius: 50% 50% 0 0; background: rgba(255,255,255,.1); transform: rotate(-4deg); }
.wave-two { bottom: -42px; background: rgba(42,7,11,.23); transform: rotate(6deg); }
.boat { position: absolute; z-index: 2; left: 31%; bottom: 145px; width: 210px; height: 92px; border-radius: 0 0 90px 90px; background: var(--brand-coral); box-shadow: inset 0 -15px rgba(151,0,18,.32), 0 16px 24px rgba(42,7,11,.18); transform: rotate(-5deg); }
.boat::before { content: ""; position: absolute; left: 99px; bottom: 35px; width: 5px; height: 135px; background: #fff; }
.boat::after { content: ""; position: absolute; left: 105px; bottom: 100px; border-style: solid; border-width: 0 0 100px 83px; border-color: transparent transparent #fff transparent; }
.boat span { position: absolute; z-index: 3; left: 25px; top: 20px; width: 120px; height: 5px; background: #ffd1c9; transform: rotate(-13deg); }
.ai-badge { position: absolute; top: 28px; left: 28px; display: grid; place-items: center; width: 54px; height: 54px; border: 1px solid rgba(255,255,255,.42); border-radius: 15px; background: rgba(255,255,255,.16); color: #fff; font-size: 19px; font-weight: 900; }
.art-label { position: absolute; z-index: 3; right: 30px; bottom: 28px; left: 30px; display: grid; color: #fff; }
.art-label span { font-size: 11px; letter-spacing: .12em; opacity: .8; }
.art-label strong { font-size: 20px; }
.art-label small { margin-top: 5px; opacity: .82; }

.intro-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; padding: 76px 0 115px; }
.intro-grid h2, .section-heading h2, .journey-content h2, .access-card h2 { margin: 0; font-size: clamp(30px, 4vw, 48px); font-weight: 900; line-height: 1.25; letter-spacing: -.05em; }
.intro-grid h2 span { color: var(--brand-red); }
.intro-copy { padding-top: 34px; color: var(--text-secondary); font-size: 17px; }
.stat-row { display: flex; gap: 45px; margin-top: 38px; }
.stat-row div { display: flex; flex-direction: column; }
.stat-row strong { color: var(--brand-red); font-size: 30px; font-weight: 900; }
.stat-row span { font-size: 12px; }

.courses-section { padding-bottom: 120px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 35px; }
.section-heading > p { color: var(--text-secondary); font-size: 14px; }
.course-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; }
.course-card { min-height: 320px; padding: 23px; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: var(--shadow); }
.course-card:nth-child(even) { background: #fffafa; }
.course-top, .course-meta { display: flex; align-items: center; justify-content: space-between; }
.course-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: linear-gradient(135deg, var(--brand-red), var(--brand-coral)); color: #fff; font-size: 19px; }
.course-category, .course-meta { color: var(--text-secondary); font-size: 11px; }
.course-card h3 { margin: 25px 0 7px; color: var(--brand-dark-red); font-size: 19px; letter-spacing: -.03em; }
.course-card p { min-height: 51px; margin: 0; color: var(--text-secondary); font-size: 13px; }
.course-meta { margin-top: 20px; padding-top: 15px; border-top: 1px solid #ffe3e3; }
.tag-list { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 13px; }
.tag-list span { padding: 2px 7px; border-radius: 999px; background: var(--soft-red); color: var(--brand-red); font-size: 10px; }
.course-link, .text-button, .text-link { margin-top: auto; padding: 0; border: 0; background: none; color: var(--brand-red); cursor: pointer; text-align: left; font-weight: 700; font-size: 12px; }
.course-link span, .text-link span { margin-left: 4px; font-size: 18px; }
.course-selected { color: var(--brand-dark-red) !important; }

.journey-band { padding: 90px 0; background: var(--dark-card); color: #fff; }
.journey-content { display: grid; grid-template-columns: 1fr 1fr; gap: 100px; }
.journey-content .eyebrow { color: #ffb3a4; }
.journey-list { display: flex; flex-direction: column; gap: 22px; margin: 0; padding: 0; list-style: none; }
.journey-list li { display: flex; align-items: center; gap: 19px; padding-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,.15); }
.journey-list span { color: #ffb3a4; font-size: 13px; font-weight: 700; }
.journey-list div { display: flex; flex-direction: column; }
.journey-list small { color: #ffd1c9; font-size: 12px; }

.access-section { padding: 110px 0; }
.access-card { padding: 55px 65px; display: grid; grid-template-columns: 1fr 1fr; gap: 35px; align-items: center; border: 1px solid var(--line); border-radius: 24px; background: var(--soft-red); box-shadow: var(--shadow); }
.access-card > p { color: #6d5356; font-size: 15px; }
.access-card .text-link { grid-column: 2; margin-top: -20px; }
.site-footer { padding: 25px 0; border-top: 1px solid var(--line); color: var(--text-secondary); font-size: 12px; }
.footer-inner { display: flex; justify-content: space-between; }

.user-menu { display: flex; align-items: center; gap: 15px; color: var(--brand-red); font-size: 13px; }
.text-button { margin: 0; }
.login-dialog { width: min(430px, calc(100% - 32px)); padding: 0; border: 0; border-radius: 22px; background: #fff; color: var(--text-primary); box-shadow: 0 30px 90px rgba(42,7,11,.32); }
.login-dialog::backdrop { background: rgba(42,7,11,.55); backdrop-filter: blur(3px); }
.login-dialog form { padding: 37px; }
.login-dialog h2 { margin: 0 0 5px; color: var(--brand-dark-red); font-size: 31px; letter-spacing: -.05em; }
.dialog-hint { margin: 0 0 27px; color: var(--text-secondary); font-size: 13px; }
.login-dialog label { display: block; margin: 14px 0 5px; font-size: 12px; font-weight: 700; }
.login-dialog input { width: 100%; padding: 12px 13px; border: 1px solid var(--line); border-radius: 10px; background: #fffafa; outline: 0; }
.login-dialog input:focus { border-color: var(--brand-red); box-shadow: 0 0 0 3px rgba(180,0,22,.1); }
.dialog-close { position: absolute; top: 15px; right: 20px; border: 0; background: none; color: var(--text-secondary); cursor: pointer; font-size: 25px; }
.form-error { min-height: 18px; margin: 12px 0 0; color: var(--brand-red); font-size: 12px; }
.auth-switch { margin: 16px 0 0; color: var(--text-secondary); text-align: center; font-size: 13px; }
.auth-switch .text-button { margin-left: 4px; }

@media (max-width: 900px) {
  .main-nav { display: none; }
  .hero { grid-template-columns: 1fr; padding-block: 70px 90px; }
  .hero-copy { max-width: 680px; }
  .hero-art { min-height: 380px; }
  .intro-grid, .journey-content { grid-template-columns: 1fr; gap: 26px; }
  .intro-copy { padding-top: 0; }
  .course-grid { grid-template-columns: repeat(2, 1fr); }
  .access-card { grid-template-columns: 1fr; padding: 40px; }
  .access-card .text-link { grid-column: auto; margin-top: 0; }
}

@media (max-width: 560px) {
  .section-shell { width: calc(100% - 32px); }
  .site-header { min-height: 68px; padding-inline: 16px; gap: 12px; }
  .brand { font-size: 16px; }
  .brand-mark { width: 33px; height: 33px; }
  .user-menu { gap: 8px; }
  #userGreeting { max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .hero { gap: 38px; padding-block: 48px 70px; }
  .hero h1 { font-size: 42px; }
  .hero-actions { align-items: stretch; flex-direction: column; gap: 6px; }
  .button-quiet { padding: 11px; }
  .hero-art { min-height: 310px; border-radius: 22px; }
  .boat { left: 20%; bottom: 112px; transform: scale(.78) rotate(-5deg); }
  .art-label { right: 20px; bottom: 20px; left: 20px; }
  .intro-grid { padding: 34px 0 80px; }
  .stat-row { gap: 18px; justify-content: space-between; }
  .stat-row span { max-width: 86px; }
  .section-heading { display: block; }
  .section-heading > p { margin-top: 14px; }
  .course-grid { grid-template-columns: 1fr; }
  .courses-section { padding-bottom: 85px; }
  .journey-band { padding: 72px 0; }
  .access-section { padding: 75px 0; }
  .access-card { padding: 30px 24px; }
  .footer-inner { display: block; }
  .footer-inner span { display: block; margin: 4px 0; }
  .login-dialog form { padding: 32px 24px 26px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
