/* 樱花日语网站：可维护的响应式基础样式 */
:root {
  --ink: #233534;
  --muted: #63736d;
  --accent: #b94b65;
  --accent-dark: #923a53;
  --paper: #fffefa;
  --wash: #f4f6f0;
  --line: #e3e9e0;
  --mint: #dbe8df;
  --shadow: 0 14px 42px rgba(37, 68, 54, .075);
}
*, *::before, *::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font: 16px/1.82 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}
a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  color: var(--accent-dark);
}
img {
  display: block;
  max-width: 100%;
  height: auto;
}
button, input {
  font: inherit;
}
.container {
  width: min(1180px, calc(100% - 44px));
  margin-inline: auto;
}
.skip-link {
  position: absolute;
  left: -1000px;
  top: 10px;
  z-index: 30;
}
.skip-link:focus {
  left: 12px;
  background: white;
  padding: 8px 16px;
}
.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 254, 250, .97);
}
.header-inner {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 15px;
  background: #f7dee5;
  color: var(--accent-dark);
  font-size: 26px;
}
.brand b {
  font-size: 23px;
  letter-spacing: -.6px;
  white-space: nowrap;
}
.brand small {
  display: block;
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--muted);
  line-height: 1.2;
}
.header-tip {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.menu {
  display: flex;
  gap: 2px;
  align-items: center;
  flex-wrap: wrap;
}
.menu a {
  padding: 11px 13px;
  font-size: 14px;
  border-radius: 9px;
  font-weight: 600;
}
.menu a:hover, .menu a[aria-current="page"] {
  background: #f9e8eb;
  color: var(--accent-dark);
}
.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.hero {
  background: #e6efe9;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  align-items: center;
  min-height: 495px;
}
.hero-copy {
  padding: 60px 50px 60px 0;
}
.hero h1 {
  font-size: clamp(32px, 3.6vw, 53px);
  line-height: 1.28;
  letter-spacing: -.06em;
  margin: 0 0 23px;
}
.hero h1 span {
  color: var(--accent-dark);
}
.hero p.lead {
  max-width: 490px;
  margin: 0 0 27px;
  color: #496058;
  line-height: 1.94;
}
.hero-image {
  height: 495px;
  width: calc(100% + max(0px, (100vw - 1180px)/2));
  max-width: none;
  object-fit: cover;
  object-position: 72% 50%;
  border-radius: 0 0 0 140px;
}
.primary-link {
  display: inline-flex;
  align-items: center;
  padding: 12px 23px;
  border-radius: 9px;
  background: var(--accent-dark);
  color: white;
  font-weight: 700;
}
.primary-link:hover {
  color: white;
  background: #70263d;
}
.hero-note {
  display: inline-block;
  margin-left: 16px;
  font-size: 13px;
  color: var(--muted);
}
.stats {
  display: flex;
  gap: 28px;
  margin-top: 27px;
  font-size: 13px;
  color: #4f655a;
}
.stats strong {
  color: var(--accent-dark);
  font-size: 19px;
}
.section {
  padding: 68px 0 15px;
}
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}
.section-head h2 {
  margin: 0;
  font-size: clamp(23px, 2.4vw, 31px);
  line-height: 1.35;
}
.section-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}
.text-link {
  color: var(--accent-dark);
  font-weight: 700;
  font-size: 14px;
}
.topic-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.topic-card {
  min-width: 0;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 16px;
  overflow: hidden;
  transition: transform .2s ease;
}
.topic-card:hover {
  transform: translateY(-3px);
}
.topic-card img {
  width: 100%;
  height: 190px;
  object-fit: cover;
}
.topic-card-body {
  padding: 20px 22px 24px;
}
.topic-card h3 {
  margin: 0 0 5px;
  font-size: 20px;
}
.topic-card p {
  margin: 0 0 13px;
  color: var(--muted);
  font-size: 14px;
}
.topic-card span {
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 700;
}
.study-band {
  margin-top: 65px;
  background: #f4f5ee;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.study-band .container {
  padding: 48px 0;
}
.timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.step {
  background: #fff;
  border: 1px solid #e7e9df;
  border-radius: 14px;
  padding: 23px 21px;
}
.step b {
  color: var(--accent-dark);
  font-size: 12px;
  letter-spacing: .08em;
}
.step h3 {
  margin: 5px 0 7px;
  font-size: 18px;
}
.step p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 285px;
  gap: 36px;
}
.article-list {
  display: grid;
  gap: 13px;
}
.article-row {
  border: 1px solid var(--line);
  display: grid;
  grid-template-columns: 63px minmax(0, 1fr) auto;
  gap: 17px;
  padding: 18px;
  border-radius: 13px;
  background: white;
  align-items: center;
}
.article-row .num {
  display: grid;
  place-items: center;
  width: 53px;
  height: 53px;
  background: #f6e7eb;
  color: var(--accent-dark);
  border-radius: 11px;
  font-weight: 800;
}
.article-row h3 {
  margin: 0 0 4px;
  font-size: 17px;
  line-height: 1.4;
}
.article-row p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}
.article-row .arrow {
  color: var(--accent-dark);
  font-size: 20px;
}
.sidebar {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  align-self: start;
}
.sidebar h2 {
  margin: 0 0 16px;
  font-size: 19px;
}
.sidebar a {
  display: block;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.sidebar a:last-child {
  border-bottom: 0;
}
.examples {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 18px;
}
.example {
  padding: 18px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: #fbfcf8;
}
.example strong {
  display: block;
  font-size: 23px;
  color: var(--accent-dark);
}
.example small {
  color: var(--muted);
}
.page-intro {
  padding: 58px 0 37px;
  background: #f1f5ef;
}
.breadcrumb {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 13px;
}
.breadcrumb a {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.page-intro h1 {
  margin: 0 0 12px;
  font-size: clamp(29px, 3.3vw, 43px);
  line-height: 1.34;
}
.page-intro p {
  margin: 0;
  color: var(--muted);
  max-width: 750px;
}
.page-main {
  padding: 48px 0 75px;
}
.prose {
  min-width: 0;
  font-size: 16px;
}
.prose h2 {
  padding-bottom: 10px;
  margin-top: 34px;
  font-size: 23px;
  border-bottom: 1px solid var(--line);
}
.prose p {
  margin: 16px 0;
}
.prose .opening {
  color: #475e52;
  font-size: 17px;
  padding: 21px 24px;
  border-left: 4px solid var(--accent);
  background: #f9f2f2;
  border-radius: 0 12px 12px 0;
}
.prose figure {
  margin: 0 0 29px;
}
.prose figure img {
  width: 100%;
  max-height: 370px;
  object-fit: cover;
  border-radius: 15px;
}
.prose figcaption {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
}
.kana-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  text-align: center;
}
.kana-table th, .kana-table td {
  border: 1px solid var(--line);
  padding: 8px 4px;
}
.kana-table th {
  background: #f3f5ee;
  font-size: 13px;
}
.kana-table td {
  font-size: 22px;
  font-weight: 650;
}
.kana-table small {
  font-size: 11px;
  color: var(--muted);
  display: block;
  line-height: 1.25;
}
.note {
  margin-top: 30px;
  padding: 17px 22px;
  border-radius: 12px;
  background: #edf4ef;
  color: #36564a;
  font-size: 14px;
}
.footer {
  background: #243d36;
  color: #e6eee8;
  margin-top: 68px;
  padding: 48px 0 26px;
}
.footer-layout {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 30px;
}
.footer strong {
  font-size: 20px;
}
.footer p, .footer a {
  font-size: 13px;
  color: #d3dfd6;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}
.footer-bottom {
  margin-top: 32px;
  padding-top: 17px;
  border-top: 1px solid #496157;
  font-size: 12px;
  color: #c8d3ca;
}
@media (max-width: 1050px) {
  .header-tip {
    display: none;
  }
  .hero-copy {
    padding-right: 20px;
  }
  .menu a {
    padding: 9px 9px;
  }
}
@media (max-width: 760px) {
  .container {
    width: min(100% - 30px, 1180px);
  }
  .header-inner {
    flex-wrap: wrap;
    padding: 14px 0 9px;
    gap: 8px;
  }
  .brand b {
    font-size: 20px;
  }
  .menu {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: thin;
    padding: 5px 0;
  }
  .menu a {
    white-space: nowrap;
    flex-shrink: 0;
  }
  .hero-grid {
    display: flex;
    flex-direction: column-reverse;
    min-height: 0;
  }
  .hero-image {
    width: 100%;
    height: 235px;
    border-radius: 0 0 35px 35px;
  }
  .hero-copy {
    width: 100%;
    padding: 29px 0 35px;
  }
  .hero h1 {
    font-size: 31px;
  }
  .hero-note {
    display: block;
    margin: 12px 0 0;
  }
  .stats {
    gap: 18px;
    flex-wrap: wrap;
  }
  .section {
    padding-top: 45px;
  }
  .section-head {
    align-items: start;
  }
  .topic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .topic-card img {
    height: 125px;
  }
  .topic-card-body {
    padding: 14px;
  }
  .topic-card h3 {
    font-size: 17px;
  }
  .timeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .content-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  .examples {
    grid-template-columns: 1fr;
  }
  .footer-layout {
    grid-template-columns: 1fr;
    gap: 17px;
  }
}
@media (max-width: 430px) {
  .topic-grid, .timeline {
    grid-template-columns: 1fr;
  }
  .topic-card img {
    height: 165px;
  }
  .article-row {
    grid-template-columns: 45px minmax(0, 1fr);
    gap: 12px;
  }
  .article-row .num {
    width: 43px;
    height: 43px;
  }
  .article-row .arrow {
    display: none;
  }
  .page-intro {
    padding-top: 35px;
  }
}
:where(a, button, input):focus-visible {
  outline: 3px solid #9a3658;
  outline-offset: 3px;
}
:where(h1, h2, h3, p, a, td, th) {
  overflow-wrap: anywhere;
}
:where(.hero-copy, .section-head, .prose, .article-row) {
  min-width: 0;
}
.article-row .article-summary {
  min-width: 0;
}
.article-row .article-summary h3 {
  margin-top: 0;
}
.hero-image {
  aspect-ratio: 2 / 1;
}
.menu {
  min-width: 0;
}
.kana-table-wrap {
  max-width: 100%;
  overflow-x: auto;
}
@media (max-width: 1150px) and (min-width: 761px) {
  .header-inner {
    flex-wrap: wrap;
    padding: 14px 0;
    gap: 7px 16px;
  }
  .menu {
    width: 100%;
    justify-content: flex-start;
  }
}
@media (max-width: 760px) {
  .hero-grid {
    display: grid;
    grid-template-columns: 1fr;
  }
  .hero-copy {
    order: 2;
  }
  .hero-image {
    order: 1;
    max-width: 100%;
    width: 100%;
    object-position: center 54%;
  }
  .hero h1 {
    letter-spacing: -.025em;
  }
  .header-inner {
    align-items: flex-start;
  }
  .menu {
    overscroll-behavior-x: contain;
  }
  .sidebar {
    padding: 20px;
  }
  .article-row {
    align-items: start;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .topic-card {
    transition: none;
  }
}
@media print {
  .site-header, .footer, .sidebar, .skip-link {
    display: none;
  }
  .container {
    width: 100%;
  }
  .page-main {
    padding: 0;
  }
  body {
    color: black;
    background: white;
  }
}

.sidebar-subhead { margin-top: 24px; }
