@import url("https://fonts.googleapis.com/css2?family=Zen+Maru+Gothic:wght@700;900&display=swap");

:root {
  --bg: #fff8fb;
  --surface: #ffffff;
  --surface-strong: #fff0f6;
  --ink: #34242d;
  --muted: #77606c;
  --line: #f2d8e3;
  --pink: #e85f9a;
  --pink-deep: #c73877;
  --rose: #ffbfd7;
  --mint: #b8e5dc;
  --butter: #ffe59b;
  --shadow: 0 18px 50px rgba(199, 56, 119, 0.13);
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 191, 215, 0.38), transparent 28%),
    linear-gradient(180deg, #fff8fb 0%, #fff 46%, #fff8fb 100%);
  color: var(--ink);
}

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto minmax(220px, 420px);
  align-items: center;
  justify-content: space-between;
  gap: 10px 18px;
  padding: 14px clamp(18px, 5vw, 64px) 12px;
  border-bottom: 1px solid rgba(242, 216, 227, 0.8);
  background: rgba(255, 248, 251, 0.86);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid #f0b2cc;
  border-radius: 8px;
  background: #fff;
  color: var(--pink-deep);
  box-shadow: 0 8px 22px rgba(232, 95, 154, 0.12);
}

.brand-text {
  font-size: 1rem;
}

.top-nav {
  grid-column: 1 / -1;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(72px, 1fr);
  align-items: center;
  gap: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.top-nav a {
  position: relative;
  min-height: 36px;
  display: grid;
  place-items: center;
  padding: 0 8px;
  text-align: center;
}

.top-nav a + a::before {
  position: absolute;
  left: -5px;
  color: #e6a6c2;
  content: "♡";
  font-size: 0.72rem;
}

.top-nav a:hover {
  color: var(--pink-deep);
}

.hero {
  display: grid;
  min-height: 360px;
  place-items: center;
  padding: 68px clamp(18px, 5vw, 64px) 36px;
}

.hero-copy {
  width: min(780px, 100%);
  text-align: center;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--pink-deep);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow::before,
.eyebrow::after {
  color: #e9a8c4;
  content: "❤";
  margin: 0 8px;
}

.hero-ribbon {
  margin: 0 auto 12px;
  color: #8d7f86;
  font-family: "Zen Maru Gothic", "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, system-ui, sans-serif;
  font-size: clamp(1.35rem, 5vw, 2rem);
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-family: "Zen Maru Gothic", "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, system-ui, sans-serif;
  font-weight: 900;
  font-size: clamp(2.25rem, 8vw, 4.8rem);
  line-height: 1.05;
}

.hero-copy h1 + .copy-hint {
  margin-top: 1.1rem;
}

h2 {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
}

.lead {
  max-width: 620px;
  margin: 18px auto 14px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.copy-hint {
  margin: 0 auto 16px;
  color: var(--pink-deep);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.copy-hint::before,
.copy-hint::after {
  color: #eab8cf;
  content: "✦";
  margin: 0 8px;
}

.type-select-hint::before,
.type-select-hint::after {
  content: "↓";
}

.list-copy-hint {
  display: block;
  margin-bottom: 18px;
  text-align: center;
}

.search {
  width: min(560px, 100%);
  margin: 0 auto;
}

.header-search {
  width: min(420px, 100%);
  margin: 0;
  justify-self: end;
}

.page-switch {
  display: grid;
  width: min(292px, 100%);
  grid-template-columns: repeat(3, 88px);
  justify-content: center;
  gap: 10px;
  margin: 0 auto 16px;
}

.switch-card {
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  width: 88px;
  height: 88px;
  border: 1px solid #efc5d7;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 240, 246, 0.9));
  box-shadow: 0 10px 24px rgba(116, 64, 88, 0.08);
  padding: 10px;
  text-align: center;
}

.switch-card:hover,
.switch-card.is-current {
  border-color: var(--pink);
  background: var(--surface-strong);
}

.switch-card span {
  display: block;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.25;
}

.search input {
  width: 100%;
  min-height: 56px;
  border: 1px solid #eab8cf;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  outline: none;
  padding: 0 18px;
  box-shadow: var(--shadow);
}

.site-header .search input {
  min-height: 38px;
  border-color: #efc5d7;
  border-radius: 999px;
  padding: 0 14px;
  box-shadow: 0 8px 22px rgba(232, 95, 154, 0.1);
  font-size: 0.84rem;
}

.search input:focus {
  border-color: var(--pink);
  box-shadow: 0 0 0 4px rgba(232, 95, 154, 0.14), var(--shadow);
}

.ad-slot {
  display: grid;
  width: min(980px, calc(100% - 36px));
  min-height: 74px;
  margin: 0 auto 30px;
  place-items: center;
  border: 1px dashed #eac3d5;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
  color: #a88796;
  font-size: 0.78rem;
}

.toolbar {
  display: flex;
  width: min(980px, calc(100% - 36px));
  margin: 0 auto 28px;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.category-heading {
  width: min(980px, calc(100% - 36px));
  margin: 0 auto 14px;
  color: var(--pink-deep);
  font-family: "Zen Maru Gothic", "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 900;
  text-align: center;
}

.bottom-toolbar {
  margin-top: -30px;
  margin-bottom: 48px;
}

.chip {
  min-height: 40px;
  flex: 0 0 auto;
  border: 1px solid #efc5d7;
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  padding: 0 16px;
}

.chip:hover,
.chip.is-active {
  border-color: var(--pink);
  background: var(--surface-strong);
  color: var(--pink-deep);
}

.content-shell {
  width: min(980px, calc(100% - 36px));
  margin: 0 auto;
  padding-bottom: 60px;
}

.section-heading {
  margin-bottom: 18px;
}

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

.emoji-grid .emoji-grid {
  grid-column: 1 / -1;
}

.emoji-grid-short {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.emoji-grid-long {
  grid-template-columns: 1fr;
}

body[data-length="long"] .emoji-grid {
  grid-template-columns: 1fr;
}

.emoji-card {
  min-height: 104px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 32px rgba(116, 64, 88, 0.08);
  cursor: pointer;
  padding: 16px;
  text-align: left;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.emoji-card:hover,
.emoji-card:focus-visible {
  border-color: #ec8ab5;
  box-shadow: 0 18px 42px rgba(199, 56, 119, 0.16);
  outline: none;
  transform: translateY(-2px);
}

.emoji-line {
  display: flex;
  min-height: 70px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  overflow-wrap: anywhere;
  color: #25171f;
  font-size: 1.55rem;
  line-height: 1.45;
  text-align: center;
}

.emoji-card-long .emoji-line {
  align-items: center;
  justify-content: flex-start;
  font-size: 1.12rem;
  text-align: left;
  white-space: pre-wrap;
}

.empty-state {
  margin: 34px 0;
  color: var(--muted);
  text-align: center;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 30;
  border: 1px solid #e994b8;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  color: var(--pink-deep);
  font-weight: 800;
  opacity: 0;
  padding: 12px 16px;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.back-to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 25;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid #e994b8;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 28px rgba(199, 56, 119, 0.18);
  color: var(--pink-deep);
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 900;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 28px clamp(18px, 5vw, 64px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.86rem;
}

.site-footer div {
  display: flex;
  gap: 16px;
}

.static-page {
  width: min(760px, calc(100% - 36px));
  margin: 0 auto;
  padding: 70px 0;
}

.static-page h1 {
  font-size: clamp(2rem, 7vw, 3.2rem);
}

.static-page p,
.static-page li {
  color: var(--muted);
  line-height: 1.9;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

@media (max-width: 760px) {
  .site-header,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    padding: 12px 14px 10px;
  }

  .brand {
    min-width: 0;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
  }

  .brand-text {
    font-size: 0.92rem;
  }

  .header-search {
    width: 100%;
  }

  .site-header .search input {
    min-height: 36px;
    padding: 0 12px;
    font-size: 0.78rem;
  }

  .top-nav {
    width: 100%;
    grid-auto-columns: minmax(0, 1fr);
  }

  .hero {
    min-height: auto;
    padding-top: 46px;
  }

  .emoji-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  body[data-length="kaomoji"] .emoji-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .emoji-grid-short {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .emoji-grid-long {
    grid-template-columns: 1fr;
  }

  .page-switch {
    width: min(276px, 100%);
    grid-template-columns: repeat(3, 82px);
    gap: 9px;
  }

  .switch-card {
    width: 82px;
    height: 82px;
    padding: 9px;
  }

  .switch-card span {
    font-size: 0.74rem;
  }

  .emoji-card {
    min-height: 92px;
    padding: 12px;
  }

  .emoji-line {
    min-height: 64px;
    font-size: 1.08rem;
  }

  .emoji-card-long .emoji-line {
    font-size: 0.92rem;
  }

}

@media (min-width: 761px) and (max-width: 940px) {
  .emoji-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-length="short"] .emoji-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .emoji-grid-short {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .emoji-grid-long {
    grid-template-columns: 1fr;
  }
}
