/* 1. Design System / Variables */
:root {
  --color-accent: #1e88e5;
  --color-accent-soft: #e3f2fd;
  --color-link: #1565c0;
  --color-danger: #d32f2f;

  --color-shop-base: #00a074;
  --color-shop-mercari: #ff3b30;
  --color-shop-yahoo: #ff0050;

  --c-main: #000000;
  --c-accent: #ffffff;
  --c-muted: #666666;

  --c-bg-base: #fbfdfe;
  --c-bg-main: #92bedb;
  --c-bg-accent: #001559;
  --c-bg-main-hover: #e0ffff;

  --c-main-gradient: linear-gradient(120deg, var(--c-bg-accent), #5f99cf);
  --c-sub-gradient: linear-gradient(120deg, #ebdbf3, #a0a0a0);

  --c-border-default: #666666;
  --c-border-subtle: #dbe5ec;

  --shadow-sm: 0 2px 6px rgba(10, 40, 80, 0.06);
  --shadow-md: 0 8px 24px rgba(10, 40, 80, 0.12);
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-accent: #6cb6ff;
    --color-accent-soft: #163047;
    --color-link: #8ab4ff;
    --color-danger: #ef5350;

    --c-main: #eeffff;
    --c-accent: #000000;
    --c-muted: #a0a0a0;

    --c-bg-base: #111111;
    --c-bg-main: #1b2b29;
    --c-bg-accent: #0b0f11;
    --c-bg-main-hover: #24413d;

    --c-main-gradient: linear-gradient(120deg, #0b0f11, #244b63);

    --c-border-default: #8ae3c5;
    --c-border-subtle: #2a3a46;

    --shadow-sm: 0 2px 6px rgba(255, 255, 255, 0.08);
    --shadow-md: 0 8px 24px rgba(255, 255, 255, 0.14);
  }
}

/* 2. Common / Reset & Typography */
html {
  font-size: 62.5%;
  background: var(--c-bg-base);
}

body {
  margin: 0;
  font: 1.6rem/1.6 Arial, sans-serif;
  background: var(--c-bg-base);
  color: var(--c-main);
}

.page {
  max-width: 1200px;
  margin: 2.4rem auto;
  padding: 0 1.2rem;
}

@media (min-width: 768px) {
  .page { padding: 0 2rem; }
}

h1, h2, h3 {
  margin: 0.6rem 0;
  line-height: 1.3;
}

h1 {
  text-align: center;
  color: var(--c-bg-accent);
}

h2 {
  padding-left: 0.6rem;
  color: var(--c-bg-accent);
  border-left: 0.4rem solid var(--c-bg-accent);
}

.main_lead {
  text-align: center;
  margin-bottom: 3rem;
}

.text_center,
h2.h2-center,
#home h2,
#contact h2,
#donation h2,
#maintenance h2 {
  padding-left: 0;
  border-left: none;
}

.text_center,
h2.h2-center,
#confirm h2,
#confirm h3 {
  text-align: center;
}

h2.h2-center::before { content: '◇'; margin-right: 0.7rem; }
h2.h2-center::after  { content: '◇'; margin-left: 0.7rem; }

#article {
  margin: 0 auto;
  padding: 20px 0;
}

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: var(--color-link);
  text-decoration: underline;
  font-weight: bold;
  font-style: italic;
}

.nav a {
  color: inherit;
  text-decoration: none;
  font-weight: normal;
  font-style: normal;
}

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

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

.hp-wrap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

@media (hover: hover) {
  button, a, summary, [role="button"], input[type="submit"], input[type="button"] {
    cursor: pointer;
  }
}

/* 3. Header & Footer */
.header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
  padding: 1.2rem 0;
  background: var(--c-main-gradient);
  color: var(--c-accent);
}

.header__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.2rem;
}

.header__logo { text-align: center; }
.header__title { display: block; font-size: 2.4rem; font-weight: bold; }
.header__subtitle { display: block; font-size: 1.2rem; letter-spacing: 0.1em; opacity: 0.7; }

.nav__toggle { display: none; }
.nav__button { display: block; font-size: 2rem; cursor: pointer; }
.nav__list {
  display: none;
  flex-direction: column;
  gap: 1rem;
  text-align: center;
  padding: 1rem 0;
}
.nav__toggle:checked + .nav__button + .nav__list { display: flex; }
.nav__link { display: block; padding: 0.8rem 1rem; }

@media (min-width: 768px) {
  .header { gap: 1.6rem; }
  .nav__button { display: none; }
  .nav__list {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 2rem;
    padding: 0;
  }
  .nav__link { transition: opacity 0.3s, color 0.3s; opacity: 0.7; }
  .nav__link:hover { opacity: 1; color: var(--c-accent); font-weight: bold; }
}

.footer {
  padding: 2rem 0;
  text-align: center;
  border-top: 1px solid var(--c-border-default);
  margin-top: 3rem;
  background: var(--c-main-gradient);
  color: var(--c-accent);
}
.footer__copy { font-size: 1.4rem; opacity: 0.8; }

/* 4. Home Article & Accordion */
.article {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
  align-items: center;
}
#home article { margin-bottom: 3rem; }

.article__media {
  width: 100%;
  max-width: 240px;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 0.8rem;
  flex-shrink: 0;
}

.article__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.article__body { max-width: 600px; text-align: left; }

@media (min-width: 768px) {
  .article { flex-direction: row; align-items: flex-start; gap: 2rem; }
  .article__media { max-width: 220px; }
  .article__body { flex: 1; }
}

.accordion {
  border-radius: 6px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 0.75rem;
}
.accordion__control { display: none; }
.accordion__summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  cursor: pointer;
  background: var(--c-bg-main);
  color: var(--c-main);
  font-weight: 500;
  border-bottom: 1px solid var(--c-border-default);
  transition: background-color 0.2s;
  margin-top: 0.75rem;
  border-radius: 3px;
}
.accordion__summary:hover { background: var(--c-bg-main-hover); }
.accordion__summary::after { content: "+"; font-weight: bold; font-size: 1.2rem; }
.accordion__control:checked + .accordion__summary::after { content: "−"; }

.accordion__content {
  max-height: 0;
  overflow: hidden;
  padding: 0 1rem;
  border-left: 5px solid var(--c-bg-main);
  font-size: 1.6rem;
  line-height: 1.6;
  transition: max-height 0.2s ease, padding 0.2s ease;
}
.accordion__control:checked + .accordion__summary + .accordion__content {
  max-height: 1000px;
  padding: 1rem;
}
.accordion__content p { margin: 0; }

/* 5. Contact Form */
#donation p,
#contact p {
  max-width: 72rem;
  margin: 0 auto 2rem;
  line-height: 1.5;
}

.contact-form {
  max-width: 72rem;
  margin: 4rem auto;
  padding: 3.2rem;
  background: var(--c-accent);
  border: 1px solid var(--c-border-subtle);
  border-radius: 1.6rem;
  box-shadow: var(--shadow-sm);
}
.contact-form .form-group { margin-bottom: 2.4rem; }
.contact-form label { display: block; margin-bottom: 0.8rem; font-weight: bold; }
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 1.2rem;
  border: 1px solid var(--c-border-subtle);
  border-radius: 0.8rem;
  background: var(--c-accent);
  color: var(--c-main);
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.contact-form textarea { resize: vertical; min-height: 16rem; }
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 0.3rem rgba(30, 136, 229, 0.15);
}

@media (min-width: 768px) {
  .contact-form .is-inline {
    display: grid;
    grid-template-columns: 18rem 1fr;
    align-items: start;
    gap: 2rem;
  }
  .contact-form .is-inline label { margin-top: 1.2rem; margin-bottom: 0; }
}

/* 6. News & Thumbnails */
.news-list { display: flex; flex-direction: column; gap: 2rem; }
.news-article {
  display: flex;
  gap: 2rem;
  align-items: center;
  border-bottom: 1px solid var(--c-border-default);
  padding-bottom: 2rem;
  flex-wrap: wrap;
}

.thumbnail-wrapper {
  width: 120px;
  height: 80px;
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  flex-shrink: 0;
  background: var(--c-bg-main-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--c-border-default);
}
.thumbnail-wrapper img,
.placeholder-box {
  width: 100%;
  height: 100%;
}
.thumbnail-wrapper img { object-fit: cover; z-index: 1; }
.placeholder-box {
  display: none;
  position: absolute;
  inset: 0;
  background: var(--c-main-gradient);
  color: var(--c-accent);
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.2rem;
  z-index: 0;
  text-align: center;
  padding: 4px;
}

.news-detail { flex: 1; min-width: 250px; }
.news-meta { font-size: 1.2rem; color: var(--c-muted); opacity: 0.85; }
.news-heading { margin: 0.5rem 0 0; font-size: 1.5rem; line-height: 1.4; font-weight: 600; }

.news-link { text-decoration: none; color: var(--c-main); transition: color 0.2s, opacity 0.2s; }
.news-link:hover { color: var(--color-link); opacity: 0.85; }

.back-link { text-decoration: none; font-weight: 500; transition: color 0.2s; }
.back-link:hover { color: var(--color-accent); text-decoration: underline; }

.error-msg { color: var(--color-danger); font-weight: 500; }
.empty-msg { opacity: 0.8; padding: 1.5rem 0; }

/* 7. LP & Buttons */
.lp-page { padding: 2rem; }
.lp-sub-title { font-size: 2.6rem; font-weight: bold; color: var(--c-muted); text-align: center; }
.lp-visual { margin-bottom: 1rem; }
.lp-block { margin-bottom: 8rem; }
.lp-image { width: 100%; }
.lp-text { font-size: 0.9rem; color: var(--c-muted); text-align: center; margin-top: 0.5rem; }

.note {
  padding: 1rem;
  background: var(--c-bg-main-hover);
  border-left: 4px solid var(--color-accent-soft);
  margin: 1rem 0;
  font-size: 1.4rem;
}

.btn-next,
.btn-back,
.btn-submit {
  display: block;
  width: fit-content;
  padding: 1.2rem 3.2rem;
  border-radius: 999px;
  color: var(--c-accent);
  font-weight: bold;
  text-decoration: none;
  box-shadow: var(--shadow-md);
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
  border: none;
}
.btn-next,
.btn-submit { grid-column: 2; justify-self: center; background: var(--c-main-gradient); }
.btn-back { justify-self: start; background: var(--c-sub-gradient); color: var(--c-main); }
#maintenance .btn-back { justify-self: center; margin-top: 5rem; }

.btn-next:hover,
.btn-back:hover,
.btn-submit:hover {
  transform: translateY(-3px);
  filter: brightness(1.12);
  box-shadow: 0 12px 28px rgba(10, 40, 80, 0.22);
}

.form-buttons {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin-top: 3rem;
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 15px auto 0;
}

.btn-shop {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  min-width: 120px;
  border-radius: 6px;
  color: var(--c-accent);
  font-weight: bold;
  font-size: 14px;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.2s;
  border: none;
}
.btn-shop:hover { opacity: 0.85; transform: translateY(-1px); }

.btn-base    { background: var(--color-shop-base); }
.btn-mercari { background: var(--color-shop-mercari); }
.btn-yahoo   { background: var(--color-shop-yahoo); }

/* 8. Maintenance & Admin */
.maintenance-inner {
  max-width: 800px;
  margin: 0 auto;
  padding: 4rem 2rem;
  text-align: center;
}
.maintenance-inner p { width: fit-content; margin: 0 auto; }
.maintenance-image { width: 18rem; max-width: 60%; margin: 0 auto 3rem; }

.admin-body { padding: 20px; }
.admin-box {
  background: var(--c-accent);
  padding: 15px;
  border: 1px solid var(--c-border-subtle);
  margin-bottom: 20px;
  border-radius: 6px;
  box-shadow: var(--shadow-sm);
}

.admin-table {
  border-collapse: collapse;
  table-layout: fixed;
  width: 100%;
  background: var(--c-accent);
  margin-top: 10px;
}
.admin-table th,
.admin-table td {
  border: 1px solid var(--c-border-subtle);
  padding: 8px;
  vertical-align: middle;
  overflow-wrap: anywhere;
}
.admin-table th { background: var(--c-bg-main-hover); }
.admin-table .thumbnail-wrapper { margin: 0 auto; }



/* 問い合わせ・応募対応一覧（既存変数を流用） */
.admin-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  background: var(--c-bg-main-hover);
  padding: 10px;
  border-radius: 6px;
  margin-bottom: 1.6rem;
}

.admin-filter-link {
  padding: 6px 12px;
  text-decoration: none;
  font-style: normal;
  font-size: 1.4rem;
  border-radius: 4px;
  background: var(--c-accent);
  color: var(--c-main);
  border: 1px solid var(--c-border-subtle);
}

.admin-filter-link.is-active {
  background: var(--c-bg-accent);
  color: var(--c-accent);
  font-weight: bold;
  border-color: var(--c-bg-accent);
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.contact-card {
  border: 1px solid var(--c-border-subtle);
  border-radius: 8px;
  padding: 1.4rem;
  background: var(--c-accent);
  box-shadow: var(--shadow-sm);
}

.contact-card.is-donation {
  border: 2px solid var(--color-link);
  background: var(--c-bg-main-hover);
}

.contact-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.contact-card__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.contact-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--c-accent);
  background: var(--c-muted);
}

.contact-badge.is-donation { background: var(--color-link); }
.contact-badge.is-unreplied { background: var(--color-danger); }
.contact-badge.is-replied { background: var(--c-muted); }

.contact-card__body {
  background: var(--c-accent);
  padding: 1rem;
  margin: 1rem 0;
  border: 1px solid var(--c-border-subtle);
  border-radius: 6px;
  white-space: pre-wrap;
  color: var(--c-main);
}

.contact-card__actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 0.8rem;
  border-top: 1px solid var(--c-border-subtle);
}

.contact-card__buttons {
  display: flex;
  gap: 8px;
  margin-left: auto;
  flex-wrap: wrap;
}

/* 新規記事作成フォーム（既存変数を流用） */
.post-form {
  display: flex;
  flex-direction: column;
  gap: 2.4rem;
  background: var(--c-accent);
  padding: 2.4rem;
  border-radius: 1.2rem;
  border: 1px solid var(--c-border-subtle);
  box-shadow: var(--shadow-sm);
}

.post-field {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.post-field--divider {
  border-bottom: 2px solid var(--c-border-subtle);
  padding-bottom: 2.4rem;
}

.post-label {
  font-weight: bold;
  color: var(--c-main);
}

.post-hint {
  font-size: 1.2rem;
  color: var(--c-muted);
}

.post-rule-box {
  font-size: 1.2rem;
  background: var(--c-bg-main-hover);
  padding: 0.8rem 1.2rem;
  border-radius: 6px;
  border: 1px solid var(--c-border-subtle);
}

.post-chapters {
  display: flex;
  flex-direction: column;
  gap: 3.2rem;
}

.chapter-block {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
  max-width: 800px;
}

.chapter-block.is-hidden {
  display: none;
}

.post-media-box {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  background: var(--c-bg-base);
  padding: 1.4rem;
  border-radius: 8px;
  border: 1px solid var(--c-border-subtle);
}

.post-box {
  background: var(--c-bg-base);
  padding: 2rem;
  border-radius: 8px;
  border: 1px solid var(--c-border-subtle);
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.post-box--ad {
  background: var(--c-bg-main-hover);
  border-style: dashed;
}

.post-row {
  display: flex;
  gap: 1.6rem;
  flex-wrap: wrap;
}

.post-row > * {
  flex: 1;
  min-width: 200px;
}

.post-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 2px solid var(--c-border-subtle);
  padding-top: 2rem;
  flex-wrap: wrap;
  gap: 1.6rem;
}


/* 既存記事一覧・編集ページ用（既存変数を流用） */
.admin-list-table {
  border-collapse: collapse;
  width: 100%;
  background: var(--c-accent);
  border: 1px solid var(--c-border-subtle);
}

.admin-list-table th,
.admin-list-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--c-border-subtle);
  text-align: left;
  vertical-align: middle;
}

.admin-list-table th {
  background: var(--c-bg-main-hover);
  border-bottom: 2px solid var(--c-border-default);
}

.status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 1.2rem;
  font-weight: bold;
  background: var(--c-bg-main-hover);
  color: var(--c-main);
}

.status-badge--pub {
  background: var(--color-shop-base);
  color: var(--c-accent);
}

.current-thumb-box {
  background: var(--c-accent);
  padding: 0.8rem;
  border-radius: 6px;
  border: 1px solid var(--c-border-subtle);
  display: inline-block;
  width: fit-content;
}

.current-thumb-box img {
  max-width: 150px;
  max-height: 100px;
  object-fit: cover;
}