/*
Theme Name: Novel Craft Support Theme
Theme URI: https://www.novelcraft.site/
Author: Codex
Description: Novel Craft サポートサイト専用テーマ
Version: 1.0.0
Text Domain: novelcraft-support-theme
*/

:root {
  --nc-bg: #f6f1ea;
  --nc-surface: #fffaf4;
  --nc-surface-2: #fffdf9;
  --nc-line: rgba(54, 38, 25, 0.12);
  --nc-text: #2c221b;
  --nc-muted: #6a584a;
  --nc-accent: #d8683c;
  --nc-accent-deep: #af4b24;
  --nc-shadow: 0 24px 80px rgba(83, 54, 29, 0.10);
  --nc-radius-xl: 28px;
  --nc-radius-lg: 20px;
  --nc-radius-md: 16px;
  --nc-content: 1180px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(216, 104, 60, 0.14), transparent 28%),
    radial-gradient(circle at 85% 20%, rgba(69, 107, 87, 0.10), transparent 24%),
    linear-gradient(180deg, #fcf8f2 0%, var(--nc-bg) 100%);
  color: var(--nc-text);
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif;
  line-height: 1.8;
}

a {
  color: var(--nc-accent-deep);
}

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

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

.nc-site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 252, 247, 0.92);
  border-bottom: 1px solid var(--nc-line);
  backdrop-filter: blur(10px);
}

.nc-container {
  width: min(var(--nc-content), calc(100% - 32px));
  margin: 0 auto;
}

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

.nc-brand {
  display: inline-flex;
  align-items: center;
  color: var(--nc-text);
  text-decoration: none;
  font-size: clamp(1.45rem, 1.8vw, 1.9rem);
  font-weight: 700;
}

.nc-header-search {
  flex: 0 0 420px;
}

.nc-search-form {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nc-search-form input {
  flex: 1;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--nc-line);
  border-radius: 999px;
  background: var(--nc-surface-2);
  color: var(--nc-text);
  font: inherit;
}

.nc-search-form button,
.nc-button {
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.nc-search-form button,
.nc-button--primary {
  background: linear-gradient(135deg, var(--nc-accent) 0%, #f08b59 100%);
  color: #fff;
  box-shadow: 0 12px 28px rgba(216, 104, 60, 0.18);
}

.nc-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.nc-button--ghost {
  background: transparent;
  color: var(--nc-text);
  border: 1px solid var(--nc-line);
}

.nc-main {
  padding: 20px 0 96px;
}

.nc-hero,
.nc-panel,
.nc-card,
.nc-faq-item,
.nc-article,
.nc-support-copy,
.nc-support-form-card {
  background: rgba(255, 250, 244, 0.9);
  border: 1px solid var(--nc-line);
  border-radius: var(--nc-radius-xl);
  box-shadow: var(--nc-shadow);
}

.nc-hero {
  padding: 32px 36px;
}

.nc-eyebrow {
  margin: 0;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 700;
  color: var(--nc-accent-deep);
}

.nc-hero h1 {
  margin: 10px 0 14px;
  font-size: clamp(1.9rem, 3vw, 2.5rem);
  line-height: 1.3;
}

.nc-lead {
  max-width: 56rem;
  margin: 0;
  font-size: 1rem;
  color: var(--nc-muted);
}

.nc-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.nc-section {
  margin-top: 24px;
}

.nc-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.nc-section-head h2 {
  margin: 8px 0 0;
  font-size: clamp(1.7rem, 2.8vw, 2.5rem);
}

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

.nc-card {
  padding: 24px;
}

.nc-card h3 {
  margin: 8px 0 10px;
  font-size: 1.35rem;
}

.nc-card h3 a {
  color: var(--nc-text);
  text-decoration: none;
}

.nc-card p {
  margin: 0;
  color: var(--nc-muted);
}

.nc-faq-list {
  display: grid;
  gap: 14px;
}

.nc-faq-item {
  overflow: hidden;
}

.nc-faq-item summary {
  cursor: pointer;
  padding: 20px 24px;
  font-size: 1.08rem;
  font-weight: 700;
  list-style: none;
}

.nc-faq-item summary::-webkit-details-marker {
  display: none;
}

.nc-faq-body {
  padding: 0 24px 22px;
  color: var(--nc-muted);
}

.nc-support-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.42fr) minmax(0, 0.58fr);
  gap: 18px;
}

.nc-support-copy,
.nc-support-form-card {
  padding: 28px;
}

.nc-check-list {
  margin: 16px 0 0;
  padding-left: 1.2rem;
  color: var(--nc-muted);
}

.nc-article {
  padding: 36px 40px 48px;
}

.nc-article-header {
  margin-bottom: 28px;
}

.nc-article-header h1 {
  margin: 8px 0 0;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.2;
}

.nc-article-lead {
  margin-top: 14px;
  color: var(--nc-muted);
}

.nc-article .entry-content {
  line-height: 1.95;
}

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

.nc-article .toc {
  width: min(100%, 720px);
  margin: 0 0 28px;
  padding: 20px 24px;
  border: 1px solid var(--nc-line);
  border-radius: var(--nc-radius-md);
  background: var(--nc-surface-2);
}

.nc-article .toc-title,
.nc-article .toc-list {
  text-align: left;
}

.nc-article .toc ul,
.nc-article .toc ol {
  padding-left: 1.3rem;
}

.nc-article h2 {
  margin-top: 46px;
  padding: 16px 20px;
  border-radius: 14px;
  background: #f1f2f4;
}

.nc-article h3 {
  margin-top: 34px;
  padding-left: 14px;
  border-left: 5px solid rgba(44, 34, 27, 0.28);
}

.nc-article .date-tags,
.nc-article .sns-share,
.nc-article .sns-share-buttons,
.nc-article .footer-meta {
  display: none !important;
}

.nc-article table {
  width: 100%;
  border-collapse: collapse;
}

.nc-article th,
.nc-article td {
  padding: 14px 16px;
  border: 1px solid rgba(44, 34, 27, 0.10);
}

.nc-article th {
  background: #f1f2f4;
}

.nc-footer {
  padding: 22px 0 28px;
  border-top: 1px solid var(--nc-line);
}

.nc-footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nc-footer-nav a {
  color: var(--nc-text);
  text-decoration: none;
  font-weight: 700;
}

.nc-footer-copy {
  margin-top: 16px;
  color: var(--nc-muted);
  font-size: 0.92rem;
}

.nc-mobile-menu {
  display: none;
}

.novelcraft-support-form {
  display: grid;
  gap: 16px;
}

.novelcraft-support-form label {
  display: grid;
  gap: 8px;
  font-weight: 700;
}

.novelcraft-support-form input,
.novelcraft-support-form select,
.novelcraft-support-form textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--nc-line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--nc-text);
  font: inherit;
}

.novelcraft-support-form textarea {
  min-height: 180px;
  resize: vertical;
}

.novelcraft-support-form button {
  width: fit-content;
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--nc-accent) 0%, #f08b59 100%);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.novelcraft-support-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
}

.novelcraft-support-modal.is-open {
  display: block;
}

.novelcraft-support-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 15, 11, 0.48);
  backdrop-filter: blur(3px);
}

.novelcraft-support-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(92vw, 520px);
  margin: 12vh auto 0;
  padding: 28px;
  border-radius: 24px;
  background: #fffaf4;
  box-shadow: 0 32px 72px rgba(20, 15, 11, 0.24);
}

.novelcraft-support-modal__button {
  margin-top: 20px;
}

@media screen and (max-width: 1023px) {
  .nc-header-search,
  .nc-footer-nav {
    display: none;
  }

  .nc-grid,
  .nc-support-layout {
    grid-template-columns: 1fr;
  }

  .nc-mobile-menu {
    display: block;
  }

  .nc-mobile-toggle {
    position: fixed;
    left: -9999px;
  }

  .nc-mobile-button {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 9998;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 58px;
    height: 58px;
    padding: 0 16px;
    border-radius: 999px;
    background: var(--nc-text);
    box-shadow: 0 18px 36px rgba(44, 34, 27, 0.24);
    cursor: pointer;
  }

  .nc-mobile-button span {
    display: block;
    width: 100%;
    height: 2px;
    background: #fff;
    border-radius: 999px;
  }

  .nc-mobile-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9996;
    background: rgba(28, 20, 15, 0.38);
    opacity: 0;
    pointer-events: none;
  }

  .nc-mobile-panel {
    position: fixed;
    right: 16px;
    bottom: 86px;
    z-index: 9997;
    width: min(320px, calc(100vw - 32px));
    padding: 20px;
    border: 1px solid var(--nc-line);
    border-radius: 24px;
    background: rgba(255, 250, 242, 0.98);
    box-shadow: var(--nc-shadow);
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }

  .nc-mobile-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
  }

  .nc-mobile-list {
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .nc-mobile-list li + li {
    margin-top: 10px;
  }

  .nc-mobile-list a {
    display: block;
    padding: 12px 0;
    color: var(--nc-text);
    text-decoration: none;
    font-weight: 700;
    border-bottom: 1px solid rgba(44, 34, 27, 0.08);
  }

  .nc-mobile-toggle:checked ~ .nc-mobile-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .nc-mobile-toggle:checked ~ .nc-mobile-panel {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
}

@media screen and (max-width: 834px) {
  .nc-container {
    width: min(var(--nc-content), calc(100% - 24px));
  }

  .nc-main {
    padding-top: 16px;
  }

  .nc-hero,
  .nc-card,
  .nc-support-copy,
  .nc-support-form-card,
  .nc-article {
    padding: 24px;
  }

  .nc-hero h1 {
    font-size: clamp(1.65rem, 6vw, 2rem);
  }
}
