/* ===== AIかけこみ寺 メンバー向けサイト =====
 * LPのブランドカラーを継承しつつ、メンバー向けにミニマル化
 * フォント: Yu Gothic UI（仕様書指定）
 * ============================================ */

:root {
  --primary: #2D6A4F;
  --primary-light: #52B788;
  --primary-pale: #D8F3DC;
  --accent: #E76F51;
  --accent-light: #F4A261;
  --warm-bg: #FDF8F0;
  --warm-bg-alt: #FFF5E8;
  --surface: #FFFFFF;
  --border: #E8E2D6;
  --text: #2C2C2C;
  --text-light: #5A5A5A;
  --text-mute: #8A8A8A;
  --danger: #C73E1D;
  --info: #2A6F97;
  --shadow-soft: 0 4px 24px rgba(45, 106, 79, 0.08);
  --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.04);
  --shadow-strong: 0 8px 32px rgba(0, 0, 0, 0.08);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --sidebar-w: 260px;
  --header-h: 64px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: "Yu Gothic UI", "Yu Gothic", "Segoe UI", "Hiragino Sans", "Meiryo", sans-serif;
  color: var(--text);
  background: var(--warm-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

[hidden] { display: none !important; }

/* ===== LAYOUT ===== */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}

.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 24px 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-brand {
  padding: 0 24px 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.sidebar-brand-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.02em;
}
.sidebar-brand-sub {
  font-size: 0.72rem;
  color: var(--text-mute);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 2px;
}

.nav { list-style: none; padding: 0 12px; }
.nav li { margin: 2px 0; }
.nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 500;
  transition: background 0.15s;
}
.nav a:hover {
  background: var(--primary-pale);
  text-decoration: none;
  color: var(--primary);
}
.nav a.active {
  background: var(--primary);
  color: #fff;
}
.nav-icon { width: 18px; display: inline-block; text-align: center; }

.sidebar-foot {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  margin-top: 24px;
  font-size: 0.78rem;
  color: var(--text-mute);
}
.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.user-chip img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}
.user-chip-name {
  font-size: 0.85rem;
  color: var(--text);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.signout-link {
  font-size: 0.78rem;
  color: var(--text-mute);
  cursor: pointer;
}
.signout-link:hover { color: var(--accent); }

/* ===== MAIN ===== */
.main {
  padding: 48px 56px 80px;
  max-width: 960px;
  width: 100%;
}

.page-head {
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.page-head h1 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.01em;
}
.page-head .lead {
  font-size: 0.95rem;
  color: var(--text-light);
  margin-top: 6px;
}

h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary);
  margin: 40px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary-pale);
}
h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin: 24px 0 10px;
}
p { margin-bottom: 12px; }
ul, ol { padding-left: 1.5em; margin-bottom: 16px; }
li { margin-bottom: 6px; }

/* ===== CARDS ===== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-card);
}
.card h2, .card h3 { margin-top: 0; }
.card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

/* ===== HERO (top page) ===== */
.hero-internal {
  background: linear-gradient(135deg, var(--primary-pale) 0%, var(--warm-bg-alt) 100%);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  margin-bottom: 32px;
}
.hero-brand {
  font-size: 0.8rem;
  color: var(--primary-light);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 8px;
}
.hero-title {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 8px;
}
.hero-sub {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* ===== GOLDEN CIRCLE (concentric) =====
 * Sinek式 同心円ダイアグラム。左にSVG、右に説明テキスト。 */
.golden {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 1.35fr;
  gap: 36px;
  align-items: center;
  margin: 28px 0 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 36px;
  box-shadow: var(--shadow-card);
}
.golden-circle {
  display: flex;
  justify-content: center;
  align-items: center;
}
.golden-circle svg {
  width: 100%;
  max-width: 380px;
  height: auto;
  display: block;
}
.gc-ring-3 { fill: #F9C97D; }   /* outer  - light peach */
.gc-ring-2 { fill: #F4A261; }   /* middle - accent-light */
.gc-ring-1 { fill: #E76F51; }   /* inner  - accent */
.gc-label-text {
  fill: #fff;
  font-family: "Segoe UI", "Yu Gothic UI", sans-serif;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 0.08em;
  text-anchor: middle;
  dominant-baseline: central;
}
.gc-arrow-line {
  stroke: #fff;
  stroke-width: 3;
  fill: none;
}
.gc-arrow-head { fill: #fff; }

.golden-text {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.gc-row {
  border-left: 4px solid transparent;
  padding: 4px 0 4px 18px;
}
.gc-row.gc-why  { border-left-color: #E76F51; }
.gc-row.gc-how  { border-left-color: #F4A261; }
.gc-row.gc-what { border-left-color: #F9C97D; }

.gc-tag {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  font-weight: 800;
  margin-bottom: 4px;
}
.gc-row.gc-why  .gc-tag { color: #E76F51; }
.gc-row.gc-how  .gc-tag { color: #D58341; }
.gc-row.gc-what .gc-tag { color: #B07C00; }

.gc-headline {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.55;
}
.gc-body {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.75;
}

/* ===== TRUST BADGES ===== */
.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0 8px;
}
.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 40px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  transition: all 0.15s;
  box-shadow: var(--shadow-card);
}
.trust-badge:hover {
  border-color: var(--primary-light);
  background: var(--primary-pale);
  color: var(--primary);
  text-decoration: none;
  transform: translateY(-1px);
}
.trust-badge-icon { font-size: 1.15rem; }

/* ===== CALLOUT BOXES ===== */
.callout {
  border-left: 4px solid var(--primary-light);
  background: var(--primary-pale);
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  margin: 16px 0;
}
.callout.warn {
  border-left-color: var(--accent);
  background: #FFF1EB;
}
.callout.danger {
  border-left-color: var(--danger);
  background: #FCE8E4;
}
.callout-title {
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text);
}

/* ===== STEP BADGES ===== */
.steps { list-style: none; padding: 0; margin: 16px 0; }
.steps li {
  display: flex;
  gap: 14px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}
.step-tag {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 0.74rem;
  font-weight: 700;
  height: 22px;
  white-space: nowrap;
}
.step-tag.s1 { background: #D8F3DC; color: #2D6A4F; }
.step-tag.s2 { background: #FFF3CD; color: #B07C00; }
.step-tag.s3 { background: #FFE0B2; color: #B45309; }
.step-tag.s4 { background: #FCE8E4; color: #C73E1D; }

/* ===== EVENT LIST ===== */
.event-list { list-style: none; padding: 0; margin: 16px 0; }
.event-list li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary-light);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.event-date {
  font-weight: 700;
  color: var(--primary);
  min-width: 84px;
}
.event-title { flex: 1; min-width: 200px; }
.event-loc { color: var(--text-light); font-size: 0.88rem; }
.badge-recruit {
  display: inline-block;
  padding: 3px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  border-radius: 12px;
  letter-spacing: 0.04em;
}

/* ===== CALENDAR ===== */
.calendar-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.calendar-wrap iframe {
  width: 100%;
  height: 640px;
  border: 0;
  display: block;
}

/* ===== AUTH GATE ===== */
.gate {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-pale) 0%, var(--warm-bg-alt) 100%);
  padding: 24px;
}
.gate-card {
  max-width: 440px;
  width: 100%;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  box-shadow: var(--shadow-strong);
  text-align: center;
}
.gate-logo {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}
.gate-sub {
  font-size: 0.84rem;
  color: var(--text-mute);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.gate-msg {
  font-size: 0.95rem;
  color: var(--text-light);
  margin-bottom: 28px;
}
.gate-actions {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}
.gate-error {
  color: var(--danger);
  font-size: 0.88rem;
  margin-top: 16px;
  padding: 14px 16px;
  background: #FCE8E4;
  border-radius: var(--radius-sm);
  text-align: left;
}
.gate-error b { display: block; margin-bottom: 4px; }
.gate-foot {
  margin-top: 24px;
  font-size: 0.78rem;
  color: var(--text-mute);
}

/* loading overlay while we boot auth */
.boot {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--warm-bg);
  z-index: 9999;
  color: var(--text-mute);
  font-size: 0.9rem;
}

/* ===== MOBILE NAV ===== */
.menu-btn {
  display: none;
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: var(--shadow-card);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .menu-btn { display: block; }
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    z-index: 150;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    box-shadow: var(--shadow-strong);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 140;
  }
  .sidebar-backdrop.show { display: block; }
  .main { padding: 64px 20px 40px; }
  .golden { grid-template-columns: 1fr; gap: 24px; padding: 24px 20px; }
  .golden-circle svg { max-width: 320px; }
  .hero-internal { padding: 32px 24px; }
  .hero-title { font-size: 1.5rem; }
}

@media (max-width: 540px) {
  .main { padding: 64px 16px 32px; }
  .card { padding: 18px 16px; }
  .calendar-wrap iframe { height: 520px; }
}
