/* トップページだけの見た目（共通の見た目は base.css）
   明るい灰色の地に白いタイル、区切りに黒の帯。色はロゴの7色を小さな点にだけ使う。
   英字の見出しは Outfit を細めに大きく、日本語は小さく添える */
.top-page {
  --bg: #f0f0f0;
  --bg-rgb: 240, 240, 240;
  --surface: #ffffff;
  --surface-rgb: 255, 255, 255;
  --text: #111111;
  --text-rgb: 17, 17, 17;
  --muted: #666b75;
  --line: #e2e2e2;
  --line-rgb: 226, 226, 226;
  --accent: #3240ff;
  --accent-weak: #eceeff;
  --tile-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 10px 28px -14px rgba(0, 0, 0, .18);
  --tile-shadow-hover: 0 2px 4px rgba(0, 0, 0, .05), 0 22px 40px -18px rgba(0, 0, 0, .28);
  --grid-line: rgba(0, 0, 0, .04);
  --band: #111111;
  /* エンボス：地より少し明るい面に、右下の影と左上の光 */
  --emboss-face: #f3f3f3;
  --emboss: 8px 10px 20px rgba(0, 0, 0, .08), -6px -6px 14px rgba(255, 255, 255, .85), inset 0 1px 0 rgba(255, 255, 255, .7);
  --emboss-hover: 12px 16px 28px rgba(0, 0, 0, .11), -6px -6px 14px rgba(255, 255, 255, .9), inset 0 1px 0 rgba(255, 255, 255, .8);
  overflow-x: clip;
}
:root[data-theme=dark] .top-page {
  --bg: #121212;
  --bg-rgb: 18, 18, 18;
  --surface: #1c1c1c;
  --surface-rgb: 28, 28, 28;
  --text: #f2f2f2;
  --text-rgb: 242, 242, 242;
  --muted: #a3a6ad;
  --line: #2c2c2c;
  --line-rgb: 44, 44, 44;
  --accent: #8f99ff;
  --accent-weak: #23264a;
  --tile-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 30px -16px rgba(0, 0, 0, .7);
  --tile-shadow-hover: 0 2px 4px rgba(0, 0, 0, .3), 0 22px 40px -18px rgba(0, 0, 0, .8);
  --grid-line: rgba(255, 255, 255, .04);
  --band: #050505;
  --emboss-face: #161616;
  --emboss: 8px 10px 20px rgba(0, 0, 0, .55), -6px -6px 14px rgba(255, 255, 255, .03), inset 0 1px 0 rgba(255, 255, 255, .04);
  --emboss-hover: 12px 16px 28px rgba(0, 0, 0, .65), -6px -6px 14px rgba(255, 255, 255, .04), inset 0 1px 0 rgba(255, 255, 255, .05);
}
.top-main, .top-page .site-footer .inner {
  max-width: 1240px;
  padding-inline: clamp(16px, 3.2vw, 40px);
}
.top-page .site-header .inner { min-height: 64px; }
/* ヘッダーは地の灰色になじませる */
.top-page .site-header { background: rgba(var(--bg-rgb), .86); border-bottom-color: transparent; }
@supports (color: color-mix(in srgb, red 50%, blue)) {
  .top-page .site-header { background: color-mix(in srgb, var(--bg) 86%, transparent); }
}
.top-page .site-header .site-control { background: transparent; border-color: rgba(var(--text-rgb), .14); color: var(--text); }
@supports (color: color-mix(in srgb, red 50%, blue)) {
  .top-page .site-header .site-control { border-color: color-mix(in srgb, var(--text) 14%, transparent); }
}
.top-page .site-footer { background: #0c0c0c; }

/* ---- FV：中央にロゴ・キャッチコピー・件数・検索 ---- */
.top-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-height: clamp(560px, 48vw, 700px);
  margin-inline: calc(50% - 50vw);
  padding: 64px 16px 72px;
  text-align: center;
  overflow: hidden;
}
/* 格子のマス目に、ツールの画面・白い浮いた四角・ロゴの色の四角を並べる（中央はあける） */
.top-hero { --cell: 160px; }
.top-hero-grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(var(--grid-line) 1px, transparent 1px) calc(50% + var(--cell) / 2) 0 / var(--cell) var(--cell),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) calc(50% + var(--cell) / 2) 0 / var(--cell) var(--cell);
  /* 中央（ロゴと検索の後ろ）と下の端は、格子を薄く消す */
  -webkit-mask-image: radial-gradient(ellipse 30% 46% at 50% 46%, transparent 55%, #000 100%), linear-gradient(180deg, #000 78%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: radial-gradient(ellipse 30% 46% at 50% 46%, transparent 55%, #000 100%), linear-gradient(180deg, #000 78%, transparent);
  mask-composite: intersect;
}
.top-hero-grid > * {
  position: absolute;
  left: calc(50% + var(--x) * var(--cell) + var(--dx, 0px));
  top: calc(var(--y) * var(--cell) + var(--dy, 0px));
}
.m-fill { width: var(--cell); height: var(--cell); background: rgba(var(--text-rgb), .02); }
@supports (color: color-mix(in srgb, red 50%, blue)) {
  .m-fill { background: color-mix(in srgb, var(--text) 2%, transparent); }
}
.m-shot { width: calc(var(--cell) + 1px); height: calc(var(--cell) + 1px); overflow: hidden; background: #fff; }
/* ツールの画面は色を抜いて薄いグレーに（主役のロゴと検索より目立たせない） */
.m-shot { background: transparent; }
.m-shot img { display: block; width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(.8); opacity: .26; mix-blend-mode: multiply; }
:root[data-theme=dark] .m-shot img { filter: grayscale(1) invert(1) contrast(.8); opacity: .18; mix-blend-mode: screen; }
.m-glass {
  width: var(--s);
  height: var(--s);
  border-radius: 4px;
  background: var(--bg);
  box-shadow: 14px 18px 34px rgba(0, 0, 0, .06), -4px -4px 12px rgba(255, 255, 255, .6), inset 0 1px 0 rgba(255, 255, 255, .8);
  animation: m-float 10s ease-in-out infinite alternate;
}
:root[data-theme=dark] .m-glass { background: #1f1f1f; box-shadow: 14px 18px 30px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .06); }
/* ロゴの色の丸。大きさと揺れる速さをばらばらにして、ふわふわ浮かせる */
.m-sq {
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 calc(var(--s) * .3) calc(var(--s) * .5) calc(var(--s) * -.2) rgba(var(--c-rgb, 50, 64, 255), .5);
  /* 上下だけに、ゆっくり往復させる（transform で動かすと、なめらかに描ける） */
  will-change: transform;
  animation: m-bob var(--t, 4s) ease-in-out var(--d, 0s) infinite alternate;
}
@supports (color: color-mix(in srgb, red 50%, blue)) {
  .m-sq { box-shadow: 0 calc(var(--s) * .3) calc(var(--s) * .5) calc(var(--s) * -.2) color-mix(in srgb, var(--c) 50%, transparent); }
}
.m-mark { color: rgba(var(--text-rgb), .20); font: 500 10px/1 var(--easelet-font); letter-spacing: .14em; }
@supports (color: color-mix(in srgb, red 50%, blue)) {
  .m-mark { color: color-mix(in srgb, var(--text) 20%, transparent); }
}
@keyframes m-bob {
  from { transform: translate3d(0, -14px, 0); }
  to { transform: translate3d(0, 14px, 0); }
}
@keyframes m-float {
  from { transform: translate3d(0, -5px, 0); }
  to { transform: translate3d(0, 5px, 0); }
}
.top-hero-body { width: min(720px, 100%); }
.top-hero h1 { margin: 0; letter-spacing: 0; }
.top-logo { display: block; }
.top-logo img { width: min(380px, 72vw); height: auto; margin-inline: auto; }
.top-catch {
  display: block;
  margin-top: 20px;
  font-size: clamp(15px, 1.4vw, 17px);
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: .12em;
}
/* 件数：数字は細めの書体で大きく、前後の言葉は小さく下にそろえる */
.top-count {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 14px;
  margin: 26px 0 34px;
  line-height: 1;
}
.top-count-label { color: var(--text); font-size: 18px; font-weight: 700; letter-spacing: .1em; }
/* 数字は白。うしろに検索欄と同じ虹色のぼかしを敷いて、縁をぼんやり光らせる（書体・太さは Outfit の 300 のまま） */
.top-count-num {
  position: relative;
  isolation: isolate;
  font: 300 clamp(72px, 8vw, 104px)/.8 var(--easelet-font);
  letter-spacing: -.04em;
  color: #fff;
}
.top-count-num::before {
  content: attr(data-n);
  content: attr(data-n) / "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, #ff9200, #60b800, #60b8e0, #9a68e0, #ed68e0, #3240ff, #ff5800);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-stroke: 6px transparent;
  filter: blur(7px);
  opacity: .9;
}

/* 検索欄：縁をロゴの7色の虹色にして、うしろにぼんやり光らせる。ボタンは黒 */
.top-search { text-align: start; }
.top-search-field {
  --rainbow: linear-gradient(90deg, #ff9200, #60b800, #60b8e0, #9a68e0, #ed68e0, #3240ff, #ff5800, #ff9200);
  position: relative;
  isolation: isolate;
  padding: 2px;
  border-radius: 999px;
  background: var(--rainbow) 0 0 / 200% 100%;
  animation: rainbow-flow 8s linear infinite;
}
.top-search-field::before {
  content: "";
  position: absolute;
  inset: 6px 4%;
  z-index: -1;
  border-radius: 999px;
  background: inherit;
  background-size: 200% 100%;
  filter: blur(18px);
  opacity: .55;
  animation: inherit;
}
@keyframes rainbow-flow {
  to { background-position: 200% 0; }
}
.top-search input {
  min-height: 66px;
  padding: 12px 124px 12px 60px;
  border: 0;
  border-radius: 999px;
  background: var(--surface);
  font-size: 17px;
}
.top-search input:focus { outline: none; }
.top-search-field:focus-within::before { opacity: .85; }
.top-search input::placeholder { color: var(--muted); opacity: .8; }
.top-search-icon {
  position: absolute;
  top: 50%;
  inset-inline-start: 26px;
  width: 17px;
  height: 17px;
  margin-top: -10px;
  border: 2px solid var(--text);
  border-radius: 50%;
  pointer-events: none;
}
.top-search-icon::after {
  content: "";
  position: absolute;
  right: -5px;
  bottom: -3px;
  width: 7px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transform: rotate(45deg);
}
.top-search-go {
  position: absolute;
  top: 50%;
  inset-inline-end: 9px;
  transform: translateY(-50%);
  min-width: 100px;
  height: 50px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: var(--text);
  color: var(--surface);
  font: 700 17px/1 var(--font);
  letter-spacing: .12em;
  cursor: pointer;
  transition: background .15s;
}
.top-search-go:hover { background: var(--accent); color: #fff; }
.top-search-go:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.top-benefits {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 22px;
  margin: 22px 0 0;
  padding: 0;
  color: var(--muted);
  font-size: 13px;
  list-style: none;
}
.top-benefits li { display: inline-flex; align-items: center; gap: 8px; }
.top-benefits li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--dot, #60b800); }
.top-benefits li:nth-child(2) { --dot: #ff9200; }
.top-benefits li:nth-child(3) { --dot: #60b8e0; }

/* ---- 見出し：日本語を小さく上に、英字を細く大きく ---- */
.top-collection, .top-directory { margin-top: clamp(56px, 7vw, 104px); }
.top-hero + .top-collection, .top-hero + [hidden] + .top-collection, .news-latest + .top-collection, .top-favorites + .top-collection { margin-top: 0; }
.top-head { display: flex; flex-direction: column-reverse; gap: 10px; margin: 0; }
.top-head-jp { font-size: 14px; font-weight: 600; letter-spacing: .08em; }
.top-head-en {
  font: 400 clamp(44px, 6vw, 80px)/.95 var(--easelet-font);
  letter-spacing: -.035em;
}
.top-head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 40px;
  margin-bottom: clamp(28px, 3.4vw, 44px);
}
.top-section-lead { margin: 0; color: var(--muted); font-size: 14px; }
/* お気に入り：白い帯にして FV と分ける。まだないときは、点線の枠で案内を出す */
.top-favorites {
  margin-inline: calc(50% - 50vw);
  padding: clamp(48px, 6vw, 80px) 0;
  background: var(--surface);
  border-top: 1px solid var(--line);
}
:root[data-theme=dark] .top-favorites { background: #181818; }
.top-favorites-inner { max-width: 1240px; margin-inline: auto; padding-inline: clamp(16px, 3.2vw, 40px); }
.top-favorites .top-head-en { font-size: clamp(36px, 4.4vw, 56px); }
.top-favorites .top-head-row { margin-bottom: 24px; }
.top-favorites { --emboss-face: var(--surface); }
.top-fav-empty {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0;
  padding: 22px 24px;
  border: 1.5px dashed rgba(var(--text-rgb), .16);
  border-radius: 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}
@supports (color: color-mix(in srgb, red 50%, blue)) {
  .top-fav-empty { border: 1.5px dashed color-mix(in srgb, var(--text) 16%, transparent); }
}
.top-fav-star {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(rgba(255, 146, 0, .12), rgba(255, 146, 0, .12)), var(--surface);
  color: #ff9200;
  font-size: 20px;
}
@supports (color: color-mix(in srgb, red 50%, blue)) {
  .top-fav-star { background: color-mix(in srgb, #ff9200 12%, var(--surface)); }
}

/* ---- おすすめ：うっすら道具の街の絵を敷き、写真付きの縦長カードを横に送る ---- */
/* 黒の帯で FV と分ける。道具の街の絵は白黒を反転して、黒地にうっすら浮かべる */
.top-recommended {
  position: relative;
  isolation: isolate;
  margin-inline: calc(50% - 50vw);
  padding: clamp(64px, 8vw, 112px) 0 clamp(48px, 6vw, 88px);
  overflow: hidden;
  background: var(--band);
  color: #f2f2f2;
  --surface: #1c1c1c;
  --surface-rgb: 28, 28, 28;
  --text: #f2f2f2;
  --text-rgb: 242, 242, 242;
  --muted: #9a9ea6;
  --line: #2a2a2a;
  --line-rgb: 42, 42, 42;
}
.top-recommended::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: min(70%, 620px);
  z-index: -1;
  background: url("/assets/img/rec-bg.webp") 50% 40% / cover no-repeat;
  filter: invert(1) contrast(1.25);
  opacity: .34;
  -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent);
  mask-image: linear-gradient(180deg, #000 30%, transparent);
}
.top-recommended-inner {
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: clamp(16px, 3.2vw, 40px);
}
.rec-nav { display: flex; gap: 10px; }
.rec-nav button {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  font: 400 18px/1 var(--easelet-font);
  cursor: pointer;
  transition: background .2s, color .2s;
}
.rec-nav button:hover:not(:disabled) { background: #fff; color: #111; }
.rec-nav button:disabled { opacity: .35; cursor: default; }
.rec-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(240px, calc((100% - 60px) / 4), 300px);
  gap: 20px;
  margin-inline: calc(-1 * clamp(16px, 3.2vw, 40px));
  padding: 10px clamp(16px, 3.2vw, 40px) 30px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: clamp(16px, 3.2vw, 40px);
  scrollbar-width: none;
}
.rec-track::-webkit-scrollbar { display: none; }
.rec-track:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
/* カード：写真を枠の内側に収め、文字は写真の下に置く。マウスを乗せると、うしろに虹色の光 */
.rec-card { position: relative; min-width: 0; isolation: isolate; scroll-snap-align: start; }
.rec-card::before {
  content: "";
  position: absolute;
  inset: 14px 4px -2px;
  z-index: -1;
  border-radius: 22px;
  background: linear-gradient(90deg, #ff9200, #60b800, #60b8e0, #9a68e0, #ed68e0, #3240ff, #ff5800);
  filter: blur(14px);
  opacity: 0;
  transform: scale(.94);
  transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .2, 1);
  pointer-events: none;
}
.rec-card:hover::before { opacity: .45; transform: scale(1); }
.rec-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 22px;
  background: #1b1b1b;
  color: #fff;
  text-decoration: none;
}
.rec-photo { position: relative; aspect-ratio: 5 / 4; overflow: hidden; border-radius: 14px; background: #2a2a2a; }
.rec-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 45%;
  transition: transform .8s cubic-bezier(.2, .7, .2, 1);
}
.rec-link:hover .rec-img { transform: scale(1.06); }
.rec-body { display: flex; flex: 1; flex-direction: column; padding: 18px 10px 8px; }
.rec-cat { display: flex; align-items: center; gap: 7px; color: rgba(255, 255, 255, .55); font-size: 12px; letter-spacing: .06em; }
.rec-cat::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--c, #fff); }
.rec-name { margin: 10px 0 0; color: #fff; font-size: 18px; font-weight: 700; line-height: 1.45; letter-spacing: .03em; }
.rec-desc { margin: 8px 0 0; color: rgba(255, 255, 255, .6); font-size: 12.5px; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rec-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 18px;
  color: rgba(255, 255, 255, .8);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .06em;
}
.rec-arrow {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  font: 400 15px/1 var(--easelet-font);
  transition: background .4s, color .4s, transform .4s cubic-bezier(.2, .7, .2, 1);
}
.rec-link:hover .rec-arrow { background: #fff; color: #111; transform: translateX(3px); }
.rec-card .favorite-button {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 0;
  background: rgba(0, 0, 0, .28);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #fff;
}
.rec-card .favorite-button[aria-pressed=true] { color: #ffb648; }
.rec-card .favorite-button:hover { background: rgba(0, 0, 0, .45); }

/* ---- 分類の切り替え ---- */
.top-tabs-frame {
  position: sticky;
  top: 64px;
  z-index: 3;
  margin-inline: -6px;
  padding: 10px 6px;
  background: rgba(var(--bg-rgb), .90);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
@supports (color: color-mix(in srgb, red 50%, blue)) {
  .top-tabs-frame { background: color-mix(in srgb, var(--bg) 90%, transparent); }
}
.top-tabs-frame.has-more-tabs::after {
  content: "";
  position: absolute;
  inset: 0 0 0 auto;
  width: 40px;
  background: linear-gradient(90deg, transparent, var(--bg));
  pointer-events: none;
}
#category-tabs { display: flex; flex-wrap: wrap; gap: 8px; scrollbar-width: none; }
#category-tabs::-webkit-scrollbar { display: none; }
.top-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 5px 15px;
  border-radius: 999px;
  box-shadow: var(--emboss);
  color: var(--text);
  font: 600 13px/1.4 var(--font);
  white-space: nowrap;
  cursor: pointer;
}
.top-tab-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--c, var(--text)); }
/* マウスを乗せたとき：線ではなく、うしろに虹色の光をぼんやり出す（ゆっくり、ふわっと） */
/* ボタンは、面（::before）を光（::after）より手前に重ねて、光が文字にかからないようにする */
.top-tab, .top-tool .tool-card { border: 0; background: var(--emboss-face); }
.top-tab { background: transparent; }
.top-tab::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: var(--emboss-face); }
.top-tab[aria-selected=true]::before { background: var(--text); }
.top-tab { position: relative; isolation: isolate; }
.top-tool { isolation: isolate; }
.top-tab::after, .top-tool::before {
  content: "";
  position: absolute;
  z-index: -1;
  background: linear-gradient(90deg, #ff9200, #60b800, #60b8e0, #9a68e0, #ed68e0, #3240ff, #ff5800);
  opacity: 0;
  transform: scale(.9);
  transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .2, 1);
  pointer-events: none;
}
.top-tab::after { z-index: -2; inset: 3px 0 -3px; border-radius: 999px; filter: blur(6px); }
.top-tool::before { inset: 6px 0 -4px; border-radius: 12px; filter: blur(10px); }
.top-tab:hover:not([aria-selected=true])::after { opacity: .6; transform: scale(1); }
.top-tool:hover::before { opacity: .55; transform: scale(1); }
.top-tab[aria-selected=true] { color: var(--surface); }
.top-tab[aria-selected=true] .top-tab-dot { background: var(--c, var(--surface)); }
.top-tab-count { color: var(--muted); font: 500 12px/1 var(--easelet-font); }
.top-tab[aria-selected=true] .top-tab-count { color: rgba(var(--surface-rgb), .70); }
@supports (color: color-mix(in srgb, red 50%, blue)) {
  .top-tab[aria-selected=true] .top-tab-count { color: color-mix(in srgb, var(--surface) 70%, transparent); }
}
.top-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.top-directory [role=tabpanel] { margin-top: 18px; }

/* ---- 分類ごとの一覧 ---- */
.top-category { padding-top: 34px; }
.top-category + .top-category { margin-top: clamp(28px, 3vw, 44px); border-top: 1px solid var(--line); }
.top-category .category-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
  margin: 0;
  color: var(--text);
  font-size: clamp(20px, 2vw, 24px);
  letter-spacing: .04em;
  line-height: 1.4;
}
.top-category-en {
  flex-basis: 100%;
  color: var(--muted);
  font: 500 12px/1 var(--easelet-font);
  letter-spacing: .16em;
}
.top-category-count { color: var(--muted); font: 400 18px/1 var(--easelet-font); }
.top-category .category-title { align-items: center; }
.top-category .category-title .top-tool-icon { width: 40px; height: 40px; margin-right: -4px; }
.top-category-desc, .top-empty { margin: 8px 0 20px; color: var(--muted); font-size: 14px; }

/* ---- カード：上にツールの画面の見本の枠、下にツール名と説明 ---- */
.top-page .tool-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.top-tool { position: relative; min-width: 0; }
.top-tool .tool-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 8px;
  border-radius: 14px;
  box-shadow: var(--emboss);
  transition: box-shadow .5s ease, transform .5s cubic-bezier(.2, .7, .2, 1);
}
.top-tool .tool-card:hover { transform: translateY(-2px); box-shadow: var(--emboss-hover); }
.top-shot {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 10;
  border-radius: 10px;
  background: radial-gradient(circle at 50% 45%, rgba(var(--c-rgb, 50, 64, 255), .07), transparent 70%),
    linear-gradient(rgba(var(--text-rgb), .04), rgba(var(--text-rgb), .04)), var(--emboss-face);

}
@supports (color: color-mix(in srgb, red 50%, blue)) {
  .top-shot {
    background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--c, #3240ff) 7%, transparent), transparent 70%),
      color-mix(in srgb, var(--text) 4%, var(--emboss-face));
  }
}
/* マウスを乗せると、枠の背景が分類の色のグラデーションに、ふわっと変わる */
.top-shot { position: relative; isolation: isolate; overflow: hidden; }
.top-shot::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(circle at 20% 15%, rgba(255, 255, 255, .55), transparent 45%),
    radial-gradient(circle at 85% 90%, var(--c-hover-glow, rgb(96.75, 74, 247.25)), transparent 60%),
    linear-gradient(135deg, var(--c-hover-start, rgb(162.75, 169.05, 255)), var(--c-hover-end, rgba(47.22222, 60.44444, 240.83333, .9)));

  opacity: 0;
  transform: scale(1.06);
  transition: opacity .6s ease, transform .8s cubic-bezier(.2, .7, .2, 1);
}
@supports (color: color-mix(in srgb, red 50%, blue)) {
  .top-shot::before {
    background: radial-gradient(circle at 20% 15%, color-mix(in srgb, #fff 55%, transparent), transparent 45%),
      radial-gradient(circle at 85% 90%, color-mix(in srgb, var(--c, #3240ff) 75%, #ed68e0), transparent 60%),
      linear-gradient(135deg, color-mix(in srgb, var(--c, #3240ff) 45%, #fff), color-mix(in srgb, var(--c, #3240ff) 85%, #000 5%));
  }
}
.top-tool .tool-card:hover .top-shot::before { opacity: 1; transform: none; }
.top-shot .top-tool-icon { transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.top-tool .tool-card:hover .top-shot .top-tool-icon { transform: scale(1.08); }
.top-shot .top-tool-icon { width: 56px; height: 56px; background: var(--emboss-face); box-shadow: 0 6px 16px -8px rgba(0, 0, 0, .25); }
.top-shot .top-tool-icon svg { width: 26px; height: 26px; }
.top-tool-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(rgba(var(--c-rgb, 50, 64, 255), .09), rgba(var(--c-rgb, 50, 64, 255), .09)), var(--surface);
  color: var(--icon-ink, var(--c-ink-light, rgb(45.05, 56.95, 219.3)));
}
:root[data-theme=dark] .top-tool-icon, .top-recommended .top-tool-icon {
  --icon-ink: var(--c-ink-dark, rgb(78.8, 90.7, 253.05));
}
@supports (color: color-mix(in srgb, red 50%, blue)) {
  .top-tool-icon { background: color-mix(in srgb, var(--c, #3240ff) 9%, var(--surface)); color: color-mix(in srgb, var(--c, #3240ff) 85%, var(--text)); }
}
.top-tool-icon svg { width: 20px; height: 20px; }
.top-card-copy { min-width: 0; padding: 14px 8px 8px; overflow-wrap: anywhere; }
.top-card-copy .name { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.5; letter-spacing: .03em; }
.top-card-copy .desc {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.7;
  letter-spacing: .02em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.top-tool .favorite-button {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  font-size: 16px;
}
.top-tool .favorite-button[aria-pressed=true] { color: #ff9200; }
.top-tool .favorite-button:hover { background: rgba(var(--text-rgb), .06); }
@supports (color: color-mix(in srgb, red 50%, blue)) {
  .top-tool .favorite-button:hover { background: color-mix(in srgb, var(--text) 6%, transparent); }
}
.top-more { display: none; }

@media (max-width: 1060px) {
  .top-page .tool-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  #category-tabs { flex-wrap: nowrap; overflow-x: auto; padding: 2px 2px 8px; }
}
@media (max-width: 760px) {
  .top-page .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .top-hero { min-height: 0; padding: 56px 16px 56px; }
  /* スマホ：マス目は上の2段だけ。その下にロゴと検索 */
  .top-hero { --cell: 92px; padding-top: calc(var(--cell) * 2 + 30px); }
  .top-hero-grid > .m-pc { display: none; }
  .top-hero-grid > * { left: calc(50% + var(--mx) * var(--cell) + var(--mdx, 0px)); top: calc(var(--my) * var(--cell) + var(--mdy, 0px)); }
  .top-hero-grid { -webkit-mask-image: linear-gradient(180deg, #000 calc(var(--cell) * 2), transparent calc(var(--cell) * 2 + 1px)); mask-image: linear-gradient(180deg, #000 calc(var(--cell) * 2), transparent calc(var(--cell) * 2 + 1px)); -webkit-mask-composite: source-over; mask-composite: add; }
  .m-glass { width: calc(var(--s) * .6); height: calc(var(--s) * .6); }
}
@media (max-width: 600px) {
  .top-page .site-header .inner { min-height: 56px; }
  .top-tabs-frame { top: 56px; }
  .top-page .tool-grid { gap: 10px; }
  .top-catch { letter-spacing: .06em; }
  .top-count { gap: 10px; margin: 22px 0 28px; }
  .top-search input { min-height: 58px; padding-inline: 50px 100px; font-size: 16px; }
  .top-search input::placeholder { font-size: 14px; }
  .top-search-icon { inset-inline-start: 22px; }
  .top-search-go { min-width: 80px; height: 44px; padding: 0 16px; }
  .top-page .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .top-shot { aspect-ratio: 4 / 3; }
  .top-shot .top-tool-icon { width: 44px; height: 44px; }
  .top-card-copy { padding: 10px 4px 4px; }
  .top-card-copy .name { font-size: 14px; }
  .top-card-copy .desc { font-size: 12px; }
  .top-tool .favorite-button { top: 10px; right: 10px; width: 30px; height: 30px; font-size: 14px; }
  .top-head-row { margin-bottom: 24px; }
  .rec-track { grid-auto-columns: 74%; gap: 14px; }
  .rec-nav button { width: 42px; height: 42px; }
  .top-extra { display: none; }
  .top-more { display: flex; width: 100%; justify-content: center; margin-top: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .m-glass, .m-sq, .top-search-field, .top-search-field::before { animation: none; }
  .top-shot::before, .top-shot .top-tool-icon, .top-tool .tool-card, .rec-img, .rec-card::before, .rec-arrow, .top-tab::after, .top-tool::before { transition: none; }
  .top-tool .tool-card:hover { transform: none; }
}
/* 枠の色が変わったとき、☆を白にして見えるようにする */
.top-tool:hover .favorite-button:not([aria-pressed=true]) { color: #fff; }
