/*
Theme Name: ねこもじ
Theme URI: https://necomoji.com/
Author: OpenAI
Description: ねこ国語・ねこ算数の入口になる、ねこもじ専用テーマ。
Version: 0.2.0
Text Domain: nekomoji
*/

:root {
  --nkm-ink: #17231e;
  --nkm-paper: #fffdf2;
  --nkm-green: #1f5946;
  --nkm-mint: #8ce6c5;
  --nkm-sky: #62c8ff;
  --nkm-yellow: #ffe27a;
  --nkm-pink: #ff8bbd;
  --nkm-line: rgba(23, 35, 30, 0.14);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  color: var(--nkm-ink);
  background: var(--nkm-paper);
  font-family: "Hiragino Sans", "Yu Gothic", "Yu Gothic UI", system-ui, sans-serif;
}

body.nekomoji-theme {
  overflow-x: hidden;
}

body.nkm-app-shell {
  background: #f4efe3;
}

body.nkm-app-shell .nkm-app-main {
  width: 100%;
  max-width: none;
  min-height: 100dvh;
  margin: 0;
  padding: 0;
}

body.nkm-app-shell .nkm-app-main > .necomoji-app-root {
  min-height: 100dvh;
}

body.nkm-app-shell .ncm-shell {
  margin-top: 12px;
  margin-bottom: 24px;
}

body.nkm-app-shell.ncm-divide-blaster-screen-active .ncm-shell {
  margin-top: 10px;
}

.nkm-site-header {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 66px;
  padding: 12px clamp(16px, 4vw, 44px);
  background: rgba(255, 253, 242, 0.88);
  border-bottom: 1px solid rgba(31, 89, 70, 0.14);
  backdrop-filter: blur(12px);
}

.nkm-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--nkm-green);
  text-decoration: none;
  font-weight: 900;
  letter-spacing: 0;
}

.nkm-brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--nkm-green);
  color: #fffdf2;
  font-size: 20px;
}

.nkm-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nkm-nav a,
.nkm-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(31, 89, 70, 0.22);
  border-radius: 8px;
  color: var(--nkm-green);
  background: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  font-weight: 900;
}

.nkm-button.is-primary {
  border-color: transparent;
  color: #fff;
  background: var(--nkm-green);
}

.nkm-button.is-math {
  border-color: transparent;
  color: #05111d;
  background: linear-gradient(135deg, var(--nkm-yellow), var(--nkm-sky));
}

.nkm-hero {
  position: relative;
  display: grid;
  align-items: center;
  min-height: min(88svh, 820px);
  padding: 112px clamp(18px, 6vw, 70px) 70px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255,253,242,0.98) 0%, rgba(255,253,242,0.90) 46%, rgba(255,253,242,0.36) 100%),
    url("assets/nekomoji-hero-neko.png") right 8% bottom 0 / min(58vw, 620px) auto no-repeat,
    linear-gradient(135deg, #e9fff2 0%, #fff7c7 46%, #dff4ff 100%);
}

.nkm-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 680px;
}

.nkm-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(31, 89, 70, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.64);
  color: var(--nkm-green);
  font-size: 13px;
  font-weight: 900;
}

.nkm-hero h1 {
  margin: 18px 0 12px;
  font-size: clamp(52px, 9vw, 112px);
  line-height: 0.94;
  letter-spacing: 0;
  color: var(--nkm-green);
}

.nkm-hero p {
  margin: 0;
  max-width: 560px;
  font-size: clamp(16px, 2vw, 21px);
  line-height: 1.8;
  font-weight: 700;
}

.nkm-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.nkm-section {
  padding: 52px clamp(18px, 6vw, 70px);
}

.nkm-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin: 0 auto 20px;
  max-width: 1120px;
}

.nkm-section-head h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.12;
  letter-spacing: 0;
}

.nkm-section-head p {
  margin: 0;
  max-width: 470px;
  color: #5d6d63;
  font-weight: 700;
  line-height: 1.7;
}

.nkm-subject-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  max-width: 1120px;
  margin: 0 auto;
}

.nkm-subject-card {
  display: grid;
  gap: 16px;
  min-height: 300px;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid var(--nkm-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 38px rgba(31, 89, 70, 0.08);
}

.nkm-subject-card.is-kokugo { border-top: 6px solid var(--nkm-green); }
.nkm-subject-card.is-sansuu { border-top: 6px solid var(--nkm-sky); }

.nkm-subject-card span {
  color: var(--nkm-green);
  font-weight: 900;
}

.nkm-subject-card h3 {
  margin: 0;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.08;
  letter-spacing: 0;
}

.nkm-subject-card p {
  margin: 0;
  color: #52645a;
  font-weight: 700;
  line-height: 1.75;
}

.nkm-mini-games {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.nkm-mini-games li {
  padding: 6px 10px;
  border-radius: 8px;
  background: #f2f8f4;
  color: #2c5949;
  font-size: 13px;
  font-weight: 900;
}

.nkm-content {
  max-width: 920px;
  margin: 100px auto 60px;
  padding: 0 20px;
}

@media (max-width: 760px) {
  .nkm-site-header { position: sticky; min-height: 58px; }
  .nkm-nav a { display: none; }
  .nkm-hero {
    min-height: 82svh;
    padding-top: 58px;
    background:
      linear-gradient(180deg, rgba(255,253,242,0.98) 0%, rgba(255,253,242,0.82) 58%, rgba(255,253,242,0.48) 100%),
      url("assets/nekomoji-hero-neko.png") right -34px bottom 0 / 74vw auto no-repeat,
      linear-gradient(135deg, #e9fff2 0%, #fff7c7 46%, #dff4ff 100%);
  }
  .nkm-hero h1 { font-size: clamp(54px, 17vw, 86px); }
  .nkm-subject-grid { grid-template-columns: 1fr; }
  .nkm-section-head { display: grid; }
}
