* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, sans-serif;
  background: #ffffff;
  color: #1f2937;
  min-height: 100vh;
}

/* loginページ専用グラデーション */
body.login-page {
  background: linear-gradient(135deg, #ffd1dc 0%, #ff9eaa 50%, #ff7eb3 100%);
}

/* サイドバー */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 240px;
  height: 100vh;
  background: linear-gradient(180deg, #d0f7c5 0%, #a7e9af 100%);
  border-right: 1px solid #b8e0a0;
  padding: 24px 16px;
  color: #2f4f4f;
  overflow-y: auto;
  z-index: 100;
}

.sidebar h2 {
  color: #2f4f4f;
  font-size: 1.4rem;
  margin-bottom: 32px;
  text-align: center;
}

.sidebar ul {
  list-style: none;
}

.sidebar li {
  margin: 12px 0;
}

.sidebar a,
.sidebar button {
  display: block;
  padding: 12px 16px;
  color: #2f4f4f;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.2s;
}

.sidebar a:hover,
.sidebar button:hover {
  background: rgba(255,255,255,0.5);
}

.sidebar .active {
  background: rgba(255,255,255,0.7);
  font-weight: 600;
}

.logout-btn {
  margin-top: 120px;
  background: #ef4444;
  color: white !important;
  border: none;
  cursor: pointer;
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  font-weight: 600;
}

.logout-btn:hover {
  background: #dc2626;
}

/* メインコンテンツ */
.main-content {
  margin-left: 240px;
  padding: 32px 40px;
  background: #ffffff;
  min-height: 100vh;
}

.welcome-section {
  margin-bottom: 40px;
}

.welcome-section h1 {
  font-size: 2.2rem;
  color: #1f2937;
  margin-bottom: 8px;
}

.welcome-section p {
  font-size: 1.1rem;
  color: #4b5563;
}

#domain-info {
  font-size: 1.1rem;
  color: #4b5563;
}

#domain-link {
  color: #2563eb;
  text-decoration: underline;
  font-weight: 500;
  transition: color 0.2s;
}

#domain-link:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

/* カード */
.card-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.card {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 32px 28px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.08);
  border-color: #d1d5db;
}

.card h2 {
  font-size: 1.5rem;
  margin-bottom: 12px;
  color: #1f2937;
}

.card p {
  color: #6b7280;
  line-height: 1.5;
}

/* login専用スタイル（必要に応じて上書き） */
.login-container {
  width: 100%;
  max-width: 420px;
  padding: 20px;
  margin: 0 auto;
}

.login-card {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-radius: 16px;
  padding: 40px 32px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.login-card h2 {
  text-align: center;
  margin-bottom: 32px;
  color: #d4415f;
  font-size: 1.8rem;
  font-weight: 600;
}

.form-group {
  margin-bottom: 24px;
}

label {
  display: block;
  margin-bottom: 8px;
  color: #444;
  font-weight: 500;
  font-size: 0.95rem;
}

input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.2s;
}

input:focus {
  outline: none;
  border-color: #ff7eb3;
  box-shadow: 0 0 0 3px rgba(255, 126, 179, 0.2);
}

.login-button {
  width: 100%;
  padding: 14px;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 12px;
}

.login-button:hover {
  background: #2563eb;
  transform: translateY(-1px);
}

.error-message {
  color: #dc2626;
  text-align: center;
  margin-bottom: 20px;
  min-height: 1.5em;
  font-weight: 500;
  font-size: 0.95rem;
}
/* お問い合わせページ */
.page-title {
  font-size: 2.2rem;
  margin-bottom: 32px;
  color: #1f2937;
}

.contact-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 40px;
  max-width: 680px;
  margin: 0 auto;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.form-group {
  margin-bottom: 28px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #374151;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.submit-button {
  width: 100%;
  padding: 14px;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.submit-button:hover {
  background: #2563eb;
}

.form-message {
  margin: 16px 0;
  text-align: center;
  font-weight: 500;
  min-height: 1.4em;
}

.form-message.success {
  color: #059669;
}

.form-message.error {
  color: #dc2626;
}
/* アカウントページ */
.account-notice-card {
  background: #ffffff;
  border: 2px dashed #9ca3af;
  border-radius: 16px;
  padding: 60px 40px;
  max-width: 720px;
  margin: 40px auto;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}

.notice-content h2 {
  font-size: 1.8rem;
  color: #374151;
  margin-bottom: 20px;
}

.notice-content p {
  font-size: 1.1rem;
  color: #4b5563;
  line-height: 1.7;
  margin-bottom: 16px;
}

.notice-content .small {
  font-size: 0.95rem;
  color: #6b7280;
  margin-top: 24px;
}
/* 投稿ページ */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
  flex-wrap: wrap;
  gap: 20px;
}

.tab-container {
  display: flex;
  background: #f3f4f6;
  border-radius: 8px;
  overflow: hidden;
}

.tab-button {
  padding: 12px 24px;
  border: none;
  background: transparent;
  color: #6b7280;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.tab-button.active {
  background: #3b82f6;
  color: white;
}

.tab-button:hover {
  background: #e5e7eb;
}

.tab-button.active:hover {
  background: #2563eb;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.subtitle {
  font-size: 1.2rem;
  color: #374151;
  margin-bottom: 24px;
  font-weight: 600;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 24px;
}

.post-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.25s ease;
  height: 220px;
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.1);
  border-color: #d1d5db;
}

.post-image {
  height: 140px;
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
  position: relative;
  overflow: hidden;
}

.post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #9ca3af;
  font-size: 0.9rem;
}

.post-content {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 8px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-status {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 12px;
}

.status-draft { background: #fef3c7; color: #d97706; }
.status-scheduled { background: #dbeafe; color: #1e40af; }
.status-published { background: #d1fae5; color: #047857; }

.post-meta {
  font-size: 0.85rem;
  color: #6b7280;
  margin-bottom: 4px;
}

.post-comment {
  font-size: 0.9rem;
  color: #4b5563;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 40px;
  padding: 24px;
}

.page-btn {
  padding: 10px 20px;
  border: 1px solid #d1d5db;
  background: white;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.page-btn:hover:not(:disabled) {
  background: #f3f4f6;
  border-color: #9ca3af;
}

.page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.member-list-placeholder {
  background: #ffffff;
  border: 2px dashed #9ca3af;
  border-radius: 16px;
  padding: 80px 40px;
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.member-list-placeholder h2 {
  font-size: 1.8rem;
  color: #374151;
  margin-bottom: 16px;
}

.member-list-placeholder p {
  font-size: 1.1rem;
  color: #6b7280;
  line-height: 1.6;
}
/* 投稿なしメッセージ */
.no-posts {
  text-align: center;
  padding: 80px 20px;
  font-size: 1.3rem;
  color: #6b7280;
  background: #f9fafb;
  border-radius: 12px;
  border: 1px dashed #d1d5db;
  margin: 40px auto;
  max-width: 600px;
}