/* daiskip.com - Cursor ホーム風 */
:root {
  --bg: #faf8f5;
  --bg-card: #fffefc;
  --text: #171717;
  --text-muted: #737373;
  --border: #e5e4eb;
  --separator: #d4d2dc;
  /* ボタン・リンク: #333 前後のダークグレー */
  --accent: #333333;
  --accent-hover: #1a1a1a;
  --accent-soft: rgba(51, 51, 51, 0.08);
  --accent-border: rgba(51, 51, 51, 0.25);
  --radius: 10px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-btn: 0 1px 2px rgba(0, 0, 0, 0.08);
  --shadow-btn-hover: 0 2px 6px rgba(0, 0, 0, 0.1);
  --transition: 0.2s ease;
  --focus-ring: 0 0 0 2px var(--bg-card), 0 0 0 4px var(--accent);
  --touch-min: 44px;
  /* 投稿画面ボタン用 */
  --btn-preview: #64748b;
  --btn-preview-hover: #475569;
  --btn-draft: #78716c;
  --btn-draft-hover: #57534e;
  /* ボタン共通: タグと同じピル形・黒で統一 */
  --btn-radius: 999px;
  --btn-black: #1a1a1a;
}

* { box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Hiragino Sans", "Noto Sans JP", "Yu Gothic", sans-serif;
  font-size: 17px;
  line-height: 1.47;
  color: var(--text);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background-color: var(--bg);
  background-image: none;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.022em;
}

/* リンク: 下線 + ホバーで下線が伸びるアニメーション（gradient） */
.main a[href] {
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.18);
  background-image: linear-gradient(var(--accent), var(--accent));
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 0% 1px;
  transition: background-size 0.3s ease, border-bottom-color 0.3s ease;
}
.main a[href]:hover,
.main a[href]:focus-visible {
  border-bottom-color: transparent;
  background-size: 100% 1px;
}
.main a[href]::after {
  content: none;
  display: none;
}

/* 記事一覧のサムネイルリンク：下線アニメなし（.main a[href] より優先） */
.main a.entry-photo-link,
.main a.entry-photo-link:hover,
.main a.entry-photo-link:focus-visible {
  border-bottom: none;
  background-image: none;
  background-size: 0;
}

/* 背景写真ストリップ: Photo カテゴリ・Photo 個別ページでのみ base で出力される */
.bg-photo-strip {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  overflow: hidden;
  width: 100vw;
}

/* 各 .bg-photo に黒オーバーレイをかけ、hover で取り除く */

.bg-photo {
  flex: 1 1 80px;
  min-width: 80px;
  aspect-ratio: 1;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: block;
  text-decoration: none;
  position: relative;
}

.bg-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.bg-photo:hover::after {
  opacity: 0;
}

@keyframes tooltip-line-underline {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.bg-photo-tooltip {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 20;
  display: inline-block;
  padding: 0 0 4px 0;
  font-size: 2.25rem;
  font-weight: 500;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  max-width: min(85vw, 520px);
  line-height: 1.35;
}

.bg-photo-tooltip .tooltip-line {
  display: block;
  width: max-content;
  max-width: 100%;
  position: relative;
}

.bg-photo-tooltip .tooltip-line::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: #fff;
  transform: scaleX(0);
  transform-origin: left;
}

.bg-photo:hover .bg-photo-tooltip {
  opacity: 1;
}

.bg-photo:hover .bg-photo-tooltip .tooltip-line:nth-child(1)::after {
  animation: tooltip-line-underline 0.6s ease-in-out 0s forwards;
}
.bg-photo:hover .bg-photo-tooltip .tooltip-line:nth-child(2)::after {
  animation: tooltip-line-underline 0.6s ease-in-out 0.35s forwards;
}
.bg-photo:hover .bg-photo-tooltip .tooltip-line:nth-child(3)::after {
  animation: tooltip-line-underline 0.6s ease-in-out 0.7s forwards;
}
.bg-photo:hover .bg-photo-tooltip .tooltip-line:nth-child(4)::after {
  animation: tooltip-line-underline 0.6s ease-in-out 1.05s forwards;
}
.bg-photo:hover .bg-photo-tooltip .tooltip-line:nth-child(n+5)::after {
  animation: tooltip-line-underline 0.6s ease-in-out 1.4s forwards;
}

body > .main {
  position: relative;
  z-index: 1;
}

.main .wrap {
  pointer-events: auto;
}

.main {
  pointer-events: none;
}

.wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* トップ: メイン + サイドカラム（Moblog / QuadCamera / Video 各1件） */
body.index .main .wrap {
  max-width: 960px;
}

.index-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 2rem;
  align-items: start;
}

.index-main {
  min-width: 0;
}

.index-sidebar-section {
  margin-bottom: 1.5rem;
}

.index-sidebar-section:last-child {
  margin-bottom: 0;
}

.index-sidebar-entry .entry-body,
.index-sidebar-entry .entry-more,
.index-sidebar-entry .entry-actions,
.index-sidebar-entry .entry-place-map,
.index-sidebar-entry .entry-meta-fields,
.index-sidebar-entry .entry-quote {
  display: none;
}

/* Video セクションは本文（動画埋め込み）を表示 */
.index-sidebar-section--video .entry-body,
.index-sidebar-section--video .entry-more {
  display: block;
  font-size: 11px;
}

.index-sidebar-section--video .entry-body iframe,
.index-sidebar-section--video .entry-more iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 200px;
  border-radius: var(--radius-sm);
}

.index-sidebar-entry .entry-title {
  font-size: 1rem;
}

.index-sidebar-entry .entry-time {
  font-size: 0.75rem;
}

.index-sidebar-entry .entry-photo-slideshow,
.index-sidebar-entry .entry-photo-link,
.index-sidebar-entry .entry-photo--moblog-tiles {
  max-height: 220px;
  overflow: hidden;
}

.index-sidebar-entry .entry-photo-slideshow .entry-photo-slide img,
.index-sidebar-entry .entry-photo-link .quadcamera-flipbook {
  width: 100%;
  object-fit: cover;
}

/* Moblog セクションの写真は幅50%、高さ制限あり */
.index-sidebar-section:not(.index-sidebar-section--video):not(.index-sidebar-section--quadcamera) .entry-photo-slideshow,
.index-sidebar-section:not(.index-sidebar-section--video):not(.index-sidebar-section--quadcamera) .entry-photo-link {
  width: 50%;
  max-height: 220px;
  overflow: hidden;
}

.index-sidebar-section:not(.index-sidebar-section--video) .entry-photo-slideshow .entry-photo-slide img,
.index-sidebar-section:not(.index-sidebar-section--video) .entry-photo-link .quadcamera-flipbook {
  width: 100%;
  object-fit: cover;
}

/* QuadCamera セクション: 写真は幅50%、縦は全部表示（max-height なし） */
.index-sidebar-section--quadcamera .entry-photo-link {
  width: 50%;
  max-height: none;
  overflow: visible;
}

.index-sidebar-section--quadcamera .entry-photo-link .quadcamera-flipbook {
  width: 100%;
  object-fit: contain;
}

.index-sidebar-section--quadcamera .quadcamera-flipbook .quadcamera-sprite {
  width: 100%;
  aspect-ratio: 3 / 4;
  max-height: none;
  object-fit: contain;
}

@media (max-width: 768px) {
  .index-layout {
    grid-template-columns: 1fr;
  }

  .index-sidebar {
    position: static;
  }
}

/* logo: bottom-left fixed */
@keyframes bg-shift {
  0%, 100% { background-color: var(--bg-card); }
  50% { background-color: var(--bg); }
}

.site-breadcrumb {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  z-index: 10;
  padding: 0;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text);
  min-height: var(--touch-min);
  display: flex;
  align-items: center;
}

.site-breadcrumb-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
}

.site-breadcrumb-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
}

.site-breadcrumb-icon {
  opacity: 0.85;
  text-decoration: none;
  border: none;
}

.site-breadcrumb-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  vertical-align: -0.25em;
  text-decoration: none;
  border: none;
  margin-right: 10px;
}

.site-breadcrumb-link {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.18);
  background-image: linear-gradient(var(--accent), var(--accent));
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 0% 1px;
  transition: color var(--transition), background-size 0.3s ease, border-bottom-color 0.3s ease;
}

.site-breadcrumb-link:hover,
.site-breadcrumb-link:focus-visible {
  color: var(--accent);
  border-bottom-color: transparent;
  background-size: 100% 1px;
}

.site-breadcrumb-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.site-breadcrumb-current {
  color: var(--text);
}

.site-breadcrumb-sep {
  color: var(--text);
  user-select: none;
  pointer-events: none;
  font-size: 0.6em;
  margin-right: 1.2em;
}

/* nav: ハンバーガーメニュー、top-right fixed */
.site-nav-fixed {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 10;
  font-size: 0.8125rem;
  letter-spacing: -0.01em;
}

.site-nav-hamburger {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: none;
  border-radius: var(--radius-sm);
  background-color: var(--bg-card);
  color: var(--text);
  cursor: pointer;
  transition: color var(--transition), background-color var(--transition), transform 0.2s ease;
  animation: bg-shift 6s ease-in-out infinite;
}

.site-nav-hamburger:hover {
  color: var(--accent);
  transform: scale(5);
}

.site-nav-hamburger:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* 閉じる（✕）のときは背景なし */
.site-nav-fixed.is-open .site-nav-hamburger {
  background-color: transparent;
  animation: none;
}

.site-nav-hamburger i {
  font-size: 1.25rem;
}

.site-nav-hamburger-icon.is-spinning {
  animation: site-nav-icon-spin 0.35s linear forwards;
}

@keyframes site-nav-icon-spin {
  to {
    transform: rotate(360deg);
  }
}

.site-nav-menu {
  position: fixed;
  inset: 0;
  z-index: 9;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  box-sizing: border-box;
  background-color: color-mix(in srgb, var(--bg-card) 20%, transparent);
  animation: bg-shift 6s ease-in-out infinite;
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.35s ease, transform 0.35s ease;
  pointer-events: none;
}

.site-nav-fixed .site-nav-menu[hidden] {
  display: none;
}

.site-nav-fixed.is-open .site-nav-menu {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

@property --nav-link-fill {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 0%;
}

.site-nav-menu a {
  --nav-link-fill: 0%;
  position: relative;
  overflow: hidden;
  width: max-content;
  min-width: 1.5em;
  background-color: var(--border);
  color: transparent;
  text-decoration: none;
  padding: 0.5em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(0.875rem, min(6vw, 8vh), 10vmin);
  font-weight: 500;
  transform: scale(0.3);
  opacity: 0;
  transition: transform 0.35s ease, opacity 0.35s ease, --nav-link-fill 0.4s ease;
  transition-delay: 0s;
  box-sizing: border-box;
  -webkit-background-clip: text;
  background-clip: text;
  background-image: linear-gradient(90deg, #fff 0%, #fff var(--nav-link-fill), var(--text) var(--nav-link-fill));
  z-index: 1;
  min-height: 0;
  white-space: nowrap;
}

.site-nav-menu a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 100%;
  background-color: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
  z-index: -1;
}

.site-nav-menu a:hover {
  --nav-link-fill: 100%;
  background-image: linear-gradient(90deg, #fff, #fff);
  color: #fff;
}

.site-nav-menu a:hover::before {
  transform: scaleX(1);
}

.site-nav-fixed.is-open .site-nav-menu a {
  transform: scale(1);
  opacity: 1;
  transition-delay: 0.05s;
}

.site-nav-fixed.is-open .site-nav-menu a:nth-child(1) { transition-delay: 0.06s; }
.site-nav-fixed.is-open .site-nav-menu a:nth-child(2) { transition-delay: 0.1s; }
.site-nav-fixed.is-open .site-nav-menu a:nth-child(3) { transition-delay: 0.14s; }
.site-nav-fixed.is-open .site-nav-menu a:nth-child(4) { transition-delay: 0.18s; }
.site-nav-fixed.is-open .site-nav-menu a:nth-child(5) { transition-delay: 0.22s; }
.site-nav-fixed.is-open .site-nav-menu a:nth-child(6) { transition-delay: 0.26s; }
.site-nav-fixed.is-open .site-nav-menu a:nth-child(7) { transition-delay: 0.3s; }
.site-nav-fixed.is-open .site-nav-menu a:nth-child(8) { transition-delay: 0.34s; }
.site-nav-fixed.is-open .site-nav-menu a:nth-child(9) { transition-delay: 0.38s; }
.site-nav-fixed.is-open .site-nav-menu a:nth-child(10) { transition-delay: 0.42s; }
.site-nav-fixed.is-open .site-nav-menu a:nth-child(11) { transition-delay: 0.46s; }
.site-nav-fixed.is-open .site-nav-menu a:nth-child(12) { transition-delay: 0.5s; }

.site-nav-menu a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* main */
.main {
  padding: 2rem 0 3rem;
}

/* フラッシュ: 画面右上に固定、ふわっと表示・消去、先頭にスピナー */
.flash-toast {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.flash-toast-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  margin: 0;
  box-shadow: var(--shadow);
  animation: flash-toast-in 0.35s ease forwards;
}

.flash-toast-item.is-out {
  animation: flash-toast-out 0.35s ease forwards;
}

.flash-toast-spinner {
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  border: 2px solid var(--border);
  border-top-color: transparent;
  border-radius: 50%;
  animation: flash-spin 0.7s linear infinite;
}

.flash-toast-text {
  flex: 1;
  min-width: 0;
}

@keyframes flash-toast-in {
  from {
    opacity: 0;
    transform: translateY(-0.5rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes flash-toast-out {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-0.5rem);
  }
}

@keyframes flash-spin {
  to { transform: rotate(360deg); }
}

.error {
  color: #dc2626;
  margin-bottom: 1rem;
}

/* entries */
.entry-area { }

.entry {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: box-shadow var(--transition), border-color var(--transition);
}

.entry:hover {
  box-shadow: var(--shadow-hover);
  border-color: var(--separator);
}

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

.entry-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.entry-meta .fav,
.entry-meta .comments { }

.entry-time {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.entry-tags,
.entry-categories {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.5em;
}

/* 記事のタグ：# 付きテキストリンク（下線アニメ） */
.entry-tag {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.18);
  background-image: linear-gradient(var(--accent), var(--accent));
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 0% 1px;
  transition: color var(--transition), background-size 0.3s ease, border-bottom-color 0.3s ease;
}

.entry-tag:hover,
.entry-tag:focus-visible {
  color: var(--accent);
  border-bottom-color: transparent;
  background-size: 100% 1px;
}

.entry-tag:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.entry-category {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  border-radius: var(--btn-radius);
  background: transparent;
  color: var(--btn-black);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 500;
  border: 1px solid var(--btn-black);
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.entry-category:hover {
  background: var(--btn-black);
  color: #fff;
  border-color: var(--btn-black);
  text-decoration: none;
}

.entry-category:focus-visible {
  outline: 2px solid var(--btn-black);
  outline-offset: 2px;
  border-radius: var(--btn-radius);
}

.draft-badge {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.draft-badge a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

.draft-badge a:hover {
  color: var(--accent-hover);
}

.draft-badge a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

.draft-badge .link-action {
  color: var(--accent);
  font-size: 0.8125rem;
  text-decoration: none;
  padding: 0;
  margin: 0 0.25rem 0 0;
  background: none;
  border: none;
  transition: color var(--transition);
}

.draft-badge .link-action:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.draft-badge .link-action:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.draft-badge .link-action i {
  margin-right: 0.35em;
}

.entry-title {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Hiragino Sans", "Noto Sans JP", sans-serif;
  font-size: 1.35rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

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

.entry-title a:hover {
  color: var(--accent);
}

.entry-title a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.entry-photo-link {
  display: block;
  text-decoration: none;
  border-bottom: none;
  background-image: none;
  background-size: 0;
}
.entry-photo-link::after {
  display: none;
}
.entry-photo-link:hover,
.entry-photo-link:focus-visible {
  border-bottom-color: transparent;
  background-size: 0;
}

.entry-photo {
  margin: 1rem 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.entry-photo img {
  max-width: 100%;
  height: auto;
  display: block;
  vertical-align: middle;
}

.entry-photo--multiple {
  position: relative;
  overflow: visible;
  border-radius: var(--radius-sm);
  box-sizing: content-box;
}

.entry-photo-slideshow-viewport {
  overflow: hidden;
  border-radius: inherit;
}

.entry-photo-slideshow-track {
  display: flex;
  align-items: flex-start;
}

.entry-photo-slideshow .entry-photo-slide {
  flex: 0 0 100%;
  min-width: 0;
  height: auto;
}

/* Moblog カテゴリの個別ページ: 写真を約30%幅に */
.entry-photo-slideshow .entry-photo-slide a {
  display: block;
}

.entry-photo-slideshow img {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: middle;
}

/* サムネイルは写真の下に配置（top: 100%）、下余白でスペース確保 */
.entry-photo-slideshow-thumbs {
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 0.35rem;
  z-index: 2;
  padding: 0.25rem 0 0 0;
  max-height: 4rem;
  overflow-x: auto;
  overflow-y: hidden;
}

.entry-photo-slideshow-thumb {
  flex: 0 0 auto;
  width: 3rem;
  height: 3rem;
  padding: 0;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  background: none;
  cursor: pointer;
  overflow: hidden;
  transition: border-color var(--transition), opacity var(--transition);
  opacity: 0.7;
}

.entry-photo-slideshow-thumb:hover {
  opacity: 1;
}

.entry-photo-slideshow-thumb[aria-selected="true"] {
  border-color: #fff;
  opacity: 1;
}

.entry-photo-slideshow-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Moblog: 5列×3行のタイル。img の object-fit: cover でアスペクト比を維持（伸ばさずトリミング） */
.entry-photo--moblog-tiles {
  margin: 0.5rem 0;
}

.entry-photo-moblog-tiles {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(3, 1fr);
  aspect-ratio: 5 / 3;
  gap: 2px;
}

.entry-photo-moblog-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* アスペクト比維持しつつ正方形に収める（はみ出しはトリミング） */
  display: block;
}

/* QuadCamera: 横長1枚をスプライトの background-position でパラパラ表示（spritely 方式） */
.entry-photo.quadcamera-flipbook {
  margin: 1rem 0;
  overflow: hidden;
}

/* 記事一覧のみ：QuadCamera の .entry-photo は角丸なし */
.entry-area:not(.single) .entry-photo.quadcamera-flipbook {
  border-radius: 0;
}

/* 1コマ分のアスペクト比で表示（3:4 縦長）。元画像 1200x200 → 1コマ 150x200 */
.quadcamera-flipbook .quadcamera-sprite {
  width: 100%;
  aspect-ratio: 3 / 4;
  max-width: 240px;
  max-height: 320px;
  margin: 0;
  background-repeat: no-repeat;
  background-position: 0 0;
  background-size: 800% 100%;
  /* transition なし＝コマがパッと切り替わる（スライドしない） */
}

/* QuadCamera カテゴリ一覧：ギャラリー風グリッド */
/* Moblog: コンテンツエリアを画面いっぱいに */
body.moblog-gallery .main .wrap {
  max-width: none;
  width: 100%;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  box-sizing: border-box;
}
/* Moblog: タイル状グリッド（quadcamera-gallery の 1fr より優先させるため詳細度を上げる） */
body.moblog-gallery.quadcamera-gallery .entry-area--gallery {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
}
body.moblog-gallery .entry-area--gallery .entry--gallery-card {
  min-width: 0;
}
body.moblog-gallery .entry-area--gallery .entry-photo--quadcamera-strip img {
  max-height: 220px;
}
body.moblog-gallery .entry,
body.quadcamera-gallery .entry {
  border-radius: 0;
}
body.moblog-gallery .entry-photo {
  border-radius: 0;
}
body.quadcamera-gallery .entry-photo {
  border-radius: 0;
}
/* Moblog: タイトルリンクはテキスト幅だけで下線アニメ（折り返し時は行ごと） */
body.moblog-gallery .entry-gallery-card-title {
  /* デフォルトの下線（行ごと）＋ホバーで伸びるアクセント下線の2層 */
  background-image: linear-gradient(rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.18)),
    linear-gradient(var(--accent), var(--accent));
  background-position: 0 100%, 0 100%;
  background-repeat: no-repeat, no-repeat;
  background-size: 100% 1px, 0% 1px;
  transition: background-size 0.3s ease, color 0.2s ease;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
body.moblog-gallery .entry-gallery-card-title:hover,
body.moblog-gallery .entry-gallery-card-title:focus-visible {
  background-size: 100% 1px, 100% 1px;
  text-decoration: none;
}
body.moblog-gallery .entry--gallery-card:hover .entry-gallery-card-title {
  background-size: 100% 1px, 100% 1px;
  text-decoration: none;
  color: var(--accent);
}

/* QuadCamera カテゴリページ */
body.quadcamera-gallery .category-heading--quadcamera {
  margin-bottom: 0.75rem;
  font-size: 1.5rem;
  font-weight: 700;
}
.quadcamera-nav {
  margin-bottom: 1.25rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  text-align: center;
}
.quadcamera-nav-group {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-right: 1.5rem;
  margin-bottom: 0.35rem;
}
.quadcamera-nav-group:last-child {
  margin-right: 0;
}
.quadcamera-nav-group--slider {
  flex-wrap: wrap;
}
.quadcamera-interval-slider {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 8rem;
}
.quadcamera-interval-range {
  flex: 1;
  min-width: 8rem;
  height: 1.5rem;
  accent-color: var(--accent);
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
}
.quadcamera-interval-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  margin-top: -0.5rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}
.quadcamera-interval-range::-moz-range-thumb {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}
.quadcamera-interval-range::-webkit-slider-runnable-track {
  height: 0.5rem;
  background: var(--border);
  border-radius: 999px;
}
.quadcamera-interval-range::-moz-range-track {
  height: 0.5rem;
  background: var(--border);
  border-radius: 999px;
}
.quadcamera-interval-value {
  min-width: 4rem;
  font-size: 0.85rem;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.quadcamera-cols-slider {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 6rem;
}
.quadcamera-cols-range {
  flex: 1;
  min-width: 6rem;
  height: 1.5rem;
  accent-color: var(--accent);
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
}
.quadcamera-cols-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  margin-top: -0.5rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}
.quadcamera-cols-range::-moz-range-thumb {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}
.quadcamera-cols-range::-webkit-slider-runnable-track {
  height: 0.5rem;
  background: var(--border);
  border-radius: 999px;
}
.quadcamera-cols-range::-moz-range-track {
  height: 0.5rem;
  background: var(--border);
  border-radius: 999px;
}
.quadcamera-cols-value {
  min-width: 2.5rem;
  font-size: 0.85rem;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.quadcamera-nav-label {
  color: var(--text-muted);
  font-weight: 500;
}
.quadcamera-nav-list {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.quadcamera-nav-link {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  color: var(--accent);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: background 0.15s ease, color 0.15s ease;
}
.quadcamera-nav-link:hover,
.quadcamera-nav-link:focus-visible {
  background: var(--bg-hover);
  color: var(--accent);
}
.quadcamera-nav-link.is-active {
  background: var(--accent);
  color: var(--bg);
  font-weight: 500;
}
body.quadcamera-gallery .entry-area--gallery {
  grid-template-columns: 1fr;
}

/* パラメータあり: PHP版 /QuadCamera/L/25 と同じタイル状＝1記事1タイル（写真のみ）、size＝タイルの大きさ */
body.quadcamera-gallery .entry-area--quadcamera-tiles {
  gap: 0.75rem;
}
body.quadcamera-gallery .entry-area--quadcamera-tiles--1 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}
body.quadcamera-gallery .entry-area--quadcamera-tiles--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
body.quadcamera-gallery .entry-area--quadcamera-tiles--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
body.quadcamera-gallery .entry-area--quadcamera-tiles--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
body.quadcamera-gallery .entry-area--quadcamera-tiles--5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
/* タイル内: 1コマのアスペクト比を維持（ストリップ=8コマ横=6:1、ぱらぱら=1コマ=3:4） */
body.quadcamera-gallery .entry-area--quadcamera-tiles .entry--quadcamera-tile-card .entry-photo--quadcamera-strip {
  display: block;
  aspect-ratio: 6 / 1;
  overflow: hidden;
}
body.quadcamera-gallery .entry-area--quadcamera-tiles .entry--quadcamera-tile-card .entry-photo--quadcamera-strip img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  max-height: none;
}
body.quadcamera-gallery .entry-area--quadcamera-tiles .entry--quadcamera-tile-card .entry-photo.quadcamera-flipbook {
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
}
body.quadcamera-gallery .entry-area--quadcamera-tiles .entry--quadcamera-tile-card .quadcamera-flipbook .quadcamera-sprite {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  max-height: none;
}
body.quadcamera-gallery .entry-area--gallery .entry-photo--quadcamera-strip img {
  max-height: 280px;
}
body.quadcamera-gallery .entry-area--gallery .entry--gallery-card--size-s .entry-photo--quadcamera-strip img,
body.quadcamera-gallery .entry-area--gallery .entry--gallery-card--size-s .quadcamera-flipbook .quadcamera-sprite {
  max-height: 100px;
}
body.quadcamera-gallery .entry-area--gallery .entry--gallery-card--size-m .entry-photo--quadcamera-strip img,
body.quadcamera-gallery .entry-area--gallery .entry--gallery-card--size-m .quadcamera-flipbook .quadcamera-sprite {
  max-height: 200px;
}
body.quadcamera-gallery .entry-area--gallery .entry--gallery-card--size-l .entry-photo--quadcamera-strip img,
body.quadcamera-gallery .entry-area--gallery .entry--gallery-card--size-l .quadcamera-flipbook .quadcamera-sprite {
  max-height: 360px;
}
/* タイル表示では size の max-height を効かせず、aspect-ratio だけでアスペクト比を維持 */
body.quadcamera-gallery .entry-area--quadcamera-tiles .entry--quadcamera-tile-card .entry-photo--quadcamera-strip img,
body.quadcamera-gallery .entry-area--quadcamera-tiles .entry--quadcamera-tile-card .quadcamera-flipbook .quadcamera-sprite {
  max-height: none;
}

.entry-area--gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1.25rem;
}

.entry-area--gallery .entry--gallery-card {
  margin-bottom: 0;
  padding: 0;
  overflow: hidden;
  box-shadow: none;
  border: none;
  background: transparent;
}

.entry-area--gallery .entry-gallery-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}
.entry-area--gallery .entry-gallery-card-link.entry-gallery-card-title {
  display: inline;
}
.entry-area--gallery .entry-gallery-card-link--photo {
  background-image: none;
  background-size: 0;
}
.entry-area--gallery .entry-gallery-card-link--photo:hover,
.entry-area--gallery .entry-gallery-card-link--photo:focus-visible {
  text-decoration: none;
  background-image: none;
  background-size: 0;
}
.entry-area--gallery .entry-gallery-card-link--photo::after {
  display: none;
}

.entry-area--gallery .entry-photo.quadcamera-flipbook {
  margin: 0;
}

.entry-area--gallery .entry-photo--static {
  margin: 0;
}

.entry-area--gallery .entry-photo--static img {
  display: block;
  max-width: 100%;
  max-height: 220px;
  width: 100%;
  height: auto;
  object-fit: cover;
  vertical-align: middle;
}

/* QuadCamera 一覧：横長8コマをそのまま表示（パラパラにしない） */
.entry-area--gallery .entry-photo--quadcamera-strip img {
  object-fit: contain;
  max-height: 140px;
}

.entry-area--gallery .quadcamera-flipbook .quadcamera-sprite {
  max-width: 100%;
  max-height: 220px;
}

.entry-gallery-card-meta {
  padding: 0.5rem 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  display: block;
}

.entry-gallery-card-time {
  display: block;
  font-variant-numeric: tabular-nums;
  margin-bottom: 0.15rem;
}

.entry-gallery-card-title {
  color: var(--text);
  font-weight: 500;
  display: inline;
  text-decoration: none;
  border-bottom: none;
  background-image: none;
  background-size: 0;
  transition: color 0.2s ease;
}
.entry-area--gallery .entry-gallery-card-title {
  background-image: none;
  background-size: 0;
}
.entry-gallery-card-title:hover {
  color: var(--accent);
  text-decoration: underline;
  background-image: none;
  background-size: 0;
}
.entry-area--gallery .entry-gallery-card-title:hover {
  text-decoration: underline;
  background-size: 0;
}
.entry-area--gallery .entry--gallery-card:hover .entry-gallery-card-title {
  color: var(--accent);
  text-decoration: underline;
}
.entry-gallery-card-title::after {
  display: none;
}

.entry-quote {
  font-family: "Noto Serif JP", "Yu Mincho", serif;
  font-style: normal;
  color: var(--text-muted);
  margin: 0.75rem 0;
  padding: 0.75rem 1rem 0.75rem 1.25rem;
  border-left: 3px solid var(--accent);
  background: var(--bg);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.entry-meta-fields {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin: 0.5rem 0 0.75rem;
  font-size: 0.9rem;
}

.entry-url a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-border);
  word-break: break-all;
}

.entry-url a:hover {
  border-bottom-color: var(--accent);
}

.entry-rate {
  display: inline-flex;
  color: var(--border);
}

.entry-rate-star.is-filled {
  color: var(--accent);
}

.entry-body,
.entry-more {
  margin: 0.75rem 0;
  word-wrap: break-word;
  color: var(--text);
  font-size: 1.125rem;
  line-height: 1.9;
}

/* カテゴリ Word の記事は本文をかなり大きく */
.entry--word .entry-body,
.entry--word .entry-more {
  font-size: 2.7rem;
  font-weight: 900;
  line-height: 1.6;
}

.entry-body img,
.entry-more img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

.entry-body a,
.entry-more a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}

.entry-body a:hover,
.entry-more a:hover {
  color: var(--accent-hover);
  border-bottom-color: var(--accent-hover);
}

.entry-body a:focus-visible,
.entry-more a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

.entry-more--collapsed {
  display: none;
}

.entry-read-more {
  margin: 0.5rem 0 0;
  font-size: 0.95rem;
}

.entry-read-more a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
}

.entry-read-more a:hover {
  color: var(--accent);
}

.entry-read-more a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.entry-actions {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  display: flex;
  gap: 1.25rem;
}

.entry-actions form { display: inline; }

.entry-actions .link-action,
.comment-meta .link-action {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  font-size: 0.8rem;
  color: var(--accent);
  cursor: pointer;
  text-decoration: none;
  transition: color var(--transition);
  -webkit-appearance: none;
  appearance: none;
}

.entry-actions .link-action:hover,
.entry-actions .link-action:active,
.comment-meta .link-action:hover,
.comment-meta .link-action:active {
  color: var(--accent-hover);
  text-decoration: underline;
  background: none;
  border: none;
}

.entry-actions .link-action:focus-visible,
.comment-meta .link-action:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

.entry-actions .link-action i,
.comment-meta .link-action i {
  margin-right: 0.35em;
}

.link-like {
  background: transparent;
  border: 1px solid var(--btn-black);
  padding: 0.35em 0.75em;
  margin: 0;
  font: inherit;
  color: var(--btn-black);
  cursor: pointer;
  text-decoration: none;
  border-radius: var(--btn-radius);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  transition: color var(--transition), background var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.link-like:hover {
  color: #fff;
  background: var(--btn-black);
  border-color: var(--btn-black);
  box-shadow: var(--shadow-hover);
}

.link-like:focus-visible {
  outline: 2px solid var(--btn-black);
  outline-offset: 2px;
  border-radius: var(--btn-radius);
}

/* comment form */
.comment-form-area {
  margin-top: 2rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
}

.comment-form-area h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.comment-form-area textarea {
  width: 100%;
  max-width: 100%;
  padding: 0.75rem;
  font: inherit;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.comment-form-area textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.comments-list { margin-top: 1.5rem; }

.comment {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.comment:last-child { border-bottom: none; }

.comment-body { margin-bottom: 0.35rem; line-height: 1.6; }

.comment-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.comments-list .comment-meta a[href] {
  color: var(--text);
}

/* pager */
.pager {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  font-size: 0.95rem;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.pager a {
  color: var(--btn-black);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: var(--btn-radius);
  background: transparent;
  border: 1px solid var(--btn-black);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  transition: background var(--transition), color var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.pager a:hover {
  background: var(--btn-black);
  color: #fff;
  border-color: var(--btn-black);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.pager a:focus-visible {
  outline: 2px solid var(--btn-black);
  outline-offset: 2px;
  border-radius: var(--btn-radius);
}

.pager span { color: var(--text-muted); }

/* archive list */
.archive-categories,
.archive-months,
.archive-tags {
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.archive-categories strong,
.archive-months strong {
  margin-right: 0.5rem;
  color: var(--text-muted);
}

.archive-categories a {
  display: inline-block;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
  color: var(--btn-black);
  text-decoration: none;
  padding: 0.35em 0.75em;
  border-radius: var(--btn-radius);
  background: transparent;
  border: 1px solid var(--btn-black);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  transition: background var(--transition), color var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.archive-categories a:hover {
  background: var(--btn-black);
  color: #fff;
  border-color: var(--btn-black);
  box-shadow: var(--shadow-hover);
}

.archive-categories a:focus-visible {
  outline: 2px solid var(--btn-black);
  outline-offset: 2px;
  border-radius: var(--btn-radius);
}

/* アーカイブ：タグ・月別はカスタムセレクト（admin と同じ） */
.archive-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  font-size: 12px;
}

.archive-filters .admin-entries-filter-label {
  margin-left: 0;
}

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

.archive-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.archive-list li:last-child { border-bottom: none; }

.archive-list a {
  color: var(--text);
  text-decoration: none;
  transition: color var(--transition);
}

.archive-list a:hover {
  color: var(--accent);
}

.archive-list a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

.archive-list-main {
  min-width: 0;
}

.archive-list .entry-tags {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-bottom: 0;
  margin-left: 0.5rem;
  vertical-align: middle;
}

.archive-list a.entry-tag:hover {
  color: var(--accent);
}

.archive-list .archive-list-date {
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-shrink: 0;
  margin-left: 0.75rem;
}

/* draft list */
.draft-list { list-style: none; padding: 0; margin: 0; }

.draft-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.draft-list .date { font-size: 0.85rem; color: var(--text-muted); }

.draft-list .link-like {
  font-size: 1rem;
  text-align: left;
}

/* 記事管理画面：画面いっぱいレイアウト */
body.admin-entries .main .wrap {
  max-width: none;
  width: 100%;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.admin-entries-search {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 12px;
}
.admin-entries-search-label {
  display: flex;
  min-width: 0;
}
.admin-entries-search-input {
  width: 100%;
  min-width: 10rem;
  max-width: 22rem;
  height: 32px;
  padding: 0 0 0 10px !important;
  font-size: inherit;
  line-height: 1.2;
  font-family: inherit;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fff;
  box-sizing: border-box;
  vertical-align: middle;
}
.admin-entries-search-input::placeholder {
  color: #999;
}
.admin-entries-search-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
  width: 1.35em;
  height: 1.35em;
  cursor: pointer;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3C/svg%3E") no-repeat center;
  background-size: contain;
  opacity: 0.7;
}
.admin-entries-search-input::-webkit-search-cancel-button:hover {
  opacity: 1;
}
.admin-entries-search-select-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 0.5rem;
}
.admin-entries-filter-label {
  margin-left: 0.25rem;
  margin-right: 4px;
  color: var(--text-muted, #666);
}
/* NENPYO と同一の custom-select（nenpyo.jp の .custom-select を再現） */
.admin-entries-custom-select {
  position: relative;
  display: inline-block;
  vertical-align: middle;
}
.admin-entries-custom-select select {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  z-index: 0;
}
.admin-entries-custom-select.is-open .admin-entries-custom-select-icon {
  transform: rotate(180deg);
}
.admin-entries-custom-select-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 9em;
  height: 32px;
  padding: 0 10px;
  font-size: inherit;
  line-height: 1.2;
  color: #333;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  box-sizing: border-box;
  white-space: nowrap;
}
.admin-entries-custom-select-trigger:hover {
  border-color: #999;
}
.admin-entries-custom-select-value {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-entries-custom-select-icon {
  flex-shrink: 0;
  font-size: 10px;
  color: #666;
  transition: transform 0.2s ease;
}
.admin-entries-custom-select-dropdown {
  position: absolute;
  left: 0;
  top: 100%;
  margin-top: 2px;
  min-width: 100%;
  max-height: 240px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  z-index: 10;
}
.admin-entries-custom-select-dropdown[hidden] {
  display: none;
}
.admin-entries-custom-select-option {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 8px 10px;
  font-size: 12px;
  color: #333;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}
.admin-entries-custom-select-option:hover {
  background: #f0f0f0;
}
.admin-entries-custom-select-option.is-selected {
  background: #e8f4fc;
  font-weight: 600;
}
.admin-entries-search-btn {
  padding: 0 !important;
  width: 32px;
  height: 32px;
  font-size: inherit;
  background: #333 !important;
  color: #fff !important;
  border: 1px solid var(--accent-border);
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(44, 42, 38, 0.06);
  transition: background var(--transition), color var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.admin-entries-search-btn:hover {
  background: #fff !important;
  color: #333 !important;
  border-color: var(--accent-hover);
  box-shadow: var(--shadow-hover);
}
.admin-entries-search-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 999px;
}
.admin-entries-search-hint {
  margin-left: 0.35rem;
  color: var(--text-muted);
  font-size: 0.85em;
}
.admin-entries-meta { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 1rem; }
.admin-entries-table-wrap { overflow-x: auto; margin-bottom: 1.5rem; }
.admin-entries-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.admin-entries-td--tags {
  overflow: visible;
}
.admin-entries-th {
  text-align: left;
  padding: 0.5rem 0.5rem 0.5rem 0;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
.admin-entries-sort-link {
  color: var(--text);
  text-decoration: none;
}
.admin-entries-sort-link:hover { color: var(--accent); text-decoration: underline; }
.admin-entries-td {
  padding: 0.4rem 0.5rem 0.4rem 0;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.admin-entries-td--date { white-space: nowrap; font-size: 0.85rem; }
.admin-entries-date-link {
  color: var(--accent);
  text-decoration: none;
  border-bottom: none;
}
.admin-entries-date-link:hover { color: var(--accent-hover); text-decoration: underline; }
.admin-entries-date-link::after { display: none; }
.admin-entries-reply-cell {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.admin-entries-comment-count {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.admin-entries-td--comments { color: var(--text-muted); }
.admin-entries-inline-form,
.admin-entries-tags-form {
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.admin-entries-tags-form { align-items: flex-start; }
.admin-entries-tags-field {
  position: relative;
  min-width: 22rem;
  overflow: visible;
}
.admin-entries-tags-field .admin-entries-tags-input {
  padding-right: 5rem;
}
.admin-entries-title-input {
  width: 100%;
  min-width: 12rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.875rem;
  border: 1px solid var(--border);
  border-radius: var(--btn-radius);
  background: var(--bg-card);
  transition: border-color var(--transition);
}
/* タグ入力：タイトル入力の約1.5倍の幅・フォント */
.admin-entries-tags-input {
  width: 100%;
  min-width: 18rem;
  padding: 0.5rem 1rem;
  font-size: 1.05rem;
  border: 1px solid var(--border);
  border-radius: var(--btn-radius);
  background: var(--bg-card);
  transition: border-color var(--transition);
}
.admin-entries-title-input:focus,
.admin-entries-tags-input:focus {
  outline: none;
  border-color: var(--btn-black);
}
/* タイトル編集：入力内右に確定ボタン（変更時のみ表示） */
.admin-entries-title-form { display: block; }
.admin-entries-title-field {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 30rem;
}
.admin-entries-title-field .admin-entries-title-input {
  flex: 1;
  min-width: 0;
  padding-right: 4.5rem;
}
/* 変更ボタン：公開・コメントと同じ post-edit-tag-chip、入力内右に配置のみ追加 */
.admin-entries-title-submit {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  margin: 0;
}
form button[type="submit"].post-edit-tag-chip.admin-entries-title-submit {
  margin: 0;
}
.admin-entries-title-submit[hidden] {
  display: none !important;
}

/* タグの変更ボタン：タイトルと同じく入力内右に配置 */
.admin-entries-tags-submit {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  margin: 0;
}
form button[type="submit"].post-edit-tag-chip.admin-entries-tags-submit {
  margin: 0;
}
.admin-entries-tags-submit[hidden] {
  display: none !important;
}

.admin-entries-inline-btn {
  padding: 0.35em 0.75em;
  font-size: 0.85rem;
  background: var(--bg-card);
  color: var(--accent);
  border: 1px solid var(--accent-border);
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(44, 42, 38, 0.06);
  transition: background var(--transition), color var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.admin-entries-inline-btn:hover {
  background: var(--accent);
  color: var(--bg-card);
  border-color: var(--accent-hover);
  box-shadow: var(--shadow-hover);
}
.admin-entries-inline-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 999px;
}
/* 公開・コメント・操作：post-edit-tag-chip をベースに（クラスで共通化）、モディファイアのみ */
.admin-entries-toggle-btn,
.admin-entries-action-link {
  margin-right: 0.25rem;
  margin-bottom: 0.2rem;
}
/* トグルON状態：公開・コメントON（地味め） */
form button[type="submit"].post-edit-tag-chip.admin-entries-toggle-btn--public,
form button[type="submit"].post-edit-tag-chip.admin-entries-toggle-btn--on {
  color: var(--text-muted);
  border-color: var(--border);
  background: var(--bg-muted, rgba(0,0,0,0.06));
}
form button[type="submit"].post-edit-tag-chip.admin-entries-toggle-btn--public:hover,
form button[type="submit"].post-edit-tag-chip.admin-entries-toggle-btn--on:hover {
  background: var(--text-muted);
  color: var(--bg-card);
  border-color: var(--text-muted);
  box-shadow: var(--shadow-hover);
}

/* トグルOFF状態：下書き・コメントOFF（塗りつぶしで明確に） */
form button[type="submit"].post-edit-tag-chip.admin-entries-toggle-btn--draft,
form button[type="submit"].post-edit-tag-chip.admin-entries-toggle-btn--off {
  background: var(--accent);
  color: var(--bg-card);
  border-color: var(--accent);
  font-weight: 600;
}
form button[type="submit"].post-edit-tag-chip.admin-entries-toggle-btn--draft:hover,
form button[type="submit"].post-edit-tag-chip.admin-entries-toggle-btn--off:hover {
  background: var(--accent-hover, var(--accent));
  color: var(--bg-card);
  border-color: var(--accent-hover, var(--accent));
  box-shadow: var(--shadow-hover);
}

a.admin-entries-action-link,
a.admin-entries-action-link:hover,
a.admin-entries-action-link:visited,
a.admin-entries-action-link:active {
  text-decoration: none;
  border-bottom: none;
}
a.admin-entries-action-link::after {
  display: none;
}
form button.post-edit-tag-chip.admin-entries-action-link--delete,
a.post-edit-tag-chip.admin-entries-action-link--delete {
  color: var(--text-muted);
  border-color: var(--border);
}
form button.post-edit-tag-chip.admin-entries-action-link--delete:hover,
a.post-edit-tag-chip.admin-entries-action-link--delete:hover {
  background: rgba(204, 0, 0, 0.12);
  color: #c00;
  border-color: #c00;
  box-shadow: var(--shadow-hover);
}
.admin-entries-pager { margin-top: 1.5rem; }

/* 管理画面：タグ入力フォーカスで候補を下に表示（1件表示時もテーブルで切れないよう .is-visible 時は fixed） */
.admin-entries-tag-candidates {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 0.25rem;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.5rem;
  width: 200%;
  min-width: 16rem;
  max-height: 12rem;
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  z-index: 100;
}
.admin-entries-tag-candidates.is-visible {
  display: flex !important;
  position: fixed;
  top: auto;
  left: auto;
  margin-top: 0.25rem;
  width: auto;
  min-width: 16rem;
  max-width: min(90vw, 32rem);
}
.admin-entries-tag-candidates .admin-entries-tag-chip {
  flex-shrink: 0;
}
.admin-entries-tag-candidates .admin-entries-tag-chip.is-selected {
  background: var(--accent);
  color: var(--bg-card);
  border-color: var(--accent-hover);
  box-shadow: var(--shadow-btn-hover);
}
.admin-entries-tag-candidates-empty {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* post form */
form p { margin-bottom: 1.25rem; }
.hint { font-size: 0.85rem; color: var(--text-muted); }

body.settings fieldset {
  margin-bottom: 2rem;
  padding: 1.25rem 0;
  border: none;
  border-top: 1px solid var(--border);
}
body.settings fieldset:first-of-type { border-top: none; padding-top: 0; }
body.settings legend {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.75rem;
  padding: 0;
}
.settings-widget-tag {
  font-family: ui-monospace, monospace;
  font-size: 0.875rem;
}

/* ユーザーアイコン: ドロップゾーン（クリック or ドラッグで選択） */
.settings-avatar-wrap {
  margin-bottom: 0.5rem;
}

.settings-avatar-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 160px;
  padding: 1.25rem;
  border: 2px dashed var(--border);
  border-radius: 12px;
  background: var(--bg-card);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}

.settings-avatar-zone:hover,
.settings-avatar-zone.is-dragover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 0.08%, transparent);
}

.settings-avatar-input {
  position: absolute;
  width: 0.1px;
  height: 0.1px;
  opacity: 0;
  overflow: hidden;
  z-index: -1;
}

.settings-avatar-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg);
  flex-shrink: 0;
}

.settings-avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.settings-avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--text-muted);
  font-size: 2.5rem;
}

.settings-avatar-hint {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.settings-avatar-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

form input[type="text"],
form input[type="password"],
form input[type="search"],
form input[type="url"],
form input[type="datetime-local"],
form textarea {
  font: inherit;
  padding: 0.75rem 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  width: 100%;
  max-width: 100%;
  background: #fff;
}

form input[type="datetime-local"] {
  max-width: 18em;
}

form input[type="file"] {
  font: inherit;
  padding: 0.35rem 0;
  margin-left: 0.25rem;
}

.admin-entries-custom-select-trigger:focus,
form input[type="text"]:focus,
form input[type="password"]:focus,
form input[type="search"]:focus,
form input[type="url"]:focus,
form input[type="datetime-local"]:focus,
form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

form textarea { min-height: 10em; resize: vertical; }

form select {
  font: inherit;
  padding: 0.5rem 0.75rem;
  margin-right: 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
}

form button[type="submit"] {
  font: inherit;
  padding: 0.4rem 1rem;
  margin-right: 0.75rem;
  background: transparent;
  border: 1px solid var(--btn-black);
  border-radius: var(--btn-radius);
  color: var(--btn-black);
  cursor: pointer;
  text-decoration: none;
  transition: color var(--transition), background var(--transition), border-color var(--transition);
}

form button[type="submit"]:hover {
  background: var(--btn-black);
  color: #fff;
  border-color: var(--btn-black);
}

form button[type="submit"]:focus-visible {
  outline: 2px solid var(--btn-black);
  outline-offset: 2px;
  border-radius: var(--btn-radius);
}

/* 投稿画面: リンク風（色で区別） */
.post-edit-actions button {
  border-radius: var(--btn-radius);
  border: 1px solid var(--btn-black);
  color: var(--btn-black);
  background: transparent;
}
.post-edit-actions button[formaction*="preview"] {
  color: var(--btn-preview);
  border-color: var(--btn-preview);
}
.post-edit-actions button[formaction*="preview"]:hover {
  color: #fff;
  background: var(--btn-preview-hover) !important;
  border-color: var(--btn-preview-hover);
}
.post-edit-actions button[name="action"][value="draft"] {
  color: var(--btn-draft);
  border-color: var(--btn-draft);
}
.post-edit-actions button[name="action"][value="draft"]:hover {
  color: #fff;
  background: var(--btn-draft-hover) !important;
  border-color: var(--btn-draft-hover);
}

.post-edit-actions button[name="action"][value="publish"] {
  color: var(--btn-black);
  border-color: var(--btn-black);
}
.post-edit-actions button[name="action"][value="publish"]:hover {
  background: var(--btn-black) !important;
  color: #fff !important;
}

/* footer */
.preview-badge {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

h2 {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Hiragino Sans", "Noto Sans JP", sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

/* infinite scroll: 読み込み中スピナー */
.infinite-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
  color: var(--text-muted, #666);
}

.infinite-spinner i {
  font-size: 1.75rem;
}

/* infinite scroll sentinel */
#infinite-sentinel {
  min-height: 1px;
  height: 1px;
  overflow: hidden;
  pointer-events: none;
}

/* single entry (permalink) - a bit more spacing */
/* 個別ページ: 記事を画面上下中央に */
body.permalink .main {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.permalink .main .wrap {
  width: 100%;
}

/* カテゴリ Video + 本文に YouTube / Vimeo: 全画面背景で薄く・ミュート・自動再生 */
.permalink-content--video-bg {
  position: relative;
  z-index: 1;
}

.entry-video-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.entry-video-bg__iframe-wrap {
  position: absolute;
  top: 50%;
  left: 50%;
  width: max(100vw, 177.78vh);
  height: max(100vh, 56.25vw);
  transform: translate(-50%, -50%);
}

.entry-video-bg__iframe-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  opacity: 0.9;
}

.entry-video-bg__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

body.permalink.permalink--video-bg .entry-area.single .entry,
body.permalink.permalink--video-bg .entry-affiliate {
  position: relative;
  z-index: 1;
}

/* 個別ページの記事もトップ一覧と同じカードスタイルに統一 */
.entry-area.single .entry {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: box-shadow var(--transition), border-color var(--transition);
}

.entry-area.single .entry:hover {
  box-shadow: var(--shadow-hover);
  border-color: var(--separator);
}

body.permalink.permalink--video-bg .entry-area.single .entry {
  background: rgba(255, 255, 255, 0.92);
  padding: 1.5rem;
}

/* iframe / embed in entry body（YouTube等はコンテナ幅いっぱい・16:9で表示） */
.entry-body iframe,
.entry-more iframe {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  vertical-align: top;
  border-radius: var(--radius-sm);
}
.entry-body embed,
.entry-more embed {
  max-width: 100%;
  border-radius: var(--radius-sm);
}


/* 8コマカメラ */
body.camera .camera-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
}
.camera-wrap {
  max-width: 640px;
}
.camera-preview {
  margin-bottom: 1rem;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--border);
}
.camera-preview video {
  width: 100%;
  max-height: 320px;
  display: block;
  vertical-align: middle;
}
.camera-frames {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.camera-frame-slot {
  width: calc(12.5% - 0.5rem);
  min-width: 60px;
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg);
}
.camera-frame-slot .frame-canvas {
  width: 100%;
  display: block;
  vertical-align: middle;
}
.camera-frame-slot .frame-label {
  position: absolute;
  top: 2px;
  left: 2px;
  font-size: 0.7rem;
  color: #fff;
  text-shadow: 0 0 2px #000;
}
.camera-actions {
  margin-bottom: 1.5rem;
}
.camera-actions .btn-camera i,
.camera-post-actions .btn-camera i {
  margin-right: 0.4em;
}
.camera-actions .btn-camera,
.camera-post-actions .btn-camera {
  font: inherit;
  font-weight: 500;
  padding: 0.625rem 1.25rem;
  min-height: var(--touch-min);
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
  background: var(--btn-black);
  color: #fff;
  border: none;
  border-radius: var(--btn-radius);
  cursor: pointer;
  box-shadow: var(--shadow-btn);
  transition: background var(--transition), box-shadow var(--transition);
}
.camera-actions .btn-camera:hover,
.camera-post-actions .btn-camera:hover {
  background: var(--btn-black);
  opacity: 0.9;
  box-shadow: var(--shadow-btn-hover);
}
.camera-actions .btn-camera:focus-visible,
.camera-post-actions .btn-camera:focus-visible {
  outline: none;
  box-shadow: var(--shadow-btn), var(--focus-ring);
}
.camera-actions .btn-camera:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}
.camera-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
}
.camera-composite {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.camera-composite p {
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}
#composite-canvas {
  max-width: 100%;
  height: auto;
  display: block;
  margin-bottom: 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.camera-post-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.camera-post-form input[type="text"] {
  font: inherit;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  min-width: 160px;
}
.camera-login-hint {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}
.camera-login-hint a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}
.camera-login-hint a:hover {
  color: var(--accent-hover);
}
.camera-login-hint a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

.post-edit-tags-row label {
  display: block;
  margin-bottom: 0.35rem;
}

.post-edit-tag-list {
  margin-top: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.post-edit-tag-list-empty {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
}

.post-edit-tag-chip {
  display: inline-block;
  padding: 0.35em 0.75em;
  border-radius: 999px;
  background: var(--bg-card);
  color: var(--accent);
  border: 1px solid var(--accent-border);
  font-size: 0.85rem;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(44, 42, 38, 0.06);
  transition: background var(--transition), color var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.post-edit-tag-chip:hover {
  background: var(--accent);
  color: var(--bg-card);
  border-color: var(--accent-hover);
  box-shadow: var(--shadow-hover);
}

.post-edit-tag-chip.is-selected {
  background: var(--accent);
  color: var(--bg-card);
  border-color: var(--accent-hover);
  box-shadow: var(--shadow-btn-hover);
}

.post-edit-tag-chip:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* form 内の submit ボタンに chip クラスがある場合はチップのサイズを優先（管理画面など） */
form button[type="submit"].post-edit-tag-chip {
  font-size: 0.85rem;
  padding: 0.35em 0.75em;
  margin-right: 0.25rem;
  background: var(--bg-card);
  border: 1px solid var(--accent-border);
  border-radius: 999px;
  color: var(--accent);
  box-shadow: 0 1px 2px rgba(44, 42, 38, 0.06);
}
form button[type="submit"].post-edit-tag-chip:hover {
  background: var(--accent);
  color: var(--bg-card);
  border-color: var(--accent-hover);
  box-shadow: var(--shadow-hover);
}

/* 投稿編集：画像ファイル入力カスタム */
.post-edit-image-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.5rem;
}

.post-edit-image-label {
  display: block;
  flex: 0 0 auto;
  margin-bottom: 0;
}

.post-edit-image-current {
  display: block;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.post-edit-image-slot--existing {
  cursor: default;
}

.post-edit-image-slot--existing img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.post-edit-images {
  width: 100%;
}

.post-edit-image-slots {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.post-edit-image-slot {
  position: relative;
  width: 100px;
  height: 100px;
  flex-shrink: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
}

.post-edit-image-slot-preview {
  display: block;
  width: 100%;
  height: 100%;
}

.post-edit-image-slot-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.post-edit-image-slot-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(44, 42, 38, 0.75);
  color: #fff;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}

.post-edit-image-slot-remove:hover {
  background: var(--accent-hover);
}

.post-edit-image-slot-remove:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.post-edit-image-add {
  background: var(--bg-card);
  border: 2px dashed var(--border);
  color: var(--accent);
}

.post-edit-file-input {
  position: absolute;
  width: 0.1px;
  height: 0.1px;
  opacity: 0;
  overflow: hidden;
  z-index: -1;
}

.post-edit-image-add-trigger {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

.post-edit-image-add-wrap:hover .post-edit-image-add-trigger {
  background: var(--accent-soft);
}

.post-edit-image-add-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: var(--focus-ring);
}

.post-edit-image-add.post-edit-image-add--dragover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.post-edit-image-add-icon {
  font-size: 1.75rem;
  font-weight: 300;
  line-height: 1;
}

.post-edit-image-add-text {
  font-size: 0.7rem;
  margin-top: 0.2rem;
  color: var(--text-muted);
}

.post-edit-actions-divider {
  margin: 1.5rem 0 1rem 0;
  border: none;
  border-top: 1px solid var(--border);
}

.post-edit-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  width: 100%;
}

.post-edit-action-icon {
  margin-right: 0.4em;
}

.post-edit-actions-left {
  flex: 0 0 auto;
}

.post-edit-actions-center {
  flex: 1;
  text-align: center;
}

.post-edit-actions-right {
  flex: 0 0 auto;
  margin-left: auto;
}

/* 投稿だけボタンスタイル */
.post-edit-btn-primary {
  padding: 0.5rem 1.25rem !important;
  background: var(--btn-black) !important;
  color: #fff !important;
  border: none !important;
  border-radius: var(--btn-radius) !important;
  font-weight: 500;
  box-shadow: var(--shadow-btn);
  transition: background var(--transition), box-shadow var(--transition);
}

.post-edit-btn-primary:hover {
  background: var(--btn-black) !important;
  color: #fff !important;
  text-decoration: none !important;
  box-shadow: var(--shadow-btn-hover);
  opacity: 0.9;
}

.post-edit-btn-primary:focus-visible {
  outline: none;
  box-shadow: var(--shadow-btn), var(--focus-ring);
}

.post-edit-rate-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.post-edit-rate-label {
  flex: 0 0 auto;
}

.post-edit-rate-stars {
  display: inline-flex;
  gap: 0.15rem;
  align-items: center;
}

.post-edit-rate-star {
  font: inherit;
  font-size: 1.5rem;
  line-height: 1;
  padding: 0.2rem;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--text-muted);
  transition: color var(--transition), transform var(--transition);
}

.post-edit-rate-star:hover {
  color: var(--accent);
}

.post-edit-rate-star.is-filled {
  color: var(--accent);
}

.post-edit-rate-star:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

.post-edit-extra-toggle-row {
  margin: 0.5rem 0;
}

.post-edit-extra-toggle {
  font: inherit;
  font-size: 0.9rem;
  color: var(--accent);
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  padding: 0.25em 0.5em;
  border-radius: var(--radius-sm);
  transition: background 0.15s ease, color 0.15s ease;
}
.post-edit-extra-toggle:hover {
  text-decoration: underline;
  color: var(--accent-hover, var(--accent));
}
/* 開いているとき：アクセント背景で「展開中」と分かる */
.post-edit-extra-toggle[aria-expanded="true"] {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
}
.post-edit-extra-toggle[aria-expanded="true"]:hover {
  background: color-mix(in srgb, var(--accent) 20%, transparent);
}
/* 閉じているとき：控えめ */
.post-edit-extra-toggle[aria-expanded="false"] {
  color: var(--text-muted);
}
.post-edit-extra-toggle[aria-expanded="false"]:hover {
  color: var(--accent);
}
.post-edit-extra-toggle-icon {
  margin-right: 0.35em;
  font-size: 0.75em;
  vertical-align: 0.05em;
}

.post-edit-extra {
  margin-top: 0.5rem;
}

.post-edit-place-map-wrap {
  margin-top: 0.5rem;
  margin-bottom: 1rem;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-muted, #eee);
}

.post-edit-place-map-wrap[aria-hidden="true"] {
  display: none;
}

/* モーダル（confirm / alert 代替） */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition);
}

.modal.is-open {
  opacity: 1;
  visibility: visible;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  cursor: pointer;
}

.modal-box {
  position: relative;
  width: 100%;
  max-width: 360px;
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  border: 1px solid var(--border);
}

.modal-message {
  margin: 0 0 1.25rem;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.modal-btn {
  font: inherit;
  padding: 0.5rem 1.25rem;
  border-radius: var(--btn-radius);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.modal-btn--cancel {
  background: transparent;
  border: 1px solid var(--btn-black);
  color: var(--btn-black);
}

.modal-btn--cancel:hover {
  background: var(--btn-black);
  color: #fff;
  border-color: var(--btn-black);
}

.modal-btn--ok {
  background: var(--btn-black);
  border: none;
  color: #fff;
  font-weight: 500;
  min-height: var(--touch-min);
  padding: 0.625rem 1.25rem;
  box-shadow: var(--shadow-btn);
}

.modal-btn--ok:hover {
  background: var(--btn-black);
  opacity: 0.9;
}

.modal.is-alert .modal-btn--cancel {
  display: none;
}

/* 個別ページ: コメントモーダル */
.comments-modal:not(.is-open) {
  pointer-events: none;
}

/* 個別ページ: コメント・編集・削除の横並びリンク */
.entry-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 1.25rem;
  margin-top: 1.25rem;
  font-size: 0.9375rem;
}

.entry-toolbar-form {
  display: inline;
}

.entry-toolbar-link {
  font: inherit;
  font-size: inherit;
  color: var(--btn-black);
  background: transparent;
  border: 1px solid var(--btn-black);
  border-radius: var(--btn-radius);
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  text-decoration: none;
  transition: color var(--transition), background var(--transition), border-color var(--transition);
}

.entry-toolbar-link:hover {
  background: var(--btn-black);
  color: #fff;
  text-decoration: none;
}

.entry-toolbar-link:focus-visible {
  outline: 2px solid var(--btn-black);
  outline-offset: 2px;
  border-radius: var(--btn-radius);
}

.entry-comments-icon {
  display: inline-block;
  margin-right: 0.25em;
  font-style: normal;
}
.entry-comments-icon i {
  font-style: normal;
}

.main .entry-actions a.entry-comments-link {
  color: var(--accent);
  text-decoration: none;
  margin-right: 0.5em;
  border-bottom: none;
  background-image: none;
  background-size: 0;
  transition: color 0.2s ease;
}
.main .entry-actions a.entry-comments-link::after {
  display: none;
}
.main .entry-actions a.entry-comments-link:hover,
.main .entry-actions a.entry-comments-link:focus-visible {
  color: var(--accent-hover);
  text-decoration: underline;
  background-image: none;
  background-size: 0;
}

/* 個別ページのコメントボタン（モーダル用）も同じリンク見た目に */
.entry-actions button.entry-comments-link {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  cursor: pointer;
}

.entry-actions button.entry-comments-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* 記事本文下のアフィリエイト（Amazon・楽天検索リンク） */
.entry-affiliate {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}

.entry-affiliate-title {
  margin: 0 0 0.75rem 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted, #666);
}

/* 記事の場所マップ（個別ページのみ） */
.entry-place-map {
  margin-top: 1.5rem;
}
.entry-place-map-label {
  margin: 0 0 0.5rem 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.entry-place-map iframe {
  display: block;
  max-width: 100%;
  border-radius: var(--radius-sm);
}

.entry-affiliate-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.entry-affiliate-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
}

.entry-affiliate-link:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.entry-affiliate-widget {
  margin-bottom: 1rem;
}
.entry-affiliate-widget:last-child {
  margin-bottom: 0;
}

/* アフィリエイトリンクをカード風ウィジェット表示 */
.entry-affiliate-widget-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--btn-radius);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.entry-affiliate-widget-card:hover {
  border-color: var(--border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.entry-affiliate-widget-card__brand {
  font-weight: 700;
  font-size: 1rem;
  color: #232f3e;
}
.entry-affiliate-widget-card__keywords {
  font-size: 0.9rem;
  color: var(--text-muted);
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.entry-affiliate-widget-card__cta {
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.4rem 0.75rem;
  border-radius: var(--btn-radius);
  background: var(--btn-black);
  color: #fff;
  white-space: nowrap;
  transition: opacity 0.15s ease;
}
.entry-affiliate-widget-card:hover .entry-affiliate-widget-card__cta {
  opacity: 0.9;
}
.entry-affiliate-widget-card--amazon .entry-affiliate-widget-card__brand {
  color: #ff9900;
}

/* PA-API 商品カード（画像・タイトル・価格） */
.entry-affiliate-products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  list-style: none;
  margin: 0 0 1rem 0;
  padding: 0;
}
.entry-affiliate-product {
  margin: 0;
}
.entry-affiliate-product__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.entry-affiliate-product__link:hover {
  border-color: #ff9900;
  box-shadow: 0 2px 8px rgba(255, 153, 0, 0.15);
}
.entry-affiliate-product__img-wrap {
  display: block;
  aspect-ratio: 1;
  background: var(--bg);
  overflow: hidden;
}
.entry-affiliate-product__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  vertical-align: top;
}
.entry-affiliate-product__body {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem;
  flex: 1;
  min-width: 0;
}
.entry-affiliate-product__title {
  font-size: 0.85rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.entry-affiliate-product__price {
  font-size: 0.9rem;
  font-weight: 600;
  color: #b12704;
  margin-top: auto;
}

.entry-toolbar-edit i,
.entry-toolbar-delete i {
  margin-right: 0.35em;
}

.comments-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  cursor: pointer;
}

.comments-modal .comments-modal-box {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 3rem);
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  border: 1px solid var(--border);
}

.comments-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.comments-modal-title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
}

.comments-modal-close {
  font-size: 1.5rem;
  line-height: 1;
  padding: 0.25rem;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-sm);
}

.comments-modal-close:hover {
  color: var(--text);
}

.comments-modal-body {
  overflow-y: auto;
  padding: 1rem 1.25rem;
}

.comments-modal-body .comment-form-area {
  margin-top: 0;
  padding-top: 0;
}

.comments-modal-body .comment-form-area h3 {
  display: none;
}

.comments-modal-body .comments-list {
  margin-top: 0;
}

/* etc */

@-webkit-keyframes rotate {
	0% {-webkit-transform: rotate(0deg) rotateY(0) scale(1)}
	100% {-webkit-transform: rotate(360deg) rotateY(0) scale(1)}
}

img.turntable {
	border-radius: 384px;
	-webkit-animation-name: rotate;
	-webkit-animation-iteration-count: infinite;
	-webkit-animation-timing-function: linear;
	-webkit-animation-duration: 1s;
}

.i4pc {
	width: 150px;
	height: 150px;
	margin-right: 20px;
	border: none !important;
	background: none;
	padding: 0;
}