/*
Theme Name: Miengena Base
Theme URI: https://www.miengena.com/
Author: OpenAI
Author URI: https://www.miengena.com/
Description: ミエンゲナ受注用の軽量・アクセシブルなクラシック WordPress ベーステーマ。設定画面、構造化データ、メンテナンスモード、反転表示、文字サイズ切替を搭載。
Version: 1.0.1
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: miengena-base
*/

:root {
  --bg: #ffffff;
  --text: #111111;
  --muted: #4a4a4a;
  --line: #d9d9d9;
  --accent: #005fcc;
  --accent-text: #ffffff;
  --surface: #f7f7f7;
  --max: 1080px;
  --radius: 12px;
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --shadow: 0 1px 2px rgba(0,0,0,.08);
}

html {
  box-sizing: border-box;
  font-size: 100%;
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  font-size: 18px;
  line-height: 1.8;
  word-break: break-word;
}

a {
  color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
}

a:hover,
a:focus {
  text-decoration: none;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

button,
input[type="submit"],
.button,
.wp-block-button__link {
  min-height: 48px;
  border-radius: 999px;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.screen-reader-text:focus {
  clip: auto;
  width: auto;
  height: auto;
  margin: 0;
  padding: .75rem 1rem;
  background: #000;
  color: #fff;
  top: 1rem;
  left: 1rem;
  z-index: 10000;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 10000;
}

.skip-link:focus {
  top: 1rem;
}

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

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 50;
}

.wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
}

.site-branding {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.site-title {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.4;
}

.site-title a {
  color: var(--text);
  text-decoration: none;
}

.site-description {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}


.menu-toggle,
.contrast-toggle,
.font-size-toggle {
  appearance: none;
  border: 2px solid var(--text);
  background: var(--bg);
  color: var(--text);
  padding: 0.7rem 1rem;
  cursor: pointer;
}

.contrast-toggle[aria-pressed="true"],
.font-size-toggle[aria-pressed="true"] {
  background: var(--text);
  color: var(--bg);
}

.primary-nav {
  padding-bottom: 1rem;
}

.primary-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.primary-nav a {
  display: inline-block;
  padding: 0.25rem 0;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}

.primary-nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 3px;
}

.site-main {
  padding: 2rem 0 4rem;
}

.hero,
.card,
.entry,
.widget {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero {
  padding: 2rem;
  margin-bottom: 2rem;
}

.hero h1 {
  margin-top: 0;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.35;
}

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

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1.25rem;
}

.grid > * {
  grid-column: span 12;
}

.content-area {
  min-width: 0;
}

.sidebar-area .widget {
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.entry {
  padding: 1.5rem;
}

.entry + .entry {
  margin-top: 1.5rem;
}

.entry-title,
.page-title {
  margin-top: 0;
  line-height: 1.45;
}

.entry-meta {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.entry-content > *:first-child {
  margin-top: 0;
}

.entry-content > *:last-child {
  margin-bottom: 0;
}

.read-more,
input[type="submit"],
.button,
.wp-element-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.2rem;
  background: var(--accent);
  color: var(--accent-text);
  text-decoration: none;
  border: 0;
  cursor: pointer;
  font-weight: 700;
}

.read-more:hover,
.read-more:focus,
input[type="submit"]:hover,
input[type="submit"]:focus,
.button:hover,
.button:focus,
.wp-element-button:hover,
.wp-element-button:focus {
  opacity: .92;
}

.pagination,
.posts-navigation,
.post-navigation {
  margin-top: 2rem;
}

.pagination .nav-links,
.posts-navigation .nav-links,
.post-navigation .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  justify-content: space-between;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0;
  color: var(--muted);
}

.site-footer p,
.site-footer nav {
  margin: 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1rem;
  padding: 0;
  margin: 0;
}

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

label {
  display: block;
  font-weight: 700;
  margin-bottom: .35rem;
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="search"],
textarea {
  width: 100%;
  border: 2px solid #777;
  border-radius: 10px;
  padding: 0.8rem 0.9rem;
  background: #fff;
  color: #111;
}

textarea {
  min-height: 10rem;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 0.75rem;
  border: 1px solid var(--line);
  text-align: left;
}

body.menu-open .primary-nav {
  display: block;
}

@media (max-width: 767px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .primary-nav {
    display: none;
  }

  .primary-nav ul {
    flex-direction: column;
    gap: .5rem;
  }
}

@media (min-width: 768px) {
  .menu-toggle {
    display: none;
  }

  .grid--sidebar .content-area {
    grid-column: span 8;
  }

  .grid--sidebar .sidebar-area {
    grid-column: span 4;
  }
}

body.high-contrast {
  --bg: #000000;
  --text: #ffffff;
  --muted: #e4e4e4;
  --line: #8a8a8a;
  --accent: #ffd400;
  --accent-text: #000000;
  --surface: #111111;
  --shadow: none;
}

body.high-contrast input[type="text"],
body.high-contrast input[type="email"],
body.high-contrast input[type="url"],
body.high-contrast input[type="search"],
body.high-contrast textarea {
  background: #000;
  color: #fff;
  border-color: #fff;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}


body.font-large {
  font-size: 20px;
}

.miengena-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.85rem 1.2rem;
  background: var(--accent);
  color: var(--accent-text);
  text-decoration: none;
  font-weight: 700;
  border: 0;
  margin-top: 0.5rem;
}
.miengena-button.is-rounded { border-radius: 10px; }
.miengena-button.is-pill { border-radius: 999px; }
.miengena-button.is-large { min-height: 54px; padding: 1rem 1.4rem; }
.miengena-button:hover, .miengena-button:focus { opacity: .92; }

.miengena-cta-section {
  margin-top: 2rem;
  background: #fff8e8;
  border-color: #e7c96c;
}

.footer-business-info p {
  margin: 0.35rem 0;
}

.miengena-business-info p {
  margin: 0 0 0.7rem;
}
