/* ============================================================
   カスタムちんぽ関口の風俗日記 - 和柄テーマ
   ============================================================ */

/* ── CSS Variables（和の色） ── */
:root {
  --red:      #7d1821;            /* 深紅 */
  --red-lt:   #9e2433;            /* 紅（明） */
  --gold:     #c9a452;            /* 金 */
  --gold-lt:  #e6c97a;            /* 金（明） */
  --ink:      #1a1215;            /* 墨 */
  --cream:    #f5edd8;            /* 和紙 */
  --cream2:   #fffdf6;            /* 薄和紙 */
  --border:   #cda882;            /* 茶縁 */
  --text:     #2c1f1f;            /* テキスト */
  --muted:    #7a6a5a;            /* くすみ */
  --navy:     #1a3560;            /* 藍 */
  --moss:     #3d6045;            /* 苔 */
  --purple:   #5e2d6a;            /* 紫 */
  --orange:   #a84a10;            /* 橙 */
}

/* ── Reset / Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Meiryo', sans-serif;
  background-color: var(--cream);
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='110' height='110'><g transform='translate(55,55)' fill='%23c9a452' opacity='0.09'><ellipse rx='44' ry='9'/><ellipse rx='44' ry='9' transform='rotate(22.5)'/><ellipse rx='44' ry='9' transform='rotate(45)'/><ellipse rx='44' ry='9' transform='rotate(67.5)'/><ellipse rx='44' ry='9' transform='rotate(90)'/><ellipse rx='44' ry='9' transform='rotate(112.5)'/><ellipse rx='44' ry='9' transform='rotate(135)'/><ellipse rx='44' ry='9' transform='rotate(157.5)'/><circle r='12'/></g></svg>");
  background-size: 110px 110px;
  color: var(--text);
  line-height: 1.8;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

/* ── Container ── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  background: var(--ink);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 3px solid var(--gold);
  box-shadow: 0 4px 14px rgba(0,0,0,.5);
  overflow: hidden;
}

/* 菊紋の透かし */
.site-header::after {
  content: '';
  position: absolute;
  right: -20px;
  top: 50%;
  transform: translateY(-50%);
  width: 90px;
  height: 90px;
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><g transform='translate(50,50)' fill='%23c9a452'><ellipse rx='44' ry='10'/><ellipse rx='44' ry='10' transform='rotate(22.5)'/><ellipse rx='44' ry='10' transform='rotate(45)'/><ellipse rx='44' ry='10' transform='rotate(67.5)'/><ellipse rx='44' ry='10' transform='rotate(90)'/><ellipse rx='44' ry='10' transform='rotate(112.5)'/><ellipse rx='44' ry='10' transform='rotate(135)'/><ellipse rx='44' ry='10' transform='rotate(157.5)'/><circle r='13'/></g></svg>");
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0.12;
  pointer-events: none;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  padding-bottom: 12px;
  gap: 16px;
}

.site-title {
  font-family: 'Noto Serif JP', 'Yu Mincho', 'YuMincho', serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gold-lt);
  white-space: nowrap;
  letter-spacing: .06em;
  text-shadow: 0 1px 4px rgba(0,0,0,.6);
}
.site-title:hover { text-decoration: none; color: #fff; }

.site-tagline {
  font-size: .7rem;
  color: rgba(230,201,122,.65);
  margin-top: 3px;
  letter-spacing: .04em;
}

/* ── ナビゲーション ── */
.site-nav > ul {
  display: flex;
  list-style: none;
  gap: 2px;
  flex-wrap: wrap;
}

.site-nav a {
  display: block;
  color: #e0ceaa;
  padding: 6px 11px;
  font-size: .84rem;
  border-radius: 1px;
  transition: background .15s, color .15s;
  white-space: nowrap;
  border: 1px solid transparent;
}
.site-nav a:hover {
  background: var(--red);
  color: var(--gold-lt);
  border-color: rgba(201,164,82,.4);
  text-decoration: none;
}

/* ドロップダウン */
.nav-dropdown { position: relative; }
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--ink);
  border: 1px solid var(--gold);
  border-top: 2px solid var(--gold);
  min-width: 140px;
  border-radius: 0 0 2px 2px;
  box-shadow: 0 8px 20px rgba(0,0,0,.45);
  z-index: 200;
  flex-direction: column;
  gap: 0;
}
.nav-dropdown:hover .dropdown-menu { display: flex; }
.dropdown-menu li {
  list-style: none;
  border-bottom: 1px solid rgba(201,164,82,.18);
}
.dropdown-menu li:last-child { border-bottom: none; }
.dropdown-menu a {
  border-radius: 0;
  padding: 9px 14px;
  font-size: .84rem;
  border: none;
}

/* ハンバーガー（モバイル） */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--gold-lt);
  border-radius: 0;
  transition: .3s;
}

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb-bar {
  background: var(--cream2);
  border-bottom: 1px solid var(--border);
  padding: 7px 0;
  font-size: .78rem;
  color: var(--muted);
}
.breadcrumb a { color: var(--red); }
.breadcrumb .bc-sep { margin: 0 6px; color: var(--border); }
.breadcrumb .bc-current { color: var(--muted); }

/* ============================================================
   MAIN LAYOUT（2カラム）
   ============================================================ */
.site-main { flex: 1; padding: 28px 0 48px; }

.layout-2col {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 28px;
  align-items: start;
}

.page-heading {
  font-family: 'Noto Serif JP', 'Yu Mincho', serif;
  font-size: 1.3rem;
  font-weight: 700;
  border-left: 4px solid var(--gold);
  padding-left: 12px;
  margin-bottom: 20px;
  color: var(--ink);
  letter-spacing: .05em;
}

/* ============================================================
   ARTICLE CARDS
   ============================================================ */
.article-list { display: flex; flex-direction: column; gap: 12px; }

.card {
  background: var(--cream2);
  border: 1px solid var(--border);
  border-left: 4px solid var(--red);
  border-radius: 1px;
  padding: 18px 20px;
  transition: box-shadow .15s, transform .15s;
}
.card:hover {
  box-shadow: 0 4px 18px rgba(125,24,33,.13);
  transform: translateY(-1px);
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.card-date {
  font-size: .76rem;
  color: var(--muted);
  margin-left: auto;
}

.card-title {
  font-family: 'Noto Serif JP', 'Yu Mincho', serif;
  font-size: 1.04rem;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 8px;
}
.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--red); text-decoration: none; }

.card-summary {
  font-size: .88rem;
  color: var(--muted);
  margin-bottom: 10px;
  line-height: 1.7;
}

.card-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }

.card-readmore {
  display: inline-block;
  font-size: .82rem;
  color: var(--red);
  font-weight: 500;
}
.card-readmore:hover { text-decoration: underline; }

/* ============================================================
   BADGES（和の色）
   ============================================================ */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 1px;
  font-size: .7rem;
  font-weight: 700;
  line-height: 1.7;
  white-space: nowrap;
  letter-spacing: .04em;
}
.badge-diary    { background: var(--red);    color: #fff; }
.badge-column   { background: var(--navy);   color: #fff; }
.badge-area     { background: var(--moss);   color: #fff; }
.badge-shop     { background: var(--purple); color: #fff; }
.badge-shopname { background: var(--orange); color: #fff; }

/* ============================================================
   TAGS
   ============================================================ */
.tag {
  display: inline-block;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: .7rem;
  padding: 2px 8px;
  border-radius: 1px;
}
a.tag:hover {
  background: rgba(125,24,33,.07);
  border-color: var(--red);
  color: var(--red);
  text-decoration: none;
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 32px;
}
.page-btn {
  display: inline-block;
  padding: 8px 20px;
  background: var(--red);
  color: #fff;
  border-radius: 1px;
  font-size: .9rem;
  border: 1px solid var(--red);
  transition: background .15s, border-color .15s, color .15s;
}
.page-btn:hover {
  background: var(--ink);
  border-color: var(--gold);
  color: var(--gold-lt);
  text-decoration: none;
}
.page-info { font-size: .9rem; color: var(--muted); }

/* ============================================================
   ARTICLE DETAIL
   ============================================================ */
.article-detail {
  background: var(--cream2);
  border: 1px solid var(--border);
  border-radius: 1px;
  padding: 28px;
}

.article-header { margin-bottom: 24px; }

.article-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.article-title {
  font-family: 'Noto Serif JP', 'Yu Mincho', serif;
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.45;
  color: var(--ink);
  margin-bottom: 10px;
  letter-spacing: .03em;
}

.article-meta-row {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: .84rem;
  color: var(--muted);
  margin-bottom: 12px;
}

.article-lead {
  background: rgba(201,164,82,.1);
  border-left: 4px solid var(--gold);
  padding: 10px 16px;
  font-size: .95rem;
  color: var(--text);
  border-radius: 0 2px 2px 0;
}

/* 本文スタイル */
.article-body { line-height: 1.95; font-size: 1rem; }
.article-body h2 {
  font-family: 'Noto Serif JP', serif;
  font-size: 1.22rem;
  font-weight: 700;
  margin: 32px 0 12px;
  padding: 9px 14px;
  background: linear-gradient(to right, rgba(125,24,33,.08), transparent);
  border-left: 4px solid var(--red);
  color: var(--ink);
}
.article-body h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 22px 0 10px;
  color: var(--ink);
  border-bottom: 1px solid var(--border);
  padding-bottom: 5px;
}
.article-body p { margin-bottom: 16px; }
.article-body ul, .article-body ol { margin: 0 0 16px 24px; }
.article-body li { margin-bottom: 6px; }
.article-body blockquote {
  border-left: 4px solid var(--gold);
  margin: 16px 0;
  padding: 8px 16px;
  color: var(--muted);
  background: rgba(201,164,82,.07);
}
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
  font-size: .9rem;
}
.article-body th, .article-body td {
  border: 1px solid var(--border);
  padding: 8px 12px;
  text-align: left;
}
.article-body th { background: rgba(201,164,82,.15); font-weight: 700; color: var(--ink); }
.article-body tr:nth-child(even) { background: rgba(245,237,216,.5); }
.article-body a { color: var(--red); }

/* タグ */
.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.tags-label { font-size: .84rem; color: var(--muted); }

/* 前後ナビ */
.article-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.nav-prev, .nav-next {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 1px;
}
.nav-next { text-align: right; }
.nav-dir { font-size: .72rem; color: var(--muted); }
.nav-article-title { font-size: .88rem; font-weight: 500; color: var(--ink); line-height: 1.4; }
.nav-prev:hover, .nav-next:hover {
  background: rgba(201,164,82,.1);
  text-decoration: none;
  border-color: var(--gold);
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar { display: flex; flex-direction: column; gap: 18px; }

.widget {
  background: var(--cream2);
  border: 1px solid var(--border);
  border-radius: 1px;
  overflow: hidden;
}

.widget-title {
  background: var(--red);
  color: #fff;
  font-size: .84rem;
  font-weight: 700;
  padding: 9px 14px;
  font-family: 'Noto Serif JP', serif;
  letter-spacing: .07em;
  border-bottom: 2px solid var(--gold);
}

.widget-list {
  list-style: none;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.widget-list li {
  font-size: .85rem;
  border-bottom: 1px dotted var(--border);
  padding-bottom: 6px;
}
.widget-list li:last-child { border-bottom: none; padding-bottom: 0; }
.widget-list a { color: var(--text); display: block; }
.widget-list a:hover { color: var(--red); text-decoration: none; }
.widget-badge {
  display: inline-block;
  font-size: .66rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 1px;
  margin-right: 5px;
  vertical-align: middle;
}
.widget-badge.diary  { background: var(--red);  color: #fff; }
.widget-badge.column { background: var(--navy); color: #fff; }
.widget-date { display: block; font-size: .7rem; color: var(--muted); margin-top: 2px; }
.count { color: var(--muted); font-size: .78rem; }

/* タグクラウド */
.tag-cloud { padding: 10px 14px; display: flex; flex-wrap: wrap; gap: 5px; }

/* 検索ウィジェット */
.widget-search .widget-title { background: var(--ink); border-bottom-color: var(--gold); }
.sidebar-search-form {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
}
.sidebar-search-input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 1px;
  padding: 6px 10px;
  font-size: .85rem;
  font-family: inherit;
  background: var(--cream);
  color: var(--text);
}
.sidebar-search-input:focus { outline: none; border-color: var(--gold); }
.sidebar-search-btn {
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 1px;
  padding: 6px 12px;
  font-size: .84rem;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
}
.sidebar-search-btn:hover { background: var(--ink); }

/* ============================================================
   SEARCH PAGE
   ============================================================ */
.search-page {
  background: var(--cream2);
  border: 1px solid var(--border);
  border-radius: 1px;
  padding: 28px;
}
.search-box-wrap { display: flex; gap: 10px; margin: 20px 0 8px; }
.search-input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 1px;
  padding: 10px 16px;
  font-size: 1rem;
  font-family: inherit;
  background: var(--cream);
  color: var(--text);
}
.search-input:focus { outline: none; border-color: var(--gold); }
.search-btn {
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 1px;
  padding: 10px 24px;
  font-size: 1rem;
  cursor: pointer;
  font-family: inherit;
}
.search-btn:hover { background: var(--ink); }
.search-hint { font-size: .84rem; color: var(--muted); margin-bottom: 24px; }
.search-prompt { color: var(--muted); text-align: center; padding: 40px 0; }
.no-articles { color: var(--muted); text-align: center; padding: 40px 0; }

/* ============================================================
   ADMIN PROFILE CARD
   ============================================================ */
.admin-profile-card {
  background: var(--cream2);
  border: 1px solid var(--border);
  border-left: 4px solid var(--gold);
  border-radius: 1px;
  padding: 18px;
  margin-bottom: 20px;
}
.admin-profile-inner { display: flex; gap: 16px; align-items: flex-start; }
.admin-profile-icon {
  flex-shrink: 0;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--gold);
}
.admin-profile-icon img { width: 100%; height: 100%; object-fit: cover; }
.admin-profile-body { flex: 1; }
.admin-profile-name {
  font-family: 'Noto Serif JP', serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}
.admin-profile-age { font-size: .74rem; font-weight: 400; color: var(--muted); margin-left: 8px; }
.admin-profile-bio { font-size: .86rem; color: var(--muted); line-height: 1.7; }

/* ============================================================
   ADMIN SPEECH BUBBLE
   ============================================================ */
.admin-comment {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 24px 0;
}

.admin-icon {
  flex-shrink: 0;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--gold);
  background: var(--cream);
}
.admin-icon img { width: 100%; height: 100%; object-fit: cover; }

.admin-bubble {
  position: relative;
  background: rgba(245,237,216,.85);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 12px 16px;
  font-size: .88rem;
  line-height: 1.75;
  color: var(--text);
  flex: 1;
}
.admin-bubble::before {
  content: "";
  position: absolute;
  top: 16px;
  left: -9px;
  border: 5px solid transparent;
  border-right-color: var(--border);
}
.admin-bubble::after {
  content: "";
  position: absolute;
  top: 17px;
  left: -7px;
  border: 4px solid transparent;
  border-right-color: rgba(245,237,216,.85);
}

.admin-name {
  display: block;
  font-size: .69rem;
  font-weight: 700;
  color: var(--red);
  margin-bottom: 5px;
  letter-spacing: .07em;
}

/* ============================================================
   ARTICLE THUMBNAIL
   ============================================================ */
.article-thumbnail {
  margin: 16px 0 24px;
  border-radius: 2px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.article-thumbnail img {
  display: block;
  width: 100%;
  height: auto;
}

/* ============================================================
   RELATED ARTICLES
   ============================================================ */
.related-articles {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.related-title {
  font-family: 'Noto Serif JP', serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 12px;
  padding-left: 10px;
  border-left: 3px solid var(--gold);
  letter-spacing: .04em;
}
.related-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.related-card {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 14px;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 1px;
  text-decoration: none;
  transition: border-color .15s, background .15s;
}
.related-card:hover {
  border-color: var(--gold);
  background: rgba(201,164,82,.08);
  text-decoration: none;
}
.related-card-title {
  font-size: .88rem;
  color: var(--ink);
  line-height: 1.5;
  flex: 1;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--ink);
  color: rgba(201,164,82,.65);
  text-align: center;
  padding: 22px 0;
  margin-top: auto;
  border-top: 3px solid var(--gold);
}
.footer-copy { font-size: .84rem; margin-bottom: 4px; color: var(--gold-lt); }
.footer-note { font-size: .7rem; color: rgba(201,164,82,.45); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .layout-2col { grid-template-columns: 1fr; }
  .sidebar { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
}

@media (max-width: 640px) {
  .hamburger { display: flex; }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--ink);
    border-top: 2px solid var(--gold);
    padding: 12px 16px;
    z-index: 99;
  }
  .site-nav.open { display: block; }
  .site-nav > ul { flex-direction: column; gap: 0; }
  .site-nav a {
    padding: 10px 0;
    border-bottom: 1px solid rgba(201,164,82,.2);
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-top: none;
  }
  .dropdown-menu {
    position: static;
    box-shadow: none;
    background: rgba(255,255,255,.05);
    display: none;
    border: none;
    border-top: 1px solid rgba(201,164,82,.15);
  }
  .nav-dropdown.open .dropdown-menu { display: flex; }

  .header-inner { position: relative; }
  .sidebar { grid-template-columns: 1fr; }
  .article-nav { grid-template-columns: 1fr; }
  .article-title { font-size: 1.25rem; }
  .search-box-wrap { flex-direction: column; }
}
