@import url("https://fonts.googleapis.com/css2?family=New+Tegomin&display=swap");

/* ========================================
   ブログ共通設定
   ブログの色やフォントはこのファイル内で管理する
   ======================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

:root {
  --bg: #131212;/*#0b0b0c*/
  --panel: #eceae5;/*#eceae5-#181719*/
  --panel-soft: #232125;
  --accent: #8b1e2f;
  --accent2: #6b131a;
  --text: #020202;
  --text2: #272524;
  --text3: #f3f2ec;
  --divider: rgba(209, 91, 100, 0.68);
  --shadow: rgba(0, 0, 0, 0.38);
  --font-en: Georgia, "Times New Roman", serif;
  --font-ja:
    "Noto Serif JP",
    "Yu Mincho",
    "Hiragino Mincho ProN",
    serif;
  --font-blog-display:
    "New Tegomin",
    "Yu Mincho",
    "Hiragino Mincho ProN",
    serif;
}

/*
:root {
  --bg: #131212;
  --panel: #181719;
  --panel-soft: #232125;
  --accent: #8b1e2f;
  --accent2: #6b131a;
  --text: #e4ded8;
  --text2: #aaa19a;
  --text-muted: #aaa19a;
  --divider: rgba(153, 15, 56, 0.89);
  --shadow: rgba(0, 0, 0, 0.38);
  --font-en: "Hina Mincho", Georgia, "Times New Roman", serif;
  --font-ja: "Hina Mincho", "Yu Mincho", "Hiragino Mincho ProN", serif;
  --font-special: "Hina Mincho", "Yu Mincho", "Hiragino Mincho ProN", serif;
}
*/





html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  padding: 0 0 80px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ja);
  font-size: 15px;
  font-weight: 300;
  line-height: 1.9;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
}

h1 {
  margin: 32px 16px 24px;
  color: #fff;
  font-family: var(--font-en);
  font-size: clamp(26px, 5vw, 38px);
  font-weight: 400;
  text-align: center;
}

p {
  margin: 32px 16px 24px;
  color: #aaa;
}

button {
  padding: 14px;
  color: #fff;
  background: var(--accent);
  border: 1px solid var(--accent2);
  border-radius: 8px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

button:hover {
  background: var(--accent2);
}

/* 共通ヘッダー */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 6px 32px;
  background: rgba(11, 11, 12, 0.94);
  border-bottom: 1px solid var(--divider);
  backdrop-filter: blur(8px);
}

.logo-link {
  display: inline-flex;
  align-items: center;
  color: #fff;
  text-decoration: none;
}

.logo-area img {
  display: block;
  width: auto;
  height: 48px;
}

.logo-text {
  color: #fff;
  font-family: var(--font-blog-display);
  font-size: 24px;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 26px;
  margin-left: auto;
}

.nav-icon-link {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  text-decoration: none;
}

.nav-icon-link img {
  display: block;
  width: 60px;
  height: auto;
}

.nav-link {
  color: var(--text);
  font-family: var(--font-blog-display);
  font-size: 17px;
  font-weight: 400;
  letter-spacing: 0.05em;
  text-decoration: none;
}

.nav-link:hover,
.nav-active {
  color: var(--accent2);
}

.footer-disabled,
.nav-disabled {
  color: var(--text2);
  cursor: default;
  pointer-events: none;
}

/* ========================================
   ブログ固有レイアウト
   ======================================== */
body > h1 {
  margin: 9px 16px 0px;
}

.blog-page-heading {
  width: min(800px, calc(100% - 28px));
  margin: 9px auto 0;
  color: var(--text3);
  text-align: center;
}

.blog-page-heading h1 {
  margin: 0;
}

.blog-page-heading p {
  margin: 4px 0 0;
  color: rgba(243, 242, 236, 0.76);
  font-size: 13px;
}

.blog-view-tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  width: max-content;
  max-width: 100%;
  margin: 18px auto 24px;
  padding: 0;
}

.blog-view-tab {
  flex: none;
  padding: 4px 1px 6px;
  color: rgba(243, 242, 236, 0.76);
  font-family: var(--font-blog-display);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.05em;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition:
    color 0.2s ease,
    border-color 0.2s ease;
}

.blog-view-tab:hover {
  color: var(--accent2);
}

.blog-view-tab.is-active {
  color: #fff;
  border-bottom-color: var(--accent2);
}

.blog-view-tab:focus-visible {
  outline: 2px solid var(--accent2);
  outline-offset: 3px;
}

.blog-title-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  width: min(960px, calc(100% - 28px));
  margin: 18px auto 12px;
}

.blog-title-nav-link {
  color: var(--text3);/*var(--text2)戻る次への文字色*/
  font-size: 15px;
  text-decoration: none;
  transition:
    color 0.2s ease,
    opacity 0.2s ease;
}

.blog-title-nav-prev {
  justify-self: start;
}

.blog-title-nav-next {
  justify-self: end;
}

.blog-title-nav-link:hover {
  color: var(--accent2);
}

.blog-title-nav-link.is-disabled {
  color: #b9b9b9;
  opacity: 0.55;
  pointer-events: none;
}

body > main.blog-main {
  width: min(800px, calc(100% - 28px));
  margin: 2px auto 40px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.blog-post-page > main.blog-main {
  width: min(850px, calc(100% - 28px));/*記事の横幅*/
}

.blog-post-page .blog-card {
  padding: clamp(24px, 4vw, 40px);
}

.blog-post-page .blog-card > time {
  display: block;
  color: var(--text2);
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.04em;
  opacity: 0.72;
}

.blog-post-page .blog-card h1 {
  margin: 8px 0 24px;
  color: #000;
  font-family: var(--font-ja);
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 400;
  line-height: 1.5;
  text-align: left;
}

.blog-post-page .blog-text {
  width: min(740px, 100%);
  margin-right: auto;
  margin-left: auto;
}

.blog-post-page .blog-image {
  width: 100%;
}

.blog-search {
  margin: 0 0 32px;
  padding: 8px 0 12px;
  border-bottom: 1px solid var(--divider);
}

.blog-filter-form {
  display: flex;
  align-items: stretch;
  gap: 10px;
  min-width: 0;
}

.blog-filter-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 1px minmax(140px, 0.62fr);
  flex: 1 1 auto;
  min-width: 0;
  min-height: 48px;
  overflow: hidden;
  background: var(--panel-soft);
  border: 1px solid rgba(209, 91, 100, 0.52);
  border-radius: 999px;
}

.blog-filter-controls:focus-within {
  border-color: var(--accent2);
  box-shadow: 0 0 0 2px rgba(209, 91, 100, 0.14);
}

.blog-filter-field {
  display: block;
  min-width: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.blog-filter-form input,
.blog-filter-form select {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  min-height: 46px;
  padding: 0 18px;
  color: var(--text3);/*var(--text)検索入力のテキスト色*/
  background: transparent;
  border: 0;
  border-radius: 0;
  outline: 0;
  font: inherit;
}

.blog-filter-form input::placeholder {
  color: var(--text3);/*var(--text)検索入力のテキスト色2*/
  opacity: 1;
}

.blog-filter-form select {
  padding-right: 12px;
  cursor: pointer;
}

.blog-filter-divider {
  width: 1px;
  margin: 10px 0;
  background: var(--divider);
}

.blog-filter-submit {
  flex: 0 0 auto;
  min-width: 82px;
  min-height: 48px;
  padding: 10px 18px;
  border-radius: 999px;
}

.blog-filter-reset {
  display: grid;
  flex: 0 0 auto;
  min-height: 48px;
  padding: 0 10px;
  color: var(--text2);
  text-decoration: none;
  place-items: center;
}

.blog-filter-reset:hover {
  color: var(--accent2);
}

.blog-search-result {
  margin: 14px 0 0;
  color: var(--text2);
  font-size: 13px;
}

.blog-empty {
  color: var(--text2);
  text-align: center;
}

.blog-card {
  margin-bottom: 32px;
  padding: 24px;
  background: var(--panel);/*var(--panel); カードの背景色 */
  border: 1px solid var(--divider);/* 枠線の色 */
  border-radius: 14px;
  box-shadow: 0 18px 38px var(--shadow);
}

.blog-list-card {
  padding: 0;
  overflow: hidden;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.blog-card-link {
  display: block;
  padding: 24px;
}

.blog-card-link.has-thumbnail {
  display: grid;
  grid-template-columns: minmax(180px, 4fr) minmax(0, 5fr);
  gap: 24px;
  align-items: center;
}

.blog-card-meta {
  min-width: 0;
}

.blog-card-meta time {
  display: block;
  margin-top: 6px;
  color: var(--text2);
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.04em;
  opacity: 0.72;
}

.blog-card h2 {
  margin: 0 0 12px;
  color: #000000;
  font-family: var(--font-ja);
  font-size: 22px;
  font-weight: 400;
}

.blog-list-card h2 {
  margin-bottom: 0;
}

/* 一覧カードには本文を表示しない */
.blog-index-page .blog-list-card .blog-body,
.blog-index-page .blog-list-card .blog-text {
  display: none;
}

.blog-card-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  margin: 0;
  overflow: hidden;
  text-align: center;
  border: 1px solid var(--divider);
  border-radius: 10px;
  box-shadow: none;
}

.blog-card-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.blog-card p {
  margin: 0;
  color: var(--text);
}

.blog-body {
  color: var(--text);
  line-height: 1.9;
  overflow-wrap: anywhere;
}

.blog-text {
  margin: 0;
}

/* てがろぐ投稿画面の文字装飾をBlog記事にも反映する */
.blog-body .decorationB {
  font-weight: 700;
}

.blog-body .decorationD {
  color: #777;
  text-decoration-color: var(--accent);
  text-decoration-line: line-through;
}

.blog-body .decorationE {
  color: var(--accent2);
  font-style: normal;
  font-weight: 700;
}

.blog-body .decorationI {
  font-style: italic;
}

.blog-body .decorationM {
  padding: 0 0.12em;
  border-radius: 0.15em;
}

.blog-body .decorationQ {
  display: block;
  margin: 1em 0;
  padding: 0.7em 1em;
  color: var(--text2);
  background: rgba(139, 30, 47, 0.08);
  border-left: 4px solid var(--accent);
}

.blog-body .decorationQ::before,
.blog-body .decorationQ::after {
  content: none;
}

.blog-body .decorationQ + br {
  display: none;
}

.blog-body .decorationS {
  font-size: 0.8em;
}

.blog-body .decorationT {
  font-size: 0.62em;
}

.blog-body .decorationU {
  text-decoration-color: var(--accent);
  text-decoration-line: underline;
  text-decoration-style: double;
}

.blog-body .decorationR rt {
  color: var(--text2);
  font-size: 0.58em;
}

.blog-body .decorationL {
  margin: 0.8em 0;
  padding-left: 1.8em;
}

.blog-body dl.decorationL {
  padding-left: 0;
}

.blog-body .decorationL dt {
  font-weight: 700;
}

.blog-body .decorationL dd {
  margin: 0 0 0.6em 1.5em;
}

.blog-body .decorationH,
.blog-body .decorationO {
  margin: 0.8em 0;
  padding: 0.65em 0.8em;
  background: rgba(139, 30, 47, 0.06);
  border: 1px solid rgba(107, 19, 26, 0.28);
  border-radius: 6px;
}

.blog-body .decorationH summary,
.blog-body .decorationO summary {
  color: var(--accent2);
  cursor: pointer;
  font-weight: 700;
}

.blog-body .decorationH > div,
.blog-body .decorationO > div {
  margin-top: 0.45em;
}

.blog-body .deco-scream {
  font-size: 1.67em;
}

.blog-body .deco-code {
  display: inline-block;
  padding: 0 0.3em;
  color: #111;
  background: #f6f1ee;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 3px;
  font-family: Consolas, "Courier New", monospace;
}

.blog-body .deco-separator {
  display: block;
  border-bottom: 1px dotted var(--text2);
}

.blog-image {
  margin: 22px 0;
  text-align: center;
}

.blog-image img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 760px;
  margin: 0 auto;
  border: 1px solid var(--divider);
  border-radius: 10px;
  box-shadow: none;/*0 10px 28px var(--shadow)*/
}

.blog-card a {
  color: inherit;
  text-decoration: none;
}

.blog-card a:hover h2 {
  color: var(--accent2);
}

.blog-list-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent2);
  box-shadow: none;/*0 10px 28px var(--shadow)*/
}

.blog-list-card:focus-within {
  border-color: var(--accent2);
  outline: 2px solid var(--accent2);
  outline-offset: 3px;
}

body > h1,
.blog-title-nav-link,
.blog-card h2,
.blog-filter-field > span,
.blog-filter-submit,
.blog-filter-reset,
.nav-link,
.back-link a {
  font-family: var(--font-blog-display);
  font-weight: 400;
  letter-spacing: 0.05em;
}

@media (max-width: 720px) {
  body {
    font-size: 14px;
  }

  .site-header {
    padding: 12px 18px;
  }

  .logo-area img {
    height: 42px;
  }

  .site-nav {
    gap: 8px 14px;
  }

  .nav-link {
    font-size: 14px;
  }

  body > h1 {
    margin: 4px 16px 0;
  }

  .blog-page-heading {
    margin-top: 4px;
  }

  .blog-view-tabs {
    gap: 16px;
    margin-top: 16px;
    margin-bottom: 20px;
  }

  .blog-view-tab {
    padding: 4px 1px 6px;
    font-size: 12px;
  }

  .blog-title-nav {
    margin-top: 10px;
    margin-bottom: 8px;
  }

  .blog-title-nav-link {
    font-size: 13px;
  }

  body > main.blog-main {
    margin: 0 auto 2px;
  }

  .blog-post-page .blog-card {
    padding: 20px;
  }

  .blog-post-page .blog-card h1 {
    margin-bottom: 18px;
    font-size: 24px;
  }

  .blog-search {
    padding-top: 2px;
  }

  .blog-card {
    padding: 18px;
  }

  .blog-list-card {
    padding: 0;
  }

  .blog-card-link {
    padding: 18px;
  }

  .blog-card-link.has-thumbnail {
    grid-template-columns: minmax(108px, 0.42fr) minmax(0, 0.58fr);
    gap: 14px;
  }

  .blog-list-card h2 {
    font-size: 18px;
    line-height: 1.5;
  }

  .blog-card-meta time {
    margin-top: 3px;
    font-size: 11px;
  }

  .blog-card-image {
    height: auto;
  }

  .blog-filter-form {
    flex-wrap: wrap;
    gap: 8px;
  }

  .blog-filter-controls {
    grid-template-columns: minmax(0, 1fr) 1px minmax(112px, 0.68fr);
    flex: 1 1 0;
    min-height: 44px;
  }

  .blog-filter-form input,
  .blog-filter-form select {
    min-height: 42px;
    padding-right: 12px;
    padding-left: 12px;
    font-size: 13px;
  }

  .blog-filter-divider {
    margin: 9px 0;
  }

  .blog-filter-submit {
    width: auto;
    min-width: 68px;
    min-height: 44px;
    padding: 8px 12px;
  }

  .blog-filter-reset {
    flex: 0 0 100%;
    width: 100%;
    min-height: 36px;
  }

  .blog-body {
    font-size: 16px;
  }
}

.back-link {
  margin-top: 24px;
  text-align: center;
}

.back-link a {
  color: var(--text3);
  text-decoration: none;
}

.back-link a:hover {
  color: var(--accent2);
}


/* ブログ投稿画面 */
.write-main {
  width: min(600px, calc(100% - 28px));
  margin: 40px auto;
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--divider);
  border-radius: 14px;
  box-shadow: 0 18px 38px var(--shadow);
}

.write-main h1 {
  margin: 0 0 24px;
}

.write-main textarea {
  width: 100%;
  min-height: 240px;
  padding: 12px;
  color: var(--text);
  background: var(--panel-soft);
  border: 1px solid rgba(209, 91, 100, 0.52);
  border-radius: 8px;
  font: inherit;
  line-height: 1.8;
  resize: vertical;
}

.image-insert-tools {
  margin: 12px 0 22px;
  padding: 14px;
  background: var(--panel-soft);
  border: 1px dashed rgba(209, 91, 100, 0.62);
  border-radius: 10px;
}

.image-insert-button {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 14px;
  color: #fff;
  background: var(--accent);
  border: 0;
  border-radius: 8px;
  font: inherit;
  text-align: center;
  cursor: pointer;
}

.image-insert-button:hover {
  background: var(--accent2);
}

.image-picker-input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.image-picker-input:focus + .image-insert-button {
  outline: 2px solid var(--accent2);
  outline-offset: 3px;
}

.image-insert-help {
  margin: 10px 0 0;
  color: var(--text2);
  font-size: 13px;
  line-height: 1.7;
}

#image-file-inputs {
  display: none;
}

.selected-image-list {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.selected-image-list:empty {
  display: none;
}

.selected-image-list li {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px;
  background: rgba(0, 0, 0, 0.18);
  border-radius: 8px;
}

.selected-image-list img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 6px;
}

.selected-image-list span {
  min-width: 0;
  color: var(--text);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selected-image-list .image-upload-error {
  color: #ffd9d9;
  white-space: normal;
}

.selected-image-list button {
  padding: 7px 10px;
  font-size: 12px;
}

.write-links {
  margin-top: 24px;
  color: var(--text2);
  text-align: center;
}

.write-links a:hover {
  color: var(--accent2);
}

.blog-list-card .blog-card-excerpt {
  display: -webkit-box;
  margin: 10px 0 0;
  color: var(--text2);
  line-height: 1.7;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

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

  .blog-view-tab {
    transition: none;
  }
}
