/* 作ろう！ホームページ制作！ 共通スタイル
   差し色：イエロー（--yellow）とピンク（--pink）
   見出し：M PLUS Rounded 1c ／ 本文：Zen Kaku Gothic New */

:root {
  --yellow: #ffd23f;
  --yellow-soft: #fff4c2;
  --pink: #ff5c8a;
  --pink-dark: #e63e70;
  --pink-soft: #ffe3ec;
  --navy: #23263a;
  --ink: #2f3142;
  --ink-soft: #626577;
  --line: #ece6d8;
  --bg: #fffbf3;
  --white: #ffffff;
  --mint: #3cc6b4;
  --shadow: 0 12px 30px rgba(60, 40, 20, 0.10);
  --shadow-hover: 0 18px 40px rgba(230, 62, 112, 0.18);
  --radius: 18px;
  --font: "Zen Kaku Gothic New", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", Meiryo, sans-serif;
  --font-round: "M PLUS Rounded 1c", "Zen Kaku Gothic New", "Hiragino Maru Gothic ProN", sans-serif;
  --mono: "SFMono-Regular", Menlo, Consolas, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.95;
  letter-spacing: 0.03em;
  overflow-wrap: anywhere;
}

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

a {
  color: var(--pink-dark);
  text-underline-offset: 3px;
  transition: color 0.2s;
}

a:hover {
  color: var(--pink);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 100;
  background: var(--navy);
  color: #fff;
  padding: 8px 16px;
  border-radius: 8px;
}

.skip:focus {
  left: 8px;
}

/* ---------------------------------------------------------- 読み込みバー */

.progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  width: 0;
  z-index: 60;
  background: linear-gradient(90deg, var(--yellow), var(--pink));
  transition: width 0.1s linear;
}

/* ---------------------------------------------------------- ヘッダー */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 251, 243, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 3px solid var(--yellow);
}

.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--navy);
  margin-right: auto;
}

.logo img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  transition: transform 0.4s cubic-bezier(.34, 1.56, .64, 1);
}

.logo:hover img {
  transform: rotate(-8deg) scale(1.08);
}

.logo-text {
  font-family: var(--font-round);
  font-weight: 800;
  font-size: 1.2rem;
  line-height: 1.3;
}

.logo-text small {
  display: block;
  font-family: var(--font);
  font-weight: 500;
  font-size: 0.7rem;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
}

.global-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.global-nav a {
  position: relative;
  display: block;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--navy);
  text-decoration: none;
  font-family: var(--font-round);
  font-weight: 700;
  font-size: 0.92rem;
  transition: background 0.25s, color 0.25s;
}

.global-nav a:hover,
.global-nav a[aria-current="page"] {
  background: var(--yellow);
  color: var(--navy);
}

.menu-button {
  display: none;
  border: 0;
  background: var(--pink);
  width: 48px;
  height: 48px;
  border-radius: 14px;
  cursor: pointer;
  padding: 0;
  box-shadow: 0 6px 14px rgba(230, 62, 112, 0.3);
}

.menu-icon {
  display: grid;
  gap: 6px;
  width: 22px;
  margin: 0 auto;
}

.menu-icon span {
  display: block;
  height: 3px;
  border-radius: 3px;
  background: #fff;
  transition: transform 0.3s, opacity 0.3s;
}

.menu-open .menu-icon span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.menu-open .menu-icon span:nth-child(2) {
  opacity: 0;
}

.menu-open .menu-icon span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* ---------------------------------------------------------- レイアウト */

.main {
  display: block;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px 60px;
}

.container.narrow {
  max-width: 860px;
}

.breadcrumb ol {
  list-style: none;
  margin: 18px 0 10px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.breadcrumb li + li::before {
  content: "›";
  margin: 0 8px;
  color: var(--pink);
}

.breadcrumb a {
  color: var(--ink-soft);
}

/* ---------------------------------------------------------- トップ：ヒーロー */

.hero {
  position: relative;
  overflow: hidden;
  padding: 56px 20px 0;
  background:
    radial-gradient(circle at 12% 20%, var(--yellow-soft) 0, transparent 45%),
    radial-gradient(circle at 88% 30%, var(--pink-soft) 0, transparent 45%),
    var(--bg);
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 46% 54% 60% 40% / 50% 40% 60% 50%;
  filter: blur(2px);
  opacity: 0.55;
  animation: morph 14s ease-in-out infinite;
}

.blob-yellow {
  width: 340px;
  height: 340px;
  background: var(--yellow);
  left: -90px;
  bottom: 40px;
}

.blob-pink {
  width: 280px;
  height: 280px;
  background: var(--pink);
  right: -60px;
  top: -60px;
  opacity: 0.35;
  animation-delay: -6s;
}

.float-tag {
  position: absolute;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 6px 12px;
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow);
  color: var(--navy);
  animation: floaty 7s ease-in-out infinite;
}

.tag-1 { left: 6%; top: 18%; color: var(--pink-dark); }
.tag-2 { left: 44%; top: 8%; animation-delay: -2s; }
.tag-3 { right: 8%; bottom: 30%; background: var(--yellow); animation-delay: -4s; }
.tag-4 { left: 38%; bottom: 22%; color: var(--mint); animation-delay: -1s; }

.hero-inner {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 40px;
  align-items: center;
}

.hero-kicker {
  display: inline-block;
  margin: 0 0 12px;
  padding: 4px 14px;
  border-radius: 999px;
  background: var(--navy);
  color: var(--yellow);
  font-family: var(--font-round);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
}

.hero-title {
  margin: 0 0 18px;
  font-family: var(--font-round);
  font-weight: 800;
  font-size: clamp(2rem, 3.6vw, 2.7rem);
  line-height: 1.35;
  color: var(--navy);
}

.hl-yellow {
  background: linear-gradient(transparent 58%, var(--yellow) 58%);
  padding: 0 4px;
}

.hero-copy {
  margin: 0 0 24px;
  font-size: 1.02rem;
  color: var(--ink);
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 30px;
}

.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 999px;
  font-family: var(--font-round);
  font-weight: 800;
  text-decoration: none;
  transition: transform 0.25s, box-shadow 0.25s, background 0.25s;
}

.btn-pink {
  background: var(--pink);
  color: #fff;
  box-shadow: 0 8px 18px rgba(230, 62, 112, 0.35);
}

.btn-pink:hover {
  color: #fff;
  background: var(--pink-dark);
  transform: translateY(-3px);
}

.btn-ghost {
  background: #fff;
  color: var(--navy);
  border: 2px solid var(--navy);
}

.btn-ghost:hover {
  color: var(--navy);
  background: var(--yellow);
  transform: translateY(-3px);
}

.hero-visual {
  position: relative;
  padding-bottom: 40px;
}

.hero-image {
  width: 100%;
  border-radius: 26px;
  box-shadow: var(--shadow);
  border: 6px solid #fff;
  transform: rotate(1.5deg);
}

.browser {
  position: absolute;
  z-index: 2;
  left: -36px;
  bottom: 0;
  width: min(330px, 78%);
  background: var(--navy);
  border-radius: 14px;
  box-shadow: 0 16px 36px rgba(35, 38, 58, 0.35);
  overflow: hidden;
  animation: floaty 8s ease-in-out infinite;
}

.browser-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: #34384f;
}

.browser-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--pink);
}

.browser-bar span:nth-child(2) { background: var(--yellow); }
.browser-bar span:nth-child(3) { background: var(--mint); }

.browser-bar em {
  margin-left: 8px;
  font-style: normal;
  font-size: 0.7rem;
  color: #b9bccd;
}

.browser-code {
  margin: 0;
  padding: 14px 16px 16px;
  color: #f1f1f6;
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.8;
  white-space: pre-wrap;
}

.c-tag { color: var(--pink); }
.c-prop { color: var(--yellow); }
.c-key { color: #8be3d6; }
.c-val { color: #ffb3c8; }

.caret {
  display: inline-block;
  width: 8px;
  height: 1em;
  background: var(--yellow);
  vertical-align: -2px;
  animation: blink 1s steps(1) infinite;
}

.marquee {
  position: relative;
  margin: 10px -20px 0;
  overflow: hidden;
  background: var(--navy);
  color: #fff;
  padding: 10px 0;
  transform: rotate(-1.2deg);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 32s linear infinite;
}

.marquee span {
  font-family: var(--font-round);
  font-weight: 800;
  padding: 0 22px;
  white-space: nowrap;
}

.marquee span:nth-child(odd)::after {
  content: "★";
  color: var(--yellow);
  margin-left: 44px;
}

.marquee span:nth-child(even)::after {
  content: "●";
  color: var(--pink);
  margin-left: 44px;
}

/* ---------------------------------------------------------- 見出し・セクション */

section {
  margin: 56px 0;
}

.section-title {
  position: relative;
  margin: 0 0 24px;
  padding-left: 18px;
  font-family: var(--font-round);
  font-weight: 800;
  font-size: clamp(1.3rem, 2.6vw, 1.7rem);
  line-height: 1.5;
  color: var(--navy);
}

.section-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.25em;
  bottom: 0.25em;
  width: 7px;
  border-radius: 7px;
  background: linear-gradient(var(--yellow), var(--pink));
}

.intro {
  background: #fff;
  border-radius: var(--radius);
  padding: 30px clamp(20px, 4vw, 44px);
  box-shadow: var(--shadow);
  border-top: 6px solid var(--yellow);
}

.intro-about {
  border-top-color: var(--pink);
}

.intro p {
  margin: 0 0 1em;
}

.more {
  text-align: center;
  margin: 26px 0 0;
}

.more a {
  display: inline-block;
  padding: 10px 26px;
  border-radius: 999px;
  border: 2px solid var(--pink);
  font-family: var(--font-round);
  font-weight: 700;
  text-decoration: none;
  transition: background 0.25s, color 0.25s;
}

.more a:hover {
  background: var(--pink);
  color: #fff;
}

/* カテゴリ */

.category-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
}

.category-grid a {
  position: relative;
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--navy);
  transition: transform 0.35s cubic-bezier(.34, 1.56, .64, 1), box-shadow 0.35s;
}

.category-grid a:hover {
  transform: translateY(-6px) rotate(-0.6deg);
  box-shadow: var(--shadow-hover);
}

.category-grid img {
  aspect-ratio: 12 / 5;
  object-fit: cover;
  width: 100%;
}

.category-en {
  display: block;
  margin: 12px 16px 0;
  font-family: var(--font-round);
  font-weight: 800;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: var(--pink);
  text-transform: uppercase;
}

.category-name {
  display: block;
  margin: 0 16px;
  font-family: var(--font-round);
  font-weight: 800;
  line-height: 1.5;
}

.category-count {
  display: inline-block;
  margin: 8px 16px 16px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--yellow);
  font-size: 0.78rem;
  font-weight: 700;
}

/* ステップ一覧 */

.rank-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.rank-list a {
  display: grid;
  grid-template-columns: auto 96px 1fr;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.3s, box-shadow 0.3s;
}

.rank-list a:hover {
  transform: translateX(6px);
  box-shadow: var(--shadow-hover);
}

.rank-list img {
  width: 96px;
  height: 64px;
  object-fit: cover;
  border-radius: 10px;
}

.rank-no {
  font-family: var(--font-round);
  font-weight: 800;
  font-size: 0.78rem;
  color: var(--navy);
  background: var(--yellow-soft);
  border-radius: 10px;
  padding: 6px 8px;
  line-height: 1.2;
}

.rank-top .rank-no {
  background: var(--pink);
  color: #fff;
}

.rank-name {
  font-family: var(--font-round);
  font-weight: 700;
  line-height: 1.5;
}

.rank-name small {
  display: block;
  font-family: var(--font);
  font-weight: 400;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

/* ---------------------------------------------------------- カード */

.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.card a {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.35s cubic-bezier(.34, 1.56, .64, 1), box-shadow 0.35s;
}

.card a:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.card img {
  aspect-ratio: 3 / 2;
  object-fit: cover;
  width: 100%;
  transition: transform 0.6s;
}

.card a:hover img {
  transform: scale(1.05);
}

.card-body {
  display: block;
  padding: 14px 16px 18px;
}

.card-cat {
  display: inline-block;
  margin-bottom: 6px;
  padding: 1px 10px;
  border-radius: 999px;
  background: var(--pink-soft);
  color: var(--pink-dark);
  font-size: 0.74rem;
  font-weight: 700;
}

.card-title {
  display: block;
  margin: 0;
  font-family: var(--font-round);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.55;
}

.cards-wide {
  margin-top: 10px;
}

/* ---------------------------------------------------------- カテゴリページ */

.category-header {
  position: relative;
  margin: 10px 0 30px;
  border-radius: 26px;
  overflow: hidden;
  background: var(--navy);
  color: #fff;
}

.category-image {
  width: 100%;
  aspect-ratio: 12 / 5;
  object-fit: cover;
  opacity: 0.5;
}

.category-text {
  position: absolute;
  inset: auto 0 0 0;
  padding: 24px clamp(18px, 4vw, 40px);
  background: linear-gradient(transparent, rgba(35, 38, 58, 0.92));
}

.category-text h1 {
  margin: 0 0 6px;
  font-family: var(--font-round);
  font-weight: 800;
  font-size: clamp(1.5rem, 3.4vw, 2.3rem);
}

.category-text h1::after {
  content: "";
  display: block;
  width: 64px;
  height: 5px;
  margin-top: 8px;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--yellow), var(--pink));
}

.category-text p {
  margin: 0;
  font-size: 0.95rem;
}

/* ---------------------------------------------------------- 記事 */

.article {
  background: #fff;
  border-radius: 24px;
  padding: clamp(20px, 4vw, 48px);
  box-shadow: var(--shadow);
}

.article-cat {
  margin: 0;
}

.article-cat a {
  display: inline-block;
  padding: 2px 14px;
  border-radius: 999px;
  background: var(--yellow);
  color: var(--navy);
  font-weight: 700;
  font-size: 0.82rem;
  text-decoration: none;
}

.article-title {
  margin: 12px 0 10px;
  font-family: var(--font-round);
  font-weight: 800;
  font-size: clamp(1.5rem, 3.6vw, 2.1rem);
  line-height: 1.5;
  color: var(--navy);
}

.article-date,
.pr-note {
  margin: 0;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.pr-note {
  display: inline-block;
  margin-top: 6px;
  padding: 2px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.eyecatch {
  margin: 24px 0;
}

.eyecatch img {
  width: 100%;
  border-radius: 18px;
}

.lead {
  font-size: 1.05rem;
  padding: 18px 22px;
  background: var(--yellow-soft);
  border-radius: 14px;
  border-left: 6px solid var(--yellow);
}

.toc {
  margin: 30px 0;
  padding: 20px 24px;
  border: 2px dashed var(--pink);
  border-radius: 16px;
  background: #fffafc;
}

.toc-title {
  margin: 0 0 6px;
  font-family: var(--font-round);
  font-weight: 800;
  color: var(--pink-dark);
}

.toc ol {
  margin: 0;
  padding-left: 1.4em;
}

.toc a {
  color: var(--ink);
}

.article-body h2 {
  position: relative;
  margin: 2.4em 0 1em;
  padding: 14px 18px 14px 22px;
  border-radius: 14px;
  background: var(--navy);
  color: #fff;
  font-family: var(--font-round);
  font-weight: 800;
  font-size: clamp(1.2rem, 2.8vw, 1.45rem);
  line-height: 1.5;
  scroll-margin-top: 90px;
}

.article-body h2::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 12px;
  bottom: 12px;
  width: 5px;
  border-radius: 5px;
  background: linear-gradient(var(--yellow), var(--pink));
}

.article-body h3 {
  margin: 2em 0 0.8em;
  padding-bottom: 6px;
  font-family: var(--font-round);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--navy);
  background: linear-gradient(90deg, var(--yellow) 0 60px, var(--line) 60px) bottom / 100% 3px no-repeat;
}

.article-body p {
  margin: 0 0 1.3em;
}

.article-body strong {
  background: linear-gradient(transparent 62%, var(--yellow) 62%);
}

.list {
  margin: 0 0 1.5em;
  padding-left: 1.5em;
}

.list li {
  margin: 0.3em 0;
}

ul.list li::marker {
  color: var(--pink);
}

ol.list li::marker {
  color: var(--pink-dark);
  font-weight: 700;
}

.table-wrap {
  margin: 0 0 1.6em;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-wrap table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 0.93rem;
}

.table-wrap th,
.table-wrap td {
  padding: 10px 12px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.table-wrap th {
  background: var(--yellow-soft);
  font-family: var(--font-round);
}

.photo {
  margin: 0 0 1.6em;
}

.photo img {
  border-radius: 14px;
}

.photo figcaption {
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin-top: 6px;
}

.code {
  margin: 0 0 1.6em;
  padding: 18px 20px;
  border-radius: 14px;
  background: var(--navy);
  color: #f6f6fb;
  font-family: var(--mono);
  font-size: 0.86rem;
  line-height: 1.7;
  overflow-x: auto;
  border-top: 5px solid var(--yellow);
}

.box {
  margin: 0 0 1.6em;
  padding: 18px 22px;
  border-radius: 16px;
  background: #fff;
  border: 2px solid var(--line);
}

.box p {
  margin: 0 0 0.6em;
}

.box p:last-child {
  margin-bottom: 0;
}

.box ul {
  margin: 0;
  padding-left: 1.4em;
}

.box-title {
  font-family: var(--font-round);
  font-weight: 800;
  margin-bottom: 6px !important;
}

.box-title::before {
  margin-right: 6px;
}

.box-point { border-color: var(--yellow); background: var(--yellow-soft); }
.box-point .box-title::before { content: "★"; color: #e5a800; }
.box-my { border-color: var(--pink); background: #fff6f9; }
.box-my .box-title::before { content: "♡"; color: var(--pink); }
.box-caution { border-color: #ff9d5c; background: #fff4ec; }
.box-caution .box-title::before { content: "！"; color: #e8732b; }
.box-memo, .box-data, .box-update, .box-step, .box-set, .box-code { border-color: var(--mint); background: #f0fbf9; }
.box-memo .box-title::before, .box-data .box-title::before, .box-update .box-title::before,
.box-step .box-title::before, .box-set .box-title::before, .box-code .box-title::before { content: "●"; color: var(--mint); }

.official {
  margin: 2em 0;
  padding: 20px 24px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--yellow-soft), var(--pink-soft));
  text-align: center;
}

.official-title {
  margin: 0;
  font-family: var(--font-round);
  font-weight: 800;
}

.official a {
  display: inline-block;
  margin: 8px 0;
  padding: 10px 26px;
  border-radius: 999px;
  background: var(--pink);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.official-note {
  margin: 0;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

/* ---------------------------------------------------------- 広告 */

.ad {
  margin: 34px 0;
  min-height: 120px;
}

.ad-label {
  margin: 0 0 4px;
  font-size: 0.72rem;
  color: var(--ink-soft);
  text-align: center;
  letter-spacing: 0.1em;
}

/* ---------------------------------------------------------- 関連記事 */

.related {
  margin-top: 46px;
}

.related .cards {
  grid-template-columns: repeat(3, 1fr);
}

/* ---------------------------------------------------------- 検索 */

.search-form {
  display: flex;
  gap: 8px;
  margin: 0 0 16px;
}

.search-form input {
  flex: 1;
  min-width: 0;
  padding: 12px 16px;
  border: 2px solid var(--line);
  border-radius: 999px;
  font: inherit;
}

.search-form input:focus {
  outline: none;
  border-color: var(--pink);
}

.search-form button {
  border: 0;
  border-radius: 999px;
  padding: 0 24px;
  background: var(--pink);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.search-status {
  font-weight: 700;
}

/* ---------------------------------------------------------- フッター */

.site-footer {
  position: relative;
  margin-top: 40px;
  background: var(--navy);
  color: #e9e9f2;
  padding: 56px 20px 24px;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--yellow), var(--pink), var(--yellow));
  background-size: 200% 100%;
  animation: slide 8s linear infinite;
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
}

.footer-logo {
  font-family: var(--font-round);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--yellow);
  margin: 0 0 10px;
}

.footer-about p {
  font-size: 0.88rem;
}

.footer-note {
  color: #b9bccd;
}

.footer-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 20px;
}

.footer-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-nav a {
  display: inline-block;
  padding: 3px 0;
  color: #e9e9f2;
  font-size: 0.88rem;
  text-decoration: none;
}

.footer-nav a:hover {
  color: var(--yellow);
}

.copyright {
  max-width: 1180px;
  margin: 30px auto 0;
  padding-top: 18px;
  border-top: 1px solid #3c4058;
  font-size: 0.78rem;
  color: #b9bccd;
  text-align: center;
}

.to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--navy);
  font-weight: 800;
  font-size: 1.3rem;
  text-decoration: none;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(20px) scale(0.8);
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
}

.to-top.is-shown {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.to-top:hover {
  background: var(--pink);
  color: #fff;
}

/* ---------------------------------------------------------- フワッと表示 */

.fade-in {
  animation: fadeUp 0.9s cubic-bezier(.22, 1, .36, 1) both;
}

.hero-text .fade-in:nth-child(2) { animation-delay: 0.12s; }
.hero-text .fade-in:nth-child(3) { animation-delay: 0.24s; }
.hero-text .fade-in:nth-child(4) { animation-delay: 0.36s; }
.hero-visual.fade-in { animation-delay: 0.3s; }

.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s cubic-bezier(.22, 1, .36, 1), transform 0.8s cubic-bezier(.22, 1, .36, 1);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

.js .cards .reveal:nth-child(3n+2),
.js .category-grid .reveal:nth-child(3n+2),
.js .rank-list .reveal:nth-child(2n) {
  transition-delay: 0.1s;
}

.js .cards .reveal:nth-child(3n),
.js .category-grid .reveal:nth-child(3n) {
  transition-delay: 0.2s;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

@keyframes morph {
  0%, 100% { border-radius: 46% 54% 60% 40% / 50% 40% 60% 50%; transform: translate(0, 0) rotate(0); }
  50% { border-radius: 60% 40% 42% 58% / 40% 60% 40% 60%; transform: translate(20px, -16px) rotate(20deg); }
}

@keyframes blink {
  50% { opacity: 0; }
}

@keyframes marquee {
  to { transform: translateX(-50%); }
}

@keyframes slide {
  to { background-position: 200% 0; }
}

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

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ---------------------------------------------------------- タブレット・スマホ */

@media (max-width: 960px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .browser {
    left: 10px;
  }

  .cards,
  .related .cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .rank-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1040px) {
  .menu-button {
    display: block;
  }

  .global-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 3px solid var(--pink);
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.08);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
  }

  .menu-open .global-nav {
    max-height: 80vh;
  }

  .global-nav ul {
    display: block;
    padding: 10px 20px 18px;
  }

  .global-nav a {
    padding: 12px 14px;
    border-bottom: 1px dashed var(--line);
    border-radius: 10px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 16px;
    line-height: 1.9;
  }

  .header-inner {
    padding: 8px 16px;
  }

  .logo-text {
    font-size: 1.02rem;
  }

  .logo-text small {
    display: none;
  }

  .hero {
    padding: 34px 16px 0;
  }

  .container {
    padding: 0 16px 40px;
  }

  .cards,
  .related .cards {
    gap: 12px;
  }

  .card-body {
    padding: 10px 10px 12px;
  }

  .card-title {
    font-size: 0.86rem;
  }

  .card-cat {
    font-size: 0.66rem;
  }

  .rank-list a {
    grid-template-columns: auto 72px 1fr;
    gap: 10px;
    padding: 10px 12px;
  }

  .rank-list img {
    width: 72px;
    height: 48px;
  }

  .article {
    border-radius: 18px;
  }

  .category-text {
    position: static;
    background: var(--navy);
  }

  .category-image {
    opacity: 0.85;
  }

  .float-tag {
    font-size: 0.75rem;
  }

  .float-tag {
    display: none;
  }

  .footer-nav {
    grid-template-columns: 1fr;
  }
}
