@charset "UTF-8";

/*
  Skin Name: Chotto (Shinobi-AI Lite) - Cocoon Rewrite
  Description: Webアプリ風の「ちょっと」気の利いたUI。ガラス風ヘッダー、カードUI、フォーム統一、チャットUI。
  Author: Yusuke Goto
  Version: 1.1.0-r1
  Priority: 999999
*/

/* ==================================================================
   1. 変数定義 (Design Tokens)
   ================================================================== */
:root {
  /* メインカラー：知的なブルーと高貴なパープル */
  --primary-1: #6a11cb;
  --primary-2: #2575fc;
  --primary-gradient: linear-gradient(135deg, var(--primary-1), var(--primary-2));

  /* 背景・テキスト */
  --bg-body: #f3f6f9;
  --bg-surface: #ffffff;
  --text-main: #1f2937;
  --text-sub: #6b7280;

  /* UI要素 */
  --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-floating: 0 10px 25px -5px rgba(0, 0, 0, 0.10), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  --radius-L: 16px;
  --radius-M: 12px;
  --radius-S: 8px;

  /* ガラスモーフィズム */
  --glass-bg: rgba(255, 255, 255, 0.70);
  --glass-border: 1px solid rgba(255, 255, 255, 0.35);
  --glass-blur: blur(12px);

  /* 境界線 */
  --border-soft: 1px solid rgba(0,0,0,0.06);

  /* 余白 */
  --space-XS: 8px;
  --space-S: 12px;
  --space-M: 16px;
  --space-L: 24px;
  --space-XL: 32px;
}

/* ==================================================================
   2. ベーススタイル
   ================================================================== */
html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary-2);
  text-decoration: none;
  transition: all 0.2s ease;
}
a:hover {
  color: var(--primary-1);
  text-decoration: underline;
}

/* Cocoonのラップ背景を透明に */
.wrap {
  background: transparent !important;
}

/* コンテンツ幅・余白（Cocoon想定） */
#content,
.content {
  max-width: 1200px;
  margin: 24px auto;
  padding: 0 20px;
}

/* ==================================================================
   3. ヘッダー (ガラス風 / Cocoon実セレクタ対応)
   ================================================================== */
#header-container,
.header-container {
  background: var(--glass-bg) !important;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: var(--glass-border) !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05) !important;
  top: 0;
  z-index: 9999;
  padding: 10px 0 !important;
}

/* ロゴ（Cocoon: site-name-textがよく使われる） */
.site-name-text,
.logo-header .site-name-text,
.logo-text a.site-name-text-link,
.logo a,
.header .logo a {
  font-size: 1.4rem;
  font-weight: 800 !important;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.02em;
  text-decoration: none !important;
}

/* キャッチフレーズ */
.tagline,
.site-description {
  font-size: 0.75rem;
  color: var(--text-sub) !important;
  margin-left: 10px;
  display: inline-block;
}

/* グローバルナビ（Cocoon） */
#navi .navi-in > ul > li > a,
#navi .menu-item > a,
#navi a {
  color: var(--text-main) !important;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 8px 16px;
  border-radius: var(--radius-S);
  transition: all 0.2s;
  text-decoration: none !important;
}

#navi .navi-in > ul > li > a:hover,
#navi .menu-item > a:hover,
#navi a:hover {
  background-color: rgba(37, 117, 252, 0.08);
  color: var(--primary-2) !important;
  text-decoration: none !important;
}

/* ==================================================================
   4. メインコンテンツ & サイドバー（Cocoon対応）
   ================================================================== */
/* メインカラムの背景を透明に（Cocoonの枠感を消す） */
#main,
.main,
.main-inner,
#main .main-inner {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
}

/* サイドバー */
#sidebar {
  padding: 0 !important;
}

/* ウィジェット */
#sidebar .widget,
.widget {
  background: var(--bg-surface) !important;
  border-radius: var(--radius-M) !important;
  box-shadow: var(--shadow-card) !important;
  margin-bottom: 20px !important;
  border: var(--border-soft) !important;
  overflow: hidden;
}

#sidebar .widget-title,
.widget-title {
  font-size: 1rem;
  color: var(--text-main) !important;
  border-bottom: 2px solid #e5e7eb;
  padding: 14px 16px 10px 16px;
  margin: 0 0 12px 0;
  font-weight: 700;
}

/* widget本文の余白 */
#sidebar .widget > div,
#sidebar .widget > ul,
#sidebar .widget > ol,
#sidebar .widget > p,
.widget > div,
.widget > ul,
.widget > ol,
.widget > p {
  padding-left: 16px;
  padding-right: 16px;
}

/* ==================================================================
   4.1 記事一覧（リスト/カード表示を整える）
   ================================================================== */
/* Cocoonのカード/リストをカード化（両対応） */
.entry-card-wrap,
.entry-card-wrap.a-wrap {
  margin-top: 0 !important;
}

/* Cocoon標準の.entry-cardを“Webアプリカード”へ */
.entry-card {
  background: var(--bg-surface) !important;
  border-radius: var(--radius-L) !important;
  box-shadow: var(--shadow-card) !important;
  border: var(--border-soft) !important;
  padding: 0 !important;
  margin-bottom: 24px !important;
  overflow: hidden !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  align-items: stretch;
}

/* ホバー */
.a-wrap:hover .entry-card,
.entry-card-wrap:hover .entry-card {
  transform: translateY(-4px);
  box-shadow: var(--shadow-floating) !important;
}

/* サムネイル */
.entry-card-thumb {
  margin: 0 !important;
  width: 30%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.entry-card-thumb img {
  width: 100%;
  height: 100% !important;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.entry-card-wrap:hover .entry-card-thumb img,
.a-wrap:hover .entry-card-thumb img {
  transform: scale(1.05);
}

/* 右側コンテンツ */
.entry-card-content {
  padding: 20px !important;
  width: 70%;
  display: flex;
  flex-direction: column;
}

/* タイトル（通常時は必ず可視。ホバー時だけグラデ） */
.entry-card-title,
.entry-card-title a {
  font-size: 1.1rem !important;
  font-weight: 700 !important;
  margin: 0 0 0.5rem 0 !important;
  line-height: 1.5 !important;
  color: var(--text-main) !important;
  -webkit-text-fill-color: var(--text-main) !important;
  background: none !important;
  -webkit-background-clip: border-box !important;
  background-clip: border-box !important;
  text-decoration: none !important;
}

/* タイトルホバー */
.entry-card-wrap:hover .entry-card-title,
.entry-card-wrap:hover .entry-card-title a,
.a-wrap:hover .entry-card-title,
.a-wrap:hover .entry-card-title a {
  background: var(--primary-gradient) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

/* スニペット */
.entry-card-snippet {
  color: var(--text-sub) !important;
  font-size: 0.88rem;
  margin: 0 !important;
}

/* メタ（下寄せ） */
.entry-card-meta {
  margin-top: auto !important;
  color: var(--text-sub) !important;
  font-size: 0.85rem;
  padding-top: 12px;
  border-top: 1px solid #eef2f7;
}

/* カテゴリラベル（Cocoonの.cat-label） */
.cat-label {
  background: rgba(37, 117, 252, 0.10) !important;
  color: var(--primary-2) !important;
  border: none !important;
  font-weight: 600 !important;
  border-radius: 999px !important;
  padding: 4px 12px !important;
}

/* 管理用PVは消す */
.admin-pv { display: none !important; }

/* ==================================================================
   4.2 一覧ページ上部「タイトルゾーン」は不要 → 完全に消す
   ================================================================== */
/* カテゴリ/タグ/検索/日付アーカイブ等の見出し一式 */
#main .archive-title,
#main h1.archive-title,
#main .archive-header,
#main .archive-header-inner,
#main .archive-header-content,
#main .archive-description,
#main .archive-title *,
#main .archive-header *,
#main .archive-description * {
  display: none !important;
}

/* ==================================================================
   5. 記事詳細 (Single)
   ================================================================== */
.article,
#main .article,
#main .article-content {
  background: var(--bg-surface) !important;
  border-radius: var(--radius-L) !important;
  box-shadow: var(--shadow-card) !important;
  padding: 40px !important;
  margin-bottom: 40px !important;
  border: var(--border-soft) !important;
}

/* 記事タイトル */
.entry-title,
.article .entry-title {
  font-size: 1.8rem !important;
  font-weight: 700 !important;
  color: var(--text-main) !important;
  margin: 0 0 1rem 0 !important;
  line-height: 1.4 !important;
}

/* メタ情報 */
.date-tags,
.entry-date,
.post-date {
  color: var(--text-sub) !important;
  font-size: 0.85rem !important;
  margin-bottom: 1.5rem !important;
}

/* 本文見出し */
.entry-content h2,
.article h2 {
  background: transparent !important;
  border: none !important;
  border-left: 5px solid var(--primary-2) !important;
  padding: 0 0 0 15px !important;
  margin: 3rem 0 1.5rem 0 !important;
  font-size: 1.5rem !important;
  color: var(--text-main) !important;
}

.entry-content h3,
.article h3 {
  border-bottom: 2px solid #f3f4f6 !important;
  padding-bottom: 8px !important;
  margin: 2.5rem 0 1.2rem 0 !important;
  font-size: 1.25rem !important;
  color: var(--text-main) !important;
}

/* ==================================================================
   6. 特殊コンポーネント（チャット・管理パネル）
   ================================================================== */
/* チャットエリア */
#chat {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 2rem 0;
  padding: 20px;
  background: #f8fafc;
  border-radius: var(--radius-L);
  border: 1px solid #e2e8f0;
}

/* メッセージ共通 */
#chat .message {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.95rem;
  line-height: 1.6;
  position: relative;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* AI (左側) */
#chat .message.ai {
  align-self: flex-start;
  background: #fff;
  color: var(--text-main);
  border-bottom-left-radius: 2px;
  border: 1px solid #e5e7eb;
}
#chat .message.ai::before {
  content: 'AI';
  position: absolute;
  top: -20px;
  left: 0;
  font-size: 0.75rem;
  font-weight: bold;
  color: var(--primary-2);
}

/* ユーザー (右側) */
#chat .message.user {
  align-self: flex-end;
  background: var(--primary-gradient);
  color: #fff;
  border-bottom-right-radius: 2px;
}

/* ==================================================================
   6.1 フォーム要素（全体統一）
   ================================================================== */
input[type="text"],
input[type="email"],
input[type="number"],
textarea,
select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #d1d5db;
  border-radius: var(--radius-M);
  background: #fff;
  font-size: 16px;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary-2);
  box-shadow: 0 0 0 3px rgba(37, 117, 252, 0.2);
}

/* ボタン */
.btn-primary,
.submit,
button,
input[type="submit"] {
  background: var(--primary-gradient);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-M);
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(37, 117, 252, 0.2);
  transition: transform 0.1s, filter 0.2s;
}

.btn-primary:hover,
.submit:hover,
button:hover,
input[type="submit"]:hover {
  filter: brightness(1.02);
}

.btn-primary:active,
.submit:active,
button:active,
input[type="submit"]:active {
  transform: scale(0.98);
}

/* 管理パネル風フローティング（任意で使う想定） */
.admin-panel {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--bg-surface);
  border: 1px solid #e5e7eb;
  border-radius: 50px;
  padding: 8px 16px;
  box-shadow: var(--shadow-floating);
  z-index: 9999;
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 0.85rem;
}
.admin-panel a {
  color: var(--text-sub);
  font-weight: 500;
}
.admin-panel a:hover {
  color: var(--primary-2);
  text-decoration: none;
}

/* ==================================================================
   7. フッター（Cocoon対応）
   ================================================================== */
#footer,
.footer {
  background: #fff !important;
  margin-top: 60px;
  padding: 40px 0 !important;
  border-top: 1px solid #e5e7eb !important;
}

.footer-bottom-logo .site-name-text {
  color: var(--text-main) !important;
  font-weight: 700 !important;
}

/* ==================================================================
   8. レスポンシブ（スマホ対応）
   ================================================================== */
@media screen and (max-width: 834px) {
  #content,
  .content {
    margin: 16px auto;
    padding: 0 14px;
  }

  /* 一覧カードを縦積み */
  .entry-card {
    flex-direction: column;
  }
  .entry-card-thumb {
    width: 100%;
    aspect-ratio: 16/9;
  }
  .entry-card-content {
    width: 100%;
    padding: 15px !important;
  }

  /* 記事詳細 */
  .article,
  #main .article,
  #main .article-content {
    padding: 20px !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    border: none !important;
  }

  /* ヘッダー */
  #header-container,
  .header-container {
    padding: 8px 0 !important;
  }

  .tagline,
  .site-description {
    display: none !important;
  }

  /* 管理パネル（スマホでは非表示） */
  .admin-panel {
    display: none !important;
  }

  /* 一覧タイトルゾーンは常に不要（スマホでも） */
  #main .archive-title,
  #main h1.archive-title,
  #main .archive-header,
  #main .archive-description {
    display: none !important;
  }
}

/* ==================================================================
   9. 追加コンポーネント（あなたの下部CSSをそのまま統合）
   ================================================================== */

/* 商品ボックス */
.product-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.product-box {
  padding: 20px;
  border-radius: 10px;
  flex: 1 1 calc(33.333% - 20px);
  box-sizing: border-box;
  background: linear-gradient(270deg, rgba(76, 224, 251, 0.3), rgba(218, 61, 202, 0.3));
  background-size: 200% 200%;
  animation: gradientAnimation 5s ease infinite;
  border: 1px solid rgba(0,0,0,0.06);
}

@keyframes gradientAnimation {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.product-name {
  font-size: 1.5em;
  font-weight: bold;
  margin: 0 0 10px 0;
  text-align: center;
}

.product-box p { margin: 10px 0; }

.product-box .button {
  display: inline-block;
  padding: 10px 20px;
  background-color: black;
  color: white;
  text-decoration: none;
  border-radius: 5px;
  text-align: center;
  font-weight: bold;
}

.product-price { text-align: right; }

.product-box .button:hover { opacity: 0.8; }

@media (max-width: 768px) {
  .product-box { flex: 100%; }
}

/* フォーム全体 */
#update-form {
  max-width: 520px;
  margin: 40px auto;
  padding: 20px;
  border-radius: 16px;
  background: linear-gradient(145deg, #fdfbfb, #ebedee);
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  font-family: system-ui, sans-serif;
}

/* セクションの見出し */
.gradient-box p {
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 12px;
  color: #333;
}

/* 入力系統（update-form用） */
.gradient-box input[type="text"],
.gradient-box input[type="number"],
.gradient-box select,
.gradient-box textarea {
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 10px;
  background: #fff;
  transition: all 0.25s;
}

.gradient-box input[type="text"]:focus,
.gradient-box input[type="number"]:focus,
.gradient-box select:focus,
.gradient-box textarea:focus {
  border-color: #5a9ef9;
  box-shadow: 0 0 6px rgba(90, 158, 249, 0.3);
  outline: none;
}

/* タブ部分 */
.tabs {
  display: flex;
  justify-content: space-around;
  margin: 20px 0;
  border-bottom: 2px solid #ddd;
  border-radius: 8px 8px 0 0;
  overflow: hidden;
}

.tabs input[type="radio"] { display: none; }

.tabs label {
  flex: 1;
  padding: 10px 0;
  text-align: center;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.25s, color 0.25s;
  border-right: 1px solid #ddd;
  background: #f8f8f8;
}

.tabs label:last-child { border-right: none; }

.tabs input[type="radio"]:checked + label {
  background: #5a9ef9;
  color: #fff;
}

/* タブコンテンツ */
.tab-content {
  display: none;
  padding: 15px 0;
  animation: fadeIn 0.3s ease-in-out;
}

.tab-content.active { display: block; }

/* フォーム送信ボタン */
.centered-button {
  display: block;
  width: 100%;
  margin-top: 15px;
  padding: 12px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: #5a9ef9;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.25s;
}

.centered-button:hover {
  background: #357ac9;
  transform: translateY(-1px);
}

.centered-button:active { transform: scale(0.98); }

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Entry Content Global */
.entry-content {
  font-family: "Noto Sans JP", sans-serif;
  color: #333;
  line-height: 1.8;
}

/* 見出しのデザイン（ブロック見出し） */
.entry-content h2.wp-block-heading,
.entry-content h3.wp-block-heading {
  position: relative;
  padding: 0.5em 0 0.5em 0.5em;
  margin-top: 40px;
  margin-bottom: 25px;
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(90deg, #f3f4f6 0%, transparent 100%);
  border-left: 5px solid #6a11cb;
  border-radius: 4px;
}

/* Categories（カテゴリーをオシャレなボタンに） */
ul.wp-block-categories-list {
  list-style: none;
  padding: 0;
  margin: 0 0 40px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

ul.wp-block-categories-list li {
  margin: 0;
  flex: 0 1 auto;
}

ul.wp-block-categories-list li a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  color: #444;
  text-decoration: none;
  padding: 12px 20px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.03);
  transition: all 0.3s ease;
  min-width: 140px;
}

ul.wp-block-categories-list li a:hover {
  background: linear-gradient(135deg, #6a11cb, #2575fc);
  color: #fff;
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: 0 8px 15px rgba(37, 117, 252, 0.25);
}