/*
Theme Name: 毎日ノベル専用テーマ
Theme URI: https://example.invalid/
Author: うつがや
Description: 毎日ノベル（V5）テーマ
Version: 1.6.25122601
Text Domain: mainovel-v5
*/

@import url("https://fonts.googleapis.com/css2?family=Shippori+Mincho:wght@500;700&family=Zen+Kaku+Gothic+New:wght@400;500;700&display=swap");

:root {
  --bg: #f4f3ee;
  --bg-2: #eef0ea;
  --text: #2b2d2a;
  --muted: #6b706a;
  --key: #4b5b57;
  --card: #ffffff;
  --border: rgba(0, 0, 0, 0.08);
  --shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
  --radius: 16px;
}

* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: "Zen Kaku Gothic New", "Noto Sans JP", sans-serif;
  background:
    radial-gradient(
      1200px 600px at 20% -10%,
      rgba(255, 255, 255, 0.8),
      rgba(255, 255, 255, 0) 60%
    ),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  color: var(--text);

  font-size: 16px;
  line-height: 1.75;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a {
  color: inherit;
}
.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 16px 96px;
}

.header {
  position: sticky;
  top: 0;
  background: rgba(244, 243, 238, 0.9);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(6px);
  z-index: 100;
}
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  max-width: 720px;
  margin: 0 auto;
}
.site-title {
  font-weight: 700;
  letter-spacing: 0.02em;
}
.site-logo img {
  height: 32px;
  width: auto;
  display: block;
}

.menu-btn {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--key);
  border-radius: 14px;
  -webkit-tap-highlight-color: transparent;
}
.menu-btn:hover {
  background: rgba(75, 91, 87, 0.06);
}
.menu-btn:active {
  transform: translateY(1px);
}
.menu-btn:focus-visible {
  outline: 2px solid rgba(75, 91, 87, 0.35);
  outline-offset: 3px;
}
.menu-icon {
  display: inline-block;
  width: 22px;
  height: 16px;
  position: relative;
}
.menu-icon .bar {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition:
    transform 0.18s ease,
    opacity 0.18s ease,
    top 0.18s ease;
}
.menu-icon .bar1 {
  top: 0;
}
.menu-icon .bar2 {
  top: 7px;
}
.menu-icon .bar3 {
  top: 14px;
}
.menu-btn[aria-expanded="true"] .bar1 {
  top: 7px;
  transform: rotate(45deg);
}
.menu-btn[aria-expanded="true"] .bar2 {
  opacity: 0;
}
.menu-btn[aria-expanded="true"] .bar3 {
  top: 7px;
  transform: rotate(-45deg);
}

.card {
  background: var(--card);
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.h1 {
  font-size: clamp(22px, 3vw, 28px);
  line-height: 1.35;
  margin: 6px 0 8px;
  font-weight: 700;
}
.h2 {
  font-size: clamp(17px, 2.4vw, 20px);
  line-height: 1.4;
  margin: 6px 0 8px;
  font-weight: 600;
}
.small {
  font-size: 13px;
  color: var(--muted);
}

/* Material-ish buttons */
/* Text button: link-like, but with roomy tap area */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  color: var(--key);
  font-weight: 600;
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 999px;
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--border);
  background: transparent;
  -webkit-tap-highlight-color: transparent;
}
.btn::after {
  display: none;
}
.btn:hover {
  background: rgba(75, 91, 87, 0.06);
}
.btn:active {
  transform: translateY(1px);
}
.btn:focus-visible {
  outline: 2px solid rgba(75, 91, 87, 0.35);
  outline-offset: 3px;
}
button.btn {
  cursor: pointer;
  font: inherit;
  background: transparent;
}

/* Primary contained button */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  padding: 14px 16px;
  border-radius: 999px;
  appearance: none;
  -webkit-appearance: none;
  background: var(--key);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 6px 18px rgba(75, 91, 87, 0.18);
  -webkit-tap-highlight-color: transparent;
}
.btn-primary:hover {
  filter: brightness(1.03);
}
.btn-primary:active {
  transform: translateY(1px);
}
.btn-primary:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.75);
  outline-offset: 3px;
}
.btn-primary::after {
  display: none;
}
button.btn-primary {
  cursor: pointer;
  font: inherit;
}

/* Contact Form 7: accordion + submit styling */
.wpcf7-form details {
  margin: 12px 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(75, 91, 87, 0.04);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.wpcf7-form details > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  font-weight: 700;
  color: var(--text);
  background: rgba(75, 91, 87, 0.08);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}
.wpcf7-form details > summary::after {
  content: "+";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--key);
  font-weight: 700;
  flex: 0 0 auto;
}
.wpcf7-form details[open] > summary {
  border-bottom: 1px solid var(--border);
  background: rgba(75, 91, 87, 0.12);
}
.wpcf7-form details[open] > summary::after {
  content: "-";
}
.wpcf7-form details > :not(summary) {
  padding: 12px 14px 14px;
}

.wpcf7-form input[type="submit"],
.wpcf7-form button[type="submit"],
.wpcf7-form .wpcf7-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px 16px;
  border-radius: 999px;
  background: var(--key);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 6px 18px rgba(75, 91, 87, 0.18);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
}
.wpcf7-form input[type="submit"]:hover,
.wpcf7-form button[type="submit"]:hover,
.wpcf7-form .wpcf7-submit:hover {
  filter: brightness(1.03);
}
.wpcf7-form input[type="submit"]:active,
.wpcf7-form button[type="submit"]:active,
.wpcf7-form .wpcf7-submit:active {
  transform: translateY(1px);
}
.wpcf7-form input[type="submit"]:focus-visible,
.wpcf7-form button[type="submit"]:focus-visible,
.wpcf7-form .wpcf7-submit:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.75);
  outline-offset: 3px;
}

/* Form fields (no hard borders; use subtle inset shadow) */
.card input[type="text"],
.card input[type="password"],
.card input[type="email"],
.card textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 12px;
  background: #fff;
  box-shadow: none;
}
.card textarea {
  line-height: 1.8;
  min-height: 220px;
  resize: vertical;
}
.card input:focus,
.card textarea:focus {
  outline: none;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(75, 91, 87, 0.2);
}

/* Write page primary button full width feel */
.card form[action*="/write/"] .btn-primary {
  width: 100%;
}

/* Top 3 buttons row (V5) */
.top-actions {
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  margin: 12px 0 6px;
}
.top-actions .btn {
  flex: 0 0 auto;
}

/* Footer (menu row + copyright row) */
.site-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(244, 243, 238, 0.92);
  color: var(--muted);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(6px);
}
.site-footer .footer-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 10px 16px;
}
.site-footer .footer-menu {
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
}
.site-footer .footer-menu a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
}
.site-footer .copyright {
  margin-top: 8px;
  text-align: center;
  font-size: 12px;
  opacity: 0.9;
}

/* Drawer: fullscreen with subtle animation */
.drawer {
  position: fixed;
  inset: 0;
  background: rgba(45, 47, 44, 0.32);
  color: var(--text);
  display: flex;
  align-items: stretch;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease,
    visibility 0s linear 0.18s;
  z-index: 9999;
}
.drawer.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease,
    visibility 0s;
}

.drawer-panel {
  width: 100%;
  max-width: 720px;
  height: 100%;
  padding: 18px 16px 22px;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.drawer-inner {
  margin-top: 34px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}

.drawer a {
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
  position: relative;
  padding: 10px 0;
  font-size: 18px;
  letter-spacing: 0.02em;
}

.drawer a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4px;
  height: 1px;
  background: rgba(0, 0, 0, 0.12);
}

.drawer-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-size: 26px;
  border-radius: 12px;
  -webkit-tap-highlight-color: transparent;
}
.drawer-close:hover {
  background: rgba(0, 0, 0, 0.04);
}
.drawer-close:active {
  transform: scale(0.98);
}

.drawer-bottom {
  margin-top: auto;
  padding-top: 22px;
  opacity: 0.95;
  display: flex;
  justify-content: center;
}
.drawer-bottom img {
  height: 28px;
  width: auto;
  display: block;
}

/* Make sure footer links are not styled as .btn accidentally */
.footer-menu .btn::after,
.footer-menu .link-btn::after {
  display: none !important;
}

.list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.list-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  text-decoration: none;
}
.list-item:hover {
  border-color: rgba(0, 0, 0, 0.14);
  background: rgba(255, 255, 255, 1);
}
.list-item .small {
  color: var(--muted);
}

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

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}

/* Novel page */
.novel-content {
  white-space: pre-wrap;
  line-height: 1.9;
  font-size: 16px;
  color: var(--text);
}
details > summary {
  list-style: none;
}
details > summary::-webkit-details-marker {
  display: none;
}

/* Subtle link styling inside cards */
.card a:not(.btn):not(.btn-primary) {
  color: var(--key);
  text-decoration: none;
  position: relative;
}
.card a:not(.btn):not(.btn-primary)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: currentColor;
  opacity: 0.35;
}

.stat-row {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 10px;
}

/* ===== WP編集コンテンツ（固定ページ）装飾 ===== */
.mn-wp-content {
  line-height: 1.75;
}
.mn-wp-content h2,
.mn-wp-content h3,
.mn-wp-content h4 {
  margin: 18px 0 10px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.mn-wp-content h2 {
  font-size: 1.1rem;
}
.mn-wp-content h3 {
  font-size: 1rem;
}
.mn-wp-content h4 {
  font-size: 0.95rem;
}

.mn-wp-content p {
  margin: 10px 0;
}
.mn-wp-content a {
  color: var(--key);
  text-decoration: none;
  position: relative;
}
.mn-wp-content a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: currentColor;
  opacity: 0.35;
}

.mn-terms-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

/* ===== Blog list + single ===== */
.blog-hero {
  margin: 8px 0 18px;
}
.blog-hero .small {
  display: block;
  margin-top: 6px;
}
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
}
.breadcrumb a {
  color: inherit;
  text-decoration: none;
  position: relative;
}
.breadcrumb a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: currentColor;
  opacity: 0.35;
}
.breadcrumb-sep {
  color: var(--muted);
  opacity: 0.7;
}
.blog-grid {
  display: grid;
  gap: 16px;
}
.blog-card {
  background: var(--card);
  padding: 18px;
  box-shadow: var(--shadow);
}
.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  flex-wrap: wrap;
}
.blog-cat {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(75, 91, 87, 0.06);
  color: var(--text);
}
.blog-excerpt {
  margin: 10px 0 12px;
  color: var(--text);
}
.blog-card .btn {
  margin-top: 4px;
}
.blog-pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.blog-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  text-decoration: none;
  color: var(--text);
  background: #fff;
  font-size: 13px;
}
.blog-pagination .page-numbers.current {
  background: var(--key);
  color: #fff;
  border-color: rgba(0, 0, 0, 0.08);
}
.blog-pagination .page-numbers:hover {
  background: rgba(75, 91, 87, 0.06);
}

.blog-article {
  background: var(--card);
  padding: 24px 20px;
  box-shadow: var(--shadow);
}
.blog-article-header {
  margin-bottom: 16px;
}
.blog-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  flex-wrap: wrap;
}
.blog-hero-image {
  margin: 16px 0 22px;
}
.blog-hero-image img {
  display: block;
  width: 100%;
  height: auto;
}
.blog-content {
  line-height: 1.95;
  font-size: 16.5px;
  letter-spacing: 0.01em;
}
.blog-content p {
  margin: 0 0 1em;
}
.blog-content h2,
.blog-content h3,
.blog-content h4 {
  margin: 1.6em 0 0.6em;
  line-height: 1.4;
}
.blog-content ul,
.blog-content ol {
  margin: 0 0 1em;
  padding-left: 1.2em;
}
.blog-content li {
  margin: 0.4em 0;
}
.blog-content blockquote {
  margin: 1.2em 0;
  padding: 12px 16px;
  background: rgba(75, 91, 87, 0.06);
  border-left: 3px solid var(--key);
}
.blog-content a {
  color: var(--key);
  text-decoration: none;
  position: relative;
}
.blog-content a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: currentColor;
  opacity: 0.35;
}
.blog-article-footer {
  margin-top: 24px;
  display: flex;
  justify-content: center;
}
@media (min-width: 720px) {
  .blog-article {
    padding: 32px 36px;
  }
}

.mn-wp-content ul,
.mn-wp-content ol {
  margin: 10px 0 10px 1.2em;
  padding: 0;
}
.mn-wp-content li {
  margin: 6px 0;
}

.mn-wp-content blockquote {
  margin: 14px 0;
  padding: 12px 14px;
  background: rgba(75, 91, 87, 0.06);
  border-left: 4px solid rgba(75, 91, 87, 0.25);
  border-radius: 12px;
}
.mn-wp-content code {
  font-family:
    ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    monospace;
  font-size: 0.9em;
  background: rgba(0, 0, 0, 0.06);
  padding: 0.15em 0.35em;
  border-radius: 6px;
}
.mn-wp-content pre {
  overflow: auto;
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 12px;
}
.mn-wp-content hr {
  border: 0;
  height: 1px;
  background: rgba(0, 0, 0, 0.1);
  margin: 16px 0;
}
.mn-wp-content .wp-block-separator {
  border: 0;
  height: 1px;
  background: rgba(0, 0, 0, 0.1);
  margin: 16px 0;
}
.mn-wp-content .wp-block-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.mn-wp-content .wp-block-table th,
.mn-wp-content .wp-block-table td {
  border: 1px solid rgba(0, 0, 0, 0.12);
  padding: 8px 10px;
}
