.howto-article {
  --ha-bg: #f5f7fb;
  --ha-card: #fff;
  --ha-line: #d7deec;
  --ha-text: #1f2438;
  --ha-muted: #646f88;
  --ha-accent: #ff6aa2;
  background: var(--ha-bg);
  color: var(--ha-text);
  padding-bottom: 56px;
}

.howto-article__hero {
  position: relative;
  min-height: 340px;
  background-size: cover;
  background-position: center;
  display: grid;
  align-items: end;
}

.howto-article__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11, 16, 37, 0.22) 0%, rgba(11, 16, 37, 0.68) 100%);
}

.howto-article__inner {
  position: relative;
  z-index: 1;
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0;
}

.howto-article__eyebrow {
  display: inline-flex;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
}

.howto-article__hero h1 {
  margin: 10px 0 12px;
  color: #fff;
  font-size: clamp(1.8rem, 3.2vw, 2.7rem);
  line-height: 1.3;
}

.howto-article__lead {
  margin: 0 0 10px;
  color: rgba(255, 255, 255, 0.92);
  max-width: 760px;
  line-height: 1.8;
}

.howto-article__meta {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  color: rgba(255, 255, 255, .9);
}

.howto-article__cat {
  color: #fff;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: .82rem;
}

.howto-article__wrap {
  width: min(1100px, calc(100% - 32px));
  margin: 20px auto 0;
  display: grid;
  grid-template-columns: 1.7fr .8fr;
  gap: 16px;
}

.howto-article__content {
  background: var(--ha-card);
  border: 1px solid var(--ha-line);
  border-radius: 18px;
  padding: 20px;
}

.howto-entry {
  font-size: 1rem;
  line-height: 1.95;
}

.howto-entry h2,
.howto-entry h3 {
  line-height: 1.45;
}

.howto-entry h2 {
  margin: 44px 0 14px;
  font-size: 1.45rem;
  border-left: 4px solid var(--ha-accent);
  padding-left: 12px;
}

.howto-entry h3 {
  margin: 28px 0 12px;
  font-size: 1.2rem;
}

.howto-entry p {
  margin: 0 0 14px;
}

.howto-entry img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}

.howto-entry ul,
.howto-entry ol {
  padding-left: 1.2rem;
}

.howto-entry a {
  color: #2c5dc2;
}

.howto-sections {
  margin-top: 28px;
  display: grid;
  gap: 16px;
}

.howto-sections__item {
  border: 1px solid var(--ha-line);
  border-radius: 14px;
  background: #fff;
  padding: 14px;
}

.howto-sections__subtitle {
  margin: 0 0 12px;
  border: 1px solid #8fd1e6;
  color: #4c95af;
  background: #f1fbff;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 1.22rem;
  line-height: 1.5;
}

.howto-sections__image {
  margin: 0 0 12px;
  border-radius: 10px;
  overflow: hidden;
}

.howto-sections__image img {
  width: 100%;
  height: auto;
  display: block;
}

.howto-sections__body {
  color: var(--ha-text);
  line-height: 1.9;
}

.howto-sections__button {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 12px;
  background: #c8a75f;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  padding: 0 18px;
}

.howto-sections__button:hover {
  background: #b89346;
  color: #fff;
}

.howto-toc {
  border: 1px solid var(--ha-line);
  border-radius: 14px;
  background: #fbfcff;
  padding: 14px;
  margin-bottom: 18px;
}

.howto-toc h2 {
  margin: 0;
  font-size: 1.02rem;
}


.howto-entry h2[id],
.howto-entry h3[id],
.howto-sections__subtitle[id] {
  scroll-margin-top: 96px;
}

.howto-toc__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.howto-toc__toggle {
  border: 0;
  background: transparent;
  color: #59a9c5;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}

.howto-toc__toggle:hover {
  text-decoration: underline;
}

.howto-toc ol {
  margin: 0;
  padding-left: 1rem;
}

.howto-toc li {
  margin: 4px 0;
}

.howto-toc .is-lv3 {
  margin-left: 12px;
}

.howto-toc a {
  color: var(--ha-text);
  text-decoration: none;
}

.howto-article__side {
  display: grid;
  gap: 12px;
  align-content: start;
  position: sticky;
  top: 88px;
  height: fit-content;
}

.howto-sidebox {
  border: 1px solid var(--ha-line);
  border-radius: 14px;
  background: #fff;
  padding: 14px;
}

.howto-sidebox h3 {
  margin: 0 0 8px;
  font-size: 1.02rem;
}

.howto-sidebox p {
  margin: 0 0 10px;
  color: var(--ha-muted);
}

.howto-sidebox__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-radius: 999px;
  padding: 0 14px;
  text-decoration: none;
  color: #fff;
  background: var(--ha-accent);
  font-weight: 700;
}

.howto-sidebox ul {
  margin: 0;
  padding-left: 1rem;
}

.howto-sidebox li + li {
  margin-top: 8px;
}

.howto-sidebox a {
  color: var(--ha-text);
  text-decoration: none;
}

.howto-sidecat {
  border: 1px solid var(--ha-line);
  border-radius: 14px;
  background: #fff;
  padding: 14px;
}

.howto-sidecat--pc {
  display: block;
}

.howto-sidecat--sp {
  width: min(1100px, calc(100% - 32px));
  margin: 18px auto 0;
  display: none;
}

.howto-sidecat__en {
  margin: 0;
  font-size: 2rem;
  letter-spacing: .08em;
  color: #2d344a;
  font-family: serif;
}

.howto-sidecat h2,
.howto-sidecat h3 {
  margin: 2px 0 10px;
  font-size: 1.15rem;
}

.howto-sidecat ul {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--ha-line);
}

.howto-sidecat li {
  border-bottom: 1px solid var(--ha-line);
}

.howto-sidecat a {
  min-height: 54px;
  display: grid;
  grid-template-columns: 38px 1fr;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ha-text);
  padding: 8px 2px;
}

.howto-sidecat__badge {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: #59a9c5;
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.howto-sidecat__name {
  font-size: 1.02rem;
}

.howto-ranking {
  width: min(1100px, calc(100% - 32px));
  margin: 28px auto 0;
  padding: 22px;
  border: 1px solid var(--ha-line);
  border-radius: 18px;
  background: #fff;
}

.howto-ranking__eyebrow {
  margin: 0;
  text-align: center;
  font-size: clamp(1.6rem, 2.6vw, 2.6rem);
  letter-spacing: .06em;
  color: #2d344a;
  font-family: serif;
}

.howto-ranking h2 {
  margin: 8px 0 18px;
  text-align: center;
  font-size: clamp(1.2rem, 2.2vw, 1.75rem);
}

.howto-ranking__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.howto-ranking__card {
  border: 1px solid var(--ha-line);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}

.howto-ranking__card a {
  text-decoration: none;
  color: var(--ha-text);
}

.howto-ranking__image {
  margin: 0;
  aspect-ratio: 16/10;
  overflow: hidden;
}

.howto-ranking__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.howto-ranking__body {
  padding: 12px;
}

.howto-ranking__num {
  margin: 0 0 6px;
  font-size: .84rem;
  font-weight: 700;
  color: #59a9c5;
}

.howto-ranking__body h3 {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.5;
}

.howto-ranking__meta {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-size: .85rem;
  color: var(--ha-muted);
}

@media (max-width: 980px) {
  .howto-article__wrap {
    grid-template-columns: 1fr;
  }

  .howto-article__side {
    position: static;
  }

  .howto-ranking__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


@media (max-width: 640px) {
  .howto-article__hero {
    min-height: 280px;
  }

  .howto-article__content {
    border-radius: 14px;
    padding: 16px;
  }

  .howto-toc #howto-toc-list.is-collapsed {
    display: none;
  }

  .howto-sidecat--pc {
    display: none;
  }

  .howto-sidecat--sp {
    display: block;
    width: min(1100px, calc(100% - 24px));
    padding: 16px;
  }

  .howto-ranking {
    width: min(1100px, calc(100% - 24px));
    margin-top: 18px;
    padding: 16px;
  }

  .howto-ranking__grid {
    grid-template-columns: 1fr;
  }
}
