/* HALE 統合会員サイト（デモ） - Gold Theme */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', 'Noto Sans JP', sans-serif;
  background-color: #fdf8ec;
  color: #3d2c00;
  min-height: 100vh;
}

/* Demo ribbon */
.demo-ribbon {
  position: fixed;
  top: 14px;
  right: -42px;
  transform: rotate(45deg);
  background: #b8860b;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 0.3rem 3.2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  z-index: 200;
  pointer-events: none;
}

/* Header */
.site-header {
  background: linear-gradient(135deg, #5c3d00, #b8860b);
  color: white;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 8px rgba(184, 134, 11, 0.35);
}

.site-header .logo {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: white;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.tier-chip {
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 9999px;
  padding: 0.3rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}

.btn-logout {
  background: rgba(255,255,255,0.15);
  color: white;
  border: 1px solid rgba(255,255,255,0.4);
  padding: 0.4rem 1rem;
  border-radius: 9999px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: background 0.2s;
  text-decoration: none;
  display: inline-block;
}

.btn-logout:hover {
  background: rgba(255,255,255,0.28);
}

/* Main container */
.main-container {
  max-width: 860px;
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
}

/* Card */
.card {
  background: white;
  border-radius: 1rem;
  box-shadow: 0 4px 16px rgba(184, 134, 11, 0.1);
  padding: 1.5rem;
  margin-bottom: 1rem;
  border: 1px solid #f5e6c0;
}

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, #8b6914, #d4af37);
  color: #fff;
  border: none;
  padding: 0.75rem 2rem;
  border-radius: 9999px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
  transition: opacity 0.2s, transform 0.1s;
  display: inline-block;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(184, 134, 11, 0.35);
  letter-spacing: 0.03em;
}

.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: white;
  color: #8b6914;
  border: 2px solid #b8860b;
  padding: 0.6rem 1.5rem;
  border-radius: 9999px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s;
  display: inline-block;
  text-decoration: none;
}

.btn-secondary:hover { background: #fef9ec; }

/* Badge */
.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-new { background: #fef3c7; color: #7a4f00; }
.badge-info { background: #fdf3dc; color: #6b4400; }
.badge-answered { background: #d1fae5; color: #047857; }
.badge-pending { background: #fee2e2; color: #b91c1c; }

/* Tier color accents */
.tier-mankitsu { --tc: #d4af37; }
.tier-ranman   { --tc: #c0763d; }
.tier-koushi   { --tc: #8b5cf6; }

/* Breadcrumb */
.breadcrumb {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.85rem; color: #8b6914; margin-bottom: 1.5rem;
}
.breadcrumb a { color: #8b6914; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb-sep { color: #c9a84c; }

/* Section title */
.section-title {
  font-size: 1.5rem; font-weight: 700; color: #5c3d00;
  margin-bottom: 1.25rem; display: flex; align-items: center; gap: 0.5rem;
}
.section-sub {
  font-size: 0.9rem; color: #9b7c3a; margin: -0.6rem 0 1.25rem;
}

/* Announcement */
.announcement-item {
  display: flex; align-items: flex-start; gap: 0.75rem;
  padding: 0.75rem 0; border-bottom: 1px solid #f5e6c0;
}
.announcement-item:last-child { border-bottom: none; }
.announcement-date { font-size: 0.8rem; color: #9ca3af; white-space: nowrap; padding-top: 0.1rem; }
.announcement-text { font-size: 0.95rem; line-height: 1.5; color: #374151; }

/* Clickable announcement (link) */
a.announcement-item {
  text-decoration: none; cursor: pointer; border-radius: 0.5rem;
  transition: background 0.15s; padding: 0.75rem 0.5rem; margin: 0 -0.5rem;
}
a.announcement-item:hover { background: #fdf8ec; }
a.announcement-item .announcement-text { color: #374151; }
.announcement-go { color: #b8860b; font-size: 0.85rem; font-weight: 700; margin-left: auto; padding-top: 0.1rem; white-space: nowrap; }

/* News detail */
.news-hero {
  width: 100%; max-height: 280px; object-fit: cover; border-radius: 1rem;
  border: 1px solid #f0dda8; margin-bottom: 1.25rem; display: block;
}
.news-body { font-size: 0.98rem; line-height: 1.9; color: #3d2c00; white-space: pre-wrap; }

/* Thread / Q&A images */
.thread-img {
  width: 100%; max-width: 320px; border-radius: 0.7rem; border: 1px solid #f0dda8;
  margin-top: 0.6rem; display: block; background: #fff;
}
.img-ph {
  display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 0.3rem;
  width: 100%; max-width: 320px; aspect-ratio: 4 / 3; margin-top: 0.6rem;
  background: repeating-linear-gradient(45deg, #fbf3df, #fbf3df 10px, #f6ead0 10px, #f6ead0 20px);
  border: 1px dashed #d4af37; border-radius: 0.7rem; color: #b08a2e; font-size: 0.8rem; font-weight: 700;
}
.img-ph .img-ph-ico { font-size: 1.6rem; }

/* Tabs */
.tab-bar { display: flex; gap: 0.5rem; margin-bottom: 1.25rem; }
.tab-btn {
  flex: 1; text-align: center; padding: 0.7rem 1rem; border-radius: 9999px;
  font-size: 0.92rem; font-weight: 700; cursor: pointer; border: 2px solid #f0dda8;
  background: white; color: #9b7c3a; transition: all 0.15s;
}
.tab-btn.active {
  background: linear-gradient(135deg, #8b6914, #d4af37); color: #fff; border-color: transparent;
  box-shadow: 0 3px 10px rgba(184,134,11,0.3);
}
.checkbox-row { display: flex; align-items: center; gap: 0.5rem; font-size: 0.88rem; color: #5c3d00; margin-bottom: 1rem; cursor: pointer; }
.checkbox-row input { width: 1.1rem; height: 1.1rem; accent-color: #b8860b; }

/* Menu cards */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}
.menu-card {
  background: white; border-radius: 1rem;
  box-shadow: 0 4px 16px rgba(184, 134, 11, 0.12);
  text-decoration: none; color: inherit;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex; flex-direction: column;
  border: 1px solid #f5e6c0; overflow: hidden;
}
.menu-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(184, 134, 11, 0.22);
  border-color: #d4af37;
}
.menu-card:hover .menu-card-img { transform: scale(1.04); }
.menu-card-icon {
  height: 110px; display: flex; align-items: center; justify-content: center;
  font-size: 2.6rem;
  background: linear-gradient(135deg, #fdf3dc, #f7e7bd);
}
.menu-card-img-wrap { width: 100%; height: 150px; overflow: hidden; position: relative; }
.menu-card-img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease; }
.menu-card-img-overlay { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(60,30,0,0.05) 0%, rgba(60,30,0,0.4) 100%); }
.menu-card-body { padding: 1rem 1.25rem 1.25rem; display: flex; flex-direction: column; gap: 0.3rem; flex: 1; }
.menu-card-title { font-size: 1.1rem; font-weight: 700; color: #5c3d00; }
.menu-card-desc { font-size: 0.83rem; color: #6b7280; line-height: 1.55; margin-top: 0.1rem; }
.menu-card-arrow { color: #b8860b; font-size: 1rem; font-weight: 700; margin-top: 0.6rem; align-self: flex-end; }

/* Course group */
.course-group { margin-bottom: 2.25rem; }
.course-group-head {
  display: flex; align-items: center; gap: 0.6rem;
  margin-bottom: 0.9rem;
}
.course-group-bar {
  width: 5px; height: 1.6rem; border-radius: 9999px;
  background: var(--tc, #d4af37);
}
.course-group-title { font-size: 1.2rem; font-weight: 700; color: #3d2c00; }
.course-group-pill {
  font-size: 0.72rem; font-weight: 700; color: #fff;
  background: var(--tc, #d4af37); border-radius: 9999px; padding: 0.18rem 0.7rem;
}

.course-card {
  background: white; border-radius: 0.9rem;
  border: 1px solid #f5e6c0; border-left: 5px solid var(--tc, #d4af37);
  box-shadow: 0 3px 12px rgba(184, 134, 11, 0.08);
  padding: 1.1rem 1.3rem; margin-bottom: 0.85rem;
  display: flex; align-items: center; gap: 1rem;
  transition: transform 0.15s, box-shadow 0.15s;
}
.course-card:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(184, 134, 11, 0.16); }
.course-thumb {
  width: 64px; height: 64px; border-radius: 0.7rem; object-fit: cover;
  flex-shrink: 0; border: 1px solid #f0dda8;
}
.course-info { flex: 1; min-width: 0; }
.course-name { font-size: 1rem; font-weight: 700; color: #3d2c00; margin-bottom: 0.2rem; }
.course-meta { font-size: 0.8rem; color: #9b7c3a; }
.course-desc { font-size: 0.83rem; color: #6b7280; line-height: 1.5; margin-top: 0.25rem; }
.course-go {
  flex-shrink: 0; font-size: 0.82rem; font-weight: 700;
  color: #8b6914; background: #fef3c7; border-radius: 9999px; padding: 0.4rem 0.95rem;
}

/* Locked course group */
.locked .course-card {
  filter: grayscale(0.6); opacity: 0.62;
  border-left-color: #d1d5db;
}
.lock-banner {
  display: flex; align-items: center; gap: 0.6rem;
  background: #f3f0e6; border: 1px dashed #c9b27a;
  border-radius: 0.8rem; padding: 0.85rem 1.1rem; margin-bottom: 0.85rem;
  font-size: 0.86rem; color: #7a5e1a; font-weight: 600;
}
.lock-banner .lock-ico { font-size: 1.15rem; }

/* Accordion (Q&A) */
.accordion-item { border: 1px solid #f0dda8; border-radius: 0.75rem; margin-bottom: 0.75rem; overflow: hidden; }
.accordion-header {
  background: #fdf8ec; padding: 1rem 1.25rem; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  font-weight: 600; color: #5c3d00; transition: background 0.2s; user-select: none;
}
.accordion-header:hover { background: #fef3c7; }
.accordion-header .q-label { color: #b8860b; font-size: 1.1rem; margin-right: 0.5rem; }
.accordion-arrow { transition: transform 0.3s; color: #b8860b; }
.accordion-item.open .accordion-arrow { transform: rotate(180deg); }
.accordion-body {
  display: none; padding: 1rem 1.25rem; color: #4b5563; line-height: 1.7;
  border-top: 1px solid #f0dda8; background: white;
}
.accordion-body .a-label { color: #059669; font-weight: 700; margin-right: 0.5rem; }
.accordion-item.open .accordion-body { display: block; }

/* Question box thread */
.q-thread {
  border: 1px solid #f0dda8; border-radius: 0.9rem; overflow: hidden; margin-bottom: 1rem;
}
.q-bubble {
  padding: 1rem 1.25rem; display: flex; gap: 0.75rem; align-items: flex-start;
}
.q-bubble.from-member { background: #fffdf5; }
.q-bubble.from-admin { background: #f6fbf7; border-top: 1px solid #e6f0e8; }
.q-avatar {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; color: #fff;
}
.q-avatar.member { background: linear-gradient(135deg, #8b6914, #d4af37); }
.q-avatar.admin { background: linear-gradient(135deg, #047857, #10b981); }
.q-content { flex: 1; min-width: 0; }
.q-who { font-size: 0.82rem; font-weight: 700; color: #5c3d00; margin-bottom: 0.15rem; }
.q-who .q-when { font-weight: 400; color: #9ca3af; margin-left: 0.5rem; font-size: 0.75rem; }
.q-text { font-size: 0.92rem; color: #374151; line-height: 1.65; white-space: pre-wrap; }
.q-cat {
  display: inline-block; font-size: 0.7rem; font-weight: 700; color: #7a4f00;
  background: #fef3c7; border-radius: 9999px; padding: 0.12rem 0.6rem; margin-left: 0.4rem;
}

/* Form */
.form-field { margin-bottom: 1rem; }
.form-label { display: block; font-size: 0.88rem; font-weight: 700; color: #5c3d00; margin-bottom: 0.4rem; }
.form-input, .form-select, .form-textarea {
  width: 100%; border: 2px solid #f0dda8; border-radius: 0.7rem;
  padding: 0.7rem 0.9rem; font-size: 0.95rem; color: #3d2c00;
  outline: none; background: #fdf8ec; font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: #b8860b; box-shadow: 0 0 0 3px rgba(184,134,11,0.15); background: white;
}
.form-textarea { resize: vertical; min-height: 110px; line-height: 1.6; }

/* CTA box */
.cta-box {
  background: linear-gradient(135deg, #fdf3dc, #f7e7bd);
  border: 1px solid #ecd596; border-radius: 1rem;
  padding: 1.25rem 1.5rem; text-align: center; margin-top: 1.5rem;
}
.cta-box p { color: #6b4400; font-size: 0.92rem; margin-bottom: 0.9rem; line-height: 1.6; }

/* Schedule list (復習会) */
.schedule-item {
  display: flex; gap: 1rem; align-items: center;
  border: 1px solid #f5e6c0; border-radius: 0.85rem; padding: 1rem 1.2rem; margin-bottom: 0.8rem;
  background: white;
}
.schedule-date {
  flex-shrink: 0; width: 64px; text-align: center;
  background: linear-gradient(135deg, #8b6914, #d4af37); color: #fff;
  border-radius: 0.7rem; padding: 0.5rem 0;
}
.schedule-date .m { font-size: 0.72rem; display: block; opacity: 0.9; }
.schedule-date .d { font-size: 1.4rem; font-weight: 800; display: block; line-height: 1; }
.schedule-body { flex: 1; }
.schedule-title { font-weight: 700; color: #3d2c00; margin-bottom: 0.2rem; }
.schedule-meta { font-size: 0.82rem; color: #9b7c3a; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px);
  background: #3d2c00; color: #fff; padding: 0.85rem 1.6rem; border-radius: 9999px;
  font-size: 0.9rem; font-weight: 600; box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  opacity: 0; pointer-events: none; transition: all 0.3s; z-index: 300;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Responsive */
@media (max-width: 600px) {
  .main-container { padding: 1rem 1rem 3rem; }
  .menu-grid { grid-template-columns: 1fr; }
  .course-card { flex-wrap: wrap; }
  .course-go { margin-left: auto; }
}
