:root {
  --ink: #0d2340;
  --muted: #63748b;
  --blue: #075db3;
  --blue-strong: #003b7a;
  --blue-dark: #062b5f;
  --cyan: #18a8d8;
  --gold: #f5b82e;
  --line: #d9e5f2;
  --bg: #f5f9fe;
  --surface: #ffffff;
  --soft: #eaf4ff;
  --danger: #b42318;
  --shadow: 0 10px 28px rgba(10, 44, 86, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  color: var(--ink);
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  letter-spacing: 0;
  background: var(--bg);
}

body {
  margin: 0;
  min-width: 320px;
}

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

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

.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;
}

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.hero {
  display: block;
  width: 100%;
  min-height: 170px;
  overflow: hidden;
  background: linear-gradient(90deg, #eaf5ff, #ffffff);
}

.hero img {
  display: block;
  width: min(100%, 1280px);
  height: auto;
  max-height: none;
  margin: 0 auto;
  object-fit: contain;
}

.ad-slot {
  position: relative;
  width: fit-content;
  max-width: min(100%, 970px);
  margin: 16px auto;
}

.ad-slot--header_under {
  margin-top: 12px;
  margin-bottom: 12px;
}

.ad-slot--sidebar_after_ranking,
.ad-slot--sidebar_after_keywords,
.ad-slot--sidebar_after_categories {
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
}

.ad-slot--feed_after_10,
.ad-slot--feed_after_20 {
  max-width: min(100%, 640px);
}

.ad-pr {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1;
  padding: 2px 5px;
  color: #fff;
  background: rgba(6, 43, 95, 0.82);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
}

.ad-content {
  overflow: hidden;
  max-width: 100%;
}

.ad-content img,
.ad-content iframe {
  max-width: 100%;
}

.ad-slot--sticky {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 20;
  transform: translateX(-50%);
  margin: 0;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 -8px 24px rgba(10, 44, 86, 0.16);
}

.nav-band {
  position: relative;
  display: block;
  padding: 0;
  background: linear-gradient(90deg, var(--blue-dark), var(--blue-strong));
  box-shadow: 0 8px 20px rgba(0, 43, 95, 0.15);
}

.nav-band.is-stuck {
  position: fixed !important;
  left: 0;
  right: 0;
  top: 0 !important;
  width: 100%;
  z-index: 30;
}

.nav-band-spacer {
  display: none;
}

.nav-band-spacer.is-active {
  display: block;
}

.category-tabs {
  display: flex;
  align-items: stretch;
  width: min(1280px, 92vw);
  margin: 0 auto;
  overflow-x: auto;
  scrollbar-width: thin;
}

.tab {
  flex: 0 0 auto;
  min-width: 88px;
  padding: 18px 18px 16px;
  color: #eef6ff;
  font-weight: 700;
  text-align: center;
  border-left: 1px solid rgba(255, 255, 255, 0.14);
}

.tab:first-child {
  border-left: 0;
}

.tab.is-active,
.tab:hover {
  color: var(--blue);
  background: #ffffff;
  box-shadow: inset 0 -4px 0 var(--blue);
}

.page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 26px;
  width: min(1280px, 92vw);
  margin: 26px auto 42px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 14px;
  border-bottom: 1px solid var(--line);
}

.section-head h1,
.section-head h2,
.side-panel h2 {
  position: relative;
  margin: 0;
  padding: 0 0 13px 15px;
  font-size: 20px;
  line-height: 1.4;
}

.section-head h1::before,
.section-head h2::before,
.side-panel h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  width: 4px;
  height: 22px;
  border-radius: 4px;
  background: var(--blue);
}

.section-head a {
  color: var(--blue);
  font-weight: 700;
  font-size: 14px;
}

.article-list {
  display: grid;
  gap: 9px;
}

.article-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 12px;
  height: 96px;
  padding: 6px 10px;
  border: 1px solid #b9cfe7;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 2px 0 rgba(8, 68, 128, 0.08), 0 6px 16px rgba(10, 44, 86, 0.08);
}

.thumb {
  overflow: hidden;
  border-radius: 6px;
  background: var(--soft);
  height: 72px;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-body {
  display: grid;
  grid-template-rows: 1fr auto;
  min-width: 0;
  overflow: hidden;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  min-height: 24px;
  max-height: 24px;
  overflow: hidden;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 9px;
  border-radius: 999px;
  color: var(--blue);
  background: #e8f2ff;
  font-size: 12px;
  font-weight: 700;
}

.article-row h3 {
  align-self: center;
  margin: 0 0 4px;
  font-size: 17px;
  line-height: 1.35;
}

.article-row h3 a {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.article-row h3 a:hover {
  color: var(--blue);
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.article-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}

.page-link,
.page-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: 6px;
  font-weight: 700;
}

.page-link {
  border: 1px solid #b9d3ef;
  color: var(--blue);
  background: #fff;
}

.page-link:hover,
.page-link.is-current {
  border-color: var(--blue);
  color: #fff;
  background: var(--blue);
}

.page-link--wide {
  min-width: 64px;
}

.page-ellipsis {
  color: var(--muted);
}

.sidebar {
  display: grid;
  gap: 16px;
  align-content: start;
}

.side-panel {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 4px 16px rgba(10, 44, 86, 0.07);
}

.side-title-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  text-decoration: none;
}

.side-title-link::after {
  content: "";
  width: 8px;
  height: 8px;
  border-top: 2px solid var(--blue);
  border-right: 2px solid var(--blue);
  transform: rotate(45deg);
}

.side-title-link:hover,
.side-title-link:focus-visible {
  color: var(--blue);
}

.mobile-ranking-panel {
  display: none;
}

.mobile-ranking-ad {
  display: none;
}

.ranking-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ranking-list li {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  height: 54px;
  padding: 0;
  border-top: 1px solid #d6e5f5;
  overflow: hidden;
}

.ranking-list li:last-child {
  border-bottom: 1px solid #d6e5f5;
}

.ranking-list li:nth-child(odd) {
  background: linear-gradient(90deg, rgba(232, 242, 255, 0.55), rgba(255, 255, 255, 0));
}

.ranking-list li:first-child {
  border-top-color: #b9d3ef;
}

.rank {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  color: #fff;
  background: var(--blue);
  font-weight: 700;
}

.ranking-list li:first-child .rank {
  background: var(--gold);
}

.ranking-list a {
  display: -webkit-box;
  overflow: hidden;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.keyword-cloud,
.category-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.keyword-cloud a,
.category-grid a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 13px;
  border: 1px solid #b9d3ef;
  border-radius: 6px;
  color: var(--blue);
  background: #f8fbff;
  font-weight: 700;
  font-size: 14px;
}

.keyword-preview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.keyword-preview a {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 7px;
  align-items: center;
  min-height: 38px;
  padding: 6px 8px;
  border: 1px solid #b9d3ef;
  border-radius: 6px;
  color: var(--blue);
  background: #f8fbff;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 2px 7px rgba(10, 44, 86, 0.09);
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, color 0.16s ease;
}

.keyword-preview a:hover,
.keyword-preview a:focus-visible {
  border-color: var(--blue);
  color: #fff;
  background: var(--blue);
  box-shadow: 0 4px 12px rgba(15, 99, 184, 0.22);
  transform: translateY(-1px);
}

.keyword-preview a:focus-visible {
  outline: 3px solid rgba(15, 99, 184, 0.22);
  outline-offset: 2px;
}

.keyword-rank {
  display: grid;
  place-items: center;
  width: 32px;
  height: 24px;
  border-radius: 5px;
  color: #fff;
  background: var(--blue);
  font-size: 12px;
  line-height: 1;
}

.keyword-preview a:first-child .keyword-rank {
  background: var(--gold);
}

.keyword-text {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.keyword-cloud a {
  position: relative;
  color: #0b5cad;
  background: linear-gradient(180deg, #ffffff 0%, #edf6ff 100%);
  box-shadow: 0 2px 7px rgba(10, 44, 86, 0.11);
  text-decoration: none;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, color 0.16s ease;
}

.keyword-cloud a::after {
  content: "";
  width: 6px;
  height: 6px;
  margin-left: 8px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
}

.keyword-cloud a:hover,
.keyword-cloud a:focus-visible,
.keyword-cloud a.is-active {
  border-color: var(--blue);
  color: #fff;
  background: var(--blue);
  box-shadow: 0 4px 12px rgba(15, 99, 184, 0.24);
  transform: translateY(-1px);
}

.keyword-cloud a:focus-visible {
  outline: 3px solid rgba(15, 99, 184, 0.22);
  outline-offset: 2px;
}

.keyword-page {
  width: min(980px, 92vw);
  margin: 32px auto 60px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.keyword-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.keyword-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 48px;
  padding: 10px 13px;
  border: 1px solid #b9d3ef;
  border-radius: 8px;
  color: var(--blue);
  background: linear-gradient(180deg, #ffffff 0%, #edf6ff 100%);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(10, 44, 86, 0.1);
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, color 0.16s ease;
}

.keyword-list a:hover,
.keyword-list a:focus-visible {
  border-color: var(--blue);
  color: #fff;
  background: var(--blue);
  box-shadow: 0 5px 14px rgba(15, 99, 184, 0.24);
  transform: translateY(-1px);
}

.keyword-list small {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
}

.keyword-list a:hover small,
.keyword-list a:focus-visible small {
  color: #e8f2ff;
}

.notice,
.empty-state,
.side-empty {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--surface);
}

.notice strong {
  display: block;
  color: var(--ink);
  margin-bottom: 5px;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: center;
  padding: 28px 20px 38px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.simple-header {
  padding: 16px 5vw;
  color: #fff;
  background: var(--blue-dark);
  font-weight: 700;
}

.form-page,
.policy-page {
  width: min(820px, 92vw);
  margin: 32px auto 60px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.form-page h1,
.policy-page h1 {
  margin-top: 0;
}

.policy-page h2 {
  margin: 28px 0 8px;
  font-size: 20px;
}

.policy-page p {
  line-height: 1.8;
  color: #334155;
}

.contact-form {
  display: grid;
  gap: 14px;
}

.contact-form label {
  display: grid;
  gap: 6px;
  font-weight: 700;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid #bdd0e7;
  border-radius: 6px;
  padding: 11px 12px;
  font: inherit;
}

.contact-form textarea {
  min-height: 180px;
  resize: vertical;
}

.contact-form button {
  justify-self: start;
  border: 0;
  border-radius: 6px;
  padding: 11px 22px;
  color: #fff;
  background: var(--blue);
  font-weight: 700;
  cursor: pointer;
}

.error {
  margin-bottom: 10px;
  padding: 12px;
  border: 1px solid #f1b6b1;
  border-radius: 6px;
  color: var(--danger);
  background: #fff4f2;
}

@media (max-width: 980px) {
  .page {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .nav-band::after {
    content: "›";
    position: absolute;
    right: 0;
    top: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 34px;
    height: 100%;
    color: #ffffff;
    background: linear-gradient(90deg, rgba(6, 43, 95, 0), rgba(6, 43, 95, 0.96) 56%);
    font-size: 26px;
    font-weight: 700;
    pointer-events: none;
  }

  .category-tabs {
    width: 100%;
    padding-right: 30px;
  }

  .mobile-ranking-panel {
    display: block;
    order: -1;
  }

  .mobile-ranking-ad {
    display: block;
    order: -1;
  }

  .mobile-ranking-ad .ad-slot {
    margin: 0 auto;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 4px 16px rgba(10, 44, 86, 0.07);
  }

  .mobile-ranking-ad .ad-content,
  .mobile-ranking-ad .ad-content > * {
    display: block;
    margin: 0 auto;
  }

  .desktop-ranking-ad {
    display: none;
  }

  .desktop-ranking-panel {
    display: none;
  }

  .sidebar {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 700px) {
  .hero {
    min-height: 0;
  }

  .hero img {
    width: 100%;
    height: auto;
    min-height: 0;
    max-height: none;
    object-fit: contain;
    object-position: center center;
  }

  .ad-slot {
    max-width: min(100%, 320px);
    margin: 10px auto;
  }

  .ad-slot--sticky {
    margin: 0;
  }

  .tab {
    min-width: 76px;
    padding: 15px 12px 13px;
    font-size: 14px;
  }

  .article-row {
    position: relative;
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 9px;
    height: 84px;
    padding: 6px 7px;
  }

  .thumb {
    height: 60px;
  }

  .article-row h3 {
    margin: 4px 0 5px;
    font-size: 14px;
    line-height: 1.32;
  }

  .article-footer {
    display: block;
    gap: 6px;
  }

  .badges {
    position: absolute;
    right: 7px;
    bottom: 6px;
    gap: 4px;
    max-width: 132px;
    z-index: 1;
  }

  .meta {
    gap: 8px;
    padding-right: 140px;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
  }

  .pagination {
    gap: 6px;
    margin-top: 14px;
  }

  .page-link,
  .page-ellipsis {
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    font-size: 13px;
  }

  .sidebar {
    grid-template-columns: 1fr;
  }

  .form-page,
  .policy-page {
    padding: 20px;
  }
}
