:root {
  --ink: #17251f;
  --muted: #58665f;
  --brand: #145b4e;
  --brand-dark: #0c4037;
  --brand-soft: #e4f0ec;
  --cream: #f5f1e8;
  --paper: #fffdf8;
  --white: #ffffff;
  --orange: #d97942;
  --line: #d9ded8;
  --shadow: 0 18px 48px rgba(20, 55, 45, 0.1);
  --radius-lg: 28px;
  --radius-md: 18px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input { font: inherit; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 3px solid #f2a36f;
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 8px;
  color: var(--white);
  background: var(--brand-dark);
  transform: translateY(-160%);
}

.skip-link:focus { transform: translateY(0); }

h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3, h4 { line-height: 1.3; letter-spacing: -0.025em; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid rgba(20, 91, 78, 0.12);
  background: rgba(255, 253, 248, 0.94);
  backdrop-filter: blur(14px);
}

.header-inner,
.hero-inner,
.section,
.footer-inner {
  width: min(1160px, calc(100% - 48px));
  margin-inline: auto;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 24px;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.site-brand img { border-radius: 13px; box-shadow: 0 8px 20px rgba(20, 55, 45, 0.14); }
.site-brand strong, .site-brand small { display: block; }
.site-brand strong { font-family: "Outfit", sans-serif; font-size: 1.05rem; }
.site-brand small { color: var(--muted); font-size: 0.72rem; }

.header-nav { display: flex; align-items: center; gap: 26px; }
.header-nav a { color: #31433b; font-size: 0.9rem; font-weight: 600; text-decoration: none; }
.header-nav a:hover { color: var(--brand); }

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(72px, 9vw, 126px) 0;
  background:
    radial-gradient(circle at 92% 10%, rgba(217, 121, 66, 0.15), transparent 25%),
    radial-gradient(circle at 8% 90%, rgba(20, 91, 78, 0.13), transparent 29%),
    var(--cream);
}

.hero::after {
  position: absolute;
  top: -130px;
  right: -110px;
  width: 360px;
  height: 360px;
  border: 1px solid rgba(20, 91, 78, 0.16);
  border-radius: 50%;
  box-shadow: 0 0 0 44px rgba(20, 91, 78, 0.035), 0 0 0 88px rgba(20, 91, 78, 0.025);
  content: "";
}

.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(330px, 0.75fr); gap: clamp(42px, 8vw, 96px); align-items: center; }
.hero-copy { max-width: 720px; }

.eyebrow {
  margin-bottom: 14px;
  color: var(--brand);
  font-family: "Outfit", "Noto Sans JP", sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero h1 { margin-bottom: 24px; font-size: clamp(2.45rem, 5.4vw, 4.8rem); }
.hero-lead { max-width: 680px; margin-bottom: 32px; color: #33463e; font-size: clamp(1rem, 1.6vw, 1.18rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 22px;
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none;
}

.button-primary { color: var(--white); background: var(--brand); box-shadow: 0 12px 26px rgba(20, 91, 78, 0.2); }
.button-primary:hover { background: var(--brand-dark); }
.button-secondary { border: 1px solid #bdc8c1; background: rgba(255, 255, 255, 0.58); }

.hero-guide { padding: 28px; border: 1px solid rgba(20, 91, 78, 0.14); border-radius: var(--radius-lg); background: rgba(255, 255, 255, 0.76); box-shadow: var(--shadow); }
.hero-guide-title { margin-bottom: 18px; color: var(--brand-dark); font-weight: 800; }
.hero-guide ul { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.hero-guide li { display: grid; grid-template-columns: 34px 1fr; gap: 12px; padding: 13px 0; border-top: 1px solid rgba(20, 91, 78, 0.1); color: #35473f; font-size: 0.91rem; }
.hero-guide li span { color: var(--orange); font-family: "Outfit", sans-serif; font-weight: 700; }

.section { padding-block: clamp(68px, 9vw, 112px); scroll-margin-top: 70px; }
.section + .section { border-top: 1px solid #e7e8e2; }
.section-heading { max-width: 720px; margin-bottom: 38px; }
.section-heading h2, .principles-copy h2, .safety-section h2 { margin-bottom: 16px; font-size: clamp(1.8rem, 3.4vw, 2.75rem); }
.section-heading > p:last-child, .principles-copy > p, .safety-section p { color: var(--muted); }
.narrow-heading { max-width: 830px; }
.compact-heading { margin-bottom: 30px; }

.value-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.value-grid article { padding: 28px; border-top: 3px solid var(--brand); background: #f8f7f2; }
.value-number { color: var(--orange); font-family: "Outfit", sans-serif; font-weight: 700; }
.value-grid h3 { margin: 14px 0 10px; font-size: 1.25rem; }
.value-grid p { margin-bottom: 0; color: var(--muted); font-size: 0.94rem; }

.finder-section { padding-bottom: 28px; }
.finder-panel { display: grid; grid-template-columns: minmax(240px, 0.7fr) minmax(0, 1.3fr); gap: 24px 38px; padding: 28px; border-radius: var(--radius-lg); background: var(--brand-dark); color: var(--white); }
.search-field label, .filter-field legend { display: block; margin-bottom: 10px; font-size: 0.86rem; font-weight: 700; }
.search-field input { width: 100%; min-height: 50px; padding: 0 16px; border: 1px solid transparent; border-radius: 10px; color: var(--ink); background: var(--white); }
.search-field input::placeholder { color: #7a847f; }
.filter-field { min-width: 0; margin: 0; padding: 0; border: 0; }
.filter-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-button { min-height: 46px; padding: 0 15px; border: 1px solid rgba(255,255,255,0.4); border-radius: 999px; color: var(--white); background: transparent; cursor: pointer; }
.filter-button:hover, .filter-button.is-active { border-color: var(--white); color: var(--brand-dark); background: var(--white); }
.result-count { grid-column: 1 / -1; margin: -6px 0 0; color: #d5e6df; font-size: 0.88rem; }

.featured-section { padding-top: 54px; }
.featured-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.featured-grid a { display: flex; flex-direction: column; min-height: 190px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--white); text-decoration: none; transition: transform 160ms ease, box-shadow 160ms ease; }
.featured-grid a:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.featured-grid span { margin-bottom: 16px; color: var(--brand); font-size: 0.78rem; font-weight: 700; }
.featured-grid strong { font-size: 1.07rem; line-height: 1.5; }
.featured-grid small { margin-top: auto; padding-top: 20px; color: var(--brand); font-weight: 700; }

.catalog-section { padding-top: 72px; }
.catalog-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.catalog-heading h2 { margin-bottom: 0; font-size: clamp(1.8rem, 3.4vw, 2.75rem); }
.catalog-heading > p { margin-bottom: 5px; color: var(--muted); font-size: 0.88rem; }
.app-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }

.app-card { display: flex; flex-direction: column; min-width: 0; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--white); box-shadow: 0 8px 28px rgba(20, 55, 45, 0.06); }
.app-card-head { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 18px; align-items: center; margin-bottom: 22px; }
.app-icon { overflow: hidden; width: 72px; height: 72px; padding: 8px; border-radius: 19px; }
.app-icon img { width: 100%; height: 100%; border-radius: 13px; object-fit: cover; }
.tone-care { background: #d9ede7; }
.tone-health { background: #dff0e8; }
.tone-daily { background: #e3edf6; }
.tone-disaster { background: #f7e3d2; }
.tone-game { background: #e9e5fb; }
.tone-memory { background: #f1e2f0; }
.tone-story { background: #eee0d8; }
.app-category { margin-bottom: 4px; color: var(--brand); font-size: 0.76rem; font-weight: 800; }
.app-card h4 { margin-bottom: 5px; font-size: 1.3rem; }
.app-subtitle { margin-bottom: 0; color: var(--muted); font-size: 0.84rem; line-height: 1.55; }
.app-summary { margin-bottom: 22px; color: #34463e; }
.app-details { display: grid; gap: 0; margin: 0 0 24px; border-top: 1px solid #e4e7e3; }
.app-details div { display: grid; grid-template-columns: 5.5rem 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid #e4e7e3; }
.app-details dt { color: var(--brand); font-size: 0.8rem; font-weight: 800; }
.app-details dd { margin: 0; color: var(--muted); font-size: 0.88rem; }
.app-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; margin-top: auto; padding: 0 4px; color: var(--brand-dark); font-weight: 800; text-underline-offset: 5px; }
.app-link span { font-size: 1.25rem; }
.empty-state { padding: 24px; border: 1px solid #e6c8b5; border-radius: var(--radius-md); background: #fff4ec; color: #693b25; text-align: center; }

.how-section { max-width: 960px; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: 0; padding: 0; list-style: none; }
.steps li { position: relative; display: flex; gap: 14px; padding-right: 24px; }
.steps li:not(:last-child)::after { position: absolute; top: 19px; right: 8px; width: 16px; height: 1px; background: #b8c6bf; content: ""; }
.steps li > span { display: grid; flex: 0 0 40px; height: 40px; place-items: center; border-radius: 50%; color: var(--white); background: var(--brand); font-family: "Outfit", sans-serif; font-weight: 700; }
.steps strong { display: block; margin: 5px 0 8px; line-height: 1.45; }
.steps p { margin-bottom: 0; color: var(--muted); font-size: 0.86rem; }

.principles-section { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr); gap: clamp(40px, 8vw, 90px); align-items: center; }
.principles-copy p:last-child { margin-bottom: 0; }
.care-ai-panel { padding: 30px; border-radius: var(--radius-lg); color: var(--white); background: var(--brand-dark); box-shadow: var(--shadow); }
.care-ai-panel .eyebrow { color: #aad6c7; }
.care-ai-panel h3 { font-size: 1.45rem; }
.care-ai-panel p { color: #d2e4de; }
.care-ai-panel a { font-weight: 700; text-underline-offset: 5px; }

.safety-section { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 28px; padding: 42px; border: 0 !important; border-radius: var(--radius-lg); background: #eef3ef; }
.safety-mark { display: grid; width: 60px; height: 60px; place-items: center; border: 2px solid var(--brand); border-radius: 50%; color: var(--brand); font-family: Georgia, serif; font-size: 2rem; font-weight: 700; }
.text-links { display: flex; flex-wrap: wrap; gap: 12px 24px; margin-top: 24px; }
.text-links a { color: var(--brand-dark); font-weight: 700; text-underline-offset: 5px; }

.updates-list { margin: 0; padding: 0; border-top: 1px solid var(--line); list-style: none; }
.updates-list li { display: grid; grid-template-columns: 130px minmax(0, 1fr) auto; gap: 24px; align-items: center; padding: 18px 4px; border-bottom: 1px solid var(--line); }
.updates-list time { color: var(--muted); font-family: "Outfit", sans-serif; }
.updates-list span { font-weight: 700; }
.updates-list a { color: var(--brand); font-size: 0.88rem; font-weight: 700; text-underline-offset: 4px; }

.site-footer { color: #d8e6e1; background: #102e28; }
.footer-inner { padding-block: 50px 26px; }
.footer-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 34px; }
.footer-brand img { border-radius: 12px; }
.footer-brand strong { color: var(--white); font-family: "Outfit", sans-serif; font-size: 1.12rem; }
.footer-brand p { margin: 2px 0 0; font-size: 0.84rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 12px 26px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,0.15); }
.site-footer nav a { font-size: 0.86rem; text-underline-offset: 4px; }
.copyright { margin: 38px 0 0; color: #9fb5ad; }

@media (max-width: 940px) {
  .hero-inner, .principles-section { grid-template-columns: 1fr; }
  .hero-guide { max-width: 650px; }
  .value-grid { grid-template-columns: 1fr; }
  .featured-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); gap: 28px; }
  .steps li:nth-child(2)::after { display: none; }
}

@media (max-width: 720px) {
  .header-inner, .hero-inner, .section, .footer-inner { width: min(100% - 30px, 1160px); }
  .site-header { position: static; }
  .header-inner { min-height: 68px; }
  .site-brand small, .header-nav { display: none; }
  .hero { padding-block: 64px; }
  .hero::after { width: 250px; height: 250px; }
  .hero h1 { font-size: clamp(2.25rem, 12vw, 3.4rem); }
  .hero-guide, .finder-panel, .app-card { padding: 22px; }
  .finder-panel, .app-grid { grid-template-columns: 1fr; }
  .result-count { grid-column: auto; }
  .catalog-heading { align-items: flex-start; flex-direction: column; }
  .catalog-heading > p { margin-top: -14px; }
  .safety-section { grid-template-columns: 1fr; padding: 28px 22px; }
  .updates-list li { grid-template-columns: 1fr; gap: 3px; }
}

@media (max-width: 520px) {
  .featured-grid, .steps { grid-template-columns: 1fr; }
  .featured-grid a { min-height: 165px; }
  .steps { gap: 22px; }
  .steps li::after { display: none; }
  .app-card-head { grid-template-columns: 60px minmax(0, 1fr); gap: 14px; }
  .app-icon { width: 60px; height: 60px; border-radius: 16px; }
  .app-details div { grid-template-columns: 1fr; gap: 3px; }
  .text-links { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}

/* Category-first app catalog */
.hero {
  padding: clamp(44px, 6vw, 72px) 0;
  background:
    radial-gradient(circle at 90% 0%, rgba(217, 121, 66, 0.12), transparent 28%),
    linear-gradient(135deg, #f5f1e8 0%, #edf4f0 100%);
}
.hero::after { width: 280px; height: 280px; opacity: .7; }
.hero-inner { display: block; }
.hero-copy { max-width: 860px; }
.hero h1 { margin-bottom: 14px; font-size: clamp(2.2rem, 5vw, 4.25rem); }
.hero-lead { margin-bottom: 22px; }
.hero-actions .button { min-height: 46px; }

.catalog-section { padding-top: clamp(38px, 6vw, 72px); }
.operationDisclosure { margin: 0 0 22px; color: var(--muted); font-size: .78rem; }
.catalog-heading { align-items: flex-start; margin-bottom: 24px; }
.catalog-heading > div > p:last-child { max-width: 720px; margin: 12px 0 0; color: var(--muted); }
.finder-panel {
  grid-template-columns: minmax(240px, .8fr) minmax(0, 1.2fr);
  margin-bottom: 28px;
  padding: 22px;
  border-radius: 20px;
}

.category-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}
.category-column {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--brand);
  border-radius: 22px;
  background: #f4f7f5;
  scroll-margin-top: 92px;
}
.category-disaster { border-top-color: #b96232; background: #fcf5ef; }
.category-game { border-top-color: #6657a5; background: #f6f4fb; }
.category-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.category-heading h3 { margin: 0; font-size: 1.45rem; }
.category-kicker { margin: 0 0 2px; color: var(--brand); font-family: "Outfit", sans-serif; font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.category-disaster .category-kicker { color: #8a4825; }
.category-game .category-kicker { color: #55468f; }
.category-count { display: grid; flex: 0 0 34px; height: 34px; place-items: center; border-radius: 50%; color: var(--white); background: var(--brand); font-family: "Outfit", sans-serif; font-size: .84rem; font-weight: 700; }
.category-disaster .category-count { background: #a5552b; }
.category-game .category-count { background: #5c4d98; }
.category-description { min-height: 3.2em; margin: 10px 0 16px; color: var(--muted); font-size: .84rem; line-height: 1.6; }
.category-list { display: grid; gap: 12px; }

.app-card {
  padding: 16px;
  border-radius: 16px;
  box-shadow: 0 5px 18px rgba(20, 55, 45, .055);
}
.app-card-head { grid-template-columns: 52px minmax(0, 1fr); gap: 12px; margin-bottom: 14px; }
.app-icon { width: 52px; height: 52px; padding: 5px; border-radius: 14px; }
.app-icon img { border-radius: 10px; }
.app-card h4 { margin-bottom: 3px; font-size: 1.05rem; }
.app-category { font-size: .68rem; }
.app-subtitle { font-size: .78rem; }
.app-link {
  min-height: 44px;
  margin: 0;
  padding: 0 14px;
  border-radius: 10px;
  color: var(--white);
  background: var(--brand);
  text-decoration: none;
}
.app-link:hover { background: var(--brand-dark); }
.app-more { margin-top: 8px; }
.app-more summary {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid #cbd5cf;
  border-radius: 10px;
  color: var(--brand-dark);
  background: var(--white);
  cursor: pointer;
  font-size: .84rem;
  font-weight: 700;
  list-style: none;
}
.app-more summary::-webkit-details-marker { display: none; }
.app-more summary::after { margin-left: 8px; content: "+"; font-size: 1.05rem; }
.app-more[open] summary::after { content: "−"; }
.app-more-panel { margin-top: 10px; padding-top: 12px; border-top: 1px solid #e4e7e3; }
.app-summary { margin-bottom: 12px; color: #34463e; font-size: .86rem; }
.app-details { margin-bottom: 0; }
.app-details div { grid-template-columns: 1fr; gap: 2px; padding: 9px 0; }
.app-details dd { font-size: .82rem; }

@media (max-width: 940px) {
  .category-board { grid-template-columns: 1fr; }
  .category-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .category-description { min-height: 0; }
}

@media (max-width: 720px) {
  .hero { padding-block: 44px; }
  .hero-actions { display: grid; grid-template-columns: repeat(3, 1fr); }
  .hero-actions .button { padding-inline: 10px; }
  .finder-panel { grid-template-columns: 1fr; }
  .category-column { padding: 14px; scroll-margin-top: 16px; }
}

@media (max-width: 580px) {
  .hero-actions { grid-template-columns: 1fr; }
  .category-list { grid-template-columns: 1fr; }
}
